gnu: python-multidict: Update to 4.7.5.
[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 Jakub Kądziołka <kuba@kadziolka.net>
72 ;;; Copyright © 2020 sirgazil <sirgazil@zoho.com>
73 ;;;
74 ;;; This file is part of GNU Guix.
75 ;;;
76 ;;; GNU Guix is free software; you can redistribute it and/or modify it
77 ;;; under the terms of the GNU General Public License as published by
78 ;;; the Free Software Foundation; either version 3 of the License, or (at
79 ;;; your option) any later version.
80 ;;;
81 ;;; GNU Guix is distributed in the hope that it will be useful, but
82 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
83 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
84 ;;; GNU General Public License for more details.
85 ;;;
86 ;;; You should have received a copy of the GNU General Public License
87 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
88
89 (define-module (gnu packages python-xyz)
90 #:use-module ((guix licenses) #:prefix license:)
91 #:use-module (gnu packages)
92 #:use-module (gnu packages algebra)
93 #:use-module (gnu packages adns)
94 #:use-module (gnu packages attr)
95 #:use-module (gnu packages backup)
96 #:use-module (gnu packages bash)
97 #:use-module (gnu packages check)
98 #:use-module (gnu packages compression)
99 #:use-module (gnu packages crypto)
100 #:use-module (gnu packages databases)
101 #:use-module (gnu packages dbm)
102 #:use-module (gnu packages enchant)
103 #:use-module (gnu packages file)
104 #:use-module (gnu packages fontutils)
105 #:use-module (gnu packages gcc)
106 #:use-module (gnu packages geo)
107 #:use-module (gnu packages ghostscript)
108 #:use-module (gnu packages gl)
109 #:use-module (gnu packages glib)
110 #:use-module (gnu packages gnome)
111 #:use-module (gnu packages graphviz)
112 #:use-module (gnu packages graphics)
113 #:use-module (gnu packages gstreamer)
114 #:use-module (gnu packages gtk)
115 #:use-module (gnu packages icu4c)
116 #:use-module (gnu packages image)
117 #:use-module (gnu packages imagemagick)
118 #:use-module (gnu packages kerberos)
119 #:use-module (gnu packages libevent)
120 #:use-module (gnu packages libffi)
121 #:use-module (gnu packages linux)
122 #:use-module (gnu packages llvm)
123 #:use-module (gnu packages man)
124 #:use-module (gnu packages maths)
125 #:use-module (gnu packages monitoring)
126 #:use-module (gnu packages multiprecision)
127 #:use-module (gnu packages networking)
128 #:use-module (gnu packages ncurses)
129 #:use-module (gnu packages openstack)
130 #:use-module (gnu packages pcre)
131 #:use-module (gnu packages perl)
132 #:use-module (gnu packages pkg-config)
133 #:use-module (gnu packages python)
134 #:use-module (gnu packages python-check)
135 #:use-module (gnu packages python-compression)
136 #:use-module (gnu packages python-crypto)
137 #:use-module (gnu packages python-science)
138 #:use-module (gnu packages python-web)
139 #:use-module (gnu packages qt)
140 #:use-module (gnu packages readline)
141 #:use-module (gnu packages sdl)
142 #:use-module (gnu packages search)
143 #:use-module (gnu packages shells)
144 #:use-module (gnu packages sphinx)
145 #:use-module (gnu packages ssh)
146 #:use-module (gnu packages terminals)
147 #:use-module (gnu packages tex)
148 #:use-module (gnu packages texinfo)
149 #:use-module (gnu packages time)
150 #:use-module (gnu packages tls)
151 #:use-module (gnu packages version-control)
152 #:use-module (gnu packages video)
153 #:use-module (gnu packages web)
154 #:use-module (gnu packages base)
155 #:use-module (gnu packages xml)
156 #:use-module (gnu packages xorg)
157 #:use-module (gnu packages xdisorg)
158 #:use-module (gnu packages tcl)
159 #:use-module (gnu packages bdw-gc)
160 #:use-module (gnu packages serialization)
161 #:use-module (guix packages)
162 #:use-module (guix download)
163 #:use-module (guix git-download)
164 #:use-module (guix hg-download)
165 #:use-module (guix utils)
166 #:use-module (guix build-system gnu)
167 #:use-module (guix build-system cmake)
168 #:use-module (guix build-system python)
169 #:use-module (guix build-system trivial)
170 #:use-module (srfi srfi-1)
171 #:use-module (srfi srfi-26))
172
173 (define-public python-psutil
174 (package
175 (name "python-psutil")
176 (version "5.6.5")
177 (source
178 (origin
179 (method url-fetch)
180 (uri (pypi-uri "psutil" version))
181 (sha256
182 (base32 "0isil5jxwwd8awz54qk28rpgjg43i5l6yl70g40vxwa4r4m56lfh"))))
183 (build-system python-build-system)
184 (arguments
185 ;; FIXME: some tests does not return and times out.
186 '(#:tests? #f))
187 (home-page "https://www.github.com/giampaolo/psutil")
188 (synopsis "Library for retrieving information on running processes")
189 (description
190 "psutil (Python system and process utilities) is a library for retrieving
191 information on running processes and system utilization (CPU, memory, disks,
192 network) in Python. It is useful mainly for system monitoring, profiling and
193 limiting process resources and management of running processes. It implements
194 many functionalities offered by command line tools such as: ps, top, lsof,
195 netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
196 pidof, tty, taskset, pmap.")
197 (properties `((python2-variant . ,(delay python2-psutil))))
198 (license license:bsd-3)))
199
200 (define-public python2-psutil
201 (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
202 (package
203 (inherit base)
204 (propagated-inputs
205 `(("python2-enum34" ,python2-enum34) ;optional
206 ,@(package-propagated-inputs base))))))
207
208 (define-public python-shapely
209 (package
210 (name "python-shapely")
211 (version "1.6.4.post2")
212 (source
213 (origin
214 (method url-fetch)
215 (uri (pypi-uri "Shapely" version))
216 (sha256
217 (base32
218 "03r42fmd9alp6r3q95ad6rldq2f7n1wimrw53zy5kpn33yv7pf64"))))
219 (build-system python-build-system)
220 (native-inputs
221 `(("python-cython" ,python-cython)
222 ("python-matplotlib" ,python-matplotlib)
223 ("python-pytest" ,python-pytest)
224 ("python-pytest-cov" ,python-pytest-cov)))
225 (inputs
226 `(("geos" ,geos)))
227 (propagated-inputs
228 `(("python-numpy" ,python-numpy)))
229 (arguments
230 `(#:phases
231 (modify-phases %standard-phases
232 (add-after 'unpack 'patch-geos-path
233 (lambda* (#:key inputs #:allow-other-keys)
234 (let ((geos (assoc-ref inputs "geos"))
235 (glibc (assoc-ref inputs ,(if (%current-target-system)
236 "cross-libc" "libc"))))
237 (substitute* "shapely/geos.py"
238 (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)")
239 (string-append "_lgeos = load_dll('geos_c', fallbacks=['"
240 geos "/lib/libgeos_c.so'])"))
241 (("free = load_dll\\('c'\\)\\.free")
242 (string-append "free = load_dll('c', fallbacks=['"
243 glibc "/lib/libc.so.6']).free"))))
244 #t)))))
245 (home-page "https://github.com/Toblerity/Shapely")
246 (synopsis "Library for the manipulation and analysis of geometric objects")
247 (description "Shapely is a Python package for manipulation and analysis of
248 planar geometric objects. It is based on the @code{GEOS} library.")
249 (license license:bsd-3)))
250
251 (define-public python-shortuuid
252 (package
253 (name "python-shortuuid")
254 (version "0.5.0")
255 (source
256 (origin
257 (method url-fetch)
258 (uri (pypi-uri "shortuuid" version))
259 (sha256
260 (base32
261 "1f8i4zwj5vmpzbz6b17bljy4399gx5aq7vsyw63sz2qgyjcd73yh"))))
262 (build-system python-build-system)
263 (native-inputs
264 `(("python-pep8" ,python-pep8)))
265 (home-page "https://github.com/skorokithakis/shortuuid")
266 (synopsis "Generator library for concise, unambiguous and URL-safe UUIDs")
267 (description
268 "@code{shortuuid} is a Python library for generating concise, unambiguous
269 and URL-safe UUIDs. UUIDs are generated using the built-in Python @code{uuid}
270 module and then similar looking characters are removed.")
271 (license license:bsd-3)))
272
273 (define-public python-logwrap
274 (package
275 (name "python-logwrap")
276 (version "3.2.1")
277 (source
278 (origin
279 (method url-fetch)
280 (uri (pypi-uri "logwrap" version ".zip"))
281 (sha256
282 (base32
283 "1d2k0hvpbi51vl410y8fbs5m0nxnlh2k7gr2nrh3k81ibhzscsra"))))
284 (build-system python-build-system)
285 (propagated-inputs
286 `(("python-six" ,python-six)
287 ("python-typing" ,python-typing)))
288 (native-inputs
289 `(("unzip" ,unzip)
290 ("python-cython" ,python-cython)
291 ("python-pytest" ,python-pytest)
292 ("python-pytest-cov" ,python-pytest-cov)
293 ("python-pytest-runner" ,python-pytest-runner)))
294 (home-page "https://github.com/penguinolog/logwrap")
295 (synopsis "Decorator for logging function arguments")
296 (description "This package provides a decorator to log function arguments
297 and function call return values in a human-readable way.")
298 (license license:asl2.0)))
299
300 (define-public python2-shapely
301 (package-with-python2 python-shapely))
302
303 (define-public python-clyent
304 (package
305 (name "python-clyent")
306 (version "1.2.1")
307 (source
308 (origin
309 (method url-fetch)
310 (uri (pypi-uri "clyent" version))
311 (sha256
312 (base32
313 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
314 (build-system python-build-system)
315 (native-inputs
316 `(("python-mock" ,python-mock)))
317 (home-page "https://github.com/binstar/clyent")
318 (synopsis "Command line client library")
319 (description "Clyent is a Python command line utiliy library. It is used
320 by @code{binstar}, @code{binstar-build} and @code{chalmers}.")
321 (license license:bsd-3)))
322
323 (define-public python2-clyent
324 (package-with-python2 python-clyent))
325
326 (define-public python-babel
327 (package
328 (name "python-babel")
329 (version "2.7.0")
330 (source
331 (origin
332 (method url-fetch)
333 (uri (pypi-uri "Babel" version))
334 (sha256
335 (base32
336 "0a7wawx8vsg7igvz6p3x909fskhg4b2y1910xk4f4c8y22p3aqg8"))))
337 (build-system python-build-system)
338 (native-inputs
339 `(("python-freezegun" ,python-freezegun)
340 ("python-pytest" ,python-pytest)))
341 (propagated-inputs
342 `(("python-pytz" ,python-pytz)))
343 (arguments
344 `(#:phases (modify-phases %standard-phases
345 (replace 'check
346 (lambda _
347 (invoke "pytest" "-vv" "-k"
348 (string-append
349 ;; XXX: These tests fail when using Pytest 4.x and
350 ;; Babel 2.6.0. Try removing this for later versions.
351 "not test_no_inherit_metazone_marker_never_in_output"
352 " and not test_smoke_dates"
353 " and not test_smoke_numbers")))))))
354 (home-page "http://babel.pocoo.org/")
355 (synopsis
356 "Tools for internationalizing Python applications")
357 (description
358 "Babel is composed of two major parts:
359 - tools to build and work with gettext message catalogs
360 - a Python interface to the CLDR (Common Locale Data Repository), providing
361 access to various locale display names, localized number and date formatting,
362 etc. ")
363 (license license:bsd-3)))
364
365 (define-public python2-babel
366 (package-with-python2 python-babel))
367
368 ;; Sphinx < 2.0 requires this version. Remove once no longer needed.
369 (define-public python2-babel-2.6
370 (package
371 (inherit python2-babel)
372 (version "2.6.0")
373 (source (origin
374 (method url-fetch)
375 (uri (pypi-uri "Babel" version))
376 (sha256
377 (base32
378 "08rxmbx2s4irp0w0gmn498vns5xy0fagm0fg33xa772jiks51flc"))))))
379
380 (define-public python2-backport-ssl-match-hostname
381 (package
382 (name "python2-backport-ssl-match-hostname")
383 (version "3.5.0.1")
384 (source
385 (origin
386 (method url-fetch)
387 (uri (pypi-uri "backports.ssl_match_hostname" version))
388 (sha256
389 (base32
390 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
391 (build-system python-build-system)
392 (arguments
393 `(#:python ,python-2
394 #:tests? #f)) ; no test target
395 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
396 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
397 (description
398 "This backport brings the ssl.match_hostname() function to users of
399 earlier versions of Python. The function checks the hostname in the
400 certificate returned by the server to which a connection has been established,
401 and verifies that it matches the intended target hostname.")
402 (license license:psfl)))
403
404 (define-public python-boolean.py
405 (package
406 (name "python-boolean.py")
407 (version "3.6")
408 (source
409 (origin
410 ;; There's no source tarball on PyPI.
411 (method git-fetch)
412 (uri (git-reference
413 (url "https://github.com/bastikr/boolean.py")
414 (commit (string-append "v" version))))
415 (file-name (git-file-name name version))
416 (sha256
417 (base32 "1wc89y73va58cj7dsx6c199zpxsy9q53dsffsdj6zmc90inqz6qs"))))
418 (build-system python-build-system)
419 (home-page "https://github.com/bastikr/boolean.py")
420 (synopsis "Boolean algebra in one Python module")
421 (description
422 "This is a small Python library that implements boolean algebra.
423 It defines two base elements, @code{TRUE} and @code{FALSE}, and a
424 @code{Symbol} class that can take on one of these two values. Calculations
425 are done only in terms of @code{AND}, @code{OR}, and @code{NOT}---other
426 compositions like @code{XOR} and @code{NAND} are emulated on top of them.
427 Expressions are constructed from parsed strings or directly in Python.")
428 (license license:bsd-2)))
429
430 (define-public python-hdf4
431 (package
432 (name "python-hdf4")
433 (version "0.9")
434 (source
435 (origin
436 (method url-fetch)
437 (uri (pypi-uri name version))
438 (sha256
439 (base32
440 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
441 (build-system python-build-system)
442 (native-inputs `(("nose" ,python-nose)))
443 (propagated-inputs `(("numpy" ,python-numpy)))
444 (inputs
445 `(("hdf4" ,hdf4)
446 ("libjpeg" ,libjpeg)
447 ("zlib" ,zlib)))
448 (arguments
449 `(#:phases
450 (modify-phases %standard-phases
451 (replace 'check
452 (lambda _
453 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
454 ;; on to import numpy. Somehow this works on their CI system.
455 ;; Let's just manage PYTHONPATH here instead.
456 (substitute* "runexamples.sh"
457 (("export PYTHONPATH=.*") ""))
458 (setenv "PYTHONPATH"
459 (string-append (getcwd) ":"
460 (getenv "PYTHONPATH")))
461 (invoke "./runexamples.sh")
462 (invoke "nosetests" "-v"))))))
463 (home-page "https://github.com/fhs/python-hdf4")
464 (synopsis "Python interface to the NCSA HDF4 library")
465 (description
466 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
467 which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
468 NetCDF files can also be read and modified. Python-HDF4 is a fork of
469 @url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
470 (license license:expat)))
471
472 (define-public python2-hdf4
473 (package-with-python2 python-hdf4))
474
475 (define-public python-h5py
476 (package
477 (name "python-h5py")
478 (version "2.10.0")
479 (source
480 (origin
481 (method url-fetch)
482 (uri (pypi-uri "h5py" version))
483 (sha256
484 (base32
485 "0baipzv8n93m0dq0riyi8rfhzrjrfrfh8zqhszzp1j2xjac2fhc4"))))
486 (build-system python-build-system)
487 (arguments
488 `(#:tests? #f ; no test target
489 #:phases
490 (modify-phases %standard-phases
491 (add-after 'unpack 'fix-hdf5-paths
492 (lambda* (#:key inputs #:allow-other-keys)
493 (let ((prefix (assoc-ref inputs "hdf5")))
494 (substitute* "setup_build.py"
495 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
496 (string-append "['" prefix "/lib" "']"))
497 (("'/opt/local/include', '/usr/local/include'")
498 (string-append "'" prefix "/include" "'")))
499 (substitute* "setup_configure.py"
500 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
501 (string-append "['" prefix "/lib" "']")))
502 #t))))))
503 (propagated-inputs
504 `(("python-six" ,python-six)
505 ("python-numpy" ,python-numpy)))
506 (inputs
507 `(("hdf5" ,hdf5-1.10)))
508 (native-inputs
509 `(("python-cython" ,python-cython)
510 ("python-pkgconfig" ,python-pkgconfig)
511 ("pkg-config" ,pkg-config)))
512 (home-page "https://www.h5py.org/")
513 (synopsis "Read and write HDF5 files from Python")
514 (description
515 "The h5py package provides both a high- and low-level interface to the
516 HDF5 library from Python. The low-level interface is intended to be a
517 complete wrapping of the HDF5 API, while the high-level component supports
518 access to HDF5 files, datasets and groups using established Python and NumPy
519 concepts.")
520 (license license:bsd-3)))
521
522 (define-public python2-h5py
523 (package-with-python2 python-h5py))
524
525 (define-public python-sh
526 (package
527 (name "python-sh")
528 (version "1.12.14")
529 (source
530 (origin
531 (method url-fetch)
532 (uri (pypi-uri "sh" version))
533 (sha256
534 (base32
535 "1z2hx357xp3v4cv44xmqp7lli3frndqpyfmpbxf7n76h7s1zaaxm"))))
536 (build-system python-build-system)
537 (arguments
538 '(#:phases
539 (modify-phases %standard-phases
540 (replace 'check
541 (lambda _
542 ;; XXX: A Python 2 test fails when HOME=/homeless-shelter.
543 (setenv "HOME" "/tmp")
544 (invoke "python" "sh.py" "test"))))))
545 (native-inputs
546 `(("python-coverage" ,python-coverage)))
547 (home-page "https://github.com/amoffat/sh")
548 (synopsis "Python subprocess replacement")
549 (description "This package provides a replacement for Python's
550 @code{subprocess} feature.")
551 (license license:expat)))
552
553 (define-public python2-sh
554 (package-with-python2 python-sh))
555
556 (define-public python-cftime
557 (package
558 (name "python-cftime")
559 (version "1.0.4.2")
560 (source
561 (origin
562 (method url-fetch)
563 (uri (pypi-uri "cftime" version))
564 (sha256
565 (base32 "0w0gi6jnch38hiygl62j4xkcirv4y3dcwrvxl9p7bsk6j27lzihs"))))
566 (build-system python-build-system)
567 (propagated-inputs
568 `(("python-numpy" ,python-numpy)))
569 (native-inputs
570 `(("python-coveralls" ,python-coveralls)
571 ("python-cython" ,python-cython)
572 ("python-pytest-cov" ,python-pytest-cov)))
573 (home-page "https://github.com/Unidata/cftime")
574 (synopsis "Library for time handling")
575 (description
576 "This package provides time-handling functionality that used to be part
577 of the netcdf4 package before.")
578 ;; This package claims to include code under the GPLv3 but is released
579 ;; under ISC.
580 (license (list license:isc license:gpl3+))))
581
582 (define-public python-netcdf4
583 (package
584 (name "python-netcdf4")
585 (version "1.4.2")
586 (source
587 (origin
588 (method url-fetch)
589 (uri (pypi-uri "netCDF4" version))
590 (sha256
591 (base32
592 "0c0sklgrmv15ygliin8qq0hp7vanmbi74m6zpi0r1ksr0hssyd5r"))))
593 (build-system python-build-system)
594 (arguments
595 '(#:phases
596 (modify-phases %standard-phases
597 (add-after 'unpack 'configure-locations
598 (lambda* (#:key inputs #:allow-other-keys)
599 (setenv "HDF5_DIR" (assoc-ref inputs "hdf5"))
600 #t)))))
601 (native-inputs
602 `(("python-cython" ,python-cython)))
603 (propagated-inputs
604 `(("python-numpy" ,python-numpy)
605 ("python-cftime" ,python-cftime)))
606 (inputs
607 `(("netcdf" ,netcdf)
608 ("hdf4" ,hdf4)
609 ("hdf5" ,hdf5)))
610 (home-page "https://github.com/Unidata/netcdf4-python")
611 (synopsis "Python/numpy interface to the netCDF library")
612 (description "Netcdf4-python is a Python interface to the netCDF C
613 library. netCDF version 4 has many features not found in earlier
614 versions of the library and is implemented on top of HDF5. This module
615 can read and write files in both the new netCDF 4 and the old netCDF 3
616 format, and can create files that are readable by HDF5 clients. The
617 API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
618 to users of that module.")
619 ;; The software is mainly ISC, but includes some files covered
620 ;; by the Expat license.
621 (license (list license:isc license:expat))))
622
623 (define-public python2-netcdf4
624 (package-with-python2 python-netcdf4))
625
626 (define-public python-license-expression
627 (package
628 (name "python-license-expression")
629 (version "0.999")
630 (source
631 (origin
632 (method url-fetch)
633 (uri (pypi-uri "license-expression" version))
634 (sha256
635 (base32 "08ppb0bxbrsxazy88sgpl9yffvdsabw6dkk1nc332wcz2mphwwyf"))))
636 (build-system python-build-system)
637 (propagated-inputs
638 `(("python-boolean.py" ,python-boolean.py)))
639 (home-page "https://github.com/nexB/license-expression")
640 (synopsis "Apply boolean logic to license expressions")
641 (description
642 "This Python module defines a tiny language to evaluate and compare
643 license expressions using boolean logic. Logical combinations of licenses can
644 be tested for equality, containment, and equivalence. They can be normalised
645 and simplified. It supports SPDX license expressions as well as other naming
646 conventions and aliases in the same expression.")
647 (license license:gpl2+)))
648
649 (define-public python-lockfile
650 (package
651 (name "python-lockfile")
652 (version "0.12.2")
653 (source
654 (origin
655 (method url-fetch)
656 (uri (pypi-uri "lockfile" version))
657 (sha256
658 (base32
659 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
660 (build-system python-build-system)
661 (arguments '(#:test-target "check"))
662 (native-inputs
663 `(("python-pbr" ,python-pbr)))
664 (home-page "https://launchpad.net/pylockfile")
665 (synopsis "Platform-independent file locking module")
666 (description
667 "The lockfile package exports a LockFile class which provides a simple
668 API for locking files.")
669 (license license:expat)))
670
671 (define-public python2-lockfile
672 (package-with-python2 python-lockfile))
673
674 (define-public python-filelock
675 (package
676 (name "python-filelock")
677 (version "3.0.12")
678 (source
679 (origin
680 (method url-fetch)
681 (uri (pypi-uri "filelock" version))
682 (sha256
683 (base32
684 "0ngzlvb5j8gqs2nxlp2b0jhzii792h66wsn694qm8kqixr225n0q"))))
685 (build-system python-build-system)
686 (home-page
687 "https://github.com/benediktschmitt/py-filelock")
688 (synopsis "Platform independent file lock")
689 (description "@code{filelock} contains a single module implementing
690 a platform independent file lock in Python, which provides a simple way of
691 inter-process communication.")
692 (license license:unlicense)))
693
694 (define-public python-semantic-version
695 (package
696 (name "python-semantic-version")
697 (version "2.6.0")
698 (source
699 (origin
700 (method url-fetch)
701 (uri (pypi-uri "semantic_version" version))
702 (sha256
703 (base32
704 "1h2l9xyg1zzsda6kjcmfcgycbvrafwci283vcr1v5sbk01l2hhra"))))
705 (build-system python-build-system)
706 (arguments
707 `(#:tests? #f)) ; PyPI tarball lacks tests
708 (home-page "https://github.com/rbarrois/python-semanticversion")
709 (synopsis "Semantic versioning module for Python")
710 (description
711 "The @code{semantic_version} class is a small library for handling
712 @uref{https://semver.org/, semantic versioning} (@dfn{SemVer}) in Python.
713
714 It can compare versions, generate a new version that represents a bump in one of
715 the version levels, and check whether any given string is a proper semantic
716 version identifier.")
717 (license license:bsd-3)))
718
719 (define-public python2-semantic-version
720 (package-with-python2 python-semantic-version))
721
722 (define-public python-serpent
723 (package
724 (name "python-serpent")
725 (version "1.28")
726 (source
727 (origin
728 (method url-fetch)
729 (uri (pypi-uri "serpent" version))
730 (sha256
731 (base32 "1arnckykpkvv2qrp49l1k7q5mr5pisswl0rvdx98x8wsl1n361pk"))))
732 (build-system python-build-system)
733 (native-inputs
734 `(("python-attrs" ,python-attrs)
735 ("python-pytz" ,python-pytz)))
736 (home-page "https://github.com/irmen/Serpent")
737 (synopsis "Serializer for literal Python expressions")
738 (description
739 "Serpent provides @code{ast.literal_eval()}-compatible object tree
740 serialization. It serializes an object tree into bytes (an utf-8 encoded
741 string) that can be decoded and then passed as-is to @code{ast.literal_eval()}
742 to rebuild the original object tree.
743
744 Because only safe literals are encoded, it is safe to send serpent data to
745 other machines, such as over the network.")
746 (license license:expat)))
747
748 (define-public python-setuptools
749 (package
750 (name "python-setuptools")
751 (version "41.0.1")
752 (source
753 (origin
754 (method url-fetch)
755 (uri (pypi-uri "setuptools" version ".zip"))
756 (sha256
757 (base32
758 "04sns22y2hhsrwfy1mha2lgslvpjsjsz8xws7h2rh5a7ylkd28m2"))
759 (modules '((guix build utils)))
760 (snippet
761 '(begin
762 ;; Remove included binaries which are used to build self-extracting
763 ;; installers for Windows.
764 ;; TODO: Find some way to build them ourself so we can include them.
765 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
766 #t))))
767 (build-system python-build-system)
768 ;; FIXME: Tests require pytest, which itself relies on setuptools.
769 ;; One could bootstrap with an internal untested setuptools.
770 (arguments
771 `(#:tests? #f))
772 (home-page "https://pypi.org/project/setuptools/")
773 (synopsis
774 "Library designed to facilitate packaging Python projects")
775 (description
776 "Setuptools is a fully-featured, stable library designed to facilitate
777 packaging Python projects, where packaging includes:
778 Python package and module definitions,
779 distribution package metadata,
780 test hooks,
781 project installation,
782 platform-specific details,
783 Python 3 support.")
784 ;; TODO: setuptools now bundles the following libraries:
785 ;; packaging, pyparsing, six and appdirs. How to unbundle?
786 (license (list license:psfl ; setuptools itself
787 license:expat ; six, appdirs, pyparsing
788 license:asl2.0 ; packaging is dual ASL2/BSD-2
789 license:bsd-2))))
790
791 (define-public python2-setuptools
792 (package-with-python2 python-setuptools))
793
794 ;; The setuptools provided by Python 3.7.4 is too new for Tensorflow.
795 (define-public python-setuptools-for-tensorflow
796 (hidden-package
797 (package
798 (inherit python-setuptools)
799 (version "39.1.0")
800 (source (origin
801 (inherit (package-source python-setuptools))
802 (uri (pypi-uri "setuptools" version ".zip"))
803 (sha256
804 (base32
805 "1mzdhvfhnv4lggxa8rjl0dzqxvfx377gg5sqs57v89wrp09lwj65")))))))
806
807 (define-public python-uniseg
808 (package
809 (name "python-uniseg")
810 (version "0.7.1")
811 (source
812 (origin
813 (method url-fetch)
814 (uri (pypi-uri "uniseg" version ".zip"))
815 (sha256
816 (base32
817 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
818 (build-system python-build-system)
819 (arguments
820 '(#:tests? #f)) ; The test suite requires network access.
821 (native-inputs
822 `(("unzip" ,unzip)))
823 (home-page
824 "https://bitbucket.org/emptypage/uniseg-python")
825 (synopsis
826 "Python library to determine Unicode text segmentations")
827 (description
828 "Uniseg is a Python package used to determine Unicode text segmentations.
829 Supported segmentations include:
830 @enumerate
831 @item @dfn{Code point} (any value in the Unicode codespace)
832 @item @dfn{Grapheme cluster} (user-perceived character made of a single or
833 multiple Unicode code points, e.g. \"G\" + acute-accent)
834 @item Word break
835 @item Sentence break
836 @item Line break
837 @end enumerate")
838 (license license:expat)))
839
840 (define-public python2-uniseg
841 (package-with-python2 python-uniseg))
842
843 (define-public python-humanfriendly
844 (package
845 (name "python-humanfriendly")
846 (version "4.4.1")
847 (source
848 (origin
849 (method url-fetch)
850 (uri (pypi-uri "humanfriendly" version))
851 (sha256
852 (base32
853 "0pisgizjql86785jchfjv217g0lsgk114g2lja5j4y3lsc3b9szi"))))
854 (build-system python-build-system)
855 (arguments
856 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
857 #:tests? #f))
858 (propagated-inputs
859 `(("python-monotonic" ,python-monotonic)))
860 (home-page "https://humanfriendly.readthedocs.io")
861 (synopsis "Human-friendly input and output in Python")
862 (description
863 "The functions and classes in @code{humanfriendly} can be used to make
864 text interfaces more user-friendly. It includes tools to parse and format
865 numbers, file sizes, and timespans, timers for long-running operations, menus
866 to allow the user to choose from a list of options, and terminal interaction
867 helpers.")
868 (license license:expat)))
869
870 (define-public python2-humanfriendly
871 (package-with-python2 python-humanfriendly))
872
873 (define-public python-capturer
874 (package
875 (name "python-capturer")
876 (version "2.4")
877 (source
878 (origin
879 (method url-fetch)
880 (uri (pypi-uri "capturer" version))
881 (sha256
882 (base32
883 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
884 (build-system python-build-system)
885 (arguments
886 `(#:tests? #f))
887 (propagated-inputs
888 `(("python-humanfriendly" ,python-humanfriendly)))
889 (home-page "https://capturer.readthedocs.io")
890 (synopsis "Capture stdout and stderr streams of the current process")
891 (description
892 "The capturer package makes it easy to capture the stdout and stderr
893 streams of the current process and subprocesses. Output can be relayed
894 to the terminal in real time but is also available to the Python program
895 for additional processing.")
896 (license license:expat)))
897
898 (define-public python2-capturer
899 (package-with-python2 python-capturer))
900
901 (define-public python-case
902 (package
903 (name "python-case")
904 (version "1.5.3")
905 (source
906 (origin
907 (method url-fetch)
908 (uri (pypi-uri "case" version))
909 (sha256
910 (base32
911 "1cagg06vfph864s6l5jb0zqliwxh647bki8j6lf4a4qrv40jnhs8"))))
912 (build-system python-build-system)
913 (propagated-inputs
914 `(("python-mock" ,python-mock)
915 ("python-nose" ,python-nose)
916 ("python-six" ,python-six)
917 ("python-unittest2" ,python-unittest2)))
918 (native-inputs
919 `(("python-coverage" ,python-coverage)))
920 (home-page "https://github.com/celery/case")
921 (synopsis "Unittest utilities and convenience methods")
922 (description
923 "The @code{case} package provides utilities on top of unittest, including
924 some helpful Python 2 compatibility convenience methods.")
925 (license license:bsd-3)))
926
927 (define-public python-verboselogs
928 (package
929 (name "python-verboselogs")
930 (version "1.7")
931 (source
932 (origin
933 (method url-fetch)
934 (uri (pypi-uri "verboselogs" version))
935 (sha256
936 (base32
937 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
938 (build-system python-build-system)
939 (arguments
940 `(#:phases
941 (modify-phases %standard-phases
942 (replace 'check
943 (lambda _
944 ;; Do not run pylint plugin test, as astroid is an old
945 ;; unsupported version.
946 (invoke "pytest" "-v" "-k" "not test_pylint_plugin"
947 "verboselogs/tests.py"))))))
948 (native-inputs
949 `(("python-mock" ,python-mock)
950 ("python-pytest" ,python-pytest)))
951 (home-page "https://verboselogs.readthedocs.io")
952 (synopsis "Verbose logging level for Python's logging module")
953 (description
954 "The @code{verboselogs} package extends Python's @code{logging} module to
955 add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
956 (license license:expat)))
957
958 (define-public python2-verboselogs
959 (package-with-python2 python-verboselogs))
960
961 (define-public python-coloredlogs
962 (package
963 (name "python-coloredlogs")
964 (version "10.0")
965 (source
966 (origin
967 (method url-fetch)
968 (uri (pypi-uri "coloredlogs" version))
969 (sha256
970 (base32
971 "0dkw6xp0r1dwgz4s2f58npx5nxfq51wf4l6qkm5ib27slgfs4sdq"))))
972 (build-system python-build-system)
973 (arguments
974 `(;Tests require some updated modules
975 #:tests? #f))
976 (propagated-inputs
977 `(("python-capturer" ,python-capturer)))
978 (home-page "https://coloredlogs.readthedocs.io")
979 (synopsis "Colored stream handler for Python's logging module")
980 (description
981 "The @code{coloredlogs} package enables colored terminal output for
982 Python's logging module. The @code{ColoredFormatter} class inherits from
983 @code{logging.Formatter} and uses ANSI escape sequences to render your logging
984 messages in color.")
985 (license license:expat)))
986
987 (define-public python2-coloredlogs
988 (package-with-python2 python-coloredlogs))
989
990 (define-public python-editorconfig
991 (package
992 (name "python-editorconfig")
993 (version "0.12.2")
994 (source
995 (origin
996 (method url-fetch)
997 (uri (pypi-uri "EditorConfig" version))
998 (sha256
999 (base32
1000 "0v55z351p9qkyp3bbspwywwn28sbcknhirngjbj779n3z52z63hv"))))
1001 (build-system python-build-system)
1002 (home-page "https://editorconfig.org/")
1003 (synopsis "EditorConfig bindings for python")
1004 (description "The EditorConfig project consists of a file format for
1005 defining coding styles and a collection of text editor plugins that enable
1006 editors to read the file format and adhere to defined styles. EditorConfig
1007 files are easily readable and they work nicely with version control systems.")
1008 ;; "fnmatch.py" and "ini.py" are licensed under psfl, the rest is bsd-2.
1009 (license (list license:bsd-2 license:psfl))))
1010
1011 (define-public python-et-xmlfile
1012 (package
1013 (name "python-et-xmlfile")
1014 (version "1.0.1")
1015 (source
1016 (origin
1017 (method url-fetch)
1018 (uri (pypi-uri "et_xmlfile" version))
1019 (sha256
1020 (base32
1021 "0nrkhcb6jdrlb6pwkvd4rycw34y3s931hjf409ij9xkjsli9fkb1"))))
1022 (build-system python-build-system)
1023 (arguments
1024 `(#:phases (modify-phases %standard-phases
1025 (replace 'check
1026 (lambda _
1027 (invoke "pytest"))))))
1028 (native-inputs
1029 `(("python-pytest" ,python-pytest)
1030 ("python-lxml" ,python-lxml))) ;used for the tests
1031 (home-page "https://bitbucket.org/openpyxl/et_xmlfile")
1032 (synopsis "Low memory implementation of @code{lxml.xmlfile}")
1033 (description "This Python library is based upon the @code{xmlfile} module
1034 from @code{lxml}. It aims to provide a low memory, compatible implementation
1035 of @code{xmlfile}.")
1036 (license license:expat)))
1037
1038 (define-public python2-et-xmlfile
1039 (package-with-python2 python-et-xmlfile))
1040
1041 (define-public python-openpyxl
1042 (package
1043 (name "python-openpyxl")
1044 (version "2.6.2")
1045 (source
1046 (origin
1047 ;; We use the upstream repository, as the tests are not included in the
1048 ;; PyPI releases.
1049 (method hg-fetch)
1050 (uri (hg-reference
1051 (url "https://bitbucket.org/openpyxl/openpyxl")
1052 (changeset version)))
1053 (file-name (string-append name "-" version "-checkout"))
1054 (sha256
1055 (base32 "1qhij6kcvdxqjy4g6193nsv4q7fy8n4fwyd3c2z047idlm6s3j4w"))))
1056 (build-system python-build-system)
1057 (arguments
1058 `(#:phases (modify-phases %standard-phases
1059 (replace 'check
1060 (lambda _
1061 (invoke "pytest"))))))
1062 (native-inputs
1063 ;; For the test suite.
1064 `(("python-lxml" ,python-lxml)
1065 ("python-pillow" ,python-pillow)
1066 ("python-pytest" ,python-pytest)))
1067 (propagated-inputs
1068 `(("python-et-xmlfile" ,python-et-xmlfile)
1069 ("python-jdcal" ,python-jdcal)))
1070 (home-page "https://openpyxl.readthedocs.io")
1071 (synopsis "Python library to read/write Excel 2010 XLSX/XLSM files")
1072 (description "This Python library allows reading and writing to the Excel XLSX, XLSM,
1073 XLTX and XLTM file formats that are defined by the Office Open XML (OOXML)
1074 standard.")
1075 (license license:expat)))
1076
1077 (define-public python-eventlet
1078 (package
1079 (name "python-eventlet")
1080 (version "0.25.1")
1081 (source
1082 (origin
1083 (method url-fetch)
1084 (uri (pypi-uri "eventlet" version))
1085 (sha256
1086 (base32
1087 "1hgz8jq19wlz8vwqj900ry8cjv578nz4scc91mlc8944yid6573c"))))
1088 (build-system python-build-system)
1089 (propagated-inputs
1090 `(("python-greenlet" ,python-greenlet)))
1091 (arguments
1092 ;; TODO: Requires unpackaged 'enum-compat'.
1093 '(#:tests? #f))
1094 (home-page "https://eventlet.net")
1095 (synopsis "Concurrent networking library for Python")
1096 (description
1097 "Eventlet is a concurrent networking library for Python that
1098 allows you to change how you run your code, not how you write it.
1099 It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
1100 Coroutines ensure that the developer uses a blocking style of programming
1101 that is similar to threading, but provide the benefits of non-blocking I/O.
1102 The event dispatch is implicit, which means you can easily use @code{Eventlet}
1103 from the Python interpreter, or as a small part of a larger application.")
1104 (license license:expat)))
1105
1106 (define-public python2-eventlet
1107 (let ((base (package-with-python2
1108 (strip-python2-variant python-eventlet))))
1109 (package (inherit base)
1110 (propagated-inputs
1111 `(("python2-enum34" ,python2-enum34)
1112 ,@(package-propagated-inputs base))))))
1113
1114 (define-public python-six
1115 (package
1116 (name "python-six")
1117 (version "1.12.0")
1118 (source
1119 (origin
1120 (method url-fetch)
1121 (uri (pypi-uri "six" version))
1122 (sha256
1123 (base32
1124 "0wxs1q74v07ssjywbbm7x6h5v9qx209ld2yfsif4060sxi0h2sni"))))
1125 (build-system python-build-system)
1126 (arguments
1127 `(#:phases
1128 (modify-phases %standard-phases
1129 (replace 'check
1130 (lambda _
1131 (invoke "py.test" "-v"))))))
1132 (native-inputs
1133 `(("python-py" ,python-py)
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.0")
1731 (source
1732 (origin
1733 (method url-fetch)
1734 (uri (pypi-uri "py" version))
1735 (sha256
1736 (base32
1737 "0lsy1gajva083pzc7csj1cvbmminb7b4l6a0prdzyb3fd829nqyw"))))
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.3.1")
3835 (source
3836 (origin
3837 (method url-fetch)
3838 (uri (pypi-uri "pyparsing" version))
3839 (sha256
3840 (base32 "0yk6xl885b91dmlhlsap7x78hk2rdr879fln9anbq6k4ca42djb6"))))
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.7.5")
4392 (source
4393 (origin
4394 (method url-fetch)
4395 (uri (pypi-uri "multidict" version))
4396 (sha256
4397 (base32
4398 "07ikq2c72kd263hpldw55y0px2l3g34hjk66ml9lryh1jv287qmf"))))
4399 (build-system python-build-system)
4400 (arguments
4401 '(#:modules ((ice-9 ftw)
4402 (srfi srfi-1)
4403 (srfi srfi-26)
4404 (guix build utils)
4405 (guix build python-build-system))
4406 #:phases (modify-phases %standard-phases
4407 (replace 'check
4408 (lambda* (#:key tests? #:allow-other-keys)
4409 (if tests?
4410 (begin
4411 (let ((libdir (find (cut string-prefix? "lib." <>)
4412 (scandir "build"))))
4413 (setenv "PYTHONPATH"
4414 (string-append "./build/" libdir ":"
4415 (getenv "PYTHONPATH")))
4416 (invoke "pytest" "-vv")))
4417 (format #t "test suite not run~%"))
4418 #t)))))
4419 (native-inputs
4420 `(("python-pytest" ,python-pytest)
4421 ("python-pytest-cov" ,python-pytest-cov)))
4422 (home-page "https://github.com/aio-libs/multidict/")
4423 (synopsis "Multidict implementation")
4424 (description "Multidict is dict-like collection of key-value pairs
4425 where key might be occurred more than once in the container.")
4426 (license license:asl2.0)))
4427
4428 (define-public python-orderedmultidict
4429 (package
4430 (name "python-orderedmultidict")
4431 (version "0.7.11")
4432 (source
4433 (origin
4434 (method url-fetch)
4435 (uri (pypi-uri "orderedmultidict" version))
4436 (sha256
4437 (base32
4438 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
4439 (build-system python-build-system)
4440 (arguments
4441 `(#:phases
4442 (modify-phases %standard-phases
4443 (add-after 'unpack 'fix-tests
4444 (lambda _
4445 ;; The package uses nosetest for running the tests.
4446 ;; Adding this initfile allows to run the test suite
4447 ;; without requiring nosetest.
4448 (with-output-to-file "tests/__init__.py" newline)
4449 #t)))))
4450 (propagated-inputs
4451 `(("python-six" ,python-six)))
4452 (native-inputs
4453 `(("python-pycodestyle" ,python-pycodestyle)))
4454 (home-page "https://github.com/gruns/orderedmultidict")
4455 (synopsis "Python Ordered Multivalue Dictionary - omdict")
4456 (description "This package contains a library for ordered multivalue
4457 dictionaries. A multivalue dictionary is a dictionary that can store
4458 multiple values for the same key. An ordered multivalue dictionary is a
4459 multivalue dictionary that retains the order of insertions and deletions.")
4460 (license license:unlicense)))
4461
4462 (define-public python2-orderedmultidict
4463 (package-with-python2 python-orderedmultidict))
4464
4465 (define-public python-autopep8
4466 (package
4467 (name "python-autopep8")
4468 (version "1.3.5")
4469 (source
4470 (origin
4471 (method url-fetch)
4472 (uri (pypi-uri "autopep8" version))
4473 (sha256
4474 (base32
4475 "192bvhzi4d0claqxgzymvv7k3qnj627742bc8sgxpzjj42pd9112"))))
4476 (build-system python-build-system)
4477 (propagated-inputs
4478 `(("python-pycodestyle" ,python-pycodestyle)))
4479 (home-page "https://github.com/hhatto/autopep8")
4480 (synopsis "Format Python code according to the PEP 8 style guide")
4481 (description
4482 "@code{autopep8} automatically formats Python code to conform to
4483 the PEP 8 style guide. It uses the pycodestyle utility to determine
4484 what parts of the code needs to be formatted. @code{autopep8} is
4485 capable of fixing most of the formatting issues that can be reported
4486 by pycodestyle.")
4487 (license (license:non-copyleft
4488 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
4489
4490 (define-public python2-autopep8
4491 (package-with-python2 python-autopep8))
4492
4493 (define-public python-distlib
4494 (package
4495 (name "python-distlib")
4496 (version "0.3.0")
4497 (source
4498 (origin
4499 (method url-fetch)
4500 (uri (pypi-uri "distlib" version ".zip"))
4501 (sha256
4502 (base32
4503 "08fyi2r246733vharl2yckw20rilci28r91mzrnnvcr638inw5if"))))
4504 (build-system python-build-system)
4505 (arguments
4506 `(#:phases
4507 (modify-phases %standard-phases
4508 (add-before 'build 'no-/bin/sh
4509 (lambda _
4510 (substitute* '("distlib/scripts.py" "tests/test_scripts.py")
4511 (("/bin/sh") (which "sh")))
4512 #t))
4513 (add-before 'check 'prepare-test-env
4514 (lambda _
4515 (setenv "HOME" "/tmp")
4516 ;; NOTE: Any value works, the variable just has to be present.
4517 (setenv "SKIP_ONLINE" "1")
4518 #t)))))
4519 (native-inputs `(("unzip" ,unzip)))
4520 (home-page "https://bitbucket.org/pypa/distlib")
4521 (synopsis "Distribution utilities")
4522 (description "Distlib is a library which implements low-level functions that
4523 relate to packaging and distribution of Python software. It is intended to be
4524 used as the basis for third-party packaging tools.")
4525 (license license:psfl)))
4526
4527 (define-public python-distutils-extra
4528 (package
4529 (name "python-distutils-extra")
4530 (version "2.38")
4531 (source
4532 (origin
4533 (method url-fetch)
4534 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4535 version "/+download/python-distutils-extra-"
4536 version ".tar.gz"))
4537 (sha256
4538 (base32
4539 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4540 (build-system python-build-system)
4541 (home-page "https://launchpad.net/python-distutils-extra/")
4542 (synopsis "Enhancements to Python's distutils")
4543 (description
4544 "The python-distutils-extra module enables you to easily integrate
4545 gettext support, themed icons, and scrollkeeper-based documentation into
4546 Python's distutils.")
4547 (license license:gpl2)))
4548
4549 (define-public python2-distutils-extra
4550 (package-with-python2 python-distutils-extra))
4551
4552 (define-public python2-elib.intl
4553 (package
4554 (name "python2-elib.intl")
4555 (version "0.0.3")
4556 (source
4557 (origin
4558 ;; This project doesn't tag releases or publish tarballs, so we take
4559 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4560 (method git-fetch)
4561 (uri (git-reference
4562 (url "https://github.com/dieterv/elib.intl.git")
4563 (commit "d09997cfef")))
4564 (file-name (string-append name "-" version "-checkout"))
4565 (sha256
4566 (base32
4567 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4568 (build-system python-build-system)
4569 (arguments
4570 ;; incompatible with Python 3 (exception syntax)
4571 `(#:python ,python-2
4572 #:tests? #f))
4573 (home-page "https://github.com/dieterv/elib.intl")
4574 (synopsis "Enhanced internationalization for Python")
4575 (description
4576 "The elib.intl module provides enhanced internationalization (I18N)
4577 services for your Python modules and applications.")
4578 (license license:lgpl3+)))
4579
4580 (define-public python-olefile
4581 (package
4582 (name "python-olefile")
4583 (version "0.46")
4584 (source
4585 (origin
4586 (method url-fetch)
4587 (uri (string-append "https://github.com/decalage2/olefile/releases/"
4588 "download/v" version "/olefile-" version ".tar.gz"))
4589 (file-name (string-append name "-" version ".tar.gz"))
4590 (sha256
4591 (base32
4592 "1kjxh4gr651hpqkjfv89cfzr40hyvf3vjlda7mifiail83j7j07m"))))
4593 (build-system python-build-system)
4594 (home-page "https://www.decalage.info/python/olefileio")
4595 (synopsis "Read and write Microsoft OLE2 files.")
4596 (description
4597 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
4598 Storage or Compound Document, Microsoft Office). It is an improved version of
4599 the OleFileIO module from PIL, the Python Image Library.")
4600 (license license:bsd-3)))
4601
4602 (define-public python2-olefile
4603 (package-with-python2 python-olefile))
4604
4605 (define-public python-pillow
4606 (package
4607 (name "python-pillow")
4608 (version "6.2.1")
4609 (source
4610 (origin
4611 (method url-fetch)
4612 (uri (pypi-uri "Pillow" version))
4613 (sha256
4614 (base32
4615 "1c8wkzc58f5wdh006jvmwdk3wxld1xgagcbdvj7iv17qi0m9fkmz"))))
4616 (build-system python-build-system)
4617 (native-inputs
4618 `(("python-pytest" ,python-pytest)))
4619 (inputs
4620 `(("freetype" ,freetype)
4621 ("lcms" ,lcms)
4622 ("libjpeg" ,libjpeg)
4623 ("libtiff" ,libtiff)
4624 ("libwebp" ,libwebp)
4625 ("openjpeg" ,openjpeg)
4626 ("zlib" ,zlib)))
4627 (propagated-inputs
4628 `(("python-olefile" ,python-olefile)))
4629 (arguments
4630 `(#:phases
4631 (modify-phases %standard-phases
4632 (add-after 'unpack 'patch-ldconfig
4633 (lambda _
4634 (substitute* "setup.py"
4635 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
4636 (replace 'check
4637 (lambda* (#:key outputs inputs tests? #:allow-other-keys)
4638 (if tests?
4639 (begin
4640 (setenv "HOME" (getcwd))
4641 ;; Make installed package available for running the tests.
4642 (add-installed-pythonpath inputs outputs)
4643 (invoke "python" "selftest.py" "--installed")
4644 (invoke "python" "-m" "pytest" "-vv"))
4645 #t))))))
4646 (home-page "https://python-pillow.org")
4647 (synopsis "Fork of the Python Imaging Library")
4648 (description
4649 "The Python Imaging Library adds image processing capabilities to your
4650 Python interpreter. This library provides extensive file format support, an
4651 efficient internal representation, and fairly powerful image processing
4652 capabilities. The core image library is designed for fast access to data
4653 stored in a few basic pixel formats. It should provide a solid foundation for
4654 a general image processing tool.")
4655 (license (license:x11-style
4656 "http://www.pythonware.com/products/pil/license.htm"
4657 "The PIL Software License"))))
4658
4659 (define-public python2-pillow
4660 (package-with-python2 python-pillow))
4661
4662 (define-public python-pycparser
4663 (package
4664 (name "python-pycparser")
4665 (version "2.19")
4666 (source
4667 (origin
4668 (method url-fetch)
4669 (uri (pypi-uri "pycparser" version))
4670 (sha256
4671 (base32
4672 "1cr5dcj9628lkz1qlwq3fv97c25363qppkmcayqvd05dpy573259"))))
4673 (outputs '("out" "doc"))
4674 (build-system python-build-system)
4675 (native-inputs
4676 `(("pkg-config" ,pkg-config)))
4677 (arguments
4678 `(#:phases
4679 (modify-phases %standard-phases
4680 (replace 'check
4681 (lambda _
4682 (with-directory-excursion "tests"
4683 (invoke "python" "all_tests.py"))
4684 #t))
4685 (add-after 'install 'install-doc
4686 (lambda* (#:key outputs #:allow-other-keys)
4687 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4688 (doc (string-append data "/doc/" ,name "-" ,version))
4689 (examples (string-append doc "/examples")))
4690 (mkdir-p examples)
4691 (for-each (lambda (file)
4692 (copy-file (string-append "." file)
4693 (string-append doc file)))
4694 '("/README.rst" "/CHANGES" "/LICENSE"))
4695 (copy-recursively "examples" examples)
4696 #t))))))
4697 (home-page "https://github.com/eliben/pycparser")
4698 (synopsis "C parser in Python")
4699 (description
4700 "Pycparser is a complete parser of the C language, written in pure Python
4701 using the PLY parsing library. It parses C code into an AST and can serve as
4702 a front-end for C compilers or analysis tools.")
4703 (license license:bsd-3)))
4704
4705 (define-public python2-pycparser
4706 (package-with-python2 python-pycparser))
4707
4708 (define-public python-pywavelets
4709 (package
4710 (name "python-pywavelets")
4711 (version "1.0.1")
4712 (home-page "https://github.com/PyWavelets/pywt")
4713 (source (origin
4714 (method url-fetch)
4715 (uri (pypi-uri "PyWavelets" version))
4716 (sha256
4717 (base32
4718 "1p3qv2v66ghnqrb1f98wyyhp9dz71jwcd6kfpsax65sfdpiyqp1w"))))
4719 (build-system python-build-system)
4720 (arguments
4721 '(#:modules ((ice-9 ftw)
4722 (srfi srfi-1)
4723 (srfi srfi-26)
4724 (guix build utils)
4725 (guix build python-build-system))
4726 #:phases (modify-phases %standard-phases
4727 (replace 'check
4728 (lambda _
4729 (let ((cwd (getcwd))
4730 (libdir (find (cut string-prefix? "lib." <>)
4731 (scandir "build"))))
4732 (with-directory-excursion (string-append cwd "/build/" libdir)
4733 (invoke "nosetests" "-v" "."))))))))
4734 (native-inputs
4735 `(("python-matplotlib" ,python-matplotlib) ;for tests
4736 ("python-nose" ,python-nose)))
4737 (propagated-inputs
4738 `(("python-numpy" ,python-numpy)))
4739 (synopsis "Wavelet transforms in Python")
4740 (description
4741 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
4742 mathematical basis functions that are localized in both time and frequency.
4743 Wavelet transforms are time-frequency transforms employing wavelets. They are
4744 similar to Fourier transforms, the difference being that Fourier transforms are
4745 localized only in frequency instead of in time and frequency.")
4746 (license license:expat)))
4747
4748 (define-public python2-pywavelets
4749 (package-with-python2 python-pywavelets))
4750
4751 (define-public python-xcffib
4752 (package
4753 (name "python-xcffib")
4754 (version "0.6.0")
4755 (source
4756 (origin
4757 (method url-fetch)
4758 (uri (pypi-uri "xcffib" version))
4759 (sha256
4760 (base32
4761 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
4762 (build-system python-build-system)
4763 (inputs
4764 `(("libxcb" ,libxcb)))
4765 (propagated-inputs
4766 `(("python-cffi" ,python-cffi) ; used at run time
4767 ("python-six" ,python-six)))
4768 (arguments
4769 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
4770 #:tests? #f
4771 #:phases
4772 (modify-phases %standard-phases
4773 (add-after 'unpack 'fix-libxcb-path
4774 (lambda* (#:key inputs #:allow-other-keys)
4775 (let ((libxcb (assoc-ref inputs "libxcb")))
4776 (substitute* '("xcffib/__init__.py")
4777 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
4778 #t)))
4779 (add-after 'install 'install-doc
4780 (lambda* (#:key outputs #:allow-other-keys)
4781 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4782 "/doc/" ,name "-" ,version)))
4783 (mkdir-p doc)
4784 (copy-file "README.md"
4785 (string-append doc "/README.md"))
4786 #t))))))
4787 (home-page "https://github.com/tych0/xcffib")
4788 (synopsis "XCB Python bindings")
4789 (description
4790 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4791 support for Python 3 and PyPy. It is based on cffi.")
4792 (license license:expat)))
4793
4794 (define-public python2-xcffib
4795 (package-with-python2 python-xcffib))
4796
4797 (define-public python-cairocffi
4798 (package
4799 (name "python-cairocffi")
4800 (version "0.9.0")
4801 (source
4802 (origin
4803 (method url-fetch)
4804 (uri (pypi-uri "cairocffi" version))
4805 (sha256
4806 (base32
4807 "0dq3k4zhqd8cwsf3nyjqvjqm8wkvrjn1wjf44rl3v0h8kqx6qf0m"))
4808 (patches (search-patches "python-cairocffi-dlopen-path.patch"))))
4809 (build-system python-build-system)
4810 (outputs '("out" "doc"))
4811 (inputs
4812 `(("glib" ,glib)
4813 ("gtk+" ,gtk+)
4814 ("gdk-pixbuf" ,gdk-pixbuf)
4815 ("cairo" ,cairo)
4816 ("pango" ,pango)))
4817 (native-inputs
4818 `(("pkg-config" ,pkg-config)
4819 ("python-pytest" ,python-pytest)
4820 ("python-pytest-cov" ,python-pytest-cov)
4821 ("python-pytest-runner" ,python-pytest-runner)
4822 ("python-sphinx" ,python-sphinx)
4823 ("python-docutils" ,python-docutils)))
4824 (propagated-inputs
4825 `(("python-xcffib" ,python-xcffib))) ; used at run time
4826 (arguments
4827 `(#:phases
4828 (modify-phases %standard-phases
4829 (add-after 'unpack 'patch-paths
4830 (lambda* (#:key inputs outputs #:allow-other-keys)
4831 (substitute* (find-files "." "\\.py$")
4832 (("dlopen\\(ffi, 'cairo'")
4833 (string-append "dlopen(ffi, '" (assoc-ref inputs "cairo")
4834 "/lib/libcairo.so.2'"))
4835 (("dlopen\\(ffi, 'gdk-3'")
4836 (string-append "dlopen(ffi, '" (assoc-ref inputs "gtk+")
4837 "/lib/libgtk-3.so.0'"))
4838 (("dlopen\\(ffi, 'gdk_pixbuf-2.0'")
4839 (string-append "dlopen(ffi, '" (assoc-ref inputs "gdk-pixbuf")
4840 "/lib/libgdk_pixbuf-2.0.so.0'"))
4841 (("dlopen\\(ffi, 'glib-2.0'")
4842 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4843 "/lib/libglib-2.0.so.0'"))
4844 (("dlopen\\(ffi, 'gobject-2.0'")
4845 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4846 "/lib/libgobject-2.0.so.0'"))
4847 (("dlopen\\(ffi, 'pangocairo-1.0'")
4848 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4849 "/lib/libpangocairo-1.0.so.0'"))
4850 (("dlopen\\(ffi, 'pango-1.0'")
4851 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4852 "/lib/libpango-1.0.so.0'")))
4853 #t))
4854 (add-after 'install 'install-doc
4855 (lambda* (#:key inputs outputs #:allow-other-keys)
4856 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4857 (doc (string-append data "/doc/" ,name "-" ,version))
4858 (html (string-append doc "/html")))
4859 (setenv "LD_LIBRARY_PATH"
4860 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4861 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4862 (setenv "LANG" "en_US.UTF-8")
4863 (mkdir-p html)
4864 (for-each (lambda (file)
4865 (copy-file (string-append "." file)
4866 (string-append doc file)))
4867 '("/README.rst" "/CHANGES" "/LICENSE"))
4868 (system* "python" "setup.py" "build_sphinx")
4869 (copy-recursively "docs/_build/html" html)
4870 #t))))))
4871 (home-page "https://github.com/Kozea/cairocffi")
4872 (synopsis "Python bindings and object-oriented API for Cairo")
4873 (description
4874 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4875 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4876 graphics library with support for multiple backends including image buffers,
4877 PNG, PostScript, PDF, and SVG file output.")
4878 (license license:bsd-3)))
4879
4880 (define-public python2-cairocffi
4881 (package-with-python2 python-cairocffi))
4882
4883 (define-public python-decorator
4884 (package
4885 (name "python-decorator")
4886 (version "4.3.0")
4887 (source
4888 (origin
4889 (method url-fetch)
4890 (uri (pypi-uri "decorator" version))
4891 (sha256
4892 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
4893 (build-system python-build-system)
4894 (home-page "https://pypi.org/project/decorator/")
4895 (synopsis "Python module to simplify usage of decorators")
4896 (description
4897 "The aim of the decorator module is to simplify the usage of decorators
4898 for the average programmer, and to popularize decorators usage giving examples
4899 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4900 etc. The core of this module is a decorator factory.")
4901 (license license:expat)))
4902
4903 (define-public python2-decorator
4904 (package-with-python2 python-decorator))
4905
4906 (define-public python-drmaa
4907 (package
4908 (name "python-drmaa")
4909 (version "0.7.7")
4910 (source
4911 (origin
4912 (method url-fetch)
4913 (uri (pypi-uri "drmaa" version))
4914 (sha256
4915 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
4916 (build-system python-build-system)
4917 ;; The test suite requires libdrmaa which is provided by the cluster
4918 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4919 ;; should be set to the path of the libdrmaa library.
4920 (arguments '(#:tests? #f))
4921 (native-inputs
4922 `(("python-nose" ,python-nose)))
4923 (home-page "https://pypi.org/project/drmaa/")
4924 (synopsis "Python bindings for the DRMAA library")
4925 (description
4926 "A Python package for Distributed Resource Management (DRM) job
4927 submission and control. This package is an implementation of the DRMAA 1.0
4928 Python language binding specification.")
4929 (license license:bsd-3)))
4930
4931 (define-public python2-drmaa
4932 (package-with-python2 python-drmaa))
4933
4934 (define-public python-grako
4935 (package
4936 (name "python-grako")
4937 (version "3.99.9")
4938 (source
4939 (origin
4940 (method url-fetch)
4941 (uri
4942 (pypi-uri "grako" version ".zip"))
4943 (sha256
4944 (base32
4945 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
4946 (build-system python-build-system)
4947 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
4948 (native-inputs
4949 `(("unzip" ,unzip)
4950 ("python-pytest" ,python-pytest)
4951 ("python-pytest-runner" ,python-pytest-runner)))
4952 (home-page "https://bitbucket.org/neogeny/grako")
4953 (synopsis "EBNF parser generator")
4954 (description
4955 "Grako takes a grammar in a variation of EBNF as input, and outputs a
4956 memoizing PEG/Packrat parser in Python.")
4957 (license license:bsd-3)))
4958
4959 (define-public python2-grako
4960 (package-with-python2 python-grako))
4961
4962 (define-public python-gridmap
4963 (package
4964 (name "python-gridmap")
4965 (version "0.13.0")
4966 (source
4967 (origin
4968 (method git-fetch)
4969 (uri (git-reference
4970 (url "https://github.com/pygridtools/gridmap.git")
4971 (commit (string-append "v" version))))
4972 (file-name (git-file-name name version))
4973 (sha256
4974 (base32 "1478lbwsr1w24cii2x01m2910fvh8r43ghnb78nc972a96hqiknm"))))
4975 (build-system python-build-system)
4976 (arguments
4977 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
4978 (propagated-inputs
4979 `(("python-psutil" ,python-psutil)
4980 ("python-drmaa" ,python-drmaa)
4981 ("python-pyzmq" ,python-pyzmq)))
4982 (home-page "https://github.com/pygridtools/gridmap")
4983 (synopsis "Create jobs on a cluster directly from Python")
4984 (description
4985 "Gridmap is a Python package to allow you to easily create jobs on the
4986 cluster directly from Python. You can directly map Python functions onto the
4987 cluster without needing to write any wrapper code yourself.")
4988 (license license:gpl3+)))
4989
4990 (define-public python2-gridmap
4991 (package-with-python2 python-gridmap))
4992
4993 (define-public python-honcho
4994 (package
4995 (name "python-honcho")
4996 (version "1.0.1")
4997 (source
4998 (origin
4999 (method git-fetch)
5000 (uri (git-reference
5001 (url "https://github.com/nickstenning/honcho.git")
5002 (commit (string-append "v" version))))
5003 (file-name (git-file-name name version))
5004 (sha256
5005 (base32 "11bd87474qpif20xdcn0ra1idj5k16ka51i658wfpxwc6nzsn92b"))))
5006 (build-system python-build-system)
5007 (native-inputs
5008 `(("python-pytest" ,python-pytest)
5009 ("python-mock" ,python-mock)
5010 ("python-tox" ,python-tox)
5011 ("which" ,which))) ;for tests
5012 (propagated-inputs
5013 `(("python-jinja2" ,python-jinja2)))
5014 (arguments
5015 `(#:phases
5016 (modify-phases %standard-phases
5017 (delete 'check)
5018 (add-after 'install 'check
5019 (lambda* (#:key outputs inputs #:allow-other-keys)
5020 ;; fix honcho path in testsuite
5021 (substitute* "tests/conftest.py"
5022 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
5023 "/bin/honcho" "'")))
5024 ;; It's easier to run tests after install.
5025 ;; Make installed package available for running the tests
5026 (add-installed-pythonpath inputs outputs)
5027 (invoke "py.test" "-v"))))))
5028 (home-page "https://github.com/nickstenning/honcho")
5029 (synopsis "Manage Procfile-based applications")
5030 (description
5031 "A Procfile is a file which describes how to run an application
5032 consisting of several processes. honcho starts all listed processes.
5033 The output of all running processes is collected by honcho and
5034 displayed.")
5035 (license license:expat)))
5036
5037 (define-public python2-honcho
5038 (package-with-python2 python-honcho))
5039
5040 (define-public python-pexpect
5041 (package
5042 (name "python-pexpect")
5043 (version "4.6.0")
5044 (source
5045 (origin
5046 (method url-fetch)
5047 (uri (pypi-uri "pexpect" version))
5048 (sha256
5049 (base32 "1fla85g47iaxxpjhp9vkxdnv4pgc7rplfy6ja491smrrk0jqi3ia"))))
5050 (build-system python-build-system)
5051 (arguments
5052 `(#:phases
5053 (modify-phases %standard-phases
5054 (add-before 'check 'prepare-tests
5055 (lambda _
5056 (substitute* (find-files "tests")
5057 (("/bin/ls") (which "ls"))
5058 (("/bin/echo") (which "echo"))
5059 (("/bin/which") (which "which"))
5060 ;; Many tests try to use the /bin directory which
5061 ;; is not present in the build environment.
5062 ;; Use one that's non-empty and unlikely to change.
5063 (("/bin'") "/dev'"))
5064 ;; XXX: Socket connection test gets "Connection reset by peer".
5065 ;; Why does it not work? Delete for now.
5066 (delete-file "tests/test_socket.py")
5067 #t))
5068 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
5069 (native-inputs
5070 `(("python-nose" ,python-nose)
5071 ("python-pytest" ,python-pytest)
5072 ("man-db" ,man-db)
5073 ("which" ,which)
5074 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
5075 (propagated-inputs
5076 `(("python-ptyprocess" ,python-ptyprocess)))
5077 (home-page "http://pexpect.readthedocs.org/")
5078 (synopsis "Controlling interactive console applications")
5079 (description
5080 "Pexpect is a pure Python module for spawning child applications;
5081 controlling them; and responding to expected patterns in their output.
5082 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
5083 child application and control it as if a human were typing commands.")
5084 (license license:isc)))
5085
5086 (define-public python2-pexpect
5087 (package-with-python2 python-pexpect))
5088
5089 (define-public python-setuptools-scm
5090 (package
5091 (name "python-setuptools-scm")
5092 (version "3.2.0")
5093 (source (origin
5094 (method url-fetch)
5095 (uri (pypi-uri "setuptools_scm" version))
5096 (sha256
5097 (base32
5098 "0n3knn3p1sqlx31k2lahn7z9bacvlv8nhlfidj77vz50bxqlgasj"))))
5099 (build-system python-build-system)
5100 (home-page "https://github.com/pypa/setuptools_scm/")
5101 (synopsis "Manage Python package versions in SCM metadata")
5102 (description
5103 "Setuptools_scm handles managing your Python package versions in
5104 @dfn{software configuration management} (SCM) metadata instead of declaring
5105 them as the version argument or in a SCM managed file.")
5106 (license license:expat)))
5107
5108 ;; Needed by python-lazy-object-proxy, remove on next update cycle.
5109 (define-public python-setuptools-scm-3.3
5110 (package
5111 (inherit python-setuptools-scm)
5112 (version "3.3.3")
5113 (source (origin
5114 (method url-fetch)
5115 (uri (pypi-uri "setuptools_scm" version))
5116 (sha256
5117 (base32
5118 "19cyndx23xmpbhz4qrwmfwsmnnaczd0dw7qg977ksq2dbvxy29dx"))))))
5119
5120 (define-public python2-setuptools-scm
5121 (package-with-python2 python-setuptools-scm))
5122
5123 (define-public python-pathlib2
5124 (package
5125 (name "python-pathlib2")
5126 (version "2.3.3")
5127 (source
5128 (origin
5129 (method url-fetch)
5130 (uri (pypi-uri "pathlib2" version))
5131 (sha256
5132 (base32
5133 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
5134 (build-system python-build-system)
5135 (propagated-inputs
5136 `(("python-scandir" ,python-scandir)
5137 ("python-six" ,python-six)))
5138 (home-page "https://pypi.org/project/pathlib2/")
5139 (synopsis "Object-oriented file system paths")
5140 (description "The goal of pathlib2 is to provide a backport of the
5141 standard @code{pathlib} module which tracks the standard library module, so
5142 all the newest features of the standard @code{pathlib} can be used also on
5143 older Python versions.")
5144 (license license:expat)))
5145
5146 (define-public python2-importlib-resources
5147 (package
5148 (name "python2-importlib-resources")
5149 (version "1.0.2")
5150 (source (origin
5151 (method url-fetch)
5152 (uri (pypi-uri "importlib_resources" version))
5153 (sha256
5154 (base32
5155 "0y3hg12iby1qyaspnbisz4s4vxax7syikk3skznwqizqyv89y9yk"))))
5156 (build-system python-build-system)
5157 (arguments
5158 `(#:python ,python-2))
5159 (native-inputs
5160 `(("python-wheel" ,python2-wheel)))
5161 (propagated-inputs
5162 `(("python-pathlib2" ,python2-pathlib2)
5163 ("python-typing" ,python2-typing)))
5164 (home-page "https://gitlab.com/python-devs/importlib_resources")
5165 (synopsis "Backport of @code{importlib.resources} from Python 3.7")
5166 (description
5167 "This package provides an implementation of @code{importlib.resources}
5168 for older versions of Python.")
5169 (license license:asl2.0)))
5170
5171 (define-public python-importlib-metadata
5172 (package
5173 (name "python-importlib-metadata")
5174 (version "1.4.0")
5175 (source
5176 (origin
5177 (method url-fetch)
5178 (uri (pypi-uri "importlib_metadata" version))
5179 (sha256
5180 (base32 "1n76444v7zn910xrhh8954jdn4byxbn9f1jck6b85a716mbh2z7i"))))
5181 (build-system python-build-system)
5182 (propagated-inputs
5183 `(("python-zipp" ,python-zipp)))
5184 (native-inputs
5185 `(("python-setuptools-scm" ,python-setuptools-scm)
5186 ("python-packaging" ,python-packaging)))
5187 (home-page "https://importlib-metadata.readthedocs.io/")
5188 (synopsis "Read metadata from Python packages")
5189 (description
5190 "@code{importlib_metadata} is a library which provides an API for
5191 accessing an installed Python package's metadata, such as its entry points or
5192 its top-level name. This functionality intends to replace most uses of
5193 @code{pkg_resources} entry point API and metadata API. Along with
5194 @code{importlib.resources} in Python 3.7 and newer, this can eliminate the
5195 need to use the older and less efficient @code{pkg_resources} package.")
5196 (properties `((python2-variant . ,(delay python2-importlib-metadata))))
5197 (license license:asl2.0)))
5198
5199 (define-public python2-importlib-metadata
5200 (let ((base (package-with-python2 (strip-python2-variant
5201 python-importlib-metadata))))
5202 (package/inherit
5203 base
5204 (name "python2-importlib-metadata")
5205 (propagated-inputs
5206 `(("python-configparser" ,python2-configparser)
5207 ("python-contextlib2" ,python2-contextlib2)
5208 ("python-importlib-resources" ,python2-importlib-resources)
5209 ("python-pathlib2" ,python2-pathlib2)
5210 ,@(package-propagated-inputs base))))))
5211
5212 (define-public python-jaraco-packaging
5213 (package
5214 (name "python-jaraco-packaging")
5215 (version "6.1")
5216 (source
5217 (origin
5218 (method url-fetch)
5219 (uri (pypi-uri "jaraco.packaging" version))
5220 (sha256
5221 (base32
5222 "0zimrnkh33b9g8ffw11mjh6kvs54cy5gcjw1h5cl1r7dc833dmkm"))))
5223 (build-system python-build-system)
5224 (propagated-inputs
5225 `(("python-pytest" ,python-pytest)
5226 ("python-pytest-checkdocs" ,python-pytest-checkdocs)
5227 ("python-pytest-flake8" ,python-pytest-flake8)
5228 ("python-rst.linker" ,python-rst.linker)
5229 ("python-setuptools" ,python-setuptools)
5230 ("python-setuptools-scm" ,python-setuptools-scm)
5231 ("python-six" ,python-six)
5232 ("python-sphinx" ,python-sphinx)))
5233 (home-page "https://github.com/jaraco/jaraco.packaging")
5234 (synopsis "Tools to supplement packaging Python releases")
5235 (description
5236 "This package provides various tools to supplement packaging Python
5237 releases.")
5238 (license license:expat)))
5239
5240 (define-public python-pathpy
5241 (package
5242 (name "python-pathpy")
5243 (version "11.5.1")
5244 (source
5245 (origin
5246 (method url-fetch)
5247 (uri (pypi-uri "path.py" version))
5248 (sha256
5249 (base32 "0ir9j1haq2jbi7aip6k2fa9l7q1l03k4hp1awxhjhcwzsnwp3ll8"))))
5250 (outputs '("out" "doc"))
5251 (build-system python-build-system)
5252 (propagated-inputs
5253 `(("python-appdirs" ,python-appdirs)
5254 ("python-importlib-metadata" ,python-importlib-metadata)))
5255 (native-inputs
5256 `(("python-setuptools-scm" ,python-setuptools-scm)
5257 ("python-sphinx" ,python-sphinx)
5258 ("python-rst.linker" ,python-rst.linker)
5259 ("python-pytest" ,python-pytest)
5260 ("python-pytest-runner" ,python-pytest-runner)
5261 ("python-jaraco-packaging" ,python-jaraco-packaging)))
5262 (arguments
5263 `(#:phases
5264 (modify-phases %standard-phases
5265 (add-after 'build 'build-doc
5266 (lambda _
5267 (setenv "LANG" "en_US.UTF-8")
5268 (invoke "python" "setup.py" "build_sphinx")))
5269 (add-after 'install 'install-doc
5270 (lambda* (#:key outputs #:allow-other-keys)
5271 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5272 (doc (string-append data "/doc/" ,name "-" ,version))
5273 (html (string-append doc "/html")))
5274 (mkdir-p html)
5275 (for-each (lambda (file)
5276 (copy-file file (string-append doc "/" file)))
5277 '("README.rst" "CHANGES.rst"))
5278 (copy-recursively "build/sphinx/html" html)
5279 #t)))
5280 (replace 'check
5281 (lambda _
5282 ;; The import time test aborts if an import takes longer than
5283 ;; 100ms. It may very well take a little longer than that.
5284 (invoke "pytest" "-v" "-k" "not test_import_time"))))))
5285 (home-page "https://github.com/jaraco/path.py")
5286 (synopsis "Python module wrapper for built-in os.path")
5287 (description
5288 "@code{path.py} implements path objects as first-class entities, allowing
5289 common operations on files to be invoked on those path objects directly.")
5290 (license license:expat)))
5291
5292 (define-public python2-pathpy
5293 (package-with-python2 python-pathpy))
5294
5295 (define-public python-simplegeneric
5296 (package
5297 (name "python-simplegeneric")
5298 (version "0.8.1")
5299 (source
5300 (origin
5301 (method url-fetch)
5302 (uri (pypi-uri "simplegeneric" version ".zip"))
5303 (sha256
5304 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
5305 (build-system python-build-system)
5306 (native-inputs
5307 `(("unzip" ,unzip)))
5308 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
5309 (synopsis "Python module for simple generic functions")
5310 (description
5311 "The simplegeneric module lets you define simple single-dispatch generic
5312 functions, akin to Python’s built-in generic functions like @code{len()},
5313 @code{iter()} and so on. However, instead of using specially-named methods,
5314 these generic functions use simple lookup tables, akin to those used by
5315 e.g. @code{pickle.dump()} and other generic functions found in the Python
5316 standard library.")
5317 (license license:zpl2.1)))
5318
5319 (define-public python2-simplegeneric
5320 (package-with-python2 python-simplegeneric))
5321
5322 (define-public python-ipython-genutils
5323 ;; TODO: This package is retired, check if can be removed, see description.
5324 (package
5325 (name "python-ipython-genutils")
5326 (version "0.1.0")
5327 (source
5328 (origin
5329 (method url-fetch)
5330 (uri (pypi-uri "ipython_genutils" version))
5331 (sha256
5332 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
5333 (build-system python-build-system)
5334 (arguments `(#:tests? #f)) ; no tests
5335 (home-page "https://ipython.org")
5336 (synopsis "Vestigial utilities from IPython")
5337 (description
5338 "This package provides retired utilities from IPython. No packages
5339 outside IPython/Jupyter should depend on it.
5340
5341 This package shouldn't exist. It contains some common utilities shared by
5342 Jupyter and IPython projects during The Big Split. As soon as possible, those
5343 packages will remove their dependency on this, and this package will go
5344 away.")
5345 (license license:bsd-3)))
5346
5347 (define-public python2-ipython-genutils
5348 (package-with-python2 python-ipython-genutils))
5349
5350 (define-public python-traitlets
5351 (package
5352 (name "python-traitlets")
5353 (version "4.3.3")
5354 (source
5355 (origin
5356 (method url-fetch)
5357 (uri (pypi-uri "traitlets" version))
5358 (sha256
5359 (base32
5360 "1xsrwgivpkxlbr4dfndfsi098s29yqgswgjc1qqn69yxklvfw8yh"))))
5361 (build-system python-build-system)
5362 (arguments
5363 `(#:phases
5364 (modify-phases %standard-phases
5365 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
5366 (propagated-inputs
5367 `(("python-ipython-genutils" ,python-ipython-genutils)
5368 ("python-decorator" ,python-decorator)))
5369 (native-inputs
5370 `(("python-pytest" ,python-pytest)))
5371 (properties `((python2-variant . ,(delay python2-traitlets))))
5372 (home-page "https://ipython.org")
5373 (synopsis "Configuration system for Python applications")
5374 (description
5375 "Traitlets is a framework that lets Python classes have attributes with
5376 type checking, dynamically calculated default values, and ‘on change’
5377 callbacks. The package also includes a mechanism to use traitlets for
5378 configuration, loading values from files or from command line arguments. This
5379 is a distinct layer on top of traitlets, so you can use traitlets in your code
5380 without using the configuration machinery.")
5381 (license license:bsd-3)))
5382
5383 (define-public python2-traitlets
5384 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
5385 (package
5386 (inherit traitlets)
5387 (propagated-inputs
5388 `(("python2-enum34" ,python2-enum34)
5389 ,@(package-propagated-inputs traitlets))))))
5390
5391 (define-public python-jupyter-core
5392 (package
5393 (name "python-jupyter-core")
5394 (version "4.4.0")
5395 (source
5396 (origin
5397 (method url-fetch)
5398 (uri (string-append (pypi-uri "jupyter_core" version)))
5399 (sha256
5400 (base32
5401 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
5402 (build-system python-build-system)
5403 ;; FIXME: not sure how to run the tests
5404 (arguments `(#:tests? #f))
5405 (propagated-inputs
5406 `(("python-traitlets" ,python-traitlets)))
5407 (home-page "http://jupyter.org/")
5408 (synopsis "Jupyter base package")
5409 (description
5410 "Jupyter core is the base package on which Jupyter projects rely.")
5411 (license license:bsd-3)))
5412
5413 (define-public python2-jupyter-core
5414 (package-with-python2 python-jupyter-core))
5415
5416 (define-public python-jupyter-client
5417 (package
5418 (name "python-jupyter-client")
5419 (version "5.2.4")
5420 (source
5421 (origin
5422 (method url-fetch)
5423 (uri (pypi-uri "jupyter_client" version))
5424 (sha256
5425 (base32
5426 "0l9mh7ccrpl3lppym3dnky8n1nk7xarzzdcxf4q2s7aw203cpydm"))))
5427 (build-system python-build-system)
5428 ;; Tests fail because of missing native python kernel which I assume is
5429 ;; provided by the ipython package, which we cannot use because it would
5430 ;; cause a dependency cycle.
5431 (arguments
5432 `(#:tests? #f
5433
5434 #:phases (modify-phases %standard-phases
5435 (add-after 'unpack 'set-tool-file-names
5436 (lambda* (#:key inputs #:allow-other-keys)
5437 (let ((iproute (assoc-ref inputs "iproute")))
5438 (substitute* "jupyter_client/localinterfaces.py"
5439 (("'ip'")
5440 (string-append "'" iproute "/sbin/ip'")))
5441 #t))))))
5442 (inputs
5443 `(("iproute" ,iproute)))
5444 (propagated-inputs
5445 `(("python-pyzmq" ,python-pyzmq)
5446 ("python-traitlets" ,python-traitlets)
5447 ("python-jupyter-core" ,python-jupyter-core)))
5448 (home-page "http://jupyter.org/")
5449 (synopsis "Jupyter protocol implementation and client libraries")
5450 (description
5451 "The @code{jupyter_client} package contains the reference implementation
5452 of the Jupyter protocol. It also provides client and kernel management APIs
5453 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
5454 installing @code{kernelspec}s for use with Jupyter frontends.")
5455 (license license:bsd-3)))
5456
5457 (define-public python2-jupyter-client
5458 (package-with-python2 python-jupyter-client))
5459
5460 (define-public python-ipykernel
5461 (package
5462 (name "python-ipykernel")
5463 (version "5.1.3")
5464 (source
5465 (origin
5466 (method url-fetch)
5467 (uri (pypi-uri "ipykernel" version))
5468 (sha256
5469 (base32 "1a08y677lpn80qzvv7z0smgggmr5m5ayf0bs6vds47xpxl9sss5k"))))
5470 (build-system python-build-system)
5471 (arguments
5472 `(#:phases
5473 (modify-phases %standard-phases
5474 (replace 'check
5475 (lambda _
5476 (setenv "HOME" "/tmp")
5477 (invoke "pytest" "-v")
5478 #t))
5479 (add-after 'install 'set-python-file-name
5480 (lambda* (#:key outputs #:allow-other-keys)
5481 ;; Record the absolute file name of the 'python' executable in
5482 ;; 'kernel.json'.
5483 (let ((out (assoc-ref outputs "out")))
5484 (substitute* (string-append out "/share/jupyter"
5485 "/kernels/python3/kernel.json")
5486 (("\"python\"")
5487 (string-append "\"" (which "python") "\"")))
5488 #t))))))
5489 (propagated-inputs
5490 `(("python-ipython" ,python-ipython)
5491 ;; imported at runtime during connect
5492 ("python-jupyter-client" ,python-jupyter-client)))
5493 (native-inputs
5494 `(("python-flaky" ,python-flaky)
5495 ("python-nose" ,python-nose)
5496 ("python-pytest" ,python-pytest)))
5497 (home-page "https://ipython.org")
5498 (synopsis "IPython Kernel for Jupyter")
5499 (description
5500 "This package provides the IPython kernel for Jupyter.")
5501 (properties `((python2-variant . ,(delay python2-ipykernel))))
5502 (license license:bsd-3)))
5503
5504 ;; Version 5.x and above no longer support Python 2.
5505 (define-public python2-ipykernel
5506 (package
5507 (name "python2-ipykernel")
5508 (version "4.10.1")
5509 (source
5510 (origin
5511 (method url-fetch)
5512 (uri (pypi-uri "ipykernel" version))
5513 (sha256
5514 (base32 "1yzmdiy1djsszqp54jzd8ym8h4hpl67zjq83j2kxbkp0rwmlpdzf"))))
5515 (build-system python-build-system)
5516 (arguments
5517 `(#:python ,python-2))
5518 (propagated-inputs
5519 `(("python2-ipython" ,python2-ipython)
5520 ;; imported at runtime during connect
5521 ("python2-jupyter-client" ,python2-jupyter-client)
5522 ("python2-tornado" ,python2-tornado)
5523 ("python2-traitlets" ,python2-traitlets)))
5524 (native-inputs
5525 `(("python2-mock" ,python2-mock)
5526 ("python2-nose" ,python2-nose)
5527 ("python2-pytest" ,python2-pytest)
5528 ("python2-pytest-cov" ,python2-pytest-cov)))
5529 (home-page "https://ipython.org")
5530 (synopsis "IPython Kernel for Jupyter")
5531 (description
5532 "This package provides the IPython kernel for Jupyter.")
5533 (license license:bsd-3)))
5534
5535 (define-public python-pari-jupyter
5536 (package
5537 (name "python-pari-jupyter")
5538 (version "1.3.2")
5539 (source
5540 (origin
5541 (method url-fetch)
5542 (uri (pypi-uri "pari_jupyter" version))
5543 (sha256
5544 (base32
5545 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
5546 (build-system python-build-system)
5547 (propagated-inputs
5548 `(("python-ipykernel" ,python-ipykernel)))
5549 (inputs
5550 `(("pari-gp" ,pari-gp)
5551 ("readline" ,readline)))
5552 (arguments
5553 `(#:tests? #f)) ; no test suite
5554 (home-page
5555 "https://github.com/jdemeyer/pari_jupyter")
5556 (synopsis "A Jupyter kernel for PARI/GP")
5557 (description "The package provides a PARI/GP kernel for Jupyter.")
5558 (license license:gpl3+)))
5559
5560 (define-public python-backcall
5561 (package
5562 (name "python-backcall")
5563 (version "0.1.0")
5564 (source
5565 (origin
5566 (method url-fetch)
5567 (uri (pypi-uri "backcall" version))
5568 (sha256
5569 (base32
5570 "1r01dqch3f8fdj3n6fviw8hxqrs6w5v0qw4izmvqzry1w9dxiv1q"))))
5571 (build-system python-build-system)
5572 (home-page "https://github.com/takluyver/backcall/")
5573 (synopsis "Specifications for callback functions passed in to an API")
5574 (description
5575 "If your code lets other people supply callback functions, it's important
5576 to specify the function signature you expect, and check that functions support
5577 that. Adding extra parameters later would break other peoples code unless
5578 you're careful. The @code{backcall} package provides a way of specifying the
5579 callback signature using a prototype function.")
5580 (license license:bsd-3)))
5581
5582 (define-public python-ipython
5583 (package
5584 (name "python-ipython")
5585 (version "7.9.0")
5586 (source
5587 (origin
5588 (method url-fetch)
5589 (uri (pypi-uri "ipython" version ".tar.gz"))
5590 (sha256
5591 (base32 "103jkw18z7fnwdal1mdbijjxi1fndzn31g887lmj7ddpf2r07lyz"))))
5592 (build-system python-build-system)
5593 (propagated-inputs
5594 `(("python-backcall" ,python-backcall)
5595 ("python-pyzmq" ,python-pyzmq)
5596 ("python-prompt-toolkit" ,python-prompt-toolkit)
5597 ("python-terminado" ,python-terminado)
5598 ("python-matplotlib" ,python-matplotlib)
5599 ("python-numpy" ,python-numpy)
5600 ("python-numpydoc" ,python-numpydoc)
5601 ("python-jedi" ,python-jedi)
5602 ("python-jinja2" ,python-jinja2)
5603 ("python-mistune" ,python-mistune)
5604 ("python-pexpect" ,python-pexpect)
5605 ("python-pickleshare" ,python-pickleshare)
5606 ("python-simplegeneric" ,python-simplegeneric)
5607 ("python-jsonschema" ,python-jsonschema)
5608 ("python-traitlets" ,python-traitlets)
5609 ("python-nbformat" ,python-nbformat)
5610 ("python-pygments" ,python-pygments)))
5611 (inputs
5612 `(("readline" ,readline)
5613 ("which" ,which)))
5614 (native-inputs
5615 `(("graphviz" ,graphviz)
5616 ("pkg-config" ,pkg-config)
5617 ("python-requests" ,python-requests) ;; for tests
5618 ("python-testpath" ,python-testpath)
5619 ("python-nose" ,python-nose)))
5620 (arguments
5621 `(#:phases
5622 (modify-phases %standard-phases
5623 (add-after 'unpack 'make-docs-reproducible
5624 (lambda _
5625 (substitute* "IPython/sphinxext/ipython_directive.py"
5626 ((".*import datetime") "")
5627 ((".*datetime.datetime.now\\(\\)") "")
5628 (("%timeit") "# %timeit"))
5629 #t))
5630 ;; Tests can only be run after the library has been installed and not
5631 ;; within the source directory.
5632 (delete 'check)
5633 (add-after 'install 'check
5634 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5635 (if tests?
5636 (begin
5637 ;; Make installed package available for running the tests
5638 (add-installed-pythonpath inputs outputs)
5639 (setenv "HOME" "/tmp/") ;; required by a test
5640 ;; We only test the core because one of the other tests
5641 ;; tries to import ipykernel.
5642 (invoke "python" "IPython/testing/iptest.py"
5643 "-v" "IPython/core/tests"))
5644 #t)))
5645 (add-before 'check 'fix-tests
5646 (lambda* (#:key inputs #:allow-other-keys)
5647 (substitute* "./IPython/utils/_process_posix.py"
5648 (("/usr/bin/env', 'which") (which "which")))
5649 (substitute* "./IPython/core/tests/test_inputtransformer.py"
5650 (("#!/usr/bin/env python")
5651 (string-append "#!" (which "python"))))
5652 ;; This test introduces a circular dependency on ipykernel
5653 ;; (which depends on ipython).
5654 (delete-file "IPython/core/tests/test_display.py")
5655 ;; AttributeError: module 'IPython.core' has no attribute 'formatters'
5656 (delete-file "IPython/core/tests/test_interactiveshell.py")
5657 #t)))))
5658 (home-page "https://ipython.org")
5659 (synopsis "IPython is a tool for interactive computing in Python")
5660 (description
5661 "IPython provides a rich architecture for interactive computing with:
5662 Powerful interactive shells, a browser-based notebook, support for interactive
5663 data visualization, embeddable interpreters and tools for parallel
5664 computing.")
5665 (properties `((python2-variant . ,(delay python2-ipython))))
5666 (license license:bsd-3)))
5667
5668 ;; This is the latest release of the LTS version of ipython with support for
5669 ;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
5670 ;; dropped support for Python 2.7.
5671 (define-public python2-ipython
5672 (package
5673 (name "python2-ipython")
5674 (version "5.8.0")
5675 (source
5676 (origin
5677 (method url-fetch)
5678 (uri (pypi-uri "ipython" version ".tar.gz"))
5679 (sha256
5680 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
5681 (build-system python-build-system)
5682 (propagated-inputs
5683 `(("python2-backports-shutil-get-terminal-size"
5684 ,python2-backports-shutil-get-terminal-size)
5685 ("python2-pathlib2" ,python2-pathlib2)
5686 ("python2-pyzmq" ,python2-pyzmq)
5687 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
5688 ("python2-terminado" ,python2-terminado)
5689 ("python2-matplotlib" ,python2-matplotlib)
5690 ("python2-numpy" ,python2-numpy)
5691 ("python2-numpydoc" ,python2-numpydoc)
5692 ("python2-jinja2" ,python2-jinja2)
5693 ("python2-mistune" ,python2-mistune)
5694 ("python2-pexpect" ,python2-pexpect)
5695 ("python2-pickleshare" ,python2-pickleshare)
5696 ("python2-simplegeneric" ,python2-simplegeneric)
5697 ("python2-jsonschema" ,python2-jsonschema)
5698 ("python2-traitlets" ,python2-traitlets)
5699 ("python2-nbformat" ,python2-nbformat)
5700 ("python2-pygments" ,python2-pygments)))
5701 (inputs
5702 `(("readline" ,readline)
5703 ("which" ,which)))
5704 (native-inputs
5705 `(("graphviz" ,graphviz)
5706 ("pkg-config" ,pkg-config)
5707 ("python2-requests" ,python2-requests) ;; for tests
5708 ("python2-testpath" ,python2-testpath)
5709 ("python2-mock" ,python2-mock)
5710 ("python2-nose" ,python2-nose)))
5711 (arguments
5712 `(#:python ,python-2
5713 #:phases
5714 (modify-phases %standard-phases
5715 (add-before 'check 'delete-broken-tests
5716 (lambda* (#:key inputs #:allow-other-keys)
5717 ;; These tests throw errors for unknown reasons.
5718 (delete-file "IPython/core/tests/test_profile.py")
5719 (delete-file "IPython/core/tests/test_interactiveshell.py")
5720 (delete-file "IPython/core/tests/test_magic.py")
5721 #t)))))
5722 (home-page "https://ipython.org")
5723 (synopsis "IPython is a tool for interactive computing in Python")
5724 (description
5725 "IPython provides a rich architecture for interactive computing with:
5726 Powerful interactive shells, a browser-based notebook, support for interactive
5727 data visualization, embeddable interpreters and tools for parallel
5728 computing.")
5729 (license license:bsd-3)))
5730
5731 (define-public python-ipython-documentation
5732 (package
5733 (inherit python-ipython)
5734 (name "python-ipython-documentation")
5735 (version (package-version python-ipython))
5736 (arguments
5737 `(#:phases
5738 (modify-phases %standard-phases
5739 (delete 'build)
5740 (delete 'check)
5741 (replace 'install
5742 (lambda* (#:key outputs #:allow-other-keys)
5743 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
5744 (doc (string-append data "/doc/" ,name "-" ,version))
5745 (html (string-append doc "/html"))
5746 (man1 (string-append data "/man/man1"))
5747 (info (string-append data "/info"))
5748 (examples (string-append doc "/examples"))
5749 (python-arg (string-append "PYTHON=" (which "python"))))
5750 (setenv "LANG" "en_US.utf8")
5751 (with-directory-excursion "docs"
5752 ;; FIXME: pdf fails to build
5753 ;;(system* "make" "pdf" "PAPER=a4")
5754 (system* "make" python-arg "html")
5755 ;; FIXME: the generated texi file contains ^@^@, which trips
5756 ;; up the parser.
5757 ;; (system* "make" python-arg "info")
5758 )
5759 (copy-recursively "docs/man" man1)
5760 (copy-recursively "examples" examples)
5761 (copy-recursively "docs/build/html" html)
5762 ;; (copy-file "docs/build/latex/ipython.pdf"
5763 ;; (string-append doc "/ipython.pdf"))
5764 (mkdir-p info)
5765 ;; (copy-file "docs/build/texinfo/ipython.info"
5766 ;; (string-append info "/ipython.info"))
5767 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
5768 #t)))))
5769 (inputs
5770 `(("python-ipython" ,python-ipython)
5771 ("python-ipykernel" ,python-ipykernel)))
5772 (native-inputs
5773 `(("python-sphinx" ,python-sphinx)
5774 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
5775 ;; FIXME: It's possible that a smaller union would work just as well.
5776 ("texlive" ,(texlive-union (list texlive-amsfonts
5777 texlive-fonts-ec
5778 texlive-generic-ifxetex
5779 texlive-generic-pdftex
5780 texlive-latex-capt-of
5781 texlive-latex-cmap
5782 texlive-latex-environ
5783 texlive-latex-eqparbox
5784 texlive-latex-etoolbox
5785 texlive-latex-expdlist
5786 texlive-latex-fancyhdr
5787 texlive-latex-fancyvrb
5788 texlive-latex-fncychap
5789 texlive-latex-float
5790 texlive-latex-framed
5791 texlive-latex-geometry
5792 texlive-latex-graphics
5793 texlive-latex-hyperref
5794 texlive-latex-mdwtools
5795 texlive-latex-multirow
5796 texlive-latex-needspace
5797 texlive-latex-oberdiek
5798 texlive-latex-parskip
5799 texlive-latex-preview
5800 texlive-latex-tabulary
5801 texlive-latex-threeparttable
5802 texlive-latex-titlesec
5803 texlive-latex-trimspaces
5804 texlive-latex-ucs
5805 texlive-latex-upquote
5806 texlive-latex-url
5807 texlive-latex-varwidth
5808 texlive-latex-wrapfig)))
5809 ("texinfo" ,texinfo)))))
5810
5811 (define-public python-urwid
5812 (package
5813 (name "python-urwid")
5814 (version "2.0.1")
5815 (source
5816 (origin
5817 (method url-fetch)
5818 (uri (pypi-uri "urwid" version))
5819 (sha256
5820 (base32
5821 "1g6cpicybvbananpjikmjk8npmjk4xvak1wjzji62wc600wkwkb4"))))
5822 (build-system python-build-system)
5823 (home-page "http://urwid.org")
5824 (synopsis "Console user interface library for Python")
5825 (description
5826 "Urwid is a curses-based UI/widget library for Python. It includes many
5827 features useful for text console applications.")
5828 (license license:lgpl2.1+)))
5829
5830 (define-public python2-urwid
5831 (package-with-python2 python-urwid))
5832
5833 (define-public python-urwidtrees
5834 (package
5835 (name "python-urwidtrees")
5836 (version "1.0.2")
5837 (source
5838 (origin
5839 (method git-fetch)
5840 ;; package author intends on distributing via github rather than pypi:
5841 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
5842 (uri (git-reference
5843 (url "https://github.com/pazz/urwidtrees")
5844 (commit version)))
5845 (file-name (git-file-name name version))
5846 (sha256
5847 (base32
5848 "1n1kpidvkdnsqyb82vlvk78gmly96kh8351lqxn2pzgwwns6fml2"))))
5849 (build-system python-build-system)
5850 (arguments
5851 '(#:use-setuptools? #f
5852 #:tests? #f)) ; no tests
5853 (propagated-inputs `(("python-urwid" ,python-urwid)))
5854 (home-page "https://github.com/pazz/urwidtrees")
5855 (synopsis "Tree widgets for urwid")
5856 (description "Urwidtrees is a Widget Container API for the @code{urwid}
5857 toolkit. Use it to build trees of widgets.")
5858 (license license:gpl3+)))
5859
5860 (define-public python2-urwidtrees
5861 (package-with-python2 python-urwidtrees))
5862
5863 (define-public python-ua-parser
5864 (package
5865 (name "python-ua-parser")
5866 (version "0.8.0")
5867 (source
5868 (origin
5869 (method url-fetch)
5870 (uri (pypi-uri "ua-parser" version))
5871 (sha256
5872 (base32
5873 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
5874 (build-system python-build-system)
5875 (arguments
5876 `(#:tests? #f)) ;no test suite in release
5877 (native-inputs
5878 `(("python-pyyaml" ,python-pyyaml)))
5879 (home-page "https://github.com/ua-parser/uap-python")
5880 (synopsis "User agent parser")
5881 (description
5882 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
5883 (license license:asl2.0)))
5884
5885 (define-public python2-ua-parser
5886 (package-with-python2 python-ua-parser))
5887
5888 (define-public python-user-agents
5889 (package
5890 (name "python-user-agents")
5891 (version "1.1.0")
5892 (source
5893 (origin
5894 (method url-fetch)
5895 (uri (pypi-uri "user-agents" version))
5896 (sha256
5897 (base32
5898 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
5899 (build-system python-build-system)
5900 (arguments
5901 `(#:tests? #f)) ;missing devices.json test file in release
5902 (propagated-inputs
5903 `(("python-ua-parser" ,python-ua-parser)))
5904 (home-page "https://github.com/selwin/python-user-agents")
5905 (synopsis "User Agent strings parsing library")
5906 (description
5907 "A library to identify devices (phones, tablets) and their capabilities by
5908 parsing (browser/HTTP) user agent strings.")
5909 (license license:expat)))
5910
5911 (define-public python2-user-agents
5912 (package-with-python2 python-user-agents))
5913
5914 (define-public python-dbus
5915 (package
5916 (name "python-dbus")
5917 (version "1.2.14")
5918 (source
5919 (origin
5920 (method url-fetch)
5921 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
5922 "dbus-python-" version ".tar.gz"))
5923 (sha256
5924 (base32 "0cdchkgnivlka4lf8q4qfk0yxq483i3r3aqickjf8hfn7nx0c0mi"))))
5925 (build-system gnu-build-system)
5926 (native-inputs
5927 `(("pkg-config" ,pkg-config)))
5928 (inputs
5929 `(("python" ,python-wrapper)
5930 ("dbus-glib" ,dbus-glib)))
5931 (synopsis "Python bindings for D-bus")
5932 (description "python-dbus provides bindings for libdbus, the reference
5933 implementation of D-Bus.")
5934 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
5935 (license license:expat)))
5936
5937 (define-public python2-dbus
5938 (package (inherit python-dbus)
5939 (name "python2-dbus")
5940 (inputs `(("python" ,python-2)
5941 ,@(alist-delete "python"
5942 (package-inputs python-dbus)
5943 equal?)))))
5944
5945 (define-public python-notify2
5946 (package
5947 (name "python-notify2")
5948 (version "0.3.1")
5949 (source
5950 (origin
5951 (method url-fetch)
5952 (uri (pypi-uri "notify2" version))
5953 (sha256
5954 (base32
5955 "0z8rrv9rsg1r2qgh2dxj3dfj5xnki98kgi3w839kqby4a26i1yik"))))
5956 (build-system python-build-system)
5957 (arguments `(#:tests? #f)) ; tests depend on system state
5958 (native-inputs
5959 `(("python-dbus" ,python-dbus)))
5960 (home-page "https://bitbucket.org/takluyver/pynotify2")
5961 (synopsis "Python interface to D-Bus notifications")
5962 (description
5963 "Pynotify2 provides a Python interface for sending D-Bus notifications.
5964 It is a reimplementation of pynotify in pure Python, and an alternative to
5965 the GObject Introspection bindings to libnotify for non-GTK applications.")
5966 (license (list license:bsd-2
5967 license:lgpl2.1+))))
5968
5969 (define-public python2-notify2
5970 (package-with-python2 python-notify2))
5971
5972 ;; beautifulsoup4 has a totally different namespace than 3.x,
5973 ;; and pypi seems to put it under its own name, so I guess we should too
5974 (define-public python-beautifulsoup4
5975 (package
5976 (name "python-beautifulsoup4")
5977 (version "4.7.1")
5978 (source
5979 (origin
5980 (method url-fetch)
5981 (uri (pypi-uri "beautifulsoup4" version))
5982 (sha256
5983 (base32
5984 "0j2kycz2dxgx68xzjm7rxg5xn6v61gq5ifvxyg99slmqkybnal4l"))))
5985 (build-system python-build-system)
5986 (arguments
5987 `(#:phases
5988 (modify-phases %standard-phases
5989 ;; The Python 2 source is the definitive source of beautifulsoup4. We
5990 ;; must use this conversion script when building with Python 3. The
5991 ;; conversion script also runs the tests.
5992 ;; For more information, see the file 'convert-py3k' in the source
5993 ;; distribution.
5994 (replace 'check
5995 (lambda _ (invoke "./convert-py3k"))))))
5996 (propagated-inputs
5997 `(("python-soupsieve" ,python-soupsieve)))
5998 (home-page
5999 "https://www.crummy.com/software/BeautifulSoup/bs4/")
6000 (synopsis
6001 "Python screen-scraping library")
6002 (description
6003 "Beautiful Soup is a Python library designed for rapidly setting up
6004 screen-scraping projects. It offers Pythonic idioms for navigating,
6005 searching, and modifying a parse tree, providing a toolkit for
6006 dissecting a document and extracting what you need. It automatically
6007 converts incoming documents to Unicode and outgoing documents to UTF-8.")
6008 (license license:expat)
6009 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
6010
6011 (define-public python2-beautifulsoup4
6012 (package
6013 (inherit (package-with-python2
6014 (strip-python2-variant python-beautifulsoup4)))
6015 (arguments `(#:python ,python-2))))
6016
6017 (define-public python-soupsieve
6018 (package
6019 (name "python-soupsieve")
6020 (version "1.9.5")
6021 (source
6022 (origin
6023 (method url-fetch)
6024 (uri (pypi-uri "soupsieve" version))
6025 (sha256
6026 (base32
6027 "1nhd0q0ifwva9wn645s6pn74p1rd97asn3qfg75nphx1wkgcbhg2"))))
6028 (build-system python-build-system)
6029 (arguments `(#:tests? #f))
6030 ;;XXX: 2 tests fail currently despite claming they were to be
6031 ;;skipped. Also, beautifulsoup4 may depend on this in the future, so we
6032 ;;don't want to create a circular dependency.
6033 (home-page "https://github.com/facelessuser/soupsieve")
6034 (synopsis "CSS selector library")
6035 (description
6036 "Soup Sieve is a CSS selector library designed to be used with Beautiful
6037 Soup 4. It aims to provide selecting, matching, and filtering using modern
6038 CSS selectors. Soup Sieve currently provides selectors from the CSS level 1
6039 specifications up through the latest CSS level 4 drafts and beyond (though
6040 some are not yet implemented).")
6041 (properties `((python2-variant . ,(delay python2-soupsieve))))
6042 (license license:expat)))
6043
6044 (define-public python2-soupsieve
6045 (let ((base (package-with-python2 (strip-python2-variant python-soupsieve))))
6046 (package
6047 (inherit base)
6048 (propagated-inputs
6049 `(("python2-backports-functools-lru-cache"
6050 ,python2-backports-functools-lru-cache)
6051 ,@(package-propagated-inputs base))))))
6052
6053 (define-public python-netifaces
6054 (package
6055 (name "python-netifaces")
6056 (version "0.10.7")
6057 (source
6058 (origin
6059 (method url-fetch)
6060 (uri (pypi-uri "netifaces" version))
6061 (sha256
6062 (base32
6063 "1gccklrcplbbqh81g1mdgpa5y8na7kkf29cq2ka3f5a2fp5hyndx"))))
6064 (build-system python-build-system)
6065 (home-page "https://github.com/al45tair/netifaces")
6066 (synopsis
6067 "Python module for portable network interface information")
6068 (description
6069 "Netifaces is a Python module providing information on network
6070 interfaces in an easy and portable manner.")
6071 (license license:expat)))
6072
6073 (define-public python2-netifaces
6074 (package-with-python2 python-netifaces))
6075
6076 (define-public python-networkx
6077 (package
6078 (name "python-networkx")
6079 (version "2.2")
6080 (source
6081 (origin
6082 (method url-fetch)
6083 (uri (pypi-uri "networkx" version ".zip"))
6084 (sha256
6085 (base32 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
6086 (build-system python-build-system)
6087 ;; python-decorator is needed at runtime.
6088 (propagated-inputs
6089 `(("python-decorator" ,python-decorator)))
6090 (native-inputs
6091 `(("python-nose" ,python-nose)
6092 ("unzip" ,unzip)))
6093 (home-page "https://networkx.github.io/")
6094 (synopsis "Python module for creating and manipulating graphs and networks")
6095 (description
6096 "NetworkX is a Python package for the creation, manipulation, and study
6097 of the structure, dynamics, and functions of complex networks.")
6098 (license license:bsd-3)))
6099
6100 (define-public python2-networkx
6101 (package-with-python2 python-networkx))
6102
6103 (define-public python-datrie
6104 (package
6105 (name "python-datrie")
6106 (version "0.8")
6107 (source
6108 (origin
6109 (method url-fetch)
6110 (uri (pypi-uri "datrie" version))
6111 (sha256
6112 (base32
6113 "0338r8xgmpy78556jhms0h6qkvyjr10p8bpgdvcpqzm9lrmxmmdx"))))
6114 (build-system python-build-system)
6115 (native-inputs
6116 `(("python-cython" ,python-cython)
6117 ("python-hypothesis" ,python-hypothesis)
6118 ("python-pytest" ,python-pytest)
6119 ("python-pytest-runner" ,python-pytest-runner)))
6120 (home-page "https://github.com/kmike/datrie")
6121 (synopsis "Fast, efficiently stored trie for Python")
6122 (description
6123 "This package provides a fast, efficiently stored trie implementation for
6124 Python.")
6125 (license license:lgpl2.1+)))
6126
6127 (define-public snakemake
6128 (package
6129 (name "snakemake")
6130 (version "5.7.1")
6131 (source
6132 (origin
6133 (method url-fetch)
6134 (uri (pypi-uri "snakemake" version))
6135 (sha256
6136 (base32 "1pnpvvn8n2a78cg360wz3ldmpqrsm2wzi0c0dmvki9fnsw6fxdas"))))
6137 (build-system python-build-system)
6138 (arguments
6139 ;; TODO: Package missing test dependencies.
6140 '(#:tests? #f
6141 #:phases
6142 (modify-phases %standard-phases
6143 ;; For cluster execution Snakemake will call Python. Since there is
6144 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
6145 ;; this by calling the snakemake wrapper instead.
6146 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
6147 (lambda* (#:key outputs #:allow-other-keys)
6148 (substitute* "snakemake/executors.py"
6149 (("\\{sys.executable\\} -m snakemake")
6150 (string-append (assoc-ref outputs "out")
6151 "/bin/snakemake")))
6152 #t)))))
6153 (propagated-inputs
6154 `(("python-appdirs" ,python-appdirs)
6155 ("python-configargparse" ,python-configargparse)
6156 ("python-datrie" ,python-datrie)
6157 ("python-docutils" ,python-docutils)
6158 ("python-gitpython" ,python-gitpython)
6159 ("python-jinja2" ,python-jinja2)
6160 ("python-jsonschema" ,python-jsonschema)
6161 ("python-networkx" ,python-networkx)
6162 ("python-psutil" ,python-psutil)
6163 ("python-pyyaml" ,python-pyyaml)
6164 ("python-ratelimiter" ,python-ratelimiter)
6165 ("python-requests" ,python-requests)
6166 ("python-wrapt" ,python-wrapt)))
6167 (home-page "https://snakemake.readthedocs.io")
6168 (synopsis "Python-based execution environment for make-like workflows")
6169 (description
6170 "Snakemake aims to reduce the complexity of creating workflows by
6171 providing a clean and modern domain specific specification language (DSL) in
6172 Python style, together with a fast and comfortable execution environment.")
6173 (license license:expat)))
6174
6175 (define-public python-pyqrcode
6176 (package
6177 (name "python-pyqrcode")
6178 (version "1.2.1")
6179 (source
6180 (origin
6181 (method url-fetch)
6182 (uri (pypi-uri "PyQRCode" version))
6183 (sha256
6184 (base32
6185 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
6186 (build-system python-build-system)
6187 (home-page
6188 "https://github.com/mnooner256/pyqrcode")
6189 (synopsis "QR code generator")
6190 (description
6191 "Pyqrcode is a QR code generator written purely in Python with
6192 SVG, EPS, PNG and terminal output.")
6193 (license license:bsd-3)))
6194
6195 (define-public python-seaborn
6196 (package
6197 (name "python-seaborn")
6198 (version "0.9.0")
6199 (source
6200 (origin
6201 (method url-fetch)
6202 (uri (pypi-uri "seaborn" version))
6203 (sha256
6204 (base32 "0bqysi3fxfjl1866m5jq8z7mynhqbqnikim74dmzn8539iwkzj3n"))
6205 (patches
6206 (list (origin
6207 (method url-fetch)
6208 ;; This has already been merged, but there is no new
6209 ;; release including this patch. It fixes problems
6210 ;; with axis rotation that would lead to test
6211 ;; failures.
6212 (uri "https://patch-diff.githubusercontent.com/raw/mwaskom/seaborn/pull/1716.diff")
6213 (sha256
6214 (base32
6215 "1lm870z316n9ivsyr86hpk1gxaraw0mrjvq42lqsm0znhjdp9q9w"))
6216 (file-name "seaborn-0.9.0-axis-rotation.patch"))))))
6217 (build-system python-build-system)
6218 (arguments
6219 `(#:phases
6220 (modify-phases %standard-phases
6221 (add-before 'check 'start-xserver
6222 (lambda* (#:key inputs #:allow-other-keys)
6223 (let ((xorg-server (assoc-ref inputs "xorg-server")))
6224 ;; There must be a running X server and make check doesn't
6225 ;; start one. Therefore we must do it.
6226 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
6227 (setenv "DISPLAY" ":1")
6228 #t)))
6229 (add-after 'unpack 'fix-tests
6230 (lambda _
6231 ;; test_cbar_ticks fails probably because of matplotlib's
6232 ;; expectation of using an older version of FreeType.
6233 (delete-file "seaborn/tests/test_matrix.py")
6234 #t))
6235 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
6236 (propagated-inputs
6237 `(("python-pandas" ,python-pandas)
6238 ("python-matplotlib" ,python-matplotlib)
6239 ("python-numpy" ,python-numpy)
6240 ("python-scipy" ,python-scipy)))
6241 (native-inputs
6242 `(("python-pytest" ,python-pytest)
6243 ("xorg-server" ,xorg-server-for-tests)))
6244 (home-page "https://seaborn.pydata.org/")
6245 (synopsis "Statistical data visualization")
6246 (description
6247 "Seaborn is a library for making attractive and informative statistical
6248 graphics in Python. It is built on top of matplotlib and tightly integrated
6249 with the PyData stack, including support for numpy and pandas data structures
6250 and statistical routines from scipy and statsmodels.")
6251 (license license:bsd-3)))
6252
6253 (define-public python2-seaborn
6254 (package-with-python2 python-seaborn))
6255
6256 (define-public python-mpmath
6257 (package
6258 (name "python-mpmath")
6259 (version "0.19")
6260 (source (origin
6261 (method url-fetch)
6262 (uri (string-append "http://mpmath.org/files/mpmath-"
6263 version ".tar.gz"))
6264 (sha256
6265 (base32
6266 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
6267 (build-system python-build-system)
6268 (arguments
6269 '(#:phases
6270 (modify-phases %standard-phases
6271 (replace 'check
6272 (lambda _
6273 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
6274 (home-page "http://mpmath.org")
6275 (synopsis "Arbitrary-precision floating-point arithmetic in python")
6276 (description
6277 "@code{mpmath} can be used as an arbitrary-precision substitute for
6278 Python's float/complex types and math/cmath modules, but also does much
6279 more advanced mathematics.")
6280 (license license:bsd-3)))
6281
6282 (define-public python2-mpmath
6283 (package-with-python2 python-mpmath))
6284
6285 (define-public python-bigfloat
6286 (package
6287 (name "python-bigfloat")
6288 (version "0.3.0")
6289 (source
6290 (origin
6291 (method url-fetch)
6292 (uri (pypi-uri "bigfloat" version))
6293 (sha256
6294 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
6295 (build-system python-build-system)
6296 (inputs
6297 `(("mpfr" ,mpfr)))
6298 (home-page "https://github.com/mdickinson/bigfloat")
6299 (synopsis "Arbitrary precision floating-point arithmetic for Python")
6300 (description
6301 "This package provides a Python interface to the MPFR library for
6302 multiprecision arithmetic.")
6303 (license license:lgpl3+)))
6304
6305 (define-public python2-bigfloat
6306 (package-with-python2 python-bigfloat))
6307
6308 (define-public python-sympy
6309 (package
6310 (name "python-sympy")
6311 (version "1.1.1")
6312 (source
6313 (origin
6314 (method url-fetch)
6315 (uri (string-append
6316 "https://github.com/sympy/sympy/releases/download/sympy-"
6317 version "/sympy-" version ".tar.gz"))
6318 (sha256
6319 (base32 "190n29sppw7g8ihilc5451y7jlfcaw56crqiqbf1jff43dlmfnxc"))))
6320 (build-system python-build-system)
6321 (arguments
6322 `(#:phases
6323 (modify-phases %standard-phases
6324 ;; Run the core tests after installation. By default it would run
6325 ;; *all* tests, which take a very long time to complete and are known
6326 ;; to be flaky.
6327 (delete 'check)
6328 (add-after 'install 'check
6329 (lambda* (#:key outputs #:allow-other-keys)
6330 (invoke "python3" "-c" "import sympy; sympy.test(\"/core\")")
6331 #t)))))
6332 (propagated-inputs
6333 `(("python-mpmath" ,python-mpmath)))
6334 (home-page "https://www.sympy.org/")
6335 (synopsis "Python library for symbolic mathematics")
6336 (description
6337 "SymPy is a Python library for symbolic mathematics. It aims to become a
6338 full-featured computer algebra system (CAS) while keeping the code as simple
6339 as possible in order to be comprehensible and easily extensible.")
6340 (license license:bsd-3)))
6341
6342 (define-public python2-sympy
6343 (package
6344 (inherit (package-with-python2 python-sympy))
6345 (arguments
6346 `(#:phases
6347 (modify-phases %standard-phases
6348 ;; Run the core tests after installation. By default it would run
6349 ;; *all* tests, which take a very long time to complete and are known
6350 ;; to be flaky.
6351 (delete 'check)
6352 (add-after 'install 'check
6353 (lambda* (#:key outputs #:allow-other-keys)
6354 (invoke "python" "-c" "import sympy; sympy.test(\"/core\")")
6355 #t)))))))
6356
6357 (define-public python-q
6358 (package
6359 (name "python-q")
6360 (version "2.6")
6361 (source
6362 (origin
6363 (method url-fetch)
6364 (uri (pypi-uri "q" version))
6365 (sha256
6366 (base32
6367 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
6368 (build-system python-build-system)
6369 (home-page "https://github.com/zestyping/q")
6370 (synopsis "Quick-and-dirty debugging output for tired programmers")
6371 (description
6372 "q is a Python module for \"print\" style of debugging Python code. It
6373 provides convenient short API for print out of values, tracebacks, and
6374 falling into the Python interpreter.")
6375 (license license:asl2.0)))
6376
6377 (define-public python2-q
6378 (package-with-python2 python-q))
6379
6380 (define-public python2-xlib
6381 (package
6382 (name "python2-xlib")
6383 (version "0.14")
6384 (source (origin
6385 (method url-fetch)
6386 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
6387 "/" version "/"
6388 "python-xlib-" version ".tar.gz"))
6389 (sha256
6390 (base32
6391 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
6392 (build-system python-build-system)
6393 (arguments
6394 `(#:python ,python-2 ;Python 2 only
6395 #:tests? #f)) ;no tests
6396 (home-page "http://python-xlib.sourceforge.net/")
6397 (synopsis "Python X11 client library")
6398 (description
6399 "The Python X Library is intended to be a fully functional X client
6400 library for Python programs. It is useful to implement low-level X clients.
6401 It is written entirely in Python.")
6402 (license license:gpl2+)))
6403
6404 (define-public python-singledispatch
6405 (package
6406 (name "python-singledispatch")
6407 (version "3.4.0.3")
6408 (source
6409 (origin
6410 (method url-fetch)
6411 (uri (pypi-uri "singledispatch" version))
6412 (sha256
6413 (base32
6414 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
6415 (build-system python-build-system)
6416 (native-inputs
6417 `(("python-six" ,python-six))) ; required for conversion, not at run-time
6418 (home-page
6419 "https://docs.python.org/3/library/functools.html#functools.singledispatch")
6420 (synopsis "Backport of singledispatch feature from Python 3.4")
6421 (description
6422 "This library brings functools.singledispatch from Python 3.4 to Python
6423 2.6-3.3.")
6424 (license license:expat)))
6425
6426 (define-public python2-singledispatch
6427 (package-with-python2 python-singledispatch))
6428
6429 ;; the python- version can be removed with python-3.5
6430 (define-public python-backports-abc
6431 (package
6432 (name "python-backports-abc")
6433 (version "0.5")
6434 (source
6435 (origin
6436 (method url-fetch)
6437 (uri (pypi-uri "backports_abc" version))
6438 (sha256
6439 (base32
6440 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
6441 (build-system python-build-system)
6442 (home-page "https://github.com/cython/backports_abc")
6443 (synopsis "Backport of additions to the 'collections.abc' module")
6444 (description
6445 "Python-backports-abc provides a backport of additions to the
6446 @code{collections.abc} module in Python-3.5.")
6447 (license license:psfl)))
6448
6449 (define-public python2-backports-abc
6450 (package-with-python2 python-backports-abc))
6451
6452 (define-public python-backports-csv
6453 (package
6454 (name "python-backports-csv")
6455 (version "1.0.5")
6456 (source
6457 (origin
6458 (method url-fetch)
6459 (uri (pypi-uri "backports.csv" version))
6460 (sha256
6461 (base32
6462 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
6463 (build-system python-build-system)
6464 (home-page "https://github.com/ryanhiebert/backports.csv")
6465 (synopsis "Backport of Python 3's csv module for Python 2")
6466 (description
6467 "Provides a backport of Python 3's @code{csv} module for parsing
6468 comma separated values. The API of the @code{csv} module in Python 2
6469 is drastically different from the @code{csv} module in Python 3.
6470 This is due, for the most part, to the difference between str in
6471 Python 2 and Python 3.")
6472 (license license:psfl)))
6473
6474 (define-public python2-backports-csv
6475 (package-with-python2 python-backports-csv))
6476
6477 (define-public python2-backports-shutil-get-terminal-size
6478 (package
6479 (name "python2-backports-shutil-get-terminal-size")
6480 (version "1.0.0")
6481 (source
6482 (origin
6483 (method url-fetch)
6484 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
6485 (sha256
6486 (base32
6487 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
6488 (build-system python-build-system)
6489 (arguments
6490 `(#:python ,python-2
6491 #:phases
6492 (modify-phases %standard-phases
6493 (replace 'check
6494 (lambda _
6495 (invoke "py.test" "-v"))))))
6496 (native-inputs
6497 `(("python2-pytest" ,python2-pytest)))
6498 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
6499 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
6500 (description
6501 "This package provides a backport of the @code{get_terminal_size
6502 function} from Python 3.3's @code{shutil}.
6503 Unlike the original version it is written in pure Python rather than C,
6504 so it might be a tiny bit slower.")
6505 (license license:expat)))
6506
6507 (define-public python-waf
6508 (package
6509 (name "python-waf")
6510 (version "2.0.19")
6511 (source (origin
6512 (method url-fetch)
6513 (uri (string-append "https://waf.io/"
6514 "waf-" version ".tar.bz2"))
6515 (sha256
6516 (base32
6517 "19dvqbsvxz7ch03dh1v0znklrwxlz6yzddc3k9smzrrgny4jch6q"))))
6518 (build-system python-build-system)
6519 (arguments
6520 '(#:phases
6521 (modify-phases %standard-phases
6522 (replace 'build
6523 (lambda _
6524 ;; XXX: Find a way to add all extra tools.
6525 (let ((tools '("gccdeps"
6526 "clang_compilation_database")))
6527 (invoke "python" "waf-light" "configure" "build"
6528 (string-append "--tools="
6529 (string-join tools ","))))))
6530 (replace 'check
6531 (lambda _
6532 (invoke "python" "waf" "--version")))
6533 (replace 'install
6534 (lambda* (#:key outputs #:allow-other-keys)
6535 (let ((out (assoc-ref outputs "out")))
6536 (install-file "waf" (string-append out "/bin")))
6537 #t))
6538 ;; waf breaks when it is wrapped.
6539 (delete 'wrap))))
6540 (home-page "https://waf.io/")
6541 (synopsis "Python-based build system")
6542 (description
6543 "Waf is a Python-based framework for configuring, compiling and installing
6544 applications.")
6545 (license license:bsd-3)))
6546
6547 (define-public python2-waf
6548 (package-with-python2 python-waf))
6549
6550 (define-public python-pyzmq
6551 (package
6552 (name "python-pyzmq")
6553 (version "17.1.2")
6554 (source
6555 (origin
6556 (method url-fetch)
6557 (uri (pypi-uri "pyzmq" version))
6558 (sha256
6559 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
6560 (build-system python-build-system)
6561 (arguments
6562 `(#:configure-flags
6563 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
6564 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
6565 ;; --inplace' for 'python setup.py test' to work.
6566 #:tests? #f))
6567 (inputs
6568 `(("zeromq" ,zeromq)))
6569 (native-inputs
6570 `(("pkg-config" ,pkg-config)
6571 ("python-nose" ,python-nose)))
6572 (home-page "https://github.com/zeromq/pyzmq")
6573 (synopsis "Python bindings for 0MQ")
6574 (description
6575 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
6576 (license license:bsd-4)))
6577
6578 (define-public python2-pyzmq
6579 (package-with-python2 python-pyzmq))
6580
6581 (define-public python-pep8
6582 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
6583 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
6584 ;; some dependents' test suites, and nothing more.
6585 (package
6586 (name "python-pep8")
6587 (version "1.7.0")
6588 (source
6589 (origin
6590 (method url-fetch)
6591 (uri (pypi-uri "pep8" version))
6592 (sha256
6593 (base32
6594 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))
6595 (patches (search-patches "python-pep8-stdlib-tokenize-compat.patch"))))
6596 (build-system python-build-system)
6597 (home-page "https://pep8.readthedocs.org/")
6598 (synopsis "Python style guide checker")
6599 (description
6600 "This tools checks Python code against some of the style conventions in
6601 PEP 8.")
6602 (license license:expat)))
6603
6604 (define-public python2-pep8
6605 (package-with-python2 python-pep8))
6606
6607 (define-public python-pyflakes
6608 (package
6609 (name "python-pyflakes")
6610 (version "2.1.1")
6611 (source
6612 (origin
6613 (method url-fetch)
6614 (uri (pypi-uri "pyflakes" version))
6615 (sha256
6616 (base32
6617 "18pq95a1xj2dgdd0m85gyfsn40jajj4xc3lp8wfv7igqhrc86xnr"))))
6618 (build-system python-build-system)
6619 (home-page
6620 "https://github.com/pyflakes/pyflakes")
6621 (synopsis "Passive checker of Python programs")
6622 (description
6623 "Pyflakes statically checks Python source code for common errors.")
6624 (license license:expat)))
6625
6626 (define-public python2-pyflakes
6627 (package-with-python2 python-pyflakes))
6628
6629 (define-public python-mccabe
6630 (package
6631 (name "python-mccabe")
6632 (version "0.6.1")
6633 (source
6634 (origin
6635 (method url-fetch)
6636 (uri (pypi-uri "mccabe" version))
6637 (sha256
6638 (base32
6639 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
6640 (build-system python-build-system)
6641 (native-inputs
6642 `(("python-pytest" ,python-pytest-bootstrap)
6643 ("python-pytest-runner" ,python-pytest-runner)))
6644 (home-page "https://github.com/flintwork/mccabe")
6645 (synopsis "McCabe checker, plugin for flake8")
6646 (description
6647 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
6648 complexity of Python source code.")
6649 (license license:expat)))
6650
6651 (define-public python2-mccabe
6652 (package-with-python2 python-mccabe))
6653
6654 (define-public python-mccabe-0.2.1
6655 (package (inherit python-mccabe)
6656 (version "0.2.1")
6657 (source
6658 (origin
6659 (method url-fetch)
6660 (uri (pypi-uri "mccabe" version))
6661 (sha256
6662 (base32
6663 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
6664
6665 (define-public python2-mccabe-0.2.1
6666 (package-with-python2 python-mccabe-0.2.1))
6667
6668 ;; Flake8 2.4.1 requires an older version of pep8.
6669 ;; This should be removed ASAP.
6670 (define-public python-pep8-1.5.7
6671 (package (inherit python-pep8)
6672 (version "1.5.7")
6673 (source
6674 (origin
6675 (method url-fetch)
6676 (uri (pypi-uri "pep8" version))
6677 (sha256
6678 (base32
6679 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
6680 (arguments
6681 ;; XXX Tests not compatible with Python 3.5.
6682 '(#:tests? #f))))
6683
6684 (define-public python2-pep8-1.5.7
6685 (package-with-python2 python-pep8-1.5.7))
6686
6687 ;; Flake8 2.4.1 requires an older version of pyflakes.
6688 ;; This should be removed ASAP.
6689 (define-public python-pyflakes-0.8.1
6690 (package (inherit python-pyflakes)
6691 (version "0.8.1")
6692 (source
6693 (origin
6694 (method url-fetch)
6695 (uri (pypi-uri "pyflakes" version))
6696 (sha256
6697 (base32
6698 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
6699 (arguments
6700 ;; XXX Tests not compatible with Python 3.5.
6701 '(#:tests? #f))))
6702
6703 (define-public python2-pyflakes-0.8.1
6704 (package-with-python2 python-pyflakes-0.8.1))
6705
6706 (define-public python-flake8
6707 (package
6708 (name "python-flake8")
6709 (version "3.7.7")
6710 (source (origin
6711 (method url-fetch)
6712 (uri (pypi-uri "flake8" version))
6713 (sha256
6714 (base32
6715 "0qg6zggqigrd4k3gv88shd1a27d0cwgfql8vfiq2c7rl7w3rd6c5"))))
6716 (build-system python-build-system)
6717 (arguments
6718 `(#:phases
6719 (modify-phases %standard-phases
6720 (delete 'check)
6721 (add-after 'install 'check
6722 (lambda* (#:key inputs outputs #:allow-other-keys)
6723 (add-installed-pythonpath inputs outputs)
6724 (invoke "pytest" "-v")
6725 #t)))))
6726 (propagated-inputs
6727 `(("python-pycodestyle" ,python-pycodestyle)
6728 ("python-entrypoints" ,python-entrypoints)
6729 ("python-pyflakes" ,python-pyflakes)
6730 ("python-mccabe" ,python-mccabe)))
6731 (native-inputs
6732 `(("python-mock" ,python-mock)
6733 ("python-pytest" ,python-pytest-bootstrap)
6734 ("python-pytest-runner" ,python-pytest-runner)))
6735 (home-page "https://gitlab.com/pycqa/flake8")
6736 (synopsis
6737 "The modular source code checker: pep8, pyflakes and co")
6738 (description
6739 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
6740 (properties `((python2-variant . ,(delay python2-flake8))))
6741 (license license:expat)))
6742
6743 (define-public python2-flake8
6744 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
6745 (package (inherit base)
6746 (propagated-inputs
6747 `(("python2-configparser" ,python2-configparser)
6748 ("python2-enum34" ,python2-enum34)
6749 ("python2-typing" ,python2-typing)
6750 ,@(package-propagated-inputs base))))))
6751
6752 ;; python-hacking requires flake8 <2.6.0.
6753 (define-public python-flake8-2.5
6754 (package
6755 (inherit python-flake8)
6756 (version "2.5.5")
6757 (source (origin
6758 (method url-fetch)
6759 (uri (pypi-uri "flake8" version))
6760 (sha256
6761 (base32
6762 "1snylqwbmrylbx3r1wpz8ggk98f6bcag4441ag8mm2l7wyn58sij"))))
6763 (propagated-inputs
6764 `(("python-pep8" ,python-pep8)
6765 ,@(package-propagated-inputs python-flake8)))
6766 (properties `((python2-variant . ,(delay python2-flake8-2.5))))))
6767
6768 (define-public python2-flake8-2.5
6769 (package
6770 (inherit python2-flake8)
6771 (version (package-version python-flake8-2.5))
6772 (source (origin
6773 (inherit (package-source python-flake8-2.5))))
6774 (propagated-inputs
6775 `(("python2-pep8" ,python2-pep8)
6776 ,@(package-propagated-inputs python2-flake8)))))
6777
6778 (define-public python-flake8-polyfill
6779 (package
6780 (name "python-flake8-polyfill")
6781 (version "1.0.2")
6782 (source
6783 (origin
6784 (method url-fetch)
6785 (uri (pypi-uri "flake8-polyfill" version))
6786 (sha256
6787 (base32
6788 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
6789 (build-system python-build-system)
6790 (arguments
6791 '(#:phases
6792 (modify-phases %standard-phases
6793 (replace 'check
6794 (lambda _
6795 ;; Be compatible with Pytest 4:
6796 ;; https://gitlab.com/pycqa/flake8-polyfill/merge_requests/7
6797 (substitute* "setup.cfg"
6798 (("\\[pytest\\]")
6799 "[tool:pytest]"))
6800
6801 (setenv "PYTHONPATH"
6802 (string-append (getcwd) "/build/lib:"
6803 (getenv "PYTHONPATH")))
6804 (invoke "py.test" "-v"))))))
6805 (native-inputs
6806 `(("python-flake8" ,python-flake8)
6807 ("python-mock" ,python-mock)
6808 ("python-pep8" ,python-pep8)
6809 ("python-pycodestyle" ,python-pycodestyle)
6810 ("python-pytest" ,python-pytest)))
6811 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
6812 (synopsis "Polyfill package for Flake8 plugins")
6813 (description
6814 "This package that provides some compatibility helpers for Flake8
6815 plugins that intend to support Flake8 2.x and 3.x simultaneously.")
6816 (license license:expat)))
6817
6818 (define-public python2-flake8-polyfill
6819 (package-with-python2 python-flake8-polyfill))
6820
6821 (define-public python-mistune
6822 (package
6823 (name "python-mistune")
6824 (version "0.8.4")
6825 (source
6826 (origin
6827 (method url-fetch)
6828 (uri (pypi-uri "mistune" version))
6829 (sha256
6830 (base32
6831 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
6832 (build-system python-build-system)
6833 (native-inputs
6834 `(("python-nose" ,python-nose)
6835 ("python-cython" ,python-cython)))
6836 (home-page "https://github.com/lepture/mistune")
6837 (synopsis "Markdown parser in pure Python")
6838 (description "This package provides a fast markdown parser in pure
6839 Python.")
6840 (license license:bsd-3)))
6841
6842 (define-public python2-mistune
6843 (package-with-python2 python-mistune))
6844
6845 (define-public python-markdown
6846 (package
6847 (name "python-markdown")
6848 (version "3.2.1")
6849 (source
6850 (origin
6851 (method url-fetch)
6852 (uri (pypi-uri "Markdown" version))
6853 (sha256
6854 (base32
6855 "00k91gwhxnm8jdnm2v5xjz9irj6dbi7afywz2hpakqdbxs1ydzlh"))))
6856 (build-system python-build-system)
6857 (native-inputs
6858 `(("python-nose" ,python-nose)
6859 ("python-pyyaml" ,python-pyyaml)))
6860 (home-page "https://python-markdown.github.io/")
6861 (synopsis "Python implementation of Markdown")
6862 (description
6863 "This package provides a Python implementation of John Gruber's
6864 Markdown. The library features international input, various Markdown
6865 extensions, and several HTML output formats. A command line wrapper
6866 markdown_py is also provided to convert Markdown files to HTML.")
6867 (properties `((python2-variant . ,(delay python2-markdown))))
6868 (license license:bsd-3)))
6869
6870 ;; Markdown 3.2 dropped support for Python 2.
6871 (define-public python2-markdown
6872 (let ((base (package-with-python2 (strip-python2-variant python-markdown))))
6873 (package/inherit
6874 base
6875 (version "3.1.1")
6876 (source (origin
6877 (method url-fetch)
6878 (uri (pypi-uri "Markdown" version))
6879 (sha256
6880 (base32
6881 "0yhylk4ffqqs7x086fav4pnfsl1021v7lghznzkififprmmqfl1f")))))))
6882
6883 (define-public python-ptyprocess
6884 (package
6885 (name "python-ptyprocess")
6886 (version "0.5.2")
6887 (source
6888 (origin
6889 (method url-fetch)
6890 (uri (pypi-uri "ptyprocess" version))
6891 (sha256
6892 (base32
6893 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
6894 (build-system python-build-system)
6895 (native-inputs
6896 `(("python-nose" ,python-nose)))
6897 (arguments
6898 `(#:phases
6899 (modify-phases %standard-phases
6900 (replace 'check
6901 (lambda _ (invoke "nosetests"))))))
6902 (home-page "https://github.com/pexpect/ptyprocess")
6903 (synopsis "Run a subprocess in a pseudo terminal")
6904 (description
6905 "This package provides a Python library used to launch a subprocess in a
6906 pseudo terminal (pty), and interact with both the process and its pty.")
6907 (license license:isc)))
6908
6909 (define-public python2-ptyprocess
6910 (package-with-python2 python-ptyprocess))
6911
6912 (define-public python-cram
6913 (package
6914 (name "python-cram")
6915 (version "0.7")
6916 (home-page "https://bitheap.org/cram/")
6917 (source (origin
6918 (method url-fetch)
6919 (uri (list (string-append home-page "cram-"
6920 version ".tar.gz")
6921 (pypi-uri "cram" version)))
6922 (sha256
6923 (base32
6924 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
6925 (arguments
6926 '(#:phases
6927 (modify-phases %standard-phases
6928 (add-after 'unpack 'patch-source
6929 (lambda _
6930 (substitute* (find-files "cram" ".*\\.py$")
6931 ;; Replace default shell path.
6932 (("/bin/sh") (which "sh")))
6933 (substitute* (find-files "tests" ".*\\.t$")
6934 (("md5") "md5sum")
6935 (("/bin/bash") (which "bash"))
6936 (("/bin/sh") (which "sh")))
6937 (substitute* "cram/_test.py"
6938 ;; This hack works around a bug triggered by substituting
6939 ;; the /bin/sh paths. "tests/usage.t" compares the output of
6940 ;; "cram -h", which breaks the output at 80 characters. This
6941 ;; causes the line showing the default shell to break into two
6942 ;; lines, but the test expects a single line...
6943 (("env\\['COLUMNS'\\] = '80'")
6944 "env['COLUMNS'] = '160'"))
6945
6946 (substitute* "Makefile"
6947 ;; Recent versions of python-coverage have caused the test
6948 ;; coverage to decrease (as of version 0.7). Allow that.
6949 (("--fail-under=100")
6950 "--fail-under=90"))
6951
6952 #t))
6953 (replace 'check
6954 ;; The test phase uses the built library and executable.
6955 (lambda* (#:key inputs outputs #:allow-other-keys)
6956 (add-installed-pythonpath inputs outputs)
6957 (setenv "PATH" (string-append (getenv "PATH") ":"
6958 (assoc-ref outputs "out") "/bin"))
6959 (invoke "make" "test"))))))
6960 (build-system python-build-system)
6961 (native-inputs
6962 `(("python-coverage" ,python-coverage)
6963 ("which" ,which)))
6964 (synopsis "Simple testing framework for command line applications")
6965 (description
6966 "Cram is a functional testing framework for command line applications.
6967 Cram tests look like snippets of interactive shell sessions. Cram runs each
6968 command and compares the command output in the test with the command’s actual
6969 output.")
6970 (license license:gpl2+)))
6971
6972 (define-public python2-cram
6973 (package-with-python2 python-cram))
6974
6975 (define-public python-straight-plugin
6976 (package
6977 (name "python-straight-plugin")
6978 (version "1.4.1")
6979 (source
6980 (origin
6981 (method url-fetch)
6982 (uri (pypi-uri "straight.plugin" version))
6983 (sha256
6984 (base32
6985 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
6986 (build-system python-build-system)
6987 (home-page "https://github.com/ironfroggy/straight.plugin")
6988 (synopsis "Simple namespaced plugin facility")
6989 (description "Straight Plugin provides a type of plugin you can create from
6990 almost any existing Python modules, and an easy way for outside developers to
6991 add functionality and customization to your projects with their own plugins.")
6992 (license license:expat)))
6993
6994 (define-public python2-straight-plugin
6995 (package-with-python2 python-straight-plugin))
6996
6997 (define-public python-fonttools
6998 (package
6999 (name "python-fonttools")
7000 (version "3.38.0")
7001 (source (origin
7002 (method url-fetch)
7003 (uri (pypi-uri "fonttools" version ".zip"))
7004 (sha256
7005 (base32
7006 "12ripk3s7skgxr1bs9r8n13r94ym3s8iir7ivfixls9fa4dabmlh"))))
7007 (build-system python-build-system)
7008 (native-inputs
7009 `(("unzip" ,unzip)
7010 ("python-pytest" ,python-pytest)
7011 ("python-pytest-runner" ,python-pytest-runner)))
7012 (home-page "https://github.com/fonttools/fonttools")
7013 (synopsis "Tools to manipulate font files")
7014 (description
7015 "FontTools/TTX is a library to manipulate font files from Python. It
7016 supports reading and writing of TrueType/OpenType fonts, reading and writing
7017 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
7018 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
7019 from an XML-based format.")
7020 (license license:expat)))
7021
7022 (define-public python2-fonttools
7023 (package-with-python2 python-fonttools))
7024
7025 (define-public python-ly
7026 (package
7027 (name "python-ly")
7028 (version "0.9.5")
7029 (source
7030 (origin
7031 (method url-fetch)
7032 (uri (pypi-uri name version))
7033 (sha256
7034 (base32
7035 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
7036 (build-system python-build-system)
7037 (arguments
7038 ;; FIXME: Some tests need network access.
7039 '(#:tests? #f))
7040 (synopsis "Tool and library for manipulating LilyPond files")
7041 (description "This package provides a Python library to parse, manipulate
7042 or create documents in LilyPond format. A command line program ly is also
7043 provided that can be used to do various manipulations with LilyPond files.")
7044 (home-page "https://pypi.org/project/python-ly/")
7045 (license license:gpl2+)))
7046
7047 (define-public python-appdirs
7048 (package
7049 (name "python-appdirs")
7050 (version "1.4.3")
7051 (source
7052 (origin
7053 (method url-fetch)
7054 (uri (pypi-uri "appdirs" version))
7055 (sha256
7056 (base32
7057 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
7058 (build-system python-build-system)
7059 (home-page "https://github.com/ActiveState/appdirs")
7060 (synopsis
7061 "Determine platform-specific dirs, e.g. a \"user data dir\"")
7062 (description
7063 "This module provides a portable way of finding out where user data
7064 should be stored on various operating systems.")
7065 (license license:expat)))
7066
7067 (define-public python2-appdirs
7068 (package-with-python2 python-appdirs))
7069
7070 (define-public python-llfuse
7071 (package
7072 (name "python-llfuse")
7073 (version "1.3.5")
7074 (source (origin
7075 (method url-fetch)
7076 (uri (pypi-uri "llfuse" version ".tar.bz2"))
7077 (sha256
7078 (base32
7079 "1n7a90jww3ly49fm7x27m3xw3la3qfrnykcakga654g6kcyjlhbf"))))
7080 (build-system python-build-system)
7081 (inputs
7082 `(("fuse" ,fuse)
7083 ("attr" ,attr)))
7084 (native-inputs
7085 `(("pkg-config" ,pkg-config)))
7086 (synopsis "Python bindings for FUSE")
7087 (description
7088 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
7089 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
7090 (license license:lgpl2.0+)
7091 (properties `((python2-variant . ,(delay python2-llfuse))))))
7092
7093 (define-public python2-llfuse
7094 (package (inherit (package-with-python2
7095 (strip-python2-variant python-llfuse)))
7096 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
7097
7098 ;; For attic-0.16
7099 (define-public python-llfuse-0.41
7100 (package (inherit python-llfuse)
7101 (version "0.41.1")
7102 (source (origin
7103 (method url-fetch)
7104 (uri (string-append
7105 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
7106 "llfuse-" version ".tar.bz2"))
7107 (sha256
7108 (base32
7109 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
7110 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
7111 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
7112 (license (list license:expat license:lgpl2.0+))))
7113
7114 (define-public python-msgpack
7115 (package
7116 (name "python-msgpack")
7117 (version "0.5.6")
7118 (source (origin
7119 (method url-fetch)
7120 (uri (pypi-uri "msgpack" version))
7121 (sha256
7122 (base32
7123 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
7124 (build-system python-build-system)
7125 (arguments
7126 `(#:modules ((guix build utils)
7127 (guix build python-build-system)
7128 (ice-9 ftw)
7129 (srfi srfi-1)
7130 (srfi srfi-26))
7131 #:phases
7132 (modify-phases %standard-phases
7133 (replace 'check
7134 (lambda _
7135 (let ((cwd (getcwd)))
7136 (setenv "PYTHONPATH"
7137 (string-append cwd "/build/"
7138 (find (cut string-prefix? "lib" <>)
7139 (scandir (string-append cwd "/build")))
7140 ":"
7141 (getenv "PYTHONPATH")))
7142 (invoke "pytest" "-v" "test")))))))
7143 (native-inputs
7144 `(("python-pytest" ,python-pytest)))
7145 (synopsis "MessagePack (de)serializer")
7146 (description "MessagePack is a fast, compact binary serialization format,
7147 suitable for similar data to JSON. This package provides CPython bindings for
7148 reading and writing MessagePack data.")
7149 (home-page "https://pypi.org/project/msgpack/")
7150 (license license:asl2.0)))
7151
7152 ;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
7153 ;; release 0.5. Some packages like borg still call it by the old name for now.
7154 ;; <https://bugs.gnu.org/30662>
7155 (define-public python-msgpack-transitional
7156 (package
7157 (inherit python-msgpack)
7158 (name "python-msgpack-transitional")
7159 (arguments
7160 (substitute-keyword-arguments (package-arguments python-msgpack)
7161 ((#:phases phases)
7162 `(modify-phases ,phases
7163 (add-after 'unpack 'configure-transitional
7164 (lambda _
7165 ;; Keep using the old name.
7166 (substitute* "setup.py"
7167 (("TRANSITIONAL = False")
7168 "TRANSITIONAL = 1"))
7169 #t))))))))
7170
7171 (define-public python2-msgpack
7172 (package-with-python2 python-msgpack))
7173
7174 (define-public python-netaddr
7175 (package
7176 (name "python-netaddr")
7177 (version "0.7.19")
7178 (source
7179 (origin
7180 (method url-fetch)
7181 (uri (pypi-uri "netaddr" version))
7182 (sha256
7183 (base32
7184 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
7185 (build-system python-build-system)
7186 (arguments `(#:tests? #f)) ;; No tests.
7187 (home-page "https://github.com/drkjam/netaddr/")
7188 (synopsis "Pythonic manipulation of network addresses")
7189 (description
7190 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
7191 and MAC network addresses.")
7192 (license license:bsd-3)))
7193
7194 (define-public python2-netaddr
7195 (package-with-python2 python-netaddr))
7196
7197 (define-public python2-pyroute2
7198 (package
7199 (name "python2-pyroute2")
7200 (version "0.5.6")
7201 (source
7202 (origin
7203 (method url-fetch)
7204 (uri (pypi-uri "pyroute2" version))
7205 (sha256
7206 (base32
7207 "1gmz4r1w0yzj6fjjypnalmfyy0lnfznydyn62gi3wk50j5hhxbny"))))
7208 (build-system python-build-system)
7209 (arguments
7210 `(#:python ,python-2)) ;Python 3.x is not supported
7211 (home-page "https://github.com/svinota/pyroute2")
7212 (synopsis "Python netlink library")
7213 (description
7214 "Pyroute2 is a pure Python netlink library with minimal dependencies.
7215 Supported netlink families and protocols include:
7216 @itemize
7217 @item rtnl, network settings - addresses, routes, traffic controls
7218 @item nfnetlink - netfilter API: ipset, nftables, ...
7219 @item ipq - simplest userspace packet filtering, iptables QUEUE target
7220 @item devlink - manage and monitor devlink-enabled hardware
7221 @item generic - generic netlink families
7222 @itemize
7223 @item nl80211 - wireless functions API (basic support)
7224 @item taskstats - extended process statistics
7225 @item acpi_events - ACPI events monitoring
7226 @item thermal_events - thermal events monitoring
7227 @item VFS_DQUOT - disk quota events monitoring
7228 @end itemize
7229 @end itemize")
7230 (license license:gpl2+)))
7231
7232 (define-public python-wrapt
7233 (package
7234 (name "python-wrapt")
7235 (version "1.11.2")
7236 (source
7237 (origin
7238 (method url-fetch)
7239 (uri (pypi-uri "wrapt" version))
7240 (sha256
7241 (base32
7242 "1q81762dgsgrd12f8qc39zk8s5wll3m5xc32jdmlf6cls4gh4njn"))))
7243 (build-system python-build-system)
7244 (arguments
7245 ;; Tests are not included in the tarball, they are only available in the
7246 ;; git repository.
7247 `(#:tests? #f))
7248 (home-page "https://github.com/GrahamDumpleton/wrapt")
7249 (synopsis "Module for decorators, wrappers and monkey patching")
7250 (description
7251 "The aim of the wrapt module is to provide a transparent object proxy for
7252 Python, which can be used as the basis for the construction of function
7253 wrappers and decorator functions.")
7254 (license license:bsd-2)))
7255
7256 (define-public python2-wrapt
7257 (package-with-python2 python-wrapt))
7258
7259 (define-public python-xlrd
7260 (package
7261 (name "python-xlrd")
7262 (version "1.2.0")
7263 (source (origin
7264 (method url-fetch)
7265 (uri (pypi-uri "xlrd" version))
7266 (sha256
7267 (base32
7268 "1ci93fda4n67qhdvfl16zasyxrpygzk53hs6m8z0rd4dxrnb6vjl"))))
7269 (build-system python-build-system)
7270 (arguments
7271 `(#:phases
7272 (modify-phases %standard-phases
7273 ;; Some tests depend on writing a temporary file to the user's home
7274 ;; directory.
7275 (add-after 'unpack 'fix-tests
7276 (lambda _
7277 (delete-file "tests/test_open_workbook.py")
7278 #t)))))
7279 (home-page "http://www.python-excel.org/")
7280 (synopsis "Library for extracting data from Excel files")
7281 (description "This package provides a library to extract data from
7282 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
7283 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
7284 Unicode-aware. It is not intended as an end-user tool.")
7285 (license license:bsd-3)))
7286
7287 (define-public python2-xlrd
7288 (package-with-python2 python-xlrd))
7289
7290 (define-public python-prettytable
7291 (package
7292 (name "python-prettytable")
7293 (version "0.7.2")
7294 (source
7295 (origin
7296 (method url-fetch)
7297 (uri (pypi-uri "prettytable" version ".tar.bz2"))
7298 (sha256
7299 (base32
7300 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
7301 (build-system python-build-system)
7302 (home-page "https://code.google.com/archive/p/prettytable/")
7303 (synopsis "Display tabular data in an ASCII table format")
7304 (description
7305 "A library designed to represent tabular data in visually appealing ASCII
7306 tables. PrettyTable allows for selection of which columns are to be printed,
7307 independent alignment of columns (left or right justified or centred) and
7308 printing of sub-tables by specifying a row range.")
7309 (license license:bsd-3)))
7310
7311 (define-public python2-prettytable
7312 (package-with-python2 python-prettytable))
7313
7314 (define-public python-tables
7315 (package
7316 (name "python-tables")
7317 (version "3.4.4")
7318 (source
7319 (origin
7320 (method url-fetch)
7321 (uri (pypi-uri "tables" version))
7322 (sha256
7323 (base32
7324 "0affz7k8babh8wdmsgrz5jxrd569by2w8ffimcxs9wiaf5rw1idx"))
7325 (modules '((guix build utils)))
7326 (snippet
7327 '(begin
7328 ;; Remove pre-compiled .pyc files from source.
7329 (for-each delete-file-recursively
7330 (find-files "." "__pycache__" #:directories? #t))
7331 (for-each delete-file (find-files "." "\\.pyc$"))
7332 #t))))
7333 (build-system python-build-system)
7334 (arguments
7335 `(;; FIXME: python-build-system does not pass configure-flags to "build"
7336 ;; or "check", so we must override the build and check phases.
7337 #:phases
7338 (modify-phases %standard-phases
7339 (add-after 'unpack 'use-gcc
7340 (lambda _
7341 (substitute* "setup.py"
7342 (("compiler = new_compiler\\(\\)" line)
7343 (string-append line
7344 "\ncompiler.set_executables(compiler='gcc',"
7345 "compiler_so='gcc',"
7346 "linker_exe='gcc',"
7347 "linker_so='gcc -shared')")))
7348 #t))
7349 (add-after 'unpack 'disable-tuning
7350 (lambda _
7351 (substitute* "setup.py"
7352 (("cpu_flags = .*")
7353 "cpu_flags = ['sse2']\n"))
7354 #t))
7355 (replace 'build
7356 (lambda* (#:key inputs #:allow-other-keys)
7357 (invoke "python" "setup.py" "build"
7358 (string-append "--hdf5="
7359 (assoc-ref inputs "hdf5")))))
7360 (replace 'check
7361 (lambda* (#:key inputs #:allow-other-keys)
7362 (invoke "python" "setup.py" "check"
7363 (string-append "--hdf5="
7364 (assoc-ref inputs "hdf5"))))))))
7365 (propagated-inputs
7366 `(("python-numexpr" ,python-numexpr)
7367 ("python-numpy" ,python-numpy)))
7368 (native-inputs
7369 `(("python-cython" ,python-cython)
7370 ("pkg-config" ,pkg-config)))
7371 (inputs
7372 `(("hdf5" ,hdf5-1.10)
7373 ("bzip2" ,bzip2)
7374 ("zlib" ,zlib)))
7375 (home-page "http://www.pytables.org/")
7376 (synopsis "Hierarchical datasets for Python")
7377 (description "PyTables is a package for managing hierarchical datasets and
7378 designed to efficiently cope with extremely large amounts of data.")
7379 (license license:bsd-3)))
7380
7381 (define-public python2-tables
7382 (package-with-python2 python-tables))
7383
7384 (define-public python-pytest-black
7385 (package
7386 (name "python-pytest-black")
7387 (version "0.3.8")
7388 (source
7389 (origin
7390 (method url-fetch)
7391 (uri (pypi-uri "pytest-black" version))
7392 (sha256
7393 (base32
7394 "04lppqydxm0f3f3x0l8hj7v0j6d8syj34jc37yzqwqcyqsnaga81"))))
7395 (build-system python-build-system)
7396 (propagated-inputs
7397 `(("python-pytest" ,python-pytest)
7398 ("python-black" ,python-black)
7399 ("python-toml" ,python-toml)))
7400 (native-inputs
7401 `(("python-setuptools-scm" ,python-setuptools-scm)))
7402 (home-page "https://github.com/shopkeep/pytest-black")
7403 (synopsis "Pytest plugin to enable format checking with black")
7404 (description
7405 "This package provides a pytest plugin to enable format checking with the
7406 Python code formatter \"black\".")
7407 (license license:expat)))
7408
7409 (define-public python-get-version
7410 (package
7411 (name "python-get-version")
7412 (version "2.1")
7413 (source
7414 (origin
7415 (method url-fetch)
7416 (uri (pypi-uri "get_version" version))
7417 (sha256
7418 (base32
7419 "1g15jyx33vkxavv9hwv275cs4g9bp2i1y942raw3fxamq8kbaml1"))))
7420 (build-system python-build-system)
7421 (propagated-inputs
7422 `(("python-pygments" ,python-pygments)
7423 ("python-pytest" ,python-pytest)
7424 ("python-pytest-black" ,python-pytest-black)
7425 ("python-pytest-cov" ,python-pytest-cov)
7426 ("python-setuptools" ,python-setuptools)
7427 ("python-testpath" ,python-testpath)))
7428 (home-page "https://github.com/flying-sheep/get_version")
7429 (synopsis "Version helper in the spirit of versioneer")
7430 (description
7431 "This package provides a version helper that lets you automatically use
7432 the latest @code{vX.X.X} Git tag as the version in your Python package. It
7433 also supports getting the version from Python source distributions or, once
7434 your package is installed, via @code{pkg_resources} (part of
7435 @code{setuptools}).")
7436 (license license:gpl3+)))
7437
7438 (define-public python-legacy-api-wrap
7439 (package
7440 (name "python-legacy-api-wrap")
7441 (version "1.2")
7442 (source
7443 (origin
7444 (method url-fetch)
7445 (uri (pypi-uri "legacy-api-wrap" version))
7446 (sha256
7447 (base32
7448 "06qhp0g543dy98vpa41hwdalvdbsjfc3ldk474yr9sd75mhl8jh3"))))
7449 (build-system python-build-system)
7450 (propagated-inputs
7451 `(("python-get-version" ,python-get-version)
7452 ("python-pytest" ,python-pytest)
7453 ("python-pytest-black" ,python-pytest-black)
7454 ("python-pytest-cov" ,python-pytest-cov)
7455 ("python-setuptools" ,python-setuptools)))
7456 (home-page "https://github.com/flying-sheep/legacy-api-wrap")
7457 (synopsis "Legacy API wrapper")
7458 (description "This module defines a decorator to wrap legacy APIs. The
7459 primary use case is APIs defined before keyword-only parameters existed.")
7460 (license license:gpl3+)))
7461
7462 (define-public python-pyasn1
7463 (package
7464 (name "python-pyasn1")
7465 (version "0.4.3")
7466 (source
7467 (origin
7468 (method url-fetch)
7469 (uri (pypi-uri "pyasn1" version))
7470 (sha256
7471 (base32
7472 "1z5h38anjzzrxpraa9iq9llffyx2zs8gx0q6dc1g029miwnn50gv"))))
7473 (build-system python-build-system)
7474 (home-page "http://pyasn1.sourceforge.net/")
7475 (synopsis "ASN.1 types and codecs")
7476 (description
7477 "This is an implementation of ASN.1 types and codecs in Python. It is
7478 suitable for a wide range of protocols based on the ASN.1 specification.")
7479 (license license:bsd-2)))
7480
7481 (define-public python2-pyasn1
7482 (package-with-python2 python-pyasn1))
7483
7484 (define-public python-pyasn1-modules
7485 (package
7486 (name "python-pyasn1-modules")
7487 (version "0.2.2")
7488 (source
7489 (origin
7490 (method url-fetch)
7491 (uri (pypi-uri "pyasn1-modules" version))
7492 (sha256
7493 (base32
7494 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
7495 (build-system python-build-system)
7496 (propagated-inputs
7497 `(("python-pyasn1" ,python-pyasn1)))
7498 (home-page "https://sourceforge.net/projects/pyasn1/")
7499 (synopsis "ASN.1 codec implementations")
7500 (description
7501 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
7502 implementations of ASN.1-based codecs and protocols.")
7503 (license license:bsd-3)))
7504
7505 (define-public python2-pyasn1-modules
7506 (package-with-python2 python-pyasn1-modules))
7507
7508 (define-public python-ipaddress
7509 (package
7510 (name "python-ipaddress")
7511 (version "1.0.22")
7512 (source (origin
7513 (method url-fetch)
7514 (uri (pypi-uri "ipaddress" version))
7515 (sha256
7516 (base32
7517 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
7518 (build-system python-build-system)
7519 (home-page "https://github.com/phihag/ipaddress")
7520 (synopsis "IP address manipulation library")
7521 (description
7522 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
7523 in Python. This library is used to create, poke at, and manipulate IPv4 and
7524 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
7525 module to older versions of Python.")
7526 (license license:psfl)))
7527
7528 (define-public python2-ipaddress
7529 (package-with-python2 python-ipaddress))
7530
7531 (define-public python2-ipaddr
7532 (package
7533 (name "python2-ipaddr")
7534 (version "2.1.11")
7535 (source
7536 (origin
7537 (method url-fetch)
7538 (uri (pypi-uri "ipaddr" version))
7539 (sha256
7540 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
7541 (build-system python-build-system)
7542 (arguments
7543 `(#:python ,python-2 ;version 2 only
7544 #:phases
7545 (modify-phases %standard-phases
7546 (replace 'check
7547 (lambda _ (invoke "python" "ipaddr_test.py"))))))
7548 (home-page "https://github.com/google/ipaddr-py")
7549 (synopsis "IP address manipulation library")
7550 (description
7551 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
7552 IPv6 addresses and networks.
7553
7554 For new implementations you may prefer to use the standard module
7555 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
7556 versions of Python.")
7557 (license license:asl2.0)))
7558
7559 (define-public python-idna
7560 (package
7561 (name "python-idna")
7562 (version "2.8")
7563 (source
7564 (origin
7565 (method url-fetch)
7566 (uri (pypi-uri "idna" version))
7567 (sha256
7568 (base32
7569 "01rlkigdxg17sf9yar1jl8n18ls59367wqh59hnawlyg53vb6my3"))))
7570 (build-system python-build-system)
7571 (home-page "https://github.com/kjd/idna")
7572 (synopsis "Internationalized domain names in applications")
7573 (description
7574 "This is a library to support the Internationalised Domain Names in
7575 Applications (IDNA) protocol as specified in RFC 5891. This version of the
7576 protocol is often referred to as “IDNA2008” and can produce different results
7577 from the earlier standard from 2003. The library is also intended to act as a
7578 suitable drop-in replacement for the “encodings.idna” module that comes with
7579 the Python standard library but currently only supports the older 2003
7580 specification.")
7581 (license license:bsd-4)))
7582
7583 (define-public python-idna-2.7
7584 (package (inherit python-idna)
7585 (version "2.7")
7586 (source (origin
7587 (method url-fetch)
7588 (uri (pypi-uri "idna" version))
7589 (sha256
7590 (base32
7591 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))))
7592
7593
7594 (define-public python2-idna
7595 (package-with-python2 python-idna))
7596
7597 (define-public python-idna-ssl
7598 (package
7599 (name "python-idna-ssl")
7600 (version "1.0.1")
7601 (source
7602 (origin
7603 (method url-fetch)
7604 (uri (pypi-uri "idna-ssl" version))
7605 (sha256
7606 (base32
7607 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
7608 (build-system python-build-system)
7609 (arguments
7610 `(#:tests? #f)) ;circular dependency with python-aiohttp
7611 (home-page "https://github.com/aio-libs/idna-ssl")
7612 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
7613 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
7614 domains support.")
7615 (license license:expat)))
7616
7617 (define-public python-pretend
7618 (package
7619 (name "python-pretend")
7620 (version "1.0.9")
7621 (source
7622 (origin
7623 (method url-fetch)
7624 (uri (pypi-uri "pretend" version))
7625 (sha256
7626 (base32
7627 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
7628 (build-system python-build-system)
7629 (home-page "https://github.com/alex/pretend")
7630 (synopsis "Library for stubbing in Python")
7631 (description
7632 "Pretend is a library to make stubbing with Python easier. Stubbing is a
7633 technique for writing tests. You may hear the term mixed up with mocks,
7634 fakes, or doubles. Basically, a stub is an object that returns pre-canned
7635 responses, rather than doing any computation.")
7636 (license license:bsd-3)))
7637
7638 (define-public python2-pretend
7639 (package-with-python2 python-pretend))
7640
7641 (define-public python-pip
7642 (package
7643 (name "python-pip")
7644 (version "20.0.2")
7645 (source
7646 (origin
7647 (method url-fetch)
7648 (uri (pypi-uri "pip" version))
7649 (sha256
7650 (base32
7651 "0zwnlsjn6mb742cr995zfbk9v56ygxp8w3k49601r9by9kmcic3x"))))
7652 (build-system python-build-system)
7653 (arguments
7654 '(#:tests? #f)) ; there are no tests in the pypi archive.
7655 (home-page "https://pip.pypa.io/")
7656 (synopsis "Package manager for Python software")
7657 (description
7658 "Pip is a package manager for Python software, that finds packages on the
7659 Python Package Index (PyPI).")
7660 (license license:expat)))
7661
7662 (define-public python2-pip
7663 (package-with-python2 python-pip))
7664
7665 (define-public python-tlsh
7666 (package
7667 (name "python-tlsh")
7668 (version "3.4.5")
7669 (home-page "https://github.com/trendmicro/tlsh")
7670 (source
7671 (origin
7672 (method git-fetch)
7673 (uri (git-reference
7674 (url "https://github.com/trendmicro/tlsh.git")
7675 (commit (string-append "v" version))))
7676 (file-name (git-file-name name version))
7677 (sha256
7678 (base32 "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll"))))
7679 (build-system cmake-build-system)
7680 (arguments
7681 '(#:out-of-source? #f
7682 #:phases (modify-phases %standard-phases
7683 (replace
7684 'install
7685 (lambda* (#:key outputs #:allow-other-keys)
7686 ;; Build and install the Python bindings. The underlying
7687 ;; C++ library is apparently not meant to be installed.
7688 (let ((out (assoc-ref outputs "out")))
7689 (with-directory-excursion "py_ext"
7690 (and (system* "python" "setup.py" "build")
7691 (system* "python" "setup.py" "install"
7692 (string-append "--prefix=" out))))))))))
7693 (inputs `(("python" ,python-wrapper))) ;for the bindings
7694 (synopsis "Fuzzy matching library for Python")
7695 (description
7696 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
7697 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
7698 value which can be used for similarity comparisons. Similar objects have
7699 similar hash values, which allows for the detection of similar objects by
7700 comparing their hash values. The byte stream should have a sufficient amount
7701 of complexity; for example, a byte stream of identical bytes will not generate
7702 a hash value.")
7703 (license license:asl2.0)))
7704
7705 (define-public python2-tlsh
7706 (package
7707 (inherit python-tlsh)
7708 (name "python2-tlsh")
7709 (inputs `(("python" ,python-2)))))
7710
7711 (define-public python-termcolor
7712 (package
7713 (name "python-termcolor")
7714 (version "1.1.0")
7715 (source
7716 (origin
7717 (method url-fetch)
7718 (uri (pypi-uri "termcolor" version))
7719 (sha256
7720 (base32
7721 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
7722 (build-system python-build-system)
7723 (arguments
7724 ;; There are no tests.
7725 `(#:tests? #f))
7726 (home-page "https://pypi.org/project/termcolor/")
7727 (synopsis "ANSII Color formatting for terminal output")
7728 (description
7729 "This package provides ANSII Color formatting for output in terminals.")
7730 (license license:expat)))
7731
7732 (define-public python2-termcolor
7733 (package-with-python2 python-termcolor))
7734
7735 (define-public python-libarchive-c
7736 (package
7737 (name "python-libarchive-c")
7738 (version "2.9")
7739 (source (origin
7740 (method url-fetch)
7741 (uri (pypi-uri "libarchive-c" version))
7742 (sha256
7743 (base32
7744 "0q7g6a97110bk0j5x81555kajyxh4sybaabab6v5sgr0xi6386cr"))))
7745 (build-system python-build-system)
7746 (arguments
7747 '(#:phases (modify-phases %standard-phases
7748 (add-before
7749 'build 'reference-libarchive
7750 (lambda* (#:key inputs #:allow-other-keys)
7751 ;; Retain the absolute file name of libarchive.so.
7752 (let ((libarchive (assoc-ref inputs "libarchive")))
7753 (substitute* "libarchive/ffi.py"
7754 (("find_library\\('archive'\\)")
7755 (string-append "'" libarchive
7756 "/lib/libarchive.so'"))))))
7757 (replace 'check
7758 (lambda _ (invoke "pytest" "-vv"))))))
7759 (native-inputs
7760 `(("python-mock" ,python-mock)
7761 ("python-pytest" ,python-pytest)))
7762 (inputs
7763 `(("libarchive" ,libarchive)))
7764 (home-page "https://github.com/Changaco/python-libarchive-c")
7765 (synopsis "Python interface to libarchive")
7766 (description
7767 "This package provides Python bindings to libarchive, a C library to
7768 access possibly compressed archives in many different formats. It uses
7769 Python's @code{ctypes} foreign function interface (FFI).")
7770 (license license:lgpl2.0+)))
7771
7772 (define-public python2-libarchive-c
7773 (package-with-python2 python-libarchive-c))
7774
7775 (define-public python-file
7776 (package
7777 (inherit file)
7778 (name "python-file")
7779 (build-system python-build-system)
7780 (arguments
7781 '(#:tests? #f ;no tests
7782 #:configure-flags '("--single-version-externally-managed" "--root=/")
7783 #:phases (modify-phases %standard-phases
7784 (add-before 'build 'change-directory
7785 (lambda _
7786 (chdir "python")
7787 #t))
7788 (add-before 'build 'set-library-file-name
7789 (lambda* (#:key inputs #:allow-other-keys)
7790 (let ((file (assoc-ref inputs "file")))
7791 (substitute* "magic.py"
7792 (("find_library\\('magic'\\)")
7793 (string-append "'" file "/lib/libmagic.so'")))
7794 #t))))))
7795 (inputs `(("file" ,file)))
7796 (native-inputs (if (%current-target-system)
7797 `(("self" ,this-package))
7798 '()))
7799 (synopsis "Python bindings to the libmagic file type guesser. Note that
7800 this module and the python-magic module both provide a \"magic.py\" file;
7801 these two modules, which are different and were developed separately, both
7802 serve the same purpose: provide Python bindings for libmagic.")))
7803
7804 (define-public python2-file
7805 (package-with-python2 python-file))
7806
7807 (define-public python-debian
7808 (package
7809 (name "python-debian")
7810 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
7811 (version "0.1.36")
7812 (source
7813 (origin
7814 ;; Use git-fetch, as pypi doesn't include test suite.
7815 (method git-fetch)
7816 (uri (git-reference
7817 (url home-page)
7818 (commit version)))
7819 (file-name (git-file-name name version))
7820 (sha256
7821 (base32
7822 "0qy6x28bj6yfikhjww932v5xq4mf5bm1iczl7acy4c7zm6mwhqfa"))))
7823 (build-system python-build-system)
7824 (arguments
7825 `(#:phases (modify-phases %standard-phases
7826 (add-after 'unpack 'remove-debian-specific-tests
7827 ;; python-apt, apt and dpkg are not yet available in guix,
7828 ;; and these tests heavily depend on them.
7829 (lambda _
7830 (delete-file "lib/debian/tests/test_deb822.py")
7831 (delete-file "lib/debian/tests/test_debfile.py")
7832 #t)))))
7833 (propagated-inputs
7834 `(("python-six" ,python-six)
7835 ("python-chardet" ,python-chardet)))
7836 (synopsis "Debian package related modules")
7837 (description
7838 ;; XXX: Use @enumerate instead of @itemize to work around
7839 ;; <http://bugs.gnu.org/21772>.
7840 "This package provides Python modules that abstract many formats of
7841 Debian-related files, such as:
7842
7843 @enumerate
7844 @item Debtags information;
7845 @item @file{debian/changelog} files;
7846 @item packages files, pdiffs;
7847 @item control files of single or multiple RFC822-style paragraphs---e.g.
7848 @file{debian/control}, @file{.changes}, @file{.dsc};
7849 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
7850 contained files and meta-information.
7851 @end enumerate\n")
7852
7853 ;; Modules are either GPLv2+ or GPLv3+.
7854 (license license:gpl3+)))
7855
7856 (define-public python-nbformat
7857 (package
7858 (name "python-nbformat")
7859 (version "4.4.0")
7860 (source
7861 (origin
7862 (method url-fetch)
7863 (uri (pypi-uri "nbformat" version))
7864 (sha256
7865 (base32
7866 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
7867 (build-system python-build-system)
7868 (arguments `(#:tests? #f)) ; no test target
7869 (propagated-inputs
7870 `(("python-ipython-genutils" ,python-ipython-genutils)
7871 ("python-jsonschema" ,python-jsonschema)
7872 ("python-jupyter-core" ,python-jupyter-core)
7873 ("python-traitlets" ,python-traitlets)))
7874 (home-page "http://jupyter.org")
7875 (synopsis "Jupyter Notebook format")
7876 (description "This package provides the reference implementation of the
7877 Jupyter Notebook format and Python APIs for working with notebooks.")
7878 (license license:bsd-3)))
7879
7880 (define-public python2-nbformat
7881 (package-with-python2 python-nbformat))
7882
7883 (define-public python-bleach
7884 (package
7885 (name "python-bleach")
7886 (version "3.1.1")
7887 (source
7888 (origin
7889 (method url-fetch)
7890 (uri (pypi-uri "bleach" version))
7891 (sha256
7892 (base32
7893 "0j4xlnw99m1xy0s7wxz9fk5f3c1n8r296fh75jn5p5j61w6qg2xa"))))
7894 (build-system python-build-system)
7895 (propagated-inputs
7896 `(("python-webencodings" ,python-webencodings)
7897 ("python-six" ,python-six)))
7898 (native-inputs
7899 `(("python-pytest" ,python-pytest)
7900 ("python-pytest-runner" ,python-pytest-runner-2)))
7901 (home-page "https://github.com/jsocol/bleach")
7902 (synopsis "Whitelist-based HTML-sanitizing tool")
7903 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
7904 (license license:asl2.0)))
7905
7906 (define-public python2-bleach
7907 (package-with-python2 python-bleach))
7908
7909 (define-public python-entrypoints
7910 (package
7911 (name "python-entrypoints")
7912 (version "0.3")
7913 (source
7914 (origin
7915 (method url-fetch)
7916 (uri (pypi-uri "entrypoints" version))
7917 (sha256
7918 (base32
7919 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
7920 (build-system python-build-system)
7921 ;; The package does not come with a setup.py file, so we have to generate
7922 ;; one ourselves.
7923 (arguments
7924 `(#:tests? #f
7925 #:phases
7926 (modify-phases %standard-phases
7927 (add-after 'unpack 'create-setup.py
7928 (lambda _
7929 (call-with-output-file "setup.py"
7930 (lambda (port)
7931 (format port "\
7932 from setuptools import setup
7933 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
7934 " ,version))))))))
7935 (home-page "https://github.com/takluyver/entrypoints")
7936 (synopsis "Discover and load entry points from installed Python packages")
7937 (description "Entry points are a way for Python packages to advertise
7938 objects with some common interface. The most common examples are
7939 @code{console_scripts} entry points, which define shell commands by
7940 identifying a Python function to run. The @code{entrypoints} module contains
7941 functions to find and load entry points.")
7942 (license license:expat)))
7943
7944 (define-public python2-entrypoints
7945 (package-with-python2 python-entrypoints))
7946
7947 (define-public python-nbconvert
7948 (package
7949 (name "python-nbconvert")
7950 (version "5.0.0b1")
7951 (source
7952 (origin
7953 (method url-fetch)
7954 (uri (pypi-uri "nbconvert" version))
7955 (sha256
7956 (base32
7957 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
7958 (build-system python-build-system)
7959 (arguments
7960 `(;; The "bdist_egg" target is disabled by default, causing the installation
7961 ;; to fail.
7962 #:configure-flags (list "bdist_egg")
7963 ;; FIXME: 5 failures, 40 errors.
7964 #:tests? #f))
7965 ;; #:phases
7966 ;; (modify-phases %standard-phases
7967 ;; (replace 'check
7968 ;; (lambda _
7969 ;; (zero? (system* "py.test" "-v")))))
7970 (native-inputs
7971 `(("python-pytest" ,python-pytest)))
7972 (propagated-inputs
7973 `(("python-bleach" ,python-bleach)
7974 ("python-entrypoints" ,python-entrypoints)
7975 ("python-jinja2" ,python-jinja2)
7976 ("python-jupyter-core" ,python-jupyter-core)
7977 ("python-mistune" ,python-mistune)
7978 ("python-nbformat" ,python-nbformat)
7979 ("python-pygments" ,python-pygments)
7980 ("python-traitlets" ,python-traitlets)))
7981 (home-page "http://jupyter.org")
7982 (synopsis "Converting Jupyter Notebooks")
7983 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
7984 notebooks to various other formats via Jinja templates. It allows you to
7985 convert an @code{.ipynb} notebook file into various static formats including:
7986
7987 @enumerate
7988 @item HTML
7989 @item LaTeX
7990 @item PDF
7991 @item Reveal JS
7992 @item Markdown (md)
7993 @item ReStructured Text (rst)
7994 @item executable script
7995 @end enumerate\n")
7996 (license license:bsd-3)))
7997
7998 (define-public python2-nbconvert
7999 (package-with-python2 python-nbconvert))
8000
8001 (define-public python-notebook
8002 (package
8003 (name "python-notebook")
8004 (version "5.7.4")
8005 (source (origin
8006 (method url-fetch)
8007 (uri (pypi-uri "notebook" version))
8008 (sha256
8009 (base32
8010 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
8011 (build-system python-build-system)
8012 (arguments
8013 `(#:phases
8014 (modify-phases %standard-phases
8015 (replace 'check
8016 (lambda _
8017 ;; These tests require a browser
8018 (delete-file-recursively "notebook/tests/selenium")
8019 ;; Some tests need HOME
8020 (setenv "HOME" "/tmp")
8021 ;; This file contains "warningfilters", which are not supported
8022 ;; by this version of nose.
8023 (delete-file "setup.cfg")
8024 (with-directory-excursion "/tmp"
8025 (invoke "nosetests" "-v"))
8026 #t)))))
8027 (propagated-inputs
8028 `(("python-jupyter-core" ,python-jupyter-core)
8029 ("python-nbformat" ,python-nbformat)
8030 ("python-nbconvert" ,python-nbconvert)
8031 ("python-prometheus-client" ,python-prometheus-client)
8032 ("python-send2trash" ,python-send2trash)
8033 ("python-terminado" ,python-terminado)))
8034 (native-inputs
8035 `(("python-nose" ,python-nose)
8036 ("python-sphinx" ,python-sphinx)
8037 ("python-requests" ,python-requests)))
8038 (home-page "http://jupyter.org/")
8039 (synopsis "Web-based notebook environment for interactive computing")
8040 (description
8041 "The Jupyter HTML notebook is a web-based notebook environment for
8042 interactive computing.")
8043 (properties `((python2-variant . ,(delay python2-notebook))))
8044 (license license:bsd-3)))
8045
8046 (define-public python2-notebook
8047 (let ((base (package-with-python2
8048 (strip-python2-variant python-notebook))))
8049 (package (inherit base)
8050 (native-inputs
8051 `(("python2-mock" ,python2-mock)
8052 ,@(package-native-inputs base)))
8053 (arguments
8054 (substitute-keyword-arguments (package-arguments base)
8055 ((#:phases phases)
8056 `(modify-phases ,phases
8057 (add-before 'check 'disable-test-case
8058 ;; The test requires network access to localhost. Curiously it
8059 ;; fails with Python 2 only. Simply make the test-case return
8060 ;; immediately.
8061 (lambda _
8062 (substitute*
8063 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
8064 (("formats = self.nbconvert_api") "return #")))))))))))
8065
8066 (define-public python-widgetsnbextension
8067 (package
8068 (name "python-widgetsnbextension")
8069 (version "3.4.2")
8070 (source
8071 (origin
8072 (method url-fetch)
8073 (uri (pypi-uri "widgetsnbextension" version))
8074 (sha256
8075 (base32
8076 "0rc2nivdy7k4m3vljx7wdh2jh11djapcgwhvzlbs0isl8gl8nqgs"))))
8077 (build-system python-build-system)
8078 (propagated-inputs
8079 `(("python-ipykernel" ,python-ipykernel)
8080 ("python-notebook" ,python-notebook)))
8081 (native-inputs
8082 `(("python-certifi" ,python-certifi)
8083 ("python-nose" ,python-nose)))
8084 (home-page "https://ipython.org")
8085 (synopsis "IPython HTML widgets for Jupyter")
8086 (description "This package provides interactive HTML widgets for Jupyter
8087 notebooks.")
8088 (license license:bsd-3)))
8089
8090 (define-public python2-widgetsnbextension
8091 (package-with-python2 python-widgetsnbextension))
8092
8093 (define-public python-ipywidgets
8094 (package
8095 (name "python-ipywidgets")
8096 (version "5.2.2")
8097 (source
8098 (origin
8099 (method url-fetch)
8100 (uri (pypi-uri "ipywidgets" version))
8101 (sha256
8102 (base32
8103 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
8104 (build-system python-build-system)
8105 (propagated-inputs
8106 `(("python-ipython" ,python-ipython)
8107 ("python-traitlets" ,python-traitlets)
8108 ("python-widgetsnbextension" ,python-widgetsnbextension)))
8109 (native-inputs
8110 `(("python-nose" ,python-nose)
8111 ("python-pytest" ,python-pytest)))
8112 (home-page "https://ipython.org")
8113 (synopsis "IPython HTML widgets for Jupyter")
8114 (description "Ipywidgets are interactive HTML widgets for Jupyter
8115 notebooks and the IPython kernel. Notebooks come alive when interactive
8116 widgets are used. Users gain control of their data and can visualize changes
8117 in the data.")
8118 (license license:bsd-3)))
8119
8120 (define-public python2-ipywidgets
8121 (package-with-python2 python-ipywidgets))
8122
8123 (define-public python-jupyter-console
8124 (package
8125 (name "python-jupyter-console")
8126 (version "6.0.0")
8127 (source
8128 (origin
8129 (method url-fetch)
8130 (uri (pypi-uri "jupyter_console" version))
8131 (sha256
8132 (base32
8133 "1xdjw11cppf1fxvwkw2bk13ckkwas3bdah8baingn9296mvfi31h"))))
8134 (build-system python-build-system)
8135 (propagated-inputs
8136 `(("python-ipykernel" ,python-ipykernel)
8137 ("python-jupyter-client" ,python-jupyter-client)
8138 ("python-prompt-toolkit" ,python-prompt-toolkit)
8139 ("python-pygments" ,python-pygments)))
8140 (native-inputs
8141 `(("python-nose" ,python-nose)))
8142 (home-page "https://jupyter.org")
8143 (synopsis "Jupyter terminal console")
8144 (description "This package provides a terminal-based console frontend for
8145 Jupyter kernels. It also allows for console-based interaction with non-Python
8146 Jupyter kernels such as IJulia and IRKernel.")
8147 (license license:bsd-3)))
8148
8149 (define-public python2-jupyter-console
8150 (package
8151 (name "python2-jupyter-console")
8152 (version "5.2.0")
8153 (source
8154 (origin
8155 (method url-fetch)
8156 (uri (pypi-uri "jupyter_console" version))
8157 (sha256
8158 (base32
8159 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
8160 (build-system python-build-system)
8161 ;; Tests only run in an TTY.
8162 (arguments `(#:tests? #f))
8163 (propagated-inputs
8164 `(("python2-ipykernel" ,python2-ipykernel)
8165 ("python2-jupyter-client" ,python2-jupyter-client)
8166 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
8167 ("python2-pygments" ,python2-pygments)))
8168 (native-inputs
8169 `(("python2-nose" ,python2-nose)))
8170 (home-page "https://jupyter.org")
8171 (synopsis "Jupyter terminal console")
8172 (description "This package provides a terminal-based console frontend for
8173 Jupyter kernels. It also allows for console-based interaction with non-Python
8174 Jupyter kernels such as IJulia and IRKernel.")
8175 (license license:bsd-3)))
8176
8177 ;; The python-ipython and python-jupyter-console require each other. To get
8178 ;; the functionality in both packages working, strip down the
8179 ;; python-jupyter-console package when using it as an input to python-ipython.
8180 (define python-jupyter-console-minimal
8181 (package
8182 (inherit python-jupyter-console)
8183 (name "python-jupyter-console-minimal")
8184 (arguments
8185 (substitute-keyword-arguments
8186 (package-arguments python-jupyter-console)
8187 ((#:phases phases)
8188 `(modify-phases ,phases
8189 (add-after 'install 'delete-bin
8190 (lambda* (#:key outputs #:allow-other-keys)
8191 ;; Delete the bin files, to avoid conflicts in profiles
8192 ;; where python-ipython and python-jupyter-console are
8193 ;; both present.
8194 (delete-file-recursively
8195 (string-append
8196 (assoc-ref outputs "out") "/bin"))))))))
8197 ;; Remove the python-ipython propagated input, to avoid the cycle
8198 (propagated-inputs
8199 (alist-delete
8200 "python-ipython"
8201 (package-propagated-inputs python-jupyter-console)))))
8202
8203 (define-public python-qtconsole
8204 (package
8205 (name "python-qtconsole")
8206 (version "4.4.3")
8207 (source
8208 (origin
8209 (method url-fetch)
8210 (uri (pypi-uri "qtconsole" version))
8211 (sha256
8212 (base32
8213 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
8214 (build-system python-build-system)
8215 (arguments
8216 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
8217 ;; but we only have the LTS version 5.x. This means that there might be
8218 ;; runtime errors, but since this is a dependency of the Jupyter package,
8219 ;; and Jupyter can be used without the qtconsole we can overlook this for
8220 ;; now.
8221 `(#:tests? #f
8222 #:phases
8223 (modify-phases %standard-phases
8224 (add-before 'check 'pre-check
8225 (lambda _
8226 (setenv "QT_QPA_PLATFORM" "offscreen")
8227 #t)))))
8228 (propagated-inputs
8229 `(("python-ipykernel" ,python-ipykernel)
8230 ("python-ipython" ,python-ipython)))
8231 (native-inputs
8232 `(("python-pytest" ,python-pytest)))
8233 (home-page "http://jupyter.org")
8234 (synopsis "Jupyter Qt console")
8235 (description "This package provides a Qt-based console for Jupyter with
8236 support for rich media output.")
8237 (license license:bsd-3)))
8238
8239 (define-public python-jsbeautifier
8240 (package
8241 (name "python-jsbeautifier")
8242 (version "1.10.2")
8243 (home-page "https://github.com/beautify-web/js-beautify")
8244 (source (origin
8245 (method git-fetch)
8246 (uri (git-reference
8247 (url home-page)
8248 (commit (string-append "v" version))))
8249 (file-name (git-file-name name version))
8250 (sha256
8251 (base32
8252 "0wawb070ki1axb3jc9xvsrgpji52vcfif3zmjzc3z4g98m5xw4kg"))))
8253 (build-system python-build-system)
8254 (arguments
8255 `(#:phases (modify-phases %standard-phases
8256 (add-after 'unpack 'chdir
8257 (lambda _
8258 ;; The upstream Git repository contains all the code,
8259 ;; but this package only builds the python code.
8260 (chdir "python")
8261 #t))
8262 (add-after 'unpack 'patch-python-six-requirements
8263 (lambda _
8264 (substitute* "python/setup.py"
8265 (("six>=1.12.0")
8266 "six>=1.11.0"))
8267 #t)))))
8268 (propagated-inputs
8269 `(("python-editorconfig" ,python-editorconfig)
8270 ("python-six" ,python-six)))
8271 (native-inputs
8272 `(("python-pytest" ,python-pytest)))
8273 (synopsis "JavaScript unobfuscator and beautifier")
8274 (description "Beautify, unpack or deobfuscate JavaScript, leveraging
8275 popular online obfuscators.")
8276 (license license:expat)))
8277
8278 (define-public jupyter
8279 (package
8280 (name "jupyter")
8281 (version "1.0.0")
8282 (source
8283 (origin
8284 (method url-fetch)
8285 (uri (pypi-uri "jupyter" version))
8286 (sha256
8287 (base32
8288 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
8289 (build-system python-build-system)
8290 (arguments '(#:tests? #f)) ; there are none.
8291 (propagated-inputs
8292 `(("python-ipykernel" ,python-ipykernel)
8293 ("python-ipywidgets" ,python-ipywidgets)
8294 ("python-jupyter-console" ,python-jupyter-console)
8295 ("python-nbconvert" ,python-nbconvert)
8296 ("python-notebook" ,python-notebook)
8297 ("python-qtconsole" ,python-qtconsole)))
8298 (native-search-paths
8299 (list (search-path-specification
8300 (variable "JUPYTER_PATH")
8301 (files '("share/jupyter")))))
8302 (home-page "https://jupyter.org")
8303 (synopsis "Web application for interactive documents")
8304 (description
8305 "The Jupyter Notebook is a web application that allows you to create and
8306 share documents that contain live code, equations, visualizations and
8307 explanatory text. Uses include: data cleaning and transformation, numerical
8308 simulation, statistical modeling, machine learning and much more.")
8309 (license license:bsd-3)))
8310
8311 (define-public python-chardet
8312 (package
8313 (name "python-chardet")
8314 (version "3.0.4")
8315 (source
8316 (origin
8317 (method url-fetch)
8318 (uri (pypi-uri "chardet" version))
8319 (sha256
8320 (base32
8321 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
8322 (native-inputs
8323 `(("python-hypothesis" ,python-hypothesis)
8324 ("python-pytest" ,python-pytest)
8325 ("python-pytest-runner" ,python-pytest-runner)))
8326 (build-system python-build-system)
8327 ;; XXX: Incompatible with Pytest 4: <https://github.com/chardet/chardet/issues/173>.
8328 (arguments `(#:tests? #f))
8329 (home-page "https://github.com/chardet/chardet")
8330 (synopsis "Universal encoding detector for Python 2 and 3")
8331 (description
8332 "This package provides @code{chardet}, a Python module that can
8333 automatically detect a wide range of file encodings.")
8334 (license license:lgpl2.1+)))
8335
8336 (define-public python2-chardet
8337 (package-with-python2 python-chardet))
8338
8339 (define-public python-docopt
8340 (package
8341 (name "python-docopt")
8342 (version "0.6.2")
8343 (source
8344 (origin
8345 (method git-fetch)
8346 ;; The release on PyPI does not include tests.
8347 (uri (git-reference
8348 (url "https://github.com/docopt/docopt")
8349 (commit version)))
8350 (file-name (git-file-name name version))
8351 (sha256
8352 (base32
8353 "0aad9gbswnnhssin2q0m5lmpm0ahyf80ahs2zjigbn5y7fvljnd0"))))
8354 (build-system python-build-system)
8355 (native-inputs
8356 `(("python-pytest" ,python-pytest)))
8357 (arguments
8358 `(#:phases
8359 (modify-phases %standard-phases
8360 (replace 'check
8361 (lambda _ (invoke "py.test"))))))
8362 (home-page "http://docopt.org")
8363 (synopsis "Command-line interface description language for Python")
8364 (description "This library allows the user to define a command-line
8365 interface from a program's help message rather than specifying it
8366 programmatically with command-line parsers like @code{getopt} and
8367 @code{argparse}.")
8368 (license license:expat)))
8369
8370 (define-public python2-docopt
8371 (package-with-python2 python-docopt))
8372
8373 (define-public python-pythondialog
8374 (package
8375 (name "python-pythondialog")
8376 (version "3.4.0")
8377 (source
8378 (origin
8379 (method url-fetch)
8380 (uri (pypi-uri "pythondialog" version))
8381 (sha256
8382 (base32
8383 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
8384 (build-system python-build-system)
8385 (arguments
8386 `(#:phases
8387 (modify-phases %standard-phases
8388 (add-after 'unpack 'patch-path
8389 (lambda* (#:key inputs #:allow-other-keys)
8390 (let* ((dialog (assoc-ref inputs "dialog")))
8391 ;; Since this library really wants to grovel the search path, we
8392 ;; must hardcode dialog's store path into it.
8393 (substitute* "dialog.py"
8394 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
8395 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
8396 #t))))
8397 #:tests? #f)) ; no test suite
8398 (propagated-inputs
8399 `(("dialog" ,dialog)))
8400 (home-page "http://pythondialog.sourceforge.net/")
8401 (synopsis "Python interface to the UNIX dialog utility")
8402 (description "A Python wrapper for the dialog utility. Its purpose is to
8403 provide an easy to use, pythonic and comprehensive Python interface to dialog.
8404 This allows one to make simple text-mode user interfaces on Unix-like systems")
8405 (license license:lgpl2.1)
8406 (properties `((python2-variant . ,(delay python2-pythondialog))))))
8407
8408 (define-public python2-pythondialog
8409 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
8410 (package
8411 (inherit base)
8412 (version (package-version python-pythondialog))
8413 (source (origin
8414 (method url-fetch)
8415 (uri (pypi-uri "python2-pythondialog" version))
8416 (sha256
8417 (base32
8418 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
8419
8420 (define-public python-configobj
8421 (package
8422 (name "python-configobj")
8423 (version "5.0.6")
8424 (source (origin
8425 (method url-fetch)
8426 (uri (pypi-uri "configobj" version))
8427 (sha256
8428 (base32
8429 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
8430 ;; Patch setup.py so it looks for python-setuptools, which is
8431 ;; required to parse the keyword 'install_requires' in setup.py.
8432 (patches (search-patches "python-configobj-setuptools.patch"))))
8433 (build-system python-build-system)
8434 (propagated-inputs
8435 `(("python-six" ,python-six)))
8436 (synopsis "Config file reading, writing and validation")
8437 (description "ConfigObj is a simple but powerful config file reader and
8438 writer: an ini file round tripper. Its main feature is that it is very easy to
8439 use, with a straightforward programmer’s interface and a simple syntax for
8440 config files.")
8441 (home-page "https://github.com/DiffSK/configobj")
8442 (license license:bsd-3)))
8443
8444 (define-public python2-configobj
8445 (package-with-python2 python-configobj))
8446
8447 (define-public python-configargparse
8448 (package
8449 (name "python-configargparse")
8450 (version "0.14.0")
8451 (source (origin
8452 (method url-fetch)
8453 (uri (pypi-uri "ConfigArgParse" version))
8454 (sha256
8455 (base32
8456 "149fy4zya0rsnlkvxbbq43cyr8lscb5k4pj1m6n7f1grwcmzwbif"))))
8457 (build-system python-build-system)
8458 (native-inputs
8459 `(("python-pyyaml" ,python-pyyaml)))
8460 (arguments
8461 `(#:phases
8462 (modify-phases %standard-phases
8463 (replace 'check
8464 (lambda _
8465 ;; Bypass setuptools-shim because one test relies on "setup.py"
8466 ;; being the first argument passed to the python call.
8467 ;;
8468 ;; NOTE: Many tests do not run because they rely on Python's
8469 ;; built-in test.test_argparse, but we remove the unit tests from
8470 ;; our Python installation.
8471 (invoke "python" "setup.py" "test"))))))
8472 (synopsis "Replacement for argparse")
8473 (description "A drop-in replacement for argparse that allows options to also
8474 be set via config files and/or environment variables.")
8475 (home-page "https://github.com/bw2/ConfigArgParse")
8476 (license license:expat)))
8477
8478 (define-public python2-configargparse
8479 (package-with-python2 python-configargparse))
8480
8481 (define-public python-argparse-manpage
8482 (package
8483 (name "python-argparse-manpage")
8484 (version "1.1")
8485 (source
8486 (origin
8487 (method url-fetch)
8488 (uri (pypi-uri "argparse-manpage" version))
8489 (sha256
8490 (base32
8491 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
8492 (build-system python-build-system)
8493 (home-page "https://github.com/praiskup/argparse-manpage")
8494 (synopsis "Build manual page from Python's ArgumentParser object")
8495 (description
8496 "This package provides tools to build manual pages from Python's
8497 @code{ArgumentParser} object.")
8498 (license license:asl2.0)))
8499
8500 (define-public python-contextlib2
8501 (package
8502 (name "python-contextlib2")
8503 (version "0.5.5")
8504 (source
8505 (origin
8506 (method url-fetch)
8507 (uri (pypi-uri "contextlib2" version))
8508 (sha256
8509 (base32
8510 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
8511 (build-system python-build-system)
8512 (home-page "https://contextlib2.readthedocs.org/")
8513 (synopsis "Tools for decorators and context managers")
8514 (description "This module is primarily a backport of the Python
8515 3.2 contextlib to earlier Python versions. Like contextlib, it
8516 provides utilities for common tasks involving decorators and context
8517 managers. It also contains additional features that are not part of
8518 the standard library.")
8519 (properties `((python2-variant . ,(delay python2-contextlib2))))
8520 (license license:psfl)))
8521
8522 (define-public python2-contextlib2
8523 (let ((base (package-with-python2
8524 (strip-python2-variant python-contextlib2))))
8525 (package
8526 (inherit base)
8527 (arguments
8528 (substitute-keyword-arguments (package-arguments base)
8529 ((#:phases phases)
8530 `(modify-phases ,phases
8531 (replace 'check
8532 (lambda _ (invoke "python" "test_contextlib2.py" "-v")))))))
8533 (native-inputs
8534 `(("python2-unittest2" ,python2-unittest2))))))
8535
8536 (define-public python-texttable
8537 (package
8538 (name "python-texttable")
8539 (version "1.6.2")
8540 (source
8541 (origin
8542 (method url-fetch)
8543 (uri (pypi-uri "texttable" version))
8544 (sha256
8545 (base32
8546 "1x5l77akfc20x52jma9573qp8l8r07q103pm4l0pbizvh4vp1wzg"))))
8547 (build-system python-build-system)
8548 (arguments
8549 `(#:phases
8550 (modify-phases %standard-phases
8551 (replace 'check
8552 (lambda _ (invoke "pytest" "tests.py"))))))
8553 (native-inputs
8554 `(("python-pytest" ,python-pytest)))
8555 (home-page "https://github.com/foutaise/texttable/")
8556 (synopsis "Python module for creating simple ASCII tables")
8557 (description "Texttable is a Python module for creating simple ASCII
8558 tables.")
8559 (license license:expat)))
8560
8561 (define-public python2-texttable
8562 (package-with-python2 python-texttable))
8563
8564 (define-public python-atomicwrites
8565 (package
8566 (name "python-atomicwrites")
8567 (version "1.3.0")
8568 (source (origin
8569 (method url-fetch)
8570 (uri (pypi-uri "atomicwrites" version))
8571 (sha256
8572 (base32
8573 "19ngcscdf3jsqmpcxn6zl5b6anmsajb6izp1smcd1n02midl9abm"))))
8574 (build-system python-build-system)
8575 (synopsis "Atomic file writes in Python")
8576 (description "Library for atomic file writes using platform dependent tools
8577 for atomic file system operations.")
8578 (home-page "https://github.com/untitaker/python-atomicwrites")
8579 (license license:expat)))
8580
8581 (define-public python2-atomicwrites
8582 (package-with-python2 python-atomicwrites))
8583
8584 (define-public python-click-threading
8585 (package
8586 (name "python-click-threading")
8587 (version "0.4.4")
8588 (source (origin
8589 (method url-fetch)
8590 (uri (pypi-uri "click-threading" version))
8591 (sha256
8592 (base32
8593 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
8594 (build-system python-build-system)
8595 (propagated-inputs
8596 `(("python-click" ,python-click)))
8597 (synopsis "Utilities for multithreading in Click")
8598 (description "This package provides utilities for multithreading in Click
8599 applications.")
8600 (home-page "https://github.com/click-contrib/click-threading")
8601 (license license:expat)))
8602
8603 (define-public python-click-log
8604 (package
8605 (name "python-click-log")
8606 (version "0.3.2")
8607 (source (origin
8608 (method url-fetch)
8609 (uri (pypi-uri "click-log" version))
8610 (sha256
8611 (base32
8612 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
8613 (build-system python-build-system)
8614 (propagated-inputs
8615 `(("python-click" ,python-click)))
8616 (synopsis "Logging for click applications")
8617 (description "This package provides a Python library for logging Click
8618 applications.")
8619 (home-page "https://github.com/click-contrib/click-log")
8620 (license license:expat)))
8621
8622 (define-public python-apipkg
8623 (package
8624 (name "python-apipkg")
8625 (version "1.4")
8626 (source (origin
8627 (method url-fetch)
8628 (uri (pypi-uri "apipkg" version))
8629 (sha256
8630 (base32
8631 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
8632 (build-system python-build-system)
8633 (native-inputs
8634 `(("python-pytest" ,python-pytest)))
8635 (synopsis "Namespace control and lazy-import mechanism")
8636 (description "With apipkg you can control the exported namespace of a Python
8637 package and greatly reduce the number of imports for your users. It is a small
8638 pure Python module that works on virtually all Python versions.")
8639 (home-page "https://github.com/pytest-dev/apipkg")
8640 (license license:expat)))
8641
8642 (define-public python2-apipkg
8643 (package-with-python2 python-apipkg))
8644
8645 (define-public python-execnet
8646 (package
8647 (name "python-execnet")
8648 (version "1.4.1")
8649 (source (origin
8650 (method url-fetch)
8651 (uri (pypi-uri "execnet" version))
8652 (sha256
8653 (base32
8654 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
8655 (build-system python-build-system)
8656 (arguments
8657 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
8658 ;; The two test failures are caused by the lack of an `ssh` executable.
8659 ;; The test suite can be run with pytest after the 'install' phase.
8660 #:tests? #f))
8661 (native-inputs
8662 `(("python-pytest" ,python-pytest)
8663 ("python-setuptools-scm" ,python-setuptools-scm)))
8664 (propagated-inputs
8665 `(("python-apipkg" ,python-apipkg)))
8666 (synopsis "Rapid multi-Python deployment")
8667 (description "Execnet provides a share-nothing model with
8668 channel-send/receive communication for distributing execution across many
8669 Python interpreters across version, platform and network barriers. It has a
8670 minimal and fast API targeting the following uses:
8671 @enumerate
8672 @item distribute tasks to (many) local or remote CPUs
8673 @item write and deploy hybrid multi-process applications
8674 @item write scripts to administer multiple environments
8675 @end enumerate")
8676 (home-page "https://codespeak.net/execnet/")
8677 (license license:expat)))
8678
8679 (define-public python2-execnet
8680 (package-with-python2 python-execnet))
8681
8682 (define-public python-icalendar
8683 (package
8684 (name "python-icalendar")
8685 (version "4.0.4")
8686 (source (origin
8687 (method url-fetch)
8688 (uri (pypi-uri "icalendar" version))
8689 (sha256
8690 (base32
8691 "16gjvqv0n05jrb9g228pdjgzd3amz2pdhvcgsn1jypszjg5m2w9l"))))
8692 (build-system python-build-system)
8693 (propagated-inputs
8694 `(("python-dateutil" ,python-dateutil)
8695 ("python-pytz" ,python-pytz)))
8696 (synopsis "Python library for parsing iCalendar files")
8697 (description "The icalendar package is a parser/generator of iCalendar
8698 files for use with Python.")
8699 (home-page "https://github.com/collective/icalendar")
8700 (license license:bsd-2)))
8701
8702 (define-public python-args
8703 (package
8704 (name "python-args")
8705 (version "0.1.0")
8706 (source (origin
8707 (method url-fetch)
8708 (uri (pypi-uri "args" version))
8709 (sha256
8710 (base32
8711 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
8712 (build-system python-build-system)
8713 (home-page "https://github.com/kennethreitz/args")
8714 (synopsis "Command-line argument parser")
8715 (description
8716 "This library provides a Python module to parse command-line arguments.")
8717 (license license:bsd-3)))
8718
8719 (define-public python2-args
8720 (package-with-python2 python-args))
8721
8722 (define-public python-clint
8723 (package
8724 (name "python-clint")
8725 (version "0.5.1")
8726 (source (origin
8727 (method url-fetch)
8728 (uri (pypi-uri "clint" version))
8729 (sha256
8730 (base32
8731 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
8732 (build-system python-build-system)
8733 (arguments
8734 '(#:phases
8735 (modify-phases %standard-phases
8736 (replace 'check
8737 (lambda _ (invoke "py.test" "-v"))))))
8738 (native-inputs
8739 `(("python-pytest" ,python-pytest)))
8740 (propagated-inputs
8741 `(("python-args" ,python-args)))
8742 (home-page "https://github.com/kennethreitz/clint")
8743 (synopsis "Command-line interface tools")
8744 (description
8745 "Clint is a Python module filled with a set of tools for developing
8746 command-line applications, including tools for colored and indented
8747 output, progress bar display, and pipes.")
8748 (license license:isc)))
8749
8750 (define-public python2-clint
8751 (package-with-python2 python-clint))
8752
8753 (define-public python-rply
8754 (package
8755 (name "python-rply")
8756 (version "0.7.5")
8757 (source (origin
8758 (method url-fetch)
8759 (uri (pypi-uri "rply" version))
8760 (sha256
8761 (base32
8762 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
8763 (build-system python-build-system)
8764 (propagated-inputs
8765 `(("python-appdirs" ,python-appdirs)))
8766 (home-page "https://github.com/alex/rply")
8767 (synopsis "Parser generator for Python")
8768 (description
8769 "This package provides a pure Python based parser generator, that also
8770 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
8771 with a new public API, and RPython support.")
8772 (license license:bsd-3)))
8773
8774 (define-public python2-rply
8775 (package-with-python2 python-rply))
8776
8777 (define-public python-hy
8778 (package
8779 (name "python-hy")
8780 (version "0.17.0")
8781 (source (origin
8782 (method url-fetch)
8783 (uri (pypi-uri "hy" version))
8784 (sha256
8785 (base32
8786 "1gdbqsirsdxj320wnp7my5awzs1kfs6m4fqmkzbd1zd47qzj0zfi"))))
8787 (build-system python-build-system)
8788 (arguments
8789 '(#:phases
8790 (modify-phases %standard-phases
8791 (add-before 'install 'set-HOME
8792 (lambda _
8793 (setenv "HOME" "/tmp")))
8794 (replace 'check
8795 (lambda _
8796 ;; Tests require write access to HOME.
8797 (setenv "HOME" "/tmp")
8798 (invoke "nosetests"))))))
8799 (native-inputs
8800 `(("python-coverage" ,python-coverage)
8801 ("python-nose" ,python-nose)))
8802 (propagated-inputs
8803 `(("python-astor" ,python-astor)
8804 ("python-clint" ,python-clint)
8805 ("python-rply" ,python-rply)
8806 ("python-fastentrypoints"
8807 ,python-fastentrypoints)
8808 ("python-funcparserlib"
8809 ,python-funcparserlib)))
8810 (home-page "http://hylang.org/")
8811 (synopsis "Lisp frontend to Python")
8812 (description
8813 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
8814 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
8815 Python at your fingertips, in Lisp form.")
8816 (license license:expat)))
8817
8818 (define-public python2-hy
8819 (package-with-python2 python-hy))
8820
8821 (define-public python2-functools32
8822 (package
8823 (name "python2-functools32")
8824 (version "3.2.3-2")
8825 (source
8826 (origin
8827 (method url-fetch)
8828 (uri (pypi-uri "functools32" version))
8829 (sha256
8830 (base32
8831 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
8832 (build-system python-build-system)
8833 (arguments
8834 `(#:python ,python-2
8835 #:tests? #f)) ; no test target
8836 (home-page "https://github.com/MiCHiLU/python-functools32")
8837 (synopsis
8838 "Backport of the functools module from Python 3.2.3")
8839 (description
8840 "This package is a backport of the @code{functools} module from Python
8841 3.2.3 for use with older versions of Python and PyPy.")
8842 (license license:expat)))
8843
8844 (define-public python2-subprocess32
8845 (package
8846 (name "python2-subprocess32")
8847 (version "3.2.7")
8848 (source (origin
8849 (method url-fetch)
8850 (uri (pypi-uri "subprocess32" version))
8851 (sha256
8852 (base32
8853 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
8854 (patches
8855 (search-patches "python2-subprocess32-disable-input-test.patch"))))
8856 (build-system python-build-system)
8857 (arguments
8858 `(#:python ,python-2
8859 ;; The test suite fails with Python > 2.7.13:
8860 ;; import test.support
8861 ;; ImportError: No module named support
8862 #:tests? #f
8863 #:phases
8864 (modify-phases %standard-phases
8865 (add-after 'unpack 'patch-/bin/sh
8866 (lambda _
8867 (substitute* '("subprocess32.py"
8868 "test_subprocess32.py")
8869 (("/bin/sh") (which "sh")))
8870 #t)))))
8871 (home-page "https://github.com/google/python-subprocess32")
8872 (synopsis "Backport of the subprocess module from Python 3.2")
8873 (description
8874 "This is a backport of the @code{subprocess} standard library module
8875 from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
8876 new features. On POSIX systems it is guaranteed to be reliable when used
8877 in threaded applications. It includes timeout support from Python 3.3 but
8878 otherwise matches 3.2’s API.")
8879 (license license:psfl)))
8880
8881 (define-public python2-futures
8882 (package
8883 (name "python2-futures")
8884 (version "3.2.0")
8885 (source
8886 (origin
8887 (method url-fetch)
8888 (uri (pypi-uri "futures" version))
8889 (sha256
8890 (base32
8891 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
8892 (build-system python-build-system)
8893 (arguments
8894 `(#:python ,python-2
8895 #:phases
8896 (modify-phases %standard-phases
8897 (replace 'check
8898 (lambda _
8899 (invoke "python" "test_futures.py")
8900 #t)))))
8901 (home-page "https://github.com/agronholm/pythonfutures")
8902 (synopsis
8903 "Backport of the concurrent.futures package from Python 3.2")
8904 (description
8905 "The concurrent.futures module provides a high-level interface for
8906 asynchronously executing callables. This package backports the
8907 concurrent.futures package from Python 3.2")
8908 (license license:bsd-3)))
8909
8910 (define-public python-promise
8911 (package
8912 (name "python-promise")
8913 (version "0.4.2")
8914 (source
8915 (origin
8916 (method url-fetch)
8917 (uri (pypi-uri "promise" version))
8918 (sha256
8919 (base32
8920 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
8921 (build-system python-build-system)
8922 ;; Tests wants python-futures, which is a python2 only program, and
8923 ;; can't be found by python-promise at test time.
8924 (arguments `(#:tests? #f))
8925 (home-page "https://github.com/syrusakbary/promise")
8926 (synopsis "Promises/A+ implementation for Python")
8927 (description
8928 "Promises/A+ implementation for Python")
8929 (properties `((python2-variant . ,(delay python2-promise))))
8930 (license license:expat)))
8931
8932 (define-public python2-promise
8933 (let ((promise (package-with-python2
8934 (strip-python2-variant python-promise))))
8935 (package (inherit promise)
8936 (arguments (substitute-keyword-arguments (package-arguments promise)
8937 ((#:tests? _) #t)))
8938 (native-inputs
8939 `(("python2-futures" ,python2-futures)
8940 ("python2-pytest" ,python2-pytest)
8941 ,@(package-native-inputs promise))))))
8942
8943 (define-public python-progressbar33
8944 (package
8945 (name "python-progressbar33")
8946 (version "2.4")
8947 (source
8948 (origin
8949 (method url-fetch)
8950 (uri (pypi-uri "progressbar33" version))
8951 (sha256
8952 (base32
8953 "1zvf6zs5hzrc03p9nfs4p16vhilqikycvv1yk0pxn8s07fdhvzji"))))
8954 (build-system python-build-system)
8955 (home-page "http://github.com/germangh/python-progressbar")
8956 (synopsis "Text progress bar library for Python")
8957 (description
8958 "This package provides a text progress bar library for Python. This
8959 version only differs from the original @code{progressbar} package in that it
8960 uses relative package imports instead of absolute imports, which is necessary
8961 for the module to work under Python 3.3.")
8962 ;; Either or both of these licenses may be selected.
8963 (license (list license:lgpl2.1+ license:bsd-3))))
8964
8965 (define-public python-colorama
8966 (package
8967 (name "python-colorama")
8968 (version "0.4.3")
8969 (source
8970 (origin
8971 (method url-fetch)
8972 (uri (pypi-uri "colorama" version))
8973 (sha256
8974 (base32
8975 "189n8hpijy14jfan4ha9f5n06mnl33cxz7ay92wjqgkr639s0vg9"))))
8976 (build-system python-build-system)
8977 (synopsis "Colored terminal text rendering for Python")
8978 (description "Colorama is a Python library for rendering colored terminal
8979 text.")
8980 (home-page "https://pypi.org/project/colorama/")
8981 (license license:bsd-3)))
8982
8983 (define-public python2-colorama
8984 (package-with-python2 python-colorama))
8985
8986 (define-public python-rsa
8987 (package
8988 (name "python-rsa")
8989 (version "3.4.2")
8990 (source
8991 (origin
8992 (method url-fetch)
8993 (uri (pypi-uri "rsa" version))
8994 (sha256
8995 (base32
8996 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
8997 (build-system python-build-system)
8998 (propagated-inputs
8999 `(("python-pyasn1" ,python-pyasn1)))
9000 (synopsis "Pure-Python RSA implementation")
9001 (description "Python-RSA is a pure-Python RSA implementation. It supports
9002 encryption and decryption, signing and verifying signatures, and key
9003 generation according to PKCS#1 version 1.5. It can be used as a Python
9004 library as well as on the command line.")
9005 (home-page "https://stuvel.eu/rsa")
9006 (license license:asl2.0)))
9007
9008 (define-public python2-rsa
9009 (package-with-python2 python-rsa))
9010
9011 (define-public python-pluggy
9012 (package
9013 (name "python-pluggy")
9014 (version "0.11.0")
9015 (source
9016 (origin
9017 (method url-fetch)
9018 (uri (pypi-uri "pluggy" version))
9019 (sha256
9020 (base32
9021 "10511a54dvafw1jrk75mrhml53c7b7w4yaw7241696lc2hfvr895"))))
9022 (build-system python-build-system)
9023 (native-inputs
9024 `(("python-setuptools-scm" ,python-setuptools-scm)))
9025 (synopsis "Plugin and hook calling mechanism for Python")
9026 (description "Pluggy is an extraction of the plugin manager as used by
9027 Pytest but stripped of Pytest specific details.")
9028 (home-page "https://pypi.org/project/pluggy/")
9029 (license license:expat)))
9030
9031 (define-public python2-pluggy
9032 (package-with-python2 python-pluggy))
9033
9034 (define-public python-tox
9035 (package
9036 (name "python-tox")
9037 (version "2.8.1")
9038 (source
9039 (origin
9040 (method url-fetch)
9041 (uri (pypi-uri "tox" version))
9042 (sha256
9043 (base32
9044 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
9045 (build-system python-build-system)
9046 (arguments
9047 ;; FIXME: Tests require pytest-timeout, which itself requires
9048 ;; pytest>=2.8.0 for installation.
9049 '(#:tests? #f))
9050 (propagated-inputs
9051 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
9052 ("python-py" ,python-py)
9053 ("python-virtualenv" ,python-virtualenv)))
9054 (native-inputs
9055 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
9056 ("python-pytest" ,python-pytest) ; >= 2.3.5
9057 ("python-setuptools-scm" ,python-setuptools-scm)))
9058 (home-page "https://tox.readthedocs.io")
9059 (synopsis "Virtualenv-based automation of test activities")
9060 (description "Tox is a generic virtualenv management and test command line
9061 tool. It can be used to check that a package installs correctly with
9062 different Python versions and interpreters, or run tests in each type of
9063 supported environment, or act as a frontend to continuous integration
9064 servers.")
9065 (license license:expat)))
9066
9067 (define-public python2-tox
9068 (package-with-python2 python-tox))
9069
9070 (define-public python-jmespath
9071 (package
9072 (name "python-jmespath")
9073 (version "0.9.4")
9074 (source
9075 (origin
9076 (method url-fetch)
9077 (uri (pypi-uri "jmespath" version))
9078 (sha256
9079 (base32
9080 "0k0765x1mybcrzajh3hiqkl8sy9hs0bmn4900frxy0j3ykvaxqmx"))))
9081 (build-system python-build-system)
9082 (native-inputs
9083 `(("python-nose" ,python-nose)))
9084 (synopsis "JSON Matching Expressions")
9085 (description "JMESPath (pronounced “james path”) is a Python library that
9086 allows one to declaratively specify how to extract elements from a JSON
9087 document.")
9088 (home-page "https://github.com/jmespath/jmespath.py")
9089 (license license:expat)))
9090
9091 (define-public python2-jmespath
9092 (package-with-python2 python-jmespath))
9093
9094 (define-public python-botocore
9095 (package
9096 (name "python-botocore")
9097 (version "1.12.149")
9098 (source
9099 (origin
9100 (method url-fetch)
9101 (uri (pypi-uri "botocore" version))
9102 (sha256
9103 (base32
9104 "12597f74khp3ngwr282cb949w0gcqj20rkfc3x275dijavyy5cmf"))))
9105 (build-system python-build-system)
9106 (arguments
9107 ;; FIXME: Many tests are failing.
9108 '(#:tests? #f))
9109 (propagated-inputs
9110 `(("python-dateutil" ,python-dateutil)
9111 ("python-docutils" ,python-docutils)
9112 ("python-jmespath" ,python-jmespath)))
9113 (native-inputs
9114 `(("python-mock" ,python-mock)
9115 ("python-nose" ,python-nose)
9116 ("behave" ,behave)
9117 ("python-tox" ,python-tox)
9118 ("python-urllib3" ,python-urllib3)
9119 ("python-wheel" ,python-wheel)))
9120 (home-page "https://github.com/boto/botocore")
9121 (synopsis "Low-level interface to AWS")
9122 (description "Botocore is a Python library that provides a low-level
9123 interface to the Amazon Web Services (AWS) API.")
9124 (license license:asl2.0)))
9125
9126 (define-public python2-botocore
9127 (package-with-python2 python-botocore))
9128
9129 (define-public python-xdo
9130 (package
9131 (name "python-xdo")
9132 (version "0.3")
9133 (source (origin
9134 (method url-fetch)
9135 (uri (string-append
9136 "http://http.debian.net/debian/pool/main/p/python-xdo/"
9137 "python-xdo_" version ".orig.tar.gz"))
9138 (sha256
9139 (base32
9140 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
9141 (build-system python-build-system)
9142 (arguments
9143 '(#:phases
9144 (modify-phases %standard-phases
9145 (add-before 'install 'patch-libxdo-path
9146 ;; Hardcode the path of dynamically loaded libxdo library.
9147 (lambda* (#:key inputs #:allow-other-keys)
9148 (let ((libxdo (string-append
9149 (assoc-ref inputs "xdotool")
9150 "/lib/libxdo.so")))
9151 (substitute* "xdo/_xdo.py"
9152 (("find_library\\(\"xdo\"\\)")
9153 (simple-format #f "\"~a\"" libxdo)))
9154 #t))))
9155 #:tests? #f)) ; no tests provided
9156 (propagated-inputs
9157 `(("python-six" ,python-six)))
9158 (inputs
9159 `(("xdotool" ,xdotool)
9160 ("libX11" ,libx11)))
9161 (home-page "https://tracker.debian.org/pkg/python-xdo")
9162 (synopsis "Python library for simulating X11 keyboard/mouse input")
9163 (description "Provides bindings to libxdo for manipulating X11 via simulated
9164 input. (Note that this is mostly a legacy library; you may wish to look at
9165 python-xdo for newer bindings.)")
9166 (license license:bsd-3)))
9167
9168 (define-public python2-xdo
9169 (package-with-python2 python-xdo))
9170
9171 (define-public python-mako
9172 (package
9173 (name "python-mako")
9174 (version "1.1.0")
9175 (source
9176 (origin
9177 (method url-fetch)
9178 (uri (pypi-uri "Mako" version))
9179 (sha256
9180 (base32
9181 "0jqa3qfpykyn4fmkn0kh6043sfls7br8i2bsdbccazcvk9cijsd3"))))
9182 (build-system python-build-system)
9183 (arguments
9184 `(#:phases (modify-phases %standard-phases
9185 (replace 'check
9186 (lambda _
9187 (invoke "pytest" "-vv"))))))
9188 (propagated-inputs
9189 `(("python-markupsafe" ,python-markupsafe)))
9190 (native-inputs
9191 `(("python-mock" ,python-mock)
9192 ("python-pytest" ,python-pytest)))
9193 (home-page "https://www.makotemplates.org/")
9194 (synopsis "Templating language for Python")
9195 (description "Mako is a templating language for Python that compiles
9196 templates into Python modules.")
9197 (license license:expat)))
9198
9199 (define-public python2-mako
9200 (package-with-python2 python-mako))
9201
9202 (define-public python-waitress
9203 (package
9204 (name "python-waitress")
9205 (version "1.1.0")
9206 (source
9207 (origin
9208 (method url-fetch)
9209 (uri (pypi-uri "waitress" version))
9210 (patches (search-patches "python-waitress-fix-tests.patch"))
9211 (sha256
9212 (base32
9213 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
9214 (build-system python-build-system)
9215 (home-page "https://github.com/Pylons/waitress")
9216 (synopsis "Waitress WSGI server")
9217 (description "Waitress is meant to be a production-quality pure-Python WSGI
9218 server with very acceptable performance.")
9219 (license license:zpl2.1)))
9220
9221 (define-public python2-waitress
9222 (package-with-python2 python-waitress))
9223
9224 (define-public python-whichcraft
9225 (package
9226 (name "python-whichcraft")
9227 (version "0.6.1")
9228 (source
9229 (origin
9230 (method url-fetch)
9231 (uri (pypi-uri "whichcraft" version))
9232 (sha256
9233 (base32
9234 "11yfkzyplizdgndy34vyd5qlmr1n5mxis3a3svxmx8fnccdvknxc"))))
9235 (build-system python-build-system)
9236 (native-inputs
9237 `(("python-pytest" ,python-pytest)))
9238 (home-page "https://github.com/pydanny/whichcraft")
9239 (synopsis "Cross-platform cross-python shutil.which functionality")
9240 (description
9241 "This package provides a shim of the shutil.which function that's
9242 designed to work across multiple versions of Python.")
9243 (license license:bsd-3)))
9244
9245 (define-public python-cookiecutter
9246 (package
9247 (name "python-cookiecutter")
9248 (version "1.6.0")
9249 (source
9250 (origin
9251 (method url-fetch)
9252 (uri (pypi-uri "cookiecutter" version))
9253 (sha256
9254 (base32
9255 "0glsvaz8igi2wy1hsnhm9fkn6560vdvdixzvkq6dn20z3hpaa5hk"))))
9256 (build-system python-build-system)
9257 (native-inputs
9258 `(("python-freezegun" ,python-freezegun)
9259 ("python-pytest" ,python-pytest)
9260 ("python-pytest-catchlog" ,python-pytest-catchlog)
9261 ("python-pytest-cov" ,python-pytest-cov)
9262 ("python-pytest-mock" ,python-pytest-mock)))
9263 (propagated-inputs
9264 `(("python-binaryornot" ,python-binaryornot)
9265 ("python-click" ,python-click)
9266 ("python-future" ,python-future)
9267 ("python-jinja2" ,python-jinja2)
9268 ("python-jinja2-time" ,python-jinja2-time)
9269 ("python-poyo" ,python-poyo)
9270 ("python-requests" ,python-requests)
9271 ("python-whichcraft" ,python-whichcraft)))
9272 (home-page "https://github.com/audreyr/cookiecutter")
9273 (synopsis
9274 "Command-line utility that creates projects from project templates")
9275 (description
9276 "This package provides a command-line utility that creates projects from
9277 project templates, e.g. creating a Python package project from a Python package
9278 project template.")
9279 (license license:bsd-3)))
9280
9281 (define-public python-pyquery
9282 (package
9283 (name "python-pyquery")
9284 (version "1.2.17")
9285 (source
9286 (origin
9287 (method url-fetch)
9288 (uri (pypi-uri "pyquery" version))
9289 (sha256
9290 (base32
9291 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
9292 (build-system python-build-system)
9293 (native-inputs
9294 `(("python-webob" ,python-webob)
9295 ("python-webtest" ,python-webtest)))
9296 (propagated-inputs
9297 `(("python-lxml" ,python-lxml)
9298 ("python-cssselect" ,python-cssselect)))
9299 (home-page "https://github.com/gawel/pyquery")
9300 (synopsis "Make jQuery-like queries on xml documents")
9301 (description "pyquery allows you to make jQuery queries on xml documents.
9302 The API is as much as possible the similar to jQuery. pyquery uses lxml for
9303 fast xml and html manipulation.")
9304 (license license:bsd-3)))
9305
9306 (define-public python-anyjson
9307 (package
9308 (name "python-anyjson")
9309 (version "0.3.3")
9310 (source
9311 (origin
9312 (method url-fetch)
9313 (uri (pypi-uri "anyjson" version))
9314 (sha256
9315 (base32
9316 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
9317 (build-system python-build-system)
9318 (arguments
9319 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
9320 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
9321 ;; whatever) so this transformation needs to be done before the tests
9322 ;; can be run. Maybe we could add a build step to transform beforehand
9323 ;; but it could be annoying/difficult.
9324 ;; We can enable tests for the Python 2 version, though, and do below.
9325 #:tests? #f))
9326 (home-page "https://bitbucket.org/runeh/anyjson/")
9327 (synopsis
9328 "Wraps best available JSON implementation in a common interface")
9329 (description
9330 "Anyjson loads whichever is the fastest JSON module installed
9331 and provides a uniform API regardless of which JSON implementation is used.")
9332 (license license:bsd-3)
9333 (properties `((python2-variant . ,(delay python2-anyjson))))))
9334
9335 (define-public python2-anyjson
9336 (let ((anyjson (package-with-python2
9337 (strip-python2-variant python-anyjson))))
9338 (package
9339 (inherit anyjson)
9340 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
9341 #:tests? #t
9342 ,@(package-arguments anyjson)))
9343 (native-inputs `(("python2-nose" ,python2-nose))))))
9344
9345 (define-public python-amqp
9346 (package
9347 (name "python-amqp")
9348 (version "2.3.2")
9349 (source
9350 (origin
9351 (method url-fetch)
9352 (uri (pypi-uri "amqp" version))
9353 (sha256
9354 (base32
9355 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
9356 (build-system python-build-system)
9357 (native-inputs
9358 `(("python-case" ,python-case)
9359 ("python-pytest-sugar" ,python-pytest-sugar)
9360 ("python-mock" ,python-mock)))
9361 (propagated-inputs
9362 `(("python-vine" ,python-vine)))
9363 (home-page "https://github.com/celery/py-amqp")
9364 (synopsis
9365 "Low-level AMQP client for Python (fork of amqplib)")
9366 (description
9367 "This is a fork of amqplib which was originally written by Barry Pederson.
9368 It is maintained by the Celery project, and used by kombu as a pure python
9369 alternative when librabbitmq is not available.")
9370 (license license:lgpl2.1+)
9371 (properties `((python2-variant . ,(delay python2-amqp))))))
9372
9373 (define-public python2-amqp
9374 (let ((amqp (package-with-python2
9375 (strip-python2-variant python-amqp))))
9376 (package
9377 (inherit amqp)
9378 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
9379 ;; unmaintained. Weirdly, does not do this on the python 3
9380 ;; version?
9381 #:tests? #f
9382 ,@(package-arguments amqp))))))
9383
9384 (define-public python-txamqp
9385 (package
9386 (name "python-txamqp")
9387 (version "0.8.2")
9388 (source
9389 (origin
9390 (method url-fetch)
9391 (uri (pypi-uri "txAMQP" version))
9392 (sha256
9393 (base32
9394 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
9395 (build-system python-build-system)
9396 (propagated-inputs
9397 `(("python-six" ,python-six)
9398 ("python-twisted" ,python-twisted)))
9399 (home-page "https://github.com/txamqp/txamqp")
9400 (synopsis "Communicate with AMQP peers and brokers using Twisted")
9401 (description
9402 "This package provides a Python library for communicating with AMQP peers
9403 and brokers using the asynchronous networking framework Twisted. It contains
9404 all the necessary code to connect, send and receive messages to/from an
9405 AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
9406 also includes support for using Thrift RPC over AMQP in Twisted
9407 applications.")
9408 (license license:asl2.0)))
9409
9410 (define-public python2-txamqp
9411 (package-with-python2 python-txamqp))
9412
9413 (define-public python-kombu
9414 (package
9415 (name "python-kombu")
9416 (version "4.2.2")
9417 (source
9418 (origin
9419 (method url-fetch)
9420 (uri (pypi-uri "kombu" version))
9421 (sha256
9422 (base32
9423 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
9424 (build-system python-build-system)
9425 (native-inputs
9426 `(("python-mock" ,python-mock)
9427 ("python-case" ,python-case)
9428 ("python-pyro4" ,python-pyro4)
9429 ("python-pytest-sugar" ,python-pytest-sugar)
9430 ("python-pytz" ,python-pytz)))
9431 (propagated-inputs
9432 `(("python-anyjson" ,python-anyjson)
9433 ("python-amqp" ,python-amqp)
9434 ("python-redis" ,python-redis)))
9435 (home-page "https://kombu.readthedocs.io")
9436 (synopsis "Message passing library for Python")
9437 (description "The aim of Kombu is to make messaging in Python as easy as
9438 possible by providing an idiomatic high-level interface for the AMQ protocol,
9439 and also provide proven and tested solutions to common messaging problems.
9440 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
9441 message orientation, queuing, routing, reliability and security, for which the
9442 RabbitMQ messaging server is the most popular implementation.")
9443 (license license:bsd-3)
9444 (properties `((python2-variant . ,(delay python2-kombu))))))
9445
9446 (define-public python2-kombu
9447 (let ((kombu (package-with-python2
9448 (strip-python2-variant python-kombu))))
9449 (package
9450 (inherit kombu)
9451 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
9452 ;; It works fine on the python3 variant.
9453 #:tests? #f
9454 ,@(package-arguments kombu)))
9455 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9456 ,@(package-native-inputs kombu))))))
9457
9458 (define-public python-billiard
9459 (package
9460 (name "python-billiard")
9461 (version "3.5.0.5")
9462 (source
9463 (origin
9464 (method url-fetch)
9465 (uri (pypi-uri "billiard" version))
9466 (sha256
9467 (base32
9468 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
9469 (build-system python-build-system)
9470 (native-inputs
9471 `(("python-case" ,python-case)
9472 ("python-pytest" ,python-pytest)))
9473 (home-page "https://github.com/celery/billiard")
9474 (synopsis
9475 "Python multiprocessing fork with improvements and bugfixes")
9476 (description
9477 "Billiard is a fork of the Python 2.7 multiprocessing package. The
9478 multiprocessing package itself is a renamed and updated version of R Oudkerk's
9479 pyprocessing package. This standalone variant is intended to be compatible with
9480 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
9481 (license license:bsd-3)
9482 (properties `((python2-variant . ,(delay python2-billiard))))))
9483
9484 (define-public python2-billiard
9485 (let ((billiard (package-with-python2
9486 (strip-python2-variant python-billiard))))
9487 (package
9488 (inherit billiard)
9489 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9490 ("python2-mock" ,python2-mock)
9491 ,@(package-native-inputs billiard))))))
9492
9493 (define-public python-celery
9494 (package
9495 (name "python-celery")
9496 (version "4.2.1")
9497 (source
9498 (origin
9499 (method url-fetch)
9500 (uri (pypi-uri "celery" version))
9501 (sha256
9502 (base32
9503 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
9504 (build-system python-build-system)
9505 (arguments
9506 '(;; TODO The tests fail with Python 3.7
9507 ;; https://github.com/celery/celery/issues/4849
9508 #:tests? #f
9509 #:phases
9510 (modify-phases %standard-phases
9511 (add-after 'unpack 'patch-requirements
9512 (lambda _
9513 (substitute* "requirements/test.txt"
9514 (("pytest>=3\\.0,<3\\.3")
9515 "pytest>=3.0"))
9516 #t)))))
9517 (native-inputs
9518 `(("python-case" ,python-case)
9519 ("python-pytest" ,python-pytest)))
9520 (propagated-inputs
9521 `(("python-pytz" ,python-pytz)
9522 ("python-billiard" ,python-billiard)
9523 ("python-kombu" ,python-kombu)))
9524 (home-page "https://celeryproject.org")
9525 (synopsis "Distributed Task Queue")
9526 (description "Celery is an asynchronous task queue/job queue based on
9527 distributed message passing. It is focused on real-time operation, but
9528 supports scheduling as well. The execution units, called tasks, are executed
9529 concurrently on a single or more worker servers using multiprocessing,
9530 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
9531 synchronously (wait until ready).")
9532 (license license:bsd-3)
9533 (properties `((python2-variant . ,(delay python2-celery))))))
9534
9535 (define-public python2-celery
9536 (let ((celery (package-with-python2
9537 (strip-python2-variant python-celery))))
9538 (package
9539 (inherit celery)
9540 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9541 ("python2-mock" ,python2-mock)
9542 ,@(package-native-inputs celery))))))
9543
9544 (define-public python-translitcodec
9545 (package
9546 (name "python-translitcodec")
9547 (version "0.4.0")
9548 (source
9549 (origin
9550 (method url-fetch)
9551 (uri (pypi-uri "translitcodec" version))
9552 (sha256
9553 (base32
9554 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
9555 (build-system python-build-system)
9556 (arguments
9557 `(#:tests? #f)) ; no tests provided
9558 (home-page
9559 "https://github.com/claudep/translitcodec")
9560 (synopsis
9561 "Unicode to 8-bit charset transliteration codec")
9562 (description
9563 "This package contains codecs for transliterating ISO 10646 texts into
9564 best-effort representations using smaller coded character sets (ASCII,
9565 ISO 8859, etc.).")
9566 (license license:expat)))
9567
9568 (define-public python2-translitcodec
9569 (package-with-python2 python-translitcodec))
9570
9571 (define-public python-editor
9572 (package
9573 (name "python-editor")
9574 (version "0.5")
9575 (source
9576 (origin
9577 (method url-fetch)
9578 (uri (pypi-uri "python-editor" version))
9579 (sha256
9580 (base32
9581 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
9582 (build-system python-build-system)
9583 (home-page
9584 "https://github.com/fmoo/python-editor")
9585 (synopsis
9586 "Programmatically open an editor, capture the result")
9587 (description
9588 "python-editor is a library that provides the editor module for
9589 programmatically interfacing with your system's $EDITOR.")
9590 (license license:asl2.0)))
9591
9592 (define-public python2-editor
9593 (package-with-python2 python-editor))
9594
9595 (define-public python-vobject
9596 (package
9597 (name "python-vobject")
9598 (version "0.9.5")
9599 (source (origin
9600 (method url-fetch)
9601 (uri (pypi-uri "vobject" version))
9602 (sha256
9603 (base32
9604 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
9605 (build-system python-build-system)
9606 (arguments
9607 '(;; The test suite relies on some non-portable Windows interfaces.
9608 #:tests? #f))
9609 (propagated-inputs
9610 `(("python-dateutil" ,python-dateutil)
9611 ("python-pyicu" ,python-pyicu)))
9612 (synopsis "Parse and generate vCard and vCalendar files")
9613 (description "Vobject is intended to be a full featured Python package for
9614 parsing and generating vCard and vCalendar files. Currently, iCalendar files
9615 are supported and well tested. vCard 3.0 files are supported, and all data
9616 should be imported, but only a few components are understood in a sophisticated
9617 way.")
9618 (home-page "https://eventable.github.io/vobject/")
9619 (license license:asl2.0)))
9620
9621 (define-public python2-vobject
9622 (package-with-python2 python-vobject))
9623
9624 (define-public python-munkres
9625 (package
9626 (name "python-munkres")
9627 (version "1.0.8")
9628 (source (origin
9629 (method url-fetch)
9630 (uri (pypi-uri "munkres" version))
9631 (sha256
9632 (base32
9633 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
9634 (build-system python-build-system)
9635 (arguments
9636 '(#:tests? #f)) ; no test suite
9637 (home-page "https://software.clapper.org/munkres/")
9638 (synopsis "Implementation of the Munkres algorithm")
9639 (description "The Munkres module provides an implementation of the Munkres
9640 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
9641 useful for solving the Assignment Problem.")
9642 (license license:bsd-3)))
9643
9644 (define-public python2-munkres
9645 (package-with-python2 python-munkres))
9646
9647 (define-public python-whoosh
9648 (package
9649 (name "python-whoosh")
9650 (version "2.7.4")
9651 (source
9652 (origin
9653 (method url-fetch)
9654 (uri (pypi-uri "Whoosh" version))
9655 (sha256
9656 (base32
9657 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
9658 (build-system python-build-system)
9659 (arguments '(#:tests? #f)) ; Test invocation is no longer supported by Python.
9660 (native-inputs
9661 `(("python-pytest" ,python-pytest)))
9662 (home-page "https://bitbucket.org/mchaput/whoosh")
9663 (synopsis "Full text indexing, search, and spell checking library")
9664 (description
9665 "Whoosh is a fast, pure-Python full text indexing, search, and spell
9666 checking library.")
9667 (license license:bsd-2)))
9668
9669 (define-public python2-whoosh
9670 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
9671 (package (inherit whoosh)
9672 (propagated-inputs
9673 `(("python2-backport-ssl-match-hostname"
9674 ,python2-backport-ssl-match-hostname)
9675 ,@(package-propagated-inputs whoosh))))))
9676
9677 (define-public python-pathlib
9678 (package
9679 (name "python-pathlib")
9680 (version "1.0.1")
9681 (source (origin
9682 (method url-fetch)
9683 (uri (pypi-uri "pathlib" version))
9684 (sha256
9685 (base32
9686 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
9687 (build-system python-build-system)
9688 ;; The tests depend on the internal "test" module, which does not provide
9689 ;; a stable interface.
9690 (arguments `(#:tests? #f))
9691 (home-page "https://pathlib.readthedocs.org/")
9692 (synopsis "Object-oriented file system paths")
9693 (description "Pathlib offers a set of classes to handle file system paths.
9694 It offers the following advantages over using string objects:
9695
9696 @enumerate
9697 @item No more cumbersome use of os and os.path functions. Everything can
9698 be done easily through operators, attribute accesses, and method calls.
9699 @item Embodies the semantics of different path types. For example,
9700 comparing Windows paths ignores casing.
9701 @item Well-defined semantics, eliminating any inconsistencies or
9702 ambiguities (forward vs. backward slashes, etc.).
9703 @end enumerate
9704
9705 Note: In Python 3.4, pathlib is now part of the standard library. For other
9706 Python versions please consider python-pathlib2 instead, which tracks the
9707 standard library module. This module (python-pathlib) isn't maintained
9708 anymore.")
9709 (license license:expat)))
9710
9711 (define-public python2-pathlib
9712 (package-with-python2 python-pathlib))
9713
9714 (define-public python2-pathlib2
9715 (package
9716 (name "python2-pathlib2")
9717 (version "2.3.3")
9718 (source (origin
9719 (method url-fetch)
9720 (uri (pypi-uri "pathlib2" version))
9721 (sha256
9722 (base32
9723 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
9724 (build-system python-build-system)
9725 ;; We only need the the Python 2 variant, since for Python 3 our minimum
9726 ;; version is 3.4 which already includes this package as part of the
9727 ;; standard library.
9728 (arguments
9729 `(#:python ,python-2))
9730 (propagated-inputs
9731 `(("python2-scandir" ,python2-scandir)
9732 ("python2-six" ,python2-six)))
9733 (home-page "https://pypi.org/project/pathlib2/")
9734 (synopsis "Object-oriented file system paths - backport of standard
9735 pathlib module")
9736 (description "The goal of pathlib2 is to provide a backport of standard
9737 pathlib module which tracks the standard library module, so all the newest
9738 features of the standard pathlib can be used also on older Python versions.
9739
9740 Pathlib offers a set of classes to handle file system paths. It offers the
9741 following advantages over using string objects:
9742
9743 @enumerate
9744 @item No more cumbersome use of os and os.path functions. Everything can
9745 be done easily through operators, attribute accesses, and method calls.
9746 @item Embodies the semantics of different path types. For example,
9747 comparing Windows paths ignores casing.
9748 @item Well-defined semantics, eliminating any inconsistencies or
9749 ambiguities (forward vs. backward slashes, etc.).
9750 @end enumerate")
9751 (license license:expat)))
9752
9753 (define-public python2-pathlib2-bootstrap
9754 (hidden-package
9755 (package
9756 (inherit python2-pathlib2)
9757 (name "python2-pathlib2-bootstrap")
9758 (propagated-inputs
9759 `(("python2-scandir" ,python2-scandir)
9760 ("python2-six" ,python2-six-bootstrap))))))
9761
9762 (define-public python-jellyfish
9763 (package
9764 (name "python-jellyfish")
9765 (version "0.5.6")
9766 (source (origin
9767 (method url-fetch)
9768 (uri (pypi-uri "jellyfish" version))
9769 (sha256
9770 (base32
9771 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
9772 (build-system python-build-system)
9773 (native-inputs
9774 `(("python-pytest" ,python-pytest)))
9775 (home-page "https://github.com/jamesturk/jellyfish")
9776 (synopsis "Approximate and phonetic matching of strings")
9777 (description "Jellyfish uses a variety of string comparison and phonetic
9778 encoding algorithms to do fuzzy string matching.")
9779 (license license:bsd-2)
9780 (properties `((python2-variant . ,(delay python2-jellyfish))))))
9781
9782 (define-public python2-jellyfish
9783 (let ((jellyfish (package-with-python2
9784 (strip-python2-variant python-jellyfish))))
9785 (package (inherit jellyfish)
9786 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
9787 ,@(package-native-inputs jellyfish))))))
9788
9789 (define-public python2-unicodecsv
9790 (package
9791 (name "python2-unicodecsv")
9792 (version "0.14.1")
9793 (source (origin
9794 (method git-fetch)
9795 ;; The test suite is not included in the PyPi release.
9796 ;; https://github.com/jdunck/python-unicodecsv/issues/19
9797 (uri (git-reference
9798 (url "https://github.com/jdunck/python-unicodecsv")
9799 (commit version)))
9800 (file-name (git-file-name name version))
9801 (sha256
9802 (base32
9803 "15hx2k41a2lpv4hcml9zp4cvlx1171mnb5s4s13xc1pxkq3vgdjy"))))
9804 (build-system python-build-system)
9805 (arguments
9806 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
9807 #:python ,python-2))
9808 (native-inputs
9809 `(("python2-unittest2" ,python2-unittest2)))
9810 (home-page "https://github.com/jdunck/python-unicodecsv")
9811 (synopsis "Unicode CSV module for Python 2")
9812 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
9813 module, adding support for Unicode strings.")
9814 (license license:bsd-2)))
9815
9816 (define-public python-rarfile
9817 (package
9818 (name "python-rarfile")
9819 (version "2.8")
9820 (source (origin
9821 (method url-fetch)
9822 (uri (pypi-uri "rarfile" version))
9823 (sha256
9824 (base32
9825 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
9826 (build-system python-build-system)
9827 (arguments
9828 '(#:phases
9829 (modify-phases %standard-phases
9830 (replace 'check
9831 ;; Many tests fail, but the installation proceeds.
9832 (lambda _ (invoke "make" "-C" "test" "test"))))))
9833 (native-inputs
9834 `(("which" ,which))) ; required for tests
9835 (propagated-inputs
9836 `(("libarchive" ,libarchive)))
9837 (home-page "https://github.com/markokr/rarfile")
9838 (synopsis "RAR archive reader for Python")
9839 (description "This is Python module for RAR archive reading. The interface
9840 is made as zipfile like as possible.")
9841 (license license:isc)))
9842
9843 (define-public python2-rarfile
9844 (package-with-python2 python-rarfile))
9845
9846 (define-public python-magic
9847 (package
9848 (name "python-magic")
9849 (version "0.4.15")
9850 (source
9851 (origin
9852 (method url-fetch)
9853 (uri (pypi-uri "python-magic" version))
9854 (sha256
9855 (base32
9856 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
9857 (file-name (string-append name "-" version "-checkout"))))
9858 (build-system python-build-system)
9859 (arguments
9860 ;; The tests are unreliable, so don't run them. The tests fail
9861 ;; under Python3 because they were written for Python2 and
9862 ;; contain import statements that do not work in Python3. One of
9863 ;; the tests fails under Python2 because its assertions are
9864 ;; overly stringent; it relies on comparing output strings which
9865 ;; are brittle and can change depending on the version of
9866 ;; libmagic being used and the system on which the test is
9867 ;; running. In my case, under GuixSD 0.10.0, only one test
9868 ;; failed, and it seems to have failed only because the version
9869 ;; of libmagic that is packaged in Guix outputs a slightly
9870 ;; different (but not wrong) string than the one that the test
9871 ;; expected.
9872 '(#:tests? #f
9873 #:phases (modify-phases %standard-phases
9874 ;; Replace a specific method call with a hard-coded
9875 ;; path to the necessary libmagic.so file in the
9876 ;; store. If we don't do this, then the method call
9877 ;; will fail to find the libmagic.so file, which in
9878 ;; turn will cause any application using
9879 ;; python-magic to fail.
9880 (add-before 'build 'hard-code-path-to-libmagic
9881 (lambda* (#:key inputs #:allow-other-keys)
9882 (let ((file (assoc-ref inputs "file")))
9883 (substitute* "magic.py"
9884 (("ctypes.util.find_library\\('magic'\\)")
9885 (string-append "'" file "/lib/libmagic.so'")))
9886 #t)))
9887 (add-before 'install 'disable-egg-compression
9888 (lambda _
9889 (let ((port (open-file "setup.cfg" "a")))
9890 (display "\n[easy_install]\nzip_ok = 0\n"
9891 port)
9892 (close-port port)
9893 #t))))))
9894 (inputs
9895 ;; python-magic needs to be able to find libmagic.so.
9896 `(("file" ,file)))
9897 (home-page
9898 "https://github.com/ahupp/python-magic")
9899 (synopsis
9900 "File type identification using libmagic")
9901 (description
9902 "This module uses ctypes to access the libmagic file type
9903 identification library. It makes use of the local magic database and
9904 supports both textual and MIME-type output. Note that this module and
9905 the python-file module both provide a \"magic.py\" file; these two
9906 modules, which are different and were developed separately, both serve
9907 the same purpose: to provide Python bindings for libmagic.")
9908 (license license:expat)))
9909
9910 (define-public python2-magic
9911 (package-with-python2 python-magic))
9912
9913 (define-public python2-s3cmd
9914 (package
9915 (name "python2-s3cmd")
9916 (version "1.6.1")
9917 (source
9918 (origin
9919 (method url-fetch)
9920 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
9921 "s3cmd-" version ".tar.gz"))
9922 (sha256
9923 (base32
9924 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
9925 (build-system python-build-system)
9926 (arguments
9927 ;; s3cmd is written for python2 only and contains no tests.
9928 `(#:python ,python-2
9929 #:tests? #f))
9930 (propagated-inputs
9931 `(("python2-dateutil" ,python2-dateutil)
9932 ;; The python-file package also provides a magic.py module.
9933 ;; This is an unfortunate state of affairs; however, s3cmd
9934 ;; fails to install if it cannot find specifically the
9935 ;; python-magic package. Thus we include it, instead of using
9936 ;; python-file. Ironically, s3cmd sometimes works better
9937 ;; without libmagic bindings at all:
9938 ;; https://github.com/s3tools/s3cmd/issues/198
9939 ("python2-magic" ,python2-magic)))
9940 (home-page "http://s3tools.org/s3cmd")
9941 (synopsis "Command line tool for S3-compatible storage services")
9942 (description
9943 "S3cmd is a command line tool for uploading, retrieving and managing data
9944 in storage services that are compatible with the Amazon Simple Storage
9945 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
9946 GnuPG encryption, and more. It also supports management of Amazon's
9947 CloudFront content delivery network.")
9948 (license license:gpl2+)))
9949
9950 (define-public python-pkgconfig
9951 (package
9952 (name "python-pkgconfig")
9953 (version "1.3.1")
9954 (source
9955 (origin
9956 (method url-fetch)
9957 (uri (pypi-uri "pkgconfig" version))
9958 (sha256
9959 (base32
9960 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
9961 (build-system python-build-system)
9962 (native-inputs
9963 `(("python-nose" ,python-nose)))
9964 (inputs
9965 `(("pkg-config" ,pkg-config)))
9966 (arguments
9967 `(#:phases
9968 (modify-phases %standard-phases
9969 (add-before 'build 'patch
9970 ;; Hard-code the path to pkg-config.
9971 (lambda _
9972 (substitute* "pkgconfig/pkgconfig.py"
9973 (("cmd = 'pkg-config")
9974 (string-append "cmd = '" (which "pkg-config"))))
9975 #t))
9976 (replace 'check
9977 (lambda _
9978 (invoke "nosetests" "test.py"))))))
9979 (home-page "https://github.com/matze/pkgconfig")
9980 (synopsis "Python interface for pkg-config")
9981 (description "This module provides a Python interface to pkg-config. It
9982 can be used to find all pkg-config packages, check if a package exists,
9983 check if a package meets certain version requirements, query CFLAGS and
9984 LDFLAGS and parse the output to build extensions with setup.py.")
9985 (license license:expat)))
9986
9987 (define-public python2-pkgconfig
9988 (package-with-python2 python-pkgconfig))
9989
9990 (define-public python-bz2file
9991 (package
9992 (name "python-bz2file")
9993 (version "0.98")
9994 (source
9995 (origin
9996 (method url-fetch)
9997 (uri (pypi-uri "bz2file" version))
9998 (sha256
9999 (base32
10000 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
10001 (build-system python-build-system)
10002 (arguments
10003 `(#:tests? #f)) ; Tests use deprecated python modules.
10004 (home-page "https://github.com/nvawda/bz2file")
10005 (synopsis "Read and write bzip2-compressed files")
10006 (description
10007 "Bz2file is a Python library for reading and writing bzip2-compressed
10008 files. It contains a drop-in replacement for the I/O interface in the
10009 standard library's @code{bz2} module, including features from the latest
10010 development version of CPython that are not available in older releases.")
10011 (license license:asl2.0)))
10012
10013 (define-public python2-bz2file
10014 (package-with-python2 python-bz2file))
10015
10016 (define-public python-future
10017 (package
10018 (name "python-future")
10019 (version "0.17.1")
10020 (source
10021 (origin
10022 (method url-fetch)
10023 (uri (pypi-uri "future" version))
10024 (sha256
10025 (base32
10026 "1f2rlqn9rh7adgir52dlbqz69gsab44x0mlm8gf1cs7xvhv54137"))))
10027 (build-system python-build-system)
10028 ;; Many tests connect to the network or are otherwise flawed.
10029 ;; https://github.com/PythonCharmers/python-future/issues/210
10030 (arguments
10031 `(#:tests? #f))
10032 (home-page "http://python-future.org")
10033 (synopsis "Single-source support for Python 3 and 2")
10034 (description
10035 "@code{python-future} is the missing compatibility layer between Python 2 and
10036 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
10037 to support both Python 2 and Python 3 with minimal overhead.")
10038 (license license:expat)))
10039
10040 (define-public python2-future
10041 (package-with-python2 python-future))
10042
10043 (define-public python-cysignals
10044 (package
10045 (name "python-cysignals")
10046 (version "1.9.0")
10047 (source
10048 (origin
10049 (method url-fetch)
10050 (uri (pypi-uri "cysignals" version))
10051 (sha256
10052 (base32
10053 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
10054 (build-system python-build-system)
10055 (native-inputs
10056 `(("python-cython" ,python-cython)
10057 ("python-sphinx" ,python-sphinx)))
10058 (inputs
10059 `(("pari-gp" ,pari-gp)))
10060 (arguments
10061 `(#:modules ((guix build python-build-system)
10062 ((guix build gnu-build-system) #:prefix gnu:)
10063 (guix build utils))
10064 ;; FIXME: Tests are executed after installation and currently fail
10065 ;; when not installing into standard locations; the author is working
10066 ;; on a fix.
10067 #:tests? #f
10068 #:phases
10069 (modify-phases %standard-phases
10070 (add-before
10071 'build 'configure
10072 (assoc-ref gnu:%standard-phases 'configure)))))
10073 (home-page
10074 "https://github.com/sagemath/cysignals")
10075 (synopsis
10076 "Handling of interrupts and signals for Cython")
10077 (description
10078 "The cysignals package provides mechanisms to handle interrupts (and
10079 other signals and errors) in Cython code, using two related approaches,
10080 for mixed Cython/Python code or external C libraries and pure Cython code,
10081 respectively.")
10082 (license license:lgpl3+)))
10083
10084 (define-public python2-cysignals
10085 (package-with-python2 python-cysignals))
10086
10087 (define-public python2-shedskin
10088 (package
10089 (name "python2-shedskin")
10090 (version "0.9.4")
10091 (source
10092 (origin
10093 (method url-fetch)
10094 (uri (string-append "https://github.com/shedskin/shedskin/"
10095 "releases/download/v" version
10096 "/shedskin-" version ".tgz"))
10097 (sha256
10098 (base32
10099 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
10100 (build-system python-build-system)
10101 (arguments
10102 `(#:python ,python-2
10103 #:phases (modify-phases %standard-phases
10104 (add-after 'unpack 'fix-resulting-include-libs
10105 (lambda* (#:key inputs #:allow-other-keys)
10106 (let ((libgc (assoc-ref inputs "libgc"))
10107 (pcre (assoc-ref inputs "pcre")))
10108 (substitute* "shedskin/makefile.py"
10109 (("variable == 'CCFLAGS':[ ]*")
10110 (string-append "variable == 'CCFLAGS':\n"
10111 " line += ' -I " pcre "/include"
10112 " -I " libgc "/include'"))
10113 (("variable == 'LFLAGS':[ ]*")
10114 (string-append "variable == 'LFLAGS':\n"
10115 " line += ' -L" pcre "/lib"
10116 " -L " libgc "/lib'")))
10117 #t))))))
10118 (inputs `(("pcre" ,pcre)
10119 ("libgc" ,libgc)))
10120 (home-page "https://shedskin.github.io/")
10121 (synopsis "Experimental Python-2 to C++ Compiler")
10122 (description (string-append "This is an experimental compiler for a subset of
10123 Python. It generates C++ code and a Makefile."))
10124 (license (list license:gpl3 license:bsd-3 license:expat))))
10125
10126 (define-public python2-rope
10127 (package
10128 (name "python2-rope")
10129 (version "0.11.0")
10130 (source
10131 (origin
10132 (method url-fetch)
10133 (uri (pypi-uri "rope" version))
10134 (sha256
10135 (base32
10136 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
10137 (arguments
10138 ;; Rope has only partial python3 support, see `python-rope'
10139 `(#:python ,python-2))
10140 (build-system python-build-system)
10141 (native-inputs
10142 `(("python2-unittest2" ,python2-unittest2)))
10143 (home-page "https://github.com/python-rope/rope")
10144 (synopsis "Refactoring library for Python")
10145 (description "Rope is a refactoring library for Python. It facilitates
10146 the renaming, moving and extracting of attributes, functions, modules, fields
10147 and parameters in Python 2 source code. These refactorings can also be applied
10148 to occurrences in strings and comments.")
10149 (license license:gpl2)))
10150
10151 (define-public python-rope
10152 (package
10153 (inherit python2-rope)
10154 (name "python-rope")
10155 (arguments `(#:python ,python-wrapper
10156 ;; XXX: Only partial python3 support, results in some failing
10157 ;; tests: <https://github.com/python-rope/rope/issues/247>.
10158 #:tests? #f))
10159 (properties `((python2-variant . ,(delay python2-rope))))))
10160
10161 (define-public python-py3status
10162 (package
10163 (name "python-py3status")
10164 (version "3.21")
10165 (source
10166 (origin
10167 (method url-fetch)
10168 (uri (pypi-uri "py3status" version))
10169 (sha256
10170 (base32 "16z8zq83hxy48g6hh4xczbdz50qvxv9k1aahr4fqq7jis60cc262"))))
10171 (build-system python-build-system)
10172 (inputs
10173 `(("file" ,file)))
10174 (arguments
10175 '(#:phases
10176 (modify-phases %standard-phases
10177 ;; 'file' is used for detection of configuration file encoding
10178 ;; let's make link the dependency to particular input
10179 (add-before 'build 'patch-file-path
10180 (lambda* (#:key inputs #:allow-other-keys)
10181 (let ((file-path (assoc-ref inputs "file")))
10182 (substitute* "py3status/parse_config.py"
10183 (("\\[\"file\", \"-b\"")
10184 (string-append "['" file-path "/bin/file', '-b'")))
10185 #t))))
10186 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
10187 (home-page "https://github.com/ultrabug/py3status")
10188 (synopsis "Extensible i3status wrapper written in Python")
10189 (description "py3status is an i3status wrapper which extends i3status
10190 functionality in a modular way, allowing you to extend your panel with your
10191 own code, responding to click events and updating clock every second.")
10192 (license license:bsd-3)))
10193
10194 (define-public python-tblib
10195 (package
10196 (name "python-tblib")
10197 (version "1.3.2")
10198 (source (origin
10199 (method url-fetch)
10200 (uri (pypi-uri "tblib" version))
10201 (sha256 (base32
10202 "1rsg8h069kqgncyv8fgzyj6qflk6j10cb78pa5jk34ixwq044vj3"))))
10203 (build-system python-build-system)
10204 (arguments
10205 `(#:phases
10206 (modify-phases %standard-phases
10207 (add-before 'check 'adjust-tests
10208 (lambda _
10209 (when (which "python3")
10210 ;; Adjust the example output to match that of Python 3.7:
10211 ;; <https://github.com/ionelmc/python-tblib/issues/36>.
10212 (substitute* "README.rst"
10213 (("Exception\\('fail',") "Exception('fail'"))
10214 #t)))
10215 (replace 'check
10216 (lambda _
10217 ;; Upstream runs tests after installation and the package itself
10218 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
10219 ;; found.
10220 (setenv "PYTHONPATH"
10221 (string-append (getcwd) "/build/lib:"
10222 (getenv "PYTHONPATH")))
10223 (invoke "py.test" "-vv" "tests" "README.rst"))))))
10224 (native-inputs
10225 `(("python-pytest" ,python-pytest)
10226 ("python-six" ,python-six)))
10227 (home-page "https://github.com/ionelmc/python-tblib")
10228 (synopsis "Traceback serialization library")
10229 (description
10230 "Traceback serialization allows you to:
10231
10232 @enumerate
10233 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
10234 different processes. This allows better error handling when running code over
10235 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
10236
10237 @item Parse traceback strings and raise with the parsed tracebacks.
10238 @end enumerate\n")
10239 (license license:bsd-3)))
10240
10241 (define-public python2-tblib
10242 (package-with-python2 python-tblib))
10243
10244 (define-public python-greenlet
10245 (package
10246 (name "python-greenlet")
10247 (version "0.4.15")
10248 (source (origin
10249 (method url-fetch)
10250 (uri (pypi-uri "greenlet" version))
10251 (sha256
10252 (base32
10253 "1g4g1wwc472ds89zmqlpyan3fbnzpa8qm48z3z1y6mlk44z485ll"))))
10254 (build-system python-build-system)
10255 (home-page "https://greenlet.readthedocs.io/")
10256 (synopsis "Lightweight in-process concurrent programming")
10257 (description
10258 "Greenlet package is a spin-off of Stackless, a version of CPython
10259 that supports micro-threads called \"tasklets\". Tasklets run
10260 pseudo-concurrently (typically in a single or a few OS-level threads) and
10261 are synchronized with data exchanges on \"channels\".")
10262 (license (list license:psfl license:expat))))
10263
10264 (define-public python2-greenlet
10265 (package-with-python2 python-greenlet))
10266
10267 (define-public python-objgraph
10268 (package
10269 (name "python-objgraph")
10270 (version "3.4.1")
10271 (source
10272 (origin
10273 (method url-fetch)
10274 (uri (pypi-uri "objgraph" version))
10275 (sha256
10276 (base32
10277 "19qmqsh984zq1rzzjy4vqnmviaqnymcyl8h7z99pnicbgwnm2adz"))))
10278 (build-system python-build-system)
10279 (propagated-inputs
10280 `(("python-graphviz" ,python-graphviz)))
10281 (native-inputs
10282 `(("python-mock" ,python-mock)
10283 ("graphviz" ,graphviz)))
10284 (home-page "https://mg.pov.lt/objgraph/")
10285 (synopsis "Draw Python object reference graphs with graphviz")
10286 (description
10287 "This package provides tools to draw Python object reference graphs with
10288 graphviz.")
10289 (license license:expat)))
10290
10291 (define-public python2-objgraph
10292 (package-with-python2 python-objgraph))
10293
10294 (define-public python-gevent
10295 (package
10296 (name "python-gevent")
10297 (version "1.3.7")
10298 (source (origin
10299 (method url-fetch)
10300 (uri (pypi-uri "gevent" version))
10301 (sha256
10302 (base32
10303 "0b0fr04qdk1p4sniv87fh8z5psac60x01pv054kpgi94520g81iz"))
10304 (modules '((guix build utils)))
10305 (snippet
10306 '(begin
10307 ;; unbunding libev and c-ares
10308 (delete-file-recursively "deps")
10309 #t))))
10310 (build-system python-build-system)
10311 (arguments
10312 `(#:modules ((ice-9 ftw)
10313 (ice-9 match)
10314 (srfi srfi-26)
10315 (guix build utils)
10316 (guix build python-build-system))
10317 #:phases (modify-phases %standard-phases
10318 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
10319 (lambda _
10320 (substitute* "src/gevent/subprocess.py"
10321 (("/bin/sh") (which "sh")))
10322 (for-each (lambda (file)
10323 (substitute* file
10324 (("/bin/sh") (which "sh"))
10325 (("/bin/true") (which "true"))))
10326 (find-files "src/greentest" "\\.py$"))
10327 #t))
10328 (add-before 'build 'do-not-use-bundled-sources
10329 (lambda* (#:key inputs #:allow-other-keys)
10330 (setenv "CONFIG_SHELL" (which "bash"))
10331 (setenv "LIBEV_EMBED" "false")
10332 (setenv "CARES_EMBED" "false")
10333 (setenv "EMBED" "false")
10334
10335 ;; Prevent building bundled libev.
10336 (substitute* "setup.py"
10337 (("run_make=_BUILDING")
10338 "run_make=False"))
10339
10340 (let ((greenlet (string-append
10341 (assoc-ref inputs "python-greenlet")
10342 "/include")))
10343 (match (scandir greenlet
10344 (lambda (item)
10345 (string-prefix? "python" item)))
10346 ((python)
10347 (setenv "C_INCLUDE_PATH"
10348 (string-append greenlet "/" python)))))
10349 #t))
10350 (add-before 'check 'skip-timer-test
10351 (lambda _
10352 ;; XXX: Skip 'TestTimerResolution', which appears to be
10353 ;; unreliable.
10354 (substitute* "src/greentest/test__core_timer.py"
10355 (("not greentest.RUNNING_ON_CI") "False"))
10356 #t))
10357 (replace 'check
10358 (lambda _
10359 ;; Make sure the build directory is on PYTHONPATH.
10360 (setenv "PYTHONPATH"
10361 (string-append
10362 (getenv "PYTHONPATH") ":"
10363 (getcwd) "/build/"
10364 (car (scandir "build" (cut string-prefix? "lib." <>)))))
10365 (with-directory-excursion "src/greentest"
10366 ;; XXX: Many tests require network access. Instead we only
10367 ;; run known-good tests. Unfortunately we cannot use
10368 ;; recursion here since this directory also contains
10369 ;; Python-version-specific subfolders.
10370 (apply invoke "python" "testrunner.py" "--config"
10371 "known_failures.py"
10372 (scandir "." (cut regexp-exec
10373 (make-regexp "test_+(subprocess|core)")
10374 <>)))))))))
10375 (propagated-inputs
10376 `(("python-greenlet" ,python-greenlet)
10377 ("python-objgraph" ,python-objgraph)))
10378 (native-inputs
10379 `(("python-six" ,python-six)))
10380 (inputs
10381 `(("c-ares" ,c-ares)
10382 ("libev" ,libev)))
10383 (home-page "http://www.gevent.org/")
10384 (synopsis "Coroutine-based network library")
10385 (description
10386 "gevent is a coroutine-based Python networking library that uses greenlet
10387 to provide a high-level synchronous API on top of the libev event loop.")
10388 (license license:expat)
10389 (properties `((python2-variant . ,(delay python2-gevent))))))
10390
10391 (define-public python2-gevent
10392 (let ((base (package-with-python2
10393 (strip-python2-variant python-gevent))))
10394 (package
10395 (inherit base)
10396 (native-inputs `(,@(package-native-inputs python-gevent)
10397 ("python-mock" ,python2-mock))))))
10398
10399 (define-public python-fastimport
10400 (package
10401 (name "python-fastimport")
10402 (version "0.9.6")
10403 (source
10404 (origin
10405 (method url-fetch)
10406 (uri (pypi-uri "fastimport" version))
10407 (sha256
10408 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
10409 (build-system python-build-system)
10410 (home-page "https://github.com/jelmer/python-fastimport")
10411 (synopsis "VCS fastimport parser and generator in Python")
10412 (description "This package provides a parser for and generator of the Git
10413 @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
10414 format.")
10415 (license license:gpl2+)))
10416
10417 (define-public python2-fastimport
10418 (package-with-python2 python-fastimport))
10419
10420 (define-public python-twisted
10421 (package
10422 (name "python-twisted")
10423 (version "19.7.0")
10424 (source (origin
10425 (method url-fetch)
10426 (uri (pypi-uri "Twisted" version ".tar.bz2"))
10427 (sha256
10428 (base32
10429 "17d3hnxv9qndagzz63mdpyk99xj63p9gq586vjn0rxk8cl197nym"))))
10430 (build-system python-build-system)
10431 (arguments
10432 '(#:tests? #f)) ; FIXME: some tests fail
10433 (propagated-inputs
10434 `(("python-zope-interface" ,python-zope-interface)
10435 ("python-pyhamcrest" ,python-pyhamcrest)
10436 ("python-incremental" ,python-incremental)
10437 ("python-hyperlink" ,python-hyperlink)
10438 ("python-constantly" ,python-constantly)
10439 ("python-automat" ,python-automat)))
10440 (home-page "https://twistedmatrix.com/")
10441 (synopsis "Asynchronous networking framework written in Python")
10442 (description
10443 "Twisted is an extensible framework for Python programming, with special
10444 focus on event-based network programming and multiprotocol integration.")
10445 (license license:expat)))
10446
10447 (define-public python2-twisted
10448 (package-with-python2 python-twisted))
10449
10450 (define-public python-pika
10451 (package
10452 (name "python-pika")
10453 (version "0.12.0")
10454 (source
10455 (origin
10456 (method url-fetch)
10457 (uri (pypi-uri "pika" version))
10458 (sha256
10459 (base32
10460 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
10461 (build-system python-build-system)
10462 (native-inputs
10463 `(("python-pyev" ,python-pyev)
10464 ("python-tornado" ,python-tornado)
10465 ("python-twisted" ,python-twisted)))
10466 (home-page "https://pika.readthedocs.org")
10467 (synopsis "Pure Python AMQP Client Library")
10468 (description
10469 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
10470 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
10471 network support library.")
10472 (license license:bsd-3)))
10473
10474 (define-public python2-pika
10475 (package-with-python2 python-pika))
10476
10477 (define-public python-ply
10478 (package
10479 (name "python-ply")
10480 (version "3.10")
10481 (source
10482 (origin
10483 (method url-fetch)
10484 (uri (pypi-uri "ply" version))
10485 (sha256
10486 (base32
10487 "1jxsr1d2f732r6ljhvm827113dckwl6qwakfvpbdhcbhvpvlmscn"))))
10488 (build-system python-build-system)
10489 (home-page "http://www.dabeaz.com/ply/")
10490 (synopsis "Python Lex & Yacc")
10491 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
10492 It uses LR parsing and does extensive error checking.")
10493 (license license:bsd-3)))
10494
10495 (define-public python2-ply
10496 (package-with-python2 python-ply))
10497
10498 (define-public python-tabulate
10499 (package
10500 (name "python-tabulate")
10501 (version "0.7.7")
10502 (source (origin
10503 (method url-fetch)
10504 (uri (pypi-uri "tabulate" version))
10505 (sha256
10506 (base32
10507 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
10508 (build-system python-build-system)
10509 (arguments
10510 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
10511 ;; and the latest release is not tagged in the upstream repository.
10512 '(#:tests? #f))
10513 (home-page "https://bitbucket.org/astanin/python-tabulate")
10514 (synopsis "Pretty-print tabular data")
10515 (description
10516 "Tabulate is a library and command-line utility to pretty-print tabular
10517 data in Python.")
10518 (license license:expat)))
10519
10520 (define-public python2-tabulate
10521 (package-with-python2 python-tabulate))
10522
10523 (define-public python-kazoo
10524 (package
10525 (name "python-kazoo")
10526 (version "2.4.0")
10527 (source
10528 (origin
10529 (method url-fetch)
10530 (uri (pypi-uri "kazoo" version))
10531 (sha256
10532 (base32
10533 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
10534 (build-system python-build-system)
10535 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
10536 (propagated-inputs
10537 `(("python-six" ,python-six)))
10538 (home-page "https://kazoo.readthedocs.org")
10539 (synopsis "High-level Zookeeper client library")
10540 (description
10541 "Kazoo is a Python client library for the Apache Zookeeper distributed
10542 application service. It is designed to be easy to use and to avoid common
10543 programming errors.")
10544 (license license:asl2.0)))
10545
10546 (define-public python2-kazoo
10547 (package-with-python2 python-kazoo))
10548
10549 (define-public python-pykafka
10550 (package
10551 (name "python-pykafka")
10552 (version "2.4.0")
10553 (source (origin
10554 (method url-fetch)
10555 (uri (pypi-uri "pykafka" version))
10556 (sha256
10557 (base32
10558 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
10559 (build-system python-build-system)
10560 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
10561 (propagated-inputs
10562 `(("python-gevent" ,python-gevent)
10563 ("python-kazoo" ,python-kazoo)
10564 ("python-tabulate" ,python-tabulate)))
10565 (inputs
10566 `(("librdkafka" ,librdkafka)))
10567 (home-page "https://pykafka.readthedocs.io/")
10568 (synopsis "Apache Kafka client for Python")
10569 (description
10570 "PyKafka is a client for the Apache Kafka distributed messaging system.
10571 It includes Python implementations of Kafka producers and consumers, which
10572 are optionally backed by a C extension built on librdkafka.")
10573 (license license:asl2.0)))
10574
10575 (define-public python2-pykafka
10576 (package-with-python2 python-pykafka))
10577
10578 (define-public python-wcwidth
10579 (package
10580 (name "python-wcwidth")
10581 (version "0.1.8")
10582 (source (origin
10583 (method url-fetch)
10584 (uri (pypi-uri "wcwidth" version))
10585 (sha256
10586 (base32
10587 "1a1pzds3xzfylm5mnc5f6c1p8kiig0daqjc9gygd9rc3cj53x2zj"))))
10588 (build-system python-build-system)
10589 (home-page "https://github.com/jquast/wcwidth")
10590 (synopsis "Measure number of terminal column cells of wide-character codes")
10591 (description "Wcwidth measures the number of terminal column cells of
10592 wide-character codes. It is useful for those implementing a terminal emulator,
10593 or programs that carefully produce output to be interpreted by one. It is a
10594 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
10595 specified in POSIX.1-2001 and POSIX.1-2008.")
10596 (license license:expat)))
10597
10598 (define-public python2-wcwidth
10599 (package-with-python2 python-wcwidth))
10600
10601 (define-public python2-jsonrpclib
10602 (package
10603 (name "python2-jsonrpclib")
10604 (version "0.1.7")
10605 (source (origin
10606 (method url-fetch)
10607 (uri (pypi-uri "jsonrpclib" version))
10608 (sha256
10609 (base32
10610 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
10611 (build-system python-build-system)
10612 (arguments
10613 `(#:tests? #f
10614 #:python ,python-2))
10615 (home-page "https://github.com/joshmarshall/jsonrpclib/")
10616 (synopsis "Implementation of JSON-RPC specification for Python")
10617 (description
10618 "This library is an implementation of the JSON-RPC specification.
10619 It supports both the original 1.0 specification, as well as the
10620 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
10621 etc.")
10622 (license license:asl2.0)))
10623
10624 (define-public python-chai
10625 (package
10626 (name "python-chai")
10627 (version "1.1.2")
10628 (source (origin
10629 (method url-fetch)
10630 (uri (pypi-uri "chai" version))
10631 (sha256
10632 (base32
10633 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
10634 (build-system python-build-system)
10635 (home-page "https://github.com/agoragames/chai")
10636 (synopsis "Mocking framework for Python")
10637 (description
10638 "Chai provides an api for mocking, stubbing and spying your python
10639 objects, patterned after the Mocha library for Ruby.")
10640 (license license:bsd-3)))
10641
10642 (define-public python2-chai
10643 (package-with-python2 python-chai))
10644
10645 (define-public python-inflection
10646 (package
10647 (name "python-inflection")
10648 (version "0.3.1")
10649 (source
10650 (origin (method url-fetch)
10651 (uri (pypi-uri "inflection" version))
10652 (sha256
10653 (base32
10654 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
10655 (build-system python-build-system)
10656 (native-inputs
10657 `(("python-pytest" ,python-pytest)))
10658 (home-page "https://github.com/jpvanhal/inflection")
10659 (synopsis "Python string transformation library")
10660 (description
10661 "Inflection is a string transformation library. It singularizes
10662 and pluralizes English words, and transforms strings from CamelCase to
10663 underscored string.")
10664 (license license:expat)))
10665
10666 (define-public python2-inflection
10667 (package-with-python2 python-inflection))
10668
10669 (define-public python-pylev
10670 (package
10671 (name "python-pylev")
10672 (version "1.3.0")
10673 (source (origin
10674 (method url-fetch)
10675 (uri (pypi-uri "pylev" version))
10676 (sha256
10677 (base32
10678 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
10679 (build-system python-build-system)
10680 (home-page "https://github.com/toastdriven/pylev")
10681 (synopsis "Levenshtein distance implementation in Python")
10682 (description "Pure Python Levenshtein implementation, based off the
10683 Wikipedia code samples at
10684 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
10685 (license license:bsd-3)))
10686
10687 (define-public python2-pylev
10688 (package-with-python2 python-pylev))
10689
10690 (define-public python-cleo
10691 (package
10692 (name "python-cleo")
10693 (version "0.7.6")
10694 (source (origin
10695 (method url-fetch)
10696 (uri (pypi-uri "cleo" version))
10697 (sha256
10698 (base32
10699 "02dlc0rn43zgvw0s5v4j80bca9n1jfpwy3r78gn9qjgk0qj39kwr"))))
10700 (build-system python-build-system)
10701 (native-inputs
10702 `( ;; For testing
10703 ("python-mock" ,python-mock)
10704 ("python-pytest-mock" ,python-pytest-mock)
10705 ("python-pytest" ,python-pytest)))
10706 (propagated-inputs
10707 `(("python-backpack" ,python-backpack)
10708 ("python-clikit" ,python-clikit)
10709 ("python-pastel" ,python-pastel)
10710 ("python-pylev" ,python-pylev)))
10711 (home-page "https://github.com/sdispater/cleo")
10712 (synopsis "Command-line arguments library for Python")
10713 (description
10714 "Cleo allows you to create command-line commands with signature in
10715 docstring and colored output.")
10716 (license license:expat)))
10717
10718 (define-public python2-cleo
10719 (package-with-python2 python-cleo))
10720
10721 (define-public python-tomlkit
10722 (package
10723 (name "python-tomlkit")
10724 (version "0.5.11")
10725 (source
10726 (origin
10727 (method url-fetch)
10728 (uri (pypi-uri "tomlkit" version))
10729 (sha256
10730 (base32 "1kq1663iqxgwrmb883n55ypi5axnixla2hrby9g2x227asifsi7h"))))
10731 (build-system python-build-system)
10732 (native-inputs
10733 `(("python-pytest" ,python-pytest)))
10734 (home-page "https://github.com/sdispater/tomlkit")
10735 (synopsis "Style-preserving TOML library")
10736 (description
10737 "TOML Kit is a 0.5.0-compliant TOML library. It includes a parser that
10738 preserves all comments, indentations, whitespace and internal element ordering,
10739 and makes them accessible and editable via an intuitive API. It can also
10740 create new TOML documents from scratch using the provided helpers. Part of the
10741 implementation has been adapted, improved, and fixed from Molten.")
10742 (license license:expat)))
10743
10744 (define-public python-shellingham
10745 (package
10746 (name "python-shellingham")
10747 (version "1.3.1")
10748 (source
10749 (origin
10750 (method url-fetch)
10751 (uri (pypi-uri "shellingham" version))
10752 (sha256
10753 (base32
10754 "1q7kws7w4x2hji3g7y0ni9ddk4sd676ylrb3db54gbpys6xj6nwq"))))
10755 (build-system python-build-system)
10756 (home-page
10757 "https://github.com/sarugaku/shellingham")
10758 (synopsis "Tool to detect surrounding shell")
10759 (description
10760 "Shellingham detects what shell the current Python executable is
10761 running in.")
10762 (license license:isc)))
10763
10764 (define-public python-memcached
10765 (package
10766 (name "python-memcached")
10767 (version "1.59")
10768 (source
10769 (origin
10770 (method url-fetch)
10771 (uri (pypi-uri "python-memcached" version))
10772 (sha256
10773 (base32
10774 "0kvyapavbirk2x3n1jx4yb9nyigrj1s3x15nm3qhpvhkpqvqdqm2"))))
10775 (build-system python-build-system)
10776 (propagated-inputs `(("python-six" ,python-six)))
10777 (home-page
10778 "https://github.com/linsomniac/python-memcached")
10779 (synopsis "Pure python memcached client")
10780 (description
10781 "This software is a pure Python interface to the memcached memory cache
10782 daemon. It is the client side software which allows storing values in one or
10783 more, possibly remote, memcached servers.")
10784 (license license:psfl)))
10785
10786 (define-public python-clikit
10787 (package
10788 (name "python-clikit")
10789 (version "0.4.1")
10790 (source
10791 (origin
10792 (method url-fetch)
10793 (uri (pypi-uri "clikit" version))
10794 (sha256
10795 (base32
10796 "10gab65pq0jdf589n33sj2513pxal2lisl4xwf1ijysdjxmpdr4a"))))
10797 (build-system python-build-system)
10798 (propagated-inputs
10799 `(("python-pastel" ,python-pastel)
10800 ("python-pylev" ,python-pylev)))
10801 (home-page "https://github.com/sdispater/clikit")
10802 (synopsis "Group of utilities to build command line interfaces")
10803 (description
10804 "CliKit is a group of utilities to build testable command line
10805 interfaces.")
10806 (license license:expat)))
10807
10808 (define-public python-msgpack-python
10809 (package
10810 (name "python-msgpack-python")
10811 (version "0.5.6")
10812 (source
10813 (origin
10814 (method url-fetch)
10815 (uri (pypi-uri "msgpack-python" version))
10816 (sha256
10817 (base32
10818 "16wh8qgybmfh4pjp8vfv78mdlkxfmcasg78lzlnm6nslsfkci31p"))))
10819 (build-system python-build-system)
10820 (home-page "http://msgpack.org/")
10821 (synopsis "Package to deserialize messages in MessagePack binary format")
10822 (description
10823 "MessagePack is an efficient binary serialization format. It lets you
10824 exchange data among multiple languages like JSON. But it's faster and
10825 smaller. Small integers are encoded into a single byte, and typical short
10826 strings require only one extra byte in addition to the strings themselves.")
10827 (license license:asl2.0)))
10828
10829 (define-public python-cachy
10830 (package
10831 (name "python-cachy")
10832 (version "0.2.0")
10833 (source
10834 (origin
10835 (method url-fetch)
10836 (uri (pypi-uri "cachy" version))
10837 (sha256
10838 (base32
10839 "0v6mjyhgx6j7ya20bk69cr3gdzdkdf6psay0h090rscclgji65dp"))))
10840 (build-system python-build-system)
10841 (native-inputs
10842 `(("python-fakeredis" ,python-fakeredis)
10843 ("python-flexmock" ,python-flexmock)
10844 ("python-pytest" ,python-pytest)))
10845 (propagated-inputs
10846 `(("python-memcached" ,python-memcached)
10847 ("python-msgpack-python" ,python-msgpack-python)
10848 ("python-redis" ,python-redis)))
10849 (home-page "https://github.com/sdispater/cachy")
10850 (synopsis "Simple yet effective caching library")
10851 (description
10852 "Cachy provides a simple yet effective caching library. A simple but
10853 powerful API: thread-safety; decorator syntax; support for memcached, redis,
10854 database, file, dict stores. Cachy supports python versions 2.7+ and 3.2+.")
10855 (license license:expat)))
10856
10857 (define-public poetry
10858 (package
10859 (name "poetry")
10860 (version "0.12.17")
10861 ;; Poetry can only be built from source with poetry.
10862 (source
10863 (origin
10864 (method url-fetch)
10865 (uri (pypi-uri "poetry" version))
10866 (sha256
10867 (base32
10868 "0gxwcd65qjmzqzppf53x51sic1rbcd9py6cdzx3aprppipimslvf"))))
10869 (build-system python-build-system)
10870 (arguments
10871 `(#:tests? #f ;; Pypi does not have tests.
10872 #:phases
10873 (modify-phases %standard-phases
10874 (replace 'build
10875 (lambda _
10876 ;; Bug in poetry https://github.com/sdispater/poetry/issues/866.
10877 (invoke "sed" "-i" "-e" "s/from distutils.core/from setuptools/"
10878 "setup.py")
10879 #t)))))
10880 (propagated-inputs
10881 `(("python-cachecontrol" ,python-cachecontrol)
10882 ("python-cachy" ,python-cachy)
10883 ("python-cleo" ,python-cleo)
10884 ("python-glob2" ,python-glob2)
10885 ("python-html5lib" ,python-html5lib)
10886 ("python-jsonschema" ,python-jsonschema)
10887 ("python-msgpack" ,python-msgpack)
10888 ("python-pkginfo" ,python-pkginfo)
10889 ("python-pyparsing" ,python-pyparsing)
10890 ("python-pyrsistent" ,python-pyrsistent)
10891 ("python-requests" ,python-requests)
10892 ("python-requests-toolbelt" ,python-requests-toolbelt)
10893 ("python-shellingham" ,python-shellingham)
10894 ("python-tomlkit" ,python-tomlkit)
10895 ("python-virtualenv" ,python-virtualenv)))
10896 (home-page "https://poetry.eustace.io/")
10897 (synopsis "Python dependency management and packaging made easy")
10898 (description "Poetry is a tool for dependency management and packaging
10899 in Python. It allows you to declare the libraries your project depends on and
10900 it will manage (install/update) them for you.")
10901 (license license:expat)))
10902
10903 (define-public python-lazy-object-proxy
10904 (package
10905 (name "python-lazy-object-proxy")
10906 (version "1.4.3")
10907 (source (origin
10908 (method url-fetch)
10909 (uri (pypi-uri "lazy-object-proxy" version))
10910 (sha256
10911 (base32
10912 "1w1aaay424ciz8fz3fkzxb0pxzfxn184f2whpyn4fx72bn50x47k"))))
10913 (native-inputs
10914 `(("python-setuptools-scm" ,python-setuptools-scm-3.3)))
10915 (build-system python-build-system)
10916 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
10917 (synopsis "Lazy object proxy for python")
10918 (description
10919 "Lazy object proxy is an object that wraps a callable but defers the call
10920 until the object is actually required, and caches the result of said call.")
10921 (license license:bsd-2)))
10922
10923 (define-public python2-lazy-object-proxy
10924 (package-with-python2 python-lazy-object-proxy))
10925
10926 (define-public python-dnspython
10927 (package
10928 (name "python-dnspython")
10929 (version "1.15.0")
10930 (source (origin
10931 (method url-fetch)
10932 (uri (string-append "http://www.dnspython.org/kits/"
10933 version "/dnspython-" version ".tar.gz"))
10934 (sha256
10935 (base32
10936 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
10937 (build-system python-build-system)
10938 (arguments '(#:tests? #f)) ; XXX: requires internet access
10939 (home-page "http://www.dnspython.org")
10940 (synopsis "DNS toolkit for Python")
10941 (description
10942 "dnspython is a DNS toolkit for Python. It supports almost all record
10943 types. It can be used for queries, zone transfers, and dynamic updates.
10944 It supports TSIG authenticated messages and EDNS0.")
10945 (license license:expat)))
10946
10947 (define-public python2-dnspython
10948 (package-with-python2 python-dnspython))
10949
10950 (define-public python-email-validator
10951 (package
10952 (name "python-email-validator")
10953 (version "1.0.2")
10954 (source
10955 (origin (method url-fetch)
10956 (uri (pypi-uri "email_validator" version))
10957 (sha256
10958 (base32
10959 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
10960 (build-system python-build-system)
10961 (arguments
10962 '(#:phases
10963 (modify-phases %standard-phases
10964 (add-before 'build 'use-dnspython
10965 (lambda _
10966 (substitute* "setup.py"
10967 (("dnspython3") "dnspython"))
10968 #t)))))
10969 (propagated-inputs
10970 `(("python-dnspython" ,python-dnspython)
10971 ("python-idna" ,python-idna)))
10972 (home-page "https://github.com/JoshData/python-email-validator")
10973 (synopsis "Email address validation library for Python")
10974 (description
10975 "This library validates email address syntax and deliverability.")
10976 (license license:cc0)))
10977
10978 (define-public python2-email-validator
10979 (package-with-python2 python-email-validator))
10980
10981 (define-public python-ukpostcodeparser
10982 (package
10983 (name "python-ukpostcodeparser")
10984 (version "1.0.3")
10985 (source (origin
10986 (method url-fetch)
10987 (uri (pypi-uri "UkPostcodeParser" version))
10988 (sha256
10989 (base32
10990 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
10991 (build-system python-build-system)
10992 (home-page "https://github.com/hamstah/ukpostcodeparser")
10993 (synopsis "UK Postcode parser for Python")
10994 (description
10995 "This library provides the @code{parse_uk_postcode} function for
10996 parsing UK postcodes.")
10997 (license license:expat)))
10998
10999 (define-public python2-ukpostcodeparser
11000 (package-with-python2 python-ukpostcodeparser))
11001
11002 (define-public python-faker
11003 (package
11004 (name "python-faker")
11005 (version "0.7.9")
11006 (source (origin
11007 (method url-fetch)
11008 (uri (pypi-uri "Faker" version))
11009 (sha256
11010 (base32
11011 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
11012 (patches
11013 (search-patches "python-faker-fix-build-32bit.patch"))
11014 (modules '((guix build utils)))
11015 (snippet
11016 '(begin
11017 (for-each delete-file (find-files "." "\\.pyc$"))
11018 #t))))
11019 (build-system python-build-system)
11020 (arguments
11021 '(#:phases
11022 (modify-phases %standard-phases
11023 (replace 'check
11024 (lambda _ (invoke "python" "-m" "unittest" "-v" "tests"))))))
11025 (native-inputs
11026 `(;; For testing
11027 ("python-email-validator" ,python-email-validator)
11028 ("python-mock" ,python-mock)
11029 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
11030 (propagated-inputs
11031 `(("python-dateutil" ,python-dateutil)
11032 ("python-six" ,python-six)))
11033 (home-page "https://github.com/joke2k/faker")
11034 (synopsis "Python package that generates fake data")
11035 (description
11036 "Faker is a Python package that generates fake data such as names,
11037 addresses, and phone numbers.")
11038 (license license:expat)
11039 (properties `((python2-variant . ,(delay python2-faker))))))
11040
11041 (define-public python2-faker
11042 (let ((base (package-with-python2 (strip-python2-variant
11043 python-faker))))
11044 (package
11045 (inherit base)
11046 (propagated-inputs
11047 `(("python2-ipaddress" ,python2-ipaddress)
11048 ,@(package-propagated-inputs base))))))
11049
11050 (define-public python-pyaml
11051 (package
11052 (name "python-pyaml")
11053 (version "18.11.0")
11054 (source (origin
11055 (method url-fetch)
11056 (uri (pypi-uri "pyaml" version))
11057 (sha256
11058 (base32
11059 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
11060 (build-system python-build-system)
11061 (native-inputs
11062 `(("python-unidecode" ,python-unidecode)))
11063 (propagated-inputs
11064 `(("python-pyyaml" ,python-pyyaml)))
11065 (home-page "https://github.com/mk-fg/pretty-yaml")
11066 (synopsis "YAML pretty-print library for Python")
11067 (description
11068 "pyaml is a PyYAML based python module to produce pretty and readable
11069 YAML-serialized data.")
11070 (license license:wtfpl2)))
11071
11072 (define-public python2-pyaml
11073 (package-with-python2 python-pyaml))
11074
11075 (define-public python-backpack
11076 (package
11077 (name "python-backpack")
11078 (version "0.1")
11079 (source
11080 (origin
11081 (method url-fetch)
11082 (uri (pypi-uri "backpack" version))
11083 (sha256
11084 (base32
11085 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
11086 (build-system python-build-system)
11087 (native-inputs
11088 `(("python-pytest" ,python-pytest)
11089 ("python-nose" ,python-nose)))
11090 (propagated-inputs
11091 `(("python-simplejson" ,python-simplejson)))
11092 (home-page "https://github.com/sdispater/backpack")
11093 (synopsis "Utilities for working with Python collections")
11094 (description "Backpack provides some useful utilities for working with
11095 collections of data.")
11096 (license license:expat)))
11097
11098 (define-public python2-backpack
11099 (package-with-python2 python-backpack))
11100
11101 (define-public python-prompt-toolkit
11102 (package
11103 (name "python-prompt-toolkit")
11104 (version "2.0.7")
11105 (source
11106 (origin
11107 (method url-fetch)
11108 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
11109 (sha256
11110 (base32
11111 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
11112 (build-system python-build-system)
11113 (arguments
11114 `(#:phases
11115 (modify-phases %standard-phases
11116 (delete 'check)
11117 (add-after 'install 'post-install-check
11118 (lambda* (#:key inputs outputs #:allow-other-keys)
11119 ;; HOME is needed for the test
11120 ;; "test_pathcompleter_can_expanduser".
11121 (setenv "HOME" "/tmp")
11122 (add-installed-pythonpath inputs outputs)
11123 (invoke "py.test"))))))
11124 (propagated-inputs
11125 `(("python-wcwidth" ,python-wcwidth)
11126 ("python-six" ,python-six)
11127 ("python-pygments" ,python-pygments)))
11128 (native-inputs
11129 `(("python-pytest" ,python-pytest)))
11130 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
11131 (synopsis "Library for building command line interfaces in Python")
11132 (description
11133 "Prompt-Toolkit is a library for building interactive command line
11134 interfaces in Python. It's like GNU Readline but it also features syntax
11135 highlighting while typing, out-of-the-box multi-line input editing, advanced
11136 code completion, incremental search, support for Chinese double-width
11137 characters, mouse support, and auto suggestions.")
11138 (license license:bsd-3)))
11139
11140 (define-public python2-prompt-toolkit
11141 (package-with-python2 python-prompt-toolkit))
11142
11143 (define-public python-prompt-toolkit-1
11144 (package (inherit python-prompt-toolkit)
11145 (version "1.0.15")
11146 (source
11147 (origin
11148 (method url-fetch)
11149 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
11150 (sha256
11151 (base32
11152 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
11153
11154 (define-public python2-prompt-toolkit-1
11155 (package-with-python2 python-prompt-toolkit-1))
11156
11157 (define-public python-jedi
11158 (package
11159 (name "python-jedi")
11160 (version "0.15.1")
11161 (source
11162 (origin
11163 (method url-fetch)
11164 (uri (pypi-uri "jedi" version))
11165 (sha256
11166 (base32
11167 "0bp4pxhsynaarbvzblsn5x32lzp29svy3sxfy8i6m5iwz9s9r1ds"))))
11168 (build-system python-build-system)
11169 (arguments
11170 `(#:phases
11171 (modify-phases %standard-phases
11172 (add-after 'unpack 'disable-file-completion-test
11173 ;; A single parameterized test currently fail (see:
11174 ;; https://github.com/davidhalter/jedi/issues/1395). Remove it.
11175 (lambda _
11176 (substitute* "test/test_api/test_completion.py"
11177 ((".*'example.py', 'rb\"' \\+ join\\('\\.\\.'.*") ""))
11178 #t))
11179 (replace 'check
11180 (lambda _
11181 (setenv "HOME" "/tmp")
11182 (invoke "python" "-m" "pytest"))))))
11183 (native-inputs
11184 `(("python-pytest" ,python-pytest)
11185 ("python-docopt" ,python-docopt)))
11186 (propagated-inputs
11187 `(("python-parso" ,python-parso)))
11188 (home-page "https://github.com/davidhalter/jedi")
11189 (synopsis "Autocompletion and static analysis library for Python")
11190 (description
11191 "Jedi is a static analysis tool for Python that can be used in Integrated
11192 Development Environments (@dfn{IDE}s) and text editors. It understands Python
11193 on a deeper level than many other static analysis frameworks for Python.
11194
11195 Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
11196 well.")
11197 (license license:expat)))
11198
11199 (define-public python2-jedi
11200 (package-with-python2 python-jedi))
11201
11202 (define-public ptpython
11203 (package
11204 (name "ptpython")
11205 (version "0.34")
11206 (source (origin
11207 (method url-fetch)
11208 (uri (pypi-uri "ptpython" version))
11209 (sha256
11210 (base32
11211 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
11212 (build-system python-build-system)
11213 (arguments
11214 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
11215 (propagated-inputs
11216 `(("python-docopt" ,python-docopt)
11217 ("python-jedi" ,python-jedi)
11218 ("python-prompt-toolkit" ,python-prompt-toolkit)
11219 ("python-pygments" ,python-pygments)))
11220 (home-page "https://github.com/jonathanslenders/ptpython")
11221 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
11222 (description
11223 "ptpython is a Python read-eval-print loop with IDE-like features.
11224 It supports syntax highlighting, multiline editing, autocompletion, mouse,
11225 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
11226 etc.")
11227 (license license:bsd-3)
11228 (properties `((python2-variant . ,(delay ptpython-2))))))
11229
11230 (define-public ptpython-2
11231 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
11232 (package
11233 (inherit base)
11234 (name "ptpython2"))))
11235
11236 (define-public python-stem
11237 (package
11238 (name "python-stem")
11239 (version "1.7.1")
11240 (source
11241 (origin
11242 (method url-fetch)
11243 (uri (pypi-uri "stem" version))
11244 (sha256
11245 (base32
11246 "18lc95pmc7i089nlsb06dsxyjl5wbhxfqgdxbjcia35ndh8z7sn9"))))
11247 (build-system python-build-system)
11248 (arguments
11249 `(#:phases
11250 (modify-phases %standard-phases
11251 (replace 'check
11252 (lambda _
11253 (invoke "./run_tests.py" "--unit")
11254 #t)))))
11255 (native-inputs
11256 `(("python-mock" ,python-mock)
11257 ("python-pycodestyle" ,python-pycodestyle)
11258 ("python-pyflakes" ,python-pyflakes)))
11259 (home-page "https://stem.torproject.org/")
11260 (synopsis
11261 "Python controller library that allows applications to interact with Tor")
11262 (description
11263 "Stem is a Python controller library for Tor. With it you can use Tor's
11264 control protocol to script against the Tor process and read descriptor data
11265 relays publish about themselves.")
11266 (license license:lgpl3)))
11267
11268 (define-public python2-stem
11269 (package-with-python2 python-stem))
11270
11271 (define-public python-pyserial
11272 (package
11273 (name "python-pyserial")
11274 (version "3.4")
11275 (source
11276 (origin
11277 (method url-fetch)
11278 (uri (pypi-uri "pyserial" version))
11279 (sha256
11280 (base32
11281 "09y68bczw324a4jb9a1cfwrbjhq179vnfkkkrybbksp0vqgl0bbf"))))
11282 (build-system python-build-system)
11283 (arguments
11284 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
11285 ;; #:phases
11286 ;; (modify-phases %standard-phases
11287 ;; (replace 'check
11288 ;; (lambda _
11289 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
11290 (home-page
11291 "https://github.com/pyserial/pyserial")
11292 (synopsis "Python Serial Port Bindings")
11293 (description "@code{pyserial} provide serial port bindings for Python. It
11294 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
11295 and/or Xon/Xoff. The port is accessed in RAW mode.")
11296 (license license:bsd-3)))
11297
11298 (define-public python2-pyserial
11299 (package-with-python2 python-pyserial))
11300
11301 (define-public python-kivy
11302 (package
11303 (name "python-kivy")
11304 (version "1.10.1")
11305 (source
11306 (origin
11307 (method url-fetch)
11308 (uri (pypi-uri "Kivy" version))
11309 (file-name (string-append name "-" version ".tar.gz"))
11310 (sha256
11311 (base32
11312 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
11313 (build-system python-build-system)
11314 (arguments
11315 `(#:tests? #f ; Tests require many optional packages
11316 #:phases
11317 (modify-phases %standard-phases
11318 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
11319 (lambda* (#:key inputs #:allow-other-keys)
11320 (setenv "KIVY_SDL2_PATH"
11321 (string-append (assoc-ref inputs "sdl-union")
11322 "/include/SDL2"))
11323 #t)))))
11324 (native-inputs
11325 `(("git" ,git)
11326 ("pkg-config" ,pkg-config)
11327 ("python-cython" ,python-cython)))
11328 (inputs
11329 `(("gstreamer" ,gstreamer)
11330 ("mesa" ,mesa)
11331 ("sdl-union"
11332 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
11333 (home-page "http://kivy.org")
11334 (synopsis
11335 "Multitouch application framework")
11336 (description
11337 "A software library for rapid development of
11338 hardware-accelerated multitouch applications.")
11339 (license license:expat)))
11340
11341 (define-public python2-kivy
11342 (package-with-python2 python-kivy))
11343
11344 (define-public python-kivy-next
11345 (deprecated-package "python-kivy-next" python-kivy))
11346
11347 (define-public python2-kivy-next
11348 (deprecated-package "python2-kivy-next" python2-kivy))
11349
11350 (define-public python-binaryornot
11351 (package
11352 (name "python-binaryornot")
11353 (version "0.4.4")
11354 (source (origin
11355 (method url-fetch)
11356 (uri (pypi-uri "binaryornot" version))
11357 (sha256
11358 (base32
11359 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
11360 (build-system python-build-system)
11361 (arguments
11362 `(#:phases
11363 (modify-phases %standard-phases
11364 (add-after 'unpack 'patch-tests
11365 (lambda _
11366 ;; TypeError: binary() got an unexpected keyword argument
11367 ;; 'average_size'.
11368 (substitute* "tests/test_check.py"
11369 (("average_size=512") ""))
11370 #t)))))
11371 (propagated-inputs
11372 `(("python-chardet" ,python-chardet)
11373 ("python-hypothesis" ,python-hypothesis)))
11374 (home-page "https://github.com/audreyr/binaryornot")
11375 (synopsis "Package to check if a file is binary or text")
11376 (description "Ultra-lightweight pure Python package to check if a file is
11377 binary or text.")
11378 (license license:bsd-3)
11379 (properties `((python2-variant . ,(delay python2-binaryornot))))))
11380
11381 (define-public python2-binaryornot
11382 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
11383 (package (inherit base)
11384 (propagated-inputs
11385 `(("python2-enum34" ,python2-enum34)
11386 ,@(package-propagated-inputs base))))))
11387
11388 (define-public python-binwalk
11389 (package
11390 (name "python-binwalk")
11391 (version "2.2.0")
11392 (source
11393 (origin
11394 (method git-fetch)
11395 (uri (git-reference
11396 (url "https://github.com/ReFirmLabs/binwalk")
11397 (commit (string-append "v" version))))
11398 (file-name (git-file-name name version))
11399 (sha256
11400 (base32
11401 "1bxgj569fzwv6jhcbl864nmlsi9x1k1r20aywjxc8b9b1zgqrlvc"))))
11402 (build-system python-build-system)
11403 (arguments
11404 `(#:phases
11405 (modify-phases %standard-phases
11406 (add-before 'check 'set-pythonpath
11407 (lambda _
11408 (setenv "PYTHONPATH"
11409 (string-append
11410 (getcwd) "/src/"
11411 ":" (getenv "PYTHONPATH")))
11412 (setenv "HOME" "")
11413 #t)))))
11414 (native-inputs
11415 `(("python-coverage" ,python-coverage)
11416 ("python-nose" ,python-nose)))
11417 (home-page "https://github.com/ReFirmLabs/binwalk")
11418 (synopsis "Firmware analysis tool")
11419 (description "Binwalk is a tool for analyzing, reverse engineering, and
11420 extracting firmware images")
11421 (license license:expat)))
11422
11423 (define-public python-nltk
11424 (package
11425 (name "python-nltk")
11426 (version "3.2.1")
11427 (source (origin
11428 (method url-fetch)
11429 (uri (pypi-uri "nltk" version))
11430 (sha256
11431 (base32
11432 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
11433 (build-system python-build-system)
11434 (arguments
11435 '(;; The tests require some extra resources to be downloaded.
11436 ;; TODO Try packaging these resources.
11437 #:tests? #f))
11438 (home-page "http://nltk.org/")
11439 (synopsis "Natural Language Toolkit")
11440 (description "It provides interfaces to over 50 corpora and lexical
11441 resources such as WordNet, along with a suite of text processing libraries
11442 for classification, tokenization, stemming, tagging, parsing, and semantic
11443 reasoning, wrappers for natural language processing libraries.")
11444 (license license:asl2.0)))
11445
11446 (define-public python2-nltk
11447 (package-with-python2 python-nltk))
11448
11449 (define-public python-pymongo
11450 (package
11451 (name "python-pymongo")
11452 (version "3.7.2")
11453 (source (origin
11454 (method url-fetch)
11455 (uri (pypi-uri "pymongo" version))
11456 (sha256
11457 (base32
11458 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
11459 (build-system python-build-system)
11460 (propagated-inputs
11461 `(("python-certifi" ,python-certifi)))
11462 (home-page "https://github.com/mongodb/mongo-python-driver")
11463 (synopsis "Python driver for MongoDB")
11464 (description "Python driver for MongoDB.")
11465 (license license:asl2.0)))
11466
11467 (define-public python2-pymongo
11468 (package-with-python2 python-pymongo))
11469
11470 (define-public python-consul
11471 (package
11472 (name "python-consul")
11473 (version "0.6.1")
11474 (source
11475 (origin
11476 (method url-fetch)
11477 (uri (pypi-uri "python-consul" version))
11478 (sha256
11479 (base32
11480 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
11481 (build-system python-build-system)
11482 (arguments
11483 '(#:tests? #f)) ; The tests are not distributed
11484 (propagated-inputs
11485 `(("python-requests" ,python-requests)
11486 ("python-six" ,python-six)))
11487 (home-page "https://github.com/cablehead/python-consul")
11488 (synopsis "Python client for Consul")
11489 (description
11490 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
11491 discovery, monitoring and configuration.")
11492 (license license:expat)))
11493
11494 (define-public python2-consul
11495 (package-with-python2 python-consul))
11496
11497 (define-public python-schematics
11498 (package
11499 (name "python-schematics")
11500 (version "1.1.1")
11501 (source
11502 (origin
11503 (method git-fetch)
11504 (uri (git-reference
11505 (url "https://github.com/schematics/schematics.git")
11506 (commit (string-append "v" version))))
11507 (file-name (git-file-name name version))
11508 (sha256
11509 (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd"))))
11510 (build-system python-build-system)
11511 (propagated-inputs
11512 `(("python-six" ,python-six)))
11513 (arguments
11514 ;; The tests require a bunch of not very nice packages with fixed
11515 ;; version requirements (e.g. python-coveralls).
11516 `(#:tests? #f))
11517 (home-page "https://github.com/schematics/schematics")
11518 (synopsis "Python Data Structures for Humans")
11519 (description "Python Data Structures for Humans.")
11520 (license license:bsd-3)))
11521
11522 (define-public python2-schematics
11523 (package-with-python2 python-schematics))
11524
11525 (define-public python-odfpy
11526 (package
11527 (name "python-odfpy")
11528 (version "1.3.3")
11529 (source (origin
11530 (method url-fetch)
11531 (uri (pypi-uri "odfpy" version))
11532 (sha256
11533 (base32
11534 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
11535 (arguments
11536 `(#:modules ((srfi srfi-1)
11537 (guix build python-build-system)
11538 (guix build utils))
11539 #:phases
11540 (modify-phases %standard-phases
11541 (replace 'check
11542 ;; The test runner invokes python2 and python3 for test*.py.
11543 ;; To avoid having both in inputs, we replicate it here.
11544 (lambda _
11545 (for-each (lambda (test-file) (invoke "python" test-file))
11546 (find-files "tests" "^test.*\\.py$"))
11547 #t)))))
11548 (build-system python-build-system)
11549 (home-page "https://github.com/eea/odfpy")
11550 (synopsis "Python API and tools to manipulate OpenDocument files")
11551 (description "Collection of libraries and utility programs written in
11552 Python to manipulate OpenDocument 1.2 files.")
11553 (license
11554 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
11555 ;; number of files with other licenses.
11556 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
11557
11558 (define-public python2-odfpy
11559 (package-with-python2 python-odfpy))
11560
11561 (define-public python-natsort
11562 (package
11563 (name "python-natsort")
11564 (version "5.4.1")
11565 (source (origin
11566 (method url-fetch)
11567 (uri (pypi-uri "natsort" version))
11568 (sha256
11569 (base32
11570 "0i732amg6yzkx4g4c9j09jmqq39q377x9cl2nbkm5hax2c2v0wxf"))))
11571 (build-system python-build-system)
11572 (arguments
11573 `(#:modules ((guix build utils)
11574 (guix build python-build-system)
11575 (srfi srfi-1)
11576 (srfi srfi-26)
11577 (ice-9 ftw))
11578 #:phases
11579 (modify-phases %standard-phases
11580 (add-before 'check 'set-cachedir
11581 ;; Tests require write access to $HOME by default
11582 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
11583 (replace 'check
11584 (lambda _
11585 (let ((cwd (getcwd)))
11586 (setenv "PYTHONPATH"
11587 (string-append
11588 cwd "/build/"
11589 (find (cut string-prefix? "lib" <>)
11590 (scandir (string-append cwd "/build")))
11591 ":"
11592 (getenv "PYTHONPATH")))
11593 (invoke "pytest" "-v")))))))
11594 (native-inputs
11595 `(("python-hypothesis" ,python-hypothesis)
11596 ("python-pytest-cov" ,python-pytest-cov)
11597 ("python-pytest-mock" ,python-pytest-mock)
11598 ("python-pytest" ,python-pytest)))
11599 (propagated-inputs ; TODO: Add python-fastnumbers.
11600 `(("python-pyicu" ,python-pyicu)))
11601 (home-page "https://github.com/SethMMorton/natsort")
11602 (synopsis "Natural sorting for python and shell")
11603 (description
11604 "Natsort lets you apply natural sorting on lists instead of
11605 lexicographical. If you use the built-in @code{sorted} method in python
11606 on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4},
11607 @code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20},
11608 @code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that
11609 identifies numbers and sorts them separately from strings. It can also sort
11610 version numbers, real numbers, mixed types and more, and comes with a shell
11611 command @command{natsort} that exposes this functionality in the command line.")
11612 (license license:expat)
11613 (properties `((python2-variant . ,(delay python2-natsort))))))
11614
11615 (define-public python2-natsort
11616 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
11617 (package (inherit base)
11618 (native-inputs
11619 `(("python2-pathlib" ,python2-pathlib)
11620 ,@(package-native-inputs base))))))
11621
11622 (define-public python-glances
11623 (package
11624 (name "python-glances")
11625 (version "3.1.2")
11626 (source
11627 (origin
11628 (method url-fetch)
11629 (uri (pypi-uri "Glances" version))
11630 (sha256
11631 (base32 "15384pbvw9wj4sb8zgvd9v1812vrypbyjg0acicjf1hdb3p30fkk"))
11632 (modules '((guix build utils)))
11633 (snippet
11634 '(begin
11635 ;; Glances phones PyPI for weekly update checks by default.
11636 ;; Disable these. The user can re-enable them if desired.
11637 (substitute* "glances/outdated.py"
11638 (("^(.*)self\\.load_config\\(config\\)\n" line indentation)
11639 (string-append indentation
11640 "self.args.disable_check_update = True\n"
11641 line)))
11642 #t))))
11643 (build-system python-build-system)
11644 (propagated-inputs
11645 `(("python-future" ,python-future)
11646 ("python-psutil" ,python-psutil)))
11647 (home-page "https://github.com/nicolargo/glances")
11648 (synopsis "Cross-platform curses-based monitoring tool")
11649 (description
11650 "Glances is a curses-based monitoring tool for a wide variety of platforms.
11651 Glances uses the PsUtil library to get information from your system. It
11652 monitors CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
11653 (license license:lgpl3+)))
11654
11655 (define-public python2-glances
11656 (package-with-python2 python-glances))
11657
11658 (define-public python-graphql-core
11659 (package
11660 (name "python-graphql-core")
11661 (version "0.5.3")
11662 (source
11663 (origin
11664 (method url-fetch)
11665 (uri (pypi-uri "graphql-core" version))
11666 (sha256
11667 (base32
11668 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
11669 (build-system python-build-system)
11670 (arguments
11671 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
11672 #:phases
11673 (modify-phases %standard-phases
11674 (add-after 'unpack 'patch-hardcoded-version
11675 (lambda _ (substitute*
11676 "setup.py"
11677 (("'gevent==1.1rc1'") "'gevent'"))
11678 #t)))))
11679 (native-inputs
11680 `(("python-gevent" ,python-gevent)
11681 ("python-mock" ,python-mock)
11682 ("python-pytest-mock" ,python-pytest-mock)))
11683 (propagated-inputs
11684 `(("python-promise" ,python-promise)
11685 ("python-six" ,python-six)))
11686 (home-page "https://github.com/graphql-python/graphql-core")
11687 (synopsis "GraphQL implementation for Python")
11688 (description
11689 "GraphQL implementation for Python. GraphQL is a data query language and
11690 runtime designed and used to request and deliver data to mobile and web apps.
11691 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
11692 to Python.")
11693 (license license:expat)))
11694
11695 (define-public python2-graphql-core
11696 (package-with-python2 python-graphql-core))
11697
11698 (define-public python-graphql-relay
11699 (package
11700 (name "python-graphql-relay")
11701 (version "0.4.5")
11702 (source
11703 (origin
11704 (method url-fetch)
11705 (uri (pypi-uri "graphql-relay" version))
11706 (sha256
11707 (base32
11708 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
11709 (build-system python-build-system)
11710 (arguments
11711 '(#:tests? #f)) ; The tests are not distributed
11712 (propagated-inputs
11713 `(("python-graphql-core" ,python-graphql-core)
11714 ("python-promise" ,python-promise)
11715 ("python-six" ,python-six)))
11716 (home-page "https://github.com/graphql-python/graphql-relay-py")
11717 (synopsis "Relay implementation for Python")
11718 (description
11719 "This is a library to allow the easy creation of Relay-compliant servers
11720 using the GraphQL Python reference implementation of a GraphQL server. It
11721 should be noted that the code is a exact port of the original
11722 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
11723 from Facebook.")
11724 (license license:expat)))
11725
11726 (define-public python2-graphql-relay
11727 (package-with-python2 python-graphql-relay))
11728
11729 (define-public python-graphene
11730 (package
11731 (name "python-graphene")
11732 (version "0.10.2")
11733 (source
11734 (origin
11735 (method url-fetch)
11736 (uri (pypi-uri "graphene" version))
11737 (sha256
11738 (base32
11739 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
11740 (build-system python-build-system)
11741 (propagated-inputs
11742 `(("python-graphql-core" ,python-graphql-core)
11743 ("python-graphql-relay" ,python-graphql-relay)
11744 ("python-iso8601" ,python-iso8601)
11745 ("python-promise" ,python-promise)
11746 ("python-six" ,python-six)))
11747 (arguments
11748 `(#:tests? #f)) ; no tests/ in the PyPI tarball
11749 (home-page "https://graphene-python.org/")
11750 (synopsis "GraphQL Framework for Python")
11751 (description
11752 "Graphene is a Python library for building GraphQL schemas/types.
11753 A GraphQL schema describes your data model, and provides a GraphQL server
11754 with an associated set of resolve methods that know how to fetch data.")
11755 (properties `((python2-variant . ,(delay python2-graphene))))
11756 (license license:expat)))
11757
11758 (define-public python2-graphene
11759 (let ((base (package-with-python2
11760 (strip-python2-variant python-graphene))))
11761 (package (inherit base)
11762 (native-inputs
11763 `(("python2-sqlalchemy" ,python2-sqlalchemy)
11764 ,@(package-native-inputs base))))))
11765
11766 (define-public python-nautilus
11767 (package
11768 (name "python-nautilus")
11769 (version "0.4.9")
11770 (source
11771 (origin
11772 (method url-fetch)
11773 (uri (pypi-uri "nautilus" version))
11774 (sha256
11775 (base32
11776 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
11777 (build-system python-build-system)
11778 (arguments `(#:tests? #f)) ; fails to import test modules
11779 (propagated-inputs
11780 `(("python-bcrypt" ,python-bcrypt)
11781 ("python-click" ,python-click)
11782 ("python-consul" ,python-consul)
11783 ("python-graphene" ,python-graphene)
11784 ("python-jinja2" ,python-jinja2)
11785 ("python-peewee" ,python-peewee)
11786 ("python-pika" ,python-pika)
11787 ("python-tornado" ,python-tornado)
11788 ("python-wtforms" ,python-wtforms)))
11789 (native-inputs
11790 `(("python-nose2" ,python-nose2)))
11791 (home-page "https://github.com/AlecAivazis/nautilus")
11792 (synopsis "Library for creating microservice applications")
11793 (description
11794 "Nautilus is a framework for flux based microservices that looks to
11795 provide extendible implementations of common aspects of a cloud so that you can
11796 focus on building massively scalable web applications.")
11797 (license license:expat)))
11798
11799 (define-public python-snowballstemmer
11800 (package
11801 (name "python-snowballstemmer")
11802 (version "1.2.1")
11803 (source (origin
11804 (method url-fetch)
11805 (uri (pypi-uri "snowballstemmer" version))
11806 (sha256
11807 (base32
11808 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
11809 (build-system python-build-system)
11810 (arguments
11811 `(;; No tests exist
11812 #:tests? #f))
11813 (home-page "https://github.com/shibukawa/snowball_py")
11814 (synopsis "Snowball stemming library collection for Python")
11815 (description "This package provides 16 word stemmer algorithms generated
11816 from Snowball algorithms. It includes the 15 original ones plus the Poerter
11817 English stemmer.")
11818 (license license:bsd-3)))
11819
11820 (define-public python2-snowballstemmer
11821 (package-with-python2 python-snowballstemmer))
11822
11823 (define-public python-setproctitle
11824 (package
11825 (name "python-setproctitle")
11826 (version "1.1.10")
11827 (source
11828 (origin
11829 (method url-fetch)
11830 (uri (pypi-uri "setproctitle" version))
11831 (sha256
11832 (base32
11833 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
11834 (build-system python-build-system)
11835 (arguments
11836 '(#:phases
11837 (modify-phases %standard-phases
11838 (add-before 'check 'patch-Makefile
11839 ;; Stricly this is only required for the python2 variant.
11840 ;; But adding a phase in an inherited package seems to be
11841 ;; cumbersum. So we patch even for python3.
11842 (lambda _
11843 (let ((nose (assoc-ref %build-inputs "python2-nose")))
11844 (when nose
11845 (substitute* "Makefile"
11846 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
11847 (string-append nose "/bin/nosetests "))))
11848 #t)))
11849 (replace 'check
11850 (lambda _
11851 (setenv "PYTHON" (or (which "python3") (which "python")))
11852 (setenv "PYCONFIG" (or (which "python3-config")
11853 (which "python-config")))
11854 (setenv "CC" "gcc")
11855 ;; No need to extend PYTHONPATH to find the built package, since
11856 ;; the Makefile will build anyway
11857 (invoke "make" "check"))))))
11858 (native-inputs
11859 `(("procps" ,procps))) ; required for tests
11860 (home-page
11861 "https://github.com/dvarrazzo/py-setproctitle")
11862 (synopsis
11863 "Setproctitle implementation for Python to customize the process title")
11864 (description "The library allows a process to change its title (as displayed
11865 by system tools such as ps and top).
11866
11867 Changing the title is mostly useful in multi-process systems, for
11868 example when a master process is forked: changing the children's title
11869 allows to identify the task each process is busy with. The technique
11870 is used by PostgreSQL and the OpenSSH Server for example.")
11871 (license license:bsd-3)
11872 (properties `((python2-variant . ,(delay python2-setproctitle))))))
11873
11874 (define-public python2-setproctitle
11875 (let ((base (package-with-python2
11876 (strip-python2-variant python-setproctitle))))
11877 (package
11878 (inherit base)
11879 (native-inputs `(("python2-nose" ,python2-nose)
11880 ,@(package-native-inputs base))))))
11881
11882 (define-public python-validictory
11883 (package
11884 (name "python-validictory")
11885 (version "1.0.1")
11886 (source
11887 (origin
11888 (method url-fetch)
11889 (uri (pypi-uri "validictory" version))
11890 (sha256
11891 (base32
11892 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
11893 (build-system python-build-system)
11894 (arguments
11895 '(#:phases
11896 (modify-phases %standard-phases
11897 (add-after 'unpack 'bootstrap
11898 ;; Move the tests out of the package directory to avoid
11899 ;; packaging them.
11900 (lambda* _
11901 (rename-file "validictory/tests" "tests")
11902 (delete-file "tests/__init__.py")))
11903 (replace 'check
11904 (lambda _
11905 ;; Extend PYTHONPATH so the built package will be found.
11906 (setenv "PYTHONPATH"
11907 (string-append (getcwd) "/build/lib:"
11908 (getenv "PYTHONPATH")))
11909 (invoke "py.test" "-vv" ))))))
11910 (native-inputs
11911 `(("python-pytest" ,python-pytest)))
11912 (home-page
11913 "https://github.com/jamesturk/validictory")
11914 (synopsis "General purpose Python data validator")
11915 (description "It allows validation of arbitrary Python data structures.
11916
11917 The schema format is based on the JSON Schema
11918 proposal (http://json-schema.org), so combined with json the library is also
11919 useful as a validator for JSON data.")
11920 (license license:expat)))
11921
11922 (define-public python2-validictory
11923 (package-with-python2 python-validictory))
11924
11925 (define-public python-pyelftools
11926 (package
11927 (name "python-pyelftools")
11928 (version "0.25")
11929 (source
11930 (origin
11931 (method url-fetch)
11932 (uri (pypi-uri "pyelftools" version))
11933 (sha256
11934 (base32
11935 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
11936 (build-system python-build-system)
11937 (arguments
11938 `(#:phases
11939 (modify-phases %standard-phases
11940 (add-before 'check 'set-pythonpath
11941 (lambda _
11942 (setenv "PYTHONPATH"
11943 (string-append
11944 (getcwd) "/test/"
11945 ":" (getenv "PYTHONPATH")))
11946 #t)))))
11947 (home-page
11948 "https://github.com/eliben/pyelftools")
11949 (synopsis
11950 "Analyze binary and library file information")
11951 (description "This Python library provides interfaces for parsing and
11952 analyzing two binary and library file formats; the Executable and Linking
11953 Format (ELF), and debugging information in the Debugging With Attributed
11954 Record Format (DWARF).")
11955 (license license:public-domain)))
11956
11957 (define-public python-pyev
11958 (package
11959 (name "python-pyev")
11960 (version "0.9.0")
11961 (source
11962 (origin
11963 (method url-fetch)
11964 (uri (pypi-uri "pyev" version))
11965 (sha256
11966 (base32
11967 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
11968 (build-system python-build-system)
11969 (arguments
11970 `(#:tests? #f ; no test suite
11971 #:phases
11972 (modify-phases %standard-phases
11973 (add-after 'unpack 'patch
11974 (lambda* (#:key inputs #:allow-other-keys)
11975 (let ((libev (string-append (assoc-ref inputs "libev")
11976 "/lib/libev.so.4")))
11977 (substitute* "setup.py"
11978 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
11979 (string-append "libev_dll_name = \"" libev "\"")))))))))
11980 (inputs
11981 `(("libev" ,libev)))
11982 (home-page "http://pythonhosted.org/pyev/")
11983 (synopsis "Python libev interface")
11984 (description "Pyev provides a Python interface to libev.")
11985 (license license:gpl3)))
11986
11987 (define-public python2-pyev
11988 (package-with-python2 python-pyev))
11989
11990 (define-public python-imagesize
11991 (package
11992 (name "python-imagesize")
11993 (version "1.1.0")
11994 (source
11995 (origin
11996 (method url-fetch)
11997 (uri (pypi-uri "imagesize" version))
11998 (sha256
11999 (base32
12000 "1dg3wn7qpwmhgqc0r9na2ding1wif9q5spz3j9zn2riwphc2k0zk"))))
12001 (build-system python-build-system)
12002 (home-page "https://github.com/shibukawa/imagesize_py")
12003 (synopsis "Gets image size of files in various formats in Python")
12004 (description
12005 "This package allows determination of image size from
12006 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
12007 (license license:expat)))
12008
12009 (define-public python2-imagesize
12010 (package-with-python2 python-imagesize))
12011
12012 (define-public python-termstyle
12013 (package
12014 (name "python-termstyle")
12015 (version "0.1.11")
12016 (source
12017 (origin
12018 (method url-fetch)
12019 (uri (pypi-uri "termstyle" version))
12020 (sha256
12021 (base32
12022 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
12023 (build-system python-build-system)
12024 (arguments
12025 '(#:phases
12026 (modify-phases %standard-phases
12027 (replace 'check
12028 (lambda _
12029 (invoke "python" "test3.py"))))))
12030 (home-page "https://github.com/gfxmonk/termstyle")
12031 (synopsis "Console text coloring for Python")
12032 (description "This package provides console text coloring for Python.")
12033 (license license:bsd-3)))
12034
12035 (define-public python-argcomplete
12036 (package
12037 (name "python-argcomplete")
12038 (version "1.10.3")
12039 (source
12040 (origin
12041 (method url-fetch)
12042 (uri (pypi-uri "argcomplete" version))
12043 (sha256
12044 (base32
12045 "02jkc44drb0yjz6x28lvg6rj607n8r2irdpdvyylm8xnycn54zx3"))))
12046 (build-system python-build-system)
12047 (arguments
12048 `(#:phases
12049 (modify-phases %standard-phases
12050 (add-after 'unpack 'embed-tool-references
12051 (lambda _
12052 (substitute* "argcomplete/bash_completion.d/python-argcomplete.sh"
12053 ((" grep")
12054 (string-append " " (which "grep")))
12055 ((" egrep")
12056 (string-append " " (which "egrep")))
12057 (("elif which")
12058 (string-append "elif " (which "which")))
12059 (("\\$\\(which")
12060 (string-append "$(" (which "which"))))
12061 #t)))))
12062 (inputs
12063 `(("grep" ,grep)
12064 ("which" ,which)))
12065 (native-inputs
12066 `(("python-coverage" ,python-coverage)
12067 ("python-flake8" ,python-flake8)
12068 ("python-pexpect" ,python-pexpect)
12069 ("python-wheel" ,python-wheel)
12070 ("tcsh" ,tcsh)
12071 ("fish" ,fish)
12072 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
12073 (home-page "https://github.com/kislyuk/argcomplete")
12074 (synopsis "Shell tab completion for Python argparse")
12075 (description "argcomplete provides extensible command line tab completion
12076 of arguments and options for Python scripts using @code{argparse}. It's
12077 particularly useful for programs with many options or sub-parsers that can
12078 dynamically suggest completions; for example, when browsing resources over the
12079 network.")
12080 (license license:asl2.0)))
12081
12082 (define-public python2-argcomplete
12083 (package-with-python2 python-argcomplete))
12084
12085 (define-public python-xopen
12086 (package
12087 (name "python-xopen")
12088 (version "0.5.0")
12089 (source
12090 (origin
12091 (method url-fetch)
12092 (uri (pypi-uri "xopen" version))
12093 (sha256
12094 (base32
12095 "17xbrgi23l87yg6h0qcknssp2q812miiy33qw6v45v5gx0jwv5xh"))))
12096 (build-system python-build-system)
12097 (propagated-inputs
12098 `(("python-setuptools-scm" ,python-setuptools-scm)))
12099 (home-page "https://github.com/marcelm/xopen/")
12100 (synopsis "Open compressed files transparently")
12101 (description "This module provides an @code{xopen} function that works like
12102 Python's built-in @code{open} function, but can also deal with compressed files.
12103 Supported compression formats are gzip, bzip2 and, xz, and are automatically
12104 recognized by their file extensions. The focus is on being as efficient as
12105 possible on all supported Python versions.")
12106 (license license:expat)))
12107
12108 (define-public python2-xopen
12109 (let ((base (package-with-python2
12110 (strip-python2-variant python-xopen))))
12111 (package
12112 (inherit base)
12113 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
12114 ,@(package-propagated-inputs base))))))
12115
12116 (define-public python-cheetah
12117 (package
12118 (name "python-cheetah")
12119 (version "3.1.0")
12120 (source
12121 (origin
12122 (method url-fetch)
12123 (uri (pypi-uri "Cheetah3" version))
12124 (sha256
12125 (base32
12126 "1ihag9cxll6b86fc8v5lkhmr3brdbi4yiz16zpgw79yylmv8fgr9"))))
12127 (build-system python-build-system)
12128 (arguments
12129 `(#:modules ((guix build utils)
12130 (guix build python-build-system)
12131 (ice-9 ftw)
12132 (srfi srfi-1)
12133 (srfi srfi-26))
12134 #:phases (modify-phases %standard-phases
12135 (add-after 'unpack 'use-absolute-python
12136 (lambda _
12137 (substitute* "Cheetah/CheetahWrapper.py"
12138 (("#!/usr/bin/env python")
12139 (string-append "#!" (which "python"))))
12140 #t))
12141 (replace 'check
12142 (lambda _
12143 (let ((cwd (getcwd)))
12144 (setenv "PYTHONPATH"
12145 (string-append
12146 cwd "/build/"
12147 (find (cut string-prefix? "lib" <>)
12148 (scandir (string-append cwd "/build")))
12149 ":" (getenv "PYTHONPATH")))
12150 (setenv "PATH"
12151 (string-append (getenv "PATH")
12152 ":" cwd "/bin"))
12153 (setenv "TMPDIR" "/tmp")
12154
12155 (substitute* "Cheetah/Tests/Test.py"
12156 (("unittest.TextTestRunner\\(\\)")
12157 "unittest.TextTestRunner(verbosity=2)"))
12158
12159 (invoke "python" "Cheetah/Tests/Test.py")))))))
12160 (propagated-inputs
12161 `(("python-markdown" ,python-markdown))) ;optional
12162 (home-page "http://cheetahtemplate.org/")
12163 (synopsis "Template engine")
12164 (description "Cheetah is a text-based template engine and Python code
12165 generator.
12166
12167 Cheetah can be used as a standalone templating utility or referenced as
12168 a library from other Python applications. It has many potential uses,
12169 but web developers looking for a viable alternative to ASP, JSP, PHP and
12170 PSP are expected to be its principle user group.
12171
12172 Features:
12173 @enumerate
12174 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
12175 text-based format.
12176 @item Cleanly separates content, graphic design, and program code.
12177 @item Blends the power and flexibility of Python with a simple template language
12178 that non-programmers can understand.
12179 @item Gives template writers full access to any Python data structure, module,
12180 function, object, or method in their templates.
12181 @item Makes code reuse easy by providing an object-orientated interface to
12182 templates that is accessible from Python code or other Cheetah templates.
12183 One template can subclass another and selectively reimplement sections of it.
12184 @item Provides a simple, yet powerful, caching mechanism that can dramatically
12185 improve the performance of a dynamic website.
12186 @item Compiles templates into optimized, yet readable, Python code.
12187 @end enumerate")
12188 (license (license:x11-style "file://LICENSE"))))
12189
12190 (define-public python2-cheetah
12191 (package-with-python2 python-cheetah))
12192
12193 (define-public python-dulwich
12194 (package
12195 (name "python-dulwich")
12196 (version "0.18.6")
12197 (source
12198 (origin
12199 (method url-fetch)
12200 (uri (list (string-append "https://www.dulwich.io/releases/"
12201 "dulwich-" version ".tar.gz")
12202 (pypi-uri "dulwich" version)))
12203 (sha256
12204 (base32
12205 "1aa1xfrxkc3j9s4xi0llhf5gndyi9ryprcxsqfa5fcb8ph34981q"))))
12206 (build-system python-build-system)
12207 (arguments
12208 `(#:phases
12209 (modify-phases %standard-phases
12210 (add-before 'check 'fix-tests
12211 (lambda* (#:key inputs #:allow-other-keys)
12212 ;; The tests use Popen with a custom environment which doesn't
12213 ;; include PATH.
12214 (substitute* "dulwich/tests/compat/utils.py"
12215 (("'git'") (string-append "'"
12216 (which "git")
12217 "'")))
12218 (substitute* '("dulwich/tests/test_repository.py"
12219 "dulwich/tests/test_hooks.py")
12220 (("#!/bin/sh") (string-append "#!" (which "sh"))))
12221 (setenv "TEST_RUNNER" "unittest")
12222 (setenv "PYTHONHASHSEED" "random")
12223 #t)))))
12224 (propagated-inputs
12225 `(("python-fastimport" ,python-fastimport)))
12226 (native-inputs
12227 `(("python-mock" ,python-mock)
12228 ("python-geventhttpclient" ,python-geventhttpclient)
12229 ("git" ,git)))
12230 (home-page "https://www.dulwich.io/")
12231 (synopsis "Git implementation in Python")
12232 (description "Dulwich is an implementation of the Git file formats and
12233 protocols written in pure Python.")
12234 ;; Can be used with either license.
12235 (license (list license:asl2.0 license:gpl2+))))
12236
12237 (define-public python2-dulwich
12238 (package-with-python2 python-dulwich))
12239
12240 (define-public python-pbkdf2
12241 (package
12242 (name "python-pbkdf2")
12243 (version "1.3")
12244 (source
12245 (origin
12246 (method url-fetch)
12247 (uri (pypi-uri "pbkdf2" version))
12248 (sha256
12249 (base32
12250 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
12251 (build-system python-build-system)
12252 (arguments
12253 '(#:phases
12254 (modify-phases %standard-phases
12255 (replace 'check
12256 (lambda _
12257 (setenv "PYTHONPATH"
12258 (string-append (getcwd) "/build/lib:"
12259 (getenv "PYTHONPATH")))
12260 (invoke "python" "test/test_pbkdf2.py"))))))
12261 (propagated-inputs
12262 `(("python-pycrypto" ,python-pycrypto))) ; optional
12263 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
12264 (synopsis "Password-based key derivation")
12265 (description "This module implements the password-based key derivation
12266 function, PBKDF2, specified in RSA PKCS#5 v2.0.
12267
12268 PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
12269 is part of the RSA Public Key Cryptography Standards series. The provided
12270 implementation takes a password or a passphrase and a salt value (and
12271 optionally a iteration count, a digest module, and a MAC module) and provides
12272 a file-like object from which an arbitrarly-sized key can be read.")
12273 (license license:expat)))
12274
12275 (define-public python2-pbkdf2
12276 (package-with-python2 python-pbkdf2))
12277
12278 (define-public python-qrcode
12279 (package
12280 (name "python-qrcode")
12281 (version "6.1")
12282 (source
12283 (origin
12284 (method url-fetch)
12285 (uri (pypi-uri "qrcode" version))
12286 (sha256
12287 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
12288 (build-system python-build-system)
12289 (arguments
12290 ;; FIXME: Tests require packaging 'pymaging'.
12291 '(#:tests? #f))
12292 (propagated-inputs
12293 `(("python-lxml" ,python-lxml) ; for SVG output
12294 ("python-pillow" ,python-pillow) ; for PNG output
12295 ("python-six" ,python-six)))
12296 (home-page "https://github.com/lincolnloop/python-qrcode")
12297 (synopsis "QR Code image generator")
12298 (description "This package provides a pure Python QR Code generator
12299 module. It uses the Python Imaging Library (PIL) to allow for the generation
12300 of QR Codes.
12301
12302 In addition this package provides a command line tool to generate QR codes and
12303 either write these QR codes to a file or do the output as ascii art at the
12304 console.")
12305 (license license:bsd-3)))
12306
12307 (define-public python2-qrcode
12308 (package-with-python2 python-qrcode))
12309
12310 (define-public python-rst2ansi
12311 (package
12312 (name "python-rst2ansi")
12313 (version "0.1.5")
12314 (source
12315 (origin
12316 (method url-fetch)
12317 (uri (pypi-uri "rst2ansi" version))
12318 (sha256
12319 (base32
12320 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
12321 (build-system python-build-system)
12322 (propagated-inputs
12323 `(("python-docutils" ,python-docutils)))
12324 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
12325 (synopsis "Convert RST to ANSI-decorated console output")
12326 (description
12327 "Python module dedicated to rendering RST (reStructuredText) documents
12328 to ansi-escaped strings suitable for display in a terminal.")
12329 (license license:expat)))
12330
12331 (define-public python-ansi2html
12332 (package
12333 (name "python-ansi2html")
12334 (version "1.2.0")
12335 (source
12336 (origin
12337 (method url-fetch)
12338 (uri (pypi-uri "ansi2html" version))
12339 (sha256
12340 (base32
12341 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
12342 (build-system python-build-system)
12343 (native-inputs
12344 `(("python-mock" ,python-mock)
12345 ("python-nose" ,python-nose)))
12346 (propagated-inputs
12347 `(("python-six" ,python-six)))
12348 (home-page "https://github.com/ralphbean/ansi2html")
12349 (synopsis "Convert ANSI-decorated console output to HTML")
12350 (description
12351 "@command{ansi2html} is a Python library and command line utility for
12352 convering text with ANSI color codes to HTML or LaTeX.")
12353 (license license:gpl3+)))
12354
12355 (define-public python2-ansi2html
12356 (package-with-python2 python-ansi2html))
12357
12358 (define-public python-ddt
12359 (package
12360 (name "python-ddt")
12361 (version "1.1.3")
12362 (source
12363 (origin
12364 (method url-fetch)
12365 (uri (pypi-uri "ddt" version))
12366 (sha256
12367 (base32
12368 "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk"))))
12369 (build-system python-build-system)
12370 (native-inputs
12371 `(("python-mock" ,python-mock)
12372 ("python-nose" ,python-nose)))
12373 (propagated-inputs
12374 `(("python-six" ,python-six)
12375 ("python-pyyaml" ,python-pyyaml)))
12376 (home-page "https://github.com/txels/ddt")
12377 (synopsis "Data-Driven Tests")
12378 (description
12379 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
12380 running it with different test data, and make it appear as multiple test
12381 cases.")
12382 (license license:expat)))
12383
12384 (define-public python2-ddt
12385 (package-with-python2 python-ddt))
12386
12387 (define-public python-pycountry
12388 (package
12389 (name "python-pycountry")
12390 (version "18.5.26")
12391 (source
12392 (origin
12393 (method url-fetch)
12394 (uri (pypi-uri "pycountry" version))
12395 (sha256
12396 (base32
12397 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
12398 (build-system python-build-system)
12399 (home-page "https://bitbucket.org/flyingcircus/pycountry")
12400 (synopsis "ISO databases for languages, countries, currencies, etc.")
12401 (description
12402 "@code{pycountry} provides the ISO databases for the standards:
12403 @enumerate
12404 @item 639-3 (Languages)
12405 @item 3166 (Countries)
12406 @item 3166-3 (Deleted Countries)
12407 @item 3166-2 (Subdivisions of countries)
12408 @item 4217 (Currencies)
12409 @item 15924 (Scripts)
12410 @end enumerate
12411 It includes a copy from Debian’s pkg-isocodes and makes the data accessible
12412 through a Python API.")
12413 (license license:lgpl2.1+)))
12414
12415 (define-public python2-pycountry
12416 (package-with-python2 python-pycountry))
12417
12418 (define-public python-pycosat
12419 (package
12420 (name "python-pycosat")
12421 (version "0.6.1")
12422 (source
12423 (origin
12424 (method url-fetch)
12425 (uri (pypi-uri "pycosat" version))
12426 (sha256
12427 (base32
12428 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
12429 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
12430 (build-system python-build-system)
12431 (home-page "https://github.com/ContinuumIO/pycosat")
12432 (synopsis "Bindings to picosat (a SAT solver)")
12433 (description
12434 "This package provides efficient Python bindings to @code{picosat} on
12435 the C level. When importing pycosat, the @code{picosat} solver becomes part
12436 of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
12437 Problem} (SAT) solver.")
12438 (license license:expat)))
12439
12440 (define-public python2-pycosat
12441 (package-with-python2 python-pycosat))
12442
12443 (define-public python2-ruamel.ordereddict
12444 (package
12445 (name "python2-ruamel.ordereddict")
12446 (version "0.4.9")
12447 (source
12448 (origin
12449 (method url-fetch)
12450 (uri (pypi-uri "ruamel.ordereddict" version))
12451 (sha256
12452 (base32
12453 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
12454 (build-system python-build-system)
12455 (arguments
12456 `(#:python ,python-2
12457 #:phases
12458 (modify-phases %standard-phases
12459 (delete 'check)
12460 (add-after 'install 'check
12461 (lambda* (#:key inputs outputs #:allow-other-keys)
12462 (add-installed-pythonpath inputs outputs)
12463 (invoke "python" "test/testordereddict.py"))))))
12464 (home-page "https://bitbucket.org/ruamel/ordereddict")
12465 (synopsis "Version of dict that keeps keys in insertion order")
12466 (description
12467 "This is an implementation of an ordered dictionary with @dfn{Key
12468 Insertion Order} (KIO: updates of values do not affect the position of the
12469 key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
12470 removed and put at the back). The standard library module @code{OrderedDict},
12471 implemented later, implements a subset of @code{ordereddict} functionality.
12472 Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
12473 Order} (KSO, no sorting function can be specified, but a transform can be
12474 specified to apply on the key before comparison (e.g. @code{string.lower})).")
12475 (license license:expat)))
12476
12477 (define-public python-pypeg2
12478 (package
12479 (name "python-pypeg2")
12480 (version "2.15.2")
12481 (source
12482 (origin
12483 (method url-fetch)
12484 (uri (pypi-uri "pyPEG2" version))
12485 (sha256
12486 (base32
12487 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
12488 (build-system python-build-system)
12489 (propagated-inputs `(("python-lxml" ,python-lxml)))
12490 (arguments
12491 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
12492 '(#:tests? #f))
12493 (home-page "https://fdik.org/pyPEG/")
12494 (synopsis "Parsering Expression Grammars in Python")
12495 (description "PyPEG is an intrinsic parser interpreter framework for
12496 Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
12497 parse many formal languages.")
12498 (license license:gpl2)))
12499
12500 (define-public python-incremental
12501 (package
12502 (name "python-incremental")
12503 (version "17.5.0")
12504 (source
12505 (origin
12506 (method url-fetch)
12507 (uri (pypi-uri "incremental" version))
12508 (sha256
12509 (base32
12510 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
12511 (build-system python-build-system)
12512 (home-page "https://github.com/hawkowl/incremental")
12513 (synopsis "Library for versioning Python projects")
12514 (description "Incremental is a small library that versions your Python
12515 projects.")
12516 (license license:expat)))
12517
12518 (define-public python2-incremental
12519 (package-with-python2 python-incremental))
12520
12521 (define-public python-invoke
12522 (package
12523 (name "python-invoke")
12524 (home-page "https://www.pyinvoke.org/")
12525 (version "1.3.0")
12526 (source (origin
12527 (method url-fetch)
12528 (uri (pypi-uri "invoke" version))
12529 (sha256
12530 (base32
12531 "1nn7gad0rvy492acpyhkrp01zsk86acf34qhsvq4xmm6x39788n5"))))
12532 (build-system python-build-system)
12533 (arguments
12534 ;; XXX: Requires many dependencies that are not yet in Guix.
12535 `(#:tests? #f))
12536 (synopsis "Pythonic task execution")
12537 (description
12538 "Invoke is a Python task execution tool and library, drawing inspiration
12539 from various sources to arrive at a powerful and clean feature set. It is
12540 evolved from the Fabric project, but focuses on local and abstract concerns
12541 instead of servers and network commands.")
12542 (license license:bsd-3)))
12543
12544 (define-public python2-invoke
12545 (package-with-python2 python-invoke))
12546
12547 (define-public python-automat
12548 (package
12549 (name "python-automat")
12550 (version "0.7.0")
12551 (source (origin
12552 (method url-fetch)
12553 (uri (pypi-uri "Automat" version))
12554 (sha256
12555 (base32
12556 "03ivg70n3b1cbcd2zvjhk8y4kmqxcvhmili39lmgx09dza1qpmyb"))))
12557 (build-system python-build-system)
12558 ;; We disable the tests because they require python-twisted, while
12559 ;; python-twisted depends on python-automat. Twisted is optional, but the
12560 ;; tests fail if it is not available. Also see
12561 ;; <https://github.com/glyph/automat/issues/71>.
12562 (arguments '(#:tests? #f))
12563 (native-inputs
12564 `(("python-m2r" ,python-m2r)
12565 ("python-setuptools-scm" ,python-setuptools-scm)
12566 ("python-graphviz" ,python-graphviz)))
12567 (propagated-inputs
12568 `(("python-six" ,python-six)
12569 ("python-attrs" ,python-attrs)))
12570 (home-page "https://github.com/glyph/Automat")
12571 (synopsis "Self-service finite-state machines")
12572 (description "Automat is a library for concise, idiomatic Python
12573 expression of finite-state automata (particularly deterministic finite-state
12574 transducers).")
12575 (license license:expat)))
12576
12577 (define-public python2-automat
12578 (package-with-python2 python-automat))
12579
12580 (define-public python-m2r
12581 (package
12582 (name "python-m2r")
12583 (version "0.2.1")
12584 (source (origin
12585 (method url-fetch)
12586 (uri (pypi-uri "m2r" version))
12587 (sha256
12588 (base32
12589 "16gdm8i06jjmlpvckpfmlkr4693dh0vs192vgsqn84fsdkbbm45z"))))
12590 (build-system python-build-system)
12591 (propagated-inputs
12592 `(("python-docutils" ,python-docutils)
12593 ("python-mistune" ,python-mistune)))
12594 (native-inputs
12595 `(("python-pygments" ,python-pygments)
12596 ("python-mock" ,python-mock)))
12597 (home-page "https://github.com/miyakogi/m2r")
12598 (synopsis "Markdown to reStructuredText converter")
12599 (description "M2R converts a markdown file including reST markups to valid
12600 reST format.")
12601 (license license:expat)))
12602
12603 (define-public python2-m2r
12604 (package-with-python2 python-m2r))
12605
12606 (define-public python-constantly
12607 (package
12608 (name "python-constantly")
12609 (version "15.1.0")
12610 (source (origin
12611 (method url-fetch)
12612 (uri (pypi-uri "constantly" version))
12613 (sha256
12614 (base32
12615 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
12616 (build-system python-build-system)
12617 (home-page "https://github.com/twisted/constantly")
12618 (synopsis "Symbolic constants in Python")
12619 (description "Constantly is a Python library that provides symbolic
12620 constant support. It includes collections and constants with text, numeric,
12621 and bit flag values.")
12622 (license license:expat)))
12623
12624 (define-public python2-constantly
12625 (package-with-python2 python-constantly))
12626
12627 (define-public python-attrs
12628 (package
12629 (name "python-attrs")
12630 (version "19.1.0")
12631 (source (origin
12632 (method url-fetch)
12633 (uri (pypi-uri "attrs" version))
12634 (sha256
12635 (base32
12636 "16g33zr5f449lqc5wgvzpknxryfzrfsxcr6kpgxwn7l5fkv71f7h"))))
12637 (build-system python-build-system)
12638 (arguments
12639 `(#:modules ((guix build utils)
12640 (guix build python-build-system)
12641 (ice-9 ftw)
12642 (srfi srfi-1)
12643 (srfi srfi-26))
12644 #:phases (modify-phases %standard-phases
12645 (replace 'check
12646 (lambda _
12647 (let ((cwd (getcwd)))
12648 (setenv "PYTHONPATH"
12649 (string-append
12650 cwd "/build/"
12651 (find (cut string-prefix? "lib" <>)
12652 (scandir (string-append cwd "/build")))
12653 ":"
12654 (getenv "PYTHONPATH")))
12655 (invoke "python" "-m" "pytest")))))))
12656 (native-inputs
12657 `(("python-coverage" ,python-coverage)
12658 ("python-hypothesis" ,python-hypothesis)
12659 ("python-pympler" ,python-pympler)
12660 ("python-pytest" ,python-pytest)
12661 ("python-six" ,python-six)
12662 ("python-sphinx" ,python-sphinx)
12663 ("python-zope-interface" ,python-zope-interface)))
12664 (home-page "https://github.com/python-attrs/attrs/")
12665 (synopsis "Attributes without boilerplate")
12666 (description "@code{attrs} is a Python package with class decorators that
12667 ease the chores of implementing the most common attribute-related object
12668 protocols.")
12669 (license license:expat)))
12670
12671 (define-public python2-attrs
12672 (package-with-python2 python-attrs))
12673
12674 (define-public python-attrs-bootstrap
12675 (package
12676 (inherit python-attrs)
12677 (name "python-attrs-bootstrap")
12678 (native-inputs `())
12679 (arguments `(#:tests? #f))))
12680
12681 (define-public python2-attrs-bootstrap
12682 (package-with-python2 python-attrs-bootstrap))
12683
12684 (define-public python2-cliapp
12685 (package
12686 (name "python2-cliapp")
12687 (version "1.20180812.1")
12688 (source
12689 (origin
12690 (method url-fetch)
12691 (uri (string-append
12692 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
12693 version ".tar.gz"))
12694 (sha256
12695 (base32
12696 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
12697 (build-system python-build-system)
12698 (arguments
12699 `(#:python ,python-2
12700 #:phases
12701 (modify-phases %standard-phases
12702 ;; check phase needs to be run before the build phase. If not,
12703 ;; coverage-test-runner looks for tests for the built source files,
12704 ;; and fails.
12705 (delete 'check)
12706 (add-before 'build 'check
12707 (lambda _
12708 ;; Disable python3 tests
12709 (substitute* "check"
12710 (("python3") "# python3"))
12711 (invoke "./check"))))))
12712 (native-inputs
12713 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
12714 ("python2-pep8" ,python2-pep8)))
12715 (propagated-inputs
12716 `(("python2-pyaml" ,python2-pyaml)))
12717 (home-page "https://liw.fi/cliapp/")
12718 (synopsis "Python framework for command line programs")
12719 (description "@code{python2-cliapp} is a python framework for
12720 command line programs. It contains the typical stuff such programs
12721 need to do, such as parsing the command line for options, and
12722 iterating over input files.")
12723 (license license:gpl2+)))
12724
12725 (define-public python2-ttystatus
12726 (package
12727 (name "python2-ttystatus")
12728 (version "0.36")
12729 (source
12730 (origin
12731 (method url-fetch)
12732 (uri (string-append
12733 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
12734 version ".tar.gz"))
12735 (sha256
12736 (base32
12737 "06mdk4d19zw2j3is54gndhzl396g3xc8k52m7i86z69s9hcz71by"))))
12738 (build-system python-build-system)
12739 (native-inputs
12740 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
12741 ("python2-pep8" ,python2-pep8)))
12742 (arguments
12743 `(#:python ,python-2
12744 #:phases
12745 (modify-phases %standard-phases
12746 ;; check phase needs to be run before the build phase. If not,
12747 ;; coverage-test-runner looks for tests for the built source files,
12748 ;; and fails.
12749 (delete 'check)
12750 (add-before 'build 'check
12751 (lambda _ (invoke "make" "check"))))))
12752 (home-page "https://liw.fi/ttystatus/")
12753 (synopsis "Python library for showing progress reporting and
12754 status updates on terminals")
12755 (description "@code{python2-ttystatus} is a python library for
12756 showing progress reporting and status updates on terminals, for
12757 command line programs. Output is automatically adapted to the width
12758 of the terminal: truncated if it does not fit, and resized if the
12759 terminal size changes.")
12760 (license license:gpl3+)))
12761
12762 (define-public python2-tracing
12763 (package
12764 (name "python2-tracing")
12765 (version "0.10")
12766 (source
12767 (origin
12768 (method url-fetch)
12769 (uri (string-append
12770 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
12771 version ".tar.gz"))
12772 (sha256
12773 (base32
12774 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
12775 (build-system python-build-system)
12776 (arguments
12777 `(#:python ,python-2))
12778 (home-page "https://liw.fi/tracing/")
12779 (synopsis "Python debug logging helper")
12780 (description "@code{python2-tracing} is a python library for
12781 logging debug messages. It provides a way to turn debugging messages
12782 on and off, based on the filename they occur in. It is much faster
12783 than using @code{logging.Filter} to accomplish the same thing, which
12784 matters when code is run in production mode. The actual logging still
12785 happens using the @code{logging} library.")
12786 (license license:gpl3+)))
12787
12788 (define-public python2-larch
12789 (package
12790 (name "python2-larch")
12791 (version "1.20151025")
12792 (source
12793 (origin
12794 (method url-fetch)
12795 (uri (string-append
12796 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
12797 version ".tar.gz"))
12798 (patches (search-patches
12799 "python2-larch-coverage-4.0a6-compatibility.patch"))
12800 (sha256
12801 (base32
12802 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
12803 (build-system python-build-system)
12804 (arguments
12805 `(#:python ,python-2
12806 #:phases
12807 (modify-phases %standard-phases
12808 ;; check phase needs to be run before the build phase. If not,
12809 ;; coverage-test-runner looks for tests for the built source files,
12810 ;; and fails.
12811 (delete 'check)
12812 (add-before 'build 'check
12813 (lambda _ (invoke "make" "check"))))))
12814 (native-inputs
12815 `(("cmdtest" ,cmdtest)
12816 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
12817 (propagated-inputs
12818 `(("python2-tracing" ,python2-tracing)))
12819 (home-page "https://liw.fi/larch/")
12820 (synopsis "Python copy-on-write B-tree library")
12821 (description "@code{python2-larch} is an implementation of
12822 particular kind of B-tree, based on research by Ohad Rodeh. See
12823 @url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
12824 on the data structure.
12825
12826 The distinctive feature of this B-tree is that a node is never
12827 (conceptually) modified. Instead, all updates are done by
12828 copy-on-write. This makes it easy to clone a tree, and modify only the
12829 clone, while other processes access the original tree.")
12830 (license license:gpl3+)))
12831
12832 (define-public python-astroid
12833 (package
12834 (name "python-astroid")
12835 (version "2.3.3")
12836 (source
12837 (origin
12838 (method url-fetch)
12839 (uri (pypi-uri "astroid" version))
12840 (sha256
12841 (base32 "0fnibsl2cb5mvzbfm7sycj85smx48f8w8m7ks1sqlmpr9ps0gski"))))
12842 (build-system python-build-system)
12843 (propagated-inputs
12844 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
12845 ("python-six" ,python-six)
12846 ("python-typed-ast" ,python-typed-ast)
12847 ("python-wrapt" ,python-wrapt)))
12848 (native-inputs
12849 `(("python-dateutil" ,python-dateutil)
12850 ("python-nose" ,python-nose)
12851 ("python-pytest" ,python-pytest)
12852 ("python-pytest-runner" ,python-pytest-runner)))
12853 (arguments
12854 `(#:phases
12855 (modify-phases %standard-phases
12856 (add-after 'unpack 'remove-spurious-test
12857 (lambda _
12858 ;; This can be removed after upgrading from python-3.7
12859 ;; https://github.com/PyCQA/astroid/issues/593
12860 ;; https://bugs.python.org/issue34056
12861 (delete-file "astroid/tests/unittest_modutils.py")
12862 #t))
12863 (replace 'check
12864 (lambda _
12865 (invoke "pytest" "astroid"))))))
12866 (home-page "https://github.com/PyCQA/astroid")
12867 (synopsis "Common base representation of python source code for pylint and
12868 other projects")
12869 (description "@code{python-astroid} provides a common base representation
12870 of python source code for projects such as pychecker, pyreverse, pylint, etc.
12871
12872 It provides a compatible representation which comes from the _ast module. It
12873 rebuilds the tree generated by the builtin _ast module by recursively walking
12874 down the AST and building an extended ast. The new node classes have
12875 additional methods and attributes for different usages. They include some
12876 support for static inference and local name scopes. Furthermore, astroid
12877 builds partial trees by inspecting living objects.")
12878 (license license:lgpl2.1+)
12879 (properties `((python2-variant . ,(delay python2-astroid))))))
12880
12881 (define-public python2-astroid
12882 (let ((base (package-with-python2
12883 (strip-python2-variant python-astroid))))
12884 (package (inherit base)
12885 ;; Version 2.x removes python2 support.
12886 (version "1.6.5")
12887 (source
12888 (origin
12889 (method url-fetch)
12890 (uri (pypi-uri "astroid" version))
12891 (sha256
12892 (base32
12893 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
12894 (arguments
12895 (substitute-keyword-arguments (package-arguments base)
12896 ((#:phases phases)
12897 `(modify-phases ,phases
12898 (add-after 'unpack 'remove-spurious-test
12899 (lambda _
12900 ;; https://github.com/PyCQA/astroid/issues/276
12901 (delete-file "astroid/tests/unittest_brain.py")
12902 #t))
12903 (replace 'check
12904 (lambda _
12905 (invoke"python" "-m" "unittest" "discover"
12906 "-p" "unittest*.py")))))))
12907 (native-inputs `())
12908 (propagated-inputs
12909 `(("python2-backports-functools-lru-cache"
12910 ,python2-backports-functools-lru-cache)
12911 ("python2-enum34" ,python2-enum34)
12912 ("python2-singledispatch" ,python2-singledispatch)
12913 ,@(alist-delete "python-typed-ast"
12914 (package-propagated-inputs base)))))))
12915
12916 (define-public python-isort
12917 (package
12918 (name "python-isort")
12919 (version "4.3.4")
12920 (source
12921 (origin
12922 (method git-fetch)
12923 (uri (git-reference
12924 ;; Tests pass only from the Github sources
12925 (url "https://github.com/timothycrosley/isort")
12926 (commit version)))
12927 (file-name (git-file-name name version))
12928 (sha256
12929 (base32
12930 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
12931 (build-system python-build-system)
12932 (native-inputs
12933 `(("python-mock" ,python-mock)
12934 ("python-pytest" ,python-pytest)))
12935 (home-page "https://github.com/timothycrosley/isort")
12936 (synopsis "Python utility/library to sort python imports")
12937 (description "@code{python-isort} is a python utility/library to sort
12938 imports alphabetically, and automatically separated into sections. It
12939 provides a command line utility, a python library and plugins for various
12940 editors.")
12941 (license license:expat)
12942 (properties `((python2-variant . ,(delay python2-isort))))))
12943
12944 (define-public python2-isort
12945 (let ((base (package-with-python2
12946 (strip-python2-variant python-isort))))
12947 (package (inherit base)
12948 (native-inputs
12949 `(("python2-futures" ,python2-futures)
12950 ,@(package-native-inputs base))))))
12951
12952 (define-public python2-backports-functools-lru-cache
12953 (package
12954 (name "python2-backports-functools-lru-cache")
12955 (version "1.5")
12956 (source
12957 (origin
12958 (method url-fetch)
12959 ;; only the pypi tarballs contain the necessary metadata
12960 (uri (pypi-uri "backports.functools_lru_cache" version))
12961 (sha256
12962 (base32
12963 "06jgv8gib4fhky0p5cmxdghvsgjyzcdgk48k8pxb1ccf11znk64x"))))
12964 (build-system python-build-system)
12965 (native-inputs
12966 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
12967 (arguments
12968 `(#:python ,python-2))
12969 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
12970 (synopsis "Backport of functools.lru_cache from Python 3.3")
12971 (description "@code{python2-backports-functools-lru-cache} is a backport
12972 of @code{functools.lru_cache} from python 3.3.")
12973 (license license:expat)))
12974
12975 (define-public python-configparser
12976 (package
12977 (name "python-configparser")
12978 (version "3.7.1")
12979 (source
12980 (origin
12981 (method url-fetch)
12982 (uri (pypi-uri "configparser" version))
12983 (sha256
12984 (base32
12985 "0cnz213il9lhgda6x70fw7mfqr8da43s3wm343lwzhqx94mgmmav"))))
12986 (build-system python-build-system)
12987 (home-page "https://github.com/jaraco/configparser/")
12988 (synopsis "Backport of configparser from python 3.5")
12989 (description "@code{python-configparser} is a backport of
12990 @code{configparser} from Python 3.5 so that it can be used directly
12991 in other versions.")
12992 (license license:expat)))
12993
12994 (define-public python2-configparser
12995 (package-with-python2 python-configparser))
12996
12997 (define-public python-mando
12998 (package
12999 (name "python-mando")
13000 (version "0.6.4")
13001 (source (origin
13002 (method url-fetch)
13003 (uri (pypi-uri "mando" version))
13004 (sha256
13005 (base32
13006 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
13007 (build-system python-build-system)
13008 (propagated-inputs
13009 `(("python-rst2ansi" ,python-rst2ansi)
13010 ("python-six" ,python-six)))
13011 (native-inputs
13012 `(("python-pytest" ,python-pytest)))
13013 (home-page "https://mando.readthedocs.org/")
13014 (synopsis
13015 "Wrapper around argparse, allowing creation of complete CLI applications")
13016 (description
13017 "This package is a wrapper around argparse, allowing you to write complete CLI
13018 applications in seconds while maintaining all the flexibility.")
13019 (license license:expat)))
13020
13021 (define-public python2-mando
13022 (package-with-python2 python-mando))
13023
13024 (define-public python2-argparse
13025 (package
13026 (name "python2-argparse")
13027 (version "1.4.0")
13028 (source
13029 (origin
13030 (method url-fetch)
13031 (uri (pypi-uri "argparse" version))
13032 (sha256
13033 (base32
13034 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
13035 (build-system python-build-system)
13036 (arguments
13037 `(#:python ,python-2))
13038 (home-page "https://github.com/ThomasWaldmann/argparse/")
13039 (synopsis "Python command-line parsing library")
13040 (description
13041 "This package is mostly for people who want to have @code{argparse} on
13042 older Pythons because it was not part of the standard library back then.")
13043 (license license:psfl)))
13044
13045 (define-public python-fudge
13046 (package
13047 (name "python-fudge")
13048 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
13049 ;; package, which is currently the only use of this package.
13050 (version "0.9.6")
13051 (source
13052 (origin
13053 (method url-fetch)
13054 (uri (pypi-uri "fudge" version))
13055 (sha256
13056 (base32
13057 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
13058 (build-system python-build-system)
13059 (arguments
13060 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
13061 (home-page "https://github.com/fudge-py/fudge")
13062 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
13063 (description
13064 "Fudge is a Python module for using fake objects (mocks and stubs) to
13065 test real ones.
13066
13067 In readable Python code, you declare the methods available on your fake object
13068 and how they should be called. Then you inject that into your application and
13069 start testing. This declarative approach means you don’t have to record and
13070 playback actions and you don’t have to inspect your fakes after running code.
13071 If the fake object was used incorrectly then you’ll see an informative
13072 exception message with a traceback that points to the culprit.")
13073 (license license:expat)))
13074
13075 (define-public python2-fudge
13076 (package-with-python2 python-fudge))
13077
13078 (define-public python-mwclient
13079 (package
13080 (name "python-mwclient")
13081 (version "0.10.0")
13082 (source
13083 (origin
13084 (method git-fetch)
13085 ;; The PyPI version wouldn't contain tests.
13086 (uri (git-reference
13087 (url "https://github.com/mwclient/mwclient")
13088 (commit (string-append "v" version))))
13089 (file-name (git-file-name name version))
13090 (sha256
13091 (base32
13092 "1c3q6lwmb05yqywc4ya98ca7hsl15niili8rccl4n1yqp77c103v"))))
13093 (build-system python-build-system)
13094 (propagated-inputs
13095 `(("python-requests-oauthlib" ,python-requests-oauthlib)
13096 ("python-six" ,python-six)))
13097 (native-inputs
13098 `(("python-mock" ,python-mock)
13099 ("python-pytest" ,python-pytest)
13100 ("python-pytest-cov" ,python-pytest-cov)
13101 ("python-pytest-runner" ,python-pytest-runner)
13102 ("python-responses" ,python-responses)))
13103 (home-page "https://github.com/btongminh/mwclient")
13104 (synopsis "MediaWiki API client")
13105 (description "This package provides a MediaWiki API client.")
13106 (license license:expat)))
13107
13108 (define-public python2-mwclient
13109 (package-with-python2 python-mwclient))
13110
13111 (define-public python-utils
13112 (package
13113 (name "python-utils")
13114 (version "2.1.0")
13115 (source (origin
13116 (method url-fetch)
13117 (uri (pypi-uri "python-utils" version))
13118 (sha256
13119 (base32
13120 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
13121 (build-system python-build-system)
13122 (native-inputs
13123 `(("pytest-runner" ,python-pytest-runner)
13124 ("pytest" ,python-pytest)
13125 ("six" ,python-six)))
13126 (home-page "https://github.com/WoLpH/python-utils")
13127 (synopsis "Convenient utilities not included with the standard Python install")
13128 (description
13129 "Python Utils is a collection of small Python functions and classes which
13130 make common patterns shorter and easier.")
13131 (license license:bsd-2)))
13132
13133 (define-public python2-utils
13134 (package-with-python2 python-utils))
13135
13136 (define-public python-diff-match-patch
13137 (package
13138 (name "python-diff-match-patch")
13139 (version "20121119")
13140 (source
13141 (origin
13142 (method url-fetch)
13143 (uri (pypi-uri "diff-match-patch" version))
13144 (sha256
13145 (base32
13146 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
13147 (build-system python-build-system)
13148 (home-page "https://code.google.com/p/google-diff-match-patch")
13149 (synopsis "Synchronize plain text")
13150 (description "Diff Match and Patch libraries offer robust algorithms to
13151 perform the operations required for synchronizing plain text.")
13152 (license license:asl2.0)))
13153
13154 (define-public python2-diff-match-patch
13155 (package-with-python2 python-diff-match-patch))
13156
13157 (define-public python-dirsync
13158 (package
13159 (name "python-dirsync")
13160 (version "2.2.3")
13161 (source
13162 (origin
13163 (method url-fetch)
13164 (uri (pypi-uri "dirsync" version))
13165 (sha256
13166 (base32
13167 "1r40fkanksagcszf1ag85mdr8w7rgc7196n6s1qlsk2abw6i7v0z"))))
13168 (build-system python-build-system)
13169 (propagated-inputs
13170 `(("six" ,python-six)))
13171 (home-page "https://bitbucket.org/tkhyn/dirsync")
13172 (synopsis "Advanced directory tree synchronisation tool")
13173 (description "Advanced directory tree synchronisation tool.")
13174 (license license:expat)))
13175
13176 (define-public python2-dirsync
13177 (package-with-python2 python-dirsync))
13178
13179 (define-public python-levenshtein
13180 (package
13181 (name "python-levenshtein")
13182 (version "0.12.0")
13183 (source
13184 (origin
13185 (method url-fetch)
13186 (uri (pypi-uri "python-Levenshtein" version))
13187 (sha256
13188 (base32
13189 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
13190 (build-system python-build-system)
13191 (home-page "https://github.com/ztane/python-Levenshtein")
13192 (synopsis "Fast computation of Levenshtein distance and string similarity")
13193 (description
13194 "The Levenshtein Python C extension module contains functions for fast computation of
13195 @enumerate
13196 @item Levenshtein (edit) distance, and edit operations
13197 @item string similarity
13198 @item approximate median strings, and generally string averaging
13199 @item string sequence and set similarity
13200 @end enumerate
13201 It supports both normal and Unicode strings.")
13202 (license license:gpl2+)))
13203
13204 (define-public python2-levenshtein
13205 (package-with-python2 python-levenshtein))
13206
13207 (define-public python-scandir
13208 (package
13209 (name "python-scandir")
13210 (version "1.9.0")
13211 (source
13212 (origin
13213 (method url-fetch)
13214 (uri (pypi-uri "scandir" version))
13215 (sha256
13216 (base32 "0r3hvf1a9jm1rkqgx40gxkmccknkaiqjavs8lccgq9s8khh5x5s4"))))
13217 (build-system python-build-system)
13218 (arguments
13219 `(#:phases (modify-phases %standard-phases
13220 (replace 'check
13221 (lambda _
13222 (invoke "python" "test/run_tests.py"))))))
13223 (home-page "https://github.com/benhoyt/scandir")
13224 (synopsis "Directory iteration function")
13225 (description
13226 "Directory iteration function like os.listdir(), except that instead of
13227 returning a list of bare filenames, it yields DirEntry objects that include
13228 file type and stat information along with the name. Using scandir() increases
13229 the speed of os.walk() by 2-20 times (depending on the platform and file
13230 system) by avoiding unnecessary calls to os.stat() in most cases.
13231
13232 This package is part of the Python standard library since version 3.5.")
13233 (license license:bsd-3)))
13234
13235 (define-public python2-scandir
13236 (package-with-python2 python-scandir))
13237
13238 (define-public python2-stemming
13239 (package
13240 (name "python2-stemming")
13241 (version "1.0.1")
13242 (source
13243 (origin
13244 (method url-fetch)
13245 (uri (pypi-uri "stemming" version))
13246 (sha256
13247 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
13248 (build-system python-build-system)
13249 (arguments
13250 `(#:python ,python-2))
13251 (home-page "https://bitbucket.org/mchaput/stemming/overview")
13252 (synopsis "Python implementations of various stemming algorithms")
13253 (description
13254 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
13255 stemming algorithms for English. These implementations are straightforward and
13256 efficient, unlike some Python versions of the same algorithms available on the
13257 Web. This package is an extraction of the stemming code included in the Whoosh
13258 search engine.")
13259 (license license:public-domain)))
13260
13261 (define-public python-factory-boy
13262 (package
13263 (name "python-factory-boy")
13264 (version "2.8.1")
13265 (source
13266 (origin
13267 (method url-fetch)
13268 (uri (pypi-uri "factory_boy" version))
13269 (sha256
13270 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
13271 (build-system python-build-system)
13272 (arguments
13273 ;; Tests are not included in the tarball.
13274 `(#:tests? #f))
13275 (propagated-inputs
13276 `(("faker" ,python-faker)))
13277 (home-page "https://github.com/benhoyt/scandir")
13278 (synopsis "Versatile test fixtures replacement")
13279 (description
13280 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
13281
13282 As a fixtures replacement tool, it aims to replace static, hard to maintain
13283 fixtures with easy-to-use factories for complex object.
13284
13285 Instead of building an exhaustive test setup with every possible combination
13286 of corner cases, factory_boy allows you to use objects customized for the
13287 current test, while only declaring the test-specific fields")
13288 (license license:expat)))
13289
13290 (define-public python2-factory-boy
13291 (package-with-python2 python-factory-boy))
13292
13293 (define-public python-translate-toolkit
13294 (package
13295 (name "python-translate-toolkit")
13296 (version "2.1.0")
13297 (source
13298 (origin
13299 (method url-fetch)
13300 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
13301 (sha256
13302 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
13303 (build-system python-build-system)
13304 (native-inputs
13305 `(("python-pytest" ,python-pytest)
13306 ("python-sphinx" ,python-sphinx)))
13307 (propagated-inputs
13308 `(("python-babel" ,python-babel)
13309 ("python-beautifulsoup4" ,python-beautifulsoup4)
13310 ("python-chardet" ,python-chardet)
13311 ("python-diff-match-patch" ,python-diff-match-patch)
13312 ("python-levenshtein" ,python-levenshtein)
13313 ("python-lxml" ,python-lxml)
13314 ("python-six" ,python-six)
13315 ("python-vobject" ,python-vobject)
13316 ("python-pyyaml" ,python-pyyaml)))
13317 (arguments
13318 ;; TODO: tests are not run, because they end with
13319 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
13320 ;; 'parse_funcs'
13321 ;; during test setup.
13322 `(#:tests? #f))
13323 (home-page "https://toolkit.translatehouse.org")
13324 (synopsis "Tools and API for translation and localization engineering")
13325 (description
13326 "Tools and API for translation and localization engineering. It contains
13327 several utilities, as well as an API for building localization tools.")
13328 (license license:gpl2+)))
13329
13330 (define-public python2-translate-toolkit
13331 (package-with-python2 python-translate-toolkit))
13332
13333 (define-public python-packaging
13334 (package
13335 (name "python-packaging")
13336 (version "20.0")
13337 (source
13338 (origin
13339 (method url-fetch)
13340 (uri (pypi-uri "packaging" version))
13341 ;; XXX: The URL in the patch file is wrong, it should be
13342 ;; <https://github.com/pypa/packaging/pull/256>.
13343 (patches (search-patches "python-packaging-test-arch.patch"))
13344 (sha256
13345 (base32
13346 "1y2ip3a4ykkpgnwgn85j6hkspcl0cg3mzms97f40mk57vwqq67gy"))))
13347 (build-system python-build-system)
13348 (arguments
13349 `(#:phases (modify-phases %standard-phases
13350 (replace 'check
13351 (lambda _ (invoke "py.test" "-vv"))))))
13352 (native-inputs
13353 `(("python-pretend" ,python-pretend)
13354 ("python-pytest" ,python-pytest)))
13355 (propagated-inputs
13356 `(("python-pyparsing" ,python-pyparsing)
13357 ("python-six" ,python-six)))
13358 (home-page "https://github.com/pypa/packaging")
13359 (synopsis "Core utilities for Python packages")
13360 (description "Packaging is a Python module for dealing with Python packages.
13361 It offers an interface for working with package versions, names, and dependency
13362 information.")
13363 ;; From 'LICENSE': This software is made available under the terms of
13364 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
13365 ;; Contributions to this software is made under the terms of *both* these
13366 ;; licenses.
13367 (license (list license:asl2.0 license:bsd-2))))
13368
13369 (define-public python2-packaging
13370 (package-with-python2 python-packaging))
13371
13372 (define-public python-relatorio
13373 (package
13374 (name "python-relatorio")
13375 (version "0.8.0")
13376 (source
13377 (origin
13378 (method url-fetch)
13379 (uri (pypi-uri "relatorio" version))
13380 (sha256
13381 (base32
13382 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
13383 (build-system python-build-system)
13384 (propagated-inputs
13385 `(("python-lxml" ,python-lxml)
13386 ("python-genshi" ,python-genshi)))
13387 (native-inputs
13388 `(("python-magic" ,python-magic)))
13389 (home-page "https://relatorio.tryton.org/")
13390 (synopsis "Templating library able to output ODT and PDF files")
13391 (description "Relatorio is a templating library which provides a way to
13392 easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
13393 for more filetypes can be easily added by creating plugins for them.")
13394 (license license:gpl3+)))
13395
13396 (define-public python2-relatorio
13397 (package-with-python2 python-relatorio))
13398
13399 (define-public python-radon
13400 (package
13401 (name "python-radon")
13402 (version "4.1.0")
13403 (source
13404 (origin
13405 (method url-fetch)
13406 (uri (pypi-uri "radon" version))
13407 (sha256
13408 (base32
13409 "0vfxxzbnz5lxfvp0yxp35g6c8qqnnbhi4dm7shkm1d3d4192q22n"))))
13410 (build-system python-build-system)
13411 (arguments
13412 `(#:phases (modify-phases %standard-phases
13413 (replace 'check
13414 (lambda _
13415 (invoke "python" "radon/tests/run.py"))))))
13416 (propagated-inputs
13417 `(("python-colorama" ,python-colorama)
13418 ("python-flake8-polyfill" ,python-flake8-polyfill)
13419 ("python-mando" ,python-mando)))
13420 (native-inputs
13421 `(("python-pytest" ,python-pytest)
13422 ("python-pytest-mock" ,python-pytest-mock)))
13423 (home-page "https://radon.readthedocs.org/")
13424 (synopsis "Code Metrics in Python")
13425 (description "Radon is a Python tool which computes various code metrics.
13426 Supported metrics are:
13427 @itemize @bullet
13428 @item raw metrics: SLOC, comment lines, blank lines, &c.
13429 @item Cyclomatic Complexity (i.e. McCabe’s Complexity)
13430 @item Halstead metrics (all of them)
13431 @item the Maintainability Index (a Visual Studio metric)
13432 @end itemize")
13433 (license license:expat)))
13434
13435 (define-public python2-radon
13436 (package-with-python2 python-radon))
13437
13438 (define-public python-sure
13439 (package
13440 (name "python-sure")
13441 (version "1.4.11")
13442 (source
13443 (origin
13444 (method url-fetch)
13445 (uri (pypi-uri "sure" version))
13446 (sha256
13447 (base32
13448 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
13449 (build-system python-build-system)
13450 (propagated-inputs
13451 `(("python-mock" ,python-mock)
13452 ("python-six" ,python-six)))
13453 (native-inputs
13454 `(("python-nose" ,python-nose)))
13455 (home-page "https://github.com/gabrielfalcao/sure")
13456 (synopsis "Automated testing library in python for python")
13457 (description
13458 "Sure is a python library that leverages a DSL for writing assertions.
13459 Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
13460 (license license:gpl3+)))
13461
13462 (define-public python2-sure
13463 (package-with-python2 python-sure))
13464
13465 (define-public python2-couleur
13466 ;; This package does not seem to support python3 at all, hence,
13467 ;; only the python2 variant definition is provided.
13468 (package
13469 (name "python2-couleur")
13470 (version "0.6.2")
13471 (source
13472 (origin
13473 (method url-fetch)
13474 (uri (pypi-uri "couleur" version))
13475 (sha256
13476 (base32
13477 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
13478 (build-system python-build-system)
13479 (arguments
13480 `(#:python ,python-2))
13481 (home-page "https://github.com/gabrielfalcao/couleur")
13482 (synopsis
13483 "ANSI terminal tool for python, colored shell and other handy fancy features")
13484 (description
13485 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
13486 terminal such as coloured output in the shell, overwriting output, indentation, etc.")
13487 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
13488 ;; https://github.com/gabrielfalcao/couleur/issues/11
13489 (license license:lgpl3+)))
13490
13491 (define-public python-misaka
13492 (package
13493 (name "python-misaka")
13494 (version "2.1.1")
13495 (source
13496 (origin
13497 (method url-fetch)
13498 (uri (pypi-uri "misaka" version))
13499 (sha256
13500 (base32
13501 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
13502 (build-system python-build-system)
13503 (arguments
13504 `(;; Line 37 of setup.py calls self.run_command('develop')
13505 ;; in the 'check' phase. This command seems to be trying
13506 ;; to write to
13507 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
13508 ;; for which it does not have the permission to write.
13509 #:tests? #f))
13510 (propagated-inputs
13511 `(("python-cffi" ,python-cffi)))
13512 (home-page "https://github.com/FSX/misaka")
13513 (synopsis "Python binding for Hoedown")
13514 (description
13515 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
13516 library written in C. It features a fast HTML renderer and functionality to make custom
13517 renderers (e.g. man pages or LaTeX).")
13518 (license license:expat)))
13519
13520 (define-public python2-misaka
13521 (package-with-python2 python-misaka))
13522
13523 (define-public python2-steadymark
13524 ;; This is forced into being a python2 only variant
13525 ;; due to its dependence on couleur that has no support
13526 ;; for python3
13527 (package
13528 (name "python2-steadymark")
13529 (version "0.7.3")
13530 (source
13531 (origin
13532 (method url-fetch)
13533 (uri (pypi-uri "steadymark" version))
13534 (sha256
13535 (base32
13536 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
13537 (build-system python-build-system)
13538 (native-inputs
13539 `(("python-couleur" ,python2-couleur)
13540 ("python-sure" ,python2-sure)
13541 ("python-misaka" ,python2-misaka)))
13542 (arguments
13543 `(#:python ,python-2
13544 #:phases
13545 (modify-phases %standard-phases
13546 (add-before 'build 'patch-setup-py
13547 (lambda _
13548 ;; Update requirements from dependency==version
13549 ;; to dependency>=version
13550 (substitute* "setup.py"
13551 (("==") ">="))
13552 #t)))))
13553 (home-page "https://github.com/gabrielfalcao/steadymark")
13554 (synopsis "Markdown-based test runner for python")
13555 (description
13556 "@code{Steadymark} allows documentation to be written in github-flavoured
13557 markdown. The documentation may contain snippets of code surrounded by python
13558 code blocks and @code{Steadymark} will find these snippets and run them, making
13559 sure that there are no old malfunctional examples in the documentation examples.")
13560 (license license:expat)))
13561
13562 (define-public python-jsonpointer
13563 (package
13564 (name "python-jsonpointer")
13565 (version "1.10")
13566 (source
13567 (origin
13568 (method url-fetch)
13569 (uri (pypi-uri "jsonpointer" version))
13570 (sha256
13571 (base32
13572 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
13573 (build-system python-build-system)
13574 (home-page "https://github.com/stefankoegl/python-json-pointer")
13575 (synopsis "Identify specific nodes in a JSON document")
13576 (description "@code{jsonpointer} allows you to access specific nodes
13577 by path in a JSON document (see RFC 6901).")
13578 (license license:bsd-3)))
13579
13580 (define-public python2-jsonpointer
13581 (package-with-python2 python-jsonpointer))
13582
13583 (define-public python-jsonpatch
13584 (package
13585 (name "python-jsonpatch")
13586 (version "1.16")
13587 (source
13588 (origin
13589 (method git-fetch)
13590 ;; pypi version lacks tests.js
13591 (uri (git-reference
13592 (url "https://github.com/stefankoegl/python-json-patch")
13593 (commit (string-append "v" version))))
13594 (file-name (git-file-name name version))
13595 (sha256
13596 (base32
13597 "0k9pff06lxama3nhsc7cdxbp83422bdy8ifs52i6xkas8hpyzfzr"))))
13598 (build-system python-build-system)
13599 (native-inputs
13600 `(("python-jsonpointer" ,python-jsonpointer)))
13601 (home-page "https://github.com/stefankoegl/python-json-patch")
13602 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
13603 (description "@code{jsonpatch} is a library and program that allows
13604 applying JSON Patches according to RFC 6902.")
13605 (license license:bsd-3)))
13606
13607 (define-public python2-jsonpatch
13608 (package-with-python2 python-jsonpatch))
13609
13610 (define-public python-jsonpatch-0.4
13611 (package (inherit python-jsonpatch)
13612 (name "python-jsonpatch")
13613 (version "0.4")
13614 (source
13615 (origin
13616 (method git-fetch)
13617 (uri (git-reference
13618 (url "https://github.com/stefankoegl/python-json-patch")
13619 (commit (string-append "v" version))))
13620 (file-name (git-file-name name version))
13621 (sha256
13622 (base32
13623 "1fq02y57kinyknxjcav0slcb0k9mwdffqw2hnlhdkpj7palh2mwk"))))))
13624
13625 (define-public python2-jsonpatch-0.4
13626 (package-with-python2 python-jsonpatch-0.4))
13627
13628 (define-public python-rfc3986
13629 (package
13630 (name "python-rfc3986")
13631 (version "1.1.0")
13632 (source (origin
13633 (method url-fetch)
13634 (uri (pypi-uri "rfc3986" version))
13635 (sha256
13636 (base32
13637 "06wlmysw83f75ff84zr1yr6n0shvc2xn1n1sb4iwzqap9hf5fn44"))))
13638 (build-system python-build-system)
13639 (arguments
13640 `(#:modules ((guix build utils)
13641 (guix build python-build-system)
13642 (ice-9 ftw)
13643 (srfi srfi-1)
13644 (srfi srfi-26))
13645 #:phases
13646 (modify-phases %standard-phases
13647 (replace 'check
13648 (lambda _
13649 (let ((cwd (getcwd)))
13650 (setenv "PYTHONPATH"
13651 (string-append cwd "/build/"
13652 (find (cut string-prefix? "lib" <>)
13653 (scandir (string-append cwd "/build")))
13654 ":"
13655 (getenv "PYTHONPATH")))
13656 (invoke "pytest" "-v")))))))
13657 (native-inputs
13658 `(("python-pytest" ,python-pytest)))
13659 (home-page "https://rfc3986.readthedocs.io/")
13660 (synopsis "Parse and validate URI references")
13661 (description
13662 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
13663 validation and authority parsing. This module also supports RFC@tie{}6874
13664 which adds support for zone identifiers to IPv6 addresses.")
13665 (license license:asl2.0)))
13666
13667 (define-public python2-rfc3986
13668 (package-with-python2 python-rfc3986))
13669
13670 (define-public python-rfc3987
13671 (package
13672 (name "python-rfc3987")
13673 (version "1.3.7")
13674 (source
13675 (origin
13676 (method url-fetch)
13677 (uri (pypi-uri "rfc3987" version))
13678 (sha256
13679 (base32
13680 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
13681 (build-system python-build-system)
13682 (home-page "https://pypi.org/project/rfc3987/")
13683 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
13684 (description "@code{rfc3987} provides routines for parsing and
13685 validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
13686 (license license:gpl3+)))
13687
13688 (define-public python2-rfc3987
13689 (package-with-python2 python-rfc3987))
13690
13691 (define-public python-validate-email
13692 (package
13693 (name "python-validate-email")
13694 (version "1.3")
13695 (source
13696 (origin
13697 (method url-fetch)
13698 (uri (pypi-uri "validate_email" version))
13699 (sha256
13700 (base32
13701 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
13702 (build-system python-build-system)
13703 (home-page "https://github.com/syrusakbary/validate_email")
13704 (synopsis "Verifies if an email address is valid and really exists")
13705 (description "@code{validate_email} can be used to verify if an email
13706 address is valid and really exists.")
13707 (license license:lgpl3+)))
13708
13709 (define-public python2-validate-email
13710 (package-with-python2 python-validate-email))
13711
13712 (define-public python-flex
13713 (package
13714 (name "python-flex")
13715 (version "6.10.0")
13716 (source
13717 (origin
13718 (method url-fetch)
13719 (uri (pypi-uri "flex" version))
13720 (sha256
13721 (base32
13722 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
13723 (build-system python-build-system)
13724 (propagated-inputs
13725 `(("python-click" ,python-click)
13726 ("python-iso8601" ,python-iso8601)
13727 ("python-jsonpointer" ,python-jsonpointer)
13728 ("python-pyyaml" ,python-pyyaml)
13729 ("python-requests" ,python-requests)
13730 ("python-rfc3987" ,python-rfc3987)
13731 ("python-six" ,python-six)
13732 ("python-validate-email" ,python-validate-email)))
13733 (home-page "https://github.com/pipermerriam/flex")
13734 (synopsis "Validates Swagger schemata")
13735 (description "@code{flex} can be used to validate Swagger schemata.")
13736 (license license:bsd-3)))
13737
13738 (define-public python2-flex
13739 (package-with-python2 python-flex))
13740
13741 (define-public python-marshmallow
13742 (package
13743 (name "python-marshmallow")
13744 (version "3.0.0b14")
13745 (source
13746 (origin
13747 (method url-fetch)
13748 (uri (pypi-uri "marshmallow" version))
13749 (sha256
13750 (base32
13751 "1digk3f5cfk7wmlka65mc7bzsd96pbsgcsvp6pimd5b4ff9zb5p3"))))
13752 (build-system python-build-system)
13753 (propagated-inputs
13754 `(("python-dateutil" ,python-dateutil)
13755 ("python-simplejson" ,python-simplejson)))
13756 (native-inputs
13757 `(("python-pytest" ,python-pytest)
13758 ("python-pytz" ,python-pytz)))
13759 (home-page "https://github.com/marshmallow-code/marshmallow")
13760 (synopsis "Convert complex datatypes to and from native
13761 Python datatypes.")
13762 (description "@code{marshmallow} provides a library for converting
13763 complex datatypes to and from native Python datatypes.")
13764 (license license:expat)))
13765
13766 (define-public python2-marshmallow
13767 (package-with-python2 python-marshmallow))
13768
13769 (define-public python-apispec
13770 (package
13771 (name "python-apispec")
13772 (version "0.25.3")
13773 (source
13774 (origin
13775 (method url-fetch)
13776 (uri (pypi-uri "apispec" version))
13777 (sha256
13778 (base32
13779 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
13780 (build-system python-build-system)
13781 (propagated-inputs
13782 `(("python-pyyaml" ,python-pyyaml)))
13783 (native-inputs
13784 `(("python-pytest" ,python-pytest)
13785 ("python-flask" ,python-flask)
13786 ("python-marshmallow" ,python-marshmallow)
13787 ("python-tornado" ,python-tornado)
13788 ("python-bottle" ,python-bottle)
13789 ("python-mock" ,python-mock)))
13790 (home-page "https://github.com/marshmallow-code/apispec")
13791 (synopsis "Swagger 2.0 API specification generator")
13792 (description "@code{python-apispec} is a pluggable API specification
13793 generator. Currently supports the OpenAPI specification (f.k.a.
13794 Swagger 2.0).")
13795 (license license:expat)))
13796
13797 (define-public python2-apispec
13798 (package-with-python2 python-apispec))
13799
13800 (define-public python-flasgger
13801 (package
13802 (name "python-flasgger")
13803 (version "0.6.3")
13804 (source
13805 (origin
13806 (method git-fetch)
13807 (uri (git-reference
13808 (url "https://github.com/rochacbruno/flasgger.git")
13809 (commit version)))
13810 (file-name (git-file-name name version))
13811 (sha256
13812 (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn"))))
13813 (build-system python-build-system)
13814 (arguments
13815 `(#:phases
13816 (modify-phases %standard-phases
13817 (replace 'check
13818 (lambda* (#:key inputs outputs #:allow-other-keys)
13819 (substitute* "Makefile"
13820 (("flake8 flasgger --ignore=F403")
13821 "flake8 flasgger --ignore=E731,F403"))
13822 (setenv "PYTHONPATH" (string-append (getcwd)
13823 ":"
13824 (getenv "PYTHONPATH")))
13825 (invoke "py.test"))))))
13826 (propagated-inputs
13827 `(("python-flask" ,python-flask)
13828 ("python-pyyaml" ,python-pyyaml)
13829 ("python-jsonschema" ,python-jsonschema)
13830 ("python-mistune" ,python-mistune)
13831 ("python-six" ,python-six)))
13832 (native-inputs
13833 `(("python-decorator" ,python-decorator)
13834 ("python-flake8" ,python-flake8)
13835 ("python-flask-restful" ,python-flask-restful)
13836 ("python-flex" ,python-flex)
13837 ("python-pytest" ,python-pytest)
13838 ("python-pytest-cov" ,python-pytest-cov)
13839 ("python-marshmallow" ,python-marshmallow)
13840 ("python-apispec" ,python-apispec)))
13841 (home-page "https://github.com/rochacbruno/flasgger/")
13842 (synopsis "Extract Swagger specs from your Flask project")
13843 (description "@code{python-flasgger} allows extracting Swagger specs
13844 from your Flask project. It is a fork of Flask-Swagger.")
13845 (license license:expat)))
13846
13847 (define-public python2-flasgger
13848 (package-with-python2 python-flasgger))
13849
13850 (define-public python-swagger-spec-validator
13851 (package
13852 (name "python-swagger-spec-validator")
13853 (version "2.4.3")
13854 (source
13855 (origin
13856 (method url-fetch)
13857 (uri (pypi-uri "swagger-spec-validator" version))
13858 (sha256
13859 (base32
13860 "11g627icrsqwazsncwi0sdvprcj6hwaayw5xk3xsj8d97bmrzqjp"))))
13861 (build-system python-build-system)
13862 (propagated-inputs
13863 `(("python-jsonschema" ,python-jsonschema)
13864 ("python-pyyaml" ,python-pyyaml)
13865 ("python-six" ,python-six)))
13866 (home-page
13867 "https://github.com/Yelp/swagger_spec_validator")
13868 (synopsis "Validation of Swagger specifications")
13869 (description "@code{swagger_spec_validator} provides a library for
13870 validating Swagger API specifications.")
13871 (license license:asl2.0)))
13872
13873 (define-public python2-swagger-spec-validator
13874 (package-with-python2 python-swagger-spec-validator))
13875
13876 (define-public python-apache-libcloud
13877 (package
13878 (name "python-apache-libcloud")
13879 (version "2.4.0")
13880 (source
13881 (origin
13882 (method url-fetch)
13883 (uri (pypi-uri "apache-libcloud" version))
13884 (sha256
13885 (base32
13886 "0daj3mkzw79v5zin2r1s2wkrz1hplfc16bwj4ss68i5qjq4l2p0j"))))
13887 (build-system python-build-system)
13888 (arguments
13889 `(#:phases
13890 (modify-phases %standard-phases
13891 (add-after 'unpack 'patch-ssh
13892 (lambda* (#:key inputs #:allow-other-keys)
13893 (substitute* "libcloud/compute/ssh.py"
13894 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
13895 "/bin/ssh" "'")))
13896 #t))
13897 (add-after 'unpack 'patch-tests
13898 (lambda _
13899 (substitute* "./libcloud/test/test_file_fixtures.py"
13900 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
13901 (("def _ascii") "def _raw_data(self, method, url, body, headers):
13902 return (httplib.OK,
13903 \"1234abcd\",
13904 {\"test\": \"value\"},
13905 httplib.responses[httplib.OK])
13906 def _ascii"))
13907 (substitute* "libcloud/test/compute/test_ssh_client.py"
13908 (("class ShellOutSSHClientTests")
13909 "@unittest.skip(\"Guix container doesn't have ssh service\")
13910 class ShellOutSSHClientTests")
13911 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
13912 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
13913 (("'.xF0', '.x90', '.x8D', '.x88'")
13914 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
13915 #t))
13916 (add-before 'check 'copy-secret
13917 (lambda _
13918 (copy-file "libcloud/test/secrets.py-dist"
13919 "libcloud/test/secrets.py")
13920 #t)))))
13921 (inputs
13922 `(("openssh" ,openssh)))
13923 (propagated-inputs
13924 `(("python-paramiko" ,python-paramiko)
13925 ("python-requests" ,python-requests)))
13926 (native-inputs
13927 `(("python-lockfile" ,python-lockfile)
13928 ("python-mock" ,python-mock)
13929 ("python-pytest" ,python-pytest)
13930 ("python-pytest-runner" ,python-pytest-runner)
13931 ("python-requests-mock" ,python-requests-mock)))
13932 (home-page "https://libcloud.apache.org/")
13933 (synopsis "Unified Cloud API")
13934 (description "@code{libcloud} is a Python library for interacting with
13935 many of the popular cloud service providers using a unified API.")
13936 (license license:asl2.0)))
13937
13938 (define-public python2-apache-libcloud
13939 (package-with-python2 python-apache-libcloud))
13940
13941 (define-public python-smmap
13942 (package
13943 (name "python-smmap")
13944 (version "3.0.1")
13945 (source
13946 (origin
13947 (method url-fetch)
13948 (uri (pypi-uri "smmap" version))
13949 (sha256
13950 (base32 "0ijlnv60y8f41py1wnn5n1a1i81cxd9dfpdhr0k3cgkrcbz8850p"))))
13951 (build-system python-build-system)
13952 (native-inputs
13953 `(("python-nosexcover" ,python-nosexcover)))
13954 (home-page "https://github.com/Byron/smmap")
13955 (synopsis "Python sliding window memory map manager")
13956 (description "@code{smmap} is a pure Python implementation of a sliding
13957 window memory map manager.")
13958 (license license:bsd-3)))
13959
13960 (define-public python-smmap2
13961 (deprecated-package "python-smmap2" python-smmap))
13962
13963 (define-public python2-smmap
13964 (package-with-python2 python-smmap))
13965
13966 (define-public python2-smmap2
13967 (deprecated-package "python2-smmap2" python2-smmap))
13968
13969 (define-public python-regex
13970 (package
13971 (name "python-regex")
13972 (version "2019.04.14")
13973 (source (origin
13974 (method url-fetch)
13975 (uri (pypi-uri "regex" version))
13976 (sha256
13977 (base32
13978 "1a6hhfs6l6snr1z654ay6wzbmwdkmv282fzfkd5hk2d1n73y8v6m"))))
13979 ;; TODO: Fix and enable regex_test.py tests that complain about the
13980 ;; test.support module not existing.
13981 (build-system python-build-system)
13982 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
13983 (synopsis "Alternative regular expression module")
13984 (description "This regular expression implementation is backwards-
13985 compatible with the standard @code{re} module, but offers additional
13986 functionality like full case-folding for case-insensitive matches in Unicode.")
13987 (license license:psfl)))
13988
13989 (define-public python2-regex
13990 (package-with-python2 python-regex))
13991
13992 (define-public python2-pyopengl
13993 (package
13994 (name "python2-pyopengl")
13995 (version "3.1.0")
13996 (source
13997 (origin
13998 (method url-fetch)
13999 (uri (pypi-uri "PyOpenGL" version))
14000 (sha256
14001 (base32
14002 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
14003 (arguments
14004 `(#:python ,python-2))
14005 (build-system python-build-system)
14006 (home-page "http://pyopengl.sourceforge.net")
14007 (synopsis "Standard OpenGL bindings for Python")
14008 (description
14009 "PyOpenGL is the most common cross platform Python binding to OpenGL and
14010 related APIs. The binding is created using the standard @code{ctypes}
14011 library.")
14012 (license license:bsd-3)))
14013
14014 (define-public python2-pyopengl-accelerate
14015 (package
14016 (inherit python2-pyopengl)
14017 (name "python2-pyopengl-accelerate")
14018 (version "3.1.0")
14019 (source
14020 (origin
14021 (method url-fetch)
14022 (uri (pypi-uri "PyOpenGL-accelerate" version))
14023 (sha256
14024 (base32
14025 "0464c1ifzk0k92lyndikmvzjgnx1y25r7bkkc8pnxm4kp1q4czwj"))))
14026 (synopsis "Acceleration code for PyOpenGL")
14027 (description
14028 "This is the Cython-coded accelerator module for PyOpenGL.")))
14029
14030 (define-public python-rencode
14031 (package
14032 (name "python-rencode")
14033 (version "1.0.5")
14034 (source
14035 (origin
14036 (method url-fetch)
14037 (uri (pypi-uri "rencode" version))
14038 (sha256
14039 (base32
14040 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
14041 (build-system python-build-system)
14042 (arguments
14043 `(#:phases
14044 (modify-phases %standard-phases
14045 (add-before 'check 'delete-bogus-test
14046 ;; This test requires /home/aresch/Downloads, which is not provided by
14047 ;; the build environment.
14048 (lambda _
14049 (delete-file "rencode/t.py")
14050 #t)))))
14051 (native-inputs `(("pkg-config" ,pkg-config)
14052 ("python-cython" ,python-cython)))
14053 (home-page "https://github.com/aresch/rencode")
14054 (synopsis "Serialization of heterogeneous data structures")
14055 (description
14056 "The @code{rencode} module is a data structure serialization library,
14057 similar to @code{bencode} from the BitTorrent project. For complex,
14058 heterogeneous data structures with many small elements, r-encoding stake up
14059 significantly less space than b-encodings. This version of rencode is a
14060 complete rewrite in Cython to attempt to increase the performance over the
14061 pure Python module.")
14062 (license license:bsd-3)))
14063
14064 (define-public python2-rencode
14065 (package-with-python2 python-rencode))
14066
14067 (define-public python-xenon
14068 (package
14069 (name "python-xenon")
14070 (version "0.7.0")
14071 (source
14072 (origin
14073 (method url-fetch)
14074 (uri (pypi-uri "xenon" version))
14075 (sha256
14076 (base32
14077 "0nv207ql2wmh9q62503np056c4vf1c1hlsi5cvv5p5kx574k6r2y"))))
14078 (build-system python-build-system)
14079 (native-inputs
14080 `(("python-pyyaml" ,python-pyyaml)
14081 ("python-radon" ,python-radon)
14082 ("python-requests" ,python-requests)
14083 ("python-flake8" ,python-flake8)
14084 ("python-tox" ,python-tox)))
14085 (arguments
14086 `(#:tests? #f ;test suite not shipped with the PyPI archive
14087 #:phases
14088 (modify-phases %standard-phases
14089 (add-before 'build 'patch-test-requirements
14090 (lambda _
14091 ;; Remove httpretty dependency for tests.
14092 (substitute* "setup.py"
14093 (("httpretty") ""))
14094 #t)))))
14095 (home-page "https://xenon.readthedocs.org/")
14096 (synopsis "Monitor code metrics for Python on your CI server")
14097 (description
14098 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
14099 Ideally, @code{xenon} is run every time code is committed. Through command
14100 line options, various thresholds can be set for the complexity of code. It
14101 will fail (i.e. it will exit with a non-zero exit code) when any of these
14102 requirements is not met.")
14103 (license license:expat)))
14104
14105 (define-public python2-xenon
14106 (package-with-python2 python-xenon))
14107
14108 (define-public python-pysocks
14109 (package
14110 (name "python-pysocks")
14111 (version "1.7.0")
14112 (source
14113 (origin
14114 (method url-fetch)
14115 (uri (pypi-uri "PySocks" version))
14116 (sha256
14117 (base32
14118 "0z4p31bpqm893cf87qqgb30k7nwd8kqfjwwjm5cvxb6zbyj1w0yr"))))
14119 (build-system python-build-system)
14120 (arguments `(#:tests? #f))
14121 (home-page "https://github.com/Anorov/PySocks")
14122 (synopsis "SOCKS client module")
14123 (description "@code{pysocks} is an updated and semi-actively maintained
14124 version of @code{SocksiPy} with bug fixes and extra features.")
14125 (license license:bsd-3)))
14126
14127 (define-public python2-pysocks
14128 (package-with-python2 python-pysocks))
14129
14130 (define-public python-pydiff
14131 (package
14132 (name "python-pydiff")
14133 (version "0.2")
14134 (source
14135 (origin
14136 (method url-fetch)
14137 (uri (pypi-uri "pydiff" version))
14138 (sha256
14139 (base32
14140 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
14141 (build-system python-build-system)
14142 (home-page "https://github.com/myint/pydiff")
14143 (synopsis "Library to diff two Python files at the bytecode level")
14144 (description
14145 "@code{pydiff} makes it easy to look for actual code changes while
14146 ignoring formatting changes.")
14147 (license license:expat)))
14148
14149 (define-public python2-pydiff
14150 (package-with-python2 python-pydiff))
14151
14152 (define-public python-tqdm
14153 (package
14154 (name "python-tqdm")
14155 (version "4.19.6")
14156 (source
14157 (origin
14158 (method url-fetch)
14159 (uri (pypi-uri "tqdm" version))
14160 (sha256
14161 (base32
14162 "1pw0ngm0zn9papdmkwipi3yih5c3di6d0w849bdmrraq4d2d9h2y"))))
14163 (build-system python-build-system)
14164 (native-inputs
14165 `(("python-flake8" ,python-flake8)
14166 ("python-nose" ,python-nose)
14167 ("python-coverage" ,python-coverage)))
14168 (home-page "https://github.com/tqdm/tqdm")
14169 (synopsis "Fast, extensible progress meter")
14170 (description
14171 "Make loops show a progress bar on the console by just wrapping any
14172 iterable with @code{|tqdm(iterable)|}. Offers many options to define
14173 design and layout.")
14174 (license (list license:mpl2.0 license:expat))
14175 (properties `((python2-variant . ,(delay python2-tqdm))))))
14176
14177 (define-public python2-tqdm
14178 (let ((tqdm (package-with-python2
14179 (strip-python2-variant python-tqdm))))
14180 (package (inherit tqdm)
14181 (native-inputs `(("python2-functools32" ,python2-functools32)
14182 ,@(package-native-inputs tqdm))))))
14183
14184 (define-public python-pkginfo
14185 (package
14186 (name "python-pkginfo")
14187 (version "1.4.2")
14188 (source
14189 (origin
14190 (method url-fetch)
14191 (uri (pypi-uri "pkginfo" version))
14192 (sha256
14193 (base32
14194 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
14195 (build-system python-build-system)
14196 (arguments
14197 ;; The tests are broken upstream.
14198 '(#:tests? #f))
14199 (home-page
14200 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
14201 (synopsis
14202 "Query metadatdata from sdists, bdists, and installed packages")
14203 (description
14204 "API to query the distutils metadata written in @file{PKG-INFO} inside a
14205 source distriubtion (an sdist) or a binary distribution (e.g., created by
14206 running bdist_egg). It can also query the EGG-INFO directory of an installed
14207 distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
14208 created by running @code{python setup.py develop}).")
14209 (license license:expat)))
14210
14211 (define-public python2-pkginfo
14212 (package-with-python2 python-pkginfo))
14213
14214 (define-public python-twine
14215 (package
14216 (name "python-twine")
14217 (version "1.9.1")
14218 (source
14219 (origin
14220 (method url-fetch)
14221 (uri (pypi-uri "twine" version))
14222 (sha256
14223 (base32
14224 "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a"))))
14225 (build-system python-build-system)
14226 (propagated-inputs
14227 `(("python-tqdm" ,python-tqdm)
14228 ("python-pkginfo" ,python-pkginfo)
14229 ("python-requests" ,python-requests)
14230 ("python-requests-toolbelt" ,python-requests-toolbelt)))
14231 (home-page "https://github.com/pypa/twine")
14232 (synopsis "Collection of utilities for interacting with PyPI")
14233 (description
14234 "@code{twine} currently supports registering projects and uploading
14235 distributions. It authenticates the user over HTTPS, allows them to pre-sign
14236 their files and supports any packaging format (including wheels).")
14237 (license license:asl2.0)))
14238
14239 (define-public python2-twine
14240 (package-with-python2 python-twine))
14241
14242 (define-public python-linecache2
14243 (package
14244 (name "python-linecache2")
14245 (version "1.0.0")
14246 (source
14247 (origin
14248 (method url-fetch)
14249 (uri (pypi-uri "linecache2" version))
14250 (sha256
14251 (base32
14252 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
14253 (build-system python-build-system)
14254 (arguments
14255 `(;; The tests depend on unittest2, and our version is a bit too old.
14256 #:tests? #f))
14257 (native-inputs
14258 `(("python-pbr" ,python-pbr-minimal)))
14259 (home-page
14260 "https://github.com/testing-cabal/linecache2")
14261 (synopsis "Backports of the linecache module")
14262 (description
14263 "The linecache module allows one to get any line from any file, while
14264 attempting to optimize internally, using a cache, the common case where many
14265 lines are read from a single file.")
14266 (license license:psfl)))
14267
14268 (define-public python2-linecache2
14269 (package-with-python2 python-linecache2))
14270
14271 (define-public python-traceback2
14272 (package
14273 (name "python-traceback2")
14274 (version "1.4.0")
14275 (source
14276 (origin
14277 (method url-fetch)
14278 (uri (pypi-uri "traceback2" version))
14279 (sha256
14280 (base32
14281 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
14282 (build-system python-build-system)
14283 (arguments
14284 `(;; python-traceback2 and python-unittest2 depend on one another.
14285 #:tests? #f))
14286 (native-inputs
14287 `(("python-pbr" ,python-pbr-minimal)))
14288 (propagated-inputs
14289 `(("python-linecache2" ,python-linecache2)))
14290 (home-page
14291 "https://github.com/testing-cabal/traceback2")
14292 (synopsis "Backports of the traceback module")
14293 (description
14294 "This module provides a standard interface to extract, format and print
14295 stack traces of Python programs. It exactly mimics the behavior of the Python
14296 interpreter when it prints a stack trace.")
14297 (license license:psfl)))
14298
14299 (define-public python2-traceback2
14300 (package-with-python2 python-traceback2))
14301
14302 (define-public python-ratelimiter
14303 (package
14304 (name "python-ratelimiter")
14305 (version "1.2.0")
14306 (source
14307 (origin
14308 (method url-fetch)
14309 (uri (pypi-uri "ratelimiter" version))
14310 (sha256
14311 (base32
14312 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
14313 (build-system python-build-system)
14314 (arguments
14315 '(#:tests? #f)) ; There are no tests in the pypi archive.
14316 (home-page "https://github.com/RazerM/ratelimiter")
14317 (synopsis "Simple rate limiting object")
14318 (description
14319 "The @code{ratelimiter} module ensures that an operation will not be
14320 executed more than a given number of times during a given period.")
14321 (license license:asl2.0)))
14322
14323 (define-public python2-ratelimiter
14324 (package-with-python2 python-ratelimiter))
14325
14326 (define-public python-dukpy
14327 (package
14328 (name "python-dukpy")
14329 (version "0.3")
14330 (source
14331 (origin
14332 (method git-fetch)
14333 (uri (git-reference
14334 (url "https://github.com/kovidgoyal/dukpy.git")
14335 (commit (string-append "v" version))))
14336 (file-name (git-file-name name version))
14337 (sha256
14338 (base32 "13h21nqzasv4zj32xs61brmc106pr2cx243672crcmwxxnjgaxls"))))
14339 (build-system python-build-system)
14340 (home-page "https://github.com/kovidgoyal/dukpy")
14341 (synopsis "Run JavaScript in python")
14342 (description
14343 "dukpy is a JavaScript runtime environment for Python using the duktape
14344 embeddable JavaScript engine.")
14345 ;; Dukpy is licensed under MIT like the embedded duktape library,
14346 ;; with 'errors.c' as GPL3.
14347 (license (list license:expat license:gpl3))))
14348
14349 (define-public python2-dukpy
14350 (package-with-python2 python-dukpy))
14351
14352 (define-public python-jsonrpclib-pelix
14353 (package
14354 (name "python-jsonrpclib-pelix")
14355 (version "0.3.2")
14356 (source
14357 (origin
14358 (method url-fetch)
14359 (uri (pypi-uri "jsonrpclib-pelix" version))
14360 (sha256
14361 (base32
14362 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
14363 (build-system python-build-system)
14364 (arguments
14365 `(#:tests? #f)) ; no tests in PyPI tarball
14366 (home-page "https://github.com/tcalmant/jsonrpclib/")
14367 (synopsis "JSON-RPC 2.0 client library for Python")
14368 (description
14369 "This library implements the JSON-RPC v2.0
14370 specification (backwards-compatible) as a client library for Python. This
14371 version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
14372 services.")
14373 (license license:asl2.0)))
14374
14375 (define-public python2-jsonrpclib-pelix
14376 (package-with-python2 python-jsonrpclib-pelix))
14377
14378 (define-public python-setuptools-scm-git-archive
14379 (package
14380 (name "python-setuptools-scm-git-archive")
14381 (version "1.0")
14382 (source
14383 (origin
14384 (method url-fetch)
14385 (uri (pypi-uri "setuptools_scm_git_archive" version))
14386 (sha256
14387 (base32
14388 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
14389 (build-system python-build-system)
14390 (native-inputs
14391 `(("python-pytest" ,python-pytest)))
14392 (propagated-inputs
14393 `(("python-setuptools-scm" ,python-setuptools-scm)))
14394 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
14395 (synopsis "Setuptools_scm plugin for git archives")
14396 (description
14397 "The setuptools_scm_git_archive package is a plugin to
14398 setuptools_scm, which supports obtaining versions from git archives that
14399 belong to tagged versions.")
14400 (license license:expat)))
14401
14402 (define-public python2-setuptools-scm-git-archive
14403 (package-with-python2 python-setuptools-scm-git-archive))
14404
14405 (define-public python-setuptools-git
14406 (package
14407 (name "python-setuptools-git")
14408 (version "1.2")
14409 (source
14410 (origin
14411 (method url-fetch)
14412 (uri (pypi-uri "setuptools-git" version))
14413 (sha256
14414 (base32
14415 "0i84qjwp5m0l9qagdjww2frdh63r37km1c48mrvbmaqsl1ni6r7z"))))
14416 (build-system python-build-system)
14417 (arguments
14418 `(#:phases
14419 (modify-phases %standard-phases
14420 ;; This is needed for tests.
14421 (add-after 'unpack 'configure-git
14422 (lambda _
14423 (setenv "HOME" "/tmp")
14424 (invoke "git" "config" "--global" "user.email" "guix")
14425 (invoke "git" "config" "--global" "user.name" "guix")
14426 #t)))))
14427 (native-inputs
14428 `(("git" ,git-minimal)))
14429 (home-page "https://github.com/msabramo/setuptools-git")
14430 (synopsis "Setuptools revision control system plugin for Git")
14431 (description
14432 "This package provides a plugin for Setuptools for revision control with
14433 Git.")
14434 (license license:bsd-3)))
14435
14436 (define-public python-pyclipper
14437 (package
14438 (name "python-pyclipper")
14439 (version "1.1.0.post3")
14440 (source
14441 (origin
14442 (method url-fetch)
14443 (uri (pypi-uri "pyclipper" version ".zip"))
14444 (sha256
14445 (base32 "164yksvqwqvwzh8f8lq92asg87hd8rvcy2xb5vm4y4ccvd5xgb7i"))
14446 (modules '((guix build utils)))
14447 (snippet
14448 '(begin
14449 ;; This file is generated by Cython.
14450 (delete-file "pyclipper/pyclipper.cpp") #t))))
14451 (build-system python-build-system)
14452 (arguments
14453 `(#:phases
14454 (modify-phases %standard-phases
14455 (add-before 'build 'cythonize-sources
14456 (lambda _
14457 (with-directory-excursion "pyclipper"
14458 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
14459 (propagated-inputs
14460 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
14461 (native-inputs
14462 `(("python-cython" ,python-cython)
14463 ("python-pytest" ,python-pytest)
14464 ("python-pytest-runner" ,python-pytest-runner)
14465 ("python-unittest2" ,python-unittest2)
14466 ("unzip" ,unzip)))
14467 (home-page "https://github.com/greginvm/pyclipper")
14468 (synopsis "Wrapper for Angus Johnson's Clipper library")
14469 (description
14470 "Pyclipper is a Cython wrapper for the C++ translation of the
14471 Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
14472 (license license:expat)))
14473
14474 (define-public python2-pyclipper
14475 (package-with-python2 python-pyclipper))
14476
14477 (define-public python2-booleanoperations
14478 (package
14479 (name "python2-booleanoperations")
14480 (version "0.7.1")
14481 (source
14482 (origin
14483 (method url-fetch)
14484 (uri (pypi-uri "booleanOperations" version ".zip"))
14485 (sha256
14486 (base32
14487 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
14488 (build-system python-build-system)
14489 (arguments
14490 `(#:python ,python-2))
14491 (native-inputs
14492 `(("unzip" ,unzip)
14493 ("python2-pytest" ,python2-pytest)
14494 ("python2-pytest-runner" ,python2-pytest-runner)))
14495 (propagated-inputs
14496 `(("python-fonttools" ,python2-fonttools)
14497 ("python-pyclipper" ,python2-pyclipper)
14498 ("python-ufolib" ,python2-ufolib)))
14499 (home-page "https://github.com/typemytype/booleanOperations")
14500 (synopsis "Boolean operations on paths")
14501 (description
14502 "BooleanOperations provides a Python library that enables
14503 boolean operations on paths.")
14504 (license license:expat)))
14505
14506 (define-public python-tempdir
14507 (package
14508 (name "python-tempdir")
14509 (version "0.7.1")
14510 (source
14511 (origin
14512 (method url-fetch)
14513 (uri (pypi-uri "tempdir" version))
14514 (sha256
14515 (base32
14516 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
14517 (build-system python-build-system)
14518 (home-page "https://pypi.org/project/tempdir/")
14519 (arguments
14520 ;; the package has no tests
14521 '(#:tests? #f))
14522 (synopsis "Python library for managing temporary directories")
14523 (description
14524 "This library manages temporary directories that are automatically
14525 deleted with all their contents when they are no longer needed. It is
14526 particularly convenient for use in tests.")
14527 (license license:expat)))
14528
14529 (define-public python2-tempdir
14530 (package-with-python2 python-tempdir))
14531
14532 (define-public python-activepapers
14533 (package
14534 (name "python-activepapers")
14535 (version "0.2.2")
14536 (source
14537 (origin
14538 (method url-fetch)
14539 (uri (pypi-uri "ActivePapers.Py" version))
14540 (sha256
14541 (base32
14542 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
14543 (build-system python-build-system)
14544 (arguments
14545 `(#:modules ((ice-9 ftw)
14546 (srfi srfi-1)
14547 (guix build utils)
14548 (guix build python-build-system))
14549
14550 #:phases
14551 (modify-phases %standard-phases
14552 (add-after 'unpack 'delete-python2-code
14553 (lambda _
14554 (for-each delete-file
14555 '("lib/activepapers/builtins2.py"
14556 "lib/activepapers/standardlib2.py"
14557 "lib/activepapers/utility2.py"))))
14558 (replace 'check
14559 (lambda _
14560 ;; Deactivate the test cases that download files
14561 (setenv "NO_NETWORK_ACCESS" "1")
14562 ;; For some strange reason, some tests fail if nosetests runs all
14563 ;; test modules in a single execution. They pass if each test
14564 ;; module is run individually.
14565 (for-each (lambda (filename)
14566 (invoke "nosetests"
14567 (string-append "tests/" filename)))
14568 (scandir "tests"
14569 (lambda (filename)
14570 (string-suffix? ".py" filename)))))))))
14571 (native-inputs
14572 `(("python-tempdir" ,python-tempdir)
14573 ("python-nose" ,python-nose)))
14574 (propagated-inputs
14575 `(("python-h5py" ,python-h5py)))
14576 (home-page "https://www.activepapers.org/")
14577 (synopsis "Executable papers for scientific computing")
14578 (description
14579 "ActivePapers is a tool for working with executable papers, which
14580 combine data, code, and documentation in single-file packages,
14581 suitable for publication as supplementary material or on repositories
14582 such as figshare or Zenodo.")
14583 (properties `((python2-variant . ,(delay python2-activepapers))))
14584 (license license:bsd-3)))
14585
14586 (define-public python2-activepapers
14587 (let ((base (package-with-python2
14588 (strip-python2-variant python-activepapers))))
14589 (package
14590 (inherit base)
14591 (arguments
14592 (substitute-keyword-arguments (package-arguments base)
14593 ((#:phases phases)
14594 `(modify-phases ,phases
14595 (delete 'delete-python2-code)
14596 (add-after 'unpack 'delete-python3-code
14597 (lambda _
14598 (for-each delete-file
14599 '("lib/activepapers/builtins3.py"
14600 "lib/activepapers/standardlib3.py"
14601 "lib/activepapers/utility3.py")))))))))))
14602
14603 (define-public python-semver
14604 (package
14605 (name "python-semver")
14606 (version "2.9.0")
14607 (source
14608 (origin
14609 (method url-fetch)
14610 (uri (pypi-uri "semver" version))
14611 (sha256
14612 (base32
14613 "183kg1rhzz3hqizvphkd8hlbf1zxfx8737zhfkmqzxi71jmdw7pd"))))
14614 (build-system python-build-system)
14615 (native-inputs
14616 `(("python-appdirs" ,python-appdirs)
14617 ("python-distlib" ,python-distlib)
14618 ("python-importlib-metadata" ,python-importlib-metadata)
14619 ("python-filelock" ,python-filelock)
14620 ("python-six" ,python-six)
14621 ("python-tox" ,python-tox)
14622 ("python-virtualenv" ,python-virtualenv)))
14623 (home-page "https://github.com/k-bx/python-semver")
14624 (synopsis "Python helper for Semantic Versioning")
14625 (description "This package provides a Python library for
14626 @url{Semantic Versioning, http://semver.org/}.")
14627 (license license:bsd-3)))
14628
14629 (define-public python2-semver
14630 (package-with-python2 python-semver))
14631
14632 (define-public python-pyro4
14633 (package
14634 (name "python-pyro4")
14635 (version "4.77")
14636 (source
14637 (origin
14638 (method url-fetch)
14639 (uri (pypi-uri "Pyro4" version))
14640 (sha256
14641 (base32 "0gsjg869y4gpy265s1gj1f2qy6jn5iz8r2bwwnq78r1r5yi15zib"))))
14642 (build-system python-build-system)
14643 (arguments
14644 '(#:tests? #f)) ;FIXME: Some tests require network access.
14645 (native-inputs
14646 `(("python-cloudpickle" ,python-cloudpickle)
14647 ("python-dill" ,python-dill)
14648 ("python-msgpack" ,python-msgpack)))
14649 (propagated-inputs
14650 `(("python-serpent" ,python-serpent)))
14651 (home-page "https://pyro4.readthedocs.io")
14652 (synopsis "Distributed object middleware for Python")
14653 (description
14654 "Pyro enables you to build applications in which objects can talk to each
14655 other over the network. You can just use normal Python method calls to call
14656 objects on other machines, also known as remote procedure calls (RPC).")
14657 (license license:expat)))
14658
14659 (define-public python2-pyro
14660 (package
14661 (name "python2-pyro")
14662 (version "3.16")
14663 (source
14664 (origin
14665 (method url-fetch)
14666 (uri (pypi-uri "Pyro" version))
14667 (file-name (string-append "Pyro-" version ".tar.gz"))
14668 (sha256
14669 (base32
14670 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
14671 (build-system python-build-system)
14672 (arguments
14673 ;; Pyro is not compatible with Python 3
14674 `(#:python ,python-2
14675 ;; Pyro has no test cases for automatic execution
14676 #:tests? #f))
14677 (home-page "http://pythonhosted.org/Pyro/")
14678 (synopsis "Distributed object manager for Python")
14679 (description "Pyro is a Distributed Object Technology system
14680 written in Python that is designed to be easy to use. It resembles
14681 Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
14682 which is a system and language independent Distributed Object Technology
14683 and has much more to offer than Pyro or RMI. Pyro 3.x is no
14684 longer maintained. New projects should use Pyro4 instead, which
14685 is the new Pyro version that is actively developed.")
14686 (license license:expat)))
14687
14688 (define-public python2-scientific
14689 (package
14690 (name "python2-scientific")
14691 (version "2.9.4")
14692 (source
14693 (origin
14694 (method git-fetch)
14695 (uri (git-reference
14696 (url "https://github.com/khinsen/ScientificPython")
14697 (commit (string-append "rel" version))))
14698 (file-name (git-file-name name version))
14699 (sha256
14700 (base32
14701 "16l48aj9fps9r7jyk8gpxppwrv0fqvlc13sayxskz28r5s6sjwbl"))))
14702 (build-system python-build-system)
14703 (inputs
14704 `(("netcdf" ,netcdf)))
14705 (propagated-inputs
14706 `(("python-numpy" ,python2-numpy-1.8)
14707 ("python-pyro" ,python2-pyro)))
14708 (arguments
14709 ;; ScientificPython is not compatible with Python 3
14710 `(#:python ,python-2
14711 #:tests? #f ; No test suite
14712 #:phases
14713 (modify-phases %standard-phases
14714 (replace 'build
14715 (lambda* (#:key inputs #:allow-other-keys)
14716 (invoke "python" "setup.py" "build"
14717 (string-append "--netcdf_prefix="
14718 (assoc-ref inputs "netcdf"))))))))
14719 (home-page "http://dirac.cnrs-orleans.fr/ScientificPython")
14720 (synopsis "Python modules for scientific computing")
14721 (description "ScientificPython is a collection of Python modules that are
14722 useful for scientific computing. Most modules are rather general (Geometry,
14723 physical units, automatic derivatives, ...) whereas others are more
14724 domain-specific (e.g. netCDF and PDB support). The library is currently
14725 not actively maintained and works only with Python 2 and NumPy < 1.9.")
14726 (license license:cecill-c)))
14727
14728 (define-public python2-mmtk
14729 (package
14730 (name "python2-mmtk")
14731 (version "2.7.12")
14732 (source
14733 (origin
14734 (method git-fetch)
14735 (uri (git-reference
14736 (url "https://github.com/khinsen/MMTK")
14737 (commit (string-append "rel" version))))
14738 (file-name (git-file-name name version))
14739 (sha256
14740 (base32
14741 "1fqwh3ba9jd42nigvn5shndgwb1zy7kh9520ncvqci7n8ffjr6p1"))))
14742 (build-system python-build-system)
14743 (native-inputs
14744 `(("netcdf" ,netcdf)))
14745 (propagated-inputs
14746 `(("python-scientific" ,python2-scientific)
14747 ("python-tkinter" ,python-2 "tk")))
14748 (arguments
14749 `(#:python ,python-2
14750 #:tests? #f
14751 #:phases
14752 (modify-phases %standard-phases
14753 (add-before 'build 'includes-from-scientific
14754 (lambda* (#:key inputs #:allow-other-keys)
14755 (mkdir-p "Include/Scientific")
14756 (copy-recursively
14757 (string-append
14758 (assoc-ref inputs "python-scientific")
14759 "/include/python2.7/Scientific")
14760 "Include/Scientific"))))))
14761 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
14762 (synopsis "Python library for molecular simulation")
14763 (description "MMTK is a library for molecular simulations with an emphasis
14764 on biomolecules. It provides widely used methods such as Molecular Dynamics
14765 and normal mode analysis, but also basic routines for implementing new methods
14766 for simulation and analysis. The library is currently not actively maintained
14767 and works only with Python 2 and NumPy < 1.9.")
14768 (license license:cecill-c)))
14769
14770 (define-public python-phonenumbers
14771 (package
14772 (name "python-phonenumbers")
14773 (version "8.9.1")
14774 (source
14775 (origin
14776 (method url-fetch)
14777 (uri (pypi-uri "phonenumbers" version))
14778 (sha256
14779 (base32
14780 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
14781 (build-system python-build-system)
14782 (home-page
14783 "https://github.com/daviddrysdale/python-phonenumbers")
14784 (synopsis
14785 "Python library for dealing with international phone numbers")
14786 (description
14787 "This package provides a Python port of Google's libphonenumber library.")
14788 (license license:asl2.0)))
14789
14790 (define-public python2-phonenumbers
14791 (package-with-python2 python-phonenumbers))
14792
14793 (define-public python-send2trash
14794 (package
14795 (name "python-send2trash")
14796 (version "1.5.0")
14797 (source
14798 (origin (method git-fetch)
14799 ;; Source tarball on PyPI doesn't include tests.
14800 (uri (git-reference
14801 (url "https://github.com/hsoft/send2trash.git")
14802 (commit version)))
14803 (file-name (git-file-name name version))
14804 (sha256
14805 (base32
14806 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
14807 (build-system python-build-system)
14808 (arguments
14809 '(#:phases
14810 (modify-phases %standard-phases
14811 (add-before 'check 'pre-check
14812 (lambda _
14813 (mkdir-p "/tmp/foo")
14814 (setenv "HOME" "/tmp/foo")
14815 #t)))))
14816 (home-page "https://github.com/hsoft/send2trash")
14817 (synopsis "Send files to the user's @file{~/Trash} directory")
14818 (description "This package provides a Python library to send files to the
14819 user's @file{~/Trash} directory.")
14820 (properties `((python2-variant . ,(delay python2-send2trash))))
14821 (license license:bsd-3)))
14822
14823 (define-public python2-send2trash
14824 (package
14825 (inherit (package-with-python2 (strip-python2-variant python-send2trash)))
14826 (arguments
14827 (substitute-keyword-arguments (package-arguments python-send2trash)
14828 ((#:phases phases)
14829 `(modify-phases ,phases
14830 (add-before 'check 'setenv
14831 (lambda _
14832 (setenv "PYTHONPATH"
14833 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
14834 #t))))))))
14835
14836 (define-public python-yapf
14837 (package
14838 (name "python-yapf")
14839 (version "0.29.0")
14840 (source
14841 (origin
14842 (method url-fetch)
14843 (uri (pypi-uri "yapf" version))
14844 (sha256
14845 (base32
14846 "1pj3xzblmbssshi889b6n9hwqbjpabw6j0fimlng2sshd3226bki"))))
14847 (build-system python-build-system)
14848 (home-page "https://github.com/google/yapf")
14849 (synopsis "Formatter for Python code")
14850 (description "YAPF is a formatter for Python code. It's based off of
14851 @dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
14852 takes the code and reformats it to the best formatting that conforms to the
14853 style guide, even if the original code didn't violate the style guide.")
14854 (license license:asl2.0)))
14855
14856 (define-public python2-yapf
14857 (package-with-python2 python-yapf))
14858
14859 (define-public python-gyp
14860 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
14861 (revision "0"))
14862 (package
14863 (name "python-gyp")
14864 ;; Google does not release versions,
14865 ;; based on second most recent commit date.
14866 (version (git-version "0.0.0" revision commit))
14867 (source
14868 (origin
14869 ;; Google does not release tarballs,
14870 ;; git checkout is needed.
14871 (method git-fetch)
14872 (uri (git-reference
14873 (url "https://chromium.googlesource.com/external/gyp")
14874 (commit commit)))
14875 (file-name (git-file-name name version))
14876 (sha256
14877 (base32
14878 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
14879 (build-system python-build-system)
14880 (home-page "https://gyp.gsrc.io/")
14881 (synopsis "GYP is a Meta-Build system")
14882 (description
14883 "GYP builds build systems for large, cross platform applications.
14884 It can be used to generate XCode projects, Visual Studio projects, Ninja build
14885 files, and Makefiles.")
14886 (license license:bsd-3))))
14887
14888 (define-public python2-gyp
14889 (package-with-python2 python-gyp))
14890
14891 (define-public python-whatever
14892 (package
14893 (name "python-whatever")
14894 (version "0.6")
14895 (source
14896 (origin
14897 (method git-fetch)
14898 (uri (git-reference
14899 (url "https://github.com/Suor/whatever")
14900 (commit version)))
14901 (file-name (git-file-name name version))
14902 (sha256
14903 (base32 "1q7ajgqjfivxqsqgnhp4lc4p6jxyh4zprcsdbpd6dw54inaf0av5"))))
14904 (build-system python-build-system)
14905 (arguments
14906 `(#:phases
14907 (modify-phases %standard-phases
14908 (replace 'check
14909 (lambda _
14910 (invoke "py.test"))))))
14911 (native-inputs
14912 `(("python-pytest" ,python-pytest)))
14913 (home-page "http://github.com/Suor/whatever")
14914 (synopsis "Make anonymous functions by partial application of operators")
14915 (description "@code{whatever} provides an easy way to make anonymous
14916 functions by partial application of operators.")
14917 (license license:bsd-3)))
14918
14919 (define-public python2-whatever
14920 (package-with-python2 python-whatever))
14921
14922 (define-public python-funcy
14923 (package
14924 (name "python-funcy")
14925 (version "1.11")
14926 (source
14927 (origin
14928 (method git-fetch)
14929 (uri (git-reference
14930 (url "https://github.com/Suor/funcy.git")
14931 (commit version)))
14932 (sha256
14933 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
14934 (file-name (git-file-name name version))))
14935 (build-system python-build-system)
14936 (arguments
14937 `(#:phases
14938 (modify-phases %standard-phases
14939 (replace 'check
14940 (lambda _
14941 (invoke "py.test"))))))
14942 (native-inputs
14943 `(("python-pytest" ,python-pytest)
14944 ("python-whatever" ,python-whatever)))
14945 (home-page "http://github.com/Suor/funcy")
14946 (synopsis "Functional tools")
14947 (description "@code{funcy} is a library that provides functional tools.
14948 Examples are:
14949 @enumerate
14950 @item merge - Merges collections of the same type
14951 @item walk - Type-preserving map
14952 @item select - Selects a part of a collection
14953 @item take - Takes the first n items of a collection
14954 @item first - Takes the first item of a collection
14955 @item remove - Predicated-removes items of a collection
14956 @item concat - Concatenates two collections
14957 @item flatten - Flattens a collection with subcollections
14958 @item distinct - Returns only distinct items
14959 @item split - Predicated-splits a collection
14960 @item split_at - Splits a collection at a given item
14961 @item group_by - Groups items by group
14962 @item pairwise - Pairs off adjacent items
14963 @item partial - Partially-applies a function
14964 @item curry - Curries a function
14965 @item compose - Composes functions
14966 @item complement - Complements a predicate
14967 @item all_fn - \"all\" with predicate
14968 @end enumerate")
14969 (license license:bsd-3)))
14970
14971 (define-public python2-funcy
14972 (package-with-python2 python-funcy))
14973
14974 (define-public python-isoweek
14975 (package
14976 (name "python-isoweek")
14977 (version "1.3.3")
14978 (source
14979 (origin
14980 (method url-fetch)
14981 (uri (pypi-uri "isoweek" version))
14982 (sha256
14983 (base32
14984 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
14985 (build-system python-build-system)
14986 (home-page "https://github.com/gisle/isoweek")
14987 (synopsis "Objects representing a week")
14988 (description "The @code{isoweek} module provide the class Week that
14989 implements the week definition of ISO 8601. This standard also defines
14990 a notation for identifying weeks; yyyyWww (where the W is a literal).
14991 Week instances stringify to this form.")
14992 (license license:bsd-3)))
14993
14994 (define-public python2-isoweek
14995 (package-with-python2 python-isoweek))
14996
14997 (define-public python-tokenize-rt
14998 (package
14999 (name "python-tokenize-rt")
15000 (version "2.0.1")
15001 (source
15002 (origin
15003 (method url-fetch)
15004 (uri (pypi-uri "tokenize-rt" version))
15005 (sha256
15006 (base32
15007 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
15008 (build-system python-build-system)
15009 (home-page "https://github.com/asottile/tokenize-rt")
15010 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
15011 (description
15012 "This Python library is a wrapper around @code{tokenize} from the Python
15013 standard library. It provides two additional tokens @code{ESCAPED_NL} and
15014 @code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
15015 and @code{tokens_to_src} to roundtrip.")
15016 (license license:expat)))
15017
15018 (define-public python-future-fstrings
15019 (package
15020 (name "python-future-fstrings")
15021 (version "0.4.1")
15022 (source
15023 (origin
15024 (method url-fetch)
15025 (uri (pypi-uri "future_fstrings" version))
15026 (sha256
15027 (base32
15028 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
15029 (build-system python-build-system)
15030 (propagated-inputs
15031 `(("python-tokenize-rt" ,python-tokenize-rt)))
15032 (home-page "https://github.com/asottile/future-fstrings")
15033 (synopsis "Backport of fstrings to Python < 3.6")
15034 (description
15035 "This package provides a UTF-8 compatible encoding
15036 @code{future_fstrings}, which performs source manipulation. It decodes the
15037 source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
15038 @code{f} strings.")
15039 (license license:expat)))
15040
15041 (define-public python-typed-ast
15042 (package
15043 (name "python-typed-ast")
15044 (version "1.4.0")
15045 (source
15046 (origin
15047 (method git-fetch)
15048 (uri (git-reference
15049 (url "https://github.com/python/typed_ast.git")
15050 (commit version)))
15051 (sha256
15052 (base32 "0l0hz809f7i356kmqkvfsaswiidb98j9hs9rrjnfawzqcbffzgyb"))
15053 (file-name (git-file-name name version))))
15054 (build-system python-build-system)
15055 (arguments
15056 `(#:modules ((guix build utils)
15057 (guix build python-build-system)
15058 (ice-9 ftw)
15059 (srfi srfi-1)
15060 (srfi srfi-26))
15061 #:phases
15062 (modify-phases %standard-phases
15063 (replace 'check
15064 (lambda _
15065 (let ((cwd (getcwd)))
15066 (setenv "PYTHONPATH"
15067 (string-append cwd "/build/"
15068 (find (cut string-prefix? "lib" <>)
15069 (scandir (string-append cwd "/build")))
15070 ":"
15071 (getenv "PYTHONPATH"))))
15072 (invoke "pytest")
15073 #t)))))
15074 (native-inputs `(("python-pytest" ,python-pytest)))
15075 (home-page "https://github.com/python/typed_ast")
15076 (synopsis "Fork of Python @code{ast} modules with type comment support")
15077 (description "This package provides a parser similar to the standard
15078 @code{ast} library. Unlike @code{ast}, the parsers in @code{typed_ast}
15079 include PEP 484 type comments and are independent of the version of Python
15080 under which they are run. The @code{typed_ast} parsers produce the standard
15081 Python AST (plus type comments), and are both fast and correct, as they are
15082 based on the CPython 2.7 and 3.7 parsers.")
15083 ;; See the file "LICENSE" for the details.
15084 (license (list license:psfl
15085 license:asl2.0
15086 license:expat)))) ;ast27/Parser/spark.py
15087
15088 (define-public python-typing
15089 (package
15090 (name "python-typing")
15091 (version "3.6.6")
15092 (source
15093 (origin
15094 (method url-fetch)
15095 (uri (pypi-uri "typing" version))
15096 (sha256
15097 (base32
15098 "0ba9acs4awx15bf9v3nrs781msbd2nx826906nj6fqks2bvca9s0"))))
15099 (build-system python-build-system)
15100 (home-page "https://docs.python.org/3/library/typing.html")
15101 (synopsis "Type hints for Python")
15102 (description "This is a backport of the standard library @code{typing}
15103 module to Python versions older than 3.5. Typing defines a standard notation
15104 for Python function and variable type annotations. The notation can be used
15105 for documenting code in a concise, standard format, and it has been designed
15106 to also be used by static and runtime type checkers, static analyzers, IDEs
15107 and other tools.")
15108 (license license:psfl)))
15109
15110 (define-public python2-typing
15111 (package-with-python2 python-typing))
15112
15113 (define-public python-typing-extensions
15114 (package
15115 (name "python-typing-extensions")
15116 (version "3.7.2")
15117 (source
15118 (origin
15119 (method url-fetch)
15120 (uri (pypi-uri "typing_extensions" version))
15121 (sha256
15122 (base32
15123 "0wfsv71pvkyf2na938l579jh0v3kzl6g744ijgnahcwd4d9x0b7v"))))
15124 (build-system python-build-system)
15125 (home-page
15126 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
15127 (synopsis "Experimental type hints for Python")
15128 (description
15129 "The typing_extensions module contains additional @code{typing} hints not
15130 yet present in the of the @code{typing} standard library.
15131 Included are implementations of:
15132 @enumerate
15133 @item ClassVar
15134 @item ContextManager
15135 @item Counter
15136 @item DefaultDict
15137 @item Deque
15138 @item NewType
15139 @item NoReturn
15140 @item overload
15141 @item Protocol
15142 @item runtime
15143 @item Text
15144 @item Type
15145 @item TYPE_CHECKING
15146 @item AsyncGenerator
15147 @end enumerate\n")
15148 (license license:psfl)))
15149
15150 (define-public bpython
15151 (package
15152 (name "bpython")
15153 (version "0.18")
15154 (source
15155 (origin
15156 (method url-fetch)
15157 (uri (pypi-uri "bpython" version))
15158 (sha256
15159 (base32 "1hl6frgvr2lqaxqczl8amg9xih32b3gzv429vs0qrjb8wpdj1k2n"))))
15160 (build-system python-build-system)
15161 (arguments
15162 `(#:phases
15163 (modify-phases %standard-phases
15164 (add-after 'unpack 'remove-failing-test
15165 (lambda _
15166 ;; Remove failing test. FIXME: make it pass
15167 (delete-file "bpython/test/test_args.py")
15168 #t))
15169 (add-after 'wrap 'add-aliases
15170 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
15171 (lambda* (#:key outputs #:allow-other-keys)
15172 (let ((out (assoc-ref outputs "out")))
15173 (for-each
15174 (lambda (old new)
15175 (symlink old (string-append out "/bin/" new)))
15176 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
15177 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
15178 #t)))))
15179 (propagated-inputs
15180 `(("python-pygments" ,python-pygments)
15181 ("python-requests" ,python-requests)
15182 ("python-babel" ,python-babel) ; optional, for internationalization
15183 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
15184 ("python-greenlet" ,python-greenlet)
15185 ("python-urwid" ,python-urwid) ; for bpython-urwid only
15186 ("python-six" ,python-six)))
15187 (native-inputs
15188 `(("python-sphinx" ,python-sphinx)
15189 ("python-mock" ,python-mock)))
15190 (home-page "https://bpython-interpreter.org/")
15191 (synopsis "Fancy interface to the Python interpreter")
15192 (description "Bpython is a fancy interface to the Python
15193 interpreter. bpython's main features are
15194
15195 @enumerate
15196 @item in-line syntax highlighting,
15197 @item readline-like autocomplete with suggestions displayed as you type,
15198 @item expected parameter list for any Python function,
15199 @item \"rewind\" function to pop the last line of code from memory and
15200 re-evaluate,
15201 @item send the code you've entered off to a pastebin,
15202 @item save the code you've entered to a file, and
15203 @item auto-indentation.
15204 @end enumerate")
15205 (license license:expat)))
15206
15207 (define-public bpython2
15208 (let ((base (package-with-python2
15209 (strip-python2-variant bpython))))
15210 (package (inherit base)
15211 (name "bpython2")
15212 (arguments
15213 `(#:python ,python-2
15214 #:phases
15215 (modify-phases %standard-phases
15216 (add-after 'unpack 'remove-failing-test
15217 (lambda _
15218 ;; Remove failing test. FIXME: make it pass
15219 (delete-file "bpython/test/test_args.py")
15220 ;; Disable failing test-cases (renaming inhibits they are
15221 ;; discovered)
15222 (substitute* "bpython/test/test_curtsies_repl.py"
15223 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
15224 (string-append a "xxx_off_" b))
15225 (("^(\\s*def )(test_complex\\W)" _ a b)
15226 (string-append a "xxx_off_" b)))
15227 #t))
15228 (add-before 'build 'rename-scripts
15229 ;; rename the scripts to bypthon2, bpdb2, etc.
15230 (lambda _
15231 (substitute* "setup.py"
15232 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
15233 (string-append name "2" rest "\n"))
15234 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
15235 (string-append name "2" (or sub "") rest "\n")))
15236 #t))))))))
15237
15238 (define-public python-pyinotify
15239 (package
15240 (name "python-pyinotify")
15241 (version "0.9.6")
15242 (source (origin
15243 (method url-fetch)
15244 (uri (pypi-uri "pyinotify" version))
15245 (sha256
15246 (base32
15247 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
15248 (build-system python-build-system)
15249 (arguments `(#:tests? #f)) ;no tests
15250 (home-page "https://github.com/seb-m/pyinotify")
15251 (synopsis "Python library for monitoring inotify events")
15252 (description
15253 "@code{pyinotify} provides a Python interface for monitoring
15254 file system events on Linux.")
15255 (license license:expat)))
15256
15257 (define-public python2-pyinotify
15258 (package-with-python2 python-pyinotify))
15259
15260 ;; Ada parser uses this version.
15261 (define-public python2-quex-0.67.3
15262 (package
15263 (name "python2-quex")
15264 (version "0.67.3")
15265 (source
15266 (origin
15267 (method url-fetch)
15268 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
15269 (version-major+minor version)
15270 "/quex-" version ".zip"))
15271 (sha256
15272 (base32
15273 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
15274 (build-system python-build-system)
15275 (native-inputs
15276 `(("unzip" ,unzip)))
15277 (arguments
15278 `(#:python ,python-2
15279 #:tests? #f
15280 #:phases
15281 (modify-phases %standard-phases
15282 (delete 'configure)
15283 (delete 'build)
15284 (replace 'install
15285 (lambda* (#:key outputs #:allow-other-keys)
15286 (let* ((out (assoc-ref outputs "out"))
15287 (share/quex (string-append out "/share/quex"))
15288 (bin (string-append out "/bin")))
15289 (copy-recursively "." share/quex)
15290 (mkdir-p bin)
15291 (symlink (string-append share/quex "/quex-exe.py")
15292 (string-append bin "/quex"))
15293 #t))))))
15294 (native-search-paths
15295 (list (search-path-specification
15296 (variable "QUEX_PATH")
15297 (files '("share/quex")))))
15298 (home-page "http://quex.sourceforge.net/")
15299 (synopsis "Lexical analyzer generator in Python")
15300 (description "@code{quex} is a lexical analyzer generator in Python.")
15301 (license license:lgpl2.1+))) ; Non-military
15302
15303 (define-public python2-quex
15304 (package (inherit python2-quex-0.67.3)
15305 (name "python2-quex")
15306 (version "0.68.1")
15307 (source
15308 (origin
15309 (method url-fetch)
15310 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
15311 (sha256
15312 (base32
15313 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
15314 (file-name (string-append name "-" version ".tar.gz"))))))
15315
15316 (define-public python-more-itertools
15317 (package
15318 (name "python-more-itertools")
15319 (version "7.1.0")
15320 (source
15321 (origin
15322 (method url-fetch)
15323 (uri (pypi-uri "more-itertools" version))
15324 (sha256
15325 (base32
15326 "16phg2f2dvm6ci5wr49ncha5lmc0m2in3bsl33c61vzca4gkvd4b"))))
15327 (build-system python-build-system)
15328 (home-page "https://github.com/erikrose/more-itertools")
15329 (synopsis "More routines for operating on iterables, beyond itertools")
15330 (description "Python's built-in @code{itertools} module implements a
15331 number of iterator building blocks inspired by constructs from APL, Haskell,
15332 and SML. @code{more-itertools} includes additional building blocks for
15333 working with iterables.")
15334 (properties `((python2-variant . ,(delay python2-more-itertools))))
15335 (license license:expat)))
15336
15337 ;; The 5.x series are the last versions supporting Python 2.7.
15338 (define-public python2-more-itertools
15339 (package
15340 (inherit python-more-itertools)
15341 (name "python2-more-itertools")
15342 (version "5.0.0")
15343 (source (origin
15344 (method url-fetch)
15345 (uri (pypi-uri "more-itertools" version))
15346 (sha256
15347 (base32
15348 "1r12cm6mcdwdzz7d47a6g4l437xsvapdlgyhqay3i2nrlv03da9q"))))
15349 (arguments
15350 `(#:python ,python2-minimal))
15351 (propagated-inputs
15352 `(("python2-six" ,python2-six-bootstrap)))))
15353
15354 (define-public python-latexcodec
15355 (package
15356 (name "python-latexcodec")
15357 (version "1.0.7")
15358 (source
15359 (origin
15360 (method url-fetch)
15361 (uri (pypi-uri "latexcodec" version))
15362 (sha256
15363 (base32 "0wnp3yqcgx0rpy8dz51vh75lbp2qif67da19zi7m3ca98n887hgb"))))
15364 (build-system python-build-system)
15365 (inputs
15366 `(("python-six" ,python-six)))
15367 (home-page "https://readthedocs.org/projects/latexcodec/")
15368 (synopsis "Work with LaTeX code in Python")
15369 (description "Lexer and codec to work with LaTeX code in Python.")
15370 (license license:expat)))
15371
15372 (define-public python-pybtex
15373 (package
15374 (name "python-pybtex")
15375 (version "0.22.2")
15376 (source
15377 (origin
15378 (method url-fetch)
15379 (uri (pypi-uri "pybtex" version))
15380 (sha256
15381 (base32 "070wfcmxrd7xg1si421mi9150gmx2qwx431nwf69sq3hhmgnx080"))))
15382 (build-system python-build-system)
15383 (native-inputs
15384 `(("python-nose" ,python-nose)))
15385 (inputs
15386 `(("python-latexcodec" ,python-latexcodec)
15387 ("python-pyyaml" ,python-pyyaml)
15388 ("python-six" ,python-six)))
15389 (arguments
15390 `(#:test-target "nosetests"))
15391 (home-page "https://pybtex.org/")
15392 (synopsis "BibTeX-compatible bibliography processor")
15393 (description "Pybtex is a BibTeX-compatible bibliography processor written
15394 in Python. You can simply type pybtex instead of bibtex.")
15395 (license license:expat)))
15396
15397 (define-public python-onetimepass
15398 (package
15399 (name "python-onetimepass")
15400 (version "1.0.1")
15401 (source
15402 (origin
15403 (method url-fetch)
15404 (uri (pypi-uri "onetimepass" version))
15405 (sha256
15406 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
15407 (build-system python-build-system)
15408 (propagated-inputs `(("python-six" ,python-six)))
15409 (home-page "https://github.com/tadeck/onetimepass/")
15410 (synopsis "One-time password library")
15411 (description "Python one-time password library for HMAC-based (HOTP) and
15412 time-based (TOTP) passwords.")
15413 (license license:expat)))
15414
15415 (define-public python-parso
15416 (package
15417 (name "python-parso")
15418 (version "0.5.2")
15419 (source
15420 (origin
15421 (method url-fetch)
15422 (uri (pypi-uri "parso" version))
15423 (sha256
15424 (base32
15425 "1qgvrkpma7vylrk047mxxvqd66nwqk978n3ig2w8iz9m3bgjbksm"))))
15426 (native-inputs
15427 `(("python-pytest" ,python-pytest)))
15428 (build-system python-build-system)
15429 (arguments
15430 `(#:phases (modify-phases %standard-phases
15431 (replace 'check
15432 (lambda _ (invoke "pytest" "-vv"))))))
15433 (home-page "https://github.com/davidhalter/parso")
15434 (synopsis "Python Parser")
15435 (description "Parso is a Python parser that supports error recovery and
15436 round-trip parsing for different Python versions (in multiple Python versions).
15437 Parso is also able to list multiple syntax errors in your Python file.")
15438 (license license:expat)))
15439
15440 (define-public python2-parso
15441 (package-with-python2 python-parso))
15442
15443 (define-public python-async-generator
15444 (package
15445 (name "python-async-generator")
15446 (version "1.10")
15447 (source
15448 (origin
15449 (method url-fetch)
15450 (uri (pypi-uri "async_generator" version))
15451 (sha256
15452 (base32
15453 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
15454 (build-system python-build-system)
15455 (native-inputs
15456 `(("python-pytest" ,python-pytest)))
15457 (home-page "https://github.com/python-trio/async_generator")
15458 (synopsis "Async generators and context managers for Python 3.5+")
15459 (description "@code{async_generator} back-ports Python 3.6's native async
15460 generators and Python 3.7's context managers into Python 3.5.")
15461 ;; Dual licensed.
15462 (license (list license:expat license:asl2.0))))
15463
15464 (define-public python-async-timeout
15465 (package
15466 (name "python-async-timeout")
15467 (version "3.0.1")
15468 (source
15469 (origin
15470 (method url-fetch)
15471 (uri (pypi-uri "async-timeout" version))
15472 (sha256
15473 (base32
15474 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
15475 (build-system python-build-system)
15476 (home-page "https://github.com/aio-libs/async_timeout/")
15477 (synopsis "Timeout context manager for asyncio programs")
15478 (description "@code{async-timeout} provides a timeout timeout context
15479 manager compatible with @code{asyncio}.")
15480 (license license:asl2.0)))
15481
15482 (define-public python-glob2
15483 (package
15484 (name "python-glob2")
15485 (version "0.7")
15486 (source
15487 (origin
15488 (method git-fetch)
15489 (uri (git-reference
15490 (url "https://github.com/miracle2k/python-glob2.git")
15491 (commit (string-append "v" version))))
15492 (file-name (git-file-name name version))
15493 (sha256
15494 (base32 "160nh2ay9lw2hi0rixpzb2k87r6ql56k0j2cm87lqz8xc8zbw919"))))
15495 (build-system python-build-system)
15496 (home-page "https://github.com/miracle2k/python-glob2/")
15497 (synopsis "Extended Version of the python buildin glob module")
15498 (description "This is an extended version of the Python
15499 @url{http://docs.python.org/library/glob.html, built-in glob module} which
15500 adds:
15501
15502 @itemize
15503 @item The ability to capture the text matched by glob patterns, and return
15504 those matches alongside the file names.
15505 @item A recursive @code{**} globbing syntax, akin for example to the
15506 @code{globstar} option of Bash.
15507 @item The ability to replace the file system functions used, in order to glob
15508 on virtual file systems.
15509 @item Compatible with Python 2 and Python 3 (tested with 3.3).
15510 @end itemize
15511
15512 Glob2 currently based on the glob code from Python 3.3.1.")
15513 (license license:bsd-2)))
15514
15515 (define-public python2-glob2
15516 (package-with-python2 python-glob2))
15517
15518 (define-public python-gipc
15519 (package
15520 (name "python-gipc")
15521 (version "0.6.0")
15522 (source
15523 (origin
15524 (method url-fetch)
15525 (uri (pypi-uri "gipc" version ".zip"))
15526 (sha256
15527 (base32
15528 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
15529 (build-system python-build-system)
15530 (native-inputs
15531 `(("unzip" ,unzip)))
15532 (propagated-inputs
15533 `(("python-gevent" ,python-gevent)))
15534 (home-page "https://gehrcke.de/gipc/")
15535 (synopsis "Child process management in the context of gevent")
15536 (description "Usage of Python's multiprocessing package in a
15537 gevent-powered application may raise problems. With @code{gipc},
15538 process-based child processes can safely be created anywhere within a
15539 gevent-powered application.")
15540 (license license:expat)))
15541
15542 (define-public python2-gipc
15543 (package-with-python2 python-gipc))
15544
15545 (define-public python-fusepy
15546 (package
15547 (name "python-fusepy")
15548 (version "2.0.4")
15549 (source
15550 (origin
15551 (method url-fetch)
15552 (uri (pypi-uri "fusepy" version))
15553 (sha256
15554 (base32
15555 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
15556 (build-system python-build-system)
15557 (arguments
15558 `(#:phases
15559 (modify-phases %standard-phases
15560 (add-before 'build 'set-library-file-name
15561 (lambda* (#:key inputs #:allow-other-keys)
15562 (let ((fuse (assoc-ref inputs "fuse")))
15563 (substitute* "fuse.py"
15564 (("find_library\\('fuse'\\)")
15565 (string-append "'" fuse "/lib/libfuse.so'")))
15566 #t))))))
15567 (propagated-inputs
15568 `(("fuse" ,fuse)))
15569 (home-page "https://github.com/fusepy/fusepy")
15570 (synopsis "Simple ctypes bindings for FUSE")
15571 (description "Python module that provides a simple interface to FUSE and
15572 MacFUSE. The binding is created using the standard @code{ctypes} library.")
15573 (license license:isc)))
15574
15575 (define-public python2-fusepy
15576 (package-with-python2 python-fusepy))
15577
15578 (define-public python2-gdrivefs
15579 (package
15580 (name "python2-gdrivefs")
15581 (version "0.14.9")
15582 (source
15583 (origin
15584 (method url-fetch)
15585 (uri (pypi-uri "gdrivefs" version))
15586 (sha256
15587 (base32
15588 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
15589 (build-system python-build-system)
15590 (arguments
15591 `(#:python ,python-2
15592 #:phases
15593 (modify-phases %standard-phases
15594 (add-before 'build 'patch-setup-py
15595 (lambda _
15596 ;; Update requirements from dependency==version
15597 ;; to dependency>=version
15598 (substitute* "gdrivefs/resources/requirements.txt"
15599 (("==") ">="))
15600 #t)))))
15601 (native-inputs
15602 `(("python2-gipc" ,python2-gipc)
15603 ("python2-gevent" ,python2-gevent)
15604 ("python2-greenlet" ,python2-greenlet)
15605 ("python2-httplib2" ,python2-httplib2)
15606 ("python2-uritemplate" ,python2-uritemplate)
15607 ("python2-oauth2client" ,python2-oauth2client)
15608 ("python2-six" ,python2-six)))
15609 (propagated-inputs
15610 `(("python2-dateutil" ,python2-dateutil)
15611 ("python2-fusepy" ,python2-fusepy)
15612 ("python2-google-api-client" ,python2-google-api-client)))
15613 (home-page "https://github.com/dsoprea/GDriveFS")
15614 (synopsis "Mount Google Drive as a local file system")
15615 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
15616 under Python 2.7.")
15617 (license license:gpl2)))
15618
15619 (define-public pybind11
15620 (package
15621 (name "pybind11")
15622 (version "2.4.3")
15623 (source (origin
15624 (method git-fetch)
15625 (uri (git-reference
15626 (url "https://github.com/pybind/pybind11.git")
15627 (commit (string-append "v" version))))
15628 (sha256
15629 (base32
15630 "0k89w4bsfbpzw963ykg1cyszi3h3nk393qd31m6y46pcfxkqh4rd"))
15631 (file-name (git-file-name name version))))
15632 (build-system cmake-build-system)
15633 (native-inputs
15634 `(("python" ,python-wrapper)
15635
15636 ;; The following dependencies are used for tests.
15637 ("python-pytest" ,python-pytest)
15638 ("catch" ,catch-framework2-1)
15639 ("eigen" ,eigen)))
15640 (arguments
15641 `(#:configure-flags
15642 (list (string-append "-DCATCH_INCLUDE_DIR="
15643 (assoc-ref %build-inputs "catch")
15644 "/include/catch"))
15645
15646 #:phases (modify-phases %standard-phases
15647 (add-after 'install 'install-python
15648 (lambda* (#:key outputs #:allow-other-keys)
15649 (let ((out (assoc-ref outputs "out")))
15650 (with-directory-excursion "../source"
15651 (setenv "PYBIND11_USE_CMAKE" "yes")
15652 (invoke "python" "setup.py" "install"
15653 "--single-version-externally-managed"
15654 "--root=/"
15655 (string-append "--prefix=" out)))))))
15656
15657 #:test-target "check"))
15658 (home-page "https://github.com/pybind/pybind11/")
15659 (synopsis "Seamless operability between C++11 and Python")
15660 (description
15661 "@code{pybind11} is a lightweight header-only library that exposes C++
15662 types in Python and vice versa, mainly to create Python bindings of existing
15663 C++ code. Its goals and syntax are similar to the @code{Boost.Python}
15664 library: to minimize boilerplate code in traditional extension modules by
15665 inferring type information using compile-time introspection.")
15666 (license license:bsd-3)))
15667
15668 (define-public python-fasteners
15669 (package
15670 (name "python-fasteners")
15671 (version "0.14.1")
15672 (source
15673 (origin
15674 (method url-fetch)
15675 (uri (pypi-uri "fasteners" version))
15676 (sha256
15677 (base32
15678 "063y20kx01ihbz2mziapmjxi2cd0dq48jzg587xdsdp07xvpcz22"))))
15679 (build-system python-build-system)
15680 (propagated-inputs
15681 `(("python-monotonic" ,python-monotonic)
15682 ("python-six" ,python-six)
15683 ("python-testtools" ,python-testtools)))
15684 (home-page "https://github.com/harlowja/fasteners")
15685 (synopsis "Python package that provides useful locks")
15686 (description
15687 "This package provides a Python program that provides following locks:
15688
15689 @itemize
15690 @item Locking decorator
15691 @item Reader-writer locks
15692 @item Inter-process locks
15693 @item Generic helpers
15694 @end itemize\n")
15695 (properties `((python2-variant . ,(delay python2-fasteners))))
15696 (license license:asl2.0)))
15697
15698 (define-public python2-fasteners
15699 (let ((base (package-with-python2 (strip-python2-variant python-fasteners))))
15700 (package
15701 (inherit base)
15702 (propagated-inputs
15703 `(("python2-futures" ,python2-futures)
15704 ,@(package-propagated-inputs base))))))
15705
15706 (define-public python-requests-file
15707 (package
15708 (name "python-requests-file")
15709 (version "1.4.3")
15710 (source
15711 (origin
15712 (method url-fetch)
15713 (uri (pypi-uri "requests-file" version))
15714 (sha256
15715 (base32
15716 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
15717 (build-system python-build-system)
15718 (propagated-inputs
15719 `(("python-requests" ,python-requests)
15720 ("python-six" ,python-six)))
15721 (home-page
15722 "https://github.com/dashea/requests-file")
15723 (synopsis "File transport adapter for Requests")
15724 (description
15725 "Requests-File is a transport adapter for use with the Requests Python
15726 library to allow local file system access via @code{file://} URLs.")
15727 (license license:asl2.0)))
15728
15729 (define-public python2-requests-file
15730 (package-with-python2 python-requests-file))
15731
15732 (define-public python-tldextract
15733 (package
15734 (name "python-tldextract")
15735 (version "2.2.0")
15736 (source
15737 (origin
15738 (method url-fetch)
15739 (uri (pypi-uri "tldextract" version))
15740 (sha256
15741 (base32
15742 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
15743 (build-system python-build-system)
15744 (native-inputs
15745 `(("python-pytest" ,python-pytest)
15746 ("python-responses" ,python-responses)))
15747 (propagated-inputs
15748 `(("python-idna" ,python-idna)
15749 ("python-requests" ,python-requests)
15750 ("python-requests-file" ,python-requests-file)))
15751 (home-page
15752 "https://github.com/john-kurkowski/tldextract")
15753 (synopsis
15754 "Separate the TLD from the registered domain and subdomains of a URL")
15755 (description
15756 "TLDExtract accurately separates the TLD from the registered domain and
15757 subdomains of a URL, using the Public Suffix List. By default, this includes
15758 the public ICANN TLDs and their exceptions. It can optionally support the
15759 Public Suffix List's private domains as well.")
15760 (license license:bsd-3)))
15761
15762 (define-public python2-tldextract
15763 (package-with-python2 python-tldextract))
15764
15765 (define-public python-pynamecheap
15766 (package
15767 (name "python-pynamecheap")
15768 (version "0.0.3")
15769 (source
15770 (origin
15771 (method url-fetch)
15772 (uri (pypi-uri "PyNamecheap" version))
15773 (sha256
15774 (base32
15775 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
15776 (build-system python-build-system)
15777 (propagated-inputs
15778 `(("python-requests" ,python-requests)))
15779 (home-page
15780 "https://github.com/Bemmu/PyNamecheap")
15781 (synopsis
15782 "Namecheap API client in Python")
15783 (description
15784 "PyNamecheap is a Namecheap API client in Python.")
15785 (license license:expat)))
15786
15787 (define-public python2-pynamecheap
15788 (package-with-python2 python-pynamecheap))
15789
15790 (define-public python-dns-lexicon
15791 (package
15792 (name "python-dns-lexicon")
15793 (version "2.4.0")
15794 (source
15795 (origin
15796 (method url-fetch)
15797 (uri (pypi-uri "dns-lexicon" version))
15798 (sha256
15799 (base32
15800 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
15801 (build-system python-build-system)
15802 (arguments
15803 `(#:tests? #f)) ;requires internet access
15804 (propagated-inputs
15805 `(("python-future" ,python-future)
15806 ("python-pynamecheap" ,python-pynamecheap)
15807 ("python-requests" ,python-requests)
15808 ("python-tldextract" ,python-tldextract)
15809 ("python-urllib3" ,python-urllib3)))
15810 (home-page "https://github.com/AnalogJ/lexicon")
15811 (synopsis
15812 "Manipulate DNS records on various DNS providers")
15813 (description
15814 "Lexicon provides a way to manipulate DNS records on multiple DNS
15815 providers in a standardized way. It has a CLI but it can also be used as a
15816 Python library. It was designed to be used in automation, specifically with
15817 Let's Encrypt.")
15818 (license license:expat)))
15819
15820 (define-public python2-dns-lexicon
15821 (package-with-python2 python-dns-lexicon))
15822
15823 (define-public python-commandlines
15824 (package
15825 (name "python-commandlines")
15826 (version "0.4.1")
15827 (source
15828 (origin
15829 (method url-fetch)
15830 (uri (pypi-uri "commandlines" version))
15831 (sha256
15832 (base32
15833 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
15834 (build-system python-build-system)
15835 (home-page "https://github.com/chrissimpkins/commandlines")
15836 (synopsis "Command line argument to object parsing library")
15837 (description
15838 "@code{Commandlines} is a Python library for command line application
15839 development that supports command line argument parsing, command string
15840 validation testing and application logic.")
15841 (license license:expat)))
15842
15843 ;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
15844 ;; python-numba. They have a very unflexible relationship.
15845 (define-public python-numba
15846 (package
15847 (name "python-numba")
15848 (version "0.46.0")
15849 (source
15850 (origin
15851 (method url-fetch)
15852 (uri (pypi-uri "numba" version))
15853 (sha256
15854 (base32
15855 "1vnfzcq6fcnkmdms6114d49awvvj5181fl7z1wlha27qc2paxjy2"))))
15856 (build-system python-build-system)
15857 (arguments
15858 `(#:modules ((guix build utils)
15859 (guix build python-build-system)
15860 (ice-9 ftw)
15861 (srfi srfi-1)
15862 (srfi srfi-26))
15863 #:phases
15864 (modify-phases %standard-phases
15865 (add-after 'unpack 'disable-proprietary-features
15866 (lambda _
15867 (setenv "NUMBA_DISABLE_HSA" "1")
15868 (setenv "NUMBA_DISABLE_CUDA" "1")
15869 #t))
15870 (add-after 'unpack 'remove-failing-tests
15871 (lambda _
15872 ;; FIXME: These tests fail for unknown reasons:
15873 ;; test_non_writable_pycache, test_non_creatable_pycache, and
15874 ;; test_frozen (all in numba.tests.test_dispatcher.TestCache).
15875 (substitute* "numba/tests/test_dispatcher.py"
15876 (("def test(_non_writable_pycache)" _ m)
15877 (string-append "def guix_skip" m))
15878 (("def test(_non_creatable_pycache)" _ m)
15879 (string-append "def guix_skip" m))
15880 (("def test(_frozen)" _ m)
15881 (string-append "def guix_skip" m)))
15882
15883 ;; These tests fail because we don't run the tests from the build
15884 ;; directory: test_setup_py_distutils, test_setup_py_setuptools
15885 ;; They are in numba.tests.test_pycc.TestDistutilsSupport.
15886 (substitute* "numba/tests/test_pycc.py"
15887 (("def test(_setup_py_distutils|_setup_py_setuptools)" _ m)
15888 (string-append "def guix_skip" m)))
15889
15890 ;; These tests fail because our version of Python does not have
15891 ;; a recognizable front-end for the Numba distribution to use
15892 ;; to check against.
15893 (substitute* "numba/tests/test_entrypoints.py"
15894 (("def test(_init_entrypoint)" _ m)
15895 (string-append "def guix_skip" m)))
15896 (substitute* "numba/tests/test_jitclasses.py"
15897 (("def test(_jitclass_longlabel_not_truncated)" _ m)
15898 (string-append "def guix_skip" m)))
15899 #t))
15900 (replace 'check
15901 (lambda _
15902 (let ((cwd (getcwd)))
15903 (setenv "PYTHONPATH"
15904 (string-append cwd "/build/"
15905 (find (cut string-prefix? "lib" <>)
15906 (scandir (string-append cwd "/build")))
15907 ":"
15908 (getenv "PYTHONPATH")))
15909 ;; Something is wrong with the PYTHONPATH when running the
15910 ;; tests from the build directory, as it complains about not being
15911 ;; able to import certain modules.
15912 (with-directory-excursion "/tmp"
15913 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))
15914 #t)))))
15915 (propagated-inputs
15916 `(("python-llvmlite" ,python-llvmlite)
15917 ("python-numpy" ,python-numpy)
15918 ("python-singledispatch" ,python-singledispatch)))
15919 ;; Needed for tests.
15920 (inputs
15921 `(("python-jinja2" ,python-jinja2)
15922 ("python-pygments" ,python-pygments)))
15923 (home-page "https://numba.pydata.org")
15924 (synopsis "Compile Python code using LLVM")
15925 (description "Numba gives you the power to speed up your applications with
15926 high performance functions written directly in Python. With a few
15927 annotations, array-oriented and math-heavy Python code can be just-in-time
15928 compiled to native machine instructions, similar in performance to C, C++ and
15929 Fortran, without having to switch languages or Python interpreters.
15930
15931 Numba works by generating optimized machine code using the LLVM compiler
15932 infrastructure at import time, runtime, or statically (using the included pycc
15933 tool).")
15934 (license license:bsd-3)))
15935
15936 (define-public python-numcodecs
15937 (package
15938 (name "python-numcodecs")
15939 (version "0.6.4")
15940 (source
15941 (origin
15942 (method url-fetch)
15943 (uri (pypi-uri "numcodecs" version))
15944 (sha256
15945 (base32
15946 "0kbfr8pl3x9glsypbq8hzim003f16ml1b1cvgrh4w1sdvgal6j7g"))))
15947 (build-system python-build-system)
15948 (propagated-inputs
15949 `(("python-numpy" ,python-numpy)
15950 ("python-msgpack" ,python-msgpack)))
15951 (native-inputs
15952 `(("python-pytest" ,python-pytest)
15953 ("python-setuptools-scm" ,python-setuptools-scm)))
15954 (home-page "https://github.com/zarr-developers/numcodecs")
15955 (synopsis "Buffer compression and transformation codecs")
15956 (description
15957 "This Python package provides buffer compression and transformation
15958 codecs for use in data storage and communication applications.")
15959 (license license:expat)))
15960
15961 (define-public python-asciitree
15962 (package
15963 (name "python-asciitree")
15964 (version "0.3.3")
15965 (source
15966 (origin
15967 (method url-fetch)
15968 (uri (pypi-uri "asciitree" version))
15969 (sha256
15970 (base32
15971 "0vhgri2m2xlnibhz4xwn4hpbc7xacisxjqrk6k5kyppq96vbk92a"))))
15972 (build-system python-build-system)
15973 (home-page "https://github.com/mbr/asciitree")
15974 (synopsis "Draws ASCII trees")
15975 (description "This package draws tree structures using characters.")
15976 (license license:expat)))
15977
15978 (define-public python-zarr
15979 (package
15980 (name "python-zarr")
15981 (version "2.4.0")
15982 (source
15983 (origin
15984 (method url-fetch)
15985 (uri (pypi-uri "zarr" version))
15986 (sha256
15987 (base32
15988 "026n3sjzjv2gmwx6y72b8ij0hk42bc8zdbvfj5gdqzd4i6wj3ajk"))))
15989 (build-system python-build-system)
15990 (arguments
15991 `(#:phases
15992 (modify-phases %standard-phases
15993 (add-after 'unpack 'disable-service-tests
15994 (lambda _
15995 (setenv "ZARR_TEST_ABS" "0")
15996 (setenv "ZARR_TEST_MONGO" "0")
15997 (setenv "ZARR_TEST_REDIS" "0")
15998 #t))
15999 (replace 'check
16000 (lambda _
16001 (invoke "pytest" "-vv" "-k" "not lmdb")
16002 #t)))))
16003 (propagated-inputs
16004 `(("python-asciitree" ,python-asciitree)
16005 ("python-fasteners" ,python-fasteners)
16006 ("python-numcodecs" ,python-numcodecs)
16007 ("python-numpy" ,python-numpy)))
16008 (native-inputs
16009 `(("python-pytest" ,python-pytest)
16010 ("python-setuptools-scm" ,python-setuptools-scm)))
16011 (home-page "https://github.com/zarr-developers/zarr-python")
16012 (synopsis "Chunked, compressed, N-dimensional arrays for Python")
16013 (description
16014 "This package provides an implementation of chunked, compressed,
16015 N-dimensional arrays for Python.")
16016 (license license:expat)))
16017
16018 (define-public python-anndata
16019 (package
16020 (name "python-anndata")
16021 (version "0.7.1")
16022 (source
16023 (origin
16024 (method url-fetch)
16025 (uri (pypi-uri "anndata" version))
16026 (sha256
16027 (base32
16028 "0rnfbpr55j1a1bi2kd4mz444741hrn74kz90h5rnjr59jmpfnh09"))))
16029 (build-system python-build-system)
16030 (arguments
16031 `(#:phases
16032 (modify-phases %standard-phases
16033 (add-after 'unpack 'delete-inconvenient-tests
16034 (lambda _
16035 ;; This test depends on python-scikit-learn.
16036 (delete-file "anndata/tests/test_inplace_subset.py")
16037 #t))
16038 (delete 'check)
16039 (add-after 'install 'check
16040 (lambda* (#:key inputs outputs #:allow-other-keys)
16041 (add-installed-pythonpath inputs outputs)
16042 (invoke "pytest" "-vv"))))))
16043 (propagated-inputs
16044 `(("python-h5py" ,python-h5py)
16045 ("python-importlib-metadata" ,python-importlib-metadata)
16046 ("python-natsort" ,python-natsort)
16047 ("python-numcodecs" ,python-numcodecs)
16048 ("python-packaging" ,python-packaging)
16049 ("python-pandas" ,python-pandas)
16050 ("python-scipy" ,python-scipy)
16051 ("python-zarr" ,python-zarr)))
16052 (native-inputs
16053 `(("python-joblib" ,python-joblib)
16054 ("python-pytest" ,python-pytest)
16055 ("python-setuptools-scm" ,python-setuptools-scm)))
16056 (home-page "https://github.com/theislab/anndata")
16057 (synopsis "Annotated data for data analysis pipelines")
16058 (description "Anndata is a package for simple (functional) high-level APIs
16059 for data analysis pipelines. In this context, it provides an efficient,
16060 scalable way of keeping track of data together with learned annotations and
16061 reduces the code overhead typically encountered when using a mostly
16062 object-oriented library such as @code{scikit-learn}.")
16063 (license license:bsd-3)))
16064
16065 (define-public python-dill
16066 (package
16067 (name "python-dill")
16068 (version "0.3.1.1")
16069 (source
16070 (origin
16071 (method url-fetch)
16072 (uri (pypi-uri "dill" version))
16073 (sha256
16074 (base32 "1704g8z70d210ksgbccs2v545v9w0wc6lx15m296alb7jf0yzn22"))))
16075 (build-system python-build-system)
16076 (arguments
16077 `(#:phases
16078 (modify-phases %standard-phases
16079 (replace 'check
16080 (lambda _
16081 (with-directory-excursion "/tmp"
16082 (invoke "nosetests" "-v"))
16083 #t)))))
16084 (native-inputs
16085 `(("python-nose" ,python-nose)))
16086 (home-page "https://pypi.org/project/dill/")
16087 (synopsis "Serialize all of Python")
16088 (description "Dill extends Python's @code{pickle} module for serializing
16089 and de-serializing Python objects to the majority of the built-in Python
16090 types. Dill provides the user the same interface as the @code{pickle} module,
16091 and also includes some additional features. In addition to pickling Python
16092 objects, @code{dill} provides the ability to save the state of an interpreter
16093 session in a single command. Hence, it would be feasible to save a
16094 interpreter session, close the interpreter, ship the pickled file to another
16095 computer, open a new interpreter, unpickle the session and thus continue from
16096 the saved state of the original interpreter session.")
16097 (license license:bsd-3)))
16098
16099 (define-public python-multiprocess
16100 (package
16101 (name "python-multiprocess")
16102 (version "0.70.9")
16103 (source
16104 (origin
16105 (method url-fetch)
16106 (uri (pypi-uri "multiprocess" version))
16107 (sha256
16108 (base32
16109 "1r882nvd44xqwbrclwqx5rhs80l6809rcvpc7pkpgnij06cvvmcz"))))
16110 (build-system python-build-system)
16111 (arguments
16112 `(#:phases
16113 (modify-phases %standard-phases
16114 (add-after 'unpack 'disable-broken-tests
16115 (lambda _
16116 ;; This test is broken as there is no keyboard interrupt.
16117 (substitute* "py3.7/multiprocess/tests/__init__.py"
16118 (("^(.*)def test_wait_result"
16119 line indent)
16120 (string-append indent
16121 "@unittest.skip(\"Disabled by Guix\")\n"
16122 line)))
16123 #t))
16124 ;; Tests must be run after installation.
16125 (delete 'check)
16126 (add-after 'install 'check
16127 (lambda* (#:key inputs outputs #:allow-other-keys)
16128 (add-installed-pythonpath inputs outputs)
16129 (invoke "python" "-m" "multiprocess.tests")
16130 #t)))))
16131 (propagated-inputs
16132 `(("python-dill" ,python-dill)))
16133 (home-page "https://pypi.org/project/multiprocess/")
16134 (synopsis "Multiprocessing and multithreading in Python")
16135 (description
16136 "This package is a fork of the multiprocessing Python package, a package
16137 which supports the spawning of processes using the API of the standard
16138 library's @code{threading} module.")
16139 (license license:bsd-3)))
16140
16141 (define-public python-toolz
16142 (package
16143 (name "python-toolz")
16144 (version "0.9.0")
16145 (source
16146 (origin
16147 (method url-fetch)
16148 (uri (pypi-uri "toolz" version))
16149 (sha256
16150 (base32
16151 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
16152 (build-system python-build-system)
16153 ;; FIXME: tests cannot be computed: "Can't perform this operation for
16154 ;; unregistered loader type"
16155 (arguments '(#:tests? #f))
16156 (home-page "https://github.com/pytoolz/toolz/")
16157 (synopsis "List processing tools and functional utilities")
16158 (description
16159 "This package provides a set of utility functions for iterators,
16160 functions, and dictionaries.")
16161 (license license:bsd-3)))
16162
16163 (define-public python2-toolz
16164 (package-with-python2 python-toolz))
16165
16166 (define-public python-cytoolz
16167 (package
16168 (name "python-cytoolz")
16169 (version "0.9.0.1")
16170 (source
16171 (origin
16172 (method url-fetch)
16173 (uri (pypi-uri "cytoolz" version))
16174 (sha256
16175 (base32
16176 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
16177 (build-system python-build-system)
16178 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
16179 ;; 'exceptions'"
16180 (arguments '(#:tests? #f))
16181 (propagated-inputs
16182 `(("python-toolz" ,python-toolz)))
16183 (native-inputs
16184 `(("python-cython" ,python-cython)))
16185 (home-page "https://github.com/pytoolz/cytoolz")
16186 (synopsis "High performance functional utilities")
16187 (description
16188 "The cytoolz package implements the same API as provided by toolz. The
16189 main differences are that @code{cytoolz} is faster and cytoolz offers a C API
16190 that is accessible to other projects developed in Cython.")
16191 (license license:bsd-3)))
16192
16193 (define-public python-sortedcontainers
16194 (package
16195 (name "python-sortedcontainers")
16196 (version "2.1.0")
16197 (source
16198 (origin
16199 (method url-fetch)
16200 (uri (pypi-uri "sortedcontainers" version))
16201 (sha256
16202 (base32
16203 "0fm0w5id2yhqld95hg2m636vjgkz377rvgdfqaxc25vbylr9lklp"))))
16204 (build-system python-build-system)
16205 (native-inputs
16206 `(("python-tox" ,python-tox)))
16207 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
16208 (synopsis "Sorted List, Sorted Dict, Sorted Set")
16209 (description
16210 "This package provides a sorted collections library, written in
16211 pure-Python.")
16212 (license license:asl2.0)))
16213
16214 (define-public python-cloudpickle
16215 (package
16216 (name "python-cloudpickle")
16217 (version "0.6.1")
16218 (source
16219 (origin
16220 (method url-fetch)
16221 (uri (pypi-uri "cloudpickle" version))
16222 (sha256
16223 (base32
16224 "1wdw89mlm7fqa3fm3ymskx05jrys66n8m1z1a8s0mss0799ahsgi"))))
16225 (build-system python-build-system)
16226 ;; FIXME: there are 5 errors in 122 tests:
16227 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.CloudPickleTest)
16228 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.CloudPickleTest)
16229 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.Protocol2CloudPickleTest)
16230 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.Protocol2CloudPickleTest)
16231 ;; ERROR: test_temp_file (tests.cloudpickle_file_test.CloudPickleFileTests)
16232 ;; TypeError: cannot serialize '_io.BufferedRandom' object
16233 (arguments '(#:tests? #f))
16234 (native-inputs
16235 `(("python-pytest" ,python-pytest)
16236 ("python-mock" ,python-mock)
16237 ("python-tornado" ,python-tornado)))
16238 (home-page "https://github.com/cloudpipe/cloudpickle")
16239 (synopsis "Extended pickling support for Python objects")
16240 (description
16241 "Cloudpickle makes it possible to serialize Python constructs not
16242 supported by the default pickle module from the Python standard library. It
16243 is especially useful for cluster computing where Python expressions are
16244 shipped over the network to execute on remote hosts, possibly close to the
16245 data.")
16246 (license license:bsd-3)))
16247
16248 (define-public python2-cloudpickle
16249 (package-with-python2 python-cloudpickle))
16250
16251 (define-public python-locket
16252 (package
16253 (name "python-locket")
16254 (version "0.2.0")
16255 (source
16256 (origin
16257 (method url-fetch)
16258 (uri (pypi-uri "locket" version))
16259 (sha256
16260 (base32
16261 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
16262 (build-system python-build-system)
16263 (home-page "https://github.com/mwilliamson/locket.py")
16264 (synopsis "File-based locks for Python")
16265 (description
16266 "Locket implements a lock that can be used by multiple processes provided
16267 they use the same path.")
16268 (license license:bsd-2)))
16269
16270 (define-public python2-locket
16271 (package-with-python2 python-locket))
16272
16273 (define-public python-blosc
16274 (package
16275 (name "python-blosc")
16276 (version "1.5.1")
16277 (source
16278 (origin
16279 (method url-fetch)
16280 (uri (pypi-uri "blosc" version))
16281 (sha256
16282 (base32
16283 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
16284 (build-system python-build-system)
16285 ;; FIXME: all tests pass, but then this error is printed:
16286 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
16287 (arguments '(#:tests? #f))
16288 (propagated-inputs
16289 `(("python-numpy" ,python-numpy)))
16290 (home-page "https://github.com/blosc/python-blosc")
16291 (synopsis "Python wrapper for the Blosc data compressor library")
16292 (description "Blosc is a high performance compressor optimized for binary
16293 data. It has been designed to transmit data to the processor cache faster
16294 than the traditional, non-compressed, direct memory fetch approach via a
16295 @code{memcpy()} system call.
16296
16297 Blosc works well for compressing numerical arrays that contains data with
16298 relatively low entropy, like sparse data, time series, grids with
16299 regular-spaced values, etc.
16300
16301 This Python package wraps the Blosc library.")
16302 (license license:bsd-3)))
16303
16304 (define-public python2-blosc
16305 (package-with-python2 python-blosc))
16306
16307 (define-public python-partd
16308 (package
16309 (name "python-partd")
16310 (version "0.3.9")
16311 (source
16312 (origin
16313 (method url-fetch)
16314 (uri (pypi-uri "partd" version))
16315 (sha256
16316 (base32
16317 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
16318 (build-system python-build-system)
16319 (propagated-inputs
16320 `(("python-blosc" ,python-blosc)
16321 ("python-locket" ,python-locket)
16322 ("python-numpy" ,python-numpy)
16323 ("python-pandas" ,python-pandas)
16324 ("python-pyzmq" ,python-pyzmq)
16325 ("python-toolz" ,python-toolz)))
16326 (home-page "https://github.com/dask/partd/")
16327 (synopsis "Appendable key-value storage")
16328 (description "Partd stores key-value pairs. Values are raw bytes. We
16329 append on old values. Partd excels at shuffling operations.")
16330 (license license:bsd-3)))
16331
16332 (define-public python2-partd
16333 (package-with-python2 python-partd))
16334
16335 (define-public python-fsspec
16336 (package
16337 (name "python-fsspec")
16338 (version "0.6.1")
16339 (source
16340 (origin
16341 (method url-fetch)
16342 (uri (pypi-uri "fsspec" version))
16343 (sha256
16344 (base32
16345 "1g9ba8v04s1nrh7pvzfm2md7ivl2mrz3hcq3y9d1a44gd62h17zj"))))
16346 (build-system python-build-system)
16347 (arguments '(#:tests? #f)) ; there are none
16348 (home-page "https://github.com/intake/filesystem_spec")
16349 (synopsis "File-system specification")
16350 (description "The purpose of this package is to produce a template or
16351 specification for a file-system interface, that specific implementations
16352 should follow, so that applications making use of them can rely on a common
16353 behavior and not have to worry about the specific internal implementation
16354 decisions with any given backend.")
16355 (license license:bsd-3)))
16356
16357 (define-public python-dask
16358 (package
16359 (name "python-dask")
16360 (version "2.9.0")
16361 (source
16362 (origin
16363 (method url-fetch)
16364 (uri (pypi-uri "dask" version))
16365 (sha256
16366 (base32 "1w1hqr8vyx6ygwflj2737dcy0mmgvrc0s602gnny8pzlcbs9m76b"))))
16367 (build-system python-build-system)
16368 (arguments
16369 `(#:phases
16370 (modify-phases %standard-phases
16371 (add-after 'unpack 'disable-broken-tests
16372 (lambda _
16373 ;; This test is marked as xfail when pytest-xdist is used.
16374 (substitute* "dask/tests/test_threaded.py"
16375 (("def test_interrupt\\(\\)" m)
16376 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
16377 m)))
16378 ;; This one fails with a type error:
16379 ;; TypeError: Already tz-aware, use tz_convert to convert.
16380 (substitute* "dask/dataframe/tests/test_shuffle.py"
16381 (("def test_set_index_timestamp\\(\\)" m)
16382 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
16383 m)))
16384 #t))
16385 (replace 'check
16386 (lambda _ (invoke "pytest" "-vv"))))))
16387 (propagated-inputs
16388 `(("python-cloudpickle" ,python-cloudpickle)
16389 ("python-fsspec" ,python-fsspec)
16390 ("python-numpy" ,python-numpy)
16391 ("python-packaging" ,python-packaging)
16392 ("python-pandas" ,python-pandas)
16393 ("python-partd" ,python-partd)
16394 ("python-toolz" ,python-toolz)
16395 ("python-pyyaml" ,python-pyyaml)))
16396 (native-inputs
16397 `(("python-pytest" ,python-pytest)
16398 ("python-pytest-runner" ,python-pytest-runner)))
16399 (home-page "https://github.com/dask/dask/")
16400 (synopsis "Parallel computing with task scheduling")
16401 (description
16402 "Dask is a flexible parallel computing library for analytics. It
16403 consists of two components: dynamic task scheduling optimized for computation,
16404 and large data collections like parallel arrays, dataframes, and lists that
16405 extend common interfaces like NumPy, Pandas, or Python iterators to
16406 larger-than-memory or distributed environments. These parallel collections
16407 run on top of the dynamic task schedulers. ")
16408 (license license:bsd-3)))
16409
16410 (define-public python-ilinkedlist
16411 (package
16412 (name "python-ilinkedlist")
16413 (version "0.4.0")
16414 (source
16415 (origin
16416 (method url-fetch)
16417 (uri (pypi-uri "ilinkedlist" version))
16418 (sha256
16419 (base32
16420 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
16421 (build-system python-build-system)
16422 (native-inputs `(("python-pytest" ,python-pytest)))
16423 (inputs `(("python" ,python)))
16424 (home-page "https://github.com/luther9/ilinkedlist-py")
16425 (synopsis "Immutable linked list library")
16426 (description
16427 "This is a implementation of immutable linked lists for Python. It
16428 contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
16429 Since a linked list is treated as immutable, it is hashable, and its length
16430 can be retrieved in constant time. Some of the terminology is inspired by
16431 LISP. It is possible to create an improper list by creating a @code{Pair}
16432 with a non-list @code{cdr}.")
16433 (license license:gpl3+)))
16434
16435 (define-public python-readlike
16436 (package
16437 (name "python-readlike")
16438 (version "0.1.3")
16439 (source
16440 (origin
16441 (method url-fetch)
16442 (uri (pypi-uri "readlike" version))
16443 (sha256
16444 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
16445 (build-system python-build-system)
16446 (home-page "https://github.com/jangler/readlike")
16447 (synopsis "GNU Readline-like line editing module")
16448 (description
16449 "This Python module provides line editing functions similar to the default
16450 Emacs-style ones of GNU Readline. Unlike the Python standard library's
16451 @code{readline} package, this one allows access to those capabilties in settings
16452 outside of a standard command-line interface. It is especially well-suited to
16453 interfacing with Urwid, due to a shared syntax for describing key inputs.
16454
16455 Currently, all stateless Readline commands are implemented. Yanking and history
16456 are not supported.")
16457 (license license:expat)))
16458
16459 (define-public python2-readlike
16460 (package-with-python2 python-readlike))
16461
16462 (define-public python-reparser
16463 (package
16464 (name "python-reparser")
16465 (version "1.4.3")
16466 (source
16467 (origin
16468 (method url-fetch)
16469 (uri (pypi-uri "ReParser" version))
16470 (sha256
16471 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
16472 (build-system python-build-system)
16473 (home-page "https://github.com/xmikos/reparser")
16474 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
16475 (description
16476 "This Python library provides a simple lexer/parser for inline markup based
16477 on regular expressions.")
16478 (license license:expat)))
16479
16480 (define-public python2-reparser
16481 (let ((reparser (package-with-python2
16482 (strip-python2-variant python-reparser))))
16483 (package (inherit reparser)
16484 (propagated-inputs
16485 `(("python2-enum34" ,python2-enum34)
16486 ,@(package-propagated-inputs reparser))))))
16487
16488 (define-public python-precis-i18n
16489 (package
16490 (name "python-precis-i18n")
16491 (version "1.0.0")
16492 (source
16493 (origin
16494 (method url-fetch)
16495 (uri (pypi-uri "precis_i18n" version))
16496 (sha256
16497 (base32
16498 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
16499 (build-system python-build-system)
16500 (home-page "https://github.com/byllyfish/precis_i18n")
16501 (synopsis "Implementation of the PRECIS framework")
16502 (description
16503 "This module implements the PRECIS Framework as described in RFC 8264,
16504 RFC 8265 and RFC 8266.")
16505 (license license:expat)))
16506
16507 (define-public python-absl-py
16508 (package
16509 (name "python-absl-py")
16510 (version "0.6.1")
16511 (source
16512 (origin
16513 (method url-fetch)
16514 (uri (pypi-uri "absl-py" version))
16515 (sha256
16516 (base32
16517 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
16518 (build-system python-build-system)
16519 (propagated-inputs
16520 `(("python-six" ,python-six)))
16521 (home-page "https://github.com/abseil/abseil-py")
16522 (synopsis "Abseil Python common libraries")
16523 (description
16524 "This package provides the Abseil Python Common Libraries, a collection
16525 of Python libraries for building Python applications.")
16526 (license license:asl2.0)))
16527
16528 (define-public python-astor
16529 (package
16530 (name "python-astor")
16531 (version "0.7.1")
16532 (source
16533 (origin
16534 (method url-fetch)
16535 (uri (pypi-uri "astor" version))
16536 (sha256
16537 (base32
16538 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
16539 (build-system python-build-system)
16540 ;; FIXME: There are two errors and two test failures.
16541 (arguments `(#:tests? #f))
16542 (home-page "https://github.com/berkerpeksag/astor")
16543 (synopsis "Read and write Python ASTs")
16544 (description "Astor is designed to allow easy manipulation of Python
16545 source via the Abstract Syntax Tree.")
16546 (license license:bsd-3)))
16547
16548 (define-public python2-astor
16549 (package-with-python2 python-astor))
16550
16551 (define-public python-grpcio
16552 (package
16553 (name "python-grpcio")
16554 (version "1.17.1")
16555 (source
16556 (origin
16557 (method url-fetch)
16558 (uri (pypi-uri "grpcio" version))
16559 (sha256
16560 (base32
16561 "0qb9y6j83nxa6d4kc60i8yfgdm7a8ms7b54kncjzf5y7nsxp8rzx"))))
16562 (build-system python-build-system)
16563 (propagated-inputs
16564 `(("python-six" ,python-six)))
16565 (home-page "https://grpc.io")
16566 (synopsis "HTTP/2-based RPC framework")
16567 (description "This package provides a Python library for communicating
16568 with the HTTP/2-based RPC framework gRPC.")
16569 (license license:asl2.0)))
16570
16571 (define-public python-astunparse
16572 (package
16573 (name "python-astunparse")
16574 (version "1.6.2")
16575 (source
16576 (origin
16577 (method url-fetch)
16578 (uri (pypi-uri "astunparse" version))
16579 (sha256
16580 (base32 "0rzbc44xcvzjhhiy7wac96mgal5mcjz1mfq8rmvgswskf4kf9cys"))))
16581 (build-system python-build-system)
16582 (arguments '(#:tests? #f)) ; there are none
16583 (propagated-inputs
16584 `(("python-six" ,python-six)
16585 ("python-wheel" ,python-wheel)))
16586 (home-page "https://github.com/simonpercivall/astunparse")
16587 (synopsis "AST unparser for Python")
16588 (description "This package provides an AST unparser for Python. It is a
16589 factored out version of @code{unparse} found in the Python source
16590 distribution.")
16591 (license license:bsd-3)))
16592
16593 (define-public python-gast
16594 (package
16595 (name "python-gast")
16596 (version "0.2.2")
16597 (source
16598 (origin
16599 (method url-fetch)
16600 (uri (pypi-uri "gast" version))
16601 (sha256
16602 (base32 "1w5dzdb3gpcfmd2s0b93d8gff40a1s41rv31458z14inb3s9v4zy"))))
16603 (build-system python-build-system)
16604 (propagated-inputs
16605 `(("python-astunparse" ,python-astunparse)))
16606 (home-page "https://pypi.org/project/gast/")
16607 (synopsis "Generic Python AST that abstracts the underlying Python version")
16608 (description
16609 "GAST provides a compatibility layer between the AST of various Python
16610 versions, as produced by @code{ast.parse} from the standard @code{ast}
16611 module.")
16612 (license license:bsd-3)))
16613
16614 (define-public python-wikidata
16615 (package
16616 (name "python-wikidata")
16617 (version "0.6.1")
16618 (source
16619 (origin
16620 (method url-fetch)
16621 (uri (pypi-uri "Wikidata" version))
16622 (sha256
16623 (base32
16624 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
16625 (build-system python-build-system)
16626 (propagated-inputs
16627 `(("python-babel" ,python-babel)))
16628 (home-page "https://github.com/dahlia/wikidata")
16629 (synopsis "Wikidata client library")
16630 (description
16631 "This package provides a Python interface to
16632 @url{https://www.wikidata.org/, Wikidata}.")
16633 (properties '((upstream-name . "Wikidata")))
16634 (license license:gpl3+)))
16635
16636 (define-public python-doctest-ignore-unicode
16637 (package
16638 (name "python-doctest-ignore-unicode")
16639 (version "0.1.2")
16640 (source
16641 (origin
16642 (method url-fetch)
16643 (uri (pypi-uri "doctest-ignore-unicode" version))
16644 (sha256
16645 (base32
16646 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
16647 (build-system python-build-system)
16648 (native-inputs
16649 `(("python-nose" ,python-nose)))
16650 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
16651 (synopsis "Ignore Unicode literal prefixes in doctests")
16652 (description
16653 "This package adds support for a flag to ignore Unicode literal prefixes
16654 in doctests.")
16655 (license license:asl2.0)))
16656
16657 (define-public python-attr
16658 (package
16659 (name "python-attr")
16660 (version "0.3.1")
16661 (source
16662 (origin
16663 (method url-fetch)
16664 (uri (pypi-uri "attr" version))
16665 (sha256
16666 (base32
16667 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
16668 (build-system python-build-system)
16669 (home-page "https://github.com/denis-ryzhkov/attr")
16670 (synopsis "Decorator for attributes of target function or class")
16671 (description "Simple decorator to set attributes of target function or
16672 class in a @acronym{DRY, Don't Repeat Yourself} way.")
16673 (license license:expat)))
16674
16675 (define-public python-construct
16676 (package
16677 (name "python-construct")
16678 (version "2.10.56")
16679 (source
16680 (origin
16681 (method url-fetch)
16682 (uri (pypi-uri "construct" version))
16683 (sha256
16684 (base32
16685 "0q86jjzsvy835h3c8pjj4619vbp7ihfg8njmyw86ym4qrpni7flp"))))
16686 (build-system python-build-system)
16687 (arguments
16688 `(#:tests? #f)) ; No tests exist.
16689 (propagated-inputs
16690 `(("python-extras" ,python-extras)
16691 ("python-arrow" ,python-arrow)
16692 ("python-numpy" ,python-numpy)
16693 ("python-ruamel.yaml" ,python-ruamel.yaml)))
16694 (home-page "https://construct.readthedocs.io")
16695 (synopsis "Declarative and symmetrical parser and builder for binary data")
16696 (description
16697 "This package provides both simple, atomic constructs (such as
16698 integers of various sizes), as well as composite ones which allow you
16699 form hierarchical and sequential structures of increasing complexity.
16700 It features bit and byte granularity, easy debugging and testing, an
16701 easy-to-extend subclass system, and lots of primitive constructs to
16702 make your work easier.")
16703 (license license:expat)))
16704
16705 (define-public python-humanize
16706 (package
16707 (name "python-humanize")
16708 (version "0.5.1")
16709 (source
16710 (origin
16711 (method url-fetch)
16712 (uri (pypi-uri "humanize" version))
16713 (sha256
16714 (base32
16715 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
16716 (arguments
16717 '(#:tests? #f)) ; tests not in pypi archive
16718 (build-system python-build-system)
16719 (home-page "https://github.com/jmoiron/humanize")
16720 (synopsis "Print numerical information in a human-readable form")
16721 (description "This package provides a Python module that displays numbers
16722 and dates in \"human readable\" forms. For example, it would display
16723 \"12345591313\" as \"12.3 billion\".")
16724 (license license:expat)))
16725
16726 (define-public python-txaio
16727 (package
16728 (name "python-txaio")
16729 (version "18.8.1")
16730 (source
16731 (origin
16732 (method url-fetch)
16733 (uri (pypi-uri "txaio" version))
16734 (sha256
16735 (base32
16736 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
16737 (build-system python-build-system)
16738 (propagated-inputs
16739 `(("python-twisted" ,python-twisted)
16740 ("python-six" ,python-six)))
16741 (home-page "https://github.com/crossbario/txaio")
16742 (synopsis "Compatibility layer between Python asyncio and Twisted")
16743 (description "Txaio provides a compatibility layer between the Python
16744 @code{asyncio} module and @code{Twisted}.")
16745 (license license:expat)))
16746
16747 (define-public python-toolshed
16748 (package
16749 (name "python-toolshed")
16750 (version "0.4.6")
16751 (source
16752 (origin
16753 (method url-fetch)
16754 (uri (pypi-uri "toolshed" version))
16755 (sha256
16756 (base32
16757 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
16758 (build-system python-build-system)
16759 (native-inputs
16760 `(("python-nose" ,python-nose)))
16761 (home-page "https://github.com/brentp/toolshed/")
16762 (synopsis "Collection of modules and functions for working with data")
16763 (description "This is a collection of well-tested, simple modules and
16764 functions that aim to reduce boilerplate when working with data.")
16765 (license license:bsd-2)))
16766
16767 (define-public python-annoy
16768 (package
16769 (name "python-annoy")
16770 (version "1.15.1")
16771 (source
16772 (origin
16773 (method url-fetch)
16774 (uri (pypi-uri "annoy" version))
16775 (sha256
16776 (base32
16777 "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp"))))
16778 (build-system python-build-system)
16779 (native-inputs
16780 `(("python-nose" ,python-nose)))
16781 (home-page "https://github.com/spotify/annoy/")
16782 (synopsis "Approximate nearest neighbors library")
16783 (description
16784 "Annoy is a C++ library with Python bindings to search for points in
16785 space that are close to a given query point. It also creates large read-only
16786 file-based data structures that are @code{mmap}ped into memory so that many
16787 processes may share the same data.")
16788 (license license:asl2.0)))
16789
16790 (define-public python-pylzma
16791 (package
16792 (name "python-pylzma")
16793 (version "0.5.0")
16794 (source
16795 (origin
16796 (method url-fetch)
16797 (uri (pypi-uri "pylzma" version))
16798 (sha256
16799 (base32
16800 "074anvhyjgsv2iby2ql1ixfvjgmhnvcwjbdz8gk70xzkzcm1fx5q"))))
16801 (build-system python-build-system)
16802 (home-page "http://www.joachim-bauch.de/projects/pylzma/")
16803 (synopsis "Python bindings for the LZMA library by Igor Pavlov.")
16804 (description "This package provides Python bindings for the LZMA library
16805 by Igor Pavlov.")
16806 (license license:lgpl2.1+)))
16807
16808 (define-public python2-pylzma
16809 (package-with-python2 python-pylzma))
16810
16811 (define-public python2-zeroconf
16812 (package
16813 (name "python2-zeroconf")
16814
16815 ;; This is the last version that supports Python 2.x.
16816 (version "0.19.1")
16817 (source
16818 (origin
16819 (method url-fetch)
16820 (uri (pypi-uri "zeroconf" version))
16821 (sha256
16822 (base32
16823 "0ykzg730n915qbrq9bn5pn06bv6rb5zawal4sqjyfnjjm66snkj3"))))
16824 (build-system python-build-system)
16825 (arguments
16826 `(#:python ,python-2
16827 #:phases
16828 (modify-phases %standard-phases
16829 (add-after 'unpack 'patch-requires
16830 (lambda* (#:key inputs #:allow-other-keys)
16831 (substitute* "setup.py"
16832 (("enum-compat")
16833 "enum34"))
16834 #t)))))
16835 (native-inputs
16836 `(("python2-six" ,python2-six)
16837 ("python2-enum32" ,python2-enum34)
16838 ("python2-netifaces" ,python2-netifaces)
16839 ("python2-typing" ,python2-typing)))
16840 (home-page "https://github.com/jstasiak/python-zeroconf")
16841 (synopsis "Pure Python mDNS service discovery")
16842 (description
16843 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
16844 compatible).")
16845 (license license:lgpl2.1+)))
16846
16847 (define-public python-bsddb3
16848 (package
16849 (name "python-bsddb3")
16850 (version "6.2.6")
16851 (source
16852 (origin
16853 (method url-fetch)
16854 (uri (pypi-uri "bsddb3" version))
16855 (sha256
16856 (base32
16857 "019db2y6bfmiqbrgg9x9f6h72qjmqh05czdn2v5sy9bl0gs23mj2"))))
16858 (build-system python-build-system)
16859 (inputs
16860 `(("bdb" ,bdb)))
16861 (arguments
16862 '(#:phases
16863 (modify-phases %standard-phases
16864 (add-after 'unpack 'configure-locations
16865 (lambda* (#:key inputs #:allow-other-keys)
16866 (setenv "BERKELEYDB_DIR" (assoc-ref inputs "bdb"))
16867 (setenv "YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION" "1")
16868 #t))
16869 (replace 'check
16870 (lambda _
16871 (invoke "python3" "test3.py" "-v"))))))
16872 (home-page "https://www.jcea.es/programacion/pybsddb.htm")
16873 (synopsis "Python bindings for Oracle Berkeley DB")
16874 (description
16875 "This module provides a nearly complete wrapping of the Oracle/Sleepycat
16876 C API for the Database Environment, Database, Cursor, Log Cursor, Sequence and
16877 Transaction objects, and each of these is exposed as a Python type in the
16878 bsddb3.db module. The database objects can use various access methods: btree,
16879 hash, recno, and queue. Complete support of Berkeley DB distributed
16880 transactions. Complete support for Berkeley DB Replication Manager.
16881 Complete support for Berkeley DB Base Replication. Support for RPC.")
16882 (license license:bsd-3)))
16883
16884 (define-public python-dbfread
16885 (package
16886 (name "python-dbfread")
16887 (version "2.0.7")
16888 (source (origin
16889 (method url-fetch)
16890 (uri (pypi-uri "dbfread" version))
16891 (sha256
16892 (base32
16893 "0gdpwdzf1fngsi6jrdyj4qdf6cr7gnnr3zp80dpkzbgz0spskj07"))))
16894 (build-system python-build-system)
16895 (native-inputs
16896 `(("python-pytest" ,python-pytest)))
16897 (home-page "https://dbfread.readthedocs.io")
16898 (synopsis "Read DBF Files with Python")
16899 (description
16900 "This library reads DBF files and returns the data as native Python data
16901 types for further processing. It is primarily intended for batch jobs and
16902 one-off scripts.")
16903 (license license:expat)))
16904
16905 (define-public python-cached-property
16906 (package
16907 (name "python-cached-property")
16908 (version "1.5.1")
16909 (source
16910 (origin
16911 (method url-fetch)
16912 (uri (pypi-uri "cached-property" version))
16913 (sha256
16914 (base32
16915 "010m1bl380l2r3vwq24r5v14l6gwvgm9v0mqqjkjss552jgsa5wj"))))
16916 (build-system python-build-system)
16917 (arguments
16918 `(#:phases
16919 (modify-phases %standard-phases
16920 ;; https://github.com/pydanny/cached-property/issues/131
16921 ;; recent versions of freezegun break one test
16922 (add-after 'unpack 'disable-broken-test
16923 (lambda _
16924 (substitute* "tests/test_cached_property.py"
16925 (("def test_threads_ttl_expiry\\(self\\)" m)
16926 (string-append "@unittest.skip(\"Disabled by Guix\")\n"
16927 " " m)))
16928 #t)))))
16929 (native-inputs
16930 `(("python-freezegun" ,python-freezegun)))
16931 (home-page
16932 "https://github.com/pydanny/cached-property")
16933 (synopsis
16934 "Decorator for caching properties in classes")
16935 (description
16936 "This package provides a decorator which makes caching
16937 time-or-computationally-expensive properties quick and easy and works in Python
16938 2 or 3.")
16939 (license license:bsd-3)))
16940
16941 (define-public python-folium
16942 (package
16943 (name "python-folium")
16944 (version "0.10.1")
16945 (source
16946 (origin
16947 (method url-fetch)
16948 (uri (pypi-uri "folium" version))
16949 (sha256
16950 (base32
16951 "0gcc267wxwxr57ry86pqpbiyfvl0g48hfvgy0f2mz9s58g87kgzd"))))
16952 (build-system python-build-system)
16953 (propagated-inputs
16954 `(("python-branca" ,python-branca)
16955 ("python-jinja2" ,python-jinja2)
16956 ("python-numpy" ,python-numpy)
16957 ("python-requests" ,python-requests)))
16958 (native-inputs
16959 `(("python-pytest" ,python-pytest)))
16960 (home-page "https://github.com/python-visualization/folium")
16961 (synopsis "Make beautiful maps with Leaflet.js & Python")
16962 (description "@code{folium} makes it easy to visualize data that’s been
16963 manipulated in Python on an interactive leaflet map. It enables both the
16964 binding of data to a map for @code{choropleth} visualizations as well as
16965 passing rich vector/raster/HTML visualizations as markers on the map.
16966
16967 The library has a number of built-in tilesets from OpenStreetMap, Mapbox, and
16968 Stamen, and supports custom tilesets with Mapbox or Cloudmade API keys. It
16969 supports Image, Video, GeoJSON and TopoJSON overlays.")
16970 (license license:expat)))
16971
16972 (define-public jube
16973 (package
16974 ;; This is a command-line tool, so no "python-" prefix.
16975 (name "jube")
16976 (version "2.2.2")
16977 (source (origin
16978 (method url-fetch)
16979 (uri (string-append
16980 "http://apps.fz-juelich.de/jsc/jube/jube2/download.php?version="
16981 version))
16982 (sha256
16983 (base32
16984 "0xq4k1q63s1p6swgyp61vahlrd1fqmgbm0gm5kpj8ikwy0yc0nqk"))
16985 (file-name (string-append "jube-" version ".tar.gz"))))
16986 (build-system python-build-system)
16987 (home-page "https://apps.fz-juelich.de/jsc/jube/jube2/docu/index.html")
16988 (synopsis "Benchmarking environment")
16989 (description
16990 "JUBE helps perform and analyze benchmarks in a systematic way. For each
16991 benchmarked application, benchmark data is stored in a format that allows JUBE
16992 to deduct the desired information. This data can be parsed by automatic pre-
16993 and post-processing scripts that draw information and store it more densely
16994 for manual interpretation.")
16995 (license license:gpl3+)))
16996
16997 (define-public python-pyroutelib3
16998 (package
16999 (name "python-pyroutelib3")
17000 (version "1.3.post1")
17001 (source
17002 (origin
17003 (method url-fetch)
17004 (uri (pypi-uri "pyroutelib3" version))
17005 (sha256
17006 (base32
17007 "1hpbydpn2alyswiajfbvhzq4c7f36vdmvxy91hgv8l1lb2g2vfrj"))))
17008 (build-system python-build-system)
17009 (propagated-inputs
17010 `(("python-dateutil" ,python-dateutil)))
17011 (home-page "https://github.com/MKuranowski/pyroutelib3")
17012 (synopsis "Library for simple routing on OSM data")
17013 (description "Library for simple routing on OSM data")
17014 (license license:gpl3+)))
17015
17016 (define-public python-bibtexparser
17017 (package
17018 (name "python-bibtexparser")
17019 (version "1.1.0")
17020 (source
17021 (origin
17022 (method url-fetch)
17023 (uri (pypi-uri "bibtexparser" version))
17024 (sha256
17025 (base32
17026 "0zwhfkrzf3n5847dbnfng92k7ak199l9v6x6ax3dgdidfpm6d2fz"))))
17027 (build-system python-build-system)
17028 (propagated-inputs
17029 `(("python-pyparsing" ,python-pyparsing)))
17030 (native-inputs
17031 `(("python-future" ,python-future)))
17032 (home-page "https://github.com/sciunto-org/python-bibtexparser")
17033 (synopsis "Python library to parse BibTeX files")
17034 (description "BibtexParser is a Python library to parse BibTeX files.")
17035 (license (list license:bsd-3 license:lgpl3))))
17036
17037 (define-public python-distro
17038 (package
17039 (name "python-distro")
17040 (version "1.4.0")
17041 (source
17042 (origin
17043 (method url-fetch)
17044 (uri (pypi-uri "distro" version))
17045 (sha256
17046 (base32
17047 "0mrg75w4ap7mdzyga75yaid9n8bgb345ih5mwjp3plj6v1jxwb9n"))))
17048 (build-system python-build-system)
17049 (native-inputs
17050 `(("python-pytest" ,python-pytest)))
17051 (home-page "https://github.com/nir0s/distro")
17052 (synopsis
17053 "OS platform information API")
17054 (description
17055 "@code{distro} provides information about the OS distribution it runs on,
17056 such as a reliable machine-readable ID, or version information.
17057
17058 It is the recommended replacement for Python's original
17059 `platform.linux_distribution` function (which will be removed in Python 3.8).
17060 @code{distro} also provides a command-line interface to output the platform
17061 information in various formats.")
17062 (license license:asl2.0)))
17063
17064 (define-public python-cairosvg
17065 (package
17066 (name "python-cairosvg")
17067 (version "2.4.2")
17068 (source
17069 (origin
17070 (method url-fetch)
17071 (uri (pypi-uri "CairoSVG" version))
17072 (sha256
17073 (base32 "1bb7irxbaxxb9ahm3z5wsx1q96mm5gzskc7b6q07h9ikcnb8yrjf"))))
17074 (build-system python-build-system)
17075 (arguments
17076 `(#:phases
17077 (modify-phases %standard-phases
17078 (replace 'check
17079 (lambda _ (invoke "pytest"))))))
17080 (propagated-inputs
17081 `(("python-cairocffi" ,python-cairocffi)
17082 ("python-cssselect2" ,python-cssselect2)
17083 ("python-defusedxml" ,python-defusedxml)
17084 ("python-pillow" ,python-pillow)
17085 ("python-tinycss2" ,python-tinycss2)))
17086 (native-inputs
17087 `(("python-pytest-flake8" ,python-pytest-flake8)
17088 ("python-pytest-isort" ,python-pytest-isort)
17089 ("python-pytest-runner" ,python-pytest-runner)))
17090 (home-page "https://cairosvg.org/")
17091 (synopsis "SVG to PDF/PS/PNG converter based on Cairo")
17092 (description "CairoSVG is a SVG converter based on Cairo. It can export
17093 SVG files to PDF, PostScript and PNG files. The main part of CairoSVG is a
17094 SVG parser, trying to follow the SVG 1.1 recommendation from the W3C. Once
17095 parsed, the result is drawn to a Cairo surface that can be exported to
17096 qvarious formats: PDF, PostScript, PNG and even SVG.")
17097 (license license:lgpl3+)))
17098
17099 (define-public python-pyphen
17100 (package
17101 (name "python-pyphen")
17102 (version "0.9.5")
17103 (source
17104 (origin
17105 (method url-fetch)
17106 (uri (pypi-uri "Pyphen" version))
17107 (sha256
17108 (base32 "08c9y69ry9d6m4zalhnalg86lsp9v2j5n1ziw5vxfmiihx83lqrv"))))
17109 (build-system python-build-system)
17110 ;; TODO: Use the Guix system hyphenation packages hyphen-* rather than the
17111 ;; embedded set provided by upstream - like Debian does.
17112 (home-page "https://github.com/Kozea/Pyphen")
17113 (synopsis "Pure Python module to hyphenate text")
17114 (description "Pyphen is a pure Python module to hyphenate text using
17115 existing Hunspell hyphenation dictionaries.")
17116 (license (list license:gpl2 license:lgpl2.1 license:mpl1.1))))
17117
17118 (define-public python-intelhex
17119 (package
17120 (name "python-intelhex")
17121 (version "2.2.1")
17122 (source
17123 (origin
17124 (method url-fetch)
17125 (uri (pypi-uri "intelhex" version))
17126 (sha256
17127 (base32
17128 "0ckqjbxd8gwcg98gfzpn4vq1qxzfvq3rdbrr1hikj1nmw08qb780"))))
17129 (build-system python-build-system)
17130 (arguments '(#:tests? #f)) ;issue with version
17131 (home-page "https://pypi.org/project/IntelHex/")
17132 (synopsis "Python library for Intel HEX files manipulations")
17133 (description "The Intel HEX file format is widely used in microprocessors
17134 and microcontrollers area (embedded systems etc.) as the de facto standard for
17135 representation of code to be programmed into microelectronic devices. This
17136 package provides an intelhex Python library to read, write, create from
17137 scratch and manipulate data from Intel HEX file format. It also includes
17138 several convenience Python scripts, including \"classic\" hex2bin and bin2hex
17139 converters and more, those based on the library itself.")
17140 (license license:bsd-3)))
17141
17142 (define-public python-pykwalify
17143 (package
17144 (name "python-pykwalify")
17145 (version "1.7.0")
17146 (source
17147 (origin
17148 (method url-fetch)
17149 (uri (pypi-uri "pykwalify" version))
17150 (sha256
17151 (base32
17152 "1cnfzkg1b01f825ikpw2fhjclf9c8akxjfrbd1vc22x1lg2kk2vy"))))
17153 (build-system python-build-system)
17154 (arguments '(#:tests? #f)) ;missing dependencies
17155 (propagated-inputs
17156 `(("python-dateutil" ,python-dateutil)
17157 ("python-docopt" ,python-docopt)
17158 ("python-pyyaml" ,python-pyyaml)))
17159 (home-page "https://github.com/grokzen/pykwalify")
17160 (synopsis
17161 "Python lib/cli for JSON/YAML schema validation")
17162 (description
17163 "This package provides a parser, schema validator, and data binding tool
17164 for YAML and JSON.")
17165 (license license:expat)))
17166
17167 (define-public python-dbusmock
17168 (package
17169 (name "python-dbusmock")
17170 (version "0.18.3")
17171 (source
17172 (origin
17173 (method url-fetch)
17174 (uri (pypi-uri "python-dbusmock" version))
17175 (sha256
17176 (base32
17177 "0hp2kyac88nh9iv6l8hlmv7s1sa1s5f1a3wc2pmlmmxnd211fjlr"))))
17178 (build-system python-build-system)
17179 (arguments
17180 '(#:phases
17181 (modify-phases %standard-phases
17182 (add-after 'unpack 'patch-shell-path
17183 (lambda _
17184 (substitute* "tests/test_code.py"
17185 (("/bin/bash") (which "bash")))
17186 #t)))))
17187 (native-inputs
17188 `(;; For tests.
17189 ("dbus" ,dbus) ; for dbus-daemon
17190 ("python-nose" ,python-nose)
17191 ("which" ,which)))
17192 (propagated-inputs
17193 `(("python-dbus" ,python-dbus)
17194 ("python-pygobject" ,python-pygobject)))
17195 (home-page "https://github.com/martinpitt/python-dbusmock")
17196 (synopsis "Python library for mock D-Bus objects")
17197 (description "python-dbusmock allows for the easy creation of mock objects on
17198 D-Bus. This is useful for writing tests for software which talks to D-Bus
17199 services such as upower, systemd, logind, gnome-session or others, and it is
17200 hard (or impossible without root privileges) to set the state of the real
17201 services to what you expect in your tests.")
17202 (license license:lgpl3+)))
17203
17204 (define-public python-ujson
17205 (package
17206 (name "python-ujson")
17207 (version "1.35")
17208 (source
17209 (origin
17210 (method url-fetch)
17211 (uri (pypi-uri "ujson" version))
17212 (sha256
17213 (base32
17214 "11jz5wi7mbgqcsz52iqhpyykiaasila4lq8cmc2d54bfa3jp6q7n"))))
17215 (build-system python-build-system)
17216 (home-page "http://www.esn.me")
17217 (synopsis
17218 "Ultra fast JSON encoder and decoder for Python")
17219 (description
17220 "UltraJSON is an ultra fast JSON encoder and decoder written in pure C with
17221 bindings for Python 2.5+ and 3.")
17222 (license license:bsd-3)))
17223
17224 (define-public python2-ujson
17225 (package-with-python2 python-ujson))
17226
17227 (define-public python-iocapture
17228 ;; The latest release is more than a year older than this commit.
17229 (let ((commit "fdc021c431d0840303908dfc3ca8769db383595c")
17230 (revision "1"))
17231 (package
17232 (name "python-iocapture")
17233 (version "0.1.2")
17234 (source
17235 (origin
17236 (method git-fetch)
17237 (uri (git-reference
17238 (url "https://github.com/oinume/iocapture.git")
17239 (commit commit)))
17240 (file-name (git-file-name name version))
17241 (sha256
17242 (base32
17243 "1mkbhqibxvgwg0p7slr8dfraa3g2s6bsayladhax2jccwj4kcndz"))))
17244 (build-system python-build-system)
17245 (arguments
17246 `(#:phases
17247 (modify-phases %standard-phases
17248 (delete 'check)
17249 (add-after 'install 'check
17250 (lambda* (#:key inputs outputs #:allow-other-keys)
17251 (add-installed-pythonpath inputs outputs)
17252 (invoke "py.test" "-v" "tests")
17253 #t)))))
17254 (propagated-inputs
17255 `(("python-flexmock" ,python-flexmock)
17256 ("python-pytest" ,python-pytest)
17257 ("python-pytest-cov" ,python-pytest-cov)
17258 ("python-six" ,python-six)))
17259 (home-page "https://github.com/oinume/iocapture")
17260 (synopsis "Python capturing tool for stdout and stderr")
17261 (description
17262 "This package helps you to capture the standard out (stdout) and the
17263 standard error channel (stderr) in your program.")
17264 (license license:expat))))
17265
17266 (define-public python-argh
17267 ;; There are 21 commits since the latest release containing important
17268 ;; improvements.
17269 (let ((commit "dcd3253f2994400a6a58a700c118c53765bc50a4")
17270 (revision "1"))
17271 (package
17272 (name "python-argh")
17273 (version (git-version "0.26.2" revision commit))
17274 (source
17275 (origin
17276 (method git-fetch)
17277 (uri (git-reference
17278 (url "https://github.com/neithere/argh.git")
17279 (commit commit)))
17280 (file-name (git-file-name name version))
17281 (sha256
17282 (base32
17283 "1p5h3dnpbsjmqrvil96s71asc6i3gpinmbrabqmwnrsxprz7r3ns"))))
17284 (build-system python-build-system)
17285 (propagated-inputs
17286 `(("python-iocapture" ,python-iocapture)
17287 ("python-mock" ,python-mock)
17288 ("python-pytest" ,python-pytest)
17289 ("python-pytest-cov" ,python-pytest-cov)
17290 ("python-pytest-xdist" ,python-pytest-xdist)
17291 ("python-tox" ,python-tox)))
17292 (home-page "https://github.com/neithere/argh/")
17293 (synopsis "Argparse wrapper with natural syntax")
17294 (description
17295 "python-argh is a small library that provides several layers of
17296 abstraction on top of @code{python-argparse}. The layers can be mixed. It is
17297 always possible to declare a command with the highest possible (and least
17298 flexible) layer and then tune the behaviour with any of the lower layers
17299 including the native API of @code{python-argparse}.")
17300 (license license:lgpl3+))))
17301
17302 (define-public python-ppft
17303 (package
17304 (name "python-ppft")
17305 (version "1.6.6.1")
17306 (source
17307 (origin
17308 (method url-fetch)
17309 (uri (pypi-uri "ppft" version))
17310 (sha256
17311 (base32
17312 "1z1invkhszc5d2mvgr221v7cszzifcc77mz0pv3wjp6x5q2768cy"))))
17313 (build-system python-build-system)
17314 (arguments '(#:tests? #f)) ; there are none
17315 (propagated-inputs
17316 `(("python-six" ,python-six)))
17317 (home-page "https://pypi.org/project/ppft/")
17318 (synopsis "Fork of Parallel Python")
17319 (description
17320 "This package is a fork of Parallel Python. The Parallel Python
17321 module (@code{pp}) provides an easy and efficient way to create
17322 parallel-enabled applications for @dfn{symmetric multiprocessing} (SMP)
17323 computers and clusters. It features cross-platform portability and dynamic
17324 load balancing.")
17325 (license license:bsd-3)))
17326
17327 (define-public python-pox
17328 (package
17329 (name "python-pox")
17330 (version "0.2.7")
17331 (source
17332 (origin
17333 (method url-fetch)
17334 (uri (pypi-uri "pox" version))
17335 (sha256
17336 (base32
17337 "0y17ckc2p6i6709s279sjdj4q459mpcc38ymg9zv9y6vl6jf3bq6"))))
17338 (build-system python-build-system)
17339 (arguments
17340 `(#:phases
17341 (modify-phases %standard-phases
17342 (replace 'check
17343 (lambda _
17344 (mkdir-p "/tmp/guix")
17345 (setenv "SHELL" "bash")
17346 (setenv "USERNAME" "guix")
17347 (setenv "HOME" "/tmp/guix") ; must end on USERNAME...
17348 (invoke "py.test" "-vv")
17349 #t)))))
17350 (native-inputs
17351 `(("python-pytest" ,python-pytest)
17352 ("which" ,which)))
17353 (home-page "https://pypi.org/project/pox/")
17354 (synopsis "Python utilities for filesystem exploration and automated builds")
17355 (description
17356 "Pox provides a collection of utilities for navigating and manipulating
17357 filesystems. This module is designed to facilitate some of the low level
17358 operating system interactions that are useful when exploring a filesystem on a
17359 remote host. Pox provides Python equivalents of several shell commands such
17360 as @command{which} and @command{find}. These commands allow automated
17361 discovery of what has been installed on an operating system, and where the
17362 essential tools are located.")
17363 (license license:bsd-3)))
17364
17365 (define-public python-pathos
17366 (package
17367 (name "python-pathos")
17368 (version "0.2.5")
17369 (source
17370 (origin
17371 (method url-fetch)
17372 (uri (pypi-uri "pathos" version))
17373 (sha256
17374 (base32
17375 "0in8hxdz7k081ijn6q94gr39ycy7363sx4zysmbwyvd7snqjrbi1"))))
17376 (build-system python-build-system)
17377 (arguments
17378 '(#:phases
17379 (modify-phases %standard-phases
17380 (replace 'check
17381 (lambda _
17382 (setenv "PYTHONPATH"
17383 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
17384 (invoke "python" "./tests/__main__.py"))))))
17385 (propagated-inputs
17386 `(("python-dill" ,python-dill)
17387 ("python-multiprocess" ,python-multiprocess)
17388 ("python-pox" ,python-pox)
17389 ("python-ppft" ,python-ppft)))
17390 (native-inputs
17391 `(("python-pytest" ,python-pytest)))
17392 (home-page "https://pypi.org/project/pathos/")
17393 (synopsis
17394 "Parallel graph management and execution in heterogeneous computing")
17395 (description
17396 "Python-pathos is a framework for heterogenous computing. It provides a
17397 consistent high-level interface for configuring and launching parallel
17398 computations across heterogenous resources. Python-pathos provides configurable
17399 launchers for parallel and distributed computing, where each launcher contains
17400 the syntactic logic to configure and launch jobs in an execution environment.")
17401 (license license:bsd-3)))
17402
17403 (define-public python-flit
17404 (package
17405 (name "python-flit")
17406 (version "2.1.0")
17407 (source
17408 (origin
17409 (method url-fetch)
17410 (uri (pypi-uri "flit" version))
17411 (sha256
17412 (base32
17413 "0h5vvmqinqzn97mr3ix7zx53af9ad4fimjjwqpx88yp8qhz4r5bc"))))
17414 (build-system python-build-system)
17415 (arguments
17416 `(#:tests? #f)) ; XXX: Check requires network access.
17417 (home-page "https://flit.readthedocs.io/")
17418 (synopsis
17419 "Simple packaging tool for simple packages")
17420 (description
17421 "Flit is a simple way to put Python packages and modules on PyPI. Flit
17422 packages a single importable module or package at a time, using the import
17423 name as the name on PyPI. All subpackages and data files within a package
17424 are included automatically.")
17425 (license license:bsd-3)))
17426
17427 (define-public python-pathtools
17428 (package
17429 (name "python-pathtools")
17430 (version "0.1.2")
17431 (source
17432 (origin
17433 (method url-fetch)
17434 (uri (pypi-uri "pathtools" version))
17435 (sha256
17436 (base32
17437 "1h7iam33vwxk8bvslfj4qlsdprdnwf8bvzhqh3jq5frr391cadbw"))))
17438 (build-system python-build-system)
17439 (home-page
17440 "https://github.com/gorakhargosh/pathtools")
17441 (synopsis "Path utilities for Python")
17442 (description "Pattern matching and various utilities for file systems
17443 paths.")
17444 (license license:expat)))
17445
17446 (define-public python-fastentrypoints
17447 (package
17448 (name "python-fastentrypoints")
17449 (version "0.12")
17450 (source
17451 (origin
17452 (method url-fetch)
17453 (uri (pypi-uri "fastentrypoints" version))
17454 (sha256
17455 (base32
17456 "02s1j8i2dzbpbwgq2a3fiqwm3cnmhii2qzc0k42l0rdxd4a4ya7z"))))
17457 (build-system python-build-system)
17458 (home-page
17459 "https://github.com/ninjaaron/fast-entry_points")
17460 (synopsis
17461 "Makes entry_points specified in setup.py load more quickly")
17462 (description
17463 "Using entry_points in your setup.py makes scripts that start really
17464 slowly because it imports pkg_resources. This package allows such setup
17465 scripts to load entry points more quickly.")
17466 (license license:bsd-3)))
17467
17468 (define-public python-funcparserlib
17469 (package
17470 (name "python-funcparserlib")
17471 (version "0.3.6")
17472 (source
17473 (origin
17474 (method url-fetch)
17475 (uri (pypi-uri "funcparserlib" version))
17476 (sha256
17477 (base32
17478 "07f9cgjr3h4j2m67fhwapn8fja87vazl58zsj4yppf9y3an2x6dp"))))
17479 (native-inputs
17480 `(("python-tox" ,python-tox)))
17481 (arguments
17482 `(#:phases
17483 (modify-phases %standard-phases
17484 (replace 'check
17485 (lambda _
17486 (invoke "tox"))))))
17487 (build-system python-build-system)
17488 (home-page
17489 "https://github.com/vlasovskikh/funcparserlib")
17490 (synopsis
17491 "Recursive descent parsing library based on functional combinators")
17492 (description
17493 "This package is a recursive descent parsing library for Python based on
17494 functional combinators. Parser combinators are just higher-order functions
17495 that take parsers as their arguments and return them as result values.")
17496 (license license:expat)))
17497
17498 (define-public python-speg
17499 (package
17500 (name "python-speg")
17501 (version "0.3")
17502 (source
17503 (origin
17504 (method url-fetch)
17505 (uri (pypi-uri "speg" version ".zip"))
17506 (sha256
17507 (base32 "0w9y4jf4787dzhy6rvhwi0mpl0r8qkqmqmyv2hpwdpv8w53yzjqh"))))
17508 (arguments
17509 `(#:tests? #f)) ;FIXME: tests fail, not sure why
17510 (native-inputs
17511 `(("unzip" ,unzip)))
17512 (build-system python-build-system)
17513 (home-page "https://github.com/avakar/speg")
17514 (synopsis "PEG-based parser interpreter with memoization")
17515 (description "This package is a PEG-based parser and interpreter with
17516 memoization.")
17517 (license license:expat)))
17518
17519 (define-public python-cson
17520 (package
17521 (name "python-cson")
17522 (version "0.8")
17523 (source
17524 (origin
17525 (method url-fetch)
17526 (uri (pypi-uri "cson" version))
17527 (sha256
17528 (base32 "00cyvigg4npbph39ghkg77xbxisa6plf75vii24igxfizik0337f"))))
17529 (build-system python-build-system)
17530 (propagated-inputs
17531 `(("python-speg" ,python-speg)))
17532 (home-page "https://github.com/avakar/pycson")
17533 (synopsis "Parser for Coffeescript Object Notation (CSON)")
17534 (description "This package is a parser for Coffeescript Object
17535 Notation (CSON).")
17536 (license license:expat)))
17537
17538 (define-public python-asynctest
17539 (package
17540 (name "python-asynctest")
17541 (version "0.13.0")
17542 (source
17543 (origin
17544 (method url-fetch)
17545 (uri (pypi-uri "asynctest" version))
17546 (sha256
17547 (base32
17548 "1b3zsy7p84gag6q8ai2ylyrhx213qdk2h2zb6im3xn0m5n264y62"))))
17549 (build-system python-build-system)
17550 (arguments
17551 '(#:phases
17552 (modify-phases %standard-phases
17553 (replace 'check
17554 (lambda _
17555 (invoke "python" "-X" "dev" "-m" "unittest" "-v" "test")))
17556 (add-after 'unpack 'disable-tests
17557 (lambda* _
17558 (substitute* "test/test_selector.py"
17559 ;; XXX: This test fails for unknown reason inside the build
17560 ;; environment.
17561 (("def test_events_watched_outside_test_are_ignored")
17562 "@unittest.skip('disabled by guix')
17563 def test_events_watched_outside_test_are_ignored")))))))
17564 (home-page "https://github.com/Martiusweb/asynctest")
17565 (synopsis "Extension of unittest for testing asyncio libraries")
17566 (description
17567 "The package asynctest is built on top of the standard unittest module
17568 and cuts down boilerplate code when testing libraries for asyncio.")
17569 (license license:asl2.0)))
17570
17571 (define-public python-aionotify
17572 (package
17573 (name "python-aionotify")
17574 (version "0.2.0")
17575 (source
17576 (origin
17577 ;; Source tarball on PyPi lacks tests
17578 (method git-fetch)
17579 (uri (git-reference
17580 (url "https://github.com/rbarrois/aionotify")
17581 (commit (string-append "v" version))))
17582 (file-name (git-file-name name version))
17583 (sha256
17584 (base32 "1sk9i8czxgsbrswsf1nlb4c82vgnlzi8zrvrxdip92w2z8hqh43y"))))
17585 (build-system python-build-system)
17586 (native-inputs `(("python-asynctest" ,python-asynctest)))
17587 (home-page "https://github.com/rbarrois/aionotify")
17588 (synopsis "Asyncio-powered inotify library")
17589 (description
17590 "@code{aionotify} is a simple, asyncio-based inotify library.")
17591 (license license:bsd-3)))
17592
17593 (define-public python-forbiddenfruit
17594 (package
17595 (name "python-forbiddenfruit")
17596 (version "0.1.3")
17597 (source
17598 (origin
17599 ;; Source tarball on PyPi lacks Makefile that builds and runs tests
17600 (method git-fetch)
17601 (uri (git-reference
17602 (url "https://github.com/clarete/forbiddenfruit")
17603 (commit version)))
17604 (file-name (git-file-name name version))
17605 (sha256
17606 (base32 "1fp2xvdqpi910j9r3q68x38phpxbm700gjdi2m2j5gs91xdnyyh2"))))
17607 (build-system python-build-system)
17608 (arguments
17609 '(#:phases
17610 (modify-phases %standard-phases
17611 (replace 'check
17612 (lambda _
17613 (invoke "make" "SKIP_DEPS=1"))))))
17614 (native-inputs
17615 `(("python-nose" ,python-nose)
17616 ("python-coverage" ,python-coverage)))
17617 (home-page "https://github.com/clarete/forbiddenfruit")
17618 (synopsis "Patch python built-in objects")
17619 (description "This project allows Python code to extend built-in types.")
17620 (license (list license:gpl3+ license:expat))))
17621
17622 (define-public python-shouldbe
17623 (package
17624 (name "python-shouldbe")
17625 (version "0.1.2")
17626 (source
17627 (origin
17628 (method url-fetch)
17629 (uri (pypi-uri "shouldbe" version))
17630 (sha256
17631 (base32
17632 "16zbvjxf71dl4yfbgcr6idyim3mdrfvix1dv8b95p0s9z07372pj"))))
17633 (build-system python-build-system)
17634 (propagated-inputs
17635 `(("python-forbiddenfruit" ,python-forbiddenfruit)))
17636 (native-inputs
17637 `(("python-nose" ,python-nose)))
17638 (home-page "https://github.com/directxman12/should_be")
17639 (synopsis "Python Assertion Helpers inspired by Shouldly")
17640 (description
17641 "Python Assertion Helpers inspired by Shouldly.")
17642 (license license:isc)))
17643
17644 (define-public python-k5test
17645 (package
17646 (name "python-k5test")
17647 (version "0.9.2")
17648 (source
17649 (origin
17650 (method url-fetch)
17651 (uri (pypi-uri "k5test" version))
17652 (sha256
17653 (base32
17654 "1lqp3jgfngyhaxjgj3n230hn90wsylwilh120yjf62h7b1s02mh8"))))
17655 (build-system python-build-system)
17656 (propagated-inputs
17657 `(("python-six" ,python-six)
17658 ;; `which`, `kadmin.local` binaries called inside library
17659 ("which" ,which)
17660 ("mit-krb5" ,mit-krb5)))
17661 (native-inputs `(("mit-krb5" ,mit-krb5)))
17662 (arguments
17663 '(#:phases
17664 (modify-phases %standard-phases
17665 (add-after 'unpack 'patch-paths
17666 (lambda* _
17667 (substitute* "k5test/realm.py"
17668 (("'kadmin_local'") "'kadmin.local'")))))))
17669 (home-page "https://github.com/pythongssapi/k5test")
17670 (synopsis "Library for setting up self-contained Kerberos 5 environments")
17671 (description
17672 "@code{k5test} is a library for setting up self-contained Kerberos 5
17673 environments, and running Python unit tests inside those environments. It is
17674 based on the file of the same name found alongside the MIT Kerberos 5 unit
17675 tests.")
17676 (license license:isc)))
17677
17678 (define-public python-gssapi
17679 (package
17680 (name "python-gssapi")
17681 (version "1.6.1")
17682 (source
17683 (origin
17684 (method url-fetch)
17685 (uri (pypi-uri "gssapi" version))
17686 (sha256
17687 (base32
17688 "1gymg4asvwrz7y13qpwp2s5g8qwq179d72gkj09q6bfcgs82l5wr"))))
17689 (build-system python-build-system)
17690 (propagated-inputs
17691 `(("python-decorator" ,python-decorator)
17692 ("python-six" ,python-six)))
17693 (inputs
17694 `(("mit-krb5" ,mit-krb5)))
17695 ;; for tests
17696 (native-inputs
17697 `(("python-shouldbe" ,python-shouldbe)
17698 ("python-parameterized" ,python-parameterized)
17699 ("python-k5test" ,python-k5test)
17700 ("python-nose" ,python-nose)))
17701 (home-page "https://github.com/pythongssapi/python-gssapi")
17702 (synopsis "Python GSSAPI Wrapper")
17703 (description
17704 "Python-GSSAPI provides both low-level and high level wrappers around the
17705 GSSAPI C libraries. While it focuses on the Kerberos mechanism, it should
17706 also be useable with other GSSAPI mechanisms.")
17707 (license license:isc)))
17708
17709 (define-public python-check-manifest
17710 (package
17711 (name "python-check-manifest")
17712 (version "0.37")
17713 (source
17714 (origin
17715 (method url-fetch)
17716 (uri (pypi-uri "check-manifest" version))
17717 (sha256
17718 (base32
17719 "0lk45ifdv2cpkl6ayfyix7jwmnxa1rha7xvb0ih5999k115wzqs4"))))
17720 (build-system python-build-system)
17721 (native-inputs
17722 `(("python-mock" ,python-mock)
17723 ("git" ,git)))
17724 (home-page "https://github.com/mgedmin/check-manifest")
17725 (synopsis "Check MANIFEST.in in a Python source package for completeness")
17726 (description "Python package can include a MANIFEST.in file to help with
17727 sending package files to the Python Package Index. This package checks that
17728 file to ensure it completely and accurately describes your project.")
17729 (license license:expat)))
17730
17731 (define-public python-android-stringslib
17732 (package
17733 (name "python-android-stringslib")
17734 (version "0.1.2")
17735 (source
17736 (origin
17737 (method git-fetch)
17738 (uri (git-reference
17739 (url "https://framagit.org/tyreunom/python-android-strings-lib")
17740 (commit (string-append "v" version))))
17741 (file-name (git-file-name name version))
17742 (sha256
17743 (base32
17744 "0gij55qzzq1h83kfpvhai1vf78kkhyvxa6l17m2nl24454lhfin4"))))
17745 (build-system python-build-system)
17746 (arguments
17747 `(#:tests? #f))
17748 (home-page "https://framagit.org/tyreunom/python-android-strings-lib")
17749 (synopsis "Android strings.xml support")
17750 (description "Android Strings Lib provides support for android's strings.xml
17751 files. These files are used to translate strings in android apps.")
17752 (license license:expat)))
17753
17754 (define-public python-watchdog
17755 (package
17756 (name "python-watchdog")
17757 (version "0.9.0")
17758 (source
17759 (origin
17760 (method url-fetch)
17761 (uri (pypi-uri "watchdog" version))
17762 (sha256
17763 (base32
17764 "07cnvvlpif7a6cg4rav39zq8fxa5pfqawchr46433pij0y6napwn"))))
17765 (build-system python-build-system)
17766 (arguments
17767 `(#:phases
17768 (modify-phases %standard-phases
17769 (add-before 'check 'remove-failing
17770 (lambda _
17771 (delete-file "tests/test_inotify_buffer.py")
17772 (delete-file "tests/test_snapshot_diff.py")
17773 #t)))))
17774 (propagated-inputs
17775 `(("python-argh" ,python-argh)
17776 ("python-pathtools" ,python-pathtools)
17777 ("python-pyyaml" ,python-pyyaml)))
17778 (native-inputs
17779 `(("python-pytest-cov" ,python-pytest-cov)
17780 ("python-pytest-timeout" ,python-pytest-timeout)))
17781 (home-page "https://github.com/gorakhargosh/watchdog")
17782 (synopsis "Filesystem events monitoring")
17783 (description "This package provides a way to monitor filesystem events
17784 such as a file modification and trigger an action. This is similar to inotify,
17785 but portable.")
17786 (license license:asl2.0)))
17787
17788 (define-public python-wget
17789 (package
17790 (name "python-wget")
17791 (version "3.2")
17792 (source
17793 (origin
17794 (method url-fetch)
17795 (uri (pypi-uri "wget" version ".zip"))
17796 (sha256
17797 (base32
17798 "0qb0y7ipby42m4m7h0ipazpdyc3bn9xi46lvifcwwl5albn31rim"))))
17799 (build-system python-build-system)
17800 (native-inputs `(("unzip" ,unzip)))
17801 (home-page "https://bitbucket.org/techtonik/python-wget/")
17802 (synopsis "Pure Python download utility")
17803 (description "The python-wget library provides an API to download files
17804 with features similar to the @command{wget} utility.")
17805 (license license:unlicense)))
17806
17807 (define-public offlate
17808 (package
17809 (name "offlate")
17810 (version "0.5")
17811 (source
17812 (origin
17813 (method git-fetch)
17814 (uri (git-reference
17815 (url "https://framagit.org/tyreunom/offlate")
17816 (commit version)))
17817 (file-name (git-file-name name version))
17818 (sha256
17819 (base32
17820 "13pqnbl05wcyldfvl75fp89vjgwsvxyc69vhnb17kkha2rc2k1h7"))))
17821 (build-system python-build-system)
17822 (arguments
17823 ;; No tests
17824 `(#:tests? #f))
17825 (propagated-inputs
17826 `(("python-android-stringslib" ,python-android-stringslib)
17827 ("python-dateutil" ,python-dateutil)
17828 ("python-gitlab" ,python-gitlab)
17829 ("python-lxml" ,python-lxml)
17830 ("python-polib" ,python-polib)
17831 ("python-pyenchant" ,python-pyenchant)
17832 ("python-pygit2" ,python-pygit2)
17833 ("python-pygithub" ,python-pygithub)
17834 ("python-pyqt" ,python-pyqt)
17835 ("python-requests" ,python-requests)
17836 ("python-ruamel.yaml" ,python-ruamel.yaml)
17837 ("python-translation-finder" ,python-translation-finder)
17838 ("python-watchdog" ,python-watchdog)))
17839 (native-inputs
17840 `(("qttools" ,qttools)))
17841 (home-page "https://framagit.org/tyreunom/offlate")
17842 (synopsis "Offline translation interface for online translation tools")
17843 (description "Offlate offers a unified interface for different translation
17844 file formats, as well as many different online translation platforms. You can
17845 use it to get work from online platforms, specialized such as the Translation
17846 Project, or not such a gitlab instance when your upstream doesn't use any
17847 dedicated platform. The tool proposes a unified interface for any format and
17848 an upload option to send your work back to the platform.")
17849 (license license:gpl3+)))
17850
17851 (define-public python-pypng
17852 (package
17853 (name "python-pypng")
17854 (version "0.0.20")
17855 (source
17856 (origin
17857 (method url-fetch)
17858 (uri (pypi-uri "pypng" version))
17859 (sha256
17860 (base32 "02qpa22ls41vwsrzw9r9qhj1nhq05p03hb5473pay6y980s86chh"))))
17861 (build-system python-build-system)
17862 (home-page "https://github.com/drj11/pypng")
17863 (synopsis "Pure Python PNG image encoder/decoder")
17864 (description
17865 "The PyPNG module implements support for PNG images. It reads and writes
17866 PNG files with all allowable bit depths (1/2/4/8/16/24/32/48/64 bits per
17867 pixel) and colour combinations: greyscale (1/2/4/8/16 bit); RGB, RGBA,
17868 LA (greyscale with alpha) with 8/16 bits per channel; colour mapped
17869 images (1/2/4/8 bit). Adam7 interlacing is supported for reading and writing.
17870 A number of optional chunks can be specified (when writing) and
17871 understood (when reading): tRNS, bKGD, gAMA.
17872
17873 PyPNG is not a high level toolkit for image processing (like PIL) and does not
17874 aim at being a replacement or competitor. Its strength lies in fine-grained
17875 extensive support of PNG features. It can also read and write Netpbm PAM
17876 files, with a focus on its use as an intermediate format for implementing
17877 custom PNG processing.")
17878 (license license:expat)))
17879
17880 (define-public python-fuzzywuzzy
17881 (package
17882 (name "python-fuzzywuzzy")
17883 (version "0.18.0")
17884 (source
17885 (origin
17886 (method url-fetch)
17887 (uri (pypi-uri "fuzzywuzzy" version))
17888 (sha256
17889 (base32
17890 "1s00zn75y2dkxgnbw8kl8dw4p1mc77cv78fwfa4yb0274s96w0a5"))))
17891 (build-system python-build-system)
17892 (native-inputs
17893 `(("python-hypothesis" ,python-hypothesis)
17894 ("python-pycodestyle" ,python-pycodestyle)
17895 ("python-pytest" ,python-pytest)))
17896 (propagated-inputs
17897 `(("python-levenshtein" ,python-levenshtein)))
17898 (home-page "https://github.com/seatgeek/fuzzywuzzy")
17899 (synopsis "Fuzzy string matching in Python")
17900 (description "Approximate string matching using
17901 @emph{Levenshtein Distance} to calculate the differences between
17902 sequences.")
17903 (license license:gpl2)))
17904
17905 (define-public python2-fuzzywuzzy
17906 (package-with-python2 python-fuzzywuzzy))