gnu: Add python-pytest-black.
[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-semantic-version
675 (package
676 (name "python-semantic-version")
677 (version "2.6.0")
678 (source
679 (origin
680 (method url-fetch)
681 (uri (pypi-uri "semantic_version" version))
682 (sha256
683 (base32
684 "1h2l9xyg1zzsda6kjcmfcgycbvrafwci283vcr1v5sbk01l2hhra"))))
685 (build-system python-build-system)
686 (arguments
687 `(#:tests? #f)) ; PyPI tarball lacks tests
688 (home-page "https://github.com/rbarrois/python-semanticversion")
689 (synopsis "Semantic versioning module for Python")
690 (description
691 "The @code{semantic_version} class is a small library for handling
692 @uref{https://semver.org/, semantic versioning} (@dfn{SemVer}) in Python.
693
694 It can compare versions, generate a new version that represents a bump in one of
695 the version levels, and check whether any given string is a proper semantic
696 version identifier.")
697 (license license:bsd-3)))
698
699 (define-public python2-semantic-version
700 (package-with-python2 python-semantic-version))
701
702 (define-public python-serpent
703 (package
704 (name "python-serpent")
705 (version "1.28")
706 (source
707 (origin
708 (method url-fetch)
709 (uri (pypi-uri "serpent" version))
710 (sha256
711 (base32 "1arnckykpkvv2qrp49l1k7q5mr5pisswl0rvdx98x8wsl1n361pk"))))
712 (build-system python-build-system)
713 (native-inputs
714 `(("python-attrs" ,python-attrs)
715 ("python-pytz" ,python-pytz)))
716 (home-page "https://github.com/irmen/Serpent")
717 (synopsis "Serializer for literal Python expressions")
718 (description
719 "Serpent provides @code{ast.literal_eval()}-compatible object tree
720 serialization. It serializes an object tree into bytes (an utf-8 encoded
721 string) that can be decoded and then passed as-is to @code{ast.literal_eval()}
722 to rebuild the original object tree.
723
724 Because only safe literals are encoded, it is safe to send serpent data to
725 other machines, such as over the network.")
726 (license license:expat)))
727
728 (define-public python-setuptools
729 (package
730 (name "python-setuptools")
731 (version "41.0.1")
732 (source
733 (origin
734 (method url-fetch)
735 (uri (pypi-uri "setuptools" version ".zip"))
736 (sha256
737 (base32
738 "04sns22y2hhsrwfy1mha2lgslvpjsjsz8xws7h2rh5a7ylkd28m2"))
739 (modules '((guix build utils)))
740 (snippet
741 '(begin
742 ;; Remove included binaries which are used to build self-extracting
743 ;; installers for Windows.
744 ;; TODO: Find some way to build them ourself so we can include them.
745 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
746 #t))))
747 (build-system python-build-system)
748 ;; FIXME: Tests require pytest, which itself relies on setuptools.
749 ;; One could bootstrap with an internal untested setuptools.
750 (arguments
751 `(#:tests? #f))
752 (home-page "https://pypi.org/project/setuptools/")
753 (synopsis
754 "Library designed to facilitate packaging Python projects")
755 (description
756 "Setuptools is a fully-featured, stable library designed to facilitate
757 packaging Python projects, where packaging includes:
758 Python package and module definitions,
759 distribution package metadata,
760 test hooks,
761 project installation,
762 platform-specific details,
763 Python 3 support.")
764 ;; TODO: setuptools now bundles the following libraries:
765 ;; packaging, pyparsing, six and appdirs. How to unbundle?
766 (license (list license:psfl ; setuptools itself
767 license:expat ; six, appdirs, pyparsing
768 license:asl2.0 ; packaging is dual ASL2/BSD-2
769 license:bsd-2))))
770
771 (define-public python2-setuptools
772 (package-with-python2 python-setuptools))
773
774 ;; The setuptools provided by Python 3.7.4 is too new for Tensorflow.
775 (define-public python-setuptools-for-tensorflow
776 (hidden-package
777 (package
778 (inherit python-setuptools)
779 (version "39.1.0")
780 (source (origin
781 (inherit (package-source python-setuptools))
782 (uri (pypi-uri "setuptools" version ".zip"))
783 (sha256
784 (base32
785 "1mzdhvfhnv4lggxa8rjl0dzqxvfx377gg5sqs57v89wrp09lwj65")))))))
786
787 (define-public python-uniseg
788 (package
789 (name "python-uniseg")
790 (version "0.7.1")
791 (source
792 (origin
793 (method url-fetch)
794 (uri (pypi-uri "uniseg" version ".zip"))
795 (sha256
796 (base32
797 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
798 (build-system python-build-system)
799 (arguments
800 '(#:tests? #f)) ; The test suite requires network access.
801 (native-inputs
802 `(("unzip" ,unzip)))
803 (home-page
804 "https://bitbucket.org/emptypage/uniseg-python")
805 (synopsis
806 "Python library to determine Unicode text segmentations")
807 (description
808 "Uniseg is a Python package used to determine Unicode text segmentations.
809 Supported segmentations include:
810 @enumerate
811 @item @dfn{Code point} (any value in the Unicode codespace)
812 @item @dfn{Grapheme cluster} (user-perceived character made of a single or
813 multiple Unicode code points, e.g. \"G\" + acute-accent)
814 @item Word break
815 @item Sentence break
816 @item Line break
817 @end enumerate")
818 (license license:expat)))
819
820 (define-public python2-uniseg
821 (package-with-python2 python-uniseg))
822
823 (define-public python-humanfriendly
824 (package
825 (name "python-humanfriendly")
826 (version "4.4.1")
827 (source
828 (origin
829 (method url-fetch)
830 (uri (pypi-uri "humanfriendly" version))
831 (sha256
832 (base32
833 "0pisgizjql86785jchfjv217g0lsgk114g2lja5j4y3lsc3b9szi"))))
834 (build-system python-build-system)
835 (arguments
836 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
837 #:tests? #f))
838 (propagated-inputs
839 `(("python-monotonic" ,python-monotonic)))
840 (home-page "https://humanfriendly.readthedocs.io")
841 (synopsis "Human-friendly input and output in Python")
842 (description
843 "The functions and classes in @code{humanfriendly} can be used to make
844 text interfaces more user-friendly. It includes tools to parse and format
845 numbers, file sizes, and timespans, timers for long-running operations, menus
846 to allow the user to choose from a list of options, and terminal interaction
847 helpers.")
848 (license license:expat)))
849
850 (define-public python2-humanfriendly
851 (package-with-python2 python-humanfriendly))
852
853 (define-public python-capturer
854 (package
855 (name "python-capturer")
856 (version "2.4")
857 (source
858 (origin
859 (method url-fetch)
860 (uri (pypi-uri "capturer" version))
861 (sha256
862 (base32
863 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
864 (build-system python-build-system)
865 (arguments
866 `(#:tests? #f))
867 (propagated-inputs
868 `(("python-humanfriendly" ,python-humanfriendly)))
869 (home-page "https://capturer.readthedocs.io")
870 (synopsis "Capture stdout and stderr streams of the current process")
871 (description
872 "The capturer package makes it easy to capture the stdout and stderr
873 streams of the current process and subprocesses. Output can be relayed
874 to the terminal in real time but is also available to the Python program
875 for additional processing.")
876 (license license:expat)))
877
878 (define-public python2-capturer
879 (package-with-python2 python-capturer))
880
881 (define-public python-case
882 (package
883 (name "python-case")
884 (version "1.5.3")
885 (source
886 (origin
887 (method url-fetch)
888 (uri (pypi-uri "case" version))
889 (sha256
890 (base32
891 "1cagg06vfph864s6l5jb0zqliwxh647bki8j6lf4a4qrv40jnhs8"))))
892 (build-system python-build-system)
893 (propagated-inputs
894 `(("python-mock" ,python-mock)
895 ("python-nose" ,python-nose)
896 ("python-six" ,python-six)
897 ("python-unittest2" ,python-unittest2)))
898 (native-inputs
899 `(("python-coverage" ,python-coverage)))
900 (home-page "https://github.com/celery/case")
901 (synopsis "Unittest utilities and convenience methods")
902 (description
903 "The @code{case} package provides utilities on top of unittest, including
904 some helpful Python 2 compatibility convenience methods.")
905 (license license:bsd-3)))
906
907 (define-public python-verboselogs
908 (package
909 (name "python-verboselogs")
910 (version "1.7")
911 (source
912 (origin
913 (method url-fetch)
914 (uri (pypi-uri "verboselogs" version))
915 (sha256
916 (base32
917 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
918 (build-system python-build-system)
919 (arguments
920 `(#:phases
921 (modify-phases %standard-phases
922 (replace 'check
923 (lambda _
924 ;; Do not run pylint plugin test, as astroid is an old
925 ;; unsupported version.
926 (invoke "pytest" "-v" "-k" "not test_pylint_plugin"
927 "verboselogs/tests.py"))))))
928 (native-inputs
929 `(("python-mock" ,python-mock)
930 ("python-pytest" ,python-pytest)))
931 (home-page "https://verboselogs.readthedocs.io")
932 (synopsis "Verbose logging level for Python's logging module")
933 (description
934 "The @code{verboselogs} package extends Python's @code{logging} module to
935 add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
936 (license license:expat)))
937
938 (define-public python2-verboselogs
939 (package-with-python2 python-verboselogs))
940
941 (define-public python-coloredlogs
942 (package
943 (name "python-coloredlogs")
944 (version "10.0")
945 (source
946 (origin
947 (method url-fetch)
948 (uri (pypi-uri "coloredlogs" version))
949 (sha256
950 (base32
951 "0dkw6xp0r1dwgz4s2f58npx5nxfq51wf4l6qkm5ib27slgfs4sdq"))))
952 (build-system python-build-system)
953 (arguments
954 `(;Tests require some updated modules
955 #:tests? #f))
956 (propagated-inputs
957 `(("python-capturer" ,python-capturer)))
958 (home-page "https://coloredlogs.readthedocs.io")
959 (synopsis "Colored stream handler for Python's logging module")
960 (description
961 "The @code{coloredlogs} package enables colored terminal output for
962 Python's logging module. The @code{ColoredFormatter} class inherits from
963 @code{logging.Formatter} and uses ANSI escape sequences to render your logging
964 messages in color.")
965 (license license:expat)))
966
967 (define-public python2-coloredlogs
968 (package-with-python2 python-coloredlogs))
969
970 (define-public python-editorconfig
971 (package
972 (name "python-editorconfig")
973 (version "0.12.2")
974 (source
975 (origin
976 (method url-fetch)
977 (uri (pypi-uri "EditorConfig" version))
978 (sha256
979 (base32
980 "0v55z351p9qkyp3bbspwywwn28sbcknhirngjbj779n3z52z63hv"))))
981 (build-system python-build-system)
982 (home-page "https://editorconfig.org/")
983 (synopsis "EditorConfig bindings for python")
984 (description "The EditorConfig project consists of a file format for
985 defining coding styles and a collection of text editor plugins that enable
986 editors to read the file format and adhere to defined styles. EditorConfig
987 files are easily readable and they work nicely with version control systems.")
988 ;; "fnmatch.py" and "ini.py" are licensed under psfl, the rest is bsd-2.
989 (license (list license:bsd-2 license:psfl))))
990
991 (define-public python-et-xmlfile
992 (package
993 (name "python-et-xmlfile")
994 (version "1.0.1")
995 (source
996 (origin
997 (method url-fetch)
998 (uri (pypi-uri "et_xmlfile" version))
999 (sha256
1000 (base32
1001 "0nrkhcb6jdrlb6pwkvd4rycw34y3s931hjf409ij9xkjsli9fkb1"))))
1002 (build-system python-build-system)
1003 (arguments
1004 `(#:phases (modify-phases %standard-phases
1005 (replace 'check
1006 (lambda _
1007 (invoke "pytest"))))))
1008 (native-inputs
1009 `(("python-pytest" ,python-pytest)
1010 ("python-lxml" ,python-lxml))) ;used for the tests
1011 (home-page "https://bitbucket.org/openpyxl/et_xmlfile")
1012 (synopsis "Low memory implementation of @code{lxml.xmlfile}")
1013 (description "This Python library is based upon the @code{xmlfile} module
1014 from @code{lxml}. It aims to provide a low memory, compatible implementation
1015 of @code{xmlfile}.")
1016 (license license:expat)))
1017
1018 (define-public python2-et-xmlfile
1019 (package-with-python2 python-et-xmlfile))
1020
1021 (define-public python-openpyxl
1022 (package
1023 (name "python-openpyxl")
1024 (version "2.6.2")
1025 (source
1026 (origin
1027 ;; We use the upstream repository, as the tests are not included in the
1028 ;; PyPI releases.
1029 (method hg-fetch)
1030 (uri (hg-reference
1031 (url "https://bitbucket.org/openpyxl/openpyxl")
1032 (changeset version)))
1033 (file-name (string-append name "-" version "-checkout"))
1034 (sha256
1035 (base32 "1qhij6kcvdxqjy4g6193nsv4q7fy8n4fwyd3c2z047idlm6s3j4w"))))
1036 (build-system python-build-system)
1037 (arguments
1038 `(#:phases (modify-phases %standard-phases
1039 (replace 'check
1040 (lambda _
1041 (invoke "pytest"))))))
1042 (native-inputs
1043 ;; For the test suite.
1044 `(("python-lxml" ,python-lxml)
1045 ("python-pillow" ,python-pillow)
1046 ("python-pytest" ,python-pytest)))
1047 (propagated-inputs
1048 `(("python-et-xmlfile" ,python-et-xmlfile)
1049 ("python-jdcal" ,python-jdcal)))
1050 (home-page "https://openpyxl.readthedocs.io")
1051 (synopsis "Python library to read/write Excel 2010 XLSX/XLSM files")
1052 (description "This Python library allows reading and writing to the Excel XLSX, XLSM,
1053 XLTX and XLTM file formats that are defined by the Office Open XML (OOXML)
1054 standard.")
1055 (license license:expat)))
1056
1057 (define-public python-eventlet
1058 (package
1059 (name "python-eventlet")
1060 (version "0.25.1")
1061 (source
1062 (origin
1063 (method url-fetch)
1064 (uri (pypi-uri "eventlet" version))
1065 (sha256
1066 (base32
1067 "1hgz8jq19wlz8vwqj900ry8cjv578nz4scc91mlc8944yid6573c"))))
1068 (build-system python-build-system)
1069 (propagated-inputs
1070 `(("python-greenlet" ,python-greenlet)))
1071 (arguments
1072 ;; TODO: Requires unpackaged 'enum-compat'.
1073 '(#:tests? #f))
1074 (home-page "https://eventlet.net")
1075 (synopsis "Concurrent networking library for Python")
1076 (description
1077 "Eventlet is a concurrent networking library for Python that
1078 allows you to change how you run your code, not how you write it.
1079 It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
1080 Coroutines ensure that the developer uses a blocking style of programming
1081 that is similar to threading, but provide the benefits of non-blocking I/O.
1082 The event dispatch is implicit, which means you can easily use @code{Eventlet}
1083 from the Python interpreter, or as a small part of a larger application.")
1084 (license license:expat)))
1085
1086 (define-public python2-eventlet
1087 (let ((base (package-with-python2
1088 (strip-python2-variant python-eventlet))))
1089 (package (inherit base)
1090 (propagated-inputs
1091 `(("python2-enum34" ,python2-enum34)
1092 ,@(package-propagated-inputs base))))))
1093
1094 (define-public python-six
1095 (package
1096 (name "python-six")
1097 (version "1.12.0")
1098 (source
1099 (origin
1100 (method url-fetch)
1101 (uri (pypi-uri "six" version))
1102 (sha256
1103 (base32
1104 "0wxs1q74v07ssjywbbm7x6h5v9qx209ld2yfsif4060sxi0h2sni"))))
1105 (build-system python-build-system)
1106 (arguments
1107 `(#:phases
1108 (modify-phases %standard-phases
1109 (replace 'check
1110 (lambda _
1111 (invoke "py.test" "-v"))))))
1112 (native-inputs
1113 `(("python-py" ,python-py)
1114 ("python-pytest" ,python-pytest-bootstrap)))
1115 (home-page "https://pypi.org/project/six/")
1116 (synopsis "Python 2 and 3 compatibility utilities")
1117 (description
1118 "Six is a Python 2 and 3 compatibility library. It provides utility
1119 functions for smoothing over the differences between the Python versions with
1120 the goal of writing Python code that is compatible on both Python versions.
1121 Six supports every Python version since 2.5. It is contained in only one
1122 Python file, so it can be easily copied into your project.")
1123 (license license:x11)))
1124
1125 (define-public python2-six
1126 (package-with-python2 python-six))
1127
1128 (define-public python-six-bootstrap
1129 (package
1130 (inherit python-six)
1131 (name "python-six-bootstrap")
1132 (native-inputs `())
1133 (arguments `(#:tests? #f))))
1134
1135 (define-public python2-six-bootstrap
1136 (package-with-python2 python-six-bootstrap))
1137
1138 (define-public python-schedule
1139 (package
1140 (name "python-schedule")
1141 (version "0.4.3")
1142 (source
1143 (origin
1144 (method url-fetch)
1145 (uri (pypi-uri "schedule" version))
1146 (sha256
1147 (base32
1148 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
1149 (build-system python-build-system)
1150 (native-inputs
1151 `(("python-pytest" ,python-pytest)
1152 ("python-mock" ,python-mock)))
1153 (home-page "https://github.com/dbader/schedule")
1154 (synopsis "Schedule periodic function calls in Python")
1155 (description
1156 "Schedule is an in-process scheduler for periodic jobs that uses the
1157 builder pattern for configuration. Schedule lets you run Python functions (or
1158 any other callable) periodically at pre-determined intervals using a simple,
1159 human-friendly syntax.")
1160 (license license:expat)))
1161
1162 (define-public python2-schedule
1163 (package-with-python2 python-schedule))
1164
1165 (define-public python2-mechanize
1166 (package
1167 (name "python2-mechanize")
1168 (version "0.2.5")
1169 (source
1170 (origin
1171 (method url-fetch)
1172 (uri (pypi-uri "mechanize" version))
1173 (sha256
1174 (base32
1175 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1176 (build-system python-build-system)
1177 (arguments
1178 `(#:python ,python-2 ; apparently incompatible with Python 3
1179 #:tests? #f))
1180 ;; test fails with message
1181 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1182 ;; (python-3.3.2) or
1183 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1184 ;; (python-2.7.5).
1185 ;; The source code is from March 2011 and probably not up-to-date
1186 ;; with respect to python unit tests.
1187 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1188 (synopsis
1189 "Stateful programmatic web browsing in Python")
1190 (description
1191 "Mechanize implements stateful programmatic web browsing in Python,
1192 after Andy Lester’s Perl module WWW::Mechanize.")
1193 (license (license:non-copyleft
1194 "file://COPYING"
1195 "See COPYING in the distribution."))))
1196
1197
1198 (define-public python-simplejson
1199 (package
1200 (name "python-simplejson")
1201 (version "3.14.0")
1202 (source
1203 (origin
1204 (method url-fetch)
1205 (uri (pypi-uri "simplejson" version))
1206 (sha256
1207 (base32
1208 "1lkv3xlf7ryzi69zqfdbkvpxdfy1rg1rq2yzcnxgf4km5m6difqy"))))
1209 (build-system python-build-system)
1210 (home-page "http://simplejson.readthedocs.org/en/latest/")
1211 (synopsis
1212 "Json library for Python")
1213 (description
1214 "JSON (JavaScript Object Notation) is a subset of JavaScript
1215 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1216 format.
1217
1218 Simplejson exposes an API familiar to users of the standard library marshal
1219 and pickle modules. It is the externally maintained version of the json
1220 library contained in Python 2.6, but maintains compatibility with Python 2.5
1221 and (currently) has significant performance advantages, even without using
1222 the optional C extension for speedups. Simplejson is also supported on
1223 Python 3.3+.")
1224 (license license:x11)))
1225
1226 (define-public python2-simplejson
1227 (package-with-python2 python-simplejson))
1228
1229
1230 (define-public python-pyicu
1231 (package
1232 (name "python-pyicu")
1233 (version "2.3.1")
1234 (source
1235 (origin
1236 (method url-fetch)
1237 (uri (pypi-uri "PyICU" version))
1238 (sha256
1239 (base32
1240 "1x4w8m7ifki9z2a187pgjr33z6z0rp2fii9b73djak1vhm9v9cnx"))))
1241 (build-system python-build-system)
1242 (inputs
1243 `(("icu4c" ,icu4c)))
1244 (native-inputs
1245 `(("python-pytest" ,python-pytest)
1246 ("python-six" ,python-six)))
1247 (home-page "https://github.com/ovalhub/pyicu")
1248 (synopsis "Python extension wrapping the ICU C++ API")
1249 (description
1250 "PyICU is a python extension wrapping the ICU C++ API.")
1251 (properties `((python2-variant . ,(delay python2-pyicu))))
1252 (license license:x11)))
1253
1254 (define-public python2-pyicu
1255 (let ((base (package-with-python2
1256 (strip-python2-variant python-pyicu))))
1257 (package
1258 (inherit base)
1259 (arguments
1260 `(,@(package-arguments base)
1261 #:phases
1262 (modify-phases %standard-phases
1263 (add-before 'check 'delete-failing-test
1264 (λ _
1265 ;; XXX: This fails due to Unicode issues unique to Python 2,
1266 ;; it seems: <https://github.com/ovalhub/pyicu/issues/61>.
1267 (delete-file "test/test_Script.py")
1268 #t))))))))
1269
1270 (define-public python2-dogtail
1271 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1272 ;; spaces in indentation" with Python 3.
1273 (package
1274 (name "python2-dogtail")
1275 (version "0.9.9")
1276 (source (origin
1277 (method url-fetch)
1278 (uri (pypi-uri "dogtail" version))
1279 (sha256
1280 (base32
1281 "0p5wfssvzr9w0bvhllzbbd8fnp4cca2qxcpcsc33dchrmh5n552x"))))
1282 (build-system python-build-system)
1283 (arguments `(#:python ,python-2
1284 #:tests? #f)) ; invalid command "test"
1285 ;; Currently no offical homepage.
1286 (home-page "https://pypi.org/project/dogtail/")
1287 (synopsis "GUI test tool and automation framework written in Python")
1288 (description
1289 "Dogtail is a GUI test tool and automation framework written in Python.
1290 It uses Accessibility (a11y) technologies to communicate with desktop
1291 applications. dogtail scripts are written in Python and executed like any
1292 other Python program.")
1293 (license license:gpl2+)))
1294
1295 (define-public python-empy
1296 (package
1297 (name "python-empy")
1298 (version "3.3.3")
1299 (source (origin
1300 (method url-fetch)
1301 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1302 version ".tar.gz"))
1303 (sha256
1304 (base32
1305 "1mxfy5mgp473ga1pgz2nvm8ds6z4g3hdky8523z6jzvcs9ny6hcq"))))
1306 (build-system python-build-system)
1307 (arguments
1308 `(#:tests? #f)) ; python2 only
1309 (home-page "http://www.alcyone.com/software/empy/")
1310 (synopsis "Templating system for Python")
1311 (description
1312 "EmPy is a system for embedding Python expressions and statements in
1313 template text; it takes an EmPy source file, processes it, and produces
1314 output. This is accomplished via expansions, which are special signals to the
1315 EmPy system and are set off by a special prefix (by default the at sign, @@).
1316 EmPy can expand arbitrary Python expressions and statements in this way, as
1317 well as a variety of special forms. Textual data not explicitly delimited in
1318 this way is sent unaffected to the output, allowing Python to be used in
1319 effect as a markup language. Also supported are callbacks via hooks,
1320 recording and playback via diversions, and dynamic, chainable filters. The
1321 system is highly configurable via command line options and embedded
1322 commands.")
1323 (license license:lgpl2.1+)))
1324
1325 (define-public python2-empy
1326 (let ((base (package-with-python2 (strip-python2-variant python-empy))))
1327 (package
1328 (inherit base)
1329 (arguments `(,@(package-arguments base)
1330 #:tests? #t)))))
1331
1332 (define-public python2-element-tree
1333 (package
1334 (name "python2-element-tree")
1335 (version "1.2.6")
1336 (source (origin
1337 (method url-fetch)
1338 (uri (string-append
1339 "http://effbot.org/media/downloads/elementtree-"
1340 version "-20050316.tar.gz"))
1341 (sha256
1342 (base32
1343 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1344 (build-system python-build-system)
1345 (arguments
1346 `(#:python ,python-2 ; seems to be part of Python 3
1347 #:tests? #f)) ; no 'test' sub-command
1348 (synopsis "Toolkit for XML processing in Python")
1349 (description
1350 "ElementTree is a Python library supporting lightweight XML processing.")
1351 (home-page "http://effbot.org/zone/element-index.htm")
1352 (license (license:x11-style
1353 "http://docs.python.org/2/license.html"
1354 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1355
1356 (define-public python2-pybugz
1357 (package
1358 (name "python2-pybugz")
1359 (version "0.6.11")
1360 (source (origin
1361 (method url-fetch)
1362 (uri (string-append
1363 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1364 version ".tar.gz"))
1365 (sha256
1366 (base32
1367 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1368 (patches (search-patches "pybugz-stty.patch"
1369 "pybugz-encode-error.patch"))))
1370 (build-system python-build-system)
1371 (arguments
1372 `(#:python ,python-2 ; SyntaxError with Python 3
1373 #:tests? #f)) ; no 'test' sub-command
1374 (propagated-inputs
1375 `(("element-tree" ,python2-element-tree)))
1376 (synopsis "Python and command-line interface to Bugzilla")
1377 (description
1378 "PyBugz is a Python library and command-line tool to query the Bugzilla
1379 bug tracking system. It is meant as an aid to speed up interaction with the
1380 bug tracker.")
1381 (home-page "http://www.liquidx.net/pybugz/")
1382 (license license:gpl2)))
1383
1384 (define-public python2-enum
1385 (package
1386 (name "python2-enum")
1387 (version "0.4.6")
1388 (source (origin
1389 (method url-fetch)
1390 (uri (pypi-uri "enum" version))
1391 (sha256
1392 (base32
1393 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
1394 (build-system python-build-system)
1395 (arguments
1396 `(#:python ,python-2))
1397 (home-page "https://pypi.org/project/enum/")
1398 (synopsis "Robust enumerated type support in Python")
1399 (description
1400 "This provides a module for robust enumerations in Python. It has
1401 been superseded by the Python standard library and is provided only for
1402 compatibility.")
1403 ;; Choice of either license.
1404 (license (list license:gpl3+ license:psfl))))
1405
1406 (define-public python-enum34
1407 (package
1408 (name "python-enum34")
1409 (version "1.1.6")
1410 (source
1411 (origin
1412 (method url-fetch)
1413 (uri (pypi-uri "enum34" version))
1414 (sha256
1415 (base32
1416 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
1417 (build-system python-build-system)
1418 (home-page "https://pypi.org/project/enum34/")
1419 (synopsis "Backported Python 3.4 Enum")
1420 (description
1421 "Enum34 is the new Python stdlib enum module available in Python 3.4
1422 backported for previous versions of Python from 2.4 to 3.3.")
1423 (license license:bsd-3)))
1424
1425 (define-public python2-enum34
1426 (package-with-python2 python-enum34))
1427
1428 (define-public python-parse-type
1429 (package
1430 (name "python-parse-type")
1431 (version "0.4.2")
1432 (source
1433 (origin
1434 (method url-fetch)
1435 (uri (pypi-uri "parse_type" version))
1436 (sha256
1437 (base32
1438 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
1439 (build-system python-build-system)
1440 (propagated-inputs
1441 `(("python-six" ,python-six)
1442 ("python-parse" ,python-parse)))
1443 (native-inputs
1444 `(("python-pytest" ,python-pytest)
1445 ("python-pytest-runner" ,python-pytest-runner)))
1446 (home-page "https://github.com/jenisys/parse_type")
1447 (synopsis "Extended parse module")
1448 (description
1449 "Parse_type extends the python parse module.")
1450 (properties
1451 `((python2-variant . ,(delay python2-parse-type))))
1452 (license license:bsd-3)))
1453
1454 (define-public python2-parse-type
1455 (let ((base (package-with-python2
1456 (strip-python2-variant python-parse-type))))
1457 (package (inherit base)
1458 (propagated-inputs
1459 `(("python2-enum34" ,python2-enum34)
1460 ,@(package-propagated-inputs base))))))
1461
1462 (define-public python-parse
1463 (package
1464 (name "python-parse")
1465 (version "1.8.4")
1466 (source
1467 (origin
1468 (method url-fetch)
1469 (uri (pypi-uri "parse" version))
1470 (sha256
1471 (base32
1472 "0f8997xr8nq2nq35iiviq8ningd1zvy59fg503xfpbi2dwhgdkf3"))))
1473 (build-system python-build-system)
1474 (arguments
1475 `(#:phases
1476 (modify-phases %standard-phases
1477 (replace 'check
1478 (lambda _ (invoke "python" "test_parse.py"))))))
1479 (home-page "https://github.com/r1chardj0n3s/parse")
1480 (synopsis "Parse strings")
1481 (description
1482 "Parse strings using a specification based on the Python @code{format()}
1483 syntax.")
1484 (license license:x11)))
1485
1486 (define-public python-polib
1487 (package
1488 (name "python-polib")
1489 (version "1.0.8")
1490 (source (origin
1491 (method url-fetch)
1492 (uri (pypi-uri "polib" version))
1493 (sha256
1494 (base32
1495 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1496 (build-system python-build-system)
1497 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1498 (synopsis "Manipulate, create and modify gettext files")
1499 (description "Polib can manipulate any gettext format (po, pot and mo)
1500 files. It can be used to create po files from scratch or to modify
1501 existing ones.")
1502 (license license:expat)))
1503
1504 (define-public python2-polib
1505 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1506 (package
1507 (inherit base)
1508 (arguments `(,@(package-arguments base)
1509 ;; Tests don't work with python2.
1510 #:tests? #f)))))
1511
1512 (define-public python-poyo
1513 (package
1514 (name "python-poyo")
1515 (version "0.5.0")
1516 (source
1517 (origin
1518 (method url-fetch)
1519 (uri (pypi-uri "poyo" version))
1520 (sha256
1521 (base32
1522 "1pflivs6j22frz0v3dqxnvc8yb8fb52g11lqr88z0i8cg2m5csg2"))))
1523 (build-system python-build-system)
1524 (home-page "https://github.com/hackebrot/poyo")
1525 (synopsis "Lightweight YAML Parser for Python")
1526 (description
1527 "This package provides a lightweight YAML Parser for Python. It supports
1528 only a chosen subset of the YAML format that is required to parse cookiecutter
1529 user configuration files. It does not have support for serializing into YAML
1530 and is not compatible with JSON.")
1531 (license license:expat)))
1532
1533 (define-public scons
1534 (package
1535 (name "scons")
1536 (version "3.0.4")
1537 (source (origin
1538 (method git-fetch)
1539 (uri (git-reference
1540 (url "https://github.com/SCons/scons.git")
1541 (commit version)))
1542 (file-name (git-file-name name version))
1543 (sha256
1544 (base32
1545 "1xy8jrwz87y589ihcld4hv7wn122sjbz914xn8h50ww77wbhk8hn"))))
1546 (build-system python-build-system)
1547 (arguments
1548 `(#:use-setuptools? #f ; still relies on distutils
1549 #:tests? #f ; no 'python setup.py test' command
1550 #:phases
1551 (modify-phases %standard-phases
1552 (add-before 'build 'bootstrap
1553 (lambda _
1554 (substitute* "src/engine/SCons/compat/__init__.py"
1555 (("sys.modules\\[new\\] = imp.load_module\\(old, \\*imp.find_module\\(old\\)\\)")
1556 "sys.modules[new] = __import__(old)"))
1557 (substitute* "src/engine/SCons/Platform/__init__.py"
1558 (("mod = imp.load_module\\(full_name, file, path, desc\\)")
1559 "mod = __import__(full_name)"))
1560 (invoke "python" "bootstrap.py" "build/scons" "DEVELOPER=guix")
1561 (chdir "build/scons")
1562 #t)))))
1563 (home-page "https://scons.org/")
1564 (synopsis "Software construction tool written in Python")
1565 (description
1566 "SCons is a software construction tool. Think of SCons as an improved,
1567 cross-platform substitute for the classic Make utility with integrated
1568 functionality similar to autoconf/automake and compiler caches such as ccache.
1569 In short, SCons is an easier, more reliable and faster way to build
1570 software.")
1571 (license license:x11)))
1572
1573 (define-public scons-python2
1574 (package
1575 (inherit (package-with-python2 scons))
1576 (name "scons-python2")))
1577
1578 (define-public python-extras
1579 (package
1580 (name "python-extras")
1581 (version "1.0.0")
1582 (source
1583 (origin
1584 (method url-fetch)
1585 (uri (pypi-uri "extras" version))
1586 (sha256
1587 (base32
1588 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
1589 (build-system python-build-system)
1590 (arguments
1591 ;; FIXME: Circular dependency on testtools.
1592 '(#:tests? #f))
1593 (home-page "https://github.com/testing-cabal/extras")
1594 (synopsis "Useful extensions to the Python standard library")
1595 (description
1596 "Extras is a set of extensions to the Python standard library.")
1597 (license license:expat)))
1598
1599 (define-public python2-extras
1600 (package-with-python2 python-extras))
1601
1602 (define-public python-mimeparse
1603 (package
1604 (name "python-mimeparse")
1605 (version "1.6.0")
1606 (source
1607 (origin
1608 (method url-fetch)
1609 (uri (pypi-uri "python-mimeparse" version))
1610 (sha256
1611 (base32
1612 "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n"))))
1613 (build-system python-build-system)
1614 (arguments
1615 '(#:phases
1616 (modify-phases %standard-phases
1617 (replace 'check
1618 (lambda _
1619 (invoke "./mimeparse_test.py"))))))
1620 (home-page
1621 "https://github.com/dbtsai/python-mimeparse")
1622 (synopsis "Python library for parsing MIME types")
1623 (description
1624 "Mimeparse provides basic functions for parsing MIME type names and
1625 matching them against a list of media-ranges.")
1626 (license license:expat)))
1627
1628 (define-public python2-mimeparse
1629 (package-with-python2 python-mimeparse))
1630
1631 (define-public python-miniboa
1632 (package
1633 (name "python-miniboa")
1634 (version "1.0.7")
1635 (source
1636 (origin
1637 (method url-fetch)
1638 (uri (pypi-uri "miniboa" version))
1639 (sha256
1640 (base32
1641 "09jh3pn4rh7kh7jayanf8jzy6gp03791b5a193w6148cf3i6k9m3"))))
1642 (build-system python-build-system)
1643 (home-page "https://github.com/shmup/miniboa")
1644 (synopsis "Simple, single-threaded Telnet server")
1645 (description
1646 "Miniboa is a simple, asynchronous, single-threaded, poll-based Telnet
1647 server.")
1648 (license license:asl2.0)))
1649
1650 (define-public python2-miniboa
1651 (package-with-python2 python-miniboa))
1652
1653 (define-public python-pafy
1654 (package
1655 (name "python-pafy")
1656 (version "0.5.3.1")
1657 (source
1658 (origin
1659 (method url-fetch)
1660 (uri (pypi-uri "pafy" version))
1661 (sha256
1662 (base32
1663 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
1664 (build-system python-build-system)
1665 (arguments
1666 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
1667 (propagated-inputs
1668 ;; Youtube-dl is a python package which is imported in the file
1669 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1670 `(("youtube-dl" ,youtube-dl)))
1671 (home-page "https://np1.github.io/pafy/")
1672 (synopsis "Retrieve YouTube content and metadata")
1673 (description
1674 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1675 (license license:lgpl3+)))
1676
1677 (define-public python2-funcsigs
1678 (package
1679 (name "python2-funcsigs")
1680 (version "1.0.2")
1681 (source (origin
1682 (method url-fetch)
1683 (uri (pypi-uri "funcsigs" version))
1684 (sha256
1685 (base32
1686 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
1687 (build-system python-build-system)
1688 (arguments
1689 `(#:python ,python-2))
1690 (native-inputs
1691 `(("python2-unittest2" ,python2-unittest2)))
1692 (home-page "http://funcsigs.readthedocs.org")
1693 (synopsis "Python function signatures from PEP362")
1694 (description
1695 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
1696 (license license:asl2.0)))
1697
1698 (define-public python2-funcsigs-bootstrap
1699 (package
1700 (inherit python2-funcsigs)
1701 (name "python2-funcsigs-bootstrap")
1702 (native-inputs `())
1703 (arguments
1704 `(#:tests? #f
1705 ,@(package-arguments python2-funcsigs)))))
1706
1707 (define-public python-py
1708 (package
1709 (name "python-py")
1710 (version "1.8.0")
1711 (source
1712 (origin
1713 (method url-fetch)
1714 (uri (pypi-uri "py" version))
1715 (sha256
1716 (base32
1717 "0lsy1gajva083pzc7csj1cvbmminb7b4l6a0prdzyb3fd829nqyw"))))
1718 (build-system python-build-system)
1719 (arguments
1720 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1721 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1722 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1723 ;; Is this module globally installed?"
1724 '(#:tests? #f))
1725 (native-inputs
1726 `(("python-setuptools-scm" ,python-setuptools-scm)))
1727 (home-page "https://github.com/pytest-dev/py")
1728 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1729 (description
1730 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1731 code introspection, and logging.")
1732 (license license:expat)))
1733
1734 (define-public python2-py
1735 (package-with-python2 python-py))
1736
1737 ;; Recent versions of python-fixtures and python-testrepository need
1738 ;; python-pbr for packaging, which itself needs these two packages for
1739 ;; testing.
1740 ;; To fix this circular dependency, we use a build of python-pbr, based on the
1741 ;; same source, just without any test dependencies and with tests disabled.
1742 ;; python-pbr-minmal is then used to package python-fixtures and
1743 ;; python-testrepository.
1744 ;; Strictly speaking we currently could remove the test-requirements from the
1745 ;; normal python-pbr package (and save this package) since test are disabled
1746 ;; there anyway. But this may change in future.
1747 (define-public python-pbr-minimal
1748 (package
1749 (name "python-pbr-minimal")
1750 (version "3.0.1")
1751 (source
1752 (origin
1753 (method url-fetch)
1754 (uri (pypi-uri "pbr" version))
1755 (sha256
1756 (base32
1757 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
1758 (build-system python-build-system)
1759 (arguments
1760 `(#:tests? #f))
1761 (home-page "https://docs.openstack.org/pbr/latest/")
1762 (synopsis "Minimal build of python-pbr used for bootstrapping")
1763 (description
1764 "Used only for bootstrapping python2-pbr, you should not need this.")
1765 (license license:asl2.0)))
1766
1767 (define-public python2-pbr-minimal
1768 (package-with-python2 python-pbr-minimal))
1769
1770 (define-public python-pbr
1771 (package
1772 (inherit python-pbr-minimal)
1773 (name "python-pbr")
1774 (arguments
1775 `(#:tests? #f)) ;; Most tests seem to use the Internet.
1776 (propagated-inputs
1777 `(("git" ,git))) ;; pbr actually uses the "git" binary.
1778 (native-inputs
1779 `(("python-fixtures" ,python-fixtures-bootstrap)
1780 ;; discover, coverage, hacking, subunit
1781 ("python-mock" ,python-mock)
1782 ("python-six" ,python-six)
1783 ("python-sphinx" ,python-sphinx)
1784 ("python-testrepository" ,python-testrepository-bootstrap)
1785 ("python-testresources" ,python-testresources-bootstrap)
1786 ("python-testscenarios" ,python-testscenarios-bootstrap)
1787 ("python-testtools" ,python-testtools-bootstrap)
1788 ("python-virtualenv" ,python-virtualenv)))
1789 (synopsis "Enhance the default behavior of Python’s setuptools")
1790 (description
1791 "Python Build Reasonableness (PBR) is a library that injects some useful
1792 and sensible default behaviors into your setuptools run. It will set
1793 versions, process requirements files and generate AUTHORS and ChangeLog file
1794 from git information.
1795 ")))
1796
1797 (define-public python2-pbr
1798 (package-with-python2 python-pbr))
1799
1800 (define-public python-pyrsistent
1801 (package
1802 (name "python-pyrsistent")
1803 (version "0.14.11")
1804 (home-page "https://github.com/tobgu/pyrsistent")
1805 (source (origin
1806 (method url-fetch)
1807 (uri (pypi-uri "pyrsistent" version))
1808 (sha256
1809 (base32
1810 "1qkh74bm296mp5g3r11lgsksr6bh4w1bf8pji4nmxdlfj542ga1w"))))
1811 (build-system python-build-system)
1812 (native-inputs
1813 `(("python-hypothesis" ,python-hypothesis)
1814 ("python-pytest" ,python-pytest)
1815 ("python-pytest-runner" ,python-pytest-runner)))
1816 (propagated-inputs
1817 `(("python-six" ,python-six)))
1818 (synopsis "Persistent data structures for Python")
1819 (description
1820 "Pyrsistent is a number of persistent collections (by some referred to as
1821 functional data structures). Persistent in the sense that they are immutable.
1822
1823 All methods on a data structure that would normally mutate it instead return a
1824 new copy of the structure containing the requested updates. The original
1825 structure is left untouched.")
1826 (license license:expat)))
1827
1828 (define-public python2-pyrsistent
1829 (package-with-python2 python-pyrsistent))
1830
1831 (define-public python-exif-read
1832 (package
1833 (name "python-exif-read")
1834 (version "2.1.2")
1835 (source (origin
1836 (method url-fetch)
1837 (uri (pypi-uri "ExifRead" version))
1838 (sha256
1839 (base32
1840 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
1841 (build-system python-build-system)
1842 (arguments `(#:tests? #f)) ; no tests
1843 (home-page "https://github.com/ianare/exif-py")
1844 (synopsis "Python library to extract EXIF data from image files")
1845 (description
1846 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
1847 files.")
1848 (license license:bsd-3)))
1849
1850 (define-public python2-exif-read
1851 (package-with-python2 python-exif-read))
1852
1853 (define-public python-pyld
1854 (package
1855 (name "python-pyld")
1856 (version "1.0.5")
1857 (source (origin
1858 (method url-fetch)
1859 (uri (pypi-uri "PyLD" version))
1860 (sha256
1861 (base32
1862 "1ywbdbsrkg533qh8xn9ifjh2mvam6v5msrjyqq73jfpvcp89qvff"))))
1863 (build-system python-build-system)
1864 (home-page "https://github.com/digitalbazaar/pyld")
1865 (synopsis "Python implementation of the JSON-LD specification")
1866 (description
1867 "PyLD is an implementation of the JSON-LD specification.")
1868 (license license:bsd-3)))
1869
1870 (define-public python2-pyld
1871 (package-with-python2 python-pyld))
1872
1873 (define-public python-click
1874 (package
1875 (name "python-click")
1876 (version "7.0")
1877 (source
1878 (origin
1879 (method url-fetch)
1880 (uri (pypi-uri "click" version))
1881 (sha256
1882 (base32
1883 "1mzjixd4vjbjvzb6vylki9w1556a9qmdh35kzmq6cign46av952v"))))
1884 (build-system python-build-system)
1885 (arguments
1886 `(#:phases
1887 (modify-phases %standard-phases
1888 (add-after 'unpack 'fix-paths
1889 (lambda* (#:key inputs #:allow-other-keys)
1890 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
1891 "cross-libc" "libc"))))
1892 (substitute* "click/_unicodefun.py"
1893 (("'locale'")
1894 (string-append "'" glibc "/bin/locale'"))))
1895 #t))
1896 (replace 'check
1897 (lambda _
1898 (invoke "python" "-m" "pytest"))))))
1899 (native-inputs
1900 `(("python-pytest" ,python-pytest)))
1901 (home-page "https://palletsprojects.com/p/click/")
1902 (synopsis "Command line library for Python")
1903 (description
1904 "Click is a Python package for creating command line interfaces in a
1905 composable way with as little code as necessary. Its name stands for
1906 \"Command Line Interface Creation Kit\". It's highly configurable but comes
1907 with sensible defaults out of the box.")
1908 (license license:bsd-3)))
1909
1910 (define-public python2-click
1911 (package-with-python2 python-click))
1912
1913 (define-public python-wheel
1914 (package
1915 (name "python-wheel")
1916 (version "0.33.6")
1917 (source
1918 (origin
1919 (method url-fetch)
1920 (uri (pypi-uri "wheel" version))
1921 (sha256
1922 (base32
1923 "0ii6f34rvpjg3nmw4bc2h7fhdsy38y1h93hghncfs5akfrldmj8h"))))
1924 (build-system python-build-system)
1925 (arguments
1926 ;; FIXME: The test suite runs "python setup.py bdist_wheel", which in turn
1927 ;; fails to find the newly-built bdist_wheel library, even though it is
1928 ;; available on PYTHONPATH. What search path is consulted by setup.py?
1929 '(#:tests? #f))
1930 (home-page "https://bitbucket.org/pypa/wheel/")
1931 (synopsis "Format for built Python packages")
1932 (description
1933 "A wheel is a ZIP-format archive with a specially formatted filename and
1934 the @code{.whl} extension. It is designed to contain all the files for a PEP
1935 376 compatible install in a way that is very close to the on-disk format. Many
1936 packages will be properly installed with only the @code{Unpack} step and the
1937 unpacked archive preserves enough information to @code{Spread} (copy data and
1938 scripts to their final locations) at any later time. Wheel files can be
1939 installed with a newer @code{pip} or with wheel's own command line utility.")
1940 (license license:expat)))
1941
1942 (define-public python2-wheel
1943 (package-with-python2 python-wheel))
1944
1945 (define-public python-vcversioner
1946 (package
1947 (name "python-vcversioner")
1948 (version "2.16.0.0")
1949 (source
1950 (origin
1951 (method url-fetch)
1952 (uri (pypi-uri "vcversioner" version))
1953 (sha256
1954 (base32
1955 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
1956 (build-system python-build-system)
1957 (synopsis "Python library for version number discovery")
1958 (description "Vcversioner is a Python library that inspects tagging
1959 information in a variety of version control systems in order to discover
1960 version numbers.")
1961 (home-page "https://github.com/habnabit/vcversioner")
1962 (license license:isc)))
1963
1964 (define-public python2-vcversioner
1965 (package-with-python2 python-vcversioner))
1966
1967 (define-public python-jdcal
1968 (package
1969 (name "python-jdcal")
1970 (version "1.4")
1971 (source
1972 (origin
1973 (method url-fetch)
1974 (uri (pypi-uri "jdcal" version))
1975 (sha256
1976 (base32
1977 "1ja6j2xq97bsl6rv09mhdx7n0xnrsfx0mj5xqza0mxghqmkm02pa"))))
1978 (build-system python-build-system)
1979 (arguments
1980 `(#:phases (modify-phases %standard-phases
1981 (replace 'check
1982 (lambda _
1983 (invoke "pytest"))))))
1984 (native-inputs
1985 `(("python-pytest" ,python-pytest)))
1986 (home-page "https://github.com/phn/jdcal")
1987 (synopsis "Functions to convert between Julian dates Gregorian dates")
1988 (description "This Python library provides functions for converting
1989 between Julian dates and Gregorian dates.")
1990 (license license:bsd-2)))
1991
1992 (define-public python2-jdcal
1993 (package-with-python2 python-jdcal))
1994
1995 (define-public python-jsondiff
1996 (package
1997 (name "python-jsondiff")
1998 (version "1.2.0")
1999 (source
2000 (origin
2001 (method url-fetch)
2002 (uri (pypi-uri "jsondiff" version))
2003 (sha256
2004 (base32
2005 "00v3689175aqzdscrxpffm712ylp8jvcpqdg51ca22ni6721p51l"))))
2006 (build-system python-build-system)
2007 (native-inputs
2008 `(("python-nose" ,python-nose)
2009 ("python-nose-random" ,python-nose-random)))
2010 (home-page
2011 "https://github.com/fzumstein/jsondiff")
2012 (synopsis "Compare JSON and JSON-like structures in Python")
2013 (description "@code{jsondiff} is a Python library which lets you
2014 compare, diff, and patch JSON and JSON-like structures in Python.")
2015 (license license:expat)))
2016
2017 (define-public python-jsonschema
2018 (package
2019 (name "python-jsonschema")
2020 (version "3.0.1")
2021 (source (origin
2022 (method url-fetch)
2023 (uri (pypi-uri "jsonschema" version))
2024 (sha256
2025 (base32
2026 "03g20i1xfg4qdlk4475pl4pp7y0h37g1fbgs5qhy678q9xb822hc"))))
2027 (build-system python-build-system)
2028 (arguments
2029 '(#:phases
2030 (modify-phases %standard-phases
2031 (replace 'check
2032 (lambda _
2033 (setenv "PYTHONPATH" (string-append ".:" (getenv "PYTHONPATH")))
2034 (invoke "trial" "jsonschema"))))))
2035 (native-inputs
2036 `(("python-setuptools_scm" ,python-setuptools-scm)
2037 ("python-twisted" ,python-twisted)))
2038 (propagated-inputs
2039 `(("python-attrs" ,python-attrs)
2040 ("python-pyrsistent" ,python-pyrsistent)
2041 ("python-six" ,python-six)))
2042 (home-page "https://github.com/Julian/jsonschema")
2043 (synopsis "Implementation of JSON Schema for Python")
2044 (description
2045 "Jsonschema is an implementation of JSON Schema for Python.")
2046 (license license:expat)
2047 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2048
2049 (define-public python2-jsonschema
2050 (let ((jsonschema (package-with-python2
2051 (strip-python2-variant python-jsonschema))))
2052 (package (inherit jsonschema)
2053 (propagated-inputs
2054 `(("python2-functools32" ,python2-functools32)
2055 ,@(package-propagated-inputs jsonschema))))))
2056
2057 ;; This old version is still required by docker-compose as of 1.24.0.
2058 (define-public python-jsonschema-2.6
2059 (package
2060 (name "python-jsonschema")
2061 (version "2.6.0")
2062 (source (origin
2063 (method url-fetch)
2064 (uri (pypi-uri "jsonschema" version))
2065 (sha256
2066 (base32
2067 "00kf3zmpp9ya4sydffpifn0j0mzm342a2vzh82p6r0vh10cg7xbg"))))
2068 (build-system python-build-system)
2069 (arguments
2070 '(#:phases
2071 (modify-phases %standard-phases
2072 (replace 'check (lambda _ (invoke "nosetests"))))))
2073 (native-inputs
2074 `(("python-nose" ,python-nose)
2075 ("python-vcversioner" ,python-vcversioner)))
2076 (home-page "https://github.com/Julian/jsonschema")
2077 (synopsis "Implementation of JSON Schema for Python")
2078 (description
2079 "Jsonschema is an implementation of JSON Schema for Python.")
2080 (license license:expat)
2081 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2082
2083 (define-public python-schema
2084 (package
2085 (name "python-schema")
2086 (version "0.6.6")
2087 (source
2088 (origin
2089 (method url-fetch)
2090 (uri (pypi-uri "schema" version))
2091 (sha256
2092 (base32
2093 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
2094 (build-system python-build-system)
2095 (native-inputs
2096 `(("python-pytest" ,python-pytest)))
2097 (home-page "https://github.com/keleshev/schema")
2098 (synopsis "Simple data validation library")
2099 (description
2100 "@code{python-schema} is a library for validating Python data
2101 structures, such as those obtained from config-files, forms, external
2102 services or command-line parsing, converted from JSON/YAML (or
2103 something else) to Python data-types.")
2104 (license license:psfl)))
2105
2106 (define-public python2-schema
2107 (package-with-python2 python-schema))
2108
2109 (define-public python-schema-0.5
2110 (package (inherit python-schema)
2111 (version "0.5.0")
2112 (source
2113 (origin
2114 (method url-fetch)
2115 (uri (pypi-uri "schema" version))
2116 (sha256
2117 (base32
2118 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
2119
2120 (define-public python2-schema-0.5
2121 (package-with-python2 python-schema-0.5))
2122
2123 (define-public python-kitchen
2124 (package
2125 (name "python-kitchen")
2126 (version "1.2.5")
2127 (source
2128 (origin
2129 (method url-fetch)
2130 (uri (pypi-uri "kitchen" version))
2131 (sha256
2132 (base32
2133 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
2134 (build-system python-build-system)
2135 (propagated-inputs
2136 `(("python-chardet" ,python-chardet)))
2137 (home-page "https://github.com/fedora-infra/kitchen")
2138 (synopsis "Python API for snippets")
2139 (description "@code{kitchen} module provides a python API for all sorts of
2140 little useful snippets of code that everybody ends up writing for their projects
2141 but never seem big enough to build an independent release. Use kitchen and stop
2142 cutting and pasting that code over and over.")
2143 (license (list license:lgpl2.1+
2144 ;; subprocess.py, test_subprocess.py,
2145 ;; kitchen/pycompat25/defaultdict.py:
2146 license:psfl))))
2147
2148 (define-public python2-kitchen
2149 (package-with-python2 python-kitchen))
2150
2151 (define-public python-unidecode
2152 (package
2153 (name "python-unidecode")
2154 (version "1.1.1")
2155 (source (origin
2156 (method url-fetch)
2157 (uri (pypi-uri "Unidecode" version))
2158 (sha256
2159 (base32
2160 "1s6cp2lv4m0f00hjckjz8p6m7d3n3v16jvg353llf5ia1iqsnsib"))))
2161 (build-system python-build-system)
2162 (home-page "https://pypi.org/project/Unidecode/")
2163 (synopsis "ASCII transliterations of Unicode text")
2164 (description
2165 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2166 useful when integrating with legacy code that doesn't support Unicode, or for
2167 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2168 machine identifiers from human-readable Unicode strings that should still be
2169 somewhat intelligible.")
2170 (license license:gpl2+)))
2171
2172 (define-public python2-unidecode
2173 (package-with-python2 python-unidecode))
2174
2175 (define-public python-pyjwt
2176 (package
2177 (name "python-pyjwt")
2178 (version "1.7.1")
2179 (source
2180 (origin
2181 (method url-fetch)
2182 (uri (pypi-uri "PyJWT" version))
2183 (sha256
2184 (base32
2185 "15hflax5qkw1v6nssk1r0wkj83jgghskcmn875m3wgvpzdvajncd"))
2186 (modules '((guix build utils)))
2187 (snippet
2188 '(begin
2189 (for-each delete-file-recursively
2190 (find-files "." "\\.pyc$"))
2191 #t))))
2192 (build-system python-build-system)
2193 (native-inputs
2194 `(("python-pytest" ,python-pytest)
2195 ("python-pytest-cov" ,python-pytest-cov)
2196 ("python-pytest-runner" ,python-pytest-runner)))
2197 (home-page "https://github.com/progrium/pyjwt")
2198 (synopsis "JSON Web Token implementation in Python")
2199 (description
2200 "PyJWT is a JSON Web Token implementation written in Python.")
2201 (license license:expat)))
2202
2203 (define-public python2-pyjwt
2204 (package-with-python2 python-pyjwt))
2205
2206 (define-public python-pykka
2207 (package
2208 (name "python-pykka")
2209 (version "1.2.1")
2210 (source
2211 (origin
2212 (method url-fetch)
2213 (uri (pypi-uri "Pykka" version))
2214 (sha256
2215 (base32
2216 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
2217 (build-system python-build-system)
2218 (native-inputs
2219 `(("python-mock" ,python-mock)
2220 ("python-nose" ,python-nose)
2221 ("python-gevent" ,python-gevent)
2222 ("python-eventlet" ,python-eventlet)))
2223 (home-page "https://www.pykka.org/")
2224 (synopsis "Pykka is a Python implementation of the actor model")
2225 (description
2226 "Pykka is a Python implementation of the actor model.
2227 The actor model introduces some simple rules to control the sharing
2228 of state and cooperation between execution units, which makes it
2229 easier to build concurrent applications.")
2230 (license license:asl2.0)))
2231
2232 (define-public python2-pykka
2233 (package-with-python2 python-pykka))
2234
2235 (define-public python-pymsgbox
2236 (package
2237 (name "python-pymsgbox")
2238 (version "1.0.6")
2239 (source
2240 (origin
2241 (method git-fetch)
2242 (uri (git-reference
2243 ;; LICENSE.txt is not present on pypi
2244 (url "https://github.com/asweigart/PyMsgBox")
2245 (commit "55926b55f46caa969c5ddb87990ebea2737bd66f")))
2246 (file-name (git-file-name name version))
2247 (sha256
2248 (base32
2249 "0zy7rjfpwlrd8b64j7jk2lb8m2npc21rnpwakpfvwgl4nxdy80rg"))))
2250 (arguments
2251 ;; Circular dependency to run tests:
2252 ;; Tests need pyautogui, which depends on pymsgbox.
2253 '(#:tests? #f))
2254 (build-system python-build-system)
2255 (home-page "https://github.com/asweigart/PyMsgBox")
2256 (synopsis "Python module for JavaScript-like message boxes")
2257 (description
2258 "PyMsgBox is a simple, cross-platform, pure Python module for
2259 JavaScript-like message boxes. Types of dialog boxes include:
2260 @enumerate
2261 @item alert
2262 @item confirm
2263 @item prompt
2264 @item password
2265 @end enumerate
2266 ")
2267 (license license:bsd-3)))
2268
2269 (define-public python-pympler
2270 (package
2271 (name "python-pympler")
2272 (home-page "https://pythonhosted.org/Pympler/")
2273 (version "0.8")
2274 (source (origin
2275 (method url-fetch)
2276 (uri (pypi-uri "Pympler" version))
2277 (sha256
2278 (base32
2279 "08mrpnb6cv2nvfncvr8a9a8bpwhnasa924anapnjvnaw5jcd4k7p"))))
2280 (build-system python-build-system)
2281 (arguments
2282 `(#:phases (modify-phases %standard-phases
2283 (delete 'check)
2284 (add-after 'install 'check
2285 (lambda* (#:key inputs outputs #:allow-other-keys)
2286 (add-installed-pythonpath inputs outputs)
2287 (invoke "python" "setup.py" "test"))))))
2288 (synopsis "Measure, monitor and analyze memory behavior")
2289 (description
2290 "Pympler is a development tool to measure, monitor and analyze
2291 the memory behavior of Python objects in a running Python application.
2292
2293 By pympling a Python application, detailed insight in the size and the
2294 lifetime of Python objects can be obtained. Undesirable or unexpected
2295 runtime behavior like memory bloat and other @samp{pymples} can easily
2296 be identified.
2297
2298 A web profiling frontend exposes process statistics, garbage
2299 visualisation and class tracker statistics.")
2300 (license license:asl2.0)))
2301
2302 (define-public python2-pympler
2303 (package-with-python2 python-pympler))
2304
2305 (define-public python-itsdangerous
2306 (package
2307 (name "python-itsdangerous")
2308 (version "1.1.0")
2309 (source
2310 (origin
2311 (method url-fetch)
2312 (uri (pypi-uri "itsdangerous" version))
2313 (sha256
2314 (base32
2315 "068zpbksq5q2z4dckh2k1zbcq43ay74ylqn77rni797j0wyh66rj"))))
2316 (build-system python-build-system)
2317 (home-page "https://palletsprojects.com/p/itsdangerous/")
2318 (synopsis "Python library for passing data to/from untrusted environments")
2319 (description
2320 "Itsdangerous provides various helpers to pass trusted data to untrusted
2321 environments and back.")
2322 (license license:bsd-3)))
2323
2324 (define-public python2-itsdangerous
2325 (package-with-python2 python-itsdangerous))
2326
2327 (define-public python-pyyaml
2328 (package
2329 (name "python-pyyaml")
2330 (version "5.3")
2331 (source
2332 (origin
2333 (method url-fetch)
2334 (uri (pypi-uri "PyYAML" version))
2335 (sha256
2336 (base32
2337 "058nd4p8f25wwzy2aiwh18wcrdm6663cqbfdkgjp8y9cp7ampx79"))))
2338 (build-system python-build-system)
2339 (inputs
2340 `(("libyaml" ,libyaml)))
2341 (home-page "https://pyyaml.org")
2342 (synopsis "YAML parser and emitter for Python")
2343 (description
2344 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2345 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2346 API, and sensible error messages. PyYAML supports standard YAML tags and
2347 provides Python-specific tags that allow to represent an arbitrary Python
2348 object.")
2349 (license license:expat)))
2350
2351 (define-public python2-pyyaml
2352 (package-with-python2 python-pyyaml))
2353
2354 (define-public python-vine
2355 (package
2356 (name "python-vine")
2357 (version "1.1.4")
2358 (source
2359 (origin
2360 (method url-fetch)
2361 (uri (pypi-uri "vine" version))
2362 (sha256
2363 (base32
2364 "0wkskb2hb494v9gixqnf4bl972p4ibcmxdykzpwjlfa5picns4aj"))))
2365 (build-system python-build-system)
2366 (native-inputs
2367 `(("python-pytest" ,python-pytest)
2368 ("python-case" ,python-case)))
2369 (home-page "https://github.com/celery/vine")
2370 (synopsis "Promises for Python")
2371 (description
2372 "@code{vine} provides a special implementation of promises in that it can
2373 be used both for \"promise of a value\" and lazy evaluation. The biggest
2374 upside for this is that everything in a promise can also be a promise,
2375 e.g. filters, callbacks and errbacks can all be promises.")
2376 (license license:bsd-3)))
2377
2378 (define-public python-virtualenv
2379 (package
2380 (name "python-virtualenv")
2381 (version "16.1.0")
2382 (source
2383 (origin
2384 (method url-fetch)
2385 (uri (pypi-uri "virtualenv" version))
2386 (sha256
2387 (base32
2388 "0242cg3hdq3qdvx5flyrki8lpwlgwf5k45c21ks5049fv7ygm6gq"))))
2389 (build-system python-build-system)
2390 (arguments
2391 `(#:phases
2392 (modify-phases %standard-phases
2393 (add-before 'check 'disable-failing-test
2394 (lambda _
2395 ;; Disable failing test. See upstream bug report
2396 ;; https://github.com/pypa/virtualenv/issues/957
2397 (substitute* "tests/test_virtualenv.py"
2398 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2399 #t)))))
2400 (native-inputs
2401 `(("python-mock" ,python-mock)
2402 ("python-pytest" ,python-pytest)))
2403 (home-page "https://virtualenv.pypa.io/")
2404 (synopsis "Virtual Python environment builder")
2405 (description
2406 "Virtualenv is a tool to create isolated Python environments.")
2407 (license license:expat)))
2408
2409 (define-public python2-virtualenv
2410 (package-with-python2 python-virtualenv))
2411
2412 (define-public python-markupsafe
2413 (package
2414 (name "python-markupsafe")
2415 (version "1.1.1")
2416 (source
2417 (origin
2418 (method url-fetch)
2419 (uri (pypi-uri "MarkupSafe" version))
2420 (sha256
2421 (base32
2422 "0sqipg4fk7xbixqd8kq6rlkxj664d157bdwbh93farcphf92x1r9"))))
2423 (build-system python-build-system)
2424 (arguments
2425 `(#:modules ((ice-9 ftw)
2426 (srfi srfi-1)
2427 (srfi srfi-26)
2428 (guix build utils)
2429 (guix build python-build-system))
2430 #:phases (modify-phases %standard-phases
2431 (replace 'check
2432 (lambda _
2433 (let ((cwd (getcwd))
2434 (libdir (find (cut string-prefix? "lib." <>)
2435 (scandir "build"))))
2436 (setenv "PYTHONPATH"
2437 (string-append cwd "/build/" libdir ":"
2438 (getenv "PYTHONPATH")))
2439 (invoke "pytest" "-vv")))))))
2440 (native-inputs
2441 `(("python-pytest" ,python-pytest)))
2442 (home-page "https://github.com/mitsuhiko/markupsafe")
2443 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2444 (description
2445 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2446 for Python.")
2447 (license license:bsd-3)))
2448
2449 (define-public python2-markupsafe
2450 (package-with-python2 python-markupsafe))
2451
2452 (define-public python-jinja2
2453 (package
2454 (name "python-jinja2")
2455 (version "2.10.1")
2456 (source
2457 (origin
2458 (method url-fetch)
2459 (uri (pypi-uri "Jinja2" version))
2460 (sha256
2461 (base32
2462 "04shqrs56aj04ipyqykj512rw2l0zfammvj9krawzxz7xc14yp06"))))
2463 (build-system python-build-system)
2464 (propagated-inputs
2465 `(("python-markupsafe" ,python-markupsafe)))
2466 (home-page "http://jinja.pocoo.org/")
2467 (synopsis "Python template engine")
2468 (description
2469 "Jinja2 is a small but fast and easy to use stand-alone template engine
2470 written in pure Python.")
2471 (license license:bsd-3)))
2472
2473 (define-public python2-jinja2
2474 (package-with-python2 python-jinja2))
2475
2476 (define-public python-jinja2-time
2477 (package
2478 (name "python-jinja2-time")
2479 (version "0.2.0")
2480 (source
2481 (origin
2482 (method url-fetch)
2483 (uri (pypi-uri "jinja2-time" version))
2484 (sha256
2485 (base32
2486 "0h0dr7cfpjnjj8bgl2vk9063a53649pn37wnlkd8hxjy656slkni"))))
2487 (build-system python-build-system)
2488 (propagated-inputs
2489 `(("python-arrow" ,python-arrow)
2490 ("python-jinja2" ,python-jinja2)))
2491 (home-page
2492 "https://github.com/hackebrot/jinja2-time")
2493 (synopsis "Jinja2 Extension for Dates and Times")
2494 (description
2495 "This package provides an extension for the template engine Jinja2. It
2496 adds a 'now' tag providing a convenient access to the arrow.now() API from
2497 templates. A format string can be provided to control the output.")
2498 (license license:expat)))
2499
2500 (define-public python-pystache
2501 (package
2502 (name "python-pystache")
2503 (version "0.5.4")
2504 (source (origin
2505 (method url-fetch)
2506 (uri (pypi-uri "pystache" version))
2507 (sha256
2508 (base32
2509 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2510 (build-system python-build-system)
2511 (arguments
2512 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
2513 (home-page "http://defunkt.io/pystache/")
2514 (synopsis "Python logic-less template engine")
2515 (description
2516 "Pystache is a Python implementation of the framework agnostic,
2517 logic-free templating system Mustache.")
2518 (license license:expat)
2519 (properties `((python2-variant . ,(delay python2-pystache))))))
2520
2521 (define-public python2-pystache
2522 (package (inherit (package-with-python2
2523 (strip-python2-variant python-pystache)))
2524 (arguments
2525 `(#:python ,python-2
2526 #:phases
2527 (modify-phases %standard-phases
2528 (replace 'check
2529 (lambda _
2530 (invoke "python" "test_pystache.py"))))))))
2531
2532 (define-public python-joblib
2533 (package
2534 (name "python-joblib")
2535 (version "0.13.0")
2536 (source (origin
2537 (method url-fetch)
2538 (uri (pypi-uri "joblib" version))
2539 (sha256
2540 (base32
2541 "0612nazad8dxmn3xghfrmjax6456l4xy6hn9cngs7vydi14ds7v5"))))
2542 (build-system python-build-system)
2543 (arguments
2544 `(#:phases
2545 (modify-phases %standard-phases
2546 (replace 'check
2547 (lambda _ (invoke "pytest" "-v" "joblib"))))))
2548 (native-inputs
2549 `(("python-pytest" ,python-pytest)))
2550 (home-page "https://joblib.readthedocs.io/")
2551 (synopsis "Using Python functions as pipeline jobs")
2552 (description
2553 "Joblib is a set of tools to provide lightweight pipelining in Python.
2554 In particular, joblib offers: transparent disk-caching of the output values
2555 and lazy re-evaluation (memoize pattern), easy simple parallel computing
2556 logging and tracing of the execution.")
2557 (license license:bsd-3)))
2558
2559 (define-public python2-joblib
2560 (package-with-python2 python-joblib))
2561
2562 (define-public python-daemon
2563 (package
2564 (name "python-daemon")
2565 (version "2.2.3")
2566 (source
2567 (origin
2568 (method url-fetch)
2569 (uri (pypi-uri "python-daemon" version))
2570 (sha256
2571 (base32
2572 "09fcjdjzk9ywmpnrj62iyxqgcygzdafsz41qlrk2dknzbagcmzmg"))))
2573 (build-system python-build-system)
2574 (arguments
2575 `(#:phases
2576 (modify-phases %standard-phases
2577 (add-before 'check 'disable-tests
2578 (lambda _
2579 ;; FIXME: Determine why test fails
2580 (substitute* "test/test_daemon.py"
2581 (("test_detaches_process_context")
2582 "skip_test_detaches_process_context"))
2583 #t)))))
2584 (propagated-inputs
2585 `(("python-lockfile" ,python-lockfile)))
2586 (native-inputs
2587 `(("python-unittest2" ,python-unittest2)
2588 ("python-testtools" ,python-testtools)
2589 ("python-testscenarios" ,python-testscenarios)
2590 ("python-mock" ,python-mock)
2591 ("python-docutils" ,python-docutils)))
2592 (home-page "https://pagure.io/python-daemon/")
2593 (synopsis "Python library for making a Unix daemon process")
2594 (description "Python-daemon is a library that assists a Python program to
2595 turn itself into a well-behaved Unix daemon process, as specified in PEP 3143.
2596
2597 This library provides a @code{DaemonContext} class that manages the following
2598 important tasks for becoming a daemon process:
2599 @enumerate
2600 @item Detach the process into its own process group.
2601 @item Set process environment appropriate for running inside a chroot.
2602 @item Renounce suid and sgid privileges.
2603 @item Close all open file descriptors.
2604 @item Change the working directory, uid, gid, and umask.
2605 @item Set appropriate signal handlers.
2606 @item Open new file descriptors for stdin, stdout, and stderr.
2607 @item Manage a specified PID lock file.
2608 @item Register cleanup functions for at-exit processing.
2609 @end enumerate")
2610 ;; Only setup.py is gpl3+, everything else is apache 2.0 licensed.
2611 (license (list license:asl2.0 license:gpl3+))))
2612
2613 (define-public python-anytree
2614 (package
2615 (name "python-anytree")
2616 (version "2.8.0")
2617 (source (origin
2618 (method url-fetch)
2619 (uri (pypi-uri "anytree" version))
2620 (sha256
2621 (base32
2622 "1aycpc387wqz7h9w2p53qxn43qsh3m6by6ak4kkc66x9aprr63rz"))))
2623 (build-system python-build-system)
2624 (propagated-inputs
2625 `(("python-six" ,python-six)))
2626 (native-inputs
2627 `(;; For tests.
2628 ("graphviz" ,graphviz) ;for 'dot'
2629 ("python-nose" ,python-nose)))
2630 (home-page "https://github.com/c0fec0de/anytree")
2631 (synopsis "Lightweight tree data library")
2632 (description
2633 "@code{anytree} is a simple, lightweight, and extensible tree data
2634 structure for Python.")
2635 (license license:asl2.0)))
2636
2637 (define-public python-docutils
2638 (package
2639 (name "python-docutils")
2640 (version "0.14")
2641 (source
2642 (origin
2643 (method url-fetch)
2644 (uri (pypi-uri "docutils" version))
2645 (sha256
2646 (base32
2647 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))
2648 (build-system python-build-system)
2649 (arguments
2650 '(#:tests? #f)) ; no setup.py test command
2651 (home-page "http://docutils.sourceforge.net/")
2652 (synopsis "Python Documentation Utilities")
2653 (description
2654 "Docutils is a modular system for processing documentation into useful
2655 formats, such as HTML, XML, and LaTeX. For input Docutils supports
2656 reStructuredText.")
2657 ;; Most of the source code is public domain, but some source files are
2658 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
2659 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
2660
2661 (define-public python2-docutils
2662 (package-with-python2 python-docutils))
2663
2664 (define-public python-pygments
2665 (package
2666 (name "python-pygments")
2667 (version "2.5.2")
2668 (source
2669 (origin
2670 (method url-fetch)
2671 (uri (pypi-uri "Pygments" version))
2672 (sha256
2673 (base32
2674 "1zmhnswy0wxfn0xprs9aqsvx2c3kmzfn2wx14q8cv3vpkxdamj4q"))))
2675 (build-system python-build-system)
2676 (arguments
2677 ;; FIXME: Tests require sphinx, which depends on this.
2678 '(#:tests? #f))
2679 (home-page "https://pygments.org/")
2680 (synopsis "Syntax highlighting")
2681 (description
2682 "Pygments is a syntax highlighting package written in Python.")
2683 (license license:bsd-2)))
2684
2685 (define-public python2-pygments
2686 (package-with-python2 python-pygments))
2687
2688 (define-public python-bumpversion
2689 (package
2690 (name "python-bumpversion")
2691 (version "0.5.3")
2692 (source
2693 (origin
2694 (method url-fetch)
2695 (uri (pypi-uri "bumpversion" version))
2696 (sha256
2697 (base32
2698 "0zn7694yfipxg35ikkfh7kvgl2fissha3dnqad2c5bvsvmrwhi37"))))
2699 (build-system python-build-system)
2700 (home-page "https://github.com/peritus/bumpversion")
2701 (synopsis "Tool to bump software version")
2702 (description "This tool provides a command-line interface (CLI) to bump a
2703 software version simply.")
2704 (license license:expat)))
2705
2706 (define-public python-deprecated
2707 (package
2708 (name "python-deprecated")
2709 (version "1.2.5")
2710 (source
2711 (origin
2712 (method git-fetch)
2713 (uri (git-reference
2714 (url "https://github.com/tantale/deprecated.git")
2715 (commit (string-append "v" version))))
2716 (file-name (git-file-name name version))
2717 (sha256
2718 (base32
2719 "14909glxxwwc4b9qpz2b9jdriwzi5n65ichw85xqppap5f79wcwz"))))
2720 (build-system python-build-system)
2721 (arguments
2722 `(#:phases (modify-phases %standard-phases
2723 (replace 'check
2724 (lambda _
2725 (invoke "pytest"))))))
2726 (propagated-inputs
2727 `(("python-wrapt" ,python-wrapt)))
2728 (native-inputs
2729 `(("python-bumpversion" ,python-bumpversion)
2730 ("python-pytest" ,python-pytest)
2731 ("python-pytest-cov" ,python-pytest-cov)
2732 ("python-sphinx" ,python-sphinx)
2733 ("python-tox" ,python-tox)))
2734 (home-page "https://github.com/tantale/deprecated")
2735 (synopsis "Python decorator to deprecate classes, functions or methods")
2736 (description "The @code{deprecated} decorator provides a convenient way to deprecate
2737 to deprecate classes, functions or methods.")
2738 (license license:expat)))
2739
2740 (define-public python-pygithub
2741 (package
2742 (name "python-pygithub")
2743 (version "1.43.8")
2744 (source
2745 ;; We fetch from the Git repo because there are no tests in the PyPI
2746 ;; archive.
2747 (origin
2748 (method git-fetch)
2749 (uri (git-reference
2750 (url "https://github.com/PyGithub/PyGithub.git")
2751 (commit (string-append "v" version))))
2752 (file-name (git-file-name name version))
2753 (sha256
2754 (base32 "1625v558xga5mwhl9jqmibywy5qafmg1vqrirqz6zfq1la1d22mw"))))
2755 (build-system python-build-system)
2756 (arguments
2757 `(#:phases (modify-phases %standard-phases
2758 ;; Some tests rely on the network.
2759 (add-after 'unpack 'disable-failing-tests
2760 (lambda _
2761 (substitute* "tests/Issue142.py"
2762 (("testDecodeJson") "disabled_testDecodeJson"))
2763 #t))
2764 (add-before 'check 'prepare-for-tests
2765 (lambda _
2766 (for-each (lambda (f)
2767 (chmod f #o666))
2768 (find-files "./tests"))
2769 (system* "python" "-m" "lib2to3" "-w" "-n" "tests")
2770 (setenv "PYTHONPATH"
2771 (string-append "./tests:" (getenv "PYTHONPATH")))
2772 #t)))))
2773 (propagated-inputs
2774 `(("python-deprecated" ,python-deprecated)
2775 ("python-pyjwt" ,python-pyjwt)
2776 ("python-requests" ,python-requests)))
2777 (native-inputs `(("python-httpretty" ,python-httpretty)))
2778 (home-page "https://pygithub.readthedocs.io/en/latest/")
2779 (synopsis "Python library for the GitHub API")
2780 (description "This library allows managing GitHub resources such as
2781 repositories, user profiles, and organizations in your Python applications,
2782 using version 3 of the GitHub application programming interface (API).")
2783 (license license:lgpl3+)))
2784
2785 (define-public python-rellu
2786 (package
2787 (name "python-rellu")
2788 (version "0.7")
2789 (source
2790 (origin
2791 (method url-fetch)
2792 (uri (pypi-uri "rellu" version))
2793 (sha256
2794 (base32
2795 "1w0arpj1sm7vh29nrbnca4pnp8sx42l07r17inwqcjjf9bhng66x"))))
2796 (build-system python-build-system)
2797 (propagated-inputs
2798 `(("python-invoke" ,python-invoke)
2799 ("python-pygithub" ,python-pygithub)))
2800 (home-page "https://github.com/robotframework/rellu")
2801 (synopsis "Utilities to create PyPI releases")
2802 (description "This collection of utilities contains tooling and templates
2803 to assist in creating releases on GitHub and publishing them on PyPI. It is
2804 designed to be used by Robot Framework and tools and libraries in its
2805 ecosystem, but can naturally be used also by other projects.")
2806 (license license:asl2.0)))
2807
2808 (define-public python-robotframework
2809 (package
2810 (name "python-robotframework")
2811 (version "3.1.2")
2812 ;; There are no tests in the PyPI archive.
2813 (source
2814 (origin
2815 (method git-fetch)
2816 (uri (git-reference
2817 (url "https://github.com/robotframework/robotframework.git")
2818 (commit (string-append "v" version))))
2819 (file-name (git-file-name name version))
2820 (sha256
2821 (base32 "16gnxy0qinh8fhs0qvhff5z2xh49c3cqgm0d7bfjw120df6x7fym"))
2822 (patches (search-patches
2823 "python-robotframework-honor-source-date-epoch.patch"))))
2824 (build-system python-build-system)
2825 (arguments
2826 `(#:phases (modify-phases %standard-phases
2827 (add-before 'build 'build-and-install-doc
2828 (lambda* (#:key outputs #:allow-other-keys)
2829 (let* ((doc-output (assoc-ref outputs "doc"))
2830 (doc (string-append doc-output "/share/"
2831 ,name "-" ,version "/")))
2832 (invoke "invoke" "library-docs" "all")
2833 (mkdir-p doc)
2834 (copy-recursively "doc/libraries"
2835 (string-append doc "/libraries"))
2836 #t)))
2837 (replace 'check
2838 (lambda _
2839 (invoke "python" "utest/run.py"))))))
2840 (native-inputs
2841 `(("python-invoke" ,python-invoke)
2842 ("python-rellu" ,python-rellu)
2843 ("python:tk" ,python "tk"))) ;used when building the HTML doc
2844 (outputs '("out" "doc"))
2845 (home-page "https://robotframework.org")
2846 (synopsis "Generic automation framework")
2847 (description "Robot Framework is a generic automation framework for
2848 acceptance testing, acceptance test driven development (ATDD), and robotic
2849 process automation (RPA).")
2850 (license license:asl2.0)))
2851
2852 (define-public python-robotframework-lint
2853 ;; There is no properly tagged release; the commit below seems to correspond
2854 ;; to the 0.9 stable release available from PyPI. The tests are not
2855 ;; included in the PyPI archive, so we fetch the sources from the upstream
2856 ;; Git repo.
2857 (let ((commit "e851879bab1f63e4e53b34a4dc8a67ed95102830")
2858 (revision "1"))
2859 (package
2860 (name "python-robotframework-lint")
2861 (version (git-version "0.9.0" revision commit))
2862 (source
2863 (origin
2864 (method git-fetch)
2865 (uri (git-reference
2866 (url "https://github.com/boakley/robotframework-lint.git")
2867 (commit commit)))
2868 (file-name (git-file-name name version))
2869 (sha256
2870 (base32
2871 "1p6fknqg5sb9qz5857ji4a877657vgfjm5v3zn45994parx6ml1m"))))
2872 (build-system python-build-system)
2873 (arguments
2874 `(#:phases
2875 (modify-phases %standard-phases
2876 (replace 'check
2877 (lambda _
2878 (invoke "python" "-m" "robot" "-A"
2879 "tests/conf/default.args" "tests"))))))
2880 (propagated-inputs
2881 `(("python-robotframework" ,python-robotframework)))
2882 (home-page "https://github.com/boakley/robotframework-lint/")
2883 (synopsis "Static analysis tool (linter) for Robot Framework")
2884 (description "This package provides the @code{rflint} command-line
2885 utility, a static analysis tool (linter) for Robot Framework source files.")
2886 (license license:asl2.0))))
2887
2888 (define-public python-robotframework-sshlibrary
2889 (package
2890 (name "python-robotframework-sshlibrary")
2891 (version "3.3.0")
2892 ;; There are no tests in the PyPI archive.
2893 (source
2894 (origin
2895 (method git-fetch)
2896 (uri (git-reference
2897 (url "https://github.com/robotframework/SSHLibrary.git")
2898 (commit (string-append "v" version))))
2899 (file-name (git-file-name name version))
2900 (sha256
2901 (base32
2902 "1mk6dz2jqqndbx4yji09012q6rmadnqdywi7czvj62b0s07dr3r2"))))
2903 (build-system python-build-system)
2904 (arguments
2905 `(#:phases
2906 (modify-phases %standard-phases
2907 (add-before 'build 'build-and-install-doc
2908 (lambda* (#:key outputs #:allow-other-keys)
2909 (let* ((doc-output (assoc-ref outputs "doc"))
2910 (doc (string-append doc-output "/share/"
2911 ,name "-" ,version "/")))
2912 (invoke "chmod" "-R" "+w" "docs")
2913 (invoke "invoke" "kw-docs" "project-docs")
2914 (mkdir-p doc)
2915 (for-each delete-file (find-files "docs" "\\.rst"))
2916 (copy-recursively "docs" doc)
2917 #t)))
2918 (replace 'check
2919 (lambda _
2920 ;; Some tests require an SSH server; we remove them.
2921 (delete-file "utest/test_client_api.py")
2922 (delete-file "utest/test_scp.py")
2923 (invoke "python" "utest/run.py"))))))
2924 (propagated-inputs
2925 `(("python-robotframework" ,python-robotframework)
2926 ("python-paramiko" ,python-paramiko)
2927 ("python-scp" ,python-scp)))
2928 (native-inputs
2929 `(("openssh" ,openssh)
2930 ("which" ,which)
2931 ;; To generate the documentation
2932 ("python-docutils" ,python-docutils)
2933 ("python-invoke" ,python-invoke)
2934 ("python-pygments" ,python-pygments)
2935 ("python-rellu" ,python-rellu)))
2936 (outputs '("out" "doc"))
2937 (home-page "https://github.com/robotframework/SSHLibrary")
2938 (synopsis "Robot Framework library for SSH and SFTP")
2939 (description "SSHLibrary is a Robot Framework library providing support
2940 for SSH and SFTP. It has the following main usages:
2941 @itemize @bullet
2942 @item Executing commands on the remote machine, either blocking or non-blocking.
2943 @item Writing and reading in an interactive shell.
2944 @item Transferring files and directories over SFTP.
2945 @item Ensuring that files and directories exist on the remote machine.
2946 @end itemize")
2947 (license license:asl2.0)))
2948
2949 (define-public python-rstr
2950 (package
2951 (name "python-rstr")
2952 (version "2.2.6")
2953 (source
2954 (origin
2955 (method url-fetch)
2956 (uri (pypi-uri "rstr" version))
2957 (sha256
2958 (base32
2959 "197dw8mbq0pjjz1l6h1ksi62vgn7x55d373ch74y06744qiq5sjx"))))
2960 (build-system python-build-system)
2961 (home-page
2962 "http://bitbucket.org/leapfrogdevelopment/rstr/overview")
2963 (synopsis "Generate random strings in Python")
2964 (description "This package provides a python module for generating
2965 random strings of various types. It could be useful for fuzz testing,
2966 generating dummy data, or other applications. It has no dependencies
2967 outside the standard library.")
2968 (license license:bsd-3)))
2969
2970 (define-public python-scp
2971 (package
2972 (name "python-scp")
2973 (version "0.13.2")
2974 (source
2975 (origin
2976 (method url-fetch)
2977 (uri (pypi-uri "scp" version))
2978 (sha256
2979 (base32
2980 "1crlpw9lnn58fs1c1rmh7s7s9y5gkgpgjsqlvg9qa51kq1knx7gg"))))
2981 (build-system python-build-system)
2982 (arguments
2983 '(#:tests? #f)) ;tests require an SSH server
2984 (propagated-inputs
2985 `(("python-paramiko" ,python-paramiko)))
2986 (home-page "https://github.com/jbardin/scp.py")
2987 (synopsis "SCP protocol module for Python and Paramiko")
2988 (description "The scp module extends the Paramiko library to send and
2989 receive files via the SCP1 protocol, as implemented by the OpenSSH
2990 @command{scp} program.")
2991 (license license:gpl2+)))
2992
2993 (define-public python-rst.linker
2994 (package
2995 (name "python-rst.linker")
2996 (version "1.11")
2997 (source
2998 (origin
2999 (method url-fetch)
3000 (uri (pypi-uri "rst.linker" version))
3001 (sha256
3002 (base32 "0pqsfqqx8h0pq21k8l3k62kznrgaj2ala93c64s4d9rpbr4mgkd2"))))
3003 (build-system python-build-system)
3004 (propagated-inputs
3005 `(("python-dateutil" ,python-dateutil)
3006 ("python-six" ,python-six)))
3007 (native-inputs
3008 `(("python-setuptools-scm" ,python-setuptools-scm)))
3009 ;; Test would require path.py, which would introduce a cyclic dependence.
3010 (arguments `(#:tests? #f))
3011 ;; Note: As of version 1.7 the documentation is not worth building.
3012 (home-page "https://github.com/jaraco/rst.linker")
3013 (synopsis "Sphinx plugin to add links and timestamps")
3014 (description "rst.linker allows to automatically replace text by a
3015 reStructuredText external reference or timestamps. It's primary purpose is to
3016 augment the changelog, but it can be used for other documents, too.")
3017 (license license:expat)))
3018
3019 (define-public python2-rst.linker
3020 (package-with-python2 python-rst.linker))
3021
3022 (define-public python-feedgenerator
3023 (package
3024 (name "python-feedgenerator")
3025 (version "1.9")
3026 (source
3027 (origin
3028 (method url-fetch)
3029 (uri (pypi-uri "feedgenerator" version))
3030 (sha256
3031 (base32
3032 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
3033 (modules '((guix build utils)))
3034 (snippet
3035 '(begin
3036 ;; Remove pre-compiled .pyc files from source.
3037 (for-each delete-file-recursively
3038 (find-files "." "__pycache__" #:directories? #t))
3039 (for-each delete-file (find-files "." "\\.pyc$"))
3040 #t))))
3041 (build-system python-build-system)
3042 (propagated-inputs
3043 `(("python-pytz" ,python-pytz)
3044 ("python-six" ,python-six)))
3045 (home-page "https://github.com/getpelican/feedgenerator")
3046 (synopsis
3047 "Standalone version of Django's Atom/RSS feed generator")
3048 (description
3049 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
3050 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
3051 (license license:bsd-3)))
3052
3053 (define-public python2-feedgenerator
3054 (package-with-python2 python-feedgenerator))
3055
3056 (define-public python-toml
3057 (package
3058 (name "python-toml")
3059 (version "0.9.4")
3060 (source
3061 (origin
3062 (method url-fetch)
3063 (uri (pypi-uri "toml" version))
3064 (sha256
3065 (base32
3066 "0bdbpbip67wdm6c7xwc6mmbmskyradj4cdxn1iibj4fcx1nbv1lf"))))
3067 (build-system python-build-system)
3068 (arguments
3069 `(#:tests? #f)) ;no tests suite in release
3070 (home-page "https://github.com/uiri/toml")
3071 (synopsis "Library for TOML")
3072 (description
3073 "@code{toml} is a library for parsing and creating Tom's Obvious, Minimal
3074 Language (TOML) configuration files.")
3075 (license license:expat)))
3076
3077 (define-public python-jsonrpc-server
3078 (package
3079 (name "python-jsonrpc-server")
3080 (version "0.3.2")
3081 (source
3082 (origin
3083 (method url-fetch)
3084 (uri (pypi-uri "python-jsonrpc-server" version))
3085 (sha256
3086 (base32
3087 "0ddgdp26dfxaz6isjbb12974b3rxavgsqrn2zrmck62cmipg5g05"))))
3088 (build-system python-build-system)
3089 (propagated-inputs
3090 `(("python-future" ,python-future)
3091 ("python-mock" ,python-mock)
3092 ("python-pytest" ,python-pytest)
3093 ("python-ujson" ,python-ujson)))
3094 (home-page
3095 "https://github.com/palantir/python-jsonrpc-server")
3096 (synopsis "JSON RPC 2.0 server library")
3097 (description
3098 "This package provides a JSON RPC 2.0 server library for Python.")
3099 (license license:expat)))
3100
3101 (define-public python-pydocstyle
3102 (package
3103 (name "python-pydocstyle")
3104 (version "3.0.0")
3105 (source
3106 (origin
3107 (method url-fetch)
3108 (uri (pypi-uri "pydocstyle" version))
3109 (sha256
3110 (base32
3111 "1m1xv9clkg9lgzyza6dnj359z04vh5g0h49nhzghv7lg81gchhap"))))
3112 (build-system python-build-system)
3113 (propagated-inputs
3114 `(("python-six" ,python-six)
3115 ("python-snowballstemmer" ,python-snowballstemmer)))
3116 (home-page
3117 "https://github.com/PyCQA/pydocstyle/")
3118 (synopsis "Python docstring style checker")
3119 (description
3120 "This package provides a style checker for the Python Language
3121 Server (PLS).")
3122 (license license:expat)))
3123
3124 (define-public python-language-server
3125 (package
3126 (name "python-language-server")
3127 (version "0.31.7")
3128 (source
3129 (origin
3130 (method url-fetch)
3131 (uri (pypi-uri "python-language-server" version))
3132 (sha256
3133 (base32
3134 "0f8rljff4h2ay9m2n9ang7axai37nzd39zd7m6c90rci5wh8cmxh"))))
3135 (build-system python-build-system)
3136 (propagated-inputs
3137 `(("python-pluggy" ,python-pluggy)
3138 ("python-jsonrpc-server" ,python-jsonrpc-server)
3139 ("python-jedi" ,python-jedi)
3140 ("python-yapf" ,python-yapf)
3141 ("python-pyflakes" ,python-pyflakes)
3142 ("python-pydocstyle" ,python-pydocstyle)
3143 ("python-pycodestyle" ,python-pycodestyle)
3144 ("python-mccabe" ,python-mccabe)
3145 ("python-rope" ,python-rope)
3146 ("python-autopep8" ,python-autopep8)
3147 ("python-flake8" ,python-flake8)
3148 ("python-pylint" ,python-pylint)))
3149 (home-page "https://github.com/palantir/python-language-server")
3150 (synopsis "Python implementation of the Language Server Protocol")
3151 (description
3152 "The Python Language Server (pyls) is an implementation of the Python 3
3153 language specification for the Language Server Protocol (LSP). This tool is
3154 used in text editing environments to provide a complete and integrated
3155 feature-set for programming Python effectively.")
3156 (license license:expat)))
3157
3158 (define-public python-pathspec
3159 (package
3160 (name "python-pathspec")
3161 (version "0.7.0")
3162 (source
3163 (origin
3164 (method url-fetch)
3165 (uri (pypi-uri "pathspec" version))
3166 (sha256
3167 (base32
3168 "15lvs4awlg8xzl0l4gk9y53xx4yqmqvsv44pglv39m70y85afajn"))))
3169 (build-system python-build-system)
3170 (home-page "https://github.com/cpburnz/python-path-specification")
3171 (synopsis "Utility library for gitignore style pattern matching of file paths")
3172 (description
3173 "This package provides a utility library for gitignore style pattern
3174 matching of file paths.")
3175 (license license:mpl2.0)))
3176
3177 (define-public python-black
3178 (package
3179 (name "python-black")
3180 (version "19.10b0")
3181 (source
3182 (origin
3183 (method url-fetch)
3184 (uri (pypi-uri "black" version))
3185 (sha256
3186 (base32
3187 "0f8mr0yzj78q1dx7v6ggbgfir2wv0n5z2shfbbvfdq7910xbgvf2"))))
3188 (build-system python-build-system)
3189 (arguments
3190 `(#:phases
3191 (modify-phases %standard-phases
3192 (add-after 'patch-source-shebangs 'patch-extra-shebangs
3193 (lambda _
3194 (let ((python3 (which "python3")))
3195 (substitute* '("tests/data/fmtonoff.py"
3196 "tests/data/string_prefixes.py"
3197 "tests/data/function.py"
3198 "tests/data/python37.py")
3199 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
3200 (string-append "#!" python3 (if (string? minor-version)
3201 minor-version
3202 "")))))
3203 #t))
3204 (add-after 'unpack 'disable-broken-tests
3205 (lambda _
3206 ;; These tests are supposed to be skipped when the blackd
3207 ;; dependencies are missing, but this doesn't quite work.
3208 (substitute* "tests/test_black.py"
3209 (("( *)class BlackDTestCase.*" match indent)
3210 (string-append indent "@unittest.skip(\"no blackd deps\")\n"
3211 indent "class BlackDTestCase(unittest.TestCase):\n"))
3212 (("web.Application") "False")
3213 (("@unittest_run_loop") ""))
3214
3215 ;; Patching the above file breaks the self test
3216 (substitute* "tests/test_black.py"
3217 (("( *)def test_self" match indent)
3218 (string-append indent "@unittest.skip(\"guix\")\n" match)))
3219 #t)))))
3220 (propagated-inputs
3221 `(("python-click" ,python-click)
3222 ("python-attrs" ,python-attrs)
3223 ("python-appdirs" ,python-appdirs)
3224 ("python-pathspec" ,python-pathspec)
3225 ("python-regex" ,python-regex)
3226 ("python-toml" ,python-toml)
3227 ("python-typed-ast" ,python-typed-ast)))
3228 (native-inputs
3229 `(("python-setuptools-scm" ,python-setuptools-scm)))
3230 (home-page "https://github.com/ambv/black")
3231 (synopsis "The uncompromising code formatter")
3232 (description "Black is the uncompromising Python code formatter.")
3233 (license license:expat)))
3234
3235 (define-public python-blinker
3236 (package
3237 (name "python-blinker")
3238 (version "1.4")
3239 (source
3240 (origin
3241 (method url-fetch)
3242 (uri (pypi-uri "blinker" version))
3243 (sha256
3244 (base32
3245 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
3246 (build-system python-build-system)
3247 (home-page "https://pythonhosted.org/blinker/")
3248 (synopsis "Fast, simple object-to-object and broadcast signaling")
3249 (description
3250 "Blinker provides a fast dispatching system that allows any number of
3251 interested parties to subscribe to events, or \"signals\".")
3252 (license license:expat)))
3253
3254 (define-public python2-blinker
3255 (package-with-python2 python-blinker))
3256
3257 (define-public pelican
3258 (package
3259 (name "pelican")
3260 (version "4.2.0")
3261 (source
3262 (origin
3263 (method url-fetch)
3264 (uri (pypi-uri "pelican" version))
3265 (sha256
3266 (base32
3267 "0mp7hjyhs38ag1hyfcy882g400z0babqi72pnli46dqijfhajzmy"))))
3268 (build-system python-build-system)
3269 (propagated-inputs
3270 `(("python-blinker" ,python-blinker)
3271 ("python-dateutil" ,python-dateutil)
3272 ("python-docutils" ,python-docutils)
3273 ("python-feedgenerator" ,python-feedgenerator)
3274 ("python-jinja2" ,python-jinja2)
3275 ("python-markdown" ,python-markdown)
3276 ("python-pygments" ,python-pygments)
3277 ("python-pytz" ,python-pytz)
3278 ("python-six" ,python-six)
3279 ("python-unidecode" ,python-unidecode)))
3280 (home-page "https://getpelican.com/")
3281 (arguments
3282 `(;; XXX Requires a lot more packages to do unit tests :P
3283 #:tests? #f))
3284 (synopsis "Python-based static site publishing system")
3285 (description
3286 "Pelican is a tool to generate a static blog from reStructuredText,
3287 Markdown input files, and more. Pelican uses Jinja2 for templating
3288 and is very extensible.")
3289 (license license:agpl3+)))
3290
3291 (define-public mallard-ducktype
3292 (package
3293 (name "mallard-ducktype")
3294 (version "1.0.2")
3295 (source
3296 (origin
3297 (method git-fetch)
3298 ;; git-reference because tests are not included in pypi source tarball
3299 ;; https://issues.guix.gnu.org/issue/36755#2
3300 (uri (git-reference
3301 (url "https://github.com/projectmallard/mallard-ducktype.git")
3302 (commit version)))
3303 (file-name (git-file-name name version))
3304 (sha256
3305 (base32
3306 "1jk9bfz7g04ip78s03b0xak6d54rj4h9zpgadkziy1ji216g6y4c"))))
3307 (build-system python-build-system)
3308 (arguments
3309 '(#:phases
3310 (modify-phases %standard-phases
3311 (replace 'check
3312 (lambda _
3313 (with-directory-excursion "tests"
3314 (invoke "sh" "runtests")))))))
3315 (home-page "http://projectmallard.org")
3316 (synopsis "Convert Ducktype to Mallard documentation markup")
3317 (description
3318 "Ducktype is a lightweight syntax that can represent all the semantics
3319 of the Mallard XML documentation system. Ducktype files can be converted to
3320 Mallard using the @command{ducktype} tool. The yelp-tools package
3321 provides additional functionality on the produced Mallard documents.")
3322 (license license:expat)))
3323
3324 (define-public python-cython
3325 (package
3326 (name "python-cython")
3327 (version "0.29.13")
3328 (source
3329 (origin
3330 (method url-fetch)
3331 (uri (pypi-uri "Cython" version))
3332 (sha256
3333 (base32
3334 "13k37lrcgagwwnzr5bzririsscb793vndj234d475x1h9ad0d7f2"))))
3335 (build-system python-build-system)
3336 ;; we need the full python package and not just the python-wrapper
3337 ;; because we need libpython3.3m.so
3338 (inputs
3339 `(("python" ,python)))
3340 (arguments
3341 `(#:phases
3342 (modify-phases %standard-phases
3343 (add-before 'check 'set-HOME
3344 ;; some tests require access to "$HOME/.cython"
3345 (lambda _ (setenv "HOME" "/tmp") #t))
3346
3347 ;; FIXME: These tests started failing on armhf after the 0.28 update
3348 ;; (commit c69d11c5930), both with an error such as this:
3349 ;; compiling (cpp) and running dictcomp ...
3350 ;; === C/C++ compiler error output: ===
3351 ;; ‘
3352 ;; dictcomp.cpp:5221: confused by earlier errors, bailing out
3353 ;; See <https://hydra.gnu.org/build/2948724> for logs.
3354 ,@(if (target-arm32?)
3355 `((add-before 'check 'disable-failing-tests
3356 (lambda _
3357 (let ((disabled-tests (open-file "tests/bugs.txt" "a")))
3358 (for-each (lambda (test)
3359 (format disabled-tests "~a\n" test))
3360 '("memslice" "dictcomp"))
3361 (close-port disabled-tests)))))
3362 '())
3363
3364 (replace 'check
3365 (lambda _
3366 ;; Disable compiler optimizations to greatly reduce the running
3367 ;; time of the test suite.
3368 (setenv "CFLAGS" "-O0")
3369
3370 (invoke "python" "runtests.py" "-vv"
3371 "-j" (number->string (parallel-job-count))))))))
3372 (home-page "https://cython.org/")
3373 (synopsis "C extensions for Python")
3374 (description "Cython is an optimising static compiler for both the Python
3375 programming language and the extended Cython programming language. It makes
3376 writing C extensions for Python as easy as Python itself.")
3377 (license license:asl2.0)
3378 (properties `((python2-variant . ,(delay python2-cython))))))
3379
3380 (define-public python2-cython
3381 (let ((base (package-with-python2 (strip-python2-variant python-cython))))
3382 (package
3383 (inherit base)
3384 (name "python2-cython")
3385 (inputs
3386 `(("python-2" ,python-2))) ;this is not automatically changed
3387 (arguments
3388 (substitute-keyword-arguments (package-arguments base)
3389 ((#:phases phases)
3390 `(modify-phases ,phases
3391 (add-before 'check 'adjust-test_embed
3392 (lambda _
3393 (substitute* "runtests.py"
3394 ;; test_embed goes great lengths to find the static libpythonX.Y.a
3395 ;; so it can give the right -L flag to GCC when embedding static
3396 ;; builds of Python. It is unaware that the Python "config"
3397 ;; directory (where the static library lives) was renamed in
3398 ;; Python 3, and falls back to sysconfig.get_config_var('LIBDIR'),
3399 ;; which works fine, because that is where the shared library is.
3400 ;;
3401 ;; It also appears to be unaware that the Makefile in Demos/embed
3402 ;; already unconditionally pass the static library location to GCC,
3403 ;; after checking sysconfig.get_config_var('LIBPL).
3404 ;;
3405 ;; The effect is that the linker is unable to resolve libexpat
3406 ;; symbols when building for Python 2, because neither the Python 2
3407 ;; shared library nor Expat is available. To fix it, we can either
3408 ;; add Expat as an input and make it visible to the linker, or just
3409 ;; prevent it from overriding the Python shared library location.
3410 ;; The end result is identical, so we take the easy route.
3411 ((" or libname not in os\\.listdir\\(libdir\\)")
3412 ""))
3413 #t)))))))))
3414
3415 ;; The RPython toolchain currently does not support Python 3.
3416 (define-public python2-rpython
3417 (package
3418 (name "python2-rpython")
3419 (version "0.2.1")
3420 (source
3421 (origin
3422 (method url-fetch)
3423 (uri (pypi-uri "rpython" version))
3424 (sha256
3425 (base32
3426 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
3427 (build-system python-build-system)
3428 (arguments `(#:python ,python-2))
3429 (native-inputs
3430 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
3431 (home-page "https://rpython.readthedocs.org")
3432 (synopsis "Framework for implementing interpreters and virtual machines")
3433 (description "RPython is a translation and support framework for
3434 producing implementations of dynamic languages, emphasizing a clean separation
3435 between language specification and implementation aspects.")
3436 (license license:expat)))
3437
3438 ;; NOTE: when upgrading numpy please make sure that python-pandas and
3439 ;; python-scipy still build, as these three packages are often used together.
3440 (define-public python-numpy
3441 (package
3442 (name "python-numpy")
3443 (version "1.17.3")
3444 (source
3445 (origin
3446 (method url-fetch)
3447 (uri (string-append
3448 "https://github.com/numpy/numpy/releases/download/v"
3449 version "/numpy-" version ".tar.gz"))
3450 (sha256
3451 (base32
3452 "1ak9dmjja0q90a7fsxli51ypcwssh8c4pb6f8wkrsnf2xgdk6dy9"))))
3453 (build-system python-build-system)
3454 (inputs
3455 `(("openblas" ,openblas)
3456 ("lapack" ,lapack)))
3457 (native-inputs
3458 `(("python-cython" ,python-cython)
3459 ("python-pytest" ,python-pytest)
3460 ("gfortran" ,gfortran)))
3461 (arguments
3462 `(#:phases
3463 (modify-phases %standard-phases
3464 (add-before 'build 'configure-blas-lapack
3465 (lambda* (#:key inputs #:allow-other-keys)
3466 (call-with-output-file "site.cfg"
3467 (lambda (port)
3468 (format port
3469 "[openblas]
3470 libraries = openblas
3471 library_dirs = ~a/lib
3472 include_dirs = ~a/include
3473
3474 # backslash-n to make emacs happy
3475 \n[lapack]
3476 lapack_libs = lapack
3477 library_dirs = ~a/lib
3478 include_dirs = ~a/include
3479 "
3480 (assoc-ref inputs "openblas")
3481 (assoc-ref inputs "openblas")
3482 (assoc-ref inputs "lapack")
3483 (assoc-ref inputs "lapack"))))
3484 #t))
3485 (add-before 'build 'fix-executable-paths
3486 (lambda* (#:key inputs #:allow-other-keys)
3487 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
3488 ;; instead of /bin/sh.
3489 (substitute* "numpy/distutils/exec_command.py"
3490 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
3491 (string-append match-start (assoc-ref inputs "bash") match-end)))
3492 ;; Use "gcc" executable, not "cc".
3493 (substitute* "numpy/distutils/system_info.py"
3494 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3495 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
3496 #t))
3497 ;; Tests can only be run after the library has been installed and not
3498 ;; within the source directory.
3499 (delete 'check)
3500 (add-after 'install 'check
3501 (lambda* (#:key outputs inputs #:allow-other-keys)
3502 ;; Make installed package available for running the tests
3503 (add-installed-pythonpath inputs outputs)
3504 ;; Make sure "f2py" etc is found.
3505 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
3506 ":" (getenv "PATH")))
3507 (with-directory-excursion "/tmp"
3508 (invoke "python" "-c"
3509 "import numpy; numpy.test(verbose=2)")))))))
3510 (home-page "https://numpy.org")
3511 (synopsis "Fundamental package for scientific computing with Python")
3512 (description "NumPy is the fundamental package for scientific computing
3513 with Python. It contains among other things: a powerful N-dimensional array
3514 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3515 and Fortran code, useful linear algebra, Fourier transform, and random number
3516 capabilities.")
3517 (properties `((python2-variant . ,(delay python2-numpy))))
3518 (license license:bsd-3)))
3519
3520 ;; Numpy 1.16.x are the last versions that support Python 2.
3521 (define-public python2-numpy
3522 (let ((numpy (package-with-python2
3523 (strip-python2-variant python-numpy))))
3524 (package/inherit
3525 numpy
3526 (version "1.16.5")
3527 (source (origin
3528 (method url-fetch)
3529 (uri (string-append
3530 "https://github.com/numpy/numpy/releases/download/v"
3531 version "/numpy-" version ".tar.gz"))
3532 (sha256
3533 (base32
3534 "0lg1cycxzi4rvvrd5zxinpdz0ni792fpx6xjd75z1923zcac8qrb")))))))
3535
3536 ;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
3537 ;; interest only for legacy code going back to NumPy's predecessor
3538 ;; Numeric.
3539 (define-public python2-numpy-1.8
3540 (package (inherit python2-numpy)
3541 (version "1.8.2")
3542 (source
3543 (origin
3544 (method git-fetch)
3545 (uri (git-reference
3546 (url "https://github.com/numpy/numpy")
3547 (commit (string-append "v" version))))
3548 (file-name (git-file-name "numpy" version))
3549 (sha256
3550 (base32
3551 "0ikgi15rsqwbkfsjjxrwh40lqyal2wvyp3923y6w6ch3dcr82sfk"))))
3552 (arguments
3553 (substitute-keyword-arguments (package-arguments python2-numpy)
3554 ((#:phases phases)
3555 `(modify-phases ,phases
3556 (replace 'configure-blas-lapack
3557 (lambda* (#:key inputs #:allow-other-keys)
3558 (call-with-output-file "site.cfg"
3559 (lambda (port)
3560 (format port
3561 "[openblas]
3562 libraries = openblas,lapack
3563 library_dirs = ~a/lib:~a/lib
3564 include_dirs = ~a/include:~a/include
3565 "
3566 (assoc-ref inputs "openblas")
3567 (assoc-ref inputs "lapack")
3568 (assoc-ref inputs "openblas")
3569 (assoc-ref inputs "lapack"))))
3570 #t))))))
3571 (native-inputs
3572 `(("python2-nose" ,python2-nose)))
3573 (description "NumPy is the fundamental package for scientific computing
3574 with Python. It contains among other things: a powerful N-dimensional array
3575 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3576 and Fortran code, useful linear algebra, Fourier transform, and random number
3577 capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
3578 that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
3579 Numeric.")
3580 (license license:bsd-3)))
3581
3582 (define-public python-munch
3583 (package
3584 (name "python-munch")
3585 (version "2.0.4")
3586 (source
3587 (origin
3588 (method url-fetch)
3589 (uri (pypi-uri "munch" version))
3590 (sha256
3591 (base32
3592 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3593 (build-system python-build-system)
3594 (home-page "https://github.com/Infinidat/munch")
3595 (synopsis "Dot-accessible dictionary")
3596 (description "Munch is a dot-accessible dictionary similar to JavaScript
3597 objects.")
3598 (license license:expat)))
3599
3600 (define-public python2-munch
3601 (package-with-python2 python-munch))
3602
3603 (define-public python-colormath
3604 (package
3605 (name "python-colormath")
3606 (version "3.0.0")
3607 (source
3608 (origin
3609 (method url-fetch)
3610 (uri (pypi-uri "colormath" version))
3611 (sha256
3612 (base32
3613 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
3614 (build-system python-build-system)
3615 (propagated-inputs
3616 `(("python-networkx" ,python-networkx)
3617 ("python-numpy" ,python-numpy)))
3618 (home-page "https://github.com/gtaylor/python-colormath")
3619 (synopsis "Color math and conversion library")
3620 (description
3621 "This is a Python library for color math and conversions.")
3622 (license license:bsd-3)))
3623
3624 (define-public python2-colormath
3625 (package-with-python2 python-colormath))
3626
3627 (define-public python-spectra
3628 (package
3629 (name "python-spectra")
3630 (version "0.0.11")
3631 (source
3632 (origin
3633 (method url-fetch)
3634 (uri (pypi-uri "spectra" version))
3635 (sha256
3636 (base32
3637 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
3638 (build-system python-build-system)
3639 (arguments
3640 `(#:phases
3641 (modify-phases %standard-phases
3642 (replace 'check
3643 (lambda _ (invoke "nosetests" "-v"))))))
3644 (propagated-inputs
3645 `(("python-colormath" ,python-colormath)))
3646 (native-inputs
3647 `(("python-nose" ,python-nose)))
3648 (home-page "https://github.com/jsvine/spectra")
3649 (synopsis "Color scales and color conversion")
3650 (description
3651 "This package provides a Python library intended to make color math,
3652 color scales, and color space conversion easy. It has support for:
3653
3654 @enumerate
3655 @item Color scales
3656 @item Color ranges
3657 @item Color blending
3658 @item Brightening/darkening colors
3659 @item Saturating/desaturating colors
3660 @item Conversion to/from multiple color spaces.
3661 @end enumerate\n")
3662 (license license:expat)))
3663
3664 (define-public python2-spectra
3665 (package-with-python2 python-spectra))
3666
3667 (define-public python-numpy-documentation
3668 (package
3669 (name "python-numpy-documentation")
3670 (version (package-version python-numpy))
3671 (source (package-source python-numpy))
3672 (build-system python-build-system)
3673 (native-inputs
3674 `(("python-matplotlib" ,python-matplotlib)
3675 ("python-numpy" ,python-numpy)
3676 ("pkg-config" ,pkg-config)
3677 ("python-sphinx" ,python-sphinx)
3678 ("python-numpydoc" ,python-numpydoc)
3679 ("texlive" ,(texlive-union (list texlive-fonts-cm-super
3680 texlive-fonts-ec
3681 texlive-generic-ifxetex
3682 texlive-generic-pdftex
3683 texlive-amsfonts
3684 texlive-latex-capt-of
3685 texlive-latex-cmap
3686 texlive-latex-environ
3687 texlive-latex-eqparbox
3688 texlive-latex-etoolbox
3689 texlive-latex-expdlist
3690 texlive-latex-fancyhdr
3691 texlive-latex-fancyvrb
3692 texlive-latex-fncychap
3693 texlive-latex-float
3694 texlive-latex-framed
3695 texlive-latex-geometry
3696 texlive-latex-graphics
3697 texlive-latex-hyperref
3698 texlive-latex-mdwtools
3699 texlive-latex-multirow
3700 texlive-latex-needspace
3701 texlive-latex-oberdiek
3702 texlive-latex-parskip
3703 texlive-latex-preview
3704 texlive-latex-tabulary
3705 texlive-latex-threeparttable
3706 texlive-latex-titlesec
3707 texlive-latex-trimspaces
3708 texlive-latex-ucs
3709 texlive-latex-upquote
3710 texlive-latex-url
3711 texlive-latex-varwidth
3712 texlive-latex-wrapfig)))
3713 ("texinfo" ,texinfo)
3714 ("perl" ,perl)
3715 ("scipy-sphinx-theme"
3716 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
3717 (method git-fetch)
3718 (uri (git-reference
3719 (url "https://github.com/scipy/scipy-sphinx-theme.git")
3720 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
3721 (sha256
3722 (base32
3723 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
3724 ,@(package-native-inputs python-numpy)))
3725 (arguments
3726 `(#:tests? #f ; we're only generating the documentation
3727 #:phases
3728 (modify-phases %standard-phases
3729 (delete 'build)
3730 (replace 'install
3731 (lambda* (#:key inputs outputs #:allow-other-keys)
3732 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3733 (doc (string-append
3734 data "/doc/" ,name "-"
3735 ,(package-version python-numpy)))
3736 (info-reader (string-append data "/info"))
3737 (html (string-append doc "/html"))
3738 (scipy-sphinx-theme "scipy-sphinx-theme")
3739 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
3740 (pyver ,(string-append "PYVER=")))
3741
3742 ;; FIXME: this is needed to for texlive-union to generate
3743 ;; fonts, which are not found.
3744 (setenv "HOME" "/tmp")
3745
3746 (with-directory-excursion "doc"
3747 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
3748 (mkdir-p html)
3749 (invoke "make" "html" pyver)
3750 (invoke "make" "latex" "PAPER=a4" pyver)
3751 (invoke "make" "-C" "build/latex"
3752 "all-pdf" "PAPER=a4" pyver)
3753 ;; FIXME: Generation of the info file fails.
3754 ;; (invoke "make" "info" pyver)
3755 ;; (mkdir-p info)
3756 ;; (copy-file "build/texinfo/numpy.info"
3757 ;; (string-append info "/numpy.info"))
3758 (for-each (lambda (file)
3759 (copy-file (string-append "build/latex" file)
3760 (string-append doc file)))
3761 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3762 (with-directory-excursion "build/html"
3763 (for-each (lambda (file)
3764 (let* ((dir (dirname file))
3765 (tgt-dir (string-append html "/" dir)))
3766 (unless (equal? "." dir)
3767 (mkdir-p tgt-dir))
3768 (install-file file html)))
3769 (find-files "." ".*")))))
3770 #t)))))
3771 (home-page (package-home-page python-numpy))
3772 (synopsis "Documentation for the python-numpy package")
3773 (description (package-description python-numpy))
3774 (license (package-license python-numpy))))
3775
3776 (define-public python2-numpy-documentation
3777 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
3778 (package
3779 (inherit numpy-documentation)
3780 (native-inputs `(("python2-functools32" ,python2-functools32)
3781 ,@(package-native-inputs numpy-documentation))))))
3782
3783 (define-public python-pygit2
3784 (package
3785 (name "python-pygit2")
3786 (version "0.28.2")
3787 (source
3788 (origin
3789 (method url-fetch)
3790 (uri (pypi-uri "pygit2" version))
3791 (sha256
3792 (base32 "11kzj5mjkspvplnpdb6bj8dcj6rgmkk986k8hjcklyg5yaxkz32d"))))
3793 (build-system python-build-system)
3794 (arguments
3795 '(#:tests? #f)) ; tests don't run correctly in our environment
3796 (propagated-inputs
3797 `(("python-six" ,python-six)
3798 ("python-cffi" ,python-cffi)
3799 ("libgit2" ,libgit2)
3800 ("python-tox" ,python-tox)))
3801 (native-inputs
3802 `(("python-pytest" ,python-pytest)))
3803 (home-page "https://github.com/libgit2/pygit2")
3804 (synopsis "Python bindings for libgit2")
3805 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3806 library, libgit2 implements Git plumbing.")
3807 ;; GPL2.0 only, with linking exception.
3808 (license license:gpl2)))
3809
3810 (define-public python2-pygit2
3811 (package-with-python2 python-pygit2))
3812
3813 (define-public python-pyparsing
3814 (package
3815 (name "python-pyparsing")
3816 (version "2.3.1")
3817 (source
3818 (origin
3819 (method url-fetch)
3820 (uri (pypi-uri "pyparsing" version))
3821 (sha256
3822 (base32 "0yk6xl885b91dmlhlsap7x78hk2rdr879fln9anbq6k4ca42djb6"))))
3823 (build-system python-build-system)
3824 (outputs '("out" "doc"))
3825 (arguments
3826 `(#:tests? #f ; no test target
3827 #:phases
3828 (modify-phases %standard-phases
3829 (add-after 'install 'install-doc
3830 (lambda* (#:key outputs #:allow-other-keys)
3831 (let* ((doc (string-append (assoc-ref outputs "doc")
3832 "/share/doc/" ,name "-" ,version))
3833 (html-doc (string-append doc "/html"))
3834 (examples (string-append doc "/examples")))
3835 (mkdir-p html-doc)
3836 (mkdir-p examples)
3837 (for-each
3838 (lambda (dir tgt)
3839 (map (lambda (file)
3840 (install-file file tgt))
3841 (find-files dir ".*")))
3842 (list "docs" "htmldoc" "examples")
3843 (list doc html-doc examples))
3844 #t))))))
3845 (home-page "https://github.com/pyparsing/pyparsing")
3846 (synopsis "Python parsing class library")
3847 (description
3848 "The pyparsing module is an alternative approach to creating and
3849 executing simple grammars, vs. the traditional lex/yacc approach, or the use
3850 of regular expressions. The pyparsing module provides a library of classes
3851 that client code uses to construct the grammar directly in Python code.")
3852 (license license:expat)))
3853
3854 (define-public python2-pyparsing
3855 (package-with-python2 python-pyparsing))
3856
3857 (define-public python-numpydoc
3858 (package
3859 (name "python-numpydoc")
3860 (version "0.8.0")
3861 (source
3862 (origin
3863 (method url-fetch)
3864 (uri (pypi-uri "numpydoc" version))
3865 (sha256
3866 (base32
3867 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
3868 (build-system python-build-system)
3869 (propagated-inputs
3870 `(("python-sphinx" ,python-sphinx)))
3871 (native-inputs
3872 `(("python-nose" ,python-nose)))
3873 (home-page "https://pypi.org/project/numpydoc/")
3874 (synopsis
3875 "Numpy's Sphinx extensions")
3876 (description
3877 "Sphinx extension to support docstrings in Numpy format.")
3878 (license license:bsd-2)))
3879
3880 (define-public python2-numpydoc
3881 (package-with-python2 python-numpydoc))
3882
3883 (define-public python-numexpr
3884 (package
3885 (name "python-numexpr")
3886 (version "2.6.5")
3887 (source
3888 (origin
3889 (method url-fetch)
3890 (uri (pypi-uri "numexpr" version))
3891 (sha256
3892 (base32
3893 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
3894 (build-system python-build-system)
3895 (arguments `(#:tests? #f)) ; no tests included
3896 (propagated-inputs
3897 `(("python-numpy" ,python-numpy)))
3898 (home-page "https://github.com/pydata/numexpr")
3899 (synopsis "Fast numerical expression evaluator for NumPy")
3900 (description
3901 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3902 expressions that operate on arrays are accelerated and use less memory than
3903 doing the same calculation in Python. In addition, its multi-threaded
3904 capabilities can make use of all your cores, which may accelerate
3905 computations, most specially if they are not memory-bounded (e.g. those using
3906 transcendental functions).")
3907 (license license:expat)))
3908
3909 (define-public python2-numexpr
3910 (package-with-python2 python-numexpr))
3911
3912 (define-public python-cycler
3913 (package
3914 (name "python-cycler")
3915 (version "0.10.0")
3916 (source (origin
3917 (method url-fetch)
3918 (uri (pypi-uri "cycler" version))
3919 (sha256
3920 (base32
3921 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
3922 (build-system python-build-system)
3923 (arguments
3924 ;; XXX: The current version requires 'coveralls' which we don't have.
3925 ;; Enable this for the next release which uses 'python-pytest'.
3926 '(#:tests? #f))
3927 (propagated-inputs
3928 `(("python-six" ,python-six)))
3929 (home-page "http://matplotlib.org/cycler/")
3930 (synopsis "Composable keyword argument iterator")
3931 (description
3932 "When using @code{matplotlib} and plotting more than one line, it is
3933 common to want to be able to want to be able to cycle over one or more artist
3934 styles; but the plotting logic can quickly become involved.
3935 To address this and enable easy cycling over arbitrary @code{kwargs}, the
3936 @code{Cycler} class was developed.")
3937 (license license:bsd-3)))
3938
3939 (define-public python2-cycler
3940 (package-with-python2 python-cycler))
3941
3942 (define-public python-colorspacious
3943 (package
3944 (name "python-colorspacious")
3945 (version "1.1.2")
3946 (source
3947 (origin
3948 (method git-fetch)
3949 (uri (git-reference
3950 (url "https://github.com/njsmith/colorspacious.git")
3951 (commit (string-append "v" version))))
3952 (file-name (git-file-name name version))
3953 (sha256
3954 (base32 "0x7nkphr6g5ql5fvgss8l56rgiyjgh6fm8zzs73i94ci9wzlm63w"))))
3955 (build-system python-build-system)
3956 (propagated-inputs
3957 `(("python-numpy" ,python-numpy)))
3958 (native-inputs
3959 `(("python-nose" ,python-nose)))
3960 (arguments
3961 `(#:phases
3962 (modify-phases %standard-phases
3963 (replace 'check
3964 (lambda _
3965 (invoke "nosetests" "--all-modules" "-v" "colorspacious"))))))
3966 (home-page "https://github.com/njsmith/colorspacious")
3967 (synopsis "Python library for colorspace conversions")
3968 (description "@code{colorspacious} is a Python library that lets you
3969 convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
3970 (license license:expat)))
3971
3972 (define-public python2-colorspacious
3973 (package-with-python2 python-colorspacious))
3974
3975 (define-public python-matplotlib
3976 (package
3977 (name "python-matplotlib")
3978 (version "3.1.2")
3979 (source
3980 (origin
3981 (method url-fetch)
3982 (uri (pypi-uri "matplotlib" version))
3983 (sha256
3984 (base32
3985 "1nmshfqh7wyg15i16hx1yiylcvzkws29ivn66n3i0wyqwcpjr3lf"))))
3986 (build-system python-build-system)
3987 (propagated-inputs ; the following packages are all needed at run time
3988 `(("python-cycler" ,python-cycler)
3989 ("python-kiwisolver" ,python-kiwisolver)
3990 ("python-pyparsing" ,python-pyparsing)
3991 ("python-pygobject" ,python-pygobject)
3992 ("gobject-introspection" ,gobject-introspection)
3993 ("python-tkinter" ,python "tk")
3994 ("python-dateutil" ,python-dateutil)
3995 ("python-numpy" ,python-numpy)
3996 ("python-pillow" ,python-pillow)
3997 ("python-pytz" ,python-pytz)
3998 ("python-six" ,python-six)
3999 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
4000 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
4001 ;; object. For this reason we need to import both libraries.
4002 ;; https://cairocffi.readthedocs.io/en/stable/cffi_api.html#converting-pycairo-wrappers-to-cairocffi
4003 ("python-pycairo" ,python-pycairo)
4004 ("python-cairocffi" ,python-cairocffi)))
4005 (inputs
4006 `(("libpng" ,libpng)
4007 ("imagemagick" ,imagemagick)
4008 ("freetype" ,freetype)
4009 ("cairo" ,cairo)
4010 ("glib" ,glib)
4011 ;; FIXME: Add backends when available.
4012 ;("python-wxpython" ,python-wxpython)
4013 ("tcl" ,tcl)
4014 ("tk" ,tk)))
4015 (native-inputs
4016 `(("pkg-config" ,pkg-config)
4017 ("python-pytest" ,python-pytest)
4018 ("python-mock" ,python-mock)
4019 ("unzip" ,unzip)
4020 ("jquery-ui"
4021 ,(origin
4022 (method url-fetch)
4023 (uri "https://jqueryui.com/resources/download/jquery-ui-1.12.1.zip")
4024 (sha256
4025 (base32
4026 "0kb21xf38diqgxcdi1z3s9ssq36pldvyqxy56hn6pcva6rs3c8zq"))))))
4027 (arguments
4028 `(#:phases
4029 (modify-phases %standard-phases
4030 ;; XXX We disable all image comparison tests because we're using a
4031 ;; newer version of FreeType than matplotlib expects. This leads to
4032 ;; minor differences throughout the tests.
4033 (add-after 'unpack 'fix-and-disable-failing-tests
4034 (lambda _
4035 (substitute* (append (find-files "lib/matplotlib/tests/"
4036 "test_.*\\.py$")
4037 (find-files "lib/mpl_toolkits/tests"
4038 "test_.*\\.py$"))
4039 (("^from matplotlib" match)
4040 (string-append "import pytest\n" match))
4041 (("( *)@image_comparison" match indent)
4042 (string-append indent
4043 "@pytest.mark.skip(reason=\"unknown minor image differences\")\n"
4044 match)))
4045 (substitute* "lib/matplotlib/tests/test_animation.py"
4046 (("/bin/sh") (which "sh")))
4047 (for-each delete-file
4048 ;; test_normal_axes, test_get_tightbbox_polar
4049 '("lib/matplotlib/tests/test_axes.py"
4050 ;; We don't use the webagg backend and this test forces it.
4051 "lib/matplotlib/tests/test_backend_webagg.py"
4052 ;; test_outward_ticks
4053 "lib/matplotlib/tests/test_tightlayout.py"
4054 ;; test_hidden_axes fails with minor extent
4055 ;; differences, possibly due to the use of a
4056 ;; different version of FreeType.
4057 "lib/matplotlib/tests/test_constrainedlayout.py"
4058 ;; Fontconfig returns no fonts.
4059 "lib/matplotlib/tests/test_font_manager.py"))
4060 #t))
4061 (add-before 'install 'install-jquery-ui
4062 (lambda* (#:key outputs inputs #:allow-other-keys)
4063 (let ((dir (string-append (assoc-ref outputs "out")
4064 "/lib/python3.7/site-packages/matplotlib/backends/web_backend/")))
4065 (mkdir-p dir)
4066 (invoke "unzip"
4067 (assoc-ref inputs "jquery-ui")
4068 "-d" dir))
4069 #t))
4070 (replace 'check
4071 (lambda* (#:key outputs inputs #:allow-other-keys)
4072 (add-installed-pythonpath inputs outputs)
4073 (invoke "python" "tests.py" "-v"
4074 "-m" "not network and not webagg")))
4075 (add-before 'build 'configure-environment
4076 (lambda* (#:key outputs inputs #:allow-other-keys)
4077 (let ((cairo (assoc-ref inputs "cairo")))
4078 ;; Setting this directory in the 'basedirlist' of 'setup.cfg'
4079 ;; has not effect.
4080 (setenv "LD_LIBRARY_PATH" (string-append cairo "/lib"))
4081 (setenv "HOME" (getcwd))
4082 (call-with-output-file "setup.cfg"
4083 (lambda (port)
4084 (format port "[directories]~%
4085 basedirlist = ~a,~a~%
4086 [packages]~%
4087 tests = True~%"
4088 (assoc-ref inputs "tcl")
4089 (assoc-ref inputs "tk")))))
4090 #t)))))
4091 (home-page "https://matplotlib.org/")
4092 (synopsis "2D plotting library for Python")
4093 (description
4094 "Matplotlib is a Python 2D plotting library which produces publication
4095 quality figures in a variety of hardcopy formats and interactive environments
4096 across platforms. Matplotlib can be used in Python scripts, the python and
4097 ipython shell, web application servers, and six graphical user interface
4098 toolkits.")
4099 (license license:psfl)
4100 (properties `((python2-variant . ,(delay python2-matplotlib))))))
4101
4102 (define-public python2-matplotlib
4103 (let ((matplotlib (package-with-python2
4104 (strip-python2-variant python-matplotlib))))
4105 (package (inherit matplotlib)
4106 (version "2.2.4")
4107 (source
4108 (origin
4109 (method url-fetch)
4110 (uri (pypi-uri "matplotlib" version))
4111 (sha256
4112 (base32
4113 "09i1gnrra1590brc1f8d5rh2zvnknmfgzp613ab0462qkrwj15h2"))))
4114 (arguments
4115 (substitute-keyword-arguments (package-arguments matplotlib)
4116 ((#:phases phases)
4117 `(modify-phases ,phases
4118 (replace 'install-jquery-ui
4119 (lambda* (#:key outputs inputs #:allow-other-keys)
4120 (let ((dir (string-append (assoc-ref outputs "out")
4121 "/lib/python2.7/site-packages/"
4122 "matplotlib/backends/web_backend/")))
4123 (mkdir-p dir)
4124 (invoke "unzip"
4125 (assoc-ref inputs "jquery-ui")
4126 "-d" dir))
4127 #t))
4128 (delete 'fix-and-disable-failing-tests)
4129 (delete 'check))))) ; These tests weren't run the the past.
4130 ;; Make sure to use special packages for Python 2 instead
4131 ;; of those automatically rewritten by package-with-python2.
4132 (propagated-inputs
4133 `(("python2-pycairo" ,python2-pycairo)
4134 ("python2-backports-functools-lru-cache"
4135 ,python2-backports-functools-lru-cache)
4136 ("python2-functools32" ,python2-functools32)
4137 ("python2-pygobject-2" ,python2-pygobject-2)
4138 ("python2-subprocess32" ,python2-subprocess32)
4139 ("python2-tkinter" ,python-2 "tk")
4140 ,@(fold alist-delete (package-propagated-inputs matplotlib)
4141 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
4142
4143 (define-public python-matplotlib-documentation
4144 (package
4145 (name "python-matplotlib-documentation")
4146 (version (package-version python-matplotlib))
4147 (source (package-source python-matplotlib))
4148 (build-system python-build-system)
4149 (native-inputs
4150 `(("python-matplotlib" ,python-matplotlib)
4151 ("python-colorspacious" ,python-colorspacious)
4152 ("python-sphinx" ,python-sphinx)
4153 ("python-sphinx-copybutton" ,python-sphinx-copybutton)
4154 ("python-sphinx-gallery" ,python-sphinx-gallery)
4155 ("python-numpydoc" ,python-numpydoc)
4156 ("python-ipython" ,python-ipython)
4157 ("python-ipykernel" ,python-ipykernel)
4158 ("python-mock" ,python-mock)
4159 ("graphviz" ,graphviz)
4160 ("texlive" ,(texlive-union (list texlive-amsfonts
4161 texlive-latex-amsmath
4162 texlive-latex-enumitem
4163 texlive-latex-expdlist
4164 texlive-latex-geometry
4165 texlive-latex-preview
4166 texlive-latex-type1cm
4167 texlive-latex-ucs
4168
4169 texlive-generic-pdftex
4170
4171 texlive-fonts-ec
4172 texlive-fonts-adobe-times
4173 texlive-fonts-txfonts)))
4174 ("texinfo" ,texinfo)
4175 ,@(package-native-inputs python-matplotlib)))
4176 (arguments
4177 `(#:tests? #f ; we're only generating documentation
4178 #:phases
4179 (modify-phases %standard-phases
4180 ;; The tests in python-matplotlib are run after the install phase, so
4181 ;; we need to delete the extra phase here.
4182 (delete 'check)
4183 (replace 'build
4184 (lambda _
4185 (chdir "doc")
4186 (setenv "PYTHONPATH"
4187 (string-append (getenv "PYTHONPATH")
4188 ":" (getcwd) "/../examples/units"))
4189 (substitute* "conf.py"
4190 ;; Don't use git.
4191 (("^SHA = check_output.*")
4192 (string-append "SHA = \"" ,version "\"\n"))
4193 ;; Don't fetch intersphinx files from the Internet
4194 (("^explicit_order_folders" m)
4195 (string-append "intersphinx_mapping = {}\n" m))
4196 (("'sphinx.ext.intersphinx',") "")
4197 ;; Disable URL embedding which requires internet access.
4198 (("'https://docs.scipy.org/doc/numpy'") "None")
4199 (("'https://docs.scipy.org/doc/scipy/reference'") "None"))
4200 (invoke "make"
4201 "SPHINXBUILD=sphinx-build"
4202 "SPHINXOPTS=" ; don't abort on warnings
4203 "html" "texinfo")))
4204 (replace 'install
4205 (lambda* (#:key inputs outputs #:allow-other-keys)
4206 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
4207 (doc (string-append data "/doc/python-matplotlib-" ,version))
4208 (info (string-append data "/info"))
4209 (html (string-append doc "/html")))
4210 (mkdir-p html)
4211 (mkdir-p info)
4212 (copy-recursively "build/html" html)
4213 (symlink (string-append html "/_images")
4214 (string-append info "/matplotlib-figures"))
4215 (with-directory-excursion "build/texinfo"
4216 (substitute* "matplotlib.texi"
4217 (("@image\\{([^,]*)" all file)
4218 (string-append "@image{matplotlib-figures/" file)))
4219 (symlink (string-append html "/_images")
4220 "./matplotlib-figures")
4221 (invoke "makeinfo" "--no-split"
4222 "-o" "matplotlib.info" "matplotlib.texi"))
4223 (install-file "build/texinfo/matplotlib.info" info))
4224 #t)))))
4225 (home-page (package-home-page python-matplotlib))
4226 (synopsis "Documentation for the python-matplotlib package")
4227 (description (package-description python-matplotlib))
4228 (license (package-license python-matplotlib))))
4229
4230 (define-public python2-matplotlib-documentation
4231 (let ((parent (package-with-python2 python-matplotlib-documentation)))
4232 (package
4233 (inherit parent)
4234 (native-inputs
4235 (alist-delete "python-sphinx-copybutton"
4236 (package-native-inputs parent))))))
4237
4238 (define-public python-matplotlib-venn
4239 (package
4240 (name "python-matplotlib-venn")
4241 (version "0.11.5")
4242 (source
4243 (origin
4244 (method url-fetch)
4245 (uri (pypi-uri "matplotlib-venn" version ".zip"))
4246 (sha256
4247 (base32
4248 "13w3i1wih0mij08hrgppzg0g9z50y54rc28l6gdi1r5w45l7l0dy"))))
4249 (build-system python-build-system)
4250 (arguments '(#:tests? #f)) ; tests are not included
4251 (propagated-inputs
4252 `(("python-matplotlib" ,python-matplotlib)
4253 ("python-numpy" ,python-numpy)
4254 ("python-scipy" ,python-scipy)))
4255 (native-inputs
4256 `(("unzip" ,unzip)))
4257 (home-page "https://github.com/konstantint/matplotlib-venn")
4258 (synopsis "Plot area-proportional Venn diagrams")
4259 (description
4260 "This package provides tools for plotting area-proportional two- and
4261 three-way Venn diagrams in @code{matplotlib}.")
4262 (license license:expat)))
4263
4264 (define-public python2-pysnptools
4265 (package
4266 (name "python2-pysnptools")
4267 (version "0.3.13")
4268 (source
4269 (origin
4270 (method url-fetch)
4271 (uri (pypi-uri "pysnptools" version))
4272 (sha256
4273 (base32
4274 "0lnis5xsl7bi0hz4f7gbicahzi5zlxkc21nk3g374xv8fb5hb3qm"))))
4275 (build-system python-build-system)
4276 (arguments
4277 `(#:python ,python-2 ; only Python 2.7 is supported
4278 #:tests? #f)) ; test files (e.g. examples/toydata.bim) not included
4279 (propagated-inputs
4280 `(("python2-numpy" ,python2-numpy)
4281 ("python2-scipy" ,python2-scipy)
4282 ("python2-pandas" ,python2-pandas)))
4283 (native-inputs
4284 `(("python2-cython" ,python2-cython)))
4285 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
4286 (synopsis "Library for reading and manipulating genetic data")
4287 (description
4288 "PySnpTools is a library for reading and manipulating genetic data. It
4289 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
4290 those files. It can also efficiently manipulate ranges of integers using set
4291 operators such as union, intersection, and difference.")
4292 (license license:asl2.0)))
4293
4294 (define-public python-socksipy-branch
4295 (package
4296 (name "python-socksipy-branch")
4297 (version "1.01")
4298 (source
4299 (origin
4300 (method url-fetch)
4301 (uri (pypi-uri "SocksiPy-branch" version))
4302 (sha256
4303 (base32
4304 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
4305 (build-system python-build-system)
4306 (arguments
4307 `(#:tests? #f)) ; There are no tests
4308 (home-page "https://code.google.com/archive/p/socksipy-branch/")
4309 (synopsis "Python SOCKS module")
4310 (description
4311 "SocksiPy - A Python SOCKS client module. It provides a
4312 socket-like interface that supports connections to any TCP
4313 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
4314 The original version was developed by Dan Haim, this is a
4315 branch created by Mario Vilas to address some open issues,
4316 as the original project seems to have been abandoned circa 2007.")
4317 (license license:bsd-3)))
4318
4319 (define-public python2-socksipy-branch
4320 (package-with-python2 python-socksipy-branch))
4321
4322 (define-public python-socksipychain
4323 (package
4324 (name "python-socksipychain")
4325 (version "2.1.0")
4326 (source
4327 (origin
4328 (method git-fetch)
4329 (uri (git-reference
4330 (url "https://github.com/pagekite/PySocksipyChain.git")
4331 (commit (string-append "v" version))))
4332 (file-name (git-file-name name version))
4333 (sha256
4334 (base32
4335 "0idm9a050rd2kbgbz2sk9ib9589kj4xh1xdnggs6xbq2v2y8f6zn"))))
4336 (build-system python-build-system)
4337 (arguments
4338 `(#:tests? #f)) ; Tests try to access the network.
4339 (home-page "http://pagekite.net/wiki/Floss/PySocksipyChain/")
4340 (synopsis "Python SOCKS module with chained proxies support")
4341 (description
4342 "SocksiPyChain is a modified version of the SocksiPy SOCKS module, which
4343 adds support for arbitrary chaining of proxy servers and various modes of
4344 TLS/SSL encryption. It was developed for use in PageKite, and also includes
4345 a simple netcat replacement with chaining support.")
4346 (license license:bsd-3)))
4347
4348 (define-public python-pycodestyle
4349 (package
4350 (name "python-pycodestyle")
4351 (version "2.5.0")
4352 (source
4353 (origin
4354 (method url-fetch)
4355 (uri (pypi-uri "pycodestyle" version))
4356 (sha256
4357 (base32
4358 "0v4prb05n21bm8650v0a01k1nyqjdmkrsm3zycfxh2j5k9n962p4"))))
4359 (build-system python-build-system)
4360 (home-page "https://pycodestyle.readthedocs.io/")
4361 (synopsis "Python style guide checker")
4362 (description "@code{pycodestyle} (formerly pep8) is a tool to check
4363 Python code against some of the style conventions in
4364 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
4365 (license license:expat)))
4366
4367 (define-public python2-pycodestyle
4368 (package-with-python2 python-pycodestyle))
4369
4370 (define-public python-multidict
4371 (package
4372 (name "python-multidict")
4373 (version "4.2.0")
4374 (source
4375 (origin
4376 (method url-fetch)
4377 (uri (pypi-uri "multidict" version))
4378 (sha256
4379 (base32
4380 "1vf5bq8hn5a9rvhr5v4fwbmarfsp35hhr8gs74kqfijy34j2f194"))))
4381 (build-system python-build-system)
4382 (native-inputs
4383 `(("python-pytest" ,python-pytest)
4384 ("python-pytest-runner" ,python-pytest-runner)))
4385 (home-page "https://github.com/aio-libs/multidict/")
4386 (synopsis "Multidict implementation")
4387 (description "Multidict is dict-like collection of key-value pairs
4388 where key might be occurred more than once in the container.")
4389 (license license:asl2.0)))
4390
4391 (define-public python-orderedmultidict
4392 (package
4393 (name "python-orderedmultidict")
4394 (version "0.7.11")
4395 (source
4396 (origin
4397 (method url-fetch)
4398 (uri (pypi-uri "orderedmultidict" version))
4399 (sha256
4400 (base32
4401 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
4402 (build-system python-build-system)
4403 (arguments
4404 `(#:phases
4405 (modify-phases %standard-phases
4406 (add-after 'unpack 'fix-tests
4407 (lambda _
4408 ;; The package uses nosetest for running the tests.
4409 ;; Adding this initfile allows to run the test suite
4410 ;; without requiring nosetest.
4411 (with-output-to-file "tests/__init__.py" newline)
4412 #t)))))
4413 (propagated-inputs
4414 `(("python-six" ,python-six)))
4415 (native-inputs
4416 `(("python-pycodestyle" ,python-pycodestyle)))
4417 (home-page "https://github.com/gruns/orderedmultidict")
4418 (synopsis "Python Ordered Multivalue Dictionary - omdict")
4419 (description "This package contains a library for ordered multivalue
4420 dictionaries. A multivalue dictionary is a dictionary that can store
4421 multiple values for the same key. An ordered multivalue dictionary is a
4422 multivalue dictionary that retains the order of insertions and deletions.")
4423 (license license:unlicense)))
4424
4425 (define-public python2-orderedmultidict
4426 (package-with-python2 python-orderedmultidict))
4427
4428 (define-public python-autopep8
4429 (package
4430 (name "python-autopep8")
4431 (version "1.3.5")
4432 (source
4433 (origin
4434 (method url-fetch)
4435 (uri (pypi-uri "autopep8" version))
4436 (sha256
4437 (base32
4438 "192bvhzi4d0claqxgzymvv7k3qnj627742bc8sgxpzjj42pd9112"))))
4439 (build-system python-build-system)
4440 (propagated-inputs
4441 `(("python-pycodestyle" ,python-pycodestyle)))
4442 (home-page "https://github.com/hhatto/autopep8")
4443 (synopsis "Format Python code according to the PEP 8 style guide")
4444 (description
4445 "@code{autopep8} automatically formats Python code to conform to
4446 the PEP 8 style guide. It uses the pycodestyle utility to determine
4447 what parts of the code needs to be formatted. @code{autopep8} is
4448 capable of fixing most of the formatting issues that can be reported
4449 by pycodestyle.")
4450 (license (license:non-copyleft
4451 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
4452
4453 (define-public python2-autopep8
4454 (package-with-python2 python-autopep8))
4455
4456 (define-public python-distutils-extra
4457 (package
4458 (name "python-distutils-extra")
4459 (version "2.38")
4460 (source
4461 (origin
4462 (method url-fetch)
4463 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4464 version "/+download/python-distutils-extra-"
4465 version ".tar.gz"))
4466 (sha256
4467 (base32
4468 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4469 (build-system python-build-system)
4470 (home-page "https://launchpad.net/python-distutils-extra/")
4471 (synopsis "Enhancements to Python's distutils")
4472 (description
4473 "The python-distutils-extra module enables you to easily integrate
4474 gettext support, themed icons, and scrollkeeper-based documentation into
4475 Python's distutils.")
4476 (license license:gpl2)))
4477
4478 (define-public python2-distutils-extra
4479 (package-with-python2 python-distutils-extra))
4480
4481 (define-public python2-elib.intl
4482 (package
4483 (name "python2-elib.intl")
4484 (version "0.0.3")
4485 (source
4486 (origin
4487 ;; This project doesn't tag releases or publish tarballs, so we take
4488 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4489 (method git-fetch)
4490 (uri (git-reference
4491 (url "https://github.com/dieterv/elib.intl.git")
4492 (commit "d09997cfef")))
4493 (file-name (string-append name "-" version "-checkout"))
4494 (sha256
4495 (base32
4496 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4497 (build-system python-build-system)
4498 (arguments
4499 ;; incompatible with Python 3 (exception syntax)
4500 `(#:python ,python-2
4501 #:tests? #f))
4502 (home-page "https://github.com/dieterv/elib.intl")
4503 (synopsis "Enhanced internationalization for Python")
4504 (description
4505 "The elib.intl module provides enhanced internationalization (I18N)
4506 services for your Python modules and applications.")
4507 (license license:lgpl3+)))
4508
4509 (define-public python-olefile
4510 (package
4511 (name "python-olefile")
4512 (version "0.46")
4513 (source
4514 (origin
4515 (method url-fetch)
4516 (uri (string-append "https://github.com/decalage2/olefile/releases/"
4517 "download/v" version "/olefile-" version ".tar.gz"))
4518 (file-name (string-append name "-" version ".tar.gz"))
4519 (sha256
4520 (base32
4521 "1kjxh4gr651hpqkjfv89cfzr40hyvf3vjlda7mifiail83j7j07m"))))
4522 (build-system python-build-system)
4523 (home-page "https://www.decalage.info/python/olefileio")
4524 (synopsis "Read and write Microsoft OLE2 files.")
4525 (description
4526 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
4527 Storage or Compound Document, Microsoft Office). It is an improved version of
4528 the OleFileIO module from PIL, the Python Image Library.")
4529 (license license:bsd-3)))
4530
4531 (define-public python2-olefile
4532 (package-with-python2 python-olefile))
4533
4534 (define-public python-pillow
4535 (package
4536 (name "python-pillow")
4537 (version "6.2.1")
4538 (source
4539 (origin
4540 (method url-fetch)
4541 (uri (pypi-uri "Pillow" version))
4542 (sha256
4543 (base32
4544 "1c8wkzc58f5wdh006jvmwdk3wxld1xgagcbdvj7iv17qi0m9fkmz"))))
4545 (build-system python-build-system)
4546 (native-inputs
4547 `(("python-pytest" ,python-pytest)))
4548 (inputs
4549 `(("freetype" ,freetype)
4550 ("lcms" ,lcms)
4551 ("libjpeg" ,libjpeg)
4552 ("libtiff" ,libtiff)
4553 ("libwebp" ,libwebp)
4554 ("openjpeg" ,openjpeg)
4555 ("zlib" ,zlib)))
4556 (propagated-inputs
4557 `(("python-olefile" ,python-olefile)))
4558 (arguments
4559 `(#:phases
4560 (modify-phases %standard-phases
4561 (add-after 'unpack 'patch-ldconfig
4562 (lambda _
4563 (substitute* "setup.py"
4564 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
4565 (replace 'check
4566 (lambda* (#:key outputs inputs tests? #:allow-other-keys)
4567 (if tests?
4568 (begin
4569 (setenv "HOME" (getcwd))
4570 ;; Make installed package available for running the tests.
4571 (add-installed-pythonpath inputs outputs)
4572 (invoke "python" "selftest.py" "--installed")
4573 (invoke "python" "-m" "pytest" "-vv"))
4574 #t))))))
4575 (home-page "https://python-pillow.org")
4576 (synopsis "Fork of the Python Imaging Library")
4577 (description
4578 "The Python Imaging Library adds image processing capabilities to your
4579 Python interpreter. This library provides extensive file format support, an
4580 efficient internal representation, and fairly powerful image processing
4581 capabilities. The core image library is designed for fast access to data
4582 stored in a few basic pixel formats. It should provide a solid foundation for
4583 a general image processing tool.")
4584 (license (license:x11-style
4585 "http://www.pythonware.com/products/pil/license.htm"
4586 "The PIL Software License"))))
4587
4588 (define-public python2-pillow
4589 (package-with-python2 python-pillow))
4590
4591 (define-public python-pycparser
4592 (package
4593 (name "python-pycparser")
4594 (version "2.19")
4595 (source
4596 (origin
4597 (method url-fetch)
4598 (uri (pypi-uri "pycparser" version))
4599 (sha256
4600 (base32
4601 "1cr5dcj9628lkz1qlwq3fv97c25363qppkmcayqvd05dpy573259"))))
4602 (outputs '("out" "doc"))
4603 (build-system python-build-system)
4604 (native-inputs
4605 `(("pkg-config" ,pkg-config)))
4606 (arguments
4607 `(#:phases
4608 (modify-phases %standard-phases
4609 (replace 'check
4610 (lambda _
4611 (with-directory-excursion "tests"
4612 (invoke "python" "all_tests.py"))
4613 #t))
4614 (add-after 'install 'install-doc
4615 (lambda* (#:key outputs #:allow-other-keys)
4616 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4617 (doc (string-append data "/doc/" ,name "-" ,version))
4618 (examples (string-append doc "/examples")))
4619 (mkdir-p examples)
4620 (for-each (lambda (file)
4621 (copy-file (string-append "." file)
4622 (string-append doc file)))
4623 '("/README.rst" "/CHANGES" "/LICENSE"))
4624 (copy-recursively "examples" examples)
4625 #t))))))
4626 (home-page "https://github.com/eliben/pycparser")
4627 (synopsis "C parser in Python")
4628 (description
4629 "Pycparser is a complete parser of the C language, written in pure Python
4630 using the PLY parsing library. It parses C code into an AST and can serve as
4631 a front-end for C compilers or analysis tools.")
4632 (license license:bsd-3)))
4633
4634 (define-public python2-pycparser
4635 (package-with-python2 python-pycparser))
4636
4637 (define-public python-pywavelets
4638 (package
4639 (name "python-pywavelets")
4640 (version "1.0.1")
4641 (home-page "https://github.com/PyWavelets/pywt")
4642 (source (origin
4643 (method url-fetch)
4644 (uri (pypi-uri "PyWavelets" version))
4645 (sha256
4646 (base32
4647 "1p3qv2v66ghnqrb1f98wyyhp9dz71jwcd6kfpsax65sfdpiyqp1w"))))
4648 (build-system python-build-system)
4649 (arguments
4650 '(#:modules ((ice-9 ftw)
4651 (srfi srfi-1)
4652 (srfi srfi-26)
4653 (guix build utils)
4654 (guix build python-build-system))
4655 #:phases (modify-phases %standard-phases
4656 (replace 'check
4657 (lambda _
4658 (let ((cwd (getcwd))
4659 (libdir (find (cut string-prefix? "lib." <>)
4660 (scandir "build"))))
4661 (with-directory-excursion (string-append cwd "/build/" libdir)
4662 (invoke "nosetests" "-v" "."))))))))
4663 (native-inputs
4664 `(("python-matplotlib" ,python-matplotlib) ;for tests
4665 ("python-nose" ,python-nose)))
4666 (propagated-inputs
4667 `(("python-numpy" ,python-numpy)))
4668 (synopsis "Wavelet transforms in Python")
4669 (description
4670 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
4671 mathematical basis functions that are localized in both time and frequency.
4672 Wavelet transforms are time-frequency transforms employing wavelets. They are
4673 similar to Fourier transforms, the difference being that Fourier transforms are
4674 localized only in frequency instead of in time and frequency.")
4675 (license license:expat)))
4676
4677 (define-public python2-pywavelets
4678 (package-with-python2 python-pywavelets))
4679
4680 (define-public python-xcffib
4681 (package
4682 (name "python-xcffib")
4683 (version "0.6.0")
4684 (source
4685 (origin
4686 (method url-fetch)
4687 (uri (pypi-uri "xcffib" version))
4688 (sha256
4689 (base32
4690 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
4691 (build-system python-build-system)
4692 (inputs
4693 `(("libxcb" ,libxcb)))
4694 (propagated-inputs
4695 `(("python-cffi" ,python-cffi) ; used at run time
4696 ("python-six" ,python-six)))
4697 (arguments
4698 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
4699 #:tests? #f
4700 #:phases
4701 (modify-phases %standard-phases
4702 (add-after 'unpack 'fix-libxcb-path
4703 (lambda* (#:key inputs #:allow-other-keys)
4704 (let ((libxcb (assoc-ref inputs "libxcb")))
4705 (substitute* '("xcffib/__init__.py")
4706 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
4707 #t)))
4708 (add-after 'install 'install-doc
4709 (lambda* (#:key outputs #:allow-other-keys)
4710 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4711 "/doc/" ,name "-" ,version)))
4712 (mkdir-p doc)
4713 (copy-file "README.md"
4714 (string-append doc "/README.md"))
4715 #t))))))
4716 (home-page "https://github.com/tych0/xcffib")
4717 (synopsis "XCB Python bindings")
4718 (description
4719 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4720 support for Python 3 and PyPy. It is based on cffi.")
4721 (license license:expat)))
4722
4723 (define-public python2-xcffib
4724 (package-with-python2 python-xcffib))
4725
4726 (define-public python-cairocffi
4727 (package
4728 (name "python-cairocffi")
4729 (version "0.9.0")
4730 (source
4731 (origin
4732 (method url-fetch)
4733 (uri (pypi-uri "cairocffi" version))
4734 (sha256
4735 (base32
4736 "0dq3k4zhqd8cwsf3nyjqvjqm8wkvrjn1wjf44rl3v0h8kqx6qf0m"))
4737 (patches (search-patches "python-cairocffi-dlopen-path.patch"))))
4738 (build-system python-build-system)
4739 (outputs '("out" "doc"))
4740 (inputs
4741 `(("glib" ,glib)
4742 ("gtk+" ,gtk+)
4743 ("gdk-pixbuf" ,gdk-pixbuf)
4744 ("cairo" ,cairo)
4745 ("pango" ,pango)))
4746 (native-inputs
4747 `(("pkg-config" ,pkg-config)
4748 ("python-pytest" ,python-pytest)
4749 ("python-pytest-cov" ,python-pytest-cov)
4750 ("python-pytest-runner" ,python-pytest-runner)
4751 ("python-sphinx" ,python-sphinx)
4752 ("python-docutils" ,python-docutils)))
4753 (propagated-inputs
4754 `(("python-xcffib" ,python-xcffib))) ; used at run time
4755 (arguments
4756 `(#:phases
4757 (modify-phases %standard-phases
4758 (add-after 'unpack 'patch-paths
4759 (lambda* (#:key inputs outputs #:allow-other-keys)
4760 (substitute* (find-files "." "\\.py$")
4761 (("dlopen\\(ffi, 'cairo'")
4762 (string-append "dlopen(ffi, '" (assoc-ref inputs "cairo")
4763 "/lib/libcairo.so.2'"))
4764 (("dlopen\\(ffi, 'gdk-3'")
4765 (string-append "dlopen(ffi, '" (assoc-ref inputs "gtk+")
4766 "/lib/libgtk-3.so.0'"))
4767 (("dlopen\\(ffi, 'gdk_pixbuf-2.0'")
4768 (string-append "dlopen(ffi, '" (assoc-ref inputs "gdk-pixbuf")
4769 "/lib/libgdk_pixbuf-2.0.so.0'"))
4770 (("dlopen\\(ffi, 'glib-2.0'")
4771 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4772 "/lib/libglib-2.0.so.0'"))
4773 (("dlopen\\(ffi, 'gobject-2.0'")
4774 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4775 "/lib/libgobject-2.0.so.0'"))
4776 (("dlopen\\(ffi, 'pangocairo-1.0'")
4777 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4778 "/lib/libpangocairo-1.0.so.0'"))
4779 (("dlopen\\(ffi, 'pango-1.0'")
4780 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4781 "/lib/libpango-1.0.so.0'")))
4782 #t))
4783 (add-after 'install 'install-doc
4784 (lambda* (#:key inputs outputs #:allow-other-keys)
4785 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4786 (doc (string-append data "/doc/" ,name "-" ,version))
4787 (html (string-append doc "/html")))
4788 (setenv "LD_LIBRARY_PATH"
4789 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4790 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4791 (setenv "LANG" "en_US.UTF-8")
4792 (mkdir-p html)
4793 (for-each (lambda (file)
4794 (copy-file (string-append "." file)
4795 (string-append doc file)))
4796 '("/README.rst" "/CHANGES" "/LICENSE"))
4797 (system* "python" "setup.py" "build_sphinx")
4798 (copy-recursively "docs/_build/html" html)
4799 #t))))))
4800 (home-page "https://github.com/Kozea/cairocffi")
4801 (synopsis "Python bindings and object-oriented API for Cairo")
4802 (description
4803 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4804 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4805 graphics library with support for multiple backends including image buffers,
4806 PNG, PostScript, PDF, and SVG file output.")
4807 (license license:bsd-3)))
4808
4809 (define-public python2-cairocffi
4810 (package-with-python2 python-cairocffi))
4811
4812 (define-public python-decorator
4813 (package
4814 (name "python-decorator")
4815 (version "4.3.0")
4816 (source
4817 (origin
4818 (method url-fetch)
4819 (uri (pypi-uri "decorator" version))
4820 (sha256
4821 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
4822 (build-system python-build-system)
4823 (home-page "https://pypi.org/project/decorator/")
4824 (synopsis "Python module to simplify usage of decorators")
4825 (description
4826 "The aim of the decorator module is to simplify the usage of decorators
4827 for the average programmer, and to popularize decorators usage giving examples
4828 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4829 etc. The core of this module is a decorator factory.")
4830 (license license:expat)))
4831
4832 (define-public python2-decorator
4833 (package-with-python2 python-decorator))
4834
4835 (define-public python-drmaa
4836 (package
4837 (name "python-drmaa")
4838 (version "0.7.7")
4839 (source
4840 (origin
4841 (method url-fetch)
4842 (uri (pypi-uri "drmaa" version))
4843 (sha256
4844 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
4845 (build-system python-build-system)
4846 ;; The test suite requires libdrmaa which is provided by the cluster
4847 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4848 ;; should be set to the path of the libdrmaa library.
4849 (arguments '(#:tests? #f))
4850 (native-inputs
4851 `(("python-nose" ,python-nose)))
4852 (home-page "https://pypi.org/project/drmaa/")
4853 (synopsis "Python bindings for the DRMAA library")
4854 (description
4855 "A Python package for Distributed Resource Management (DRM) job
4856 submission and control. This package is an implementation of the DRMAA 1.0
4857 Python language binding specification.")
4858 (license license:bsd-3)))
4859
4860 (define-public python2-drmaa
4861 (package-with-python2 python-drmaa))
4862
4863 (define-public python-grako
4864 (package
4865 (name "python-grako")
4866 (version "3.99.9")
4867 (source
4868 (origin
4869 (method url-fetch)
4870 (uri
4871 (pypi-uri "grako" version ".zip"))
4872 (sha256
4873 (base32
4874 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
4875 (build-system python-build-system)
4876 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
4877 (native-inputs
4878 `(("unzip" ,unzip)
4879 ("python-pytest" ,python-pytest)
4880 ("python-pytest-runner" ,python-pytest-runner)))
4881 (home-page "https://bitbucket.org/neogeny/grako")
4882 (synopsis "EBNF parser generator")
4883 (description
4884 "Grako takes a grammar in a variation of EBNF as input, and outputs a
4885 memoizing PEG/Packrat parser in Python.")
4886 (license license:bsd-3)))
4887
4888 (define-public python2-grako
4889 (package-with-python2 python-grako))
4890
4891 (define-public python-gridmap
4892 (package
4893 (name "python-gridmap")
4894 (version "0.13.0")
4895 (source
4896 (origin
4897 (method git-fetch)
4898 (uri (git-reference
4899 (url "https://github.com/pygridtools/gridmap.git")
4900 (commit (string-append "v" version))))
4901 (file-name (git-file-name name version))
4902 (sha256
4903 (base32 "1478lbwsr1w24cii2x01m2910fvh8r43ghnb78nc972a96hqiknm"))))
4904 (build-system python-build-system)
4905 (arguments
4906 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
4907 (propagated-inputs
4908 `(("python-psutil" ,python-psutil)
4909 ("python-drmaa" ,python-drmaa)
4910 ("python-pyzmq" ,python-pyzmq)))
4911 (home-page "https://github.com/pygridtools/gridmap")
4912 (synopsis "Create jobs on a cluster directly from Python")
4913 (description
4914 "Gridmap is a Python package to allow you to easily create jobs on the
4915 cluster directly from Python. You can directly map Python functions onto the
4916 cluster without needing to write any wrapper code yourself.")
4917 (license license:gpl3+)))
4918
4919 (define-public python2-gridmap
4920 (package-with-python2 python-gridmap))
4921
4922 (define-public python-honcho
4923 (package
4924 (name "python-honcho")
4925 (version "1.0.1")
4926 (source
4927 (origin
4928 (method git-fetch)
4929 (uri (git-reference
4930 (url "https://github.com/nickstenning/honcho.git")
4931 (commit (string-append "v" version))))
4932 (file-name (git-file-name name version))
4933 (sha256
4934 (base32 "11bd87474qpif20xdcn0ra1idj5k16ka51i658wfpxwc6nzsn92b"))))
4935 (build-system python-build-system)
4936 (native-inputs
4937 `(("python-pytest" ,python-pytest)
4938 ("python-mock" ,python-mock)
4939 ("python-tox" ,python-tox)
4940 ("which" ,which))) ;for tests
4941 (propagated-inputs
4942 `(("python-jinja2" ,python-jinja2)))
4943 (arguments
4944 `(#:phases
4945 (modify-phases %standard-phases
4946 (delete 'check)
4947 (add-after 'install 'check
4948 (lambda* (#:key outputs inputs #:allow-other-keys)
4949 ;; fix honcho path in testsuite
4950 (substitute* "tests/conftest.py"
4951 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
4952 "/bin/honcho" "'")))
4953 ;; It's easier to run tests after install.
4954 ;; Make installed package available for running the tests
4955 (add-installed-pythonpath inputs outputs)
4956 (invoke "py.test" "-v"))))))
4957 (home-page "https://github.com/nickstenning/honcho")
4958 (synopsis "Manage Procfile-based applications")
4959 (description
4960 "A Procfile is a file which describes how to run an application
4961 consisting of several processes. honcho starts all listed processes.
4962 The output of all running processes is collected by honcho and
4963 displayed.")
4964 (license license:expat)))
4965
4966 (define-public python2-honcho
4967 (package-with-python2 python-honcho))
4968
4969 (define-public python-pexpect
4970 (package
4971 (name "python-pexpect")
4972 (version "4.6.0")
4973 (source
4974 (origin
4975 (method url-fetch)
4976 (uri (pypi-uri "pexpect" version))
4977 (sha256
4978 (base32 "1fla85g47iaxxpjhp9vkxdnv4pgc7rplfy6ja491smrrk0jqi3ia"))))
4979 (build-system python-build-system)
4980 (arguments
4981 `(#:phases
4982 (modify-phases %standard-phases
4983 (add-before 'check 'prepare-tests
4984 (lambda _
4985 (substitute* (find-files "tests")
4986 (("/bin/ls") (which "ls"))
4987 (("/bin/echo") (which "echo"))
4988 (("/bin/which") (which "which"))
4989 ;; Many tests try to use the /bin directory which
4990 ;; is not present in the build environment.
4991 ;; Use one that's non-empty and unlikely to change.
4992 (("/bin'") "/dev'"))
4993 ;; XXX: Socket connection test gets "Connection reset by peer".
4994 ;; Why does it not work? Delete for now.
4995 (delete-file "tests/test_socket.py")
4996 #t))
4997 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
4998 (native-inputs
4999 `(("python-nose" ,python-nose)
5000 ("python-pytest" ,python-pytest)
5001 ("man-db" ,man-db)
5002 ("which" ,which)
5003 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
5004 (propagated-inputs
5005 `(("python-ptyprocess" ,python-ptyprocess)))
5006 (home-page "http://pexpect.readthedocs.org/")
5007 (synopsis "Controlling interactive console applications")
5008 (description
5009 "Pexpect is a pure Python module for spawning child applications;
5010 controlling them; and responding to expected patterns in their output.
5011 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
5012 child application and control it as if a human were typing commands.")
5013 (license license:isc)))
5014
5015 (define-public python2-pexpect
5016 (package-with-python2 python-pexpect))
5017
5018 (define-public python-setuptools-scm
5019 (package
5020 (name "python-setuptools-scm")
5021 (version "3.2.0")
5022 (source (origin
5023 (method url-fetch)
5024 (uri (pypi-uri "setuptools_scm" version))
5025 (sha256
5026 (base32
5027 "0n3knn3p1sqlx31k2lahn7z9bacvlv8nhlfidj77vz50bxqlgasj"))))
5028 (build-system python-build-system)
5029 (home-page "https://github.com/pypa/setuptools_scm/")
5030 (synopsis "Manage Python package versions in SCM metadata")
5031 (description
5032 "Setuptools_scm handles managing your Python package versions in
5033 @dfn{software configuration management} (SCM) metadata instead of declaring
5034 them as the version argument or in a SCM managed file.")
5035 (license license:expat)))
5036
5037 ;; Needed by python-lazy-object-proxy, remove on next update cycle.
5038 (define-public python-setuptools-scm-3.3
5039 (package
5040 (inherit python-setuptools-scm)
5041 (version "3.3.3")
5042 (source (origin
5043 (method url-fetch)
5044 (uri (pypi-uri "setuptools_scm" version))
5045 (sha256
5046 (base32
5047 "19cyndx23xmpbhz4qrwmfwsmnnaczd0dw7qg977ksq2dbvxy29dx"))))))
5048
5049 (define-public python2-setuptools-scm
5050 (package-with-python2 python-setuptools-scm))
5051
5052 (define-public python-pathlib2
5053 (package
5054 (name "python-pathlib2")
5055 (version "2.3.3")
5056 (source
5057 (origin
5058 (method url-fetch)
5059 (uri (pypi-uri "pathlib2" version))
5060 (sha256
5061 (base32
5062 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
5063 (build-system python-build-system)
5064 (propagated-inputs
5065 `(("python-scandir" ,python-scandir)
5066 ("python-six" ,python-six)))
5067 (home-page "https://pypi.org/project/pathlib2/")
5068 (synopsis "Object-oriented file system paths")
5069 (description "The goal of pathlib2 is to provide a backport of the
5070 standard @code{pathlib} module which tracks the standard library module, so
5071 all the newest features of the standard @code{pathlib} can be used also on
5072 older Python versions.")
5073 (license license:expat)))
5074
5075 (define-public python2-importlib-resources
5076 (package
5077 (name "python2-importlib-resources")
5078 (version "1.0.2")
5079 (source (origin
5080 (method url-fetch)
5081 (uri (pypi-uri "importlib_resources" version))
5082 (sha256
5083 (base32
5084 "0y3hg12iby1qyaspnbisz4s4vxax7syikk3skznwqizqyv89y9yk"))))
5085 (build-system python-build-system)
5086 (arguments
5087 `(#:python ,python-2))
5088 (native-inputs
5089 `(("python-wheel" ,python2-wheel)))
5090 (propagated-inputs
5091 `(("python-pathlib2" ,python2-pathlib2)
5092 ("python-typing" ,python2-typing)))
5093 (home-page "https://gitlab.com/python-devs/importlib_resources")
5094 (synopsis "Backport of @code{importlib.resources} from Python 3.7")
5095 (description
5096 "This package provides an implementation of @code{importlib.resources}
5097 for older versions of Python.")
5098 (license license:asl2.0)))
5099
5100 (define-public python-importlib-metadata
5101 (package
5102 (name "python-importlib-metadata")
5103 (version "1.4.0")
5104 (source
5105 (origin
5106 (method url-fetch)
5107 (uri (pypi-uri "importlib_metadata" version))
5108 (sha256
5109 (base32 "1n76444v7zn910xrhh8954jdn4byxbn9f1jck6b85a716mbh2z7i"))))
5110 (build-system python-build-system)
5111 (propagated-inputs
5112 `(("python-zipp" ,python-zipp)))
5113 (native-inputs
5114 `(("python-setuptools-scm" ,python-setuptools-scm)
5115 ("python-packaging" ,python-packaging)))
5116 (home-page "https://importlib-metadata.readthedocs.io/")
5117 (synopsis "Read metadata from Python packages")
5118 (description
5119 "@code{importlib_metadata} is a library which provides an API for
5120 accessing an installed Python package's metadata, such as its entry points or
5121 its top-level name. This functionality intends to replace most uses of
5122 @code{pkg_resources} entry point API and metadata API. Along with
5123 @code{importlib.resources} in Python 3.7 and newer, this can eliminate the
5124 need to use the older and less efficient @code{pkg_resources} package.")
5125 (properties `((python2-variant . ,(delay python2-importlib-metadata))))
5126 (license license:asl2.0)))
5127
5128 (define-public python2-importlib-metadata
5129 (let ((base (package-with-python2 (strip-python2-variant
5130 python-importlib-metadata))))
5131 (package/inherit
5132 base
5133 (name "python2-importlib-metadata")
5134 (propagated-inputs
5135 `(("python-configparser" ,python2-configparser)
5136 ("python-contextlib2" ,python2-contextlib2)
5137 ("python-importlib-resources" ,python2-importlib-resources)
5138 ("python-pathlib2" ,python2-pathlib2)
5139 ,@(package-propagated-inputs base))))))
5140
5141 (define-public python-jaraco-packaging
5142 (package
5143 (name "python-jaraco-packaging")
5144 (version "6.1")
5145 (source
5146 (origin
5147 (method url-fetch)
5148 (uri (pypi-uri "jaraco.packaging" version))
5149 (sha256
5150 (base32
5151 "0zimrnkh33b9g8ffw11mjh6kvs54cy5gcjw1h5cl1r7dc833dmkm"))))
5152 (build-system python-build-system)
5153 (propagated-inputs
5154 `(("python-pytest" ,python-pytest)
5155 ("python-pytest-checkdocs" ,python-pytest-checkdocs)
5156 ("python-pytest-flake8" ,python-pytest-flake8)
5157 ("python-rst.linker" ,python-rst.linker)
5158 ("python-setuptools" ,python-setuptools)
5159 ("python-setuptools-scm" ,python-setuptools-scm)
5160 ("python-six" ,python-six)
5161 ("python-sphinx" ,python-sphinx)))
5162 (home-page "https://github.com/jaraco/jaraco.packaging")
5163 (synopsis "Tools to supplement packaging Python releases")
5164 (description
5165 "This package provides various tools to supplement packaging Python
5166 releases.")
5167 (license license:expat)))
5168
5169 (define-public python-pathpy
5170 (package
5171 (name "python-pathpy")
5172 (version "11.5.1")
5173 (source
5174 (origin
5175 (method url-fetch)
5176 (uri (pypi-uri "path.py" version))
5177 (sha256
5178 (base32 "0ir9j1haq2jbi7aip6k2fa9l7q1l03k4hp1awxhjhcwzsnwp3ll8"))))
5179 (outputs '("out" "doc"))
5180 (build-system python-build-system)
5181 (propagated-inputs
5182 `(("python-appdirs" ,python-appdirs)
5183 ("python-importlib-metadata" ,python-importlib-metadata)))
5184 (native-inputs
5185 `(("python-setuptools-scm" ,python-setuptools-scm)
5186 ("python-sphinx" ,python-sphinx)
5187 ("python-rst.linker" ,python-rst.linker)
5188 ("python-pytest" ,python-pytest)
5189 ("python-pytest-runner" ,python-pytest-runner)
5190 ("python-jaraco-packaging" ,python-jaraco-packaging)))
5191 (arguments
5192 `(#:phases
5193 (modify-phases %standard-phases
5194 (add-after 'build 'build-doc
5195 (lambda _
5196 (setenv "LANG" "en_US.UTF-8")
5197 (invoke "python" "setup.py" "build_sphinx")))
5198 (add-after 'install 'install-doc
5199 (lambda* (#:key outputs #:allow-other-keys)
5200 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5201 (doc (string-append data "/doc/" ,name "-" ,version))
5202 (html (string-append doc "/html")))
5203 (mkdir-p html)
5204 (for-each (lambda (file)
5205 (copy-file file (string-append doc "/" file)))
5206 '("README.rst" "CHANGES.rst"))
5207 (copy-recursively "build/sphinx/html" html)
5208 #t)))
5209 (replace 'check
5210 (lambda _
5211 ;; The import time test aborts if an import takes longer than
5212 ;; 100ms. It may very well take a little longer than that.
5213 (invoke "pytest" "-v" "-k" "not test_import_time"))))))
5214 (home-page "https://github.com/jaraco/path.py")
5215 (synopsis "Python module wrapper for built-in os.path")
5216 (description
5217 "@code{path.py} implements path objects as first-class entities, allowing
5218 common operations on files to be invoked on those path objects directly.")
5219 (license license:expat)))
5220
5221 (define-public python2-pathpy
5222 (package-with-python2 python-pathpy))
5223
5224 (define-public python-simplegeneric
5225 (package
5226 (name "python-simplegeneric")
5227 (version "0.8.1")
5228 (source
5229 (origin
5230 (method url-fetch)
5231 (uri (pypi-uri "simplegeneric" version ".zip"))
5232 (sha256
5233 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
5234 (build-system python-build-system)
5235 (native-inputs
5236 `(("unzip" ,unzip)))
5237 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
5238 (synopsis "Python module for simple generic functions")
5239 (description
5240 "The simplegeneric module lets you define simple single-dispatch generic
5241 functions, akin to Python’s built-in generic functions like @code{len()},
5242 @code{iter()} and so on. However, instead of using specially-named methods,
5243 these generic functions use simple lookup tables, akin to those used by
5244 e.g. @code{pickle.dump()} and other generic functions found in the Python
5245 standard library.")
5246 (license license:zpl2.1)))
5247
5248 (define-public python2-simplegeneric
5249 (package-with-python2 python-simplegeneric))
5250
5251 (define-public python-ipython-genutils
5252 ;; TODO: This package is retired, check if can be removed, see description.
5253 (package
5254 (name "python-ipython-genutils")
5255 (version "0.1.0")
5256 (source
5257 (origin
5258 (method url-fetch)
5259 (uri (pypi-uri "ipython_genutils" version))
5260 (sha256
5261 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
5262 (build-system python-build-system)
5263 (arguments `(#:tests? #f)) ; no tests
5264 (home-page "https://ipython.org")
5265 (synopsis "Vestigial utilities from IPython")
5266 (description
5267 "This package provides retired utilities from IPython. No packages
5268 outside IPython/Jupyter should depend on it.
5269
5270 This package shouldn't exist. It contains some common utilities shared by
5271 Jupyter and IPython projects during The Big Split. As soon as possible, those
5272 packages will remove their dependency on this, and this package will go
5273 away.")
5274 (license license:bsd-3)))
5275
5276 (define-public python2-ipython-genutils
5277 (package-with-python2 python-ipython-genutils))
5278
5279 (define-public python-traitlets
5280 (package
5281 (name "python-traitlets")
5282 (version "4.3.3")
5283 (source
5284 (origin
5285 (method url-fetch)
5286 (uri (pypi-uri "traitlets" version))
5287 (sha256
5288 (base32
5289 "1xsrwgivpkxlbr4dfndfsi098s29yqgswgjc1qqn69yxklvfw8yh"))))
5290 (build-system python-build-system)
5291 (arguments
5292 `(#:phases
5293 (modify-phases %standard-phases
5294 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
5295 (propagated-inputs
5296 `(("python-ipython-genutils" ,python-ipython-genutils)
5297 ("python-decorator" ,python-decorator)))
5298 (native-inputs
5299 `(("python-pytest" ,python-pytest)))
5300 (properties `((python2-variant . ,(delay python2-traitlets))))
5301 (home-page "https://ipython.org")
5302 (synopsis "Configuration system for Python applications")
5303 (description
5304 "Traitlets is a framework that lets Python classes have attributes with
5305 type checking, dynamically calculated default values, and ‘on change’
5306 callbacks. The package also includes a mechanism to use traitlets for
5307 configuration, loading values from files or from command line arguments. This
5308 is a distinct layer on top of traitlets, so you can use traitlets in your code
5309 without using the configuration machinery.")
5310 (license license:bsd-3)))
5311
5312 (define-public python2-traitlets
5313 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
5314 (package
5315 (inherit traitlets)
5316 (propagated-inputs
5317 `(("python2-enum34" ,python2-enum34)
5318 ,@(package-propagated-inputs traitlets))))))
5319
5320 (define-public python-jupyter-core
5321 (package
5322 (name "python-jupyter-core")
5323 (version "4.4.0")
5324 (source
5325 (origin
5326 (method url-fetch)
5327 (uri (string-append (pypi-uri "jupyter_core" version)))
5328 (sha256
5329 (base32
5330 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
5331 (build-system python-build-system)
5332 ;; FIXME: not sure how to run the tests
5333 (arguments `(#:tests? #f))
5334 (propagated-inputs
5335 `(("python-traitlets" ,python-traitlets)))
5336 (home-page "http://jupyter.org/")
5337 (synopsis "Jupyter base package")
5338 (description
5339 "Jupyter core is the base package on which Jupyter projects rely.")
5340 (license license:bsd-3)))
5341
5342 (define-public python2-jupyter-core
5343 (package-with-python2 python-jupyter-core))
5344
5345 (define-public python-jupyter-client
5346 (package
5347 (name "python-jupyter-client")
5348 (version "5.2.4")
5349 (source
5350 (origin
5351 (method url-fetch)
5352 (uri (pypi-uri "jupyter_client" version))
5353 (sha256
5354 (base32
5355 "0l9mh7ccrpl3lppym3dnky8n1nk7xarzzdcxf4q2s7aw203cpydm"))))
5356 (build-system python-build-system)
5357 ;; Tests fail because of missing native python kernel which I assume is
5358 ;; provided by the ipython package, which we cannot use because it would
5359 ;; cause a dependency cycle.
5360 (arguments
5361 `(#:tests? #f
5362
5363 #:phases (modify-phases %standard-phases
5364 (add-after 'unpack 'set-tool-file-names
5365 (lambda* (#:key inputs #:allow-other-keys)
5366 (let ((iproute (assoc-ref inputs "iproute")))
5367 (substitute* "jupyter_client/localinterfaces.py"
5368 (("'ip'")
5369 (string-append "'" iproute "/sbin/ip'")))
5370 #t))))))
5371 (inputs
5372 `(("iproute" ,iproute)))
5373 (propagated-inputs
5374 `(("python-pyzmq" ,python-pyzmq)
5375 ("python-traitlets" ,python-traitlets)
5376 ("python-jupyter-core" ,python-jupyter-core)))
5377 (home-page "http://jupyter.org/")
5378 (synopsis "Jupyter protocol implementation and client libraries")
5379 (description
5380 "The @code{jupyter_client} package contains the reference implementation
5381 of the Jupyter protocol. It also provides client and kernel management APIs
5382 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
5383 installing @code{kernelspec}s for use with Jupyter frontends.")
5384 (license license:bsd-3)))
5385
5386 (define-public python2-jupyter-client
5387 (package-with-python2 python-jupyter-client))
5388
5389 (define-public python-ipykernel
5390 (package
5391 (name "python-ipykernel")
5392 (version "5.1.3")
5393 (source
5394 (origin
5395 (method url-fetch)
5396 (uri (pypi-uri "ipykernel" version))
5397 (sha256
5398 (base32 "1a08y677lpn80qzvv7z0smgggmr5m5ayf0bs6vds47xpxl9sss5k"))))
5399 (build-system python-build-system)
5400 (arguments
5401 `(#:phases
5402 (modify-phases %standard-phases
5403 (replace 'check
5404 (lambda _
5405 (setenv "HOME" "/tmp")
5406 (invoke "pytest" "-v")
5407 #t))
5408 (add-after 'install 'set-python-file-name
5409 (lambda* (#:key outputs #:allow-other-keys)
5410 ;; Record the absolute file name of the 'python' executable in
5411 ;; 'kernel.json'.
5412 (let ((out (assoc-ref outputs "out")))
5413 (substitute* (string-append out "/share/jupyter"
5414 "/kernels/python3/kernel.json")
5415 (("\"python\"")
5416 (string-append "\"" (which "python") "\"")))
5417 #t))))))
5418 (propagated-inputs
5419 `(("python-ipython" ,python-ipython)
5420 ;; imported at runtime during connect
5421 ("python-jupyter-client" ,python-jupyter-client)))
5422 (native-inputs
5423 `(("python-flaky" ,python-flaky)
5424 ("python-nose" ,python-nose)
5425 ("python-pytest" ,python-pytest)))
5426 (home-page "https://ipython.org")
5427 (synopsis "IPython Kernel for Jupyter")
5428 (description
5429 "This package provides the IPython kernel for Jupyter.")
5430 (license license:bsd-3)))
5431
5432 ;; Version 5.1.1 and above no longer support Python 2.
5433 (define-public python2-ipykernel
5434 (package
5435 (name "python2-ipykernel")
5436 (version "5.1.0")
5437 (source
5438 (origin
5439 (method url-fetch)
5440 (uri (pypi-uri "ipykernel" version))
5441 (sha256
5442 (base32 "0br95qhrd5k65g10djngiy27hs0642301hlf2q142i8djabvzh0g"))))
5443 (build-system python-build-system)
5444 (arguments
5445 `(#:python ,python-2
5446 #:phases
5447 (modify-phases %standard-phases
5448 (replace 'check
5449 (lambda _
5450 (setenv "HOME" "/tmp")
5451 (invoke "pytest" "-v")
5452 #t)))))
5453 (propagated-inputs
5454 `(("python2-ipython" ,python2-ipython)
5455 ;; imported at runtime during connect
5456 ("python2-jupyter-client" ,python2-jupyter-client)))
5457 (native-inputs
5458 `(("python2-pytest" ,python2-pytest)
5459 ("python2-nose" ,python2-nose)))
5460 (home-page "https://ipython.org")
5461 (synopsis "IPython Kernel for Jupyter")
5462 (description
5463 "This package provides the IPython kernel for Jupyter.")
5464 (license license:bsd-3)))
5465
5466 (define-public python-pari-jupyter
5467 (package
5468 (name "python-pari-jupyter")
5469 (version "1.3.2")
5470 (source
5471 (origin
5472 (method url-fetch)
5473 (uri (pypi-uri "pari_jupyter" version))
5474 (sha256
5475 (base32
5476 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
5477 (build-system python-build-system)
5478 (propagated-inputs
5479 `(("python-ipykernel" ,python-ipykernel)))
5480 (inputs
5481 `(("pari-gp" ,pari-gp)
5482 ("readline" ,readline)))
5483 (arguments
5484 `(#:tests? #f)) ; no test suite
5485 (home-page
5486 "https://github.com/jdemeyer/pari_jupyter")
5487 (synopsis "A Jupyter kernel for PARI/GP")
5488 (description "The package provides a PARI/GP kernel for Jupyter.")
5489 (license license:gpl3+)))
5490
5491 (define-public python-backcall
5492 (package
5493 (name "python-backcall")
5494 (version "0.1.0")
5495 (source
5496 (origin
5497 (method url-fetch)
5498 (uri (pypi-uri "backcall" version))
5499 (sha256
5500 (base32
5501 "1r01dqch3f8fdj3n6fviw8hxqrs6w5v0qw4izmvqzry1w9dxiv1q"))))
5502 (build-system python-build-system)
5503 (home-page "https://github.com/takluyver/backcall/")
5504 (synopsis "Specifications for callback functions passed in to an API")
5505 (description
5506 "If your code lets other people supply callback functions, it's important
5507 to specify the function signature you expect, and check that functions support
5508 that. Adding extra parameters later would break other peoples code unless
5509 you're careful. The @code{backcall} package provides a way of specifying the
5510 callback signature using a prototype function.")
5511 (license license:bsd-3)))
5512
5513 ;; This is the latest release of the LTS version of ipython with support for
5514 ;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
5515 ;; dropped support for Python 2.7.
5516 (define-public python2-ipython
5517 (package
5518 (name "python2-ipython")
5519 (version "5.8.0")
5520 (source
5521 (origin
5522 (method url-fetch)
5523 (uri (pypi-uri "ipython" version ".tar.gz"))
5524 (sha256
5525 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
5526 (build-system python-build-system)
5527 (propagated-inputs
5528 `(("python2-backports-shutil-get-terminal-size"
5529 ,python2-backports-shutil-get-terminal-size)
5530 ("python2-pathlib2" ,python2-pathlib2)
5531 ("python2-pyzmq" ,python2-pyzmq)
5532 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
5533 ("python2-terminado" ,python2-terminado)
5534 ("python2-matplotlib" ,python2-matplotlib)
5535 ("python2-numpy" ,python2-numpy)
5536 ("python2-numpydoc" ,python2-numpydoc)
5537 ("python2-jinja2" ,python2-jinja2)
5538 ("python2-mistune" ,python2-mistune)
5539 ("python2-pexpect" ,python2-pexpect)
5540 ("python2-pickleshare" ,python2-pickleshare)
5541 ("python2-simplegeneric" ,python2-simplegeneric)
5542 ("python2-jsonschema" ,python2-jsonschema)
5543 ("python2-traitlets" ,python2-traitlets)
5544 ("python2-nbformat" ,python2-nbformat)
5545 ("python2-pygments" ,python2-pygments)))
5546 (inputs
5547 `(("readline" ,readline)
5548 ("which" ,which)))
5549 (native-inputs
5550 `(("graphviz" ,graphviz)
5551 ("pkg-config" ,pkg-config)
5552 ("python2-requests" ,python2-requests) ;; for tests
5553 ("python2-testpath" ,python2-testpath)
5554 ("python2-mock" ,python2-mock)
5555 ("python2-nose" ,python2-nose)))
5556 (arguments
5557 `(#:python ,python-2
5558 #:phases
5559 (modify-phases %standard-phases
5560 (add-before 'check 'delete-broken-tests
5561 (lambda* (#:key inputs #:allow-other-keys)
5562 ;; These tests throw errors for unknown reasons.
5563 (delete-file "IPython/core/tests/test_profile.py")
5564 (delete-file "IPython/core/tests/test_interactiveshell.py")
5565 (delete-file "IPython/core/tests/test_magic.py")
5566 #t)))))
5567 (home-page "https://ipython.org")
5568 (synopsis "IPython is a tool for interactive computing in Python")
5569 (description
5570 "IPython provides a rich architecture for interactive computing with:
5571 Powerful interactive shells, a browser-based notebook, support for interactive
5572 data visualization, embeddable interpreters and tools for parallel
5573 computing.")
5574 (license license:bsd-3)))
5575
5576 (define-public python-ipython
5577 (package
5578 (name "python-ipython")
5579 (version "7.9.0")
5580 (source
5581 (origin
5582 (method url-fetch)
5583 (uri (pypi-uri "ipython" version ".tar.gz"))
5584 (sha256
5585 (base32 "103jkw18z7fnwdal1mdbijjxi1fndzn31g887lmj7ddpf2r07lyz"))))
5586 (build-system python-build-system)
5587 (propagated-inputs
5588 `(("python-backcall" ,python-backcall)
5589 ("python-pyzmq" ,python-pyzmq)
5590 ("python-prompt-toolkit" ,python-prompt-toolkit)
5591 ("python-terminado" ,python-terminado)
5592 ("python-matplotlib" ,python-matplotlib)
5593 ("python-numpy" ,python-numpy)
5594 ("python-numpydoc" ,python-numpydoc)
5595 ("python-jedi" ,python-jedi)
5596 ("python-jinja2" ,python-jinja2)
5597 ("python-mistune" ,python-mistune)
5598 ("python-pexpect" ,python-pexpect)
5599 ("python-pickleshare" ,python-pickleshare)
5600 ("python-simplegeneric" ,python-simplegeneric)
5601 ("python-jsonschema" ,python-jsonschema)
5602 ("python-traitlets" ,python-traitlets)
5603 ("python-nbformat" ,python-nbformat)
5604 ("python-pygments" ,python-pygments)))
5605 (inputs
5606 `(("readline" ,readline)
5607 ("which" ,which)))
5608 (native-inputs
5609 `(("graphviz" ,graphviz)
5610 ("pkg-config" ,pkg-config)
5611 ("python-requests" ,python-requests) ;; for tests
5612 ("python-testpath" ,python-testpath)
5613 ("python-nose" ,python-nose)))
5614 (arguments
5615 `(#:phases
5616 (modify-phases %standard-phases
5617 (add-after 'unpack 'make-docs-reproducible
5618 (lambda _
5619 (substitute* "IPython/sphinxext/ipython_directive.py"
5620 ((".*import datetime") "")
5621 ((".*datetime.datetime.now\\(\\)") "")
5622 (("%timeit") "# %timeit"))
5623 #t))
5624 ;; Tests can only be run after the library has been installed and not
5625 ;; within the source directory.
5626 (delete 'check)
5627 (add-after 'install 'check
5628 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5629 (if tests?
5630 (begin
5631 ;; Make installed package available for running the tests
5632 (add-installed-pythonpath inputs outputs)
5633 (setenv "HOME" "/tmp/") ;; required by a test
5634 ;; We only test the core because one of the other tests
5635 ;; tries to import ipykernel.
5636 (invoke "python" "IPython/testing/iptest.py"
5637 "-v" "IPython/core/tests"))
5638 #t)))
5639 (add-before 'check 'fix-tests
5640 (lambda* (#:key inputs #:allow-other-keys)
5641 (substitute* "./IPython/utils/_process_posix.py"
5642 (("/usr/bin/env', 'which") (which "which")))
5643 (substitute* "./IPython/core/tests/test_inputtransformer.py"
5644 (("#!/usr/bin/env python")
5645 (string-append "#!" (which "python"))))
5646 ;; This test introduces a circular dependency on ipykernel
5647 ;; (which depends on ipython).
5648 (delete-file "IPython/core/tests/test_display.py")
5649 ;; AttributeError: module 'IPython.core' has no attribute 'formatters'
5650 (delete-file "IPython/core/tests/test_interactiveshell.py")
5651 #t)))))
5652 (home-page "https://ipython.org")
5653 (synopsis "IPython is a tool for interactive computing in Python")
5654 (description
5655 "IPython provides a rich architecture for interactive computing with:
5656 Powerful interactive shells, a browser-based notebook, support for interactive
5657 data visualization, embeddable interpreters and tools for parallel
5658 computing.")
5659 (license license:bsd-3)))
5660
5661 (define-public python-ipython-documentation
5662 (package
5663 (inherit python-ipython)
5664 (name "python-ipython-documentation")
5665 (version (package-version python-ipython))
5666 (arguments
5667 `(#:phases
5668 (modify-phases %standard-phases
5669 (delete 'build)
5670 (delete 'check)
5671 (replace 'install
5672 (lambda* (#:key outputs #:allow-other-keys)
5673 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
5674 (doc (string-append data "/doc/" ,name "-" ,version))
5675 (html (string-append doc "/html"))
5676 (man1 (string-append data "/man/man1"))
5677 (info (string-append data "/info"))
5678 (examples (string-append doc "/examples"))
5679 (python-arg (string-append "PYTHON=" (which "python"))))
5680 (setenv "LANG" "en_US.utf8")
5681 (with-directory-excursion "docs"
5682 ;; FIXME: pdf fails to build
5683 ;;(system* "make" "pdf" "PAPER=a4")
5684 (system* "make" python-arg "html")
5685 ;; FIXME: the generated texi file contains ^@^@, which trips
5686 ;; up the parser.
5687 ;; (system* "make" python-arg "info")
5688 )
5689 (copy-recursively "docs/man" man1)
5690 (copy-recursively "examples" examples)
5691 (copy-recursively "docs/build/html" html)
5692 ;; (copy-file "docs/build/latex/ipython.pdf"
5693 ;; (string-append doc "/ipython.pdf"))
5694 (mkdir-p info)
5695 ;; (copy-file "docs/build/texinfo/ipython.info"
5696 ;; (string-append info "/ipython.info"))
5697 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
5698 #t)))))
5699 (inputs
5700 `(("python-ipython" ,python-ipython)
5701 ("python-ipykernel" ,python-ipykernel)))
5702 (native-inputs
5703 `(("python-sphinx" ,python-sphinx)
5704 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
5705 ;; FIXME: It's possible that a smaller union would work just as well.
5706 ("texlive" ,(texlive-union (list texlive-amsfonts
5707 texlive-fonts-ec
5708 texlive-generic-ifxetex
5709 texlive-generic-pdftex
5710 texlive-latex-capt-of
5711 texlive-latex-cmap
5712 texlive-latex-environ
5713 texlive-latex-eqparbox
5714 texlive-latex-etoolbox
5715 texlive-latex-expdlist
5716 texlive-latex-fancyhdr
5717 texlive-latex-fancyvrb
5718 texlive-latex-fncychap
5719 texlive-latex-float
5720 texlive-latex-framed
5721 texlive-latex-geometry
5722 texlive-latex-graphics
5723 texlive-latex-hyperref
5724 texlive-latex-mdwtools
5725 texlive-latex-multirow
5726 texlive-latex-needspace
5727 texlive-latex-oberdiek
5728 texlive-latex-parskip
5729 texlive-latex-preview
5730 texlive-latex-tabulary
5731 texlive-latex-threeparttable
5732 texlive-latex-titlesec
5733 texlive-latex-trimspaces
5734 texlive-latex-ucs
5735 texlive-latex-upquote
5736 texlive-latex-url
5737 texlive-latex-varwidth
5738 texlive-latex-wrapfig)))
5739 ("texinfo" ,texinfo)))))
5740
5741 (define-public python-urwid
5742 (package
5743 (name "python-urwid")
5744 (version "2.0.1")
5745 (source
5746 (origin
5747 (method url-fetch)
5748 (uri (pypi-uri "urwid" version))
5749 (sha256
5750 (base32
5751 "1g6cpicybvbananpjikmjk8npmjk4xvak1wjzji62wc600wkwkb4"))))
5752 (build-system python-build-system)
5753 (home-page "http://urwid.org")
5754 (synopsis "Console user interface library for Python")
5755 (description
5756 "Urwid is a curses-based UI/widget library for Python. It includes many
5757 features useful for text console applications.")
5758 (license license:lgpl2.1+)))
5759
5760 (define-public python2-urwid
5761 (package-with-python2 python-urwid))
5762
5763 (define-public python-urwidtrees
5764 (package
5765 (name "python-urwidtrees")
5766 (version "1.0.2")
5767 (source
5768 (origin
5769 (method git-fetch)
5770 ;; package author intends on distributing via github rather than pypi:
5771 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
5772 (uri (git-reference
5773 (url "https://github.com/pazz/urwidtrees")
5774 (commit version)))
5775 (file-name (git-file-name name version))
5776 (sha256
5777 (base32
5778 "1n1kpidvkdnsqyb82vlvk78gmly96kh8351lqxn2pzgwwns6fml2"))))
5779 (build-system python-build-system)
5780 (arguments
5781 '(#:use-setuptools? #f
5782 #:tests? #f)) ; no tests
5783 (propagated-inputs `(("python-urwid" ,python-urwid)))
5784 (home-page "https://github.com/pazz/urwidtrees")
5785 (synopsis "Tree widgets for urwid")
5786 (description "Urwidtrees is a Widget Container API for the @code{urwid}
5787 toolkit. Use it to build trees of widgets.")
5788 (license license:gpl3+)))
5789
5790 (define-public python2-urwidtrees
5791 (package-with-python2 python-urwidtrees))
5792
5793 (define-public python-ua-parser
5794 (package
5795 (name "python-ua-parser")
5796 (version "0.8.0")
5797 (source
5798 (origin
5799 (method url-fetch)
5800 (uri (pypi-uri "ua-parser" version))
5801 (sha256
5802 (base32
5803 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
5804 (build-system python-build-system)
5805 (arguments
5806 `(#:tests? #f)) ;no test suite in release
5807 (native-inputs
5808 `(("python-pyyaml" ,python-pyyaml)))
5809 (home-page "https://github.com/ua-parser/uap-python")
5810 (synopsis "User agent parser")
5811 (description
5812 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
5813 (license license:asl2.0)))
5814
5815 (define-public python2-ua-parser
5816 (package-with-python2 python-ua-parser))
5817
5818 (define-public python-user-agents
5819 (package
5820 (name "python-user-agents")
5821 (version "1.1.0")
5822 (source
5823 (origin
5824 (method url-fetch)
5825 (uri (pypi-uri "user-agents" version))
5826 (sha256
5827 (base32
5828 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
5829 (build-system python-build-system)
5830 (arguments
5831 `(#:tests? #f)) ;missing devices.json test file in release
5832 (propagated-inputs
5833 `(("python-ua-parser" ,python-ua-parser)))
5834 (home-page "https://github.com/selwin/python-user-agents")
5835 (synopsis "User Agent strings parsing library")
5836 (description
5837 "A library to identify devices (phones, tablets) and their capabilities by
5838 parsing (browser/HTTP) user agent strings.")
5839 (license license:expat)))
5840
5841 (define-public python2-user-agents
5842 (package-with-python2 python-user-agents))
5843
5844 (define-public python-dbus
5845 (package
5846 (name "python-dbus")
5847 (version "1.2.14")
5848 (source
5849 (origin
5850 (method url-fetch)
5851 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
5852 "dbus-python-" version ".tar.gz"))
5853 (sha256
5854 (base32 "0cdchkgnivlka4lf8q4qfk0yxq483i3r3aqickjf8hfn7nx0c0mi"))))
5855 (build-system gnu-build-system)
5856 (native-inputs
5857 `(("pkg-config" ,pkg-config)))
5858 (inputs
5859 `(("python" ,python-wrapper)
5860 ("dbus-glib" ,dbus-glib)))
5861 (synopsis "Python bindings for D-bus")
5862 (description "python-dbus provides bindings for libdbus, the reference
5863 implementation of D-Bus.")
5864 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
5865 (license license:expat)))
5866
5867 (define-public python2-dbus
5868 (package (inherit python-dbus)
5869 (name "python2-dbus")
5870 (inputs `(("python" ,python-2)
5871 ,@(alist-delete "python"
5872 (package-inputs python-dbus)
5873 equal?)))))
5874
5875 (define-public python-notify2
5876 (package
5877 (name "python-notify2")
5878 (version "0.3.1")
5879 (source
5880 (origin
5881 (method url-fetch)
5882 (uri (pypi-uri "notify2" version))
5883 (sha256
5884 (base32
5885 "0z8rrv9rsg1r2qgh2dxj3dfj5xnki98kgi3w839kqby4a26i1yik"))))
5886 (build-system python-build-system)
5887 (arguments `(#:tests? #f)) ; tests depend on system state
5888 (native-inputs
5889 `(("python-dbus" ,python-dbus)))
5890 (home-page "https://bitbucket.org/takluyver/pynotify2")
5891 (synopsis "Python interface to D-Bus notifications")
5892 (description
5893 "Pynotify2 provides a Python interface for sending D-Bus notifications.
5894 It is a reimplementation of pynotify in pure Python, and an alternative to
5895 the GObject Introspection bindings to libnotify for non-GTK applications.")
5896 (license (list license:bsd-2
5897 license:lgpl2.1+))))
5898
5899 (define-public python2-notify2
5900 (package-with-python2 python-notify2))
5901
5902 ;; beautifulsoup4 has a totally different namespace than 3.x,
5903 ;; and pypi seems to put it under its own name, so I guess we should too
5904 (define-public python-beautifulsoup4
5905 (package
5906 (name "python-beautifulsoup4")
5907 (version "4.7.1")
5908 (source
5909 (origin
5910 (method url-fetch)
5911 (uri (pypi-uri "beautifulsoup4" version))
5912 (sha256
5913 (base32
5914 "0j2kycz2dxgx68xzjm7rxg5xn6v61gq5ifvxyg99slmqkybnal4l"))))
5915 (build-system python-build-system)
5916 (arguments
5917 `(#:phases
5918 (modify-phases %standard-phases
5919 ;; The Python 2 source is the definitive source of beautifulsoup4. We
5920 ;; must use this conversion script when building with Python 3. The
5921 ;; conversion script also runs the tests.
5922 ;; For more information, see the file 'convert-py3k' in the source
5923 ;; distribution.
5924 (replace 'check
5925 (lambda _ (invoke "./convert-py3k"))))))
5926 (propagated-inputs
5927 `(("python-soupsieve" ,python-soupsieve)))
5928 (home-page
5929 "https://www.crummy.com/software/BeautifulSoup/bs4/")
5930 (synopsis
5931 "Python screen-scraping library")
5932 (description
5933 "Beautiful Soup is a Python library designed for rapidly setting up
5934 screen-scraping projects. It offers Pythonic idioms for navigating,
5935 searching, and modifying a parse tree, providing a toolkit for
5936 dissecting a document and extracting what you need. It automatically
5937 converts incoming documents to Unicode and outgoing documents to UTF-8.")
5938 (license license:expat)
5939 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
5940
5941 (define-public python2-beautifulsoup4
5942 (package
5943 (inherit (package-with-python2
5944 (strip-python2-variant python-beautifulsoup4)))
5945 (arguments `(#:python ,python-2))))
5946
5947 (define-public python-soupsieve
5948 (package
5949 (name "python-soupsieve")
5950 (version "1.9.5")
5951 (source
5952 (origin
5953 (method url-fetch)
5954 (uri (pypi-uri "soupsieve" version))
5955 (sha256
5956 (base32
5957 "1nhd0q0ifwva9wn645s6pn74p1rd97asn3qfg75nphx1wkgcbhg2"))))
5958 (build-system python-build-system)
5959 (arguments `(#:tests? #f))
5960 ;;XXX: 2 tests fail currently despite claming they were to be
5961 ;;skipped. Also, beautifulsoup4 may depend on this in the future, so we
5962 ;;don't want to create a circular dependency.
5963 (home-page "https://github.com/facelessuser/soupsieve")
5964 (synopsis "CSS selector library")
5965 (description
5966 "Soup Sieve is a CSS selector library designed to be used with Beautiful
5967 Soup 4. It aims to provide selecting, matching, and filtering using modern
5968 CSS selectors. Soup Sieve currently provides selectors from the CSS level 1
5969 specifications up through the latest CSS level 4 drafts and beyond (though
5970 some are not yet implemented).")
5971 (properties `((python2-variant . ,(delay python2-soupsieve))))
5972 (license license:expat)))
5973
5974 (define-public python2-soupsieve
5975 (let ((base (package-with-python2 (strip-python2-variant python-soupsieve))))
5976 (package
5977 (inherit base)
5978 (propagated-inputs
5979 `(("python2-backports-functools-lru-cache"
5980 ,python2-backports-functools-lru-cache)
5981 ,@(package-propagated-inputs base))))))
5982
5983 (define-public python-netifaces
5984 (package
5985 (name "python-netifaces")
5986 (version "0.10.7")
5987 (source
5988 (origin
5989 (method url-fetch)
5990 (uri (pypi-uri "netifaces" version))
5991 (sha256
5992 (base32
5993 "1gccklrcplbbqh81g1mdgpa5y8na7kkf29cq2ka3f5a2fp5hyndx"))))
5994 (build-system python-build-system)
5995 (home-page "https://github.com/al45tair/netifaces")
5996 (synopsis
5997 "Python module for portable network interface information")
5998 (description
5999 "Netifaces is a Python module providing information on network
6000 interfaces in an easy and portable manner.")
6001 (license license:expat)))
6002
6003 (define-public python2-netifaces
6004 (package-with-python2 python-netifaces))
6005
6006 (define-public python-networkx
6007 (package
6008 (name "python-networkx")
6009 (version "2.2")
6010 (source
6011 (origin
6012 (method url-fetch)
6013 (uri (pypi-uri "networkx" version ".zip"))
6014 (sha256
6015 (base32 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
6016 (build-system python-build-system)
6017 ;; python-decorator is needed at runtime.
6018 (propagated-inputs
6019 `(("python-decorator" ,python-decorator)))
6020 (native-inputs
6021 `(("python-nose" ,python-nose)
6022 ("unzip" ,unzip)))
6023 (home-page "https://networkx.github.io/")
6024 (synopsis "Python module for creating and manipulating graphs and networks")
6025 (description
6026 "NetworkX is a Python package for the creation, manipulation, and study
6027 of the structure, dynamics, and functions of complex networks.")
6028 (license license:bsd-3)))
6029
6030 (define-public python2-networkx
6031 (package-with-python2 python-networkx))
6032
6033 (define-public python-datrie
6034 (package
6035 (name "python-datrie")
6036 (version "0.8")
6037 (source
6038 (origin
6039 (method url-fetch)
6040 (uri (pypi-uri "datrie" version))
6041 (sha256
6042 (base32
6043 "0338r8xgmpy78556jhms0h6qkvyjr10p8bpgdvcpqzm9lrmxmmdx"))))
6044 (build-system python-build-system)
6045 (native-inputs
6046 `(("python-cython" ,python-cython)
6047 ("python-hypothesis" ,python-hypothesis)
6048 ("python-pytest" ,python-pytest)
6049 ("python-pytest-runner" ,python-pytest-runner)))
6050 (home-page "https://github.com/kmike/datrie")
6051 (synopsis "Fast, efficiently stored trie for Python")
6052 (description
6053 "This package provides a fast, efficiently stored trie implementation for
6054 Python.")
6055 (license license:lgpl2.1+)))
6056
6057 (define-public snakemake
6058 (package
6059 (name "snakemake")
6060 (version "5.7.1")
6061 (source
6062 (origin
6063 (method url-fetch)
6064 (uri (pypi-uri "snakemake" version))
6065 (sha256
6066 (base32 "1pnpvvn8n2a78cg360wz3ldmpqrsm2wzi0c0dmvki9fnsw6fxdas"))))
6067 (build-system python-build-system)
6068 (arguments
6069 ;; TODO: Package missing test dependencies.
6070 '(#:tests? #f
6071 #:phases
6072 (modify-phases %standard-phases
6073 ;; For cluster execution Snakemake will call Python. Since there is
6074 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
6075 ;; this by calling the snakemake wrapper instead.
6076 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
6077 (lambda* (#:key outputs #:allow-other-keys)
6078 (substitute* "snakemake/executors.py"
6079 (("\\{sys.executable\\} -m snakemake")
6080 (string-append (assoc-ref outputs "out")
6081 "/bin/snakemake")))
6082 #t)))))
6083 (propagated-inputs
6084 `(("python-appdirs" ,python-appdirs)
6085 ("python-configargparse" ,python-configargparse)
6086 ("python-datrie" ,python-datrie)
6087 ("python-docutils" ,python-docutils)
6088 ("python-gitpython" ,python-gitpython)
6089 ("python-jinja2" ,python-jinja2)
6090 ("python-jsonschema" ,python-jsonschema)
6091 ("python-networkx" ,python-networkx)
6092 ("python-psutil" ,python-psutil)
6093 ("python-pyyaml" ,python-pyyaml)
6094 ("python-ratelimiter" ,python-ratelimiter)
6095 ("python-requests" ,python-requests)
6096 ("python-wrapt" ,python-wrapt)))
6097 (home-page "https://snakemake.readthedocs.io")
6098 (synopsis "Python-based execution environment for make-like workflows")
6099 (description
6100 "Snakemake aims to reduce the complexity of creating workflows by
6101 providing a clean and modern domain specific specification language (DSL) in
6102 Python style, together with a fast and comfortable execution environment.")
6103 (license license:expat)))
6104
6105 (define-public python-pyqrcode
6106 (package
6107 (name "python-pyqrcode")
6108 (version "1.2.1")
6109 (source
6110 (origin
6111 (method url-fetch)
6112 (uri (pypi-uri "PyQRCode" version))
6113 (sha256
6114 (base32
6115 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
6116 (build-system python-build-system)
6117 (home-page
6118 "https://github.com/mnooner256/pyqrcode")
6119 (synopsis "QR code generator")
6120 (description
6121 "Pyqrcode is a QR code generator written purely in Python with
6122 SVG, EPS, PNG and terminal output.")
6123 (license license:bsd-3)))
6124
6125 (define-public python-seaborn
6126 (package
6127 (name "python-seaborn")
6128 (version "0.9.0")
6129 (source
6130 (origin
6131 (method url-fetch)
6132 (uri (pypi-uri "seaborn" version))
6133 (sha256
6134 (base32 "0bqysi3fxfjl1866m5jq8z7mynhqbqnikim74dmzn8539iwkzj3n"))
6135 (patches
6136 (list (origin
6137 (method url-fetch)
6138 ;; This has already been merged, but there is no new
6139 ;; release including this patch. It fixes problems
6140 ;; with axis rotation that would lead to test
6141 ;; failures.
6142 (uri "https://patch-diff.githubusercontent.com/raw/mwaskom/seaborn/pull/1716.diff")
6143 (sha256
6144 (base32
6145 "1lm870z316n9ivsyr86hpk1gxaraw0mrjvq42lqsm0znhjdp9q9w"))
6146 (file-name "seaborn-0.9.0-axis-rotation.patch"))))))
6147 (build-system python-build-system)
6148 (arguments
6149 `(#:phases
6150 (modify-phases %standard-phases
6151 (add-before 'check 'start-xserver
6152 (lambda* (#:key inputs #:allow-other-keys)
6153 (let ((xorg-server (assoc-ref inputs "xorg-server")))
6154 ;; There must be a running X server and make check doesn't
6155 ;; start one. Therefore we must do it.
6156 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
6157 (setenv "DISPLAY" ":1")
6158 #t)))
6159 (add-after 'unpack 'fix-tests
6160 (lambda _
6161 ;; test_cbar_ticks fails probably because of matplotlib's
6162 ;; expectation of using an older version of FreeType.
6163 (delete-file "seaborn/tests/test_matrix.py")
6164 #t))
6165 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
6166 (propagated-inputs
6167 `(("python-pandas" ,python-pandas)
6168 ("python-matplotlib" ,python-matplotlib)
6169 ("python-numpy" ,python-numpy)
6170 ("python-scipy" ,python-scipy)))
6171 (native-inputs
6172 `(("python-pytest" ,python-pytest)
6173 ("xorg-server" ,xorg-server-for-tests)))
6174 (home-page "https://seaborn.pydata.org/")
6175 (synopsis "Statistical data visualization")
6176 (description
6177 "Seaborn is a library for making attractive and informative statistical
6178 graphics in Python. It is built on top of matplotlib and tightly integrated
6179 with the PyData stack, including support for numpy and pandas data structures
6180 and statistical routines from scipy and statsmodels.")
6181 (license license:bsd-3)))
6182
6183 (define-public python2-seaborn
6184 (package-with-python2 python-seaborn))
6185
6186 (define-public python-mpmath
6187 (package
6188 (name "python-mpmath")
6189 (version "0.19")
6190 (source (origin
6191 (method url-fetch)
6192 (uri (string-append "http://mpmath.org/files/mpmath-"
6193 version ".tar.gz"))
6194 (sha256
6195 (base32
6196 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
6197 (build-system python-build-system)
6198 (arguments
6199 '(#:phases
6200 (modify-phases %standard-phases
6201 (replace 'check
6202 (lambda _
6203 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
6204 (home-page "http://mpmath.org")
6205 (synopsis "Arbitrary-precision floating-point arithmetic in python")
6206 (description
6207 "@code{mpmath} can be used as an arbitrary-precision substitute for
6208 Python's float/complex types and math/cmath modules, but also does much
6209 more advanced mathematics.")
6210 (license license:bsd-3)))
6211
6212 (define-public python2-mpmath
6213 (package-with-python2 python-mpmath))
6214
6215 (define-public python-bigfloat
6216 (package
6217 (name "python-bigfloat")
6218 (version "0.3.0")
6219 (source
6220 (origin
6221 (method url-fetch)
6222 (uri (pypi-uri "bigfloat" version))
6223 (sha256
6224 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
6225 (build-system python-build-system)
6226 (inputs
6227 `(("mpfr" ,mpfr)))
6228 (home-page "https://github.com/mdickinson/bigfloat")
6229 (synopsis "Arbitrary precision floating-point arithmetic for Python")
6230 (description
6231 "This package provides a Python interface to the MPFR library for
6232 multiprecision arithmetic.")
6233 (license license:lgpl3+)))
6234
6235 (define-public python2-bigfloat
6236 (package-with-python2 python-bigfloat))
6237
6238 (define-public python-sympy
6239 (package
6240 (name "python-sympy")
6241 (version "1.1.1")
6242 (source
6243 (origin
6244 (method url-fetch)
6245 (uri (string-append
6246 "https://github.com/sympy/sympy/releases/download/sympy-"
6247 version "/sympy-" version ".tar.gz"))
6248 (sha256
6249 (base32 "190n29sppw7g8ihilc5451y7jlfcaw56crqiqbf1jff43dlmfnxc"))))
6250 (build-system python-build-system)
6251 (arguments
6252 `(#:phases
6253 (modify-phases %standard-phases
6254 ;; Run the core tests after installation. By default it would run
6255 ;; *all* tests, which take a very long time to complete and are known
6256 ;; to be flaky.
6257 (delete 'check)
6258 (add-after 'install 'check
6259 (lambda* (#:key outputs #:allow-other-keys)
6260 (invoke "python3" "-c" "import sympy; sympy.test(\"/core\")")
6261 #t)))))
6262 (propagated-inputs
6263 `(("python-mpmath" ,python-mpmath)))
6264 (home-page "https://www.sympy.org/")
6265 (synopsis "Python library for symbolic mathematics")
6266 (description
6267 "SymPy is a Python library for symbolic mathematics. It aims to become a
6268 full-featured computer algebra system (CAS) while keeping the code as simple
6269 as possible in order to be comprehensible and easily extensible.")
6270 (license license:bsd-3)))
6271
6272 (define-public python2-sympy
6273 (package
6274 (inherit (package-with-python2 python-sympy))
6275 (arguments
6276 `(#:phases
6277 (modify-phases %standard-phases
6278 ;; Run the core tests after installation. By default it would run
6279 ;; *all* tests, which take a very long time to complete and are known
6280 ;; to be flaky.
6281 (delete 'check)
6282 (add-after 'install 'check
6283 (lambda* (#:key outputs #:allow-other-keys)
6284 (invoke "python" "-c" "import sympy; sympy.test(\"/core\")")
6285 #t)))))))
6286
6287 (define-public python-q
6288 (package
6289 (name "python-q")
6290 (version "2.6")
6291 (source
6292 (origin
6293 (method url-fetch)
6294 (uri (pypi-uri "q" version))
6295 (sha256
6296 (base32
6297 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
6298 (build-system python-build-system)
6299 (home-page "https://github.com/zestyping/q")
6300 (synopsis "Quick-and-dirty debugging output for tired programmers")
6301 (description
6302 "q is a Python module for \"print\" style of debugging Python code. It
6303 provides convenient short API for print out of values, tracebacks, and
6304 falling into the Python interpreter.")
6305 (license license:asl2.0)))
6306
6307 (define-public python2-q
6308 (package-with-python2 python-q))
6309
6310 (define-public python2-xlib
6311 (package
6312 (name "python2-xlib")
6313 (version "0.14")
6314 (source (origin
6315 (method url-fetch)
6316 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
6317 "/" version "/"
6318 "python-xlib-" version ".tar.gz"))
6319 (sha256
6320 (base32
6321 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
6322 (build-system python-build-system)
6323 (arguments
6324 `(#:python ,python-2 ;Python 2 only
6325 #:tests? #f)) ;no tests
6326 (home-page "http://python-xlib.sourceforge.net/")
6327 (synopsis "Python X11 client library")
6328 (description
6329 "The Python X Library is intended to be a fully functional X client
6330 library for Python programs. It is useful to implement low-level X clients.
6331 It is written entirely in Python.")
6332 (license license:gpl2+)))
6333
6334 (define-public python-singledispatch
6335 (package
6336 (name "python-singledispatch")
6337 (version "3.4.0.3")
6338 (source
6339 (origin
6340 (method url-fetch)
6341 (uri (pypi-uri "singledispatch" version))
6342 (sha256
6343 (base32
6344 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
6345 (build-system python-build-system)
6346 (native-inputs
6347 `(("python-six" ,python-six))) ; required for conversion, not at run-time
6348 (home-page
6349 "https://docs.python.org/3/library/functools.html#functools.singledispatch")
6350 (synopsis "Backport of singledispatch feature from Python 3.4")
6351 (description
6352 "This library brings functools.singledispatch from Python 3.4 to Python
6353 2.6-3.3.")
6354 (license license:expat)))
6355
6356 (define-public python2-singledispatch
6357 (package-with-python2 python-singledispatch))
6358
6359 ;; the python- version can be removed with python-3.5
6360 (define-public python-backports-abc
6361 (package
6362 (name "python-backports-abc")
6363 (version "0.5")
6364 (source
6365 (origin
6366 (method url-fetch)
6367 (uri (pypi-uri "backports_abc" version))
6368 (sha256
6369 (base32
6370 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
6371 (build-system python-build-system)
6372 (home-page "https://github.com/cython/backports_abc")
6373 (synopsis "Backport of additions to the 'collections.abc' module")
6374 (description
6375 "Python-backports-abc provides a backport of additions to the
6376 @code{collections.abc} module in Python-3.5.")
6377 (license license:psfl)))
6378
6379 (define-public python2-backports-abc
6380 (package-with-python2 python-backports-abc))
6381
6382 (define-public python-backports-csv
6383 (package
6384 (name "python-backports-csv")
6385 (version "1.0.5")
6386 (source
6387 (origin
6388 (method url-fetch)
6389 (uri (pypi-uri "backports.csv" version))
6390 (sha256
6391 (base32
6392 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
6393 (build-system python-build-system)
6394 (home-page "https://github.com/ryanhiebert/backports.csv")
6395 (synopsis "Backport of Python 3's csv module for Python 2")
6396 (description
6397 "Provides a backport of Python 3's @code{csv} module for parsing
6398 comma separated values. The API of the @code{csv} module in Python 2
6399 is drastically different from the @code{csv} module in Python 3.
6400 This is due, for the most part, to the difference between str in
6401 Python 2 and Python 3.")
6402 (license license:psfl)))
6403
6404 (define-public python2-backports-csv
6405 (package-with-python2 python-backports-csv))
6406
6407 (define-public python2-backports-shutil-get-terminal-size
6408 (package
6409 (name "python2-backports-shutil-get-terminal-size")
6410 (version "1.0.0")
6411 (source
6412 (origin
6413 (method url-fetch)
6414 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
6415 (sha256
6416 (base32
6417 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
6418 (build-system python-build-system)
6419 (arguments
6420 `(#:python ,python-2
6421 #:phases
6422 (modify-phases %standard-phases
6423 (replace 'check
6424 (lambda _
6425 (invoke "py.test" "-v"))))))
6426 (native-inputs
6427 `(("python2-pytest" ,python2-pytest)))
6428 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
6429 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
6430 (description
6431 "This package provides a backport of the @code{get_terminal_size
6432 function} from Python 3.3's @code{shutil}.
6433 Unlike the original version it is written in pure Python rather than C,
6434 so it might be a tiny bit slower.")
6435 (license license:expat)))
6436
6437 (define-public python-waf
6438 (package
6439 (name "python-waf")
6440 (version "2.0.19")
6441 (source (origin
6442 (method url-fetch)
6443 (uri (string-append "https://waf.io/"
6444 "waf-" version ".tar.bz2"))
6445 (sha256
6446 (base32
6447 "19dvqbsvxz7ch03dh1v0znklrwxlz6yzddc3k9smzrrgny4jch6q"))))
6448 (build-system python-build-system)
6449 (arguments
6450 '(#:phases
6451 (modify-phases %standard-phases
6452 (replace 'build
6453 (lambda _
6454 ;; XXX: Find a way to add all extra tools.
6455 (let ((tools '("gccdeps"
6456 "clang_compilation_database")))
6457 (invoke "python" "waf-light" "configure" "build"
6458 (string-append "--tools="
6459 (string-join tools ","))))))
6460 (replace 'check
6461 (lambda _
6462 (invoke "python" "waf" "--version")))
6463 (replace 'install
6464 (lambda* (#:key outputs #:allow-other-keys)
6465 (let ((out (assoc-ref outputs "out")))
6466 (install-file "waf" (string-append out "/bin")))
6467 #t))
6468 ;; waf breaks when it is wrapped.
6469 (delete 'wrap))))
6470 (home-page "https://waf.io/")
6471 (synopsis "Python-based build system")
6472 (description
6473 "Waf is a Python-based framework for configuring, compiling and installing
6474 applications.")
6475 (license license:bsd-3)))
6476
6477 (define-public python2-waf
6478 (package-with-python2 python-waf))
6479
6480 (define-public python-pyzmq
6481 (package
6482 (name "python-pyzmq")
6483 (version "17.1.2")
6484 (source
6485 (origin
6486 (method url-fetch)
6487 (uri (pypi-uri "pyzmq" version))
6488 (sha256
6489 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
6490 (build-system python-build-system)
6491 (arguments
6492 `(#:configure-flags
6493 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
6494 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
6495 ;; --inplace' for 'python setup.py test' to work.
6496 #:tests? #f))
6497 (inputs
6498 `(("zeromq" ,zeromq)))
6499 (native-inputs
6500 `(("pkg-config" ,pkg-config)
6501 ("python-nose" ,python-nose)))
6502 (home-page "https://github.com/zeromq/pyzmq")
6503 (synopsis "Python bindings for 0MQ")
6504 (description
6505 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
6506 (license license:bsd-4)))
6507
6508 (define-public python2-pyzmq
6509 (package-with-python2 python-pyzmq))
6510
6511 (define-public python-pep8
6512 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
6513 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
6514 ;; some dependents' test suites, and nothing more.
6515 (package
6516 (name "python-pep8")
6517 (version "1.7.0")
6518 (source
6519 (origin
6520 (method url-fetch)
6521 (uri (pypi-uri "pep8" version))
6522 (sha256
6523 (base32
6524 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))
6525 (patches (search-patches "python-pep8-stdlib-tokenize-compat.patch"))))
6526 (build-system python-build-system)
6527 (home-page "https://pep8.readthedocs.org/")
6528 (synopsis "Python style guide checker")
6529 (description
6530 "This tools checks Python code against some of the style conventions in
6531 PEP 8.")
6532 (license license:expat)))
6533
6534 (define-public python2-pep8
6535 (package-with-python2 python-pep8))
6536
6537 (define-public python-pyflakes
6538 (package
6539 (name "python-pyflakes")
6540 (version "2.1.1")
6541 (source
6542 (origin
6543 (method url-fetch)
6544 (uri (pypi-uri "pyflakes" version))
6545 (sha256
6546 (base32
6547 "18pq95a1xj2dgdd0m85gyfsn40jajj4xc3lp8wfv7igqhrc86xnr"))))
6548 (build-system python-build-system)
6549 (home-page
6550 "https://github.com/pyflakes/pyflakes")
6551 (synopsis "Passive checker of Python programs")
6552 (description
6553 "Pyflakes statically checks Python source code for common errors.")
6554 (license license:expat)))
6555
6556 (define-public python2-pyflakes
6557 (package-with-python2 python-pyflakes))
6558
6559 (define-public python-mccabe
6560 (package
6561 (name "python-mccabe")
6562 (version "0.6.1")
6563 (source
6564 (origin
6565 (method url-fetch)
6566 (uri (pypi-uri "mccabe" version))
6567 (sha256
6568 (base32
6569 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
6570 (build-system python-build-system)
6571 (native-inputs
6572 `(("python-pytest" ,python-pytest-bootstrap)
6573 ("python-pytest-runner" ,python-pytest-runner)))
6574 (home-page "https://github.com/flintwork/mccabe")
6575 (synopsis "McCabe checker, plugin for flake8")
6576 (description
6577 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
6578 complexity of Python source code.")
6579 (license license:expat)))
6580
6581 (define-public python2-mccabe
6582 (package-with-python2 python-mccabe))
6583
6584 (define-public python-mccabe-0.2.1
6585 (package (inherit python-mccabe)
6586 (version "0.2.1")
6587 (source
6588 (origin
6589 (method url-fetch)
6590 (uri (pypi-uri "mccabe" version))
6591 (sha256
6592 (base32
6593 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
6594
6595 (define-public python2-mccabe-0.2.1
6596 (package-with-python2 python-mccabe-0.2.1))
6597
6598 ;; Flake8 2.4.1 requires an older version of pep8.
6599 ;; This should be removed ASAP.
6600 (define-public python-pep8-1.5.7
6601 (package (inherit python-pep8)
6602 (version "1.5.7")
6603 (source
6604 (origin
6605 (method url-fetch)
6606 (uri (pypi-uri "pep8" version))
6607 (sha256
6608 (base32
6609 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
6610 (arguments
6611 ;; XXX Tests not compatible with Python 3.5.
6612 '(#:tests? #f))))
6613
6614 (define-public python2-pep8-1.5.7
6615 (package-with-python2 python-pep8-1.5.7))
6616
6617 ;; Flake8 2.4.1 requires an older version of pyflakes.
6618 ;; This should be removed ASAP.
6619 (define-public python-pyflakes-0.8.1
6620 (package (inherit python-pyflakes)
6621 (version "0.8.1")
6622 (source
6623 (origin
6624 (method url-fetch)
6625 (uri (pypi-uri "pyflakes" version))
6626 (sha256
6627 (base32
6628 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
6629 (arguments
6630 ;; XXX Tests not compatible with Python 3.5.
6631 '(#:tests? #f))))
6632
6633 (define-public python2-pyflakes-0.8.1
6634 (package-with-python2 python-pyflakes-0.8.1))
6635
6636 (define-public python-flake8
6637 (package
6638 (name "python-flake8")
6639 (version "3.7.7")
6640 (source (origin
6641 (method url-fetch)
6642 (uri (pypi-uri "flake8" version))
6643 (sha256
6644 (base32
6645 "0qg6zggqigrd4k3gv88shd1a27d0cwgfql8vfiq2c7rl7w3rd6c5"))))
6646 (build-system python-build-system)
6647 (arguments
6648 `(#:phases
6649 (modify-phases %standard-phases
6650 (delete 'check)
6651 (add-after 'install 'check
6652 (lambda* (#:key inputs outputs #:allow-other-keys)
6653 (add-installed-pythonpath inputs outputs)
6654 (invoke "pytest" "-v")
6655 #t)))))
6656 (propagated-inputs
6657 `(("python-pycodestyle" ,python-pycodestyle)
6658 ("python-entrypoints" ,python-entrypoints)
6659 ("python-pyflakes" ,python-pyflakes)
6660 ("python-mccabe" ,python-mccabe)))
6661 (native-inputs
6662 `(("python-mock" ,python-mock)
6663 ("python-pytest" ,python-pytest-bootstrap)
6664 ("python-pytest-runner" ,python-pytest-runner)))
6665 (home-page "https://gitlab.com/pycqa/flake8")
6666 (synopsis
6667 "The modular source code checker: pep8, pyflakes and co")
6668 (description
6669 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
6670 (properties `((python2-variant . ,(delay python2-flake8))))
6671 (license license:expat)))
6672
6673 (define-public python2-flake8
6674 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
6675 (package (inherit base)
6676 (propagated-inputs
6677 `(("python2-configparser" ,python2-configparser)
6678 ("python2-enum34" ,python2-enum34)
6679 ("python2-typing" ,python2-typing)
6680 ,@(package-propagated-inputs base))))))
6681
6682 ;; python-hacking requires flake8 <2.6.0.
6683 (define-public python-flake8-2.5
6684 (package
6685 (inherit python-flake8)
6686 (version "2.5.5")
6687 (source (origin
6688 (method url-fetch)
6689 (uri (pypi-uri "flake8" version))
6690 (sha256
6691 (base32
6692 "1snylqwbmrylbx3r1wpz8ggk98f6bcag4441ag8mm2l7wyn58sij"))))
6693 (propagated-inputs
6694 `(("python-pep8" ,python-pep8)
6695 ,@(package-propagated-inputs python-flake8)))
6696 (properties `((python2-variant . ,(delay python2-flake8-2.5))))))
6697
6698 (define-public python2-flake8-2.5
6699 (package
6700 (inherit python2-flake8)
6701 (version (package-version python-flake8-2.5))
6702 (source (origin
6703 (inherit (package-source python-flake8-2.5))))
6704 (propagated-inputs
6705 `(("python2-pep8" ,python2-pep8)
6706 ,@(package-propagated-inputs python2-flake8)))))
6707
6708 (define-public python-flake8-polyfill
6709 (package
6710 (name "python-flake8-polyfill")
6711 (version "1.0.2")
6712 (source
6713 (origin
6714 (method url-fetch)
6715 (uri (pypi-uri "flake8-polyfill" version))
6716 (sha256
6717 (base32
6718 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
6719 (build-system python-build-system)
6720 (arguments
6721 '(#:phases
6722 (modify-phases %standard-phases
6723 (replace 'check
6724 (lambda _
6725 ;; Be compatible with Pytest 4:
6726 ;; https://gitlab.com/pycqa/flake8-polyfill/merge_requests/7
6727 (substitute* "setup.cfg"
6728 (("\\[pytest\\]")
6729 "[tool:pytest]"))
6730
6731 (setenv "PYTHONPATH"
6732 (string-append (getcwd) "/build/lib:"
6733 (getenv "PYTHONPATH")))
6734 (invoke "py.test" "-v"))))))
6735 (native-inputs
6736 `(("python-flake8" ,python-flake8)
6737 ("python-mock" ,python-mock)
6738 ("python-pep8" ,python-pep8)
6739 ("python-pycodestyle" ,python-pycodestyle)
6740 ("python-pytest" ,python-pytest)))
6741 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
6742 (synopsis "Polyfill package for Flake8 plugins")
6743 (description
6744 "This package that provides some compatibility helpers for Flake8
6745 plugins that intend to support Flake8 2.x and 3.x simultaneously.")
6746 (license license:expat)))
6747
6748 (define-public python2-flake8-polyfill
6749 (package-with-python2 python-flake8-polyfill))
6750
6751 (define-public python-mistune
6752 (package
6753 (name "python-mistune")
6754 (version "0.8.4")
6755 (source
6756 (origin
6757 (method url-fetch)
6758 (uri (pypi-uri "mistune" version))
6759 (sha256
6760 (base32
6761 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
6762 (build-system python-build-system)
6763 (native-inputs
6764 `(("python-nose" ,python-nose)
6765 ("python-cython" ,python-cython)))
6766 (home-page "https://github.com/lepture/mistune")
6767 (synopsis "Markdown parser in pure Python")
6768 (description "This package provides a fast markdown parser in pure
6769 Python.")
6770 (license license:bsd-3)))
6771
6772 (define-public python2-mistune
6773 (package-with-python2 python-mistune))
6774
6775 (define-public python-markdown
6776 (package
6777 (name "python-markdown")
6778 (version "3.2.1")
6779 (source
6780 (origin
6781 (method url-fetch)
6782 (uri (pypi-uri "Markdown" version))
6783 (sha256
6784 (base32
6785 "00k91gwhxnm8jdnm2v5xjz9irj6dbi7afywz2hpakqdbxs1ydzlh"))))
6786 (build-system python-build-system)
6787 (native-inputs
6788 `(("python-nose" ,python-nose)
6789 ("python-pyyaml" ,python-pyyaml)))
6790 (home-page "https://python-markdown.github.io/")
6791 (synopsis "Python implementation of Markdown")
6792 (description
6793 "This package provides a Python implementation of John Gruber's
6794 Markdown. The library features international input, various Markdown
6795 extensions, and several HTML output formats. A command line wrapper
6796 markdown_py is also provided to convert Markdown files to HTML.")
6797 (properties `((python2-variant . ,(delay python2-markdown))))
6798 (license license:bsd-3)))
6799
6800 ;; Markdown 3.2 dropped support for Python 2.
6801 (define-public python2-markdown
6802 (let ((base (package-with-python2 (strip-python2-variant python-markdown))))
6803 (package/inherit
6804 base
6805 (version "3.1.1")
6806 (source (origin
6807 (method url-fetch)
6808 (uri (pypi-uri "Markdown" version))
6809 (sha256
6810 (base32
6811 "0yhylk4ffqqs7x086fav4pnfsl1021v7lghznzkififprmmqfl1f")))))))
6812
6813 (define-public python-ptyprocess
6814 (package
6815 (name "python-ptyprocess")
6816 (version "0.5.2")
6817 (source
6818 (origin
6819 (method url-fetch)
6820 (uri (pypi-uri "ptyprocess" version))
6821 (sha256
6822 (base32
6823 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
6824 (build-system python-build-system)
6825 (native-inputs
6826 `(("python-nose" ,python-nose)))
6827 (arguments
6828 `(#:phases
6829 (modify-phases %standard-phases
6830 (replace 'check
6831 (lambda _ (invoke "nosetests"))))))
6832 (home-page "https://github.com/pexpect/ptyprocess")
6833 (synopsis "Run a subprocess in a pseudo terminal")
6834 (description
6835 "This package provides a Python library used to launch a subprocess in a
6836 pseudo terminal (pty), and interact with both the process and its pty.")
6837 (license license:isc)))
6838
6839 (define-public python2-ptyprocess
6840 (package-with-python2 python-ptyprocess))
6841
6842 (define-public python-cram
6843 (package
6844 (name "python-cram")
6845 (version "0.7")
6846 (home-page "https://bitheap.org/cram/")
6847 (source (origin
6848 (method url-fetch)
6849 (uri (list (string-append home-page "cram-"
6850 version ".tar.gz")
6851 (pypi-uri "cram" version)))
6852 (sha256
6853 (base32
6854 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
6855 (arguments
6856 '(#:phases
6857 (modify-phases %standard-phases
6858 (add-after 'unpack 'patch-source
6859 (lambda _
6860 (substitute* (find-files "cram" ".*\\.py$")
6861 ;; Replace default shell path.
6862 (("/bin/sh") (which "sh")))
6863 (substitute* (find-files "tests" ".*\\.t$")
6864 (("md5") "md5sum")
6865 (("/bin/bash") (which "bash"))
6866 (("/bin/sh") (which "sh")))
6867 (substitute* "cram/_test.py"
6868 ;; This hack works around a bug triggered by substituting
6869 ;; the /bin/sh paths. "tests/usage.t" compares the output of
6870 ;; "cram -h", which breaks the output at 80 characters. This
6871 ;; causes the line showing the default shell to break into two
6872 ;; lines, but the test expects a single line...
6873 (("env\\['COLUMNS'\\] = '80'")
6874 "env['COLUMNS'] = '160'"))
6875
6876 (substitute* "Makefile"
6877 ;; Recent versions of python-coverage have caused the test
6878 ;; coverage to decrease (as of version 0.7). Allow that.
6879 (("--fail-under=100")
6880 "--fail-under=90"))
6881
6882 #t))
6883 (replace 'check
6884 ;; The test phase uses the built library and executable.
6885 (lambda* (#:key inputs outputs #:allow-other-keys)
6886 (add-installed-pythonpath inputs outputs)
6887 (setenv "PATH" (string-append (getenv "PATH") ":"
6888 (assoc-ref outputs "out") "/bin"))
6889 (invoke "make" "test"))))))
6890 (build-system python-build-system)
6891 (native-inputs
6892 `(("python-coverage" ,python-coverage)
6893 ("which" ,which)))
6894 (synopsis "Simple testing framework for command line applications")
6895 (description
6896 "Cram is a functional testing framework for command line applications.
6897 Cram tests look like snippets of interactive shell sessions. Cram runs each
6898 command and compares the command output in the test with the command’s actual
6899 output.")
6900 (license license:gpl2+)))
6901
6902 (define-public python2-cram
6903 (package-with-python2 python-cram))
6904
6905 (define-public python-straight-plugin
6906 (package
6907 (name "python-straight-plugin")
6908 (version "1.4.1")
6909 (source
6910 (origin
6911 (method url-fetch)
6912 (uri (pypi-uri "straight.plugin" version))
6913 (sha256
6914 (base32
6915 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
6916 (build-system python-build-system)
6917 (home-page "https://github.com/ironfroggy/straight.plugin")
6918 (synopsis "Simple namespaced plugin facility")
6919 (description "Straight Plugin provides a type of plugin you can create from
6920 almost any existing Python modules, and an easy way for outside developers to
6921 add functionality and customization to your projects with their own plugins.")
6922 (license license:expat)))
6923
6924 (define-public python2-straight-plugin
6925 (package-with-python2 python-straight-plugin))
6926
6927 (define-public python-fonttools
6928 (package
6929 (name "python-fonttools")
6930 (version "3.38.0")
6931 (source (origin
6932 (method url-fetch)
6933 (uri (pypi-uri "fonttools" version ".zip"))
6934 (sha256
6935 (base32
6936 "12ripk3s7skgxr1bs9r8n13r94ym3s8iir7ivfixls9fa4dabmlh"))))
6937 (build-system python-build-system)
6938 (native-inputs
6939 `(("unzip" ,unzip)
6940 ("python-pytest" ,python-pytest)
6941 ("python-pytest-runner" ,python-pytest-runner)))
6942 (home-page "https://github.com/fonttools/fonttools")
6943 (synopsis "Tools to manipulate font files")
6944 (description
6945 "FontTools/TTX is a library to manipulate font files from Python. It
6946 supports reading and writing of TrueType/OpenType fonts, reading and writing
6947 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
6948 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
6949 from an XML-based format.")
6950 (license license:expat)))
6951
6952 (define-public python2-fonttools
6953 (package-with-python2 python-fonttools))
6954
6955 (define-public python-ly
6956 (package
6957 (name "python-ly")
6958 (version "0.9.5")
6959 (source
6960 (origin
6961 (method url-fetch)
6962 (uri (pypi-uri name version))
6963 (sha256
6964 (base32
6965 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
6966 (build-system python-build-system)
6967 (arguments
6968 ;; FIXME: Some tests need network access.
6969 '(#:tests? #f))
6970 (synopsis "Tool and library for manipulating LilyPond files")
6971 (description "This package provides a Python library to parse, manipulate
6972 or create documents in LilyPond format. A command line program ly is also
6973 provided that can be used to do various manipulations with LilyPond files.")
6974 (home-page "https://pypi.org/project/python-ly/")
6975 (license license:gpl2+)))
6976
6977 (define-public python-appdirs
6978 (package
6979 (name "python-appdirs")
6980 (version "1.4.3")
6981 (source
6982 (origin
6983 (method url-fetch)
6984 (uri (pypi-uri "appdirs" version))
6985 (sha256
6986 (base32
6987 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
6988 (build-system python-build-system)
6989 (home-page "https://github.com/ActiveState/appdirs")
6990 (synopsis
6991 "Determine platform-specific dirs, e.g. a \"user data dir\"")
6992 (description
6993 "This module provides a portable way of finding out where user data
6994 should be stored on various operating systems.")
6995 (license license:expat)))
6996
6997 (define-public python2-appdirs
6998 (package-with-python2 python-appdirs))
6999
7000 (define-public python-llfuse
7001 (package
7002 (name "python-llfuse")
7003 (version "1.3.5")
7004 (source (origin
7005 (method url-fetch)
7006 (uri (pypi-uri "llfuse" version ".tar.bz2"))
7007 (sha256
7008 (base32
7009 "1n7a90jww3ly49fm7x27m3xw3la3qfrnykcakga654g6kcyjlhbf"))))
7010 (build-system python-build-system)
7011 (inputs
7012 `(("fuse" ,fuse)
7013 ("attr" ,attr)))
7014 (native-inputs
7015 `(("pkg-config" ,pkg-config)))
7016 (synopsis "Python bindings for FUSE")
7017 (description
7018 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
7019 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
7020 (license license:lgpl2.0+)
7021 (properties `((python2-variant . ,(delay python2-llfuse))))))
7022
7023 (define-public python2-llfuse
7024 (package (inherit (package-with-python2
7025 (strip-python2-variant python-llfuse)))
7026 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
7027
7028 ;; For attic-0.16
7029 (define-public python-llfuse-0.41
7030 (package (inherit python-llfuse)
7031 (version "0.41.1")
7032 (source (origin
7033 (method url-fetch)
7034 (uri (string-append
7035 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
7036 "llfuse-" version ".tar.bz2"))
7037 (sha256
7038 (base32
7039 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
7040 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
7041 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
7042 (license (list license:expat license:lgpl2.0+))))
7043
7044 (define-public python-msgpack
7045 (package
7046 (name "python-msgpack")
7047 (version "0.5.6")
7048 (source (origin
7049 (method url-fetch)
7050 (uri (pypi-uri "msgpack" version))
7051 (sha256
7052 (base32
7053 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
7054 (build-system python-build-system)
7055 (arguments
7056 `(#:modules ((guix build utils)
7057 (guix build python-build-system)
7058 (ice-9 ftw)
7059 (srfi srfi-1)
7060 (srfi srfi-26))
7061 #:phases
7062 (modify-phases %standard-phases
7063 (replace 'check
7064 (lambda _
7065 (let ((cwd (getcwd)))
7066 (setenv "PYTHONPATH"
7067 (string-append cwd "/build/"
7068 (find (cut string-prefix? "lib" <>)
7069 (scandir (string-append cwd "/build")))
7070 ":"
7071 (getenv "PYTHONPATH")))
7072 (invoke "pytest" "-v" "test")))))))
7073 (native-inputs
7074 `(("python-pytest" ,python-pytest)))
7075 (synopsis "MessagePack (de)serializer")
7076 (description "MessagePack is a fast, compact binary serialization format,
7077 suitable for similar data to JSON. This package provides CPython bindings for
7078 reading and writing MessagePack data.")
7079 (home-page "https://pypi.org/project/msgpack/")
7080 (license license:asl2.0)))
7081
7082 ;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
7083 ;; release 0.5. Some packages like borg still call it by the old name for now.
7084 ;; <https://bugs.gnu.org/30662>
7085 (define-public python-msgpack-transitional
7086 (package
7087 (inherit python-msgpack)
7088 (name "python-msgpack-transitional")
7089 (arguments
7090 (substitute-keyword-arguments (package-arguments python-msgpack)
7091 ((#:phases phases)
7092 `(modify-phases ,phases
7093 (add-after 'unpack 'configure-transitional
7094 (lambda _
7095 ;; Keep using the old name.
7096 (substitute* "setup.py"
7097 (("TRANSITIONAL = False")
7098 "TRANSITIONAL = 1"))
7099 #t))))))))
7100
7101 (define-public python2-msgpack
7102 (package-with-python2 python-msgpack))
7103
7104 (define-public python-netaddr
7105 (package
7106 (name "python-netaddr")
7107 (version "0.7.19")
7108 (source
7109 (origin
7110 (method url-fetch)
7111 (uri (pypi-uri "netaddr" version))
7112 (sha256
7113 (base32
7114 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
7115 (build-system python-build-system)
7116 (arguments `(#:tests? #f)) ;; No tests.
7117 (home-page "https://github.com/drkjam/netaddr/")
7118 (synopsis "Pythonic manipulation of network addresses")
7119 (description
7120 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
7121 and MAC network addresses.")
7122 (license license:bsd-3)))
7123
7124 (define-public python2-netaddr
7125 (package-with-python2 python-netaddr))
7126
7127 (define-public python2-pyroute2
7128 (package
7129 (name "python2-pyroute2")
7130 (version "0.5.6")
7131 (source
7132 (origin
7133 (method url-fetch)
7134 (uri (pypi-uri "pyroute2" version))
7135 (sha256
7136 (base32
7137 "1gmz4r1w0yzj6fjjypnalmfyy0lnfznydyn62gi3wk50j5hhxbny"))))
7138 (build-system python-build-system)
7139 (arguments
7140 `(#:python ,python-2)) ;Python 3.x is not supported
7141 (home-page "https://github.com/svinota/pyroute2")
7142 (synopsis "Python netlink library")
7143 (description
7144 "Pyroute2 is a pure Python netlink library with minimal dependencies.
7145 Supported netlink families and protocols include:
7146 @itemize
7147 @item rtnl, network settings - addresses, routes, traffic controls
7148 @item nfnetlink - netfilter API: ipset, nftables, ...
7149 @item ipq - simplest userspace packet filtering, iptables QUEUE target
7150 @item devlink - manage and monitor devlink-enabled hardware
7151 @item generic - generic netlink families
7152 @itemize
7153 @item nl80211 - wireless functions API (basic support)
7154 @item taskstats - extended process statistics
7155 @item acpi_events - ACPI events monitoring
7156 @item thermal_events - thermal events monitoring
7157 @item VFS_DQUOT - disk quota events monitoring
7158 @end itemize
7159 @end itemize")
7160 (license license:gpl2+)))
7161
7162 (define-public python-wrapt
7163 (package
7164 (name "python-wrapt")
7165 (version "1.11.2")
7166 (source
7167 (origin
7168 (method url-fetch)
7169 (uri (pypi-uri "wrapt" version))
7170 (sha256
7171 (base32
7172 "1q81762dgsgrd12f8qc39zk8s5wll3m5xc32jdmlf6cls4gh4njn"))))
7173 (build-system python-build-system)
7174 (arguments
7175 ;; Tests are not included in the tarball, they are only available in the
7176 ;; git repository.
7177 `(#:tests? #f))
7178 (home-page "https://github.com/GrahamDumpleton/wrapt")
7179 (synopsis "Module for decorators, wrappers and monkey patching")
7180 (description
7181 "The aim of the wrapt module is to provide a transparent object proxy for
7182 Python, which can be used as the basis for the construction of function
7183 wrappers and decorator functions.")
7184 (license license:bsd-2)))
7185
7186 (define-public python2-wrapt
7187 (package-with-python2 python-wrapt))
7188
7189 (define-public python-xlrd
7190 (package
7191 (name "python-xlrd")
7192 (version "1.2.0")
7193 (source (origin
7194 (method url-fetch)
7195 (uri (pypi-uri "xlrd" version))
7196 (sha256
7197 (base32
7198 "1ci93fda4n67qhdvfl16zasyxrpygzk53hs6m8z0rd4dxrnb6vjl"))))
7199 (build-system python-build-system)
7200 (arguments
7201 `(#:phases
7202 (modify-phases %standard-phases
7203 ;; Some tests depend on writing a temporary file to the user's home
7204 ;; directory.
7205 (add-after 'unpack 'fix-tests
7206 (lambda _
7207 (delete-file "tests/test_open_workbook.py")
7208 #t)))))
7209 (home-page "http://www.python-excel.org/")
7210 (synopsis "Library for extracting data from Excel files")
7211 (description "This package provides a library to extract data from
7212 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
7213 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
7214 Unicode-aware. It is not intended as an end-user tool.")
7215 (license license:bsd-3)))
7216
7217 (define-public python2-xlrd
7218 (package-with-python2 python-xlrd))
7219
7220 (define-public python-prettytable
7221 (package
7222 (name "python-prettytable")
7223 (version "0.7.2")
7224 (source
7225 (origin
7226 (method url-fetch)
7227 (uri (pypi-uri "prettytable" version ".tar.bz2"))
7228 (sha256
7229 (base32
7230 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
7231 (build-system python-build-system)
7232 (home-page "https://code.google.com/archive/p/prettytable/")
7233 (synopsis "Display tabular data in an ASCII table format")
7234 (description
7235 "A library designed to represent tabular data in visually appealing ASCII
7236 tables. PrettyTable allows for selection of which columns are to be printed,
7237 independent alignment of columns (left or right justified or centred) and
7238 printing of sub-tables by specifying a row range.")
7239 (license license:bsd-3)))
7240
7241 (define-public python2-prettytable
7242 (package-with-python2 python-prettytable))
7243
7244 (define-public python-tables
7245 (package
7246 (name "python-tables")
7247 (version "3.4.4")
7248 (source
7249 (origin
7250 (method url-fetch)
7251 (uri (pypi-uri "tables" version))
7252 (sha256
7253 (base32
7254 "0affz7k8babh8wdmsgrz5jxrd569by2w8ffimcxs9wiaf5rw1idx"))
7255 (modules '((guix build utils)))
7256 (snippet
7257 '(begin
7258 ;; Remove pre-compiled .pyc files from source.
7259 (for-each delete-file-recursively
7260 (find-files "." "__pycache__" #:directories? #t))
7261 (for-each delete-file (find-files "." "\\.pyc$"))
7262 #t))))
7263 (build-system python-build-system)
7264 (arguments
7265 `(;; FIXME: python-build-system does not pass configure-flags to "build"
7266 ;; or "check", so we must override the build and check phases.
7267 #:phases
7268 (modify-phases %standard-phases
7269 (add-after 'unpack 'use-gcc
7270 (lambda _
7271 (substitute* "setup.py"
7272 (("compiler = new_compiler\\(\\)" line)
7273 (string-append line
7274 "\ncompiler.set_executables(compiler='gcc',"
7275 "compiler_so='gcc',"
7276 "linker_exe='gcc',"
7277 "linker_so='gcc -shared')")))
7278 #t))
7279 (add-after 'unpack 'disable-tuning
7280 (lambda _
7281 (substitute* "setup.py"
7282 (("cpu_flags = .*")
7283 "cpu_flags = ['sse2']\n"))
7284 #t))
7285 (replace 'build
7286 (lambda* (#:key inputs #:allow-other-keys)
7287 (invoke "python" "setup.py" "build"
7288 (string-append "--hdf5="
7289 (assoc-ref inputs "hdf5")))))
7290 (replace 'check
7291 (lambda* (#:key inputs #:allow-other-keys)
7292 (invoke "python" "setup.py" "check"
7293 (string-append "--hdf5="
7294 (assoc-ref inputs "hdf5"))))))))
7295 (propagated-inputs
7296 `(("python-numexpr" ,python-numexpr)
7297 ("python-numpy" ,python-numpy)))
7298 (native-inputs
7299 `(("python-cython" ,python-cython)
7300 ("pkg-config" ,pkg-config)))
7301 (inputs
7302 `(("hdf5" ,hdf5-1.10)
7303 ("bzip2" ,bzip2)
7304 ("zlib" ,zlib)))
7305 (home-page "http://www.pytables.org/")
7306 (synopsis "Hierarchical datasets for Python")
7307 (description "PyTables is a package for managing hierarchical datasets and
7308 designed to efficiently cope with extremely large amounts of data.")
7309 (license license:bsd-3)))
7310
7311 (define-public python2-tables
7312 (package-with-python2 python-tables))
7313
7314 (define-public python-pytest-black
7315 (package
7316 (name "python-pytest-black")
7317 (version "0.3.8")
7318 (source
7319 (origin
7320 (method url-fetch)
7321 (uri (pypi-uri "pytest-black" version))
7322 (sha256
7323 (base32
7324 "04lppqydxm0f3f3x0l8hj7v0j6d8syj34jc37yzqwqcyqsnaga81"))))
7325 (build-system python-build-system)
7326 (propagated-inputs
7327 `(("python-pytest" ,python-pytest)
7328 ("python-black" ,python-black)
7329 ("python-toml" ,python-toml)))
7330 (native-inputs
7331 `(("python-setuptools-scm" ,python-setuptools-scm)))
7332 (home-page "https://github.com/shopkeep/pytest-black")
7333 (synopsis "Pytest plugin to enable format checking with black")
7334 (description
7335 "This package provides a pytest plugin to enable format checking with the
7336 Python code formatter \"black\".")
7337 (license license:expat)))
7338
7339 (define-public python-pyasn1
7340 (package
7341 (name "python-pyasn1")
7342 (version "0.4.3")
7343 (source
7344 (origin
7345 (method url-fetch)
7346 (uri (pypi-uri "pyasn1" version))
7347 (sha256
7348 (base32
7349 "1z5h38anjzzrxpraa9iq9llffyx2zs8gx0q6dc1g029miwnn50gv"))))
7350 (build-system python-build-system)
7351 (home-page "http://pyasn1.sourceforge.net/")
7352 (synopsis "ASN.1 types and codecs")
7353 (description
7354 "This is an implementation of ASN.1 types and codecs in Python. It is
7355 suitable for a wide range of protocols based on the ASN.1 specification.")
7356 (license license:bsd-2)))
7357
7358 (define-public python2-pyasn1
7359 (package-with-python2 python-pyasn1))
7360
7361 (define-public python-pyasn1-modules
7362 (package
7363 (name "python-pyasn1-modules")
7364 (version "0.2.2")
7365 (source
7366 (origin
7367 (method url-fetch)
7368 (uri (pypi-uri "pyasn1-modules" version))
7369 (sha256
7370 (base32
7371 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
7372 (build-system python-build-system)
7373 (propagated-inputs
7374 `(("python-pyasn1" ,python-pyasn1)))
7375 (home-page "https://sourceforge.net/projects/pyasn1/")
7376 (synopsis "ASN.1 codec implementations")
7377 (description
7378 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
7379 implementations of ASN.1-based codecs and protocols.")
7380 (license license:bsd-3)))
7381
7382 (define-public python2-pyasn1-modules
7383 (package-with-python2 python-pyasn1-modules))
7384
7385 (define-public python-ipaddress
7386 (package
7387 (name "python-ipaddress")
7388 (version "1.0.22")
7389 (source (origin
7390 (method url-fetch)
7391 (uri (pypi-uri "ipaddress" version))
7392 (sha256
7393 (base32
7394 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
7395 (build-system python-build-system)
7396 (home-page "https://github.com/phihag/ipaddress")
7397 (synopsis "IP address manipulation library")
7398 (description
7399 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
7400 in Python. This library is used to create, poke at, and manipulate IPv4 and
7401 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
7402 module to older versions of Python.")
7403 (license license:psfl)))
7404
7405 (define-public python2-ipaddress
7406 (package-with-python2 python-ipaddress))
7407
7408 (define-public python2-ipaddr
7409 (package
7410 (name "python2-ipaddr")
7411 (version "2.1.11")
7412 (source
7413 (origin
7414 (method url-fetch)
7415 (uri (pypi-uri "ipaddr" version))
7416 (sha256
7417 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
7418 (build-system python-build-system)
7419 (arguments
7420 `(#:python ,python-2 ;version 2 only
7421 #:phases
7422 (modify-phases %standard-phases
7423 (replace 'check
7424 (lambda _ (invoke "python" "ipaddr_test.py"))))))
7425 (home-page "https://github.com/google/ipaddr-py")
7426 (synopsis "IP address manipulation library")
7427 (description
7428 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
7429 IPv6 addresses and networks.
7430
7431 For new implementations you may prefer to use the standard module
7432 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
7433 versions of Python.")
7434 (license license:asl2.0)))
7435
7436 (define-public python-idna
7437 (package
7438 (name "python-idna")
7439 (version "2.8")
7440 (source
7441 (origin
7442 (method url-fetch)
7443 (uri (pypi-uri "idna" version))
7444 (sha256
7445 (base32
7446 "01rlkigdxg17sf9yar1jl8n18ls59367wqh59hnawlyg53vb6my3"))))
7447 (build-system python-build-system)
7448 (home-page "https://github.com/kjd/idna")
7449 (synopsis "Internationalized domain names in applications")
7450 (description
7451 "This is a library to support the Internationalised Domain Names in
7452 Applications (IDNA) protocol as specified in RFC 5891. This version of the
7453 protocol is often referred to as “IDNA2008” and can produce different results
7454 from the earlier standard from 2003. The library is also intended to act as a
7455 suitable drop-in replacement for the “encodings.idna” module that comes with
7456 the Python standard library but currently only supports the older 2003
7457 specification.")
7458 (license license:bsd-4)))
7459
7460 (define-public python-idna-2.7
7461 (package (inherit python-idna)
7462 (version "2.7")
7463 (source (origin
7464 (method url-fetch)
7465 (uri (pypi-uri "idna" version))
7466 (sha256
7467 (base32
7468 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))))
7469
7470
7471 (define-public python2-idna
7472 (package-with-python2 python-idna))
7473
7474 (define-public python-idna-ssl
7475 (package
7476 (name "python-idna-ssl")
7477 (version "1.0.1")
7478 (source
7479 (origin
7480 (method url-fetch)
7481 (uri (pypi-uri "idna-ssl" version))
7482 (sha256
7483 (base32
7484 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
7485 (build-system python-build-system)
7486 (arguments
7487 `(#:tests? #f)) ;circular dependency with python-aiohttp
7488 (home-page "https://github.com/aio-libs/idna-ssl")
7489 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
7490 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
7491 domains support.")
7492 (license license:expat)))
7493
7494 (define-public python-pretend
7495 (package
7496 (name "python-pretend")
7497 (version "1.0.9")
7498 (source
7499 (origin
7500 (method url-fetch)
7501 (uri (pypi-uri "pretend" version))
7502 (sha256
7503 (base32
7504 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
7505 (build-system python-build-system)
7506 (home-page "https://github.com/alex/pretend")
7507 (synopsis "Library for stubbing in Python")
7508 (description
7509 "Pretend is a library to make stubbing with Python easier. Stubbing is a
7510 technique for writing tests. You may hear the term mixed up with mocks,
7511 fakes, or doubles. Basically, a stub is an object that returns pre-canned
7512 responses, rather than doing any computation.")
7513 (license license:bsd-3)))
7514
7515 (define-public python2-pretend
7516 (package-with-python2 python-pretend))
7517
7518 (define-public python-pip
7519 (package
7520 (name "python-pip")
7521 (version "20.0.2")
7522 (source
7523 (origin
7524 (method url-fetch)
7525 (uri (pypi-uri "pip" version))
7526 (sha256
7527 (base32
7528 "0zwnlsjn6mb742cr995zfbk9v56ygxp8w3k49601r9by9kmcic3x"))))
7529 (build-system python-build-system)
7530 (arguments
7531 '(#:tests? #f)) ; there are no tests in the pypi archive.
7532 (home-page "https://pip.pypa.io/")
7533 (synopsis "Package manager for Python software")
7534 (description
7535 "Pip is a package manager for Python software, that finds packages on the
7536 Python Package Index (PyPI).")
7537 (license license:expat)))
7538
7539 (define-public python2-pip
7540 (package-with-python2 python-pip))
7541
7542 (define-public python-tlsh
7543 (package
7544 (name "python-tlsh")
7545 (version "3.4.5")
7546 (home-page "https://github.com/trendmicro/tlsh")
7547 (source
7548 (origin
7549 (method git-fetch)
7550 (uri (git-reference
7551 (url "https://github.com/trendmicro/tlsh.git")
7552 (commit (string-append "v" version))))
7553 (file-name (git-file-name name version))
7554 (sha256
7555 (base32 "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll"))))
7556 (build-system cmake-build-system)
7557 (arguments
7558 '(#:out-of-source? #f
7559 #:phases (modify-phases %standard-phases
7560 (replace
7561 'install
7562 (lambda* (#:key outputs #:allow-other-keys)
7563 ;; Build and install the Python bindings. The underlying
7564 ;; C++ library is apparently not meant to be installed.
7565 (let ((out (assoc-ref outputs "out")))
7566 (with-directory-excursion "py_ext"
7567 (and (system* "python" "setup.py" "build")
7568 (system* "python" "setup.py" "install"
7569 (string-append "--prefix=" out))))))))))
7570 (inputs `(("python" ,python-wrapper))) ;for the bindings
7571 (synopsis "Fuzzy matching library for Python")
7572 (description
7573 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
7574 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
7575 value which can be used for similarity comparisons. Similar objects have
7576 similar hash values, which allows for the detection of similar objects by
7577 comparing their hash values. The byte stream should have a sufficient amount
7578 of complexity; for example, a byte stream of identical bytes will not generate
7579 a hash value.")
7580 (license license:asl2.0)))
7581
7582 (define-public python2-tlsh
7583 (package
7584 (inherit python-tlsh)
7585 (name "python2-tlsh")
7586 (inputs `(("python" ,python-2)))))
7587
7588 (define-public python-termcolor
7589 (package
7590 (name "python-termcolor")
7591 (version "1.1.0")
7592 (source
7593 (origin
7594 (method url-fetch)
7595 (uri (pypi-uri "termcolor" version))
7596 (sha256
7597 (base32
7598 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
7599 (build-system python-build-system)
7600 (arguments
7601 ;; There are no tests.
7602 `(#:tests? #f))
7603 (home-page "https://pypi.org/project/termcolor/")
7604 (synopsis "ANSII Color formatting for terminal output")
7605 (description
7606 "This package provides ANSII Color formatting for output in terminals.")
7607 (license license:expat)))
7608
7609 (define-public python2-termcolor
7610 (package-with-python2 python-termcolor))
7611
7612 (define-public python-libarchive-c
7613 (package
7614 (name "python-libarchive-c")
7615 (version "2.9")
7616 (source (origin
7617 (method url-fetch)
7618 (uri (pypi-uri "libarchive-c" version))
7619 (sha256
7620 (base32
7621 "0q7g6a97110bk0j5x81555kajyxh4sybaabab6v5sgr0xi6386cr"))))
7622 (build-system python-build-system)
7623 (arguments
7624 '(#:phases (modify-phases %standard-phases
7625 (add-before
7626 'build 'reference-libarchive
7627 (lambda* (#:key inputs #:allow-other-keys)
7628 ;; Retain the absolute file name of libarchive.so.
7629 (let ((libarchive (assoc-ref inputs "libarchive")))
7630 (substitute* "libarchive/ffi.py"
7631 (("find_library\\('archive'\\)")
7632 (string-append "'" libarchive
7633 "/lib/libarchive.so'"))))))
7634 (replace 'check
7635 (lambda _ (invoke "pytest" "-vv"))))))
7636 (native-inputs
7637 `(("python-mock" ,python-mock)
7638 ("python-pytest" ,python-pytest)))
7639 (inputs
7640 `(("libarchive" ,libarchive)))
7641 (home-page "https://github.com/Changaco/python-libarchive-c")
7642 (synopsis "Python interface to libarchive")
7643 (description
7644 "This package provides Python bindings to libarchive, a C library to
7645 access possibly compressed archives in many different formats. It uses
7646 Python's @code{ctypes} foreign function interface (FFI).")
7647 (license license:lgpl2.0+)))
7648
7649 (define-public python2-libarchive-c
7650 (package-with-python2 python-libarchive-c))
7651
7652 (define-public python-file
7653 (package
7654 (inherit file)
7655 (name "python-file")
7656 (build-system python-build-system)
7657 (arguments
7658 '(#:tests? #f ;no tests
7659 #:configure-flags '("--single-version-externally-managed" "--root=/")
7660 #:phases (modify-phases %standard-phases
7661 (add-before 'build 'change-directory
7662 (lambda _
7663 (chdir "python")
7664 #t))
7665 (add-before 'build 'set-library-file-name
7666 (lambda* (#:key inputs #:allow-other-keys)
7667 (let ((file (assoc-ref inputs "file")))
7668 (substitute* "magic.py"
7669 (("find_library\\('magic'\\)")
7670 (string-append "'" file "/lib/libmagic.so'")))
7671 #t))))))
7672 (inputs `(("file" ,file)))
7673 (native-inputs (if (%current-target-system)
7674 `(("self" ,this-package))
7675 '()))
7676 (synopsis "Python bindings to the libmagic file type guesser. Note that
7677 this module and the python-magic module both provide a \"magic.py\" file;
7678 these two modules, which are different and were developed separately, both
7679 serve the same purpose: provide Python bindings for libmagic.")))
7680
7681 (define-public python2-file
7682 (package-with-python2 python-file))
7683
7684 (define-public python-debian
7685 (package
7686 (name "python-debian")
7687 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
7688 (version "0.1.36")
7689 (source
7690 (origin
7691 ;; Use git-fetch, as pypi doesn't include test suite.
7692 (method git-fetch)
7693 (uri (git-reference
7694 (url home-page)
7695 (commit version)))
7696 (file-name (git-file-name name version))
7697 (sha256
7698 (base32
7699 "0qy6x28bj6yfikhjww932v5xq4mf5bm1iczl7acy4c7zm6mwhqfa"))))
7700 (build-system python-build-system)
7701 (arguments
7702 `(#:phases (modify-phases %standard-phases
7703 (add-after 'unpack 'remove-debian-specific-tests
7704 ;; python-apt, apt and dpkg are not yet available in guix,
7705 ;; and these tests heavily depend on them.
7706 (lambda _
7707 (delete-file "lib/debian/tests/test_deb822.py")
7708 (delete-file "lib/debian/tests/test_debfile.py")
7709 #t)))))
7710 (propagated-inputs
7711 `(("python-six" ,python-six)
7712 ("python-chardet" ,python-chardet)))
7713 (synopsis "Debian package related modules")
7714 (description
7715 ;; XXX: Use @enumerate instead of @itemize to work around
7716 ;; <http://bugs.gnu.org/21772>.
7717 "This package provides Python modules that abstract many formats of
7718 Debian-related files, such as:
7719
7720 @enumerate
7721 @item Debtags information;
7722 @item @file{debian/changelog} files;
7723 @item packages files, pdiffs;
7724 @item control files of single or multiple RFC822-style paragraphs---e.g.
7725 @file{debian/control}, @file{.changes}, @file{.dsc};
7726 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
7727 contained files and meta-information.
7728 @end enumerate\n")
7729
7730 ;; Modules are either GPLv2+ or GPLv3+.
7731 (license license:gpl3+)))
7732
7733 (define-public python-nbformat
7734 (package
7735 (name "python-nbformat")
7736 (version "4.4.0")
7737 (source
7738 (origin
7739 (method url-fetch)
7740 (uri (pypi-uri "nbformat" version))
7741 (sha256
7742 (base32
7743 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
7744 (build-system python-build-system)
7745 (arguments `(#:tests? #f)) ; no test target
7746 (propagated-inputs
7747 `(("python-ipython-genutils" ,python-ipython-genutils)
7748 ("python-jsonschema" ,python-jsonschema)
7749 ("python-jupyter-core" ,python-jupyter-core)
7750 ("python-traitlets" ,python-traitlets)))
7751 (home-page "http://jupyter.org")
7752 (synopsis "Jupyter Notebook format")
7753 (description "This package provides the reference implementation of the
7754 Jupyter Notebook format and Python APIs for working with notebooks.")
7755 (license license:bsd-3)))
7756
7757 (define-public python2-nbformat
7758 (package-with-python2 python-nbformat))
7759
7760 (define-public python-bleach
7761 (package
7762 (name "python-bleach")
7763 (version "3.1.1")
7764 (source
7765 (origin
7766 (method url-fetch)
7767 (uri (pypi-uri "bleach" version))
7768 (sha256
7769 (base32
7770 "0j4xlnw99m1xy0s7wxz9fk5f3c1n8r296fh75jn5p5j61w6qg2xa"))))
7771 (build-system python-build-system)
7772 (propagated-inputs
7773 `(("python-webencodings" ,python-webencodings)
7774 ("python-six" ,python-six)))
7775 (native-inputs
7776 `(("python-pytest" ,python-pytest)
7777 ("python-pytest-runner" ,python-pytest-runner-2)))
7778 (home-page "https://github.com/jsocol/bleach")
7779 (synopsis "Whitelist-based HTML-sanitizing tool")
7780 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
7781 (license license:asl2.0)))
7782
7783 (define-public python2-bleach
7784 (package-with-python2 python-bleach))
7785
7786 (define-public python-entrypoints
7787 (package
7788 (name "python-entrypoints")
7789 (version "0.3")
7790 (source
7791 (origin
7792 (method url-fetch)
7793 (uri (pypi-uri "entrypoints" version))
7794 (sha256
7795 (base32
7796 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
7797 (build-system python-build-system)
7798 ;; The package does not come with a setup.py file, so we have to generate
7799 ;; one ourselves.
7800 (arguments
7801 `(#:tests? #f
7802 #:phases
7803 (modify-phases %standard-phases
7804 (add-after 'unpack 'create-setup.py
7805 (lambda _
7806 (call-with-output-file "setup.py"
7807 (lambda (port)
7808 (format port "\
7809 from setuptools import setup
7810 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
7811 " ,version))))))))
7812 (home-page "https://github.com/takluyver/entrypoints")
7813 (synopsis "Discover and load entry points from installed Python packages")
7814 (description "Entry points are a way for Python packages to advertise
7815 objects with some common interface. The most common examples are
7816 @code{console_scripts} entry points, which define shell commands by
7817 identifying a Python function to run. The @code{entrypoints} module contains
7818 functions to find and load entry points.")
7819 (license license:expat)))
7820
7821 (define-public python2-entrypoints
7822 (package-with-python2 python-entrypoints))
7823
7824 (define-public python-nbconvert
7825 (package
7826 (name "python-nbconvert")
7827 (version "5.0.0b1")
7828 (source
7829 (origin
7830 (method url-fetch)
7831 (uri (pypi-uri "nbconvert" version))
7832 (sha256
7833 (base32
7834 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
7835 (build-system python-build-system)
7836 (arguments
7837 `(;; The "bdist_egg" target is disabled by default, causing the installation
7838 ;; to fail.
7839 #:configure-flags (list "bdist_egg")
7840 ;; FIXME: 5 failures, 40 errors.
7841 #:tests? #f))
7842 ;; #:phases
7843 ;; (modify-phases %standard-phases
7844 ;; (replace 'check
7845 ;; (lambda _
7846 ;; (zero? (system* "py.test" "-v")))))
7847 (native-inputs
7848 `(("python-pytest" ,python-pytest)))
7849 (propagated-inputs
7850 `(("python-bleach" ,python-bleach)
7851 ("python-entrypoints" ,python-entrypoints)
7852 ("python-jinja2" ,python-jinja2)
7853 ("python-jupyter-core" ,python-jupyter-core)
7854 ("python-mistune" ,python-mistune)
7855 ("python-nbformat" ,python-nbformat)
7856 ("python-pygments" ,python-pygments)
7857 ("python-traitlets" ,python-traitlets)))
7858 (home-page "http://jupyter.org")
7859 (synopsis "Converting Jupyter Notebooks")
7860 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
7861 notebooks to various other formats via Jinja templates. It allows you to
7862 convert an @code{.ipynb} notebook file into various static formats including:
7863
7864 @enumerate
7865 @item HTML
7866 @item LaTeX
7867 @item PDF
7868 @item Reveal JS
7869 @item Markdown (md)
7870 @item ReStructured Text (rst)
7871 @item executable script
7872 @end enumerate\n")
7873 (license license:bsd-3)))
7874
7875 (define-public python2-nbconvert
7876 (package-with-python2 python-nbconvert))
7877
7878 (define-public python-notebook
7879 (package
7880 (name "python-notebook")
7881 (version "5.7.4")
7882 (source (origin
7883 (method url-fetch)
7884 (uri (pypi-uri "notebook" version))
7885 (sha256
7886 (base32
7887 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
7888 (build-system python-build-system)
7889 (arguments
7890 `(#:phases
7891 (modify-phases %standard-phases
7892 (replace 'check
7893 (lambda _
7894 ;; These tests require a browser
7895 (delete-file-recursively "notebook/tests/selenium")
7896 ;; Some tests need HOME
7897 (setenv "HOME" "/tmp")
7898 ;; This file contains "warningfilters", which are not supported
7899 ;; by this version of nose.
7900 (delete-file "setup.cfg")
7901 (with-directory-excursion "/tmp"
7902 (invoke "nosetests" "-v"))
7903 #t)))))
7904 (propagated-inputs
7905 `(("python-jupyter-core" ,python-jupyter-core)
7906 ("python-nbformat" ,python-nbformat)
7907 ("python-nbconvert" ,python-nbconvert)
7908 ("python-prometheus-client" ,python-prometheus-client)
7909 ("python-send2trash" ,python-send2trash)
7910 ("python-terminado" ,python-terminado)))
7911 (native-inputs
7912 `(("python-nose" ,python-nose)
7913 ("python-sphinx" ,python-sphinx)
7914 ("python-requests" ,python-requests)))
7915 (home-page "http://jupyter.org/")
7916 (synopsis "Web-based notebook environment for interactive computing")
7917 (description
7918 "The Jupyter HTML notebook is a web-based notebook environment for
7919 interactive computing.")
7920 (properties `((python2-variant . ,(delay python2-notebook))))
7921 (license license:bsd-3)))
7922
7923 (define-public python2-notebook
7924 (let ((base (package-with-python2
7925 (strip-python2-variant python-notebook))))
7926 (package (inherit base)
7927 (native-inputs
7928 `(("python2-mock" ,python2-mock)
7929 ,@(package-native-inputs base)))
7930 (arguments
7931 (substitute-keyword-arguments (package-arguments base)
7932 ((#:phases phases)
7933 `(modify-phases ,phases
7934 (add-before 'check 'disable-test-case
7935 ;; The test requires network access to localhost. Curiously it
7936 ;; fails with Python 2 only. Simply make the test-case return
7937 ;; immediately.
7938 (lambda _
7939 (substitute*
7940 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
7941 (("formats = self.nbconvert_api") "return #")))))))))))
7942
7943 (define-public python-widgetsnbextension
7944 (package
7945 (name "python-widgetsnbextension")
7946 (version "3.4.2")
7947 (source
7948 (origin
7949 (method url-fetch)
7950 (uri (pypi-uri "widgetsnbextension" version))
7951 (sha256
7952 (base32
7953 "0rc2nivdy7k4m3vljx7wdh2jh11djapcgwhvzlbs0isl8gl8nqgs"))))
7954 (build-system python-build-system)
7955 (propagated-inputs
7956 `(("python-ipykernel" ,python-ipykernel)
7957 ("python-notebook" ,python-notebook)))
7958 (native-inputs
7959 `(("python-certifi" ,python-certifi)
7960 ("python-nose" ,python-nose)))
7961 (home-page "https://ipython.org")
7962 (synopsis "IPython HTML widgets for Jupyter")
7963 (description "This package provides interactive HTML widgets for Jupyter
7964 notebooks.")
7965 (license license:bsd-3)))
7966
7967 (define-public python2-widgetsnbextension
7968 (package-with-python2 python-widgetsnbextension))
7969
7970 (define-public python-ipywidgets
7971 (package
7972 (name "python-ipywidgets")
7973 (version "5.2.2")
7974 (source
7975 (origin
7976 (method url-fetch)
7977 (uri (pypi-uri "ipywidgets" version))
7978 (sha256
7979 (base32
7980 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
7981 (build-system python-build-system)
7982 (propagated-inputs
7983 `(("python-ipython" ,python-ipython)
7984 ("python-traitlets" ,python-traitlets)
7985 ("python-widgetsnbextension" ,python-widgetsnbextension)))
7986 (native-inputs
7987 `(("python-nose" ,python-nose)
7988 ("python-pytest" ,python-pytest)))
7989 (home-page "https://ipython.org")
7990 (synopsis "IPython HTML widgets for Jupyter")
7991 (description "Ipywidgets are interactive HTML widgets for Jupyter
7992 notebooks and the IPython kernel. Notebooks come alive when interactive
7993 widgets are used. Users gain control of their data and can visualize changes
7994 in the data.")
7995 (license license:bsd-3)))
7996
7997 (define-public python2-ipywidgets
7998 (package-with-python2 python-ipywidgets))
7999
8000 (define-public python-jupyter-console
8001 (package
8002 (name "python-jupyter-console")
8003 (version "6.0.0")
8004 (source
8005 (origin
8006 (method url-fetch)
8007 (uri (pypi-uri "jupyter_console" version))
8008 (sha256
8009 (base32
8010 "1xdjw11cppf1fxvwkw2bk13ckkwas3bdah8baingn9296mvfi31h"))))
8011 (build-system python-build-system)
8012 (propagated-inputs
8013 `(("python-ipykernel" ,python-ipykernel)
8014 ("python-jupyter-client" ,python-jupyter-client)
8015 ("python-prompt-toolkit" ,python-prompt-toolkit)
8016 ("python-pygments" ,python-pygments)))
8017 (native-inputs
8018 `(("python-nose" ,python-nose)))
8019 (home-page "https://jupyter.org")
8020 (synopsis "Jupyter terminal console")
8021 (description "This package provides a terminal-based console frontend for
8022 Jupyter kernels. It also allows for console-based interaction with non-Python
8023 Jupyter kernels such as IJulia and IRKernel.")
8024 (license license:bsd-3)))
8025
8026 (define-public python2-jupyter-console
8027 (package
8028 (name "python2-jupyter-console")
8029 (version "5.2.0")
8030 (source
8031 (origin
8032 (method url-fetch)
8033 (uri (pypi-uri "jupyter_console" version))
8034 (sha256
8035 (base32
8036 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
8037 (build-system python-build-system)
8038 ;; Tests only run in an TTY.
8039 (arguments `(#:tests? #f))
8040 (propagated-inputs
8041 `(("python2-ipykernel" ,python2-ipykernel)
8042 ("python2-jupyter-client" ,python2-jupyter-client)
8043 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
8044 ("python2-pygments" ,python2-pygments)))
8045 (native-inputs
8046 `(("python2-nose" ,python2-nose)))
8047 (home-page "https://jupyter.org")
8048 (synopsis "Jupyter terminal console")
8049 (description "This package provides a terminal-based console frontend for
8050 Jupyter kernels. It also allows for console-based interaction with non-Python
8051 Jupyter kernels such as IJulia and IRKernel.")
8052 (license license:bsd-3)))
8053
8054 ;; The python-ipython and python-jupyter-console require each other. To get
8055 ;; the functionality in both packages working, strip down the
8056 ;; python-jupyter-console package when using it as an input to python-ipython.
8057 (define python-jupyter-console-minimal
8058 (package
8059 (inherit python-jupyter-console)
8060 (name "python-jupyter-console-minimal")
8061 (arguments
8062 (substitute-keyword-arguments
8063 (package-arguments python-jupyter-console)
8064 ((#:phases phases)
8065 `(modify-phases ,phases
8066 (add-after 'install 'delete-bin
8067 (lambda* (#:key outputs #:allow-other-keys)
8068 ;; Delete the bin files, to avoid conflicts in profiles
8069 ;; where python-ipython and python-jupyter-console are
8070 ;; both present.
8071 (delete-file-recursively
8072 (string-append
8073 (assoc-ref outputs "out") "/bin"))))))))
8074 ;; Remove the python-ipython propagated input, to avoid the cycle
8075 (propagated-inputs
8076 (alist-delete
8077 "python-ipython"
8078 (package-propagated-inputs python-jupyter-console)))))
8079
8080 (define-public python-qtconsole
8081 (package
8082 (name "python-qtconsole")
8083 (version "4.4.3")
8084 (source
8085 (origin
8086 (method url-fetch)
8087 (uri (pypi-uri "qtconsole" version))
8088 (sha256
8089 (base32
8090 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
8091 (build-system python-build-system)
8092 (arguments
8093 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
8094 ;; but we only have the LTS version 5.x. This means that there might be
8095 ;; runtime errors, but since this is a dependency of the Jupyter package,
8096 ;; and Jupyter can be used without the qtconsole we can overlook this for
8097 ;; now.
8098 `(#:tests? #f
8099 #:phases
8100 (modify-phases %standard-phases
8101 (add-before 'check 'pre-check
8102 (lambda _
8103 (setenv "QT_QPA_PLATFORM" "offscreen")
8104 #t)))))
8105 (propagated-inputs
8106 `(("python-ipykernel" ,python-ipykernel)
8107 ("python-ipython" ,python-ipython)))
8108 (native-inputs
8109 `(("python-pytest" ,python-pytest)))
8110 (home-page "http://jupyter.org")
8111 (synopsis "Jupyter Qt console")
8112 (description "This package provides a Qt-based console for Jupyter with
8113 support for rich media output.")
8114 (license license:bsd-3)))
8115
8116 (define-public python-jsbeautifier
8117 (package
8118 (name "python-jsbeautifier")
8119 (version "1.10.2")
8120 (home-page "https://github.com/beautify-web/js-beautify")
8121 (source (origin
8122 (method git-fetch)
8123 (uri (git-reference
8124 (url home-page)
8125 (commit (string-append "v" version))))
8126 (file-name (git-file-name name version))
8127 (sha256
8128 (base32
8129 "0wawb070ki1axb3jc9xvsrgpji52vcfif3zmjzc3z4g98m5xw4kg"))))
8130 (build-system python-build-system)
8131 (arguments
8132 `(#:phases (modify-phases %standard-phases
8133 (add-after 'unpack 'chdir
8134 (lambda _
8135 ;; The upstream Git repository contains all the code,
8136 ;; but this package only builds the python code.
8137 (chdir "python")
8138 #t))
8139 (add-after 'unpack 'patch-python-six-requirements
8140 (lambda _
8141 (substitute* "python/setup.py"
8142 (("six>=1.12.0")
8143 "six>=1.11.0"))
8144 #t)))))
8145 (propagated-inputs
8146 `(("python-editorconfig" ,python-editorconfig)
8147 ("python-six" ,python-six)))
8148 (native-inputs
8149 `(("python-pytest" ,python-pytest)))
8150 (synopsis "JavaScript unobfuscator and beautifier")
8151 (description "Beautify, unpack or deobfuscate JavaScript, leveraging
8152 popular online obfuscators.")
8153 (license license:expat)))
8154
8155 (define-public jupyter
8156 (package
8157 (name "jupyter")
8158 (version "1.0.0")
8159 (source
8160 (origin
8161 (method url-fetch)
8162 (uri (pypi-uri "jupyter" version))
8163 (sha256
8164 (base32
8165 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
8166 (build-system python-build-system)
8167 (arguments '(#:tests? #f)) ; there are none.
8168 (propagated-inputs
8169 `(("python-ipykernel" ,python-ipykernel)
8170 ("python-ipywidgets" ,python-ipywidgets)
8171 ("python-jupyter-console" ,python-jupyter-console)
8172 ("python-nbconvert" ,python-nbconvert)
8173 ("python-notebook" ,python-notebook)
8174 ("python-qtconsole" ,python-qtconsole)))
8175 (native-search-paths
8176 (list (search-path-specification
8177 (variable "JUPYTER_PATH")
8178 (files '("share/jupyter")))))
8179 (home-page "https://jupyter.org")
8180 (synopsis "Web application for interactive documents")
8181 (description
8182 "The Jupyter Notebook is a web application that allows you to create and
8183 share documents that contain live code, equations, visualizations and
8184 explanatory text. Uses include: data cleaning and transformation, numerical
8185 simulation, statistical modeling, machine learning and much more.")
8186 (license license:bsd-3)))
8187
8188 (define-public python-chardet
8189 (package
8190 (name "python-chardet")
8191 (version "3.0.4")
8192 (source
8193 (origin
8194 (method url-fetch)
8195 (uri (pypi-uri "chardet" version))
8196 (sha256
8197 (base32
8198 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
8199 (native-inputs
8200 `(("python-hypothesis" ,python-hypothesis)
8201 ("python-pytest" ,python-pytest)
8202 ("python-pytest-runner" ,python-pytest-runner)))
8203 (build-system python-build-system)
8204 ;; XXX: Incompatible with Pytest 4: <https://github.com/chardet/chardet/issues/173>.
8205 (arguments `(#:tests? #f))
8206 (home-page "https://github.com/chardet/chardet")
8207 (synopsis "Universal encoding detector for Python 2 and 3")
8208 (description
8209 "This package provides @code{chardet}, a Python module that can
8210 automatically detect a wide range of file encodings.")
8211 (license license:lgpl2.1+)))
8212
8213 (define-public python2-chardet
8214 (package-with-python2 python-chardet))
8215
8216 (define-public python-docopt
8217 (package
8218 (name "python-docopt")
8219 (version "0.6.2")
8220 (source
8221 (origin
8222 (method git-fetch)
8223 ;; The release on PyPI does not include tests.
8224 (uri (git-reference
8225 (url "https://github.com/docopt/docopt")
8226 (commit version)))
8227 (file-name (git-file-name name version))
8228 (sha256
8229 (base32
8230 "0aad9gbswnnhssin2q0m5lmpm0ahyf80ahs2zjigbn5y7fvljnd0"))))
8231 (build-system python-build-system)
8232 (native-inputs
8233 `(("python-pytest" ,python-pytest)))
8234 (arguments
8235 `(#:phases
8236 (modify-phases %standard-phases
8237 (replace 'check
8238 (lambda _ (invoke "py.test"))))))
8239 (home-page "http://docopt.org")
8240 (synopsis "Command-line interface description language for Python")
8241 (description "This library allows the user to define a command-line
8242 interface from a program's help message rather than specifying it
8243 programmatically with command-line parsers like @code{getopt} and
8244 @code{argparse}.")
8245 (license license:expat)))
8246
8247 (define-public python2-docopt
8248 (package-with-python2 python-docopt))
8249
8250 (define-public python-pythondialog
8251 (package
8252 (name "python-pythondialog")
8253 (version "3.4.0")
8254 (source
8255 (origin
8256 (method url-fetch)
8257 (uri (pypi-uri "pythondialog" version))
8258 (sha256
8259 (base32
8260 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
8261 (build-system python-build-system)
8262 (arguments
8263 `(#:phases
8264 (modify-phases %standard-phases
8265 (add-after 'unpack 'patch-path
8266 (lambda* (#:key inputs #:allow-other-keys)
8267 (let* ((dialog (assoc-ref inputs "dialog")))
8268 ;; Since this library really wants to grovel the search path, we
8269 ;; must hardcode dialog's store path into it.
8270 (substitute* "dialog.py"
8271 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
8272 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
8273 #t))))
8274 #:tests? #f)) ; no test suite
8275 (propagated-inputs
8276 `(("dialog" ,dialog)))
8277 (home-page "http://pythondialog.sourceforge.net/")
8278 (synopsis "Python interface to the UNIX dialog utility")
8279 (description "A Python wrapper for the dialog utility. Its purpose is to
8280 provide an easy to use, pythonic and comprehensive Python interface to dialog.
8281 This allows one to make simple text-mode user interfaces on Unix-like systems")
8282 (license license:lgpl2.1)
8283 (properties `((python2-variant . ,(delay python2-pythondialog))))))
8284
8285 (define-public python2-pythondialog
8286 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
8287 (package
8288 (inherit base)
8289 (version (package-version python-pythondialog))
8290 (source (origin
8291 (method url-fetch)
8292 (uri (pypi-uri "python2-pythondialog" version))
8293 (sha256
8294 (base32
8295 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
8296
8297 (define-public python-configobj
8298 (package
8299 (name "python-configobj")
8300 (version "5.0.6")
8301 (source (origin
8302 (method url-fetch)
8303 (uri (pypi-uri "configobj" version))
8304 (sha256
8305 (base32
8306 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
8307 ;; Patch setup.py so it looks for python-setuptools, which is
8308 ;; required to parse the keyword 'install_requires' in setup.py.
8309 (patches (search-patches "python-configobj-setuptools.patch"))))
8310 (build-system python-build-system)
8311 (propagated-inputs
8312 `(("python-six" ,python-six)))
8313 (synopsis "Config file reading, writing and validation")
8314 (description "ConfigObj is a simple but powerful config file reader and
8315 writer: an ini file round tripper. Its main feature is that it is very easy to
8316 use, with a straightforward programmer’s interface and a simple syntax for
8317 config files.")
8318 (home-page "https://github.com/DiffSK/configobj")
8319 (license license:bsd-3)))
8320
8321 (define-public python2-configobj
8322 (package-with-python2 python-configobj))
8323
8324 (define-public python-configargparse
8325 (package
8326 (name "python-configargparse")
8327 (version "0.14.0")
8328 (source (origin
8329 (method url-fetch)
8330 (uri (pypi-uri "ConfigArgParse" version))
8331 (sha256
8332 (base32
8333 "149fy4zya0rsnlkvxbbq43cyr8lscb5k4pj1m6n7f1grwcmzwbif"))))
8334 (build-system python-build-system)
8335 (native-inputs
8336 `(("python-pyyaml" ,python-pyyaml)))
8337 (arguments
8338 `(#:phases
8339 (modify-phases %standard-phases
8340 (replace 'check
8341 (lambda _
8342 ;; Bypass setuptools-shim because one test relies on "setup.py"
8343 ;; being the first argument passed to the python call.
8344 ;;
8345 ;; NOTE: Many tests do not run because they rely on Python's
8346 ;; built-in test.test_argparse, but we remove the unit tests from
8347 ;; our Python installation.
8348 (invoke "python" "setup.py" "test"))))))
8349 (synopsis "Replacement for argparse")
8350 (description "A drop-in replacement for argparse that allows options to also
8351 be set via config files and/or environment variables.")
8352 (home-page "https://github.com/bw2/ConfigArgParse")
8353 (license license:expat)))
8354
8355 (define-public python2-configargparse
8356 (package-with-python2 python-configargparse))
8357
8358 (define-public python-argparse-manpage
8359 (package
8360 (name "python-argparse-manpage")
8361 (version "1.1")
8362 (source
8363 (origin
8364 (method url-fetch)
8365 (uri (pypi-uri "argparse-manpage" version))
8366 (sha256
8367 (base32
8368 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
8369 (build-system python-build-system)
8370 (home-page "https://github.com/praiskup/argparse-manpage")
8371 (synopsis "Build manual page from Python's ArgumentParser object")
8372 (description
8373 "This package provides tools to build manual pages from Python's
8374 @code{ArgumentParser} object.")
8375 (license license:asl2.0)))
8376
8377 (define-public python-contextlib2
8378 (package
8379 (name "python-contextlib2")
8380 (version "0.5.5")
8381 (source
8382 (origin
8383 (method url-fetch)
8384 (uri (pypi-uri "contextlib2" version))
8385 (sha256
8386 (base32
8387 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
8388 (build-system python-build-system)
8389 (home-page "https://contextlib2.readthedocs.org/")
8390 (synopsis "Tools for decorators and context managers")
8391 (description "This module is primarily a backport of the Python
8392 3.2 contextlib to earlier Python versions. Like contextlib, it
8393 provides utilities for common tasks involving decorators and context
8394 managers. It also contains additional features that are not part of
8395 the standard library.")
8396 (properties `((python2-variant . ,(delay python2-contextlib2))))
8397 (license license:psfl)))
8398
8399 (define-public python2-contextlib2
8400 (let ((base (package-with-python2
8401 (strip-python2-variant python-contextlib2))))
8402 (package
8403 (inherit base)
8404 (arguments
8405 (substitute-keyword-arguments (package-arguments base)
8406 ((#:phases phases)
8407 `(modify-phases ,phases
8408 (replace 'check
8409 (lambda _ (invoke "python" "test_contextlib2.py" "-v")))))))
8410 (native-inputs
8411 `(("python2-unittest2" ,python2-unittest2))))))
8412
8413 (define-public python-texttable
8414 (package
8415 (name "python-texttable")
8416 (version "1.6.2")
8417 (source
8418 (origin
8419 (method url-fetch)
8420 (uri (pypi-uri "texttable" version))
8421 (sha256
8422 (base32
8423 "1x5l77akfc20x52jma9573qp8l8r07q103pm4l0pbizvh4vp1wzg"))))
8424 (build-system python-build-system)
8425 (arguments
8426 `(#:phases
8427 (modify-phases %standard-phases
8428 (replace 'check
8429 (lambda _ (invoke "pytest" "tests.py"))))))
8430 (native-inputs
8431 `(("python-pytest" ,python-pytest)))
8432 (home-page "https://github.com/foutaise/texttable/")
8433 (synopsis "Python module for creating simple ASCII tables")
8434 (description "Texttable is a Python module for creating simple ASCII
8435 tables.")
8436 (license license:expat)))
8437
8438 (define-public python2-texttable
8439 (package-with-python2 python-texttable))
8440
8441 (define-public python-atomicwrites
8442 (package
8443 (name "python-atomicwrites")
8444 (version "1.3.0")
8445 (source (origin
8446 (method url-fetch)
8447 (uri (pypi-uri "atomicwrites" version))
8448 (sha256
8449 (base32
8450 "19ngcscdf3jsqmpcxn6zl5b6anmsajb6izp1smcd1n02midl9abm"))))
8451 (build-system python-build-system)
8452 (synopsis "Atomic file writes in Python")
8453 (description "Library for atomic file writes using platform dependent tools
8454 for atomic file system operations.")
8455 (home-page "https://github.com/untitaker/python-atomicwrites")
8456 (license license:expat)))
8457
8458 (define-public python2-atomicwrites
8459 (package-with-python2 python-atomicwrites))
8460
8461 (define-public python-click-threading
8462 (package
8463 (name "python-click-threading")
8464 (version "0.4.4")
8465 (source (origin
8466 (method url-fetch)
8467 (uri (pypi-uri "click-threading" version))
8468 (sha256
8469 (base32
8470 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
8471 (build-system python-build-system)
8472 (propagated-inputs
8473 `(("python-click" ,python-click)))
8474 (synopsis "Utilities for multithreading in Click")
8475 (description "This package provides utilities for multithreading in Click
8476 applications.")
8477 (home-page "https://github.com/click-contrib/click-threading")
8478 (license license:expat)))
8479
8480 (define-public python-click-log
8481 (package
8482 (name "python-click-log")
8483 (version "0.3.2")
8484 (source (origin
8485 (method url-fetch)
8486 (uri (pypi-uri "click-log" version))
8487 (sha256
8488 (base32
8489 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
8490 (build-system python-build-system)
8491 (propagated-inputs
8492 `(("python-click" ,python-click)))
8493 (synopsis "Logging for click applications")
8494 (description "This package provides a Python library for logging Click
8495 applications.")
8496 (home-page "https://github.com/click-contrib/click-log")
8497 (license license:expat)))
8498
8499 (define-public python-apipkg
8500 (package
8501 (name "python-apipkg")
8502 (version "1.4")
8503 (source (origin
8504 (method url-fetch)
8505 (uri (pypi-uri "apipkg" version))
8506 (sha256
8507 (base32
8508 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
8509 (build-system python-build-system)
8510 (native-inputs
8511 `(("python-pytest" ,python-pytest)))
8512 (synopsis "Namespace control and lazy-import mechanism")
8513 (description "With apipkg you can control the exported namespace of a Python
8514 package and greatly reduce the number of imports for your users. It is a small
8515 pure Python module that works on virtually all Python versions.")
8516 (home-page "https://github.com/pytest-dev/apipkg")
8517 (license license:expat)))
8518
8519 (define-public python2-apipkg
8520 (package-with-python2 python-apipkg))
8521
8522 (define-public python-execnet
8523 (package
8524 (name "python-execnet")
8525 (version "1.4.1")
8526 (source (origin
8527 (method url-fetch)
8528 (uri (pypi-uri "execnet" version))
8529 (sha256
8530 (base32
8531 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
8532 (build-system python-build-system)
8533 (arguments
8534 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
8535 ;; The two test failures are caused by the lack of an `ssh` executable.
8536 ;; The test suite can be run with pytest after the 'install' phase.
8537 #:tests? #f))
8538 (native-inputs
8539 `(("python-pytest" ,python-pytest)
8540 ("python-setuptools-scm" ,python-setuptools-scm)))
8541 (propagated-inputs
8542 `(("python-apipkg" ,python-apipkg)))
8543 (synopsis "Rapid multi-Python deployment")
8544 (description "Execnet provides a share-nothing model with
8545 channel-send/receive communication for distributing execution across many
8546 Python interpreters across version, platform and network barriers. It has a
8547 minimal and fast API targeting the following uses:
8548 @enumerate
8549 @item distribute tasks to (many) local or remote CPUs
8550 @item write and deploy hybrid multi-process applications
8551 @item write scripts to administer multiple environments
8552 @end enumerate")
8553 (home-page "http://codespeak.net/execnet/")
8554 (license license:expat)))
8555
8556 (define-public python2-execnet
8557 (package-with-python2 python-execnet))
8558
8559 (define-public python-icalendar
8560 (package
8561 (name "python-icalendar")
8562 (version "4.0.4")
8563 (source (origin
8564 (method url-fetch)
8565 (uri (pypi-uri "icalendar" version))
8566 (sha256
8567 (base32
8568 "16gjvqv0n05jrb9g228pdjgzd3amz2pdhvcgsn1jypszjg5m2w9l"))))
8569 (build-system python-build-system)
8570 (propagated-inputs
8571 `(("python-dateutil" ,python-dateutil)
8572 ("python-pytz" ,python-pytz)))
8573 (synopsis "Python library for parsing iCalendar files")
8574 (description "The icalendar package is a parser/generator of iCalendar
8575 files for use with Python.")
8576 (home-page "https://github.com/collective/icalendar")
8577 (license license:bsd-2)))
8578
8579 (define-public python-args
8580 (package
8581 (name "python-args")
8582 (version "0.1.0")
8583 (source (origin
8584 (method url-fetch)
8585 (uri (pypi-uri "args" version))
8586 (sha256
8587 (base32
8588 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
8589 (build-system python-build-system)
8590 (home-page "https://github.com/kennethreitz/args")
8591 (synopsis "Command-line argument parser")
8592 (description
8593 "This library provides a Python module to parse command-line arguments.")
8594 (license license:bsd-3)))
8595
8596 (define-public python2-args
8597 (package-with-python2 python-args))
8598
8599 (define-public python-clint
8600 (package
8601 (name "python-clint")
8602 (version "0.5.1")
8603 (source (origin
8604 (method url-fetch)
8605 (uri (pypi-uri "clint" version))
8606 (sha256
8607 (base32
8608 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
8609 (build-system python-build-system)
8610 (arguments
8611 '(#:phases
8612 (modify-phases %standard-phases
8613 (replace 'check
8614 (lambda _ (invoke "py.test" "-v"))))))
8615 (native-inputs
8616 `(("python-pytest" ,python-pytest)))
8617 (propagated-inputs
8618 `(("python-args" ,python-args)))
8619 (home-page "https://github.com/kennethreitz/clint")
8620 (synopsis "Command-line interface tools")
8621 (description
8622 "Clint is a Python module filled with a set of tools for developing
8623 command-line applications, including tools for colored and indented
8624 output, progress bar display, and pipes.")
8625 (license license:isc)))
8626
8627 (define-public python2-clint
8628 (package-with-python2 python-clint))
8629
8630 (define-public python-rply
8631 (package
8632 (name "python-rply")
8633 (version "0.7.5")
8634 (source (origin
8635 (method url-fetch)
8636 (uri (pypi-uri "rply" version))
8637 (sha256
8638 (base32
8639 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
8640 (build-system python-build-system)
8641 (propagated-inputs
8642 `(("python-appdirs" ,python-appdirs)))
8643 (home-page "https://github.com/alex/rply")
8644 (synopsis "Parser generator for Python")
8645 (description
8646 "This package provides a pure Python based parser generator, that also
8647 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
8648 with a new public API, and RPython support.")
8649 (license license:bsd-3)))
8650
8651 (define-public python2-rply
8652 (package-with-python2 python-rply))
8653
8654 (define-public python-hy
8655 (package
8656 (name "python-hy")
8657 (version "0.17.0")
8658 (source (origin
8659 (method url-fetch)
8660 (uri (pypi-uri "hy" version))
8661 (sha256
8662 (base32
8663 "1gdbqsirsdxj320wnp7my5awzs1kfs6m4fqmkzbd1zd47qzj0zfi"))))
8664 (build-system python-build-system)
8665 (arguments
8666 '(#:phases
8667 (modify-phases %standard-phases
8668 (add-before 'install 'set-HOME
8669 (lambda _
8670 (setenv "HOME" "/tmp")))
8671 (replace 'check
8672 (lambda _
8673 ;; Tests require write access to HOME.
8674 (setenv "HOME" "/tmp")
8675 (invoke "nosetests"))))))
8676 (native-inputs
8677 `(("python-coverage" ,python-coverage)
8678 ("python-nose" ,python-nose)))
8679 (propagated-inputs
8680 `(("python-astor" ,python-astor)
8681 ("python-clint" ,python-clint)
8682 ("python-rply" ,python-rply)
8683 ("python-fastentrypoints"
8684 ,python-fastentrypoints)
8685 ("python-funcparserlib"
8686 ,python-funcparserlib)))
8687 (home-page "http://hylang.org/")
8688 (synopsis "Lisp frontend to Python")
8689 (description
8690 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
8691 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
8692 Python at your fingertips, in Lisp form.")
8693 (license license:expat)))
8694
8695 (define-public python2-hy
8696 (package-with-python2 python-hy))
8697
8698 (define-public python2-functools32
8699 (package
8700 (name "python2-functools32")
8701 (version "3.2.3-2")
8702 (source
8703 (origin
8704 (method url-fetch)
8705 (uri (pypi-uri "functools32" version))
8706 (sha256
8707 (base32
8708 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
8709 (build-system python-build-system)
8710 (arguments
8711 `(#:python ,python-2
8712 #:tests? #f)) ; no test target
8713 (home-page "https://github.com/MiCHiLU/python-functools32")
8714 (synopsis
8715 "Backport of the functools module from Python 3.2.3")
8716 (description
8717 "This package is a backport of the @code{functools} module from Python
8718 3.2.3 for use with older versions of Python and PyPy.")
8719 (license license:expat)))
8720
8721 (define-public python2-subprocess32
8722 (package
8723 (name "python2-subprocess32")
8724 (version "3.2.7")
8725 (source (origin
8726 (method url-fetch)
8727 (uri (pypi-uri "subprocess32" version))
8728 (sha256
8729 (base32
8730 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
8731 (patches
8732 (search-patches "python2-subprocess32-disable-input-test.patch"))))
8733 (build-system python-build-system)
8734 (arguments
8735 `(#:python ,python-2
8736 ;; The test suite fails with Python > 2.7.13:
8737 ;; import test.support
8738 ;; ImportError: No module named support
8739 #:tests? #f
8740 #:phases
8741 (modify-phases %standard-phases
8742 (add-after 'unpack 'patch-/bin/sh
8743 (lambda _
8744 (substitute* '("subprocess32.py"
8745 "test_subprocess32.py")
8746 (("/bin/sh") (which "sh")))
8747 #t)))))
8748 (home-page "https://github.com/google/python-subprocess32")
8749 (synopsis "Backport of the subprocess module from Python 3.2")
8750 (description
8751 "This is a backport of the @code{subprocess} standard library module
8752 from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
8753 new features. On POSIX systems it is guaranteed to be reliable when used
8754 in threaded applications. It includes timeout support from Python 3.3 but
8755 otherwise matches 3.2’s API.")
8756 (license license:psfl)))
8757
8758 (define-public python2-futures
8759 (package
8760 (name "python2-futures")
8761 (version "3.2.0")
8762 (source
8763 (origin
8764 (method url-fetch)
8765 (uri (pypi-uri "futures" version))
8766 (sha256
8767 (base32
8768 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
8769 (build-system python-build-system)
8770 (arguments
8771 `(#:python ,python-2
8772 #:phases
8773 (modify-phases %standard-phases
8774 (replace 'check
8775 (lambda _
8776 (invoke "python" "test_futures.py")
8777 #t)))))
8778 (home-page "https://github.com/agronholm/pythonfutures")
8779 (synopsis
8780 "Backport of the concurrent.futures package from Python 3.2")
8781 (description
8782 "The concurrent.futures module provides a high-level interface for
8783 asynchronously executing callables. This package backports the
8784 concurrent.futures package from Python 3.2")
8785 (license license:bsd-3)))
8786
8787 (define-public python-promise
8788 (package
8789 (name "python-promise")
8790 (version "0.4.2")
8791 (source
8792 (origin
8793 (method url-fetch)
8794 (uri (pypi-uri "promise" version))
8795 (sha256
8796 (base32
8797 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
8798 (build-system python-build-system)
8799 ;; Tests wants python-futures, which is a python2 only program, and
8800 ;; can't be found by python-promise at test time.
8801 (arguments `(#:tests? #f))
8802 (home-page "https://github.com/syrusakbary/promise")
8803 (synopsis "Promises/A+ implementation for Python")
8804 (description
8805 "Promises/A+ implementation for Python")
8806 (properties `((python2-variant . ,(delay python2-promise))))
8807 (license license:expat)))
8808
8809 (define-public python2-promise
8810 (let ((promise (package-with-python2
8811 (strip-python2-variant python-promise))))
8812 (package (inherit promise)
8813 (arguments (substitute-keyword-arguments (package-arguments promise)
8814 ((#:tests? _) #t)))
8815 (native-inputs
8816 `(("python2-futures" ,python2-futures)
8817 ("python2-pytest" ,python2-pytest)
8818 ,@(package-native-inputs promise))))))
8819
8820 (define-public python-progressbar33
8821 (package
8822 (name "python-progressbar33")
8823 (version "2.4")
8824 (source
8825 (origin
8826 (method url-fetch)
8827 (uri (pypi-uri "progressbar33" version))
8828 (sha256
8829 (base32
8830 "1zvf6zs5hzrc03p9nfs4p16vhilqikycvv1yk0pxn8s07fdhvzji"))))
8831 (build-system python-build-system)
8832 (home-page "http://github.com/germangh/python-progressbar")
8833 (synopsis "Text progress bar library for Python")
8834 (description
8835 "This package provides a text progress bar library for Python. This
8836 version only differs from the original @code{progressbar} package in that it
8837 uses relative package imports instead of absolute imports, which is necessary
8838 for the module to work under Python 3.3.")
8839 ;; Either or both of these licenses may be selected.
8840 (license (list license:lgpl2.1+ license:bsd-3))))
8841
8842 (define-public python-colorama
8843 (package
8844 (name "python-colorama")
8845 (version "0.4.3")
8846 (source
8847 (origin
8848 (method url-fetch)
8849 (uri (pypi-uri "colorama" version))
8850 (sha256
8851 (base32
8852 "189n8hpijy14jfan4ha9f5n06mnl33cxz7ay92wjqgkr639s0vg9"))))
8853 (build-system python-build-system)
8854 (synopsis "Colored terminal text rendering for Python")
8855 (description "Colorama is a Python library for rendering colored terminal
8856 text.")
8857 (home-page "https://pypi.org/project/colorama/")
8858 (license license:bsd-3)))
8859
8860 (define-public python2-colorama
8861 (package-with-python2 python-colorama))
8862
8863 (define-public python-rsa
8864 (package
8865 (name "python-rsa")
8866 (version "3.4.2")
8867 (source
8868 (origin
8869 (method url-fetch)
8870 (uri (pypi-uri "rsa" version))
8871 (sha256
8872 (base32
8873 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
8874 (build-system python-build-system)
8875 (propagated-inputs
8876 `(("python-pyasn1" ,python-pyasn1)))
8877 (synopsis "Pure-Python RSA implementation")
8878 (description "Python-RSA is a pure-Python RSA implementation. It supports
8879 encryption and decryption, signing and verifying signatures, and key
8880 generation according to PKCS#1 version 1.5. It can be used as a Python
8881 library as well as on the command line.")
8882 (home-page "https://stuvel.eu/rsa")
8883 (license license:asl2.0)))
8884
8885 (define-public python2-rsa
8886 (package-with-python2 python-rsa))
8887
8888 (define-public python-pluggy
8889 (package
8890 (name "python-pluggy")
8891 (version "0.11.0")
8892 (source
8893 (origin
8894 (method url-fetch)
8895 (uri (pypi-uri "pluggy" version))
8896 (sha256
8897 (base32
8898 "10511a54dvafw1jrk75mrhml53c7b7w4yaw7241696lc2hfvr895"))))
8899 (build-system python-build-system)
8900 (native-inputs
8901 `(("python-setuptools-scm" ,python-setuptools-scm)))
8902 (synopsis "Plugin and hook calling mechanism for Python")
8903 (description "Pluggy is an extraction of the plugin manager as used by
8904 Pytest but stripped of Pytest specific details.")
8905 (home-page "https://pypi.org/project/pluggy/")
8906 (license license:expat)))
8907
8908 (define-public python2-pluggy
8909 (package-with-python2 python-pluggy))
8910
8911 (define-public python-tox
8912 (package
8913 (name "python-tox")
8914 (version "2.8.1")
8915 (source
8916 (origin
8917 (method url-fetch)
8918 (uri (pypi-uri "tox" version))
8919 (sha256
8920 (base32
8921 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
8922 (build-system python-build-system)
8923 (arguments
8924 ;; FIXME: Tests require pytest-timeout, which itself requires
8925 ;; pytest>=2.8.0 for installation.
8926 '(#:tests? #f))
8927 (propagated-inputs
8928 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
8929 ("python-py" ,python-py)
8930 ("python-virtualenv" ,python-virtualenv)))
8931 (native-inputs
8932 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
8933 ("python-pytest" ,python-pytest) ; >= 2.3.5
8934 ("python-setuptools-scm" ,python-setuptools-scm)))
8935 (home-page "https://tox.readthedocs.io")
8936 (synopsis "Virtualenv-based automation of test activities")
8937 (description "Tox is a generic virtualenv management and test command line
8938 tool. It can be used to check that a package installs correctly with
8939 different Python versions and interpreters, or run tests in each type of
8940 supported environment, or act as a frontend to continuous integration
8941 servers.")
8942 (license license:expat)))
8943
8944 (define-public python2-tox
8945 (package-with-python2 python-tox))
8946
8947 (define-public python-jmespath
8948 (package
8949 (name "python-jmespath")
8950 (version "0.9.4")
8951 (source
8952 (origin
8953 (method url-fetch)
8954 (uri (pypi-uri "jmespath" version))
8955 (sha256
8956 (base32
8957 "0k0765x1mybcrzajh3hiqkl8sy9hs0bmn4900frxy0j3ykvaxqmx"))))
8958 (build-system python-build-system)
8959 (native-inputs
8960 `(("python-nose" ,python-nose)))
8961 (synopsis "JSON Matching Expressions")
8962 (description "JMESPath (pronounced “james path”) is a Python library that
8963 allows one to declaratively specify how to extract elements from a JSON
8964 document.")
8965 (home-page "https://github.com/jmespath/jmespath.py")
8966 (license license:expat)))
8967
8968 (define-public python2-jmespath
8969 (package-with-python2 python-jmespath))
8970
8971 (define-public python-botocore
8972 (package
8973 (name "python-botocore")
8974 (version "1.12.149")
8975 (source
8976 (origin
8977 (method url-fetch)
8978 (uri (pypi-uri "botocore" version))
8979 (sha256
8980 (base32
8981 "12597f74khp3ngwr282cb949w0gcqj20rkfc3x275dijavyy5cmf"))))
8982 (build-system python-build-system)
8983 (arguments
8984 ;; FIXME: Many tests are failing.
8985 '(#:tests? #f))
8986 (propagated-inputs
8987 `(("python-dateutil" ,python-dateutil)
8988 ("python-docutils" ,python-docutils)
8989 ("python-jmespath" ,python-jmespath)))
8990 (native-inputs
8991 `(("python-mock" ,python-mock)
8992 ("python-nose" ,python-nose)
8993 ("behave" ,behave)
8994 ("python-tox" ,python-tox)
8995 ("python-urllib3" ,python-urllib3)
8996 ("python-wheel" ,python-wheel)))
8997 (home-page "https://github.com/boto/botocore")
8998 (synopsis "Low-level interface to AWS")
8999 (description "Botocore is a Python library that provides a low-level
9000 interface to the Amazon Web Services (AWS) API.")
9001 (license license:asl2.0)))
9002
9003 (define-public python2-botocore
9004 (package-with-python2 python-botocore))
9005
9006 (define-public python-xdo
9007 (package
9008 (name "python-xdo")
9009 (version "0.3")
9010 (source (origin
9011 (method url-fetch)
9012 (uri (string-append
9013 "http://http.debian.net/debian/pool/main/p/python-xdo/"
9014 "python-xdo_" version ".orig.tar.gz"))
9015 (sha256
9016 (base32
9017 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
9018 (build-system python-build-system)
9019 (arguments
9020 '(#:phases
9021 (modify-phases %standard-phases
9022 (add-before 'install 'patch-libxdo-path
9023 ;; Hardcode the path of dynamically loaded libxdo library.
9024 (lambda* (#:key inputs #:allow-other-keys)
9025 (let ((libxdo (string-append
9026 (assoc-ref inputs "xdotool")
9027 "/lib/libxdo.so")))
9028 (substitute* "xdo/_xdo.py"
9029 (("find_library\\(\"xdo\"\\)")
9030 (simple-format #f "\"~a\"" libxdo)))
9031 #t))))
9032 #:tests? #f)) ; no tests provided
9033 (propagated-inputs
9034 `(("python-six" ,python-six)))
9035 (inputs
9036 `(("xdotool" ,xdotool)
9037 ("libX11" ,libx11)))
9038 (home-page "https://tracker.debian.org/pkg/python-xdo")
9039 (synopsis "Python library for simulating X11 keyboard/mouse input")
9040 (description "Provides bindings to libxdo for manipulating X11 via simulated
9041 input. (Note that this is mostly a legacy library; you may wish to look at
9042 python-xdo for newer bindings.)")
9043 (license license:bsd-3)))
9044
9045 (define-public python2-xdo
9046 (package-with-python2 python-xdo))
9047
9048 (define-public python-mako
9049 (package
9050 (name "python-mako")
9051 (version "1.1.0")
9052 (source
9053 (origin
9054 (method url-fetch)
9055 (uri (pypi-uri "Mako" version))
9056 (sha256
9057 (base32
9058 "0jqa3qfpykyn4fmkn0kh6043sfls7br8i2bsdbccazcvk9cijsd3"))))
9059 (build-system python-build-system)
9060 (arguments
9061 `(#:phases (modify-phases %standard-phases
9062 (replace 'check
9063 (lambda _
9064 (invoke "pytest" "-vv"))))))
9065 (propagated-inputs
9066 `(("python-markupsafe" ,python-markupsafe)))
9067 (native-inputs
9068 `(("python-mock" ,python-mock)
9069 ("python-pytest" ,python-pytest)))
9070 (home-page "https://www.makotemplates.org/")
9071 (synopsis "Templating language for Python")
9072 (description "Mako is a templating language for Python that compiles
9073 templates into Python modules.")
9074 (license license:expat)))
9075
9076 (define-public python2-mako
9077 (package-with-python2 python-mako))
9078
9079 (define-public python-waitress
9080 (package
9081 (name "python-waitress")
9082 (version "1.1.0")
9083 (source
9084 (origin
9085 (method url-fetch)
9086 (uri (pypi-uri "waitress" version))
9087 (patches (search-patches "python-waitress-fix-tests.patch"))
9088 (sha256
9089 (base32
9090 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
9091 (build-system python-build-system)
9092 (home-page "https://github.com/Pylons/waitress")
9093 (synopsis "Waitress WSGI server")
9094 (description "Waitress is meant to be a production-quality pure-Python WSGI
9095 server with very acceptable performance.")
9096 (license license:zpl2.1)))
9097
9098 (define-public python2-waitress
9099 (package-with-python2 python-waitress))
9100
9101 (define-public python-whichcraft
9102 (package
9103 (name "python-whichcraft")
9104 (version "0.6.1")
9105 (source
9106 (origin
9107 (method url-fetch)
9108 (uri (pypi-uri "whichcraft" version))
9109 (sha256
9110 (base32
9111 "11yfkzyplizdgndy34vyd5qlmr1n5mxis3a3svxmx8fnccdvknxc"))))
9112 (build-system python-build-system)
9113 (native-inputs
9114 `(("python-pytest" ,python-pytest)))
9115 (home-page "https://github.com/pydanny/whichcraft")
9116 (synopsis "Cross-platform cross-python shutil.which functionality")
9117 (description
9118 "This package provides a shim of the shutil.which function that's
9119 designed to work across multiple versions of Python.")
9120 (license license:bsd-3)))
9121
9122 (define-public python-cookiecutter
9123 (package
9124 (name "python-cookiecutter")
9125 (version "1.6.0")
9126 (source
9127 (origin
9128 (method url-fetch)
9129 (uri (pypi-uri "cookiecutter" version))
9130 (sha256
9131 (base32
9132 "0glsvaz8igi2wy1hsnhm9fkn6560vdvdixzvkq6dn20z3hpaa5hk"))))
9133 (build-system python-build-system)
9134 (native-inputs
9135 `(("python-freezegun" ,python-freezegun)
9136 ("python-pytest" ,python-pytest)
9137 ("python-pytest-catchlog" ,python-pytest-catchlog)
9138 ("python-pytest-cov" ,python-pytest-cov)
9139 ("python-pytest-mock" ,python-pytest-mock)))
9140 (propagated-inputs
9141 `(("python-binaryornot" ,python-binaryornot)
9142 ("python-click" ,python-click)
9143 ("python-future" ,python-future)
9144 ("python-jinja2" ,python-jinja2)
9145 ("python-jinja2-time" ,python-jinja2-time)
9146 ("python-poyo" ,python-poyo)
9147 ("python-requests" ,python-requests)
9148 ("python-whichcraft" ,python-whichcraft)))
9149 (home-page "https://github.com/audreyr/cookiecutter")
9150 (synopsis
9151 "Command-line utility that creates projects from project templates")
9152 (description
9153 "This package provides a command-line utility that creates projects from
9154 project templates, e.g. creating a Python package project from a Python package
9155 project template.")
9156 (license license:bsd-3)))
9157
9158 (define-public python-pyquery
9159 (package
9160 (name "python-pyquery")
9161 (version "1.2.17")
9162 (source
9163 (origin
9164 (method url-fetch)
9165 (uri (pypi-uri "pyquery" version))
9166 (sha256
9167 (base32
9168 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
9169 (build-system python-build-system)
9170 (native-inputs
9171 `(("python-webob" ,python-webob)
9172 ("python-webtest" ,python-webtest)))
9173 (propagated-inputs
9174 `(("python-lxml" ,python-lxml)
9175 ("python-cssselect" ,python-cssselect)))
9176 (home-page "https://github.com/gawel/pyquery")
9177 (synopsis "Make jQuery-like queries on xml documents")
9178 (description "pyquery allows you to make jQuery queries on xml documents.
9179 The API is as much as possible the similar to jQuery. pyquery uses lxml for
9180 fast xml and html manipulation.")
9181 (license license:bsd-3)))
9182
9183 (define-public python-anyjson
9184 (package
9185 (name "python-anyjson")
9186 (version "0.3.3")
9187 (source
9188 (origin
9189 (method url-fetch)
9190 (uri (pypi-uri "anyjson" version))
9191 (sha256
9192 (base32
9193 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
9194 (build-system python-build-system)
9195 (arguments
9196 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
9197 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
9198 ;; whatever) so this transformation needs to be done before the tests
9199 ;; can be run. Maybe we could add a build step to transform beforehand
9200 ;; but it could be annoying/difficult.
9201 ;; We can enable tests for the Python 2 version, though, and do below.
9202 #:tests? #f))
9203 (home-page "https://bitbucket.org/runeh/anyjson/")
9204 (synopsis
9205 "Wraps best available JSON implementation in a common interface")
9206 (description
9207 "Anyjson loads whichever is the fastest JSON module installed
9208 and provides a uniform API regardless of which JSON implementation is used.")
9209 (license license:bsd-3)
9210 (properties `((python2-variant . ,(delay python2-anyjson))))))
9211
9212 (define-public python2-anyjson
9213 (let ((anyjson (package-with-python2
9214 (strip-python2-variant python-anyjson))))
9215 (package
9216 (inherit anyjson)
9217 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
9218 #:tests? #t
9219 ,@(package-arguments anyjson)))
9220 (native-inputs `(("python2-nose" ,python2-nose))))))
9221
9222 (define-public python-amqp
9223 (package
9224 (name "python-amqp")
9225 (version "2.3.2")
9226 (source
9227 (origin
9228 (method url-fetch)
9229 (uri (pypi-uri "amqp" version))
9230 (sha256
9231 (base32
9232 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
9233 (build-system python-build-system)
9234 (native-inputs
9235 `(("python-case" ,python-case)
9236 ("python-pytest-sugar" ,python-pytest-sugar)
9237 ("python-mock" ,python-mock)))
9238 (propagated-inputs
9239 `(("python-vine" ,python-vine)))
9240 (home-page "https://github.com/celery/py-amqp")
9241 (synopsis
9242 "Low-level AMQP client for Python (fork of amqplib)")
9243 (description
9244 "This is a fork of amqplib which was originally written by Barry Pederson.
9245 It is maintained by the Celery project, and used by kombu as a pure python
9246 alternative when librabbitmq is not available.")
9247 (license license:lgpl2.1+)
9248 (properties `((python2-variant . ,(delay python2-amqp))))))
9249
9250 (define-public python2-amqp
9251 (let ((amqp (package-with-python2
9252 (strip-python2-variant python-amqp))))
9253 (package
9254 (inherit amqp)
9255 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
9256 ;; unmaintained. Weirdly, does not do this on the python 3
9257 ;; version?
9258 #:tests? #f
9259 ,@(package-arguments amqp))))))
9260
9261 (define-public python-txamqp
9262 (package
9263 (name "python-txamqp")
9264 (version "0.8.2")
9265 (source
9266 (origin
9267 (method url-fetch)
9268 (uri (pypi-uri "txAMQP" version))
9269 (sha256
9270 (base32
9271 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
9272 (build-system python-build-system)
9273 (propagated-inputs
9274 `(("python-six" ,python-six)
9275 ("python-twisted" ,python-twisted)))
9276 (home-page "https://github.com/txamqp/txamqp")
9277 (synopsis "Communicate with AMQP peers and brokers using Twisted")
9278 (description
9279 "This package provides a Python library for communicating with AMQP peers
9280 and brokers using the asynchronous networking framework Twisted. It contains
9281 all the necessary code to connect, send and receive messages to/from an
9282 AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
9283 also includes support for using Thrift RPC over AMQP in Twisted
9284 applications.")
9285 (license license:asl2.0)))
9286
9287 (define-public python2-txamqp
9288 (package-with-python2 python-txamqp))
9289
9290 (define-public python-kombu
9291 (package
9292 (name "python-kombu")
9293 (version "4.2.2")
9294 (source
9295 (origin
9296 (method url-fetch)
9297 (uri (pypi-uri "kombu" version))
9298 (sha256
9299 (base32
9300 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
9301 (build-system python-build-system)
9302 (native-inputs
9303 `(("python-mock" ,python-mock)
9304 ("python-case" ,python-case)
9305 ("python-pyro4" ,python-pyro4)
9306 ("python-pytest-sugar" ,python-pytest-sugar)
9307 ("python-pytz" ,python-pytz)))
9308 (propagated-inputs
9309 `(("python-anyjson" ,python-anyjson)
9310 ("python-amqp" ,python-amqp)
9311 ("python-redis" ,python-redis)))
9312 (home-page "https://kombu.readthedocs.io")
9313 (synopsis "Message passing library for Python")
9314 (description "The aim of Kombu is to make messaging in Python as easy as
9315 possible by providing an idiomatic high-level interface for the AMQ protocol,
9316 and also provide proven and tested solutions to common messaging problems.
9317 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
9318 message orientation, queuing, routing, reliability and security, for which the
9319 RabbitMQ messaging server is the most popular implementation.")
9320 (license license:bsd-3)
9321 (properties `((python2-variant . ,(delay python2-kombu))))))
9322
9323 (define-public python2-kombu
9324 (let ((kombu (package-with-python2
9325 (strip-python2-variant python-kombu))))
9326 (package
9327 (inherit kombu)
9328 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
9329 ;; It works fine on the python3 variant.
9330 #:tests? #f
9331 ,@(package-arguments kombu)))
9332 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9333 ,@(package-native-inputs kombu))))))
9334
9335 (define-public python-billiard
9336 (package
9337 (name "python-billiard")
9338 (version "3.5.0.5")
9339 (source
9340 (origin
9341 (method url-fetch)
9342 (uri (pypi-uri "billiard" version))
9343 (sha256
9344 (base32
9345 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
9346 (build-system python-build-system)
9347 (native-inputs
9348 `(("python-case" ,python-case)
9349 ("python-pytest" ,python-pytest)))
9350 (home-page "https://github.com/celery/billiard")
9351 (synopsis
9352 "Python multiprocessing fork with improvements and bugfixes")
9353 (description
9354 "Billiard is a fork of the Python 2.7 multiprocessing package. The
9355 multiprocessing package itself is a renamed and updated version of R Oudkerk's
9356 pyprocessing package. This standalone variant is intended to be compatible with
9357 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
9358 (license license:bsd-3)
9359 (properties `((python2-variant . ,(delay python2-billiard))))))
9360
9361 (define-public python2-billiard
9362 (let ((billiard (package-with-python2
9363 (strip-python2-variant python-billiard))))
9364 (package
9365 (inherit billiard)
9366 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9367 ("python2-mock" ,python2-mock)
9368 ,@(package-native-inputs billiard))))))
9369
9370 (define-public python-celery
9371 (package
9372 (name "python-celery")
9373 (version "4.2.1")
9374 (source
9375 (origin
9376 (method url-fetch)
9377 (uri (pypi-uri "celery" version))
9378 (sha256
9379 (base32
9380 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
9381 (build-system python-build-system)
9382 (arguments
9383 '(;; TODO The tests fail with Python 3.7
9384 ;; https://github.com/celery/celery/issues/4849
9385 #:tests? #f
9386 #:phases
9387 (modify-phases %standard-phases
9388 (add-after 'unpack 'patch-requirements
9389 (lambda _
9390 (substitute* "requirements/test.txt"
9391 (("pytest>=3\\.0,<3\\.3")
9392 "pytest>=3.0"))
9393 #t)))))
9394 (native-inputs
9395 `(("python-case" ,python-case)
9396 ("python-pytest" ,python-pytest)))
9397 (propagated-inputs
9398 `(("python-pytz" ,python-pytz)
9399 ("python-billiard" ,python-billiard)
9400 ("python-kombu" ,python-kombu)))
9401 (home-page "https://celeryproject.org")
9402 (synopsis "Distributed Task Queue")
9403 (description "Celery is an asynchronous task queue/job queue based on
9404 distributed message passing. It is focused on real-time operation, but
9405 supports scheduling as well. The execution units, called tasks, are executed
9406 concurrently on a single or more worker servers using multiprocessing,
9407 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
9408 synchronously (wait until ready).")
9409 (license license:bsd-3)
9410 (properties `((python2-variant . ,(delay python2-celery))))))
9411
9412 (define-public python2-celery
9413 (let ((celery (package-with-python2
9414 (strip-python2-variant python-celery))))
9415 (package
9416 (inherit celery)
9417 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9418 ("python2-mock" ,python2-mock)
9419 ,@(package-native-inputs celery))))))
9420
9421 (define-public python-translitcodec
9422 (package
9423 (name "python-translitcodec")
9424 (version "0.4.0")
9425 (source
9426 (origin
9427 (method url-fetch)
9428 (uri (pypi-uri "translitcodec" version))
9429 (sha256
9430 (base32
9431 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
9432 (build-system python-build-system)
9433 (arguments
9434 `(#:tests? #f)) ; no tests provided
9435 (home-page
9436 "https://github.com/claudep/translitcodec")
9437 (synopsis
9438 "Unicode to 8-bit charset transliteration codec")
9439 (description
9440 "This package contains codecs for transliterating ISO 10646 texts into
9441 best-effort representations using smaller coded character sets (ASCII,
9442 ISO 8859, etc.).")
9443 (license license:expat)))
9444
9445 (define-public python2-translitcodec
9446 (package-with-python2 python-translitcodec))
9447
9448 (define-public python-editor
9449 (package
9450 (name "python-editor")
9451 (version "0.5")
9452 (source
9453 (origin
9454 (method url-fetch)
9455 (uri (pypi-uri "python-editor" version))
9456 (sha256
9457 (base32
9458 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
9459 (build-system python-build-system)
9460 (home-page
9461 "https://github.com/fmoo/python-editor")
9462 (synopsis
9463 "Programmatically open an editor, capture the result")
9464 (description
9465 "python-editor is a library that provides the editor module for
9466 programmatically interfacing with your system's $EDITOR.")
9467 (license license:asl2.0)))
9468
9469 (define-public python2-editor
9470 (package-with-python2 python-editor))
9471
9472 (define-public python-vobject
9473 (package
9474 (name "python-vobject")
9475 (version "0.9.5")
9476 (source (origin
9477 (method url-fetch)
9478 (uri (pypi-uri "vobject" version))
9479 (sha256
9480 (base32
9481 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
9482 (build-system python-build-system)
9483 (arguments
9484 '(;; The test suite relies on some non-portable Windows interfaces.
9485 #:tests? #f))
9486 (propagated-inputs
9487 `(("python-dateutil" ,python-dateutil)
9488 ("python-pyicu" ,python-pyicu)))
9489 (synopsis "Parse and generate vCard and vCalendar files")
9490 (description "Vobject is intended to be a full featured Python package for
9491 parsing and generating vCard and vCalendar files. Currently, iCalendar files
9492 are supported and well tested. vCard 3.0 files are supported, and all data
9493 should be imported, but only a few components are understood in a sophisticated
9494 way.")
9495 (home-page "https://eventable.github.io/vobject/")
9496 (license license:asl2.0)))
9497
9498 (define-public python2-vobject
9499 (package-with-python2 python-vobject))
9500
9501 (define-public python-munkres
9502 (package
9503 (name "python-munkres")
9504 (version "1.0.8")
9505 (source (origin
9506 (method url-fetch)
9507 (uri (pypi-uri "munkres" version))
9508 (sha256
9509 (base32
9510 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
9511 (build-system python-build-system)
9512 (arguments
9513 '(#:tests? #f)) ; no test suite
9514 (home-page "https://software.clapper.org/munkres/")
9515 (synopsis "Implementation of the Munkres algorithm")
9516 (description "The Munkres module provides an implementation of the Munkres
9517 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
9518 useful for solving the Assignment Problem.")
9519 (license license:bsd-3)))
9520
9521 (define-public python2-munkres
9522 (package-with-python2 python-munkres))
9523
9524 (define-public python-whoosh
9525 (package
9526 (name "python-whoosh")
9527 (version "2.7.4")
9528 (source
9529 (origin
9530 (method url-fetch)
9531 (uri (pypi-uri "Whoosh" version))
9532 (sha256
9533 (base32
9534 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
9535 (build-system python-build-system)
9536 (arguments '(#:tests? #f)) ; Test invocation is no longer supported by Python.
9537 (native-inputs
9538 `(("python-pytest" ,python-pytest)))
9539 (home-page "https://bitbucket.org/mchaput/whoosh")
9540 (synopsis "Full text indexing, search, and spell checking library")
9541 (description
9542 "Whoosh is a fast, pure-Python full text indexing, search, and spell
9543 checking library.")
9544 (license license:bsd-2)))
9545
9546 (define-public python2-whoosh
9547 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
9548 (package (inherit whoosh)
9549 (propagated-inputs
9550 `(("python2-backport-ssl-match-hostname"
9551 ,python2-backport-ssl-match-hostname)
9552 ,@(package-propagated-inputs whoosh))))))
9553
9554 (define-public python-pathlib
9555 (package
9556 (name "python-pathlib")
9557 (version "1.0.1")
9558 (source (origin
9559 (method url-fetch)
9560 (uri (pypi-uri "pathlib" version))
9561 (sha256
9562 (base32
9563 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
9564 (build-system python-build-system)
9565 ;; The tests depend on the internal "test" module, which does not provide
9566 ;; a stable interface.
9567 (arguments `(#:tests? #f))
9568 (home-page "https://pathlib.readthedocs.org/")
9569 (synopsis "Object-oriented file system paths")
9570 (description "Pathlib offers a set of classes to handle file system paths.
9571 It offers the following advantages over using string objects:
9572
9573 @enumerate
9574 @item No more cumbersome use of os and os.path functions. Everything can
9575 be done easily through operators, attribute accesses, and method calls.
9576 @item Embodies the semantics of different path types. For example,
9577 comparing Windows paths ignores casing.
9578 @item Well-defined semantics, eliminating any inconsistencies or
9579 ambiguities (forward vs. backward slashes, etc.).
9580 @end enumerate
9581
9582 Note: In Python 3.4, pathlib is now part of the standard library. For other
9583 Python versions please consider python-pathlib2 instead, which tracks the
9584 standard library module. This module (python-pathlib) isn't maintained
9585 anymore.")
9586 (license license:expat)))
9587
9588 (define-public python2-pathlib
9589 (package-with-python2 python-pathlib))
9590
9591 (define-public python2-pathlib2
9592 (package
9593 (name "python2-pathlib2")
9594 (version "2.3.3")
9595 (source (origin
9596 (method url-fetch)
9597 (uri (pypi-uri "pathlib2" version))
9598 (sha256
9599 (base32
9600 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
9601 (build-system python-build-system)
9602 ;; We only need the the Python 2 variant, since for Python 3 our minimum
9603 ;; version is 3.4 which already includes this package as part of the
9604 ;; standard library.
9605 (arguments
9606 `(#:python ,python-2))
9607 (propagated-inputs
9608 `(("python2-scandir" ,python2-scandir)
9609 ("python2-six" ,python2-six)))
9610 (home-page "https://pypi.org/project/pathlib2/")
9611 (synopsis "Object-oriented file system paths - backport of standard
9612 pathlib module")
9613 (description "The goal of pathlib2 is to provide a backport of standard
9614 pathlib module which tracks the standard library module, so all the newest
9615 features of the standard pathlib can be used also on older Python versions.
9616
9617 Pathlib offers a set of classes to handle file system paths. It offers the
9618 following advantages over using string objects:
9619
9620 @enumerate
9621 @item No more cumbersome use of os and os.path functions. Everything can
9622 be done easily through operators, attribute accesses, and method calls.
9623 @item Embodies the semantics of different path types. For example,
9624 comparing Windows paths ignores casing.
9625 @item Well-defined semantics, eliminating any inconsistencies or
9626 ambiguities (forward vs. backward slashes, etc.).
9627 @end enumerate")
9628 (license license:expat)))
9629
9630 (define-public python2-pathlib2-bootstrap
9631 (hidden-package
9632 (package
9633 (inherit python2-pathlib2)
9634 (name "python2-pathlib2-bootstrap")
9635 (propagated-inputs
9636 `(("python2-scandir" ,python2-scandir)
9637 ("python2-six" ,python2-six-bootstrap))))))
9638
9639 (define-public python-jellyfish
9640 (package
9641 (name "python-jellyfish")
9642 (version "0.5.6")
9643 (source (origin
9644 (method url-fetch)
9645 (uri (pypi-uri "jellyfish" version))
9646 (sha256
9647 (base32
9648 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
9649 (build-system python-build-system)
9650 (native-inputs
9651 `(("python-pytest" ,python-pytest)))
9652 (home-page "https://github.com/jamesturk/jellyfish")
9653 (synopsis "Approximate and phonetic matching of strings")
9654 (description "Jellyfish uses a variety of string comparison and phonetic
9655 encoding algorithms to do fuzzy string matching.")
9656 (license license:bsd-2)
9657 (properties `((python2-variant . ,(delay python2-jellyfish))))))
9658
9659 (define-public python2-jellyfish
9660 (let ((jellyfish (package-with-python2
9661 (strip-python2-variant python-jellyfish))))
9662 (package (inherit jellyfish)
9663 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
9664 ,@(package-native-inputs jellyfish))))))
9665
9666 (define-public python2-unicodecsv
9667 (package
9668 (name "python2-unicodecsv")
9669 (version "0.14.1")
9670 (source (origin
9671 (method git-fetch)
9672 ;; The test suite is not included in the PyPi release.
9673 ;; https://github.com/jdunck/python-unicodecsv/issues/19
9674 (uri (git-reference
9675 (url "https://github.com/jdunck/python-unicodecsv")
9676 (commit version)))
9677 (file-name (git-file-name name version))
9678 (sha256
9679 (base32
9680 "15hx2k41a2lpv4hcml9zp4cvlx1171mnb5s4s13xc1pxkq3vgdjy"))))
9681 (build-system python-build-system)
9682 (arguments
9683 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
9684 #:python ,python-2))
9685 (native-inputs
9686 `(("python2-unittest2" ,python2-unittest2)))
9687 (home-page "https://github.com/jdunck/python-unicodecsv")
9688 (synopsis "Unicode CSV module for Python 2")
9689 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
9690 module, adding support for Unicode strings.")
9691 (license license:bsd-2)))
9692
9693 (define-public python-rarfile
9694 (package
9695 (name "python-rarfile")
9696 (version "2.8")
9697 (source (origin
9698 (method url-fetch)
9699 (uri (pypi-uri "rarfile" version))
9700 (sha256
9701 (base32
9702 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
9703 (build-system python-build-system)
9704 (arguments
9705 '(#:phases
9706 (modify-phases %standard-phases
9707 (replace 'check
9708 ;; Many tests fail, but the installation proceeds.
9709 (lambda _ (invoke "make" "-C" "test" "test"))))))
9710 (native-inputs
9711 `(("which" ,which))) ; required for tests
9712 (propagated-inputs
9713 `(("libarchive" ,libarchive)))
9714 (home-page "https://github.com/markokr/rarfile")
9715 (synopsis "RAR archive reader for Python")
9716 (description "This is Python module for RAR archive reading. The interface
9717 is made as zipfile like as possible.")
9718 (license license:isc)))
9719
9720 (define-public python2-rarfile
9721 (package-with-python2 python-rarfile))
9722
9723 (define-public python-magic
9724 (package
9725 (name "python-magic")
9726 (version "0.4.15")
9727 (source
9728 (origin
9729 (method url-fetch)
9730 (uri (pypi-uri "python-magic" version))
9731 (sha256
9732 (base32
9733 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
9734 (file-name (string-append name "-" version "-checkout"))))
9735 (build-system python-build-system)
9736 (arguments
9737 ;; The tests are unreliable, so don't run them. The tests fail
9738 ;; under Python3 because they were written for Python2 and
9739 ;; contain import statements that do not work in Python3. One of
9740 ;; the tests fails under Python2 because its assertions are
9741 ;; overly stringent; it relies on comparing output strings which
9742 ;; are brittle and can change depending on the version of
9743 ;; libmagic being used and the system on which the test is
9744 ;; running. In my case, under GuixSD 0.10.0, only one test
9745 ;; failed, and it seems to have failed only because the version
9746 ;; of libmagic that is packaged in Guix outputs a slightly
9747 ;; different (but not wrong) string than the one that the test
9748 ;; expected.
9749 '(#:tests? #f
9750 #:phases (modify-phases %standard-phases
9751 ;; Replace a specific method call with a hard-coded
9752 ;; path to the necessary libmagic.so file in the
9753 ;; store. If we don't do this, then the method call
9754 ;; will fail to find the libmagic.so file, which in
9755 ;; turn will cause any application using
9756 ;; python-magic to fail.
9757 (add-before 'build 'hard-code-path-to-libmagic
9758 (lambda* (#:key inputs #:allow-other-keys)
9759 (let ((file (assoc-ref inputs "file")))
9760 (substitute* "magic.py"
9761 (("ctypes.util.find_library\\('magic'\\)")
9762 (string-append "'" file "/lib/libmagic.so'")))
9763 #t)))
9764 (add-before 'install 'disable-egg-compression
9765 (lambda _
9766 (let ((port (open-file "setup.cfg" "a")))
9767 (display "\n[easy_install]\nzip_ok = 0\n"
9768 port)
9769 (close-port port)
9770 #t))))))
9771 (inputs
9772 ;; python-magic needs to be able to find libmagic.so.
9773 `(("file" ,file)))
9774 (home-page
9775 "https://github.com/ahupp/python-magic")
9776 (synopsis
9777 "File type identification using libmagic")
9778 (description
9779 "This module uses ctypes to access the libmagic file type
9780 identification library. It makes use of the local magic database and
9781 supports both textual and MIME-type output. Note that this module and
9782 the python-file module both provide a \"magic.py\" file; these two
9783 modules, which are different and were developed separately, both serve
9784 the same purpose: to provide Python bindings for libmagic.")
9785 (license license:expat)))
9786
9787 (define-public python2-magic
9788 (package-with-python2 python-magic))
9789
9790 (define-public python2-s3cmd
9791 (package
9792 (name "python2-s3cmd")
9793 (version "1.6.1")
9794 (source
9795 (origin
9796 (method url-fetch)
9797 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
9798 "s3cmd-" version ".tar.gz"))
9799 (sha256
9800 (base32
9801 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
9802 (build-system python-build-system)
9803 (arguments
9804 ;; s3cmd is written for python2 only and contains no tests.
9805 `(#:python ,python-2
9806 #:tests? #f))
9807 (propagated-inputs
9808 `(("python2-dateutil" ,python2-dateutil)
9809 ;; The python-file package also provides a magic.py module.
9810 ;; This is an unfortunate state of affairs; however, s3cmd
9811 ;; fails to install if it cannot find specifically the
9812 ;; python-magic package. Thus we include it, instead of using
9813 ;; python-file. Ironically, s3cmd sometimes works better
9814 ;; without libmagic bindings at all:
9815 ;; https://github.com/s3tools/s3cmd/issues/198
9816 ("python2-magic" ,python2-magic)))
9817 (home-page "http://s3tools.org/s3cmd")
9818 (synopsis "Command line tool for S3-compatible storage services")
9819 (description
9820 "S3cmd is a command line tool for uploading, retrieving and managing data
9821 in storage services that are compatible with the Amazon Simple Storage
9822 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
9823 GnuPG encryption, and more. It also supports management of Amazon's
9824 CloudFront content delivery network.")
9825 (license license:gpl2+)))
9826
9827 (define-public python-pkgconfig
9828 (package
9829 (name "python-pkgconfig")
9830 (version "1.3.1")
9831 (source
9832 (origin
9833 (method url-fetch)
9834 (uri (pypi-uri "pkgconfig" version))
9835 (sha256
9836 (base32
9837 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
9838 (build-system python-build-system)
9839 (native-inputs
9840 `(("python-nose" ,python-nose)))
9841 (inputs
9842 `(("pkg-config" ,pkg-config)))
9843 (arguments
9844 `(#:phases
9845 (modify-phases %standard-phases
9846 (add-before 'build 'patch
9847 ;; Hard-code the path to pkg-config.
9848 (lambda _
9849 (substitute* "pkgconfig/pkgconfig.py"
9850 (("cmd = 'pkg-config")
9851 (string-append "cmd = '" (which "pkg-config"))))
9852 #t))
9853 (replace 'check
9854 (lambda _
9855 (invoke "nosetests" "test.py"))))))
9856 (home-page "https://github.com/matze/pkgconfig")
9857 (synopsis "Python interface for pkg-config")
9858 (description "This module provides a Python interface to pkg-config. It
9859 can be used to find all pkg-config packages, check if a package exists,
9860 check if a package meets certain version requirements, query CFLAGS and
9861 LDFLAGS and parse the output to build extensions with setup.py.")
9862 (license license:expat)))
9863
9864 (define-public python2-pkgconfig
9865 (package-with-python2 python-pkgconfig))
9866
9867 (define-public python-bz2file
9868 (package
9869 (name "python-bz2file")
9870 (version "0.98")
9871 (source
9872 (origin
9873 (method url-fetch)
9874 (uri (pypi-uri "bz2file" version))
9875 (sha256
9876 (base32
9877 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
9878 (build-system python-build-system)
9879 (arguments
9880 `(#:tests? #f)) ; Tests use deprecated python modules.
9881 (home-page "https://github.com/nvawda/bz2file")
9882 (synopsis "Read and write bzip2-compressed files")
9883 (description
9884 "Bz2file is a Python library for reading and writing bzip2-compressed
9885 files. It contains a drop-in replacement for the I/O interface in the
9886 standard library's @code{bz2} module, including features from the latest
9887 development version of CPython that are not available in older releases.")
9888 (license license:asl2.0)))
9889
9890 (define-public python2-bz2file
9891 (package-with-python2 python-bz2file))
9892
9893 (define-public python-future
9894 (package
9895 (name "python-future")
9896 (version "0.17.1")
9897 (source
9898 (origin
9899 (method url-fetch)
9900 (uri (pypi-uri "future" version))
9901 (sha256
9902 (base32
9903 "1f2rlqn9rh7adgir52dlbqz69gsab44x0mlm8gf1cs7xvhv54137"))))
9904 (build-system python-build-system)
9905 ;; Many tests connect to the network or are otherwise flawed.
9906 ;; https://github.com/PythonCharmers/python-future/issues/210
9907 (arguments
9908 `(#:tests? #f))
9909 (home-page "http://python-future.org")
9910 (synopsis "Single-source support for Python 3 and 2")
9911 (description
9912 "@code{python-future} is the missing compatibility layer between Python 2 and
9913 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
9914 to support both Python 2 and Python 3 with minimal overhead.")
9915 (license license:expat)))
9916
9917 (define-public python2-future
9918 (package-with-python2 python-future))
9919
9920 (define-public python-cysignals
9921 (package
9922 (name "python-cysignals")
9923 (version "1.9.0")
9924 (source
9925 (origin
9926 (method url-fetch)
9927 (uri (pypi-uri "cysignals" version))
9928 (sha256
9929 (base32
9930 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
9931 (build-system python-build-system)
9932 (native-inputs
9933 `(("python-cython" ,python-cython)
9934 ("python-sphinx" ,python-sphinx)))
9935 (inputs
9936 `(("pari-gp" ,pari-gp)))
9937 (arguments
9938 `(#:modules ((guix build python-build-system)
9939 ((guix build gnu-build-system) #:prefix gnu:)
9940 (guix build utils))
9941 ;; FIXME: Tests are executed after installation and currently fail
9942 ;; when not installing into standard locations; the author is working
9943 ;; on a fix.
9944 #:tests? #f
9945 #:phases
9946 (modify-phases %standard-phases
9947 (add-before
9948 'build 'configure
9949 (assoc-ref gnu:%standard-phases 'configure)))))
9950 (home-page
9951 "https://github.com/sagemath/cysignals")
9952 (synopsis
9953 "Handling of interrupts and signals for Cython")
9954 (description
9955 "The cysignals package provides mechanisms to handle interrupts (and
9956 other signals and errors) in Cython code, using two related approaches,
9957 for mixed Cython/Python code or external C libraries and pure Cython code,
9958 respectively.")
9959 (license license:lgpl3+)))
9960
9961 (define-public python2-cysignals
9962 (package-with-python2 python-cysignals))
9963
9964 (define-public python2-shedskin
9965 (package
9966 (name "python2-shedskin")
9967 (version "0.9.4")
9968 (source
9969 (origin
9970 (method url-fetch)
9971 (uri (string-append "https://github.com/shedskin/shedskin/"
9972 "releases/download/v" version
9973 "/shedskin-" version ".tgz"))
9974 (sha256
9975 (base32
9976 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
9977 (build-system python-build-system)
9978 (arguments
9979 `(#:python ,python-2
9980 #:phases (modify-phases %standard-phases
9981 (add-after 'unpack 'fix-resulting-include-libs
9982 (lambda* (#:key inputs #:allow-other-keys)
9983 (let ((libgc (assoc-ref inputs "libgc"))
9984 (pcre (assoc-ref inputs "pcre")))
9985 (substitute* "shedskin/makefile.py"
9986 (("variable == 'CCFLAGS':[ ]*")
9987 (string-append "variable == 'CCFLAGS':\n"
9988 " line += ' -I " pcre "/include"
9989 " -I " libgc "/include'"))
9990 (("variable == 'LFLAGS':[ ]*")
9991 (string-append "variable == 'LFLAGS':\n"
9992 " line += ' -L" pcre "/lib"
9993 " -L " libgc "/lib'")))
9994 #t))))))
9995 (inputs `(("pcre" ,pcre)
9996 ("libgc" ,libgc)))
9997 (home-page "https://shedskin.github.io/")
9998 (synopsis "Experimental Python-2 to C++ Compiler")
9999 (description (string-append "This is an experimental compiler for a subset of
10000 Python. It generates C++ code and a Makefile."))
10001 (license (list license:gpl3 license:bsd-3 license:expat))))
10002
10003 (define-public python2-rope
10004 (package
10005 (name "python2-rope")
10006 (version "0.11.0")
10007 (source
10008 (origin
10009 (method url-fetch)
10010 (uri (pypi-uri "rope" version))
10011 (sha256
10012 (base32
10013 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
10014 (arguments
10015 ;; Rope has only partial python3 support, see `python-rope'
10016 `(#:python ,python-2))
10017 (build-system python-build-system)
10018 (native-inputs
10019 `(("python2-unittest2" ,python2-unittest2)))
10020 (home-page "https://github.com/python-rope/rope")
10021 (synopsis "Refactoring library for Python")
10022 (description "Rope is a refactoring library for Python. It facilitates
10023 the renaming, moving and extracting of attributes, functions, modules, fields
10024 and parameters in Python 2 source code. These refactorings can also be applied
10025 to occurrences in strings and comments.")
10026 (license license:gpl2)))
10027
10028 (define-public python-rope
10029 (package
10030 (inherit python2-rope)
10031 (name "python-rope")
10032 (arguments `(#:python ,python-wrapper
10033 ;; XXX: Only partial python3 support, results in some failing
10034 ;; tests: <https://github.com/python-rope/rope/issues/247>.
10035 #:tests? #f))
10036 (properties `((python2-variant . ,(delay python2-rope))))))
10037
10038 (define-public python-py3status
10039 (package
10040 (name "python-py3status")
10041 (version "3.21")
10042 (source
10043 (origin
10044 (method url-fetch)
10045 (uri (pypi-uri "py3status" version))
10046 (sha256
10047 (base32 "16z8zq83hxy48g6hh4xczbdz50qvxv9k1aahr4fqq7jis60cc262"))))
10048 (build-system python-build-system)
10049 (inputs
10050 `(("file" ,file)))
10051 (arguments
10052 '(#:phases
10053 (modify-phases %standard-phases
10054 ;; 'file' is used for detection of configuration file encoding
10055 ;; let's make link the dependency to particular input
10056 (add-before 'build 'patch-file-path
10057 (lambda* (#:key inputs #:allow-other-keys)
10058 (let ((file-path (assoc-ref inputs "file")))
10059 (substitute* "py3status/parse_config.py"
10060 (("\\[\"file\", \"-b\"")
10061 (string-append "['" file-path "/bin/file', '-b'")))
10062 #t))))
10063 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
10064 (home-page "https://github.com/ultrabug/py3status")
10065 (synopsis "Extensible i3status wrapper written in Python")
10066 (description "py3status is an i3status wrapper which extends i3status
10067 functionality in a modular way, allowing you to extend your panel with your
10068 own code, responding to click events and updating clock every second.")
10069 (license license:bsd-3)))
10070
10071 (define-public python-tblib
10072 (package
10073 (name "python-tblib")
10074 (version "1.3.2")
10075 (source (origin
10076 (method url-fetch)
10077 (uri (pypi-uri "tblib" version))
10078 (sha256 (base32
10079 "1rsg8h069kqgncyv8fgzyj6qflk6j10cb78pa5jk34ixwq044vj3"))))
10080 (build-system python-build-system)
10081 (arguments
10082 `(#:phases
10083 (modify-phases %standard-phases
10084 (add-before 'check 'adjust-tests
10085 (lambda _
10086 (when (which "python3")
10087 ;; Adjust the example output to match that of Python 3.7:
10088 ;; <https://github.com/ionelmc/python-tblib/issues/36>.
10089 (substitute* "README.rst"
10090 (("Exception\\('fail',") "Exception('fail'"))
10091 #t)))
10092 (replace 'check
10093 (lambda _
10094 ;; Upstream runs tests after installation and the package itself
10095 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
10096 ;; found.
10097 (setenv "PYTHONPATH"
10098 (string-append (getcwd) "/build/lib:"
10099 (getenv "PYTHONPATH")))
10100 (invoke "py.test" "-vv" "tests" "README.rst"))))))
10101 (native-inputs
10102 `(("python-pytest" ,python-pytest)
10103 ("python-six" ,python-six)))
10104 (home-page "https://github.com/ionelmc/python-tblib")
10105 (synopsis "Traceback serialization library")
10106 (description
10107 "Traceback serialization allows you to:
10108
10109 @enumerate
10110 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
10111 different processes. This allows better error handling when running code over
10112 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
10113
10114 @item Parse traceback strings and raise with the parsed tracebacks.
10115 @end enumerate\n")
10116 (license license:bsd-3)))
10117
10118 (define-public python2-tblib
10119 (package-with-python2 python-tblib))
10120
10121 (define-public python-greenlet
10122 (package
10123 (name "python-greenlet")
10124 (version "0.4.15")
10125 (source (origin
10126 (method url-fetch)
10127 (uri (pypi-uri "greenlet" version))
10128 (sha256
10129 (base32
10130 "1g4g1wwc472ds89zmqlpyan3fbnzpa8qm48z3z1y6mlk44z485ll"))))
10131 (build-system python-build-system)
10132 (home-page "https://greenlet.readthedocs.io/")
10133 (synopsis "Lightweight in-process concurrent programming")
10134 (description
10135 "Greenlet package is a spin-off of Stackless, a version of CPython
10136 that supports micro-threads called \"tasklets\". Tasklets run
10137 pseudo-concurrently (typically in a single or a few OS-level threads) and
10138 are synchronized with data exchanges on \"channels\".")
10139 (license (list license:psfl license:expat))))
10140
10141 (define-public python2-greenlet
10142 (package-with-python2 python-greenlet))
10143
10144 (define-public python-objgraph
10145 (package
10146 (name "python-objgraph")
10147 (version "3.4.1")
10148 (source
10149 (origin
10150 (method url-fetch)
10151 (uri (pypi-uri "objgraph" version))
10152 (sha256
10153 (base32
10154 "19qmqsh984zq1rzzjy4vqnmviaqnymcyl8h7z99pnicbgwnm2adz"))))
10155 (build-system python-build-system)
10156 (propagated-inputs
10157 `(("python-graphviz" ,python-graphviz)))
10158 (native-inputs
10159 `(("python-mock" ,python-mock)
10160 ("graphviz" ,graphviz)))
10161 (home-page "https://mg.pov.lt/objgraph/")
10162 (synopsis "Draw Python object reference graphs with graphviz")
10163 (description
10164 "This package provides tools to draw Python object reference graphs with
10165 graphviz.")
10166 (license license:expat)))
10167
10168 (define-public python2-objgraph
10169 (package-with-python2 python-objgraph))
10170
10171 (define-public python-gevent
10172 (package
10173 (name "python-gevent")
10174 (version "1.3.7")
10175 (source (origin
10176 (method url-fetch)
10177 (uri (pypi-uri "gevent" version))
10178 (sha256
10179 (base32
10180 "0b0fr04qdk1p4sniv87fh8z5psac60x01pv054kpgi94520g81iz"))
10181 (modules '((guix build utils)))
10182 (snippet
10183 '(begin
10184 ;; unbunding libev and c-ares
10185 (delete-file-recursively "deps")
10186 #t))))
10187 (build-system python-build-system)
10188 (arguments
10189 `(#:modules ((ice-9 ftw)
10190 (ice-9 match)
10191 (srfi srfi-26)
10192 (guix build utils)
10193 (guix build python-build-system))
10194 #:phases (modify-phases %standard-phases
10195 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
10196 (lambda _
10197 (substitute* "src/gevent/subprocess.py"
10198 (("/bin/sh") (which "sh")))
10199 (for-each (lambda (file)
10200 (substitute* file
10201 (("/bin/sh") (which "sh"))
10202 (("/bin/true") (which "true"))))
10203 (find-files "src/greentest" "\\.py$"))
10204 #t))
10205 (add-before 'build 'do-not-use-bundled-sources
10206 (lambda* (#:key inputs #:allow-other-keys)
10207 (setenv "CONFIG_SHELL" (which "bash"))
10208 (setenv "LIBEV_EMBED" "false")
10209 (setenv "CARES_EMBED" "false")
10210 (setenv "EMBED" "false")
10211
10212 ;; Prevent building bundled libev.
10213 (substitute* "setup.py"
10214 (("run_make=_BUILDING")
10215 "run_make=False"))
10216
10217 (let ((greenlet (string-append
10218 (assoc-ref inputs "python-greenlet")
10219 "/include")))
10220 (match (scandir greenlet
10221 (lambda (item)
10222 (string-prefix? "python" item)))
10223 ((python)
10224 (setenv "C_INCLUDE_PATH"
10225 (string-append greenlet "/" python)))))
10226 #t))
10227 (add-before 'check 'skip-timer-test
10228 (lambda _
10229 ;; XXX: Skip 'TestTimerResolution', which appears to be
10230 ;; unreliable.
10231 (substitute* "src/greentest/test__core_timer.py"
10232 (("not greentest.RUNNING_ON_CI") "False"))
10233 #t))
10234 (replace 'check
10235 (lambda _
10236 ;; Make sure the build directory is on PYTHONPATH.
10237 (setenv "PYTHONPATH"
10238 (string-append
10239 (getenv "PYTHONPATH") ":"
10240 (getcwd) "/build/"
10241 (car (scandir "build" (cut string-prefix? "lib." <>)))))
10242 (with-directory-excursion "src/greentest"
10243 ;; XXX: Many tests require network access. Instead we only
10244 ;; run known-good tests. Unfortunately we cannot use
10245 ;; recursion here since this directory also contains
10246 ;; Python-version-specific subfolders.
10247 (apply invoke "python" "testrunner.py" "--config"
10248 "known_failures.py"
10249 (scandir "." (cut regexp-exec
10250 (make-regexp "test_+(subprocess|core)")
10251 <>)))))))))
10252 (propagated-inputs
10253 `(("python-greenlet" ,python-greenlet)
10254 ("python-objgraph" ,python-objgraph)))
10255 (native-inputs
10256 `(("python-six" ,python-six)))
10257 (inputs
10258 `(("c-ares" ,c-ares)
10259 ("libev" ,libev)))
10260 (home-page "http://www.gevent.org/")
10261 (synopsis "Coroutine-based network library")
10262 (description
10263 "gevent is a coroutine-based Python networking library that uses greenlet
10264 to provide a high-level synchronous API on top of the libev event loop.")
10265 (license license:expat)
10266 (properties `((python2-variant . ,(delay python2-gevent))))))
10267
10268 (define-public python2-gevent
10269 (let ((base (package-with-python2
10270 (strip-python2-variant python-gevent))))
10271 (package
10272 (inherit base)
10273 (native-inputs `(,@(package-native-inputs python-gevent)
10274 ("python-mock" ,python2-mock))))))
10275
10276 (define-public python-fastimport
10277 (package
10278 (name "python-fastimport")
10279 (version "0.9.6")
10280 (source
10281 (origin
10282 (method url-fetch)
10283 (uri (pypi-uri "fastimport" version))
10284 (sha256
10285 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
10286 (build-system python-build-system)
10287 (home-page "https://github.com/jelmer/python-fastimport")
10288 (synopsis "VCS fastimport parser and generator in Python")
10289 (description "This package provides a parser for and generator of the Git
10290 @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
10291 format.")
10292 (license license:gpl2+)))
10293
10294 (define-public python2-fastimport
10295 (package-with-python2 python-fastimport))
10296
10297 (define-public python-twisted
10298 (package
10299 (name "python-twisted")
10300 (version "19.7.0")
10301 (source (origin
10302 (method url-fetch)
10303 (uri (pypi-uri "Twisted" version ".tar.bz2"))
10304 (sha256
10305 (base32
10306 "17d3hnxv9qndagzz63mdpyk99xj63p9gq586vjn0rxk8cl197nym"))))
10307 (build-system python-build-system)
10308 (arguments
10309 '(#:tests? #f)) ; FIXME: some tests fail
10310 (propagated-inputs
10311 `(("python-zope-interface" ,python-zope-interface)
10312 ("python-pyhamcrest" ,python-pyhamcrest)
10313 ("python-incremental" ,python-incremental)
10314 ("python-hyperlink" ,python-hyperlink)
10315 ("python-constantly" ,python-constantly)
10316 ("python-automat" ,python-automat)))
10317 (home-page "https://twistedmatrix.com/")
10318 (synopsis "Asynchronous networking framework written in Python")
10319 (description
10320 "Twisted is an extensible framework for Python programming, with special
10321 focus on event-based network programming and multiprotocol integration.")
10322 (license license:expat)))
10323
10324 (define-public python2-twisted
10325 (package-with-python2 python-twisted))
10326
10327 (define-public python-pika
10328 (package
10329 (name "python-pika")
10330 (version "0.12.0")
10331 (source
10332 (origin
10333 (method url-fetch)
10334 (uri (pypi-uri "pika" version))
10335 (sha256
10336 (base32
10337 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
10338 (build-system python-build-system)
10339 (native-inputs
10340 `(("python-pyev" ,python-pyev)
10341 ("python-tornado" ,python-tornado)
10342 ("python-twisted" ,python-twisted)))
10343 (home-page "https://pika.readthedocs.org")
10344 (synopsis "Pure Python AMQP Client Library")
10345 (description
10346 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
10347 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
10348 network support library.")
10349 (license license:bsd-3)))
10350
10351 (define-public python2-pika
10352 (package-with-python2 python-pika))
10353
10354 (define-public python-ply
10355 (package
10356 (name "python-ply")
10357 (version "3.10")
10358 (source
10359 (origin
10360 (method url-fetch)
10361 (uri (pypi-uri "ply" version))
10362 (sha256
10363 (base32
10364 "1jxsr1d2f732r6ljhvm827113dckwl6qwakfvpbdhcbhvpvlmscn"))))
10365 (build-system python-build-system)
10366 (home-page "http://www.dabeaz.com/ply/")
10367 (synopsis "Python Lex & Yacc")
10368 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
10369 It uses LR parsing and does extensive error checking.")
10370 (license license:bsd-3)))
10371
10372 (define-public python2-ply
10373 (package-with-python2 python-ply))
10374
10375 (define-public python-tabulate
10376 (package
10377 (name "python-tabulate")
10378 (version "0.7.7")
10379 (source (origin
10380 (method url-fetch)
10381 (uri (pypi-uri "tabulate" version))
10382 (sha256
10383 (base32
10384 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
10385 (build-system python-build-system)
10386 (arguments
10387 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
10388 ;; and the latest release is not tagged in the upstream repository.
10389 '(#:tests? #f))
10390 (home-page "https://bitbucket.org/astanin/python-tabulate")
10391 (synopsis "Pretty-print tabular data")
10392 (description
10393 "Tabulate is a library and command-line utility to pretty-print tabular
10394 data in Python.")
10395 (license license:expat)))
10396
10397 (define-public python2-tabulate
10398 (package-with-python2 python-tabulate))
10399
10400 (define-public python-kazoo
10401 (package
10402 (name "python-kazoo")
10403 (version "2.4.0")
10404 (source
10405 (origin
10406 (method url-fetch)
10407 (uri (pypi-uri "kazoo" version))
10408 (sha256
10409 (base32
10410 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
10411 (build-system python-build-system)
10412 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
10413 (propagated-inputs
10414 `(("python-six" ,python-six)))
10415 (home-page "https://kazoo.readthedocs.org")
10416 (synopsis "High-level Zookeeper client library")
10417 (description
10418 "Kazoo is a Python client library for the Apache Zookeeper distributed
10419 application service. It is designed to be easy to use and to avoid common
10420 programming errors.")
10421 (license license:asl2.0)))
10422
10423 (define-public python2-kazoo
10424 (package-with-python2 python-kazoo))
10425
10426 (define-public python-pykafka
10427 (package
10428 (name "python-pykafka")
10429 (version "2.4.0")
10430 (source (origin
10431 (method url-fetch)
10432 (uri (pypi-uri "pykafka" version))
10433 (sha256
10434 (base32
10435 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
10436 (build-system python-build-system)
10437 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
10438 (propagated-inputs
10439 `(("python-gevent" ,python-gevent)
10440 ("python-kazoo" ,python-kazoo)
10441 ("python-tabulate" ,python-tabulate)))
10442 (inputs
10443 `(("librdkafka" ,librdkafka)))
10444 (home-page "https://pykafka.readthedocs.io/")
10445 (synopsis "Apache Kafka client for Python")
10446 (description
10447 "PyKafka is a client for the Apache Kafka distributed messaging system.
10448 It includes Python implementations of Kafka producers and consumers, which
10449 are optionally backed by a C extension built on librdkafka.")
10450 (license license:asl2.0)))
10451
10452 (define-public python2-pykafka
10453 (package-with-python2 python-pykafka))
10454
10455 (define-public python-wcwidth
10456 (package
10457 (name "python-wcwidth")
10458 (version "0.1.8")
10459 (source (origin
10460 (method url-fetch)
10461 (uri (pypi-uri "wcwidth" version))
10462 (sha256
10463 (base32
10464 "1a1pzds3xzfylm5mnc5f6c1p8kiig0daqjc9gygd9rc3cj53x2zj"))))
10465 (build-system python-build-system)
10466 (home-page "https://github.com/jquast/wcwidth")
10467 (synopsis "Measure number of terminal column cells of wide-character codes")
10468 (description "Wcwidth measures the number of terminal column cells of
10469 wide-character codes. It is useful for those implementing a terminal emulator,
10470 or programs that carefully produce output to be interpreted by one. It is a
10471 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
10472 specified in POSIX.1-2001 and POSIX.1-2008.")
10473 (license license:expat)))
10474
10475 (define-public python2-wcwidth
10476 (package-with-python2 python-wcwidth))
10477
10478 (define-public python2-jsonrpclib
10479 (package
10480 (name "python2-jsonrpclib")
10481 (version "0.1.7")
10482 (source (origin
10483 (method url-fetch)
10484 (uri (pypi-uri "jsonrpclib" version))
10485 (sha256
10486 (base32
10487 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
10488 (build-system python-build-system)
10489 (arguments
10490 `(#:tests? #f
10491 #:python ,python-2))
10492 (home-page "https://github.com/joshmarshall/jsonrpclib/")
10493 (synopsis "Implementation of JSON-RPC specification for Python")
10494 (description
10495 "This library is an implementation of the JSON-RPC specification.
10496 It supports both the original 1.0 specification, as well as the
10497 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
10498 etc.")
10499 (license license:asl2.0)))
10500
10501 (define-public python-chai
10502 (package
10503 (name "python-chai")
10504 (version "1.1.2")
10505 (source (origin
10506 (method url-fetch)
10507 (uri (pypi-uri "chai" version))
10508 (sha256
10509 (base32
10510 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
10511 (build-system python-build-system)
10512 (home-page "https://github.com/agoragames/chai")
10513 (synopsis "Mocking framework for Python")
10514 (description
10515 "Chai provides an api for mocking, stubbing and spying your python
10516 objects, patterned after the Mocha library for Ruby.")
10517 (license license:bsd-3)))
10518
10519 (define-public python2-chai
10520 (package-with-python2 python-chai))
10521
10522 (define-public python-inflection
10523 (package
10524 (name "python-inflection")
10525 (version "0.3.1")
10526 (source
10527 (origin (method url-fetch)
10528 (uri (pypi-uri "inflection" version))
10529 (sha256
10530 (base32
10531 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
10532 (build-system python-build-system)
10533 (native-inputs
10534 `(("python-pytest" ,python-pytest)))
10535 (home-page "https://github.com/jpvanhal/inflection")
10536 (synopsis "Python string transformation library")
10537 (description
10538 "Inflection is a string transformation library. It singularizes
10539 and pluralizes English words, and transforms strings from CamelCase to
10540 underscored string.")
10541 (license license:expat)))
10542
10543 (define-public python2-inflection
10544 (package-with-python2 python-inflection))
10545
10546 (define-public python-pylev
10547 (package
10548 (name "python-pylev")
10549 (version "1.3.0")
10550 (source (origin
10551 (method url-fetch)
10552 (uri (pypi-uri "pylev" version))
10553 (sha256
10554 (base32
10555 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
10556 (build-system python-build-system)
10557 (home-page "https://github.com/toastdriven/pylev")
10558 (synopsis "Levenshtein distance implementation in Python")
10559 (description "Pure Python Levenshtein implementation, based off the
10560 Wikipedia code samples at
10561 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
10562 (license license:bsd-3)))
10563
10564 (define-public python2-pylev
10565 (package-with-python2 python-pylev))
10566
10567 (define-public python-cleo
10568 (package
10569 (name "python-cleo")
10570 (version "0.7.6")
10571 (source (origin
10572 (method url-fetch)
10573 (uri (pypi-uri "cleo" version))
10574 (sha256
10575 (base32
10576 "02dlc0rn43zgvw0s5v4j80bca9n1jfpwy3r78gn9qjgk0qj39kwr"))))
10577 (build-system python-build-system)
10578 (native-inputs
10579 `( ;; For testing
10580 ("python-mock" ,python-mock)
10581 ("python-pytest-mock" ,python-pytest-mock)
10582 ("python-pytest" ,python-pytest)))
10583 (propagated-inputs
10584 `(("python-backpack" ,python-backpack)
10585 ("python-clikit" ,python-clikit)
10586 ("python-pastel" ,python-pastel)
10587 ("python-pylev" ,python-pylev)))
10588 (home-page "https://github.com/sdispater/cleo")
10589 (synopsis "Command-line arguments library for Python")
10590 (description
10591 "Cleo allows you to create command-line commands with signature in
10592 docstring and colored output.")
10593 (license license:expat)))
10594
10595 (define-public python2-cleo
10596 (package-with-python2 python-cleo))
10597
10598 (define-public python-tomlkit
10599 (package
10600 (name "python-tomlkit")
10601 (version "0.5.8")
10602 (source
10603 (origin
10604 (method url-fetch)
10605 (uri (pypi-uri "tomlkit" version))
10606 (sha256
10607 (base32
10608 "0sf2a4q61kf344hjbw8kb6za1hlccl89j9lzqw0l2zpddp0hrh9j"))))
10609 (build-system python-build-system)
10610 (native-inputs
10611 `(("python-pytest" ,python-pytest)))
10612 (home-page
10613 "https://github.com/sdispater/tomlkit")
10614 (synopsis "Style preserving TOML library")
10615 (description
10616 "TOML Kit is a 0.5.0-compliant TOML library. It includes a parser that
10617 preserves all comments, indentations, whitespace and internal element ordering,
10618 and makes them accessible and editable via an intuitive API. It can also
10619 create new TOML documents from scratch using the provided helpers. Part of the
10620 implementation as been adapted, improved and fixed from Molten.")
10621 (license license:expat)))
10622
10623 (define-public python-shellingham
10624 (package
10625 (name "python-shellingham")
10626 (version "1.3.1")
10627 (source
10628 (origin
10629 (method url-fetch)
10630 (uri (pypi-uri "shellingham" version))
10631 (sha256
10632 (base32
10633 "1q7kws7w4x2hji3g7y0ni9ddk4sd676ylrb3db54gbpys6xj6nwq"))))
10634 (build-system python-build-system)
10635 (home-page
10636 "https://github.com/sarugaku/shellingham")
10637 (synopsis "Tool to detect surrounding shell")
10638 (description
10639 "Shellingham detects what shell the current Python executable is
10640 running in.")
10641 (license license:isc)))
10642
10643 (define-public python-memcached
10644 (package
10645 (name "python-memcached")
10646 (version "1.59")
10647 (source
10648 (origin
10649 (method url-fetch)
10650 (uri (pypi-uri "python-memcached" version))
10651 (sha256
10652 (base32
10653 "0kvyapavbirk2x3n1jx4yb9nyigrj1s3x15nm3qhpvhkpqvqdqm2"))))
10654 (build-system python-build-system)
10655 (propagated-inputs `(("python-six" ,python-six)))
10656 (home-page
10657 "https://github.com/linsomniac/python-memcached")
10658 (synopsis "Pure python memcached client")
10659 (description
10660 "This software is a pure Python interface to the memcached memory cache
10661 daemon. It is the client side software which allows storing values in one or
10662 more, possibly remote, memcached servers.")
10663 (license license:psfl)))
10664
10665 (define-public python-clikit
10666 (package
10667 (name "python-clikit")
10668 (version "0.4.1")
10669 (source
10670 (origin
10671 (method url-fetch)
10672 (uri (pypi-uri "clikit" version))
10673 (sha256
10674 (base32
10675 "10gab65pq0jdf589n33sj2513pxal2lisl4xwf1ijysdjxmpdr4a"))))
10676 (build-system python-build-system)
10677 (propagated-inputs
10678 `(("python-pastel" ,python-pastel)
10679 ("python-pylev" ,python-pylev)))
10680 (home-page "https://github.com/sdispater/clikit")
10681 (synopsis "Group of utilities to build command line interfaces")
10682 (description
10683 "CliKit is a group of utilities to build testable command line
10684 interfaces.")
10685 (license license:expat)))
10686
10687 (define-public python-msgpack-python
10688 (package
10689 (name "python-msgpack-python")
10690 (version "0.5.6")
10691 (source
10692 (origin
10693 (method url-fetch)
10694 (uri (pypi-uri "msgpack-python" version))
10695 (sha256
10696 (base32
10697 "16wh8qgybmfh4pjp8vfv78mdlkxfmcasg78lzlnm6nslsfkci31p"))))
10698 (build-system python-build-system)
10699 (home-page "http://msgpack.org/")
10700 (synopsis "Package to deserialize messages in MessagePack binary format")
10701 (description
10702 "MessagePack is an efficient binary serialization format. It lets you
10703 exchange data among multiple languages like JSON. But it's faster and
10704 smaller. Small integers are encoded into a single byte, and typical short
10705 strings require only one extra byte in addition to the strings themselves.")
10706 (license license:asl2.0)))
10707
10708 (define-public python-cachy
10709 (package
10710 (name "python-cachy")
10711 (version "0.2.0")
10712 (source
10713 (origin
10714 (method url-fetch)
10715 (uri (pypi-uri "cachy" version))
10716 (sha256
10717 (base32
10718 "0v6mjyhgx6j7ya20bk69cr3gdzdkdf6psay0h090rscclgji65dp"))))
10719 (build-system python-build-system)
10720 (native-inputs
10721 `(("python-fakeredis" ,python-fakeredis)
10722 ("python-flexmock" ,python-flexmock)
10723 ("python-pytest" ,python-pytest)))
10724 (propagated-inputs
10725 `(("python-memcached" ,python-memcached)
10726 ("python-msgpack-python" ,python-msgpack-python)
10727 ("python-redis" ,python-redis)))
10728 (home-page "https://github.com/sdispater/cachy")
10729 (synopsis "Simple yet effective caching library")
10730 (description
10731 "Cachy provides a simple yet effective caching library. A simple but
10732 powerful API: thread-safety; decorator syntax; support for memcached, redis,
10733 database, file, dict stores. Cachy supports python versions 2.7+ and 3.2+.")
10734 (license license:expat)))
10735
10736 (define-public poetry
10737 (package
10738 (name "poetry")
10739 (version "0.12.17")
10740 ;; Poetry can only be built from source with poetry.
10741 (source
10742 (origin
10743 (method url-fetch)
10744 (uri (pypi-uri "poetry" version))
10745 (sha256
10746 (base32
10747 "0gxwcd65qjmzqzppf53x51sic1rbcd9py6cdzx3aprppipimslvf"))))
10748 (build-system python-build-system)
10749 (arguments
10750 `(#:tests? #f ;; Pypi does not have tests.
10751 #:phases
10752 (modify-phases %standard-phases
10753 (replace 'build
10754 (lambda _
10755 ;; Bug in poetry https://github.com/sdispater/poetry/issues/866.
10756 (invoke "sed" "-i" "-e" "s/from distutils.core/from setuptools/"
10757 "setup.py")
10758 #t)))))
10759 (propagated-inputs
10760 `(("python-cachecontrol" ,python-cachecontrol)
10761 ("python-cachy" ,python-cachy)
10762 ("python-cleo" ,python-cleo)
10763 ("python-glob2" ,python-glob2)
10764 ("python-html5lib" ,python-html5lib)
10765 ("python-jsonschema" ,python-jsonschema)
10766 ("python-msgpack" ,python-msgpack)
10767 ("python-pkginfo" ,python-pkginfo)
10768 ("python-pyparsing" ,python-pyparsing)
10769 ("python-pyrsistent" ,python-pyrsistent)
10770 ("python-requests" ,python-requests)
10771 ("python-requests-toolbelt" ,python-requests-toolbelt)
10772 ("python-shellingham" ,python-shellingham)
10773 ("python-tomlkit" ,python-tomlkit)
10774 ("python-virtualenv" ,python-virtualenv)))
10775 (home-page "https://poetry.eustace.io/")
10776 (synopsis "Python dependency management and packaging made easy")
10777 (description "Poetry is a tool for dependency management and packaging
10778 in Python. It allows you to declare the libraries your project depends on and
10779 it will manage (install/update) them for you.")
10780 (license license:expat)))
10781
10782 (define-public python-lazy-object-proxy
10783 (package
10784 (name "python-lazy-object-proxy")
10785 (version "1.4.3")
10786 (source (origin
10787 (method url-fetch)
10788 (uri (pypi-uri "lazy-object-proxy" version))
10789 (sha256
10790 (base32
10791 "1w1aaay424ciz8fz3fkzxb0pxzfxn184f2whpyn4fx72bn50x47k"))))
10792 (native-inputs
10793 `(("python-setuptools-scm" ,python-setuptools-scm-3.3)))
10794 (build-system python-build-system)
10795 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
10796 (synopsis "Lazy object proxy for python")
10797 (description
10798 "Lazy object proxy is an object that wraps a callable but defers the call
10799 until the object is actually required, and caches the result of said call.")
10800 (license license:bsd-2)))
10801
10802 (define-public python2-lazy-object-proxy
10803 (package-with-python2 python-lazy-object-proxy))
10804
10805 (define-public python-dnspython
10806 (package
10807 (name "python-dnspython")
10808 (version "1.15.0")
10809 (source (origin
10810 (method url-fetch)
10811 (uri (string-append "http://www.dnspython.org/kits/"
10812 version "/dnspython-" version ".tar.gz"))
10813 (sha256
10814 (base32
10815 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
10816 (build-system python-build-system)
10817 (arguments '(#:tests? #f)) ; XXX: requires internet access
10818 (home-page "http://www.dnspython.org")
10819 (synopsis "DNS toolkit for Python")
10820 (description
10821 "dnspython is a DNS toolkit for Python. It supports almost all record
10822 types. It can be used for queries, zone transfers, and dynamic updates.
10823 It supports TSIG authenticated messages and EDNS0.")
10824 (license license:expat)))
10825
10826 (define-public python2-dnspython
10827 (package-with-python2 python-dnspython))
10828
10829 (define-public python-email-validator
10830 (package
10831 (name "python-email-validator")
10832 (version "1.0.2")
10833 (source
10834 (origin (method url-fetch)
10835 (uri (pypi-uri "email_validator" version))
10836 (sha256
10837 (base32
10838 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
10839 (build-system python-build-system)
10840 (arguments
10841 '(#:phases
10842 (modify-phases %standard-phases
10843 (add-before 'build 'use-dnspython
10844 (lambda _
10845 (substitute* "setup.py"
10846 (("dnspython3") "dnspython"))
10847 #t)))))
10848 (propagated-inputs
10849 `(("python-dnspython" ,python-dnspython)
10850 ("python-idna" ,python-idna)))
10851 (home-page "https://github.com/JoshData/python-email-validator")
10852 (synopsis "Email address validation library for Python")
10853 (description
10854 "This library validates email address syntax and deliverability.")
10855 (license license:cc0)))
10856
10857 (define-public python2-email-validator
10858 (package-with-python2 python-email-validator))
10859
10860 (define-public python-ukpostcodeparser
10861 (package
10862 (name "python-ukpostcodeparser")
10863 (version "1.0.3")
10864 (source (origin
10865 (method url-fetch)
10866 (uri (pypi-uri "UkPostcodeParser" version))
10867 (sha256
10868 (base32
10869 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
10870 (build-system python-build-system)
10871 (home-page "https://github.com/hamstah/ukpostcodeparser")
10872 (synopsis "UK Postcode parser for Python")
10873 (description
10874 "This library provides the @code{parse_uk_postcode} function for
10875 parsing UK postcodes.")
10876 (license license:expat)))
10877
10878 (define-public python2-ukpostcodeparser
10879 (package-with-python2 python-ukpostcodeparser))
10880
10881 (define-public python-faker
10882 (package
10883 (name "python-faker")
10884 (version "0.7.9")
10885 (source (origin
10886 (method url-fetch)
10887 (uri (pypi-uri "Faker" version))
10888 (sha256
10889 (base32
10890 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
10891 (patches
10892 (search-patches "python-faker-fix-build-32bit.patch"))
10893 (modules '((guix build utils)))
10894 (snippet
10895 '(begin
10896 (for-each delete-file (find-files "." "\\.pyc$"))
10897 #t))))
10898 (build-system python-build-system)
10899 (arguments
10900 '(#:phases
10901 (modify-phases %standard-phases
10902 (replace 'check
10903 (lambda _ (invoke "python" "-m" "unittest" "-v" "tests"))))))
10904 (native-inputs
10905 `(;; For testing
10906 ("python-email-validator" ,python-email-validator)
10907 ("python-mock" ,python-mock)
10908 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
10909 (propagated-inputs
10910 `(("python-dateutil" ,python-dateutil)
10911 ("python-six" ,python-six)))
10912 (home-page "https://github.com/joke2k/faker")
10913 (synopsis "Python package that generates fake data")
10914 (description
10915 "Faker is a Python package that generates fake data such as names,
10916 addresses, and phone numbers.")
10917 (license license:expat)
10918 (properties `((python2-variant . ,(delay python2-faker))))))
10919
10920 (define-public python2-faker
10921 (let ((base (package-with-python2 (strip-python2-variant
10922 python-faker))))
10923 (package
10924 (inherit base)
10925 (propagated-inputs
10926 `(("python2-ipaddress" ,python2-ipaddress)
10927 ,@(package-propagated-inputs base))))))
10928
10929 (define-public python-pyaml
10930 (package
10931 (name "python-pyaml")
10932 (version "18.11.0")
10933 (source (origin
10934 (method url-fetch)
10935 (uri (pypi-uri "pyaml" version))
10936 (sha256
10937 (base32
10938 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
10939 (build-system python-build-system)
10940 (native-inputs
10941 `(("python-unidecode" ,python-unidecode)))
10942 (propagated-inputs
10943 `(("python-pyyaml" ,python-pyyaml)))
10944 (home-page "https://github.com/mk-fg/pretty-yaml")
10945 (synopsis "YAML pretty-print library for Python")
10946 (description
10947 "pyaml is a PyYAML based python module to produce pretty and readable
10948 YAML-serialized data.")
10949 (license license:wtfpl2)))
10950
10951 (define-public python2-pyaml
10952 (package-with-python2 python-pyaml))
10953
10954 (define-public python-backpack
10955 (package
10956 (name "python-backpack")
10957 (version "0.1")
10958 (source
10959 (origin
10960 (method url-fetch)
10961 (uri (pypi-uri "backpack" version))
10962 (sha256
10963 (base32
10964 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
10965 (build-system python-build-system)
10966 (native-inputs
10967 `(("python-pytest" ,python-pytest)
10968 ("python-nose" ,python-nose)))
10969 (propagated-inputs
10970 `(("python-simplejson" ,python-simplejson)))
10971 (home-page "https://github.com/sdispater/backpack")
10972 (synopsis "Utilities for working with Python collections")
10973 (description "Backpack provides some useful utilities for working with
10974 collections of data.")
10975 (license license:expat)))
10976
10977 (define-public python2-backpack
10978 (package-with-python2 python-backpack))
10979
10980 (define-public python-prompt-toolkit
10981 (package
10982 (name "python-prompt-toolkit")
10983 (version "2.0.7")
10984 (source
10985 (origin
10986 (method url-fetch)
10987 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10988 (sha256
10989 (base32
10990 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
10991 (build-system python-build-system)
10992 (arguments
10993 `(#:phases
10994 (modify-phases %standard-phases
10995 (delete 'check)
10996 (add-after 'install 'post-install-check
10997 (lambda* (#:key inputs outputs #:allow-other-keys)
10998 ;; HOME is needed for the test
10999 ;; "test_pathcompleter_can_expanduser".
11000 (setenv "HOME" "/tmp")
11001 (add-installed-pythonpath inputs outputs)
11002 (invoke "py.test"))))))
11003 (propagated-inputs
11004 `(("python-wcwidth" ,python-wcwidth)
11005 ("python-six" ,python-six)
11006 ("python-pygments" ,python-pygments)))
11007 (native-inputs
11008 `(("python-pytest" ,python-pytest)))
11009 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
11010 (synopsis "Library for building command line interfaces in Python")
11011 (description
11012 "Prompt-Toolkit is a library for building interactive command line
11013 interfaces in Python. It's like GNU Readline but it also features syntax
11014 highlighting while typing, out-of-the-box multi-line input editing, advanced
11015 code completion, incremental search, support for Chinese double-width
11016 characters, mouse support, and auto suggestions.")
11017 (license license:bsd-3)))
11018
11019 (define-public python2-prompt-toolkit
11020 (package-with-python2 python-prompt-toolkit))
11021
11022 (define-public python-prompt-toolkit-1
11023 (package (inherit python-prompt-toolkit)
11024 (version "1.0.15")
11025 (source
11026 (origin
11027 (method url-fetch)
11028 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
11029 (sha256
11030 (base32
11031 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
11032
11033 (define-public python2-prompt-toolkit-1
11034 (package-with-python2 python-prompt-toolkit-1))
11035
11036 (define-public python-jedi
11037 (package
11038 (name "python-jedi")
11039 (version "0.15.1")
11040 (source
11041 (origin
11042 (method url-fetch)
11043 (uri (pypi-uri "jedi" version))
11044 (sha256
11045 (base32
11046 "0bp4pxhsynaarbvzblsn5x32lzp29svy3sxfy8i6m5iwz9s9r1ds"))))
11047 (build-system python-build-system)
11048 (arguments
11049 `(#:phases
11050 (modify-phases %standard-phases
11051 (add-after 'unpack 'disable-file-completion-test
11052 ;; A single parameterized test currently fail (see:
11053 ;; https://github.com/davidhalter/jedi/issues/1395). Remove it.
11054 (lambda _
11055 (substitute* "test/test_api/test_completion.py"
11056 ((".*'example.py', 'rb\"' \\+ join\\('\\.\\.'.*") ""))
11057 #t))
11058 (replace 'check
11059 (lambda _
11060 (setenv "HOME" "/tmp")
11061 (invoke "python" "-m" "pytest"))))))
11062 (native-inputs
11063 `(("python-pytest" ,python-pytest)
11064 ("python-docopt" ,python-docopt)))
11065 (propagated-inputs
11066 `(("python-parso" ,python-parso)))
11067 (home-page "https://github.com/davidhalter/jedi")
11068 (synopsis "Autocompletion and static analysis library for Python")
11069 (description
11070 "Jedi is a static analysis tool for Python that can be used in Integrated
11071 Development Environments (@dfn{IDE}s) and text editors. It understands Python
11072 on a deeper level than many other static analysis frameworks for Python.
11073
11074 Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
11075 well.")
11076 (license license:expat)))
11077
11078 (define-public python2-jedi
11079 (package-with-python2 python-jedi))
11080
11081 (define-public ptpython
11082 (package
11083 (name "ptpython")
11084 (version "0.34")
11085 (source (origin
11086 (method url-fetch)
11087 (uri (pypi-uri "ptpython" version))
11088 (sha256
11089 (base32
11090 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
11091 (build-system python-build-system)
11092 (arguments
11093 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
11094 (propagated-inputs
11095 `(("python-docopt" ,python-docopt)
11096 ("python-jedi" ,python-jedi)
11097 ("python-prompt-toolkit" ,python-prompt-toolkit)
11098 ("python-pygments" ,python-pygments)))
11099 (home-page "https://github.com/jonathanslenders/ptpython")
11100 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
11101 (description
11102 "ptpython is a Python read-eval-print loop with IDE-like features.
11103 It supports syntax highlighting, multiline editing, autocompletion, mouse,
11104 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
11105 etc.")
11106 (license license:bsd-3)
11107 (properties `((python2-variant . ,(delay ptpython-2))))))
11108
11109 (define-public ptpython-2
11110 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
11111 (package
11112 (inherit base)
11113 (name "ptpython2"))))
11114
11115 (define-public python-stem
11116 (package
11117 (name "python-stem")
11118 (version "1.7.1")
11119 (source
11120 (origin
11121 (method url-fetch)
11122 (uri (pypi-uri "stem" version))
11123 (sha256
11124 (base32
11125 "18lc95pmc7i089nlsb06dsxyjl5wbhxfqgdxbjcia35ndh8z7sn9"))))
11126 (build-system python-build-system)
11127 (arguments
11128 `(#:phases
11129 (modify-phases %standard-phases
11130 (replace 'check
11131 (lambda _
11132 (invoke "./run_tests.py" "--unit")
11133 #t)))))
11134 (native-inputs
11135 `(("python-mock" ,python-mock)
11136 ("python-pycodestyle" ,python-pycodestyle)
11137 ("python-pyflakes" ,python-pyflakes)))
11138 (home-page "https://stem.torproject.org/")
11139 (synopsis
11140 "Python controller library that allows applications to interact with Tor")
11141 (description
11142 "Stem is a Python controller library for Tor. With it you can use Tor's
11143 control protocol to script against the Tor process and read descriptor data
11144 relays publish about themselves.")
11145 (license license:lgpl3)))
11146
11147 (define-public python2-stem
11148 (package-with-python2 python-stem))
11149
11150 (define-public python-pyserial
11151 (package
11152 (name "python-pyserial")
11153 (version "3.4")
11154 (source
11155 (origin
11156 (method url-fetch)
11157 (uri (pypi-uri "pyserial" version))
11158 (sha256
11159 (base32
11160 "09y68bczw324a4jb9a1cfwrbjhq179vnfkkkrybbksp0vqgl0bbf"))))
11161 (build-system python-build-system)
11162 (arguments
11163 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
11164 ;; #:phases
11165 ;; (modify-phases %standard-phases
11166 ;; (replace 'check
11167 ;; (lambda _
11168 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
11169 (home-page
11170 "https://github.com/pyserial/pyserial")
11171 (synopsis "Python Serial Port Bindings")
11172 (description "@code{pyserial} provide serial port bindings for Python. It
11173 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
11174 and/or Xon/Xoff. The port is accessed in RAW mode.")
11175 (license license:bsd-3)))
11176
11177 (define-public python2-pyserial
11178 (package-with-python2 python-pyserial))
11179
11180 (define-public python-kivy
11181 (package
11182 (name "python-kivy")
11183 (version "1.10.1")
11184 (source
11185 (origin
11186 (method url-fetch)
11187 (uri (pypi-uri "Kivy" version))
11188 (file-name (string-append name "-" version ".tar.gz"))
11189 (sha256
11190 (base32
11191 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
11192 (build-system python-build-system)
11193 (arguments
11194 `(#:tests? #f ; Tests require many optional packages
11195 #:phases
11196 (modify-phases %standard-phases
11197 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
11198 (lambda* (#:key inputs #:allow-other-keys)
11199 (setenv "KIVY_SDL2_PATH"
11200 (string-append (assoc-ref inputs "sdl-union")
11201 "/include/SDL2"))
11202 #t)))))
11203 (native-inputs
11204 `(("git" ,git)
11205 ("pkg-config" ,pkg-config)
11206 ("python-cython" ,python-cython)))
11207 (inputs
11208 `(("gstreamer" ,gstreamer)
11209 ("mesa" ,mesa)
11210 ("sdl-union"
11211 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
11212 (home-page "http://kivy.org")
11213 (synopsis
11214 "Multitouch application framework")
11215 (description
11216 "A software library for rapid development of
11217 hardware-accelerated multitouch applications.")
11218 (license license:expat)))
11219
11220 (define-public python2-kivy
11221 (package-with-python2 python-kivy))
11222
11223 (define-public python-kivy-next
11224 (deprecated-package "python-kivy-next" python-kivy))
11225
11226 (define-public python2-kivy-next
11227 (deprecated-package "python2-kivy-next" python2-kivy))
11228
11229 (define-public python-binaryornot
11230 (package
11231 (name "python-binaryornot")
11232 (version "0.4.4")
11233 (source (origin
11234 (method url-fetch)
11235 (uri (pypi-uri "binaryornot" version))
11236 (sha256
11237 (base32
11238 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
11239 (build-system python-build-system)
11240 (arguments
11241 `(#:phases
11242 (modify-phases %standard-phases
11243 (add-after 'unpack 'patch-tests
11244 (lambda _
11245 ;; TypeError: binary() got an unexpected keyword argument
11246 ;; 'average_size'.
11247 (substitute* "tests/test_check.py"
11248 (("average_size=512") ""))
11249 #t)))))
11250 (propagated-inputs
11251 `(("python-chardet" ,python-chardet)
11252 ("python-hypothesis" ,python-hypothesis)))
11253 (home-page "https://github.com/audreyr/binaryornot")
11254 (synopsis "Package to check if a file is binary or text")
11255 (description "Ultra-lightweight pure Python package to check if a file is
11256 binary or text.")
11257 (license license:bsd-3)
11258 (properties `((python2-variant . ,(delay python2-binaryornot))))))
11259
11260 (define-public python2-binaryornot
11261 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
11262 (package (inherit base)
11263 (propagated-inputs
11264 `(("python2-enum34" ,python2-enum34)
11265 ,@(package-propagated-inputs base))))))
11266
11267 (define-public python-binwalk
11268 (package
11269 (name "python-binwalk")
11270 (version "2.2.0")
11271 (source
11272 (origin
11273 (method git-fetch)
11274 (uri (git-reference
11275 (url "https://github.com/ReFirmLabs/binwalk")
11276 (commit (string-append "v" version))))
11277 (file-name (git-file-name name version))
11278 (sha256
11279 (base32
11280 "1bxgj569fzwv6jhcbl864nmlsi9x1k1r20aywjxc8b9b1zgqrlvc"))))
11281 (build-system python-build-system)
11282 (arguments
11283 `(#:phases
11284 (modify-phases %standard-phases
11285 (add-before 'check 'set-pythonpath
11286 (lambda _
11287 (setenv "PYTHONPATH"
11288 (string-append
11289 (getcwd) "/src/"
11290 ":" (getenv "PYTHONPATH")))
11291 (setenv "HOME" "")
11292 #t)))))
11293 (native-inputs
11294 `(("python-coverage" ,python-coverage)
11295 ("python-nose" ,python-nose)))
11296 (home-page "https://github.com/ReFirmLabs/binwalk")
11297 (synopsis "Firmware analysis tool")
11298 (description "Binwalk is a tool for analyzing, reverse engineering, and
11299 extracting firmware images")
11300 (license license:expat)))
11301
11302 (define-public python-nltk
11303 (package
11304 (name "python-nltk")
11305 (version "3.2.1")
11306 (source (origin
11307 (method url-fetch)
11308 (uri (pypi-uri "nltk" version))
11309 (sha256
11310 (base32
11311 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
11312 (build-system python-build-system)
11313 (arguments
11314 '(;; The tests require some extra resources to be downloaded.
11315 ;; TODO Try packaging these resources.
11316 #:tests? #f))
11317 (home-page "http://nltk.org/")
11318 (synopsis "Natural Language Toolkit")
11319 (description "It provides interfaces to over 50 corpora and lexical
11320 resources such as WordNet, along with a suite of text processing libraries
11321 for classification, tokenization, stemming, tagging, parsing, and semantic
11322 reasoning, wrappers for natural language processing libraries.")
11323 (license license:asl2.0)))
11324
11325 (define-public python2-nltk
11326 (package-with-python2 python-nltk))
11327
11328 (define-public python-pymongo
11329 (package
11330 (name "python-pymongo")
11331 (version "3.7.2")
11332 (source (origin
11333 (method url-fetch)
11334 (uri (pypi-uri "pymongo" version))
11335 (sha256
11336 (base32
11337 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
11338 (build-system python-build-system)
11339 (propagated-inputs
11340 `(("python-certifi" ,python-certifi)))
11341 (home-page "https://github.com/mongodb/mongo-python-driver")
11342 (synopsis "Python driver for MongoDB")
11343 (description "Python driver for MongoDB.")
11344 (license license:asl2.0)))
11345
11346 (define-public python2-pymongo
11347 (package-with-python2 python-pymongo))
11348
11349 (define-public python-consul
11350 (package
11351 (name "python-consul")
11352 (version "0.6.1")
11353 (source
11354 (origin
11355 (method url-fetch)
11356 (uri (pypi-uri "python-consul" version))
11357 (sha256
11358 (base32
11359 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
11360 (build-system python-build-system)
11361 (arguments
11362 '(#:tests? #f)) ; The tests are not distributed
11363 (propagated-inputs
11364 `(("python-requests" ,python-requests)
11365 ("python-six" ,python-six)))
11366 (home-page "https://github.com/cablehead/python-consul")
11367 (synopsis "Python client for Consul")
11368 (description
11369 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
11370 discovery, monitoring and configuration.")
11371 (license license:expat)))
11372
11373 (define-public python2-consul
11374 (package-with-python2 python-consul))
11375
11376 (define-public python-schematics
11377 (package
11378 (name "python-schematics")
11379 (version "1.1.1")
11380 (source
11381 (origin
11382 (method git-fetch)
11383 (uri (git-reference
11384 (url "https://github.com/schematics/schematics.git")
11385 (commit (string-append "v" version))))
11386 (file-name (git-file-name name version))
11387 (sha256
11388 (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd"))))
11389 (build-system python-build-system)
11390 (propagated-inputs
11391 `(("python-six" ,python-six)))
11392 (arguments
11393 ;; The tests require a bunch of not very nice packages with fixed
11394 ;; version requirements (e.g. python-coveralls).
11395 `(#:tests? #f))
11396 (home-page "https://github.com/schematics/schematics")
11397 (synopsis "Python Data Structures for Humans")
11398 (description "Python Data Structures for Humans.")
11399 (license license:bsd-3)))
11400
11401 (define-public python2-schematics
11402 (package-with-python2 python-schematics))
11403
11404 (define-public python-odfpy
11405 (package
11406 (name "python-odfpy")
11407 (version "1.3.3")
11408 (source (origin
11409 (method url-fetch)
11410 (uri (pypi-uri "odfpy" version))
11411 (sha256
11412 (base32
11413 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
11414 (arguments
11415 `(#:modules ((srfi srfi-1)
11416 (guix build python-build-system)
11417 (guix build utils))
11418 #:phases
11419 (modify-phases %standard-phases
11420 (replace 'check
11421 ;; The test runner invokes python2 and python3 for test*.py.
11422 ;; To avoid having both in inputs, we replicate it here.
11423 (lambda _
11424 (for-each (lambda (test-file) (invoke "python" test-file))
11425 (find-files "tests" "^test.*\\.py$"))
11426 #t)))))
11427 (build-system python-build-system)
11428 (home-page "https://github.com/eea/odfpy")
11429 (synopsis "Python API and tools to manipulate OpenDocument files")
11430 (description "Collection of libraries and utility programs written in
11431 Python to manipulate OpenDocument 1.2 files.")
11432 (license
11433 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
11434 ;; number of files with other licenses.
11435 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
11436
11437 (define-public python2-odfpy
11438 (package-with-python2 python-odfpy))
11439
11440 (define-public python-natsort
11441 (package
11442 (name "python-natsort")
11443 (version "5.4.1")
11444 (source (origin
11445 (method url-fetch)
11446 (uri (pypi-uri "natsort" version))
11447 (sha256
11448 (base32
11449 "0i732amg6yzkx4g4c9j09jmqq39q377x9cl2nbkm5hax2c2v0wxf"))))
11450 (build-system python-build-system)
11451 (arguments
11452 `(#:modules ((guix build utils)
11453 (guix build python-build-system)
11454 (srfi srfi-1)
11455 (srfi srfi-26)
11456 (ice-9 ftw))
11457 #:phases
11458 (modify-phases %standard-phases
11459 (add-before 'check 'set-cachedir
11460 ;; Tests require write access to $HOME by default
11461 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
11462 (replace 'check
11463 (lambda _
11464 (let ((cwd (getcwd)))
11465 (setenv "PYTHONPATH"
11466 (string-append
11467 cwd "/build/"
11468 (find (cut string-prefix? "lib" <>)
11469 (scandir (string-append cwd "/build")))
11470 ":"
11471 (getenv "PYTHONPATH")))
11472 (invoke "pytest" "-v")))))))
11473 (native-inputs
11474 `(("python-hypothesis" ,python-hypothesis)
11475 ("python-pytest-cov" ,python-pytest-cov)
11476 ("python-pytest-mock" ,python-pytest-mock)
11477 ("python-pytest" ,python-pytest)))
11478 (propagated-inputs ; TODO: Add python-fastnumbers.
11479 `(("python-pyicu" ,python-pyicu)))
11480 (home-page "https://github.com/SethMMorton/natsort")
11481 (synopsis "Natural sorting for python and shell")
11482 (description
11483 "Natsort lets you apply natural sorting on lists instead of
11484 lexicographical. If you use the built-in @code{sorted} method in python
11485 on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4},
11486 @code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20},
11487 @code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that
11488 identifies numbers and sorts them separately from strings. It can also sort
11489 version numbers, real numbers, mixed types and more, and comes with a shell
11490 command @command{natsort} that exposes this functionality in the command line.")
11491 (license license:expat)
11492 (properties `((python2-variant . ,(delay python2-natsort))))))
11493
11494 (define-public python2-natsort
11495 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
11496 (package (inherit base)
11497 (native-inputs
11498 `(("python2-pathlib" ,python2-pathlib)
11499 ,@(package-native-inputs base))))))
11500
11501 (define-public python-glances
11502 (package
11503 (name "python-glances")
11504 (version "3.1.2")
11505 (source
11506 (origin
11507 (method url-fetch)
11508 (uri (pypi-uri "Glances" version))
11509 (sha256
11510 (base32 "15384pbvw9wj4sb8zgvd9v1812vrypbyjg0acicjf1hdb3p30fkk"))
11511 (modules '((guix build utils)))
11512 (snippet
11513 '(begin
11514 ;; Glances phones PyPI for weekly update checks by default.
11515 ;; Disable these. The user can re-enable them if desired.
11516 (substitute* "glances/outdated.py"
11517 (("^(.*)self\\.load_config\\(config\\)\n" line indentation)
11518 (string-append indentation
11519 "self.args.disable_check_update = True\n"
11520 line)))
11521 #t))))
11522 (build-system python-build-system)
11523 (propagated-inputs
11524 `(("python-future" ,python-future)
11525 ("python-psutil" ,python-psutil)))
11526 (home-page "https://github.com/nicolargo/glances")
11527 (synopsis "Cross-platform curses-based monitoring tool")
11528 (description
11529 "Glances is a curses-based monitoring tool for a wide variety of platforms.
11530 Glances uses the PsUtil library to get information from your system. It
11531 monitors CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
11532 (license license:lgpl3+)))
11533
11534 (define-public python2-glances
11535 (package-with-python2 python-glances))
11536
11537 (define-public python-graphql-core
11538 (package
11539 (name "python-graphql-core")
11540 (version "0.5.3")
11541 (source
11542 (origin
11543 (method url-fetch)
11544 (uri (pypi-uri "graphql-core" version))
11545 (sha256
11546 (base32
11547 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
11548 (build-system python-build-system)
11549 (arguments
11550 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
11551 #:phases
11552 (modify-phases %standard-phases
11553 (add-after 'unpack 'patch-hardcoded-version
11554 (lambda _ (substitute*
11555 "setup.py"
11556 (("'gevent==1.1rc1'") "'gevent'"))
11557 #t)))))
11558 (native-inputs
11559 `(("python-gevent" ,python-gevent)
11560 ("python-mock" ,python-mock)
11561 ("python-pytest-mock" ,python-pytest-mock)))
11562 (propagated-inputs
11563 `(("python-promise" ,python-promise)
11564 ("python-six" ,python-six)))
11565 (home-page "https://github.com/graphql-python/graphql-core")
11566 (synopsis "GraphQL implementation for Python")
11567 (description
11568 "GraphQL implementation for Python. GraphQL is a data query language and
11569 runtime designed and used to request and deliver data to mobile and web apps.
11570 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
11571 to Python.")
11572 (license license:expat)))
11573
11574 (define-public python2-graphql-core
11575 (package-with-python2 python-graphql-core))
11576
11577 (define-public python-graphql-relay
11578 (package
11579 (name "python-graphql-relay")
11580 (version "0.4.5")
11581 (source
11582 (origin
11583 (method url-fetch)
11584 (uri (pypi-uri "graphql-relay" version))
11585 (sha256
11586 (base32
11587 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
11588 (build-system python-build-system)
11589 (arguments
11590 '(#:tests? #f)) ; The tests are not distributed
11591 (propagated-inputs
11592 `(("python-graphql-core" ,python-graphql-core)
11593 ("python-promise" ,python-promise)
11594 ("python-six" ,python-six)))
11595 (home-page "https://github.com/graphql-python/graphql-relay-py")
11596 (synopsis "Relay implementation for Python")
11597 (description
11598 "This is a library to allow the easy creation of Relay-compliant servers
11599 using the GraphQL Python reference implementation of a GraphQL server. It
11600 should be noted that the code is a exact port of the original
11601 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
11602 from Facebook.")
11603 (license license:expat)))
11604
11605 (define-public python2-graphql-relay
11606 (package-with-python2 python-graphql-relay))
11607
11608 (define-public python-graphene
11609 (package
11610 (name "python-graphene")
11611 (version "0.10.2")
11612 (source
11613 (origin
11614 (method url-fetch)
11615 (uri (pypi-uri "graphene" version))
11616 (sha256
11617 (base32
11618 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
11619 (build-system python-build-system)
11620 (propagated-inputs
11621 `(("python-graphql-core" ,python-graphql-core)
11622 ("python-graphql-relay" ,python-graphql-relay)
11623 ("python-iso8601" ,python-iso8601)
11624 ("python-promise" ,python-promise)
11625 ("python-six" ,python-six)))
11626 (arguments
11627 `(#:tests? #f)) ; no tests/ in the PyPI tarball
11628 (home-page "https://graphene-python.org/")
11629 (synopsis "GraphQL Framework for Python")
11630 (description
11631 "Graphene is a Python library for building GraphQL schemas/types.
11632 A GraphQL schema describes your data model, and provides a GraphQL server
11633 with an associated set of resolve methods that know how to fetch data.")
11634 (properties `((python2-variant . ,(delay python2-graphene))))
11635 (license license:expat)))
11636
11637 (define-public python2-graphene
11638 (let ((base (package-with-python2
11639 (strip-python2-variant python-graphene))))
11640 (package (inherit base)
11641 (native-inputs
11642 `(("python2-sqlalchemy" ,python2-sqlalchemy)
11643 ,@(package-native-inputs base))))))
11644
11645 (define-public python-nautilus
11646 (package
11647 (name "python-nautilus")
11648 (version "0.4.9")
11649 (source
11650 (origin
11651 (method url-fetch)
11652 (uri (pypi-uri "nautilus" version))
11653 (sha256
11654 (base32
11655 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
11656 (build-system python-build-system)
11657 (arguments `(#:tests? #f)) ; fails to import test modules
11658 (propagated-inputs
11659 `(("python-bcrypt" ,python-bcrypt)
11660 ("python-click" ,python-click)
11661 ("python-consul" ,python-consul)
11662 ("python-graphene" ,python-graphene)
11663 ("python-jinja2" ,python-jinja2)
11664 ("python-peewee" ,python-peewee)
11665 ("python-pika" ,python-pika)
11666 ("python-tornado" ,python-tornado)
11667 ("python-wtforms" ,python-wtforms)))
11668 (native-inputs
11669 `(("python-nose2" ,python-nose2)))
11670 (home-page "https://github.com/AlecAivazis/nautilus")
11671 (synopsis "Library for creating microservice applications")
11672 (description
11673 "Nautilus is a framework for flux based microservices that looks to
11674 provide extendible implementations of common aspects of a cloud so that you can
11675 focus on building massively scalable web applications.")
11676 (license license:expat)))
11677
11678 (define-public python-snowballstemmer
11679 (package
11680 (name "python-snowballstemmer")
11681 (version "1.2.1")
11682 (source (origin
11683 (method url-fetch)
11684 (uri (pypi-uri "snowballstemmer" version))
11685 (sha256
11686 (base32
11687 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
11688 (build-system python-build-system)
11689 (arguments
11690 `(;; No tests exist
11691 #:tests? #f))
11692 (home-page "https://github.com/shibukawa/snowball_py")
11693 (synopsis "Snowball stemming library collection for Python")
11694 (description "This package provides 16 word stemmer algorithms generated
11695 from Snowball algorithms. It includes the 15 original ones plus the Poerter
11696 English stemmer.")
11697 (license license:bsd-3)))
11698
11699 (define-public python2-snowballstemmer
11700 (package-with-python2 python-snowballstemmer))
11701
11702 (define-public python-setproctitle
11703 (package
11704 (name "python-setproctitle")
11705 (version "1.1.10")
11706 (source
11707 (origin
11708 (method url-fetch)
11709 (uri (pypi-uri "setproctitle" version))
11710 (sha256
11711 (base32
11712 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
11713 (build-system python-build-system)
11714 (arguments
11715 '(#:phases
11716 (modify-phases %standard-phases
11717 (add-before 'check 'patch-Makefile
11718 ;; Stricly this is only required for the python2 variant.
11719 ;; But adding a phase in an inherited package seems to be
11720 ;; cumbersum. So we patch even for python3.
11721 (lambda _
11722 (let ((nose (assoc-ref %build-inputs "python2-nose")))
11723 (when nose
11724 (substitute* "Makefile"
11725 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
11726 (string-append nose "/bin/nosetests "))))
11727 #t)))
11728 (replace 'check
11729 (lambda _
11730 (setenv "PYTHON" (or (which "python3") (which "python")))
11731 (setenv "PYCONFIG" (or (which "python3-config")
11732 (which "python-config")))
11733 (setenv "CC" "gcc")
11734 ;; No need to extend PYTHONPATH to find the built package, since
11735 ;; the Makefile will build anyway
11736 (invoke "make" "check"))))))
11737 (native-inputs
11738 `(("procps" ,procps))) ; required for tests
11739 (home-page
11740 "https://github.com/dvarrazzo/py-setproctitle")
11741 (synopsis
11742 "Setproctitle implementation for Python to customize the process title")
11743 (description "The library allows a process to change its title (as displayed
11744 by system tools such as ps and top).
11745
11746 Changing the title is mostly useful in multi-process systems, for
11747 example when a master process is forked: changing the children's title
11748 allows to identify the task each process is busy with. The technique
11749 is used by PostgreSQL and the OpenSSH Server for example.")
11750 (license license:bsd-3)
11751 (properties `((python2-variant . ,(delay python2-setproctitle))))))
11752
11753 (define-public python2-setproctitle
11754 (let ((base (package-with-python2
11755 (strip-python2-variant python-setproctitle))))
11756 (package
11757 (inherit base)
11758 (native-inputs `(("python2-nose" ,python2-nose)
11759 ,@(package-native-inputs base))))))
11760
11761 (define-public python-validictory
11762 (package
11763 (name "python-validictory")
11764 (version "1.0.1")
11765 (source
11766 (origin
11767 (method url-fetch)
11768 (uri (pypi-uri "validictory" version))
11769 (sha256
11770 (base32
11771 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
11772 (build-system python-build-system)
11773 (arguments
11774 '(#:phases
11775 (modify-phases %standard-phases
11776 (add-after 'unpack 'bootstrap
11777 ;; Move the tests out of the package directory to avoid
11778 ;; packaging them.
11779 (lambda* _
11780 (rename-file "validictory/tests" "tests")
11781 (delete-file "tests/__init__.py")))
11782 (replace 'check
11783 (lambda _
11784 ;; Extend PYTHONPATH so the built package will be found.
11785 (setenv "PYTHONPATH"
11786 (string-append (getcwd) "/build/lib:"
11787 (getenv "PYTHONPATH")))
11788 (invoke "py.test" "-vv" ))))))
11789 (native-inputs
11790 `(("python-pytest" ,python-pytest)))
11791 (home-page
11792 "https://github.com/jamesturk/validictory")
11793 (synopsis "General purpose Python data validator")
11794 (description "It allows validation of arbitrary Python data structures.
11795
11796 The schema format is based on the JSON Schema
11797 proposal (http://json-schema.org), so combined with json the library is also
11798 useful as a validator for JSON data.")
11799 (license license:expat)))
11800
11801 (define-public python2-validictory
11802 (package-with-python2 python-validictory))
11803
11804 (define-public python-pyelftools
11805 (package
11806 (name "python-pyelftools")
11807 (version "0.25")
11808 (source
11809 (origin
11810 (method url-fetch)
11811 (uri (pypi-uri "pyelftools" version))
11812 (sha256
11813 (base32
11814 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
11815 (build-system python-build-system)
11816 (arguments
11817 `(#:phases
11818 (modify-phases %standard-phases
11819 (add-before 'check 'set-pythonpath
11820 (lambda _
11821 (setenv "PYTHONPATH"
11822 (string-append
11823 (getcwd) "/test/"
11824 ":" (getenv "PYTHONPATH")))
11825 #t)))))
11826 (home-page
11827 "https://github.com/eliben/pyelftools")
11828 (synopsis
11829 "Analyze binary and library file information")
11830 (description "This Python library provides interfaces for parsing and
11831 analyzing two binary and library file formats; the Executable and Linking
11832 Format (ELF), and debugging information in the Debugging With Attributed
11833 Record Format (DWARF).")
11834 (license license:public-domain)))
11835
11836 (define-public python-pyev
11837 (package
11838 (name "python-pyev")
11839 (version "0.9.0")
11840 (source
11841 (origin
11842 (method url-fetch)
11843 (uri (pypi-uri "pyev" version))
11844 (sha256
11845 (base32
11846 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
11847 (build-system python-build-system)
11848 (arguments
11849 `(#:tests? #f ; no test suite
11850 #:phases
11851 (modify-phases %standard-phases
11852 (add-after 'unpack 'patch
11853 (lambda* (#:key inputs #:allow-other-keys)
11854 (let ((libev (string-append (assoc-ref inputs "libev")
11855 "/lib/libev.so.4")))
11856 (substitute* "setup.py"
11857 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
11858 (string-append "libev_dll_name = \"" libev "\"")))))))))
11859 (inputs
11860 `(("libev" ,libev)))
11861 (home-page "http://pythonhosted.org/pyev/")
11862 (synopsis "Python libev interface")
11863 (description "Pyev provides a Python interface to libev.")
11864 (license license:gpl3)))
11865
11866 (define-public python2-pyev
11867 (package-with-python2 python-pyev))
11868
11869 (define-public python-imagesize
11870 (package
11871 (name "python-imagesize")
11872 (version "1.1.0")
11873 (source
11874 (origin
11875 (method url-fetch)
11876 (uri (pypi-uri "imagesize" version))
11877 (sha256
11878 (base32
11879 "1dg3wn7qpwmhgqc0r9na2ding1wif9q5spz3j9zn2riwphc2k0zk"))))
11880 (build-system python-build-system)
11881 (home-page "https://github.com/shibukawa/imagesize_py")
11882 (synopsis "Gets image size of files in various formats in Python")
11883 (description
11884 "This package allows determination of image size from
11885 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
11886 (license license:expat)))
11887
11888 (define-public python2-imagesize
11889 (package-with-python2 python-imagesize))
11890
11891 (define-public python-termstyle
11892 (package
11893 (name "python-termstyle")
11894 (version "0.1.11")
11895 (source
11896 (origin
11897 (method url-fetch)
11898 (uri (pypi-uri "termstyle" version))
11899 (sha256
11900 (base32
11901 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
11902 (build-system python-build-system)
11903 (arguments
11904 '(#:phases
11905 (modify-phases %standard-phases
11906 (replace 'check
11907 (lambda _
11908 (invoke "python" "test3.py"))))))
11909 (home-page "https://github.com/gfxmonk/termstyle")
11910 (synopsis "Console text coloring for Python")
11911 (description "This package provides console text coloring for Python.")
11912 (license license:bsd-3)))
11913
11914 (define-public python-argcomplete
11915 (package
11916 (name "python-argcomplete")
11917 (version "1.10.3")
11918 (source
11919 (origin
11920 (method url-fetch)
11921 (uri (pypi-uri "argcomplete" version))
11922 (sha256
11923 (base32
11924 "02jkc44drb0yjz6x28lvg6rj607n8r2irdpdvyylm8xnycn54zx3"))))
11925 (build-system python-build-system)
11926 (arguments
11927 `(#:phases
11928 (modify-phases %standard-phases
11929 (add-after 'unpack 'embed-tool-references
11930 (lambda _
11931 (substitute* "argcomplete/bash_completion.d/python-argcomplete.sh"
11932 ((" grep")
11933 (string-append " " (which "grep")))
11934 ((" egrep")
11935 (string-append " " (which "egrep")))
11936 (("elif which")
11937 (string-append "elif " (which "which")))
11938 (("\\$\\(which")
11939 (string-append "$(" (which "which"))))
11940 #t)))))
11941 (inputs
11942 `(("grep" ,grep)
11943 ("which" ,which)))
11944 (native-inputs
11945 `(("python-coverage" ,python-coverage)
11946 ("python-flake8" ,python-flake8)
11947 ("python-pexpect" ,python-pexpect)
11948 ("python-wheel" ,python-wheel)
11949 ("tcsh" ,tcsh)
11950 ("fish" ,fish)
11951 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
11952 (home-page "https://github.com/kislyuk/argcomplete")
11953 (synopsis "Shell tab completion for Python argparse")
11954 (description "argcomplete provides extensible command line tab completion
11955 of arguments and options for Python scripts using @code{argparse}. It's
11956 particularly useful for programs with many options or sub-parsers that can
11957 dynamically suggest completions; for example, when browsing resources over the
11958 network.")
11959 (license license:asl2.0)))
11960
11961 (define-public python2-argcomplete
11962 (package-with-python2 python-argcomplete))
11963
11964 (define-public python-xopen
11965 (package
11966 (name "python-xopen")
11967 (version "0.5.0")
11968 (source
11969 (origin
11970 (method url-fetch)
11971 (uri (pypi-uri "xopen" version))
11972 (sha256
11973 (base32
11974 "17xbrgi23l87yg6h0qcknssp2q812miiy33qw6v45v5gx0jwv5xh"))))
11975 (build-system python-build-system)
11976 (propagated-inputs
11977 `(("python-setuptools-scm" ,python-setuptools-scm)))
11978 (home-page "https://github.com/marcelm/xopen/")
11979 (synopsis "Open compressed files transparently")
11980 (description "This module provides an @code{xopen} function that works like
11981 Python's built-in @code{open} function, but can also deal with compressed files.
11982 Supported compression formats are gzip, bzip2 and, xz, and are automatically
11983 recognized by their file extensions. The focus is on being as efficient as
11984 possible on all supported Python versions.")
11985 (license license:expat)))
11986
11987 (define-public python2-xopen
11988 (let ((base (package-with-python2
11989 (strip-python2-variant python-xopen))))
11990 (package
11991 (inherit base)
11992 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
11993 ,@(package-propagated-inputs base))))))
11994
11995 (define-public python-cheetah
11996 (package
11997 (name "python-cheetah")
11998 (version "3.1.0")
11999 (source
12000 (origin
12001 (method url-fetch)
12002 (uri (pypi-uri "Cheetah3" version))
12003 (sha256
12004 (base32
12005 "1ihag9cxll6b86fc8v5lkhmr3brdbi4yiz16zpgw79yylmv8fgr9"))))
12006 (build-system python-build-system)
12007 (arguments
12008 `(#:modules ((guix build utils)
12009 (guix build python-build-system)
12010 (ice-9 ftw)
12011 (srfi srfi-1)
12012 (srfi srfi-26))
12013 #:phases (modify-phases %standard-phases
12014 (add-after 'unpack 'use-absolute-python
12015 (lambda _
12016 (substitute* "Cheetah/CheetahWrapper.py"
12017 (("#!/usr/bin/env python")
12018 (string-append "#!" (which "python"))))
12019 #t))
12020 (replace 'check
12021 (lambda _
12022 (let ((cwd (getcwd)))
12023 (setenv "PYTHONPATH"
12024 (string-append
12025 cwd "/build/"
12026 (find (cut string-prefix? "lib" <>)
12027 (scandir (string-append cwd "/build")))
12028 ":" (getenv "PYTHONPATH")))
12029 (setenv "PATH"
12030 (string-append (getenv "PATH")
12031 ":" cwd "/bin"))
12032 (setenv "TMPDIR" "/tmp")
12033
12034 (substitute* "Cheetah/Tests/Test.py"
12035 (("unittest.TextTestRunner\\(\\)")
12036 "unittest.TextTestRunner(verbosity=2)"))
12037
12038 (invoke "python" "Cheetah/Tests/Test.py")))))))
12039 (propagated-inputs
12040 `(("python-markdown" ,python-markdown))) ;optional
12041 (home-page "http://cheetahtemplate.org/")
12042 (synopsis "Template engine")
12043 (description "Cheetah is a text-based template engine and Python code
12044 generator.
12045
12046 Cheetah can be used as a standalone templating utility or referenced as
12047 a library from other Python applications. It has many potential uses,
12048 but web developers looking for a viable alternative to ASP, JSP, PHP and
12049 PSP are expected to be its principle user group.
12050
12051 Features:
12052 @enumerate
12053 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
12054 text-based format.
12055 @item Cleanly separates content, graphic design, and program code.
12056 @item Blends the power and flexibility of Python with a simple template language
12057 that non-programmers can understand.
12058 @item Gives template writers full access to any Python data structure, module,
12059 function, object, or method in their templates.
12060 @item Makes code reuse easy by providing an object-orientated interface to
12061 templates that is accessible from Python code or other Cheetah templates.
12062 One template can subclass another and selectively reimplement sections of it.
12063 @item Provides a simple, yet powerful, caching mechanism that can dramatically
12064 improve the performance of a dynamic website.
12065 @item Compiles templates into optimized, yet readable, Python code.
12066 @end enumerate")
12067 (license (license:x11-style "file://LICENSE"))))
12068
12069 (define-public python2-cheetah
12070 (package-with-python2 python-cheetah))
12071
12072 (define-public python-dulwich
12073 (package
12074 (name "python-dulwich")
12075 (version "0.18.6")
12076 (source
12077 (origin
12078 (method url-fetch)
12079 (uri (list (string-append "https://www.dulwich.io/releases/"
12080 "dulwich-" version ".tar.gz")
12081 (pypi-uri "dulwich" version)))
12082 (sha256
12083 (base32
12084 "1aa1xfrxkc3j9s4xi0llhf5gndyi9ryprcxsqfa5fcb8ph34981q"))))
12085 (build-system python-build-system)
12086 (arguments
12087 `(#:phases
12088 (modify-phases %standard-phases
12089 (add-before 'check 'fix-tests
12090 (lambda* (#:key inputs #:allow-other-keys)
12091 ;; The tests use Popen with a custom environment which doesn't
12092 ;; include PATH.
12093 (substitute* "dulwich/tests/compat/utils.py"
12094 (("'git'") (string-append "'"
12095 (which "git")
12096 "'")))
12097 (substitute* '("dulwich/tests/test_repository.py"
12098 "dulwich/tests/test_hooks.py")
12099 (("#!/bin/sh") (string-append "#!" (which "sh"))))
12100 (setenv "TEST_RUNNER" "unittest")
12101 (setenv "PYTHONHASHSEED" "random")
12102 #t)))))
12103 (propagated-inputs
12104 `(("python-fastimport" ,python-fastimport)))
12105 (native-inputs
12106 `(("python-mock" ,python-mock)
12107 ("python-geventhttpclient" ,python-geventhttpclient)
12108 ("git" ,git)))
12109 (home-page "https://www.dulwich.io/")
12110 (synopsis "Git implementation in Python")
12111 (description "Dulwich is an implementation of the Git file formats and
12112 protocols written in pure Python.")
12113 ;; Can be used with either license.
12114 (license (list license:asl2.0 license:gpl2+))))
12115
12116 (define-public python2-dulwich
12117 (package-with-python2 python-dulwich))
12118
12119 (define-public python-pbkdf2
12120 (package
12121 (name "python-pbkdf2")
12122 (version "1.3")
12123 (source
12124 (origin
12125 (method url-fetch)
12126 (uri (pypi-uri "pbkdf2" version))
12127 (sha256
12128 (base32
12129 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
12130 (build-system python-build-system)
12131 (arguments
12132 '(#:phases
12133 (modify-phases %standard-phases
12134 (replace 'check
12135 (lambda _
12136 (setenv "PYTHONPATH"
12137 (string-append (getcwd) "/build/lib:"
12138 (getenv "PYTHONPATH")))
12139 (invoke "python" "test/test_pbkdf2.py"))))))
12140 (propagated-inputs
12141 `(("python-pycrypto" ,python-pycrypto))) ; optional
12142 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
12143 (synopsis "Password-based key derivation")
12144 (description "This module implements the password-based key derivation
12145 function, PBKDF2, specified in RSA PKCS#5 v2.0.
12146
12147 PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
12148 is part of the RSA Public Key Cryptography Standards series. The provided
12149 implementation takes a password or a passphrase and a salt value (and
12150 optionally a iteration count, a digest module, and a MAC module) and provides
12151 a file-like object from which an arbitrarly-sized key can be read.")
12152 (license license:expat)))
12153
12154 (define-public python2-pbkdf2
12155 (package-with-python2 python-pbkdf2))
12156
12157 (define-public python-qrcode
12158 (package
12159 (name "python-qrcode")
12160 (version "6.1")
12161 (source
12162 (origin
12163 (method url-fetch)
12164 (uri (pypi-uri "qrcode" version))
12165 (sha256
12166 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
12167 (build-system python-build-system)
12168 (arguments
12169 ;; FIXME: Tests require packaging 'pymaging'.
12170 '(#:tests? #f))
12171 (propagated-inputs
12172 `(("python-lxml" ,python-lxml) ; for SVG output
12173 ("python-pillow" ,python-pillow) ; for PNG output
12174 ("python-six" ,python-six)))
12175 (home-page "https://github.com/lincolnloop/python-qrcode")
12176 (synopsis "QR Code image generator")
12177 (description "This package provides a pure Python QR Code generator
12178 module. It uses the Python Imaging Library (PIL) to allow for the generation
12179 of QR Codes.
12180
12181 In addition this package provides a command line tool to generate QR codes and
12182 either write these QR codes to a file or do the output as ascii art at the
12183 console.")
12184 (license license:bsd-3)))
12185
12186 (define-public python2-qrcode
12187 (package-with-python2 python-qrcode))
12188
12189 (define-public python-rst2ansi
12190 (package
12191 (name "python-rst2ansi")
12192 (version "0.1.5")
12193 (source
12194 (origin
12195 (method url-fetch)
12196 (uri (pypi-uri "rst2ansi" version))
12197 (sha256
12198 (base32
12199 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
12200 (build-system python-build-system)
12201 (propagated-inputs
12202 `(("python-docutils" ,python-docutils)))
12203 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
12204 (synopsis "Convert RST to ANSI-decorated console output")
12205 (description
12206 "Python module dedicated to rendering RST (reStructuredText) documents
12207 to ansi-escaped strings suitable for display in a terminal.")
12208 (license license:expat)))
12209
12210 (define-public python-ansi2html
12211 (package
12212 (name "python-ansi2html")
12213 (version "1.2.0")
12214 (source
12215 (origin
12216 (method url-fetch)
12217 (uri (pypi-uri "ansi2html" version))
12218 (sha256
12219 (base32
12220 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
12221 (build-system python-build-system)
12222 (native-inputs
12223 `(("python-mock" ,python-mock)
12224 ("python-nose" ,python-nose)))
12225 (propagated-inputs
12226 `(("python-six" ,python-six)))
12227 (home-page "https://github.com/ralphbean/ansi2html")
12228 (synopsis "Convert ANSI-decorated console output to HTML")
12229 (description
12230 "@command{ansi2html} is a Python library and command line utility for
12231 convering text with ANSI color codes to HTML or LaTeX.")
12232 (license license:gpl3+)))
12233
12234 (define-public python2-ansi2html
12235 (package-with-python2 python-ansi2html))
12236
12237 (define-public python-ddt
12238 (package
12239 (name "python-ddt")
12240 (version "1.1.3")
12241 (source
12242 (origin
12243 (method url-fetch)
12244 (uri (pypi-uri "ddt" version))
12245 (sha256
12246 (base32
12247 "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk"))))
12248 (build-system python-build-system)
12249 (native-inputs
12250 `(("python-mock" ,python-mock)
12251 ("python-nose" ,python-nose)))
12252 (propagated-inputs
12253 `(("python-six" ,python-six)
12254 ("python-pyyaml" ,python-pyyaml)))
12255 (home-page "https://github.com/txels/ddt")
12256 (synopsis "Data-Driven Tests")
12257 (description
12258 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
12259 running it with different test data, and make it appear as multiple test
12260 cases.")
12261 (license license:expat)))
12262
12263 (define-public python2-ddt
12264 (package-with-python2 python-ddt))
12265
12266 (define-public python-pycountry
12267 (package
12268 (name "python-pycountry")
12269 (version "18.5.26")
12270 (source
12271 (origin
12272 (method url-fetch)
12273 (uri (pypi-uri "pycountry" version))
12274 (sha256
12275 (base32
12276 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
12277 (build-system python-build-system)
12278 (home-page "https://bitbucket.org/flyingcircus/pycountry")
12279 (synopsis "ISO databases for languages, countries, currencies, etc.")
12280 (description
12281 "@code{pycountry} provides the ISO databases for the standards:
12282 @enumerate
12283 @item 639-3 (Languages)
12284 @item 3166 (Countries)
12285 @item 3166-3 (Deleted Countries)
12286 @item 3166-2 (Subdivisions of countries)
12287 @item 4217 (Currencies)
12288 @item 15924 (Scripts)
12289 @end enumerate
12290 It includes a copy from Debian’s pkg-isocodes and makes the data accessible
12291 through a Python API.")
12292 (license license:lgpl2.1+)))
12293
12294 (define-public python2-pycountry
12295 (package-with-python2 python-pycountry))
12296
12297 (define-public python-pycosat
12298 (package
12299 (name "python-pycosat")
12300 (version "0.6.1")
12301 (source
12302 (origin
12303 (method url-fetch)
12304 (uri (pypi-uri "pycosat" version))
12305 (sha256
12306 (base32
12307 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
12308 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
12309 (build-system python-build-system)
12310 (home-page "https://github.com/ContinuumIO/pycosat")
12311 (synopsis "Bindings to picosat (a SAT solver)")
12312 (description
12313 "This package provides efficient Python bindings to @code{picosat} on
12314 the C level. When importing pycosat, the @code{picosat} solver becomes part
12315 of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
12316 Problem} (SAT) solver.")
12317 (license license:expat)))
12318
12319 (define-public python2-pycosat
12320 (package-with-python2 python-pycosat))
12321
12322 (define-public python2-ruamel.ordereddict
12323 (package
12324 (name "python2-ruamel.ordereddict")
12325 (version "0.4.9")
12326 (source
12327 (origin
12328 (method url-fetch)
12329 (uri (pypi-uri "ruamel.ordereddict" version))
12330 (sha256
12331 (base32
12332 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
12333 (build-system python-build-system)
12334 (arguments
12335 `(#:python ,python-2
12336 #:phases
12337 (modify-phases %standard-phases
12338 (delete 'check)
12339 (add-after 'install 'check
12340 (lambda* (#:key inputs outputs #:allow-other-keys)
12341 (add-installed-pythonpath inputs outputs)
12342 (invoke "python" "test/testordereddict.py"))))))
12343 (home-page "https://bitbucket.org/ruamel/ordereddict")
12344 (synopsis "Version of dict that keeps keys in insertion order")
12345 (description
12346 "This is an implementation of an ordered dictionary with @dfn{Key
12347 Insertion Order} (KIO: updates of values do not affect the position of the
12348 key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
12349 removed and put at the back). The standard library module @code{OrderedDict},
12350 implemented later, implements a subset of @code{ordereddict} functionality.
12351 Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
12352 Order} (KSO, no sorting function can be specified, but a transform can be
12353 specified to apply on the key before comparison (e.g. @code{string.lower})).")
12354 (license license:expat)))
12355
12356 (define-public python-pypeg2
12357 (package
12358 (name "python-pypeg2")
12359 (version "2.15.2")
12360 (source
12361 (origin
12362 (method url-fetch)
12363 (uri (pypi-uri "pyPEG2" version))
12364 (sha256
12365 (base32
12366 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
12367 (build-system python-build-system)
12368 (propagated-inputs `(("python-lxml" ,python-lxml)))
12369 (arguments
12370 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
12371 '(#:tests? #f))
12372 (home-page "https://fdik.org/pyPEG/")
12373 (synopsis "Parsering Expression Grammars in Python")
12374 (description "PyPEG is an intrinsic parser interpreter framework for
12375 Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
12376 parse many formal languages.")
12377 (license license:gpl2)))
12378
12379 (define-public python-incremental
12380 (package
12381 (name "python-incremental")
12382 (version "17.5.0")
12383 (source
12384 (origin
12385 (method url-fetch)
12386 (uri (pypi-uri "incremental" version))
12387 (sha256
12388 (base32
12389 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
12390 (build-system python-build-system)
12391 (home-page "https://github.com/hawkowl/incremental")
12392 (synopsis "Library for versioning Python projects")
12393 (description "Incremental is a small library that versions your Python
12394 projects.")
12395 (license license:expat)))
12396
12397 (define-public python2-incremental
12398 (package-with-python2 python-incremental))
12399
12400 (define-public python-invoke
12401 (package
12402 (name "python-invoke")
12403 (home-page "https://www.pyinvoke.org/")
12404 (version "1.3.0")
12405 (source (origin
12406 (method url-fetch)
12407 (uri (pypi-uri "invoke" version))
12408 (sha256
12409 (base32
12410 "1nn7gad0rvy492acpyhkrp01zsk86acf34qhsvq4xmm6x39788n5"))))
12411 (build-system python-build-system)
12412 (arguments
12413 ;; XXX: Requires many dependencies that are not yet in Guix.
12414 `(#:tests? #f))
12415 (synopsis "Pythonic task execution")
12416 (description
12417 "Invoke is a Python task execution tool and library, drawing inspiration
12418 from various sources to arrive at a powerful and clean feature set. It is
12419 evolved from the Fabric project, but focuses on local and abstract concerns
12420 instead of servers and network commands.")
12421 (license license:bsd-3)))
12422
12423 (define-public python2-invoke
12424 (package-with-python2 python-invoke))
12425
12426 (define-public python-automat
12427 (package
12428 (name "python-automat")
12429 (version "0.7.0")
12430 (source (origin
12431 (method url-fetch)
12432 (uri (pypi-uri "Automat" version))
12433 (sha256
12434 (base32
12435 "03ivg70n3b1cbcd2zvjhk8y4kmqxcvhmili39lmgx09dza1qpmyb"))))
12436 (build-system python-build-system)
12437 ;; We disable the tests because they require python-twisted, while
12438 ;; python-twisted depends on python-automat. Twisted is optional, but the
12439 ;; tests fail if it is not available. Also see
12440 ;; <https://github.com/glyph/automat/issues/71>.
12441 (arguments '(#:tests? #f))
12442 (native-inputs
12443 `(("python-m2r" ,python-m2r)
12444 ("python-setuptools-scm" ,python-setuptools-scm)
12445 ("python-graphviz" ,python-graphviz)))
12446 (propagated-inputs
12447 `(("python-six" ,python-six)
12448 ("python-attrs" ,python-attrs)))
12449 (home-page "https://github.com/glyph/Automat")
12450 (synopsis "Self-service finite-state machines")
12451 (description "Automat is a library for concise, idiomatic Python
12452 expression of finite-state automata (particularly deterministic finite-state
12453 transducers).")
12454 (license license:expat)))
12455
12456 (define-public python2-automat
12457 (package-with-python2 python-automat))
12458
12459 (define-public python-m2r
12460 (package
12461 (name "python-m2r")
12462 (version "0.2.1")
12463 (source (origin
12464 (method url-fetch)
12465 (uri (pypi-uri "m2r" version))
12466 (sha256
12467 (base32
12468 "16gdm8i06jjmlpvckpfmlkr4693dh0vs192vgsqn84fsdkbbm45z"))))
12469 (build-system python-build-system)
12470 (propagated-inputs
12471 `(("python-docutils" ,python-docutils)
12472 ("python-mistune" ,python-mistune)))
12473 (native-inputs
12474 `(("python-pygments" ,python-pygments)
12475 ("python-mock" ,python-mock)))
12476 (home-page "https://github.com/miyakogi/m2r")
12477 (synopsis "Markdown to reStructuredText converter")
12478 (description "M2R converts a markdown file including reST markups to valid
12479 reST format.")
12480 (license license:expat)))
12481
12482 (define-public python2-m2r
12483 (package-with-python2 python-m2r))
12484
12485 (define-public python-constantly
12486 (package
12487 (name "python-constantly")
12488 (version "15.1.0")
12489 (source (origin
12490 (method url-fetch)
12491 (uri (pypi-uri "constantly" version))
12492 (sha256
12493 (base32
12494 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
12495 (build-system python-build-system)
12496 (home-page "https://github.com/twisted/constantly")
12497 (synopsis "Symbolic constants in Python")
12498 (description "Constantly is a Python library that provides symbolic
12499 constant support. It includes collections and constants with text, numeric,
12500 and bit flag values.")
12501 (license license:expat)))
12502
12503 (define-public python2-constantly
12504 (package-with-python2 python-constantly))
12505
12506 (define-public python-attrs
12507 (package
12508 (name "python-attrs")
12509 (version "19.1.0")
12510 (source (origin
12511 (method url-fetch)
12512 (uri (pypi-uri "attrs" version))
12513 (sha256
12514 (base32
12515 "16g33zr5f449lqc5wgvzpknxryfzrfsxcr6kpgxwn7l5fkv71f7h"))))
12516 (build-system python-build-system)
12517 (arguments
12518 `(#:modules ((guix build utils)
12519 (guix build python-build-system)
12520 (ice-9 ftw)
12521 (srfi srfi-1)
12522 (srfi srfi-26))
12523 #:phases (modify-phases %standard-phases
12524 (replace 'check
12525 (lambda _
12526 (let ((cwd (getcwd)))
12527 (setenv "PYTHONPATH"
12528 (string-append
12529 cwd "/build/"
12530 (find (cut string-prefix? "lib" <>)
12531 (scandir (string-append cwd "/build")))
12532 ":"
12533 (getenv "PYTHONPATH")))
12534 (invoke "python" "-m" "pytest")))))))
12535 (native-inputs
12536 `(("python-coverage" ,python-coverage)
12537 ("python-hypothesis" ,python-hypothesis)
12538 ("python-pympler" ,python-pympler)
12539 ("python-pytest" ,python-pytest)
12540 ("python-six" ,python-six)
12541 ("python-sphinx" ,python-sphinx)
12542 ("python-zope-interface" ,python-zope-interface)))
12543 (home-page "https://github.com/python-attrs/attrs/")
12544 (synopsis "Attributes without boilerplate")
12545 (description "@code{attrs} is a Python package with class decorators that
12546 ease the chores of implementing the most common attribute-related object
12547 protocols.")
12548 (license license:expat)))
12549
12550 (define-public python2-attrs
12551 (package-with-python2 python-attrs))
12552
12553 (define-public python-attrs-bootstrap
12554 (package
12555 (inherit python-attrs)
12556 (name "python-attrs-bootstrap")
12557 (native-inputs `())
12558 (arguments `(#:tests? #f))))
12559
12560 (define-public python2-attrs-bootstrap
12561 (package-with-python2 python-attrs-bootstrap))
12562
12563 (define-public python2-cliapp
12564 (package
12565 (name "python2-cliapp")
12566 (version "1.20180812.1")
12567 (source
12568 (origin
12569 (method url-fetch)
12570 (uri (string-append
12571 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
12572 version ".tar.gz"))
12573 (sha256
12574 (base32
12575 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
12576 (build-system python-build-system)
12577 (arguments
12578 `(#:python ,python-2
12579 #:phases
12580 (modify-phases %standard-phases
12581 ;; check phase needs to be run before the build phase. If not,
12582 ;; coverage-test-runner looks for tests for the built source files,
12583 ;; and fails.
12584 (delete 'check)
12585 (add-before 'build 'check
12586 (lambda _
12587 ;; Disable python3 tests
12588 (substitute* "check"
12589 (("python3") "# python3"))
12590 (invoke "./check"))))))
12591 (native-inputs
12592 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
12593 ("python2-pep8" ,python2-pep8)))
12594 (propagated-inputs
12595 `(("python2-pyaml" ,python2-pyaml)))
12596 (home-page "https://liw.fi/cliapp/")
12597 (synopsis "Python framework for command line programs")
12598 (description "@code{python2-cliapp} is a python framework for
12599 command line programs. It contains the typical stuff such programs
12600 need to do, such as parsing the command line for options, and
12601 iterating over input files.")
12602 (license license:gpl2+)))
12603
12604 (define-public python2-ttystatus
12605 (package
12606 (name "python2-ttystatus")
12607 (version "0.36")
12608 (source
12609 (origin
12610 (method url-fetch)
12611 (uri (string-append
12612 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
12613 version ".tar.gz"))
12614 (sha256
12615 (base32
12616 "06mdk4d19zw2j3is54gndhzl396g3xc8k52m7i86z69s9hcz71by"))))
12617 (build-system python-build-system)
12618 (native-inputs
12619 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
12620 ("python2-pep8" ,python2-pep8)))
12621 (arguments
12622 `(#:python ,python-2
12623 #:phases
12624 (modify-phases %standard-phases
12625 ;; check phase needs to be run before the build phase. If not,
12626 ;; coverage-test-runner looks for tests for the built source files,
12627 ;; and fails.
12628 (delete 'check)
12629 (add-before 'build 'check
12630 (lambda _ (invoke "make" "check"))))))
12631 (home-page "https://liw.fi/ttystatus/")
12632 (synopsis "Python library for showing progress reporting and
12633 status updates on terminals")
12634 (description "@code{python2-ttystatus} is a python library for
12635 showing progress reporting and status updates on terminals, for
12636 command line programs. Output is automatically adapted to the width
12637 of the terminal: truncated if it does not fit, and resized if the
12638 terminal size changes.")
12639 (license license:gpl3+)))
12640
12641 (define-public python2-tracing
12642 (package
12643 (name "python2-tracing")
12644 (version "0.10")
12645 (source
12646 (origin
12647 (method url-fetch)
12648 (uri (string-append
12649 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
12650 version ".tar.gz"))
12651 (sha256
12652 (base32
12653 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
12654 (build-system python-build-system)
12655 (arguments
12656 `(#:python ,python-2))
12657 (home-page "https://liw.fi/tracing/")
12658 (synopsis "Python debug logging helper")
12659 (description "@code{python2-tracing} is a python library for
12660 logging debug messages. It provides a way to turn debugging messages
12661 on and off, based on the filename they occur in. It is much faster
12662 than using @code{logging.Filter} to accomplish the same thing, which
12663 matters when code is run in production mode. The actual logging still
12664 happens using the @code{logging} library.")
12665 (license license:gpl3+)))
12666
12667 (define-public python2-larch
12668 (package
12669 (name "python2-larch")
12670 (version "1.20151025")
12671 (source
12672 (origin
12673 (method url-fetch)
12674 (uri (string-append
12675 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
12676 version ".tar.gz"))
12677 (patches (search-patches
12678 "python2-larch-coverage-4.0a6-compatibility.patch"))
12679 (sha256
12680 (base32
12681 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
12682 (build-system python-build-system)
12683 (arguments
12684 `(#:python ,python-2
12685 #:phases
12686 (modify-phases %standard-phases
12687 ;; check phase needs to be run before the build phase. If not,
12688 ;; coverage-test-runner looks for tests for the built source files,
12689 ;; and fails.
12690 (delete 'check)
12691 (add-before 'build 'check
12692 (lambda _ (invoke "make" "check"))))))
12693 (native-inputs
12694 `(("cmdtest" ,cmdtest)
12695 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
12696 (propagated-inputs
12697 `(("python2-tracing" ,python2-tracing)))
12698 (home-page "https://liw.fi/larch/")
12699 (synopsis "Python copy-on-write B-tree library")
12700 (description "@code{python2-larch} is an implementation of
12701 particular kind of B-tree, based on research by Ohad Rodeh. See
12702 @url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
12703 on the data structure.
12704
12705 The distinctive feature of this B-tree is that a node is never
12706 (conceptually) modified. Instead, all updates are done by
12707 copy-on-write. This makes it easy to clone a tree, and modify only the
12708 clone, while other processes access the original tree.")
12709 (license license:gpl3+)))
12710
12711 (define-public python-astroid
12712 (package
12713 (name "python-astroid")
12714 (version "2.3.3")
12715 (source
12716 (origin
12717 (method url-fetch)
12718 (uri (pypi-uri "astroid" version))
12719 (sha256
12720 (base32 "0fnibsl2cb5mvzbfm7sycj85smx48f8w8m7ks1sqlmpr9ps0gski"))))
12721 (build-system python-build-system)
12722 (propagated-inputs
12723 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
12724 ("python-six" ,python-six)
12725 ("python-typed-ast" ,python-typed-ast)
12726 ("python-wrapt" ,python-wrapt)))
12727 (native-inputs
12728 `(("python-dateutil" ,python-dateutil)
12729 ("python-nose" ,python-nose)
12730 ("python-pytest" ,python-pytest)
12731 ("python-pytest-runner" ,python-pytest-runner)))
12732 (arguments
12733 `(#:phases
12734 (modify-phases %standard-phases
12735 (add-after 'unpack 'remove-spurious-test
12736 (lambda _
12737 ;; This can be removed after upgrading from python-3.7
12738 ;; https://github.com/PyCQA/astroid/issues/593
12739 ;; https://bugs.python.org/issue34056
12740 (delete-file "astroid/tests/unittest_modutils.py")
12741 #t))
12742 (replace 'check
12743 (lambda _
12744 (invoke "pytest" "astroid"))))))
12745 (home-page "https://github.com/PyCQA/astroid")
12746 (synopsis "Common base representation of python source code for pylint and
12747 other projects")
12748 (description "@code{python-astroid} provides a common base representation
12749 of python source code for projects such as pychecker, pyreverse, pylint, etc.
12750
12751 It provides a compatible representation which comes from the _ast module. It
12752 rebuilds the tree generated by the builtin _ast module by recursively walking
12753 down the AST and building an extended ast. The new node classes have
12754 additional methods and attributes for different usages. They include some
12755 support for static inference and local name scopes. Furthermore, astroid
12756 builds partial trees by inspecting living objects.")
12757 (license license:lgpl2.1+)
12758 (properties `((python2-variant . ,(delay python2-astroid))))))
12759
12760 (define-public python2-astroid
12761 (let ((base (package-with-python2
12762 (strip-python2-variant python-astroid))))
12763 (package (inherit base)
12764 ;; Version 2.x removes python2 support.
12765 (version "1.6.5")
12766 (source
12767 (origin
12768 (method url-fetch)
12769 (uri (pypi-uri "astroid" version))
12770 (sha256
12771 (base32
12772 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
12773 (arguments
12774 (substitute-keyword-arguments (package-arguments base)
12775 ((#:phases phases)
12776 `(modify-phases ,phases
12777 (add-after 'unpack 'remove-spurious-test
12778 (lambda _
12779 ;; https://github.com/PyCQA/astroid/issues/276
12780 (delete-file "astroid/tests/unittest_brain.py")
12781 #t))
12782 (replace 'check
12783 (lambda _
12784 (invoke"python" "-m" "unittest" "discover"
12785 "-p" "unittest*.py")))))))
12786 (native-inputs `())
12787 (propagated-inputs
12788 `(("python2-backports-functools-lru-cache"
12789 ,python2-backports-functools-lru-cache)
12790 ("python2-enum34" ,python2-enum34)
12791 ("python2-singledispatch" ,python2-singledispatch)
12792 ,@(alist-delete "python-typed-ast"
12793 (package-propagated-inputs base)))))))
12794
12795 (define-public python-isort
12796 (package
12797 (name "python-isort")
12798 (version "4.3.4")
12799 (source
12800 (origin
12801 (method git-fetch)
12802 (uri (git-reference
12803 ;; Tests pass only from the Github sources
12804 (url "https://github.com/timothycrosley/isort")
12805 (commit version)))
12806 (file-name (git-file-name name version))
12807 (sha256
12808 (base32
12809 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
12810 (build-system python-build-system)
12811 (native-inputs
12812 `(("python-mock" ,python-mock)
12813 ("python-pytest" ,python-pytest)))
12814 (home-page "https://github.com/timothycrosley/isort")
12815 (synopsis "Python utility/library to sort python imports")
12816 (description "@code{python-isort} is a python utility/library to sort
12817 imports alphabetically, and automatically separated into sections. It
12818 provides a command line utility, a python library and plugins for various
12819 editors.")
12820 (license license:expat)
12821 (properties `((python2-variant . ,(delay python2-isort))))))
12822
12823 (define-public python2-isort
12824 (let ((base (package-with-python2
12825 (strip-python2-variant python-isort))))
12826 (package (inherit base)
12827 (native-inputs
12828 `(("python2-futures" ,python2-futures)
12829 ,@(package-native-inputs base))))))
12830
12831 (define-public python2-backports-functools-lru-cache
12832 (package
12833 (name "python2-backports-functools-lru-cache")
12834 (version "1.5")
12835 (source
12836 (origin
12837 (method url-fetch)
12838 ;; only the pypi tarballs contain the necessary metadata
12839 (uri (pypi-uri "backports.functools_lru_cache" version))
12840 (sha256
12841 (base32
12842 "06jgv8gib4fhky0p5cmxdghvsgjyzcdgk48k8pxb1ccf11znk64x"))))
12843 (build-system python-build-system)
12844 (native-inputs
12845 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
12846 (arguments
12847 `(#:python ,python-2))
12848 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
12849 (synopsis "Backport of functools.lru_cache from Python 3.3")
12850 (description "@code{python2-backports-functools-lru-cache} is a backport
12851 of @code{functools.lru_cache} from python 3.3.")
12852 (license license:expat)))
12853
12854 (define-public python-configparser
12855 (package
12856 (name "python-configparser")
12857 (version "3.7.1")
12858 (source
12859 (origin
12860 (method url-fetch)
12861 (uri (pypi-uri "configparser" version))
12862 (sha256
12863 (base32
12864 "0cnz213il9lhgda6x70fw7mfqr8da43s3wm343lwzhqx94mgmmav"))))
12865 (build-system python-build-system)
12866 (home-page "https://github.com/jaraco/configparser/")
12867 (synopsis "Backport of configparser from python 3.5")
12868 (description "@code{python-configparser} is a backport of
12869 @code{configparser} from Python 3.5 so that it can be used directly
12870 in other versions.")
12871 (license license:expat)))
12872
12873 (define-public python2-configparser
12874 (package-with-python2 python-configparser))
12875
12876 (define-public python-mando
12877 (package
12878 (name "python-mando")
12879 (version "0.6.4")
12880 (source (origin
12881 (method url-fetch)
12882 (uri (pypi-uri "mando" version))
12883 (sha256
12884 (base32
12885 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
12886 (build-system python-build-system)
12887 (propagated-inputs
12888 `(("python-rst2ansi" ,python-rst2ansi)
12889 ("python-six" ,python-six)))
12890 (native-inputs
12891 `(("python-pytest" ,python-pytest)))
12892 (home-page "https://mando.readthedocs.org/")
12893 (synopsis
12894 "Wrapper around argparse, allowing creation of complete CLI applications")
12895 (description
12896 "This package is a wrapper around argparse, allowing you to write complete CLI
12897 applications in seconds while maintaining all the flexibility.")
12898 (license license:expat)))
12899
12900 (define-public python2-mando
12901 (package-with-python2 python-mando))
12902
12903 (define-public python2-argparse
12904 (package
12905 (name "python2-argparse")
12906 (version "1.4.0")
12907 (source
12908 (origin
12909 (method url-fetch)
12910 (uri (pypi-uri "argparse" version))
12911 (sha256
12912 (base32
12913 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
12914 (build-system python-build-system)
12915 (arguments
12916 `(#:python ,python-2))
12917 (home-page "https://github.com/ThomasWaldmann/argparse/")
12918 (synopsis "Python command-line parsing library")
12919 (description
12920 "This package is mostly for people who want to have @code{argparse} on
12921 older Pythons because it was not part of the standard library back then.")
12922 (license license:psfl)))
12923
12924 (define-public python-fudge
12925 (package
12926 (name "python-fudge")
12927 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
12928 ;; package, which is currently the only use of this package.
12929 (version "0.9.6")
12930 (source
12931 (origin
12932 (method url-fetch)
12933 (uri (pypi-uri "fudge" version))
12934 (sha256
12935 (base32
12936 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
12937 (build-system python-build-system)
12938 (arguments
12939 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
12940 (home-page "https://github.com/fudge-py/fudge")
12941 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
12942 (description
12943 "Fudge is a Python module for using fake objects (mocks and stubs) to
12944 test real ones.
12945
12946 In readable Python code, you declare the methods available on your fake object
12947 and how they should be called. Then you inject that into your application and
12948 start testing. This declarative approach means you don’t have to record and
12949 playback actions and you don’t have to inspect your fakes after running code.
12950 If the fake object was used incorrectly then you’ll see an informative
12951 exception message with a traceback that points to the culprit.")
12952 (license license:expat)))
12953
12954 (define-public python2-fudge
12955 (package-with-python2 python-fudge))
12956
12957 (define-public python-mwclient
12958 (package
12959 (name "python-mwclient")
12960 (version "0.10.0")
12961 (source
12962 (origin
12963 (method git-fetch)
12964 ;; The PyPI version wouldn't contain tests.
12965 (uri (git-reference
12966 (url "https://github.com/mwclient/mwclient")
12967 (commit (string-append "v" version))))
12968 (file-name (git-file-name name version))
12969 (sha256
12970 (base32
12971 "1c3q6lwmb05yqywc4ya98ca7hsl15niili8rccl4n1yqp77c103v"))))
12972 (build-system python-build-system)
12973 (propagated-inputs
12974 `(("python-requests-oauthlib" ,python-requests-oauthlib)
12975 ("python-six" ,python-six)))
12976 (native-inputs
12977 `(("python-mock" ,python-mock)
12978 ("python-pytest" ,python-pytest)
12979 ("python-pytest-cov" ,python-pytest-cov)
12980 ("python-pytest-runner" ,python-pytest-runner)
12981 ("python-responses" ,python-responses)))
12982 (home-page "https://github.com/btongminh/mwclient")
12983 (synopsis "MediaWiki API client")
12984 (description "This package provides a MediaWiki API client.")
12985 (license license:expat)))
12986
12987 (define-public python2-mwclient
12988 (package-with-python2 python-mwclient))
12989
12990 (define-public python-utils
12991 (package
12992 (name "python-utils")
12993 (version "2.1.0")
12994 (source (origin
12995 (method url-fetch)
12996 (uri (pypi-uri "python-utils" version))
12997 (sha256
12998 (base32
12999 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
13000 (build-system python-build-system)
13001 (native-inputs
13002 `(("pytest-runner" ,python-pytest-runner)
13003 ("pytest" ,python-pytest)
13004 ("six" ,python-six)))
13005 (home-page "https://github.com/WoLpH/python-utils")
13006 (synopsis "Convenient utilities not included with the standard Python install")
13007 (description
13008 "Python Utils is a collection of small Python functions and classes which
13009 make common patterns shorter and easier.")
13010 (license license:bsd-2)))
13011
13012 (define-public python2-utils
13013 (package-with-python2 python-utils))
13014
13015 (define-public python-diff-match-patch
13016 (package
13017 (name "python-diff-match-patch")
13018 (version "20121119")
13019 (source
13020 (origin
13021 (method url-fetch)
13022 (uri (pypi-uri "diff-match-patch" version))
13023 (sha256
13024 (base32
13025 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
13026 (build-system python-build-system)
13027 (home-page "https://code.google.com/p/google-diff-match-patch")
13028 (synopsis "Synchronize plain text")
13029 (description "Diff Match and Patch libraries offer robust algorithms to
13030 perform the operations required for synchronizing plain text.")
13031 (license license:asl2.0)))
13032
13033 (define-public python2-diff-match-patch
13034 (package-with-python2 python-diff-match-patch))
13035
13036 (define-public python-dirsync
13037 (package
13038 (name "python-dirsync")
13039 (version "2.2.3")
13040 (source
13041 (origin
13042 (method url-fetch)
13043 (uri (pypi-uri "dirsync" version))
13044 (sha256
13045 (base32
13046 "1r40fkanksagcszf1ag85mdr8w7rgc7196n6s1qlsk2abw6i7v0z"))))
13047 (build-system python-build-system)
13048 (propagated-inputs
13049 `(("six" ,python-six)))
13050 (home-page "https://bitbucket.org/tkhyn/dirsync")
13051 (synopsis "Advanced directory tree synchronisation tool")
13052 (description "Advanced directory tree synchronisation tool.")
13053 (license license:expat)))
13054
13055 (define-public python2-dirsync
13056 (package-with-python2 python-dirsync))
13057
13058 (define-public python-levenshtein
13059 (package
13060 (name "python-levenshtein")
13061 (version "0.12.0")
13062 (source
13063 (origin
13064 (method url-fetch)
13065 (uri (pypi-uri "python-Levenshtein" version))
13066 (sha256
13067 (base32
13068 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
13069 (build-system python-build-system)
13070 (home-page "https://github.com/ztane/python-Levenshtein")
13071 (synopsis "Fast computation of Levenshtein distance and string similarity")
13072 (description
13073 "The Levenshtein Python C extension module contains functions for fast computation of
13074 @enumerate
13075 @item Levenshtein (edit) distance, and edit operations
13076 @item string similarity
13077 @item approximate median strings, and generally string averaging
13078 @item string sequence and set similarity
13079 @end enumerate
13080 It supports both normal and Unicode strings.")
13081 (license license:gpl2+)))
13082
13083 (define-public python2-levenshtein
13084 (package-with-python2 python-levenshtein))
13085
13086 (define-public python-scandir
13087 (package
13088 (name "python-scandir")
13089 (version "1.9.0")
13090 (source
13091 (origin
13092 (method url-fetch)
13093 (uri (pypi-uri "scandir" version))
13094 (sha256
13095 (base32 "0r3hvf1a9jm1rkqgx40gxkmccknkaiqjavs8lccgq9s8khh5x5s4"))))
13096 (build-system python-build-system)
13097 (arguments
13098 `(#:phases (modify-phases %standard-phases
13099 (replace 'check
13100 (lambda _
13101 (invoke "python" "test/run_tests.py"))))))
13102 (home-page "https://github.com/benhoyt/scandir")
13103 (synopsis "Directory iteration function")
13104 (description
13105 "Directory iteration function like os.listdir(), except that instead of
13106 returning a list of bare filenames, it yields DirEntry objects that include
13107 file type and stat information along with the name. Using scandir() increases
13108 the speed of os.walk() by 2-20 times (depending on the platform and file
13109 system) by avoiding unnecessary calls to os.stat() in most cases.
13110
13111 This package is part of the Python standard library since version 3.5.")
13112 (license license:bsd-3)))
13113
13114 (define-public python2-scandir
13115 (package-with-python2 python-scandir))
13116
13117 (define-public python2-stemming
13118 (package
13119 (name "python2-stemming")
13120 (version "1.0.1")
13121 (source
13122 (origin
13123 (method url-fetch)
13124 (uri (pypi-uri "stemming" version))
13125 (sha256
13126 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
13127 (build-system python-build-system)
13128 (arguments
13129 `(#:python ,python-2))
13130 (home-page "https://bitbucket.org/mchaput/stemming/overview")
13131 (synopsis "Python implementations of various stemming algorithms")
13132 (description
13133 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
13134 stemming algorithms for English. These implementations are straightforward and
13135 efficient, unlike some Python versions of the same algorithms available on the
13136 Web. This package is an extraction of the stemming code included in the Whoosh
13137 search engine.")
13138 (license license:public-domain)))
13139
13140 (define-public python-factory-boy
13141 (package
13142 (name "python-factory-boy")
13143 (version "2.8.1")
13144 (source
13145 (origin
13146 (method url-fetch)
13147 (uri (pypi-uri "factory_boy" version))
13148 (sha256
13149 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
13150 (build-system python-build-system)
13151 (arguments
13152 ;; Tests are not included in the tarball.
13153 `(#:tests? #f))
13154 (propagated-inputs
13155 `(("faker" ,python-faker)))
13156 (home-page "https://github.com/benhoyt/scandir")
13157 (synopsis "Versatile test fixtures replacement")
13158 (description
13159 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
13160
13161 As a fixtures replacement tool, it aims to replace static, hard to maintain
13162 fixtures with easy-to-use factories for complex object.
13163
13164 Instead of building an exhaustive test setup with every possible combination
13165 of corner cases, factory_boy allows you to use objects customized for the
13166 current test, while only declaring the test-specific fields")
13167 (license license:expat)))
13168
13169 (define-public python2-factory-boy
13170 (package-with-python2 python-factory-boy))
13171
13172 (define-public python-translate-toolkit
13173 (package
13174 (name "python-translate-toolkit")
13175 (version "2.1.0")
13176 (source
13177 (origin
13178 (method url-fetch)
13179 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
13180 (sha256
13181 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
13182 (build-system python-build-system)
13183 (native-inputs
13184 `(("python-pytest" ,python-pytest)
13185 ("python-sphinx" ,python-sphinx)))
13186 (propagated-inputs
13187 `(("python-babel" ,python-babel)
13188 ("python-beautifulsoup4" ,python-beautifulsoup4)
13189 ("python-chardet" ,python-chardet)
13190 ("python-diff-match-patch" ,python-diff-match-patch)
13191 ("python-levenshtein" ,python-levenshtein)
13192 ("python-lxml" ,python-lxml)
13193 ("python-six" ,python-six)
13194 ("python-vobject" ,python-vobject)
13195 ("python-pyyaml" ,python-pyyaml)))
13196 (arguments
13197 ;; TODO: tests are not run, because they end with
13198 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
13199 ;; 'parse_funcs'
13200 ;; during test setup.
13201 `(#:tests? #f))
13202 (home-page "https://toolkit.translatehouse.org")
13203 (synopsis "Tools and API for translation and localization engineering")
13204 (description
13205 "Tools and API for translation and localization engineering. It contains
13206 several utilities, as well as an API for building localization tools.")
13207 (license license:gpl2+)))
13208
13209 (define-public python2-translate-toolkit
13210 (package-with-python2 python-translate-toolkit))
13211
13212 (define-public python-packaging
13213 (package
13214 (name "python-packaging")
13215 (version "20.0")
13216 (source
13217 (origin
13218 (method url-fetch)
13219 (uri (pypi-uri "packaging" version))
13220 ;; XXX: The URL in the patch file is wrong, it should be
13221 ;; <https://github.com/pypa/packaging/pull/256>.
13222 (patches (search-patches "python-packaging-test-arch.patch"))
13223 (sha256
13224 (base32
13225 "1y2ip3a4ykkpgnwgn85j6hkspcl0cg3mzms97f40mk57vwqq67gy"))))
13226 (build-system python-build-system)
13227 (arguments
13228 `(#:phases (modify-phases %standard-phases
13229 (replace 'check
13230 (lambda _ (invoke "py.test" "-vv"))))))
13231 (native-inputs
13232 `(("python-pretend" ,python-pretend)
13233 ("python-pytest" ,python-pytest)))
13234 (propagated-inputs
13235 `(("python-pyparsing" ,python-pyparsing)
13236 ("python-six" ,python-six)))
13237 (home-page "https://github.com/pypa/packaging")
13238 (synopsis "Core utilities for Python packages")
13239 (description "Packaging is a Python module for dealing with Python packages.
13240 It offers an interface for working with package versions, names, and dependency
13241 information.")
13242 ;; From 'LICENSE': This software is made available under the terms of
13243 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
13244 ;; Contributions to this software is made under the terms of *both* these
13245 ;; licenses.
13246 (license (list license:asl2.0 license:bsd-2))))
13247
13248 (define-public python2-packaging
13249 (package-with-python2 python-packaging))
13250
13251 (define-public python-relatorio
13252 (package
13253 (name "python-relatorio")
13254 (version "0.8.0")
13255 (source
13256 (origin
13257 (method url-fetch)
13258 (uri (pypi-uri "relatorio" version))
13259 (sha256
13260 (base32
13261 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
13262 (build-system python-build-system)
13263 (propagated-inputs
13264 `(("python-lxml" ,python-lxml)
13265 ("python-genshi" ,python-genshi)))
13266 (native-inputs
13267 `(("python-magic" ,python-magic)))
13268 (home-page "https://relatorio.tryton.org/")
13269 (synopsis "Templating library able to output ODT and PDF files")
13270 (description "Relatorio is a templating library which provides a way to
13271 easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
13272 for more filetypes can be easily added by creating plugins for them.")
13273 (license license:gpl3+)))
13274
13275 (define-public python2-relatorio
13276 (package-with-python2 python-relatorio))
13277
13278 (define-public python-radon
13279 (package
13280 (name "python-radon")
13281 (version "4.1.0")
13282 (source
13283 (origin
13284 (method url-fetch)
13285 (uri (pypi-uri "radon" version))
13286 (sha256
13287 (base32
13288 "0vfxxzbnz5lxfvp0yxp35g6c8qqnnbhi4dm7shkm1d3d4192q22n"))))
13289 (build-system python-build-system)
13290 (arguments
13291 `(#:phases (modify-phases %standard-phases
13292 (replace 'check
13293 (lambda _
13294 (invoke "python" "radon/tests/run.py"))))))
13295 (propagated-inputs
13296 `(("python-colorama" ,python-colorama)
13297 ("python-flake8-polyfill" ,python-flake8-polyfill)
13298 ("python-mando" ,python-mando)))
13299 (native-inputs
13300 `(("python-pytest" ,python-pytest)
13301 ("python-pytest-mock" ,python-pytest-mock)))
13302 (home-page "https://radon.readthedocs.org/")
13303 (synopsis "Code Metrics in Python")
13304 (description "Radon is a Python tool which computes various code metrics.
13305 Supported metrics are:
13306 @itemize @bullet
13307 @item raw metrics: SLOC, comment lines, blank lines, &c.
13308 @item Cyclomatic Complexity (i.e. McCabe’s Complexity)
13309 @item Halstead metrics (all of them)
13310 @item the Maintainability Index (a Visual Studio metric)
13311 @end itemize")
13312 (license license:expat)))
13313
13314 (define-public python2-radon
13315 (package-with-python2 python-radon))
13316
13317 (define-public python-sure
13318 (package
13319 (name "python-sure")
13320 (version "1.4.11")
13321 (source
13322 (origin
13323 (method url-fetch)
13324 (uri (pypi-uri "sure" version))
13325 (sha256
13326 (base32
13327 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
13328 (build-system python-build-system)
13329 (propagated-inputs
13330 `(("python-mock" ,python-mock)
13331 ("python-six" ,python-six)))
13332 (native-inputs
13333 `(("python-nose" ,python-nose)))
13334 (home-page "https://github.com/gabrielfalcao/sure")
13335 (synopsis "Automated testing library in python for python")
13336 (description
13337 "Sure is a python library that leverages a DSL for writing assertions.
13338 Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
13339 (license license:gpl3+)))
13340
13341 (define-public python2-sure
13342 (package-with-python2 python-sure))
13343
13344 (define-public python2-couleur
13345 ;; This package does not seem to support python3 at all, hence,
13346 ;; only the python2 variant definition is provided.
13347 (package
13348 (name "python2-couleur")
13349 (version "0.6.2")
13350 (source
13351 (origin
13352 (method url-fetch)
13353 (uri (pypi-uri "couleur" version))
13354 (sha256
13355 (base32
13356 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
13357 (build-system python-build-system)
13358 (arguments
13359 `(#:python ,python-2))
13360 (home-page "https://github.com/gabrielfalcao/couleur")
13361 (synopsis
13362 "ANSI terminal tool for python, colored shell and other handy fancy features")
13363 (description
13364 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
13365 terminal such as coloured output in the shell, overwriting output, indentation, etc.")
13366 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
13367 ;; https://github.com/gabrielfalcao/couleur/issues/11
13368 (license license:lgpl3+)))
13369
13370 (define-public python-misaka
13371 (package
13372 (name "python-misaka")
13373 (version "2.1.1")
13374 (source
13375 (origin
13376 (method url-fetch)
13377 (uri (pypi-uri "misaka" version))
13378 (sha256
13379 (base32
13380 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
13381 (build-system python-build-system)
13382 (arguments
13383 `(;; Line 37 of setup.py calls self.run_command('develop')
13384 ;; in the 'check' phase. This command seems to be trying
13385 ;; to write to
13386 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
13387 ;; for which it does not have the permission to write.
13388 #:tests? #f))
13389 (propagated-inputs
13390 `(("python-cffi" ,python-cffi)))
13391 (home-page "https://github.com/FSX/misaka")
13392 (synopsis "Python binding for Hoedown")
13393 (description
13394 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
13395 library written in C. It features a fast HTML renderer and functionality to make custom
13396 renderers (e.g. man pages or LaTeX).")
13397 (license license:expat)))
13398
13399 (define-public python2-misaka
13400 (package-with-python2 python-misaka))
13401
13402 (define-public python2-steadymark
13403 ;; This is forced into being a python2 only variant
13404 ;; due to its dependence on couleur that has no support
13405 ;; for python3
13406 (package
13407 (name "python2-steadymark")
13408 (version "0.7.3")
13409 (source
13410 (origin
13411 (method url-fetch)
13412 (uri (pypi-uri "steadymark" version))
13413 (sha256
13414 (base32
13415 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
13416 (build-system python-build-system)
13417 (native-inputs
13418 `(("python-couleur" ,python2-couleur)
13419 ("python-sure" ,python2-sure)
13420 ("python-misaka" ,python2-misaka)))
13421 (arguments
13422 `(#:python ,python-2
13423 #:phases
13424 (modify-phases %standard-phases
13425 (add-before 'build 'patch-setup-py
13426 (lambda _
13427 ;; Update requirements from dependency==version
13428 ;; to dependency>=version
13429 (substitute* "setup.py"
13430 (("==") ">="))
13431 #t)))))
13432 (home-page "https://github.com/gabrielfalcao/steadymark")
13433 (synopsis "Markdown-based test runner for python")
13434 (description
13435 "@code{Steadymark} allows documentation to be written in github-flavoured
13436 markdown. The documentation may contain snippets of code surrounded by python
13437 code blocks and @code{Steadymark} will find these snippets and run them, making
13438 sure that there are no old malfunctional examples in the documentation examples.")
13439 (license license:expat)))
13440
13441 (define-public python-jsonpointer
13442 (package
13443 (name "python-jsonpointer")
13444 (version "1.10")
13445 (source
13446 (origin
13447 (method url-fetch)
13448 (uri (pypi-uri "jsonpointer" version))
13449 (sha256
13450 (base32
13451 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
13452 (build-system python-build-system)
13453 (home-page "https://github.com/stefankoegl/python-json-pointer")
13454 (synopsis "Identify specific nodes in a JSON document")
13455 (description "@code{jsonpointer} allows you to access specific nodes
13456 by path in a JSON document (see RFC 6901).")
13457 (license license:bsd-3)))
13458
13459 (define-public python2-jsonpointer
13460 (package-with-python2 python-jsonpointer))
13461
13462 (define-public python-jsonpatch
13463 (package
13464 (name "python-jsonpatch")
13465 (version "1.16")
13466 (source
13467 (origin
13468 (method git-fetch)
13469 ;; pypi version lacks tests.js
13470 (uri (git-reference
13471 (url "https://github.com/stefankoegl/python-json-patch")
13472 (commit (string-append "v" version))))
13473 (file-name (git-file-name name version))
13474 (sha256
13475 (base32
13476 "0k9pff06lxama3nhsc7cdxbp83422bdy8ifs52i6xkas8hpyzfzr"))))
13477 (build-system python-build-system)
13478 (native-inputs
13479 `(("python-jsonpointer" ,python-jsonpointer)))
13480 (home-page "https://github.com/stefankoegl/python-json-patch")
13481 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
13482 (description "@code{jsonpatch} is a library and program that allows
13483 applying JSON Patches according to RFC 6902.")
13484 (license license:bsd-3)))
13485
13486 (define-public python2-jsonpatch
13487 (package-with-python2 python-jsonpatch))
13488
13489 (define-public python-jsonpatch-0.4
13490 (package (inherit python-jsonpatch)
13491 (name "python-jsonpatch")
13492 (version "0.4")
13493 (source
13494 (origin
13495 (method git-fetch)
13496 (uri (git-reference
13497 (url "https://github.com/stefankoegl/python-json-patch")
13498 (commit (string-append "v" version))))
13499 (file-name (git-file-name name version))
13500 (sha256
13501 (base32
13502 "1fq02y57kinyknxjcav0slcb0k9mwdffqw2hnlhdkpj7palh2mwk"))))))
13503
13504 (define-public python2-jsonpatch-0.4
13505 (package-with-python2 python-jsonpatch-0.4))
13506
13507 (define-public python-rfc3986
13508 (package
13509 (name "python-rfc3986")
13510 (version "1.1.0")
13511 (source (origin
13512 (method url-fetch)
13513 (uri (pypi-uri "rfc3986" version))
13514 (sha256
13515 (base32
13516 "06wlmysw83f75ff84zr1yr6n0shvc2xn1n1sb4iwzqap9hf5fn44"))))
13517 (build-system python-build-system)
13518 (arguments
13519 `(#:modules ((guix build utils)
13520 (guix build python-build-system)
13521 (ice-9 ftw)
13522 (srfi srfi-1)
13523 (srfi srfi-26))
13524 #:phases
13525 (modify-phases %standard-phases
13526 (replace 'check
13527 (lambda _
13528 (let ((cwd (getcwd)))
13529 (setenv "PYTHONPATH"
13530 (string-append cwd "/build/"
13531 (find (cut string-prefix? "lib" <>)
13532 (scandir (string-append cwd "/build")))
13533 ":"
13534 (getenv "PYTHONPATH")))
13535 (invoke "pytest" "-v")))))))
13536 (native-inputs
13537 `(("python-pytest" ,python-pytest)))
13538 (home-page "https://rfc3986.readthedocs.io/")
13539 (synopsis "Parse and validate URI references")
13540 (description
13541 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
13542 validation and authority parsing. This module also supports RFC@tie{}6874
13543 which adds support for zone identifiers to IPv6 addresses.")
13544 (license license:asl2.0)))
13545
13546 (define-public python2-rfc3986
13547 (package-with-python2 python-rfc3986))
13548
13549 (define-public python-rfc3987
13550 (package
13551 (name "python-rfc3987")
13552 (version "1.3.7")
13553 (source
13554 (origin
13555 (method url-fetch)
13556 (uri (pypi-uri "rfc3987" version))
13557 (sha256
13558 (base32
13559 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
13560 (build-system python-build-system)
13561 (home-page "https://pypi.org/project/rfc3987/")
13562 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
13563 (description "@code{rfc3987} provides routines for parsing and
13564 validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
13565 (license license:gpl3+)))
13566
13567 (define-public python2-rfc3987
13568 (package-with-python2 python-rfc3987))
13569
13570 (define-public python-validate-email
13571 (package
13572 (name "python-validate-email")
13573 (version "1.3")
13574 (source
13575 (origin
13576 (method url-fetch)
13577 (uri (pypi-uri "validate_email" version))
13578 (sha256
13579 (base32
13580 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
13581 (build-system python-build-system)
13582 (home-page "https://github.com/syrusakbary/validate_email")
13583 (synopsis "Verifies if an email address is valid and really exists")
13584 (description "@code{validate_email} can be used to verify if an email
13585 address is valid and really exists.")
13586 (license license:lgpl3+)))
13587
13588 (define-public python2-validate-email
13589 (package-with-python2 python-validate-email))
13590
13591 (define-public python-flex
13592 (package
13593 (name "python-flex")
13594 (version "6.10.0")
13595 (source
13596 (origin
13597 (method url-fetch)
13598 (uri (pypi-uri "flex" version))
13599 (sha256
13600 (base32
13601 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
13602 (build-system python-build-system)
13603 (propagated-inputs
13604 `(("python-click" ,python-click)
13605 ("python-iso8601" ,python-iso8601)
13606 ("python-jsonpointer" ,python-jsonpointer)
13607 ("python-pyyaml" ,python-pyyaml)
13608 ("python-requests" ,python-requests)
13609 ("python-rfc3987" ,python-rfc3987)
13610 ("python-six" ,python-six)
13611 ("python-validate-email" ,python-validate-email)))
13612 (home-page "https://github.com/pipermerriam/flex")
13613 (synopsis "Validates Swagger schemata")
13614 (description "@code{flex} can be used to validate Swagger schemata.")
13615 (license license:bsd-3)))
13616
13617 (define-public python2-flex
13618 (package-with-python2 python-flex))
13619
13620 (define-public python-marshmallow
13621 (package
13622 (name "python-marshmallow")
13623 (version "3.0.0b14")
13624 (source
13625 (origin
13626 (method url-fetch)
13627 (uri (pypi-uri "marshmallow" version))
13628 (sha256
13629 (base32
13630 "1digk3f5cfk7wmlka65mc7bzsd96pbsgcsvp6pimd5b4ff9zb5p3"))))
13631 (build-system python-build-system)
13632 (propagated-inputs
13633 `(("python-dateutil" ,python-dateutil)
13634 ("python-simplejson" ,python-simplejson)))
13635 (native-inputs
13636 `(("python-pytest" ,python-pytest)
13637 ("python-pytz" ,python-pytz)))
13638 (home-page "https://github.com/marshmallow-code/marshmallow")
13639 (synopsis "Convert complex datatypes to and from native
13640 Python datatypes.")
13641 (description "@code{marshmallow} provides a library for converting
13642 complex datatypes to and from native Python datatypes.")
13643 (license license:expat)))
13644
13645 (define-public python2-marshmallow
13646 (package-with-python2 python-marshmallow))
13647
13648 (define-public python-apispec
13649 (package
13650 (name "python-apispec")
13651 (version "0.25.3")
13652 (source
13653 (origin
13654 (method url-fetch)
13655 (uri (pypi-uri "apispec" version))
13656 (sha256
13657 (base32
13658 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
13659 (build-system python-build-system)
13660 (propagated-inputs
13661 `(("python-pyyaml" ,python-pyyaml)))
13662 (native-inputs
13663 `(("python-pytest" ,python-pytest)
13664 ("python-flask" ,python-flask)
13665 ("python-marshmallow" ,python-marshmallow)
13666 ("python-tornado" ,python-tornado)
13667 ("python-bottle" ,python-bottle)
13668 ("python-mock" ,python-mock)))
13669 (home-page "https://github.com/marshmallow-code/apispec")
13670 (synopsis "Swagger 2.0 API specification generator")
13671 (description "@code{python-apispec} is a pluggable API specification
13672 generator. Currently supports the OpenAPI specification (f.k.a.
13673 Swagger 2.0).")
13674 (license license:expat)))
13675
13676 (define-public python2-apispec
13677 (package-with-python2 python-apispec))
13678
13679 (define-public python-flasgger
13680 (package
13681 (name "python-flasgger")
13682 (version "0.6.3")
13683 (source
13684 (origin
13685 (method git-fetch)
13686 (uri (git-reference
13687 (url "https://github.com/rochacbruno/flasgger.git")
13688 (commit version)))
13689 (file-name (git-file-name name version))
13690 (sha256
13691 (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn"))))
13692 (build-system python-build-system)
13693 (arguments
13694 `(#:phases
13695 (modify-phases %standard-phases
13696 (replace 'check
13697 (lambda* (#:key inputs outputs #:allow-other-keys)
13698 (substitute* "Makefile"
13699 (("flake8 flasgger --ignore=F403")
13700 "flake8 flasgger --ignore=E731,F403"))
13701 (setenv "PYTHONPATH" (string-append (getcwd)
13702 ":"
13703 (getenv "PYTHONPATH")))
13704 (invoke "py.test"))))))
13705 (propagated-inputs
13706 `(("python-flask" ,python-flask)
13707 ("python-pyyaml" ,python-pyyaml)
13708 ("python-jsonschema" ,python-jsonschema)
13709 ("python-mistune" ,python-mistune)
13710 ("python-six" ,python-six)))
13711 (native-inputs
13712 `(("python-decorator" ,python-decorator)
13713 ("python-flake8" ,python-flake8)
13714 ("python-flask-restful" ,python-flask-restful)
13715 ("python-flex" ,python-flex)
13716 ("python-pytest" ,python-pytest)
13717 ("python-pytest-cov" ,python-pytest-cov)
13718 ("python-marshmallow" ,python-marshmallow)
13719 ("python-apispec" ,python-apispec)))
13720 (home-page "https://github.com/rochacbruno/flasgger/")
13721 (synopsis "Extract Swagger specs from your Flask project")
13722 (description "@code{python-flasgger} allows extracting Swagger specs
13723 from your Flask project. It is a fork of Flask-Swagger.")
13724 (license license:expat)))
13725
13726 (define-public python2-flasgger
13727 (package-with-python2 python-flasgger))
13728
13729 (define-public python-swagger-spec-validator
13730 (package
13731 (name "python-swagger-spec-validator")
13732 (version "2.4.3")
13733 (source
13734 (origin
13735 (method url-fetch)
13736 (uri (pypi-uri "swagger-spec-validator" version))
13737 (sha256
13738 (base32
13739 "11g627icrsqwazsncwi0sdvprcj6hwaayw5xk3xsj8d97bmrzqjp"))))
13740 (build-system python-build-system)
13741 (propagated-inputs
13742 `(("python-jsonschema" ,python-jsonschema)
13743 ("python-pyyaml" ,python-pyyaml)
13744 ("python-six" ,python-six)))
13745 (home-page
13746 "https://github.com/Yelp/swagger_spec_validator")
13747 (synopsis "Validation of Swagger specifications")
13748 (description "@code{swagger_spec_validator} provides a library for
13749 validating Swagger API specifications.")
13750 (license license:asl2.0)))
13751
13752 (define-public python2-swagger-spec-validator
13753 (package-with-python2 python-swagger-spec-validator))
13754
13755 (define-public python-apache-libcloud
13756 (package
13757 (name "python-apache-libcloud")
13758 (version "2.4.0")
13759 (source
13760 (origin
13761 (method url-fetch)
13762 (uri (pypi-uri "apache-libcloud" version))
13763 (sha256
13764 (base32
13765 "0daj3mkzw79v5zin2r1s2wkrz1hplfc16bwj4ss68i5qjq4l2p0j"))))
13766 (build-system python-build-system)
13767 (arguments
13768 `(#:phases
13769 (modify-phases %standard-phases
13770 (add-after 'unpack 'patch-ssh
13771 (lambda* (#:key inputs #:allow-other-keys)
13772 (substitute* "libcloud/compute/ssh.py"
13773 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
13774 "/bin/ssh" "'")))
13775 #t))
13776 (add-after 'unpack 'patch-tests
13777 (lambda _
13778 (substitute* "./libcloud/test/test_file_fixtures.py"
13779 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
13780 (("def _ascii") "def _raw_data(self, method, url, body, headers):
13781 return (httplib.OK,
13782 \"1234abcd\",
13783 {\"test\": \"value\"},
13784 httplib.responses[httplib.OK])
13785 def _ascii"))
13786 (substitute* "libcloud/test/compute/test_ssh_client.py"
13787 (("class ShellOutSSHClientTests")
13788 "@unittest.skip(\"Guix container doesn't have ssh service\")
13789 class ShellOutSSHClientTests")
13790 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
13791 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
13792 (("'.xF0', '.x90', '.x8D', '.x88'")
13793 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
13794 #t))
13795 (add-before 'check 'copy-secret
13796 (lambda _
13797 (copy-file "libcloud/test/secrets.py-dist"
13798 "libcloud/test/secrets.py")
13799 #t)))))
13800 (inputs
13801 `(("openssh" ,openssh)))
13802 (propagated-inputs
13803 `(("python-paramiko" ,python-paramiko)
13804 ("python-requests" ,python-requests)))
13805 (native-inputs
13806 `(("python-lockfile" ,python-lockfile)
13807 ("python-mock" ,python-mock)
13808 ("python-pytest" ,python-pytest)
13809 ("python-pytest-runner" ,python-pytest-runner)
13810 ("python-requests-mock" ,python-requests-mock)))
13811 (home-page "https://libcloud.apache.org/")
13812 (synopsis "Unified Cloud API")
13813 (description "@code{libcloud} is a Python library for interacting with
13814 many of the popular cloud service providers using a unified API.")
13815 (license license:asl2.0)))
13816
13817 (define-public python2-apache-libcloud
13818 (package-with-python2 python-apache-libcloud))
13819
13820 (define-public python-smmap
13821 (package
13822 (name "python-smmap")
13823 (version "3.0.1")
13824 (source
13825 (origin
13826 (method url-fetch)
13827 (uri (pypi-uri "smmap" version))
13828 (sha256
13829 (base32 "0ijlnv60y8f41py1wnn5n1a1i81cxd9dfpdhr0k3cgkrcbz8850p"))))
13830 (build-system python-build-system)
13831 (native-inputs
13832 `(("python-nosexcover" ,python-nosexcover)))
13833 (home-page "https://github.com/Byron/smmap")
13834 (synopsis "Python sliding window memory map manager")
13835 (description "@code{smmap} is a pure Python implementation of a sliding
13836 window memory map manager.")
13837 (license license:bsd-3)))
13838
13839 (define-public python-smmap2
13840 (deprecated-package "python-smmap2" python-smmap))
13841
13842 (define-public python2-smmap
13843 (package-with-python2 python-smmap))
13844
13845 (define-public python2-smmap2
13846 (deprecated-package "python2-smmap2" python2-smmap))
13847
13848 (define-public python-regex
13849 (package
13850 (name "python-regex")
13851 (version "2019.04.14")
13852 (source (origin
13853 (method url-fetch)
13854 (uri (pypi-uri "regex" version))
13855 (sha256
13856 (base32
13857 "1a6hhfs6l6snr1z654ay6wzbmwdkmv282fzfkd5hk2d1n73y8v6m"))))
13858 ;; TODO: Fix and enable regex_test.py tests that complain about the
13859 ;; test.support module not existing.
13860 (build-system python-build-system)
13861 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
13862 (synopsis "Alternative regular expression module")
13863 (description "This regular expression implementation is backwards-
13864 compatible with the standard @code{re} module, but offers additional
13865 functionality like full case-folding for case-insensitive matches in Unicode.")
13866 (license license:psfl)))
13867
13868 (define-public python2-regex
13869 (package-with-python2 python-regex))
13870
13871 (define-public python2-pyopengl
13872 (package
13873 (name "python2-pyopengl")
13874 (version "3.1.0")
13875 (source
13876 (origin
13877 (method url-fetch)
13878 (uri (pypi-uri "PyOpenGL" version))
13879 (sha256
13880 (base32
13881 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
13882 (arguments
13883 `(#:python ,python-2))
13884 (build-system python-build-system)
13885 (home-page "http://pyopengl.sourceforge.net")
13886 (synopsis "Standard OpenGL bindings for Python")
13887 (description
13888 "PyOpenGL is the most common cross platform Python binding to OpenGL and
13889 related APIs. The binding is created using the standard @code{ctypes}
13890 library.")
13891 (license license:bsd-3)))
13892
13893 (define-public python2-pyopengl-accelerate
13894 (package
13895 (inherit python2-pyopengl)
13896 (name "python2-pyopengl-accelerate")
13897 (version "3.1.0")
13898 (source
13899 (origin
13900 (method url-fetch)
13901 (uri (pypi-uri "PyOpenGL-accelerate" version))
13902 (sha256
13903 (base32
13904 "0464c1ifzk0k92lyndikmvzjgnx1y25r7bkkc8pnxm4kp1q4czwj"))))
13905 (synopsis "Acceleration code for PyOpenGL")
13906 (description
13907 "This is the Cython-coded accelerator module for PyOpenGL.")))
13908
13909 (define-public python-rencode
13910 (package
13911 (name "python-rencode")
13912 (version "1.0.5")
13913 (source
13914 (origin
13915 (method url-fetch)
13916 (uri (pypi-uri "rencode" version))
13917 (sha256
13918 (base32
13919 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
13920 (build-system python-build-system)
13921 (arguments
13922 `(#:phases
13923 (modify-phases %standard-phases
13924 (add-before 'check 'delete-bogus-test
13925 ;; This test requires /home/aresch/Downloads, which is not provided by
13926 ;; the build environment.
13927 (lambda _
13928 (delete-file "rencode/t.py")
13929 #t)))))
13930 (native-inputs `(("pkg-config" ,pkg-config)
13931 ("python-cython" ,python-cython)))
13932 (home-page "https://github.com/aresch/rencode")
13933 (synopsis "Serialization of heterogeneous data structures")
13934 (description
13935 "The @code{rencode} module is a data structure serialization library,
13936 similar to @code{bencode} from the BitTorrent project. For complex,
13937 heterogeneous data structures with many small elements, r-encoding stake up
13938 significantly less space than b-encodings. This version of rencode is a
13939 complete rewrite in Cython to attempt to increase the performance over the
13940 pure Python module.")
13941 (license license:bsd-3)))
13942
13943 (define-public python2-rencode
13944 (package-with-python2 python-rencode))
13945
13946 (define-public python-xenon
13947 (package
13948 (name "python-xenon")
13949 (version "0.7.0")
13950 (source
13951 (origin
13952 (method url-fetch)
13953 (uri (pypi-uri "xenon" version))
13954 (sha256
13955 (base32
13956 "0nv207ql2wmh9q62503np056c4vf1c1hlsi5cvv5p5kx574k6r2y"))))
13957 (build-system python-build-system)
13958 (native-inputs
13959 `(("python-pyyaml" ,python-pyyaml)
13960 ("python-radon" ,python-radon)
13961 ("python-requests" ,python-requests)
13962 ("python-flake8" ,python-flake8)
13963 ("python-tox" ,python-tox)))
13964 (arguments
13965 `(#:tests? #f ;test suite not shipped with the PyPI archive
13966 #:phases
13967 (modify-phases %standard-phases
13968 (add-before 'build 'patch-test-requirements
13969 (lambda _
13970 ;; Remove httpretty dependency for tests.
13971 (substitute* "setup.py"
13972 (("httpretty") ""))
13973 #t)))))
13974 (home-page "https://xenon.readthedocs.org/")
13975 (synopsis "Monitor code metrics for Python on your CI server")
13976 (description
13977 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
13978 Ideally, @code{xenon} is run every time code is committed. Through command
13979 line options, various thresholds can be set for the complexity of code. It
13980 will fail (i.e. it will exit with a non-zero exit code) when any of these
13981 requirements is not met.")
13982 (license license:expat)))
13983
13984 (define-public python2-xenon
13985 (package-with-python2 python-xenon))
13986
13987 (define-public python-pysocks
13988 (package
13989 (name "python-pysocks")
13990 (version "1.7.0")
13991 (source
13992 (origin
13993 (method url-fetch)
13994 (uri (pypi-uri "PySocks" version))
13995 (sha256
13996 (base32
13997 "0z4p31bpqm893cf87qqgb30k7nwd8kqfjwwjm5cvxb6zbyj1w0yr"))))
13998 (build-system python-build-system)
13999 (arguments `(#:tests? #f))
14000 (home-page "https://github.com/Anorov/PySocks")
14001 (synopsis "SOCKS client module")
14002 (description "@code{pysocks} is an updated and semi-actively maintained
14003 version of @code{SocksiPy} with bug fixes and extra features.")
14004 (license license:bsd-3)))
14005
14006 (define-public python2-pysocks
14007 (package-with-python2 python-pysocks))
14008
14009 (define-public python-pydiff
14010 (package
14011 (name "python-pydiff")
14012 (version "0.2")
14013 (source
14014 (origin
14015 (method url-fetch)
14016 (uri (pypi-uri "pydiff" version))
14017 (sha256
14018 (base32
14019 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
14020 (build-system python-build-system)
14021 (home-page "https://github.com/myint/pydiff")
14022 (synopsis "Library to diff two Python files at the bytecode level")
14023 (description
14024 "@code{pydiff} makes it easy to look for actual code changes while
14025 ignoring formatting changes.")
14026 (license license:expat)))
14027
14028 (define-public python2-pydiff
14029 (package-with-python2 python-pydiff))
14030
14031 (define-public python-tqdm
14032 (package
14033 (name "python-tqdm")
14034 (version "4.19.6")
14035 (source
14036 (origin
14037 (method url-fetch)
14038 (uri (pypi-uri "tqdm" version))
14039 (sha256
14040 (base32
14041 "1pw0ngm0zn9papdmkwipi3yih5c3di6d0w849bdmrraq4d2d9h2y"))))
14042 (build-system python-build-system)
14043 (native-inputs
14044 `(("python-flake8" ,python-flake8)
14045 ("python-nose" ,python-nose)
14046 ("python-coverage" ,python-coverage)))
14047 (home-page "https://github.com/tqdm/tqdm")
14048 (synopsis "Fast, extensible progress meter")
14049 (description
14050 "Make loops show a progress bar on the console by just wrapping any
14051 iterable with @code{|tqdm(iterable)|}. Offers many options to define
14052 design and layout.")
14053 (license (list license:mpl2.0 license:expat))
14054 (properties `((python2-variant . ,(delay python2-tqdm))))))
14055
14056 (define-public python2-tqdm
14057 (let ((tqdm (package-with-python2
14058 (strip-python2-variant python-tqdm))))
14059 (package (inherit tqdm)
14060 (native-inputs `(("python2-functools32" ,python2-functools32)
14061 ,@(package-native-inputs tqdm))))))
14062
14063 (define-public python-pkginfo
14064 (package
14065 (name "python-pkginfo")
14066 (version "1.4.2")
14067 (source
14068 (origin
14069 (method url-fetch)
14070 (uri (pypi-uri "pkginfo" version))
14071 (sha256
14072 (base32
14073 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
14074 (build-system python-build-system)
14075 (arguments
14076 ;; The tests are broken upstream.
14077 '(#:tests? #f))
14078 (home-page
14079 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
14080 (synopsis
14081 "Query metadatdata from sdists, bdists, and installed packages")
14082 (description
14083 "API to query the distutils metadata written in @file{PKG-INFO} inside a
14084 source distriubtion (an sdist) or a binary distribution (e.g., created by
14085 running bdist_egg). It can also query the EGG-INFO directory of an installed
14086 distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
14087 created by running @code{python setup.py develop}).")
14088 (license license:expat)))
14089
14090 (define-public python2-pkginfo
14091 (package-with-python2 python-pkginfo))
14092
14093 (define-public python-twine
14094 (package
14095 (name "python-twine")
14096 (version "1.9.1")
14097 (source
14098 (origin
14099 (method url-fetch)
14100 (uri (pypi-uri "twine" version))
14101 (sha256
14102 (base32
14103 "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a"))))
14104 (build-system python-build-system)
14105 (propagated-inputs
14106 `(("python-tqdm" ,python-tqdm)
14107 ("python-pkginfo" ,python-pkginfo)
14108 ("python-requests" ,python-requests)
14109 ("python-requests-toolbelt" ,python-requests-toolbelt)))
14110 (home-page "https://github.com/pypa/twine")
14111 (synopsis "Collection of utilities for interacting with PyPI")
14112 (description
14113 "@code{twine} currently supports registering projects and uploading
14114 distributions. It authenticates the user over HTTPS, allows them to pre-sign
14115 their files and supports any packaging format (including wheels).")
14116 (license license:asl2.0)))
14117
14118 (define-public python2-twine
14119 (package-with-python2 python-twine))
14120
14121 (define-public python-linecache2
14122 (package
14123 (name "python-linecache2")
14124 (version "1.0.0")
14125 (source
14126 (origin
14127 (method url-fetch)
14128 (uri (pypi-uri "linecache2" version))
14129 (sha256
14130 (base32
14131 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
14132 (build-system python-build-system)
14133 (arguments
14134 `(;; The tests depend on unittest2, and our version is a bit too old.
14135 #:tests? #f))
14136 (native-inputs
14137 `(("python-pbr" ,python-pbr-minimal)))
14138 (home-page
14139 "https://github.com/testing-cabal/linecache2")
14140 (synopsis "Backports of the linecache module")
14141 (description
14142 "The linecache module allows one to get any line from any file, while
14143 attempting to optimize internally, using a cache, the common case where many
14144 lines are read from a single file.")
14145 (license license:psfl)))
14146
14147 (define-public python2-linecache2
14148 (package-with-python2 python-linecache2))
14149
14150 (define-public python-traceback2
14151 (package
14152 (name "python-traceback2")
14153 (version "1.4.0")
14154 (source
14155 (origin
14156 (method url-fetch)
14157 (uri (pypi-uri "traceback2" version))
14158 (sha256
14159 (base32
14160 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
14161 (build-system python-build-system)
14162 (arguments
14163 `(;; python-traceback2 and python-unittest2 depend on one another.
14164 #:tests? #f))
14165 (native-inputs
14166 `(("python-pbr" ,python-pbr-minimal)))
14167 (propagated-inputs
14168 `(("python-linecache2" ,python-linecache2)))
14169 (home-page
14170 "https://github.com/testing-cabal/traceback2")
14171 (synopsis "Backports of the traceback module")
14172 (description
14173 "This module provides a standard interface to extract, format and print
14174 stack traces of Python programs. It exactly mimics the behavior of the Python
14175 interpreter when it prints a stack trace.")
14176 (license license:psfl)))
14177
14178 (define-public python2-traceback2
14179 (package-with-python2 python-traceback2))
14180
14181 (define-public python-ratelimiter
14182 (package
14183 (name "python-ratelimiter")
14184 (version "1.2.0")
14185 (source
14186 (origin
14187 (method url-fetch)
14188 (uri (pypi-uri "ratelimiter" version))
14189 (sha256
14190 (base32
14191 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
14192 (build-system python-build-system)
14193 (arguments
14194 '(#:tests? #f)) ; There are no tests in the pypi archive.
14195 (home-page "https://github.com/RazerM/ratelimiter")
14196 (synopsis "Simple rate limiting object")
14197 (description
14198 "The @code{ratelimiter} module ensures that an operation will not be
14199 executed more than a given number of times during a given period.")
14200 (license license:asl2.0)))
14201
14202 (define-public python2-ratelimiter
14203 (package-with-python2 python-ratelimiter))
14204
14205 (define-public python-dukpy
14206 (package
14207 (name "python-dukpy")
14208 (version "0.3")
14209 (source
14210 (origin
14211 (method git-fetch)
14212 (uri (git-reference
14213 (url "https://github.com/kovidgoyal/dukpy.git")
14214 (commit (string-append "v" version))))
14215 (file-name (git-file-name name version))
14216 (sha256
14217 (base32 "13h21nqzasv4zj32xs61brmc106pr2cx243672crcmwxxnjgaxls"))))
14218 (build-system python-build-system)
14219 (home-page "https://github.com/kovidgoyal/dukpy")
14220 (synopsis "Run JavaScript in python")
14221 (description
14222 "dukpy is a JavaScript runtime environment for Python using the duktape
14223 embeddable JavaScript engine.")
14224 ;; Dukpy is licensed under MIT like the embedded duktape library,
14225 ;; with 'errors.c' as GPL3.
14226 (license (list license:expat license:gpl3))))
14227
14228 (define-public python2-dukpy
14229 (package-with-python2 python-dukpy))
14230
14231 (define-public python-jsonrpclib-pelix
14232 (package
14233 (name "python-jsonrpclib-pelix")
14234 (version "0.3.2")
14235 (source
14236 (origin
14237 (method url-fetch)
14238 (uri (pypi-uri "jsonrpclib-pelix" version))
14239 (sha256
14240 (base32
14241 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
14242 (build-system python-build-system)
14243 (arguments
14244 `(#:tests? #f)) ; no tests in PyPI tarball
14245 (home-page "https://github.com/tcalmant/jsonrpclib/")
14246 (synopsis "JSON-RPC 2.0 client library for Python")
14247 (description
14248 "This library implements the JSON-RPC v2.0
14249 specification (backwards-compatible) as a client library for Python. This
14250 version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
14251 services.")
14252 (license license:asl2.0)))
14253
14254 (define-public python2-jsonrpclib-pelix
14255 (package-with-python2 python-jsonrpclib-pelix))
14256
14257 (define-public python-setuptools-scm-git-archive
14258 (package
14259 (name "python-setuptools-scm-git-archive")
14260 (version "1.0")
14261 (source
14262 (origin
14263 (method url-fetch)
14264 (uri (pypi-uri "setuptools_scm_git_archive" version))
14265 (sha256
14266 (base32
14267 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
14268 (build-system python-build-system)
14269 (native-inputs
14270 `(("python-pytest" ,python-pytest)))
14271 (propagated-inputs
14272 `(("python-setuptools-scm" ,python-setuptools-scm)))
14273 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
14274 (synopsis "Setuptools_scm plugin for git archives")
14275 (description
14276 "The setuptools_scm_git_archive package is a plugin to
14277 setuptools_scm, which supports obtaining versions from git archives that
14278 belong to tagged versions.")
14279 (license license:expat)))
14280
14281 (define-public python2-setuptools-scm-git-archive
14282 (package-with-python2 python-setuptools-scm-git-archive))
14283
14284 (define-public python-setuptools-git
14285 (package
14286 (name "python-setuptools-git")
14287 (version "1.2")
14288 (source
14289 (origin
14290 (method url-fetch)
14291 (uri (pypi-uri "setuptools-git" version))
14292 (sha256
14293 (base32
14294 "0i84qjwp5m0l9qagdjww2frdh63r37km1c48mrvbmaqsl1ni6r7z"))))
14295 (build-system python-build-system)
14296 (arguments
14297 `(#:phases
14298 (modify-phases %standard-phases
14299 ;; This is needed for tests.
14300 (add-after 'unpack 'configure-git
14301 (lambda _
14302 (setenv "HOME" "/tmp")
14303 (invoke "git" "config" "--global" "user.email" "guix")
14304 (invoke "git" "config" "--global" "user.name" "guix")
14305 #t)))))
14306 (native-inputs
14307 `(("git" ,git-minimal)))
14308 (home-page "https://github.com/msabramo/setuptools-git")
14309 (synopsis "Setuptools revision control system plugin for Git")
14310 (description
14311 "This package provides a plugin for Setuptools for revision control with
14312 Git.")
14313 (license license:bsd-3)))
14314
14315 (define-public python-pyclipper
14316 (package
14317 (name "python-pyclipper")
14318 (version "1.1.0.post3")
14319 (source
14320 (origin
14321 (method url-fetch)
14322 (uri (pypi-uri "pyclipper" version ".zip"))
14323 (sha256
14324 (base32 "164yksvqwqvwzh8f8lq92asg87hd8rvcy2xb5vm4y4ccvd5xgb7i"))
14325 (modules '((guix build utils)))
14326 (snippet
14327 '(begin
14328 ;; This file is generated by Cython.
14329 (delete-file "pyclipper/pyclipper.cpp") #t))))
14330 (build-system python-build-system)
14331 (arguments
14332 `(#:phases
14333 (modify-phases %standard-phases
14334 (add-before 'build 'cythonize-sources
14335 (lambda _
14336 (with-directory-excursion "pyclipper"
14337 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
14338 (propagated-inputs
14339 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
14340 (native-inputs
14341 `(("python-cython" ,python-cython)
14342 ("python-pytest" ,python-pytest)
14343 ("python-pytest-runner" ,python-pytest-runner)
14344 ("python-unittest2" ,python-unittest2)
14345 ("unzip" ,unzip)))
14346 (home-page "https://github.com/greginvm/pyclipper")
14347 (synopsis "Wrapper for Angus Johnson's Clipper library")
14348 (description
14349 "Pyclipper is a Cython wrapper for the C++ translation of the
14350 Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
14351 (license license:expat)))
14352
14353 (define-public python2-pyclipper
14354 (package-with-python2 python-pyclipper))
14355
14356 (define-public python2-booleanoperations
14357 (package
14358 (name "python2-booleanoperations")
14359 (version "0.7.1")
14360 (source
14361 (origin
14362 (method url-fetch)
14363 (uri (pypi-uri "booleanOperations" version ".zip"))
14364 (sha256
14365 (base32
14366 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
14367 (build-system python-build-system)
14368 (arguments
14369 `(#:python ,python-2))
14370 (native-inputs
14371 `(("unzip" ,unzip)
14372 ("python2-pytest" ,python2-pytest)
14373 ("python2-pytest-runner" ,python2-pytest-runner)))
14374 (propagated-inputs
14375 `(("python-fonttools" ,python2-fonttools)
14376 ("python-pyclipper" ,python2-pyclipper)
14377 ("python-ufolib" ,python2-ufolib)))
14378 (home-page "https://github.com/typemytype/booleanOperations")
14379 (synopsis "Boolean operations on paths")
14380 (description
14381 "BooleanOperations provides a Python library that enables
14382 boolean operations on paths.")
14383 (license license:expat)))
14384
14385 (define-public python-tempdir
14386 (package
14387 (name "python-tempdir")
14388 (version "0.7.1")
14389 (source
14390 (origin
14391 (method url-fetch)
14392 (uri (pypi-uri "tempdir" version))
14393 (sha256
14394 (base32
14395 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
14396 (build-system python-build-system)
14397 (home-page "https://pypi.org/project/tempdir/")
14398 (arguments
14399 ;; the package has no tests
14400 '(#:tests? #f))
14401 (synopsis "Python library for managing temporary directories")
14402 (description
14403 "This library manages temporary directories that are automatically
14404 deleted with all their contents when they are no longer needed. It is
14405 particularly convenient for use in tests.")
14406 (license license:expat)))
14407
14408 (define-public python2-tempdir
14409 (package-with-python2 python-tempdir))
14410
14411 (define-public python-activepapers
14412 (package
14413 (name "python-activepapers")
14414 (version "0.2.2")
14415 (source
14416 (origin
14417 (method url-fetch)
14418 (uri (pypi-uri "ActivePapers.Py" version))
14419 (sha256
14420 (base32
14421 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
14422 (build-system python-build-system)
14423 (arguments
14424 `(#:modules ((ice-9 ftw)
14425 (srfi srfi-1)
14426 (guix build utils)
14427 (guix build python-build-system))
14428
14429 #:phases
14430 (modify-phases %standard-phases
14431 (add-after 'unpack 'delete-python2-code
14432 (lambda _
14433 (for-each delete-file
14434 '("lib/activepapers/builtins2.py"
14435 "lib/activepapers/standardlib2.py"
14436 "lib/activepapers/utility2.py"))))
14437 (replace 'check
14438 (lambda _
14439 ;; Deactivate the test cases that download files
14440 (setenv "NO_NETWORK_ACCESS" "1")
14441 ;; For some strange reason, some tests fail if nosetests runs all
14442 ;; test modules in a single execution. They pass if each test
14443 ;; module is run individually.
14444 (for-each (lambda (filename)
14445 (invoke "nosetests"
14446 (string-append "tests/" filename)))
14447 (scandir "tests"
14448 (lambda (filename)
14449 (string-suffix? ".py" filename)))))))))
14450 (native-inputs
14451 `(("python-tempdir" ,python-tempdir)
14452 ("python-nose" ,python-nose)))
14453 (propagated-inputs
14454 `(("python-h5py" ,python-h5py)))
14455 (home-page "https://www.activepapers.org/")
14456 (synopsis "Executable papers for scientific computing")
14457 (description
14458 "ActivePapers is a tool for working with executable papers, which
14459 combine data, code, and documentation in single-file packages,
14460 suitable for publication as supplementary material or on repositories
14461 such as figshare or Zenodo.")
14462 (properties `((python2-variant . ,(delay python2-activepapers))))
14463 (license license:bsd-3)))
14464
14465 (define-public python2-activepapers
14466 (let ((base (package-with-python2
14467 (strip-python2-variant python-activepapers))))
14468 (package
14469 (inherit base)
14470 (arguments
14471 (substitute-keyword-arguments (package-arguments base)
14472 ((#:phases phases)
14473 `(modify-phases ,phases
14474 (delete 'delete-python2-code)
14475 (add-after 'unpack 'delete-python3-code
14476 (lambda _
14477 (for-each delete-file
14478 '("lib/activepapers/builtins3.py"
14479 "lib/activepapers/standardlib3.py"
14480 "lib/activepapers/utility3.py")))))))))))
14481
14482 (define-public python-semver
14483 (package
14484 (name "python-semver")
14485 (version "2.9.0")
14486 (source
14487 (origin
14488 (method url-fetch)
14489 (uri (pypi-uri "semver" version))
14490 (sha256
14491 (base32
14492 "183kg1rhzz3hqizvphkd8hlbf1zxfx8737zhfkmqzxi71jmdw7pd"))))
14493 (build-system python-build-system)
14494 (native-inputs
14495 `(("python-tox" ,python-tox)
14496 ("python-virtualenv" ,python-virtualenv)))
14497 (home-page "https://github.com/k-bx/python-semver")
14498 (synopsis "Python helper for Semantic Versioning")
14499 (description "This package provides a Python library for
14500 @url{Semantic Versioning, http://semver.org/}.")
14501 (license license:bsd-3)))
14502
14503 (define-public python2-semver
14504 (package-with-python2 python-semver))
14505
14506 (define-public python-pyro4
14507 (package
14508 (name "python-pyro4")
14509 (version "4.77")
14510 (source
14511 (origin
14512 (method url-fetch)
14513 (uri (pypi-uri "Pyro4" version))
14514 (sha256
14515 (base32 "0gsjg869y4gpy265s1gj1f2qy6jn5iz8r2bwwnq78r1r5yi15zib"))))
14516 (build-system python-build-system)
14517 (arguments
14518 '(#:tests? #f)) ;FIXME: Some tests require network access.
14519 (native-inputs
14520 `(("python-cloudpickle" ,python-cloudpickle)
14521 ("python-dill" ,python-dill)
14522 ("python-msgpack" ,python-msgpack)))
14523 (propagated-inputs
14524 `(("python-serpent" ,python-serpent)))
14525 (home-page "https://pyro4.readthedocs.io")
14526 (synopsis "Distributed object middleware for Python")
14527 (description
14528 "Pyro enables you to build applications in which objects can talk to each
14529 other over the network. You can just use normal Python method calls to call
14530 objects on other machines, also known as remote procedure calls (RPC).")
14531 (license license:expat)))
14532
14533 (define-public python2-pyro
14534 (package
14535 (name "python2-pyro")
14536 (version "3.16")
14537 (source
14538 (origin
14539 (method url-fetch)
14540 (uri (pypi-uri "Pyro" version))
14541 (file-name (string-append "Pyro-" version ".tar.gz"))
14542 (sha256
14543 (base32
14544 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
14545 (build-system python-build-system)
14546 (arguments
14547 ;; Pyro is not compatible with Python 3
14548 `(#:python ,python-2
14549 ;; Pyro has no test cases for automatic execution
14550 #:tests? #f))
14551 (home-page "http://pythonhosted.org/Pyro/")
14552 (synopsis "Distributed object manager for Python")
14553 (description "Pyro is a Distributed Object Technology system
14554 written in Python that is designed to be easy to use. It resembles
14555 Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
14556 which is a system and language independent Distributed Object Technology
14557 and has much more to offer than Pyro or RMI. Pyro 3.x is no
14558 longer maintained. New projects should use Pyro4 instead, which
14559 is the new Pyro version that is actively developed.")
14560 (license license:expat)))
14561
14562 (define-public python2-scientific
14563 (package
14564 (name "python2-scientific")
14565 (version "2.9.4")
14566 (source
14567 (origin
14568 (method git-fetch)
14569 (uri (git-reference
14570 (url "https://github.com/khinsen/ScientificPython")
14571 (commit (string-append "rel" version))))
14572 (file-name (git-file-name name version))
14573 (sha256
14574 (base32
14575 "16l48aj9fps9r7jyk8gpxppwrv0fqvlc13sayxskz28r5s6sjwbl"))))
14576 (build-system python-build-system)
14577 (inputs
14578 `(("netcdf" ,netcdf)))
14579 (propagated-inputs
14580 `(("python-numpy" ,python2-numpy-1.8)
14581 ("python-pyro" ,python2-pyro)))
14582 (arguments
14583 ;; ScientificPython is not compatible with Python 3
14584 `(#:python ,python-2
14585 #:tests? #f ; No test suite
14586 #:phases
14587 (modify-phases %standard-phases
14588 (replace 'build
14589 (lambda* (#:key inputs #:allow-other-keys)
14590 (invoke "python" "setup.py" "build"
14591 (string-append "--netcdf_prefix="
14592 (assoc-ref inputs "netcdf"))))))))
14593 (home-page "http://dirac.cnrs-orleans.fr/ScientificPython")
14594 (synopsis "Python modules for scientific computing")
14595 (description "ScientificPython is a collection of Python modules that are
14596 useful for scientific computing. Most modules are rather general (Geometry,
14597 physical units, automatic derivatives, ...) whereas others are more
14598 domain-specific (e.g. netCDF and PDB support). The library is currently
14599 not actively maintained and works only with Python 2 and NumPy < 1.9.")
14600 (license license:cecill-c)))
14601
14602 (define-public python2-mmtk
14603 (package
14604 (name "python2-mmtk")
14605 (version "2.7.12")
14606 (source
14607 (origin
14608 (method git-fetch)
14609 (uri (git-reference
14610 (url "https://github.com/khinsen/MMTK")
14611 (commit (string-append "rel" version))))
14612 (file-name (git-file-name name version))
14613 (sha256
14614 (base32
14615 "1fqwh3ba9jd42nigvn5shndgwb1zy7kh9520ncvqci7n8ffjr6p1"))))
14616 (build-system python-build-system)
14617 (native-inputs
14618 `(("netcdf" ,netcdf)))
14619 (propagated-inputs
14620 `(("python-scientific" ,python2-scientific)
14621 ("python-tkinter" ,python-2 "tk")))
14622 (arguments
14623 `(#:python ,python-2
14624 #:tests? #f
14625 #:phases
14626 (modify-phases %standard-phases
14627 (add-before 'build 'includes-from-scientific
14628 (lambda* (#:key inputs #:allow-other-keys)
14629 (mkdir-p "Include/Scientific")
14630 (copy-recursively
14631 (string-append
14632 (assoc-ref inputs "python-scientific")
14633 "/include/python2.7/Scientific")
14634 "Include/Scientific"))))))
14635 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
14636 (synopsis "Python library for molecular simulation")
14637 (description "MMTK is a library for molecular simulations with an emphasis
14638 on biomolecules. It provides widely used methods such as Molecular Dynamics
14639 and normal mode analysis, but also basic routines for implementing new methods
14640 for simulation and analysis. The library is currently not actively maintained
14641 and works only with Python 2 and NumPy < 1.9.")
14642 (license license:cecill-c)))
14643
14644 (define-public python-phonenumbers
14645 (package
14646 (name "python-phonenumbers")
14647 (version "8.9.1")
14648 (source
14649 (origin
14650 (method url-fetch)
14651 (uri (pypi-uri "phonenumbers" version))
14652 (sha256
14653 (base32
14654 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
14655 (build-system python-build-system)
14656 (home-page
14657 "https://github.com/daviddrysdale/python-phonenumbers")
14658 (synopsis
14659 "Python library for dealing with international phone numbers")
14660 (description
14661 "This package provides a Python port of Google's libphonenumber library.")
14662 (license license:asl2.0)))
14663
14664 (define-public python2-phonenumbers
14665 (package-with-python2 python-phonenumbers))
14666
14667 (define-public python-send2trash
14668 (package
14669 (name "python-send2trash")
14670 (version "1.5.0")
14671 (source
14672 (origin (method git-fetch)
14673 ;; Source tarball on PyPI doesn't include tests.
14674 (uri (git-reference
14675 (url "https://github.com/hsoft/send2trash.git")
14676 (commit version)))
14677 (file-name (git-file-name name version))
14678 (sha256
14679 (base32
14680 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
14681 (build-system python-build-system)
14682 (arguments
14683 '(#:phases
14684 (modify-phases %standard-phases
14685 (add-before 'check 'pre-check
14686 (lambda _
14687 (mkdir-p "/tmp/foo")
14688 (setenv "HOME" "/tmp/foo")
14689 #t)))))
14690 (home-page "https://github.com/hsoft/send2trash")
14691 (synopsis "Send files to the user's @file{~/Trash} directory")
14692 (description "This package provides a Python library to send files to the
14693 user's @file{~/Trash} directory.")
14694 (properties `((python2-variant . ,(delay python2-send2trash))))
14695 (license license:bsd-3)))
14696
14697 (define-public python2-send2trash
14698 (package
14699 (inherit (package-with-python2 (strip-python2-variant python-send2trash)))
14700 (arguments
14701 (substitute-keyword-arguments (package-arguments python-send2trash)
14702 ((#:phases phases)
14703 `(modify-phases ,phases
14704 (add-before 'check 'setenv
14705 (lambda _
14706 (setenv "PYTHONPATH"
14707 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
14708 #t))))))))
14709
14710 (define-public python-yapf
14711 (package
14712 (name "python-yapf")
14713 (version "0.29.0")
14714 (source
14715 (origin
14716 (method url-fetch)
14717 (uri (pypi-uri "yapf" version))
14718 (sha256
14719 (base32
14720 "1pj3xzblmbssshi889b6n9hwqbjpabw6j0fimlng2sshd3226bki"))))
14721 (build-system python-build-system)
14722 (home-page "https://github.com/google/yapf")
14723 (synopsis "Formatter for Python code")
14724 (description "YAPF is a formatter for Python code. It's based off of
14725 @dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
14726 takes the code and reformats it to the best formatting that conforms to the
14727 style guide, even if the original code didn't violate the style guide.")
14728 (license license:asl2.0)))
14729
14730 (define-public python2-yapf
14731 (package-with-python2 python-yapf))
14732
14733 (define-public python-gyp
14734 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
14735 (revision "0"))
14736 (package
14737 (name "python-gyp")
14738 ;; Google does not release versions,
14739 ;; based on second most recent commit date.
14740 (version (git-version "0.0.0" revision commit))
14741 (source
14742 (origin
14743 ;; Google does not release tarballs,
14744 ;; git checkout is needed.
14745 (method git-fetch)
14746 (uri (git-reference
14747 (url "https://chromium.googlesource.com/external/gyp")
14748 (commit commit)))
14749 (file-name (git-file-name name version))
14750 (sha256
14751 (base32
14752 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
14753 (build-system python-build-system)
14754 (home-page "https://gyp.gsrc.io/")
14755 (synopsis "GYP is a Meta-Build system")
14756 (description
14757 "GYP builds build systems for large, cross platform applications.
14758 It can be used to generate XCode projects, Visual Studio projects, Ninja build
14759 files, and Makefiles.")
14760 (license license:bsd-3))))
14761
14762 (define-public python2-gyp
14763 (package-with-python2 python-gyp))
14764
14765 (define-public python-whatever
14766 (package
14767 (name "python-whatever")
14768 (version "0.6")
14769 (source
14770 (origin
14771 (method git-fetch)
14772 (uri (git-reference
14773 (url "https://github.com/Suor/whatever")
14774 (commit version)))
14775 (file-name (git-file-name name version))
14776 (sha256
14777 (base32 "1q7ajgqjfivxqsqgnhp4lc4p6jxyh4zprcsdbpd6dw54inaf0av5"))))
14778 (build-system python-build-system)
14779 (arguments
14780 `(#:phases
14781 (modify-phases %standard-phases
14782 (replace 'check
14783 (lambda _
14784 (invoke "py.test"))))))
14785 (native-inputs
14786 `(("python-pytest" ,python-pytest)))
14787 (home-page "http://github.com/Suor/whatever")
14788 (synopsis "Make anonymous functions by partial application of operators")
14789 (description "@code{whatever} provides an easy way to make anonymous
14790 functions by partial application of operators.")
14791 (license license:bsd-3)))
14792
14793 (define-public python2-whatever
14794 (package-with-python2 python-whatever))
14795
14796 (define-public python-funcy
14797 (package
14798 (name "python-funcy")
14799 (version "1.11")
14800 (source
14801 (origin
14802 (method git-fetch)
14803 (uri (git-reference
14804 (url "https://github.com/Suor/funcy.git")
14805 (commit version)))
14806 (sha256
14807 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
14808 (file-name (git-file-name name version))))
14809 (build-system python-build-system)
14810 (arguments
14811 `(#:phases
14812 (modify-phases %standard-phases
14813 (replace 'check
14814 (lambda _
14815 (invoke "py.test"))))))
14816 (native-inputs
14817 `(("python-pytest" ,python-pytest)
14818 ("python-whatever" ,python-whatever)))
14819 (home-page "http://github.com/Suor/funcy")
14820 (synopsis "Functional tools")
14821 (description "@code{funcy} is a library that provides functional tools.
14822 Examples are:
14823 @enumerate
14824 @item merge - Merges collections of the same type
14825 @item walk - Type-preserving map
14826 @item select - Selects a part of a collection
14827 @item take - Takes the first n items of a collection
14828 @item first - Takes the first item of a collection
14829 @item remove - Predicated-removes items of a collection
14830 @item concat - Concatenates two collections
14831 @item flatten - Flattens a collection with subcollections
14832 @item distinct - Returns only distinct items
14833 @item split - Predicated-splits a collection
14834 @item split_at - Splits a collection at a given item
14835 @item group_by - Groups items by group
14836 @item pairwise - Pairs off adjacent items
14837 @item partial - Partially-applies a function
14838 @item curry - Curries a function
14839 @item compose - Composes functions
14840 @item complement - Complements a predicate
14841 @item all_fn - \"all\" with predicate
14842 @end enumerate")
14843 (license license:bsd-3)))
14844
14845 (define-public python2-funcy
14846 (package-with-python2 python-funcy))
14847
14848 (define-public python-isoweek
14849 (package
14850 (name "python-isoweek")
14851 (version "1.3.3")
14852 (source
14853 (origin
14854 (method url-fetch)
14855 (uri (pypi-uri "isoweek" version))
14856 (sha256
14857 (base32
14858 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
14859 (build-system python-build-system)
14860 (home-page "https://github.com/gisle/isoweek")
14861 (synopsis "Objects representing a week")
14862 (description "The @code{isoweek} module provide the class Week that
14863 implements the week definition of ISO 8601. This standard also defines
14864 a notation for identifying weeks; yyyyWww (where the W is a literal).
14865 Week instances stringify to this form.")
14866 (license license:bsd-3)))
14867
14868 (define-public python2-isoweek
14869 (package-with-python2 python-isoweek))
14870
14871 (define-public python-tokenize-rt
14872 (package
14873 (name "python-tokenize-rt")
14874 (version "2.0.1")
14875 (source
14876 (origin
14877 (method url-fetch)
14878 (uri (pypi-uri "tokenize-rt" version))
14879 (sha256
14880 (base32
14881 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
14882 (build-system python-build-system)
14883 (home-page "https://github.com/asottile/tokenize-rt")
14884 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
14885 (description
14886 "This Python library is a wrapper around @code{tokenize} from the Python
14887 standard library. It provides two additional tokens @code{ESCAPED_NL} and
14888 @code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
14889 and @code{tokens_to_src} to roundtrip.")
14890 (license license:expat)))
14891
14892 (define-public python-future-fstrings
14893 (package
14894 (name "python-future-fstrings")
14895 (version "0.4.1")
14896 (source
14897 (origin
14898 (method url-fetch)
14899 (uri (pypi-uri "future_fstrings" version))
14900 (sha256
14901 (base32
14902 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
14903 (build-system python-build-system)
14904 (propagated-inputs
14905 `(("python-tokenize-rt" ,python-tokenize-rt)))
14906 (home-page "https://github.com/asottile/future-fstrings")
14907 (synopsis "Backport of fstrings to Python < 3.6")
14908 (description
14909 "This package provides a UTF-8 compatible encoding
14910 @code{future_fstrings}, which performs source manipulation. It decodes the
14911 source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
14912 @code{f} strings.")
14913 (license license:expat)))
14914
14915 (define-public python-typed-ast
14916 (package
14917 (name "python-typed-ast")
14918 (version "1.4.0")
14919 (source
14920 (origin
14921 (method git-fetch)
14922 (uri (git-reference
14923 (url "https://github.com/python/typed_ast.git")
14924 (commit version)))
14925 (sha256
14926 (base32 "0l0hz809f7i356kmqkvfsaswiidb98j9hs9rrjnfawzqcbffzgyb"))
14927 (file-name (git-file-name name version))))
14928 (build-system python-build-system)
14929 (arguments
14930 `(#:modules ((guix build utils)
14931 (guix build python-build-system)
14932 (ice-9 ftw)
14933 (srfi srfi-1)
14934 (srfi srfi-26))
14935 #:phases
14936 (modify-phases %standard-phases
14937 (replace 'check
14938 (lambda _
14939 (let ((cwd (getcwd)))
14940 (setenv "PYTHONPATH"
14941 (string-append cwd "/build/"
14942 (find (cut string-prefix? "lib" <>)
14943 (scandir (string-append cwd "/build")))
14944 ":"
14945 (getenv "PYTHONPATH"))))
14946 (invoke "pytest")
14947 #t)))))
14948 (native-inputs `(("python-pytest" ,python-pytest)))
14949 (home-page "https://github.com/python/typed_ast")
14950 (synopsis "Fork of Python @code{ast} modules with type comment support")
14951 (description "This package provides a parser similar to the standard
14952 @code{ast} library. Unlike @code{ast}, the parsers in @code{typed_ast}
14953 include PEP 484 type comments and are independent of the version of Python
14954 under which they are run. The @code{typed_ast} parsers produce the standard
14955 Python AST (plus type comments), and are both fast and correct, as they are
14956 based on the CPython 2.7 and 3.7 parsers.")
14957 ;; See the file "LICENSE" for the details.
14958 (license (list license:psfl
14959 license:asl2.0
14960 license:expat)))) ;ast27/Parser/spark.py
14961
14962 (define-public python-typing
14963 (package
14964 (name "python-typing")
14965 (version "3.6.6")
14966 (source
14967 (origin
14968 (method url-fetch)
14969 (uri (pypi-uri "typing" version))
14970 (sha256
14971 (base32
14972 "0ba9acs4awx15bf9v3nrs781msbd2nx826906nj6fqks2bvca9s0"))))
14973 (build-system python-build-system)
14974 (home-page "https://docs.python.org/3/library/typing.html")
14975 (synopsis "Type hints for Python")
14976 (description "This is a backport of the standard library @code{typing}
14977 module to Python versions older than 3.5. Typing defines a standard notation
14978 for Python function and variable type annotations. The notation can be used
14979 for documenting code in a concise, standard format, and it has been designed
14980 to also be used by static and runtime type checkers, static analyzers, IDEs
14981 and other tools.")
14982 (license license:psfl)))
14983
14984 (define-public python2-typing
14985 (package-with-python2 python-typing))
14986
14987 (define-public python-typing-extensions
14988 (package
14989 (name "python-typing-extensions")
14990 (version "3.7.2")
14991 (source
14992 (origin
14993 (method url-fetch)
14994 (uri (pypi-uri "typing_extensions" version))
14995 (sha256
14996 (base32
14997 "0wfsv71pvkyf2na938l579jh0v3kzl6g744ijgnahcwd4d9x0b7v"))))
14998 (build-system python-build-system)
14999 (home-page
15000 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
15001 (synopsis "Experimental type hints for Python")
15002 (description
15003 "The typing_extensions module contains additional @code{typing} hints not
15004 yet present in the of the @code{typing} standard library.
15005 Included are implementations of:
15006 @enumerate
15007 @item ClassVar
15008 @item ContextManager
15009 @item Counter
15010 @item DefaultDict
15011 @item Deque
15012 @item NewType
15013 @item NoReturn
15014 @item overload
15015 @item Protocol
15016 @item runtime
15017 @item Text
15018 @item Type
15019 @item TYPE_CHECKING
15020 @item AsyncGenerator
15021 @end enumerate\n")
15022 (license license:psfl)))
15023
15024 (define-public bpython
15025 (package
15026 (name "bpython")
15027 (version "0.18")
15028 (source
15029 (origin
15030 (method url-fetch)
15031 (uri (pypi-uri "bpython" version))
15032 (sha256
15033 (base32 "1hl6frgvr2lqaxqczl8amg9xih32b3gzv429vs0qrjb8wpdj1k2n"))))
15034 (build-system python-build-system)
15035 (arguments
15036 `(#:phases
15037 (modify-phases %standard-phases
15038 (add-after 'unpack 'remove-failing-test
15039 (lambda _
15040 ;; Remove failing test. FIXME: make it pass
15041 (delete-file "bpython/test/test_args.py")
15042 #t))
15043 (add-after 'wrap 'add-aliases
15044 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
15045 (lambda* (#:key outputs #:allow-other-keys)
15046 (let ((out (assoc-ref outputs "out")))
15047 (for-each
15048 (lambda (old new)
15049 (symlink old (string-append out "/bin/" new)))
15050 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
15051 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
15052 #t)))))
15053 (propagated-inputs
15054 `(("python-pygments" ,python-pygments)
15055 ("python-requests" ,python-requests)
15056 ("python-babel" ,python-babel) ; optional, for internationalization
15057 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
15058 ("python-greenlet" ,python-greenlet)
15059 ("python-urwid" ,python-urwid) ; for bpython-urwid only
15060 ("python-six" ,python-six)))
15061 (native-inputs
15062 `(("python-sphinx" ,python-sphinx)
15063 ("python-mock" ,python-mock)))
15064 (home-page "https://bpython-interpreter.org/")
15065 (synopsis "Fancy interface to the Python interpreter")
15066 (description "Bpython is a fancy interface to the Python
15067 interpreter. bpython's main features are
15068
15069 @enumerate
15070 @item in-line syntax highlighting,
15071 @item readline-like autocomplete with suggestions displayed as you type,
15072 @item expected parameter list for any Python function,
15073 @item \"rewind\" function to pop the last line of code from memory and
15074 re-evaluate,
15075 @item send the code you've entered off to a pastebin,
15076 @item save the code you've entered to a file, and
15077 @item auto-indentation.
15078 @end enumerate")
15079 (license license:expat)))
15080
15081 (define-public bpython2
15082 (let ((base (package-with-python2
15083 (strip-python2-variant bpython))))
15084 (package (inherit base)
15085 (name "bpython2")
15086 (arguments
15087 `(#:python ,python-2
15088 #:phases
15089 (modify-phases %standard-phases
15090 (add-after 'unpack 'remove-failing-test
15091 (lambda _
15092 ;; Remove failing test. FIXME: make it pass
15093 (delete-file "bpython/test/test_args.py")
15094 ;; Disable failing test-cases (renaming inhibits they are
15095 ;; discovered)
15096 (substitute* "bpython/test/test_curtsies_repl.py"
15097 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
15098 (string-append a "xxx_off_" b))
15099 (("^(\\s*def )(test_complex\\W)" _ a b)
15100 (string-append a "xxx_off_" b)))
15101 #t))
15102 (add-before 'build 'rename-scripts
15103 ;; rename the scripts to bypthon2, bpdb2, etc.
15104 (lambda _
15105 (substitute* "setup.py"
15106 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
15107 (string-append name "2" rest "\n"))
15108 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
15109 (string-append name "2" (or sub "") rest "\n")))
15110 #t))))))))
15111
15112 (define-public python-pyinotify
15113 (package
15114 (name "python-pyinotify")
15115 (version "0.9.6")
15116 (source (origin
15117 (method url-fetch)
15118 (uri (pypi-uri "pyinotify" version))
15119 (sha256
15120 (base32
15121 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
15122 (build-system python-build-system)
15123 (arguments `(#:tests? #f)) ;no tests
15124 (home-page "https://github.com/seb-m/pyinotify")
15125 (synopsis "Python library for monitoring inotify events")
15126 (description
15127 "@code{pyinotify} provides a Python interface for monitoring
15128 file system events on Linux.")
15129 (license license:expat)))
15130
15131 (define-public python2-pyinotify
15132 (package-with-python2 python-pyinotify))
15133
15134 ;; Ada parser uses this version.
15135 (define-public python2-quex-0.67.3
15136 (package
15137 (name "python2-quex")
15138 (version "0.67.3")
15139 (source
15140 (origin
15141 (method url-fetch)
15142 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
15143 (version-major+minor version)
15144 "/quex-" version ".zip"))
15145 (sha256
15146 (base32
15147 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
15148 (build-system python-build-system)
15149 (native-inputs
15150 `(("unzip" ,unzip)))
15151 (arguments
15152 `(#:python ,python-2
15153 #:tests? #f
15154 #:phases
15155 (modify-phases %standard-phases
15156 (delete 'configure)
15157 (delete 'build)
15158 (replace 'install
15159 (lambda* (#:key outputs #:allow-other-keys)
15160 (let* ((out (assoc-ref outputs "out"))
15161 (share/quex (string-append out "/share/quex"))
15162 (bin (string-append out "/bin")))
15163 (copy-recursively "." share/quex)
15164 (mkdir-p bin)
15165 (symlink (string-append share/quex "/quex-exe.py")
15166 (string-append bin "/quex"))
15167 #t))))))
15168 (native-search-paths
15169 (list (search-path-specification
15170 (variable "QUEX_PATH")
15171 (files '("share/quex")))))
15172 (home-page "http://quex.sourceforge.net/")
15173 (synopsis "Lexical analyzer generator in Python")
15174 (description "@code{quex} is a lexical analyzer generator in Python.")
15175 (license license:lgpl2.1+))) ; Non-military
15176
15177 (define-public python2-quex
15178 (package (inherit python2-quex-0.67.3)
15179 (name "python2-quex")
15180 (version "0.68.1")
15181 (source
15182 (origin
15183 (method url-fetch)
15184 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
15185 (sha256
15186 (base32
15187 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
15188 (file-name (string-append name "-" version ".tar.gz"))))))
15189
15190 (define-public python-more-itertools
15191 (package
15192 (name "python-more-itertools")
15193 (version "7.1.0")
15194 (source
15195 (origin
15196 (method url-fetch)
15197 (uri (pypi-uri "more-itertools" version))
15198 (sha256
15199 (base32
15200 "16phg2f2dvm6ci5wr49ncha5lmc0m2in3bsl33c61vzca4gkvd4b"))))
15201 (build-system python-build-system)
15202 (home-page "https://github.com/erikrose/more-itertools")
15203 (synopsis "More routines for operating on iterables, beyond itertools")
15204 (description "Python's built-in @code{itertools} module implements a
15205 number of iterator building blocks inspired by constructs from APL, Haskell,
15206 and SML. @code{more-itertools} includes additional building blocks for
15207 working with iterables.")
15208 (properties `((python2-variant . ,(delay python2-more-itertools))))
15209 (license license:expat)))
15210
15211 ;; The 5.x series are the last versions supporting Python 2.7.
15212 (define-public python2-more-itertools
15213 (package
15214 (inherit python-more-itertools)
15215 (name "python2-more-itertools")
15216 (version "5.0.0")
15217 (source (origin
15218 (method url-fetch)
15219 (uri (pypi-uri "more-itertools" version))
15220 (sha256
15221 (base32
15222 "1r12cm6mcdwdzz7d47a6g4l437xsvapdlgyhqay3i2nrlv03da9q"))))
15223 (arguments
15224 `(#:python ,python2-minimal))
15225 (propagated-inputs
15226 `(("python2-six" ,python2-six-bootstrap)))))
15227
15228 (define-public python-latexcodec
15229 (package
15230 (name "python-latexcodec")
15231 (version "1.0.7")
15232 (source
15233 (origin
15234 (method url-fetch)
15235 (uri (pypi-uri "latexcodec" version))
15236 (sha256
15237 (base32 "0wnp3yqcgx0rpy8dz51vh75lbp2qif67da19zi7m3ca98n887hgb"))))
15238 (build-system python-build-system)
15239 (inputs
15240 `(("python-six" ,python-six)))
15241 (home-page "https://readthedocs.org/projects/latexcodec/")
15242 (synopsis "Work with LaTeX code in Python")
15243 (description "Lexer and codec to work with LaTeX code in Python.")
15244 (license license:expat)))
15245
15246 (define-public python-pybtex
15247 (package
15248 (name "python-pybtex")
15249 (version "0.22.2")
15250 (source
15251 (origin
15252 (method url-fetch)
15253 (uri (pypi-uri "pybtex" version))
15254 (sha256
15255 (base32 "070wfcmxrd7xg1si421mi9150gmx2qwx431nwf69sq3hhmgnx080"))))
15256 (build-system python-build-system)
15257 (native-inputs
15258 `(("python-nose" ,python-nose)))
15259 (inputs
15260 `(("python-latexcodec" ,python-latexcodec)
15261 ("python-pyyaml" ,python-pyyaml)
15262 ("python-six" ,python-six)))
15263 (arguments
15264 `(#:test-target "nosetests"))
15265 (home-page "https://pybtex.org/")
15266 (synopsis "BibTeX-compatible bibliography processor")
15267 (description "Pybtex is a BibTeX-compatible bibliography processor written
15268 in Python. You can simply type pybtex instead of bibtex.")
15269 (license license:expat)))
15270
15271 (define-public python-onetimepass
15272 (package
15273 (name "python-onetimepass")
15274 (version "1.0.1")
15275 (source
15276 (origin
15277 (method url-fetch)
15278 (uri (pypi-uri "onetimepass" version))
15279 (sha256
15280 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
15281 (build-system python-build-system)
15282 (propagated-inputs `(("python-six" ,python-six)))
15283 (home-page "https://github.com/tadeck/onetimepass/")
15284 (synopsis "One-time password library")
15285 (description "Python one-time password library for HMAC-based (HOTP) and
15286 time-based (TOTP) passwords.")
15287 (license license:expat)))
15288
15289 (define-public python-parso
15290 (package
15291 (name "python-parso")
15292 (version "0.5.2")
15293 (source
15294 (origin
15295 (method url-fetch)
15296 (uri (pypi-uri "parso" version))
15297 (sha256
15298 (base32
15299 "1qgvrkpma7vylrk047mxxvqd66nwqk978n3ig2w8iz9m3bgjbksm"))))
15300 (native-inputs
15301 `(("python-pytest" ,python-pytest)))
15302 (build-system python-build-system)
15303 (arguments
15304 `(#:phases (modify-phases %standard-phases
15305 (replace 'check
15306 (lambda _ (invoke "pytest" "-vv"))))))
15307 (home-page "https://github.com/davidhalter/parso")
15308 (synopsis "Python Parser")
15309 (description "Parso is a Python parser that supports error recovery and
15310 round-trip parsing for different Python versions (in multiple Python versions).
15311 Parso is also able to list multiple syntax errors in your Python file.")
15312 (license license:expat)))
15313
15314 (define-public python2-parso
15315 (package-with-python2 python-parso))
15316
15317 (define-public python-async-generator
15318 (package
15319 (name "python-async-generator")
15320 (version "1.10")
15321 (source
15322 (origin
15323 (method url-fetch)
15324 (uri (pypi-uri "async_generator" version))
15325 (sha256
15326 (base32
15327 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
15328 (build-system python-build-system)
15329 (native-inputs
15330 `(("python-pytest" ,python-pytest)))
15331 (home-page "https://github.com/python-trio/async_generator")
15332 (synopsis "Async generators and context managers for Python 3.5+")
15333 (description "@code{async_generator} back-ports Python 3.6's native async
15334 generators and Python 3.7's context managers into Python 3.5.")
15335 ;; Dual licensed.
15336 (license (list license:expat license:asl2.0))))
15337
15338 (define-public python-async-timeout
15339 (package
15340 (name "python-async-timeout")
15341 (version "3.0.1")
15342 (source
15343 (origin
15344 (method url-fetch)
15345 (uri (pypi-uri "async-timeout" version))
15346 (sha256
15347 (base32
15348 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
15349 (build-system python-build-system)
15350 (home-page "https://github.com/aio-libs/async_timeout/")
15351 (synopsis "Timeout context manager for asyncio programs")
15352 (description "@code{async-timeout} provides a timeout timeout context
15353 manager compatible with @code{asyncio}.")
15354 (license license:asl2.0)))
15355
15356 (define-public python-glob2
15357 (package
15358 (name "python-glob2")
15359 (version "0.7")
15360 (source
15361 (origin
15362 (method git-fetch)
15363 (uri (git-reference
15364 (url "https://github.com/miracle2k/python-glob2.git")
15365 (commit (string-append "v" version))))
15366 (file-name (git-file-name name version))
15367 (sha256
15368 (base32 "160nh2ay9lw2hi0rixpzb2k87r6ql56k0j2cm87lqz8xc8zbw919"))))
15369 (build-system python-build-system)
15370 (home-page "https://github.com/miracle2k/python-glob2/")
15371 (synopsis "Extended Version of the python buildin glob module")
15372 (description "This is an extended version of the Python
15373 @url{http://docs.python.org/library/glob.html, built-in glob module} which
15374 adds:
15375
15376 @itemize
15377 @item The ability to capture the text matched by glob patterns, and return
15378 those matches alongside the file names.
15379 @item A recursive @code{**} globbing syntax, akin for example to the
15380 @code{globstar} option of Bash.
15381 @item The ability to replace the file system functions used, in order to glob
15382 on virtual file systems.
15383 @item Compatible with Python 2 and Python 3 (tested with 3.3).
15384 @end itemize
15385
15386 Glob2 currently based on the glob code from Python 3.3.1.")
15387 (license license:bsd-2)))
15388
15389 (define-public python2-glob2
15390 (package-with-python2 python-glob2))
15391
15392 (define-public python-gipc
15393 (package
15394 (name "python-gipc")
15395 (version "0.6.0")
15396 (source
15397 (origin
15398 (method url-fetch)
15399 (uri (pypi-uri "gipc" version ".zip"))
15400 (sha256
15401 (base32
15402 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
15403 (build-system python-build-system)
15404 (native-inputs
15405 `(("unzip" ,unzip)))
15406 (propagated-inputs
15407 `(("python-gevent" ,python-gevent)))
15408 (home-page "https://gehrcke.de/gipc/")
15409 (synopsis "Child process management in the context of gevent")
15410 (description "Usage of Python's multiprocessing package in a
15411 gevent-powered application may raise problems. With @code{gipc},
15412 process-based child processes can safely be created anywhere within a
15413 gevent-powered application.")
15414 (license license:expat)))
15415
15416 (define-public python2-gipc
15417 (package-with-python2 python-gipc))
15418
15419 (define-public python-fusepy
15420 (package
15421 (name "python-fusepy")
15422 (version "2.0.4")
15423 (source
15424 (origin
15425 (method url-fetch)
15426 (uri (pypi-uri "fusepy" version))
15427 (sha256
15428 (base32
15429 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
15430 (build-system python-build-system)
15431 (arguments
15432 `(#:phases
15433 (modify-phases %standard-phases
15434 (add-before 'build 'set-library-file-name
15435 (lambda* (#:key inputs #:allow-other-keys)
15436 (let ((fuse (assoc-ref inputs "fuse")))
15437 (substitute* "fuse.py"
15438 (("find_library\\('fuse'\\)")
15439 (string-append "'" fuse "/lib/libfuse.so'")))
15440 #t))))))
15441 (propagated-inputs
15442 `(("fuse" ,fuse)))
15443 (home-page "https://github.com/fusepy/fusepy")
15444 (synopsis "Simple ctypes bindings for FUSE")
15445 (description "Python module that provides a simple interface to FUSE and
15446 MacFUSE. The binding is created using the standard @code{ctypes} library.")
15447 (license license:isc)))
15448
15449 (define-public python2-fusepy
15450 (package-with-python2 python-fusepy))
15451
15452 (define-public python2-gdrivefs
15453 (package
15454 (name "python2-gdrivefs")
15455 (version "0.14.9")
15456 (source
15457 (origin
15458 (method url-fetch)
15459 (uri (pypi-uri "gdrivefs" version))
15460 (sha256
15461 (base32
15462 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
15463 (build-system python-build-system)
15464 (arguments
15465 `(#:python ,python-2
15466 #:phases
15467 (modify-phases %standard-phases
15468 (add-before 'build 'patch-setup-py
15469 (lambda _
15470 ;; Update requirements from dependency==version
15471 ;; to dependency>=version
15472 (substitute* "gdrivefs/resources/requirements.txt"
15473 (("==") ">="))
15474 #t)))))
15475 (native-inputs
15476 `(("python2-gipc" ,python2-gipc)
15477 ("python2-gevent" ,python2-gevent)
15478 ("python2-greenlet" ,python2-greenlet)
15479 ("python2-httplib2" ,python2-httplib2)
15480 ("python2-uritemplate" ,python2-uritemplate)
15481 ("python2-oauth2client" ,python2-oauth2client)
15482 ("python2-six" ,python2-six)))
15483 (propagated-inputs
15484 `(("python2-dateutil" ,python2-dateutil)
15485 ("python2-fusepy" ,python2-fusepy)
15486 ("python2-google-api-client" ,python2-google-api-client)))
15487 (home-page "https://github.com/dsoprea/GDriveFS")
15488 (synopsis "Mount Google Drive as a local file system")
15489 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
15490 under Python 2.7.")
15491 (license license:gpl2)))
15492
15493 (define-public pybind11
15494 (package
15495 (name "pybind11")
15496 (version "2.4.3")
15497 (source (origin
15498 (method git-fetch)
15499 (uri (git-reference
15500 (url "https://github.com/pybind/pybind11.git")
15501 (commit (string-append "v" version))))
15502 (sha256
15503 (base32
15504 "0k89w4bsfbpzw963ykg1cyszi3h3nk393qd31m6y46pcfxkqh4rd"))
15505 (file-name (git-file-name name version))))
15506 (build-system cmake-build-system)
15507 (native-inputs
15508 `(("python" ,python-wrapper)
15509
15510 ;; The following dependencies are used for tests.
15511 ("python-pytest" ,python-pytest)
15512 ("catch" ,catch-framework2-1)
15513 ("eigen" ,eigen)))
15514 (arguments
15515 `(#:configure-flags
15516 (list (string-append "-DCATCH_INCLUDE_DIR="
15517 (assoc-ref %build-inputs "catch")
15518 "/include/catch"))
15519
15520 #:phases (modify-phases %standard-phases
15521 (add-after 'install 'install-python
15522 (lambda* (#:key outputs #:allow-other-keys)
15523 (let ((out (assoc-ref outputs "out")))
15524 (with-directory-excursion "../source"
15525 (setenv "PYBIND11_USE_CMAKE" "yes")
15526 (invoke "python" "setup.py" "install"
15527 "--single-version-externally-managed"
15528 "--root=/"
15529 (string-append "--prefix=" out)))))))
15530
15531 #:test-target "check"))
15532 (home-page "https://github.com/pybind/pybind11/")
15533 (synopsis "Seamless operability between C++11 and Python")
15534 (description
15535 "@code{pybind11} is a lightweight header-only library that exposes C++
15536 types in Python and vice versa, mainly to create Python bindings of existing
15537 C++ code. Its goals and syntax are similar to the @code{Boost.Python}
15538 library: to minimize boilerplate code in traditional extension modules by
15539 inferring type information using compile-time introspection.")
15540 (license license:bsd-3)))
15541
15542 (define-public python-fasteners
15543 (package
15544 (name "python-fasteners")
15545 (version "0.14.1")
15546 (source
15547 (origin
15548 (method url-fetch)
15549 (uri (pypi-uri "fasteners" version))
15550 (sha256
15551 (base32
15552 "063y20kx01ihbz2mziapmjxi2cd0dq48jzg587xdsdp07xvpcz22"))))
15553 (build-system python-build-system)
15554 (propagated-inputs
15555 `(("python-monotonic" ,python-monotonic)
15556 ("python-six" ,python-six)
15557 ("python-testtools" ,python-testtools)))
15558 (home-page "https://github.com/harlowja/fasteners")
15559 (synopsis "Python package that provides useful locks")
15560 (description
15561 "This package provides a Python program that provides following locks:
15562
15563 @itemize
15564 @item Locking decorator
15565 @item Reader-writer locks
15566 @item Inter-process locks
15567 @item Generic helpers
15568 @end itemize\n")
15569 (properties `((python2-variant . ,(delay python2-fasteners))))
15570 (license license:asl2.0)))
15571
15572 (define-public python2-fasteners
15573 (let ((base (package-with-python2 (strip-python2-variant python-fasteners))))
15574 (package
15575 (inherit base)
15576 (propagated-inputs
15577 `(("python2-futures" ,python2-futures)
15578 ,@(package-propagated-inputs base))))))
15579
15580 (define-public python-requests-file
15581 (package
15582 (name "python-requests-file")
15583 (version "1.4.3")
15584 (source
15585 (origin
15586 (method url-fetch)
15587 (uri (pypi-uri "requests-file" version))
15588 (sha256
15589 (base32
15590 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
15591 (build-system python-build-system)
15592 (propagated-inputs
15593 `(("python-requests" ,python-requests)
15594 ("python-six" ,python-six)))
15595 (home-page
15596 "https://github.com/dashea/requests-file")
15597 (synopsis "File transport adapter for Requests")
15598 (description
15599 "Requests-File is a transport adapter for use with the Requests Python
15600 library to allow local file system access via @code{file://} URLs.")
15601 (license license:asl2.0)))
15602
15603 (define-public python2-requests-file
15604 (package-with-python2 python-requests-file))
15605
15606 (define-public python-tldextract
15607 (package
15608 (name "python-tldextract")
15609 (version "2.2.0")
15610 (source
15611 (origin
15612 (method url-fetch)
15613 (uri (pypi-uri "tldextract" version))
15614 (sha256
15615 (base32
15616 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
15617 (build-system python-build-system)
15618 (native-inputs
15619 `(("python-pytest" ,python-pytest)
15620 ("python-responses" ,python-responses)))
15621 (propagated-inputs
15622 `(("python-idna" ,python-idna)
15623 ("python-requests" ,python-requests)
15624 ("python-requests-file" ,python-requests-file)))
15625 (home-page
15626 "https://github.com/john-kurkowski/tldextract")
15627 (synopsis
15628 "Separate the TLD from the registered domain and subdomains of a URL")
15629 (description
15630 "TLDExtract accurately separates the TLD from the registered domain and
15631 subdomains of a URL, using the Public Suffix List. By default, this includes
15632 the public ICANN TLDs and their exceptions. It can optionally support the
15633 Public Suffix List's private domains as well.")
15634 (license license:bsd-3)))
15635
15636 (define-public python2-tldextract
15637 (package-with-python2 python-tldextract))
15638
15639 (define-public python-pynamecheap
15640 (package
15641 (name "python-pynamecheap")
15642 (version "0.0.3")
15643 (source
15644 (origin
15645 (method url-fetch)
15646 (uri (pypi-uri "PyNamecheap" version))
15647 (sha256
15648 (base32
15649 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
15650 (build-system python-build-system)
15651 (propagated-inputs
15652 `(("python-requests" ,python-requests)))
15653 (home-page
15654 "https://github.com/Bemmu/PyNamecheap")
15655 (synopsis
15656 "Namecheap API client in Python")
15657 (description
15658 "PyNamecheap is a Namecheap API client in Python.")
15659 (license license:expat)))
15660
15661 (define-public python2-pynamecheap
15662 (package-with-python2 python-pynamecheap))
15663
15664 (define-public python-dns-lexicon
15665 (package
15666 (name "python-dns-lexicon")
15667 (version "2.4.0")
15668 (source
15669 (origin
15670 (method url-fetch)
15671 (uri (pypi-uri "dns-lexicon" version))
15672 (sha256
15673 (base32
15674 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
15675 (build-system python-build-system)
15676 (arguments
15677 `(#:tests? #f)) ;requires internet access
15678 (propagated-inputs
15679 `(("python-future" ,python-future)
15680 ("python-pynamecheap" ,python-pynamecheap)
15681 ("python-requests" ,python-requests)
15682 ("python-tldextract" ,python-tldextract)
15683 ("python-urllib3" ,python-urllib3)))
15684 (home-page "https://github.com/AnalogJ/lexicon")
15685 (synopsis
15686 "Manipulate DNS records on various DNS providers")
15687 (description
15688 "Lexicon provides a way to manipulate DNS records on multiple DNS
15689 providers in a standardized way. It has a CLI but it can also be used as a
15690 Python library. It was designed to be used in automation, specifically with
15691 Let's Encrypt.")
15692 (license license:expat)))
15693
15694 (define-public python2-dns-lexicon
15695 (package-with-python2 python-dns-lexicon))
15696
15697 (define-public python-commandlines
15698 (package
15699 (name "python-commandlines")
15700 (version "0.4.1")
15701 (source
15702 (origin
15703 (method url-fetch)
15704 (uri (pypi-uri "commandlines" version))
15705 (sha256
15706 (base32
15707 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
15708 (build-system python-build-system)
15709 (home-page "https://github.com/chrissimpkins/commandlines")
15710 (synopsis "Command line argument to object parsing library")
15711 (description
15712 "@code{Commandlines} is a Python library for command line application
15713 development that supports command line argument parsing, command string
15714 validation testing and application logic.")
15715 (license license:expat)))
15716
15717 ;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
15718 ;; python-numba. They have a very unflexible relationship.
15719 (define-public python-numba
15720 (package
15721 (name "python-numba")
15722 (version "0.46.0")
15723 (source
15724 (origin
15725 (method url-fetch)
15726 (uri (pypi-uri "numba" version))
15727 (sha256
15728 (base32
15729 "1vnfzcq6fcnkmdms6114d49awvvj5181fl7z1wlha27qc2paxjy2"))))
15730 (build-system python-build-system)
15731 (arguments
15732 `(#:modules ((guix build utils)
15733 (guix build python-build-system)
15734 (ice-9 ftw)
15735 (srfi srfi-1)
15736 (srfi srfi-26))
15737 #:phases
15738 (modify-phases %standard-phases
15739 (add-after 'unpack 'disable-proprietary-features
15740 (lambda _
15741 (setenv "NUMBA_DISABLE_HSA" "1")
15742 (setenv "NUMBA_DISABLE_CUDA" "1")
15743 #t))
15744 (add-after 'unpack 'remove-failing-tests
15745 (lambda _
15746 ;; FIXME: These tests fail for unknown reasons:
15747 ;; test_non_writable_pycache, test_non_creatable_pycache, and
15748 ;; test_frozen (all in numba.tests.test_dispatcher.TestCache).
15749 (substitute* "numba/tests/test_dispatcher.py"
15750 (("def test(_non_writable_pycache)" _ m)
15751 (string-append "def guix_skip" m))
15752 (("def test(_non_creatable_pycache)" _ m)
15753 (string-append "def guix_skip" m))
15754 (("def test(_frozen)" _ m)
15755 (string-append "def guix_skip" m)))
15756
15757 ;; These tests fail because we don't run the tests from the build
15758 ;; directory: test_setup_py_distutils, test_setup_py_setuptools
15759 ;; They are in numba.tests.test_pycc.TestDistutilsSupport.
15760 (substitute* "numba/tests/test_pycc.py"
15761 (("def test(_setup_py_distutils|_setup_py_setuptools)" _ m)
15762 (string-append "def guix_skip" m)))
15763
15764 ;; These tests fail because our version of Python does not have
15765 ;; a recognizable front-end for the Numba distribution to use
15766 ;; to check against.
15767 (substitute* "numba/tests/test_entrypoints.py"
15768 (("def test(_init_entrypoint)" _ m)
15769 (string-append "def guix_skip" m)))
15770 (substitute* "numba/tests/test_jitclasses.py"
15771 (("def test(_jitclass_longlabel_not_truncated)" _ m)
15772 (string-append "def guix_skip" m)))
15773 #t))
15774 (replace 'check
15775 (lambda _
15776 (let ((cwd (getcwd)))
15777 (setenv "PYTHONPATH"
15778 (string-append cwd "/build/"
15779 (find (cut string-prefix? "lib" <>)
15780 (scandir (string-append cwd "/build")))
15781 ":"
15782 (getenv "PYTHONPATH")))
15783 ;; Something is wrong with the PYTHONPATH when running the
15784 ;; tests from the build directory, as it complains about not being
15785 ;; able to import certain modules.
15786 (with-directory-excursion "/tmp"
15787 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))
15788 #t)))))
15789 (propagated-inputs
15790 `(("python-llvmlite" ,python-llvmlite)
15791 ("python-numpy" ,python-numpy)
15792 ("python-singledispatch" ,python-singledispatch)))
15793 ;; Needed for tests.
15794 (inputs
15795 `(("python-jinja2" ,python-jinja2)
15796 ("python-pygments" ,python-pygments)))
15797 (home-page "https://numba.pydata.org")
15798 (synopsis "Compile Python code using LLVM")
15799 (description "Numba gives you the power to speed up your applications with
15800 high performance functions written directly in Python. With a few
15801 annotations, array-oriented and math-heavy Python code can be just-in-time
15802 compiled to native machine instructions, similar in performance to C, C++ and
15803 Fortran, without having to switch languages or Python interpreters.
15804
15805 Numba works by generating optimized machine code using the LLVM compiler
15806 infrastructure at import time, runtime, or statically (using the included pycc
15807 tool).")
15808 (license license:bsd-3)))
15809
15810 (define-public python-numcodecs
15811 (package
15812 (name "python-numcodecs")
15813 (version "0.6.4")
15814 (source
15815 (origin
15816 (method url-fetch)
15817 (uri (pypi-uri "numcodecs" version))
15818 (sha256
15819 (base32
15820 "0kbfr8pl3x9glsypbq8hzim003f16ml1b1cvgrh4w1sdvgal6j7g"))))
15821 (build-system python-build-system)
15822 (propagated-inputs
15823 `(("python-numpy" ,python-numpy)
15824 ("python-msgpack" ,python-msgpack)))
15825 (native-inputs
15826 `(("python-pytest" ,python-pytest)
15827 ("python-setuptools-scm" ,python-setuptools-scm)))
15828 (home-page "https://github.com/zarr-developers/numcodecs")
15829 (synopsis "Buffer compression and transformation codecs")
15830 (description
15831 "This Python package provides buffer compression and transformation
15832 codecs for use in data storage and communication applications.")
15833 (license license:expat)))
15834
15835 (define-public python-asciitree
15836 (package
15837 (name "python-asciitree")
15838 (version "0.3.3")
15839 (source
15840 (origin
15841 (method url-fetch)
15842 (uri (pypi-uri "asciitree" version))
15843 (sha256
15844 (base32
15845 "0vhgri2m2xlnibhz4xwn4hpbc7xacisxjqrk6k5kyppq96vbk92a"))))
15846 (build-system python-build-system)
15847 (home-page "https://github.com/mbr/asciitree")
15848 (synopsis "Draws ASCII trees")
15849 (description "This package draws tree structures using characters.")
15850 (license license:expat)))
15851
15852 (define-public python-zarr
15853 (package
15854 (name "python-zarr")
15855 (version "2.4.0")
15856 (source
15857 (origin
15858 (method url-fetch)
15859 (uri (pypi-uri "zarr" version))
15860 (sha256
15861 (base32
15862 "026n3sjzjv2gmwx6y72b8ij0hk42bc8zdbvfj5gdqzd4i6wj3ajk"))))
15863 (build-system python-build-system)
15864 (arguments
15865 `(#:phases
15866 (modify-phases %standard-phases
15867 (add-after 'unpack 'disable-service-tests
15868 (lambda _
15869 (setenv "ZARR_TEST_ABS" "0")
15870 (setenv "ZARR_TEST_MONGO" "0")
15871 (setenv "ZARR_TEST_REDIS" "0")
15872 #t))
15873 (replace 'check
15874 (lambda _
15875 (invoke "pytest" "-vv" "-k" "not lmdb")
15876 #t)))))
15877 (propagated-inputs
15878 `(("python-asciitree" ,python-asciitree)
15879 ("python-fasteners" ,python-fasteners)
15880 ("python-numcodecs" ,python-numcodecs)
15881 ("python-numpy" ,python-numpy)))
15882 (native-inputs
15883 `(("python-pytest" ,python-pytest)
15884 ("python-setuptools-scm" ,python-setuptools-scm)))
15885 (home-page "https://github.com/zarr-developers/zarr-python")
15886 (synopsis "Chunked, compressed, N-dimensional arrays for Python")
15887 (description
15888 "This package provides an implementation of chunked, compressed,
15889 N-dimensional arrays for Python.")
15890 (license license:expat)))
15891
15892 (define-public python-anndata
15893 (package
15894 (name "python-anndata")
15895 (version "0.7.1")
15896 (source
15897 (origin
15898 (method url-fetch)
15899 (uri (pypi-uri "anndata" version))
15900 (sha256
15901 (base32
15902 "0rnfbpr55j1a1bi2kd4mz444741hrn74kz90h5rnjr59jmpfnh09"))))
15903 (build-system python-build-system)
15904 (arguments
15905 `(#:phases
15906 (modify-phases %standard-phases
15907 (add-after 'unpack 'delete-inconvenient-tests
15908 (lambda _
15909 ;; This test depends on python-scikit-learn.
15910 (delete-file "anndata/tests/test_inplace_subset.py")
15911 #t))
15912 (delete 'check)
15913 (add-after 'install 'check
15914 (lambda* (#:key inputs outputs #:allow-other-keys)
15915 (add-installed-pythonpath inputs outputs)
15916 (invoke "pytest" "-vv"))))))
15917 (propagated-inputs
15918 `(("python-h5py" ,python-h5py)
15919 ("python-importlib-metadata" ,python-importlib-metadata)
15920 ("python-natsort" ,python-natsort)
15921 ("python-numcodecs" ,python-numcodecs)
15922 ("python-packaging" ,python-packaging)
15923 ("python-pandas" ,python-pandas)
15924 ("python-scipy" ,python-scipy)
15925 ("python-zarr" ,python-zarr)))
15926 (native-inputs
15927 `(("python-joblib" ,python-joblib)
15928 ("python-pytest" ,python-pytest)
15929 ("python-setuptools-scm" ,python-setuptools-scm)))
15930 (home-page "https://github.com/theislab/anndata")
15931 (synopsis "Annotated data for data analysis pipelines")
15932 (description "Anndata is a package for simple (functional) high-level APIs
15933 for data analysis pipelines. In this context, it provides an efficient,
15934 scalable way of keeping track of data together with learned annotations and
15935 reduces the code overhead typically encountered when using a mostly
15936 object-oriented library such as @code{scikit-learn}.")
15937 (license license:bsd-3)))
15938
15939 (define-public python-dill
15940 (package
15941 (name "python-dill")
15942 (version "0.3.1.1")
15943 (source
15944 (origin
15945 (method url-fetch)
15946 (uri (pypi-uri "dill" version))
15947 (sha256
15948 (base32 "1704g8z70d210ksgbccs2v545v9w0wc6lx15m296alb7jf0yzn22"))))
15949 (build-system python-build-system)
15950 (arguments
15951 `(#:phases
15952 (modify-phases %standard-phases
15953 (replace 'check
15954 (lambda _
15955 (with-directory-excursion "/tmp"
15956 (invoke "nosetests" "-v"))
15957 #t)))))
15958 (native-inputs
15959 `(("python-nose" ,python-nose)))
15960 (home-page "https://pypi.org/project/dill/")
15961 (synopsis "Serialize all of Python")
15962 (description "Dill extends Python's @code{pickle} module for serializing
15963 and de-serializing Python objects to the majority of the built-in Python
15964 types. Dill provides the user the same interface as the @code{pickle} module,
15965 and also includes some additional features. In addition to pickling Python
15966 objects, @code{dill} provides the ability to save the state of an interpreter
15967 session in a single command. Hence, it would be feasible to save a
15968 interpreter session, close the interpreter, ship the pickled file to another
15969 computer, open a new interpreter, unpickle the session and thus continue from
15970 the saved state of the original interpreter session.")
15971 (license license:bsd-3)))
15972
15973 (define-public python-multiprocess
15974 (package
15975 (name "python-multiprocess")
15976 (version "0.70.9")
15977 (source
15978 (origin
15979 (method url-fetch)
15980 (uri (pypi-uri "multiprocess" version))
15981 (sha256
15982 (base32
15983 "1r882nvd44xqwbrclwqx5rhs80l6809rcvpc7pkpgnij06cvvmcz"))))
15984 (build-system python-build-system)
15985 (arguments
15986 `(#:phases
15987 (modify-phases %standard-phases
15988 (add-after 'unpack 'disable-broken-tests
15989 (lambda _
15990 ;; This test is broken as there is no keyboard interrupt.
15991 (substitute* "py3.7/multiprocess/tests/__init__.py"
15992 (("^(.*)def test_wait_result"
15993 line indent)
15994 (string-append indent
15995 "@unittest.skip(\"Disabled by Guix\")\n"
15996 line)))
15997 #t))
15998 ;; Tests must be run after installation.
15999 (delete 'check)
16000 (add-after 'install 'check
16001 (lambda* (#:key inputs outputs #:allow-other-keys)
16002 (add-installed-pythonpath inputs outputs)
16003 (invoke "python" "-m" "multiprocess.tests")
16004 #t)))))
16005 (propagated-inputs
16006 `(("python-dill" ,python-dill)))
16007 (home-page "https://pypi.org/project/multiprocess/")
16008 (synopsis "Multiprocessing and multithreading in Python")
16009 (description
16010 "This package is a fork of the multiprocessing Python package, a package
16011 which supports the spawning of processes using the API of the standard
16012 library's @code{threading} module.")
16013 (license license:bsd-3)))
16014
16015 (define-public python-toolz
16016 (package
16017 (name "python-toolz")
16018 (version "0.9.0")
16019 (source
16020 (origin
16021 (method url-fetch)
16022 (uri (pypi-uri "toolz" version))
16023 (sha256
16024 (base32
16025 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
16026 (build-system python-build-system)
16027 ;; FIXME: tests cannot be computed: "Can't perform this operation for
16028 ;; unregistered loader type"
16029 (arguments '(#:tests? #f))
16030 (home-page "https://github.com/pytoolz/toolz/")
16031 (synopsis "List processing tools and functional utilities")
16032 (description
16033 "This package provides a set of utility functions for iterators,
16034 functions, and dictionaries.")
16035 (license license:bsd-3)))
16036
16037 (define-public python2-toolz
16038 (package-with-python2 python-toolz))
16039
16040 (define-public python-cytoolz
16041 (package
16042 (name "python-cytoolz")
16043 (version "0.9.0.1")
16044 (source
16045 (origin
16046 (method url-fetch)
16047 (uri (pypi-uri "cytoolz" version))
16048 (sha256
16049 (base32
16050 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
16051 (build-system python-build-system)
16052 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
16053 ;; 'exceptions'"
16054 (arguments '(#:tests? #f))
16055 (propagated-inputs
16056 `(("python-toolz" ,python-toolz)))
16057 (native-inputs
16058 `(("python-cython" ,python-cython)))
16059 (home-page "https://github.com/pytoolz/cytoolz")
16060 (synopsis "High performance functional utilities")
16061 (description
16062 "The cytoolz package implements the same API as provided by toolz. The
16063 main differences are that @code{cytoolz} is faster and cytoolz offers a C API
16064 that is accessible to other projects developed in Cython.")
16065 (license license:bsd-3)))
16066
16067 (define-public python-sortedcontainers
16068 (package
16069 (name "python-sortedcontainers")
16070 (version "2.1.0")
16071 (source
16072 (origin
16073 (method url-fetch)
16074 (uri (pypi-uri "sortedcontainers" version))
16075 (sha256
16076 (base32
16077 "0fm0w5id2yhqld95hg2m636vjgkz377rvgdfqaxc25vbylr9lklp"))))
16078 (build-system python-build-system)
16079 (native-inputs
16080 `(("python-tox" ,python-tox)))
16081 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
16082 (synopsis "Sorted List, Sorted Dict, Sorted Set")
16083 (description
16084 "This package provides a sorted collections library, written in
16085 pure-Python.")
16086 (license license:asl2.0)))
16087
16088 (define-public python-cloudpickle
16089 (package
16090 (name "python-cloudpickle")
16091 (version "0.6.1")
16092 (source
16093 (origin
16094 (method url-fetch)
16095 (uri (pypi-uri "cloudpickle" version))
16096 (sha256
16097 (base32
16098 "1wdw89mlm7fqa3fm3ymskx05jrys66n8m1z1a8s0mss0799ahsgi"))))
16099 (build-system python-build-system)
16100 ;; FIXME: there are 5 errors in 122 tests:
16101 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.CloudPickleTest)
16102 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.CloudPickleTest)
16103 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.Protocol2CloudPickleTest)
16104 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.Protocol2CloudPickleTest)
16105 ;; ERROR: test_temp_file (tests.cloudpickle_file_test.CloudPickleFileTests)
16106 ;; TypeError: cannot serialize '_io.BufferedRandom' object
16107 (arguments '(#:tests? #f))
16108 (native-inputs
16109 `(("python-pytest" ,python-pytest)
16110 ("python-mock" ,python-mock)
16111 ("python-tornado" ,python-tornado)))
16112 (home-page "https://github.com/cloudpipe/cloudpickle")
16113 (synopsis "Extended pickling support for Python objects")
16114 (description
16115 "Cloudpickle makes it possible to serialize Python constructs not
16116 supported by the default pickle module from the Python standard library. It
16117 is especially useful for cluster computing where Python expressions are
16118 shipped over the network to execute on remote hosts, possibly close to the
16119 data.")
16120 (license license:bsd-3)))
16121
16122 (define-public python2-cloudpickle
16123 (package-with-python2 python-cloudpickle))
16124
16125 (define-public python-locket
16126 (package
16127 (name "python-locket")
16128 (version "0.2.0")
16129 (source
16130 (origin
16131 (method url-fetch)
16132 (uri (pypi-uri "locket" version))
16133 (sha256
16134 (base32
16135 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
16136 (build-system python-build-system)
16137 (home-page "https://github.com/mwilliamson/locket.py")
16138 (synopsis "File-based locks for Python")
16139 (description
16140 "Locket implements a lock that can be used by multiple processes provided
16141 they use the same path.")
16142 (license license:bsd-2)))
16143
16144 (define-public python2-locket
16145 (package-with-python2 python-locket))
16146
16147 (define-public python-blosc
16148 (package
16149 (name "python-blosc")
16150 (version "1.5.1")
16151 (source
16152 (origin
16153 (method url-fetch)
16154 (uri (pypi-uri "blosc" version))
16155 (sha256
16156 (base32
16157 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
16158 (build-system python-build-system)
16159 ;; FIXME: all tests pass, but then this error is printed:
16160 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
16161 (arguments '(#:tests? #f))
16162 (propagated-inputs
16163 `(("python-numpy" ,python-numpy)))
16164 (home-page "https://github.com/blosc/python-blosc")
16165 (synopsis "Python wrapper for the Blosc data compressor library")
16166 (description "Blosc is a high performance compressor optimized for binary
16167 data. It has been designed to transmit data to the processor cache faster
16168 than the traditional, non-compressed, direct memory fetch approach via a
16169 @code{memcpy()} system call.
16170
16171 Blosc works well for compressing numerical arrays that contains data with
16172 relatively low entropy, like sparse data, time series, grids with
16173 regular-spaced values, etc.
16174
16175 This Python package wraps the Blosc library.")
16176 (license license:bsd-3)))
16177
16178 (define-public python2-blosc
16179 (package-with-python2 python-blosc))
16180
16181 (define-public python-partd
16182 (package
16183 (name "python-partd")
16184 (version "0.3.9")
16185 (source
16186 (origin
16187 (method url-fetch)
16188 (uri (pypi-uri "partd" version))
16189 (sha256
16190 (base32
16191 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
16192 (build-system python-build-system)
16193 (propagated-inputs
16194 `(("python-blosc" ,python-blosc)
16195 ("python-locket" ,python-locket)
16196 ("python-numpy" ,python-numpy)
16197 ("python-pandas" ,python-pandas)
16198 ("python-pyzmq" ,python-pyzmq)
16199 ("python-toolz" ,python-toolz)))
16200 (home-page "https://github.com/dask/partd/")
16201 (synopsis "Appendable key-value storage")
16202 (description "Partd stores key-value pairs. Values are raw bytes. We
16203 append on old values. Partd excels at shuffling operations.")
16204 (license license:bsd-3)))
16205
16206 (define-public python2-partd
16207 (package-with-python2 python-partd))
16208
16209 (define-public python-fsspec
16210 (package
16211 (name "python-fsspec")
16212 (version "0.6.1")
16213 (source
16214 (origin
16215 (method url-fetch)
16216 (uri (pypi-uri "fsspec" version))
16217 (sha256
16218 (base32
16219 "1g9ba8v04s1nrh7pvzfm2md7ivl2mrz3hcq3y9d1a44gd62h17zj"))))
16220 (build-system python-build-system)
16221 (arguments '(#:tests? #f)) ; there are none
16222 (home-page "https://github.com/intake/filesystem_spec")
16223 (synopsis "File-system specification")
16224 (description "The purpose of this package is to produce a template or
16225 specification for a file-system interface, that specific implementations
16226 should follow, so that applications making use of them can rely on a common
16227 behavior and not have to worry about the specific internal implementation
16228 decisions with any given backend.")
16229 (license license:bsd-3)))
16230
16231 (define-public python-dask
16232 (package
16233 (name "python-dask")
16234 (version "2.9.0")
16235 (source
16236 (origin
16237 (method url-fetch)
16238 (uri (pypi-uri "dask" version))
16239 (sha256
16240 (base32 "1w1hqr8vyx6ygwflj2737dcy0mmgvrc0s602gnny8pzlcbs9m76b"))))
16241 (build-system python-build-system)
16242 (arguments
16243 `(#:phases
16244 (modify-phases %standard-phases
16245 (add-after 'unpack 'disable-broken-tests
16246 (lambda _
16247 ;; This test is marked as xfail when pytest-xdist is used.
16248 (substitute* "dask/tests/test_threaded.py"
16249 (("def test_interrupt\\(\\)" m)
16250 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
16251 m)))
16252 ;; This one fails with a type error:
16253 ;; TypeError: Already tz-aware, use tz_convert to convert.
16254 (substitute* "dask/dataframe/tests/test_shuffle.py"
16255 (("def test_set_index_timestamp\\(\\)" m)
16256 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
16257 m)))
16258 #t))
16259 (replace 'check
16260 (lambda _ (invoke "pytest" "-vv"))))))
16261 (propagated-inputs
16262 `(("python-cloudpickle" ,python-cloudpickle)
16263 ("python-fsspec" ,python-fsspec)
16264 ("python-numpy" ,python-numpy)
16265 ("python-packaging" ,python-packaging)
16266 ("python-pandas" ,python-pandas)
16267 ("python-partd" ,python-partd)
16268 ("python-toolz" ,python-toolz)
16269 ("python-pyyaml" ,python-pyyaml)))
16270 (native-inputs
16271 `(("python-pytest" ,python-pytest)
16272 ("python-pytest-runner" ,python-pytest-runner)))
16273 (home-page "https://github.com/dask/dask/")
16274 (synopsis "Parallel computing with task scheduling")
16275 (description
16276 "Dask is a flexible parallel computing library for analytics. It
16277 consists of two components: dynamic task scheduling optimized for computation,
16278 and large data collections like parallel arrays, dataframes, and lists that
16279 extend common interfaces like NumPy, Pandas, or Python iterators to
16280 larger-than-memory or distributed environments. These parallel collections
16281 run on top of the dynamic task schedulers. ")
16282 (license license:bsd-3)))
16283
16284 (define-public python-ilinkedlist
16285 (package
16286 (name "python-ilinkedlist")
16287 (version "0.4.0")
16288 (source
16289 (origin
16290 (method url-fetch)
16291 (uri (pypi-uri "ilinkedlist" version))
16292 (sha256
16293 (base32
16294 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
16295 (build-system python-build-system)
16296 (native-inputs `(("python-pytest" ,python-pytest)))
16297 (inputs `(("python" ,python)))
16298 (home-page "https://github.com/luther9/ilinkedlist-py")
16299 (synopsis "Immutable linked list library")
16300 (description
16301 "This is a implementation of immutable linked lists for Python. It
16302 contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
16303 Since a linked list is treated as immutable, it is hashable, and its length
16304 can be retrieved in constant time. Some of the terminology is inspired by
16305 LISP. It is possible to create an improper list by creating a @code{Pair}
16306 with a non-list @code{cdr}.")
16307 (license license:gpl3+)))
16308
16309 (define-public python-readlike
16310 (package
16311 (name "python-readlike")
16312 (version "0.1.3")
16313 (source
16314 (origin
16315 (method url-fetch)
16316 (uri (pypi-uri "readlike" version))
16317 (sha256
16318 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
16319 (build-system python-build-system)
16320 (home-page "https://github.com/jangler/readlike")
16321 (synopsis "GNU Readline-like line editing module")
16322 (description
16323 "This Python module provides line editing functions similar to the default
16324 Emacs-style ones of GNU Readline. Unlike the Python standard library's
16325 @code{readline} package, this one allows access to those capabilties in settings
16326 outside of a standard command-line interface. It is especially well-suited to
16327 interfacing with Urwid, due to a shared syntax for describing key inputs.
16328
16329 Currently, all stateless Readline commands are implemented. Yanking and history
16330 are not supported.")
16331 (license license:expat)))
16332
16333 (define-public python2-readlike
16334 (package-with-python2 python-readlike))
16335
16336 (define-public python-reparser
16337 (package
16338 (name "python-reparser")
16339 (version "1.4.3")
16340 (source
16341 (origin
16342 (method url-fetch)
16343 (uri (pypi-uri "ReParser" version))
16344 (sha256
16345 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
16346 (build-system python-build-system)
16347 (home-page "https://github.com/xmikos/reparser")
16348 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
16349 (description
16350 "This Python library provides a simple lexer/parser for inline markup based
16351 on regular expressions.")
16352 (license license:expat)))
16353
16354 (define-public python2-reparser
16355 (let ((reparser (package-with-python2
16356 (strip-python2-variant python-reparser))))
16357 (package (inherit reparser)
16358 (propagated-inputs
16359 `(("python2-enum34" ,python2-enum34)
16360 ,@(package-propagated-inputs reparser))))))
16361
16362 (define-public python-precis-i18n
16363 (package
16364 (name "python-precis-i18n")
16365 (version "1.0.0")
16366 (source
16367 (origin
16368 (method url-fetch)
16369 (uri (pypi-uri "precis_i18n" version))
16370 (sha256
16371 (base32
16372 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
16373 (build-system python-build-system)
16374 (home-page "https://github.com/byllyfish/precis_i18n")
16375 (synopsis "Implementation of the PRECIS framework")
16376 (description
16377 "This module implements the PRECIS Framework as described in RFC 8264,
16378 RFC 8265 and RFC 8266.")
16379 (license license:expat)))
16380
16381 (define-public python-absl-py
16382 (package
16383 (name "python-absl-py")
16384 (version "0.6.1")
16385 (source
16386 (origin
16387 (method url-fetch)
16388 (uri (pypi-uri "absl-py" version))
16389 (sha256
16390 (base32
16391 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
16392 (build-system python-build-system)
16393 (propagated-inputs
16394 `(("python-six" ,python-six)))
16395 (home-page "https://github.com/abseil/abseil-py")
16396 (synopsis "Abseil Python common libraries")
16397 (description
16398 "This package provides the Abseil Python Common Libraries, a collection
16399 of Python libraries for building Python applications.")
16400 (license license:asl2.0)))
16401
16402 (define-public python-astor
16403 (package
16404 (name "python-astor")
16405 (version "0.7.1")
16406 (source
16407 (origin
16408 (method url-fetch)
16409 (uri (pypi-uri "astor" version))
16410 (sha256
16411 (base32
16412 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
16413 (build-system python-build-system)
16414 ;; FIXME: There are two errors and two test failures.
16415 (arguments `(#:tests? #f))
16416 (home-page "https://github.com/berkerpeksag/astor")
16417 (synopsis "Read and write Python ASTs")
16418 (description "Astor is designed to allow easy manipulation of Python
16419 source via the Abstract Syntax Tree.")
16420 (license license:bsd-3)))
16421
16422 (define-public python2-astor
16423 (package-with-python2 python-astor))
16424
16425 (define-public python-grpcio
16426 (package
16427 (name "python-grpcio")
16428 (version "1.17.1")
16429 (source
16430 (origin
16431 (method url-fetch)
16432 (uri (pypi-uri "grpcio" version))
16433 (sha256
16434 (base32
16435 "0qb9y6j83nxa6d4kc60i8yfgdm7a8ms7b54kncjzf5y7nsxp8rzx"))))
16436 (build-system python-build-system)
16437 (propagated-inputs
16438 `(("python-six" ,python-six)))
16439 (home-page "https://grpc.io")
16440 (synopsis "HTTP/2-based RPC framework")
16441 (description "This package provides a Python library for communicating
16442 with the HTTP/2-based RPC framework gRPC.")
16443 (license license:asl2.0)))
16444
16445 (define-public python-astunparse
16446 (package
16447 (name "python-astunparse")
16448 (version "1.6.2")
16449 (source
16450 (origin
16451 (method url-fetch)
16452 (uri (pypi-uri "astunparse" version))
16453 (sha256
16454 (base32 "0rzbc44xcvzjhhiy7wac96mgal5mcjz1mfq8rmvgswskf4kf9cys"))))
16455 (build-system python-build-system)
16456 (arguments '(#:tests? #f)) ; there are none
16457 (propagated-inputs
16458 `(("python-six" ,python-six)
16459 ("python-wheel" ,python-wheel)))
16460 (home-page "https://github.com/simonpercivall/astunparse")
16461 (synopsis "AST unparser for Python")
16462 (description "This package provides an AST unparser for Python. It is a
16463 factored out version of @code{unparse} found in the Python source
16464 distribution.")
16465 (license license:bsd-3)))
16466
16467 (define-public python-gast
16468 (package
16469 (name "python-gast")
16470 (version "0.2.2")
16471 (source
16472 (origin
16473 (method url-fetch)
16474 (uri (pypi-uri "gast" version))
16475 (sha256
16476 (base32 "1w5dzdb3gpcfmd2s0b93d8gff40a1s41rv31458z14inb3s9v4zy"))))
16477 (build-system python-build-system)
16478 (propagated-inputs
16479 `(("python-astunparse" ,python-astunparse)))
16480 (home-page "https://pypi.org/project/gast/")
16481 (synopsis "Generic Python AST that abstracts the underlying Python version")
16482 (description
16483 "GAST provides a compatibility layer between the AST of various Python
16484 versions, as produced by @code{ast.parse} from the standard @code{ast}
16485 module.")
16486 (license license:bsd-3)))
16487
16488 (define-public python-wikidata
16489 (package
16490 (name "python-wikidata")
16491 (version "0.6.1")
16492 (source
16493 (origin
16494 (method url-fetch)
16495 (uri (pypi-uri "Wikidata" version))
16496 (sha256
16497 (base32
16498 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
16499 (build-system python-build-system)
16500 (propagated-inputs
16501 `(("python-babel" ,python-babel)))
16502 (home-page "https://github.com/dahlia/wikidata")
16503 (synopsis "Wikidata client library")
16504 (description
16505 "This package provides a Python interface to
16506 @url{https://www.wikidata.org/, Wikidata}.")
16507 (properties '((upstream-name . "Wikidata")))
16508 (license license:gpl3+)))
16509
16510 (define-public python-doctest-ignore-unicode
16511 (package
16512 (name "python-doctest-ignore-unicode")
16513 (version "0.1.2")
16514 (source
16515 (origin
16516 (method url-fetch)
16517 (uri (pypi-uri "doctest-ignore-unicode" version))
16518 (sha256
16519 (base32
16520 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
16521 (build-system python-build-system)
16522 (native-inputs
16523 `(("python-nose" ,python-nose)))
16524 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
16525 (synopsis "Ignore Unicode literal prefixes in doctests")
16526 (description
16527 "This package adds support for a flag to ignore Unicode literal prefixes
16528 in doctests.")
16529 (license license:asl2.0)))
16530
16531 (define-public python-attr
16532 (package
16533 (name "python-attr")
16534 (version "0.3.1")
16535 (source
16536 (origin
16537 (method url-fetch)
16538 (uri (pypi-uri "attr" version))
16539 (sha256
16540 (base32
16541 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
16542 (build-system python-build-system)
16543 (home-page "https://github.com/denis-ryzhkov/attr")
16544 (synopsis "Decorator for attributes of target function or class")
16545 (description "Simple decorator to set attributes of target function or
16546 class in a @acronym{DRY, Don't Repeat Yourself} way.")
16547 (license license:expat)))
16548
16549 (define-public python-construct
16550 (package
16551 (name "python-construct")
16552 (version "2.10.56")
16553 (source
16554 (origin
16555 (method url-fetch)
16556 (uri (pypi-uri "construct" version))
16557 (sha256
16558 (base32
16559 "0q86jjzsvy835h3c8pjj4619vbp7ihfg8njmyw86ym4qrpni7flp"))))
16560 (build-system python-build-system)
16561 (arguments
16562 `(#:tests? #f)) ; No tests exist.
16563 (propagated-inputs
16564 `(("python-extras" ,python-extras)
16565 ("python-arrow" ,python-arrow)
16566 ("python-numpy" ,python-numpy)
16567 ("python-ruamel.yaml" ,python-ruamel.yaml)))
16568 (home-page "https://construct.readthedocs.io")
16569 (synopsis "Declarative and symmetrical parser and builder for binary data")
16570 (description
16571 "This package provides both simple, atomic constructs (such as
16572 integers of various sizes), as well as composite ones which allow you
16573 form hierarchical and sequential structures of increasing complexity.
16574 It features bit and byte granularity, easy debugging and testing, an
16575 easy-to-extend subclass system, and lots of primitive constructs to
16576 make your work easier.")
16577 (license license:expat)))
16578
16579 (define-public python-humanize
16580 (package
16581 (name "python-humanize")
16582 (version "0.5.1")
16583 (source
16584 (origin
16585 (method url-fetch)
16586 (uri (pypi-uri "humanize" version))
16587 (sha256
16588 (base32
16589 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
16590 (arguments
16591 '(#:tests? #f)) ; tests not in pypi archive
16592 (build-system python-build-system)
16593 (home-page "https://github.com/jmoiron/humanize")
16594 (synopsis "Print numerical information in a human-readable form")
16595 (description "This package provides a Python module that displays numbers
16596 and dates in \"human readable\" forms. For example, it would display
16597 \"12345591313\" as \"12.3 billion\".")
16598 (license license:expat)))
16599
16600 (define-public python-txaio
16601 (package
16602 (name "python-txaio")
16603 (version "18.8.1")
16604 (source
16605 (origin
16606 (method url-fetch)
16607 (uri (pypi-uri "txaio" version))
16608 (sha256
16609 (base32
16610 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
16611 (build-system python-build-system)
16612 (propagated-inputs
16613 `(("python-twisted" ,python-twisted)
16614 ("python-six" ,python-six)))
16615 (home-page "https://github.com/crossbario/txaio")
16616 (synopsis "Compatibility layer between Python asyncio and Twisted")
16617 (description "Txaio provides a compatibility layer between the Python
16618 @code{asyncio} module and @code{Twisted}.")
16619 (license license:expat)))
16620
16621 (define-public python-toolshed
16622 (package
16623 (name "python-toolshed")
16624 (version "0.4.6")
16625 (source
16626 (origin
16627 (method url-fetch)
16628 (uri (pypi-uri "toolshed" version))
16629 (sha256
16630 (base32
16631 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
16632 (build-system python-build-system)
16633 (native-inputs
16634 `(("python-nose" ,python-nose)))
16635 (home-page "https://github.com/brentp/toolshed/")
16636 (synopsis "Collection of modules and functions for working with data")
16637 (description "This is a collection of well-tested, simple modules and
16638 functions that aim to reduce boilerplate when working with data.")
16639 (license license:bsd-2)))
16640
16641 (define-public python-annoy
16642 (package
16643 (name "python-annoy")
16644 (version "1.15.1")
16645 (source
16646 (origin
16647 (method url-fetch)
16648 (uri (pypi-uri "annoy" version))
16649 (sha256
16650 (base32
16651 "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp"))))
16652 (build-system python-build-system)
16653 (native-inputs
16654 `(("python-nose" ,python-nose)))
16655 (home-page "https://github.com/spotify/annoy/")
16656 (synopsis "Approximate nearest neighbors library")
16657 (description
16658 "Annoy is a C++ library with Python bindings to search for points in
16659 space that are close to a given query point. It also creates large read-only
16660 file-based data structures that are @code{mmap}ped into memory so that many
16661 processes may share the same data.")
16662 (license license:asl2.0)))
16663
16664 (define-public python-pylzma
16665 (package
16666 (name "python-pylzma")
16667 (version "0.5.0")
16668 (source
16669 (origin
16670 (method url-fetch)
16671 (uri (pypi-uri "pylzma" version))
16672 (sha256
16673 (base32
16674 "074anvhyjgsv2iby2ql1ixfvjgmhnvcwjbdz8gk70xzkzcm1fx5q"))))
16675 (build-system python-build-system)
16676 (home-page "http://www.joachim-bauch.de/projects/pylzma/")
16677 (synopsis "Python bindings for the LZMA library by Igor Pavlov.")
16678 (description "This package provides Python bindings for the LZMA library
16679 by Igor Pavlov.")
16680 (license license:lgpl2.1+)))
16681
16682 (define-public python2-pylzma
16683 (package-with-python2 python-pylzma))
16684
16685 (define-public python2-zeroconf
16686 (package
16687 (name "python2-zeroconf")
16688
16689 ;; This is the last version that supports Python 2.x.
16690 (version "0.19.1")
16691 (source
16692 (origin
16693 (method url-fetch)
16694 (uri (pypi-uri "zeroconf" version))
16695 (sha256
16696 (base32
16697 "0ykzg730n915qbrq9bn5pn06bv6rb5zawal4sqjyfnjjm66snkj3"))))
16698 (build-system python-build-system)
16699 (arguments
16700 `(#:python ,python-2
16701 #:phases
16702 (modify-phases %standard-phases
16703 (add-after 'unpack 'patch-requires
16704 (lambda* (#:key inputs #:allow-other-keys)
16705 (substitute* "setup.py"
16706 (("enum-compat")
16707 "enum34"))
16708 #t)))))
16709 (native-inputs
16710 `(("python2-six" ,python2-six)
16711 ("python2-enum32" ,python2-enum34)
16712 ("python2-netifaces" ,python2-netifaces)
16713 ("python2-typing" ,python2-typing)))
16714 (home-page "https://github.com/jstasiak/python-zeroconf")
16715 (synopsis "Pure Python mDNS service discovery")
16716 (description
16717 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
16718 compatible).")
16719 (license license:lgpl2.1+)))
16720
16721 (define-public python-bsddb3
16722 (package
16723 (name "python-bsddb3")
16724 (version "6.2.6")
16725 (source
16726 (origin
16727 (method url-fetch)
16728 (uri (pypi-uri "bsddb3" version))
16729 (sha256
16730 (base32
16731 "019db2y6bfmiqbrgg9x9f6h72qjmqh05czdn2v5sy9bl0gs23mj2"))))
16732 (build-system python-build-system)
16733 (inputs
16734 `(("bdb" ,bdb)))
16735 (arguments
16736 '(#:phases
16737 (modify-phases %standard-phases
16738 (add-after 'unpack 'configure-locations
16739 (lambda* (#:key inputs #:allow-other-keys)
16740 (setenv "BERKELEYDB_DIR" (assoc-ref inputs "bdb"))
16741 (setenv "YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION" "1")
16742 #t))
16743 (replace 'check
16744 (lambda _
16745 (invoke "python3" "test3.py" "-v"))))))
16746 (home-page "https://www.jcea.es/programacion/pybsddb.htm")
16747 (synopsis "Python bindings for Oracle Berkeley DB")
16748 (description
16749 "This module provides a nearly complete wrapping of the Oracle/Sleepycat
16750 C API for the Database Environment, Database, Cursor, Log Cursor, Sequence and
16751 Transaction objects, and each of these is exposed as a Python type in the
16752 bsddb3.db module. The database objects can use various access methods: btree,
16753 hash, recno, and queue. Complete support of Berkeley DB distributed
16754 transactions. Complete support for Berkeley DB Replication Manager.
16755 Complete support for Berkeley DB Base Replication. Support for RPC.")
16756 (license license:bsd-3)))
16757
16758 (define-public python-dbfread
16759 (package
16760 (name "python-dbfread")
16761 (version "2.0.7")
16762 (source (origin
16763 (method url-fetch)
16764 (uri (pypi-uri "dbfread" version))
16765 (sha256
16766 (base32
16767 "0gdpwdzf1fngsi6jrdyj4qdf6cr7gnnr3zp80dpkzbgz0spskj07"))))
16768 (build-system python-build-system)
16769 (native-inputs
16770 `(("python-pytest" ,python-pytest)))
16771 (home-page "https://dbfread.readthedocs.io")
16772 (synopsis "Read DBF Files with Python")
16773 (description
16774 "This library reads DBF files and returns the data as native Python data
16775 types for further processing. It is primarily intended for batch jobs and
16776 one-off scripts.")
16777 (license license:expat)))
16778
16779 (define-public python-cached-property
16780 (package
16781 (name "python-cached-property")
16782 (version "1.5.1")
16783 (source
16784 (origin
16785 (method url-fetch)
16786 (uri (pypi-uri "cached-property" version))
16787 (sha256
16788 (base32
16789 "010m1bl380l2r3vwq24r5v14l6gwvgm9v0mqqjkjss552jgsa5wj"))))
16790 (build-system python-build-system)
16791 (arguments
16792 `(#:phases
16793 (modify-phases %standard-phases
16794 ;; https://github.com/pydanny/cached-property/issues/131
16795 ;; recent versions of freezegun break one test
16796 (add-after 'unpack 'disable-broken-test
16797 (lambda _
16798 (substitute* "tests/test_cached_property.py"
16799 (("def test_threads_ttl_expiry\\(self\\)" m)
16800 (string-append "@unittest.skip(\"Disabled by Guix\")\n"
16801 " " m)))
16802 #t)))))
16803 (native-inputs
16804 `(("python-freezegun" ,python-freezegun)))
16805 (home-page
16806 "https://github.com/pydanny/cached-property")
16807 (synopsis
16808 "Decorator for caching properties in classes")
16809 (description
16810 "This package provides a decorator which makes caching
16811 time-or-computationally-expensive properties quick and easy and works in Python
16812 2 or 3.")
16813 (license license:bsd-3)))
16814
16815 (define-public python-folium
16816 (package
16817 (name "python-folium")
16818 (version "0.10.1")
16819 (source
16820 (origin
16821 (method url-fetch)
16822 (uri (pypi-uri "folium" version))
16823 (sha256
16824 (base32
16825 "0gcc267wxwxr57ry86pqpbiyfvl0g48hfvgy0f2mz9s58g87kgzd"))))
16826 (build-system python-build-system)
16827 (propagated-inputs
16828 `(("python-branca" ,python-branca)
16829 ("python-jinja2" ,python-jinja2)
16830 ("python-numpy" ,python-numpy)
16831 ("python-requests" ,python-requests)))
16832 (native-inputs
16833 `(("python-pytest" ,python-pytest)))
16834 (home-page "https://github.com/python-visualization/folium")
16835 (synopsis "Make beautiful maps with Leaflet.js & Python")
16836 (description "@code{folium} makes it easy to visualize data that’s been
16837 manipulated in Python on an interactive leaflet map. It enables both the
16838 binding of data to a map for @code{choropleth} visualizations as well as
16839 passing rich vector/raster/HTML visualizations as markers on the map.
16840
16841 The library has a number of built-in tilesets from OpenStreetMap, Mapbox, and
16842 Stamen, and supports custom tilesets with Mapbox or Cloudmade API keys. It
16843 supports Image, Video, GeoJSON and TopoJSON overlays.")
16844 (license license:expat)))
16845
16846 (define-public jube
16847 (package
16848 ;; This is a command-line tool, so no "python-" prefix.
16849 (name "jube")
16850 (version "2.2.2")
16851 (source (origin
16852 (method url-fetch)
16853 (uri (string-append
16854 "http://apps.fz-juelich.de/jsc/jube/jube2/download.php?version="
16855 version))
16856 (sha256
16857 (base32
16858 "0xq4k1q63s1p6swgyp61vahlrd1fqmgbm0gm5kpj8ikwy0yc0nqk"))
16859 (file-name (string-append "jube-" version ".tar.gz"))))
16860 (build-system python-build-system)
16861 (home-page "https://apps.fz-juelich.de/jsc/jube/jube2/docu/index.html")
16862 (synopsis "Benchmarking environment")
16863 (description
16864 "JUBE helps perform and analyze benchmarks in a systematic way. For each
16865 benchmarked application, benchmark data is stored in a format that allows JUBE
16866 to deduct the desired information. This data can be parsed by automatic pre-
16867 and post-processing scripts that draw information and store it more densely
16868 for manual interpretation.")
16869 (license license:gpl3+)))
16870
16871 (define-public python-pyroutelib3
16872 (package
16873 (name "python-pyroutelib3")
16874 (version "1.3.post1")
16875 (source
16876 (origin
16877 (method url-fetch)
16878 (uri (pypi-uri "pyroutelib3" version))
16879 (sha256
16880 (base32
16881 "1hpbydpn2alyswiajfbvhzq4c7f36vdmvxy91hgv8l1lb2g2vfrj"))))
16882 (build-system python-build-system)
16883 (propagated-inputs
16884 `(("python-dateutil" ,python-dateutil)))
16885 (home-page "https://github.com/MKuranowski/pyroutelib3")
16886 (synopsis "Library for simple routing on OSM data")
16887 (description "Library for simple routing on OSM data")
16888 (license license:gpl3+)))
16889
16890 (define-public python-bibtexparser
16891 (package
16892 (name "python-bibtexparser")
16893 (version "1.1.0")
16894 (source
16895 (origin
16896 (method url-fetch)
16897 (uri (pypi-uri "bibtexparser" version))
16898 (sha256
16899 (base32
16900 "0zwhfkrzf3n5847dbnfng92k7ak199l9v6x6ax3dgdidfpm6d2fz"))))
16901 (build-system python-build-system)
16902 (propagated-inputs
16903 `(("python-pyparsing" ,python-pyparsing)))
16904 (native-inputs
16905 `(("python-future" ,python-future)))
16906 (home-page "https://github.com/sciunto-org/python-bibtexparser")
16907 (synopsis "Python library to parse BibTeX files")
16908 (description "BibtexParser is a Python library to parse BibTeX files.")
16909 (license (list license:bsd-3 license:lgpl3))))
16910
16911 (define-public python-distro
16912 (package
16913 (name "python-distro")
16914 (version "1.4.0")
16915 (source
16916 (origin
16917 (method url-fetch)
16918 (uri (pypi-uri "distro" version))
16919 (sha256
16920 (base32
16921 "0mrg75w4ap7mdzyga75yaid9n8bgb345ih5mwjp3plj6v1jxwb9n"))))
16922 (build-system python-build-system)
16923 (native-inputs
16924 `(("python-pytest" ,python-pytest)))
16925 (home-page "https://github.com/nir0s/distro")
16926 (synopsis
16927 "OS platform information API")
16928 (description
16929 "@code{distro} provides information about the OS distribution it runs on,
16930 such as a reliable machine-readable ID, or version information.
16931
16932 It is the recommended replacement for Python's original
16933 `platform.linux_distribution` function (which will be removed in Python 3.8).
16934 @code{distro} also provides a command-line interface to output the platform
16935 information in various formats.")
16936 (license license:asl2.0)))
16937
16938 (define-public python-cairosvg
16939 (package
16940 (name "python-cairosvg")
16941 (version "2.4.2")
16942 (source
16943 (origin
16944 (method url-fetch)
16945 (uri (pypi-uri "CairoSVG" version))
16946 (sha256
16947 (base32 "1bb7irxbaxxb9ahm3z5wsx1q96mm5gzskc7b6q07h9ikcnb8yrjf"))))
16948 (build-system python-build-system)
16949 (arguments
16950 `(#:phases
16951 (modify-phases %standard-phases
16952 (replace 'check
16953 (lambda _ (invoke "pytest"))))))
16954 (propagated-inputs
16955 `(("python-cairocffi" ,python-cairocffi)
16956 ("python-cssselect2" ,python-cssselect2)
16957 ("python-defusedxml" ,python-defusedxml)
16958 ("python-pillow" ,python-pillow)
16959 ("python-tinycss2" ,python-tinycss2)))
16960 (native-inputs
16961 `(("python-pytest-flake8" ,python-pytest-flake8)
16962 ("python-pytest-isort" ,python-pytest-isort)
16963 ("python-pytest-runner" ,python-pytest-runner)))
16964 (home-page "https://cairosvg.org/")
16965 (synopsis "SVG to PDF/PS/PNG converter based on Cairo")
16966 (description "CairoSVG is a SVG converter based on Cairo. It can export
16967 SVG files to PDF, PostScript and PNG files. The main part of CairoSVG is a
16968 SVG parser, trying to follow the SVG 1.1 recommendation from the W3C. Once
16969 parsed, the result is drawn to a Cairo surface that can be exported to
16970 qvarious formats: PDF, PostScript, PNG and even SVG.")
16971 (license license:lgpl3+)))
16972
16973 (define-public python-pyphen
16974 (package
16975 (name "python-pyphen")
16976 (version "0.9.5")
16977 (source
16978 (origin
16979 (method url-fetch)
16980 (uri (pypi-uri "Pyphen" version))
16981 (sha256
16982 (base32 "08c9y69ry9d6m4zalhnalg86lsp9v2j5n1ziw5vxfmiihx83lqrv"))))
16983 (build-system python-build-system)
16984 ;; TODO: Use the Guix system hyphenation packages hyphen-* rather than the
16985 ;; embedded set provided by upstream - like Debian does.
16986 (home-page "https://github.com/Kozea/Pyphen")
16987 (synopsis "Pure Python module to hyphenate text")
16988 (description "Pyphen is a pure Python module to hyphenate text using
16989 existing Hunspell hyphenation dictionaries.")
16990 (license (list license:gpl2 license:lgpl2.1 license:mpl1.1))))
16991
16992 (define-public python-intelhex
16993 (package
16994 (name "python-intelhex")
16995 (version "2.2.1")
16996 (source
16997 (origin
16998 (method url-fetch)
16999 (uri (pypi-uri "intelhex" version))
17000 (sha256
17001 (base32
17002 "0ckqjbxd8gwcg98gfzpn4vq1qxzfvq3rdbrr1hikj1nmw08qb780"))))
17003 (build-system python-build-system)
17004 (arguments '(#:tests? #f)) ;issue with version
17005 (home-page "https://pypi.org/project/IntelHex/")
17006 (synopsis "Python library for Intel HEX files manipulations")
17007 (description "The Intel HEX file format is widely used in microprocessors
17008 and microcontrollers area (embedded systems etc.) as the de facto standard for
17009 representation of code to be programmed into microelectronic devices. This
17010 package provides an intelhex Python library to read, write, create from
17011 scratch and manipulate data from Intel HEX file format. It also includes
17012 several convenience Python scripts, including \"classic\" hex2bin and bin2hex
17013 converters and more, those based on the library itself.")
17014 (license license:bsd-3)))
17015
17016 (define-public python-pykwalify
17017 (package
17018 (name "python-pykwalify")
17019 (version "1.7.0")
17020 (source
17021 (origin
17022 (method url-fetch)
17023 (uri (pypi-uri "pykwalify" version))
17024 (sha256
17025 (base32
17026 "1cnfzkg1b01f825ikpw2fhjclf9c8akxjfrbd1vc22x1lg2kk2vy"))))
17027 (build-system python-build-system)
17028 (arguments '(#:tests? #f)) ;missing dependencies
17029 (propagated-inputs
17030 `(("python-dateutil" ,python-dateutil)
17031 ("python-docopt" ,python-docopt)
17032 ("python-pyyaml" ,python-pyyaml)))
17033 (home-page "https://github.com/grokzen/pykwalify")
17034 (synopsis
17035 "Python lib/cli for JSON/YAML schema validation")
17036 (description
17037 "This package provides a parser, schema validator, and data binding tool
17038 for YAML and JSON.")
17039 (license license:expat)))
17040
17041 (define-public python-dbusmock
17042 (package
17043 (name "python-dbusmock")
17044 (version "0.18.3")
17045 (source
17046 (origin
17047 (method url-fetch)
17048 (uri (pypi-uri "python-dbusmock" version))
17049 (sha256
17050 (base32
17051 "0hp2kyac88nh9iv6l8hlmv7s1sa1s5f1a3wc2pmlmmxnd211fjlr"))))
17052 (build-system python-build-system)
17053 (arguments
17054 '(#:phases
17055 (modify-phases %standard-phases
17056 (add-after 'unpack 'patch-shell-path
17057 (lambda _
17058 (substitute* "tests/test_code.py"
17059 (("/bin/bash") (which "bash")))
17060 #t)))))
17061 (native-inputs
17062 `(;; For tests.
17063 ("dbus" ,dbus) ; for dbus-daemon
17064 ("python-nose" ,python-nose)
17065 ("which" ,which)))
17066 (propagated-inputs
17067 `(("python-dbus" ,python-dbus)
17068 ("python-pygobject" ,python-pygobject)))
17069 (home-page "https://github.com/martinpitt/python-dbusmock")
17070 (synopsis "Python library for mock D-Bus objects")
17071 (description "python-dbusmock allows for the easy creation of mock objects on
17072 D-Bus. This is useful for writing tests for software which talks to D-Bus
17073 services such as upower, systemd, logind, gnome-session or others, and it is
17074 hard (or impossible without root privileges) to set the state of the real
17075 services to what you expect in your tests.")
17076 (license license:lgpl3+)))
17077
17078 (define-public python-ujson
17079 (package
17080 (name "python-ujson")
17081 (version "1.35")
17082 (source
17083 (origin
17084 (method url-fetch)
17085 (uri (pypi-uri "ujson" version))
17086 (sha256
17087 (base32
17088 "11jz5wi7mbgqcsz52iqhpyykiaasila4lq8cmc2d54bfa3jp6q7n"))))
17089 (build-system python-build-system)
17090 (home-page "http://www.esn.me")
17091 (synopsis
17092 "Ultra fast JSON encoder and decoder for Python")
17093 (description
17094 "UltraJSON is an ultra fast JSON encoder and decoder written in pure C with
17095 bindings for Python 2.5+ and 3.")
17096 (license license:bsd-3)))
17097
17098 (define-public python2-ujson
17099 (package-with-python2 python-ujson))
17100
17101 (define-public python-iocapture
17102 ;; The latest release is more than a year older than this commit.
17103 (let ((commit "fdc021c431d0840303908dfc3ca8769db383595c")
17104 (revision "1"))
17105 (package
17106 (name "python-iocapture")
17107 (version "0.1.2")
17108 (source
17109 (origin
17110 (method git-fetch)
17111 (uri (git-reference
17112 (url "https://github.com/oinume/iocapture.git")
17113 (commit commit)))
17114 (file-name (git-file-name name version))
17115 (sha256
17116 (base32
17117 "1mkbhqibxvgwg0p7slr8dfraa3g2s6bsayladhax2jccwj4kcndz"))))
17118 (build-system python-build-system)
17119 (arguments
17120 `(#:phases
17121 (modify-phases %standard-phases
17122 (delete 'check)
17123 (add-after 'install 'check
17124 (lambda* (#:key inputs outputs #:allow-other-keys)
17125 (add-installed-pythonpath inputs outputs)
17126 (invoke "py.test" "-v" "tests")
17127 #t)))))
17128 (propagated-inputs
17129 `(("python-flexmock" ,python-flexmock)
17130 ("python-pytest" ,python-pytest)
17131 ("python-pytest-cov" ,python-pytest-cov)
17132 ("python-six" ,python-six)))
17133 (home-page "https://github.com/oinume/iocapture")
17134 (synopsis "Python capturing tool for stdout and stderr")
17135 (description
17136 "This package helps you to capture the standard out (stdout) and the
17137 standard error channel (stderr) in your program.")
17138 (license license:expat))))
17139
17140 (define-public python-argh
17141 ;; There are 21 commits since the latest release containing important
17142 ;; improvements.
17143 (let ((commit "dcd3253f2994400a6a58a700c118c53765bc50a4")
17144 (revision "1"))
17145 (package
17146 (name "python-argh")
17147 (version (git-version "0.26.2" revision commit))
17148 (source
17149 (origin
17150 (method git-fetch)
17151 (uri (git-reference
17152 (url "https://github.com/neithere/argh.git")
17153 (commit commit)))
17154 (file-name (git-file-name name version))
17155 (sha256
17156 (base32
17157 "1p5h3dnpbsjmqrvil96s71asc6i3gpinmbrabqmwnrsxprz7r3ns"))))
17158 (build-system python-build-system)
17159 (propagated-inputs
17160 `(("python-iocapture" ,python-iocapture)
17161 ("python-mock" ,python-mock)
17162 ("python-pytest" ,python-pytest)
17163 ("python-pytest-cov" ,python-pytest-cov)
17164 ("python-pytest-xdist" ,python-pytest-xdist)
17165 ("python-tox" ,python-tox)))
17166 (home-page "https://github.com/neithere/argh/")
17167 (synopsis "Argparse wrapper with natural syntax")
17168 (description
17169 "python-argh is a small library that provides several layers of
17170 abstraction on top of @code{python-argparse}. The layers can be mixed. It is
17171 always possible to declare a command with the highest possible (and least
17172 flexible) layer and then tune the behaviour with any of the lower layers
17173 including the native API of @code{python-argparse}.")
17174 (license license:lgpl3+))))
17175
17176 (define-public python-ppft
17177 (package
17178 (name "python-ppft")
17179 (version "1.6.6.1")
17180 (source
17181 (origin
17182 (method url-fetch)
17183 (uri (pypi-uri "ppft" version))
17184 (sha256
17185 (base32
17186 "1z1invkhszc5d2mvgr221v7cszzifcc77mz0pv3wjp6x5q2768cy"))))
17187 (build-system python-build-system)
17188 (arguments '(#:tests? #f)) ; there are none
17189 (propagated-inputs
17190 `(("python-six" ,python-six)))
17191 (home-page "https://pypi.org/project/ppft/")
17192 (synopsis "Fork of Parallel Python")
17193 (description
17194 "This package is a fork of Parallel Python. The Parallel Python
17195 module (@code{pp}) provides an easy and efficient way to create
17196 parallel-enabled applications for @dfn{symmetric multiprocessing} (SMP)
17197 computers and clusters. It features cross-platform portability and dynamic
17198 load balancing.")
17199 (license license:bsd-3)))
17200
17201 (define-public python-pox
17202 (package
17203 (name "python-pox")
17204 (version "0.2.7")
17205 (source
17206 (origin
17207 (method url-fetch)
17208 (uri (pypi-uri "pox" version))
17209 (sha256
17210 (base32
17211 "0y17ckc2p6i6709s279sjdj4q459mpcc38ymg9zv9y6vl6jf3bq6"))))
17212 (build-system python-build-system)
17213 (arguments
17214 `(#:phases
17215 (modify-phases %standard-phases
17216 (replace 'check
17217 (lambda _
17218 (mkdir-p "/tmp/guix")
17219 (setenv "SHELL" "bash")
17220 (setenv "USERNAME" "guix")
17221 (setenv "HOME" "/tmp/guix") ; must end on USERNAME...
17222 (invoke "py.test" "-vv")
17223 #t)))))
17224 (native-inputs
17225 `(("python-pytest" ,python-pytest)
17226 ("which" ,which)))
17227 (home-page "https://pypi.org/project/pox/")
17228 (synopsis "Python utilities for filesystem exploration and automated builds")
17229 (description
17230 "Pox provides a collection of utilities for navigating and manipulating
17231 filesystems. This module is designed to facilitate some of the low level
17232 operating system interactions that are useful when exploring a filesystem on a
17233 remote host. Pox provides Python equivalents of several shell commands such
17234 as @command{which} and @command{find}. These commands allow automated
17235 discovery of what has been installed on an operating system, and where the
17236 essential tools are located.")
17237 (license license:bsd-3)))
17238
17239 (define-public python-pathos
17240 (package
17241 (name "python-pathos")
17242 (version "0.2.5")
17243 (source
17244 (origin
17245 (method url-fetch)
17246 (uri (pypi-uri "pathos" version))
17247 (sha256
17248 (base32
17249 "0in8hxdz7k081ijn6q94gr39ycy7363sx4zysmbwyvd7snqjrbi1"))))
17250 (build-system python-build-system)
17251 (arguments
17252 '(#:phases
17253 (modify-phases %standard-phases
17254 (replace 'check
17255 (lambda _
17256 (setenv "PYTHONPATH"
17257 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
17258 (invoke "python" "./tests/__main__.py"))))))
17259 (propagated-inputs
17260 `(("python-dill" ,python-dill)
17261 ("python-multiprocess" ,python-multiprocess)
17262 ("python-pox" ,python-pox)
17263 ("python-ppft" ,python-ppft)))
17264 (native-inputs
17265 `(("python-pytest" ,python-pytest)))
17266 (home-page "https://pypi.org/project/pathos/")
17267 (synopsis
17268 "Parallel graph management and execution in heterogeneous computing")
17269 (description
17270 "Python-pathos is a framework for heterogenous computing. It provides a
17271 consistent high-level interface for configuring and launching parallel
17272 computations across heterogenous resources. Python-pathos provides configurable
17273 launchers for parallel and distributed computing, where each launcher contains
17274 the syntactic logic to configure and launch jobs in an execution environment.")
17275 (license license:bsd-3)))
17276
17277 (define-public python-flit
17278 (package
17279 (name "python-flit")
17280 (version "2.1.0")
17281 (source
17282 (origin
17283 (method url-fetch)
17284 (uri (pypi-uri "flit" version))
17285 (sha256
17286 (base32
17287 "0h5vvmqinqzn97mr3ix7zx53af9ad4fimjjwqpx88yp8qhz4r5bc"))))
17288 (build-system python-build-system)
17289 (arguments
17290 `(#:tests? #f)) ; XXX: Check requires network access.
17291 (home-page "https://flit.readthedocs.io/")
17292 (synopsis
17293 "Simple packaging tool for simple packages")
17294 (description
17295 "Flit is a simple way to put Python packages and modules on PyPI. Flit
17296 packages a single importable module or package at a time, using the import
17297 name as the name on PyPI. All subpackages and data files within a package
17298 are included automatically.")
17299 (license license:bsd-3)))
17300
17301 (define-public python-pathtools
17302 (package
17303 (name "python-pathtools")
17304 (version "0.1.2")
17305 (source
17306 (origin
17307 (method url-fetch)
17308 (uri (pypi-uri "pathtools" version))
17309 (sha256
17310 (base32
17311 "1h7iam33vwxk8bvslfj4qlsdprdnwf8bvzhqh3jq5frr391cadbw"))))
17312 (build-system python-build-system)
17313 (home-page
17314 "https://github.com/gorakhargosh/pathtools")
17315 (synopsis "Path utilities for Python")
17316 (description "Pattern matching and various utilities for file systems
17317 paths.")
17318 (license license:expat)))
17319
17320 (define-public python-fastentrypoints
17321 (package
17322 (name "python-fastentrypoints")
17323 (version "0.12")
17324 (source
17325 (origin
17326 (method url-fetch)
17327 (uri (pypi-uri "fastentrypoints" version))
17328 (sha256
17329 (base32
17330 "02s1j8i2dzbpbwgq2a3fiqwm3cnmhii2qzc0k42l0rdxd4a4ya7z"))))
17331 (build-system python-build-system)
17332 (home-page
17333 "https://github.com/ninjaaron/fast-entry_points")
17334 (synopsis
17335 "Makes entry_points specified in setup.py load more quickly")
17336 (description
17337 "Using entry_points in your setup.py makes scripts that start really
17338 slowly because it imports pkg_resources. This package allows such setup
17339 scripts to load entry points more quickly.")
17340 (license license:bsd-3)))
17341
17342 (define-public python-funcparserlib
17343 (package
17344 (name "python-funcparserlib")
17345 (version "0.3.6")
17346 (source
17347 (origin
17348 (method url-fetch)
17349 (uri (pypi-uri "funcparserlib" version))
17350 (sha256
17351 (base32
17352 "07f9cgjr3h4j2m67fhwapn8fja87vazl58zsj4yppf9y3an2x6dp"))))
17353 (native-inputs
17354 `(("python-tox" ,python-tox)))
17355 (arguments
17356 `(#:phases
17357 (modify-phases %standard-phases
17358 (replace 'check
17359 (lambda _
17360 (invoke "tox"))))))
17361 (build-system python-build-system)
17362 (home-page
17363 "https://github.com/vlasovskikh/funcparserlib")
17364 (synopsis
17365 "Recursive descent parsing library based on functional combinators")
17366 (description
17367 "This package is a recursive descent parsing library for Python based on
17368 functional combinators. Parser combinators are just higher-order functions
17369 that take parsers as their arguments and return them as result values.")
17370 (license license:expat)))
17371
17372 (define-public python-speg
17373 (package
17374 (name "python-speg")
17375 (version "0.3")
17376 (source
17377 (origin
17378 (method url-fetch)
17379 (uri (pypi-uri "speg" version ".zip"))
17380 (sha256
17381 (base32 "0w9y4jf4787dzhy6rvhwi0mpl0r8qkqmqmyv2hpwdpv8w53yzjqh"))))
17382 (arguments
17383 `(#:tests? #f)) ;FIXME: tests fail, not sure why
17384 (native-inputs
17385 `(("unzip" ,unzip)))
17386 (build-system python-build-system)
17387 (home-page "https://github.com/avakar/speg")
17388 (synopsis "PEG-based parser interpreter with memoization")
17389 (description "This package is a PEG-based parser and interpreter with
17390 memoization.")
17391 (license license:expat)))
17392
17393 (define-public python-cson
17394 (package
17395 (name "python-cson")
17396 (version "0.8")
17397 (source
17398 (origin
17399 (method url-fetch)
17400 (uri (pypi-uri "cson" version))
17401 (sha256
17402 (base32 "00cyvigg4npbph39ghkg77xbxisa6plf75vii24igxfizik0337f"))))
17403 (build-system python-build-system)
17404 (propagated-inputs
17405 `(("python-speg" ,python-speg)))
17406 (home-page "https://github.com/avakar/pycson")
17407 (synopsis "Parser for Coffeescript Object Notation (CSON)")
17408 (description "This package is a parser for Coffeescript Object
17409 Notation (CSON).")
17410 (license license:expat)))
17411
17412 (define-public python-asynctest
17413 (package
17414 (name "python-asynctest")
17415 (version "0.13.0")
17416 (source
17417 (origin
17418 (method url-fetch)
17419 (uri (pypi-uri "asynctest" version))
17420 (sha256
17421 (base32
17422 "1b3zsy7p84gag6q8ai2ylyrhx213qdk2h2zb6im3xn0m5n264y62"))))
17423 (build-system python-build-system)
17424 (arguments
17425 '(#:phases
17426 (modify-phases %standard-phases
17427 (replace 'check
17428 (lambda _
17429 (invoke "python" "-X" "dev" "-m" "unittest" "-v" "test")))
17430 (add-after 'unpack 'disable-tests
17431 (lambda* _
17432 (substitute* "test/test_selector.py"
17433 ;; XXX: This test fails for unknown reason inside the build
17434 ;; environment.
17435 (("def test_events_watched_outside_test_are_ignored")
17436 "@unittest.skip('disabled by guix')
17437 def test_events_watched_outside_test_are_ignored")))))))
17438 (home-page "https://github.com/Martiusweb/asynctest")
17439 (synopsis "Extension of unittest for testing asyncio libraries")
17440 (description
17441 "The package asynctest is built on top of the standard unittest module
17442 and cuts down boilerplate code when testing libraries for asyncio.")
17443 (license license:asl2.0)))
17444
17445 (define-public python-aionotify
17446 (package
17447 (name "python-aionotify")
17448 (version "0.2.0")
17449 (source
17450 (origin
17451 ;; Source tarball on PyPi lacks tests
17452 (method git-fetch)
17453 (uri (git-reference
17454 (url "https://github.com/rbarrois/aionotify")
17455 (commit (string-append "v" version))))
17456 (file-name (git-file-name name version))
17457 (sha256
17458 (base32 "1sk9i8czxgsbrswsf1nlb4c82vgnlzi8zrvrxdip92w2z8hqh43y"))))
17459 (build-system python-build-system)
17460 (native-inputs `(("python-asynctest" ,python-asynctest)))
17461 (home-page "https://github.com/rbarrois/aionotify")
17462 (synopsis "Asyncio-powered inotify library")
17463 (description
17464 "@code{aionotify} is a simple, asyncio-based inotify library.")
17465 (license license:bsd-3)))
17466
17467 (define-public python-forbiddenfruit
17468 (package
17469 (name "python-forbiddenfruit")
17470 (version "0.1.3")
17471 (source
17472 (origin
17473 ;; Source tarball on PyPi lacks Makefile that builds and runs tests
17474 (method git-fetch)
17475 (uri (git-reference
17476 (url "https://github.com/clarete/forbiddenfruit")
17477 (commit version)))
17478 (file-name (git-file-name name version))
17479 (sha256
17480 (base32 "1fp2xvdqpi910j9r3q68x38phpxbm700gjdi2m2j5gs91xdnyyh2"))))
17481 (build-system python-build-system)
17482 (arguments
17483 '(#:phases
17484 (modify-phases %standard-phases
17485 (replace 'check
17486 (lambda _
17487 (invoke "make" "SKIP_DEPS=1"))))))
17488 (native-inputs
17489 `(("python-nose" ,python-nose)
17490 ("python-coverage" ,python-coverage)))
17491 (home-page "https://github.com/clarete/forbiddenfruit")
17492 (synopsis "Patch python built-in objects")
17493 (description "This project allows Python code to extend built-in types.")
17494 (license (list license:gpl3+ license:expat))))
17495
17496 (define-public python-shouldbe
17497 (package
17498 (name "python-shouldbe")
17499 (version "0.1.2")
17500 (source
17501 (origin
17502 (method url-fetch)
17503 (uri (pypi-uri "shouldbe" version))
17504 (sha256
17505 (base32
17506 "16zbvjxf71dl4yfbgcr6idyim3mdrfvix1dv8b95p0s9z07372pj"))))
17507 (build-system python-build-system)
17508 (propagated-inputs
17509 `(("python-forbiddenfruit" ,python-forbiddenfruit)))
17510 (native-inputs
17511 `(("python-nose" ,python-nose)))
17512 (home-page "https://github.com/directxman12/should_be")
17513 (synopsis "Python Assertion Helpers inspired by Shouldly")
17514 (description
17515 "Python Assertion Helpers inspired by Shouldly.")
17516 (license license:isc)))
17517
17518 (define-public python-k5test
17519 (package
17520 (name "python-k5test")
17521 (version "0.9.2")
17522 (source
17523 (origin
17524 (method url-fetch)
17525 (uri (pypi-uri "k5test" version))
17526 (sha256
17527 (base32
17528 "1lqp3jgfngyhaxjgj3n230hn90wsylwilh120yjf62h7b1s02mh8"))))
17529 (build-system python-build-system)
17530 (propagated-inputs
17531 `(("python-six" ,python-six)
17532 ;; `which`, `kadmin.local` binaries called inside library
17533 ("which" ,which)
17534 ("mit-krb5" ,mit-krb5)))
17535 (native-inputs `(("mit-krb5" ,mit-krb5)))
17536 (arguments
17537 '(#:phases
17538 (modify-phases %standard-phases
17539 (add-after 'unpack 'patch-paths
17540 (lambda* _
17541 (substitute* "k5test/realm.py"
17542 (("'kadmin_local'") "'kadmin.local'")))))))
17543 (home-page "https://github.com/pythongssapi/k5test")
17544 (synopsis "Library for setting up self-contained Kerberos 5 environments")
17545 (description
17546 "@code{k5test} is a library for setting up self-contained Kerberos 5
17547 environments, and running Python unit tests inside those environments. It is
17548 based on the file of the same name found alongside the MIT Kerberos 5 unit
17549 tests.")
17550 (license license:isc)))
17551
17552 (define-public python-gssapi
17553 (package
17554 (name "python-gssapi")
17555 (version "1.6.1")
17556 (source
17557 (origin
17558 (method url-fetch)
17559 (uri (pypi-uri "gssapi" version))
17560 (sha256
17561 (base32
17562 "1gymg4asvwrz7y13qpwp2s5g8qwq179d72gkj09q6bfcgs82l5wr"))))
17563 (build-system python-build-system)
17564 (propagated-inputs
17565 `(("python-decorator" ,python-decorator)
17566 ("python-six" ,python-six)))
17567 (inputs
17568 `(("mit-krb5" ,mit-krb5)))
17569 ;; for tests
17570 (native-inputs
17571 `(("python-shouldbe" ,python-shouldbe)
17572 ("python-parameterized" ,python-parameterized)
17573 ("python-k5test" ,python-k5test)
17574 ("python-nose" ,python-nose)))
17575 (home-page "https://github.com/pythongssapi/python-gssapi")
17576 (synopsis "Python GSSAPI Wrapper")
17577 (description
17578 "Python-GSSAPI provides both low-level and high level wrappers around the
17579 GSSAPI C libraries. While it focuses on the Kerberos mechanism, it should
17580 also be useable with other GSSAPI mechanisms.")
17581 (license license:isc)))
17582
17583 (define-public python-check-manifest
17584 (package
17585 (name "python-check-manifest")
17586 (version "0.37")
17587 (source
17588 (origin
17589 (method url-fetch)
17590 (uri (pypi-uri "check-manifest" version))
17591 (sha256
17592 (base32
17593 "0lk45ifdv2cpkl6ayfyix7jwmnxa1rha7xvb0ih5999k115wzqs4"))))
17594 (build-system python-build-system)
17595 (native-inputs
17596 `(("python-mock" ,python-mock)
17597 ("git" ,git)))
17598 (home-page "https://github.com/mgedmin/check-manifest")
17599 (synopsis "Check MANIFEST.in in a Python source package for completeness")
17600 (description "Python package can include a MANIFEST.in file to help with
17601 sending package files to the Python Package Index. This package checks that
17602 file to ensure it completely and accurately describes your project.")
17603 (license license:expat)))
17604
17605 (define-public python-android-stringslib
17606 (package
17607 (name "python-android-stringslib")
17608 (version "0.1.2")
17609 (source
17610 (origin
17611 (method git-fetch)
17612 (uri (git-reference
17613 (url "https://framagit.org/tyreunom/python-android-strings-lib")
17614 (commit (string-append "v" version))))
17615 (file-name (git-file-name name version))
17616 (sha256
17617 (base32
17618 "0gij55qzzq1h83kfpvhai1vf78kkhyvxa6l17m2nl24454lhfin4"))))
17619 (build-system python-build-system)
17620 (arguments
17621 `(#:tests? #f))
17622 (home-page "https://framagit.org/tyreunom/python-android-strings-lib")
17623 (synopsis "Android strings.xml support")
17624 (description "Android Strings Lib provides support for android's strings.xml
17625 files. These files are used to translate strings in android apps.")
17626 (license license:expat)))
17627
17628 (define-public python-watchdog
17629 (package
17630 (name "python-watchdog")
17631 (version "0.9.0")
17632 (source
17633 (origin
17634 (method url-fetch)
17635 (uri (pypi-uri "watchdog" version))
17636 (sha256
17637 (base32
17638 "07cnvvlpif7a6cg4rav39zq8fxa5pfqawchr46433pij0y6napwn"))))
17639 (build-system python-build-system)
17640 (arguments
17641 `(#:phases
17642 (modify-phases %standard-phases
17643 (add-before 'check 'remove-failing
17644 (lambda _
17645 (delete-file "tests/test_inotify_buffer.py")
17646 (delete-file "tests/test_snapshot_diff.py")
17647 #t)))))
17648 (propagated-inputs
17649 `(("python-argh" ,python-argh)
17650 ("python-pathtools" ,python-pathtools)
17651 ("python-pyyaml" ,python-pyyaml)))
17652 (native-inputs
17653 `(("python-pytest-cov" ,python-pytest-cov)
17654 ("python-pytest-timeout" ,python-pytest-timeout)))
17655 (home-page "https://github.com/gorakhargosh/watchdog")
17656 (synopsis "Filesystem events monitoring")
17657 (description "This package provides a way to monitor filesystem events
17658 such as a file modification and trigger an action. This is similar to inotify,
17659 but portable.")
17660 (license license:asl2.0)))
17661
17662 (define-public python-wget
17663 (package
17664 (name "python-wget")
17665 (version "3.2")
17666 (source
17667 (origin
17668 (method url-fetch)
17669 (uri (pypi-uri "wget" version ".zip"))
17670 (sha256
17671 (base32
17672 "0qb0y7ipby42m4m7h0ipazpdyc3bn9xi46lvifcwwl5albn31rim"))))
17673 (build-system python-build-system)
17674 (native-inputs `(("unzip" ,unzip)))
17675 (home-page "https://bitbucket.org/techtonik/python-wget/")
17676 (synopsis "Pure Python download utility")
17677 (description "The python-wget library provides an API to download files
17678 with features similar to the @command{wget} utility.")
17679 (license license:unlicense)))
17680
17681 (define-public offlate
17682 (package
17683 (name "offlate")
17684 (version "0.5")
17685 (source
17686 (origin
17687 (method git-fetch)
17688 (uri (git-reference
17689 (url "https://framagit.org/tyreunom/offlate")
17690 (commit version)))
17691 (file-name (git-file-name name version))
17692 (sha256
17693 (base32
17694 "13pqnbl05wcyldfvl75fp89vjgwsvxyc69vhnb17kkha2rc2k1h7"))))
17695 (build-system python-build-system)
17696 (arguments
17697 ;; No tests
17698 `(#:tests? #f))
17699 (propagated-inputs
17700 `(("python-android-stringslib" ,python-android-stringslib)
17701 ("python-dateutil" ,python-dateutil)
17702 ("python-gitlab" ,python-gitlab)
17703 ("python-lxml" ,python-lxml)
17704 ("python-polib" ,python-polib)
17705 ("python-pyenchant" ,python-pyenchant)
17706 ("python-pygit2" ,python-pygit2)
17707 ("python-pygithub" ,python-pygithub)
17708 ("python-pyqt" ,python-pyqt)
17709 ("python-requests" ,python-requests)
17710 ("python-ruamel.yaml" ,python-ruamel.yaml)
17711 ("python-translation-finder" ,python-translation-finder)
17712 ("python-watchdog" ,python-watchdog)))
17713 (native-inputs
17714 `(("qttools" ,qttools)))
17715 (home-page "https://framagit.org/tyreunom/offlate")
17716 (synopsis "Offline translation interface for online translation tools")
17717 (description "Offlate offers a unified interface for different translation
17718 file formats, as well as many different online translation platforms. You can
17719 use it to get work from online platforms, specialized such as the Translation
17720 Project, or not such a gitlab instance when your upstream doesn't use any
17721 dedicated platform. The tool proposes a unified interface for any format and
17722 an upload option to send your work back to the platform.")
17723 (license license:gpl3+)))
17724
17725 (define-public python-pypng
17726 (package
17727 (name "python-pypng")
17728 (version "0.0.20")
17729 (source
17730 (origin
17731 (method url-fetch)
17732 (uri (pypi-uri "pypng" version))
17733 (sha256
17734 (base32 "02qpa22ls41vwsrzw9r9qhj1nhq05p03hb5473pay6y980s86chh"))))
17735 (build-system python-build-system)
17736 (home-page "https://github.com/drj11/pypng")
17737 (synopsis "Pure Python PNG image encoder/decoder")
17738 (description
17739 "The PyPNG module implements support for PNG images. It reads and writes
17740 PNG files with all allowable bit depths (1/2/4/8/16/24/32/48/64 bits per
17741 pixel) and colour combinations: greyscale (1/2/4/8/16 bit); RGB, RGBA,
17742 LA (greyscale with alpha) with 8/16 bits per channel; colour mapped
17743 images (1/2/4/8 bit). Adam7 interlacing is supported for reading and writing.
17744 A number of optional chunks can be specified (when writing) and
17745 understood (when reading): tRNS, bKGD, gAMA.
17746
17747 PyPNG is not a high level toolkit for image processing (like PIL) and does not
17748 aim at being a replacement or competitor. Its strength lies in fine-grained
17749 extensive support of PNG features. It can also read and write Netpbm PAM
17750 files, with a focus on its use as an intermediate format for implementing
17751 custom PNG processing.")
17752 (license license:expat)))
17753
17754 (define-public python-fuzzywuzzy
17755 (package
17756 (name "python-fuzzywuzzy")
17757 (version "0.18.0")
17758 (source
17759 (origin
17760 (method url-fetch)
17761 (uri (pypi-uri "fuzzywuzzy" version))
17762 (sha256
17763 (base32
17764 "1s00zn75y2dkxgnbw8kl8dw4p1mc77cv78fwfa4yb0274s96w0a5"))))
17765 (build-system python-build-system)
17766 (native-inputs
17767 `(("python-hypothesis" ,python-hypothesis)
17768 ("python-pycodestyle" ,python-pycodestyle)
17769 ("python-pytest" ,python-pytest)))
17770 (propagated-inputs
17771 `(("python-levenshtein" ,python-levenshtein)))
17772 (home-page "https://github.com/seatgeek/fuzzywuzzy")
17773 (synopsis "Fuzzy string matching in Python")
17774 (description "Approximate string matching using
17775 @emph{Levenshtein Distance} to calculate the differences between
17776 sequences.")
17777 (license license:gpl2)))
17778
17779 (define-public python2-fuzzywuzzy
17780 (package-with-python2 python-fuzzywuzzy))