gnu: guix: Update to f63e493.
[jackhill/guix/guix.git] / gnu / packages / python-xyz.scm
CommitLineData
44d10b1f
RW
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
2d040763 3;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
fa8ffaa0 4;;; Copyright © 2013, 2014, 2015, 2016, 2019 Andreas Enge <andreas@enge.fr>
44d10b1f
RW
5;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
6;;; Copyright © 2014, 2017 Eric Bavier <bavier@member.fsf.org>
7;;; Copyright © 2014, 2015 Federico Beffa <beffa@fbengineering.ch>
8;;; Copyright © 2015 Omar Radwan <toxemicsquire4@gmail.com>
9;;; Copyright © 2015 Pierre-Antoine Rault <par@rigelk.eu>
10;;; Copyright © 2015, 2016, 2017, 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
11;;; Copyright © 2015, 2016 Christopher Allan Webber <cwebber@dustycloud.org>
12;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
13;;; Copyright © 2015, 2016 David Thompson <davet@gnu.org>
b742c006 14;;; Copyright © 2015, 2016, 2017, 2019 Leo Famulari <leo@famulari.name>
44d10b1f
RW
15;;; Copyright © 2015, 2017 Ben Woodcroft <donttrustben@gmail.com>
16;;; Copyright © 2015, 2016 Erik Edrosa <erik.edrosa@gmail.com>
17;;; Copyright © 2015, 2016, 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
18;;; Copyright © 2015, 2017 Kyle Meyer <kyle@kyleam.com>
19;;; Copyright © 2015, 2016 Chris Marusich <cmmarusich@gmail.com>
20;;; Copyright © 2016 Danny Milosavljevic <dannym+a@scratchpost.org>
21;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
8581b40d 22;;; Copyright © 2016, 2018-2019 Hartmut Goebel <h.goebel@crazy-compilers.com>
44d10b1f
RW
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>
47956fa0 26;;; Copyright © 2016, 2017 ng0 <ng0@n0.is>
44d10b1f
RW
27;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
28;;; Copyright © 2016 David Craven <david@craven.ch>
47f66348 29;;; Copyright © 2016, 2017, 2018, 2019 Marius Bakke <mbakke@fastmail.com>
44d10b1f
RW
30;;; Copyright © 2016, 2017 Stefan Reichör <stefan@xsteve.at>
31;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
e746d1c3 32;;; Copyright © 2016, 2017, 2019 Alex Vong <alexvong1995@gmail.com>
44d10b1f
RW
33;;; Copyright © 2016, 2017, 2018 Arun Isaac <arunisaac@systemreboot.net>
34;;; Copyright © 2016, 2017, 2018 Julien Lepiller <julien@lepiller.eu>
217ea1a1 35;;; Copyright © 2016, 2017, 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
44d10b1f
RW
36;;; Copyright © 2016, 2017 Thomas Danckaert <post@thomasdanckaert.be>
37;;; Copyright © 2017 Carlo Zancanaro <carlo@zancanaro.id.au>
38;;; Copyright © 2017 Frederick M. Muriithi <fredmanglis@gmail.com>
39;;; Copyright © 2017, 2018 Adriano Peluso <catonano@gmail.com>
40;;; Copyright © 2017 Ben Sturmfels <ben@sturm.com.au>
41;;; Copyright © 2017, 2018 Mathieu Othacehe <m.othacehe@gmail.com>
42;;; Copyright © 2017 José Miguel Sánchez García <jmi2k@openmailbox.org>
43;;; Copyright © 2017 Roel Janssen <roel@gnu.org>
44;;; Copyright © 2017, 2018 Kei Kebreau <kkebreau@posteo.net>
45;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
46;;; Copyright © 2017 Muriithi Frederick Muriuki <fredmanglis@gmail.com>
dcfa0acd 47;;; Copyright © 2017, 2019 Brendan Tildesley <mail@brendan.scot>
44d10b1f
RW
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>
412342d1 54;;; Copyright © 2018, 2019 Nicolas Goaziou <mail@nicolasgoaziou.fr>
44d10b1f
RW
55;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
56;;; Copyright © 2018 Clément Lassieur <clement@lassieur.org>
4caf37b0 57;;; Copyright © 2018, 2019 Maxim Cournoyer <maxim.cournoyer@gmail.com>
44d10b1f
RW
58;;; Copyright © 2018 Luther Thompson <lutheroto@gmail.com>
59;;; Copyright © 2018 Vagrant Cascadian <vagrant@debian.org>
a9ba0a31 60;;; Copyright © 2019 Brett Gilio <brettg@posteo.net>
a91f4eba 61;;; Copyright © 2019 Sam <smbaines8@gmail.com>
8c141421 62;;; Copyright © 2019 Jack Hill <jackhill@jackhill.us>
f825e605 63;;; Copyright © 2019 Guillaume Le Vaillant <glv@posteo.net>
fb236fdd 64;;; Copyright © 2019 Alex Griffin <a@ajgrf.com>
edeb04bf 65;;; Copyright © 2019 Pierre Langlois <pierre.langlois@gmx.com>
e308b4f0 66;;; Copyright © 2019 Jacob MacDonald <jaccarmac@gmail.com>
30e7c03a 67;;; Copyright © 2019 Giacomo Leidi <goodoldpaul@autistici.org>
c1bbef69 68;;; Copyright © 2019 Wiktor Żelazny <wzelazny@vurv.cz>
ba42a6bf 69;;; Copyright © 2019 Tanguy Le Carrour <tanguy@bioneland.org>
44d10b1f
RW
70;;;
71;;; This file is part of GNU Guix.
72;;;
73;;; GNU Guix is free software; you can redistribute it and/or modify it
74;;; under the terms of the GNU General Public License as published by
75;;; the Free Software Foundation; either version 3 of the License, or (at
76;;; your option) any later version.
77;;;
78;;; GNU Guix is distributed in the hope that it will be useful, but
79;;; WITHOUT ANY WARRANTY; without even the implied warranty of
80;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
81;;; GNU General Public License for more details.
82;;;
83;;; You should have received a copy of the GNU General Public License
84;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
85
86(define-module (gnu packages python-xyz)
87 #:use-module ((guix licenses) #:prefix license:)
88 #:use-module (gnu packages)
89 #:use-module (gnu packages algebra)
90 #:use-module (gnu packages adns)
91 #:use-module (gnu packages attr)
92 #:use-module (gnu packages backup)
93 #:use-module (gnu packages bash)
94 #:use-module (gnu packages check)
95 #:use-module (gnu packages compression)
96 #:use-module (gnu packages crypto)
97 #:use-module (gnu packages databases)
f825e605 98 #:use-module (gnu packages dbm)
44d10b1f
RW
99 #:use-module (gnu packages file)
100 #:use-module (gnu packages fontutils)
101 #:use-module (gnu packages gcc)
102 #:use-module (gnu packages geo)
103 #:use-module (gnu packages ghostscript)
104 #:use-module (gnu packages gl)
105 #:use-module (gnu packages glib)
106 #:use-module (gnu packages graphviz)
107 #:use-module (gnu packages graphics)
108 #:use-module (gnu packages gstreamer)
109 #:use-module (gnu packages gtk)
110 #:use-module (gnu packages icu4c)
111 #:use-module (gnu packages image)
112 #:use-module (gnu packages imagemagick)
113 #:use-module (gnu packages libevent)
114 #:use-module (gnu packages libffi)
115 #:use-module (gnu packages linux)
116 #:use-module (gnu packages llvm)
117 #:use-module (gnu packages man)
118 #:use-module (gnu packages maths)
42f0b0c2 119 #:use-module (gnu packages monitoring)
44d10b1f
RW
120 #:use-module (gnu packages multiprecision)
121 #:use-module (gnu packages networking)
122 #:use-module (gnu packages ncurses)
123 #:use-module (gnu packages openstack)
124 #:use-module (gnu packages pcre)
125 #:use-module (gnu packages perl)
126 #:use-module (gnu packages pkg-config)
127 #:use-module (gnu packages python)
d362b11d 128 #:use-module (gnu packages python-check)
15b65617 129 #:use-module (gnu packages python-compression)
44d10b1f
RW
130 #:use-module (gnu packages python-crypto)
131 #:use-module (gnu packages python-web)
132 #:use-module (gnu packages qt)
133 #:use-module (gnu packages readline)
134 #:use-module (gnu packages sdl)
135 #:use-module (gnu packages search)
136 #:use-module (gnu packages shells)
9d0c291e 137 #:use-module (gnu packages sphinx)
44d10b1f
RW
138 #:use-module (gnu packages ssh)
139 #:use-module (gnu packages terminals)
140 #:use-module (gnu packages tex)
141 #:use-module (gnu packages texinfo)
142 #:use-module (gnu packages time)
143 #:use-module (gnu packages tls)
144 #:use-module (gnu packages version-control)
145 #:use-module (gnu packages video)
146 #:use-module (gnu packages web)
147 #:use-module (gnu packages base)
148 #:use-module (gnu packages xml)
149 #:use-module (gnu packages xorg)
150 #:use-module (gnu packages xdisorg)
151 #:use-module (gnu packages tcl)
152 #:use-module (gnu packages bdw-gc)
f98232a3 153 #:use-module (gnu packages serialization)
44d10b1f
RW
154 #:use-module (guix packages)
155 #:use-module (guix download)
156 #:use-module (guix git-download)
a042d348 157 #:use-module (guix hg-download)
44d10b1f
RW
158 #:use-module (guix utils)
159 #:use-module (guix build-system gnu)
160 #:use-module (guix build-system cmake)
161 #:use-module (guix build-system python)
162 #:use-module (guix build-system trivial)
163 #:use-module (srfi srfi-1)
164 #:use-module (srfi srfi-26))
165
166(define-public python-psutil
167 (package
168 (name "python-psutil")
7abf3cbf 169 (version "5.6.2")
44d10b1f
RW
170 (source
171 (origin
172 (method url-fetch)
173 (uri (pypi-uri "psutil" version))
174 (sha256
175 (base32
7abf3cbf 176 "1v95vb5385qscfdvphv8l2w22bmir3d7yhpi02n58v3mlqy1r3l2"))))
44d10b1f
RW
177 (build-system python-build-system)
178 (arguments
179 ;; FIXME: some tests does not return and times out.
180 '(#:tests? #f))
181 (home-page "https://www.github.com/giampaolo/psutil")
182 (synopsis "Library for retrieving information on running processes")
183 (description
184 "psutil (Python system and process utilities) is a library for retrieving
185information on running processes and system utilization (CPU, memory, disks,
186network) in Python. It is useful mainly for system monitoring, profiling and
187limiting process resources and management of running processes. It implements
188many functionalities offered by command line tools such as: ps, top, lsof,
189netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
190pidof, tty, taskset, pmap.")
191 (properties `((python2-variant . ,(delay python2-psutil))))
192 (license license:bsd-3)))
193
194(define-public python2-psutil
195 (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
196 (package
197 (inherit base)
198 (propagated-inputs
199 `(("python2-enum34" ,python2-enum34) ;optional
200 ,@(package-propagated-inputs base))))))
201
202(define-public python-shapely
203 (package
204 (name "python-shapely")
6d94465b 205 (version "1.6.4.post2")
44d10b1f
RW
206 (source
207 (origin
208 (method url-fetch)
209 (uri (pypi-uri "Shapely" version))
210 (sha256
211 (base32
6d94465b 212 "03r42fmd9alp6r3q95ad6rldq2f7n1wimrw53zy5kpn33yv7pf64"))))
44d10b1f
RW
213 (build-system python-build-system)
214 (native-inputs
215 `(("python-cython" ,python-cython)
216 ("python-matplotlib" ,python-matplotlib)
217 ("python-pytest" ,python-pytest)
218 ("python-pytest-cov" ,python-pytest-cov)))
219 (inputs
220 `(("geos" ,geos)))
221 (propagated-inputs
222 `(("python-numpy" ,python-numpy)))
223 (arguments
224 `(#:phases
225 (modify-phases %standard-phases
226 (add-after 'unpack 'patch-geos-path
227 (lambda* (#:key inputs #:allow-other-keys)
228 (let ((geos (assoc-ref inputs "geos"))
229 (glibc (assoc-ref inputs ,(if (%current-target-system)
230 "cross-libc" "libc"))))
231 (substitute* "shapely/geos.py"
232 (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)")
233 (string-append "_lgeos = load_dll('geos_c', fallbacks=['"
234 geos "/lib/libgeos_c.so'])"))
235 (("free = load_dll\\('c'\\)\\.free")
236 (string-append "free = load_dll('c', fallbacks=['"
237 glibc "/lib/libc.so.6']).free"))))
238 #t)))))
239 (home-page "https://github.com/Toblerity/Shapely")
240 (synopsis "Library for the manipulation and analysis of geometric objects")
241 (description "Shapely is a Python package for manipulation and analysis of
242planar geometric objects. It is based on the @code{GEOS} library.")
243 (license license:bsd-3)))
244
a91f4eba
S
245(define-public python-shortuuid
246 (package
247 (name "python-shortuuid")
248 (version "0.5.0")
249 (source
250 (origin
251 (method url-fetch)
252 (uri (pypi-uri "shortuuid" version))
253 (sha256
254 (base32
255 "1f8i4zwj5vmpzbz6b17bljy4399gx5aq7vsyw63sz2qgyjcd73yh"))))
256 (build-system python-build-system)
257 (native-inputs
258 `(("python-pep8" ,python-pep8)))
259 (home-page "https://github.com/skorokithakis/shortuuid")
260 (synopsis "Generator library for concise, unambiguous and URL-safe UUIDs")
261 (description
262 "@code{shortuuid} is a Python library for generating concise, unambiguous
263and URL-safe UUIDs. UUIDs are generated using the built-in Python @code{uuid}
264module and then similar looking characters are removed.")
265 (license license:bsd-3)))
266
44d10b1f
RW
267(define-public python-logwrap
268 (package
269 (name "python-logwrap")
270 (version "3.2.1")
271 (source
272 (origin
273 (method url-fetch)
274 (uri (pypi-uri "logwrap" version ".zip"))
275 (sha256
276 (base32
277 "1d2k0hvpbi51vl410y8fbs5m0nxnlh2k7gr2nrh3k81ibhzscsra"))))
278 (build-system python-build-system)
279 (propagated-inputs
280 `(("python-six" ,python-six)
281 ("python-typing" ,python-typing)))
282 (native-inputs
283 `(("unzip" ,unzip)
284 ("python-cython" ,python-cython)
285 ("python-pytest" ,python-pytest)
286 ("python-pytest-cov" ,python-pytest-cov)
287 ("python-pytest-runner" ,python-pytest-runner)))
288 (home-page "https://github.com/penguinolog/logwrap")
289 (synopsis "Decorator for logging function arguments")
290 (description "This package provides a decorator to log function arguments
291and function call return values in a human-readable way.")
292 (license license:asl2.0)))
293
294(define-public python2-shapely
295 (package-with-python2 python-shapely))
296
297(define-public python-clyent
298 (package
299 (name "python-clyent")
300 (version "1.2.1")
301 (source
302 (origin
303 (method url-fetch)
304 (uri (pypi-uri "clyent" version))
305 (sha256
306 (base32
307 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
308 (build-system python-build-system)
309 (native-inputs
310 `(("python-mock" ,python-mock)))
311 (home-page "https://github.com/binstar/clyent")
312 (synopsis "Command line client library")
313 (description "Clyent is a Python command line utiliy library. It is used
314by @code{binstar}, @code{binstar-build} and @code{chalmers}.")
315 (license license:bsd-3)))
316
317(define-public python2-clyent
318 (package-with-python2 python-clyent))
319
320(define-public python-babel
321 (package
322 (name "python-babel")
93253411 323 (version "2.7.0")
44d10b1f
RW
324 (source
325 (origin
326 (method url-fetch)
327 (uri (pypi-uri "Babel" version))
328 (sha256
329 (base32
93253411 330 "0a7wawx8vsg7igvz6p3x909fskhg4b2y1910xk4f4c8y22p3aqg8"))))
44d10b1f
RW
331 (build-system python-build-system)
332 (native-inputs
333 `(("python-freezegun" ,python-freezegun)
334 ("python-pytest" ,python-pytest)))
335 (propagated-inputs
336 `(("python-pytz" ,python-pytz)))
337 (arguments
338 `(#:phases (modify-phases %standard-phases
339 (replace 'check
8acd1e90
MB
340 (lambda _
341 (invoke "pytest" "-vv" "-k"
342 (string-append
343 ;; XXX: These tests fail when using Pytest 4.x and
344 ;; Babel 2.6.0. Try removing this for later versions.
345 "not test_no_inherit_metazone_marker_never_in_output"
346 " and not test_smoke_dates"
347 " and not test_smoke_numbers")))))))
44d10b1f
RW
348 (home-page "http://babel.pocoo.org/")
349 (synopsis
350 "Tools for internationalizing Python applications")
351 (description
352 "Babel is composed of two major parts:
353- tools to build and work with gettext message catalogs
354- a Python interface to the CLDR (Common Locale Data Repository), providing
355access to various locale display names, localized number and date formatting,
356etc. ")
357 (license license:bsd-3)))
358
359(define-public python2-babel
360 (package-with-python2 python-babel))
361
93253411
MB
362;; Sphinx < 2.0 requires this version. Remove once no longer needed.
363(define-public python2-babel-2.6
364 (package
365 (inherit python2-babel)
366 (version "2.6.0")
367 (source (origin
368 (method url-fetch)
369 (uri (pypi-uri "Babel" version))
370 (sha256
371 (base32
372 "08rxmbx2s4irp0w0gmn498vns5xy0fagm0fg33xa772jiks51flc"))))))
373
44d10b1f
RW
374(define-public python2-backport-ssl-match-hostname
375 (package
376 (name "python2-backport-ssl-match-hostname")
377 (version "3.5.0.1")
378 (source
379 (origin
380 (method url-fetch)
2c1f0d09 381 (uri (pypi-uri "backports.ssl_match_hostname" version))
44d10b1f
RW
382 (sha256
383 (base32
384 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
385 (build-system python-build-system)
386 (arguments
387 `(#:python ,python-2
388 #:tests? #f)) ; no test target
389 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
390 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
391 (description
392 "This backport brings the ssl.match_hostname() function to users of
393earlier versions of Python. The function checks the hostname in the
394certificate returned by the server to which a connection has been established,
395and verifies that it matches the intended target hostname.")
396 (license license:psfl)))
397
dc827867
TGR
398(define-public python-boolean.py
399 (package
400 (name "python-boolean.py")
401 (version "3.6")
402 (source
403 (origin
404 ;; There's no source tarball on PyPI.
405 (method git-fetch)
406 (uri (git-reference
407 (url "https://github.com/bastikr/boolean.py")
408 (commit (string-append "v" version))))
409 (file-name (git-file-name name version))
410 (sha256
411 (base32 "1wc89y73va58cj7dsx6c199zpxsy9q53dsffsdj6zmc90inqz6qs"))))
412 (build-system python-build-system)
413 (home-page "https://github.com/bastikr/boolean.py")
414 (synopsis "Boolean algebra in one Python module")
415 (description
416 "This is a small Python library that implements boolean algebra.
417It defines two base elements, @code{TRUE} and @code{FALSE}, and a
418@code{Symbol} class that can take on one of these two values. Calculations
419are done only in terms of @code{AND}, @code{OR}, and @code{NOT}---other
420compositions like @code{XOR} and @code{NAND} are emulated on top of them.
421Expressions are constructed from parsed strings or directly in Python.")
422 (license license:bsd-2)))
423
44d10b1f
RW
424(define-public python-hdf4
425 (package
426 (name "python-hdf4")
427 (version "0.9")
428 (source
429 (origin
430 (method url-fetch)
431 (uri (pypi-uri name version))
432 (sha256
433 (base32
434 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
435 (build-system python-build-system)
436 (native-inputs `(("nose" ,python-nose)))
437 (propagated-inputs `(("numpy" ,python-numpy)))
438 (inputs
439 `(("hdf4" ,hdf4)
440 ("libjpeg" ,libjpeg)
441 ("zlib" ,zlib)))
442 (arguments
443 `(#:phases
444 (modify-phases %standard-phases
445 (replace 'check
446 (lambda _
447 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
448 ;; on to import numpy. Somehow this works on their CI system.
449 ;; Let's just manage PYTHONPATH here instead.
450 (substitute* "runexamples.sh"
451 (("export PYTHONPATH=.*") ""))
452 (setenv "PYTHONPATH"
453 (string-append (getcwd) ":"
454 (getenv "PYTHONPATH")))
455 (invoke "./runexamples.sh")
456 (invoke "nosetests" "-v"))))))
457 (home-page "https://github.com/fhs/python-hdf4")
458 (synopsis "Python interface to the NCSA HDF4 library")
459 (description
460 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
461which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
462NetCDF files can also be read and modified. Python-HDF4 is a fork of
463@url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
464 (license license:expat)))
465
466(define-public python2-hdf4
467 (package-with-python2 python-hdf4))
468
469(define-public python-h5py
470 (package
471 (name "python-h5py")
472 (version "2.8.0")
473 (source
474 (origin
475 (method url-fetch)
476 (uri (pypi-uri "h5py" version))
477 (sha256
478 (base32
479 "0mdr6wrq02ac93m1aqx9kad0ppfzmm4imlxqgyy1x4l7hmdcc9p6"))))
480 (build-system python-build-system)
481 (arguments
482 `(#:tests? #f ; no test target
483 #:phases
484 (modify-phases %standard-phases
485 (add-after 'unpack 'fix-hdf5-paths
486 (lambda* (#:key inputs #:allow-other-keys)
487 (let ((prefix (assoc-ref inputs "hdf5")))
488 (substitute* "setup_build.py"
489 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
490 (string-append "['" prefix "/lib" "']"))
491 (("'/opt/local/include', '/usr/local/include'")
492 (string-append "'" prefix "/include" "'")))
493 (substitute* "setup_configure.py"
494 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
495 (string-append "['" prefix "/lib" "']")))
496 #t))))))
497 (propagated-inputs
498 `(("python-six" ,python-six)
499 ("python-numpy" ,python-numpy)))
500 (inputs
501 `(("hdf5" ,hdf5)))
502 (native-inputs
503 `(("python-cython" ,python-cython)
504 ("python-pkgconfig" ,python-pkgconfig)))
505 (home-page "http://www.h5py.org/")
506 (synopsis "Read and write HDF5 files from Python")
507 (description
508 "The h5py package provides both a high- and low-level interface to the
509HDF5 library from Python. The low-level interface is intended to be a
510complete wrapping of the HDF5 API, while the high-level component supports
511access to HDF5 files, datasets and groups using established Python and NumPy
512concepts.")
513 (license license:bsd-3)))
514
515(define-public python2-h5py
516 (package-with-python2 python-h5py))
517
8b89dedc
RW
518(define-public python-sh
519 (package
520 (name "python-sh")
521 (version "1.12.14")
522 (source
523 (origin
524 (method url-fetch)
525 (uri (pypi-uri "sh" version))
526 (sha256
527 (base32
528 "1z2hx357xp3v4cv44xmqp7lli3frndqpyfmpbxf7n76h7s1zaaxm"))))
529 (build-system python-build-system)
fd3638d8
EF
530 (arguments
531 '(#:phases
532 (modify-phases %standard-phases
533 (replace 'check
534 (lambda _
ca983a2f
NG
535 ;; XXX: A Python 2 test fails when HOME=/homeless-shelter.
536 (setenv "HOME" "/tmp")
fd3638d8
EF
537 (invoke "python" "sh.py" "test"))))))
538 (native-inputs
539 `(("python-coverage" ,python-coverage)))
8b89dedc
RW
540 (home-page "https://github.com/amoffat/sh")
541 (synopsis "Python subprocess replacement")
542 (description "This package provides a replacement for Python's
543@code{subprocess} feature.")
544 (license license:expat)))
545
3869effd
RW
546(define-public python2-sh
547 (package-with-python2 python-sh))
548
d362b11d
RW
549(define-public python-cftime
550 (package
551 (name "python-cftime")
552 (version "1.0.3.4")
553 (source
554 (origin
555 (method url-fetch)
556 (uri (pypi-uri "cftime" version))
557 (sha256
558 (base32
559 "0362dhxbzk593walyjz30dll6y2y79wialik647cbwdsf3ad0x6x"))))
560 (build-system python-build-system)
561 (propagated-inputs
562 `(("python-numpy" ,python-numpy)))
563 (native-inputs
564 `(("python-coveralls" ,python-coveralls)
565 ("python-cython" ,python-cython)
566 ("python-pytest-cov" ,python-pytest-cov)))
567 (home-page "https://github.com/Unidata/cftime")
568 (synopsis "Library for time handling")
569 (description
570 "This package provides time-handling functionality that used to be part
571of the netcdf4 package before.")
572 ;; This package claims to include code under the GPLv3 but is released
573 ;; under ISC.
574 (license (list license:isc license:gpl3+))))
575
44d10b1f
RW
576(define-public python-netcdf4
577 (package
578 (name "python-netcdf4")
93e7b209 579 (version "1.4.2")
44d10b1f
RW
580 (source
581 (origin
582 (method url-fetch)
583 (uri (pypi-uri "netCDF4" version))
584 (sha256
585 (base32
93e7b209 586 "0c0sklgrmv15ygliin8qq0hp7vanmbi74m6zpi0r1ksr0hssyd5r"))))
44d10b1f 587 (build-system python-build-system)
93e7b209
RW
588 (arguments
589 '(#:phases
590 (modify-phases %standard-phases
591 (add-after 'unpack 'configure-locations
592 (lambda* (#:key inputs #:allow-other-keys)
593 (setenv "HDF5_DIR" (assoc-ref inputs "hdf5"))
594 #t)))))
44d10b1f
RW
595 (native-inputs
596 `(("python-cython" ,python-cython)))
597 (propagated-inputs
93e7b209
RW
598 `(("python-numpy" ,python-numpy)
599 ("python-cftime" ,python-cftime)))
44d10b1f
RW
600 (inputs
601 `(("netcdf" ,netcdf)
602 ("hdf4" ,hdf4)
603 ("hdf5" ,hdf5)))
93e7b209 604 (home-page "https://github.com/Unidata/netcdf4-python")
44d10b1f
RW
605 (synopsis "Python/numpy interface to the netCDF library")
606 (description "Netcdf4-python is a Python interface to the netCDF C
607library. netCDF version 4 has many features not found in earlier
608versions of the library and is implemented on top of HDF5. This module
609can read and write files in both the new netCDF 4 and the old netCDF 3
610format, and can create files that are readable by HDF5 clients. The
611API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
612to users of that module.")
613 ;; The software is mainly ISC, but includes some files covered
614 ;; by the Expat license.
615 (license (list license:isc license:expat))))
616
617(define-public python2-netcdf4
618 (package-with-python2 python-netcdf4))
619
d6803445
TGR
620(define-public python-license-expression
621 (package
622 (name "python-license-expression")
623 (version "0.999")
624 (source
625 (origin
626 (method url-fetch)
627 (uri (pypi-uri "license-expression" version))
628 (sha256
629 (base32 "08ppb0bxbrsxazy88sgpl9yffvdsabw6dkk1nc332wcz2mphwwyf"))))
630 (build-system python-build-system)
631 (propagated-inputs
632 `(("python-boolean.py" ,python-boolean.py)))
633 (home-page "https://github.com/nexB/license-expression")
634 (synopsis "Apply boolean logic to license expressions")
635 (description
636 "This Python module defines a tiny language to evaluate and compare
637license expressions using boolean logic. Logical combinations of licenses can
638be tested for equality, containment, and equivalence. They can be normalised
639and simplified. It supports SPDX license expressions as well as other naming
640conventions and aliases in the same expression.")
641 (license license:gpl2+)))
642
44d10b1f
RW
643(define-public python-lockfile
644 (package
645 (name "python-lockfile")
646 (version "0.12.2")
647 (source
648 (origin
649 (method url-fetch)
8318bf07 650 (uri (pypi-uri "lockfile" version))
44d10b1f
RW
651 (sha256
652 (base32
653 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
654 (build-system python-build-system)
655 (arguments '(#:test-target "check"))
656 (native-inputs
657 `(("python-pbr" ,python-pbr)))
658 (home-page "https://launchpad.net/pylockfile")
659 (synopsis "Platform-independent file locking module")
660 (description
661 "The lockfile package exports a LockFile class which provides a simple
662API for locking files.")
663 (license license:expat)))
664
665(define-public python2-lockfile
666 (package-with-python2 python-lockfile))
667
668(define-public python-semantic-version
669 (package
670 (name "python-semantic-version")
671 (version "2.6.0")
672 (source
673 (origin
674 (method url-fetch)
675 (uri (pypi-uri "semantic_version" version))
676 (sha256
677 (base32
678 "1h2l9xyg1zzsda6kjcmfcgycbvrafwci283vcr1v5sbk01l2hhra"))))
679 (build-system python-build-system)
680 (arguments
681 `(#:tests? #f)) ; PyPI tarball lacks tests
682 (home-page "https://github.com/rbarrois/python-semanticversion")
683 (synopsis "Semantic versioning module for Python")
684 (description
685 "The @code{semantic_version} class is a small library for handling
686@uref{https://semver.org/, semantic versioning} (@dfn{SemVer}) in Python.
687
688It can compare versions, generate a new version that represents a bump in one of
689the version levels, and check whether any given string is a proper semantic
690version identifier.")
691 (license license:bsd-3)))
692
693(define-public python2-semantic-version
694 (package-with-python2 python-semantic-version))
695
696(define-public python-serpent
697 (package
698 (name "python-serpent")
fa9d14ac 699 (version "1.28")
44d10b1f
RW
700 (source
701 (origin
702 (method url-fetch)
703 (uri (pypi-uri "serpent" version))
704 (sha256
fa9d14ac 705 (base32 "1arnckykpkvv2qrp49l1k7q5mr5pisswl0rvdx98x8wsl1n361pk"))))
44d10b1f 706 (build-system python-build-system)
fa9d14ac
TGR
707 (native-inputs
708 `(("python-attrs" ,python-attrs)
709 ("python-pytz" ,python-pytz)))
44d10b1f
RW
710 (home-page "https://github.com/irmen/Serpent")
711 (synopsis "Serializer for literal Python expressions")
712 (description
1d3c7803
TGR
713 "Serpent provides @code{ast.literal_eval()}-compatible object tree
714serialization. It serializes an object tree into bytes (an utf-8 encoded
715string) that can be decoded and then passed as-is to @code{ast.literal_eval()}
716to rebuild the original object tree.
717
718Because only safe literals are encoded, it is safe to send serpent data to
719other machines, such as over the network.")
44d10b1f
RW
720 (license license:expat)))
721
722(define-public python-setuptools
723 (package
724 (name "python-setuptools")
e39d4933 725 (version "41.0.1")
44d10b1f
RW
726 (source
727 (origin
728 (method url-fetch)
729 (uri (pypi-uri "setuptools" version ".zip"))
730 (sha256
731 (base32
e39d4933 732 "04sns22y2hhsrwfy1mha2lgslvpjsjsz8xws7h2rh5a7ylkd28m2"))
44d10b1f
RW
733 (modules '((guix build utils)))
734 (snippet
735 '(begin
736 ;; Remove included binaries which are used to build self-extracting
737 ;; installers for Windows.
738 ;; TODO: Find some way to build them ourself so we can include them.
739 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
740 #t))))
741 (build-system python-build-system)
742 ;; FIXME: Tests require pytest, which itself relies on setuptools.
743 ;; One could bootstrap with an internal untested setuptools.
744 (arguments
745 `(#:tests? #f))
746 (home-page "https://pypi.python.org/pypi/setuptools")
747 (synopsis
748 "Library designed to facilitate packaging Python projects")
749 (description
750 "Setuptools is a fully-featured, stable library designed to facilitate
751packaging Python projects, where packaging includes:
752Python package and module definitions,
753distribution package metadata,
754test hooks,
755project installation,
756platform-specific details,
757Python 3 support.")
758 ;; TODO: setuptools now bundles the following libraries:
759 ;; packaging, pyparsing, six and appdirs. How to unbundle?
760 (license (list license:psfl ; setuptools itself
761 license:expat ; six, appdirs, pyparsing
762 license:asl2.0 ; packaging is dual ASL2/BSD-2
763 license:bsd-2))))
764
765(define-public python2-setuptools
766 (package-with-python2 python-setuptools))
767
0fdec2a3
MB
768;; The setuptools provided by Python 3.7.4 is too new for Tensorflow.
769(define-public python-setuptools-for-tensorflow
770 (hidden-package
771 (package
772 (inherit python-setuptools)
773 (version "39.1.0")
774 (source (origin
775 (inherit (package-source python-setuptools))
776 (uri (pypi-uri "setuptools" version ".zip"))
777 (sha256
778 (base32
779 "1mzdhvfhnv4lggxa8rjl0dzqxvfx377gg5sqs57v89wrp09lwj65")))))))
780
44d10b1f
RW
781(define-public python-uniseg
782 (package
783 (name "python-uniseg")
784 (version "0.7.1")
785 (source
786 (origin
787 (method url-fetch)
788 (uri (pypi-uri "uniseg" version ".zip"))
789 (sha256
790 (base32
791 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
792 (build-system python-build-system)
793 (arguments
794 '(#:tests? #f)) ; The test suite requires network access.
795 (native-inputs
796 `(("unzip" ,unzip)))
797 (home-page
798 "https://bitbucket.org/emptypage/uniseg-python")
799 (synopsis
800 "Python library to determine Unicode text segmentations")
801 (description
802 "Uniseg is a Python package used to determine Unicode text segmentations.
803Supported segmentations include:
804@enumerate
805@item @dfn{Code point} (any value in the Unicode codespace)
806@item @dfn{Grapheme cluster} (user-perceived character made of a single or
807multiple Unicode code points, e.g. \"G\" + acute-accent)
808@item Word break
809@item Sentence break
810@item Line break
811@end enumerate")
812 (license license:expat)))
813
814(define-public python2-uniseg
815 (package-with-python2 python-uniseg))
816
817(define-public python-humanfriendly
818 (package
819 (name "python-humanfriendly")
820 (version "4.4.1")
821 (source
822 (origin
823 (method url-fetch)
824 (uri (pypi-uri "humanfriendly" version))
825 (sha256
826 (base32
827 "0pisgizjql86785jchfjv217g0lsgk114g2lja5j4y3lsc3b9szi"))))
828 (build-system python-build-system)
829 (arguments
830 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
831 #:tests? #f))
832 (propagated-inputs
833 `(("python-monotonic" ,python-monotonic)))
834 (home-page "https://humanfriendly.readthedocs.io")
835 (synopsis "Human-friendly input and output in Python")
836 (description
837 "The functions and classes in @code{humanfriendly} can be used to make
838text interfaces more user-friendly. It includes tools to parse and format
839numbers, file sizes, and timespans, timers for long-running operations, menus
840to allow the user to choose from a list of options, and terminal interaction
841helpers.")
842 (license license:expat)))
843
844(define-public python2-humanfriendly
845 (package-with-python2 python-humanfriendly))
846
847(define-public python-capturer
848 (package
849 (name "python-capturer")
850 (version "2.4")
851 (source
852 (origin
853 (method url-fetch)
854 (uri (pypi-uri "capturer" version))
855 (sha256
856 (base32
857 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
858 (build-system python-build-system)
859 (arguments
860 `(#:tests? #f))
861 (propagated-inputs
862 `(("python-humanfriendly" ,python-humanfriendly)))
863 (home-page "https://capturer.readthedocs.io")
864 (synopsis "Capture stdout and stderr streams of the current process")
865 (description
866 "The capturer package makes it easy to capture the stdout and stderr
867streams of the current process and subprocesses. Output can be relayed
868to the terminal in real time but is also available to the Python program
869for additional processing.")
870 (license license:expat)))
871
872(define-public python2-capturer
873 (package-with-python2 python-capturer))
874
875(define-public python-case
876 (package
877 (name "python-case")
878 (version "1.5.3")
879 (source
880 (origin
881 (method url-fetch)
882 (uri (pypi-uri "case" version))
883 (sha256
884 (base32
885 "1cagg06vfph864s6l5jb0zqliwxh647bki8j6lf4a4qrv40jnhs8"))))
886 (build-system python-build-system)
887 (propagated-inputs
888 `(("python-mock" ,python-mock)
889 ("python-nose" ,python-nose)
890 ("python-six" ,python-six)
891 ("python-unittest2" ,python-unittest2)))
892 (native-inputs
893 `(("python-coverage" ,python-coverage)))
894 (home-page "https://github.com/celery/case")
895 (synopsis "Unittest utilities and convenience methods")
896 (description
897 "The @code{case} package provides utilities on top of unittest, including
898some helpful Python 2 compatibility convenience methods.")
899 (license license:bsd-3)))
900
901(define-public python-verboselogs
902 (package
903 (name "python-verboselogs")
904 (version "1.7")
905 (source
906 (origin
907 (method url-fetch)
908 (uri (pypi-uri "verboselogs" version))
909 (sha256
910 (base32
911 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
912 (build-system python-build-system)
913 (native-inputs
914 `(("python-mock" ,python-mock)
915 ("python-astroid" ,python-astroid)
916 ("python-pylint" ,python-pylint)))
917 (home-page "https://verboselogs.readthedocs.io")
918 (synopsis "Verbose logging level for Python's logging module")
919 (description
920 "The @code{verboselogs} package extends Python's @code{logging} module to
921add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
922 (license license:expat)))
923
924(define-public python2-verboselogs
925 (package-with-python2 python-verboselogs))
926
927(define-public python-coloredlogs
928 (package
929 (name "python-coloredlogs")
930 (version "7.3")
931 (source
932 (origin
933 (method url-fetch)
934 (uri (pypi-uri "coloredlogs" version))
935 (sha256
936 (base32
937 "1blcann6dyg5dhps9pg12rn0q0rjrlajpmmil0gy0j4cbvnl2il9"))))
938 (build-system python-build-system)
939 (arguments
940 `(;Tests require some updated modules
941 #:tests? #f))
942 (propagated-inputs
943 `(("python-capturer" ,python-capturer)))
944 (home-page "https://coloredlogs.readthedocs.io")
945 (synopsis "Colored stream handler for Python's logging module")
946 (description
947 "The @code{coloredlogs} package enables colored terminal output for
948Python's logging module. The @code{ColoredFormatter} class inherits from
949@code{logging.Formatter} and uses ANSI escape sequences to render your logging
950messages in color.")
951 (license license:expat)))
952
953(define-public python2-coloredlogs
954 (package-with-python2 python-coloredlogs))
955
af760990
VC
956(define-public python-editorconfig
957 (package
958 (name "python-editorconfig")
959 (version "0.12.2")
960 (source
961 (origin
962 (method url-fetch)
963 (uri (pypi-uri "EditorConfig" version))
964 (sha256
965 (base32
966 "0v55z351p9qkyp3bbspwywwn28sbcknhirngjbj779n3z52z63hv"))))
967 (build-system python-build-system)
968 (home-page "https://editorconfig.org/")
969 (synopsis "EditorConfig bindings for python")
970 (description "The EditorConfig project consists of a file format for
971defining coding styles and a collection of text editor plugins that enable
972editors to read the file format and adhere to defined styles. EditorConfig
973files are easily readable and they work nicely with version control systems.")
974 ;; "fnmatch.py" and "ini.py" are licensed under psfl, the rest is bsd-2.
975 (license (list license:bsd-2 license:psfl))))
976
4caf37b0
MC
977(define-public python-et-xmlfile
978 (package
979 (name "python-et-xmlfile")
980 (version "1.0.1")
981 (source
982 (origin
983 (method url-fetch)
984 (uri (pypi-uri "et_xmlfile" version))
985 (sha256
986 (base32
987 "0nrkhcb6jdrlb6pwkvd4rycw34y3s931hjf409ij9xkjsli9fkb1"))))
988 (build-system python-build-system)
989 (arguments
990 `(#:phases (modify-phases %standard-phases
991 (replace 'check
992 (lambda _
993 (invoke "pytest"))))))
994 (native-inputs
995 `(("python-pytest" ,python-pytest)
996 ("python-lxml" ,python-lxml))) ;used for the tests
997 (home-page "https://bitbucket.org/openpyxl/et_xmlfile")
998 (synopsis "Low memory implementation of @code{lxml.xmlfile}")
999 (description "This Python library is based upon the @code{xmlfile} module
1000from @code{lxml}. It aims to provide a low memory, compatible implementation
1001of @code{xmlfile}.")
1002 (license license:expat)))
1003
1004(define-public python2-et-xmlfile
1005 (package-with-python2 python-et-xmlfile))
1006
a042d348
MC
1007(define-public python-openpyxl
1008 (package
1009 (name "python-openpyxl")
441e6d93 1010 (version "2.6.2")
a042d348
MC
1011 (source
1012 (origin
1013 ;; We use the upstream repository, as the tests are not included in the
1014 ;; PyPI releases.
1015 (method hg-fetch)
1016 (uri (hg-reference
1017 (url "https://bitbucket.org/openpyxl/openpyxl")
1018 (changeset version)))
1019 (file-name (string-append name "-" version "-checkout"))
1020 (sha256
441e6d93 1021 (base32 "1qhij6kcvdxqjy4g6193nsv4q7fy8n4fwyd3c2z047idlm6s3j4w"))))
a042d348
MC
1022 (build-system python-build-system)
1023 (arguments
1024 `(#:phases (modify-phases %standard-phases
1025 (replace 'check
1026 (lambda _
1027 (invoke "pytest"))))))
1028 (native-inputs
1029 ;; For the test suite.
1030 `(("python-lxml" ,python-lxml)
1031 ("python-pillow" ,python-pillow)
1032 ("python-pytest" ,python-pytest)))
1033 (propagated-inputs
1034 `(("python-et-xmlfile" ,python-et-xmlfile)
1035 ("python-jdcal" ,python-jdcal)))
1036 (home-page "https://openpyxl.readthedocs.io")
1037 (synopsis "Python library to read/write Excel 2010 XLSX/XLSM files")
1038 (description "This Python library allows reading and writing to the Excel XLSX, XLSM,
1039XLTX and XLTM file formats that are defined by the Office Open XML (OOXML)
1040standard.")
1041 (license license:expat)))
1042
44d10b1f
RW
1043(define-public python-eventlet
1044 (package
1045 (name "python-eventlet")
1046 (version "0.20.1")
1047 (source
1048 (origin
1049 (method url-fetch)
1050 (uri (pypi-uri "eventlet" version))
1051 (sha256
1052 (base32
1053 "0f3q55mq4n021wb7qa53pz3ix6i2py64sap66vsaqm2scjw83m9s"))))
1054 (build-system python-build-system)
1055 (propagated-inputs
1056 `(("python-greenlet" ,python-greenlet)))
1057 (arguments
1058 ;; TODO: Requires unpackaged 'enum-compat'.
1059 '(#:tests? #f))
1060 (home-page "http://eventlet.net")
1061 (synopsis "Concurrent networking library for Python")
1062 (description
1063 "Eventlet is a concurrent networking library for Python that
1064allows you to change how you run your code, not how you write it.
1065It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
1066Coroutines ensure that the developer uses a blocking style of programming
1067that is similar to threading, but provide the benefits of non-blocking I/O.
1068The event dispatch is implicit, which means you can easily use @code{Eventlet}
1069from the Python interpreter, or as a small part of a larger application.")
1070 (license license:expat)))
1071
1072(define-public python2-eventlet
1073 (let ((base (package-with-python2
1074 (strip-python2-variant python-eventlet))))
1075 (package (inherit base)
1076 (propagated-inputs
1077 `(("python2-enum34" ,python2-enum34)
1078 ,@(package-propagated-inputs base))))))
1079
1080(define-public python-six
1081 (package
1082 (name "python-six")
6c58a06e 1083 (version "1.12.0")
44d10b1f
RW
1084 (source
1085 (origin
1086 (method url-fetch)
1087 (uri (pypi-uri "six" version))
1088 (sha256
1089 (base32
6c58a06e 1090 "0wxs1q74v07ssjywbbm7x6h5v9qx209ld2yfsif4060sxi0h2sni"))))
44d10b1f
RW
1091 (build-system python-build-system)
1092 (arguments
1093 `(#:phases
1094 (modify-phases %standard-phases
1095 (replace 'check
1096 (lambda _
1097 (invoke "py.test" "-v"))))))
1098 (native-inputs
1099 `(("python-py" ,python-py)
1100 ("python-pytest" ,python-pytest-bootstrap)))
1101 (home-page "https://pypi.python.org/pypi/six/")
1102 (synopsis "Python 2 and 3 compatibility utilities")
1103 (description
1104 "Six is a Python 2 and 3 compatibility library. It provides utility
1105functions for smoothing over the differences between the Python versions with
1106the goal of writing Python code that is compatible on both Python versions.
1107Six supports every Python version since 2.5. It is contained in only one
1108Python file, so it can be easily copied into your project.")
1109 (license license:x11)))
1110
1111(define-public python2-six
1112 (package-with-python2 python-six))
1113
1114(define-public python-six-bootstrap
1115 (package
1116 (inherit python-six)
1117 (name "python-six-bootstrap")
1118 (native-inputs `())
1119 (arguments `(#:tests? #f))))
1120
1121(define-public python2-six-bootstrap
1122 (package-with-python2 python-six-bootstrap))
1123
1124(define-public python-schedule
1125 (package
1126 (name "python-schedule")
1127 (version "0.4.3")
1128 (source
1129 (origin
1130 (method url-fetch)
1131 (uri (pypi-uri "schedule" version))
1132 (sha256
1133 (base32
1134 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
1135 (build-system python-build-system)
1136 (native-inputs
1137 `(("python-pytest" ,python-pytest)
1138 ("python-mock" ,python-mock)))
1139 (home-page "https://github.com/dbader/schedule")
1140 (synopsis "Schedule periodic function calls in Python")
1141 (description
1142 "Schedule is an in-process scheduler for periodic jobs that uses the
1143builder pattern for configuration. Schedule lets you run Python functions (or
1144any other callable) periodically at pre-determined intervals using a simple,
1145human-friendly syntax.")
1146 (license license:expat)))
1147
1148(define-public python2-schedule
1149 (package-with-python2 python-schedule))
1150
1151(define-public python-pandas
1152 (package
1153 (name "python-pandas")
c0d43f62 1154 (version "0.24.2")
44d10b1f
RW
1155 (source
1156 (origin
1157 (method url-fetch)
1158 (uri (pypi-uri "pandas" version))
1159 (sha256
c0d43f62 1160 (base32 "18imlm8xbhcbwy4wa957a1fkamrcb0z988z006jpfda3ki09z4ag"))))
44d10b1f
RW
1161 (build-system python-build-system)
1162 (arguments
1163 `(#:modules ((guix build utils)
1164 (guix build python-build-system)
1165 (ice-9 ftw)
1166 (srfi srfi-26))
1167 #:phases (modify-phases %standard-phases
c0d43f62
MC
1168 (add-after 'unpack 'patch-which
1169 (lambda* (#:key inputs #:allow-other-keys)
1170 (let ((which (assoc-ref inputs "which")))
1171 (substitute* "pandas/io/clipboard/__init__.py"
1172 (("^CHECK_CMD = .*")
1173 (string-append "CHECK_CMD = \"" which "\"\n"))))
1174 #t))
44d10b1f
RW
1175 (replace 'check
1176 (lambda _
1177 (let ((build-directory
1178 (string-append
1179 (getcwd) "/build/"
1180 (car (scandir "build"
1181 (cut string-prefix? "lib." <>))))))
1182 ;; Disable the "strict data files" option which causes
c0d43f62
MC
1183 ;; the build to error out if required data files are
1184 ;; not available (as is the case with PyPI archives).
44d10b1f
RW
1185 (substitute* "setup.cfg"
1186 (("addopts = --strict-data-files") "addopts = "))
1187 (with-directory-excursion build-directory
c0d43f62
MC
1188 ;; Delete tests that require "moto" which is not yet
1189 ;; in Guix.
44d10b1f
RW
1190 (for-each delete-file
1191 '("pandas/tests/io/conftest.py"
1192 "pandas/tests/io/json/test_compression.py"
1193 "pandas/tests/io/parser/test_network.py"
44d10b1f
RW
1194 "pandas/tests/io/test_parquet.py"))
1195 (invoke "pytest" "-vv" "pandas" "--skip-slow"
1196 "--skip-network" "-k"
1197 ;; XXX: Due to the deleted tests above.
1198 "not test_read_s3_jsonl"))))))))
1199 (propagated-inputs
1200 `(("python-numpy" ,python-numpy)
667c6ef5 1201 ("python-openpyxl" ,python-openpyxl)
44d10b1f 1202 ("python-pytz" ,python-pytz)
667c6ef5
MC
1203 ("python-dateutil" ,python-dateutil)
1204 ("python-xlrd" ,python-xlrd)))
c0d43f62
MC
1205 (inputs
1206 `(("which" ,which)))
44d10b1f
RW
1207 (native-inputs
1208 `(("python-cython" ,python-cython)
1209 ("python-beautifulsoup4" ,python-beautifulsoup4)
1210 ("python-lxml" ,python-lxml)
1211 ("python-html5lib" ,python-html5lib)
1212 ("python-nose" ,python-nose)
c0d43f62
MC
1213 ("python-pytest" ,python-pytest)
1214 ("python-pytest-mock" ,python-pytest-mock)))
44d10b1f
RW
1215 (home-page "https://pandas.pydata.org")
1216 (synopsis "Data structures for data analysis, time series, and statistics")
1217 (description
1218 "Pandas is a Python package providing fast, flexible, and expressive data
1219structures designed to make working with structured (tabular,
1220multidimensional, potentially heterogeneous) and time series data both easy
1221and intuitive. It aims to be the fundamental high-level building block for
1222doing practical, real world data analysis in Python.")
1223 (license license:bsd-3)))
1224
1225(define-public python2-pandas
1226 (package-with-python2 python-pandas))
1227
1228(define-public python2-mechanize
1229 (package
1230 (name "python2-mechanize")
1231 (version "0.2.5")
1232 (source
1233 (origin
1234 (method url-fetch)
1cc184e6 1235 (uri (pypi-uri "mechanize" version))
44d10b1f
RW
1236 (sha256
1237 (base32
1238 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1239 (build-system python-build-system)
1240 (arguments
1241 `(#:python ,python-2 ; apparently incompatible with Python 3
1242 #:tests? #f))
1243 ;; test fails with message
1244 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1245 ;; (python-3.3.2) or
1246 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1247 ;; (python-2.7.5).
1248 ;; The source code is from March 2011 and probably not up-to-date
1249 ;; with respect to python unit tests.
1250 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1251 (synopsis
1252 "Stateful programmatic web browsing in Python")
1253 (description
1254 "Mechanize implements stateful programmatic web browsing in Python,
1255after Andy Lester’s Perl module WWW::Mechanize.")
1256 (license (license:non-copyleft
1257 "file://COPYING"
1258 "See COPYING in the distribution."))))
1259
1260
1261(define-public python-simplejson
1262 (package
1263 (name "python-simplejson")
1264 (version "3.14.0")
1265 (source
1266 (origin
1267 (method url-fetch)
1268 (uri (pypi-uri "simplejson" version))
1269 (sha256
1270 (base32
1271 "1lkv3xlf7ryzi69zqfdbkvpxdfy1rg1rq2yzcnxgf4km5m6difqy"))))
1272 (build-system python-build-system)
1273 (home-page "http://simplejson.readthedocs.org/en/latest/")
1274 (synopsis
1275 "Json library for Python")
1276 (description
1277 "JSON (JavaScript Object Notation) is a subset of JavaScript
1278syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1279format.
1280
1281Simplejson exposes an API familiar to users of the standard library marshal
1282and pickle modules. It is the externally maintained version of the json
1283library contained in Python 2.6, but maintains compatibility with Python 2.5
1284and (currently) has significant performance advantages, even without using
1285the optional C extension for speedups. Simplejson is also supported on
1286Python 3.3+.")
1287 (license license:x11)))
1288
1289(define-public python2-simplejson
1290 (package-with-python2 python-simplejson))
1291
1292
1293(define-public python-pyicu
1294 (package
1295 (name "python-pyicu")
dc23bb45 1296 (version "2.3.1")
44d10b1f
RW
1297 (source
1298 (origin
1299 (method url-fetch)
1300 (uri (pypi-uri "PyICU" version))
1301 (sha256
1302 (base32
dc23bb45 1303 "1x4w8m7ifki9z2a187pgjr33z6z0rp2fii9b73djak1vhm9v9cnx"))))
44d10b1f
RW
1304 (build-system python-build-system)
1305 (inputs
1306 `(("icu4c" ,icu4c)))
1307 (native-inputs
1308 `(("python-pytest" ,python-pytest)
1309 ("python-six" ,python-six)))
1310 (home-page "https://github.com/ovalhub/pyicu")
1311 (synopsis "Python extension wrapping the ICU C++ API")
1312 (description
1313 "PyICU is a python extension wrapping the ICU C++ API.")
1314 (properties `((python2-variant . ,(delay python2-pyicu))))
1315 (license license:x11)))
1316
1317(define-public python2-pyicu
1318 (let ((base (package-with-python2
1319 (strip-python2-variant python-pyicu))))
1320 (package
1321 (inherit base)
1322 (arguments
1323 `(,@(package-arguments base)
1324 #:phases
1325 (modify-phases %standard-phases
1326 (add-before 'check 'delete-failing-test
1327 (λ _
1328 ;; XXX: This fails due to Unicode issues unique to Python 2,
1329 ;; it seems: <https://github.com/ovalhub/pyicu/issues/61>.
1330 (delete-file "test/test_Script.py")
1331 #t))))))))
1332
1333(define-public python2-dogtail
1334 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1335 ;; spaces in indentation" with Python 3.
1336 (package
1337 (name "python2-dogtail")
1338 (version "0.9.9")
1339 (source (origin
1340 (method url-fetch)
1341 (uri (pypi-uri "dogtail" version))
1342 (sha256
1343 (base32
1344 "0p5wfssvzr9w0bvhllzbbd8fnp4cca2qxcpcsc33dchrmh5n552x"))))
1345 (build-system python-build-system)
1346 (arguments `(#:python ,python-2
1347 #:tests? #f)) ; invalid command "test"
1348 ;; Currently no offical homepage.
1349 (home-page "https://pypi.python.org/pypi/dogtail/")
1350 (synopsis "GUI test tool and automation framework written in Python")
1351 (description
1352 "Dogtail is a GUI test tool and automation framework written in Python.
1353It uses Accessibility (a11y) technologies to communicate with desktop
1354applications. dogtail scripts are written in Python and executed like any
1355other Python program.")
1356 (license license:gpl2+)))
1357
1358(define-public python-empy
1359 (package
1360 (name "python-empy")
0f6d5115 1361 (version "3.3.3")
44d10b1f
RW
1362 (source (origin
1363 (method url-fetch)
1364 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1365 version ".tar.gz"))
1366 (sha256
1367 (base32
0f6d5115 1368 "1mxfy5mgp473ga1pgz2nvm8ds6z4g3hdky8523z6jzvcs9ny6hcq"))))
44d10b1f
RW
1369 (build-system python-build-system)
1370 (arguments
0f6d5115 1371 `(#:tests? #f)) ; python2 only
44d10b1f
RW
1372 (home-page "http://www.alcyone.com/software/empy/")
1373 (synopsis "Templating system for Python")
1374 (description
1375 "EmPy is a system for embedding Python expressions and statements in
1376template text; it takes an EmPy source file, processes it, and produces
1377output. This is accomplished via expansions, which are special signals to the
1378EmPy system and are set off by a special prefix (by default the at sign, @@).
1379EmPy can expand arbitrary Python expressions and statements in this way, as
1380well as a variety of special forms. Textual data not explicitly delimited in
1381this way is sent unaffected to the output, allowing Python to be used in
1382effect as a markup language. Also supported are callbacks via hooks,
1383recording and playback via diversions, and dynamic, chainable filters. The
1384system is highly configurable via command line options and embedded
1385commands.")
1386 (license license:lgpl2.1+)))
1387
1388(define-public python2-empy
0f064242
TGR
1389 (let ((base (package-with-python2 (strip-python2-variant python-empy))))
1390 (package
1391 (inherit base)
1392 (arguments `(,@(package-arguments base)
1393 #:tests? #t)))))
44d10b1f
RW
1394
1395(define-public python2-element-tree
1396 (package
1397 (name "python2-element-tree")
1398 (version "1.2.6")
1399 (source (origin
1400 (method url-fetch)
1401 (uri (string-append
1402 "http://effbot.org/media/downloads/elementtree-"
1403 version "-20050316.tar.gz"))
1404 (sha256
1405 (base32
1406 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1407 (build-system python-build-system)
1408 (arguments
1409 `(#:python ,python-2 ; seems to be part of Python 3
1410 #:tests? #f)) ; no 'test' sub-command
1411 (synopsis "Toolkit for XML processing in Python")
1412 (description
1413 "ElementTree is a Python library supporting lightweight XML processing.")
1414 (home-page "http://effbot.org/zone/element-index.htm")
1415 (license (license:x11-style
1416 "http://docs.python.org/2/license.html"
1417 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1418
1419(define-public python2-pybugz
1420 (package
1421 (name "python2-pybugz")
1422 (version "0.6.11")
1423 (source (origin
1424 (method url-fetch)
1425 (uri (string-append
1426 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1427 version ".tar.gz"))
1428 (sha256
1429 (base32
1430 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1431 (patches (search-patches "pybugz-stty.patch"
1432 "pybugz-encode-error.patch"))))
1433 (build-system python-build-system)
1434 (arguments
1435 `(#:python ,python-2 ; SyntaxError with Python 3
1436 #:tests? #f)) ; no 'test' sub-command
1437 (propagated-inputs
1438 `(("element-tree" ,python2-element-tree)))
1439 (synopsis "Python and command-line interface to Bugzilla")
1440 (description
1441 "PyBugz is a Python library and command-line tool to query the Bugzilla
1442bug tracking system. It is meant as an aid to speed up interaction with the
1443bug tracker.")
1444 (home-page "http://www.liquidx.net/pybugz/")
1445 (license license:gpl2)))
1446
1447(define-public python2-enum
1448 (package
1449 (name "python2-enum")
1450 (version "0.4.6")
1451 (source (origin
1452 (method url-fetch)
1453 (uri (pypi-uri "enum" version))
1454 (sha256
1455 (base32
1456 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
1457 (build-system python-build-system)
1458 (arguments
1459 `(#:python ,python-2))
1460 (home-page "http://pypi.python.org/pypi/enum/")
1461 (synopsis "Robust enumerated type support in Python")
1462 (description
1463 "This provides a module for robust enumerations in Python. It has
1464been superseded by the Python standard library and is provided only for
1465compatibility.")
1466 ;; Choice of either license.
1467 (license (list license:gpl3+ license:psfl))))
1468
1469(define-public python-enum34
1470 (package
1471 (name "python-enum34")
1472 (version "1.1.6")
1473 (source
1474 (origin
1475 (method url-fetch)
1476 (uri (pypi-uri "enum34" version))
1477 (sha256
1478 (base32
1479 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
1480 (build-system python-build-system)
1481 (home-page "https://pypi.python.org/pypi/enum34")
1482 (synopsis "Backported Python 3.4 Enum")
1483 (description
1484 "Enum34 is the new Python stdlib enum module available in Python 3.4
1485backported for previous versions of Python from 2.4 to 3.3.")
1486 (license license:bsd-3)))
1487
1488(define-public python2-enum34
1489 (package-with-python2 python-enum34))
1490
1491(define-public python-parse-type
1492 (package
1493 (name "python-parse-type")
1494 (version "0.4.2")
1495 (source
1496 (origin
1497 (method url-fetch)
1498 (uri (pypi-uri "parse_type" version))
1499 (sha256
1500 (base32
1501 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
1502 (build-system python-build-system)
1503 (propagated-inputs
1504 `(("python-six" ,python-six)
1505 ("python-parse" ,python-parse)))
1506 (native-inputs
1507 `(("python-pytest" ,python-pytest)
1508 ("python-pytest-runner" ,python-pytest-runner)))
1509 (home-page "https://github.com/jenisys/parse_type")
1510 (synopsis "Extended parse module")
1511 (description
1512 "Parse_type extends the python parse module.")
1513 (properties
1514 `((python2-variant . ,(delay python2-parse-type))))
1515 (license license:bsd-3)))
1516
1517(define-public python2-parse-type
1518 (let ((base (package-with-python2
1519 (strip-python2-variant python-parse-type))))
1520 (package (inherit base)
1521 (propagated-inputs
1522 `(("python2-enum34" ,python2-enum34)
1523 ,@(package-propagated-inputs base))))))
1524
1525(define-public python-parse
1526 (package
1527 (name "python-parse")
1528 (version "1.8.4")
1529 (source
1530 (origin
1531 (method url-fetch)
1532 (uri (pypi-uri "parse" version))
1533 (sha256
1534 (base32
1535 "0f8997xr8nq2nq35iiviq8ningd1zvy59fg503xfpbi2dwhgdkf3"))))
1536 (build-system python-build-system)
1537 (arguments
1538 `(#:phases
1539 (modify-phases %standard-phases
1540 (replace 'check
1541 (lambda _ (invoke "python" "test_parse.py"))))))
1542 (home-page "https://github.com/r1chardj0n3s/parse")
1543 (synopsis "Parse strings")
1544 (description
1545 "Parse strings using a specification based on the Python @code{format()}
1546syntax.")
1547 (license license:x11)))
1548
1549(define-public python-polib
1550 (package
1551 (name "python-polib")
1552 (version "1.0.8")
1553 (source (origin
1554 (method url-fetch)
1555 (uri (pypi-uri "polib" version))
1556 (sha256
1557 (base32
1558 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1559 (build-system python-build-system)
1560 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1561 (synopsis "Manipulate, create and modify gettext files")
1562 (description "Polib can manipulate any gettext format (po, pot and mo)
1563files. It can be used to create po files from scratch or to modify
1564existing ones.")
1565 (license license:expat)))
1566
1567(define-public python2-polib
1568 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1569 (package
1570 (inherit base)
1571 (arguments `(,@(package-arguments base)
1572 ;; Tests don't work with python2.
1573 #:tests? #f)))))
1574
6830120e
TLC
1575(define-public python-poyo
1576 (package
1577 (name "python-poyo")
1578 (version "0.5.0")
1579 (source
1580 (origin
1581 (method url-fetch)
1582 (uri (pypi-uri "poyo" version))
1583 (sha256
1584 (base32
1585 "1pflivs6j22frz0v3dqxnvc8yb8fb52g11lqr88z0i8cg2m5csg2"))))
1586 (build-system python-build-system)
1587 (home-page "https://github.com/hackebrot/poyo")
1588 (synopsis "Lightweight YAML Parser for Python")
1589 (description
1590 "This package provides a lightweight YAML Parser for Python. It supports
1591only a chosen subset of the YAML format that is required to parse cookiecutter
1592user configuration files. It does not have support for serializing into YAML
1593and is not compatible with JSON.")
1594 (license license:expat)))
1595
44d10b1f
RW
1596(define-public scons
1597 (package
1598 (name "scons")
05487ed8 1599 (version "3.0.4")
44d10b1f 1600 (source (origin
ad34338d
RW
1601 (method git-fetch)
1602 (uri (git-reference
1603 (url "https://github.com/SCons/scons.git")
1604 (commit version)))
1605 (file-name (git-file-name name version))
44d10b1f
RW
1606 (sha256
1607 (base32
05487ed8 1608 "1xy8jrwz87y589ihcld4hv7wn122sjbz914xn8h50ww77wbhk8hn"))))
44d10b1f
RW
1609 (build-system python-build-system)
1610 (arguments
1611 `(#:use-setuptools? #f ; still relies on distutils
ad34338d
RW
1612 #:tests? #f ; no 'python setup.py test' command
1613 #:phases
1614 (modify-phases %standard-phases
1615 (add-before 'build 'bootstrap
1616 (lambda _
1617 (substitute* "src/engine/SCons/compat/__init__.py"
1618 (("sys.modules\\[new\\] = imp.load_module\\(old, \\*imp.find_module\\(old\\)\\)")
1619 "sys.modules[new] = __import__(old)"))
05487ed8
RW
1620 (substitute* "src/engine/SCons/Platform/__init__.py"
1621 (("mod = imp.load_module\\(full_name, file, path, desc\\)")
1622 "mod = __import__(full_name)"))
ad34338d
RW
1623 (invoke "python" "bootstrap.py" "build/scons" "DEVELOPER=guix")
1624 (chdir "build/scons")
1625 #t)))))
44d10b1f
RW
1626 (home-page "http://scons.org/")
1627 (synopsis "Software construction tool written in Python")
1628 (description
1629 "SCons is a software construction tool. Think of SCons as an improved,
1630cross-platform substitute for the classic Make utility with integrated
1631functionality similar to autoconf/automake and compiler caches such as ccache.
1632In short, SCons is an easier, more reliable and faster way to build
1633software.")
1634 (license license:x11)))
1635
1636(define-public scons-python2
1637 (package
1638 (inherit (package-with-python2 scons))
1639 (name "scons-python2")))
1640
1641(define-public python-extras
1642 (package
1643 (name "python-extras")
1644 (version "1.0.0")
1645 (source
1646 (origin
1647 (method url-fetch)
1648 (uri (pypi-uri "extras" version))
1649 (sha256
1650 (base32
1651 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
1652 (build-system python-build-system)
1653 (arguments
1654 ;; FIXME: Circular dependency on testtools.
1655 '(#:tests? #f))
1656 (home-page "https://github.com/testing-cabal/extras")
1657 (synopsis "Useful extensions to the Python standard library")
1658 (description
1659 "Extras is a set of extensions to the Python standard library.")
1660 (license license:expat)))
1661
1662(define-public python2-extras
1663 (package-with-python2 python-extras))
1664
1665(define-public python-mimeparse
1666 (package
1667 (name "python-mimeparse")
1668 (version "1.6.0")
1669 (source
1670 (origin
1671 (method url-fetch)
89bf667c 1672 (uri (pypi-uri "python-mimeparse" version))
44d10b1f
RW
1673 (sha256
1674 (base32
1675 "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n"))))
1676 (build-system python-build-system)
1677 (arguments
1678 '(#:phases
1679 (modify-phases %standard-phases
1680 (replace 'check
1681 (lambda _
1682 (invoke "./mimeparse_test.py"))))))
1683 (home-page
1684 "https://github.com/dbtsai/python-mimeparse")
1685 (synopsis "Python library for parsing MIME types")
1686 (description
1687 "Mimeparse provides basic functions for parsing MIME type names and
1688matching them against a list of media-ranges.")
1689 (license license:expat)))
1690
1691(define-public python2-mimeparse
1692 (package-with-python2 python-mimeparse))
1693
1694(define-public python-miniboa
1695 (package
1696 (name "python-miniboa")
1697 (version "1.0.7")
1698 (source
1699 (origin
1700 (method url-fetch)
1701 (uri (pypi-uri "miniboa" version))
1702 (sha256
1703 (base32
1704 "09jh3pn4rh7kh7jayanf8jzy6gp03791b5a193w6148cf3i6k9m3"))))
1705 (build-system python-build-system)
1706 (home-page "https://github.com/shmup/miniboa")
1707 (synopsis "Simple, single-threaded Telnet server")
1708 (description
1709 "Miniboa is a simple, asynchronous, single-threaded, poll-based Telnet
1710server.")
1711 (license license:asl2.0)))
1712
1713(define-public python2-miniboa
1714 (package-with-python2 python-miniboa))
1715
1716(define-public python-pafy
1717 (package
1718 (name "python-pafy")
1719 (version "0.5.3.1")
1720 (source
1721 (origin
1722 (method url-fetch)
1723 (uri (pypi-uri "pafy" version))
1724 (sha256
1725 (base32
1726 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
1727 (build-system python-build-system)
1728 (arguments
1729 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
1730 (propagated-inputs
1731 ;; Youtube-dl is a python package which is imported in the file
1732 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1733 `(("youtube-dl" ,youtube-dl)))
1734 (home-page "https://np1.github.io/pafy/")
1735 (synopsis "Retrieve YouTube content and metadata")
1736 (description
1737 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1738 (license license:lgpl3+)))
1739
1740(define-public python2-funcsigs
1741 (package
1742 (name "python2-funcsigs")
1743 (version "1.0.2")
1744 (source (origin
1745 (method url-fetch)
1746 (uri (pypi-uri "funcsigs" version))
1747 (sha256
1748 (base32
1749 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
1750 (build-system python-build-system)
1751 (arguments
1752 `(#:python ,python-2))
1753 (native-inputs
1754 `(("python2-unittest2" ,python2-unittest2)))
1755 (home-page "http://funcsigs.readthedocs.org")
1756 (synopsis "Python function signatures from PEP362")
1757 (description
1758 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
1759 (license license:asl2.0)))
1760
1761(define-public python2-funcsigs-bootstrap
1762 (package
1763 (inherit python2-funcsigs)
1764 (name "python2-funcsigs-bootstrap")
1765 (native-inputs `())
1766 (arguments
1767 `(#:tests? #f
1768 ,@(package-arguments python2-funcsigs)))))
1769
1770(define-public python-py
1771 (package
1772 (name "python-py")
08eba545 1773 (version "1.8.0")
44d10b1f
RW
1774 (source
1775 (origin
1776 (method url-fetch)
1777 (uri (pypi-uri "py" version))
1778 (sha256
1779 (base32
08eba545 1780 "0lsy1gajva083pzc7csj1cvbmminb7b4l6a0prdzyb3fd829nqyw"))))
44d10b1f
RW
1781 (build-system python-build-system)
1782 (arguments
1783 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1784 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1785 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1786 ;; Is this module globally installed?"
1787 '(#:tests? #f))
1788 (native-inputs
1789 `(("python-setuptools-scm" ,python-setuptools-scm)))
1790 (home-page "https://github.com/pytest-dev/py")
1791 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1792 (description
1793 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1794code introspection, and logging.")
1795 (license license:expat)))
1796
1797(define-public python2-py
1798 (package-with-python2 python-py))
1799
1800;; Recent versions of python-fixtures and python-testrepository need
1801;; python-pbr for packaging, which itself needs these two packages for
1802;; testing.
1803;; To fix this circular dependency, we use a build of python-pbr, based on the
1804;; same source, just without any test dependencies and with tests disabled.
1805;; python-pbr-minmal is then used to package python-fixtures and
1806;; python-testrepository.
1807;; Strictly speaking we currently could remove the test-requirements from the
1808;; normal python-pbr package (and save this package) since test are disabled
1809;; there anyway. But this may change in future.
1810(define-public python-pbr-minimal
1811 (package
1812 (name "python-pbr-minimal")
1813 (version "3.0.1")
1814 (source
1815 (origin
1816 (method url-fetch)
1817 (uri (pypi-uri "pbr" version))
1818 (sha256
1819 (base32
1820 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
1821 (build-system python-build-system)
1822 (arguments
1823 `(#:tests? #f))
1824 (home-page "http://docs.openstack.org/developer/pbr/")
1825 (synopsis "Minimal build of python-pbr used for bootstrapping")
1826 (description
1827 "Used only for bootstrapping python2-pbr, you should not need this.")
1828 (license license:asl2.0)))
1829
1830(define-public python2-pbr-minimal
1831 (package-with-python2 python-pbr-minimal))
1832
1833(define-public python-pbr
1834 (package
1835 (inherit python-pbr-minimal)
1836 (name "python-pbr")
1837 (arguments
1838 `(#:tests? #f)) ;; Most tests seem to use the Internet.
1839 (propagated-inputs
1840 `(("git" ,git))) ;; pbr actually uses the "git" binary.
1841 (native-inputs
1842 `(("python-fixtures" ,python-fixtures-bootstrap)
1843 ;; discover, coverage, hacking, subunit
1844 ("python-mock" ,python-mock)
1845 ("python-six" ,python-six)
1846 ("python-sphinx" ,python-sphinx)
1847 ("python-testrepository" ,python-testrepository-bootstrap)
1848 ("python-testresources" ,python-testresources-bootstrap)
1849 ("python-testscenarios" ,python-testscenarios-bootstrap)
1850 ("python-testtools" ,python-testtools-bootstrap)
1851 ("python-virtualenv" ,python-virtualenv)))
1852 (synopsis "Enhance the default behavior of Python’s setuptools")
1853 (description
1854 "Python Build Reasonableness (PBR) is a library that injects some useful
1855and sensible default behaviors into your setuptools run. It will set
1856versions, process requirements files and generate AUTHORS and ChangeLog file
1857from git information.
1858")))
1859
1860(define-public python2-pbr
1861 (package-with-python2 python-pbr))
1862
ea43f0d5
MB
1863(define-public python-pyrsistent
1864 (package
1865 (name "python-pyrsistent")
1866 (version "0.14.11")
1867 (home-page "https://github.com/tobgu/pyrsistent")
1868 (source (origin
1869 (method url-fetch)
1870 (uri (pypi-uri "pyrsistent" version))
1871 (sha256
1872 (base32
1873 "1qkh74bm296mp5g3r11lgsksr6bh4w1bf8pji4nmxdlfj542ga1w"))))
1874 (build-system python-build-system)
1875 (native-inputs
1876 `(("python-hypothesis" ,python-hypothesis)
1877 ("python-pytest" ,python-pytest)
1878 ("python-pytest-runner" ,python-pytest-runner)))
1879 (propagated-inputs
1880 `(("python-six" ,python-six)))
1881 (synopsis "Persistent data structures for Python")
1882 (description
1883 "Pyrsistent is a number of persistent collections (by some referred to as
1884functional data structures). Persistent in the sense that they are immutable.
1885
1886All methods on a data structure that would normally mutate it instead return a
1887new copy of the structure containing the requested updates. The original
1888structure is left untouched.")
1889 (license license:expat)))
1890
1891(define-public python2-pyrsistent
1892 (package-with-python2 python-pyrsistent))
1893
44d10b1f
RW
1894(define-public python-exif-read
1895 (package
1896 (name "python-exif-read")
1897 (version "2.1.2")
1898 (source (origin
1899 (method url-fetch)
1900 (uri (pypi-uri "ExifRead" version))
1901 (sha256
1902 (base32
1903 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
1904 (build-system python-build-system)
1905 (arguments `(#:tests? #f)) ; no tests
1906 (home-page "https://github.com/ianare/exif-py")
1907 (synopsis "Python library to extract EXIF data from image files")
1908 (description
1909 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
1910files.")
1911 (license license:bsd-3)))
1912
1913(define-public python2-exif-read
1914 (package-with-python2 python-exif-read))
1915
1916(define-public python-pyld
1917 (package
1918 (name "python-pyld")
1919 (version "1.0.3")
1920 (source (origin
1921 (method url-fetch)
1922 (uri (pypi-uri "PyLD" version))
1923 (sha256
1924 (base32
1925 "12i2g6xdj30k7xxcibg3sc5y76snwq8l6n8fy9lyi577kgy0h2pm"))))
1926 (build-system python-build-system)
1927 (home-page "https://github.com/digitalbazaar/pyld")
1928 (synopsis "Python implementation of the JSON-LD specification")
1929 (description
1930 "PyLD is an implementation of the JSON-LD specification.")
1931 (license license:bsd-3)))
1932
1933(define-public python2-pyld
1934 (package-with-python2 python-pyld))
1935
1936(define-public python-click
1937 (package
1938 (name "python-click")
61984855 1939 (version "7.0")
44d10b1f
RW
1940 (source
1941 (origin
1942 (method url-fetch)
1943 (uri (pypi-uri "click" version))
1944 (sha256
1945 (base32
61984855 1946 "1mzjixd4vjbjvzb6vylki9w1556a9qmdh35kzmq6cign46av952v"))))
44d10b1f
RW
1947 (build-system python-build-system)
1948 (arguments
8d7e7ca6 1949 `(#:phases
44d10b1f
RW
1950 (modify-phases %standard-phases
1951 (add-after 'unpack 'fix-paths
1952 (lambda* (#:key inputs #:allow-other-keys)
1953 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
1954 "cross-libc" "libc"))))
1955 (substitute* "click/_unicodefun.py"
1956 (("'locale'")
1957 (string-append "'" glibc "/bin/locale'"))))
8d7e7ca6
EF
1958 #t))
1959 (replace 'check
1960 (lambda _
1961 (invoke "python" "-m" "pytest"))))))
44d10b1f
RW
1962 (native-inputs
1963 `(("python-pytest" ,python-pytest)))
61984855 1964 (home-page "https://palletsprojects.com/p/click/")
44d10b1f
RW
1965 (synopsis "Command line library for Python")
1966 (description
1967 "Click is a Python package for creating command line interfaces in a
1968composable way with as little code as necessary. Its name stands for
1969\"Command Line Interface Creation Kit\". It's highly configurable but comes
1970with sensible defaults out of the box.")
1971 (license license:bsd-3)))
1972
1973(define-public python2-click
1974 (package-with-python2 python-click))
1975
1976(define-public python-wheel
1977 (package
1978 (name "python-wheel")
746c074b 1979 (version "0.32.3")
44d10b1f
RW
1980 (source
1981 (origin
1982 (method url-fetch)
1983 (uri (pypi-uri "wheel" version))
1984 (sha256
1985 (base32
746c074b 1986 "1dhxl1bf18bx9szmqcnxbg6204hp3im8089q3hkwh5jfa6zh75q2"))))
44d10b1f
RW
1987 (build-system python-build-system)
1988 (native-inputs
1989 `(("python-jsonschema" ,python-jsonschema)
1990 ("python-pytest-cov" ,python-pytest-cov)))
1991 (home-page "https://bitbucket.org/pypa/wheel/")
1992 (synopsis "Format for built Python packages")
1993 (description
1994 "A wheel is a ZIP-format archive with a specially formatted filename and
1995the @code{.whl} extension. It is designed to contain all the files for a PEP
1996376 compatible install in a way that is very close to the on-disk format. Many
1997packages will be properly installed with only the @code{Unpack} step and the
1998unpacked archive preserves enough information to @code{Spread} (copy data and
1999scripts to their final locations) at any later time. Wheel files can be
2000installed with a newer @code{pip} or with wheel's own command line utility.")
2001 (license license:expat)
2002 (properties `((python2-variant . ,(delay python2-wheel))))))
2003
2004(define-public python2-wheel
2005 (let ((wheel (package-with-python2
2006 (strip-python2-variant python-wheel))))
2007 (package (inherit wheel)
2008 (native-inputs `(("python2-functools32" ,python2-functools32)
2009 ,@(package-native-inputs wheel))))))
2010
2011(define-public python-vcversioner
2012 (package
2013 (name "python-vcversioner")
2014 (version "2.16.0.0")
2015 (source
2016 (origin
2017 (method url-fetch)
2018 (uri (pypi-uri "vcversioner" version))
2019 (sha256
2020 (base32
2021 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
2022 (build-system python-build-system)
2023 (synopsis "Python library for version number discovery")
2024 (description "Vcversioner is a Python library that inspects tagging
2025information in a variety of version control systems in order to discover
2026version numbers.")
2027 (home-page "https://github.com/habnabit/vcversioner")
2028 (license license:isc)))
2029
2030(define-public python2-vcversioner
2031 (package-with-python2 python-vcversioner))
2032
5591fc4f
MC
2033(define-public python-jdcal
2034 (package
2035 (name "python-jdcal")
2036 (version "1.4")
2037 (source
2038 (origin
2039 (method url-fetch)
2040 (uri (pypi-uri "jdcal" version))
2041 (sha256
2042 (base32
2043 "1ja6j2xq97bsl6rv09mhdx7n0xnrsfx0mj5xqza0mxghqmkm02pa"))))
2044 (build-system python-build-system)
2045 (arguments
2046 `(#:phases (modify-phases %standard-phases
2047 (replace 'check
2048 (lambda _
2049 (invoke "pytest"))))))
2050 (native-inputs
2051 `(("python-pytest" ,python-pytest)))
2052 (home-page "https://github.com/phn/jdcal")
2053 (synopsis "Functions to convert between Julian dates Gregorian dates")
2054 (description "This Python library provides functions for converting
2055between Julian dates and Gregorian dates.")
2056 (license license:bsd-2)))
2057
2058(define-public python2-jdcal
2059 (package-with-python2 python-jdcal))
2060
44d10b1f
RW
2061(define-public python-jsonschema
2062 (package
2063 (name "python-jsonschema")
1adde06e 2064 (version "3.0.1")
44d10b1f
RW
2065 (source (origin
2066 (method url-fetch)
786ccb87 2067 (uri (pypi-uri "jsonschema" version))
44d10b1f
RW
2068 (sha256
2069 (base32
1adde06e 2070 "03g20i1xfg4qdlk4475pl4pp7y0h37g1fbgs5qhy678q9xb822hc"))))
44d10b1f
RW
2071 (build-system python-build-system)
2072 (arguments
2073 '(#:phases
2074 (modify-phases %standard-phases
1adde06e
MB
2075 (replace 'check
2076 (lambda _
2077 (setenv "PYTHONPATH" (string-append ".:" (getenv "PYTHONPATH")))
2078 (invoke "trial" "jsonschema"))))))
44d10b1f 2079 (native-inputs
1adde06e
MB
2080 `(("python-setuptools_scm" ,python-setuptools-scm)
2081 ("python-twisted" ,python-twisted)))
2082 (propagated-inputs
2083 `(("python-attrs" ,python-attrs)
2084 ("python-pyrsistent" ,python-pyrsistent)
2085 ("python-six" ,python-six)))
44d10b1f
RW
2086 (home-page "https://github.com/Julian/jsonschema")
2087 (synopsis "Implementation of JSON Schema for Python")
2088 (description
2089 "Jsonschema is an implementation of JSON Schema for Python.")
2090 (license license:expat)
2091 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2092
2093(define-public python2-jsonschema
2094 (let ((jsonschema (package-with-python2
2095 (strip-python2-variant python-jsonschema))))
2096 (package (inherit jsonschema)
44d10b1f 2097 (propagated-inputs
1adde06e
MB
2098 `(("python2-functools32" ,python2-functools32)
2099 ,@(package-propagated-inputs jsonschema))))))
44d10b1f 2100
914bba28
TGR
2101;; This old version is still required by docker-compose as of 1.24.0.
2102(define-public python-jsonschema-2.6
2103 (package
2104 (name "python-jsonschema")
2105 (version "2.6.0")
2106 (source (origin
2107 (method url-fetch)
2108 (uri (pypi-uri "jsonschema" version))
2109 (sha256
2110 (base32
2111 "00kf3zmpp9ya4sydffpifn0j0mzm342a2vzh82p6r0vh10cg7xbg"))))
2112 (build-system python-build-system)
2113 (arguments
2114 '(#:phases
2115 (modify-phases %standard-phases
2116 (replace 'check (lambda _ (invoke "nosetests"))))))
2117 (native-inputs
2118 `(("python-nose" ,python-nose)
2119 ("python-vcversioner" ,python-vcversioner)))
2120 (home-page "https://github.com/Julian/jsonschema")
2121 (synopsis "Implementation of JSON Schema for Python")
2122 (description
2123 "Jsonschema is an implementation of JSON Schema for Python.")
2124 (license license:expat)
2125 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2126
44d10b1f
RW
2127(define-public python-schema
2128 (package
2129 (name "python-schema")
2130 (version "0.6.6")
2131 (source
2132 (origin
2133 (method url-fetch)
2134 (uri (pypi-uri "schema" version))
2135 (sha256
2136 (base32
2137 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
2138 (build-system python-build-system)
2139 (native-inputs
2140 `(("python-pytest" ,python-pytest)))
2141 (home-page "https://github.com/keleshev/schema")
2142 (synopsis "Simple data validation library")
2143 (description
2144 "@code{python-schema} is a library for validating Python data
2145structures, such as those obtained from config-files, forms, external
2146services or command-line parsing, converted from JSON/YAML (or
2147something else) to Python data-types.")
2148 (license license:psfl)))
2149
2150(define-public python2-schema
2151 (package-with-python2 python-schema))
2152
2153(define-public python-schema-0.5
2154 (package (inherit python-schema)
2155 (version "0.5.0")
2156 (source
2157 (origin
2158 (method url-fetch)
2159 (uri (pypi-uri "schema" version))
2160 (sha256
2161 (base32
2162 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
2163
2164(define-public python2-schema-0.5
2165 (package-with-python2 python-schema-0.5))
2166
2167(define-public python-kitchen
2168 (package
2169 (name "python-kitchen")
2170 (version "1.2.5")
2171 (source
2172 (origin
2173 (method url-fetch)
2174 (uri (pypi-uri "kitchen" version))
2175 (sha256
2176 (base32
2177 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
2178 (build-system python-build-system)
2179 (propagated-inputs
2180 `(("python-chardet" ,python-chardet)))
2181 (home-page "https://github.com/fedora-infra/kitchen")
2182 (synopsis "Python API for snippets")
2183 (description "@code{kitchen} module provides a python API for all sorts of
2184little useful snippets of code that everybody ends up writing for their projects
2185but never seem big enough to build an independent release. Use kitchen and stop
2186cutting and pasting that code over and over.")
2187 (license (list license:lgpl2.1+
2188 ;; subprocess.py, test_subprocess.py,
2189 ;; kitchen/pycompat25/defaultdict.py:
2190 license:psfl))))
2191
2192(define-public python2-kitchen
2193 (package-with-python2 python-kitchen))
2194
2195(define-public python-unidecode
2196 (package
2197 (name "python-unidecode")
bd9d7206 2198 (version "1.1.0")
44d10b1f
RW
2199 (source (origin
2200 (method url-fetch)
2201 (uri (pypi-uri "Unidecode" version))
2202 (sha256
2203 (base32
bd9d7206 2204 "00pi0czzwvbf7djhkkjyvimj60wqdx0llbddzfnax650g9b8yscc"))))
44d10b1f
RW
2205 (build-system python-build-system)
2206 (home-page "https://pypi.python.org/pypi/Unidecode")
2207 (synopsis "ASCII transliterations of Unicode text")
2208 (description
2209 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2210useful when integrating with legacy code that doesn't support Unicode, or for
2211ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2212machine identifiers from human-readable Unicode strings that should still be
2213somewhat intelligible.")
2214 (license license:gpl2+)))
2215
2216(define-public python2-unidecode
2217 (package-with-python2 python-unidecode))
2218
2219(define-public python-pyjwt
2220 (package
2221 (name "python-pyjwt")
be6f2f56 2222 (version "1.7.1")
44d10b1f
RW
2223 (source
2224 (origin
2225 (method url-fetch)
2226 (uri (pypi-uri "PyJWT" version))
2227 (sha256
2228 (base32
be6f2f56 2229 "15hflax5qkw1v6nssk1r0wkj83jgghskcmn875m3wgvpzdvajncd"))
44d10b1f
RW
2230 (modules '((guix build utils)))
2231 (snippet
2232 '(begin
2233 (for-each delete-file-recursively
2234 (find-files "." "\\.pyc$"))
2235 #t))))
2236 (build-system python-build-system)
2237 (native-inputs
2238 `(("python-pytest" ,python-pytest)
2239 ("python-pytest-cov" ,python-pytest-cov)
2240 ("python-pytest-runner" ,python-pytest-runner)))
2241 (home-page "https://github.com/progrium/pyjwt")
2242 (synopsis "JSON Web Token implementation in Python")
2243 (description
2244 "PyJWT is a JSON Web Token implementation written in Python.")
2245 (license license:expat)))
2246
2247(define-public python2-pyjwt
2248 (package-with-python2 python-pyjwt))
2249
2250(define-public python-pykka
2251 (package
2252 (name "python-pykka")
2253 (version "1.2.1")
2254 (source
2255 (origin
2256 (method url-fetch)
2257 (uri (pypi-uri "Pykka" version))
2258 (sha256
2259 (base32
2260 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
2261 (build-system python-build-system)
2262 (native-inputs
2263 `(("python-mock" ,python-mock)
2264 ("python-nose" ,python-nose)
2265 ("python-gevent" ,python-gevent)
2266 ("python-eventlet" ,python-eventlet)))
2267 (home-page "https://www.pykka.org/")
2268 (synopsis "Pykka is a Python implementation of the actor model")
2269 (description
2270 "Pykka is a Python implementation of the actor model.
2271The actor model introduces some simple rules to control the sharing
2272of state and cooperation between execution units, which makes it
2273easier to build concurrent applications.")
2274 (license license:asl2.0)))
2275
2276(define-public python2-pykka
2277 (package-with-python2 python-pykka))
2278
8d22f7e3
VC
2279(define-public python-pymsgbox
2280 (package
2281 (name "python-pymsgbox")
2282 (version "1.0.6")
2283 (source
2284 (origin
2285 (method git-fetch)
2286 (uri (git-reference
2287 ;; LICENSE.txt is not present on pypi
2288 (url "https://github.com/asweigart/PyMsgBox")
2289 (commit "55926b55f46caa969c5ddb87990ebea2737bd66f")))
2290 (file-name (git-file-name name version))
2291 (sha256
2292 (base32
2293 "0zy7rjfpwlrd8b64j7jk2lb8m2npc21rnpwakpfvwgl4nxdy80rg"))))
2294 (arguments
2295 ;; Circular dependency to run tests:
2296 ;; Tests need pyautogui, which depends on pymsgbox.
2297 '(#:tests? #f))
2298 (build-system python-build-system)
2299 (home-page "https://github.com/asweigart/PyMsgBox")
2300 (synopsis "Python module for JavaScript-like message boxes")
2301 (description
2302 "PyMsgBox is a simple, cross-platform, pure Python module for
2303JavaScript-like message boxes. Types of dialog boxes include:
2304@enumerate
2305@item alert
2306@item confirm
2307@item prompt
2308@item password
2309@end enumerate
2310")
2311 (license license:bsd-3)))
2312
44d10b1f
RW
2313(define-public python-pympler
2314 (package
2315 (name "python-pympler")
2316 (home-page "https://pythonhosted.org/Pympler/")
c498a07e 2317 (version "0.7")
44d10b1f
RW
2318 (source (origin
2319 (method url-fetch)
2320 (uri (pypi-uri "Pympler" version))
2321 (sha256
2322 (base32
c498a07e 2323 "0ki7bqp1h9l1xc2k1h4vjyzsgs20i8ingvcdhszyi72s28wyf4bs"))))
44d10b1f
RW
2324 (build-system python-build-system)
2325 (arguments
2326 `(#:phases (modify-phases %standard-phases
2327 (delete 'check)
2328 (add-after 'install 'check
2329 (lambda* (#:key inputs outputs #:allow-other-keys)
2330 (add-installed-pythonpath inputs outputs)
2331 (invoke "python" "setup.py" "test"))))))
2332 (synopsis "Measure, monitor and analyze memory behavior")
2333 (description
2334 "Pympler is a development tool to measure, monitor and analyze
2335the memory behavior of Python objects in a running Python application.
2336
2337By pympling a Python application, detailed insight in the size and the
2338lifetime of Python objects can be obtained. Undesirable or unexpected
2339runtime behavior like memory bloat and other @samp{pymples} can easily
2340be identified.
2341
2342A web profiling frontend exposes process statistics, garbage
2343visualisation and class tracker statistics.")
2344 (license license:asl2.0)))
2345
2346(define-public python2-pympler
2347 (package-with-python2 python-pympler))
2348
2349(define-public python-itsdangerous
2350 (package
2351 (name "python-itsdangerous")
acfcf2ed 2352 (version "1.1.0")
44d10b1f
RW
2353 (source
2354 (origin
2355 (method url-fetch)
acfcf2ed 2356 (uri (pypi-uri "itsdangerous" version))
44d10b1f
RW
2357 (sha256
2358 (base32
acfcf2ed 2359 "068zpbksq5q2z4dckh2k1zbcq43ay74ylqn77rni797j0wyh66rj"))))
44d10b1f 2360 (build-system python-build-system)
acfcf2ed 2361 (home-page "https://palletsprojects.com/p/itsdangerous/")
44d10b1f
RW
2362 (synopsis "Python library for passing data to/from untrusted environments")
2363 (description
2364 "Itsdangerous provides various helpers to pass trusted data to untrusted
2365environments and back.")
2366 (license license:bsd-3)))
2367
2368(define-public python2-itsdangerous
2369 (package-with-python2 python-itsdangerous))
2370
2371(define-public python-pyyaml
2372 (package
2373 (name "python-pyyaml")
2374 (version "3.13")
2375 (source
2376 (origin
2377 (method url-fetch)
2378 (uri (pypi-uri "PyYAML" version))
2379 (sha256
2380 (base32
2381 "1gx603g484z46cb74j9rzr6sjlh2vndxayicvlyhxdz98lhhkwry"))))
2382 (build-system python-build-system)
2383 (inputs
2384 `(("libyaml" ,libyaml)))
2385 (home-page "http://pyyaml.org/wiki/PyYAML")
2386 (synopsis "YAML parser and emitter for Python")
2387 (description
2388 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2389complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2390API, and sensible error messages. PyYAML supports standard YAML tags and
2391provides Python-specific tags that allow to represent an arbitrary Python
2392object.")
2393 (license license:expat)))
2394
2395(define-public python2-pyyaml
2396 (package-with-python2 python-pyyaml))
2397
2398(define-public python-vine
2399 (package
2400 (name "python-vine")
2401 (version "1.1.4")
2402 (source
2403 (origin
2404 (method url-fetch)
2405 (uri (pypi-uri "vine" version))
2406 (sha256
2407 (base32
2408 "0wkskb2hb494v9gixqnf4bl972p4ibcmxdykzpwjlfa5picns4aj"))))
2409 (build-system python-build-system)
2410 (native-inputs
2411 `(("python-pytest" ,python-pytest)
2412 ("python-case" ,python-case)))
2413 (home-page "https://github.com/celery/vine")
2414 (synopsis "Promises for Python")
2415 (description
2416 "@code{vine} provides a special implementation of promises in that it can
2417be used both for \"promise of a value\" and lazy evaluation. The biggest
2418upside for this is that everything in a promise can also be a promise,
2419e.g. filters, callbacks and errbacks can all be promises.")
2420 (license license:bsd-3)))
2421
2422(define-public python-virtualenv
2423 (package
2424 (name "python-virtualenv")
2782bd51 2425 (version "16.1.0")
44d10b1f
RW
2426 (source
2427 (origin
2428 (method url-fetch)
2429 (uri (pypi-uri "virtualenv" version))
2430 (sha256
2431 (base32
2782bd51 2432 "0242cg3hdq3qdvx5flyrki8lpwlgwf5k45c21ks5049fv7ygm6gq"))))
44d10b1f
RW
2433 (build-system python-build-system)
2434 (arguments
2435 `(#:phases
2436 (modify-phases %standard-phases
2782bd51 2437 (add-before 'check 'disable-failing-test
44d10b1f
RW
2438 (lambda _
2439 ;; Disable failing test. See upstream bug report
2440 ;; https://github.com/pypa/virtualenv/issues/957
2441 (substitute* "tests/test_virtualenv.py"
2442 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2782bd51 2443 #t)))))
44d10b1f
RW
2444 (native-inputs
2445 `(("python-mock" ,python-mock)
2446 ("python-pytest" ,python-pytest)))
2447 (home-page "https://virtualenv.pypa.io/")
2448 (synopsis "Virtual Python environment builder")
2449 (description
2450 "Virtualenv is a tool to create isolated Python environments.")
2451 (license license:expat)))
2452
2453(define-public python2-virtualenv
2454 (package-with-python2 python-virtualenv))
2455
2456(define-public python-markupsafe
2457 (package
2458 (name "python-markupsafe")
753eb411 2459 (version "1.1.1")
44d10b1f
RW
2460 (source
2461 (origin
2462 (method url-fetch)
5182927c 2463 (uri (pypi-uri "MarkupSafe" version))
44d10b1f
RW
2464 (sha256
2465 (base32
753eb411 2466 "0sqipg4fk7xbixqd8kq6rlkxj664d157bdwbh93farcphf92x1r9"))))
44d10b1f 2467 (build-system python-build-system)
753eb411
MB
2468 (arguments
2469 `(#:modules ((ice-9 ftw)
2470 (srfi srfi-1)
2471 (srfi srfi-26)
2472 (guix build utils)
2473 (guix build python-build-system))
2474 #:phases (modify-phases %standard-phases
2475 (replace 'check
2476 (lambda _
2477 (let ((cwd (getcwd))
2478 (libdir (find (cut string-prefix? "lib." <>)
2479 (scandir "build"))))
2480 (setenv "PYTHONPATH"
2481 (string-append cwd "/build/" libdir ":"
2482 (getenv "PYTHONPATH")))
2483 (invoke "pytest" "-vv")))))))
2484 (native-inputs
2485 `(("python-pytest" ,python-pytest)))
44d10b1f
RW
2486 (home-page "https://github.com/mitsuhiko/markupsafe")
2487 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2488 (description
2489 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2490for Python.")
2491 (license license:bsd-3)))
2492
2493(define-public python2-markupsafe
2494 (package-with-python2 python-markupsafe))
2495
2496(define-public python-jinja2
2497 (package
2498 (name "python-jinja2")
4a5c7934 2499 (version "2.10.1")
44d10b1f
RW
2500 (source
2501 (origin
2502 (method url-fetch)
2503 (uri (pypi-uri "Jinja2" version))
2504 (sha256
2505 (base32
4a5c7934 2506 "04shqrs56aj04ipyqykj512rw2l0zfammvj9krawzxz7xc14yp06"))))
44d10b1f
RW
2507 (build-system python-build-system)
2508 (propagated-inputs
2509 `(("python-markupsafe" ,python-markupsafe)))
2510 (home-page "http://jinja.pocoo.org/")
2511 (synopsis "Python template engine")
2512 (description
2513 "Jinja2 is a small but fast and easy to use stand-alone template engine
2514written in pure Python.")
2515 (license license:bsd-3)))
2516
2517(define-public python2-jinja2
2518 (package-with-python2 python-jinja2))
2519
ba42a6bf
TLC
2520(define-public python-jinja2-time
2521 (package
2522 (name "python-jinja2-time")
2523 (version "0.2.0")
2524 (source
2525 (origin
2526 (method url-fetch)
2527 (uri (pypi-uri "jinja2-time" version))
2528 (sha256
2529 (base32
2530 "0h0dr7cfpjnjj8bgl2vk9063a53649pn37wnlkd8hxjy656slkni"))))
2531 (build-system python-build-system)
2532 (propagated-inputs
2533 `(("python-arrow" ,python-arrow)
2534 ("python-jinja2" ,python-jinja2)))
2535 (home-page
2536 "https://github.com/hackebrot/jinja2-time")
2537 (synopsis "Jinja2 Extension for Dates and Times")
2538 (description
2539 "This package provides an extension for the template engine Jinja2. It
2540adds a 'now' tag providing a convenient access to the arrow.now() API from
2541templates. A format string can be provided to control the output.")
2542 (license license:expat)))
2543
44d10b1f
RW
2544(define-public python-pystache
2545 (package
2546 (name "python-pystache")
2547 (version "0.5.4")
2548 (source (origin
2549 (method url-fetch)
2550 (uri (pypi-uri "pystache" version))
2551 (sha256
2552 (base32
2553 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2554 (build-system python-build-system)
2555 (arguments
2556 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
2557 (home-page "http://defunkt.io/pystache/")
2558 (synopsis "Python logic-less template engine")
2559 (description
2560 "Pystache is a Python implementation of the framework agnostic,
2561logic-free templating system Mustache.")
2562 (license license:expat)
2563 (properties `((python2-variant . ,(delay python2-pystache))))))
2564
2565(define-public python2-pystache
2566 (package (inherit (package-with-python2
2567 (strip-python2-variant python-pystache)))
2568 (arguments
2569 `(#:python ,python-2
2570 #:phases
2571 (modify-phases %standard-phases
2572 (replace 'check
2573 (lambda _
dfafc29b 2574 (invoke "python" "test_pystache.py"))))))))
44d10b1f
RW
2575
2576(define-public python-joblib
2577 (package
2578 (name "python-joblib")
2579 (version "0.13.0")
2580 (source (origin
2581 (method url-fetch)
2582 (uri (pypi-uri "joblib" version))
2583 (sha256
2584 (base32
2585 "0612nazad8dxmn3xghfrmjax6456l4xy6hn9cngs7vydi14ds7v5"))))
2586 (build-system python-build-system)
2587 (arguments
2588 `(#:phases
2589 (modify-phases %standard-phases
2590 (replace 'check
2591 (lambda _ (invoke "pytest" "-v" "joblib"))))))
2592 (native-inputs
2593 `(("python-pytest" ,python-pytest)))
2594 (home-page "https://joblib.readthedocs.io/")
2595 (synopsis "Using Python functions as pipeline jobs")
2596 (description
2597 "Joblib is a set of tools to provide lightweight pipelining in Python.
2598In particular, joblib offers: transparent disk-caching of the output values
2599and lazy re-evaluation (memoize pattern), easy simple parallel computing
2600logging and tracing of the execution.")
2601 (license license:bsd-3)))
2602
2603(define-public python2-joblib
2604 (package-with-python2 python-joblib))
2605
a3363341
VC
2606(define-public python-daemon
2607 (package
2608 (name "python-daemon")
2609 (version "2.2.3")
2610 (source
2611 (origin
2612 (method url-fetch)
2613 (uri (pypi-uri "python-daemon" version))
2614 (sha256
2615 (base32
2616 "09fcjdjzk9ywmpnrj62iyxqgcygzdafsz41qlrk2dknzbagcmzmg"))))
2617 (build-system python-build-system)
2618 (arguments
2619 `(#:phases
2620 (modify-phases %standard-phases
2621 (add-before 'check 'disable-tests
2622 (lambda _
2623 ;; FIXME: Determine why test fails
2624 (substitute* "test/test_daemon.py"
2625 (("test_detaches_process_context")
2626 "skip_test_detaches_process_context"))
2627 #t)))))
2628 (propagated-inputs
2629 `(("python-lockfile" ,python-lockfile)))
2630 (native-inputs
2631 `(("python-unittest2" ,python-unittest2)
2632 ("python-testtools" ,python-testtools)
2633 ("python-testscenarios" ,python-testscenarios)
2634 ("python-mock" ,python-mock)
2635 ("python-docutils" ,python-docutils)))
2636 (home-page "https://pagure.io/python-daemon/")
2637 (synopsis "Python library for making a Unix daemon process")
2638 (description "Python-daemon is a library that assists a Python program to
2639turn itself into a well-behaved Unix daemon process, as specified in PEP 3143.
2640
2641This library provides a @code{DaemonContext} class that manages the following
2642important tasks for becoming a daemon process:
2643@enumerate
2644@item Detach the process into its own process group.
2645@item Set process environment appropriate for running inside a chroot.
2646@item Renounce suid and sgid privileges.
2647@item Close all open file descriptors.
2648@item Change the working directory, uid, gid, and umask.
2649@item Set appropriate signal handlers.
2650@item Open new file descriptors for stdin, stdout, and stderr.
2651@item Manage a specified PID lock file.
2652@item Register cleanup functions for at-exit processing.
2653@end enumerate")
2654 ;; Only setup.py is gpl3+, everything else is apache 2.0 licensed.
2655 (license (list license:asl2.0 license:gpl3+))))
2656
44d10b1f
RW
2657(define-public python-docutils
2658 (package
2659 (name "python-docutils")
2660 (version "0.14")
2661 (source
2662 (origin
2663 (method url-fetch)
2664 (uri (pypi-uri "docutils" version))
2665 (sha256
2666 (base32
2667 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))
2668 (build-system python-build-system)
2669 (arguments
2670 '(#:tests? #f)) ; no setup.py test command
2671 (home-page "http://docutils.sourceforge.net/")
2672 (synopsis "Python Documentation Utilities")
2673 (description
2674 "Docutils is a modular system for processing documentation into useful
2675formats, such as HTML, XML, and LaTeX. For input Docutils supports
2676reStructuredText.")
2677 ;; Most of the source code is public domain, but some source files are
2678 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
2679 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
2680
2681(define-public python2-docutils
2682 (package-with-python2 python-docutils))
2683
2684(define-public python-pygments
2685 (package
2686 (name "python-pygments")
eed81080 2687 (version "2.4.2")
44d10b1f
RW
2688 (source
2689 (origin
2690 (method url-fetch)
2691 (uri (pypi-uri "Pygments" version))
2692 (sha256
2693 (base32
eed81080 2694 "15v2sqm5g12bqa0c7wikfh9ck2nl97ayizy1hpqhmws5gqalq748"))))
44d10b1f
RW
2695 (build-system python-build-system)
2696 (arguments
2697 ;; FIXME: Tests require sphinx, which depends on this.
2698 '(#:tests? #f))
2699 (home-page "http://pygments.org/")
2700 (synopsis "Syntax highlighting")
2701 (description
2702 "Pygments is a syntax highlighting package written in Python.")
2703 (license license:bsd-2)))
2704
2705(define-public python2-pygments
2706 (package-with-python2 python-pygments))
2707
0f0a5ef9
MC
2708(define-public python-bumpversion
2709 (package
2710 (name "python-bumpversion")
2711 (version "0.5.3")
2712 (source
2713 (origin
2714 (method url-fetch)
2715 (uri (pypi-uri "bumpversion" version))
2716 (sha256
2717 (base32
2718 "0zn7694yfipxg35ikkfh7kvgl2fissha3dnqad2c5bvsvmrwhi37"))))
2719 (build-system python-build-system)
2720 (home-page "https://github.com/peritus/bumpversion")
2721 (synopsis "Tool to bump software version")
2722 (description "This tool provides a command-line interface (CLI) to bump a
2723software version simply.")
2724 (license license:expat)))
2725
b24fd2c2
MC
2726(define-public python-deprecated
2727 (package
2728 (name "python-deprecated")
2729 (version "1.2.5")
2730 (source
2731 (origin
2732 (method git-fetch)
2733 (uri (git-reference
2734 (url "https://github.com/tantale/deprecated.git")
2735 (commit (string-append "v" version))))
2736 (file-name (git-file-name name version))
2737 (sha256
2738 (base32
2739 "14909glxxwwc4b9qpz2b9jdriwzi5n65ichw85xqppap5f79wcwz"))))
2740 (build-system python-build-system)
2741 (arguments
2742 `(#:phases (modify-phases %standard-phases
2743 (replace 'check
2744 (lambda _
2745 (invoke "pytest"))))))
2746 (propagated-inputs
2747 `(("python-wrapt" ,python-wrapt)))
2748 (native-inputs
2749 `(("python-bumpversion" ,python-bumpversion)
2750 ("python-pytest" ,python-pytest)
2751 ("python-pytest-cov" ,python-pytest-cov)
2752 ("python-sphinx" ,python-sphinx)
2753 ("python-tox" ,python-tox)))
2754 (home-page "https://github.com/tantale/deprecated")
2755 (synopsis "Python decorator to deprecate classes, functions or methods")
2756 (description "The @code{deprecated} decorator provides a convenient way to deprecate
2757to deprecate classes, functions or methods.")
2758 (license license:expat)))
2759
d5a998fa
MC
2760(define-public python-pygithub
2761 (package
2762 (name "python-pygithub")
2763 (version "1.43.7")
2764 (source
2765 ;; We fetch from the Git repo because there are no tests in the PyPI
2766 ;; archive.
2767 (origin
2768 (method git-fetch)
2769 (uri (git-reference
2770 (url "https://github.com/PyGithub/PyGithub.git")
2771 (commit (string-append "v" version))))
2772 (file-name (git-file-name name version))
2773 (sha256
2774 (base32
2775 "0ww92zz0ja9w6rw83vphmn8rwmcn6abg16j4q7zxjc0rrg2cfj9i"))))
2776 (build-system python-build-system)
2777 (arguments
2778 `(#:phases (modify-phases %standard-phases
2779 ;; Some tests rely on the network.
2780 (add-after 'unpack 'disable-failing-tests
2781 (lambda _
2782 (substitute* "tests/Issue142.py"
2783 (("testDecodeJson") "disabled_testDecodeJson"))
2784 #t))
2785 (add-before 'check 'prepare-for-tests
2786 (lambda _
2787 (for-each (lambda (f)
2788 (chmod f #o666))
2789 (find-files "./tests"))
2790 (system* "python" "-m" "lib2to3" "-w" "-n" "tests")
2791 (setenv "PYTHONPATH"
2792 (string-append "./tests:" (getenv "PYTHONPATH")))
2793 #t)))))
2794 (propagated-inputs
2795 `(("python-deprecated" ,python-deprecated)
2796 ("python-pyjwt" ,python-pyjwt)
2797 ("python-requests" ,python-requests)))
2798 (native-inputs `(("python-httpretty" ,python-httpretty)))
2799 (home-page "https://pygithub.readthedocs.io/en/latest/")
2800 (synopsis "Python library for the GitHub API")
2801 (description "This library allows managing GitHub resources such as
2802repositories, user profiles, and organizations in your Python applications,
2803using version 3 of the GitHub application programming interface (API).")
2804 (license license:lgpl3+)))
2805
c0c0bb38
MC
2806(define-public python-rellu
2807 (package
2808 (name "python-rellu")
2809 (version "0.7")
2810 (source
2811 (origin
2812 (method url-fetch)
2813 (uri (pypi-uri "rellu" version))
2814 (sha256
2815 (base32
2816 "1w0arpj1sm7vh29nrbnca4pnp8sx42l07r17inwqcjjf9bhng66x"))))
2817 (build-system python-build-system)
2818 (propagated-inputs
2819 `(("python-invoke" ,python-invoke)
2820 ("python-pygithub" ,python-pygithub)))
2821 (home-page "https://github.com/robotframework/rellu")
2822 (synopsis "Utilities to create PyPI releases")
2823 (description "This collection of utilities contains tooling and templates
2824to assist in creating releases on GitHub and publishing them on PyPI. It is
2825designed to be used by Robot Framework and tools and libraries in its
2826ecosystem, but can naturally be used also by other projects.")
2827 (license license:asl2.0)))
2828
b9790285
MC
2829(define-public python-robotframework
2830 (package
2831 (name "python-robotframework")
1710b8f8 2832 (version "3.1.2")
b9790285
MC
2833 ;; There are no tests in the PyPI archive.
2834 (source
2835 (origin
2836 (method git-fetch)
2837 (uri (git-reference
2838 (url "https://github.com/robotframework/robotframework.git")
2839 (commit (string-append "v" version))))
2840 (file-name (git-file-name name version))
2841 (sha256
1710b8f8 2842 (base32 "16gnxy0qinh8fhs0qvhff5z2xh49c3cqgm0d7bfjw120df6x7fym"))
b9790285
MC
2843 (patches (search-patches
2844 "python-robotframework-honor-source-date-epoch.patch"))))
2845 (build-system python-build-system)
2846 (arguments
2847 `(#:phases (modify-phases %standard-phases
2848 (add-before 'build 'build-and-install-doc
2849 (lambda* (#:key outputs #:allow-other-keys)
2850 (let* ((doc-output (assoc-ref outputs "doc"))
2851 (doc (string-append doc-output "/share/"
2852 ,name "-" ,version "/")))
2853 (invoke "invoke" "library-docs" "all")
2854 (mkdir-p doc)
2855 (copy-recursively "doc/libraries"
2856 (string-append doc "/libraries"))
2857 #t)))
2858 (replace 'check
2859 (lambda _
2860 (invoke "python" "utest/run.py"))))))
2861 (native-inputs
2862 `(("python-invoke" ,python-invoke)
2863 ("python-rellu" ,python-rellu)
2864 ("python:tk" ,python "tk"))) ;used when building the HTML doc
2865 (outputs '("out" "doc"))
2866 (home-page "https://robotframework.org")
2867 (synopsis "Generic automation framework")
2868 (description "Robot Framework is a generic automation framework for
2869acceptance testing, acceptance test driven development (ATDD), and robotic
2870process automation (RPA).")
2871 (license license:asl2.0)))
2872
5b84c120
MC
2873(define-public python-robotframework-lint
2874 ;; There is no properly tagged release; the commit below seems to correspond
2875 ;; to the 0.9 stable release available from PyPI. The tests are not
2876 ;; included in the PyPI archive, so we fetch the sources from the upstream
2877 ;; Git repo.
2878 (let ((commit "e851879bab1f63e4e53b34a4dc8a67ed95102830")
2879 (revision "1"))
2880 (package
2881 (name "python-robotframework-lint")
2882 (version (git-version "0.9.0" revision commit))
2883 (source
2884 (origin
2885 (method git-fetch)
2886 (uri (git-reference
2887 (url "https://github.com/boakley/robotframework-lint.git")
2888 (commit commit)))
2889 (file-name (git-file-name name version))
2890 (sha256
2891 (base32
2892 "1p6fknqg5sb9qz5857ji4a877657vgfjm5v3zn45994parx6ml1m"))))
2893 (build-system python-build-system)
2894 (arguments
2895 `(#:phases
2896 (modify-phases %standard-phases
2897 (replace 'check
2898 (lambda _
2899 (invoke "python" "-m" "robot" "-A"
2900 "tests/conf/default.args" "tests"))))))
2901 (propagated-inputs
2902 `(("python-robotframework" ,python-robotframework)))
2903 (home-page "https://github.com/boakley/robotframework-lint/")
2904 (synopsis "Static analysis tool (linter) for Robot Framework")
2905 (description "This package provides the @code{rflint} command-line
2906utility, a static analysis tool (linter) for Robot Framework source files.")
2907 (license license:asl2.0))))
2908
c0c64f17
MC
2909(define-public python-robotframework-sshlibrary
2910 (package
2911 (name "python-robotframework-sshlibrary")
2912 (version "3.3.0")
2913 ;; There are no tests in the PyPI archive.
2914 (source
2915 (origin
2916 (method git-fetch)
2917 (uri (git-reference
2918 (url "https://github.com/robotframework/SSHLibrary.git")
2919 (commit (string-append "v" version))))
2920 (file-name (git-file-name name version))
2921 (sha256
2922 (base32
2923 "1mk6dz2jqqndbx4yji09012q6rmadnqdywi7czvj62b0s07dr3r2"))))
2924 (build-system python-build-system)
2925 (arguments
2926 `(#:phases
2927 (modify-phases %standard-phases
2928 (add-before 'build 'build-and-install-doc
2929 (lambda* (#:key outputs #:allow-other-keys)
2930 (let* ((doc-output (assoc-ref outputs "doc"))
2931 (doc (string-append doc-output "/share/"
2932 ,name "-" ,version "/")))
2933 (invoke "chmod" "-R" "+w" "docs")
2934 (invoke "invoke" "kw-docs" "project-docs")
2935 (mkdir-p doc)
2936 (for-each delete-file (find-files "docs" "\\.rst"))
2937 (copy-recursively "docs" doc)
2938 #t)))
2939 (replace 'check
2940 (lambda _
2941 ;; Some tests require an SSH server; we remove them.
2942 (delete-file "utest/test_client_api.py")
2943 (delete-file "utest/test_scp.py")
2944 (invoke "python" "utest/run.py"))))))
2945 (propagated-inputs
2946 `(("python-robotframework" ,python-robotframework)
2947 ("python-paramiko" ,python-paramiko)
2948 ("python-scp" ,python-scp)))
2949 (native-inputs
2950 `(("openssh" ,openssh)
2951 ("which" ,which)
2952 ;; To generate the documentation
2953 ("python-docutils" ,python-docutils)
2954 ("python-invoke" ,python-invoke)
2955 ("python-pygments" ,python-pygments)
2956 ("python-rellu" ,python-rellu)))
2957 (outputs '("out" "doc"))
2958 (home-page "https://github.com/robotframework/SSHLibrary")
2959 (synopsis "Robot Framework library for SSH and SFTP")
2960 (description "SSHLibrary is a Robot Framework library providing support
2961for SSH and SFTP. It has the following main usages:
2962@itemize @bullet
2963@item Executing commands on the remote machine, either blocking or non-blocking.
2964@item Writing and reading in an interactive shell.
2965@item Transferring files and directories over SFTP.
2966@item Ensuring that files and directories exist on the remote machine.
2967@end itemize")
2968 (license license:asl2.0)))
2969
13d825fc
MC
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
2989receive files via the SCP1 protocol, as implemented by the OpenSSH
2990@command{scp} program.")
2991 (license license:gpl2+)))
2992
44d10b1f
RW
2993(define-public python-rst.linker
2994 (package
2995 (name "python-rst.linker")
2996 (version "1.10")
2997 (source
2998 (origin
2999 (method url-fetch)
3000 (uri (pypi-uri "rst.linker" version))
3001 (sha256
3002 (base32
3003 "0iqaacp7pj1s8avs4kc0qg0r7dscywaq37y6l9j14glqdikk0wdj"))))
3004 (build-system python-build-system)
3005 (propagated-inputs
3006 `(("python-dateutil" ,python-dateutil)
3007 ("python-six" ,python-six)))
3008 (native-inputs
3009 `(("python-setuptools-scm" ,python-setuptools-scm)))
3010 ;; Test would require path.py, which would introduce a cyclic dependence.
3011 (arguments `(#:tests? #f))
3012 ;; Note: As of version 1.7 the documentation is not worth building.
3013 (home-page "https://github.com/jaraco/rst.linker")
3014 (synopsis "Sphinx plugin to add links and timestamps")
3015 (description "rst.linker allows to automatically replace text by a
3016reStructuredText external reference or timestamps. It's primary purpose is to
3017augment the changelog, but it can be used for other documents, too.")
3018 (license license:expat)))
3019
3020(define-public python2-rst.linker
3021 (package-with-python2 python-rst.linker))
3022
3023(define-public python-feedgenerator
3024 (package
3025 (name "python-feedgenerator")
3026 (version "1.9")
3027 (source
3028 (origin
3029 (method url-fetch)
3030 (uri (pypi-uri "feedgenerator" version))
3031 (sha256
3032 (base32
3033 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
3034 (modules '((guix build utils)))
3035 (snippet
3036 '(begin
3037 ;; Remove pre-compiled .pyc files from source.
3038 (for-each delete-file-recursively
3039 (find-files "." "__pycache__" #:directories? #t))
3040 (for-each delete-file (find-files "." "\\.pyc$"))
3041 #t))))
3042 (build-system python-build-system)
3043 (propagated-inputs
3044 `(("python-pytz" ,python-pytz)
3045 ("python-six" ,python-six)))
3046 (home-page "https://github.com/getpelican/feedgenerator")
3047 (synopsis
3048 "Standalone version of Django's Atom/RSS feed generator")
3049 (description
3050 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
3051which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
3052 (license license:bsd-3)))
3053
3054(define-public python2-feedgenerator
3055 (package-with-python2 python-feedgenerator))
3056
3057(define-public python-toml
3058 (package
3059 (name "python-toml")
3060 (version "0.9.4")
3061 (source
3062 (origin
3063 (method url-fetch)
3064 (uri (pypi-uri "toml" version))
3065 (sha256
3066 (base32
3067 "0bdbpbip67wdm6c7xwc6mmbmskyradj4cdxn1iibj4fcx1nbv1lf"))))
3068 (build-system python-build-system)
3069 (arguments
3070 `(#:tests? #f)) ;no tests suite in release
3071 (home-page "https://github.com/uiri/toml")
3072 (synopsis "Library for TOML")
3073 (description
3074 "@code{toml} is a library for parsing and creating Tom's Obvious, Minimal
3075Language (TOML) configuration files.")
3076 (license license:expat)))
3077
346c8752
BG
3078(define-public python-jsonrpc-server
3079 (package
3080 (name "python-jsonrpc-server")
3081 (version "0.1.2")
3082 (source
3083 (origin
3084 (method url-fetch)
3085 (uri (pypi-uri "python-jsonrpc-server" version))
3086 (sha256
3087 (base32
3088 "0m4ykpcdy52x37n1ikysp07j7p8ialcdvvvsrjp3545sn7iiid09"))))
3089 (build-system python-build-system)
3090 (propagated-inputs
3091 `(("python-future" ,python-future)
3092 ("python-mock" ,python-mock)
3093 ("python-pytest" ,python-pytest)))
3094 (home-page
3095 "https://github.com/palantir/python-jsonrpc-server")
3096 (synopsis "JSON RPC 2.0 server library")
3097 (description
1df5407c 3098 "This package provides a JSON RPC 2.0 server library for Python.")
346c8752
BG
3099 (license license:expat)))
3100
56f4ad47
BG
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
3121Server (PLS).")
3122 (license license:expat)))
3123
be4d840c 3124(define-public python-language-server
808dd2d0
BL
3125 (package
3126 (name "python-language-server")
3127 (version "0.29.1")
3128 (source
3129 (origin
3130 (method url-fetch)
3131 (uri (pypi-uri "python-language-server" version))
3132 (sha256
3133 (base32
3134 "1f8qlflh6j3s7qfmzhirpl8fgidl6f0qbakdmiml96wdxzvka0s3"))))
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
be4d840c
BG
3153language specification for the Language Server Protocol (LSP). This tool is
3154used in text editing environments to provide a complete and integrated
3155feature-set for programming Python effectively.")
808dd2d0 3156 (license license:expat)))
be4d840c 3157
44d10b1f
RW
3158(define-public python-black
3159 (package
3160 (name "python-black")
3161 (version "18.6b4")
3162 (source
3163 (origin
3164 (method url-fetch)
3165 (uri (pypi-uri "black" version))
3166 (sha256
3167 (base32
3168 "0i4sfqgz6w15vd50kbhi7g7rifgqlf8yfr8y78rypd56q64qn592"))))
3169 (build-system python-build-system)
3170 (arguments
3171 `(#:phases
3172 (modify-phases %standard-phases
3173 (add-after 'patch-source-shebangs 'patch-extra-shebangs
3174 (lambda _
3175 (let ((python3 (which "python3")))
3176 (substitute* '("tests/data/fmtonoff.py"
3177 "tests/data/string_prefixes.py"
3178 "tests/data/function.py")
3179 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
3180 (string-append "#!" python3 (if (string? minor-version)
3181 minor-version
3182 ""))))))))))
3183 (propagated-inputs
3184 `(("python-click" ,python-click)
3185 ("python-attrs" ,python-attrs)
3186 ("python-appdirs" ,python-appdirs)
3187 ("python-toml" ,python-toml)))
3188 (home-page "https://github.com/ambv/black")
3189 (synopsis "The uncompromising code formatter")
3190 (description "Black is the uncompromising Python code formatter.")
3191 (license license:expat)))
3192
3193(define-public python-blinker
3194 (package
3195 (name "python-blinker")
3196 (version "1.4")
3197 (source
3198 (origin
3199 (method url-fetch)
3200 (uri (pypi-uri "blinker" version))
3201 (sha256
3202 (base32
3203 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
3204 (build-system python-build-system)
3205 (home-page "http://pythonhosted.org/blinker/")
3206 (synopsis "Fast, simple object-to-object and broadcast signaling")
3207 (description
3208 "Blinker provides a fast dispatching system that allows any number of
3209interested parties to subscribe to events, or \"signals\".")
3210 (license license:expat)))
3211
3212(define-public python2-blinker
3213 (package-with-python2 python-blinker))
3214
3215(define-public pelican
3216 (package
3217 (name "pelican")
aa71b690 3218 (version "4.0.1")
44d10b1f
RW
3219 (source
3220 (origin
3221 (method url-fetch)
3222 (uri (pypi-uri "pelican" version))
3223 (sha256
3224 (base32
aa71b690 3225 "05yda7n6r0ll18fpdjzkzyr0ls8hbb86fnjyb33k9jvv5avah2lr"))))
44d10b1f
RW
3226 (build-system python-build-system)
3227 (propagated-inputs
3228 `(("python-feedgenerator" ,python-feedgenerator)
3229 ("python-jinja2" ,python-jinja2)
3230 ("python-pygments" ,python-pygments)
3231 ("python-docutils" ,python-docutils)
3232 ("python-pytz" ,python-pytz)
3233 ("python-blinker" ,python-blinker)
3234 ("python-unidecode" ,python-unidecode)
3235 ("python-six" ,python-six)
3236 ("python-dateutil" ,python-dateutil)
3237 ("python-markdown" ,python-markdown)))
3238 (home-page "https://getpelican.com/")
3239 (arguments
3240 `(;; XXX Requires a lot more packages to do unit tests :P
3241 #:tests? #f
3242 #:phases (modify-phases %standard-phases
3243 (add-before
3244 'install 'adjust-requires
3245 ;; Since feedgenerator is installed from git, it doesn't
3246 ;; conform to the version requirements.
3247 ;;
3248 ;; We *do have* "feedgenerator >= 1.6", but strip off the
3249 ;; version requirement so setuptools doesn't get confused.
3250 (lambda _
3251 (substitute* "setup.py"
3252 (("['\"]feedgenerator.*?['\"]")
3253 "'feedgenerator'")))))))
3254 (synopsis "Python-based static site publishing system")
3255 (description
3256 "Pelican is a tool to generate a static blog from reStructuredText,
3257Markdown input files, and more. Pelican uses Jinja2 for templating
3258and is very extensible.")
3259 (license license:agpl3+)))
3260
8c141421
JH
3261(define-public mallard-ducktype
3262 (package
3263 (name "mallard-ducktype")
12cc3da5 3264 (version "1.0.2")
8c141421
JH
3265 (source
3266 (origin
3267 (method git-fetch)
12cc3da5
JH
3268 ;; git-reference because tests are not included in pypi source tarball
3269 ;; https://issues.guix.gnu.org/issue/36755#2
8c141421
JH
3270 (uri (git-reference
3271 (url "https://github.com/projectmallard/mallard-ducktype.git")
3272 (commit version)))
3273 (file-name (git-file-name name version))
3274 (sha256
3275 (base32
12cc3da5 3276 "1jk9bfz7g04ip78s03b0xak6d54rj4h9zpgadkziy1ji216g6y4c"))))
8c141421 3277 (build-system python-build-system)
5246655f
EF
3278 (arguments
3279 '(#:phases
3280 (modify-phases %standard-phases
3281 (replace 'check
3282 (lambda _
3283 (with-directory-excursion "tests"
3284 (invoke "sh" "runtests")))))))
8c141421
JH
3285 (home-page "http://projectmallard.org")
3286 (synopsis "Convert Ducktype to Mallard documentation markup")
3287 (description
3288 "Ducktype is a lightweight syntax that can represent all the semantics
3289of the Mallard XML documentation system. Ducktype files can be converted to
3290Mallard using the @command{ducktype} tool. The yelp-tools package
3291provides additional functionality on the produced Mallard documents.")
3292 (license license:expat)))
3293
44d10b1f
RW
3294(define-public python-scikit-image
3295 (package
3296 (name "python-scikit-image")
9ff04084 3297 (version "0.14.2")
44d10b1f
RW
3298 (source
3299 (origin
3300 (method url-fetch)
3301 (uri (pypi-uri "scikit-image" version))
3302 (sha256
9ff04084 3303 (base32 "07qchljkyxvg5nrm12fvszi7pmjk4m01qp0w0z8syxzxxs20pz8s"))))
44d10b1f
RW
3304 (build-system python-build-system)
3305 (arguments
3306 ;; TODO: Some tests require running X11 server. Disable them?
3307 '(#:tests? #f))
3308 ;; See DEPENDS.txt for the list of build and run time requiremnts
3309 (propagated-inputs
3310 `(("python-cloudpickle" ,python-cloudpickle)
3311 ("python-dask" ,python-dask)
3312 ("python-matplotlib" ,python-matplotlib)
3313 ("python-networkx" ,python-networkx)
3314 ("python-numpy" ,python-numpy)
3315 ("python-pillow" ,python-pillow)
3316 ("python-pywavelets" ,python-pywavelets)
3317 ("python-scipy" ,python-scipy)
3318 ("python-six" ,python-six)))
3319 (native-inputs
3320 `(("python-cython" ,python-cython)))
3321 (home-page "http://scikit-image.org/")
3322 (synopsis "Image processing in Python")
3323 (description
3324 "Scikit-image is a collection of algorithms for image processing.")
3325 (license license:bsd-3)))
3326
3327(define-public python2-scikit-image
3328 (package-with-python2 python-scikit-image))
3329
3330(define-public python-cython
3331 (package
3332 (name "python-cython")
756a9809 3333 (version "0.29.13")
44d10b1f
RW
3334 (source
3335 (origin
3336 (method url-fetch)
3337 (uri (pypi-uri "Cython" version))
3338 (sha256
3339 (base32
756a9809 3340 "13k37lrcgagwwnzr5bzririsscb793vndj234d475x1h9ad0d7f2"))))
44d10b1f
RW
3341 (build-system python-build-system)
3342 ;; we need the full python package and not just the python-wrapper
3343 ;; because we need libpython3.3m.so
3344 (inputs
3345 `(("python" ,python)))
3346 (arguments
3347 `(#:phases
3348 (modify-phases %standard-phases
3349 (add-before 'check 'set-HOME
3350 ;; some tests require access to "$HOME/.cython"
3351 (lambda _ (setenv "HOME" "/tmp") #t))
3352
3353 ;; FIXME: These tests started failing on armhf after the 0.28 update
3354 ;; (commit c69d11c5930), both with an error such as this:
3355 ;; compiling (cpp) and running dictcomp ...
3356 ;; === C/C++ compiler error output: ===
3357 ;; ‘
3358 ;; dictcomp.cpp:5221: confused by earlier errors, bailing out
3359 ;; See <https://hydra.gnu.org/build/2948724> for logs.
3360 ,@(if (target-arm32?)
3361 `((add-before 'check 'disable-failing-tests
3362 (lambda _
3363 (let ((disabled-tests (open-file "tests/bugs.txt" "a")))
3364 (for-each (lambda (test)
3365 (format disabled-tests "~a\n" test))
3366 '("memslice" "dictcomp"))
3367 (close-port disabled-tests)))))
3368 '())
3369
3370 (replace 'check
3371 (lambda _
e9194eb0
MB
3372 ;; Disable compiler optimizations to greatly reduce the running
3373 ;; time of the test suite.
3374 (setenv "CFLAGS" "-O0")
3375
3376 (invoke "python" "runtests.py" "-vv"
3377 "-j" (number->string (parallel-job-count))))))))
f319409b 3378 (home-page "https://cython.org/")
44d10b1f
RW
3379 (synopsis "C extensions for Python")
3380 (description "Cython is an optimising static compiler for both the Python
3381programming language and the extended Cython programming language. It makes
3382writing C extensions for Python as easy as Python itself.")
3383 (license license:asl2.0)
3384 (properties `((python2-variant . ,(delay python2-cython))))))
3385
3386(define-public python2-cython
da460865
MB
3387 (let ((base (package-with-python2 (strip-python2-variant python-cython))))
3388 (package
3389 (inherit base)
3390 (name "python2-cython")
3391 (inputs
3392 `(("python-2" ,python-2))) ;this is not automatically changed
3393 (arguments
3394 (substitute-keyword-arguments (package-arguments base)
3395 ((#:phases phases)
3396 `(modify-phases ,phases
3397 (add-before 'check 'adjust-test_embed
3398 (lambda _
3399 (substitute* "runtests.py"
3400 ;; test_embed goes great lengths to find the static libpythonX.Y.a
3401 ;; so it can give the right -L flag to GCC when embedding static
3402 ;; builds of Python. It is unaware that the Python "config"
3403 ;; directory (where the static library lives) was renamed in
3404 ;; Python 3, and falls back to sysconfig.get_config_var('LIBDIR'),
3405 ;; which works fine, because that is where the shared library is.
3406 ;;
3407 ;; It also appears to be unaware that the Makefile in Demos/embed
3408 ;; already unconditionally pass the static library location to GCC,
3409 ;; after checking sysconfig.get_config_var('LIBPL).
3410 ;;
3411 ;; The effect is that the linker is unable to resolve libexpat
3412 ;; symbols when building for Python 2, because neither the Python 2
3413 ;; shared library nor Expat is available. To fix it, we can either
3414 ;; add Expat as an input and make it visible to the linker, or just
3415 ;; prevent it from overriding the Python shared library location.
3416 ;; The end result is identical, so we take the easy route.
3417 ((" or libname not in os\\.listdir\\(libdir\\)")
3418 ""))
3419 #t)))))))))
44d10b1f
RW
3420
3421;; The RPython toolchain currently does not support Python 3.
3422(define-public python2-rpython
3423 (package
3424 (name "python2-rpython")
3425 (version "0.2.1")
3426 (source
3427 (origin
3428 (method url-fetch)
3429 (uri (pypi-uri "rpython" version))
3430 (sha256
3431 (base32
3432 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
3433 (build-system python-build-system)
3434 (arguments `(#:python ,python-2))
3435 (native-inputs
3436 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
3437 (home-page "https://rpython.readthedocs.org")
3438 (synopsis "Framework for implementing interpreters and virtual machines")
3439 (description "RPython is a translation and support framework for
3440producing implementations of dynamic languages, emphasizing a clean separation
3441between language specification and implementation aspects.")
3442 (license license:expat)))
3443
3444;; NOTE: when upgrading numpy please make sure that python-pandas and
3445;; python-scipy still build, as these three packages are often used together.
3446(define-public python-numpy
3447 (package
3448 (name "python-numpy")
3449 (version "1.15.4")
3450 (source
3451 (origin
3452 (method url-fetch)
3453 (uri (string-append
3454 "https://github.com/numpy/numpy/releases/download/v"
3455 version "/numpy-" version ".tar.gz"))
3456 (sha256
3457 (base32
3458 "102vcl2qq4pjbm7a3d67vkkvn4466ngia1d8wi5avqwqh8j0jvkn"))))
3459 (build-system python-build-system)
3460 (inputs
3461 `(("openblas" ,openblas)
3462 ("lapack" ,lapack)))
3463 (native-inputs
3464 `(("python-cython" ,python-cython)
3465 ("python-pytest" ,python-pytest)
3466 ("gfortran" ,gfortran)))
3467 (arguments
3468 `(#:phases
3469 (modify-phases %standard-phases
3470 (add-before 'build 'configure-blas-lapack
3471 (lambda* (#:key inputs #:allow-other-keys)
3472 (call-with-output-file "site.cfg"
3473 (lambda (port)
3474 (format port
3475 "[openblas]
3476libraries = openblas
3477library_dirs = ~a/lib
3478include_dirs = ~a/include
3479
3480# backslash-n to make emacs happy
3481\n[lapack]
3482lapack_libs = lapack
3483library_dirs = ~a/lib
3484include_dirs = ~a/include
3485"
3486 (assoc-ref inputs "openblas")
3487 (assoc-ref inputs "openblas")
3488 (assoc-ref inputs "lapack")
3489 (assoc-ref inputs "lapack"))))
3490 #t))
3491 (add-before 'build 'fix-executable-paths
3492 (lambda* (#:key inputs #:allow-other-keys)
3493 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
3494 ;; instead of /bin/sh.
3495 (substitute* "numpy/distutils/exec_command.py"
3496 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
3497 (string-append match-start (assoc-ref inputs "bash") match-end)))
3498 ;; Use "gcc" executable, not "cc".
3499 (substitute* "numpy/distutils/system_info.py"
3500 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3501 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
3502 #t))
3503 ;; Tests can only be run after the library has been installed and not
3504 ;; within the source directory.
3505 (delete 'check)
3506 (add-after 'install 'check
3507 (lambda* (#:key outputs inputs #:allow-other-keys)
3508 ;; Make installed package available for running the tests
3509 (add-installed-pythonpath inputs outputs)
3510 ;; Make sure "f2py" etc is found.
3511 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
3512 ":" (getenv "PATH")))
3513 (with-directory-excursion "/tmp"
3514 (invoke "python" "-c"
3515 "import numpy; numpy.test(verbose=2)")))))))
3516 (home-page "http://www.numpy.org/")
3517 (synopsis "Fundamental package for scientific computing with Python")
3518 (description "NumPy is the fundamental package for scientific computing
3519with Python. It contains among other things: a powerful N-dimensional array
3520object, sophisticated (broadcasting) functions, tools for integrating C/C++
3521and Fortran code, useful linear algebra, Fourier transform, and random number
3522capabilities.")
3523 (license license:bsd-3)))
3524
3525(define-public python2-numpy
3526 (package-with-python2 python-numpy))
3527
3528;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
3529;; interest only for legacy code going back to NumPy's predecessor
3530;; Numeric.
3531(define-public python2-numpy-1.8
3532 (package (inherit python2-numpy)
3533 (version "1.8.2")
3534 (source
3535 (origin
3536 (method url-fetch)
3537 (uri (string-append
3538 "https://github.com/numpy/numpy/archive/v" version ".tar.gz"))
3539 (file-name (string-append "python2-numpy-" version ".tar.gz"))
3540 (sha256
3541 (base32
3542 "0sc20gz1b17xnyrkp5frca3ql5qfalpv916hfg2kqxpwr6jg0f1g"))))
3543 (arguments
3544 (substitute-keyword-arguments (package-arguments python2-numpy)
3545 ((#:phases phases)
3546 `(modify-phases ,phases
3547 (replace 'configure-blas-lapack
3548 (lambda* (#:key inputs #:allow-other-keys)
3549 (call-with-output-file "site.cfg"
3550 (lambda (port)
3551 (format port
3552 "[openblas]
3553libraries = openblas,lapack
3554library_dirs = ~a/lib:~a/lib
3555include_dirs = ~a/include:~a/include
3556"
3557 (assoc-ref inputs "openblas")
3558 (assoc-ref inputs "lapack")
3559 (assoc-ref inputs "openblas")
3560 (assoc-ref inputs "lapack"))))
3561 #t))))))
3562 (native-inputs
3563 `(("python2-nose" ,python2-nose)))
3564 (description "NumPy is the fundamental package for scientific computing
3565with Python. It contains among other things: a powerful N-dimensional array
3566object, sophisticated (broadcasting) functions, tools for integrating C/C++
3567and Fortran code, useful linear algebra, Fourier transform, and random number
3568capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
3569that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
3570Numeric.")
3571 (license license:bsd-3)))
3572
3573(define-public python-munch
3574 (package
3575 (name "python-munch")
3576 (version "2.0.4")
3577 (source
3578 (origin
3579 (method url-fetch)
3580 (uri (pypi-uri "munch" version))
3581 (sha256
3582 (base32
3583 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3584 (build-system python-build-system)
3585 (home-page "https://github.com/Infinidat/munch")
3586 (synopsis "Dot-accessible dictionary")
3587 (description "Munch is a dot-accessible dictionary similar to JavaScript
3588objects.")
3589 (license license:expat)))
3590
3591(define-public python2-munch
3592 (package-with-python2 python-munch))
3593
3594(define-public python-colormath
3595 (package
3596 (name "python-colormath")
3597 (version "3.0.0")
3598 (source
3599 (origin
3600 (method url-fetch)
3601 (uri (pypi-uri "colormath" version))
3602 (sha256
3603 (base32
3604 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
3605 (build-system python-build-system)
3606 (propagated-inputs
3607 `(("python-networkx" ,python-networkx)
3608 ("python-numpy" ,python-numpy)))
3609 (home-page "https://github.com/gtaylor/python-colormath")
3610 (synopsis "Color math and conversion library")
3611 (description
3612 "This is a Python library for color math and conversions.")
3613 (license license:bsd-3)))
3614
3615(define-public python2-colormath
3616 (package-with-python2 python-colormath))
3617
3618(define-public python-spectra
3619 (package
3620 (name "python-spectra")
3621 (version "0.0.11")
3622 (source
3623 (origin
3624 (method url-fetch)
3625 (uri (pypi-uri "spectra" version))
3626 (sha256
3627 (base32
3628 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
3629 (build-system python-build-system)
3630 (arguments
3631 `(#:phases
3632 (modify-phases %standard-phases
3633 (replace 'check
38ec0f6a 3634 (lambda _ (invoke "nosetests" "-v"))))))
44d10b1f
RW
3635 (propagated-inputs
3636 `(("python-colormath" ,python-colormath)))
3637 (native-inputs
3638 `(("python-nose" ,python-nose)))
3639 (home-page "https://github.com/jsvine/spectra")
3640 (synopsis "Color scales and color conversion")
3641 (description
3642 "This package provides a Python library intended to make color math,
3643color scales, and color space conversion easy. It has support for:
3644
3645@enumerate
3646@item Color scales
3647@item Color ranges
3648@item Color blending
3649@item Brightening/darkening colors
3650@item Saturating/desaturating colors
3651@item Conversion to/from multiple color spaces.
3652@end enumerate\n")
3653 (license license:expat)))
3654
3655(define-public python2-spectra
3656 (package-with-python2 python-spectra))
3657
3658(define-public python-numpy-documentation
3659 (package
3660 (name "python-numpy-documentation")
3661 (version (package-version python-numpy))
3662 (source (package-source python-numpy))
3663 (build-system python-build-system)
3664 (native-inputs
3665 `(("python-matplotlib" ,python-matplotlib)
3666 ("python-numpy" ,python-numpy)
3667 ("pkg-config" ,pkg-config)
3668 ("python-sphinx" ,python-sphinx)
3669 ("python-numpydoc" ,python-numpydoc)
f75aa97f 3670 ("texlive" ,(texlive-union (list texlive-fonts-cm-super
44d10b1f
RW
3671 texlive-fonts-ec
3672 texlive-generic-ifxetex
3673 texlive-generic-pdftex
f75aa97f 3674 texlive-amsfonts
44d10b1f
RW
3675 texlive-latex-capt-of
3676 texlive-latex-cmap
3677 texlive-latex-environ
3678 texlive-latex-eqparbox
3679 texlive-latex-etoolbox
3680 texlive-latex-expdlist
3681 texlive-latex-fancyhdr
3682 texlive-latex-fancyvrb
3683 texlive-latex-fncychap
3684 texlive-latex-float
3685 texlive-latex-framed
3686 texlive-latex-geometry
3687 texlive-latex-graphics
3688 texlive-latex-hyperref
3689 texlive-latex-mdwtools
3690 texlive-latex-multirow
3691 texlive-latex-needspace
3692 texlive-latex-oberdiek
3693 texlive-latex-parskip
3694 texlive-latex-preview
3695 texlive-latex-tabulary
3696 texlive-latex-threeparttable
3697 texlive-latex-titlesec
3698 texlive-latex-trimspaces
3699 texlive-latex-ucs
3700 texlive-latex-upquote
3701 texlive-latex-url
3702 texlive-latex-varwidth
3703 texlive-latex-wrapfig)))
3704 ("texinfo" ,texinfo)
3705 ("perl" ,perl)
3706 ("scipy-sphinx-theme"
3707 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
3708 (method git-fetch)
3709 (uri (git-reference
3710 (url "https://github.com/scipy/scipy-sphinx-theme.git")
3711 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
3712 (sha256
3713 (base32
3714 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
3715 ,@(package-native-inputs python-numpy)))
3716 (arguments
3717 `(#:tests? #f ; we're only generating the documentation
3718 #:phases
3719 (modify-phases %standard-phases
3720 (delete 'build)
3721 (replace 'install
3722 (lambda* (#:key inputs outputs #:allow-other-keys)
3723 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3724 (doc (string-append
3725 data "/doc/" ,name "-"
3726 ,(package-version python-numpy)))
3727 (info-reader (string-append data "/info"))
3728 (html (string-append doc "/html"))
3729 (scipy-sphinx-theme "scipy-sphinx-theme")
3730 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
3731 (pyver ,(string-append "PYVER=")))
3732
3733 ;; FIXME: this is needed to for texlive-union to generate
3734 ;; fonts, which are not found.
3735 (setenv "HOME" "/tmp")
3736
3737 (with-directory-excursion "doc"
3738 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
3739 (mkdir-p html)
4fc898da
RW
3740 (invoke "make" "html" pyver)
3741 (invoke "make" "latex" "PAPER=a4" pyver)
3742 (invoke "make" "-C" "build/latex"
44d10b1f
RW
3743 "all-pdf" "PAPER=a4" pyver)
3744 ;; FIXME: Generation of the info file fails.
4fc898da 3745 ;; (invoke "make" "info" pyver)
44d10b1f
RW
3746 ;; (mkdir-p info)
3747 ;; (copy-file "build/texinfo/numpy.info"
3748 ;; (string-append info "/numpy.info"))
3749 (for-each (lambda (file)
3750 (copy-file (string-append "build/latex" file)
3751 (string-append doc file)))
3752 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3753 (with-directory-excursion "build/html"
3754 (for-each (lambda (file)
3755 (let* ((dir (dirname file))
3756 (tgt-dir (string-append html "/" dir)))
3757 (unless (equal? "." dir)
3758 (mkdir-p tgt-dir))
3759 (install-file file html)))
3760 (find-files "." ".*")))))
3761 #t)))))
3762 (home-page (package-home-page python-numpy))
3763 (synopsis "Documentation for the python-numpy package")
3764 (description (package-description python-numpy))
3765 (license (package-license python-numpy))))
3766
3767(define-public python2-numpy-documentation
3768 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
3769 (package
3770 (inherit numpy-documentation)
3771 (native-inputs `(("python2-functools32" ,python2-functools32)
3772 ,@(package-native-inputs numpy-documentation))))))
3773
3774(define-public python-pygit2
3775 (package
3776 (name "python-pygit2")
dac8b275 3777 (version "0.28.2")
44d10b1f
RW
3778 (source
3779 (origin
3780 (method url-fetch)
3781 (uri (pypi-uri "pygit2" version))
3782 (sha256
dac8b275 3783 (base32 "11kzj5mjkspvplnpdb6bj8dcj6rgmkk986k8hjcklyg5yaxkz32d"))))
44d10b1f
RW
3784 (build-system python-build-system)
3785 (arguments
c3ecab0d 3786 '(#:tests? #f)) ; tests don't run correctly in our environment
44d10b1f
RW
3787 (propagated-inputs
3788 `(("python-six" ,python-six)
3789 ("python-cffi" ,python-cffi)
3790 ("libgit2" ,libgit2)
3791 ("python-tox" ,python-tox)))
3792 (native-inputs
3793 `(("python-pytest" ,python-pytest)))
3794 (home-page "https://github.com/libgit2/pygit2")
3795 (synopsis "Python bindings for libgit2")
3796 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3797library, libgit2 implements Git plumbing.")
3798 ;; GPL2.0 only, with linking exception.
3799 (license license:gpl2)))
3800
3801(define-public python2-pygit2
3802 (package-with-python2 python-pygit2))
3803
3804(define-public python-pyparsing
3805 (package
3806 (name "python-pyparsing")
6d3cff5a 3807 (version "2.3.1")
44d10b1f
RW
3808 (source
3809 (origin
3810 (method url-fetch)
3811 (uri (pypi-uri "pyparsing" version))
3812 (sha256
6d3cff5a 3813 (base32 "0yk6xl885b91dmlhlsap7x78hk2rdr879fln9anbq6k4ca42djb6"))))
44d10b1f
RW
3814 (build-system python-build-system)
3815 (outputs '("out" "doc"))
3816 (arguments
3817 `(#:tests? #f ; no test target
3818 #:phases
3819 (modify-phases %standard-phases
3820 (add-after 'install 'install-doc
3821 (lambda* (#:key outputs #:allow-other-keys)
3822 (let* ((doc (string-append (assoc-ref outputs "doc")
3823 "/share/doc/" ,name "-" ,version))
3824 (html-doc (string-append doc "/html"))
3825 (examples (string-append doc "/examples")))
3826 (mkdir-p html-doc)
3827 (mkdir-p examples)
3828 (for-each
3829 (lambda (dir tgt)
3830 (map (lambda (file)
3831 (install-file file tgt))
3832 (find-files dir ".*")))
3833 (list "docs" "htmldoc" "examples")
3834 (list doc html-doc examples))
3835 #t))))))
3836 (home-page "https://github.com/pyparsing/pyparsing")
3837 (synopsis "Python parsing class library")
3838 (description
3839 "The pyparsing module is an alternative approach to creating and
3840executing simple grammars, vs. the traditional lex/yacc approach, or the use
3841of regular expressions. The pyparsing module provides a library of classes
3842that client code uses to construct the grammar directly in Python code.")
3843 (license license:expat)))
3844
3845(define-public python2-pyparsing
3846 (package-with-python2 python-pyparsing))
3847
3848(define-public python-numpydoc
3849 (package
3850 (name "python-numpydoc")
3851 (version "0.8.0")
3852 (source
3853 (origin
3854 (method url-fetch)
3855 (uri (pypi-uri "numpydoc" version))
3856 (sha256
3857 (base32
3858 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
3859 (build-system python-build-system)
3860 (propagated-inputs
3861 `(("python-sphinx" ,python-sphinx)))
3862 (native-inputs
3863 `(("python-nose" ,python-nose)))
3864 (home-page "https://pypi.python.org/pypi/numpydoc")
3865 (synopsis
3866 "Numpy's Sphinx extensions")
3867 (description
3868 "Sphinx extension to support docstrings in Numpy format.")
3869 (license license:bsd-2)))
3870
3871(define-public python2-numpydoc
3872 (package-with-python2 python-numpydoc))
3873
3874(define-public python-numexpr
3875 (package
3876 (name "python-numexpr")
3877 (version "2.6.5")
3878 (source
3879 (origin
3880 (method url-fetch)
3881 (uri (pypi-uri "numexpr" version))
3882 (sha256
3883 (base32
3884 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
3885 (build-system python-build-system)
3886 (arguments `(#:tests? #f)) ; no tests included
3887 (propagated-inputs
3888 `(("python-numpy" ,python-numpy)))
3889 (home-page "https://github.com/pydata/numexpr")
3890 (synopsis "Fast numerical expression evaluator for NumPy")
3891 (description
3892 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3893expressions that operate on arrays are accelerated and use less memory than
3894doing the same calculation in Python. In addition, its multi-threaded
3895capabilities can make use of all your cores, which may accelerate
3896computations, most specially if they are not memory-bounded (e.g. those using
3897transcendental functions).")
3898 (license license:expat)))
3899
3900(define-public python2-numexpr
3901 (package-with-python2 python-numexpr))
3902
3903(define-public python-cycler
3904 (package
3905 (name "python-cycler")
3906 (version "0.10.0")
3907 (source (origin
3908 (method url-fetch)
3909 (uri (pypi-uri "cycler" version))
3910 (sha256
3911 (base32
3912 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
3913 (build-system python-build-system)
3914 (arguments
3915 ;; XXX: The current version requires 'coveralls' which we don't have.
3916 ;; Enable this for the next release which uses 'python-pytest'.
3917 '(#:tests? #f))
3918 (propagated-inputs
3919 `(("python-six" ,python-six)))
3920 (home-page "http://matplotlib.org/cycler/")
3921 (synopsis "Composable keyword argument iterator")
3922 (description
3923 "When using @code{matplotlib} and plotting more than one line, it is
3924common to want to be able to want to be able to cycle over one or more artist
3925styles; but the plotting logic can quickly become involved.
3926To address this and enable easy cycling over arbitrary @code{kwargs}, the
3927@code{Cycler} class was developed.")
3928 (license license:bsd-3)))
3929
3930(define-public python2-cycler
3931 (package-with-python2 python-cycler))
3932
3933(define-public python-colorspacious
3934 (package
3935 (name "python-colorspacious")
53a3ebed 3936 (version "1.1.2")
44d10b1f 3937 (source
dee92e65
TGR
3938 (origin
3939 (method git-fetch)
3940 (uri (git-reference
3941 (url "https://github.com/njsmith/colorspacious.git")
3942 (commit (string-append "v" version))))
3943 (file-name (git-file-name name version))
3944 (sha256
53a3ebed 3945 (base32 "0x7nkphr6g5ql5fvgss8l56rgiyjgh6fm8zzs73i94ci9wzlm63w"))))
44d10b1f
RW
3946 (build-system python-build-system)
3947 (propagated-inputs
3948 `(("python-numpy" ,python-numpy)))
3949 (native-inputs
3950 `(("python-nose" ,python-nose)))
3951 (arguments
3952 `(#:phases
3953 (modify-phases %standard-phases
3954 (replace 'check
3955 (lambda _
c988afda 3956 (invoke "nosetests" "--all-modules" "-v" "colorspacious"))))))
44d10b1f
RW
3957 (home-page "https://github.com/njsmith/colorspacious")
3958 (synopsis "Python library for colorspace conversions")
3959 (description "@code{colorspacious} is a Python library that lets you
3960convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
3961 (license license:expat)))
3962
3963(define-public python2-colorspacious
3964 (package-with-python2 python-colorspacious))
3965
3966(define-public python-matplotlib
3967 (package
3968 (name "python-matplotlib")
5ea654cf 3969 (version "3.1.1")
44d10b1f
RW
3970 (source
3971 (origin
3972 (method url-fetch)
3973 (uri (pypi-uri "matplotlib" version))
3974 (sha256
3975 (base32
5ea654cf 3976 "14qc109dibp32xfd9lah54djc0rc76fhbsj9cwyb328lzqmd5sqz"))))
44d10b1f
RW
3977 (build-system python-build-system)
3978 (propagated-inputs ; the following packages are all needed at run time
3979 `(("python-cycler" ,python-cycler)
3980 ("python-kiwisolver" ,python-kiwisolver)
3981 ("python-pyparsing" ,python-pyparsing)
3982 ("python-pygobject" ,python-pygobject)
3983 ("gobject-introspection" ,gobject-introspection)
3984 ("python-tkinter" ,python "tk")
3985 ("python-dateutil" ,python-dateutil)
3986 ("python-numpy" ,python-numpy)
3987 ("python-pillow" ,python-pillow)
3988 ("python-pytz" ,python-pytz)
3989 ("python-six" ,python-six)
44d10b1f
RW
3990 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3991 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3992 ;; object. For this reason we need to import both libraries.
5ea654cf 3993 ;; https://cairocffi.readthedocs.io/en/stable/cffi_api.html#converting-pycairo-wrappers-to-cairocffi
44d10b1f 3994 ("python-pycairo" ,python-pycairo)
44d10b1f
RW
3995 ("python-cairocffi" ,python-cairocffi)))
3996 (inputs
3997 `(("libpng" ,libpng)
3998 ("imagemagick" ,imagemagick)
3999 ("freetype" ,freetype)
4000 ("cairo" ,cairo)
4001 ("glib" ,glib)
4002 ;; FIXME: Add backends when available.
4003 ;("python-wxpython" ,python-wxpython)
4004 ("tcl" ,tcl)
4005 ("tk" ,tk)))
4006 (native-inputs
4007 `(("pkg-config" ,pkg-config)
5ea654cf
RW
4008 ("python-pytest" ,python-pytest)
4009 ("python-mock" ,python-mock)
4010 ("unzip" ,unzip)
4011 ("jquery-ui"
4012 ,(origin
4013 (method url-fetch)
4014 (uri "https://jqueryui.com/resources/download/jquery-ui-1.12.1.zip")
4015 (sha256
4016 (base32
4017 "0kb21xf38diqgxcdi1z3s9ssq36pldvyqxy56hn6pcva6rs3c8zq"))))))
44d10b1f
RW
4018 (arguments
4019 `(#:phases
4020 (modify-phases %standard-phases
5ea654cf
RW
4021 ;; XXX We disable all image comparison tests because we're using a
4022 ;; newer version of FreeType than matplotlib expects. This leads to
4023 ;; minor differences throughout the tests.
4024 (add-after 'unpack 'fix-and-disable-failing-tests
4025 (lambda _
4026 (substitute* (append (find-files "lib/matplotlib/tests/"
4027 "test_.*\\.py$")
4028 (find-files "lib/mpl_toolkits/tests"
4029 "test_.*\\.py$"))
4030 (("^from matplotlib" match)
4031 (string-append "import pytest\n" match))
4032 (("( *)@image_comparison" match indent)
4033 (string-append indent
4034 "@pytest.mark.skip(reason=\"unknown minor image differences\")\n"
4035 match)))
4036 (substitute* "lib/matplotlib/tests/test_animation.py"
4037 (("/bin/sh") (which "sh")))
4038 (for-each delete-file
4039 ;; test_normal_axes, test_get_tightbbox_polar
4040 '("lib/matplotlib/tests/test_axes.py"
4041 ;; test_outward_ticks
4042 "lib/matplotlib/tests/test_tightlayout.py"
4043 ;; Fontconfig returns no fonts.
4044 "lib/matplotlib/tests/test_font_manager.py"))
4045 #t))
4046 (add-before 'install 'install-jquery-ui
4047 (lambda* (#:key outputs inputs #:allow-other-keys)
4048 (let ((dir (string-append (assoc-ref outputs "out")
4049 "/lib/python3.7/site-packages/matplotlib/backends/web_backend/")))
4050 (mkdir-p dir)
4051 (invoke "unzip"
4052 (assoc-ref inputs "jquery-ui")
4053 "-d" dir))
4054 #t))
4055 (delete 'check)
4056 (add-after 'install 'check
4057 (lambda* (#:key outputs inputs #:allow-other-keys)
4058 (add-installed-pythonpath inputs outputs)
4059 (invoke "python" "tests.py" "-v"
4060 "-m" "not network")))
44d10b1f
RW
4061 (add-before 'build 'configure-environment
4062 (lambda* (#:key outputs inputs #:allow-other-keys)
34c2a16b
RW
4063 (let ((cairo (assoc-ref inputs "cairo")))
4064 ;; Setting this directory in the 'basedirlist' of 'setup.cfg'
44d10b1f 4065 ;; has not effect.
34c2a16b 4066 (setenv "LD_LIBRARY_PATH" (string-append cairo "/lib"))
44d10b1f
RW
4067 (setenv "HOME" (getcwd))
4068 (call-with-output-file "setup.cfg"
4069 (lambda (port)
4070 (format port "[directories]~%
4071basedirlist = ~a,~a~%
5ea654cf
RW
4072[packages]~%
4073tests = True~%"
44d10b1f
RW
4074 (assoc-ref inputs "tcl")
4075 (assoc-ref inputs "tk")))))
4076 #t)))))
339b5828 4077 (home-page "https://matplotlib.org/")
44d10b1f
RW
4078 (synopsis "2D plotting library for Python")
4079 (description
4080 "Matplotlib is a Python 2D plotting library which produces publication
4081quality figures in a variety of hardcopy formats and interactive environments
4082across platforms. Matplotlib can be used in Python scripts, the python and
4083ipython shell, web application servers, and six graphical user interface
4084toolkits.")
4085 (license license:psfl)
4086 (properties `((python2-variant . ,(delay python2-matplotlib))))))
4087
4088(define-public python2-matplotlib
4089 (let ((matplotlib (package-with-python2
4090 (strip-python2-variant python-matplotlib))))
4091 (package (inherit matplotlib)
7380df73 4092 (version "2.2.4")
5ea654cf
RW
4093 (source
4094 (origin
4095 (method url-fetch)
4096 (uri (pypi-uri "matplotlib" version))
4097 (sha256
4098 (base32
7380df73 4099 "09i1gnrra1590brc1f8d5rh2zvnknmfgzp613ab0462qkrwj15h2"))))
5d484f42
EF
4100 (arguments
4101 (substitute-keyword-arguments (package-arguments matplotlib)
4102 ((#:phases phases)
4103 `(modify-phases ,phases
66a3c2db
EF
4104 (replace 'install-jquery-ui
4105 (lambda* (#:key outputs inputs #:allow-other-keys)
4106 (let ((dir (string-append (assoc-ref outputs "out")
4107 "/lib/python2.7/site-packages/"
4108 "matplotlib/backends/web_backend/")))
4109 (mkdir-p dir)
4110 (invoke "unzip"
4111 (assoc-ref inputs "jquery-ui")
4112 "-d" dir))
4113 #t))
5d484f42 4114 (delete 'check))))) ; These tests weren't run the the past.
44d10b1f
RW
4115 ;; Make sure to use special packages for Python 2 instead
4116 ;; of those automatically rewritten by package-with-python2.
4117 (propagated-inputs
4118 `(("python2-pycairo" ,python2-pycairo)
4119 ("python2-backports-functools-lru-cache"
4120 ,python2-backports-functools-lru-cache)
4121 ("python2-functools32" ,python2-functools32)
4122 ("python2-pygobject-2" ,python2-pygobject-2)
4123 ("python2-subprocess32" ,python2-subprocess32)
4124 ("python2-tkinter" ,python-2 "tk")
4125 ,@(fold alist-delete (package-propagated-inputs matplotlib)
4126 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
4127
4128(define-public python-matplotlib-documentation
4129 (package
4130 (name "python-matplotlib-documentation")
4131 (version (package-version python-matplotlib))
4132 (source (package-source python-matplotlib))
4133 (build-system python-build-system)
4134 (native-inputs
4135 `(("python-matplotlib" ,python-matplotlib)
4136 ("python-colorspacious" ,python-colorspacious)
4137 ("python-sphinx" ,python-sphinx)
5ad0a452 4138 ("python-sphinx-copybutton" ,python-sphinx-copybutton)
44d10b1f
RW
4139 ("python-sphinx-gallery" ,python-sphinx-gallery)
4140 ("python-numpydoc" ,python-numpydoc)
4141 ("python-ipython" ,python-ipython)
e7a53914 4142 ("python-ipykernel" ,python-ipykernel)
44d10b1f
RW
4143 ("python-mock" ,python-mock)
4144 ("graphviz" ,graphviz)
f75aa97f 4145 ("texlive" ,(texlive-union (list texlive-amsfonts
e7a53914
RW
4146 texlive-latex-amsmath
4147 texlive-latex-enumitem
4148 texlive-latex-expdlist
4149 texlive-latex-geometry
4150 texlive-latex-preview
4151 texlive-latex-type1cm
4152 texlive-latex-ucs
4153
4154 texlive-generic-pdftex
4155
e7a53914
RW
4156 texlive-fonts-ec
4157 texlive-fonts-adobe-times
4158 texlive-fonts-txfonts)))
44d10b1f
RW
4159 ("texinfo" ,texinfo)
4160 ,@(package-native-inputs python-matplotlib)))
4161 (arguments
4162 `(#:tests? #f ; we're only generating documentation
4163 #:phases
4164 (modify-phases %standard-phases
5ea654cf
RW
4165 ;; The tests in python-matplotlib are run after the install phase, so
4166 ;; we need to delete the extra phase here.
4167 (delete 'check)
44d10b1f
RW
4168 (replace 'build
4169 (lambda _
4170 (chdir "doc")
e7a53914
RW
4171 (setenv "PYTHONPATH"
4172 (string-append (getenv "PYTHONPATH")
4173 ":" (getcwd) "/../examples/units"))
44d10b1f 4174 (substitute* "conf.py"
e7a53914
RW
4175 ;; Don't use git.
4176 (("^SHA = check_output.*")
4177 (string-append "SHA = \"" ,version "\"\n"))
4178 ;; Don't fetch intersphinx files from the Internet
4179 (("^explicit_order_folders" m)
4180 (string-append "intersphinx_mapping = {}\n" m))
4181 (("'sphinx.ext.intersphinx',") "")
4182 ;; Disable URL embedding which requires internet access.
4183 (("'https://docs.scipy.org/doc/numpy'") "None")
4184 (("'https://docs.scipy.org/doc/scipy/reference'") "None"))
4185 (invoke "make"
4186 "SPHINXBUILD=sphinx-build"
4187 "SPHINXOPTS=" ; don't abort on warnings
4188 "html" "texinfo")))
44d10b1f
RW
4189 (replace 'install
4190 (lambda* (#:key inputs outputs #:allow-other-keys)
4191 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
4192 (doc (string-append data "/doc/python-matplotlib-" ,version))
4193 (info (string-append data "/info"))
4194 (html (string-append doc "/html")))
4195 (mkdir-p html)
4196 (mkdir-p info)
4197 (copy-recursively "build/html" html)
4198 (symlink (string-append html "/_images")
4199 (string-append info "/matplotlib-figures"))
4200 (with-directory-excursion "build/texinfo"
4201 (substitute* "matplotlib.texi"
4202 (("@image\\{([^,]*)" all file)
4203 (string-append "@image{matplotlib-figures/" file)))
4204 (symlink (string-append html "/_images")
4205 "./matplotlib-figures")
e7a53914
RW
4206 (invoke "makeinfo" "--no-split"
4207 "-o" "matplotlib.info" "matplotlib.texi"))
4208 (install-file "build/texinfo/matplotlib.info" info))
44d10b1f
RW
4209 #t)))))
4210 (home-page (package-home-page python-matplotlib))
4211 (synopsis "Documentation for the python-matplotlib package")
4212 (description (package-description python-matplotlib))
4213 (license (package-license python-matplotlib))))
4214
4215(define-public python2-matplotlib-documentation
5ad0a452
RW
4216 (let ((parent (package-with-python2 python-matplotlib-documentation)))
4217 (package
4218 (inherit parent)
4219 (native-inputs
4220 (alist-delete "python-sphinx-copybutton"
4221 (package-native-inputs parent))))))
44d10b1f 4222
55dae98f
RW
4223(define-public python-matplotlib-venn
4224 (package
4225 (name "python-matplotlib-venn")
4226 (version "0.11.5")
4227 (source
4228 (origin
4229 (method url-fetch)
4230 (uri (pypi-uri "matplotlib-venn" version ".zip"))
4231 (sha256
4232 (base32
4233 "13w3i1wih0mij08hrgppzg0g9z50y54rc28l6gdi1r5w45l7l0dy"))))
4234 (build-system python-build-system)
4235 (arguments '(#:tests? #f)) ; tests are not included
4236 (propagated-inputs
4237 `(("python-matplotlib" ,python-matplotlib)
4238 ("python-numpy" ,python-numpy)
4239 ("python-scipy" ,python-scipy)))
4240 (native-inputs
4241 `(("unzip" ,unzip)))
4242 (home-page "https://github.com/konstantint/matplotlib-venn")
4243 (synopsis "Plot area-proportional Venn diagrams")
4244 (description
4245 "This package provides tools for plotting area-proportional two- and
4246three-way Venn diagrams in @code{matplotlib}.")
4247 (license license:expat)))
4248
44d10b1f
RW
4249(define-public python2-pysnptools
4250 (package
4251 (name "python2-pysnptools")
5d1ade85 4252 (version "0.3.13")
44d10b1f
RW
4253 (source
4254 (origin
4255 (method url-fetch)
5d1ade85 4256 (uri (pypi-uri "pysnptools" version))
44d10b1f
RW
4257 (sha256
4258 (base32
5d1ade85 4259 "0lnis5xsl7bi0hz4f7gbicahzi5zlxkc21nk3g374xv8fb5hb3qm"))))
44d10b1f
RW
4260 (build-system python-build-system)
4261 (arguments
5d1ade85
RW
4262 `(#:python ,python-2 ; only Python 2.7 is supported
4263 #:tests? #f)) ; test files (e.g. examples/toydata.bim) not included
44d10b1f
RW
4264 (propagated-inputs
4265 `(("python2-numpy" ,python2-numpy)
4266 ("python2-scipy" ,python2-scipy)
4267 ("python2-pandas" ,python2-pandas)))
44d10b1f 4268 (native-inputs
5d1ade85 4269 `(("python2-cython" ,python2-cython)))
1b66989b 4270 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
44d10b1f
RW
4271 (synopsis "Library for reading and manipulating genetic data")
4272 (description
4273 "PySnpTools is a library for reading and manipulating genetic data. It
4274can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
4275those files. It can also efficiently manipulate ranges of integers using set
4276operators such as union, intersection, and difference.")
4277 (license license:asl2.0)))
4278
4279(define-public python-scipy
4280 (package
4281 (name "python-scipy")
a35f153d 4282 (version "1.3.1")
44d10b1f
RW
4283 (source
4284 (origin
4285 (method url-fetch)
4286 (uri (pypi-uri "scipy" version))
4287 (sha256
4288 (base32
a35f153d 4289 "1df113c9i6vazsn6y3n9wc22jh737z1g7dmx3mypkdwpdnscyhr6"))))
44d10b1f
RW
4290 (build-system python-build-system)
4291 (propagated-inputs
4292 `(("python-numpy" ,python-numpy)
4293 ("python-matplotlib" ,python-matplotlib)
4294 ("python-pyparsing" ,python-pyparsing)))
4295 (inputs
4296 `(("lapack" ,lapack)
4297 ("openblas" ,openblas)))
4298 (native-inputs
4299 `(("python-cython" ,python-cython)
4300 ("python-pytest" ,python-pytest)
4301 ("python-sphinx" ,python-sphinx)
4302 ("python-numpydoc" ,python-numpydoc)
4303 ("gfortran" ,gfortran)
4304 ("perl" ,perl)
4305 ("which" ,which)))
4306 (outputs '("out" "doc"))
4307 (arguments
4308 `(#:phases
4309 (modify-phases %standard-phases
4310 (add-after 'unpack 'disable-broken-tests
4311 (lambda _
4312 (substitute* "scipy/sparse/linalg/dsolve/tests/test_linsolve.py"
4313 (("^( +)def test_threads_parallel\\(self\\):" m indent)
4314 (string-append indent
4315 "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
4316 m)))
4317 (substitute* "scipy/sparse/linalg/eigen/arpack/tests/test_arpack.py"
4318 (("^def test_parallel_threads\\(\\):" m)
4319 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
4320 m)))
4321 #t))
4322 (add-before 'build 'configure-openblas
4323 (lambda* (#:key inputs #:allow-other-keys)
4324 (call-with-output-file "site.cfg"
4325 (lambda (port)
4326 (format port
4327 "[blas]
4328libraries = openblas
4329library_dirs = ~a/lib
4330include_dirs = ~a/include
4331
4332# backslash-n to make emacs happy
4333\n[atlas]
4334library_dirs = ~a/lib
4335atlas_libs = openblas
4336"
4337 (assoc-ref inputs "openblas")
4338 (assoc-ref inputs "openblas")
4339 (assoc-ref inputs "openblas"))))
4340 #t))
4341 (add-after 'install 'install-doc
4342 (lambda* (#:key inputs outputs #:allow-other-keys)
4343 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4344 (doc (string-append data "/doc/" ,name "-" ,version))
4345 (html (string-append doc "/html"))
4346 (pyver ,(string-append "PYVER=" (version-major+minor
4347 (package-version python))))
4348 ;; By default it tries to run sphinx-build through the Python
4349 ;; interpreter which won't work with our shell wrapper.
4350 (sphinxbuild "SPHINXBUILD=LANG=C sphinx-build"))
4351 ;; Make installed package available for building the
4352 ;; documentation
4353 (add-installed-pythonpath inputs outputs)
4354 (with-directory-excursion "doc"
4355 ;; Fix generation of images for mathematical expressions.
4356 (substitute* (find-files "source" "conf\\.py")
4357 (("pngmath_use_preview = True")
4358 "pngmath_use_preview = False"))
4359 (mkdir-p html)
4360 (invoke "make" "html" pyver sphinxbuild)
4361 (with-directory-excursion "build/html"
4362 (for-each (lambda (file)
4363 (let* ((dir (dirname file))
4364 (tgt-dir (string-append html "/" dir)))
4365 (install-file file html)))
4366 (find-files "." ".*")))))
4367 #t))
4368 ;; Tests can only be run after the library has been installed and not
4369 ;; within the source directory.
4370 (delete 'check)
4371 (add-after 'install 'check
4372 (lambda* (#:key inputs outputs #:allow-other-keys)
4373 (add-installed-pythonpath inputs outputs)
4374 (with-directory-excursion "/tmp"
4375 (invoke "python" "-c"
4376 "import scipy; scipy.test(verbose=2)")))))))
4377 (home-page "https://www.scipy.org/")
4378 (synopsis "The Scipy library provides efficient numerical routines")
4379 (description "The SciPy library is one of the core packages that make up
4380the SciPy stack. It provides many user-friendly and efficient numerical
4381routines such as routines for numerical integration and optimization.")
4382 (properties `((python2-variant . ,(delay python2-scipy))))
4383 (license license:bsd-3)))
4384
a35f153d 4385;; Version 1.2.2 is the last version to support Python 2
44d10b1f 4386(define-public python2-scipy
a35f153d
RW
4387 (package
4388 (inherit (package-with-python2
4389 (strip-python2-variant python-scipy)))
4390 (version "1.2.2")
4391 (source
4392 (origin
4393 (method url-fetch)
4394 (uri (pypi-uri "scipy" version))
4395 (sha256
4396 (base32
4397 "1cgvgin8fvckv96hjh3ikmwkra5rif51bdb75ifzf7xbil5iwcx4"))))))
44d10b1f
RW
4398
4399(define-public python-socksipy-branch
4400 (package
4401 (name "python-socksipy-branch")
4402 (version "1.01")
4403 (source
4404 (origin
4405 (method url-fetch)
4406 (uri (pypi-uri "SocksiPy-branch" version))
4407 (sha256
4408 (base32
4409 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
4410 (build-system python-build-system)
4411 (arguments
4412 `(#:tests? #f)) ; There are no tests
4413 (home-page "https://code.google.com/archive/p/socksipy-branch/")
4414 (synopsis "Python SOCKS module")
4415 (description
4416 "SocksiPy - A Python SOCKS client module. It provides a
4417socket-like interface that supports connections to any TCP
4418service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
4419The original version was developed by Dan Haim, this is a
4420branch created by Mario Vilas to address some open issues,
4421as the original project seems to have been abandoned circa 2007.")
4422 (license license:bsd-3)))
4423
4424(define-public python2-socksipy-branch
4425 (package-with-python2 python-socksipy-branch))
4426
4427(define-public python-pycodestyle
4428 (package
4429 (name "python-pycodestyle")
d16ef28b 4430 (version "2.5.0")
44d10b1f 4431 (source
ba88eea2
RW
4432 (origin
4433 (method url-fetch)
4434 (uri (pypi-uri "pycodestyle" version))
4435 (sha256
4436 (base32
d16ef28b 4437 "0v4prb05n21bm8650v0a01k1nyqjdmkrsm3zycfxh2j5k9n962p4"))))
44d10b1f
RW
4438 (build-system python-build-system)
4439 (home-page "https://pycodestyle.readthedocs.io/")
4440 (synopsis "Python style guide checker")
4441 (description "@code{pycodestyle} (formerly pep8) is a tool to check
4442Python code against some of the style conventions in
4443@url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
4444 (license license:expat)))
4445
4446(define-public python2-pycodestyle
4447 (package-with-python2 python-pycodestyle))
4448
4449(define-public python-multidict
4450 (package
4451 (name "python-multidict")
4452 (version "4.2.0")
4453 (source
4454 (origin
4455 (method url-fetch)
4456 (uri (pypi-uri "multidict" version))
4457 (sha256
4458 (base32
4459 "1vf5bq8hn5a9rvhr5v4fwbmarfsp35hhr8gs74kqfijy34j2f194"))))
4460 (build-system python-build-system)
4461 (native-inputs
4462 `(("python-pytest" ,python-pytest)
4463 ("python-pytest-runner" ,python-pytest-runner)))
4464 (home-page "https://github.com/aio-libs/multidict/")
4465 (synopsis "Multidict implementation")
4466 (description "Multidict is dict-like collection of key-value pairs
4467where key might be occurred more than once in the container.")
4468 (license license:asl2.0)))
4469
4470(define-public python-orderedmultidict
4471 (package
4472 (name "python-orderedmultidict")
4473 (version "0.7.11")
4474 (source
4475 (origin
4476 (method url-fetch)
4477 (uri (pypi-uri "orderedmultidict" version))
4478 (sha256
4479 (base32
4480 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
4481 (build-system python-build-system)
4482 (arguments
4483 `(#:phases
4484 (modify-phases %standard-phases
4485 (add-after 'unpack 'fix-tests
4486 (lambda _
4487 ;; The package uses nosetest for running the tests.
4488 ;; Adding this initfile allows to run the test suite
4489 ;; without requiring nosetest.
d1c4f329
RW
4490 (with-output-to-file "tests/__init__.py" newline)
4491 #t)))))
44d10b1f
RW
4492 (propagated-inputs
4493 `(("python-six" ,python-six)))
4494 (native-inputs
4495 `(("python-pycodestyle" ,python-pycodestyle)))
4496 (home-page "https://github.com/gruns/orderedmultidict")
4497 (synopsis "Python Ordered Multivalue Dictionary - omdict")
4498 (description "This package contains a library for ordered multivalue
4499dictionaries. A multivalue dictionary is a dictionary that can store
4500multiple values for the same key. An ordered multivalue dictionary is a
4501multivalue dictionary that retains the order of insertions and deletions.")
4502 (license license:unlicense)))
4503
4504(define-public python2-orderedmultidict
4505 (package-with-python2 python-orderedmultidict))
4506
4507(define-public python-autopep8
4508 (package
4509 (name "python-autopep8")
4510 (version "1.3.5")
4511 (source
4512 (origin
4513 (method url-fetch)
4514 (uri (pypi-uri "autopep8" version))
4515 (sha256
4516 (base32
4517 "192bvhzi4d0claqxgzymvv7k3qnj627742bc8sgxpzjj42pd9112"))))
4518 (build-system python-build-system)
4519 (propagated-inputs
4520 `(("python-pycodestyle" ,python-pycodestyle)))
4521 (home-page "https://github.com/hhatto/autopep8")
4522 (synopsis "Format Python code according to the PEP 8 style guide")
4523 (description
4524 "@code{autopep8} automatically formats Python code to conform to
4525the PEP 8 style guide. It uses the pycodestyle utility to determine
4526what parts of the code needs to be formatted. @code{autopep8} is
4527capable of fixing most of the formatting issues that can be reported
4528by pycodestyle.")
4529 (license (license:non-copyleft
4530 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
4531
4532(define-public python2-autopep8
4533 (package-with-python2 python-autopep8))
4534
4535(define-public python-distutils-extra
4536 (package
4537 (name "python-distutils-extra")
4538 (version "2.38")
4539 (source
4540 (origin
4541 (method url-fetch)
4542 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4543 version "/+download/python-distutils-extra-"
4544 version ".tar.gz"))
4545 (sha256
4546 (base32
4547 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4548 (build-system python-build-system)
4549 (home-page "https://launchpad.net/python-distutils-extra/")
4550 (synopsis "Enhancements to Python's distutils")
4551 (description
4552 "The python-distutils-extra module enables you to easily integrate
4553gettext support, themed icons, and scrollkeeper-based documentation into
4554Python's distutils.")
4555 (license license:gpl2)))
4556
4557(define-public python2-distutils-extra
4558 (package-with-python2 python-distutils-extra))
4559
4560(define-public python2-elib.intl
4561 (package
4562 (name "python2-elib.intl")
4563 (version "0.0.3")
4564 (source
4565 (origin
4566 ;; This project doesn't tag releases or publish tarballs, so we take
4567 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4568 (method git-fetch)
4569 (uri (git-reference
4570 (url "https://github.com/dieterv/elib.intl.git")
4571 (commit "d09997cfef")))
4572 (file-name (string-append name "-" version "-checkout"))
4573 (sha256
4574 (base32
4575 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4576 (build-system python-build-system)
4577 (arguments
4578 ;; incompatible with Python 3 (exception syntax)
4579 `(#:python ,python-2
4580 #:tests? #f))
4581 (home-page "https://github.com/dieterv/elib.intl")
4582 (synopsis "Enhanced internationalization for Python")
4583 (description
4584 "The elib.intl module provides enhanced internationalization (I18N)
4585services for your Python modules and applications.")
4586 (license license:lgpl3+)))
4587
4588(define-public python-olefile
4589 (package
4590 (name "python-olefile")
5bef0f10 4591 (version "0.46")
44d10b1f
RW
4592 (source
4593 (origin
4594 (method url-fetch)
5bef0f10
MB
4595 (uri (string-append "https://github.com/decalage2/olefile/releases/"
4596 "download/v" version "/olefile-" version ".tar.gz"))
44d10b1f
RW
4597 (file-name (string-append name "-" version ".tar.gz"))
4598 (sha256
4599 (base32
5bef0f10 4600 "1kjxh4gr651hpqkjfv89cfzr40hyvf3vjlda7mifiail83j7j07m"))))
44d10b1f 4601 (build-system python-build-system)
5bef0f10 4602 (home-page "https://www.decalage.info/python/olefileio")
44d10b1f
RW
4603 (synopsis "Read and write Microsoft OLE2 files.")
4604 (description
4605 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
4606Storage or Compound Document, Microsoft Office). It is an improved version of
4607the OleFileIO module from PIL, the Python Image Library.")
4608 (license license:bsd-3)))
4609
4610(define-public python2-olefile
4611 (package-with-python2 python-olefile))
4612
4613(define-public python-pillow
4614 (package
4615 (name "python-pillow")
0c6de725 4616 (version "6.1.0")
44d10b1f
RW
4617 (source
4618 (origin
4619 (method url-fetch)
4620 (uri (pypi-uri "Pillow" version))
4621 (sha256
4622 (base32
0c6de725 4623 "1pnrsz0f0n0c819v1pdr8j6rm8xvhc9f3kh1fv9xpdp9n5ygf108"))))
44d10b1f
RW
4624 (build-system python-build-system)
4625 (native-inputs
4626 `(("python-pytest" ,python-pytest)))
4627 (inputs
4628 `(("freetype" ,freetype)
4629 ("lcms" ,lcms)
4630 ("zlib" ,zlib)
4631 ("libjpeg" ,libjpeg)
4632 ("openjpeg" ,openjpeg)
4633 ("libtiff" ,libtiff)
4634 ("libwebp" ,libwebp)))
4635 (propagated-inputs
4636 `(("python-olefile" ,python-olefile)))
4637 (arguments
4638 `(#:phases
4639 (modify-phases %standard-phases
4640 (add-after 'unpack 'patch-ldconfig
4641 (lambda _
4642 (substitute* "setup.py"
4643 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
4644 (delete 'check) ; We must run checks after python-pillow is installed.
4645 (add-after 'install 'check-installed
4646 (lambda* (#:key outputs inputs #:allow-other-keys)
4647 (begin
4648 (setenv "HOME" (getcwd))
4649 ;; Make installed package available for running the tests.
4650 (add-installed-pythonpath inputs outputs)
4651 (invoke "python" "selftest.py" "--installed")
4652 (invoke "python" "-m" "pytest" "-vv")))))))
4653 (home-page "https://python-pillow.org")
4654 (synopsis "Fork of the Python Imaging Library")
4655 (description
4656 "The Python Imaging Library adds image processing capabilities to your
4657Python interpreter. This library provides extensive file format support, an
4658efficient internal representation, and fairly powerful image processing
4659capabilities. The core image library is designed for fast access to data
4660stored in a few basic pixel formats. It should provide a solid foundation for
4661a general image processing tool.")
4662 (license (license:x11-style
4663 "http://www.pythonware.com/products/pil/license.htm"
4664 "The PIL Software License"))))
4665
4666(define-public python2-pillow
4667 (package-with-python2 python-pillow))
4668
4669(define-public python-pycparser
4670 (package
4671 (name "python-pycparser")
c6c0940e 4672 (version "2.19")
44d10b1f
RW
4673 (source
4674 (origin
4675 (method url-fetch)
4676 (uri (pypi-uri "pycparser" version))
4677 (sha256
4678 (base32
c6c0940e 4679 "1cr5dcj9628lkz1qlwq3fv97c25363qppkmcayqvd05dpy573259"))))
44d10b1f
RW
4680 (outputs '("out" "doc"))
4681 (build-system python-build-system)
4682 (native-inputs
4683 `(("pkg-config" ,pkg-config)))
4684 (arguments
4685 `(#:phases
4686 (modify-phases %standard-phases
4687 (replace 'check
4688 (lambda _
4689 (with-directory-excursion "tests"
acb75c03
RW
4690 (invoke "python" "all_tests.py"))
4691 #t))
44d10b1f
RW
4692 (add-after 'install 'install-doc
4693 (lambda* (#:key outputs #:allow-other-keys)
4694 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4695 (doc (string-append data "/doc/" ,name "-" ,version))
4696 (examples (string-append doc "/examples")))
4697 (mkdir-p examples)
4698 (for-each (lambda (file)
4699 (copy-file (string-append "." file)
4700 (string-append doc file)))
4701 '("/README.rst" "/CHANGES" "/LICENSE"))
c6c0940e
MB
4702 (copy-recursively "examples" examples)
4703 #t))))))
44d10b1f
RW
4704 (home-page "https://github.com/eliben/pycparser")
4705 (synopsis "C parser in Python")
4706 (description
4707 "Pycparser is a complete parser of the C language, written in pure Python
4708using the PLY parsing library. It parses C code into an AST and can serve as
4709a front-end for C compilers or analysis tools.")
4710 (license license:bsd-3)))
4711
4712(define-public python2-pycparser
4713 (package-with-python2 python-pycparser))
4714
4715(define-public python-pywavelets
4716 (package
4717 (name "python-pywavelets")
4718 (version "1.0.1")
4719 (home-page "https://github.com/PyWavelets/pywt")
4720 (source (origin
4721 (method url-fetch)
4722 (uri (pypi-uri "PyWavelets" version))
4723 (sha256
4724 (base32
4725 "1p3qv2v66ghnqrb1f98wyyhp9dz71jwcd6kfpsax65sfdpiyqp1w"))))
4726 (build-system python-build-system)
4727 (arguments
4728 '(#:modules ((ice-9 ftw)
4729 (srfi srfi-1)
4730 (srfi srfi-26)
4731 (guix build utils)
4732 (guix build python-build-system))
4733 #:phases (modify-phases %standard-phases
4734 (replace 'check
4735 (lambda _
4736 (let ((cwd (getcwd))
4737 (libdir (find (cut string-prefix? "lib." <>)
4738 (scandir "build"))))
4739 (with-directory-excursion (string-append cwd "/build/" libdir)
4740 (invoke "nosetests" "-v" "."))))))))
4741 (native-inputs
4742 `(("python-matplotlib" ,python-matplotlib) ;for tests
4743 ("python-nose" ,python-nose)))
4744 (propagated-inputs
4745 `(("python-numpy" ,python-numpy)))
4746 (synopsis "Wavelet transforms in Python")
4747 (description
4748 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
4749mathematical basis functions that are localized in both time and frequency.
4750Wavelet transforms are time-frequency transforms employing wavelets. They are
4751similar to Fourier transforms, the difference being that Fourier transforms are
4752localized only in frequency instead of in time and frequency.")
4753 (license license:expat)))
4754
4755(define-public python2-pywavelets
4756 (package-with-python2 python-pywavelets))
4757
4758(define-public python-xcffib
4759 (package
4760 (name "python-xcffib")
4761 (version "0.6.0")
4762 (source
4763 (origin
4764 (method url-fetch)
4765 (uri (pypi-uri "xcffib" version))
4766 (sha256
4767 (base32
4768 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
4769 (build-system python-build-system)
4770 (inputs
4771 `(("libxcb" ,libxcb)))
4772 (propagated-inputs
4773 `(("python-cffi" ,python-cffi) ; used at run time
4774 ("python-six" ,python-six)))
4775 (arguments
4776 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
4777 #:tests? #f
4778 #:phases
4779 (modify-phases %standard-phases
4780 (add-after 'unpack 'fix-libxcb-path
4781 (lambda* (#:key inputs #:allow-other-keys)
4782 (let ((libxcb (assoc-ref inputs "libxcb")))
4783 (substitute* '("xcffib/__init__.py")
4784 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
4785 #t)))
4786 (add-after 'install 'install-doc
4787 (lambda* (#:key outputs #:allow-other-keys)
4788 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4789 "/doc/" ,name "-" ,version)))
4790 (mkdir-p doc)
4791 (copy-file "README.md"
4792 (string-append doc "/README.md"))
4793 #t))))))
4794 (home-page "https://github.com/tych0/xcffib")
4795 (synopsis "XCB Python bindings")
4796 (description
4797 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4798support for Python 3 and PyPy. It is based on cffi.")
4799 (license license:expat)))
4800
4801(define-public python2-xcffib
4802 (package-with-python2 python-xcffib))
4803
4804(define-public python-cairocffi
4805 (package
4806 (name "python-cairocffi")
4807 (version "0.9.0")
4808 (source
4809 (origin
4810 (method url-fetch)
4811 (uri (pypi-uri "cairocffi" version))
4812 (sha256
4813 (base32
4814 "0dq3k4zhqd8cwsf3nyjqvjqm8wkvrjn1wjf44rl3v0h8kqx6qf0m"))
4815 (patches (search-patches "python-cairocffi-dlopen-path.patch"))))
4816 (build-system python-build-system)
4817 (outputs '("out" "doc"))
4818 (inputs
4819 `(("glib" ,glib)
4820 ("gtk+" ,gtk+)
4821 ("gdk-pixbuf" ,gdk-pixbuf)
4822 ("cairo" ,cairo)
4823 ("pango" ,pango)))
4824 (native-inputs
4825 `(("pkg-config" ,pkg-config)
4826 ("python-pytest" ,python-pytest)
4827 ("python-pytest-cov" ,python-pytest-cov)
4828 ("python-pytest-runner" ,python-pytest-runner)
4829 ("python-sphinx" ,python-sphinx)
4830 ("python-docutils" ,python-docutils)))
4831 (propagated-inputs
4832 `(("python-xcffib" ,python-xcffib))) ; used at run time
4833 (arguments
4834 `(#:phases
4835 (modify-phases %standard-phases
4836 (add-after 'unpack 'patch-paths
4837 (lambda* (#:key inputs outputs #:allow-other-keys)
4838 (substitute* (find-files "." "\\.py$")
4839 (("dlopen\\(ffi, 'cairo'")
4840 (string-append "dlopen(ffi, '" (assoc-ref inputs "cairo")
4841 "/lib/libcairo.so.2'"))
4842 (("dlopen\\(ffi, 'gdk-3'")
4843 (string-append "dlopen(ffi, '" (assoc-ref inputs "gtk+")
4844 "/lib/libgtk-3.so.0'"))
4845 (("dlopen\\(ffi, 'gdk_pixbuf-2.0'")
4846 (string-append "dlopen(ffi, '" (assoc-ref inputs "gdk-pixbuf")
4847 "/lib/libgdk_pixbuf-2.0.so.0'"))
4848 (("dlopen\\(ffi, 'glib-2.0'")
4849 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4850 "/lib/libglib-2.0.so.0'"))
4851 (("dlopen\\(ffi, 'gobject-2.0'")
4852 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4853 "/lib/libgobject-2.0.so.0'"))
4854 (("dlopen\\(ffi, 'pangocairo-1.0'")
4855 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4856 "/lib/libpangocairo-1.0.so.0'"))
4857 (("dlopen\\(ffi, 'pango-1.0'")
4858 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4859 "/lib/libpango-1.0.so.0'")))
4860 #t))
4861 (add-after 'install 'install-doc
4862 (lambda* (#:key inputs outputs #:allow-other-keys)
4863 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4864 (doc (string-append data "/doc/" ,name "-" ,version))
4865 (html (string-append doc "/html")))
4866 (setenv "LD_LIBRARY_PATH"
4867 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4868 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4869 (setenv "LANG" "en_US.UTF-8")
4870 (mkdir-p html)
4871 (for-each (lambda (file)
4872 (copy-file (string-append "." file)
4873 (string-append doc file)))
4874 '("/README.rst" "/CHANGES" "/LICENSE"))
4875 (system* "python" "setup.py" "build_sphinx")
4876 (copy-recursively "docs/_build/html" html)
4877 #t))))))
4878 (home-page "https://github.com/Kozea/cairocffi")
4879 (synopsis "Python bindings and object-oriented API for Cairo")
4880 (description
4881 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4882Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4883graphics library with support for multiple backends including image buffers,
4884PNG, PostScript, PDF, and SVG file output.")
4885 (license license:bsd-3)))
4886
4887(define-public python2-cairocffi
4888 (package-with-python2 python-cairocffi))
4889
4890(define-public python-decorator
4891 (package
4892 (name "python-decorator")
4893 (version "4.3.0")
4894 (source
4895 (origin
4896 (method url-fetch)
4897 (uri (pypi-uri "decorator" version))
4898 (sha256
4899 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
4900 (build-system python-build-system)
4901 (home-page "https://pypi.python.org/pypi/decorator/")
4902 (synopsis "Python module to simplify usage of decorators")
4903 (description
4904 "The aim of the decorator module is to simplify the usage of decorators
4905for the average programmer, and to popularize decorators usage giving examples
4906of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4907etc. The core of this module is a decorator factory.")
4908 (license license:expat)))
4909
4910(define-public python2-decorator
4911 (package-with-python2 python-decorator))
4912
4913(define-public python-drmaa
4914 (package
4915 (name "python-drmaa")
4916 (version "0.7.7")
4917 (source
4918 (origin
4919 (method url-fetch)
4920 (uri (pypi-uri "drmaa" version))
4921 (sha256
4922 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
4923 (build-system python-build-system)
4924 ;; The test suite requires libdrmaa which is provided by the cluster
4925 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4926 ;; should be set to the path of the libdrmaa library.
4927 (arguments '(#:tests? #f))
4928 (native-inputs
4929 `(("python-nose" ,python-nose)))
4930 (home-page "https://pypi.python.org/pypi/drmaa")
4931 (synopsis "Python bindings for the DRMAA library")
4932 (description
4933 "A Python package for Distributed Resource Management (DRM) job
4934submission and control. This package is an implementation of the DRMAA 1.0
4935Python language binding specification.")
4936 (license license:bsd-3)))
4937
4938(define-public python2-drmaa
4939 (package-with-python2 python-drmaa))
4940
4941(define-public python-grako
4942 (package
4943 (name "python-grako")
4944 (version "3.99.9")
4945 (source
4946 (origin
4947 (method url-fetch)
4948 (uri
4949 (pypi-uri "grako" version ".zip"))
4950 (sha256
4951 (base32
4952 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
4953 (build-system python-build-system)
4954 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
4955 (native-inputs
4956 `(("unzip" ,unzip)
4957 ("python-pytest" ,python-pytest)
4958 ("python-pytest-runner" ,python-pytest-runner)))
4959 (home-page "https://bitbucket.org/neogeny/grako")
4960 (synopsis "EBNF parser generator")
4961 (description
4962 "Grako takes a grammar in a variation of EBNF as input, and outputs a
4963memoizing PEG/Packrat parser in Python.")
4964 (license license:bsd-3)))
4965
4966(define-public python2-grako
4967 (package-with-python2 python-grako))
4968
4969(define-public python-gridmap
4970 (package
4971 (name "python-gridmap")
4972 (version "0.13.0")
4973 (source
4974 (origin
768fea0f
TGR
4975 (method git-fetch)
4976 (uri (git-reference
4977 (url "https://github.com/pygridtools/gridmap.git")
4978 (commit (string-append "v" version))))
4979 (file-name (git-file-name name version))
44d10b1f 4980 (sha256
768fea0f 4981 (base32 "1478lbwsr1w24cii2x01m2910fvh8r43ghnb78nc972a96hqiknm"))))
44d10b1f
RW
4982 (build-system python-build-system)
4983 (arguments
4984 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
4985 (propagated-inputs
4986 `(("python-psutil" ,python-psutil)
4987 ("python-drmaa" ,python-drmaa)
4988 ("python-pyzmq" ,python-pyzmq)))
4989 (home-page "https://github.com/pygridtools/gridmap")
4990 (synopsis "Create jobs on a cluster directly from Python")
4991 (description
4992 "Gridmap is a Python package to allow you to easily create jobs on the
4993cluster directly from Python. You can directly map Python functions onto the
4994cluster without needing to write any wrapper code yourself.")
4995 (license license:gpl3+)))
4996
4997(define-public python2-gridmap
4998 (package-with-python2 python-gridmap))
4999
5000(define-public python-honcho
5001 (package
5002 (name "python-honcho")
5003 (version "1.0.1")
5004 (source
5005 (origin
8524d130
TGR
5006 (method git-fetch)
5007 (uri (git-reference
5008 (url "https://github.com/nickstenning/honcho.git")
5009 (commit (string-append "v" version))))
5010 (file-name (git-file-name name version))
44d10b1f 5011 (sha256
8524d130 5012 (base32 "11bd87474qpif20xdcn0ra1idj5k16ka51i658wfpxwc6nzsn92b"))))
44d10b1f
RW
5013 (build-system python-build-system)
5014 (native-inputs
5015 `(("python-pytest" ,python-pytest)
5016 ("python-mock" ,python-mock)
5017 ("python-tox" ,python-tox)
5018 ("which" ,which))) ;for tests
5019 (propagated-inputs
5020 `(("python-jinja2" ,python-jinja2)))
5021 (arguments
5022 `(#:phases
5023 (modify-phases %standard-phases
5024 (delete 'check)
5025 (add-after 'install 'check
5026 (lambda* (#:key outputs inputs #:allow-other-keys)
5027 ;; fix honcho path in testsuite
5028 (substitute* "tests/conftest.py"
5029 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
5030 "/bin/honcho" "'")))
5031 ;; It's easier to run tests after install.
5032 ;; Make installed package available for running the tests
5033 (add-installed-pythonpath inputs outputs)
95b707fb 5034 (invoke "py.test" "-v"))))))
44d10b1f
RW
5035 (home-page "https://github.com/nickstenning/honcho")
5036 (synopsis "Manage Procfile-based applications")
5037 (description
5038 "A Procfile is a file which describes how to run an application
50fceab0 5039consisting of several processes. honcho starts all listed processes.
44d10b1f
RW
5040The output of all running processes is collected by honcho and
5041displayed.")
5042 (license license:expat)))
5043
5044(define-public python2-honcho
5045 (package-with-python2 python-honcho))
5046
5047(define-public python-pexpect
5048 (package
5049 (name "python-pexpect")
5050 (version "4.6.0")
5051 (source
5052 (origin
5053 (method url-fetch)
5054 (uri (pypi-uri "pexpect" version))
5055 (sha256
5056 (base32 "1fla85g47iaxxpjhp9vkxdnv4pgc7rplfy6ja491smrrk0jqi3ia"))))
5057 (build-system python-build-system)
5058 (arguments
5059 `(#:phases
5060 (modify-phases %standard-phases
5061 (add-before 'check 'prepare-tests
5062 (lambda _
5063 (substitute* (find-files "tests")
5064 (("/bin/ls") (which "ls"))
5065 (("/bin/echo") (which "echo"))
5066 (("/bin/which") (which "which"))
5067 ;; Many tests try to use the /bin directory which
5068 ;; is not present in the build environment.
5069 ;; Use one that's non-empty and unlikely to change.
5070 (("/bin'") "/dev'"))
5071 ;; XXX: Socket connection test gets "Connection reset by peer".
5072 ;; Why does it not work? Delete for now.
5073 (delete-file "tests/test_socket.py")
5074 #t))
5075 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
5076 (native-inputs
5077 `(("python-nose" ,python-nose)
5078 ("python-pytest" ,python-pytest)
5079 ("man-db" ,man-db)
5080 ("which" ,which)
5081 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
5082 (propagated-inputs
5083 `(("python-ptyprocess" ,python-ptyprocess)))
5084 (home-page "http://pexpect.readthedocs.org/")
5085 (synopsis "Controlling interactive console applications")
5086 (description
5087 "Pexpect is a pure Python module for spawning child applications;
5088controlling them; and responding to expected patterns in their output.
5089Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
5090child application and control it as if a human were typing commands.")
5091 (license license:isc)))
5092
5093(define-public python2-pexpect
5094 (package-with-python2 python-pexpect))
5095
5096(define-public python-setuptools-scm
5097 (package
5098 (name "python-setuptools-scm")
85092643 5099 (version "3.2.0")
44d10b1f
RW
5100 (source (origin
5101 (method url-fetch)
5102 (uri (pypi-uri "setuptools_scm" version))
5103 (sha256
5104 (base32
85092643 5105 "0n3knn3p1sqlx31k2lahn7z9bacvlv8nhlfidj77vz50bxqlgasj"))))
44d10b1f
RW
5106 (build-system python-build-system)
5107 (home-page "https://github.com/pypa/setuptools_scm/")
5108 (synopsis "Manage Python package versions in SCM metadata")
5109 (description
5110 "Setuptools_scm handles managing your Python package versions in
5111@dfn{software configuration management} (SCM) metadata instead of declaring
5112them as the version argument or in a SCM managed file.")
5113 (license license:expat)))
5114
5115(define-public python2-setuptools-scm
5116 (package-with-python2 python-setuptools-scm))
5117
bb74ea09
RW
5118(define-public python-pathlib2
5119 (package
5120 (name "python-pathlib2")
5121 (version "2.3.3")
5122 (source
5123 (origin
5124 (method url-fetch)
5125 (uri (pypi-uri "pathlib2" version))
5126 (sha256
5127 (base32
5128 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
5129 (build-system python-build-system)
5130 (propagated-inputs
5131 `(("python-scandir" ,python-scandir)
5132 ("python-six" ,python-six)))
5133 (home-page "https://pypi.python.org/pypi/pathlib2/")
746d3384 5134 (synopsis "Object-oriented file system paths")
bb74ea09
RW
5135 (description "The goal of pathlib2 is to provide a backport of the
5136standard @code{pathlib} module which tracks the standard library module, so
5137all the newest features of the standard @code{pathlib} can be used also on
5138older Python versions.")
5139 (license license:expat)))
5140
15b65617
RW
5141(define-public python-importlib-metadata
5142 (package
5143 (name "python-importlib-metadata")
0af697d9 5144 (version "0.23")
15b65617
RW
5145 (source
5146 (origin
5147 (method url-fetch)
5148 (uri (pypi-uri "importlib_metadata" version))
5149 (sha256
0af697d9 5150 (base32 "09mdqdfv5rdrwz80jh9m379gxmvk2vhjfz0fg53hid00icvxf65a"))))
15b65617
RW
5151 (build-system python-build-system)
5152 (propagated-inputs
5153 `(("python-configparser" ,python-configparser)
5154 ("python-contextlib2" ,python-contextlib2)
5155 ("python-docutils" ,python-docutils)
5156 ("python-pathlib2" ,python-pathlib2)
5157 ("python-rst.linker" ,python-rst.linker)
5158 ("python-zipp" ,python-zipp)))
5159 (native-inputs
5160 `(("python-setuptools-scm" ,python-setuptools-scm)
5161 ("python-sphinx" ,python-sphinx)))
5162 (home-page "https://importlib-metadata.readthedocs.io/")
5163 (synopsis "Read metadata from Python packages")
5164 (description
5165 "@code{importlib_metadata} is a library which provides an API for
5166accessing an installed Python package's metadata, such as its entry points or
5167its top-level name. This functionality intends to replace most uses of
5168@code{pkg_resources} entry point API and metadata API. Along with
5169@code{importlib.resources} in Python 3.7 and newer, this can eliminate the
5170need to use the older and less efficient @code{pkg_resources} package.")
5171 (license license:asl2.0)))
5172
37c173d1
RW
5173(define-public python-jaraco-packaging
5174 (package
5175 (name "python-jaraco-packaging")
5176 (version "6.1")
5177 (source
5178 (origin
5179 (method url-fetch)
5180 (uri (pypi-uri "jaraco.packaging" version))
5181 (sha256
5182 (base32
5183 "0zimrnkh33b9g8ffw11mjh6kvs54cy5gcjw1h5cl1r7dc833dmkm"))))
5184 (build-system python-build-system)
5185 (propagated-inputs
5186 `(("python-pytest" ,python-pytest)
5187 ("python-pytest-checkdocs" ,python-pytest-checkdocs)
5188 ("python-pytest-flake8" ,python-pytest-flake8)
5189 ("python-rst.linker" ,python-rst.linker)
5190 ("python-setuptools" ,python-setuptools)
5191 ("python-setuptools-scm" ,python-setuptools-scm)
5192 ("python-six" ,python-six)
5193 ("python-sphinx" ,python-sphinx)))
5194 (home-page "https://github.com/jaraco/jaraco.packaging")
5195 (synopsis "Tools to supplement packaging Python releases")
5196 (description
5197 "This package provides various tools to supplement packaging Python
5198releases.")
5199 (license license:expat)))
5200
44d10b1f
RW
5201(define-public python-pathpy
5202 (package
5203 (name "python-pathpy")
49ad11e9 5204 (version "11.5.0")
44d10b1f
RW
5205 (source
5206 (origin
5207 (method url-fetch)
5208 (uri (pypi-uri "path.py" version))
5209 (sha256
49ad11e9
RW
5210 (base32 "1jxkf91syzxlpiwgm83fjfz1m5xh3jrvv4iyl5wjsnkk599pls5n"))))
5211 (outputs '("out" "doc"))
44d10b1f
RW
5212 (build-system python-build-system)
5213 (propagated-inputs
01a53e0b
MC
5214 `(("python-appdirs" ,python-appdirs)
5215 ("python-importlib-metadata" ,python-importlib-metadata)))
44d10b1f
RW
5216 (native-inputs
5217 `(("python-setuptools-scm" ,python-setuptools-scm)
5218 ("python-sphinx" ,python-sphinx)
5219 ("python-rst.linker" ,python-rst.linker)
5220 ("python-pytest" ,python-pytest)
49ad11e9
RW
5221 ("python-pytest-runner" ,python-pytest-runner)
5222 ("python-jaraco-packaging" ,python-jaraco-packaging)))
44d10b1f 5223 (arguments
49ad11e9
RW
5224 `(#:phases
5225 (modify-phases %standard-phases
5226 (add-after 'build 'build-doc
5227 (lambda _
5228 (setenv "LANG" "en_US.UTF-8")
5229 (invoke "python" "setup.py" "build_sphinx")))
5230 (add-after 'install 'install-doc
5231 (lambda* (#:key outputs #:allow-other-keys)
5232 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5233 (doc (string-append data "/doc/" ,name "-" ,version))
5234 (html (string-append doc "/html")))
5235 (mkdir-p html)
5236 (for-each (lambda (file)
5237 (copy-file file (string-append doc "/" file)))
5238 '("README.rst" "CHANGES.rst"))
5239 (copy-recursively "build/sphinx/html" html)
5240 #t)))
5241 (replace 'check
5242 (lambda _
5243 ;; The import time test aborts if an import takes longer than
5244 ;; 100ms. It may very well take a little longer than that.
5245 (invoke "pytest" "-v" "-k" "not test_import_time"))))))
44d10b1f
RW
5246 (home-page "https://github.com/jaraco/path.py")
5247 (synopsis "Python module wrapper for built-in os.path")
5248 (description
5249 "@code{path.py} implements path objects as first-class entities, allowing
5250common operations on files to be invoked on those path objects directly.")
5251 (license license:expat)))
5252
5253(define-public python2-pathpy
5254 (package-with-python2 python-pathpy))
5255
5256(define-public python-simplegeneric
5257 (package
5258 (name "python-simplegeneric")
5259 (version "0.8.1")
5260 (source
5261 (origin
5262 (method url-fetch)
6c8c3980 5263 (uri (pypi-uri "simplegeneric" version ".zip"))
44d10b1f
RW
5264 (sha256
5265 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
5266 (build-system python-build-system)
5267 (native-inputs
5268 `(("unzip" ,unzip)))
5269 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
5270 (synopsis "Python module for simple generic functions")
5271 (description
5272 "The simplegeneric module lets you define simple single-dispatch generic
5273functions, akin to Python’s built-in generic functions like @code{len()},
5274@code{iter()} and so on. However, instead of using specially-named methods,
5275these generic functions use simple lookup tables, akin to those used by
5276e.g. @code{pickle.dump()} and other generic functions found in the Python
5277standard library.")
5278 (license license:zpl2.1)))
5279
5280(define-public python2-simplegeneric
5281 (package-with-python2 python-simplegeneric))
5282
5283(define-public python-ipython-genutils
5284 ;; TODO: This package is retired, check if can be removed, see description.
5285 (package
5286 (name "python-ipython-genutils")
5287 (version "0.1.0")
5288 (source
5289 (origin
5290 (method url-fetch)
c9671d4b 5291 (uri (pypi-uri "ipython_genutils" version))
44d10b1f
RW
5292 (sha256
5293 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
5294 (build-system python-build-system)
5295 (arguments `(#:tests? #f)) ; no tests
5296 (home-page "https://ipython.org")
5297 (synopsis "Vestigial utilities from IPython")
5298 (description
5299 "This package provides retired utilities from IPython. No packages
5300outside IPython/Jupyter should depend on it.
5301
5302This package shouldn't exist. It contains some common utilities shared by
5303Jupyter and IPython projects during The Big Split. As soon as possible, those
5304packages will remove their dependency on this, and this package will go
5305away.")
5306 (license license:bsd-3)))
5307
5308(define-public python2-ipython-genutils
5309 (package-with-python2 python-ipython-genutils))
5310
5311(define-public python-traitlets
5312 (package
5313 (name "python-traitlets")
ac5e205a 5314 (version "4.3.3")
44d10b1f
RW
5315 (source
5316 (origin
5317 (method url-fetch)
5318 (uri (pypi-uri "traitlets" version))
5319 (sha256
5320 (base32
ac5e205a 5321 "1xsrwgivpkxlbr4dfndfsi098s29yqgswgjc1qqn69yxklvfw8yh"))))
44d10b1f
RW
5322 (build-system python-build-system)
5323 (arguments
5324 `(#:phases
5325 (modify-phases %standard-phases
5326 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
5327 (propagated-inputs
5328 `(("python-ipython-genutils" ,python-ipython-genutils)
ac5e205a 5329 ("python-decorator" ,python-decorator)))
44d10b1f
RW
5330 (native-inputs
5331 `(("python-pytest" ,python-pytest)))
5332 (properties `((python2-variant . ,(delay python2-traitlets))))
5333 (home-page "https://ipython.org")
5334 (synopsis "Configuration system for Python applications")
5335 (description
5336 "Traitlets is a framework that lets Python classes have attributes with
5337type checking, dynamically calculated default values, and ‘on change’
5338callbacks. The package also includes a mechanism to use traitlets for
5339configuration, loading values from files or from command line arguments. This
5340is a distinct layer on top of traitlets, so you can use traitlets in your code
5341without using the configuration machinery.")
5342 (license license:bsd-3)))
5343
5344(define-public python2-traitlets
5345 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
5346 (package
5347 (inherit traitlets)
5348 (propagated-inputs
5349 `(("python2-enum34" ,python2-enum34)
5350 ,@(package-propagated-inputs traitlets))))))
5351
5352(define-public python-jupyter-core
5353 (package
5354 (name "python-jupyter-core")
5355 (version "4.4.0")
5356 (source
5357 (origin
5358 (method url-fetch)
5359 (uri (string-append (pypi-uri "jupyter_core" version)))
5360 (sha256
5361 (base32
5362 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
5363 (build-system python-build-system)
5364 ;; FIXME: not sure how to run the tests
5365 (arguments `(#:tests? #f))
5366 (propagated-inputs
5367 `(("python-traitlets" ,python-traitlets)))
5368 (home-page "http://jupyter.org/")
5369 (synopsis "Jupyter base package")
5370 (description
5371 "Jupyter core is the base package on which Jupyter projects rely.")
5372 (license license:bsd-3)))
5373
5374(define-public python2-jupyter-core
5375 (package-with-python2 python-jupyter-core))
5376
5377(define-public python-jupyter-client
5378 (package
5379 (name "python-jupyter-client")
5380 (version "5.2.4")
5381 (source
5382 (origin
5383 (method url-fetch)
5384 (uri (pypi-uri "jupyter_client" version))
5385 (sha256
5386 (base32
5387 "0l9mh7ccrpl3lppym3dnky8n1nk7xarzzdcxf4q2s7aw203cpydm"))))
5388 (build-system python-build-system)
5389 ;; Tests fail because of missing native python kernel which I assume is
5390 ;; provided by the ipython package, which we cannot use because it would
5391 ;; cause a dependency cycle.
ddc586ea
LC
5392 (arguments
5393 `(#:tests? #f
5394
5395 #:phases (modify-phases %standard-phases
5396 (add-after 'unpack 'set-tool-file-names
5397 (lambda* (#:key inputs #:allow-other-keys)
5398 (let ((iproute (assoc-ref inputs "iproute")))
5399 (substitute* "jupyter_client/localinterfaces.py"
5400 (("'ip'")
5401 (string-append "'" iproute "/sbin/ip'")))
5402 #t))))))
5403 (inputs
5404 `(("iproute" ,iproute)))
44d10b1f
RW
5405 (propagated-inputs
5406 `(("python-pyzmq" ,python-pyzmq)
5407 ("python-traitlets" ,python-traitlets)
5408 ("python-jupyter-core" ,python-jupyter-core)))
5409 (home-page "http://jupyter.org/")
5410 (synopsis "Jupyter protocol implementation and client libraries")
5411 (description
5412 "The @code{jupyter_client} package contains the reference implementation
5413of the Jupyter protocol. It also provides client and kernel management APIs
5414for working with kernels, and the @code{jupyter kernelspec} entrypoint for
5415installing @code{kernelspec}s for use with Jupyter frontends.")
5416 (license license:bsd-3)))
5417
5418(define-public python2-jupyter-client
5419 (package-with-python2 python-jupyter-client))
5420
5421(define-public python-ipykernel
5422 (package
5423 (name "python-ipykernel")
82110dea 5424 (version "5.1.1")
44d10b1f
RW
5425 (source
5426 (origin
5427 (method url-fetch)
5428 (uri (pypi-uri "ipykernel" version))
5429 (sha256
82110dea 5430 (base32 "173nm29g85w8cac3fg40b27qaq26g41wgg6qn79ql1hq4w2n5sgh"))))
44d10b1f
RW
5431 (build-system python-build-system)
5432 (arguments
5433 `(#:phases
5434 (modify-phases %standard-phases
5435 (replace 'check
5436 (lambda _
5437 (setenv "HOME" "/tmp")
5438 (invoke "pytest" "-v")
aa856d02
LC
5439 #t))
5440 (add-after 'install 'set-python-file-name
5441 (lambda* (#:key outputs #:allow-other-keys)
5442 ;; Record the absolute file name of the 'python' executable in
5443 ;; 'kernel.json'.
5444 (let ((out (assoc-ref outputs "out")))
5445 (substitute* (string-append out "/share/jupyter"
5446 "/kernels/python3/kernel.json")
5447 (("\"python\"")
5448 (string-append "\"" (which "python") "\"")))
5449 #t))))))
44d10b1f
RW
5450 (propagated-inputs
5451 `(("python-ipython" ,python-ipython)
5452 ;; imported at runtime during connect
5453 ("python-jupyter-client" ,python-jupyter-client)))
5454 (native-inputs
5455 `(("python-pytest" ,python-pytest)
5456 ("python-nose" ,python-nose)))
5457 (home-page "https://ipython.org")
5458 (synopsis "IPython Kernel for Jupyter")
5459 (description
5460 "This package provides the IPython kernel for Jupyter.")
5461 (license license:bsd-3)))
5462
0f378947 5463;; Version 5.1.1 and above no longer support Python 2.
44d10b1f 5464(define-public python2-ipykernel
0f378947
RW
5465 (package
5466 (name "python2-ipykernel")
5467 (version "5.1.0")
5468 (source
5469 (origin
5470 (method url-fetch)
5471 (uri (pypi-uri "ipykernel" version))
5472 (sha256
5473 (base32 "0br95qhrd5k65g10djngiy27hs0642301hlf2q142i8djabvzh0g"))))
5474 (build-system python-build-system)
5475 (arguments
5476 `(#:python ,python-2
5477 #:phases
5478 (modify-phases %standard-phases
5479 (replace 'check
5480 (lambda _
5481 (setenv "HOME" "/tmp")
5482 (invoke "pytest" "-v")
5483 #t)))))
5484 (propagated-inputs
5485 `(("python2-ipython" ,python2-ipython)
5486 ;; imported at runtime during connect
5487 ("python2-jupyter-client" ,python2-jupyter-client)))
5488 (native-inputs
5489 `(("python2-pytest" ,python2-pytest)
5490 ("python2-nose" ,python2-nose)))
5491 (home-page "https://ipython.org")
5492 (synopsis "IPython Kernel for Jupyter")
5493 (description
5494 "This package provides the IPython kernel for Jupyter.")
5495 (license license:bsd-3)))
44d10b1f 5496
966aa714
AE
5497(define-public python-pari-jupyter
5498 (package
5499 (name "python-pari-jupyter")
5500 (version "1.3.2")
5501 (source
5502 (origin
5503 (method url-fetch)
5504 (uri (pypi-uri "pari_jupyter" version))
5505 (sha256
5506 (base32
5507 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
5508 (build-system python-build-system)
5509 (propagated-inputs
5510 `(("python-ipykernel" ,python-ipykernel)))
5511 (inputs
5512 `(("pari-gp" ,pari-gp)
5513 ("readline" ,readline)))
5514 (arguments
5515 `(#:tests? #f)) ; no test suite
5516 (home-page
5517 "https://github.com/jdemeyer/pari_jupyter")
5518 (synopsis "A Jupyter kernel for PARI/GP")
5519 (description "The package provides a PARI/GP kernel for Jupyter.")
5520 (license license:gpl3+)))
5521
dede052a
RW
5522(define-public python-backcall
5523 (package
5524 (name "python-backcall")
5525 (version "0.1.0")
5526 (source
5527 (origin
5528 (method url-fetch)
5529 (uri (pypi-uri "backcall" version))
5530 (sha256
5531 (base32
5532 "1r01dqch3f8fdj3n6fviw8hxqrs6w5v0qw4izmvqzry1w9dxiv1q"))))
5533 (build-system python-build-system)
5534 (home-page "https://github.com/takluyver/backcall/")
5535 (synopsis "Specifications for callback functions passed in to an API")
5536 (description
5537 "If your code lets other people supply callback functions, it's important
5538to specify the function signature you expect, and check that functions support
5539that. Adding extra parameters later would break other peoples code unless
5540you're careful. The @code{backcall} package provides a way of specifying the
5541callback signature using a prototype function.")
5542 (license license:bsd-3)))
5543
44d10b1f
RW
5544;; This is the latest release of the LTS version of ipython with support for
5545;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
8b5f756c
RW
5546;; dropped support for Python 2.7.
5547(define-public python2-ipython
44d10b1f 5548 (package
8b5f756c 5549 (name "python2-ipython")
44d10b1f
RW
5550 (version "5.8.0")
5551 (source
5552 (origin
5553 (method url-fetch)
5554 (uri (pypi-uri "ipython" version ".tar.gz"))
5555 (sha256
5556 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
5557 (build-system python-build-system)
44d10b1f 5558 (propagated-inputs
8b5f756c
RW
5559 `(("python2-backports-shutil-get-terminal-size"
5560 ,python2-backports-shutil-get-terminal-size)
5561 ("python2-pathlib2" ,python2-pathlib2)
5562 ("python2-pyzmq" ,python2-pyzmq)
5563 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
5564 ("python2-terminado" ,python2-terminado)
5565 ("python2-matplotlib" ,python2-matplotlib)
5566 ("python2-numpy" ,python2-numpy)
5567 ("python2-numpydoc" ,python2-numpydoc)
5568 ("python2-jinja2" ,python2-jinja2)
5569 ("python2-mistune" ,python2-mistune)
5570 ("python2-pexpect" ,python2-pexpect)
5571 ("python2-pickleshare" ,python2-pickleshare)
5572 ("python2-simplegeneric" ,python2-simplegeneric)
5573 ("python2-jsonschema" ,python2-jsonschema)
5574 ("python2-traitlets" ,python2-traitlets)
5575 ("python2-nbformat" ,python2-nbformat)
5576 ("python2-pygments" ,python2-pygments)))
5577 (inputs
5578 `(("readline" ,readline)
5579 ("which" ,which)))
5580 (native-inputs
5581 `(("graphviz" ,graphviz)
5582 ("pkg-config" ,pkg-config)
5583 ("python2-requests" ,python2-requests) ;; for tests
5584 ("python2-testpath" ,python2-testpath)
5585 ("python2-mock" ,python2-mock)
5586 ("python2-nose" ,python2-nose)))
5587 (arguments
5588 `(#:python ,python-2
5589 #:phases
5590 (modify-phases %standard-phases
5591 (add-before 'check 'delete-broken-tests
5592 (lambda* (#:key inputs #:allow-other-keys)
5593 ;; These tests throw errors for unknown reasons.
5594 (delete-file "IPython/core/tests/test_profile.py")
5595 (delete-file "IPython/core/tests/test_interactiveshell.py")
5596 (delete-file "IPython/core/tests/test_magic.py")
5597 #t)))))
5598 (home-page "https://ipython.org")
5599 (synopsis "IPython is a tool for interactive computing in Python")
5600 (description
5601 "IPython provides a rich architecture for interactive computing with:
5602Powerful interactive shells, a browser-based notebook, support for interactive
5603data visualization, embeddable interpreters and tools for parallel
5604computing.")
5605 (license license:bsd-3)))
5606
5607(define-public python-ipython
5608 (package
5609 (name "python-ipython")
5610 (version "7.5.0")
5611 (source
5612 (origin
5613 (method url-fetch)
5614 (uri (pypi-uri "ipython" version ".tar.gz"))
5615 (sha256
5616 (base32 "09mbxq37mfn88xjnib7qfzaq9krr7gf1jxwy1p6mcjr254082h78"))))
5617 (build-system python-build-system)
5618 (propagated-inputs
5619 `(("python-backcall" ,python-backcall)
5620 ("python-pyzmq" ,python-pyzmq)
5621 ("python-prompt-toolkit" ,python-prompt-toolkit)
44d10b1f
RW
5622 ("python-terminado" ,python-terminado)
5623 ("python-matplotlib" ,python-matplotlib)
5624 ("python-numpy" ,python-numpy)
5625 ("python-numpydoc" ,python-numpydoc)
8b5f756c 5626 ("python-jedi" ,python-jedi)
44d10b1f
RW
5627 ("python-jinja2" ,python-jinja2)
5628 ("python-mistune" ,python-mistune)
5629 ("python-pexpect" ,python-pexpect)
5630 ("python-pickleshare" ,python-pickleshare)
5631 ("python-simplegeneric" ,python-simplegeneric)
5632 ("python-jsonschema" ,python-jsonschema)
5633 ("python-traitlets" ,python-traitlets)
5634 ("python-nbformat" ,python-nbformat)
5635 ("python-pygments" ,python-pygments)))
5636 (inputs
5637 `(("readline" ,readline)
5638 ("which" ,which)))
5639 (native-inputs
5640 `(("graphviz" ,graphviz)
5641 ("pkg-config" ,pkg-config)
5642 ("python-requests" ,python-requests) ;; for tests
5643 ("python-testpath" ,python-testpath)
8b5f756c 5644 ("python-nose" ,python-nose)))
44d10b1f
RW
5645 (arguments
5646 `(#:phases
5647 (modify-phases %standard-phases
0f272518
RW
5648 (add-after 'unpack 'make-docs-reproducible
5649 (lambda _
5650 (substitute* "IPython/sphinxext/ipython_directive.py"
5651 ((".*import datetime") "")
5652 ((".*datetime.datetime.now\\(\\)") "")
5653 (("%timeit") "# %timeit"))
5654 #t))
44d10b1f
RW
5655 ;; Tests can only be run after the library has been installed and not
5656 ;; within the source directory.
5657 (delete 'check)
5658 (add-after 'install 'check
5659 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5660 (if tests?
5661 (begin
5662 ;; Make installed package available for running the tests
5663 (add-installed-pythonpath inputs outputs)
5664 (setenv "HOME" "/tmp/") ;; required by a test
5665 ;; We only test the core because one of the other tests
5666 ;; tries to import ipykernel.
5667 (invoke "python" "IPython/testing/iptest.py"
5668 "-v" "IPython/core/tests"))
5669 #t)))
5670 (add-before 'check 'fix-tests
5671 (lambda* (#:key inputs #:allow-other-keys)
5672 (substitute* "./IPython/utils/_process_posix.py"
5673 (("/usr/bin/env', 'which") (which "which")))
5674 (substitute* "./IPython/core/tests/test_inputtransformer.py"
5675 (("#!/usr/bin/env python")
5676 (string-append "#!" (which "python"))))
44d10b1f
RW
5677 ;; This test introduces a circular dependency on ipykernel
5678 ;; (which depends on ipython).
5679 (delete-file "IPython/core/tests/test_display.py")
8b5f756c 5680 ;; AttributeError: module 'IPython.core' has no attribute 'formatters'
44d10b1f 5681 (delete-file "IPython/core/tests/test_interactiveshell.py")
44d10b1f
RW
5682 #t)))))
5683 (home-page "https://ipython.org")
5684 (synopsis "IPython is a tool for interactive computing in Python")
5685 (description
5686 "IPython provides a rich architecture for interactive computing with:
5687Powerful interactive shells, a browser-based notebook, support for interactive
5688data visualization, embeddable interpreters and tools for parallel
5689computing.")
8b5f756c 5690 (license license:bsd-3)))
44d10b1f 5691
8b5f756c
RW
5692(define-public python-ipython-documentation
5693 (package
5694 (inherit python-ipython)
5695 (name "python-ipython-documentation")
5696 (version (package-version python-ipython))
5697 (arguments
5698 `(#:phases
5699 (modify-phases %standard-phases
5700 (delete 'build)
5701 (delete 'check)
5702 (replace 'install
5703 (lambda* (#:key outputs #:allow-other-keys)
5704 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
5705 (doc (string-append data "/doc/" ,name "-" ,version))
5706 (html (string-append doc "/html"))
5707 (man1 (string-append data "/man/man1"))
5708 (info (string-append data "/info"))
5709 (examples (string-append doc "/examples"))
5710 (python-arg (string-append "PYTHON=" (which "python"))))
5711 (setenv "LANG" "en_US.utf8")
5712 (with-directory-excursion "docs"
5713 ;; FIXME: pdf fails to build
5714 ;;(system* "make" "pdf" "PAPER=a4")
5715 (system* "make" python-arg "html")
5716 ;; FIXME: the generated texi file contains ^@^@, which trips
5717 ;; up the parser.
5718 ;; (system* "make" python-arg "info")
5719 )
5720 (copy-recursively "docs/man" man1)
5721 (copy-recursively "examples" examples)
5722 (copy-recursively "docs/build/html" html)
5723 ;; (copy-file "docs/build/latex/ipython.pdf"
5724 ;; (string-append doc "/ipython.pdf"))
5725 (mkdir-p info)
5726 ;; (copy-file "docs/build/texinfo/ipython.info"
5727 ;; (string-append info "/ipython.info"))
5728 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
5729 #t)))))
5730 (inputs
5731 `(("python-ipython" ,python-ipython)
5732 ("python-ipykernel" ,python-ipykernel)))
5733 (native-inputs
5734 `(("python-sphinx" ,python-sphinx)
5735 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
5736 ;; FIXME: It's possible that a smaller union would work just as well.
f75aa97f 5737 ("texlive" ,(texlive-union (list texlive-amsfonts
8b5f756c
RW
5738 texlive-fonts-ec
5739 texlive-generic-ifxetex
5740 texlive-generic-pdftex
8b5f756c
RW
5741 texlive-latex-capt-of
5742 texlive-latex-cmap
5743 texlive-latex-environ
5744 texlive-latex-eqparbox
5745 texlive-latex-etoolbox
5746 texlive-latex-expdlist
5747 texlive-latex-fancyhdr
5748 texlive-latex-fancyvrb
5749 texlive-latex-fncychap
5750 texlive-latex-float
5751 texlive-latex-framed
5752 texlive-latex-geometry
5753 texlive-latex-graphics
5754 texlive-latex-hyperref
5755 texlive-latex-mdwtools
5756 texlive-latex-multirow
5757 texlive-latex-needspace
5758 texlive-latex-oberdiek
5759 texlive-latex-parskip
5760 texlive-latex-preview
5761 texlive-latex-tabulary
5762 texlive-latex-threeparttable
5763 texlive-latex-titlesec
5764 texlive-latex-trimspaces
5765 texlive-latex-ucs
5766 texlive-latex-upquote
5767 texlive-latex-url
5768 texlive-latex-varwidth
5769 texlive-latex-wrapfig)))
5770 ("texinfo" ,texinfo)))))
44d10b1f
RW
5771
5772(define-public python-urwid
5773 (package
5774 (name "python-urwid")
5775 (version "2.0.1")
5776 (source
5777 (origin
5778 (method url-fetch)
5779 (uri (pypi-uri "urwid" version))
5780 (sha256
5781 (base32
5782 "1g6cpicybvbananpjikmjk8npmjk4xvak1wjzji62wc600wkwkb4"))))
5783 (build-system python-build-system)
5784 (home-page "http://urwid.org")
5785 (synopsis "Console user interface library for Python")
5786 (description
5787 "Urwid is a curses-based UI/widget library for Python. It includes many
5788features useful for text console applications.")
5789 (license license:lgpl2.1+)))
5790
5791(define-public python2-urwid
5792 (package-with-python2 python-urwid))
5793
5794(define-public python-urwidtrees
5795 (package
5796 (name "python-urwidtrees")
5797 (version "1.0.2")
5798 (source
5799 (origin
5800 (method url-fetch)
5801 ;; package author intends on distributing via github rather than pypi:
5802 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
5803 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
5804 version ".tar.gz"))
5805 (file-name (string-append name "-" version ".tar.gz"))
5806 (sha256
5807 (base32
5808 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
5809 (build-system python-build-system)
5810 (arguments
5811 '(#:tests? #f)) ; no tests
5812 (propagated-inputs `(("python-urwid" ,python-urwid)))
5813 (home-page "https://github.com/pazz/urwidtrees")
5814 (synopsis "Tree widgets for urwid")
5815 (description "Urwidtrees is a Widget Container API for the @code{urwid}
5816toolkit. Use it to build trees of widgets.")
5817 (license license:gpl3+)))
5818
5819(define-public python2-urwidtrees
5820 (package-with-python2 python-urwidtrees))
5821
5822(define-public python-ua-parser
5823 (package
5824 (name "python-ua-parser")
5825 (version "0.8.0")
5826 (source
5827 (origin
5828 (method url-fetch)
5829 (uri (pypi-uri "ua-parser" version))
5830 (sha256
5831 (base32
5832 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
5833 (build-system python-build-system)
5834 (arguments
5835 `(#:tests? #f)) ;no test suite in release
5836 (native-inputs
5837 `(("python-pyyaml" ,python-pyyaml)))
5838 (home-page "https://github.com/ua-parser/uap-python")
5839 (synopsis "User agent parser")
5840 (description
5841 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
5842 (license license:asl2.0)))
5843
5844(define-public python2-ua-parser
5845 (package-with-python2 python-ua-parser))
5846
5847(define-public python-user-agents
5848 (package
5849 (name "python-user-agents")
5850 (version "1.1.0")
5851 (source
5852 (origin
5853 (method url-fetch)
5854 (uri (pypi-uri "user-agents" version))
5855 (sha256
5856 (base32
5857 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
5858 (build-system python-build-system)
5859 (arguments
5860 `(#:tests? #f)) ;missing devices.json test file in release
5861 (propagated-inputs
5862 `(("python-ua-parser" ,python-ua-parser)))
5863 (home-page "https://github.com/selwin/python-user-agents")
5864 (synopsis "User Agent strings parsing library")
5865 (description
5866 "A library to identify devices (phones, tablets) and their capabilities by
5867parsing (browser/HTTP) user agent strings.")
5868 (license license:expat)))
5869
5870(define-public python2-user-agents
5871 (package-with-python2 python-user-agents))
5872
5873(define-public python-dbus
5874 (package
5875 (name "python-dbus")
5876 (version "1.2.8")
5877 (source
5878 (origin
5879 (method url-fetch)
5880 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
5881 "dbus-python-" version ".tar.gz"))
5882 (sha256
5883 (base32
5884 "0vvvjmiwnc9cjlks3gcdk43ap7llhlpz7cm1wbw0nc2yfsxjpwdb"))))
5885 (build-system gnu-build-system)
5886 (arguments
5887 '(#:phases
5888 (modify-phases %standard-phases
5889 (add-before
5890 'check 'pre-check
5891 (lambda _
5892 ;; XXX: For the missing '/etc/machine-id'.
5893 (substitute* "test/run-test.sh"
5894 (("DBUS_FATAL_WARNINGS=1")
5895 "DBUS_FATAL_WARNINGS=0"))
5896 #t)))))
5897 (native-inputs
5898 `(("pkg-config" ,pkg-config)))
5899 (inputs
5900 `(("python" ,python-wrapper)
5901 ("dbus-glib" ,dbus-glib)))
5902 (synopsis "Python bindings for D-bus")
5903 (description "python-dbus provides bindings for libdbus, the reference
5904implementation of D-Bus.")
5905 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
5906 (license license:expat)))
5907
5908(define-public python2-dbus
5909 (package (inherit python-dbus)
5910 (name "python2-dbus")
5911 (inputs `(("python" ,python-2)
5912 ,@(alist-delete "python"
5913 (package-inputs python-dbus)
5914 equal?)))
5915 ;; FIXME: on Python 2, the test_utf8 fails with:
5916 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
5917 (arguments `(#:tests? #f))))
5918
fb236fdd
AG
5919(define-public python-notify2
5920 (package
5921 (name "python-notify2")
5922 (version "0.3.1")
5923 (source
5924 (origin
5925 (method url-fetch)
5926 (uri (pypi-uri "notify2" version))
5927 (sha256
5928 (base32
5929 "0z8rrv9rsg1r2qgh2dxj3dfj5xnki98kgi3w839kqby4a26i1yik"))))
5930 (build-system python-build-system)
5931 (arguments `(#:tests? #f)) ; tests depend on system state
5932 (native-inputs
5933 `(("python-dbus" ,python-dbus)))
5934 (home-page "https://bitbucket.org/takluyver/pynotify2")
5935 (synopsis "Python interface to D-Bus notifications")
5936 (description
5937 "Pynotify2 provides a Python interface for sending D-Bus notifications.
5938It is a reimplementation of pynotify in pure Python, and an alternative to
5939the GObject Introspection bindings to libnotify for non-GTK applications.")
5940 (license (list license:bsd-2
5941 license:lgpl2.1+))))
5942
5943(define-public python2-notify2
5944 (package-with-python2 python-notify2))
5945
44d10b1f
RW
5946(define-public python-lxml
5947 (package
5948 (name "python-lxml")
5949 (version "4.2.5")
5950 (source
5951 (origin
5952 (method url-fetch)
5953 (uri (pypi-uri "lxml" version))
5954 (sha256
5955 (base32
5956 "0zw0y9hs0nflxhl9cs6ipwwh53szi3w2x06wl0k9cylyqac0cwin"))))
5957 (build-system python-build-system)
5958 (inputs
5959 `(("libxml2" ,libxml2)
5960 ("libxslt" ,libxslt)))
5961 (home-page "http://lxml.de/")
5962 (synopsis
5963 "Python XML processing library")
5964 (description
5965 "The lxml XML toolkit is a Pythonic binding for the C libraries
5966libxml2 and libxslt.")
5967 (license license:bsd-3))) ; and a few more, see LICENSES.txt
5968
5969(define-public python2-lxml
5970 (package-with-python2 python-lxml))
5971
5972;; beautifulsoup4 has a totally different namespace than 3.x,
5973;; and pypi seems to put it under its own name, so I guess we should too
5974(define-public python-beautifulsoup4
5975 (package
5976 (name "python-beautifulsoup4")
abb53e6f 5977 (version "4.7.1")
44d10b1f
RW
5978 (source
5979 (origin
5980 (method url-fetch)
5981 (uri (pypi-uri "beautifulsoup4" version))
5982 (sha256
5983 (base32
abb53e6f 5984 "0j2kycz2dxgx68xzjm7rxg5xn6v61gq5ifvxyg99slmqkybnal4l"))))
44d10b1f
RW
5985 (build-system python-build-system)
5986 (arguments
5987 `(#:phases
5988 (modify-phases %standard-phases
5989 ;; The Python 2 source is the definitive source of beautifulsoup4. We
5990 ;; must use this conversion script when building with Python 3. The
5991 ;; conversion script also runs the tests.
5992 ;; For more information, see the file 'convert-py3k' in the source
5993 ;; distribution.
5994 (replace 'check
dff0197e 5995 (lambda _ (invoke "./convert-py3k"))))))
f83e10e4 5996 (propagated-inputs
abb53e6f 5997 `(("python-soupsieve" ,python-soupsieve)))
44d10b1f
RW
5998 (home-page
5999 "https://www.crummy.com/software/BeautifulSoup/bs4/")
6000 (synopsis
6001 "Python screen-scraping library")
6002 (description
6003 "Beautiful Soup is a Python library designed for rapidly setting up
6004screen-scraping projects. It offers Pythonic idioms for navigating,
6005searching, and modifying a parse tree, providing a toolkit for
6006dissecting a document and extracting what you need. It automatically
6007converts incoming documents to Unicode and outgoing documents to UTF-8.")
6008 (license license:expat)
6009 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
6010
6011(define-public python2-beautifulsoup4
6012 (package
6013 (inherit (package-with-python2
6014 (strip-python2-variant python-beautifulsoup4)))
6015 (arguments `(#:python ,python-2))))
6016
ad74978a
BT
6017(define-public python-soupsieve
6018 (package
6019 (name "python-soupsieve")
e9cb6edd 6020 (version "1.9.2")
ad74978a
BT
6021 (source
6022 (origin
6023 (method url-fetch)
6024 (uri (pypi-uri "soupsieve" version))
6025 (sha256
6026 (base32
e9cb6edd 6027 "0in9rc9q3h8w5b4qf7kvl3qxcvw6vrz35ckblchgf70hm6pg3dbj"))))
ad74978a
BT
6028 (build-system python-build-system)
6029 (arguments `(#:tests? #f))
6030 ;;XXX: 2 tests fail currently despite claming they were to be
6031 ;;skipped. Also, beautifulsoup4 may depend on this in the future, so we
6032 ;;don't want to create a circular dependency.
6033 (home-page "https://github.com/facelessuser/soupsieve")
6034 (synopsis "CSS selector library")
6035 (description
6036 "Soup Sieve is a CSS selector library designed to be used with Beautiful
6037Soup 4. It aims to provide selecting, matching, and filtering using modern
6038CSS selectors. Soup Sieve currently provides selectors from the CSS level 1
6039specifications up through the latest CSS level 4 drafts and beyond (though
6040some are not yet implemented).")
d00b83fb 6041 (properties `((python2-variant . ,(delay python2-soupsieve))))
ad74978a
BT
6042 (license license:expat)))
6043
6044(define-public python2-soupsieve
d00b83fb 6045 (let ((base (package-with-python2 (strip-python2-variant python-soupsieve))))
ad74978a
BT
6046 (package
6047 (inherit base)
6048 (propagated-inputs
d00b83fb
MB
6049 `(("python2-backports-functools-lru-cache"
6050 ,python2-backports-functools-lru-cache)
6051 ,@(package-propagated-inputs base))))))
ad74978a 6052
44d10b1f
RW
6053(define-public python-netifaces
6054 (package
6055 (name "python-netifaces")
6056 (version "0.10.7")
6057 (source
6058 (origin
6059 (method url-fetch)
6060 (uri (pypi-uri "netifaces" version))
6061 (sha256
6062 (base32
6063 "1gccklrcplbbqh81g1mdgpa5y8na7kkf29cq2ka3f5a2fp5hyndx"))))
6064 (build-system python-build-system)
6065 (home-page "https://github.com/al45tair/netifaces")
6066 (synopsis
6067 "Python module for portable network interface information")
6068 (description
6069 "Netifaces is a Python module providing information on network
6070interfaces in an easy and portable manner.")
6071 (license license:expat)))
6072
6073(define-public python2-netifaces
6074 (package-with-python2 python-netifaces))
6075
6076(define-public python-networkx
6077 (package
6078 (name "python-networkx")
6079 (version "2.2")
6080 (source
6081 (origin
6082 (method url-fetch)
6083 (uri (pypi-uri "networkx" version ".zip"))
6084 (sha256
6085 (base32 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
6086 (build-system python-build-system)
6087 ;; python-decorator is needed at runtime.
6088 (propagated-inputs
6089 `(("python-decorator" ,python-decorator)))
6090 (native-inputs
6091 `(("python-nose" ,python-nose)
6092 ("unzip" ,unzip)))
6093 (home-page "https://networkx.github.io/")
6094 (synopsis "Python module for creating and manipulating graphs and networks")
6095 (description
6096 "NetworkX is a Python package for the creation, manipulation, and study
6097of the structure, dynamics, and functions of complex networks.")
6098 (license license:bsd-3)))
6099
6100(define-public python2-networkx
6101 (package-with-python2 python-networkx))
6102
6103(define-public python-datrie
6104 (package
6105 (name "python-datrie")
0b58cb42 6106 (version "0.8")
44d10b1f
RW
6107 (source
6108 (origin
6109 (method url-fetch)
6110 (uri (pypi-uri "datrie" version))
6111 (sha256
6112 (base32
0b58cb42 6113 "0338r8xgmpy78556jhms0h6qkvyjr10p8bpgdvcpqzm9lrmxmmdx"))))
44d10b1f 6114 (build-system python-build-system)
44d10b1f
RW
6115 (native-inputs
6116 `(("python-cython" ,python-cython)
6117 ("python-hypothesis" ,python-hypothesis)
6118 ("python-pytest" ,python-pytest)
6119 ("python-pytest-runner" ,python-pytest-runner)))
6120 (home-page "https://github.com/kmike/datrie")
6121 (synopsis "Fast, efficiently stored trie for Python")
6122 (description
6123 "This package provides a fast, efficiently stored trie implementation for
6124Python.")
6125 (license license:lgpl2.1+)))
6126
6127(define-public snakemake
6128 (package
6129 (name "snakemake")
6130 (version "5.2.4")
6131 (source
6132 (origin
6133 (method url-fetch)
6134 (uri (pypi-uri "snakemake" version))
6135 (sha256
6136 (base32 "0gj0xxgiq3mp9qyyrbfzldiaq1giliqw0in64nqiz7vx49myqj7z"))))
6137 (build-system python-build-system)
6138 (arguments
6139 ;; TODO: Package missing test dependencies.
6140 '(#:tests? #f
6141 #:phases
6142 (modify-phases %standard-phases
6143 ;; For cluster execution Snakemake will call Python. Since there is
6144 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
6145 ;; this by calling the snakemake wrapper instead.
6146 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
6147 (lambda* (#:key outputs #:allow-other-keys)
6148 (substitute* "snakemake/executors.py"
6149 (("\\{sys.executable\\} -m snakemake")
6150 (string-append (assoc-ref outputs "out")
6151 "/bin/snakemake")))
6152 #t)))))
6153 (propagated-inputs
6154 `(("python-gitpython" ,python-gitpython)
6155 ("python-wrapt" ,python-wrapt)
6156 ("python-requests" ,python-requests)
6157 ("python-appdirs" ,python-appdirs)
6158 ("python-configargparse" ,python-configargparse)
6159 ("python-datrie" ,python-datrie)
6160 ("python-docutils" ,python-docutils)
6161 ("python-jinja2" ,python-jinja2)
6162 ("python-jsonschema" ,python-jsonschema)
6163 ("python-networkx" ,python-networkx)
6164 ("python-pyyaml" ,python-pyyaml)
6165 ("python-ratelimiter" ,python-ratelimiter)))
6166 (home-page "https://snakemake.readthedocs.io")
6167 (synopsis "Python-based execution environment for make-like workflows")
6168 (description
6169 "Snakemake aims to reduce the complexity of creating workflows by
6170providing a clean and modern domain specific specification language (DSL) in
6171Python style, together with a fast and comfortable execution environment.")
6172 (license license:expat)))
6173
6174;; This is currently needed for the pigx-* packages.
6175(define-public snakemake-4
6176 (package (inherit snakemake)
6177 (version "4.4.0")
6178 (source
6179 (origin
6180 (method url-fetch)
6181 (uri (pypi-uri "snakemake" version))
6182 (sha256
6183 (base32 "0g0paia4z7w3srnqdmavq3hrb2x7qnpf81jx50njl0p7y4y0j8jv"))))
6184 (propagated-inputs
6185 `(("python-wrapt" ,python-wrapt)
6186 ("python-requests" ,python-requests)
6187 ("python-appdirs" ,python-appdirs)
6188 ("python-configargparse" ,python-configargparse)
6189 ("python-pyyaml" ,python-pyyaml)
6190 ("python-ratelimiter" ,python-ratelimiter)))))
6191
6192(define-public python-pyqrcode
6193 (package
6194 (name "python-pyqrcode")
6195 (version "1.2.1")
6196 (source
6197 (origin
6198 (method url-fetch)
6199 (uri (pypi-uri "PyQRCode" version))
6200 (sha256
6201 (base32
6202 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
6203 (build-system python-build-system)
6204 (home-page
6205 "https://github.com/mnooner256/pyqrcode")
6206 (synopsis "QR code generator")
6207 (description
6208 "Pyqrcode is a QR code generator written purely in Python with
6209SVG, EPS, PNG and terminal output.")
6210 (license license:bsd-3)))
6211
6212(define-public python-seaborn
6213 (package
6214 (name "python-seaborn")
6215 (version "0.9.0")
6216 (source
6217 (origin
6218 (method url-fetch)
6219 (uri (pypi-uri "seaborn" version))
6220 (sha256
6221 (base32 "0bqysi3fxfjl1866m5jq8z7mynhqbqnikim74dmzn8539iwkzj3n"))))
6222 (build-system python-build-system)
6223 (arguments
6224 `(#:phases
6225 (modify-phases %standard-phases
6226 (add-before 'check 'start-xserver
6227 (lambda* (#:key inputs #:allow-other-keys)
6228 (let ((xorg-server (assoc-ref inputs "xorg-server")))
6229 ;; There must be a running X server and make check doesn't
6230 ;; start one. Therefore we must do it.
6231 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
6232 (setenv "DISPLAY" ":1")
6233 #t)))
6234 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
6235 (propagated-inputs
6236 `(("python-pandas" ,python-pandas)
6237 ("python-matplotlib" ,python-matplotlib)
6238 ("python-numpy" ,python-numpy)
6239 ("python-scipy" ,python-scipy)))
6240 (native-inputs
6241 `(("python-pytest" ,python-pytest)
6242 ("xorg-server" ,xorg-server)))
6243 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
6244 (synopsis "Statistical data visualization")
6245 (description
6246 "Seaborn is a library for making attractive and informative statistical
6247graphics in Python. It is built on top of matplotlib and tightly integrated
6248with the PyData stack, including support for numpy and pandas data structures
6249and statistical routines from scipy and statsmodels.")
6250 (license license:bsd-3)))
6251
6252(define-public python2-seaborn
6253 (package-with-python2 python-seaborn))
6254
6255(define-public python-mpmath
6256 (package
6257 (name "python-mpmath")
6258 (version "0.19")
6259 (source (origin
6260 (method url-fetch)
6261 (uri (string-append "http://mpmath.org/files/mpmath-"
6262 version ".tar.gz"))
6263 (sha256
6264 (base32
6265 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
6266 (build-system python-build-system)
6267 (arguments
6268 '(#:phases
6269 (modify-phases %standard-phases
6270 (replace 'check
6271 (lambda _
5d7a6f1c 6272 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
44d10b1f
RW
6273 (home-page "http://mpmath.org")
6274 (synopsis "Arbitrary-precision floating-point arithmetic in python")
6275 (description
6276 "@code{mpmath} can be used as an arbitrary-precision substitute for
6277Python's float/complex types and math/cmath modules, but also does much
6278more advanced mathematics.")
6279 (license license:bsd-3)))
6280
6281(define-public python2-mpmath
6282 (package-with-python2 python-mpmath))
6283
6284(define-public python-bigfloat
6285 (package
6286 (name "python-bigfloat")
6287 (version "0.3.0")
6288 (source
6289 (origin
6290 (method url-fetch)
6291 (uri (pypi-uri "bigfloat" version))
6292 (sha256
6293 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
6294 (build-system python-build-system)
6295 (inputs
6296 `(("mpfr" ,mpfr)))
6297 (home-page "https://github.com/mdickinson/bigfloat")
6298 (synopsis "Arbitrary precision floating-point arithmetic for Python")
6299 (description
e36de31b 6300 "This package provides a Python interface to the MPFR library for
44d10b1f
RW
6301multiprecision arithmetic.")
6302 (license license:lgpl3+)))
6303
6304(define-public python2-bigfloat
6305 (package-with-python2 python-bigfloat))
6306
6307(define-public python-sympy
6308 (package
6309 (name "python-sympy")
6310 (version "1.1.1")
6311 (source
6312 (origin
6313 (method url-fetch)
6314 (uri (string-append
6315 "https://github.com/sympy/sympy/releases/download/sympy-"
6316 version "/sympy-" version ".tar.gz"))
6317 (sha256
6318 (base32 "190n29sppw7g8ihilc5451y7jlfcaw56crqiqbf1jff43dlmfnxc"))))
6319 (build-system python-build-system)
6320 (arguments
6321 `(#:phases
6322 (modify-phases %standard-phases
6323 ;; Run the core tests after installation. By default it would run
6324 ;; *all* tests, which take a very long time to complete and are known
6325 ;; to be flaky.
6326 (delete 'check)
6327 (add-after 'install 'check
6328 (lambda* (#:key outputs #:allow-other-keys)
6329 (invoke "python3" "-c" "import sympy; sympy.test(\"/core\")")
6330 #t)))))
6331 (propagated-inputs
6332 `(("python-mpmath" ,python-mpmath)))
6333 (home-page "http://www.sympy.org/")
6334 (synopsis "Python library for symbolic mathematics")
6335 (description
6336 "SymPy is a Python library for symbolic mathematics. It aims to become a
6337full-featured computer algebra system (CAS) while keeping the code as simple
6338as possible in order to be comprehensible and easily extensible.")
6339 (license license:bsd-3)))
6340
6341(define-public python2-sympy
6342 (package
6343 (inherit (package-with-python2 python-sympy))
6344 (arguments
6345 `(#:phases
6346 (modify-phases %standard-phases
6347 ;; Run the core tests after installation. By default it would run
6348 ;; *all* tests, which take a very long time to complete and are known
6349 ;; to be flaky.
6350 (delete 'check)
6351 (add-after 'install 'check
6352 (lambda* (#:key outputs #:allow-other-keys)
6353 (invoke "python" "-c" "import sympy; sympy.test(\"/core\")")
6354 #t)))))))
6355
6356(define-public python-q
6357 (package
6358 (name "python-q")
6359 (version "2.6")
6360 (source
6361 (origin
6362 (method url-fetch)
6363 (uri (pypi-uri "q" version))
6364 (sha256
6365 (base32
6366 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
6367 (build-system python-build-system)
6368 (home-page "https://github.com/zestyping/q")
6369 (synopsis "Quick-and-dirty debugging output for tired programmers")
6370 (description
6371 "q is a Python module for \"print\" style of debugging Python code. It
6372provides convenient short API for print out of values, tracebacks, and
6373falling into the Python interpreter.")
6374 (license license:asl2.0)))
6375
6376(define-public python2-q
6377 (package-with-python2 python-q))
6378
6379(define-public python2-xlib
6380 (package
6381 (name "python2-xlib")
6382 (version "0.14")
6383 (source (origin
6384 (method url-fetch)
6385 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
6386 "/" version "/"
6387 "python-xlib-" version ".tar.gz"))
6388 (sha256
6389 (base32
6390 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
6391 (build-system python-build-system)
6392 (arguments
6393 `(#:python ,python-2 ;Python 2 only
6394 #:tests? #f)) ;no tests
6395 (home-page "http://python-xlib.sourceforge.net/")
6396 (synopsis "Python X11 client library")
6397 (description
6398 "The Python X Library is intended to be a fully functional X client
6399library for Python programs. It is useful to implement low-level X clients.
6400It is written entirely in Python.")
6401 (license license:gpl2+)))
6402
6403(define-public python-singledispatch
6404 (package
6405 (name "python-singledispatch")
6406 (version "3.4.0.3")
6407 (source
6408 (origin
6409 (method url-fetch)
6410 (uri (pypi-uri "singledispatch" version))
6411 (sha256
6412 (base32
6413 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
6414 (build-system python-build-system)
6415 (native-inputs
6416 `(("python-six" ,python-six))) ; required for conversion, not at run-time
6417 (home-page
6418 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
6419 (synopsis "Backport of singledispatch feature from Python 3.4")
6420 (description
6421 "This library brings functools.singledispatch from Python 3.4 to Python
64222.6-3.3.")
6423 (license license:expat)))
6424
6425(define-public python2-singledispatch
6426 (package-with-python2 python-singledispatch))
6427
6428;; the python- version can be removed with python-3.5
6429(define-public python-backports-abc
6430 (package
6431 (name "python-backports-abc")
6432 (version "0.5")
6433 (source
6434 (origin
6435 (method url-fetch)
6436 (uri (pypi-uri "backports_abc" version))
6437 (sha256
6438 (base32
6439 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
6440 (build-system python-build-system)
6441 (home-page "https://github.com/cython/backports_abc")
6442 (synopsis "Backport of additions to the 'collections.abc' module")
6443 (description
6444 "Python-backports-abc provides a backport of additions to the
36a4366d 6445@code{collections.abc} module in Python-3.5.")
44d10b1f
RW
6446 (license license:psfl)))
6447
6448(define-public python2-backports-abc
6449 (package-with-python2 python-backports-abc))
6450
6451(define-public python-backports-csv
6452 (package
6453 (name "python-backports-csv")
6454 (version "1.0.5")
6455 (source
6456 (origin
6457 (method url-fetch)
6458 (uri (pypi-uri "backports.csv" version))
6459 (sha256
6460 (base32
6461 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
6462 (build-system python-build-system)
6463 (home-page "https://github.com/ryanhiebert/backports.csv")
6464 (synopsis "Backport of Python 3's csv module for Python 2")
6465 (description
6466 "Provides a backport of Python 3's @code{csv} module for parsing
6467comma separated values. The API of the @code{csv} module in Python 2
6468is drastically different from the @code{csv} module in Python 3.
6469This is due, for the most part, to the difference between str in
6470Python 2 and Python 3.")
6471 (license license:psfl)))
6472
6473(define-public python2-backports-csv
6474 (package-with-python2 python-backports-csv))
6475
6476(define-public python2-backports-shutil-get-terminal-size
6477 (package
6478 (name "python2-backports-shutil-get-terminal-size")
6479 (version "1.0.0")
6480 (source
6481 (origin
6482 (method url-fetch)
6483 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
6484 (sha256
6485 (base32
6486 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
6487 (build-system python-build-system)
6488 (arguments
6489 `(#:python ,python-2
6490 #:phases
6491 (modify-phases %standard-phases
6492 (replace 'check
6493 (lambda _
4a4a7d9a 6494 (invoke "py.test" "-v"))))))
44d10b1f
RW
6495 (native-inputs
6496 `(("python2-pytest" ,python2-pytest)))
6497 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
6498 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
6499 (description
6500 "This package provides a backport of the @code{get_terminal_size
6501function} from Python 3.3's @code{shutil}.
6502Unlike the original version it is written in pure Python rather than C,
6503so it might be a tiny bit slower.")
6504 (license license:expat)))
6505
6506(define-public python-waf
6507 (package
6508 (name "python-waf")
6509 (version "2.0.11")
6510 (source (origin
6511 (method url-fetch)
6512 (uri (string-append "https://waf.io/"
6513 "waf-" version ".tar.bz2"))
6514 (sha256
6515 (base32
6516 "13zrniwkmfqgsgzi9v5m1367fppp9yzrz6z2ny6hy8dmpb8mj4z4"))))
6517 (build-system python-build-system)
6518 (arguments
6519 '(#:phases
6520 (modify-phases %standard-phases
6521 (replace 'build
6522 (lambda _
6523 (invoke "python" "waf-light" "configure" "build")))
6524 (replace 'check
6525 (lambda _
6526 (invoke "python" "waf" "--version")))
6527 (replace 'install
6528 (lambda* (#:key outputs #:allow-other-keys)
6529 (let ((out (assoc-ref outputs "out")))
6530 (install-file "waf" (string-append out "/bin")))
6531 #t))
6532 ;; waf breaks when it is wrapped.
6533 (delete 'wrap))))
6534 (home-page "https://waf.io/")
6535 (synopsis "Python-based build system")
6536 (description
6537 "Waf is a Python-based framework for configuring, compiling and installing
6538applications.")
6539 (license license:bsd-3)))
6540
6541(define-public python2-waf
6542 (package-with-python2 python-waf))
6543
6544(define-public python-pyzmq
6545 (package
6546 (name "python-pyzmq")
6547 (version "17.1.2")
6548 (source
6549 (origin
6550 (method url-fetch)
6551 (uri (pypi-uri "pyzmq" version))
6552 (sha256
6553 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
6554 (build-system python-build-system)
6555 (arguments
6556 `(#:configure-flags
6557 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
6558 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
6559 ;; --inplace' for 'python setup.py test' to work.
6560 #:tests? #f))
6561 (inputs
6562 `(("zeromq" ,zeromq)))
6563 (native-inputs
6564 `(("pkg-config" ,pkg-config)
6565 ("python-nose" ,python-nose)))
6566 (home-page "https://github.com/zeromq/pyzmq")
6567 (synopsis "Python bindings for 0MQ")
6568 (description
6569 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
6570 (license license:bsd-4)))
6571
6572(define-public python2-pyzmq
6573 (package-with-python2 python-pyzmq))
6574
6575(define-public python-pep8
6576 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
6577 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
6578 ;; some dependents' test suites, and nothing more.
6579 (package
6580 (name "python-pep8")
6581 (version "1.7.0")
6582 (source
6583 (origin
6584 (method url-fetch)
6585 (uri (pypi-uri "pep8" version))
6586 (sha256
6587 (base32
2be878d8
CB
6588 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))
6589 (patches (search-patches "python-pep8-stdlib-tokenize-compat.patch"))))
44d10b1f
RW
6590 (build-system python-build-system)
6591 (home-page "https://pep8.readthedocs.org/")
6592 (synopsis "Python style guide checker")
6593 (description
6594 "This tools checks Python code against some of the style conventions in
6595PEP 8.")
6596 (license license:expat)))
6597
6598(define-public python2-pep8
6599 (package-with-python2 python-pep8))
6600
6601(define-public python-pyflakes
6602 (package
6603 (name "python-pyflakes")
d0cba11b 6604 (version "2.1.1")
44d10b1f
RW
6605 (source
6606 (origin
6607 (method url-fetch)
6608 (uri (pypi-uri "pyflakes" version))
6609 (sha256
6610 (base32
d0cba11b 6611 "18pq95a1xj2dgdd0m85gyfsn40jajj4xc3lp8wfv7igqhrc86xnr"))))
44d10b1f
RW
6612 (build-system python-build-system)
6613 (home-page
6614 "https://github.com/pyflakes/pyflakes")
6615 (synopsis "Passive checker of Python programs")
6616 (description
6617 "Pyflakes statically checks Python source code for common errors.")
6618 (license license:expat)))
6619
6620(define-public python2-pyflakes
6621 (package-with-python2 python-pyflakes))
6622
6623(define-public python-mccabe
6624 (package
6625 (name "python-mccabe")
6626 (version "0.6.1")
6627 (source
6628 (origin
6629 (method url-fetch)
6630 (uri (pypi-uri "mccabe" version))
6631 (sha256
6632 (base32
6633 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
6634 (build-system python-build-system)
6635 (native-inputs
6636 `(("python-pytest" ,python-pytest-bootstrap)
6637 ("python-pytest-runner" ,python-pytest-runner)))
6638 (home-page "https://github.com/flintwork/mccabe")
6639 (synopsis "McCabe checker, plugin for flake8")
6640 (description
6641 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
6642complexity of Python source code.")
6643 (license license:expat)))
6644
6645(define-public python2-mccabe
6646 (package-with-python2 python-mccabe))
6647
6648(define-public python-mccabe-0.2.1
6649 (package (inherit python-mccabe)
6650 (version "0.2.1")
6651 (source
6652 (origin
6653 (method url-fetch)
6654 (uri (pypi-uri "mccabe" version))
6655 (sha256
6656 (base32
6657 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
6658
6659(define-public python2-mccabe-0.2.1
6660 (package-with-python2 python-mccabe-0.2.1))
6661
6662;; Flake8 2.4.1 requires an older version of pep8.
6663;; This should be removed ASAP.
6664(define-public python-pep8-1.5.7
6665 (package (inherit python-pep8)
6666 (version "1.5.7")
6667 (source
f3576970
RW
6668 (origin
6669 (method url-fetch)
6670 (uri (pypi-uri "pep8" version))
6671 (sha256
6672 (base32
6673 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
44d10b1f
RW
6674 (arguments
6675 ;; XXX Tests not compatible with Python 3.5.
6676 '(#:tests? #f))))
6677
6678(define-public python2-pep8-1.5.7
6679 (package-with-python2 python-pep8-1.5.7))
6680
6681;; Flake8 2.4.1 requires an older version of pyflakes.
6682;; This should be removed ASAP.
6683(define-public python-pyflakes-0.8.1
6684 (package (inherit python-pyflakes)
6685 (version "0.8.1")
6686 (source
8c4dffb5
RW
6687 (origin
6688 (method url-fetch)
6689 (uri (pypi-uri "pyflakes" version))
6690 (sha256
6691 (base32
6692 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
44d10b1f
RW
6693 (arguments
6694 ;; XXX Tests not compatible with Python 3.5.
6695 '(#:tests? #f))))
6696
6697(define-public python2-pyflakes-0.8.1
6698 (package-with-python2 python-pyflakes-0.8.1))
6699
ac63cf0a 6700(define-public python-flake8
44d10b1f
RW
6701 (package
6702 (name "python-flake8")
beaff4a8 6703 (version "3.7.7")
ac63cf0a
MB
6704 (source (origin
6705 (method url-fetch)
6706 (uri (pypi-uri "flake8" version))
6707 (sha256
6708 (base32
beaff4a8 6709 "0qg6zggqigrd4k3gv88shd1a27d0cwgfql8vfiq2c7rl7w3rd6c5"))))
44d10b1f
RW
6710 (build-system python-build-system)
6711 (arguments
6712 `(#:phases
6713 (modify-phases %standard-phases
44d10b1f
RW
6714 (delete 'check)
6715 (add-after 'install 'check
6716 (lambda* (#:key inputs outputs #:allow-other-keys)
6717 (add-installed-pythonpath inputs outputs)
6718 (invoke "pytest" "-v")
6719 #t)))))
6720 (propagated-inputs
6721 `(("python-pycodestyle" ,python-pycodestyle)
beaff4a8 6722 ("python-entrypoints" ,python-entrypoints)
44d10b1f
RW
6723 ("python-pyflakes" ,python-pyflakes)
6724 ("python-mccabe" ,python-mccabe)))
6725 (native-inputs
6726 `(("python-mock" ,python-mock)
6727 ("python-pytest" ,python-pytest-bootstrap)
6728 ("python-pytest-runner" ,python-pytest-runner)))
6729 (home-page "https://gitlab.com/pycqa/flake8")
6730 (synopsis
6731 "The modular source code checker: pep8, pyflakes and co")
6732 (description
6733 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
ac63cf0a 6734 (properties `((python2-variant . ,(delay python2-flake8))))
44d10b1f
RW
6735 (license license:expat)))
6736
ac63cf0a
MB
6737(define-public python2-flake8
6738 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
44d10b1f
RW
6739 (package (inherit base)
6740 (propagated-inputs
6741 `(("python2-configparser" ,python2-configparser)
6742 ("python2-enum34" ,python2-enum34)
beaff4a8 6743 ("python2-typing" ,python2-typing)
44d10b1f
RW
6744 ,@(package-propagated-inputs base))))))
6745
44d10b1f
RW
6746;; python-hacking requires flake8 <2.6.0.
6747(define-public python-flake8-2.5
6748 (package
6749 (inherit python-flake8)
6750 (version "2.5.5")
6751 (source (origin
6752 (method url-fetch)
6753 (uri (pypi-uri "flake8" version))
6754 (sha256
6755 (base32
6756 "1snylqwbmrylbx3r1wpz8ggk98f6bcag4441ag8mm2l7wyn58sij"))))
6757 (propagated-inputs
6758 `(("python-pep8" ,python-pep8)
6759 ,@(package-propagated-inputs python-flake8)))
6760 (properties `((python2-variant . ,(delay python2-flake8-2.5))))))
6761
6762(define-public python2-flake8-2.5
6763 (package
6764 (inherit python2-flake8)
6765 (version (package-version python-flake8-2.5))
6766 (source (origin
6767 (inherit (package-source python-flake8-2.5))))
6768 (propagated-inputs
6769 `(("python2-pep8" ,python2-pep8)
6770 ,@(package-propagated-inputs python2-flake8)))))
6771
6772(define-public python-flake8-polyfill
6773 (package
6774 (name "python-flake8-polyfill")
6775 (version "1.0.2")
6776 (source
6777 (origin
6778 (method url-fetch)
6779 (uri (pypi-uri "flake8-polyfill" version))
6780 (sha256
6781 (base32
6782 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
6783 (build-system python-build-system)
6784 (arguments
6785 '(#:phases
6786 (modify-phases %standard-phases
6787 (replace 'check
6788 (lambda _
40a7153d
MB
6789 ;; Be compatible with Pytest 4:
6790 ;; https://gitlab.com/pycqa/flake8-polyfill/merge_requests/7
6791 (substitute* "setup.cfg"
6792 (("\\[pytest\\]")
6793 "[tool:pytest]"))
6794
44d10b1f
RW
6795 (setenv "PYTHONPATH"
6796 (string-append (getcwd) "/build/lib:"
6797 (getenv "PYTHONPATH")))
4f0a0894 6798 (invoke "py.test" "-v"))))))
44d10b1f
RW
6799 (native-inputs
6800 `(("python-flake8" ,python-flake8)
6801 ("python-mock" ,python-mock)
6802 ("python-pep8" ,python-pep8)
6803 ("python-pycodestyle" ,python-pycodestyle)
6804 ("python-pytest" ,python-pytest)))
6805 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
6806 (synopsis "Polyfill package for Flake8 plugins")
6807 (description
6808 "This package that provides some compatibility helpers for Flake8
6809plugins that intend to support Flake8 2.x and 3.x simultaneously.")
6810 (license license:expat)))
6811
6812(define-public python2-flake8-polyfill
6813 (package-with-python2 python-flake8-polyfill))
6814
6815(define-public python-mistune
6816 (package
6817 (name "python-mistune")
6818 (version "0.8.4")
6819 (source
6820 (origin
6821 (method url-fetch)
6822 (uri (pypi-uri "mistune" version))
6823 (sha256
6824 (base32
6825 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
6826 (build-system python-build-system)
6827 (native-inputs
6828 `(("python-nose" ,python-nose)
6829 ("python-cython" ,python-cython)))
6830 (home-page "https://github.com/lepture/mistune")
6831 (synopsis "Markdown parser in pure Python")
6832 (description "This package provides a fast markdown parser in pure
6833Python.")
6834 (license license:bsd-3)))
6835
6836(define-public python2-mistune
6837 (package-with-python2 python-mistune))
6838
6839(define-public python-markdown
6840 (package
6841 (name "python-markdown")
ceb1936a 6842 (version "3.1.1")
44d10b1f
RW
6843 (source
6844 (origin
6845 (method url-fetch)
6846 (uri (pypi-uri "Markdown" version))
6847 (sha256
6848 (base32
ceb1936a 6849 "0yhylk4ffqqs7x086fav4pnfsl1021v7lghznzkififprmmqfl1f"))))
44d10b1f
RW
6850 (build-system python-build-system)
6851 (native-inputs
6852 `(("python-nose" ,python-nose)
6853 ("python-pyyaml" ,python-pyyaml)))
6854 (home-page "https://python-markdown.github.io/")
6855 (synopsis "Python implementation of Markdown")
6856 (description
6857 "This package provides a Python implementation of John Gruber's
6858Markdown. The library features international input, various Markdown
6859extensions, and several HTML output formats. A command line wrapper
6860markdown_py is also provided to convert Markdown files to HTML.")
6861 (license license:bsd-3)))
6862
6863(define-public python2-markdown
6864 (package-with-python2 python-markdown))
6865
6866(define-public python-ptyprocess
6867 (package
6868 (name "python-ptyprocess")
6869 (version "0.5.2")
6870 (source
6871 (origin
6872 (method url-fetch)
6873 (uri (pypi-uri "ptyprocess" version))
6874 (sha256
6875 (base32
6876 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
6877 (build-system python-build-system)
6878 (native-inputs
6879 `(("python-nose" ,python-nose)))
6880 (arguments
6881 `(#:phases
6882 (modify-phases %standard-phases
6883 (replace 'check
7904d6fa 6884 (lambda _ (invoke "nosetests"))))))
44d10b1f
RW
6885 (home-page "https://github.com/pexpect/ptyprocess")
6886 (synopsis "Run a subprocess in a pseudo terminal")
6887 (description
6888 "This package provides a Python library used to launch a subprocess in a
6889pseudo terminal (pty), and interact with both the process and its pty.")
6890 (license license:isc)))
6891
6892(define-public python2-ptyprocess
6893 (package-with-python2 python-ptyprocess))
6894
6895(define-public python-cram
6896 (package
6897 (name "python-cram")
6898 (version "0.7")
6899 (home-page "https://bitheap.org/cram/")
6900 (source (origin
6901 (method url-fetch)
6902 (uri (list (string-append home-page "cram-"
6903 version ".tar.gz")
6904 (pypi-uri "cram" version)))
6905 (sha256
6906 (base32
6907 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
6908 (arguments
6909 '(#:phases
6910 (modify-phases %standard-phases
6911 (add-after 'unpack 'patch-source
6912 (lambda _
6913 (substitute* (find-files "cram" ".*\\.py$")
6914 ;; Replace default shell path.
6915 (("/bin/sh") (which "sh")))
6916 (substitute* (find-files "tests" ".*\\.t$")
6917 (("md5") "md5sum")
6918 (("/bin/bash") (which "bash"))
6919 (("/bin/sh") (which "sh")))
6920 (substitute* "cram/_test.py"
6921 ;; This hack works around a bug triggered by substituting
6922 ;; the /bin/sh paths. "tests/usage.t" compares the output of
6923 ;; "cram -h", which breaks the output at 80 characters. This
6924 ;; causes the line showing the default shell to break into two
6925 ;; lines, but the test expects a single line...
6926 (("env\\['COLUMNS'\\] = '80'")
6927 "env['COLUMNS'] = '160'"))
ff1e80d7
MB
6928
6929 (substitute* "Makefile"
6930 ;; Recent versions of python-coverage have caused the test
6931 ;; coverage to decrease (as of version 0.7). Allow that.
6932 (("--fail-under=100")
6933 "--fail-under=90"))
6934
44d10b1f 6935 #t))
ff1e80d7 6936 (replace 'check
44d10b1f 6937 ;; The test phase uses the built library and executable.
44d10b1f
RW
6938 (lambda* (#:key inputs outputs #:allow-other-keys)
6939 (add-installed-pythonpath inputs outputs)
6940 (setenv "PATH" (string-append (getenv "PATH") ":"
6941 (assoc-ref outputs "out") "/bin"))
2d7db192 6942 (invoke "make" "test"))))))
44d10b1f
RW
6943 (build-system python-build-system)
6944 (native-inputs
6945 `(("python-coverage" ,python-coverage)
6946 ("which" ,which)))
6947 (synopsis "Simple testing framework for command line applications")
6948 (description
6949 "Cram is a functional testing framework for command line applications.
6950Cram tests look like snippets of interactive shell sessions. Cram runs each
6951command and compares the command output in the test with the command’s actual
6952output.")
6953 (license license:gpl2+)))
6954
6955(define-public python2-cram
6956 (package-with-python2 python-cram))
6957
6958(define-public python-straight-plugin
6959 (package
6960 (name "python-straight-plugin")
6961 (version "1.4.1")
6962 (source
6963 (origin
6964 (method url-fetch)
6965 (uri (pypi-uri "straight.plugin" version))
6966 (sha256
6967 (base32
6968 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
6969 (build-system python-build-system)
6970 (home-page "https://github.com/ironfroggy/straight.plugin")
6971 (synopsis "Simple namespaced plugin facility")
6972 (description "Straight Plugin provides a type of plugin you can create from
6973almost any existing Python modules, and an easy way for outside developers to
6974add functionality and customization to your projects with their own plugins.")
6975 (license license:expat)))
6976
6977(define-public python2-straight-plugin
6978 (package-with-python2 python-straight-plugin))
6979
6980(define-public python-fonttools
6981 (package
6982 (name "python-fonttools")
1a4bb420 6983 (version "3.38.0")
44d10b1f
RW
6984 (source (origin
6985 (method url-fetch)
6986 (uri (pypi-uri "fonttools" version ".zip"))
6987 (sha256
6988 (base32
1a4bb420 6989 "12ripk3s7skgxr1bs9r8n13r94ym3s8iir7ivfixls9fa4dabmlh"))))
44d10b1f
RW
6990 (build-system python-build-system)
6991 (native-inputs
6992 `(("unzip" ,unzip)
6993 ("python-pytest" ,python-pytest)
6994 ("python-pytest-runner" ,python-pytest-runner)))
6995 (home-page "https://github.com/behdad/fonttools")
6996 (synopsis "Tools to manipulate font files")
6997 (description
6998 "FontTools/TTX is a library to manipulate font files from Python. It
6999supports reading and writing of TrueType/OpenType fonts, reading and writing
7000of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
7001also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
7002from an XML-based format.")
7003 (license license:expat)))
7004
7005(define-public python2-fonttools
7006 (package-with-python2 python-fonttools))
7007
7008(define-public python-ly
7009 (package
7010 (name "python-ly")
7011 (version "0.9.5")
7012 (source
7013 (origin
7014 (method url-fetch)
7015 (uri (pypi-uri name version))
7016 (sha256
7017 (base32
7018 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
7019 (build-system python-build-system)
7020 (arguments
7021 ;; FIXME: Some tests need network access.
7022 '(#:tests? #f))
7023 (synopsis "Tool and library for manipulating LilyPond files")
7024 (description "This package provides a Python library to parse, manipulate
7025or create documents in LilyPond format. A command line program ly is also
7026provided that can be used to do various manipulations with LilyPond files.")
7027 (home-page "https://pypi.python.org/pypi/python-ly")
7028 (license license:gpl2+)))
7029
7030(define-public python-appdirs
7031 (package
7032 (name "python-appdirs")
7033 (version "1.4.3")
7034 (source
7035 (origin
7036 (method url-fetch)
7037 (uri (pypi-uri "appdirs" version))
7038 (sha256
7039 (base32
7040 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
7041 (build-system python-build-system)
7042 (home-page "https://github.com/ActiveState/appdirs")
7043 (synopsis
7044 "Determine platform-specific dirs, e.g. a \"user data dir\"")
7045 (description
7046 "This module provides a portable way of finding out where user data
7047should be stored on various operating systems.")
7048 (license license:expat)))
7049
7050(define-public python2-appdirs
7051 (package-with-python2 python-appdirs))
7052
7053(define-public python-llfuse
7054 (package
7055 (name "python-llfuse")
7056 (version "1.3.5")
7057 (source (origin
7058 (method url-fetch)
7059 (uri (pypi-uri "llfuse" version ".tar.bz2"))
7060 (sha256
7061 (base32
7062 "1n7a90jww3ly49fm7x27m3xw3la3qfrnykcakga654g6kcyjlhbf"))))
7063 (build-system python-build-system)
7064 (inputs
7065 `(("fuse" ,fuse)
7066 ("attr" ,attr)))
7067 (native-inputs
7068 `(("pkg-config" ,pkg-config)))
7069 (synopsis "Python bindings for FUSE")
7070 (description
7071 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
7072 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
7073 (license license:lgpl2.0+)
7074 (properties `((python2-variant . ,(delay python2-llfuse))))))
7075
7076(define-public python2-llfuse
7077 (package (inherit (package-with-python2
7078 (strip-python2-variant python-llfuse)))
7079 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
7080
7081;; For attic-0.16
7082(define-public python-llfuse-0.41
7083 (package (inherit python-llfuse)
7084 (version "0.41.1")
7085 (source (origin
7086 (method url-fetch)
7087 (uri (string-append
7088 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
7089 "llfuse-" version ".tar.bz2"))
7090 (sha256
7091 (base32
7092 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
7093 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
7094 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
7095 (license (list license:expat license:lgpl2.0+))))
7096
7097(define-public python-msgpack
7098 (package
7099 (name "python-msgpack")
7100 (version "0.5.6")
7101 (source (origin
7102 (method url-fetch)
7103 (uri (pypi-uri "msgpack" version))
7104 (sha256
7105 (base32
7106 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
7107 (build-system python-build-system)
7108 (arguments
7109 `(#:modules ((guix build utils)
7110 (guix build python-build-system)
7111 (ice-9 ftw)
7112 (srfi srfi-1)
7113 (srfi srfi-26))
7114 #:phases
7115 (modify-phases %standard-phases
7116 (replace 'check
7117 (lambda _
7118 (let ((cwd (getcwd)))
7119 (setenv "PYTHONPATH"
7120 (string-append cwd "/build/"
7121 (find (cut string-prefix? "lib" <>)
7122 (scandir (string-append cwd "/build")))
7123 ":"
7124 (getenv "PYTHONPATH")))
7125 (invoke "pytest" "-v" "test")))))))
7126 (native-inputs
7127 `(("python-pytest" ,python-pytest)))
7128 (synopsis "MessagePack (de)serializer")
7129 (description "MessagePack is a fast, compact binary serialization format,
7130suitable for similar data to JSON. This package provides CPython bindings for
7131reading and writing MessagePack data.")
7132 (home-page "https://pypi.python.org/pypi/msgpack/")
7133 (license license:asl2.0)))
7134
7135;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
7136;; release 0.5. Some packages like borg still call it by the old name for now.
7137;; <https://bugs.gnu.org/30662>
7138(define-public python-msgpack-transitional
7139 (package
7140 (inherit python-msgpack)
7141 (name "python-msgpack-transitional")
7142 (arguments
7143 (substitute-keyword-arguments (package-arguments python-msgpack)
7144 ((#:phases phases)
7145 `(modify-phases ,phases
7146 (add-after 'unpack 'configure-transitional
7147 (lambda _
7148 ;; Keep using the old name.
7149 (substitute* "setup.py"
7150 (("TRANSITIONAL = False")
7151 "TRANSITIONAL = 1"))
7152 #t))))))))
7153
7154(define-public python2-msgpack
7155 (package-with-python2 python-msgpack))
7156
7157(define-public python-netaddr
7158 (package
7159 (name "python-netaddr")
7160 (version "0.7.19")
7161 (source
7162 (origin
7163 (method url-fetch)
7164 (uri (pypi-uri "netaddr" version))
7165 (sha256
7166 (base32
7167 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
7168 (build-system python-build-system)
7169 (arguments `(#:tests? #f)) ;; No tests.
7170 (home-page "https://github.com/drkjam/netaddr/")
7171 (synopsis "Pythonic manipulation of network addresses")
7172 (description
7173 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
7174and MAC network addresses.")
7175 (license license:bsd-3)))
7176
7177(define-public python2-netaddr
7178 (package-with-python2 python-netaddr))
7179
dd85eca0
AG
7180(define-public python2-pyroute2
7181 (package
7182 (name "python2-pyroute2")
7183 (version "0.5.6")
7184 (source
7185 (origin
7186 (method url-fetch)
7187 (uri (pypi-uri "pyroute2" version))
7188 (sha256
7189 (base32
7190 "1gmz4r1w0yzj6fjjypnalmfyy0lnfznydyn62gi3wk50j5hhxbny"))))
7191 (build-system python-build-system)
7192 (arguments
7193 `(#:python ,python-2)) ;Python 3.x is not supported
7194 (home-page "https://github.com/svinota/pyroute2")
7195 (synopsis "Python netlink library")
7196 (description
7197 "Pyroute2 is a pure Python netlink library with minimal dependencies.
7198Supported netlink families and protocols include:
7199@itemize
7200@item rtnl, network settings - addresses, routes, traffic controls
7201@item nfnetlink - netfilter API: ipset, nftables, ...
7202@item ipq - simplest userspace packet filtering, iptables QUEUE target
7203@item devlink - manage and monitor devlink-enabled hardware
7204@item generic - generic netlink families
7205 @itemize
7206 @item nl80211 - wireless functions API (basic support)
7207 @item taskstats - extended process statistics
7208 @item acpi_events - ACPI events monitoring
7209 @item thermal_events - thermal events monitoring
7210 @item VFS_DQUOT - disk quota events monitoring
7211 @end itemize
7212@end itemize")
7213 (license license:gpl2+)))
7214
44d10b1f
RW
7215(define-public python-wrapt
7216 (package
7217 (name "python-wrapt")
2271a1dc 7218 (version "1.11.2")
44d10b1f 7219 (source
2271a1dc
MB
7220 (origin
7221 (method url-fetch)
7222 (uri (pypi-uri "wrapt" version))
7223 (sha256
7224 (base32
7225 "1q81762dgsgrd12f8qc39zk8s5wll3m5xc32jdmlf6cls4gh4njn"))))
44d10b1f
RW
7226 (build-system python-build-system)
7227 (arguments
7228 ;; Tests are not included in the tarball, they are only available in the
7229 ;; git repository.
7230 `(#:tests? #f))
7231 (home-page "https://github.com/GrahamDumpleton/wrapt")
7232 (synopsis "Module for decorators, wrappers and monkey patching")
7233 (description
2271a1dc 7234 "The aim of the wrapt module is to provide a transparent object proxy for
44d10b1f
RW
7235 Python, which can be used as the basis for the construction of function
7236 wrappers and decorator functions.")
7237 (license license:bsd-2)))
7238
7239(define-public python2-wrapt
7240 (package-with-python2 python-wrapt))
7241
7242(define-public python-xlrd
7243 (package
7244 (name "python-xlrd")
7245 (version "1.0.0")
7246 (source (origin
7247 (method url-fetch)
7248 (uri (pypi-uri "xlrd" version))
7249 (sha256
7250 (base32
7251 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
7252 (build-system python-build-system)
7253 (arguments
7254 `(#:phases
7255 (modify-phases %standard-phases
7256 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
7257 ;; run tests instead for now.
45fd0081 7258 (replace 'check (lambda _ (invoke "nosetests"))))))
44d10b1f
RW
7259 (native-inputs `(("python-nose" ,python-nose)))
7260 (home-page "http://www.python-excel.org/")
7261 (synopsis "Library for extracting data from Excel files")
a0909286 7262 (description "This package provides a library to extract data from
44d10b1f
RW
7263spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
7264@samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
7265Unicode-aware. It is not intended as an end-user tool.")
7266 (license license:bsd-3)))
7267
7268(define-public python2-xlrd
7269 (package-with-python2 python-xlrd))
7270
7271(define-public python-prettytable
7272 (package
7273 (name "python-prettytable")
7274 (version "0.7.2")
7275 (source
7276 (origin
7277 (method url-fetch)
337c3a1e 7278 (uri (pypi-uri "prettytable" version ".tar.bz2"))
44d10b1f
RW
7279 (sha256
7280 (base32
7281 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
7282 (build-system python-build-system)
7283 (home-page "http://code.google.com/p/prettytable/")
7284 (synopsis "Display tabular data in an ASCII table format")
7285 (description
7286 "A library designed to represent tabular data in visually appealing ASCII
7287tables. PrettyTable allows for selection of which columns are to be printed,
7288independent alignment of columns (left or right justified or centred) and
7289printing of sub-tables by specifying a row range.")
7290 (license license:bsd-3)))
7291
7292(define-public python2-prettytable
7293 (package-with-python2 python-prettytable))
7294
7295(define-public python-tables
7296 (package
7297 (name "python-tables")
7298 (version "3.4.4")
7299 (source
7300 (origin
7301 (method url-fetch)
7302 (uri (pypi-uri "tables" version))
7303 (sha256
7304 (base32
7305 "0affz7k8babh8wdmsgrz5jxrd569by2w8ffimcxs9wiaf5rw1idx"))
7306 (modules '((guix build utils)))
7307 (snippet
7308 '(begin
7309 ;; Remove pre-compiled .pyc files from source.
7310 (for-each delete-file-recursively
7311 (find-files "." "__pycache__" #:directories? #t))
7312 (for-each delete-file (find-files "." "\\.pyc$"))
7313 #t))))
7314 (build-system python-build-system)
7315 (arguments
7316 `(;; FIXME: python-build-system does not pass configure-flags to "build"
7317 ;; or "check", so we must override the build and check phases.
7318 #:phases
7319 (modify-phases %standard-phases
7320 (add-after 'unpack 'use-gcc
7321 (lambda _
7322 (substitute* "setup.py"
7323 (("compiler = new_compiler\\(\\)" line)
7324 (string-append line
7325 "\ncompiler.set_executables(compiler='gcc',"
7326 "compiler_so='gcc',"
7327 "linker_exe='gcc',"
7328 "linker_so='gcc -shared')")))
7329 #t))
7330 (replace 'build
7331 (lambda* (#:key inputs #:allow-other-keys)
35d79d61
RW
7332 (invoke "python" "setup.py" "build"
7333 (string-append "--hdf5="
7334 (assoc-ref inputs "hdf5")))))
44d10b1f
RW
7335 (replace 'check
7336 (lambda* (#:key inputs #:allow-other-keys)
35d79d61
RW
7337 (invoke "python" "setup.py" "check"
7338 (string-append "--hdf5="
7339 (assoc-ref inputs "hdf5"))))))))
44d10b1f
RW
7340 (propagated-inputs
7341 `(("python-numexpr" ,python-numexpr)
7342 ("python-numpy" ,python-numpy)))
7343 (native-inputs
7344 `(("python-cython" ,python-cython)
7345 ("pkg-config" ,pkg-config)))
7346 (inputs
7347 `(("hdf5" ,hdf5)
7348 ("bzip2" ,bzip2)
7349 ("zlib" ,zlib)))
7350 (home-page "http://www.pytables.org/")
7351 (synopsis "Hierarchical datasets for Python")
7352 (description "PyTables is a package for managing hierarchical datasets and
7353designed to efficiently cope with extremely large amounts of data.")
7354 (license license:bsd-3)))
7355
7356(define-public python2-tables
7357 (package-with-python2 python-tables))
7358
7359(define-public python-pyasn1
7360 (package
7361 (name "python-pyasn1")
7362 (version "0.4.3")
7363 (source
7364 (origin
7365 (method url-fetch)
7366 (uri (pypi-uri "pyasn1" version))
7367 (sha256
7368 (base32
7369 "1z5h38anjzzrxpraa9iq9llffyx2zs8gx0q6dc1g029miwnn50gv"))))
7370 (build-system python-build-system)
7371 (home-page "http://pyasn1.sourceforge.net/")
7372 (synopsis "ASN.1 types and codecs")
7373 (description
7374 "This is an implementation of ASN.1 types and codecs in Python. It is
7375suitable for a wide range of protocols based on the ASN.1 specification.")
7376 (license license:bsd-2)))
7377
7378(define-public python2-pyasn1
7379 (package-with-python2 python-pyasn1))
7380
7381(define-public python-pyasn1-modules
7382 (package
7383 (name "python-pyasn1-modules")
7384 (version "0.2.2")
7385 (source
7386 (origin
7387 (method url-fetch)
7388 (uri (pypi-uri "pyasn1-modules" version))
7389 (sha256
7390 (base32
7391 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
7392 (build-system python-build-system)
7393 (propagated-inputs
7394 `(("python-pyasn1" ,python-pyasn1)))
7395 (home-page "https://sourceforge.net/projects/pyasn1/")
7396 (synopsis "ASN.1 codec implementations")
7397 (description
7398 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
7399implementations of ASN.1-based codecs and protocols.")
7400 (license license:bsd-3)))
7401
7402(define-public python2-pyasn1-modules
7403 (package-with-python2 python-pyasn1-modules))
7404
7405(define-public python-ipaddress
7406 (package
7407 (name "python-ipaddress")
7408 (version "1.0.22")
7409 (source (origin
7410 (method url-fetch)
7411 (uri (pypi-uri "ipaddress" version))
7412 (sha256
7413 (base32
7414 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
7415 (build-system python-build-system)
7416 (home-page "https://github.com/phihag/ipaddress")
7417 (synopsis "IP address manipulation library")
7418 (description
7419 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
7420 in Python. This library is used to create, poke at, and manipulate IPv4 and
7421 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
7422 module to older versions of Python.")
7423 (license license:psfl)))
7424
7425(define-public python2-ipaddress
7426 (package-with-python2 python-ipaddress))
7427
7428(define-public python2-ipaddr
7429 (package
7430 (name "python2-ipaddr")
7431 (version "2.1.11")
7432 (source
7433 (origin
7434 (method url-fetch)
7435 (uri (pypi-uri "ipaddr" version))
7436 (sha256
7437 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
7438 (build-system python-build-system)
7439 (arguments
7440 `(#:python ,python-2 ;version 2 only
7441 #:phases
7442 (modify-phases %standard-phases
7443 (replace 'check
40b8c4e3 7444 (lambda _ (invoke "python" "ipaddr_test.py"))))))
44d10b1f
RW
7445 (home-page "https://github.com/google/ipaddr-py")
7446 (synopsis "IP address manipulation library")
7447 (description
7448 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
7449IPv6 addresses and networks.
7450
7451For new implementations you may prefer to use the standard module
7452@code{ipaddress}, which was introduced in Python 3.3 and backported to older
7453versions of Python.")
7454 (license license:asl2.0)))
7455
7456(define-public python-idna
7457 (package
7458 (name "python-idna")
e95c9837 7459 (version "2.8")
44d10b1f
RW
7460 (source
7461 (origin
7462 (method url-fetch)
7463 (uri (pypi-uri "idna" version))
7464 (sha256
7465 (base32
e95c9837 7466 "01rlkigdxg17sf9yar1jl8n18ls59367wqh59hnawlyg53vb6my3"))))
44d10b1f
RW
7467 (build-system python-build-system)
7468 (home-page "https://github.com/kjd/idna")
7469 (synopsis "Internationalized domain names in applications")
7470 (description
7471 "This is a library to support the Internationalised Domain Names in
7472Applications (IDNA) protocol as specified in RFC 5891. This version of the
7473protocol is often referred to as “IDNA2008” and can produce different results
7474from the earlier standard from 2003. The library is also intended to act as a
7475suitable drop-in replacement for the “encodings.idna” module that comes with
7476the Python standard library but currently only supports the older 2003
7477specification.")
7478 (license license:bsd-4)))
7479
a76e6a69
JM
7480(define-public python-idna-2.7
7481 (package (inherit python-idna)
7482 (version "2.7")
7483 (source (origin
7484 (method url-fetch)
7485 (uri (pypi-uri "idna" version))
7486 (sha256
7487 (base32
7488 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))))
7489
7490
44d10b1f
RW
7491(define-public python2-idna
7492 (package-with-python2 python-idna))
7493
7494(define-public python-idna-ssl
7495 (package
7496 (name "python-idna-ssl")
7497 (version "1.0.1")
7498 (source
7499 (origin
7500 (method url-fetch)
7501 (uri (pypi-uri "idna-ssl" version))
7502 (sha256
7503 (base32
7504 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
7505 (build-system python-build-system)
7506 (arguments
7507 `(#:tests? #f)) ;circular dependency with python-aiohttp
7508 (home-page "https://github.com/aio-libs/idna-ssl")
7509 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
7510 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
7511domains support.")
7512 (license license:expat)))
7513
7514(define-public python-pretend
7515 (package
7516 (name "python-pretend")
7517 (version "1.0.9")
7518 (source
7519 (origin
7520 (method url-fetch)
9f1f22ee 7521 (uri (pypi-uri "pretend" version))
44d10b1f
RW
7522 (sha256
7523 (base32
7524 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
7525 (build-system python-build-system)
7526 (home-page "https://github.com/alex/pretend")
7527 (synopsis "Library for stubbing in Python")
7528 (description
7529 "Pretend is a library to make stubbing with Python easier. Stubbing is a
7530technique for writing tests. You may hear the term mixed up with mocks,
7531fakes, or doubles. Basically, a stub is an object that returns pre-canned
7532responses, rather than doing any computation.")
7533 (license license:bsd-3)))
7534
7535(define-public python2-pretend
7536 (package-with-python2 python-pretend))
7537
7538(define-public python-pip
7539 (package
7540 (name "python-pip")
523ba4b1 7541 (version "19.2.1")
44d10b1f
RW
7542 (source
7543 (origin
7544 (method url-fetch)
7545 (uri (pypi-uri "pip" version))
7546 (sha256
7547 (base32
523ba4b1 7548 "100sd12ss4mbdj5lf3wawad29cm573b27765mq098x6xhcj71395"))))
44d10b1f
RW
7549 (build-system python-build-system)
7550 (arguments
7551 '(#:tests? #f)) ; there are no tests in the pypi archive.
7552 (home-page "https://pip.pypa.io/")
7553 (synopsis "Package manager for Python software")
7554 (description
7555 "Pip is a package manager for Python software, that finds packages on the
7556Python Package Index (PyPI).")
7557 (license license:expat)))
7558
7559(define-public python2-pip
7560 (package-with-python2 python-pip))
7561
7562(define-public python-tlsh
7563 (package
7564 (name "python-tlsh")
7565 (version "3.4.5")
7566 (home-page "https://github.com/trendmicro/tlsh")
3e3ff8ad
TGR
7567 (source
7568 (origin
7569 (method git-fetch)
7570 (uri (git-reference
7571 (url "https://github.com/trendmicro/tlsh.git")
7572 (commit (string-append "v" version))))
7573 (file-name (git-file-name name version))
7574 (sha256
7575 (base32 "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll"))))
44d10b1f
RW
7576 (build-system cmake-build-system)
7577 (arguments
7578 '(#:out-of-source? #f
7579 #:phases (modify-phases %standard-phases
7580 (replace
7581 'install
7582 (lambda* (#:key outputs #:allow-other-keys)
7583 ;; Build and install the Python bindings. The underlying
7584 ;; C++ library is apparently not meant to be installed.
7585 (let ((out (assoc-ref outputs "out")))
7586 (with-directory-excursion "py_ext"
7587 (and (system* "python" "setup.py" "build")
7588 (system* "python" "setup.py" "install"
7589 (string-append "--prefix=" out))))))))))
7590 (inputs `(("python" ,python-wrapper))) ;for the bindings
7591 (synopsis "Fuzzy matching library for Python")
7592 (description
7593 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
7594Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
7595value which can be used for similarity comparisons. Similar objects have
7596similar hash values, which allows for the detection of similar objects by
7597comparing their hash values. The byte stream should have a sufficient amount
7598of complexity; for example, a byte stream of identical bytes will not generate
7599a hash value.")
7600 (license license:asl2.0)))
7601
7602(define-public python2-tlsh
7603 (package
7604 (inherit python-tlsh)
7605 (name "python2-tlsh")
7606 (inputs `(("python" ,python-2)))))
7607
7608(define-public python-termcolor
7609 (package
7610 (name "python-termcolor")
7611 (version "1.1.0")
7612 (source
7613 (origin
7614 (method url-fetch)
7615 (uri (pypi-uri "termcolor" version))
7616 (sha256
7617 (base32
7618 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
7619 (build-system python-build-system)
7620 (arguments
7621 ;; There are no tests.
7622 `(#:tests? #f))
7623 (home-page "https://pypi.python.org/pypi/termcolor")
7624 (synopsis "ANSII Color formatting for terminal output")
7625 (description
7626 "This package provides ANSII Color formatting for output in terminals.")
7627 (license license:expat)))
7628
7629(define-public python2-termcolor
7630 (package-with-python2 python-termcolor))
7631
7632(define-public python-libarchive-c
7633 (package
7634 (name "python-libarchive-c")
7635 (version "2.8")
7636 (source (origin
7637 (method url-fetch)
7638 (uri (pypi-uri "libarchive-c" version))
7639 (sha256
7640 (base32
7641 "0qg0v1s9c1xdk9philhnv8k6c6nicvnvfwlc0j9srg90jmdlvm06"))))
7642 (build-system python-build-system)
7643 (arguments
7644 '(#:phases (modify-phases %standard-phases
7645 (add-before
7646 'build 'reference-libarchive
7647 (lambda* (#:key inputs #:allow-other-keys)
7648 ;; Retain the absolute file name of libarchive.so.
7649 (let ((libarchive (assoc-ref inputs "libarchive")))
7650 (substitute* "libarchive/ffi.py"
7651 (("find_library\\('archive'\\)")
7652 (string-append "'" libarchive
7653 "/lib/libarchive.so'"))))))
7654 (replace 'check
7655 (lambda _ (invoke "pytest" "-vv"))))))
7656 (native-inputs
7657 `(("python-mock" ,python-mock)
7658 ("python-pytest" ,python-pytest)))
7659 (inputs
7660 `(("libarchive" ,libarchive)))
7661 (home-page "https://github.com/Changaco/python-libarchive-c")
7662 (synopsis "Python interface to libarchive")
7663 (description
7664 "This package provides Python bindings to libarchive, a C library to
7665access possibly compressed archives in many different formats. It uses
7666Python's @code{ctypes} foreign function interface (FFI).")
7667 (license license:lgpl2.0+)))
7668
7669(define-public python2-libarchive-c
7670 (package-with-python2 python-libarchive-c))
7671
7672(define-public python-file
7673 (package
7674 (inherit file)
7675 (name "python-file")
7676 (build-system python-build-system)
7677 (arguments
7678 '(#:tests? #f ;no tests
7679 #:configure-flags '("--single-version-externally-managed" "--root=/")
7680 #:phases (modify-phases %standard-phases
7681 (add-before 'build 'change-directory
7682 (lambda _
7683 (chdir "python")
7684 #t))
7685 (add-before 'build 'set-library-file-name
7686 (lambda* (#:key inputs #:allow-other-keys)
7687 (let ((file (assoc-ref inputs "file")))
7688 (substitute* "magic.py"
7689 (("find_library\\('magic'\\)")
7690 (string-append "'" file "/lib/libmagic.so'")))
7691 #t))))))
7692 (inputs `(("file" ,file)))
528ea990
LC
7693 (native-inputs (if (%current-target-system)
7694 `(("self" ,this-package))
7695 '()))
44d10b1f
RW
7696 (synopsis "Python bindings to the libmagic file type guesser. Note that
7697this module and the python-magic module both provide a \"magic.py\" file;
7698these two modules, which are different and were developed separately, both
7699serve the same purpose: provide Python bindings for libmagic.")))
7700
7701(define-public python2-file
7702 (package-with-python2 python-file))
7703
7704(define-public python-debian
7705 (package
7706 (name "python-debian")
7707 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
9f74bd31 7708 (version "0.1.36")
44d10b1f
RW
7709 (source
7710 (origin
9f74bd31
VC
7711 ;; Use git-fetch, as pypi doesn't include test suite.
7712 (method git-fetch)
7713 (uri (git-reference
7714 (url home-page)
7715 (commit version)))
7716 (file-name (git-file-name name version))
44d10b1f
RW
7717 (sha256
7718 (base32
9f74bd31 7719 "0qy6x28bj6yfikhjww932v5xq4mf5bm1iczl7acy4c7zm6mwhqfa"))))
44d10b1f 7720 (build-system python-build-system)
9f74bd31
VC
7721 (arguments
7722 `(#:phases (modify-phases %standard-phases
7723 (add-after 'unpack 'remove-debian-specific-tests
7724 ;; python-apt, apt and dpkg are not yet available in guix,
7725 ;; and these tests heavily depend on them.
7726 (lambda _
7727 (delete-file "lib/debian/tests/test_deb822.py")
7728 (delete-file "lib/debian/tests/test_debfile.py")
7729 #t)))))
44d10b1f 7730 (propagated-inputs
9f74bd31
VC
7731 `(("python-six" ,python-six)
7732 ("python-chardet" ,python-chardet)))
44d10b1f
RW
7733 (synopsis "Debian package related modules")
7734 (description
7735 ;; XXX: Use @enumerate instead of @itemize to work around
7736 ;; <http://bugs.gnu.org/21772>.
7737 "This package provides Python modules that abstract many formats of
7738Debian-related files, such as:
7739
7740@enumerate
7741@item Debtags information;
7742@item @file{debian/changelog} files;
7743@item packages files, pdiffs;
7744@item control files of single or multiple RFC822-style paragraphs---e.g.
7745 @file{debian/control}, @file{.changes}, @file{.dsc};
7746@item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
7747 contained files and meta-information.
7748@end enumerate\n")
7749
7750 ;; Modules are either GPLv2+ or GPLv3+.
7751 (license license:gpl3+)))
7752
7753(define-public python2-debian
7754 (package-with-python2 python-debian))
7755
7756(define-public python-nbformat
7757 (package
7758 (name "python-nbformat")
7759 (version "4.4.0")
7760 (source
7761 (origin
7762 (method url-fetch)
7763 (uri (pypi-uri "nbformat" version))
7764 (sha256
7765 (base32
7766 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
7767 (build-system python-build-system)
7768 (arguments `(#:tests? #f)) ; no test target
7769 (propagated-inputs
7770 `(("python-ipython-genutils" ,python-ipython-genutils)
7771 ("python-jsonschema" ,python-jsonschema)
7772 ("python-jupyter-core" ,python-jupyter-core)
7773 ("python-traitlets" ,python-traitlets)))
7774 (home-page "http://jupyter.org")
7775 (synopsis "Jupyter Notebook format")
7776 (description "This package provides the reference implementation of the
7777Jupyter Notebook format and Python APIs for working with notebooks.")
7778 (license license:bsd-3)))
7779
7780(define-public python2-nbformat
7781 (package-with-python2 python-nbformat))
7782
7783(define-public python-bleach
7784 (package
7785 (name "python-bleach")
ff0efc8f 7786 (version "3.1.0")
44d10b1f
RW
7787 (source
7788 (origin
7789 (method url-fetch)
7790 (uri (pypi-uri "bleach" version))
7791 (sha256
7792 (base32
ff0efc8f 7793 "1yhrgrhkln8bd6gn3imj69g1h4xqah9gaz9q26crqr6gmmvpzprz"))))
44d10b1f
RW
7794 (build-system python-build-system)
7795 (propagated-inputs
ff0efc8f 7796 `(("python-webencodings" ,python-webencodings)
44d10b1f
RW
7797 ("python-six" ,python-six)))
7798 (native-inputs
ff0efc8f
MB
7799 `(("python-pytest" ,python-pytest)
7800 ("python-pytest-runner" ,python-pytest-runner-2)))
44d10b1f
RW
7801 (home-page "https://github.com/jsocol/bleach")
7802 (synopsis "Whitelist-based HTML-sanitizing tool")
7803 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
7804 (license license:asl2.0)))
7805
7806(define-public python2-bleach
7807 (package-with-python2 python-bleach))
7808
7809(define-public python-entrypoints
7810 (package
7811 (name "python-entrypoints")
a7f1b718 7812 (version "0.3")
44d10b1f
RW
7813 (source
7814 (origin
7815 (method url-fetch)
a7f1b718 7816 (uri (pypi-uri "entrypoints" version))
44d10b1f
RW
7817 (sha256
7818 (base32
a7f1b718 7819 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
44d10b1f
RW
7820 (build-system python-build-system)
7821 ;; The package does not come with a setup.py file, so we have to generate
7822 ;; one ourselves.
7823 (arguments
7824 `(#:tests? #f
7825 #:phases
7826 (modify-phases %standard-phases
7827 (add-after 'unpack 'create-setup.py
7828 (lambda _
7829 (call-with-output-file "setup.py"
7830 (lambda (port)
7831 (format port "\
7832from setuptools import setup
7833setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
7834" ,version))))))))
7835 (home-page "https://github.com/takluyver/entrypoints")
7836 (synopsis "Discover and load entry points from installed Python packages")
7837 (description "Entry points are a way for Python packages to advertise
7838objects with some common interface. The most common examples are
7839@code{console_scripts} entry points, which define shell commands by
7840identifying a Python function to run. The @code{entrypoints} module contains
7841functions to find and load entry points.")
7842 (license license:expat)))
7843
7844(define-public python2-entrypoints
7845 (package-with-python2 python-entrypoints))
7846
7847(define-public python-nbconvert
7848 (package
7849 (name "python-nbconvert")
7850 (version "5.0.0b1")
7851 (source
7852 (origin
7853 (method url-fetch)
7854 (uri (pypi-uri "nbconvert" version))
7855 (sha256
7856 (base32
7857 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
7858 (build-system python-build-system)
7859 (arguments
7860 `(;; The "bdist_egg" target is disabled by default, causing the installation
7861 ;; to fail.
7862 #:configure-flags (list "bdist_egg")
7863 ;; FIXME: 5 failures, 40 errors.
7864 #:tests? #f))
7865 ;; #:phases
7866 ;; (modify-phases %standard-phases
7867 ;; (replace 'check
7868 ;; (lambda _
7869 ;; (zero? (system* "py.test" "-v")))))
7870 (native-inputs
7871 `(("python-pytest" ,python-pytest)))
7872 (propagated-inputs
7873 `(("python-bleach" ,python-bleach)
7874 ("python-entrypoints" ,python-entrypoints)
7875 ("python-jinja2" ,python-jinja2)
7876 ("python-jupyter-core" ,python-jupyter-core)
7877 ("python-mistune" ,python-mistune)
7878 ("python-nbformat" ,python-nbformat)
7879 ("python-pygments" ,python-pygments)
7880 ("python-traitlets" ,python-traitlets)))
7881 (home-page "http://jupyter.org")
7882 (synopsis "Converting Jupyter Notebooks")
7883 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
7884notebooks to various other formats via Jinja templates. It allows you to
7885convert an @code{.ipynb} notebook file into various static formats including:
7886
7887@enumerate
7888@item HTML
7889@item LaTeX
7890@item PDF
7891@item Reveal JS
7892@item Markdown (md)
7893@item ReStructured Text (rst)
7894@item executable script
7895@end enumerate\n")
7896 (license license:bsd-3)))
7897
7898(define-public python2-nbconvert
7899 (package-with-python2 python-nbconvert))
7900
44d10b1f
RW
7901(define-public python-notebook
7902 (package
7903 (name "python-notebook")
7904 (version "5.7.4")
7905 (source (origin
7906 (method url-fetch)
7907 (uri (pypi-uri "notebook" version))
7908 (sha256
7909 (base32
7910 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
7911 (build-system python-build-system)
7912 (arguments
7913 `(#:phases
7914 (modify-phases %standard-phases
7915 (replace 'check
7916 (lambda _
7917 ;; These tests require a browser
7918 (delete-file-recursively "notebook/tests/selenium")
7919 ;; Some tests need HOME
7920 (setenv "HOME" "/tmp")
7921 ;; This file contains "warningfilters", which are not supported
7922 ;; by this version of nose.
7923 (delete-file "setup.cfg")
7924 (with-directory-excursion "/tmp"
7925 (invoke "nosetests" "-v"))
7926 #t)))))
7927 (propagated-inputs
7928 `(("python-jupyter-core" ,python-jupyter-core)
7929 ("python-nbformat" ,python-nbformat)
7930 ("python-nbconvert" ,python-nbconvert)
7931 ("python-prometheus-client" ,python-prometheus-client)
7932 ("python-send2trash" ,python-send2trash)
7933 ("python-terminado" ,python-terminado)))
7934 (native-inputs
7935 `(("python-nose" ,python-nose)
7936 ("python-sphinx" ,python-sphinx)
7937 ("python-requests" ,python-requests)))
7938 (home-page "http://jupyter.org/")
7939 (synopsis "Web-based notebook environment for interactive computing")
7940 (description
7941 "The Jupyter HTML notebook is a web-based notebook environment for
7942interactive computing.")
7943 (properties `((python2-variant . ,(delay python2-notebook))))
7944 (license license:bsd-3)))
7945
7946(define-public python2-notebook
7947 (let ((base (package-with-python2
7948 (strip-python2-variant python-notebook))))
7949 (package (inherit base)
7950 (native-inputs
7951 `(("python2-mock" ,python2-mock)
7952 ,@(package-native-inputs base)))
7953 (arguments
7954 (substitute-keyword-arguments (package-arguments base)
7955 ((#:phases phases)
7956 `(modify-phases ,phases
7957 (add-before 'check 'disable-test-case
7958 ;; The test requires network access to localhost. Curiously it
7959 ;; fails with Python 2 only. Simply make the test-case return
7960 ;; immediately.
7961 (lambda _
7962 (substitute*
7963 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
7964 (("formats = self.nbconvert_api") "return #")))))))))))
7965
7966(define-public python-widgetsnbextension
7967 (package
7968 (name "python-widgetsnbextension")
7969 (version "3.4.2")
7970 (source
7971 (origin
7972 (method url-fetch)
7973 (uri (pypi-uri "widgetsnbextension" version))
7974 (sha256
7975 (base32
7976 "0rc2nivdy7k4m3vljx7wdh2jh11djapcgwhvzlbs0isl8gl8nqgs"))))
7977 (build-system python-build-system)
7978 (propagated-inputs
7979 `(("python-ipykernel" ,python-ipykernel)
7980 ("python-notebook" ,python-notebook)))
7981 (native-inputs
7982 `(("python-certifi" ,python-certifi)
7983 ("python-nose" ,python-nose)))
7984 (home-page "https://ipython.org")
7985 (synopsis "IPython HTML widgets for Jupyter")
7986 (description "This package provides interactive HTML widgets for Jupyter
7987notebooks.")
7988 (license license:bsd-3)))
7989
7990(define-public python2-widgetsnbextension
7991 (package-with-python2 python-widgetsnbextension))
7992
7993(define-public python-ipywidgets
7994 (package
7995 (name "python-ipywidgets")
7996 (version "5.2.2")
7997 (source
7998 (origin
7999 (method url-fetch)
8000 (uri (pypi-uri "ipywidgets" version))
8001 (sha256
8002 (base32
8003 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
8004 (build-system python-build-system)
8005 (propagated-inputs
8006 `(("python-ipython" ,python-ipython)
8007 ("python-traitlets" ,python-traitlets)
8008 ("python-widgetsnbextension" ,python-widgetsnbextension)))
8009 (native-inputs
8010 `(("python-nose" ,python-nose)
8011 ("python-pytest" ,python-pytest)))
8012 (home-page "https://ipython.org")
8013 (synopsis "IPython HTML widgets for Jupyter")
8014 (description "Ipywidgets are interactive HTML widgets for Jupyter
8015notebooks and the IPython kernel. Notebooks come alive when interactive
8016widgets are used. Users gain control of their data and can visualize changes
8017in the data.")
8018 (license license:bsd-3)))
8019
8020(define-public python2-ipywidgets
8021 (package-with-python2 python-ipywidgets))
8022
8023(define-public python-jupyter-console
8024 (package
8025 (name "python-jupyter-console")
becb9cbf 8026 (version "6.0.0")
44d10b1f
RW
8027 (source
8028 (origin
8029 (method url-fetch)
8030 (uri (pypi-uri "jupyter_console" version))
8031 (sha256
8032 (base32
becb9cbf 8033 "1xdjw11cppf1fxvwkw2bk13ckkwas3bdah8baingn9296mvfi31h"))))
44d10b1f 8034 (build-system python-build-system)
44d10b1f
RW
8035 (propagated-inputs
8036 `(("python-ipykernel" ,python-ipykernel)
8037 ("python-jupyter-client" ,python-jupyter-client)
becb9cbf 8038 ("python-prompt-toolkit" ,python-prompt-toolkit)
44d10b1f
RW
8039 ("python-pygments" ,python-pygments)))
8040 (native-inputs
8041 `(("python-nose" ,python-nose)))
8042 (home-page "https://jupyter.org")
8043 (synopsis "Jupyter terminal console")
8044 (description "This package provides a terminal-based console frontend for
8045Jupyter kernels. It also allows for console-based interaction with non-Python
8046Jupyter kernels such as IJulia and IRKernel.")
8047 (license license:bsd-3)))
8048
8049(define-public python2-jupyter-console
8e590c81
RW
8050 (package
8051 (name "python2-jupyter-console")
8052 (version "5.2.0")
8053 (source
8054 (origin
8055 (method url-fetch)
8056 (uri (pypi-uri "jupyter_console" version))
8057 (sha256
8058 (base32
8059 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
8060 (build-system python-build-system)
8061 ;; Tests only run in an TTY.
8062 (arguments `(#:tests? #f))
8063 (propagated-inputs
8064 `(("python2-ipykernel" ,python2-ipykernel)
8065 ("python2-jupyter-client" ,python2-jupyter-client)
8066 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
8067 ("python2-pygments" ,python2-pygments)))
8068 (native-inputs
8069 `(("python2-nose" ,python2-nose)))
8070 (home-page "https://jupyter.org")
8071 (synopsis "Jupyter terminal console")
8072 (description "This package provides a terminal-based console frontend for
8073Jupyter kernels. It also allows for console-based interaction with non-Python
8074Jupyter kernels such as IJulia and IRKernel.")
8075 (license license:bsd-3)))
44d10b1f
RW
8076
8077;; The python-ipython and python-jupyter-console require each other. To get
8078;; the functionality in both packages working, strip down the
8079;; python-jupyter-console package when using it as an input to python-ipython.
8080(define python-jupyter-console-minimal
8081 (package
8082 (inherit python-jupyter-console)
8083 (name "python-jupyter-console-minimal")
8084 (arguments
8085 (substitute-keyword-arguments
8086 (package-arguments python-jupyter-console)
8087 ((#:phases phases)
8088 `(modify-phases ,phases
8089 (add-after 'install 'delete-bin
8090 (lambda* (#:key outputs #:allow-other-keys)
8091 ;; Delete the bin files, to avoid conflicts in profiles
8092 ;; where python-ipython and python-jupyter-console are
8093 ;; both present.
8094 (delete-file-recursively
8095 (string-append
8096 (assoc-ref outputs "out") "/bin"))))))))
8097 ;; Remove the python-ipython propagated input, to avoid the cycle
8098 (propagated-inputs
8099 (alist-delete
8100 "python-ipython"
8101 (package-propagated-inputs python-jupyter-console)))))
8102
8103(define-public python-qtconsole
8104 (package
8105 (name "python-qtconsole")
8106 (version "4.4.3")
8107 (source
8108 (origin
8109 (method url-fetch)
8110 (uri (pypi-uri "qtconsole" version))
8111 (sha256
8112 (base32
8113 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
8114 (build-system python-build-system)
8115 (arguments
8116 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
8117 ;; but we only have the LTS version 5.x. This means that there might be
8118 ;; runtime errors, but since this is a dependency of the Jupyter package,
8119 ;; and Jupyter can be used without the qtconsole we can overlook this for
8120 ;; now.
8121 `(#:tests? #f
8122 #:phases
8123 (modify-phases %standard-phases
8124 (add-before 'check 'pre-check
8125 (lambda _
8126 (setenv "QT_QPA_PLATFORM" "offscreen")
8127 #t)))))
8128 (propagated-inputs
8129 `(("python-ipykernel" ,python-ipykernel)
8130 ("python-ipython" ,python-ipython)))
8131 (native-inputs
8132 `(("python-pytest" ,python-pytest)))
8133 (home-page "http://jupyter.org")
8134 (synopsis "Jupyter Qt console")
8135 (description "This package provides a Qt-based console for Jupyter with
8136support for rich media output.")
8137 (license license:bsd-3)))
8138
6ec87223
VC
8139(define-public python-jsbeautifier
8140 (package
8141 (name "python-jsbeautifier")
8142 (version "1.10.2")
8143 (home-page "https://github.com/beautify-web/js-beautify")
8144 (source (origin
8145 (method git-fetch)
8146 (uri (git-reference
8147 (url home-page)
8148 (commit (string-append "v" version))))
8149 (file-name (git-file-name name version))
8150 (sha256
8151 (base32
8152 "0wawb070ki1axb3jc9xvsrgpji52vcfif3zmjzc3z4g98m5xw4kg"))))
8153 (build-system python-build-system)
8154 (arguments
8155 `(#:phases (modify-phases %standard-phases
8156 (add-after 'unpack 'chdir
8157 (lambda _
8158 ;; The upstream Git repository contains all the code,
8159 ;; but this package only builds the python code.
8160 (chdir "python")
8161 #t))
8162 (add-after 'unpack 'patch-python-six-requirements
8163 (lambda _
8164 (substitute* "python/setup.py"
8165 (("six>=1.12.0")
8166 "six>=1.11.0"))
8167 #t)))))
8168 (propagated-inputs
8169 `(("python-editorconfig" ,python-editorconfig)
8170 ("python-six" ,python-six)))
8171 (native-inputs
8172 `(("python-pytest" ,python-pytest)))
8173 (synopsis "JavaScript unobfuscator and beautifier")
8174 (description "Beautify, unpack or deobfuscate JavaScript, leveraging
8175popular online obfuscators.")
8176 (license license:expat)))
8177
44d10b1f
RW
8178(define-public jupyter
8179 (package
8180 (name "jupyter")
8181 (version "1.0.0")
8182 (source
8183 (origin
8184 (method url-fetch)
8185 (uri (pypi-uri "jupyter" version))
8186 (sha256
8187 (base32
8188 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
8189 (build-system python-build-system)
8190 (arguments '(#:tests? #f)) ; there are none.
8191 (propagated-inputs
8192 `(("python-ipykernel" ,python-ipykernel)
8193 ("python-ipywidgets" ,python-ipywidgets)
8194 ("python-jupyter-console" ,python-jupyter-console)
8195 ("python-nbconvert" ,python-nbconvert)
8196 ("python-notebook" ,python-notebook)
8197 ("python-qtconsole" ,python-qtconsole)))
8198 (native-search-paths
8199 (list (search-path-specification
8200 (variable "JUPYTER_PATH")
8201 (files '("share/jupyter")))))
8202 (home-page "https://jupyter.org")
8203 (synopsis "Web application for interactive documents")
8204 (description
8205 "The Jupyter Notebook is a web application that allows you to create and
8206share documents that contain live code, equations, visualizations and
8207explanatory text. Uses include: data cleaning and transformation, numerical
8208simulation, statistical modeling, machine learning and much more.")
8209 (license license:bsd-3)))
8210
8211(define-public python-chardet
8212 (package
8213 (name "python-chardet")
8214 (version "3.0.4")
8215 (source
8216 (origin
8217 (method url-fetch)
8218 (uri (pypi-uri "chardet" version))
8219 (sha256
8220 (base32
8221 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
8222 (native-inputs
8223 `(("python-hypothesis" ,python-hypothesis)
8224 ("python-pytest" ,python-pytest)
8225 ("python-pytest-runner" ,python-pytest-runner)))
8226 (build-system python-build-system)
3d369407
MB
8227 ;; XXX: Incompatible with Pytest 4: <https://github.com/chardet/chardet/issues/173>.
8228 (arguments `(#:tests? #f))
44d10b1f
RW
8229 (home-page "https://github.com/chardet/chardet")
8230 (synopsis "Universal encoding detector for Python 2 and 3")
8231 (description
8232 "This package provides @code{chardet}, a Python module that can
8233automatically detect a wide range of file encodings.")
8234 (license license:lgpl2.1+)))
8235
8236(define-public python2-chardet
8237 (package-with-python2 python-chardet))
8238
8239(define-public python-docopt
8240 (package
8241 (name "python-docopt")
8242 (version "0.6.2")
8243 (source
8244 (origin
8245 (method url-fetch)
8246 ;; The release on PyPI does not include tests.
8247 (uri (string-append
8248 "https://github.com/docopt/docopt/archive/"
8249 version ".tar.gz"))
8250 (file-name (string-append name "-" version ".tar.gz"))
8251 (sha256
8252 (base32
8253 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
8254 (build-system python-build-system)
8255 (native-inputs
8256 `(("python-pytest" ,python-pytest)))
8257 (arguments
8258 `(#:phases
8259 (modify-phases %standard-phases
8260 (replace 'check
8261 (lambda _ (invoke "py.test"))))))
8262 (home-page "http://docopt.org")
8263 (synopsis "Command-line interface description language for Python")
8264 (description "This library allows the user to define a command-line
8265interface from a program's help message rather than specifying it
4ca7207b 8266programmatically with command-line parsers like @code{getopt} and
44d10b1f
RW
8267@code{argparse}.")
8268 (license license:expat)))
8269
8270(define-public python2-docopt
8271 (package-with-python2 python-docopt))
8272
8273(define-public python-pythondialog
8274 (package
8275 (name "python-pythondialog")
8276 (version "3.4.0")
8277 (source
8278 (origin
8279 (method url-fetch)
8280 (uri (pypi-uri "pythondialog" version))
8281 (sha256
8282 (base32
8283 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
8284 (build-system python-build-system)
8285 (arguments
8286 `(#:phases
8287 (modify-phases %standard-phases
8288 (add-after 'unpack 'patch-path
8289 (lambda* (#:key inputs #:allow-other-keys)
8290 (let* ((dialog (assoc-ref inputs "dialog")))
8291 ;; Since this library really wants to grovel the search path, we
8292 ;; must hardcode dialog's store path into it.
8293 (substitute* "dialog.py"
8294 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
8295 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
8296 #t))))
8297 #:tests? #f)) ; no test suite
8298 (propagated-inputs
8299 `(("dialog" ,dialog)))
8300 (home-page "http://pythondialog.sourceforge.net/")
8301 (synopsis "Python interface to the UNIX dialog utility")
8302 (description "A Python wrapper for the dialog utility. Its purpose is to
8303provide an easy to use, pythonic and comprehensive Python interface to dialog.
8304This allows one to make simple text-mode user interfaces on Unix-like systems")
8305 (license license:lgpl2.1)
8306 (properties `((python2-variant . ,(delay python2-pythondialog))))))
8307
8308(define-public python2-pythondialog
8309 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
8310 (package
8311 (inherit base)
8312 (version (package-version python-pythondialog))
8313 (source (origin
8314 (method url-fetch)
8315 (uri (pypi-uri "python2-pythondialog" version))
8316 (sha256
8317 (base32
8318 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
8319
8320(define-public python-configobj
8321 (package
8322 (name "python-configobj")
8323 (version "5.0.6")
8324 (source (origin
8325 (method url-fetch)
b0758fbb 8326 (uri (pypi-uri "configobj" version))
44d10b1f
RW
8327 (sha256
8328 (base32
8329 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
8330 ;; Patch setup.py so it looks for python-setuptools, which is
8331 ;; required to parse the keyword 'install_requires' in setup.py.
8332 (patches (search-patches "python-configobj-setuptools.patch"))))
8333 (build-system python-build-system)
8334 (propagated-inputs
8335 `(("python-six" ,python-six)))
8336 (synopsis "Config file reading, writing and validation")
8337 (description "ConfigObj is a simple but powerful config file reader and
8338writer: an ini file round tripper. Its main feature is that it is very easy to
8339use, with a straightforward programmer’s interface and a simple syntax for
8340config files.")
8341 (home-page "https://github.com/DiffSK/configobj")
8342 (license license:bsd-3)))
8343
8344(define-public python2-configobj
8345 (package-with-python2 python-configobj))
8346
8347(define-public python-configargparse
8348 (package
8349 (name "python-configargparse")
86ae491f 8350 (version "0.14.0")
44d10b1f
RW
8351 (source (origin
8352 (method url-fetch)
8353 (uri (pypi-uri "ConfigArgParse" version))
8354 (sha256
8355 (base32
86ae491f 8356 "149fy4zya0rsnlkvxbbq43cyr8lscb5k4pj1m6n7f1grwcmzwbif"))))
44d10b1f
RW
8357 (build-system python-build-system)
8358 (native-inputs
8359 `(("python-pyyaml" ,python-pyyaml)))
8360 (arguments
8361 `(#:phases
8362 (modify-phases %standard-phases
8363 (replace 'check
8364 (lambda _
8365 ;; Bypass setuptools-shim because one test relies on "setup.py"
8366 ;; being the first argument passed to the python call.
8367 ;;
8368 ;; NOTE: Many tests do not run because they rely on Python's
8369 ;; built-in test.test_argparse, but we remove the unit tests from
8370 ;; our Python installation.
8371 (invoke "python" "setup.py" "test"))))))
8372 (synopsis "Replacement for argparse")
8373 (description "A drop-in replacement for argparse that allows options to also
8374be set via config files and/or environment variables.")
8375 (home-page "https://github.com/bw2/ConfigArgParse")
8376 (license license:expat)))
8377
8378(define-public python2-configargparse
8379 (package-with-python2 python-configargparse))
8380
8381(define-public python-argparse-manpage
8382 (package
8383 (name "python-argparse-manpage")
8384 (version "1.1")
8385 (source
8386 (origin
8387 (method url-fetch)
8388 (uri (pypi-uri "argparse-manpage" version))
8389 (sha256
8390 (base32
8391 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
8392 (build-system python-build-system)
8393 (home-page "https://github.com/praiskup/argparse-manpage")
8394 (synopsis "Build manual page from Python's ArgumentParser object")
8395 (description
8396 "This package provides tools to build manual pages from Python's
8397@code{ArgumentParser} object.")
8398 (license license:asl2.0)))
8399
3e8f76d8
RW
8400(define-public python-contextlib2
8401 (package
8402 (name "python-contextlib2")
8403 (version "0.5.5")
8404 (source
8405 (origin
8406 (method url-fetch)
8407 (uri (pypi-uri "contextlib2" version))
8408 (sha256
8409 (base32
8410 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
8411 (build-system python-build-system)
8412 (home-page "http://contextlib2.readthedocs.org/")
8413 (synopsis "Tools for decorators and context managers")
8414 (description "This module is primarily a backport of the Python
84153.2 contextlib to earlier Python versions. Like contextlib, it
8416provides utilities for common tasks involving decorators and context
8417managers. It also contains additional features that are not part of
8418the standard library.")
8419 (license license:psfl)))
8420
44d10b1f
RW
8421(define-public python2-contextlib2
8422 (package
8423 (name "python2-contextlib2")
8424 (version "0.5.5")
8425 (source
8426 (origin
8427 (method url-fetch)
8428 (uri (pypi-uri "contextlib2" version))
8429 (sha256
8430 (base32
8431 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
8432 (build-system python-build-system)
8433 (arguments
8434 `(#:python ,python-2
8435 #:phases
8436 (modify-phases %standard-phases
8437 (replace 'check
8438 (lambda _ (invoke "python" "test_contextlib2.py" "-v"))))))
8439 (native-inputs
8440 `(("python2-unittest2" ,python2-unittest2)))
8441 (home-page "http://contextlib2.readthedocs.org/")
8442 (synopsis "Tools for decorators and context managers")
8443 (description "This module is primarily a backport of the Python
84443.2 contextlib to earlier Python versions. Like contextlib, it
8445provides utilities for common tasks involving decorators and context
8446managers. It also contains additional features that are not part of
8447the standard library.")
8448 (license license:psfl)))
8449
8450(define-public python-texttable
8451 (package
8452 (name "python-texttable")
52cc4892 8453 (version "0.9.1")
44d10b1f
RW
8454 (source
8455 (origin
8456 (method url-fetch)
8457 (uri (pypi-uri "texttable" version))
8458 (sha256
8459 (base32
52cc4892 8460 "0yawv64c0zbawwv6zz84whb32fnb2n9jylwjcfsrcdgh7xvl340i"))))
44d10b1f
RW
8461 (build-system python-build-system)
8462 (arguments '(#:tests? #f)) ; no tests
8463 (home-page "https://github.com/foutaise/texttable/")
8464 (synopsis "Python module for creating simple ASCII tables")
8465 (description "Texttable is a Python module for creating simple ASCII
8466tables.")
8467 (license license:lgpl2.1+)))
8468
8469(define-public python2-texttable
8470 (package-with-python2 python-texttable))
8471
8472(define-public python-atomicwrites
8473 (package
8474 (name "python-atomicwrites")
14f10479 8475 (version "1.3.0")
44d10b1f
RW
8476 (source (origin
8477 (method url-fetch)
8478 (uri (pypi-uri "atomicwrites" version))
8479 (sha256
8480 (base32
14f10479 8481 "19ngcscdf3jsqmpcxn6zl5b6anmsajb6izp1smcd1n02midl9abm"))))
44d10b1f
RW
8482 (build-system python-build-system)
8483 (synopsis "Atomic file writes in Python")
8484 (description "Library for atomic file writes using platform dependent tools
8485for atomic file system operations.")
8486 (home-page "https://github.com/untitaker/python-atomicwrites")
8487 (license license:expat)))
8488
8489(define-public python2-atomicwrites
8490 (package-with-python2 python-atomicwrites))
8491
8492(define-public python-click-threading
8493 (package
8494 (name "python-click-threading")
8495 (version "0.4.4")
8496 (source (origin
8497 (method url-fetch)
8498 (uri (pypi-uri "click-threading" version))
8499 (sha256
8500 (base32
8501 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
8502 (build-system python-build-system)
8503 (propagated-inputs
8504 `(("python-click" ,python-click)))
8505 (synopsis "Utilities for multithreading in Click")
8506 (description "This package provides utilities for multithreading in Click
8507applications.")
8508 (home-page "https://github.com/click-contrib/click-threading")
8509 (license license:expat)))
8510
8511(define-public python-click-log
8512 (package
8513 (name "python-click-log")
8514 (version "0.3.2")
8515 (source (origin
8516 (method url-fetch)
8517 (uri (pypi-uri "click-log" version))
8518 (sha256
8519 (base32
8520 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
8521 (build-system python-build-system)
8522 (propagated-inputs
8523 `(("python-click" ,python-click)))
8524 (synopsis "Logging for click applications")
8525 (description "This package provides a Python library for logging Click
8526applications.")
8527 (home-page "https://github.com/click-contrib/click-log")
8528 (license license:expat)))
8529
8530(define-public python-apipkg
8531 (package
8532 (name "python-apipkg")
8533 (version "1.4")
8534 (source (origin
8535 (method url-fetch)
8536 (uri (pypi-uri "apipkg" version))
8537 (sha256
8538 (base32
8539 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
8540 (build-system python-build-system)
8541 (native-inputs
8542 `(("python-pytest" ,python-pytest)))
8543 (synopsis "Namespace control and lazy-import mechanism")
8544 (description "With apipkg you can control the exported namespace of a Python
8545package and greatly reduce the number of imports for your users. It is a small
8546pure Python module that works on virtually all Python versions.")
8547 (home-page "https://github.com/pytest-dev/apipkg")
8548 (license license:expat)))
8549
8550(define-public python2-apipkg
8551 (package-with-python2 python-apipkg))
8552
8553(define-public python-execnet
8554 (package
8555 (name "python-execnet")
8556 (version "1.4.1")
8557 (source (origin
8558 (method url-fetch)
8559 (uri (pypi-uri "execnet" version))
8560 (sha256
8561 (base32
8562 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
8563 (build-system python-build-system)
8564 (arguments
8565 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
8566 ;; The two test failures are caused by the lack of an `ssh` executable.
8567 ;; The test suite can be run with pytest after the 'install' phase.
8568 #:tests? #f))
8569 (native-inputs
8570 `(("python-pytest" ,python-pytest)
8571 ("python-setuptools-scm" ,python-setuptools-scm)))
8572 (propagated-inputs
8573 `(("python-apipkg" ,python-apipkg)))
8574 (synopsis "Rapid multi-Python deployment")
8575 (description "Execnet provides a share-nothing model with
8576channel-send/receive communication for distributing execution across many
8577Python interpreters across version, platform and network barriers. It has a
8578minimal and fast API targeting the following uses:
8579@enumerate
8580@item distribute tasks to (many) local or remote CPUs
8581@item write and deploy hybrid multi-process applications
8582@item write scripts to administer multiple environments
8583@end enumerate")
8584 (home-page "http://codespeak.net/execnet/")
8585 (license license:expat)))
8586
8587(define-public python2-execnet
8588 (package-with-python2 python-execnet))
8589
8590(define-public python-icalendar
8591 (package
8592 (name "python-icalendar")
8593 (version "4.0.3")
8594 (source (origin
8595 (method url-fetch)
8596 (uri (pypi-uri "icalendar" version))
8597 (sha256
8598 (base32
8599 "0mk3dk1dxkcm46jy48v27j2w2349iv4sbimqj1yb5js43mx49hh7"))))
8600 (build-system python-build-system)
8601 (propagated-inputs
8602 `(("python-dateutil" ,python-dateutil)
8603 ("python-pytz" ,python-pytz)))
8604 (synopsis "Python library for parsing iCalendar files")
8605 (description "The icalendar package is a parser/generator of iCalendar
8606files for use with Python.")
8607 (home-page "https://github.com/collective/icalendar")
8608 (license license:bsd-2)))
8609
44d10b1f
RW
8610(define-public python-args
8611 (package
8612 (name "python-args")
8613 (version "0.1.0")
8614 (source (origin
8615 (method url-fetch)
8616 (uri (pypi-uri "args" version))
8617 (sha256
8618 (base32
8619 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
8620 (build-system python-build-system)
8621 (home-page "https://github.com/kennethreitz/args")
8622 (synopsis "Command-line argument parser")
8623 (description
8624 "This library provides a Python module to parse command-line arguments.")
8625 (license license:bsd-3)))
8626
8627(define-public python2-args
8628 (package-with-python2 python-args))
8629
8630(define-public python-clint
8631 (package
8632 (name "python-clint")
8633 (version "0.5.1")
8634 (source (origin
8635 (method url-fetch)
8636 (uri (pypi-uri "clint" version))
8637 (sha256
8638 (base32
8639 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
8640 (build-system python-build-system)
8641 (arguments
8642 '(#:phases
8643 (modify-phases %standard-phases
8644 (replace 'check
8645 (lambda _ (invoke "py.test" "-v"))))))
8646 (native-inputs
8647 `(("python-pytest" ,python-pytest)))
8648 (propagated-inputs
8649 `(("python-args" ,python-args)))
8650 (home-page "https://github.com/kennethreitz/clint")
8651 (synopsis "Command-line interface tools")
8652 (description
8653 "Clint is a Python module filled with a set of tools for developing
8654command-line applications, including tools for colored and indented
8655output, progress bar display, and pipes.")
8656 (license license:isc)))
8657
8658(define-public python2-clint
8659 (package-with-python2 python-clint))
8660
44d10b1f
RW
8661(define-public python-rply
8662 (package
8663 (name "python-rply")
8664 (version "0.7.5")
8665 (source (origin
8666 (method url-fetch)
8667 (uri (pypi-uri "rply" version))
8668 (sha256
8669 (base32
8670 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
8671 (build-system python-build-system)
8672 (propagated-inputs
8673 `(("python-appdirs" ,python-appdirs)))
8674 (home-page "https://github.com/alex/rply")
8675 (synopsis "Parser generator for Python")
8676 (description
8677 "This package provides a pure Python based parser generator, that also
8678works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
8679with a new public API, and RPython support.")
8680 (license license:bsd-3)))
8681
8682(define-public python2-rply
8683 (package-with-python2 python-rply))
8684
8685(define-public python-hy
8686 (package
8687 (name "python-hy")
8688 (version "0.13.0")
8689 (source (origin
8690 (method url-fetch)
8691 (uri (pypi-uri "hy" version))
8692 (sha256
8693 (base32
8694 "19sfymaksx9jhksfnb15ahid46mzrhdfzz6yy2craz2qnzvpmky8"))))
8695 (build-system python-build-system)
8696 (arguments
8697 '(#:phases
8698 (modify-phases %standard-phases
8699 (replace 'check
8700 (lambda _
8701 ;; Tests require write access to HOME.
8702 (setenv "HOME" "/tmp")
8703 (invoke "nosetests"))))))
8704 (native-inputs
8705 `(("python-coverage" ,python-coverage)
8706 ("python-nose" ,python-nose)))
8707 (propagated-inputs
8708 `(("python-astor" ,python-astor)
8709 ("python-clint" ,python-clint)
8710 ("python-rply" ,python-rply)))
8711 (home-page "http://hylang.org/")
8712 (synopsis "Lisp frontend to Python")
8713 (description
8714 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
8715its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
8716Python at your fingertips, in Lisp form.")
8717 (license license:expat)))
8718
8719(define-public python2-hy
8720 (package-with-python2 python-hy))
8721
8722(define-public python2-functools32
8723 (package
8724 (name "python2-functools32")
8725 (version "3.2.3-2")
8726 (source
8727 (origin
8728 (method url-fetch)
8729 (uri (pypi-uri "functools32" version))
8730 (sha256
8731 (base32
8732 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
8733 (build-system python-build-system)
8734 (arguments
8735 `(#:python ,python-2
8736 #:tests? #f)) ; no test target
8737 (home-page "https://github.com/MiCHiLU/python-functools32")
8738 (synopsis
8739 "Backport of the functools module from Python 3.2.3")
8740 (description
8741 "This package is a backport of the @code{functools} module from Python
87423.2.3 for use with older versions of Python and PyPy.")
8743 (license license:expat)))
8744
8745(define-public python2-subprocess32
8746 (package
8747 (name "python2-subprocess32")
8748 (version "3.2.7")
8749 (source (origin
8750 (method url-fetch)
8751 (uri (pypi-uri "subprocess32" version))
8752 (sha256
8753 (base32
8754 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
8755 (patches
8756 (search-patches "python2-subprocess32-disable-input-test.patch"))))
8757 (build-system python-build-system)
8758 (arguments
8759 `(#:python ,python-2
8760 ;; The test suite fails with Python > 2.7.13:
8761 ;; import test.support
8762 ;; ImportError: No module named support
8763 #:tests? #f
8764 #:phases
8765 (modify-phases %standard-phases
8766 (add-after 'unpack 'patch-/bin/sh
8767 (lambda _
8768 (substitute* '("subprocess32.py"
8769 "test_subprocess32.py")
8770 (("/bin/sh") (which "sh")))
8771 #t)))))
8772 (home-page "https://github.com/google/python-subprocess32")
8773 (synopsis "Backport of the subprocess module from Python 3.2")
8774 (description
8775 "This is a backport of the @code{subprocess} standard library module
8776from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
8777new features. On POSIX systems it is guaranteed to be reliable when used
8778in threaded applications. It includes timeout support from Python 3.3 but
8779otherwise matches 3.2’s API.")
8780 (license license:psfl)))
8781
8782(define-public python2-futures
8783 (package
8784 (name "python2-futures")
8785 (version "3.2.0")
8786 (source
8787 (origin
8788 (method url-fetch)
8789 (uri (pypi-uri "futures" version))
8790 (sha256
8791 (base32
8792 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
8793 (build-system python-build-system)
ba88eea2
RW
8794 (arguments
8795 `(#:python ,python-2
8796 #:phases
8797 (modify-phases %standard-phases
8798 (replace 'check
8799 (lambda _
8800 (invoke "python" "test_futures.py")
8801 #t)))))
44d10b1f
RW
8802 (home-page "https://github.com/agronholm/pythonfutures")
8803 (synopsis
8804 "Backport of the concurrent.futures package from Python 3.2")
8805 (description
8806 "The concurrent.futures module provides a high-level interface for
8807asynchronously executing callables. This package backports the
8808concurrent.futures package from Python 3.2")
8809 (license license:bsd-3)))
8810
8811(define-public python-promise
8812 (package
8813 (name "python-promise")
8814 (version "0.4.2")
8815 (source
8816 (origin
8817 (method url-fetch)
8818 (uri (pypi-uri "promise" version))
8819 (sha256
8820 (base32
8821 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
8822 (build-system python-build-system)
8823 ;; Tests wants python-futures, which is a python2 only program, and
8824 ;; can't be found by python-promise at test time.
8825 (arguments `(#:tests? #f))
8826 (home-page "https://github.com/syrusakbary/promise")
8827 (synopsis "Promises/A+ implementation for Python")
8828 (description
8829 "Promises/A+ implementation for Python")
8830 (properties `((python2-variant . ,(delay python2-promise))))
8831 (license license:expat)))
8832
8833(define-public python2-promise
8834 (let ((promise (package-with-python2
8835 (strip-python2-variant python-promise))))
8836 (package (inherit promise)
8837 (arguments (substitute-keyword-arguments (package-arguments promise)
8838 ((#:tests? _) #t)))
8839 (native-inputs
8840 `(("python2-futures" ,python2-futures)
8841 ("python2-pytest" ,python2-pytest)
8842 ,@(package-native-inputs promise))))))
8843
d71d85cd
RW
8844(define-public python-progressbar33
8845 (package
8846 (name "python-progressbar33")
8847 (version "2.4")
8848 (source
8849 (origin
8850 (method url-fetch)
8851 (uri (pypi-uri "progressbar33" version))
8852 (sha256
8853 (base32
8854 "1zvf6zs5hzrc03p9nfs4p16vhilqikycvv1yk0pxn8s07fdhvzji"))))
8855 (build-system python-build-system)
8856 (home-page "http://github.com/germangh/python-progressbar")
8857 (synopsis "Text progress bar library for Python")
8858 (description
8859 "This package provides a text progress bar library for Python. This
8860version only differs from the original @code{progressbar} package in that it
8861uses relative package imports instead of absolute imports, which is necessary
8862for the module to work under Python 3.3.")
8863 ;; Either or both of these licenses may be selected.
8864 (license (list license:lgpl2.1+ license:bsd-3))))
8865
44d10b1f
RW
8866(define-public python-colorama
8867 (package
8868 (name "python-colorama")
8869 (version "0.3.9")
8870 (source
8871 (origin
8872 (method url-fetch)
8873 (uri (pypi-uri "colorama" version))
8874 (sha256
8875 (base32
8876 "1wd1szk0z3073ghx26ynw43gnc140ibln1safgsis6s6z3s25ss8"))))
8877 (build-system python-build-system)
8878 (synopsis "Colored terminal text rendering for Python")
8879 (description "Colorama is a Python library for rendering colored terminal
8880text.")
8881 (home-page "https://pypi.python.org/pypi/colorama")
8882 (license license:bsd-3)))
8883
8884(define-public python2-colorama
8885 (package-with-python2 python-colorama))
8886
8887(define-public python-rsa
8888 (package
8889 (name "python-rsa")
8890 (version "3.4.2")
8891 (source
8892 (origin
8893 (method url-fetch)
8894 (uri (pypi-uri "rsa" version))
8895 (sha256
8896 (base32
8897 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
8898 (build-system python-build-system)
8899 (propagated-inputs
8900 `(("python-pyasn1" ,python-pyasn1)))
8901 (synopsis "Pure-Python RSA implementation")
8902 (description "Python-RSA is a pure-Python RSA implementation. It supports
8903encryption and decryption, signing and verifying signatures, and key
8904generation according to PKCS#1 version 1.5. It can be used as a Python
8905library as well as on the command line.")
8906 (home-page "https://stuvel.eu/rsa")
8907 (license license:asl2.0)))
8908
8909(define-public python2-rsa
8910 (package-with-python2 python-rsa))
8911
8912(define-public python-pluggy
8913 (package
8914 (name "python-pluggy")
e5731c03 8915 (version "0.11.0")
44d10b1f
RW
8916 (source
8917 (origin
8918 (method url-fetch)
8919 (uri (pypi-uri "pluggy" version))
8920 (sha256
8921 (base32
e5731c03 8922 "10511a54dvafw1jrk75mrhml53c7b7w4yaw7241696lc2hfvr895"))))
44d10b1f
RW
8923 (build-system python-build-system)
8924 (native-inputs
8925 `(("python-setuptools-scm" ,python-setuptools-scm)))
8926 (synopsis "Plugin and hook calling mechanism for Python")
8927 (description "Pluggy is an extraction of the plugin manager as used by
8928Pytest but stripped of Pytest specific details.")
8929 (home-page "https://pypi.python.org/pypi/pluggy")
8930 (license license:expat)))
8931
8932(define-public python2-pluggy
8933 (package-with-python2 python-pluggy))
8934
8935(define-public python-tox
8936 (package
8937 (name "python-tox")
8938 (version "2.8.1")
8939 (source
8940 (origin
8941 (method url-fetch)
8942 (uri (pypi-uri "tox" version))
8943 (sha256
8944 (base32
8945 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
8946 (build-system python-build-system)
8947 (arguments
8948 ;; FIXME: Tests require pytest-timeout, which itself requires
8949 ;; pytest>=2.8.0 for installation.
8950 '(#:tests? #f))
8951 (propagated-inputs
8952 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
8953 ("python-py" ,python-py)
8954 ("python-virtualenv" ,python-virtualenv)))
8955 (native-inputs
8956 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
8957 ("python-pytest" ,python-pytest) ; >= 2.3.5
8958 ("python-setuptools-scm" ,python-setuptools-scm)))
8959 (home-page "http://tox.testrun.org/")
8960 (synopsis "Virtualenv-based automation of test activities")
8961 (description "Tox is a generic virtualenv management and test command line
8962tool. It can be used to check that a package installs correctly with
8963different Python versions and interpreters, or run tests in each type of
8964supported environment, or act as a frontend to continuous integration
8965servers.")
8966 (license license:expat)))
8967
8968(define-public python2-tox
8969 (package-with-python2 python-tox))
8970
8971(define-public python-jmespath
8972 (package
8973 (name "python-jmespath")
8974 (version "0.9.3")
8975 (source
8976 (origin
8977 (method url-fetch)
8978 (uri (pypi-uri "jmespath" version))
8979 (sha256
8980 (base32
8981 "0r7wc7fsxmlwzxx9j1j7rms06c6xs6d4sysirdhz1jk2mb4x90ba"))))
8982 (build-system python-build-system)
8983 (native-inputs
8984 `(("python-nose" ,python-nose)))
8985 (synopsis "JSON Matching Expressions")
8986 (description "JMESPath (pronounced “james path”) is a Python library that
8987allows one to declaratively specify how to extract elements from a JSON
8988document.")
8989 (home-page "https://github.com/jmespath/jmespath.py")
8990 (license license:expat)))
8991
8992(define-public python2-jmespath
8993 (package-with-python2 python-jmespath))
8994
8995(define-public python-botocore
8996 (package
7bcf827c
RW
8997 (name "python-botocore")
8998 (version "1.12.149")
8999 (source
9000 (origin
9001 (method url-fetch)
9002 (uri (pypi-uri "botocore" version))
9003 (sha256
9004 (base32
9005 "12597f74khp3ngwr282cb949w0gcqj20rkfc3x275dijavyy5cmf"))))
9006 (build-system python-build-system)
9007 (arguments
9008 ;; FIXME: Many tests are failing.
9009 '(#:tests? #f))
9010 (propagated-inputs
9011 `(("python-dateutil" ,python-dateutil)
9012 ("python-docutils" ,python-docutils)
9013 ("python-jmespath" ,python-jmespath)))
9014 (native-inputs
9015 `(("python-mock" ,python-mock)
9016 ("python-nose" ,python-nose)
9017 ("behave" ,behave)
9018 ("python-tox" ,python-tox)
9019 ("python-urllib3" ,python-urllib3)
9020 ("python-wheel" ,python-wheel)))
9021 (home-page "https://github.com/boto/botocore")
9022 (synopsis "Low-level interface to AWS")
9023 (description "Botocore is a Python library that provides a low-level
44d10b1f 9024interface to the Amazon Web Services (AWS) API.")
7bcf827c 9025 (license license:asl2.0)))
44d10b1f
RW
9026
9027(define-public python2-botocore
9028 (package-with-python2 python-botocore))
9029
9030(define-public python-xdo
9031 (package
9032 (name "python-xdo")
9033 (version "0.3")
9034 (source (origin
9035 (method url-fetch)
9036 (uri (string-append
9037 "http://http.debian.net/debian/pool/main/p/python-xdo/"
9038 "python-xdo_" version ".orig.tar.gz"))
9039 (sha256
9040 (base32
9041 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
9042 (build-system python-build-system)
9043 (arguments
9044 '(#:phases
9045 (modify-phases %standard-phases
9046 (add-before 'install 'patch-libxdo-path
9047 ;; Hardcode the path of dynamically loaded libxdo library.
9048 (lambda* (#:key inputs #:allow-other-keys)
9049 (let ((libxdo (string-append
9050 (assoc-ref inputs "xdotool")
9051 "/lib/libxdo.so")))
9052 (substitute* "xdo/_xdo.py"
9053 (("find_library\\(\"xdo\"\\)")
9054 (simple-format #f "\"~a\"" libxdo)))
9055 #t))))
9056 #:tests? #f)) ; no tests provided
9057 (propagated-inputs
9058 `(("python-six" ,python-six)))
9059 (inputs
9060 `(("xdotool" ,xdotool)
9061 ("libX11" ,libx11)))
9062 (home-page "https://tracker.debian.org/pkg/python-xdo")
9063 (synopsis "Python library for simulating X11 keyboard/mouse input")
9064 (description "Provides bindings to libxdo for manipulating X11 via simulated
9065input. (Note that this is mostly a legacy library; you may wish to look at
9066python-xdo for newer bindings.)")
9067 (license license:bsd-3)))
9068
9069(define-public python2-xdo
9070 (package-with-python2 python-xdo))
9071
9072(define-public python-mako
9073 (package
9074 (name "python-mako")
6bf53ad5 9075 (version "1.1.0")
44d10b1f
RW
9076 (source
9077 (origin
9078 (method url-fetch)
9079 (uri (pypi-uri "Mako" version))
9080 (sha256
9081 (base32
6bf53ad5 9082 "0jqa3qfpykyn4fmkn0kh6043sfls7br8i2bsdbccazcvk9cijsd3"))))
44d10b1f 9083 (build-system python-build-system)
6bf53ad5
MB
9084 (arguments
9085 `(#:phases (modify-phases %standard-phases
9086 (replace 'check
9087 (lambda _
9088 (invoke "pytest" "-vv"))))))
44d10b1f
RW
9089 (propagated-inputs
9090 `(("python-markupsafe" ,python-markupsafe)))
9091 (native-inputs
9092 `(("python-mock" ,python-mock)
44d10b1f 9093 ("python-pytest" ,python-pytest)))
7016e620 9094 (home-page "https://www.makotemplates.org/")
44d10b1f
RW
9095 (synopsis "Templating language for Python")
9096 (description "Mako is a templating language for Python that compiles
9097templates into Python modules.")
9098 (license license:expat)))
9099
9100(define-public python2-mako
9101 (package-with-python2 python-mako))
9102
9103(define-public python-waitress
9104 (package
9105 (name "python-waitress")
9106 (version "1.1.0")
9107 (source
9108 (origin
9109 (method url-fetch)
9110 (uri (pypi-uri "waitress" version))
9111 (patches (search-patches "python-waitress-fix-tests.patch"))
9112 (sha256
9113 (base32
9114 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
9115 (build-system python-build-system)
9116 (home-page "https://github.com/Pylons/waitress")
9117 (synopsis "Waitress WSGI server")
9118 (description "Waitress is meant to be a production-quality pure-Python WSGI
9119server with very acceptable performance.")
9120 (license license:zpl2.1)))
9121
9122(define-public python2-waitress
9123 (package-with-python2 python-waitress))
9124
b2b23d12
TLC
9125(define-public python-whichcraft
9126 (package
9127 (name "python-whichcraft")
9128 (version "0.6.1")
9129 (source
9130 (origin
9131 (method url-fetch)
9132 (uri (pypi-uri "whichcraft" version))
9133 (sha256
9134 (base32
9135 "11yfkzyplizdgndy34vyd5qlmr1n5mxis3a3svxmx8fnccdvknxc"))))
9136 (build-system python-build-system)
9137 (native-inputs
9138 `(("python-pytest" ,python-pytest)))
9139 (home-page "https://github.com/pydanny/whichcraft")
9140 (synopsis "Cross-platform cross-python shutil.which functionality")
9141 (description
9142 "This package provides a shim of the shutil.which function that's
9143designed to work across multiple versions of Python.")
9144 (license license:bsd-3)))
9145
1133ca44
TLC
9146(define-public python-cookiecutter
9147 (package
9148 (name "python-cookiecutter")
9149 (version "1.6.0")
9150 (source
9151 (origin
9152 (method url-fetch)
9153 (uri (pypi-uri "cookiecutter" version))
9154 (sha256
9155 (base32
9156 "0glsvaz8igi2wy1hsnhm9fkn6560vdvdixzvkq6dn20z3hpaa5hk"))))
9157 (build-system python-build-system)
9158 (native-inputs
9159 `(("python-freezegun" ,python-freezegun)
9160 ("python-pytest" ,python-pytest)
9161 ("python-pytest-catchlog" ,python-pytest-catchlog)
9162 ("python-pytest-cov" ,python-pytest-cov)
9163 ("python-pytest-mock" ,python-pytest-mock)))
9164 (propagated-inputs
9165 `(("python-binaryornot" ,python-binaryornot)
9166 ("python-click" ,python-click)
9167 ("python-future" ,python-future)
9168 ("python-jinja2" ,python-jinja2)
9169 ("python-jinja2-time" ,python-jinja2-time)
9170 ("python-poyo" ,python-poyo)
9171 ("python-requests" ,python-requests)
9172 ("python-whichcraft" ,python-whichcraft)))
9173 (home-page "https://github.com/audreyr/cookiecutter")
9174 (synopsis
9175 "Command-line utility that creates projects from project templates")
9176 (description
9177 "This package provides a command-line utility that creates projects from
9178project templates, e.g. creating a Python package project from a Python package
9179project template.")
9180 (license license:bsd-3)))
9181
44d10b1f
RW
9182(define-public python-pyquery
9183 (package
9184 (name "python-pyquery")
9185 (version "1.2.17")
9186 (source
9187 (origin
9188 (method url-fetch)
9189 (uri (pypi-uri "pyquery" version))
9190 (sha256
9191 (base32
9192 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
9193 (build-system python-build-system)
9194 (native-inputs
9195 `(("python-webob" ,python-webob)
9196 ("python-webtest" ,python-webtest)))
9197 (propagated-inputs
9198 `(("python-lxml" ,python-lxml)
9199 ("python-cssselect" ,python-cssselect)))
9200 (home-page "https://github.com/gawel/pyquery")
9201 (synopsis "Make jQuery-like queries on xml documents")
9202 (description "pyquery allows you to make jQuery queries on xml documents.
9203The API is as much as possible the similar to jQuery. pyquery uses lxml for
9204fast xml and html manipulation.")
9205 (license license:bsd-3)))
9206
44d10b1f
RW
9207(define-public python-anyjson
9208 (package
9209 (name "python-anyjson")
9210 (version "0.3.3")
9211 (source
9212 (origin
9213 (method url-fetch)
9214 (uri (pypi-uri "anyjson" version))
9215 (sha256
9216 (base32
9217 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
9218 (build-system python-build-system)
9219 (arguments
9220 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
9221 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
9222 ;; whatever) so this transformation needs to be done before the tests
9223 ;; can be run. Maybe we could add a build step to transform beforehand
9224 ;; but it could be annoying/difficult.
9225 ;; We can enable tests for the Python 2 version, though, and do below.
9226 #:tests? #f))
9227 (home-page "https://bitbucket.org/runeh/anyjson/")
9228 (synopsis
9229 "Wraps best available JSON implementation in a common interface")
9230 (description
9231 "Anyjson loads whichever is the fastest JSON module installed
9232and provides a uniform API regardless of which JSON implementation is used.")
9233 (license license:bsd-3)
9234 (properties `((python2-variant . ,(delay python2-anyjson))))))
9235
9236(define-public python2-anyjson
9237 (let ((anyjson (package-with-python2
9238 (strip-python2-variant python-anyjson))))
9239 (package
9240 (inherit anyjson)
9241 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
9242 #:tests? #t
9243 ,@(package-arguments anyjson)))
9244 (native-inputs `(("python2-nose" ,python2-nose))))))
9245
9246(define-public python-amqp
9247 (package
9248 (name "python-amqp")
9249 (version "2.3.2")
9250 (source
9251 (origin
9252 (method url-fetch)
9253 (uri (pypi-uri "amqp" version))
9254 (sha256
9255 (base32
9256 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
9257 (build-system python-build-system)
9258 (native-inputs
9259 `(("python-case" ,python-case)
9260 ("python-pytest-sugar" ,python-pytest-sugar)
9261 ("python-mock" ,python-mock)))
9262 (propagated-inputs
9263 `(("python-vine" ,python-vine)))
9264 (home-page "https://github.com/celery/py-amqp")
9265 (synopsis
9266 "Low-level AMQP client for Python (fork of amqplib)")
9267 (description
9268 "This is a fork of amqplib which was originally written by Barry Pederson.
9269It is maintained by the Celery project, and used by kombu as a pure python
9270alternative when librabbitmq is not available.")
9271 (license license:lgpl2.1+)
9272 (properties `((python2-variant . ,(delay python2-amqp))))))
9273
9274(define-public python2-amqp
9275 (let ((amqp (package-with-python2
9276 (strip-python2-variant python-amqp))))
9277 (package
9278 (inherit amqp)
9279 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
9280 ;; unmaintained. Weirdly, does not do this on the python 3
9281 ;; version?
9282 #:tests? #f
9283 ,@(package-arguments amqp))))))
9284
9285(define-public python-txamqp
9286 (package
9287 (name "python-txamqp")
9288 (version "0.8.2")
9289 (source
9290 (origin
9291 (method url-fetch)
9292 (uri (pypi-uri "txAMQP" version))
9293 (sha256
9294 (base32
9295 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
9296 (build-system python-build-system)
9297 (propagated-inputs
9298 `(("python-six" ,python-six)
9299 ("python-twisted" ,python-twisted)))
9300 (home-page "https://github.com/txamqp/txamqp")
9301 (synopsis "Communicate with AMQP peers and brokers using Twisted")
9302 (description
9303 "This package provides a Python library for communicating with AMQP peers
9304and brokers using the asynchronous networking framework Twisted. It contains
9305all the necessary code to connect, send and receive messages to/from an
9306AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
9307also includes support for using Thrift RPC over AMQP in Twisted
9308applications.")
9309 (license license:asl2.0)))
9310
9311(define-public python2-txamqp
9312 (package-with-python2 python-txamqp))
9313
9314(define-public python-kombu
9315 (package
9316 (name "python-kombu")
9317 (version "4.2.2")
9318 (source
9319 (origin
9320 (method url-fetch)
9321 (uri (pypi-uri "kombu" version))
9322 (sha256
9323 (base32
9324 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
9325 (build-system python-build-system)
9326 (native-inputs
9327 `(("python-mock" ,python-mock)
9328 ("python-case" ,python-case)
9329 ("python-pyro4" ,python-pyro4)
9330 ("python-pytest-sugar" ,python-pytest-sugar)
9331 ("python-pytz" ,python-pytz)))
9332 (propagated-inputs
9333 `(("python-anyjson" ,python-anyjson)
9334 ("python-amqp" ,python-amqp)
9335 ("python-redis" ,python-redis)))
9336 (home-page "https://kombu.readthedocs.io")
9337 (synopsis "Message passing library for Python")
9338 (description "The aim of Kombu is to make messaging in Python as easy as
9339possible by providing an idiomatic high-level interface for the AMQ protocol,
9340and also provide proven and tested solutions to common messaging problems.
9341AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
9342message orientation, queuing, routing, reliability and security, for which the
9343RabbitMQ messaging server is the most popular implementation.")
9344 (license license:bsd-3)
9345 (properties `((python2-variant . ,(delay python2-kombu))))))
9346
9347(define-public python2-kombu
9348 (let ((kombu (package-with-python2
9349 (strip-python2-variant python-kombu))))
9350 (package
9351 (inherit kombu)
9352 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
9353 ;; It works fine on the python3 variant.
9354 #:tests? #f
9355 ,@(package-arguments kombu)))
9356 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9357 ,@(package-native-inputs kombu))))))
9358
9359(define-public python-billiard
9360 (package
9361 (name "python-billiard")
9362 (version "3.5.0.5")
9363 (source
9364 (origin
9365 (method url-fetch)
9366 (uri (pypi-uri "billiard" version))
9367 (sha256
9368 (base32
9369 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
9370 (build-system python-build-system)
9371 (native-inputs
9372 `(("python-case" ,python-case)
9373 ("python-pytest" ,python-pytest)))
9374 (home-page "https://github.com/celery/billiard")
9375 (synopsis
9376 "Python multiprocessing fork with improvements and bugfixes")
9377 (description
9378 "Billiard is a fork of the Python 2.7 multiprocessing package. The
9379multiprocessing package itself is a renamed and updated version of R Oudkerk's
9380pyprocessing package. This standalone variant is intended to be compatible with
9381Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
9382 (license license:bsd-3)
9383 (properties `((python2-variant . ,(delay python2-billiard))))))
9384
9385(define-public python2-billiard
9386 (let ((billiard (package-with-python2
9387 (strip-python2-variant python-billiard))))
9388 (package
9389 (inherit billiard)
9390 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9391 ("python2-mock" ,python2-mock)
9392 ,@(package-native-inputs billiard))))))
9393
9394(define-public python-celery
9395 (package
9396 (name "python-celery")
9397 (version "4.2.1")
9398 (source
9399 (origin
9400 (method url-fetch)
9401 (uri (pypi-uri "celery" version))
9402 (sha256
9403 (base32
9404 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
9405 (build-system python-build-system)
9406 (arguments
9407 '(;; TODO The tests fail with Python 3.7
9408 ;; https://github.com/celery/celery/issues/4849
9409 #:tests? #f
9410 #:phases
9411 (modify-phases %standard-phases
9412 (add-after 'unpack 'patch-requirements
9413 (lambda _
9414 (substitute* "requirements/test.txt"
9415 (("pytest>=3\\.0,<3\\.3")
9416 "pytest>=3.0"))
9417 #t)))))
9418 (native-inputs
9419 `(("python-case" ,python-case)
9420 ("python-pytest" ,python-pytest)))
9421 (propagated-inputs
9422 `(("python-pytz" ,python-pytz)
9423 ("python-billiard" ,python-billiard)
9424 ("python-kombu" ,python-kombu)))
9425 (home-page "https://celeryproject.org")
9426 (synopsis "Distributed Task Queue")
9427 (description "Celery is an asynchronous task queue/job queue based on
9428distributed message passing. It is focused on real-time operation, but
9429supports scheduling as well. The execution units, called tasks, are executed
9430concurrently on a single or more worker servers using multiprocessing,
9431Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
9432synchronously (wait until ready).")
9433 (license license:bsd-3)
9434 (properties `((python2-variant . ,(delay python2-celery))))))
9435
9436(define-public python2-celery
9437 (let ((celery (package-with-python2
9438 (strip-python2-variant python-celery))))
9439 (package
9440 (inherit celery)
9441 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9442 ("python2-mock" ,python2-mock)
9443 ,@(package-native-inputs celery))))))
9444
9445(define-public python-translitcodec
9446 (package
9447 (name "python-translitcodec")
9448 (version "0.4.0")
9449 (source
9450 (origin
9451 (method url-fetch)
9452 (uri (pypi-uri "translitcodec" version))
9453 (sha256
9454 (base32
9455 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
9456 (build-system python-build-system)
9457 (arguments
9458 `(#:tests? #f)) ; no tests provided
9459 (home-page
9460 "https://github.com/claudep/translitcodec")
9461 (synopsis
9462 "Unicode to 8-bit charset transliteration codec")
9463 (description
9464 "This package contains codecs for transliterating ISO 10646 texts into
9465best-effort representations using smaller coded character sets (ASCII,
9466ISO 8859, etc.).")
9467 (license license:expat)))
9468
9469(define-public python2-translitcodec
9470 (package-with-python2 python-translitcodec))
9471
9472(define-public python-editor
9473 (package
9474 (name "python-editor")
9475 (version "0.5")
9476 (source
9477 (origin
9478 (method url-fetch)
9479 (uri (pypi-uri "python-editor" version))
9480 (sha256
9481 (base32
9482 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
9483 (build-system python-build-system)
9484 (home-page
9485 "https://github.com/fmoo/python-editor")
9486 (synopsis
9487 "Programmatically open an editor, capture the result")
9488 (description
9489 "python-editor is a library that provides the editor module for
9490programmatically interfacing with your system's $EDITOR.")
9491 (license license:asl2.0)))
9492
9493(define-public python2-editor
9494 (package-with-python2 python-editor))
9495
44d10b1f
RW
9496(define-public python-vobject
9497 (package
9498 (name "python-vobject")
9499 (version "0.9.5")
9500 (source (origin
9501 (method url-fetch)
9502 (uri (pypi-uri "vobject" version))
9503 (sha256
9504 (base32
9505 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
9506 (build-system python-build-system)
9507 (arguments
9508 '(;; The test suite relies on some non-portable Windows interfaces.
9509 #:tests? #f))
9510 (propagated-inputs
9511 `(("python-dateutil" ,python-dateutil)
9512 ("python-pyicu" ,python-pyicu)))
9513 (synopsis "Parse and generate vCard and vCalendar files")
9514 (description "Vobject is intended to be a full featured Python package for
9515parsing and generating vCard and vCalendar files. Currently, iCalendar files
9516are supported and well tested. vCard 3.0 files are supported, and all data
9517should be imported, but only a few components are understood in a sophisticated
9518way.")
9519 (home-page "http://eventable.github.io/vobject/")
9520 (license license:asl2.0)))
9521
9522(define-public python2-vobject
9523 (package-with-python2 python-vobject))
9524
9525(define-public python-munkres
9526 (package
9527 (name "python-munkres")
9528 (version "1.0.8")
9529 (source (origin
9530 (method url-fetch)
9531 (uri (pypi-uri "munkres" version))
9532 (sha256
9533 (base32
9534 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
9535 (build-system python-build-system)
9536 (arguments
9537 '(#:tests? #f)) ; no test suite
9538 (home-page "http://software.clapper.org/munkres/")
9539 (synopsis "Implementation of the Munkres algorithm")
9540 (description "The Munkres module provides an implementation of the Munkres
9541algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
9542useful for solving the Assignment Problem.")
9543 (license license:bsd-3)))
9544
9545(define-public python2-munkres
9546 (package-with-python2 python-munkres))
9547
9548(define-public python-whoosh
9549 (package
9550 (name "python-whoosh")
9551 (version "2.7.4")
9552 (source
9553 (origin
9554 (method url-fetch)
9555 (uri (pypi-uri "Whoosh" version))
9556 (sha256
9557 (base32
9558 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
9559 (build-system python-build-system)
9560 (native-inputs
9561 `(("python-pytest" ,python-pytest)))
9562 (home-page "https://bitbucket.org/mchaput/whoosh")
9563 (synopsis "Full text indexing, search, and spell checking library")
9564 (description
9565 "Whoosh is a fast, pure-Python full text indexing, search, and spell
9566checking library.")
9567 (license license:bsd-2)))
9568
9569(define-public python2-whoosh
9570 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
9571 (package (inherit whoosh)
9572 (propagated-inputs
9573 `(("python2-backport-ssl-match-hostname"
9574 ,python2-backport-ssl-match-hostname)
9575 ,@(package-propagated-inputs whoosh))))))
9576
9577(define-public python-pathlib
9578 (package
9579 (name "python-pathlib")
9580 (version "1.0.1")
9581 (source (origin
9582 (method url-fetch)
9583 (uri (pypi-uri "pathlib" version))
9584 (sha256
9585 (base32
9586 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
9587 (build-system python-build-system)
9588 ;; The tests depend on the internal "test" module, which does not provide
9589 ;; a stable interface.
9590 (arguments `(#:tests? #f))
9591 (home-page "https://pathlib.readthedocs.org/")
9592 (synopsis "Object-oriented file system paths")
9593 (description "Pathlib offers a set of classes to handle file system paths.
9594It offers the following advantages over using string objects:
9595
9596@enumerate
9597@item No more cumbersome use of os and os.path functions. Everything can
9598be done easily through operators, attribute accesses, and method calls.
9599@item Embodies the semantics of different path types. For example,
9600comparing Windows paths ignores casing.
9601@item Well-defined semantics, eliminating any inconsistencies or
9602ambiguities (forward vs. backward slashes, etc.).
9603@end enumerate
9604
9605Note: In Python 3.4, pathlib is now part of the standard library. For other
9606Python versions please consider python-pathlib2 instead, which tracks the
9607standard library module. This module (python-pathlib) isn't maintained
9608anymore.")
9609 (license license:expat)))
9610
9611(define-public python2-pathlib
9612 (package-with-python2 python-pathlib))
9613
9614(define-public python2-pathlib2
9615 (package
9616 (name "python2-pathlib2")
54da6f9f 9617 (version "2.3.3")
44d10b1f
RW
9618 (source (origin
9619 (method url-fetch)
9620 (uri (pypi-uri "pathlib2" version))
9621 (sha256
9622 (base32
54da6f9f 9623 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
44d10b1f
RW
9624 (build-system python-build-system)
9625 ;; We only need the the Python 2 variant, since for Python 3 our minimum
9626 ;; version is 3.4 which already includes this package as part of the
9627 ;; standard library.
9628 (arguments
9629 `(#:python ,python-2))
9630 (propagated-inputs
9631 `(("python2-scandir" ,python2-scandir)
9632 ("python2-six" ,python2-six)))
9633 (home-page "https://pypi.python.org/pypi/pathlib2/")
9634 (synopsis "Object-oriented file system paths - backport of standard
9635pathlib module")
9636 (description "The goal of pathlib2 is to provide a backport of standard
9637pathlib module which tracks the standard library module, so all the newest
9638features of the standard pathlib can be used also on older Python versions.
9639
9640Pathlib offers a set of classes to handle file system paths. It offers the
9641following advantages over using string objects:
9642
9643@enumerate
9644@item No more cumbersome use of os and os.path functions. Everything can
9645be done easily through operators, attribute accesses, and method calls.
9646@item Embodies the semantics of different path types. For example,
9647comparing Windows paths ignores casing.
9648@item Well-defined semantics, eliminating any inconsistencies or
9649ambiguities (forward vs. backward slashes, etc.).
9650@end enumerate")
9651 (license license:expat)))
9652
9653(define-public python2-pathlib2-bootstrap
9654 (hidden-package
9655 (package
9656 (inherit python2-pathlib2)
9657 (name "python2-pathlib2-bootstrap")
9658 (propagated-inputs
9659 `(("python2-scandir" ,python2-scandir)
9660 ("python2-six" ,python2-six-bootstrap))))))
9661
9662(define-public python-jellyfish
9663 (package
9664 (name "python-jellyfish")
9665 (version "0.5.6")
9666 (source (origin
9667 (method url-fetch)
9668 (uri (pypi-uri "jellyfish" version))
9669 (sha256
9670 (base32
9671 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
9672 (build-system python-build-system)
9673 (native-inputs
9674 `(("python-pytest" ,python-pytest)))
9675 (home-page "https://github.com/jamesturk/jellyfish")
9676 (synopsis "Approximate and phonetic matching of strings")
9677 (description "Jellyfish uses a variety of string comparison and phonetic
9678encoding algorithms to do fuzzy string matching.")
9679 (license license:bsd-2)
9680 (properties `((python2-variant . ,(delay python2-jellyfish))))))
9681
9682(define-public python2-jellyfish
9683 (let ((jellyfish (package-with-python2
9684 (strip-python2-variant python-jellyfish))))
9685 (package (inherit jellyfish)
9686 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
9687 ,@(package-native-inputs jellyfish))))))
9688
9689(define-public python2-unicodecsv
9690 (package
9691 (name "python2-unicodecsv")
9692 (version "0.14.1")
9693 (source (origin
9694 (method url-fetch)
9695 ;; The test suite is not included in the PyPi release.
9696 ;; https://github.com/jdunck/python-unicodecsv/issues/19
9697 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
9698 "archive/" version ".tar.gz"))
9699 (file-name (string-append name "-" version ".tar.gz"))
9700 (sha256
9701 (base32
9702 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
9703 (build-system python-build-system)
9704 (arguments
9705 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
9706 #:python ,python-2))
9707 (native-inputs
9708 `(("python2-unittest2" ,python2-unittest2)))
9709 (home-page "https://github.com/jdunck/python-unicodecsv")
9710 (synopsis "Unicode CSV module for Python 2")
9711 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
9712module, adding support for Unicode strings.")
9713 (license license:bsd-2)))
9714
9715(define-public python-rarfile
9716 (package
9717 (name "python-rarfile")
9718 (version "2.8")
9719 (source (origin
9720 (method url-fetch)
9721 (uri (pypi-uri "rarfile" version))
9722 (sha256
9723 (base32
9724 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
9725 (build-system python-build-system)
9726 (arguments
9727 '(#:phases
9728 (modify-phases %standard-phases
9729 (replace 'check
9730 ;; Many tests fail, but the installation proceeds.
e59dd341 9731 (lambda _ (invoke "make" "-C" "test" "test"))))))
44d10b1f
RW
9732 (native-inputs
9733 `(("which" ,which))) ; required for tests
9734 (propagated-inputs
9735 `(("libarchive" ,libarchive)))
9736 (home-page "https://github.com/markokr/rarfile")
9737 (synopsis "RAR archive reader for Python")
9738 (description "This is Python module for RAR archive reading. The interface
9739is made as zipfile like as possible.")
9740 (license license:isc)))
9741
9742(define-public python2-rarfile
9743 (package-with-python2 python-rarfile))
9744
9745(define-public python-magic
9746 (package
9747 (name "python-magic")
9748 (version "0.4.15")
9749 (source
9750 (origin
9751 (method url-fetch)
9752 (uri (pypi-uri "python-magic" version))
9753 (sha256
9754 (base32
9755 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
9756 (file-name (string-append name "-" version "-checkout"))))
9757 (build-system python-build-system)
9758 (arguments
9759 ;; The tests are unreliable, so don't run them. The tests fail
9760 ;; under Python3 because they were written for Python2 and
9761 ;; contain import statements that do not work in Python3. One of
9762 ;; the tests fails under Python2 because its assertions are
9763 ;; overly stringent; it relies on comparing output strings which
9764 ;; are brittle and can change depending on the version of
9765 ;; libmagic being used and the system on which the test is
9766 ;; running. In my case, under GuixSD 0.10.0, only one test
9767 ;; failed, and it seems to have failed only because the version
9768 ;; of libmagic that is packaged in Guix outputs a slightly
9769 ;; different (but not wrong) string than the one that the test
9770 ;; expected.
9771 '(#:tests? #f
9772 #:phases (modify-phases %standard-phases
9773 ;; Replace a specific method call with a hard-coded
9774 ;; path to the necessary libmagic.so file in the
9775 ;; store. If we don't do this, then the method call
9776 ;; will fail to find the libmagic.so file, which in
9777 ;; turn will cause any application using
9778 ;; python-magic to fail.
9779 (add-before 'build 'hard-code-path-to-libmagic
9780 (lambda* (#:key inputs #:allow-other-keys)
9781 (let ((file (assoc-ref inputs "file")))
9782 (substitute* "magic.py"
9783 (("ctypes.util.find_library\\('magic'\\)")
9784 (string-append "'" file "/lib/libmagic.so'")))
9785 #t)))
9786 (add-before 'install 'disable-egg-compression
9787 (lambda _
9788 (let ((port (open-file "setup.cfg" "a")))
9789 (display "\n[easy_install]\nzip_ok = 0\n"
9790 port)
9791 (close-port port)
9792 #t))))))
9793 (inputs
9794 ;; python-magic needs to be able to find libmagic.so.
9795 `(("file" ,file)))
9796 (home-page
9797 "https://github.com/ahupp/python-magic")
9798 (synopsis
9799 "File type identification using libmagic")
9800 (description
9801 "This module uses ctypes to access the libmagic file type
9802identification library. It makes use of the local magic database and
9803supports both textual and MIME-type output. Note that this module and
9804the python-file module both provide a \"magic.py\" file; these two
9805modules, which are different and were developed separately, both serve
9806the same purpose: to provide Python bindings for libmagic.")
9807 (license license:expat)))
9808
9809(define-public python2-magic
9810 (package-with-python2 python-magic))
9811
9812(define-public python2-s3cmd
9813 (package
9814 (name "python2-s3cmd")
9815 (version "1.6.1")
9816 (source
9817 (origin
9818 (method url-fetch)
9819 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
9820 "s3cmd-" version ".tar.gz"))
9821 (sha256
9822 (base32
9823 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
9824 (build-system python-build-system)
9825 (arguments
9826 ;; s3cmd is written for python2 only and contains no tests.
9827 `(#:python ,python-2
9828 #:tests? #f))
9829 (propagated-inputs
9830 `(("python2-dateutil" ,python2-dateutil)
9831 ;; The python-file package also provides a magic.py module.
9832 ;; This is an unfortunate state of affairs; however, s3cmd
9833 ;; fails to install if it cannot find specifically the
9834 ;; python-magic package. Thus we include it, instead of using
9835 ;; python-file. Ironically, s3cmd sometimes works better
9836 ;; without libmagic bindings at all:
9837 ;; https://github.com/s3tools/s3cmd/issues/198
9838 ("python2-magic" ,python2-magic)))
9839 (home-page "http://s3tools.org/s3cmd")
9840 (synopsis "Command line tool for S3-compatible storage services")
9841 (description
9842 "S3cmd is a command line tool for uploading, retrieving and managing data
9843in storage services that are compatible with the Amazon Simple Storage
9844Service (S3) protocol, including S3 itself. It supports rsync-like backup,
9845GnuPG encryption, and more. It also supports management of Amazon's
9846CloudFront content delivery network.")
9847 (license license:gpl2+)))
9848
9849(define-public python-pkgconfig
9850 (package
9851 (name "python-pkgconfig")
9852 (version "1.3.1")
9853 (source
9854 (origin
9855 (method url-fetch)
9856 (uri (pypi-uri "pkgconfig" version))
9857 (sha256
9858 (base32
9859 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
9860 (build-system python-build-system)
9861 (native-inputs
9862 `(("python-nose" ,python-nose)))
9863 (inputs
9864 `(("pkg-config" ,pkg-config)))
9865 (arguments
9866 `(#:phases
9867 (modify-phases %standard-phases
9868 (add-before 'build 'patch
9869 ;; Hard-code the path to pkg-config.
9870 (lambda _
9871 (substitute* "pkgconfig/pkgconfig.py"
9872 (("cmd = 'pkg-config")
9873 (string-append "cmd = '" (which "pkg-config"))))
9874 #t))
9875 (replace 'check
9876 (lambda _
9877 (invoke "nosetests" "test.py"))))))
9878 (home-page "https://github.com/matze/pkgconfig")
9879 (synopsis "Python interface for pkg-config")
9880 (description "This module provides a Python interface to pkg-config. It
9881can be used to find all pkg-config packages, check if a package exists,
9882check if a package meets certain version requirements, query CFLAGS and
9883LDFLAGS and parse the output to build extensions with setup.py.")
9884 (license license:expat)))
9885
9886(define-public python2-pkgconfig
9887 (package-with-python2 python-pkgconfig))
9888
9889(define-public python-bz2file
9890 (package
9891 (name "python-bz2file")
9892 (version "0.98")
9893 (source
9894 (origin
9895 (method url-fetch)
9896 (uri (pypi-uri "bz2file" version))
9897 (sha256
9898 (base32
9899 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
9900 (build-system python-build-system)
9901 (arguments
9902 `(#:tests? #f)) ; Tests use deprecated python modules.
9903 (home-page "https://github.com/nvawda/bz2file")
9904 (synopsis "Read and write bzip2-compressed files")
9905 (description
9906 "Bz2file is a Python library for reading and writing bzip2-compressed
9907files. It contains a drop-in replacement for the I/O interface in the
9908standard library's @code{bz2} module, including features from the latest
9909development version of CPython that are not available in older releases.")
9910 (license license:asl2.0)))
9911
9912(define-public python2-bz2file
9913 (package-with-python2 python-bz2file))
9914
9915(define-public python-future
9916 (package
9917 (name "python-future")
d5d54030 9918 (version "0.17.1")
44d10b1f
RW
9919 (source
9920 (origin
9921 (method url-fetch)
9922 (uri (pypi-uri "future" version))
9923 (sha256
9924 (base32
d5d54030 9925 "1f2rlqn9rh7adgir52dlbqz69gsab44x0mlm8gf1cs7xvhv54137"))))
44d10b1f
RW
9926 (build-system python-build-system)
9927 ;; Many tests connect to the network or are otherwise flawed.
9928 ;; https://github.com/PythonCharmers/python-future/issues/210
9929 (arguments
9930 `(#:tests? #f))
9931 (home-page "http://python-future.org")
9932 (synopsis "Single-source support for Python 3 and 2")
9933 (description
9934 "@code{python-future} is the missing compatibility layer between Python 2 and
9935Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
9936to support both Python 2 and Python 3 with minimal overhead.")
9937 (license license:expat)))
9938
9939(define-public python2-future
9940 (package-with-python2 python-future))
9941
9942(define-public python-cysignals
9943 (package
9944 (name "python-cysignals")
8e3e51df 9945 (version "1.9.0")
44d10b1f
RW
9946 (source
9947 (origin
9948 (method url-fetch)
8e3e51df 9949 (uri (pypi-uri "cysignals" version))
44d10b1f
RW
9950 (sha256
9951 (base32
8e3e51df 9952 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
44d10b1f
RW
9953 (build-system python-build-system)
9954 (native-inputs
9955 `(("python-cython" ,python-cython)
9956 ("python-sphinx" ,python-sphinx)))
9957 (inputs
9958 `(("pari-gp" ,pari-gp)))
9959 (arguments
9960 `(#:modules ((guix build python-build-system)
9961 ((guix build gnu-build-system) #:prefix gnu:)
9962 (guix build utils))
9963 ;; FIXME: Tests are executed after installation and currently fail
9964 ;; when not installing into standard locations; the author is working
9965 ;; on a fix.
9966 #:tests? #f
9967 #:phases
9968 (modify-phases %standard-phases
9969 (add-before
9970 'build 'configure
9971 (assoc-ref gnu:%standard-phases 'configure)))))
9972 (home-page
9973 "https://github.com/sagemath/cysignals")
9974 (synopsis
9975 "Handling of interrupts and signals for Cython")
9976 (description
9977 "The cysignals package provides mechanisms to handle interrupts (and
9978other signals and errors) in Cython code, using two related approaches,
9979for mixed Cython/Python code or external C libraries and pure Cython code,
9980respectively.")
9981 (license license:lgpl3+)))
9982
9983(define-public python2-cysignals
9984 (package-with-python2 python-cysignals))
9985
9986(define-public python2-shedskin
9987 (package
9988 (name "python2-shedskin")
9989 (version "0.9.4")
9990 (source
9991 (origin
9992 (method url-fetch)
9993 (uri (string-append "https://github.com/shedskin/shedskin/"
9994 "releases/download/v" version
9995 "/shedskin-" version ".tgz"))
9996 (sha256
9997 (base32
9998 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
9999 (build-system python-build-system)
10000 (arguments
10001 `(#:python ,python-2
10002 #:phases (modify-phases %standard-phases
10003 (add-after 'unpack 'fix-resulting-include-libs
10004 (lambda* (#:key inputs #:allow-other-keys)
10005 (let ((libgc (assoc-ref inputs "libgc"))
10006 (pcre (assoc-ref inputs "pcre")))
10007 (substitute* "shedskin/makefile.py"
10008 (("variable == 'CCFLAGS':[ ]*")
10009 (string-append "variable == 'CCFLAGS':\n"
10010 " line += ' -I " pcre "/include"
10011 " -I " libgc "/include'"))
10012 (("variable == 'LFLAGS':[ ]*")
10013 (string-append "variable == 'LFLAGS':\n"
10014 " line += ' -L" pcre "/lib"
10015 " -L " libgc "/lib'")))
10016 #t))))))
10017 (inputs `(("pcre" ,pcre)
10018 ("libgc" ,libgc)))
10019 (home-page "https://shedskin.github.io/")
10020 (synopsis "Experimental Python-2 to C++ Compiler")
10021 (description (string-append "This is an experimental compiler for a subset of
10022Python. It generates C++ code and a Makefile."))
10023 (license (list license:gpl3 license:bsd-3 license:expat))))
10024
10025(define-public python2-rope
10026 (package
10027 (name "python2-rope")
a9ba0a31 10028 (version "0.11.0")
44d10b1f
RW
10029 (source
10030 (origin
10031 (method url-fetch)
10032 (uri (pypi-uri "rope" version))
10033 (sha256
10034 (base32
a9ba0a31 10035 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
44d10b1f 10036 (arguments
afb29715 10037 ;; Rope has only partial python3 support, see `python-rope'
44d10b1f
RW
10038 `(#:python ,python-2))
10039 (build-system python-build-system)
10040 (native-inputs
10041 `(("python2-unittest2" ,python2-unittest2)))
10042 (home-page "https://github.com/python-rope/rope")
10043 (synopsis "Refactoring library for Python")
10044 (description "Rope is a refactoring library for Python. It facilitates
10045the renaming, moving and extracting of attributes, functions, modules, fields
10046and parameters in Python 2 source code. These refactorings can also be applied
10047to occurrences in strings and comments.")
10048 (license license:gpl2)))
10049
2c880ef4
LC
10050(define-public python-rope
10051 (package
10052 (inherit python2-rope)
10053 (name "python-rope")
10054 (arguments `(#:python ,python-wrapper
10055 ;; XXX: Only partial python3 support, results in some failing
10056 ;; tests: <https://github.com/python-rope/rope/issues/247>.
10057 #:tests? #f))
10058 (properties `((python2-variant . ,(delay python2-rope))))))
10059
44d10b1f
RW
10060(define-public python-py3status
10061 (package
10062 (name "python-py3status")
ef68b35d 10063 (version "3.21")
44d10b1f
RW
10064 (source
10065 (origin
10066 (method url-fetch)
10067 (uri (pypi-uri "py3status" version))
10068 (sha256
ef68b35d 10069 (base32 "16z8zq83hxy48g6hh4xczbdz50qvxv9k1aahr4fqq7jis60cc262"))))
44d10b1f
RW
10070 (build-system python-build-system)
10071 (inputs
10072 `(("file" ,file)))
10073 (arguments
10074 '(#:phases
10075 (modify-phases %standard-phases
10076 ;; 'file' is used for detection of configuration file encoding
10077 ;; let's make link the dependency to particular input
10078 (add-before 'build 'patch-file-path
10079 (lambda* (#:key inputs #:allow-other-keys)
10080 (let ((file-path (assoc-ref inputs "file")))
10081 (substitute* "py3status/parse_config.py"
10082 (("\\['file', '-b'")
10083 (string-append "['" file-path "/bin/file', '-b'")))
10084 #t))))
10085 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
10086 (home-page "https://github.com/ultrabug/py3status")
10087 (synopsis "Extensible i3status wrapper written in Python")
10088 (description "py3status is an i3status wrapper which extends i3status
10089functionality in a modular way, allowing you to extend your panel with your
10090own code, responding to click events and updating clock every second.")
10091 (license license:bsd-3)))
10092
10093(define-public python-tblib
10094 (package
10095 (name "python-tblib")
10096 (version "1.3.2")
10097 (source (origin
10098 (method url-fetch)
10099 (uri (pypi-uri "tblib" version))
10100 (sha256 (base32
10101 "1rsg8h069kqgncyv8fgzyj6qflk6j10cb78pa5jk34ixwq044vj3"))))
10102 (build-system python-build-system)
10103 (arguments
10104 `(#:phases
10105 (modify-phases %standard-phases
10106 (add-before 'check 'adjust-tests
10107 (lambda _
10108 (when (which "python3")
10109 ;; Adjust the example output to match that of Python 3.7:
10110 ;; <https://github.com/ionelmc/python-tblib/issues/36>.
10111 (substitute* "README.rst"
10112 (("Exception\\('fail',") "Exception('fail'"))
10113 #t)))
10114 (replace 'check
10115 (lambda _
10116 ;; Upstream runs tests after installation and the package itself
10117 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
10118 ;; found.
10119 (setenv "PYTHONPATH"
10120 (string-append (getcwd) "/build/lib:"
10121 (getenv "PYTHONPATH")))
10122 (invoke "py.test" "-vv" "tests" "README.rst"))))))
10123 (native-inputs
10124 `(("python-pytest" ,python-pytest)
10125 ("python-six" ,python-six)))
10126 (home-page "https://github.com/ionelmc/python-tblib")
10127 (synopsis "Traceback serialization library")
10128 (description
10129 "Traceback serialization allows you to:
10130
10131@enumerate
10132@item Pickle tracebacks and raise exceptions with pickled tracebacks in
10133different processes. This allows better error handling when running code over
10134multiple processes (imagine multiprocessing, billiard, futures, celery etc).
10135
10136@item Parse traceback strings and raise with the parsed tracebacks.
10137@end enumerate\n")
10138 (license license:bsd-3)))
10139
10140(define-public python2-tblib
10141 (package-with-python2 python-tblib))
10142
10143(define-public python-greenlet
10144 (package
10145 (name "python-greenlet")
10146 (version "0.4.15")
10147 (source (origin
10148 (method url-fetch)
10149 (uri (pypi-uri "greenlet" version))
10150 (sha256
10151 (base32
10152 "1g4g1wwc472ds89zmqlpyan3fbnzpa8qm48z3z1y6mlk44z485ll"))))
10153 (build-system python-build-system)
10154 (home-page "https://greenlet.readthedocs.io/")
10155 (synopsis "Lightweight in-process concurrent programming")
10156 (description
10157 "Greenlet package is a spin-off of Stackless, a version of CPython
10158that supports micro-threads called \"tasklets\". Tasklets run
10159pseudo-concurrently (typically in a single or a few OS-level threads) and
10160are synchronized with data exchanges on \"channels\".")
10161 (license (list license:psfl license:expat))))
10162
10163(define-public python2-greenlet
10164 (package-with-python2 python-greenlet))
10165
10166(define-public python-objgraph
10167 (package
10168 (name "python-objgraph")
10169 (version "3.4.0")
10170 (source
10171 (origin
10172 (method url-fetch)
10173 (uri (pypi-uri "objgraph" version))
10174 (sha256
10175 (base32
10176 "184m09am5gpbqfaiy7l0hwh476mczbrly1dffs0rw2p1d1i2q32a"))))
10177 (build-system python-build-system)
10178 (propagated-inputs
10179 `(("python-graphviz" ,python-graphviz)))
10180 (native-inputs
10181 `(("python-mock" ,python-mock)
10182 ("graphviz" ,graphviz)))
10183 (home-page "https://mg.pov.lt/objgraph/")
10184 (synopsis "Draw Python object reference graphs with graphviz")
10185 (description
10186 "This package provides tools to draw Python object reference graphs with
10187graphviz.")
10188 (license license:expat)))
10189
10190(define-public python-gevent
10191 (package
10192 (name "python-gevent")
10193 (version "1.3.7")
10194 (source (origin
10195 (method url-fetch)
10196 (uri (pypi-uri "gevent" version))
10197 (sha256
10198 (base32
10199 "0b0fr04qdk1p4sniv87fh8z5psac60x01pv054kpgi94520g81iz"))
10200 (modules '((guix build utils)))
10201 (snippet
10202 '(begin
10203 ;; unbunding libev and c-ares
10204 (delete-file-recursively "deps")
10205 #t))))
10206 (build-system python-build-system)
10207 (arguments
10208 `(#:modules ((ice-9 ftw)
10209 (ice-9 match)
10210 (srfi srfi-26)
10211 (guix build utils)
10212 (guix build python-build-system))
10213 #:phases (modify-phases %standard-phases
44d10b1f
RW
10214 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
10215 (lambda _
10216 (substitute* "src/gevent/subprocess.py"
10217 (("/bin/sh") (which "sh")))
10218 (for-each (lambda (file)
10219 (substitute* file
10220 (("/bin/sh") (which "sh"))
10221 (("/bin/true") (which "true"))))
10222 (find-files "src/greentest" "\\.py$"))
10223 #t))
10224 (add-before 'build 'do-not-use-bundled-sources
10225 (lambda* (#:key inputs #:allow-other-keys)
10226 (setenv "CONFIG_SHELL" (which "bash"))
10227 (setenv "LIBEV_EMBED" "false")
10228 (setenv "CARES_EMBED" "false")
10229 (setenv "EMBED" "false")
10230
b5b56b7f
MB
10231 ;; Prevent building bundled libev.
10232 (substitute* "setup.py"
10233 (("run_make=_BUILDING")
10234 "run_make=False"))
10235
44d10b1f
RW
10236 (let ((greenlet (string-append
10237 (assoc-ref inputs "python-greenlet")
10238 "/include")))
10239 (match (scandir greenlet
10240 (lambda (item)
10241 (string-prefix? "python" item)))
10242 ((python)
b5b56b7f 10243 (setenv "C_INCLUDE_PATH"
44d10b1f
RW
10244 (string-append greenlet "/" python)))))
10245 #t))
10246 (add-before 'check 'skip-timer-test
10247 (lambda _
10248 ;; XXX: Skip 'TestTimerResolution', which appears to be
10249 ;; unreliable.
10250 (substitute* "src/greentest/test__core_timer.py"
10251 (("not greentest.RUNNING_ON_CI") "False"))
10252 #t))
10253 (replace 'check
10254 (lambda _
10255 ;; Make sure the build directory is on PYTHONPATH.
10256 (setenv "PYTHONPATH"
10257 (string-append
10258 (getenv "PYTHONPATH") ":"
10259 (getcwd) "/build/"
10260 (car (scandir "build" (cut string-prefix? "lib." <>)))))
10261 (with-directory-excursion "src/greentest"
10262 ;; XXX: Many tests require network access. Instead we only
10263 ;; run known-good tests. Unfortunately we cannot use
10264 ;; recursion here since this directory also contains
10265 ;; Python-version-specific subfolders.
10266 (apply invoke "python" "testrunner.py" "--config"
10267 "known_failures.py"
10268 (scandir "." (cut regexp-exec
10269 (make-regexp "test_+(subprocess|core)")
10270 <>)))))))))
10271 (propagated-inputs
10272 `(("python-greenlet" ,python-greenlet)
10273 ("python-objgraph" ,python-objgraph)))
10274 (native-inputs
b5b56b7f 10275 `(("python-six" ,python-six)))
44d10b1f
RW
10276 (inputs
10277 `(("c-ares" ,c-ares)
10278 ("libev" ,libev)))
10279 (home-page "http://www.gevent.org/")
10280 (synopsis "Coroutine-based network library")
10281 (description
10282 "gevent is a coroutine-based Python networking library that uses greenlet
10283to provide a high-level synchronous API on top of the libev event loop.")
10284 (license license:expat)
10285 (properties `((python2-variant . ,(delay python2-gevent))))))
10286
10287(define-public python2-gevent
10288 (let ((base (package-with-python2
10289 (strip-python2-variant python-gevent))))
10290 (package
10291 (inherit base)
10292 (native-inputs `(,@(package-native-inputs python-gevent)
10293 ("python-mock" ,python2-mock))))))
10294
10295(define-public python-fastimport
10296 (package
10297 (name "python-fastimport")
10298 (version "0.9.6")
10299 (source
10300 (origin
10301 (method url-fetch)
10302 (uri (pypi-uri "fastimport" version))
10303 (sha256
10304 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
10305 (build-system python-build-system)
10306 (home-page "https://github.com/jelmer/python-fastimport")
10307 (synopsis "VCS fastimport parser and generator in Python")
10308 (description "This package provides a parser for and generator of the Git
10309@url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
10310format.")
10311 (license license:gpl2+)))
10312
10313(define-public python2-fastimport
10314 (package-with-python2 python-fastimport))
10315
10316(define-public python-twisted
10317 (package
10318 (name "python-twisted")
fdfad2fc 10319 (version "19.7.0")
44d10b1f
RW
10320 (source (origin
10321 (method url-fetch)
10322 (uri (pypi-uri "Twisted" version ".tar.bz2"))
10323 (sha256
10324 (base32
fdfad2fc 10325 "17d3hnxv9qndagzz63mdpyk99xj63p9gq586vjn0rxk8cl197nym"))))
44d10b1f
RW
10326 (build-system python-build-system)
10327 (arguments
0107c9b8 10328 '(#:tests? #f)) ; FIXME: some tests fail
44d10b1f
RW
10329 (propagated-inputs
10330 `(("python-zope-interface" ,python-zope-interface)
52ca1c4a 10331 ("python-pyhamcrest" ,python-pyhamcrest)
44d10b1f 10332 ("python-incremental" ,python-incremental)
e5ba2fe3 10333 ("python-hyperlink" ,python-hyperlink)
44d10b1f
RW
10334 ("python-constantly" ,python-constantly)
10335 ("python-automat" ,python-automat)))
10336 (home-page "https://twistedmatrix.com/")
10337 (synopsis "Asynchronous networking framework written in Python")
10338 (description
10339 "Twisted is an extensible framework for Python programming, with special
10340focus on event-based network programming and multiprotocol integration.")
10341 (license license:expat)))
10342
10343(define-public python2-twisted
10344 (package-with-python2 python-twisted))
10345
10346(define-public python-pika
10347 (package
10348 (name "python-pika")
10349 (version "0.12.0")
10350 (source
10351 (origin
10352 (method url-fetch)
10353 (uri (pypi-uri "pika" version))
10354 (sha256
10355 (base32
10356 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
10357 (build-system python-build-system)
10358 (native-inputs
10359 `(("python-pyev" ,python-pyev)
10360 ("python-tornado" ,python-tornado)
10361 ("python-twisted" ,python-twisted)))
10362 (home-page "https://pika.readthedocs.org")
10363 (synopsis "Pure Python AMQP Client Library")
10364 (description
10365 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
10366Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
10367network support library.")
10368 (license license:bsd-3)))
10369
10370(define-public python2-pika
10371 (package-with-python2 python-pika))
10372
10373(define-public python-ply
10374 (package
10375 (name "python-ply")
10376 (version "3.10")
10377 (source
10378 (origin
10379 (method url-fetch)
10380 (uri (pypi-uri "ply" version))
10381 (sha256
10382 (base32
10383 "1jxsr1d2f732r6ljhvm827113dckwl6qwakfvpbdhcbhvpvlmscn"))))
10384 (build-system python-build-system)
10385 (home-page "http://www.dabeaz.com/ply/")
10386 (synopsis "Python Lex & Yacc")
10387 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
10388It uses LR parsing and does extensive error checking.")
10389 (license license:bsd-3)))
10390
10391(define-public python2-ply
10392 (package-with-python2 python-ply))
10393
10394(define-public python-tabulate
10395 (package
10396 (name "python-tabulate")
10397 (version "0.7.7")
10398 (source (origin
10399 (method url-fetch)
10400 (uri (pypi-uri "tabulate" version))
10401 (sha256
10402 (base32
10403 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
10404 (build-system python-build-system)
10405 (arguments
10406 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
10407 ;; and the latest release is not tagged in the upstream repository.
10408 '(#:tests? #f))
10409 (home-page "https://bitbucket.org/astanin/python-tabulate")
10410 (synopsis "Pretty-print tabular data")
10411 (description
10412 "Tabulate is a library and command-line utility to pretty-print tabular
10413data in Python.")
10414 (license license:expat)))
10415
10416(define-public python2-tabulate
10417 (package-with-python2 python-tabulate))
10418
10419(define-public python-kazoo
10420 (package
10421 (name "python-kazoo")
10422 (version "2.4.0")
10423 (source
10424 (origin
10425 (method url-fetch)
10426 (uri (pypi-uri "kazoo" version))
10427 (sha256
10428 (base32
10429 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
10430 (build-system python-build-system)
10431 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
10432 (propagated-inputs
10433 `(("python-six" ,python-six)))
10434 (home-page "https://kazoo.readthedocs.org")
10435 (synopsis "High-level Zookeeper client library")
10436 (description
10437 "Kazoo is a Python client library for the Apache Zookeeper distributed
10438application service. It is designed to be easy to use and to avoid common
10439programming errors.")
10440 (license license:asl2.0)))
10441
10442(define-public python2-kazoo
10443 (package-with-python2 python-kazoo))
10444
10445(define-public python-pykafka
10446 (package
10447 (name "python-pykafka")
10448 (version "2.4.0")
10449 (source (origin
10450 (method url-fetch)
0ca1d040 10451 (uri (pypi-uri "pykafka" version))
44d10b1f
RW
10452 (sha256
10453 (base32
10454 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
10455 (build-system python-build-system)
10456 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
10457 (propagated-inputs
10458 `(("python-gevent" ,python-gevent)
10459 ("python-kazoo" ,python-kazoo)
10460 ("python-tabulate" ,python-tabulate)))
10461 (inputs
10462 `(("librdkafka" ,librdkafka)))
10463 (home-page "https://pykafka.readthedocs.io/")
10464 (synopsis "Apache Kafka client for Python")
10465 (description
10466 "PyKafka is a client for the Apache Kafka distributed messaging system.
10467It includes Python implementations of Kafka producers and consumers, which
10468are optionally backed by a C extension built on librdkafka.")
10469 (license license:asl2.0)))
10470
10471(define-public python2-pykafka
10472 (package-with-python2 python-pykafka))
10473
10474(define-public python-wcwidth
10475 (package
10476 (name "python-wcwidth")
10477 (version "0.1.7")
10478 (source
10479 (origin
10480 (method url-fetch)
10481 (uri (pypi-uri "wcwidth" version))
10482 (sha256
10483 (base32
10484 "0pn6dflzm609m4r3i8ik5ni9ijjbb5fa3vg1n7hn6vkd49r77wrx"))))
10485 (build-system python-build-system)
10486 (home-page "https://github.com/jquast/wcwidth")
10487 (synopsis "Measure number of terminal column cells of wide-character codes")
10488 (description "Wcwidth measures the number of terminal column cells of
10489wide-character codes. It is useful for those implementing a terminal emulator,
10490or programs that carefully produce output to be interpreted by one. It is a
10491Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
10492specified in POSIX.1-2001 and POSIX.1-2008.")
10493 (license license:expat)))
10494
10495(define-public python2-wcwidth
10496 (package-with-python2 python-wcwidth))
10497
10498(define-public python2-jsonrpclib
10499 (package
10500 (name "python2-jsonrpclib")
10501 (version "0.1.7")
10502 (source (origin
10503 (method url-fetch)
6571bba0 10504 (uri (pypi-uri "jsonrpclib" version))
44d10b1f
RW
10505 (sha256
10506 (base32
10507 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
10508 (build-system python-build-system)
10509 (arguments
10510 `(#:tests? #f
10511 #:python ,python-2))
10512 (home-page "https://github.com/joshmarshall/jsonrpclib/")
10513 (synopsis "Implementation of JSON-RPC specification for Python")
10514 (description
10515 "This library is an implementation of the JSON-RPC specification.
10516It supports both the original 1.0 specification, as well as the
10517new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
10518etc.")
10519 (license license:asl2.0)))
10520
10521(define-public python-chai
10522 (package
10523 (name "python-chai")
10524 (version "1.1.2")
10525 (source (origin
10526 (method url-fetch)
10527 (uri (pypi-uri "chai" version))
10528 (sha256
10529 (base32
10530 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
10531 (build-system python-build-system)
10532 (home-page "https://github.com/agoragames/chai")
10533 (synopsis "Mocking framework for Python")
10534 (description
10535 "Chai provides an api for mocking, stubbing and spying your python
10536objects, patterned after the Mocha library for Ruby.")
10537 (license license:bsd-3)))
10538
10539(define-public python2-chai
10540 (package-with-python2 python-chai))
10541
10542(define-public python-inflection
10543 (package
10544 (name "python-inflection")
10545 (version "0.3.1")
10546 (source
10547 (origin (method url-fetch)
10548 (uri (pypi-uri "inflection" version))
10549 (sha256
10550 (base32
10551 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
10552 (build-system python-build-system)
10553 (native-inputs
10554 `(("python-pytest" ,python-pytest)))
10555 (home-page "https://github.com/jpvanhal/inflection")
10556 (synopsis "Python string transformation library")
10557 (description
10558 "Inflection is a string transformation library. It singularizes
10559and pluralizes English words, and transforms strings from CamelCase to
10560underscored string.")
10561 (license license:expat)))
10562
10563(define-public python2-inflection
10564 (package-with-python2 python-inflection))
10565
10566(define-public python-pylev
10567 (package
10568 (name "python-pylev")
10569 (version "1.3.0")
10570 (source (origin
10571 (method url-fetch)
10572 (uri (pypi-uri "pylev" version))
10573 (sha256
10574 (base32
10575 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
10576 (build-system python-build-system)
10577 (home-page "https://github.com/toastdriven/pylev")
10578 (synopsis "Levenshtein distance implementation in Python")
10579 (description "Pure Python Levenshtein implementation, based off the
10580Wikipedia code samples at
10581@url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
10582 (license license:bsd-3)))
10583
10584(define-public python2-pylev
10585 (package-with-python2 python-pylev))
10586
10587(define-public python-cleo
10588 (package
10589 (name "python-cleo")
10590 (version "0.6.1")
10591 (source (origin
10592 (method url-fetch)
10593 (uri (pypi-uri "cleo" version))
10594 (sha256
10595 (base32
10596 "0q1cf0szr0d54am4pypzwdnm74zpladdsinad94c2fz5i06fdpf7"))))
10597 (build-system python-build-system)
10598 (native-inputs
10599 `(;; For testing
10600 ("python-mock" ,python-mock)
10601 ("python-pytest-mock" ,python-pytest-mock)
10602 ("python-pytest" ,python-pytest)))
10603 (propagated-inputs
10604 `(("python-backpack" ,python-backpack)
10605 ("python-pastel" ,python-pastel)
10606 ("python-pylev" ,python-pylev)))
10607 (home-page "https://github.com/sdispater/cleo")
10608 (synopsis "Command-line arguments library for Python")
10609 (description
10610 "Cleo allows you to create command-line commands with signature in
10611docstring and colored output.")
10612 (license license:expat)))
10613
10614(define-public python2-cleo
10615 (package-with-python2 python-cleo))
10616
10617(define-public python-lazy-object-proxy
10618 (package
10619 (name "python-lazy-object-proxy")
10620 (version "1.3.1")
10621 (source (origin
10622 (method url-fetch)
10623 (uri (pypi-uri "lazy-object-proxy" version))
10624 (sha256
10625 (base32
10626 "0yha7q9bhw857fwaby785d63mffhngl9npwzlk9i0pwlkwvbx4gb"))))
10627 (build-system python-build-system)
10628 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
10629 (synopsis "Lazy object proxy for python")
10630 (description
10631 "Lazy object proxy is an object that wraps a callable but defers the call
10632until the object is actually required, and caches the result of said call.")
10633 (license license:bsd-2)))
10634
10635(define-public python2-lazy-object-proxy
10636 (package-with-python2 python-lazy-object-proxy))
10637
10638(define-public python-dnspython
10639 (package
10640 (name "python-dnspython")
10641 (version "1.15.0")
10642 (source (origin
10643 (method url-fetch)
10644 (uri (string-append "http://www.dnspython.org/kits/"
10645 version "/dnspython-" version ".tar.gz"))
10646 (sha256
10647 (base32
10648 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
10649 (build-system python-build-system)
10650 (arguments '(#:tests? #f)) ; XXX: requires internet access
10651 (home-page "http://www.dnspython.org")
10652 (synopsis "DNS toolkit for Python")
10653 (description
10654 "dnspython is a DNS toolkit for Python. It supports almost all record
10655types. It can be used for queries, zone transfers, and dynamic updates.
10656It supports TSIG authenticated messages and EDNS0.")
10657 (license license:expat)))
10658
10659(define-public python2-dnspython
10660 (package-with-python2 python-dnspython))
10661
10662(define-public python-email-validator
10663 (package
10664 (name "python-email-validator")
10665 (version "1.0.2")
10666 (source
10667 (origin (method url-fetch)
10668 (uri (pypi-uri "email_validator" version))
10669 (sha256
10670 (base32
10671 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
10672 (build-system python-build-system)
10673 (arguments
10674 '(#:phases
10675 (modify-phases %standard-phases
10676 (add-before 'build 'use-dnspython
10677 (lambda _
10678 (substitute* "setup.py"
10679 (("dnspython3") "dnspython"))
10680 #t)))))
10681 (propagated-inputs
10682 `(("python-dnspython" ,python-dnspython)
10683 ("python-idna" ,python-idna)))
10684 (home-page "https://github.com/JoshData/python-email-validator")
10685 (synopsis "Email address validation library for Python")
10686 (description
10687 "This library validates email address syntax and deliverability.")
10688 (license license:cc0)))
10689
10690(define-public python2-email-validator
10691 (package-with-python2 python-email-validator))
10692
10693(define-public python-ukpostcodeparser
10694 (package
10695 (name "python-ukpostcodeparser")
10696 (version "1.0.3")
10697 (source (origin
10698 (method url-fetch)
10699 (uri (pypi-uri "UkPostcodeParser" version))
10700 (sha256
10701 (base32
10702 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
10703 (build-system python-build-system)
10704 (home-page "https://github.com/hamstah/ukpostcodeparser")
10705 (synopsis "UK Postcode parser for Python")
10706 (description
10707 "This library provides the @code{parse_uk_postcode} function for
10708parsing UK postcodes.")
10709 (license license:expat)))
10710
10711(define-public python2-ukpostcodeparser
10712 (package-with-python2 python-ukpostcodeparser))
10713
10714(define-public python-faker
10715 (package
10716 (name "python-faker")
10717 (version "0.7.9")
10718 (source (origin
10719 (method url-fetch)
10720 (uri (pypi-uri "Faker" version))
10721 (sha256
10722 (base32
10723 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
10724 (patches
10725 (search-patches "python-faker-fix-build-32bit.patch"))
10726 (modules '((guix build utils)))
10727 (snippet
10728 '(begin
10729 (for-each delete-file (find-files "." "\\.pyc$"))
10730 #t))))
10731 (build-system python-build-system)
10732 (arguments
10733 '(#:phases
10734 (modify-phases %standard-phases
10735 (replace 'check
49ff8827 10736 (lambda _ (invoke "python" "-m" "unittest" "-v" "tests"))))))
44d10b1f
RW
10737 (native-inputs
10738 `(;; For testing
10739 ("python-email-validator" ,python-email-validator)
10740 ("python-mock" ,python-mock)
10741 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
10742 (propagated-inputs
10743 `(("python-dateutil" ,python-dateutil)
10744 ("python-six" ,python-six)))
10745 (home-page "https://github.com/joke2k/faker")
10746 (synopsis "Python package that generates fake data")
10747 (description
10748 "Faker is a Python package that generates fake data such as names,
10749addresses, and phone numbers.")
10750 (license license:expat)
10751 (properties `((python2-variant . ,(delay python2-faker))))))
10752
10753(define-public python2-faker
10754 (let ((base (package-with-python2 (strip-python2-variant
10755 python-faker))))
10756 (package
10757 (inherit base)
10758 (propagated-inputs
10759 `(("python2-ipaddress" ,python2-ipaddress)
10760 ,@(package-propagated-inputs base))))))
10761
10762(define-public python-pyaml
10763 (package
10764 (name "python-pyaml")
10765 (version "18.11.0")
10766 (source (origin
10767 (method url-fetch)
10768 (uri (pypi-uri "pyaml" version))
10769 (sha256
10770 (base32
10771 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
10772 (build-system python-build-system)
10773 (native-inputs
10774 `(("python-unidecode" ,python-unidecode)))
10775 (propagated-inputs
10776 `(("python-pyyaml" ,python-pyyaml)))
10777 (home-page "https://github.com/mk-fg/pretty-yaml")
10778 (synopsis "YAML pretty-print library for Python")
10779 (description
10780 "pyaml is a PyYAML based python module to produce pretty and readable
10781YAML-serialized data.")
492e3a7a 10782 (license license:wtfpl2)))
44d10b1f
RW
10783
10784(define-public python2-pyaml
10785 (package-with-python2 python-pyaml))
10786
10787(define-public python-backpack
10788 (package
10789 (name "python-backpack")
10790 (version "0.1")
10791 (source
10792 (origin
10793 (method url-fetch)
10794 (uri (pypi-uri "backpack" version))
10795 (sha256
10796 (base32
10797 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
10798 (build-system python-build-system)
10799 (native-inputs
10800 `(("python-pytest" ,python-pytest)
10801 ("python-nose" ,python-nose)))
10802 (propagated-inputs
10803 `(("python-simplejson" ,python-simplejson)))
10804 (home-page "https://github.com/sdispater/backpack")
10805 (synopsis "Utilities for working with Python collections")
10806 (description "Backpack provides some useful utilities for working with
10807collections of data.")
10808 (license license:expat)))
10809
10810(define-public python2-backpack
10811 (package-with-python2 python-backpack))
10812
10813(define-public python-prompt-toolkit
10814 (package
10815 (name "python-prompt-toolkit")
10816 (version "2.0.7")
10817 (source
10818 (origin
10819 (method url-fetch)
10820 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10821 (sha256
10822 (base32
10823 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
10824 (build-system python-build-system)
10825 (arguments
10826 `(#:phases
10827 (modify-phases %standard-phases
10828 (delete 'check)
10829 (add-after 'install 'post-install-check
10830 (lambda* (#:key inputs outputs #:allow-other-keys)
10831 ;; HOME is needed for the test
10832 ;; "test_pathcompleter_can_expanduser".
10833 (setenv "HOME" "/tmp")
10834 (add-installed-pythonpath inputs outputs)
10835 (invoke "py.test"))))))
10836 (propagated-inputs
10837 `(("python-wcwidth" ,python-wcwidth)
10838 ("python-six" ,python-six)
10839 ("python-pygments" ,python-pygments)))
10840 (native-inputs
10841 `(("python-pytest" ,python-pytest)))
10842 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
10843 (synopsis "Library for building command line interfaces in Python")
10844 (description
10845 "Prompt-Toolkit is a library for building interactive command line
10846interfaces in Python. It's like GNU Readline but it also features syntax
10847highlighting while typing, out-of-the-box multi-line input editing, advanced
10848code completion, incremental search, support for Chinese double-width
10849characters, mouse support, and auto suggestions.")
10850 (license license:bsd-3)))
10851
10852(define-public python2-prompt-toolkit
10853 (package-with-python2 python-prompt-toolkit))
10854
10855(define-public python-prompt-toolkit-1
10856 (package (inherit python-prompt-toolkit)
10857 (version "1.0.15")
10858 (source
10859 (origin
10860 (method url-fetch)
10861 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10862 (sha256
10863 (base32
10864 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
10865
10866(define-public python2-prompt-toolkit-1
10867 (package-with-python2 python-prompt-toolkit-1))
10868
10869(define-public python-jedi
10870 (package
10871 (name "python-jedi")
296e1aea 10872 (version "0.15.1")
44d10b1f
RW
10873 (source
10874 (origin
10875 (method url-fetch)
10876 (uri (pypi-uri "jedi" version))
10877 (sha256
10878 (base32
296e1aea 10879 "0bp4pxhsynaarbvzblsn5x32lzp29svy3sxfy8i6m5iwz9s9r1ds"))))
44d10b1f
RW
10880 (build-system python-build-system)
10881 (arguments
296e1aea 10882 `(#:phases
44d10b1f 10883 (modify-phases %standard-phases
296e1aea
MC
10884 (add-after 'unpack 'disable-file-completion-test
10885 ;; A single parameterized test currently fail (see:
10886 ;; https://github.com/davidhalter/jedi/issues/1395). Remove it.
10887 (lambda _
10888 (substitute* "test/test_api/test_completion.py"
10889 ((".*'example.py', 'rb\"' \\+ join\\('\\.\\.'.*") ""))
10890 #t))
44d10b1f 10891 (replace 'check
296e1aea
MC
10892 (lambda _
10893 (setenv "HOME" "/tmp")
10894 (invoke "python" "-m" "pytest"))))))
44d10b1f
RW
10895 (native-inputs
10896 `(("python-pytest" ,python-pytest)
10897 ("python-docopt" ,python-docopt)))
10898 (propagated-inputs
10899 `(("python-parso" ,python-parso)))
10900 (home-page "https://github.com/davidhalter/jedi")
10901 (synopsis "Autocompletion and static analysis library for Python")
10902 (description
10903 "Jedi is a static analysis tool for Python that can be used in Integrated
10904Development Environments (@dfn{IDE}s) and text editors. It understands Python
10905on a deeper level than many other static analysis frameworks for Python.
10906
10907Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
10908well.")
10909 (license license:expat)))
10910
10911(define-public python2-jedi
296e1aea 10912 (package-with-python2 python-jedi))
44d10b1f
RW
10913
10914(define-public ptpython
10915 (package
10916 (name "ptpython")
10917 (version "0.34")
10918 (source (origin
10919 (method url-fetch)
10920 (uri (pypi-uri "ptpython" version))
10921 (sha256
10922 (base32
10923 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
10924 (build-system python-build-system)
10925 (arguments
10926 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
10927 (propagated-inputs
10928 `(("python-docopt" ,python-docopt)
10929 ("python-jedi" ,python-jedi)
10930 ("python-prompt-toolkit" ,python-prompt-toolkit)
10931 ("python-pygments" ,python-pygments)))
10932 (home-page "https://github.com/jonathanslenders/ptpython")
10933 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
10934 (description
10935 "ptpython is a Python read-eval-print loop with IDE-like features.
10936It supports syntax highlighting, multiline editing, autocompletion, mouse,
10937color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
10938etc.")
10939 (license license:bsd-3)
10940 (properties `((python2-variant . ,(delay ptpython-2))))))
10941
10942(define-public ptpython-2
10943 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
10944 (package
10945 (inherit base)
10946 (name "ptpython2"))))
10947
10948(define-public python-stem
10949 (package
10950 (name "python-stem")
e746d1c3 10951 (version "1.7.1")
44d10b1f
RW
10952 (source
10953 (origin
10954 (method url-fetch)
10955 (uri (pypi-uri "stem" version))
10956 (sha256
10957 (base32
e746d1c3 10958 "18lc95pmc7i089nlsb06dsxyjl5wbhxfqgdxbjcia35ndh8z7sn9"))))
44d10b1f
RW
10959 (build-system python-build-system)
10960 (arguments
10961 `(#:phases
10962 (modify-phases %standard-phases
10963 (replace 'check
10964 (lambda _
10965 (invoke "./run_tests.py" "--unit")
10966 #t)))))
10967 (native-inputs
10968 `(("python-mock" ,python-mock)
10969 ("python-pycodestyle" ,python-pycodestyle)
10970 ("python-pyflakes" ,python-pyflakes)))
10971 (home-page "https://stem.torproject.org/")
10972 (synopsis
10973 "Python controller library that allows applications to interact with Tor")
10974 (description
10975 "Stem is a Python controller library for Tor. With it you can use Tor's
10976control protocol to script against the Tor process and read descriptor data
10977relays publish about themselves.")
10978 (license license:lgpl3)))
10979
10980(define-public python2-stem
10981 (package-with-python2 python-stem))
10982
10983(define-public python-pyserial
10984 (package
10985 (name "python-pyserial")
10986 (version "3.1.1")
10987 (source
10988 (origin
10989 (method url-fetch)
10990 (uri (pypi-uri "pyserial" version))
10991 (sha256
10992 (base32
10993 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
10994 (build-system python-build-system)
10995 (arguments
10996 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
10997 ;; #:phases
10998 ;; (modify-phases %standard-phases
10999 ;; (replace 'check
11000 ;; (lambda _
11001 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
11002 (home-page
11003 "https://github.com/pyserial/pyserial")
11004 (synopsis "Python Serial Port Bindings")
11005 (description "@code{pyserial} provide serial port bindings for Python. It
11006supports different byte sizes, stop bits, parity and flow control with RTS/CTS
11007and/or Xon/Xoff. The port is accessed in RAW mode.")
11008 (license license:bsd-3)))
11009
11010(define-public python2-pyserial
11011 (package-with-python2 python-pyserial))
11012
11013(define-public python-kivy
11014 (package
11015 (name "python-kivy")
11016 (version "1.10.1")
11017 (source
11018 (origin
11019 (method url-fetch)
11020 (uri (pypi-uri "Kivy" version))
11021 (file-name (string-append name "-" version ".tar.gz"))
11022 (sha256
11023 (base32
11024 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
11025 (build-system python-build-system)
11026 (arguments
11027 `(#:tests? #f ; Tests require many optional packages
11028 #:phases
11029 (modify-phases %standard-phases
11030 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
11031 (lambda* (#:key inputs #:allow-other-keys)
11032 (setenv "KIVY_SDL2_PATH"
11033 (string-append (assoc-ref inputs "sdl-union")
11034 "/include/SDL2"))
11035 #t)))))
11036 (native-inputs
11037 `(("git" ,git)
11038 ("pkg-config" ,pkg-config)
11039 ("python-cython" ,python-cython)))
11040 (inputs
11041 `(("gstreamer" ,gstreamer)
11042 ("mesa" ,mesa)
11043 ("sdl-union"
11044 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
11045 (home-page "http://kivy.org")
11046 (synopsis
11047 "Multitouch application framework")
11048 (description
11049 "A software library for rapid development of
11050hardware-accelerated multitouch applications.")
11051 (license license:expat)))
11052
11053(define-public python2-kivy
11054 (package-with-python2 python-kivy))
11055
11056(define-public python-kivy-next
11057 (deprecated-package "python-kivy-next" python-kivy))
11058
11059(define-public python2-kivy-next
11060 (deprecated-package "python2-kivy-next" python2-kivy))
11061
11062(define-public python-binaryornot
11063 (package
11064 (name "python-binaryornot")
11065 (version "0.4.4")
11066 (source (origin
11067 (method url-fetch)
11068 (uri (pypi-uri "binaryornot" version))
11069 (sha256
11070 (base32
11071 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
11072 (build-system python-build-system)
86723f98
DM
11073 (arguments
11074 `(#:phases
11075 (modify-phases %standard-phases
ee623903 11076 (add-after 'unpack 'patch-tests
86723f98
DM
11077 (lambda _
11078 ;; TypeError: binary() got an unexpected keyword argument
11079 ;; 'average_size'.
11080 (substitute* "tests/test_check.py"
11081 (("average_size=512") ""))
11082 #t)))))
44d10b1f
RW
11083 (propagated-inputs
11084 `(("python-chardet" ,python-chardet)
11085 ("python-hypothesis" ,python-hypothesis)))
11086 (home-page "https://github.com/audreyr/binaryornot")
11087 (synopsis "Package to check if a file is binary or text")
11088 (description "Ultra-lightweight pure Python package to check if a file is
11089binary or text.")
11090 (license license:bsd-3)
11091 (properties `((python2-variant . ,(delay python2-binaryornot))))))
11092
11093(define-public python2-binaryornot
11094 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
11095 (package (inherit base)
11096 (propagated-inputs
11097 `(("python2-enum34" ,python2-enum34)
11098 ,@(package-propagated-inputs base))))))
11099
f315673d
VC
11100(define-public python-binwalk
11101 (let ((commit "64201acfb5b0a9cdd9faa58c40a36dcff8612e29")
11102 (revision "0"))
11103 (package
11104 (name "python-binwalk")
11105 (version (git-version "2.1.1" revision commit))
11106 (source
11107 (origin
11108 (method git-fetch)
11109 (uri (git-reference
11110 (url "https://github.com/ReFirmLabs/binwalk")
11111 (commit commit)))
11112 (file-name (git-file-name name version))
11113 (sha256
11114 (base32
11115 "1z7ca6rfp887hw5jc3sb45mm4fa0xid4lsp2z8g4r590dr7k7w15"))))
11116 (build-system python-build-system)
11117 (arguments
11118 `(#:phases
11119 (modify-phases %standard-phases
11120 (add-before 'check 'set-pythonpath
11121 (lambda _
11122 (setenv "PYTHONPATH"
11123 (string-append
11124 (getcwd) "/src/"
11125 ":" (getenv "PYTHONPATH")))
11126 (setenv "HOME" "")
11127 #t)))))
11128 (native-inputs
11129 `(("python-coverage" ,python-coverage)
11130 ("python-nose" ,python-nose)))
11131 (home-page "https://github.com/ReFirmLabs/binwalk")
11132 (synopsis "Firmware analysis tool")
11133 (description "Binwalk is a tool for analyzing, reverse engineering, and extracting firmware images")
11134 (license license:expat))))
11135
44d10b1f
RW
11136(define-public python-nltk
11137 (package
11138 (name "python-nltk")
11139 (version "3.2.1")
11140 (source (origin
11141 (method url-fetch)
11142 (uri (pypi-uri "nltk" version))
11143 (sha256
11144 (base32
11145 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
11146 (build-system python-build-system)
11147 (arguments
11148 '(;; The tests require some extra resources to be downloaded.
11149 ;; TODO Try packaging these resources.
11150 #:tests? #f))
11151 (home-page "http://nltk.org/")
11152 (synopsis "Natural Language Toolkit")
11153 (description "It provides interfaces to over 50 corpora and lexical
11154resources such as WordNet, along with a suite of text processing libraries
11155for classification, tokenization, stemming, tagging, parsing, and semantic
11156reasoning, wrappers for natural language processing libraries.")
11157 (license license:asl2.0)))
11158
11159(define-public python2-nltk
11160 (package-with-python2 python-nltk))
11161
11162(define-public python-pymongo
11163 (package
11164 (name "python-pymongo")
11165 (version "3.7.2")
11166 (source (origin
11167 (method url-fetch)
11168 (uri (pypi-uri "pymongo" version))
11169 (sha256
11170 (base32
11171 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
11172 (build-system python-build-system)
11173 (propagated-inputs
11174 `(("python-certifi" ,python-certifi)))
11175 (home-page "https://github.com/mongodb/mongo-python-driver")
11176 (synopsis "Python driver for MongoDB")
11177 (description "Python driver for MongoDB.")
11178 (license license:asl2.0)))
11179
11180(define-public python2-pymongo
11181 (package-with-python2 python-pymongo))
11182
44d10b1f
RW
11183(define-public python-consul
11184 (package
11185 (name "python-consul")
11186 (version "0.6.1")
11187 (source
11188 (origin
11189 (method url-fetch)
11190 (uri (pypi-uri "python-consul" version))
11191 (sha256
11192 (base32
11193 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
11194 (build-system python-build-system)
11195 (arguments
11196 '(#:tests? #f)) ; The tests are not distributed
11197 (propagated-inputs
11198 `(("python-requests" ,python-requests)
11199 ("python-six" ,python-six)))
11200 (home-page "https://github.com/cablehead/python-consul")
11201 (synopsis "Python client for Consul")
11202 (description
11203 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
11204discovery, monitoring and configuration.")
11205 (license license:expat)))
11206
11207(define-public python2-consul
11208 (package-with-python2 python-consul))
11209
11210(define-public python-schematics
11211 (package
11212 (name "python-schematics")
11213 (version "1.1.1")
11214 (source
1961d187
TGR
11215 (origin
11216 (method git-fetch)
11217 (uri (git-reference
11218 (url "https://github.com/schematics/schematics.git")
11219 (commit (string-append "v" version))))
11220 (file-name (git-file-name name version))
11221 (sha256
11222 (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd"))))
44d10b1f
RW
11223 (build-system python-build-system)
11224 (propagated-inputs
11225 `(("python-six" ,python-six)))
11226 (arguments
1961d187
TGR
11227 ;; The tests require a bunch of not very nice packages with fixed
11228 ;; version requirements (e.g. python-coveralls).
11229 `(#:tests? #f))
44d10b1f
RW
11230 (home-page "https://github.com/schematics/schematics")
11231 (synopsis "Python Data Structures for Humans")
11232 (description "Python Data Structures for Humans.")
11233 (license license:bsd-3)))
11234
11235(define-public python2-schematics
11236 (package-with-python2 python-schematics))
11237
11238(define-public python-odfpy
11239 (package
11240 (name "python-odfpy")
11241 (version "1.3.3")
11242 (source (origin
11243 (method url-fetch)
11244 (uri (pypi-uri "odfpy" version))
11245 (sha256
11246 (base32
11247 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
11248 (arguments
11249 `(#:modules ((srfi srfi-1)
11250 (guix build python-build-system)
11251 (guix build utils))
11252 #:phases
11253 (modify-phases %standard-phases
11254 (replace 'check
11255 ;; The test runner invokes python2 and python3 for test*.py.
11256 ;; To avoid having both in inputs, we replicate it here.
11257 (lambda _
21ccc01d
RW
11258 (for-each (lambda (test-file) (invoke "python" test-file))
11259 (find-files "tests" "^test.*\\.py$"))
11260 #t)))))
44d10b1f
RW
11261 (build-system python-build-system)
11262 (home-page "https://github.com/eea/odfpy")
11263 (synopsis "Python API and tools to manipulate OpenDocument files")
11264 (description "Collection of libraries and utility programs written in
11265Python to manipulate OpenDocument 1.2 files.")
11266 (license
11267 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
11268 ;; number of files with other licenses.
11269 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
11270
11271(define-public python2-odfpy
11272 (package-with-python2 python-odfpy))
11273
11274(define-public python-natsort
11275 (package
11276 (name "python-natsort")
11277 (version "5.4.1")
11278 (source (origin
11279 (method url-fetch)
11280 (uri (pypi-uri "natsort" version))
11281 (sha256
11282 (base32
11283 "0i732amg6yzkx4g4c9j09jmqq39q377x9cl2nbkm5hax2c2v0wxf"))))
11284 (build-system python-build-system)
11285 (arguments
11286 `(#:modules ((guix build utils)
11287 (guix build python-build-system)
11288 (srfi srfi-1)
11289 (srfi srfi-26)
11290 (ice-9 ftw))
11291 #:phases
11292 (modify-phases %standard-phases
11293 (add-before 'check 'set-cachedir
11294 ;; Tests require write access to $HOME by default
11295 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
11296 (replace 'check
11297 (lambda _
11298 (let ((cwd (getcwd)))
11299 (setenv "PYTHONPATH"
11300 (string-append
11301 cwd "/build/"
11302 (find (cut string-prefix? "lib" <>)
11303 (scandir (string-append cwd "/build")))
11304 ":"
11305 (getenv "PYTHONPATH")))
11306 (invoke "pytest" "-v")))))))
11307 (native-inputs
11308 `(("python-hypothesis" ,python-hypothesis)
11309 ("python-pytest-cov" ,python-pytest-cov)
11310 ("python-pytest-mock" ,python-pytest-mock)
11311 ("python-pytest" ,python-pytest)))
11312 (propagated-inputs ; TODO: Add python-fastnumbers.
11313 `(("python-pyicu" ,python-pyicu)))
11314 (home-page "https://github.com/SethMMorton/natsort")
11315 (synopsis "Natural sorting for python and shell")
11316 (description
11317 "Natsort lets you apply natural sorting on lists instead of
11318lexicographical. If you use the built-in @code{sorted} method in python
36a4366d
EF
11319on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4},
11320@code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20},
11321@code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that
11322identifies numbers and sorts them separately from strings. It can also sort
11323version numbers, real numbers, mixed types and more, and comes with a shell
11324command @command{natsort} that exposes this functionality in the command line.")
44d10b1f
RW
11325 (license license:expat)
11326 (properties `((python2-variant . ,(delay python2-natsort))))))
11327
11328(define-public python2-natsort
11329 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
11330 (package (inherit base)
11331 (native-inputs
11332 `(("python2-pathlib" ,python2-pathlib)
11333 ,@(package-native-inputs base))))))
11334
11335(define-public python-glances
11336 (package
11337 (name "python-glances")
9898a2d3 11338 (version "3.1.1")
44d10b1f
RW
11339 (source
11340 (origin
11341 (method url-fetch)
11342 (uri (pypi-uri "Glances" version))
11343 (sha256
11344 (base32
15b4c911
TGR
11345 "07j1ggzsqiskyz1i4mrnyr9i95v0dqi0i0hibnv1l188km8shmi8"))
11346 (modules '((guix build utils)))
11347 (snippet
11348 '(begin
11349 ;; Glances phones PyPI for weekly update checks by default.
11350 ;; Disable these. The user can re-enable them if desired.
11351 (substitute* "glances/outdated.py"
11352 (("^(.*)self\\.load_config\\(config\\)\n" line indentation)
11353 (string-append indentation
11354 "self.args.disable_check_update = True\n"
11355 line)))
11356 #t))))
44d10b1f
RW
11357 (build-system python-build-system)
11358 (propagated-inputs
9898a2d3
TGR
11359 `(("python-future" ,python-future)
11360 ("python-psutil" ,python-psutil)))
44d10b1f
RW
11361 (home-page
11362 "https://github.com/nicolargo/glances")
bab94ffa 11363 (synopsis "Cross-platform curses-based monitoring tool")
44d10b1f
RW
11364 (description
11365 "Glances is a curses-based monitoring tool for a wide variety of platforms.
bab94ffa
TGR
11366Glances uses the PsUtil library to get information from your system. It
11367monitors CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
44d10b1f
RW
11368 (license license:lgpl3+)))
11369
11370(define-public python2-glances
11371 (package-with-python2 python-glances))
11372
11373(define-public python-graphql-core
11374 (package
11375 (name "python-graphql-core")
11376 (version "0.5.3")
11377 (source
11378 (origin
11379 (method url-fetch)
11380 (uri (pypi-uri "graphql-core" version))
11381 (sha256
11382 (base32
11383 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
11384 (build-system python-build-system)
11385 (arguments
11386 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
11387 #:phases
11388 (modify-phases %standard-phases
11389 (add-after 'unpack 'patch-hardcoded-version
11390 (lambda _ (substitute*
11391 "setup.py"
11392 (("'gevent==1.1rc1'") "'gevent'"))
11393 #t)))))
11394 (native-inputs
11395 `(("python-gevent" ,python-gevent)
11396 ("python-mock" ,python-mock)
11397 ("python-pytest-mock" ,python-pytest-mock)))
11398 (propagated-inputs
11399 `(("python-promise" ,python-promise)
11400 ("python-six" ,python-six)))
11401 (home-page "https://github.com/graphql-python/graphql-core")
11402 (synopsis "GraphQL implementation for Python")
11403 (description
11404 "GraphQL implementation for Python. GraphQL is a data query language and
11405runtime designed and used to request and deliver data to mobile and web apps.
11406This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
11407to Python.")
11408 (license license:expat)))
11409
11410(define-public python2-graphql-core
11411 (package-with-python2 python-graphql-core))
11412
11413(define-public python-graphql-relay
11414 (package
11415 (name "python-graphql-relay")
11416 (version "0.4.5")
11417 (source
11418 (origin
11419 (method url-fetch)
11420 (uri (pypi-uri "graphql-relay" version))
11421 (sha256
11422 (base32
11423 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
11424 (build-system python-build-system)
11425 (arguments
11426 '(#:tests? #f)) ; The tests are not distributed
11427 (propagated-inputs
11428 `(("python-graphql-core" ,python-graphql-core)
11429 ("python-promise" ,python-promise)
11430 ("python-six" ,python-six)))
11431 (home-page "https://github.com/graphql-python/graphql-relay-py")
11432 (synopsis "Relay implementation for Python")
11433 (description
11434 "This is a library to allow the easy creation of Relay-compliant servers
11435using the GraphQL Python reference implementation of a GraphQL server. It
11436should be noted that the code is a exact port of the original
11437@url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
11438from Facebook.")
11439 (license license:expat)))
11440
11441(define-public python2-graphql-relay
11442 (package-with-python2 python-graphql-relay))
11443
11444(define-public python-graphene
11445 (package
11446 (name "python-graphene")
11447 (version "0.10.2")
11448 (source
11449 (origin
11450 (method url-fetch)
11451 (uri (pypi-uri "graphene" version))
11452 (sha256
11453 (base32
11454 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
11455 (build-system python-build-system)
11456 (propagated-inputs
11457 `(("python-graphql-core" ,python-graphql-core)
11458 ("python-graphql-relay" ,python-graphql-relay)
11459 ("python-iso8601" ,python-iso8601)
11460 ("python-promise" ,python-promise)
11461 ("python-six" ,python-six)))
11462 (arguments
11463 `(#:tests? #f)) ; no tests/ in the PyPI tarball
11464 (home-page "http://graphene-python.org/")
11465 (synopsis "GraphQL Framework for Python")
11466 (description
11467 "Graphene is a Python library for building GraphQL schemas/types.
11468A GraphQL schema describes your data model, and provides a GraphQL server
11469with an associated set of resolve methods that know how to fetch data.")
11470 (properties `((python2-variant . ,(delay python2-graphene))))
11471 (license license:expat)))
11472
11473(define-public python2-graphene
11474 (let ((base (package-with-python2
11475 (strip-python2-variant python-graphene))))
11476 (package (inherit base)
11477 (native-inputs
11478 `(("python2-sqlalchemy" ,python2-sqlalchemy)
11479 ,@(package-native-inputs base))))))
11480
11481(define-public python-nautilus
11482 (package
11483 (name "python-nautilus")
11484 (version "0.4.9")
11485 (source
11486 (origin
11487 (method url-fetch)
11488 (uri (pypi-uri "nautilus" version))
11489 (sha256
11490 (base32
11491 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
11492 (build-system python-build-system)
11493 (arguments `(#:tests? #f)) ; fails to import test modules
11494 (propagated-inputs
11495 `(("python-bcrypt" ,python-bcrypt)
11496 ("python-click" ,python-click)
11497 ("python-consul" ,python-consul)
11498 ("python-graphene" ,python-graphene)
11499 ("python-jinja2" ,python-jinja2)
11500 ("python-peewee" ,python-peewee)
11501 ("python-pika" ,python-pika)
11502 ("python-tornado" ,python-tornado)
11503 ("python-wtforms" ,python-wtforms)))
11504 (native-inputs
11505 `(("python-nose2" ,python-nose2)))
11506 (home-page "https://github.com/AlecAivazis/nautilus")
11507 (synopsis "Library for creating microservice applications")
11508 (description
11509 "Nautilus is a framework for flux based microservices that looks to
11510provide extendible implementations of common aspects of a cloud so that you can
11511focus on building massively scalable web applications.")
11512 (license license:expat)))
11513
11514(define-public python-snowballstemmer
11515 (package
11516 (name "python-snowballstemmer")
11517 (version "1.2.1")
11518 (source (origin
11519 (method url-fetch)
11520 (uri (pypi-uri "snowballstemmer" version))
11521 (sha256
11522 (base32
11523 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
11524 (build-system python-build-system)
11525 (arguments
11526 `(;; No tests exist
11527 #:tests? #f))
11528 (home-page "https://github.com/shibukawa/snowball_py")
11529 (synopsis "Snowball stemming library collection for Python")
11530 (description "This package provides 16 word stemmer algorithms generated
11531from Snowball algorithms. It includes the 15 original ones plus the Poerter
11532English stemmer.")
11533 (license license:bsd-3)))
11534
11535(define-public python2-snowballstemmer
11536 (package-with-python2 python-snowballstemmer))
11537
44d10b1f
RW
11538(define-public python-setproctitle
11539(package
11540 (name "python-setproctitle")
11541 (version "1.1.10")
11542 (source
11543 (origin
11544 (method url-fetch)
11545 (uri (pypi-uri "setproctitle" version))
11546 (sha256
11547 (base32
11548 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
11549 (build-system python-build-system)
11550 (arguments
11551 '(#:phases
11552 (modify-phases %standard-phases
11553 (add-before 'check 'patch-Makefile
11554 ;; Stricly this is only required for the python2 variant.
11555 ;; But adding a phase in an inherited package seems to be
11556 ;; cumbersum. So we patch even for python3.
11557 (lambda _
11558 (let ((nose (assoc-ref %build-inputs "python2-nose")))
11559 (when nose
11560 (substitute* "Makefile"
11561 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
11562 (string-append nose "/bin/nosetests "))))
11563 #t)))
11564 (replace 'check
11565 (lambda _
11566 (setenv "PYTHON" (or (which "python3") (which "python")))
11567 (setenv "PYCONFIG" (or (which "python3-config")
11568 (which "python-config")))
11569 (setenv "CC" "gcc")
11570 ;; No need to extend PYTHONPATH to find the built package, since
11571 ;; the Makefile will build anyway
11572 (invoke "make" "check"))))))
11573 (native-inputs
11574 `(("procps" ,procps))) ; required for tests
11575 (home-page
11576 "https://github.com/dvarrazzo/py-setproctitle")
11577 (synopsis
11578 "Setproctitle implementation for Python to customize the process title")
11579 (description "The library allows a process to change its title (as displayed
11580by system tools such as ps and top).
11581
11582Changing the title is mostly useful in multi-process systems, for
11583example when a master process is forked: changing the children's title
11584allows to identify the task each process is busy with. The technique
11585is used by PostgreSQL and the OpenSSH Server for example.")
11586 (license license:bsd-3)
11587 (properties `((python2-variant . ,(delay python2-setproctitle))))))
11588
11589(define-public python2-setproctitle
11590 (let ((base (package-with-python2
11591 (strip-python2-variant python-setproctitle))))
11592 (package
11593 (inherit base)
11594 (native-inputs `(("python2-nose" ,python2-nose)
11595 ,@(package-native-inputs base))))))
11596
11597(define-public python-validictory
11598 (package
11599 (name "python-validictory")
11600 (version "1.0.1")
11601 (source
11602 (origin
11603 (method url-fetch)
11604 (uri (pypi-uri "validictory" version))
11605 (sha256
11606 (base32
11607 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
11608 (build-system python-build-system)
11609 (arguments
11610 '(#:phases
11611 (modify-phases %standard-phases
11612 (add-after 'unpack 'bootstrap
11613 ;; Move the tests out of the package directory to avoid
11614 ;; packaging them.
11615 (lambda* _
11616 (rename-file "validictory/tests" "tests")
11617 (delete-file "tests/__init__.py")))
11618 (replace 'check
11619 (lambda _
11620 ;; Extend PYTHONPATH so the built package will be found.
11621 (setenv "PYTHONPATH"
11622 (string-append (getcwd) "/build/lib:"
11623 (getenv "PYTHONPATH")))
6568bd5d 11624 (invoke "py.test" "-vv" ))))))
44d10b1f
RW
11625 (native-inputs
11626 `(("python-pytest" ,python-pytest)))
11627 (home-page
11628 "https://github.com/jamesturk/validictory")
11629 (synopsis "General purpose Python data validator")
11630 (description "It allows validation of arbitrary Python data structures.
11631
11632The schema format is based on the JSON Schema
11633proposal (http://json-schema.org), so combined with json the library is also
11634useful as a validator for JSON data.")
11635 (license license:expat)))
11636
11637(define-public python2-validictory
11638 (package-with-python2 python-validictory))
11639
11640(define-public python-pyelftools
11641 (package
11642 (name "python-pyelftools")
11643 (version "0.25")
11644 (source
11645 (origin
11646 (method url-fetch)
11647 (uri (pypi-uri "pyelftools" version))
11648 (sha256
11649 (base32
11650 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
11651 (build-system python-build-system)
11652 (arguments
11653 `(#:phases
11654 (modify-phases %standard-phases
11655 (add-before 'check 'set-pythonpath
11656 (lambda _
11657 (setenv "PYTHONPATH"
11658 (string-append
11659 (getcwd) "/test/"
11660 ":" (getenv "PYTHONPATH")))
11661 #t)))))
11662 (home-page
11663 "https://github.com/eliben/pyelftools")
11664 (synopsis
11665 "Analyze binary and library file information")
11666 (description "This Python library provides interfaces for parsing and
11667analyzing two binary and library file formats; the Executable and Linking
11668Format (ELF), and debugging information in the Debugging With Attributed
11669Record Format (DWARF).")
11670 (license license:public-domain)))
11671
11672(define-public python-pyev
11673 (package
11674 (name "python-pyev")
11675 (version "0.9.0")
11676 (source
11677 (origin
11678 (method url-fetch)
11679 (uri (pypi-uri "pyev" version))
11680 (sha256
11681 (base32
11682 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
11683 (build-system python-build-system)
11684 (arguments
11685 `(#:tests? #f ; no test suite
11686 #:phases
11687 (modify-phases %standard-phases
11688 (add-after 'unpack 'patch
11689 (lambda* (#:key inputs #:allow-other-keys)
11690 (let ((libev (string-append (assoc-ref inputs "libev")
11691 "/lib/libev.so.4")))
11692 (substitute* "setup.py"
11693 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
11694 (string-append "libev_dll_name = \"" libev "\"")))))))))
11695 (inputs
11696 `(("libev" ,libev)))
11697 (home-page "http://pythonhosted.org/pyev/")
11698 (synopsis "Python libev interface")
11699 (description "Pyev provides a Python interface to libev.")
11700 (license license:gpl3)))
11701
11702(define-public python2-pyev
11703 (package-with-python2 python-pyev))
11704
11705(define-public python-imagesize
11706 (package
11707 (name "python-imagesize")
11708 (version "1.1.0")
11709 (source
11710 (origin
11711 (method url-fetch)
11712 (uri (pypi-uri "imagesize" version))
11713 (sha256
11714 (base32
11715 "1dg3wn7qpwmhgqc0r9na2ding1wif9q5spz3j9zn2riwphc2k0zk"))))
11716 (build-system python-build-system)
11717 (home-page "https://github.com/shibukawa/imagesize_py")
11718 (synopsis "Gets image size of files in various formats in Python")
11719 (description
11720 "This package allows determination of image size from
11721PNG, JPEG, JPEG2000 and GIF files in pure Python.")
11722 (license license:expat)))
11723
11724(define-public python2-imagesize
11725 (package-with-python2 python-imagesize))
11726
11727(define-public python-termstyle
11728 (package
11729 (name "python-termstyle")
11730 (version "0.1.11")
11731 (source
11732 (origin
11733 (method url-fetch)
11734 (uri (pypi-uri "termstyle" version))
11735 (sha256
11736 (base32
11737 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
11738 (build-system python-build-system)
11739 (arguments
11740 '(#:phases
11741 (modify-phases %standard-phases
11742 (replace 'check
11743 (lambda _
831080a6 11744 (invoke "python" "test3.py"))))))
44d10b1f
RW
11745 (home-page "https://github.com/gfxmonk/termstyle")
11746 (synopsis "Console text coloring for Python")
11747 (description "This package provides console text coloring for Python.")
11748 (license license:bsd-3)))
11749
11750(define-public python-argcomplete
11751 (package
11752 (name "python-argcomplete")
11753 (version "1.7.0")
11754 (source
11755 (origin
11756 (method url-fetch)
11757 (uri (pypi-uri "argcomplete" version))
11758 (sha256
11759 (base32
11760 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
11761 (build-system python-build-system)
11762 (native-inputs
11763 `(("python-pexpect" ,python-pexpect)
11764 ("tcsh" ,tcsh)
11765 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
11766 (home-page "https://github.com/kislyuk/argcomplete")
11767 (synopsis "Shell tab completion for Python argparse")
11768 (description "argcomplete provides extensible command line tab completion
11769of arguments and options for Python scripts using @code{argparse}. It's
11770particularly useful for programs with many options or sub-parsers that can
11771dynamically suggest completions; for example, when browsing resources over the
11772network.")
11773 (license license:asl2.0)))
11774
11775(define-public python2-argcomplete
11776 (package-with-python2 python-argcomplete))
11777
11778(define-public python-xopen
11779 (package
11780 (name "python-xopen")
24d64989 11781 (version "0.5.0")
44d10b1f
RW
11782 (source
11783 (origin
11784 (method url-fetch)
11785 (uri (pypi-uri "xopen" version))
11786 (sha256
11787 (base32
24d64989 11788 "17xbrgi23l87yg6h0qcknssp2q812miiy33qw6v45v5gx0jwv5xh"))))
44d10b1f 11789 (build-system python-build-system)
24d64989
RW
11790 (propagated-inputs
11791 `(("python-setuptools-scm" ,python-setuptools-scm)))
44d10b1f
RW
11792 (home-page "https://github.com/marcelm/xopen/")
11793 (synopsis "Open compressed files transparently")
11794 (description "This module provides an @code{xopen} function that works like
11795Python's built-in @code{open} function, but can also deal with compressed files.
11796Supported compression formats are gzip, bzip2 and, xz, and are automatically
11797recognized by their file extensions. The focus is on being as efficient as
11798possible on all supported Python versions.")
11799 (license license:expat)))
11800
11801(define-public python2-xopen
11802 (let ((base (package-with-python2
11803 (strip-python2-variant python-xopen))))
11804 (package
11805 (inherit base)
11806 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
11807 ,@(package-propagated-inputs base))))))
11808
11809(define-public python-cheetah
11810 (package
11811 (name "python-cheetah")
11812 (version "3.1.0")
11813 (source
11814 (origin
11815 (method url-fetch)
11816 (uri (pypi-uri "Cheetah3" version))
11817 (sha256
11818 (base32
11819 "1ihag9cxll6b86fc8v5lkhmr3brdbi4yiz16zpgw79yylmv8fgr9"))))
11820 (build-system python-build-system)
11821 (arguments
11822 `(#:modules ((guix build utils)
11823 (guix build python-build-system)
11824 (ice-9 ftw)
11825 (srfi srfi-1)
11826 (srfi srfi-26))
11827 #:phases (modify-phases %standard-phases
11828 (add-after 'unpack 'use-absolute-python
11829 (lambda _
11830 (substitute* "Cheetah/CheetahWrapper.py"
11831 (("#!/usr/bin/env python")
11832 (string-append "#!" (which "python"))))
11833 #t))
11834 (replace 'check
11835 (lambda _
11836 (let ((cwd (getcwd)))
11837 (setenv "PYTHONPATH"
11838 (string-append
11839 cwd "/build/"
11840 (find (cut string-prefix? "lib" <>)
11841 (scandir (string-append cwd "/build")))
11842 ":" (getenv "PYTHONPATH")))
11843 (setenv "PATH"
11844 (string-append (getenv "PATH")
11845 ":" cwd "/bin"))
11846 (setenv "TMPDIR" "/tmp")
11847
11848 (substitute* "Cheetah/Tests/Test.py"
11849 (("unittest.TextTestRunner\\(\\)")
11850 "unittest.TextTestRunner(verbosity=2)"))
11851
11852 (invoke "python" "Cheetah/Tests/Test.py")))))))
11853 (propagated-inputs
11854 `(("python-markdown" ,python-markdown))) ;optional
11855 (home-page "http://cheetahtemplate.org/")
11856 (synopsis "Template engine")
11857 (description "Cheetah is a text-based template engine and Python code
11858generator.
11859
11860Cheetah can be used as a standalone templating utility or referenced as
11861a library from other Python applications. It has many potential uses,
11862but web developers looking for a viable alternative to ASP, JSP, PHP and
11863PSP are expected to be its principle user group.
11864
11865Features:
11866@enumerate
11867@item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
11868 text-based format.
11869@item Cleanly separates content, graphic design, and program code.
11870@item Blends the power and flexibility of Python with a simple template language
11871 that non-programmers can understand.
11872@item Gives template writers full access to any Python data structure, module,
11873 function, object, or method in their templates.
11874@item Makes code reuse easy by providing an object-orientated interface to
11875 templates that is accessible from Python code or other Cheetah templates.
11876 One template can subclass another and selectively reimplement sections of it.
11877@item Provides a simple, yet powerful, caching mechanism that can dramatically
11878 improve the performance of a dynamic website.
11879@item Compiles templates into optimized, yet readable, Python code.
11880@end enumerate")
11881 (license (license:x11-style "file://LICENSE"))))
11882
11883(define-public python2-cheetah
11884 (package-with-python2 python-cheetah))
11885
11886(define-public python-dulwich
11887 (package
11888 (name "python-dulwich")
11889 (version "0.18.6")
11890 (source
11891 (origin
11892 (method url-fetch)
11893 (uri (list (string-append "https://www.dulwich.io/releases/"
11894 "dulwich-" version ".tar.gz")
11895 (pypi-uri "dulwich" version)))
11896 (sha256
11897 (base32
11898 "1aa1xfrxkc3j9s4xi0llhf5gndyi9ryprcxsqfa5fcb8ph34981q"))))
11899 (build-system python-build-system)
11900 (arguments
11901 `(#:phases
11902 (modify-phases %standard-phases
11903 (add-before 'check 'fix-tests
11904 (lambda* (#:key inputs #:allow-other-keys)
11905 ;; The tests use Popen with a custom environment which doesn't
11906 ;; include PATH.
11907 (substitute* "dulwich/tests/compat/utils.py"
11908 (("'git'") (string-append "'"
11909 (which "git")
11910 "'")))
11911 (substitute* '("dulwich/tests/test_repository.py"
11912 "dulwich/tests/test_hooks.py")
11913 (("#!/bin/sh") (string-append "#!" (which "sh"))))
11914 (setenv "TEST_RUNNER" "unittest")
11915 (setenv "PYTHONHASHSEED" "random")
11916 #t)))))
11917 (propagated-inputs
11918 `(("python-fastimport" ,python-fastimport)))
11919 (native-inputs
11920 `(("python-mock" ,python-mock)
11921 ("python-geventhttpclient" ,python-geventhttpclient)
11922 ("git" ,git)))
11923 (home-page "https://www.dulwich.io/")
11924 (synopsis "Git implementation in Python")
11925 (description "Dulwich is an implementation of the Git file formats and
11926protocols written in pure Python.")
11927 ;; Can be used with either license.
11928 (license (list license:asl2.0 license:gpl2+))))
11929
11930(define-public python2-dulwich
11931 (package-with-python2 python-dulwich))
11932
11933(define-public python-pbkdf2
11934 (package
11935 (name "python-pbkdf2")
11936 (version "1.3")
11937 (source
11938 (origin
11939 (method url-fetch)
11940 (uri (pypi-uri "pbkdf2" version))
11941 (sha256
11942 (base32
11943 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
11944 (build-system python-build-system)
11945 (arguments
11946 '(#:phases
11947 (modify-phases %standard-phases
11948 (replace 'check
11949 (lambda _
11950 (setenv "PYTHONPATH"
11951 (string-append (getcwd) "/build/lib:"
11952 (getenv "PYTHONPATH")))
ee2bb944 11953 (invoke "python" "test/test_pbkdf2.py"))))))
44d10b1f
RW
11954 (propagated-inputs
11955 `(("python-pycrypto" ,python-pycrypto))) ; optional
11956 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
11957 (synopsis "Password-based key derivation")
11958 (description "This module implements the password-based key derivation
11959function, PBKDF2, specified in RSA PKCS#5 v2.0.
11960
11961PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
11962is part of the RSA Public Key Cryptography Standards series. The provided
11963implementation takes a password or a passphrase and a salt value (and
11964optionally a iteration count, a digest module, and a MAC module) and provides
11965a file-like object from which an arbitrarly-sized key can be read.")
11966 (license license:expat)))
11967
11968(define-public python2-pbkdf2
11969 (package-with-python2 python-pbkdf2))
11970
11971(define-public python-qrcode
11972 (package
11973 (name "python-qrcode")
217ea1a1 11974 (version "6.1")
44d10b1f
RW
11975 (source
11976 (origin
11977 (method url-fetch)
11978 (uri (pypi-uri "qrcode" version))
11979 (sha256
217ea1a1 11980 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
44d10b1f
RW
11981 (build-system python-build-system)
11982 (arguments
11983 ;; FIXME: Tests require packaging 'pymaging'.
11984 '(#:tests? #f))
11985 (propagated-inputs
11986 `(("python-lxml" ,python-lxml) ; for SVG output
11987 ("python-pillow" ,python-pillow) ; for PNG output
11988 ("python-six" ,python-six)))
44d10b1f
RW
11989 (home-page "https://github.com/lincolnloop/python-qrcode")
11990 (synopsis "QR Code image generator")
11991 (description "This package provides a pure Python QR Code generator
11992module. It uses the Python Imaging Library (PIL) to allow for the generation
11993of QR Codes.
11994
11995In addition this package provides a command line tool to generate QR codes and
11996either write these QR codes to a file or do the output as ascii art at the
11997console.")
11998 (license license:bsd-3)))
11999
12000(define-public python2-qrcode
12001 (package-with-python2 python-qrcode))
12002
12003(define-public python-rst2ansi
12004 (package
12005 (name "python-rst2ansi")
12006 (version "0.1.5")
12007 (source
12008 (origin
12009 (method url-fetch)
12010 (uri (pypi-uri "rst2ansi" version))
12011 (sha256
12012 (base32
12013 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
12014 (build-system python-build-system)
12015 (propagated-inputs
12016 `(("python-docutils" ,python-docutils)))
12017 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
12018 (synopsis "Convert RST to ANSI-decorated console output")
12019 (description
12020 "Python module dedicated to rendering RST (reStructuredText) documents
12021to ansi-escaped strings suitable for display in a terminal.")
12022 (license license:expat)))
12023
12024(define-public python-ansi2html
12025 (package
12026 (name "python-ansi2html")
12027 (version "1.2.0")
12028 (source
12029 (origin
12030 (method url-fetch)
12031 (uri (pypi-uri "ansi2html" version))
12032 (sha256
12033 (base32
12034 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
12035 (build-system python-build-system)
12036 (native-inputs
12037 `(("python-mock" ,python-mock)
12038 ("python-nose" ,python-nose)))
12039 (propagated-inputs
12040 `(("python-six" ,python-six)))
12041 (home-page "https://github.com/ralphbean/ansi2html")
12042 (synopsis "Convert ANSI-decorated console output to HTML")
12043 (description
12044 "@command{ansi2html} is a Python library and command line utility for
12045convering text with ANSI color codes to HTML or LaTeX.")
12046 (license license:gpl3+)))
12047
12048(define-public python2-ansi2html
12049 (package-with-python2 python-ansi2html))
12050
12051(define-public python-ddt
12052 (package
12053 (name "python-ddt")
12054 (version "1.1.3")
12055 (source
12056 (origin
12057 (method url-fetch)
12058 (uri (pypi-uri "ddt" version))
12059 (sha256
12060 (base32
12061 "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk"))))
12062 (build-system python-build-system)
12063 (native-inputs
12064 `(("python-mock" ,python-mock)
12065 ("python-nose" ,python-nose)))
12066 (propagated-inputs
12067 `(("python-six" ,python-six)
12068 ("python-pyyaml" ,python-pyyaml)))
12069 (home-page "https://github.com/txels/ddt")
12070 (synopsis "Data-Driven Tests")
12071 (description
12072 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
12073running it with different test data, and make it appear as multiple test
12074cases.")
12075 (license license:expat)))
12076
12077(define-public python2-ddt
12078 (package-with-python2 python-ddt))
12079
12080(define-public python-pycountry
12081 (package
12082 (name "python-pycountry")
12083 (version "18.5.26")
12084 (source
12085 (origin
12086 (method url-fetch)
12087 (uri (pypi-uri "pycountry" version))
12088 (sha256
12089 (base32
12090 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
12091 (build-system python-build-system)
12092 (home-page "https://bitbucket.org/flyingcircus/pycountry")
12093 (synopsis "ISO databases for languages, countries, currencies, etc.")
12094 (description
12095 "@code{pycountry} provides the ISO databases for the standards:
12096@enumerate
12097@item 639-3 (Languages)
12098@item 3166 (Countries)
12099@item 3166-3 (Deleted Countries)
12100@item 3166-2 (Subdivisions of countries)
12101@item 4217 (Currencies)
12102@item 15924 (Scripts)
12103@end enumerate
12104It includes a copy from Debian’s pkg-isocodes and makes the data accessible
12105through a Python API.")
12106 (license license:lgpl2.1+)))
12107
12108(define-public python2-pycountry
12109 (package-with-python2 python-pycountry))
12110
12111(define-public python-pycosat
12112 (package
12113 (name "python-pycosat")
12114 (version "0.6.1")
12115 (source
12116 (origin
12117 (method url-fetch)
12118 (uri (pypi-uri "pycosat" version))
12119 (sha256
12120 (base32
12121 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
12122 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
12123 (build-system python-build-system)
12124 (home-page "https://github.com/ContinuumIO/pycosat")
12125 (synopsis "Bindings to picosat (a SAT solver)")
12126 (description
12127 "This package provides efficient Python bindings to @code{picosat} on
12128the C level. When importing pycosat, the @code{picosat} solver becomes part
12129of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
12130Problem} (SAT) solver.")
12131 (license license:expat)))
12132
12133(define-public python2-pycosat
12134 (package-with-python2 python-pycosat))
12135
12136(define-public python2-ruamel.ordereddict
12137 (package
12138 (name "python2-ruamel.ordereddict")
12139 (version "0.4.9")
12140 (source
12141 (origin
12142 (method url-fetch)
12143 (uri (pypi-uri "ruamel.ordereddict" version))
12144 (sha256
12145 (base32
12146 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
12147 (build-system python-build-system)
12148 (arguments
12149 `(#:python ,python-2
12150 #:phases
12151 (modify-phases %standard-phases
12152 (delete 'check)
12153 (add-after 'install 'check
12154 (lambda* (#:key inputs outputs #:allow-other-keys)
12155 (add-installed-pythonpath inputs outputs)
f987ac30 12156 (invoke "python" "test/testordereddict.py"))))))
44d10b1f
RW
12157 (home-page "https://bitbucket.org/ruamel/ordereddict")
12158 (synopsis "Version of dict that keeps keys in insertion order")
12159 (description
12160 "This is an implementation of an ordered dictionary with @dfn{Key
12161Insertion Order} (KIO: updates of values do not affect the position of the
12162key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
12163removed and put at the back). The standard library module @code{OrderedDict},
12164implemented later, implements a subset of @code{ordereddict} functionality.
12165Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
12166Order} (KSO, no sorting function can be specified, but a transform can be
12167specified to apply on the key before comparison (e.g. @code{string.lower})).")
12168 (license license:expat)))
12169
12170(define-public python-pypeg2
12171 (package
12172 (name "python-pypeg2")
12173 (version "2.15.2")
12174 (source
12175 (origin
12176 (method url-fetch)
12177 (uri (pypi-uri "pyPEG2" version))
12178 (sha256
12179 (base32
12180 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
12181 (build-system python-build-system)
12182 (propagated-inputs `(("python-lxml" ,python-lxml)))
12183 (arguments
12184 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
12185 '(#:tests? #f))
12186 (home-page "https://fdik.org/pyPEG/")
12187 (synopsis "Parsering Expression Grammars in Python")
12188 (description "PyPEG is an intrinsic parser interpreter framework for
12189Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
12190parse many formal languages.")
12191 (license license:gpl2)))
12192
12193(define-public python-incremental
12194 (package
12195 (name "python-incremental")
12196 (version "17.5.0")
12197 (source
12198 (origin
12199 (method url-fetch)
12200 (uri (pypi-uri "incremental" version))
12201 (sha256
12202 (base32
12203 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
12204 (build-system python-build-system)
12205 (home-page "https://github.com/hawkowl/incremental")
12206 (synopsis "Library for versioning Python projects")
12207 (description "Incremental is a small library that versions your Python
12208projects.")
12209 (license license:expat)))
12210
12211(define-public python2-incremental
12212 (package-with-python2 python-incremental))
12213
12214(define-public python-invoke
12215 (package
12216 (name "python-invoke")
12217 (home-page "http://www.pyinvoke.org/")
12218 (version "1.1.0")
12219 (source (origin
12220 (method url-fetch)
12221 (uri (pypi-uri "invoke" version))
12222 (sha256
12223 (base32
12224 "0aiy1xvk1f91246zxd1zqrm679vdvd10h843a2na41cqr3cflpi6"))))
12225 (build-system python-build-system)
12226 (arguments
12227 ;; XXX: Requires many dependencies that are not yet in Guix.
12228 `(#:tests? #f))
12229 (synopsis "Pythonic task execution")
12230 (description
12231 "Invoke is a Python task execution tool and library, drawing inspiration
12232from various sources to arrive at a powerful and clean feature set. It is
12233evolved from the Fabric project, but focuses on local and abstract concerns
12234instead of servers and network commands.")
12235 (license license:bsd-3)))
12236
12237(define-public python2-invoke
12238 (package-with-python2 python-invoke))
12239
12240(define-public python-automat
12241 (package
12242 (name "python-automat")
919d80a0 12243 (version "0.7.0")
44d10b1f
RW
12244 (source (origin
12245 (method url-fetch)
12246 (uri (pypi-uri "Automat" version))
12247 (sha256
12248 (base32
919d80a0 12249 "03ivg70n3b1cbcd2zvjhk8y4kmqxcvhmili39lmgx09dza1qpmyb"))))
44d10b1f
RW
12250 (build-system python-build-system)
12251 ;; We disable the tests because they require python-twisted, while
12252 ;; python-twisted depends on python-automat. Twisted is optional, but the
12253 ;; tests fail if it is not available. Also see
12254 ;; <https://github.com/glyph/automat/issues/71>.
12255 (arguments '(#:tests? #f))
12256 (native-inputs
12257 `(("python-m2r" ,python-m2r)
12258 ("python-setuptools-scm" ,python-setuptools-scm)
12259 ("python-graphviz" ,python-graphviz)))
12260 (propagated-inputs
12261 `(("python-six" ,python-six)
12262 ("python-attrs" ,python-attrs)))
12263 (home-page "https://github.com/glyph/Automat")
12264 (synopsis "Self-service finite-state machines")
12265 (description "Automat is a library for concise, idiomatic Python
12266expression of finite-state automata (particularly deterministic finite-state
12267transducers).")
12268 (license license:expat)))
12269
12270(define-public python2-automat
12271 (package-with-python2 python-automat))
12272
12273(define-public python-m2r
12274 (package
12275 (name "python-m2r")
bcfb8fac 12276 (version "0.2.1")
44d10b1f
RW
12277 (source (origin
12278 (method url-fetch)
12279 (uri (pypi-uri "m2r" version))
12280 (sha256
12281 (base32
bcfb8fac 12282 "16gdm8i06jjmlpvckpfmlkr4693dh0vs192vgsqn84fsdkbbm45z"))))
44d10b1f
RW
12283 (build-system python-build-system)
12284 (propagated-inputs
12285 `(("python-docutils" ,python-docutils)
12286 ("python-mistune" ,python-mistune)))
12287 (native-inputs
12288 `(("python-pygments" ,python-pygments)
12289 ("python-mock" ,python-mock)))
12290 (home-page "https://github.com/miyakogi/m2r")
12291 (synopsis "Markdown to reStructuredText converter")
12292 (description "M2R converts a markdown file including reST markups to valid
12293reST format.")
12294 (license license:expat)))
12295
12296(define-public python2-m2r
12297 (package-with-python2 python-m2r))
12298
12299(define-public python-constantly
12300 (package
12301 (name "python-constantly")
12302 (version "15.1.0")
12303 (source (origin
12304 (method url-fetch)
12305 (uri (pypi-uri "constantly" version))
12306 (sha256
12307 (base32
12308 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
12309 (build-system python-build-system)
12310 (home-page "https://github.com/twisted/constantly")
12311 (synopsis "Symbolic constants in Python")
12312 (description "Constantly is a Python library that provides symbolic
12313constant support. It includes collections and constants with text, numeric,
12314and bit flag values.")
12315 (license license:expat)))
12316
12317(define-public python2-constantly
12318 (package-with-python2 python-constantly))
12319
12320(define-public python-attrs
12321 (package
12322 (name "python-attrs")
c41d5144 12323 (version "19.1.0")
44d10b1f
RW
12324 (source (origin
12325 (method url-fetch)
12326 (uri (pypi-uri "attrs" version))
12327 (sha256
12328 (base32
c41d5144 12329 "16g33zr5f449lqc5wgvzpknxryfzrfsxcr6kpgxwn7l5fkv71f7h"))))
44d10b1f
RW
12330 (build-system python-build-system)
12331 (arguments
12332 `(#:modules ((guix build utils)
12333 (guix build python-build-system)
12334 (ice-9 ftw)
12335 (srfi srfi-1)
12336 (srfi srfi-26))
12337 #:phases (modify-phases %standard-phases
12338 (replace 'check
12339 (lambda _
12340 (let ((cwd (getcwd)))
12341 (setenv "PYTHONPATH"
12342 (string-append
12343 cwd "/build/"
12344 (find (cut string-prefix? "lib" <>)
12345 (scandir (string-append cwd "/build")))
12346 ":"
12347 (getenv "PYTHONPATH")))
12348 (invoke "python" "-m" "pytest")))))))
12349 (native-inputs
12350 `(("python-coverage" ,python-coverage)
12351 ("python-hypothesis" ,python-hypothesis)
12352 ("python-pympler" ,python-pympler)
12353 ("python-pytest" ,python-pytest)
12354 ("python-six" ,python-six)
12355 ("python-sphinx" ,python-sphinx)
12356 ("python-zope-interface" ,python-zope-interface)))
12357 (home-page "https://github.com/python-attrs/attrs/")
12358 (synopsis "Attributes without boilerplate")
12359 (description "@code{attrs} is a Python package with class decorators that
12360ease the chores of implementing the most common attribute-related object
12361protocols.")
12362 (license license:expat)))
12363
12364(define-public python2-attrs
12365 (package-with-python2 python-attrs))
12366
12367(define-public python-attrs-bootstrap
12368 (package
12369 (inherit python-attrs)
12370 (name "python-attrs-bootstrap")
44d10b1f
RW
12371 (native-inputs `())
12372 (arguments `(#:tests? #f))))
12373
12374(define-public python2-attrs-bootstrap
12375 (package-with-python2 python-attrs-bootstrap))
12376
12377(define-public python2-cliapp
12378 (package
12379 (name "python2-cliapp")
9064b84e 12380 (version "1.20180812.1")
44d10b1f
RW
12381 (source
12382 (origin
12383 (method url-fetch)
12384 (uri (string-append
12385 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
12386 version ".tar.gz"))
12387 (sha256
12388 (base32
9064b84e 12389 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
44d10b1f
RW
12390 (build-system python-build-system)
12391 (arguments
12392 `(#:python ,python-2
12393 #:phases
12394 (modify-phases %standard-phases
12395 ;; check phase needs to be run before the build phase. If not,
12396 ;; coverage-test-runner looks for tests for the built source files,
12397 ;; and fails.
12398 (delete 'check)
12399 (add-before 'build 'check
12400 (lambda _
12401 ;; Disable python3 tests
12402 (substitute* "check"
12403 (("python3") "# python3"))
6c826d32 12404 (invoke "./check"))))))
44d10b1f
RW
12405 (native-inputs
12406 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
12407 ("python2-pep8" ,python2-pep8)))
12408 (propagated-inputs
12409 `(("python2-pyaml" ,python2-pyaml)))
12410 (home-page "https://liw.fi/cliapp/")
12411 (synopsis "Python framework for command line programs")
12412 (description "@code{python2-cliapp} is a python framework for
12413command line programs. It contains the typical stuff such programs
12414need to do, such as parsing the command line for options, and
12415iterating over input files.")
12416 (license license:gpl2+)))
12417
12418(define-public python2-ttystatus
12419 (package
12420 (name "python2-ttystatus")
e516a9c2 12421 (version "0.36")
44d10b1f
RW
12422 (source
12423 (origin
12424 (method url-fetch)
12425 (uri (string-append
12426 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
12427 version ".tar.gz"))
12428 (sha256
12429 (base32
e516a9c2 12430 "06mdk4d19zw2j3is54gndhzl396g3xc8k52m7i86z69s9hcz71by"))))
44d10b1f
RW
12431 (build-system python-build-system)
12432 (native-inputs
12433 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
12434 ("python2-pep8" ,python2-pep8)))
12435 (arguments
12436 `(#:python ,python-2
12437 #:phases
12438 (modify-phases %standard-phases
12439 ;; check phase needs to be run before the build phase. If not,
12440 ;; coverage-test-runner looks for tests for the built source files,
12441 ;; and fails.
12442 (delete 'check)
12443 (add-before 'build 'check
cbeee881 12444 (lambda _ (invoke "make" "check"))))))
44d10b1f
RW
12445 (home-page "https://liw.fi/ttystatus/")
12446 (synopsis "Python library for showing progress reporting and
12447status updates on terminals")
12448 (description "@code{python2-ttystatus} is a python library for
12449showing progress reporting and status updates on terminals, for
12450command line programs. Output is automatically adapted to the width
12451of the terminal: truncated if it does not fit, and resized if the
12452terminal size changes.")
12453 (license license:gpl3+)))
12454
12455(define-public python2-tracing
12456 (package
12457 (name "python2-tracing")
12458 (version "0.10")
12459 (source
12460 (origin
12461 (method url-fetch)
12462 (uri (string-append
12463 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
12464 version ".tar.gz"))
12465 (sha256
12466 (base32
12467 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
12468 (build-system python-build-system)
12469 (arguments
12470 `(#:python ,python-2))
12471 (home-page "https://liw.fi/tracing/")
12472 (synopsis "Python debug logging helper")
12473 (description "@code{python2-tracing} is a python library for
12474logging debug messages. It provides a way to turn debugging messages
12475on and off, based on the filename they occur in. It is much faster
12476than using @code{logging.Filter} to accomplish the same thing, which
12477matters when code is run in production mode. The actual logging still
12478happens using the @code{logging} library.")
12479 (license license:gpl3+)))
12480
12481(define-public python2-larch
12482 (package
12483 (name "python2-larch")
12484 (version "1.20151025")
12485 (source
12486 (origin
12487 (method url-fetch)
12488 (uri (string-append
12489 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
12490 version ".tar.gz"))
12491 (patches (search-patches
12492 "python2-larch-coverage-4.0a6-compatibility.patch"))
12493 (sha256
12494 (base32
12495 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
12496 (build-system python-build-system)
12497 (arguments
12498 `(#:python ,python-2
12499 #:phases
12500 (modify-phases %standard-phases
12501 ;; check phase needs to be run before the build phase. If not,
12502 ;; coverage-test-runner looks for tests for the built source files,
12503 ;; and fails.
12504 (delete 'check)
12505 (add-before 'build 'check
204ad455 12506 (lambda _ (invoke "make" "check"))))))
44d10b1f
RW
12507 (native-inputs
12508 `(("cmdtest" ,cmdtest)
12509 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
12510 (propagated-inputs
12511 `(("python2-tracing" ,python2-tracing)))
12512 (home-page "https://liw.fi/larch/")
12513 (synopsis "Python copy-on-write B-tree library")
12514 (description "@code{python2-larch} is an implementation of
12515particular kind of B-tree, based on research by Ohad Rodeh. See
12516@url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
12517on the data structure.
12518
12519The distinctive feature of this B-tree is that a node is never
12520(conceptually) modified. Instead, all updates are done by
12521copy-on-write. This makes it easy to clone a tree, and modify only the
12522clone, while other processes access the original tree.")
12523 (license license:gpl3+)))
12524
12525(define-public python-astroid
12526 (package
12527 (name "python-astroid")
12528 (version "2.1.0")
12529 (source
12530 (origin
12531 (method url-fetch)
12532 (uri (pypi-uri "astroid" version))
12533 (sha256
12534 (base32
12535 "08hz675knh4294bancdapql392fmbjyimhbyrmfkz1ka7l035c1m"))))
12536 (build-system python-build-system)
12537 (propagated-inputs
12538 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
12539 ("python-six" ,python-six)
12540 ("python-wrapt" ,python-wrapt)))
12541 (native-inputs
12542 `(("python-dateutil" ,python-dateutil)
12543 ("python-nose" ,python-nose)
12544 ("python-pytest" ,python-pytest)
12545 ("python-pytest-runner" ,python-pytest-runner)))
12546 (arguments
12547 `(#:phases
12548 (modify-phases %standard-phases
12549 (add-after 'unpack 'remove-spurious-test
12550 (lambda _
12551 ;; This can be removed after upgrading from python-3.7
12552 ;; https://github.com/PyCQA/astroid/issues/593
12553 ;; https://bugs.python.org/issue34056
12554 (delete-file "astroid/tests/unittest_modutils.py")
12555 #t))
12556 (replace 'check
12557 (lambda _
12558 (invoke "pytest" "astroid"))))))
12559 (home-page "https://github.com/PyCQA/astroid")
12560 (synopsis "Common base representation of python source code for pylint and
12561other projects")
12562 (description "@code{python-astroid} provides a common base representation
12563of python source code for projects such as pychecker, pyreverse, pylint, etc.
12564
12565It provides a compatible representation which comes from the _ast module. It
12566rebuilds the tree generated by the builtin _ast module by recursively walking
12567down the AST and building an extended ast. The new node classes have
12568additional methods and attributes for different usages. They include some
12569support for static inference and local name scopes. Furthermore, astroid
12570builds partial trees by inspecting living objects.")
12571 (license license:lgpl2.1+)
12572 (properties `((python2-variant . ,(delay python2-astroid))))))
12573
12574(define-public python2-astroid
12575 (let ((base (package-with-python2
12576 (strip-python2-variant python-astroid))))
12577 (package (inherit base)
12578 ;; Version 2.x removes python2 support.
12579 (version "1.6.5")
12580 (source
12581 (origin
12582 (method url-fetch)
12583 (uri (pypi-uri "astroid" version))
12584 (sha256
12585 (base32
12586 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
12587 (arguments
12588 (substitute-keyword-arguments (package-arguments base)
12589 ((#:phases phases)
12590 `(modify-phases ,phases
12591 (add-after 'unpack 'remove-spurious-test
12592 (lambda _
12593 ;; https://github.com/PyCQA/astroid/issues/276
12594 (delete-file "astroid/tests/unittest_brain.py")
12595 #t))
12596 (replace 'check
12597 (lambda _
12598 (invoke"python" "-m" "unittest" "discover"
12599 "-p" "unittest*.py")))))))
12600 (native-inputs `())
12601 (propagated-inputs
12602 `(("python2-backports-functools-lru-cache"
12603 ,python2-backports-functools-lru-cache)
12604 ("python2-enum34" ,python2-enum34)
12605 ("python2-singledispatch" ,python2-singledispatch)
12606 ,@(package-propagated-inputs base))))))
12607
12608(define-public python-isort
12609 (package
12610 (name "python-isort")
e2227b6a 12611 (version "4.3.4")
44d10b1f
RW
12612 (source
12613 (origin
e2227b6a
EF
12614 (method git-fetch)
12615 (uri (git-reference
12616 ;; Tests pass only from the Github sources
12617 (url "https://github.com/timothycrosley/isort")
12618 (commit version)))
12619 (file-name (git-file-name name version))
44d10b1f
RW
12620 (sha256
12621 (base32
e2227b6a 12622 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
44d10b1f
RW
12623 (build-system python-build-system)
12624 (native-inputs
12625 `(("python-mock" ,python-mock)
12626 ("python-pytest" ,python-pytest)))
12627 (home-page "https://github.com/timothycrosley/isort")
12628 (synopsis "Python utility/library to sort python imports")
12629 (description "@code{python-isort} is a python utility/library to sort
12630imports alphabetically, and automatically separated into sections. It
12631provides a command line utility, a python library and plugins for various
12632editors.")
e2227b6a
EF
12633 (license license:expat)
12634 (properties `((python2-variant . ,(delay python2-isort))))))
44d10b1f
RW
12635
12636(define-public python2-isort
e2227b6a
EF
12637 (let ((base (package-with-python2
12638 (strip-python2-variant python-isort))))
12639 (package (inherit base)
12640 (native-inputs
12641 `(("python2-futures" ,python2-futures)
12642 ,@(package-native-inputs base))))))
44d10b1f
RW
12643
12644(define-public python2-backports-functools-lru-cache
12645 (package
12646 (name "python2-backports-functools-lru-cache")
12647 (version "1.5")
12648 (source
12649 (origin
12650 (method url-fetch)
12651 ;; only the pypi tarballs contain the necessary metadata
12652 (uri (pypi-uri "backports.functools_lru_cache" version))
12653 (sha256
12654 (base32
12655 "06jgv8gib4fhky0p5cmxdghvsgjyzcdgk48k8pxb1ccf11znk64x"))))
12656 (build-system python-build-system)
12657 (native-inputs
12658 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
12659 (arguments
12660 `(#:python ,python-2))
12661 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
12662 (synopsis "Backport of functools.lru_cache from Python 3.3")
12663 (description "@code{python2-backports-functools-lru-cache} is a backport
12664of @code{functools.lru_cache} from python 3.3.")
12665 (license license:expat)))
12666
12667(define-public python-configparser
12668 (package
12669 (name "python-configparser")
84127f8c 12670 (version "3.7.1")
44d10b1f
RW
12671 (source
12672 (origin
12673 (method url-fetch)
84127f8c 12674 (uri (pypi-uri "configparser" version))
44d10b1f
RW
12675 (sha256
12676 (base32
84127f8c 12677 "0cnz213il9lhgda6x70fw7mfqr8da43s3wm343lwzhqx94mgmmav"))))
44d10b1f 12678 (build-system python-build-system)
809f003f 12679 (home-page "https://github.com/jaraco/configparser/")
44d10b1f
RW
12680 (synopsis "Backport of configparser from python 3.5")
12681 (description "@code{python-configparser} is a backport of
12682@code{configparser} from Python 3.5 so that it can be used directly
12683in other versions.")
12684 (license license:expat)))
12685
12686(define-public python2-configparser
12687 (package-with-python2 python-configparser))
12688
12689(define-public python-mando
12690 (package
12691 (name "python-mando")
12692 (version "0.6.4")
12693 (source (origin
12694 (method url-fetch)
12695 (uri (pypi-uri "mando" version))
12696 (sha256
12697 (base32
12698 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
12699 (build-system python-build-system)
12700 (propagated-inputs
12701 `(("python-rst2ansi" ,python-rst2ansi)
12702 ("python-six" ,python-six)))
12703 (native-inputs
12704 `(("python-pytest" ,python-pytest)))
12705 (home-page "https://mando.readthedocs.org/")
12706 (synopsis
12707 "Wrapper around argparse, allowing creation of complete CLI applications")
12708 (description
12709 "This package is a wrapper around argparse, allowing you to write complete CLI
12710applications in seconds while maintaining all the flexibility.")
12711 (license license:expat)))
12712
12713(define-public python2-mando
12714 (package-with-python2 python-mando))
12715
70daf82f
RW
12716(define-public python2-argparse
12717 (package
12718 (name "python2-argparse")
12719 (version "1.4.0")
12720 (source
12721 (origin
12722 (method url-fetch)
12723 (uri (pypi-uri "argparse" version))
12724 (sha256
12725 (base32
12726 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
12727 (build-system python-build-system)
12728 (arguments
12729 `(#:python ,python-2))
12730 (home-page "https://github.com/ThomasWaldmann/argparse/")
12731 (synopsis "Python command-line parsing library")
12732 (description
12733 "This package is mostly for people who want to have @code{argparse} on
12734older Pythons because it was not part of the standard library back then.")
12735 (license license:psfl)))
12736
44d10b1f
RW
12737(define-public python-fudge
12738 (package
12739 (name "python-fudge")
12740 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
12741 ;; package, which is currently the only use of this package.
12742 (version "0.9.6")
12743 (source
12744 (origin
12745 (method url-fetch)
12746 (uri (pypi-uri "fudge" version))
12747 (sha256
12748 (base32
12749 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
12750 (build-system python-build-system)
12751 (arguments
12752 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
12753 (home-page "https://github.com/fudge-py/fudge")
12754 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
12755 (description
12756 "Fudge is a Python module for using fake objects (mocks and stubs) to
12757test real ones.
12758
12759In readable Python code, you declare the methods available on your fake object
12760and how they should be called. Then you inject that into your application and
12761start testing. This declarative approach means you don’t have to record and
12762playback actions and you don’t have to inspect your fakes after running code.
12763If the fake object was used incorrectly then you’ll see an informative
12764exception message with a traceback that points to the culprit.")
12765 (license license:expat)))
12766
12767(define-public python2-fudge
12768 (package-with-python2 python-fudge))
12769
12770(define-public python-mwclient
12771 (package
12772 (name "python-mwclient")
12773 (version "0.8.4")
12774 (source
12775 (origin
12776 (method url-fetch)
12777 ;; The PyPI version wouldn't contain tests.
12778 (uri (string-append "https://github.com/mwclient/mwclient/archive/"
12779 "v" version ".tar.gz"))
12780 (file-name (string-append name "-" version ".tar.gz"))
12781 (sha256
12782 (base32
12783 "1jj0yhilkjir00719fc7w133x7hdyhkxhk6xblla4asig45klsfv"))))
12784 (build-system python-build-system)
12785 (propagated-inputs
12786 `(("python-requests" ,python-requests)
12787 ("python-requests-oauthlib"
12788 ,python-requests-oauthlib)
12789 ("python-six" ,python-six)))
12790 (native-inputs
12791 `(("python-mock" ,python-mock)
12792 ("python-pytest" ,python-pytest)
12793 ("python-pytest-pep8" ,python-pytest-pep8)
12794 ("python-pytest-cache" ,python-pytest-cache)
12795 ("python-pytest-cov" ,python-pytest-cov)
12796 ("python-responses" ,python-responses)))
12797 (home-page "https://github.com/btongminh/mwclient")
12798 (synopsis "MediaWiki API client")
12799 (description "This package provides a MediaWiki API client.")
12800 (license license:expat)))
12801
12802(define-public python2-mwclient
12803 (package-with-python2 python-mwclient))
12804
12805(define-public python-utils
12806 (package
12807 (name "python-utils")
12808 (version "2.1.0")
12809 (source (origin
12810 (method url-fetch)
12811 (uri (pypi-uri "python-utils" version))
12812 (sha256
12813 (base32
12814 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
12815 (build-system python-build-system)
12816 (native-inputs
12817 `(("pytest-runner" ,python-pytest-runner)
12818 ("pytest" ,python-pytest)
12819 ("six" ,python-six)))
12820 (home-page "https://github.com/WoLpH/python-utils")
12821 (synopsis "Convenient utilities not included with the standard Python install")
12822 (description
12823 "Python Utils is a collection of small Python functions and classes which
12824make common patterns shorter and easier.")
12825 (license license:bsd-2)))
12826
12827(define-public python2-utils
12828 (package-with-python2 python-utils))
12829
44d10b1f
RW
12830(define-public python-diff-match-patch
12831 (package
12832 (name "python-diff-match-patch")
12833 (version "20121119")
12834 (source
12835 (origin
12836 (method url-fetch)
12837 (uri (pypi-uri "diff-match-patch" version))
12838 (sha256
12839 (base32
12840 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
12841 (build-system python-build-system)
12842 (home-page "https://code.google.com/p/google-diff-match-patch")
12843 (synopsis "Synchronize plain text")
12844 (description "Diff Match and Patch libraries offer robust algorithms to
12845perform the operations required for synchronizing plain text.")
12846 (license license:asl2.0)))
12847
12848(define-public python2-diff-match-patch
12849 (package-with-python2 python-diff-match-patch))
12850
12851(define-public python-dirsync
12852 (package
12853 (name "python-dirsync")
12854 (version "2.2.3")
12855 (source
12856 (origin
12857 (method url-fetch)
12858 (uri (pypi-uri "dirsync" version))
12859 (sha256
12860 (base32
12861 "1r40fkanksagcszf1ag85mdr8w7rgc7196n6s1qlsk2abw6i7v0z"))))
12862 (build-system python-build-system)
12863 (propagated-inputs
12864 `(("six" ,python-six)))
12865 (home-page "https://bitbucket.org/tkhyn/dirsync")
12866 (synopsis "Advanced directory tree synchronisation tool")
12867 (description "Advanced directory tree synchronisation tool.")
12868 (license license:expat)))
12869
12870(define-public python2-dirsync
12871 (package-with-python2 python-dirsync))
12872
12873(define-public python-levenshtein
12874 (package
12875 (name "python-levenshtein")
12876 (version "0.12.0")
12877 (source
12878 (origin
12879 (method url-fetch)
12880 (uri (pypi-uri "python-Levenshtein" version))
12881 (sha256
12882 (base32
12883 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
12884 (build-system python-build-system)
12885 (home-page "https://github.com/ztane/python-Levenshtein")
12886 (synopsis "Fast computation of Levenshtein distance and string similarity")
12887 (description
12888 "The Levenshtein Python C extension module contains functions for fast computation of
12889@enumerate
12890@item Levenshtein (edit) distance, and edit operations
12891@item string similarity
12892@item approximate median strings, and generally string averaging
12893@item string sequence and set similarity
12894@end enumerate
12895It supports both normal and Unicode strings.")
12896 (license license:gpl2+)))
12897
12898(define-public python2-levenshtein
12899 (package-with-python2 python-levenshtein))
12900
12901(define-public python-scandir
12902 (package
12903 (name "python-scandir")
12904 (version "1.9.0")
12905 (source
12906 (origin
12907 (method url-fetch)
12908 (uri (pypi-uri "scandir" version))
12909 (sha256
12910 (base32 "0r3hvf1a9jm1rkqgx40gxkmccknkaiqjavs8lccgq9s8khh5x5s4"))))
12911 (build-system python-build-system)
12912 (arguments
12913 `(#:phases (modify-phases %standard-phases
12914 (replace 'check
12915 (lambda _
12916 (invoke "python" "test/run_tests.py"))))))
12917 (home-page "https://github.com/benhoyt/scandir")
12918 (synopsis "Directory iteration function")
12919 (description
12920 "Directory iteration function like os.listdir(), except that instead of
12921returning a list of bare filenames, it yields DirEntry objects that include
12922file type and stat information along with the name. Using scandir() increases
12923the speed of os.walk() by 2-20 times (depending on the platform and file
12924system) by avoiding unnecessary calls to os.stat() in most cases.
12925
12926This package is part of the Python standard library since version 3.5.")
12927 (license license:bsd-3)))
12928
12929(define-public python2-scandir
12930 (package-with-python2 python-scandir))
12931
12932(define-public python2-stemming
12933 (package
12934 (name "python2-stemming")
12935 (version "1.0.1")
12936 (source
12937 (origin
12938 (method url-fetch)
12939 (uri (pypi-uri "stemming" version))
12940 (sha256
12941 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
12942 (build-system python-build-system)
12943 (arguments
12944 `(#:python ,python-2))
12945 (home-page "https://bitbucket.org/mchaput/stemming/overview")
12946 (synopsis "Python implementations of various stemming algorithms")
12947 (description
12948 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
12949stemming algorithms for English. These implementations are straightforward and
12950efficient, unlike some Python versions of the same algorithms available on the
12951Web. This package is an extraction of the stemming code included in the Whoosh
12952search engine.")
12953 (license license:public-domain)))
12954
12955(define-public python-factory-boy
12956 (package
12957 (name "python-factory-boy")
12958 (version "2.8.1")
12959 (source
12960 (origin
12961 (method url-fetch)
12962 (uri (pypi-uri "factory_boy" version))
12963 (sha256
12964 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
12965 (build-system python-build-system)
12966 (arguments
12967 ;; Tests are not included in the tarball.
12968 `(#:tests? #f))
12969 (propagated-inputs
12970 `(("faker" ,python-faker)))
12971 (home-page "https://github.com/benhoyt/scandir")
12972 (synopsis "Versatile test fixtures replacement")
12973 (description
12974 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
12975
12976As a fixtures replacement tool, it aims to replace static, hard to maintain
12977fixtures with easy-to-use factories for complex object.
12978
12979Instead of building an exhaustive test setup with every possible combination
12980of corner cases, factory_boy allows you to use objects customized for the
12981current test, while only declaring the test-specific fields")
12982 (license license:expat)))
12983
12984(define-public python2-factory-boy
12985 (package-with-python2 python-factory-boy))
12986
12987(define-public python-translate-toolkit
12988 (package
12989 (name "python-translate-toolkit")
12990 (version "2.1.0")
12991 (source
12992 (origin
12993 (method url-fetch)
12994 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
12995 (sha256
12996 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
12997 (build-system python-build-system)
12998 (native-inputs
12999 `(("python-pytest" ,python-pytest)
13000 ("python-sphinx" ,python-sphinx)))
13001 (propagated-inputs
13002 `(("python-babel" ,python-babel)
13003 ("python-beautifulsoup4" ,python-beautifulsoup4)
13004 ("python-chardet" ,python-chardet)
13005 ("python-diff-match-patch" ,python-diff-match-patch)
13006 ("python-levenshtein" ,python-levenshtein)
13007 ("python-lxml" ,python-lxml)
13008 ("python-six" ,python-six)
13009 ("python-vobject" ,python-vobject)
13010 ("python-pyyaml" ,python-pyyaml)))
13011 (arguments
13012 ;; TODO: tests are not run, because they end with
13013 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
13014 ;; 'parse_funcs'
13015 ;; during test setup.
13016 `(#:tests? #f))
18919cf9 13017 (home-page "https://toolkit.translatehouse.org")
44d10b1f
RW
13018 (synopsis "Tools and API for translation and localization engineering")
13019 (description
13020 "Tools and API for translation and localization engineering. It contains
13021several utilities, as well as an API for building localization tools.")
13022 (license license:gpl2+)))
13023
13024(define-public python2-translate-toolkit
13025 (package-with-python2 python-translate-toolkit))
13026
13027(define-public python-packaging
13028 (package
13029 (name "python-packaging")
94295903 13030 (version "19.0")
44d10b1f
RW
13031 (source
13032 (origin
13033 (method url-fetch)
13034 (uri (pypi-uri "packaging" version))
13035 (sha256
13036 (base32
94295903 13037 "1brjhygq9dz6x1kdljivkjfldi3qf5rbkqgck1bpgv9qpv8ab60c"))))
44d10b1f
RW
13038 (build-system python-build-system)
13039 (arguments
13040 `(#:phases (modify-phases %standard-phases
13041 (replace 'check
13042 (lambda _ (invoke "py.test" "-vv"))))))
13043 (native-inputs
13044 `(("python-pretend" ,python-pretend)
13045 ("python-pytest" ,python-pytest)))
13046 (propagated-inputs
13047 `(("python-pyparsing" ,python-pyparsing)
13048 ("python-six" ,python-six)))
13049 (home-page "https://github.com/pypa/packaging")
13050 (synopsis "Core utilities for Python packages")
13051 (description "Packaging is a Python module for dealing with Python packages.
13052It offers an interface for working with package versions, names, and dependency
13053information.")
13054 ;; From 'LICENSE': This software is made available under the terms of
13055 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
13056 ;; Contributions to this software is made under the terms of *both* these
13057 ;; licenses.
13058 (license (list license:asl2.0 license:bsd-2))))
13059
13060(define-public python2-packaging
13061 (package-with-python2 python-packaging))
13062
13063(define-public python-relatorio
13064 (package
13065 (name "python-relatorio")
13066 (version "0.8.0")
13067 (source
13068 (origin
13069 (method url-fetch)
13070 (uri (pypi-uri "relatorio" version))
13071 (sha256
13072 (base32
13073 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
13074 (build-system python-build-system)
13075 (propagated-inputs
13076 `(("python-lxml" ,python-lxml)
13077 ("python-genshi" ,python-genshi)))
13078 (native-inputs
13079 `(("python-magic" ,python-magic)))
13080 (home-page "https://relatorio.tryton.org/")
13081 (synopsis "Templating library able to output ODT and PDF files")
13082 (description "Relatorio is a templating library which provides a way to
13083easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
13084for more filetypes can be easily added by creating plugins for them.")
13085 (license license:gpl3+)))
13086
13087(define-public python2-relatorio
13088 (package-with-python2 python-relatorio))
13089
13090(define-public python-radon
13091 (package
13092 (name "python-radon")
13093 (version "2.2.0")
13094 (source
13095 (origin
13096 (method url-fetch)
13097 (uri (pypi-uri "radon" version))
13098 (sha256
13099 (base32
13100 "07gq5hq4nrffxnlnksws9hrx7fd001gam63j62i82gyfr23gvdym"))))
13101 (build-system python-build-system)
13102 (arguments
13103 `(#:phases (modify-phases %standard-phases
13104 (replace 'check
13105 (lambda _
13106 (invoke "python" "radon/tests/run.py"))))))
13107 (propagated-inputs
13108 `(("python-colorama" ,python-colorama)
13109 ("python-flake8-polyfill" ,python-flake8-polyfill)
13110 ("python-mando" ,python-mando)))
13111 (native-inputs
13112 `(("python-pytest" ,python-pytest)
13113 ("python-pytest-mock" ,python-pytest-mock)))
13114 (home-page "https://radon.readthedocs.org/")
13115 (synopsis "Code Metrics in Python")
13116 (description "Radon is a Python tool which computes various code metrics.
13117Supported metrics are:
13118@itemize @bullet
13119@item raw metrics: SLOC, comment lines, blank lines, &c.
13120@item Cyclomatic Complexity (i.e. McCabe’s Complexity)
13121@item Halstead metrics (all of them)
13122@item the Maintainability Index (a Visual Studio metric)
13123@end itemize")
13124 (license license:expat)))
13125
13126(define-public python2-radon
13127 (package-with-python2 python-radon))
13128
13129(define-public python-sure
13130 (package
13131 (name "python-sure")
13132 (version "1.4.11")
13133 (source
13134 (origin
13135 (method url-fetch)
13136 (uri (pypi-uri "sure" version))
13137 (sha256
13138 (base32
13139 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
13140 (build-system python-build-system)
13141 (propagated-inputs
13142 `(("python-mock" ,python-mock)
13143 ("python-six" ,python-six)))
13144 (native-inputs
13145 `(("python-nose" ,python-nose)))
13146 (home-page "https://github.com/gabrielfalcao/sure")
13147 (synopsis "Automated testing library in python for python")
13148 (description
13149 "Sure is a python library that leverages a DSL for writing assertions.
13150Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
13151 (license license:gpl3+)))
13152
13153(define-public python2-sure
13154 (package-with-python2 python-sure))
13155
13156(define-public python2-couleur
13157 ;; This package does not seem to support python3 at all, hence,
13158 ;; only the python2 variant definition is provided.
13159 (package
13160 (name "python2-couleur")
13161 (version "0.6.2")
13162 (source
13163 (origin
13164 (method url-fetch)
13165 (uri (pypi-uri "couleur" version))
13166 (sha256
13167 (base32
13168 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
13169 (build-system python-build-system)
13170 (arguments
13171 `(#:python ,python-2))
13172 (home-page "https://github.com/gabrielfalcao/couleur")
13173 (synopsis
13174 "ANSI terminal tool for python, colored shell and other handy fancy features")
13175 (description
13176 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
13177terminal such as coloured output in the shell, overwriting output, indentation, etc.")
13178 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
13179 ;; https://github.com/gabrielfalcao/couleur/issues/11
13180 (license license:lgpl3+)))
13181
13182(define-public python-misaka
13183 (package
13184 (name "python-misaka")
0dcb3412 13185 (version "2.1.1")
44d10b1f
RW
13186 (source
13187 (origin
13188 (method url-fetch)
13189 (uri (pypi-uri "misaka" version))
13190 (sha256
13191 (base32
0dcb3412 13192 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
44d10b1f
RW
13193 (build-system python-build-system)
13194 (arguments
13195 `(;; Line 37 of setup.py calls self.run_command('develop')
13196 ;; in the 'check' phase. This command seems to be trying
13197 ;; to write to
13198 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
13199 ;; for which it does not have the permission to write.
13200 #:tests? #f))
13201 (propagated-inputs
13202 `(("python-cffi" ,python-cffi)))
13203 (home-page "https://github.com/FSX/misaka")
13204 (synopsis "Python binding for Hoedown")
13205 (description
13206 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
13207library written in C. It features a fast HTML renderer and functionality to make custom
13208renderers (e.g. man pages or LaTeX).")
13209 (license license:expat)))
13210
13211(define-public python2-misaka
13212 (package-with-python2 python-misaka))
13213
13214(define-public python2-steadymark
13215 ;; This is forced into being a python2 only variant
13216 ;; due to its dependence on couleur that has no support
13217 ;; for python3
13218 (package
13219 (name "python2-steadymark")
13220 (version "0.7.3")
13221 (source
13222 (origin
13223 (method url-fetch)
13224 (uri (pypi-uri "steadymark" version))
13225 (sha256
13226 (base32
13227 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
13228 (build-system python-build-system)
13229 (native-inputs
13230 `(("python-couleur" ,python2-couleur)
13231 ("python-sure" ,python2-sure)
13232 ("python-misaka" ,python2-misaka)))
13233 (arguments
13234 `(#:python ,python-2
13235 #:phases
13236 (modify-phases %standard-phases
13237 (add-before 'build 'patch-setup-py
13238 (lambda _
13239 ;; Update requirements from dependency==version
13240 ;; to dependency>=version
13241 (substitute* "setup.py"
13242 (("==") ">="))
13243 #t)))))
13244 (home-page "https://github.com/gabrielfalcao/steadymark")
13245 (synopsis "Markdown-based test runner for python")
13246 (description
13247 "@code{Steadymark} allows documentation to be written in github-flavoured
13248markdown. The documentation may contain snippets of code surrounded by python
13249code blocks and @code{Steadymark} will find these snippets and run them, making
13250sure that there are no old malfunctional examples in the documentation examples.")
13251 (license license:expat)))
13252
13253(define-public python-jsonpointer
13254 (package
13255 (name "python-jsonpointer")
13256 (version "1.10")
13257 (source
13258 (origin
13259 (method url-fetch)
13260 (uri (pypi-uri "jsonpointer" version))
13261 (sha256
13262 (base32
13263 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
13264 (build-system python-build-system)
13265 (home-page "https://github.com/stefankoegl/python-json-pointer")
13266 (synopsis "Identify specific nodes in a JSON document")
13267 (description "@code{jsonpointer} allows you to access specific nodes
13268by path in a JSON document (see RFC 6901).")
13269 (license license:bsd-3)))
13270
13271(define-public python2-jsonpointer
13272 (package-with-python2 python-jsonpointer))
13273
13274(define-public python-jsonpatch
13275 (package
13276 (name "python-jsonpatch")
13277 (version "1.16")
13278 (source
13279 (origin
13280 (method url-fetch)
13281 ;; pypi version lacks tests.js
13282 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
13283 "archive/v" version ".tar.gz"))
13284 (file-name (string-append name "-" version ".tar.gz"))
13285 (sha256
13286 (base32
13287 "085ykisl8v7mv9h7hvhdy3l2fjzs4214gx32r5k6nx4f76hbv6y5"))))
13288 (build-system python-build-system)
13289 (native-inputs
13290 `(("python-jsonpointer" ,python-jsonpointer)))
13291 (home-page "https://github.com/stefankoegl/python-json-patch")
13292 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
13293 (description "@code{jsonpatch} is a library and program that allows
13294applying JSON Patches according to RFC 6902.")
13295 (license license:bsd-3)))
13296
13297(define-public python2-jsonpatch
13298 (package-with-python2 python-jsonpatch))
13299
13300(define-public python-jsonpatch-0.4
13301 (package (inherit python-jsonpatch)
13302 (name "python-jsonpatch")
13303 (version "0.4")
13304 (source
13305 (origin
13306 (method url-fetch)
13307 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
13308 "archive/v" version ".tar.gz"))
13309 (file-name (string-append name "-" version ".tar.gz"))
13310 (sha256
13311 (base32
13312 "0j0cd9z9zyp8kppp464jxrfgrnbgkzl1yi10i5gsv8yz6d95929d"))))))
13313
13314(define-public python2-jsonpatch-0.4
13315 (package-with-python2 python-jsonpatch-0.4))
13316
13317(define-public python-rfc3986
13318 (package
13319 (name "python-rfc3986")
13320 (version "1.1.0")
13321 (source (origin
13322 (method url-fetch)
13323 (uri (pypi-uri "rfc3986" version))
13324 (sha256
13325 (base32
13326 "06wlmysw83f75ff84zr1yr6n0shvc2xn1n1sb4iwzqap9hf5fn44"))))
13327 (build-system python-build-system)
13328 (arguments
13329 `(#:modules ((guix build utils)
13330 (guix build python-build-system)
13331 (ice-9 ftw)
13332 (srfi srfi-1)
13333 (srfi srfi-26))
13334 #:phases
13335 (modify-phases %standard-phases
13336 (replace 'check
13337 (lambda _
13338 (let ((cwd (getcwd)))
13339 (setenv "PYTHONPATH"
13340 (string-append cwd "/build/"
13341 (find (cut string-prefix? "lib" <>)
13342 (scandir (string-append cwd "/build")))
13343 ":"
13344 (getenv "PYTHONPATH")))
13345 (invoke "pytest" "-v")))))))
13346 (native-inputs
13347 `(("python-pytest" ,python-pytest)))
13348 (home-page "https://rfc3986.readthedocs.io/")
13349 (synopsis "Parse and validate URI references")
13350 (description
13351 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
13352validation and authority parsing. This module also supports RFC@tie{}6874
13353which adds support for zone identifiers to IPv6 addresses.")
13354 (license license:asl2.0)))
13355
13356(define-public python2-rfc3986
13357 (package-with-python2 python-rfc3986))
13358
13359(define-public python-rfc3987
13360 (package
13361 (name "python-rfc3987")
13362 (version "1.3.7")
13363 (source
13364 (origin
13365 (method url-fetch)
13366 (uri (pypi-uri "rfc3987" version))
13367 (sha256
13368 (base32
13369 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
13370 (build-system python-build-system)
13371 (home-page "https://pypi.python.org/pypi/rfc3987")
13372 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
13373 (description "@code{rfc3987} provides routines for parsing and
13374validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
13375 (license license:gpl3+)))
13376
13377(define-public python2-rfc3987
13378 (package-with-python2 python-rfc3987))
13379
13380(define-public python-validate-email
13381 (package
13382 (name "python-validate-email")
13383 (version "1.3")
13384 (source
13385 (origin
13386 (method url-fetch)
13387 (uri (pypi-uri "validate_email" version))
13388 (sha256
13389 (base32
13390 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
13391 (build-system python-build-system)
13392 (home-page "https://github.com/syrusakbary/validate_email")
13393 (synopsis "Verifies if an email address is valid and really exists")
13394 (description "@code{validate_email} can be used to verify if an email
13395address is valid and really exists.")
13396 (license license:lgpl3+)))
13397
13398(define-public python2-validate-email
13399 (package-with-python2 python-validate-email))
13400
13401(define-public python-flex
13402 (package
13403 (name "python-flex")
13404 (version "6.10.0")
13405 (source
13406 (origin
13407 (method url-fetch)
13408 (uri (pypi-uri "flex" version))
13409 (sha256
13410 (base32
13411 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
13412 (build-system python-build-system)
13413 (propagated-inputs
13414 `(("python-click" ,python-click)
13415 ("python-iso8601" ,python-iso8601)
13416 ("python-jsonpointer" ,python-jsonpointer)
13417 ("python-pyyaml" ,python-pyyaml)
13418 ("python-requests" ,python-requests)
13419 ("python-rfc3987" ,python-rfc3987)
13420 ("python-six" ,python-six)
13421 ("python-validate-email" ,python-validate-email)))
13422 (home-page "https://github.com/pipermerriam/flex")
13423 (synopsis "Validates Swagger schemata")
13424 (description "@code{flex} can be used to validate Swagger schemata.")
13425 (license license:bsd-3)))
13426
13427(define-public python2-flex
13428 (package-with-python2 python-flex))
13429
13430(define-public python-marshmallow
13431 (package
13432 (name "python-marshmallow")
13433 (version "3.0.0b14")
13434 (source
13435 (origin
13436 (method url-fetch)
13437 (uri (pypi-uri "marshmallow" version))
13438 (sha256
13439 (base32
13440 "1digk3f5cfk7wmlka65mc7bzsd96pbsgcsvp6pimd5b4ff9zb5p3"))))
13441 (build-system python-build-system)
13442 (propagated-inputs
13443 `(("python-dateutil" ,python-dateutil)
13444 ("python-simplejson" ,python-simplejson)))
13445 (native-inputs
13446 `(("python-pytest" ,python-pytest)
13447 ("python-pytz" ,python-pytz)))
13448 (home-page "https://github.com/marshmallow-code/marshmallow")
13449 (synopsis "Convert complex datatypes to and from native
13450Python datatypes.")
13451 (description "@code{marshmallow} provides a library for converting
13452complex datatypes to and from native Python datatypes.")
13453 (license license:expat)))
13454
13455(define-public python2-marshmallow
13456 (package-with-python2 python-marshmallow))
13457
13458(define-public python-apispec
13459 (package
13460 (name "python-apispec")
13461 (version "0.25.3")
13462 (source
13463 (origin
13464 (method url-fetch)
13465 (uri (pypi-uri "apispec" version))
13466 (sha256
13467 (base32
13468 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
13469 (build-system python-build-system)
13470 (propagated-inputs
13471 `(("python-pyyaml" ,python-pyyaml)))
13472 (native-inputs
13473 `(("python-pytest" ,python-pytest)
13474 ("python-flask" ,python-flask)
13475 ("python-marshmallow" ,python-marshmallow)
13476 ("python-tornado" ,python-tornado)
13477 ("python-bottle" ,python-bottle)
13478 ("python-mock" ,python-mock)))
13479 (home-page "https://github.com/marshmallow-code/apispec")
13480 (synopsis "Swagger 2.0 API specification generator")
13481 (description "@code{python-apispec} is a pluggable API specification
13482generator. Currently supports the OpenAPI specification (f.k.a.
13483Swagger 2.0).")
13484 (license license:expat)))
13485
13486(define-public python2-apispec
13487 (package-with-python2 python-apispec))
13488
13489(define-public python-flasgger
13490 (package
13491 (name "python-flasgger")
13492 (version "0.6.3")
13493 (source
13494 (origin
1a04d421
TGR
13495 (method git-fetch)
13496 (uri (git-reference
13497 (url "https://github.com/rochacbruno/flasgger.git")
13498 (commit version)))
13499 (file-name (git-file-name name version))
44d10b1f 13500 (sha256
1a04d421 13501 (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn"))))
44d10b1f
RW
13502 (build-system python-build-system)
13503 (arguments
13504 `(#:phases
13505 (modify-phases %standard-phases
13506 (replace 'check
13507 (lambda* (#:key inputs outputs #:allow-other-keys)
13508 (substitute* "Makefile"
13509 (("flake8 flasgger --ignore=F403")
13510 "flake8 flasgger --ignore=E731,F403"))
13511 (setenv "PYTHONPATH" (string-append (getcwd)
13512 ":"
13513 (getenv "PYTHONPATH")))
ac599a09 13514 (invoke "py.test"))))))
44d10b1f
RW
13515 (propagated-inputs
13516 `(("python-flask" ,python-flask)
13517 ("python-pyyaml" ,python-pyyaml)
13518 ("python-jsonschema" ,python-jsonschema)
13519 ("python-mistune" ,python-mistune)
13520 ("python-six" ,python-six)))
13521 (native-inputs
13522 `(("python-decorator" ,python-decorator)
13523 ("python-flake8" ,python-flake8)
13524 ("python-flask-restful" ,python-flask-restful)
13525 ("python-flex" ,python-flex)
13526 ("python-pytest" ,python-pytest)
13527 ("python-pytest-cov" ,python-pytest-cov)
13528 ("python-marshmallow" ,python-marshmallow)
13529 ("python-apispec" ,python-apispec)))
13530 (home-page "https://github.com/rochacbruno/flasgger/")
13531 (synopsis "Extract Swagger specs from your Flask project")
13532 (description "@code{python-flasgger} allows extracting Swagger specs
13533from your Flask project. It is a fork of Flask-Swagger.")
13534 (license license:expat)))
13535
13536(define-public python2-flasgger
13537 (package-with-python2 python-flasgger))
13538
13539(define-public python-swagger-spec-validator
13540 (package
13541 (name "python-swagger-spec-validator")
fe9c5b1d 13542 (version "2.4.3")
44d10b1f
RW
13543 (source
13544 (origin
13545 (method url-fetch)
13546 (uri (pypi-uri "swagger-spec-validator" version))
13547 (sha256
13548 (base32
fe9c5b1d 13549 "11g627icrsqwazsncwi0sdvprcj6hwaayw5xk3xsj8d97bmrzqjp"))))
44d10b1f
RW
13550 (build-system python-build-system)
13551 (propagated-inputs
13552 `(("python-jsonschema" ,python-jsonschema)
fe9c5b1d 13553 ("python-pyyaml" ,python-pyyaml)
44d10b1f
RW
13554 ("python-six" ,python-six)))
13555 (home-page
13556 "https://github.com/Yelp/swagger_spec_validator")
13557 (synopsis "Validation of Swagger specifications")
13558 (description "@code{swagger_spec_validator} provides a library for
13559validating Swagger API specifications.")
13560 (license license:asl2.0)))
13561
13562(define-public python2-swagger-spec-validator
13563 (package-with-python2 python-swagger-spec-validator))
13564
13565(define-public python-apache-libcloud
13566 (package
13567 (name "python-apache-libcloud")
13568 (version "2.4.0")
13569 (source
13570 (origin
13571 (method url-fetch)
13572 (uri (pypi-uri "apache-libcloud" version))
13573 (sha256
13574 (base32
13575 "0daj3mkzw79v5zin2r1s2wkrz1hplfc16bwj4ss68i5qjq4l2p0j"))))
13576 (build-system python-build-system)
13577 (arguments
13578 `(#:phases
13579 (modify-phases %standard-phases
13580 (add-after 'unpack 'patch-ssh
13581 (lambda* (#:key inputs #:allow-other-keys)
13582 (substitute* "libcloud/compute/ssh.py"
13583 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
13584 "/bin/ssh" "'")))
13585 #t))
13586 (add-after 'unpack 'patch-tests
13587 (lambda _
13588 (substitute* "./libcloud/test/test_file_fixtures.py"
13589 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
13590 (("def _ascii") "def _raw_data(self, method, url, body, headers):
13591 return (httplib.OK,
13592 \"1234abcd\",
13593 {\"test\": \"value\"},
13594 httplib.responses[httplib.OK])
13595 def _ascii"))
13596 (substitute* "libcloud/test/compute/test_ssh_client.py"
13597 (("class ShellOutSSHClientTests")
13598 "@unittest.skip(\"Guix container doesn't have ssh service\")
13599class ShellOutSSHClientTests")
13600 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
13601 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
13602 (("'.xF0', '.x90', '.x8D', '.x88'")
13603 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
13604 #t))
13605 (add-before 'check 'copy-secret
13606 (lambda _
13607 (copy-file "libcloud/test/secrets.py-dist"
13608 "libcloud/test/secrets.py")
13609 #t)))))
13610 (inputs
13611 `(("openssh" ,openssh)))
13612 (propagated-inputs
13613 `(("python-paramiko" ,python-paramiko)
13614 ("python-requests" ,python-requests)))
13615 (native-inputs
13616 `(("python-lockfile" ,python-lockfile)
13617 ("python-mock" ,python-mock)
13618 ("python-pytest" ,python-pytest)
13619 ("python-pytest-runner" ,python-pytest-runner)
13620 ("python-requests-mock" ,python-requests-mock)))
13621 (home-page "https://libcloud.apache.org/")
13622 (synopsis "Unified Cloud API")
13623 (description "@code{libcloud} is a Python library for interacting with
13624many of the popular cloud service providers using a unified API.")
13625 (license license:asl2.0)))
13626
13627(define-public python2-apache-libcloud
13628 (package-with-python2 python-apache-libcloud))
13629
13630(define-public python-smmap2
13631 (package
13632 (name "python-smmap2")
13633 (version "2.0.3")
13634 (source
13635 (origin
13636 (method url-fetch)
13637 (uri (pypi-uri "smmap2" version))
13638 (sha256
13639 (base32
13640 "1hvn28p3zvxa98sbi9lrqvv2ps4q284j4jq9a619zw0m7yv0sly7"))))
13641 (build-system python-build-system)
13642 (native-inputs
13643 `(("python-nosexcover" ,python-nosexcover)))
13644 (home-page "https://github.com/Byron/smmap")
13645 (synopsis "Python sliding window memory map manager")
13646 (description "@code{smmap2} is a pure Python implementation of a sliding
13647window memory map manager.")
13648 (license license:bsd-3)))
13649
13650(define-public python2-smmap2
13651 (package-with-python2 python-smmap2))
13652
13653(define-public python-regex
13654 (package
13655 (name "python-regex")
c187c9d7 13656 (version "2019.04.14")
44d10b1f
RW
13657 (source (origin
13658 (method url-fetch)
13659 (uri (pypi-uri "regex" version))
13660 (sha256
13661 (base32
c187c9d7
BT
13662 "1a6hhfs6l6snr1z654ay6wzbmwdkmv282fzfkd5hk2d1n73y8v6m"))))
13663 ;; TODO: Fix and enable regex_test.py tests that complain about the
13664 ;; test.support module not existing.
44d10b1f
RW
13665 (build-system python-build-system)
13666 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
13667 (synopsis "Alternative regular expression module")
13668 (description "This regular expression implementation is backwards-
13669compatible with the standard @code{re} module, but offers additional
13670functionality like full case-folding for case-insensitive matches in Unicode.")
13671 (license license:psfl)))
13672
13673(define-public python2-regex
13674 (package-with-python2 python-regex))
13675
13676(define-public python2-pyopengl
13677 (package
13678 (name "python2-pyopengl")
13679 (version "3.1.0")
13680 (source
13681 (origin
13682 (method url-fetch)
13683 (uri (pypi-uri "PyOpenGL" version))
13684 (sha256
13685 (base32
13686 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
13687 (arguments
13688 `(#:python ,python-2))
13689 (build-system python-build-system)
13690 (home-page "http://pyopengl.sourceforge.net")
13691 (synopsis "Standard OpenGL bindings for Python")
13692 (description
13693 "PyOpenGL is the most common cross platform Python binding to OpenGL and
13694related APIs. The binding is created using the standard @code{ctypes}
13695library.")
13696 (license license:bsd-3)))
13697
13698(define-public python2-pyopengl-accelerate
13699 (package
13700 (inherit python2-pyopengl)
13701 (name "python2-pyopengl-accelerate")
13702 (version "3.1.0")
13703 (source
13704 (origin
13705 (method url-fetch)
13706 (uri (pypi-uri "PyOpenGL-accelerate" version))
13707 (sha256
13708 (base32
13709 "0464c1ifzk0k92lyndikmvzjgnx1y25r7bkkc8pnxm4kp1q4czwj"))))
13710 (synopsis "Acceleration code for PyOpenGL")
13711 (description
13712 "This is the Cython-coded accelerator module for PyOpenGL.")))
13713
13714(define-public python-rencode
13715 (package
13716 (name "python-rencode")
13717 (version "1.0.5")
13718 (source
13719 (origin
13720 (method url-fetch)
13721 (uri (pypi-uri "rencode" version))
13722 (sha256
13723 (base32
13724 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
13725 (build-system python-build-system)
13726 (arguments
13727 `(#:phases
13728 (modify-phases %standard-phases
13729 (add-before 'check 'delete-bogus-test
13730 ;; This test requires /home/aresch/Downloads, which is not provided by
13731 ;; the build environment.
13732 (lambda _
13733 (delete-file "rencode/t.py")
13734 #t)))))
13735 (native-inputs `(("pkg-config" ,pkg-config)
13736 ("python-cython" ,python-cython)))
13737 (home-page "https://github.com/aresch/rencode")
13738 (synopsis "Serialization of heterogeneous data structures")
13739 (description
13740 "The @code{rencode} module is a data structure serialization library,
13741similar to @code{bencode} from the BitTorrent project. For complex,
13742heterogeneous data structures with many small elements, r-encoding stake up
13743significantly less space than b-encodings. This version of rencode is a
13744complete rewrite in Cython to attempt to increase the performance over the
13745pure Python module.")
13746 (license license:bsd-3)))
13747
13748(define-public python2-rencode
13749 (package-with-python2 python-rencode))
13750
13751(define-public python-xenon
13752 (package
13753 (name "python-xenon")
13754 (version "0.5.4")
13755 (source
13756 (origin
13757 (method url-fetch)
13758 (uri (pypi-uri "xenon" version))
13759 (sha256
13760 (base32
13761 "029cbhysg2vr5n4jz8gpg2793f8wkwnqpr1qgv6c1dn685vy31mc"))))
13762 (build-system python-build-system)
13763 (native-inputs
13764 `(("python-pyyaml" ,python-pyyaml)
13765 ("python-radon" ,python-radon)
13766 ("python-requests" ,python-requests)
13767 ("python-flake8" ,python-flake8)
13768 ("python-tox" ,python-tox)))
13769 (arguments
13770 `(#:phases
13771 (modify-phases %standard-phases
13772 (add-before 'build 'patch-test-requirements
13773 (lambda _
13774 ;; Remove httpretty dependency for tests.
13775 (substitute* "setup.py"
13776 (("httpretty") ""))
13777 #t)))))
13778 (home-page "https://xenon.readthedocs.org/")
13779 (synopsis "Monitor code metrics for Python on your CI server")
13780 (description
13781 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
13782Ideally, @code{xenon} is run every time code is committed. Through command
13783line options, various thresholds can be set for the complexity of code. It
13784will fail (i.e. it will exit with a non-zero exit code) when any of these
13785requirements is not met.")
13786 (license license:expat)))
13787
13788(define-public python2-xenon
13789 (package-with-python2 python-xenon))
13790
13791(define-public python-pysocks
13792 (package
13793 (name "python-pysocks")
b8725cdf 13794 (version "1.7.0")
44d10b1f
RW
13795 (source
13796 (origin
13797 (method url-fetch)
13798 (uri (pypi-uri "PySocks" version))
13799 (sha256
13800 (base32
b8725cdf 13801 "0z4p31bpqm893cf87qqgb30k7nwd8kqfjwwjm5cvxb6zbyj1w0yr"))))
44d10b1f
RW
13802 (build-system python-build-system)
13803 (arguments `(#:tests? #f))
13804 (home-page "https://github.com/Anorov/PySocks")
13805 (synopsis "SOCKS client module")
13806 (description "@code{pysocks} is an updated and semi-actively maintained
13807version of @code{SocksiPy} with bug fixes and extra features.")
13808 (license license:bsd-3)))
13809
13810(define-public python2-pysocks
13811 (package-with-python2 python-pysocks))
13812
13813(define-public python-pydiff
13814 (package
13815 (name "python-pydiff")
13816 (version "0.2")
13817 (source
13818 (origin
13819 (method url-fetch)
13820 (uri (pypi-uri "pydiff" version))
13821 (sha256
13822 (base32
13823 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
13824 (build-system python-build-system)
13825 (home-page "https://github.com/myint/pydiff")
13826 (synopsis "Library to diff two Python files at the bytecode level")
13827 (description
13828 "@code{pydiff} makes it easy to look for actual code changes while
13829ignoring formatting changes.")
13830 (license license:expat)))
13831
13832(define-public python2-pydiff
13833 (package-with-python2 python-pydiff))
13834
13835(define-public python-tqdm
13836 (package
13837 (name "python-tqdm")
13838 (version "4.19.6")
13839 (source
13840 (origin
13841 (method url-fetch)
13842 (uri (pypi-uri "tqdm" version))
13843 (sha256
13844 (base32
13845 "1pw0ngm0zn9papdmkwipi3yih5c3di6d0w849bdmrraq4d2d9h2y"))))
13846 (build-system python-build-system)
13847 (native-inputs
13848 `(("python-flake8" ,python-flake8)
13849 ("python-nose" ,python-nose)
13850 ("python-coverage" ,python-coverage)))
13851 (home-page "https://github.com/tqdm/tqdm")
13852 (synopsis "Fast, extensible progress meter")
13853 (description
13854 "Make loops show a progress bar on the console by just wrapping any
13855iterable with @code{|tqdm(iterable)|}. Offers many options to define
13856design and layout.")
f875d76f
PL
13857 (license (list license:mpl2.0 license:expat))
13858 (properties `((python2-variant . ,(delay python2-tqdm))))))
44d10b1f
RW
13859
13860(define-public python2-tqdm
f875d76f
PL
13861 (let ((tqdm (package-with-python2
13862 (strip-python2-variant python-tqdm))))
13863 (package (inherit tqdm)
13864 (native-inputs `(("python2-functools32" ,python2-functools32)
13865 ,@(package-native-inputs tqdm))))))
44d10b1f
RW
13866
13867(define-public python-pkginfo
13868 (package
13869 (name "python-pkginfo")
13870 (version "1.4.2")
13871 (source
13872 (origin
13873 (method url-fetch)
13874 (uri (pypi-uri "pkginfo" version))
13875 (sha256
13876 (base32
13877 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
13878 (build-system python-build-system)
13879 (arguments
13880 ;; The tests are broken upstream.
13881 '(#:tests? #f))
13882 (home-page
13883 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
13884 (synopsis
13885 "Query metadatdata from sdists, bdists, and installed packages")
13886 (description
13887 "API to query the distutils metadata written in @file{PKG-INFO} inside a
13888source distriubtion (an sdist) or a binary distribution (e.g., created by
13889running bdist_egg). It can also query the EGG-INFO directory of an installed
13890distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
13891created by running @code{python setup.py develop}).")
13892 (license license:expat)))
13893
13894(define-public python2-pkginfo
13895 (package-with-python2 python-pkginfo))
13896
13897(define-public python-twine
13898 (package
13899 (name "python-twine")
13900 (version "1.9.1")
13901 (source
13902 (origin
13903 (method url-fetch)
13904 (uri (pypi-uri "twine" version))
13905 (sha256
13906 (base32
13907 "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a"))))
13908 (build-system python-build-system)
13909 (propagated-inputs
13910 `(("python-tqdm" ,python-tqdm)
13911 ("python-pkginfo" ,python-pkginfo)
13912 ("python-requests" ,python-requests)
13913 ("python-requests-toolbelt" ,python-requests-toolbelt)))
13914 (home-page "https://github.com/pypa/twine")
13915 (synopsis "Collection of utilities for interacting with PyPI")
13916 (description
13917 "@code{twine} currently supports registering projects and uploading
13918distributions. It authenticates the user over HTTPS, allows them to pre-sign
13919their files and supports any packaging format (including wheels).")
13920 (license license:asl2.0)))
13921
13922(define-public python2-twine
13923 (package-with-python2 python-twine))
13924
13925(define-public python-linecache2
13926 (package
13927 (name "python-linecache2")
13928 (version "1.0.0")
13929 (source
13930 (origin
13931 (method url-fetch)
13932 (uri (pypi-uri "linecache2" version))
13933 (sha256
13934 (base32
13935 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
13936 (build-system python-build-system)
13937 (arguments
13938 `(;; The tests depend on unittest2, and our version is a bit too old.
13939 #:tests? #f))
13940 (native-inputs
13941 `(("python-pbr" ,python-pbr-minimal)))
13942 (home-page
13943 "https://github.com/testing-cabal/linecache2")
13944 (synopsis "Backports of the linecache module")
13945 (description
13946 "The linecache module allows one to get any line from any file, while
13947attempting to optimize internally, using a cache, the common case where many
13948lines are read from a single file.")
13949 (license license:psfl)))
13950
13951(define-public python2-linecache2
13952 (package-with-python2 python-linecache2))
13953
13954(define-public python-traceback2
13955 (package
13956 (name "python-traceback2")
13957 (version "1.4.0")
13958 (source
13959 (origin
13960 (method url-fetch)
13961 (uri (pypi-uri "traceback2" version))
13962 (sha256
13963 (base32
13964 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
13965 (build-system python-build-system)
13966 (arguments
13967 `(;; python-traceback2 and python-unittest2 depend on one another.
13968 #:tests? #f))
13969 (native-inputs
13970 `(("python-pbr" ,python-pbr-minimal)))
13971 (propagated-inputs
13972 `(("python-linecache2" ,python-linecache2)))
13973 (home-page
13974 "https://github.com/testing-cabal/traceback2")
13975 (synopsis "Backports of the traceback module")
13976 (description
13977 "This module provides a standard interface to extract, format and print
13978stack traces of Python programs. It exactly mimics the behavior of the Python
13979interpreter when it prints a stack trace.")
13980 (license license:psfl)))
13981
13982(define-public python2-traceback2
13983 (package-with-python2 python-traceback2))
13984
13985(define-public python-ratelimiter
13986 (package
13987 (name "python-ratelimiter")
13988 (version "1.2.0")
13989 (source
13990 (origin
13991 (method url-fetch)
13992 (uri (pypi-uri "ratelimiter" version))
13993 (sha256
13994 (base32
13995 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
13996 (build-system python-build-system)
13997 (arguments
13998 '(#:tests? #f)) ; There are no tests in the pypi archive.
13999 (home-page "https://github.com/RazerM/ratelimiter")
14000 (synopsis "Simple rate limiting object")
14001 (description
14002 "The @code{ratelimiter} module ensures that an operation will not be
14003executed more than a given number of times during a given period.")
14004 (license license:asl2.0)))
14005
14006(define-public python2-ratelimiter
14007 (package-with-python2 python-ratelimiter))
14008
14009(define-public python-dukpy
14010 (package
14011 (name "python-dukpy")
14012 (version "0.3")
14013 (source
14014 (origin
5b77ebe1
TGR
14015 (method git-fetch)
14016 (uri (git-reference
14017 (url "https://github.com/kovidgoyal/dukpy.git")
14018 (commit (string-append "v" version))))
14019 (file-name (git-file-name name version))
44d10b1f 14020 (sha256
5b77ebe1 14021 (base32 "13h21nqzasv4zj32xs61brmc106pr2cx243672crcmwxxnjgaxls"))))
44d10b1f
RW
14022 (build-system python-build-system)
14023 (home-page "https://github.com/kovidgoyal/dukpy")
14024 (synopsis "Run JavaScript in python")
14025 (description
14026 "dukpy is a JavaScript runtime environment for Python using the duktape
14027embeddable JavaScript engine.")
14028 ;; Dukpy is licensed under MIT like the embedded duktape library,
14029 ;; with 'errors.c' as GPL3.
14030 (license (list license:expat license:gpl3))))
14031
14032(define-public python2-dukpy
14033 (package-with-python2 python-dukpy))
14034
14035(define-public python-jsonrpclib-pelix
14036 (package
14037 (name "python-jsonrpclib-pelix")
14038 (version "0.3.2")
14039 (source
14040 (origin
14041 (method url-fetch)
14042 (uri (pypi-uri "jsonrpclib-pelix" version))
14043 (sha256
14044 (base32
14045 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
14046 (build-system python-build-system)
14047 (arguments
14048 `(#:tests? #f)) ; no tests in PyPI tarball
14049 (home-page "https://github.com/tcalmant/jsonrpclib/")
14050 (synopsis "JSON-RPC 2.0 client library for Python")
14051 (description
14052 "This library implements the JSON-RPC v2.0
14053specification (backwards-compatible) as a client library for Python. This
14054version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
14055services.")
14056 (license license:asl2.0)))
14057
14058(define-public python2-jsonrpclib-pelix
14059 (package-with-python2 python-jsonrpclib-pelix))
14060
14061(define-public python-setuptools-scm-git-archive
14062 (package
14063 (name "python-setuptools-scm-git-archive")
14064 (version "1.0")
14065 (source
14066 (origin
14067 (method url-fetch)
14068 (uri (pypi-uri "setuptools_scm_git_archive" version))
14069 (sha256
14070 (base32
14071 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
14072 (build-system python-build-system)
14073 (native-inputs
14074 `(("python-pytest" ,python-pytest)))
14075 (propagated-inputs
14076 `(("python-setuptools-scm" ,python-setuptools-scm)))
14077 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
14078 (synopsis "Setuptools_scm plugin for git archives")
14079 (description
14080 "The setuptools_scm_git_archive package is a plugin to
14081setuptools_scm, which supports obtaining versions from git archives that
14082belong to tagged versions.")
14083 (license license:expat)))
14084
14085(define-public python2-setuptools-scm-git-archive
14086 (package-with-python2 python-setuptools-scm-git-archive))
14087
724a350c
RW
14088(define-public python-setuptools-git
14089 (package
14090 (name "python-setuptools-git")
14091 (version "1.2")
14092 (source
14093 (origin
14094 (method url-fetch)
14095 (uri (pypi-uri "setuptools-git" version))
14096 (sha256
14097 (base32
14098 "0i84qjwp5m0l9qagdjww2frdh63r37km1c48mrvbmaqsl1ni6r7z"))))
14099 (build-system python-build-system)
14100 (arguments
14101 `(#:phases
14102 (modify-phases %standard-phases
14103 ;; This is needed for tests.
14104 (add-after 'unpack 'configure-git
14105 (lambda _
14106 (setenv "HOME" "/tmp")
14107 (invoke "git" "config" "--global" "user.email" "guix")
14108 (invoke "git" "config" "--global" "user.name" "guix")
14109 #t)))))
14110 (native-inputs
14111 `(("git" ,git-minimal)))
14112 (home-page "https://github.com/msabramo/setuptools-git")
14113 (synopsis "Setuptools revision control system plugin for Git")
14114 (description
14115 "This package provides a plugin for Setuptools for revision control with
14116Git.")
14117 (license license:bsd-3)))
14118
44d10b1f
RW
14119(define-public python-pyclipper
14120 (package
14121 (name "python-pyclipper")
14122 (version "1.1.0.post1")
14123 (source
14124 (origin
14125 (method url-fetch)
14126 (uri (pypi-uri "pyclipper" version ".zip"))
14127 (sha256
14128 (base32
14129 "0ldbkbnx94an4zzrwb1sxmg6k0jgk4cwmvcdyy8y5k1zslc612wa"))
14130 (modules '((guix build utils)))
14131 (snippet
14132 '(begin
14133 ;; This file is generated by Cython.
14134 (delete-file "pyclipper/pyclipper.cpp") #t))))
14135 (build-system python-build-system)
14136 (arguments
14137 `(#:phases
14138 (modify-phases %standard-phases
14139 (add-before 'build 'cythonize-sources
14140 (lambda _
14141 (with-directory-excursion "pyclipper"
14142 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
14143 (propagated-inputs
14144 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
14145 (native-inputs
14146 `(("python-cython" ,python-cython)
14147 ("python-pytest" ,python-pytest)
14148 ("python-pytest-runner" ,python-pytest-runner)
14149 ("python-unittest2" ,python-unittest2)
14150 ("unzip" ,unzip)))
14151 (home-page "https://github.com/greginvm/pyclipper")
14152 (synopsis "Wrapper for Angus Johnson's Clipper library")
14153 (description
14154 "Pyclipper is a Cython wrapper for the C++ translation of the
14155Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
14156 (license license:expat)))
14157
14158(define-public python2-pyclipper
14159 (package-with-python2 python-pyclipper))
14160
14161(define-public python2-booleanoperations
14162 (package
14163 (name "python2-booleanoperations")
14164 (version "0.7.1")
14165 (source
14166 (origin
14167 (method url-fetch)
14168 (uri (pypi-uri "booleanOperations" version ".zip"))
14169 (sha256
14170 (base32
14171 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
14172 (build-system python-build-system)
14173 (arguments
14174 `(#:python ,python-2))
14175 (native-inputs
14176 `(("unzip" ,unzip)
14177 ("python2-pytest" ,python2-pytest)
14178 ("python2-pytest-runner" ,python2-pytest-runner)))
14179 (propagated-inputs
14180 `(("python-fonttools" ,python2-fonttools)
14181 ("python-pyclipper" ,python2-pyclipper)
14182 ("python-ufolib" ,python2-ufolib)))
14183 (home-page "https://github.com/typemytype/booleanOperations")
14184 (synopsis "Boolean operations on paths")
14185 (description
14186 "BooleanOperations provides a Python library that enables
14187boolean operations on paths.")
14188 (license license:expat)))
14189
14190(define-public python-tempdir
14191 (package
14192 (name "python-tempdir")
14193 (version "0.7.1")
14194 (source
14195 (origin
14196 (method url-fetch)
14197 (uri (pypi-uri "tempdir" version))
14198 (sha256
14199 (base32
14200 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
14201 (build-system python-build-system)
14202 (home-page "https://pypi.org/project/tempdir/")
14203 (arguments
14204 ;; the package has no tests
14205 '(#:tests? #f))
14206 (synopsis "Python library for managing temporary directories")
14207 (description
14208 "This library manages temporary directories that are automatically
14209deleted with all their contents when they are no longer needed. It is
14210particularly convenient for use in tests.")
14211 (license license:expat)))
14212
14213(define-public python2-tempdir
14214 (package-with-python2 python-tempdir))
14215
14216(define-public python-activepapers
14217 (package
14218 (name "python-activepapers")
14219 (version "0.2.2")
14220 (source
14221 (origin
14222 (method url-fetch)
14223 (uri (pypi-uri "ActivePapers.Py" version))
14224 (sha256
14225 (base32
14226 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
14227 (build-system python-build-system)
14228 (arguments
14229 `(#:modules ((ice-9 ftw)
14230 (srfi srfi-1)
14231 (guix build utils)
14232 (guix build python-build-system))
14233
14234 #:phases
14235 (modify-phases %standard-phases
14236 (add-after 'unpack 'delete-python2-code
14237 (lambda _
14238 (for-each delete-file
14239 '("lib/activepapers/builtins2.py"
14240 "lib/activepapers/standardlib2.py"
14241 "lib/activepapers/utility2.py"))))
14242 (replace 'check
14243 (lambda _
14244 ;; Deactivate the test cases that download files
14245 (setenv "NO_NETWORK_ACCESS" "1")
14246 ;; For some strange reason, some tests fail if nosetests runs all
14247 ;; test modules in a single execution. They pass if each test
14248 ;; module is run individually.
14249 (for-each (lambda (filename)
14250 (invoke "nosetests"
14251 (string-append "tests/" filename)))
14252 (scandir "tests"
14253 (lambda (filename)
14254 (string-suffix? ".py" filename)))))))))
14255 (native-inputs
14256 `(("python-tempdir" ,python-tempdir)
14257 ("python-nose" ,python-nose)))
14258 (propagated-inputs
14259 `(("python-h5py" ,python-h5py)))
14260 (home-page "http://www.activepapers.org/")
14261 (synopsis "Executable papers for scientific computing")
14262 (description
14263 "ActivePapers is a tool for working with executable papers, which
14264combine data, code, and documentation in single-file packages,
14265suitable for publication as supplementary material or on repositories
14266such as figshare or Zenodo.")
14267 (properties `((python2-variant . ,(delay python2-activepapers))))
14268 (license license:bsd-3)))
14269
14270(define-public python2-activepapers
14271 (let ((base (package-with-python2
14272 (strip-python2-variant python-activepapers))))
14273 (package
14274 (inherit base)
14275 (arguments
14276 (substitute-keyword-arguments (package-arguments base)
14277 ((#:phases phases)
14278 `(modify-phases ,phases
14279 (delete 'delete-python2-code)
14280 (add-after 'unpack 'delete-python3-code
14281 (lambda _
14282 (for-each delete-file
14283 '("lib/activepapers/builtins3.py"
14284 "lib/activepapers/standardlib3.py"
14285 "lib/activepapers/utility3.py")))))))))))
14286
14287(define-public python-semver
14288 (package
14289 (name "python-semver")
14290 (version "2.7.9")
14291 (source
14292 (origin
14293 (method url-fetch)
14294 (uri (pypi-uri "semver" version))
14295 (sha256
14296 (base32
14297 "0hhgqppchv59rqj0yzi1prdg2nfsywqmjsqy2rycyxm0hvxmbyqz"))))
14298 (build-system python-build-system)
14299 (arguments
14300 `(#:phases
14301 (modify-phases %standard-phases
14302 (add-after 'unpack 'patch-test-requirements
14303 (lambda _
14304 (substitute* "setup.py"
14305 ;; Our Python is new enough.
14306 (("'virtualenv<14\\.0\\.0'") "'virtualenv'"))
14307 #t)))))
14308 (native-inputs
14309 `(("python-tox" ,python-tox)
14310 ("python-virtualenv" ,python-virtualenv)))
14311 (home-page "https://github.com/k-bx/python-semver")
14312 (synopsis "Python helper for Semantic Versioning")
14313 (description "This package provides a Python library for
14314@url{Semantic Versioning, http://semver.org/}.")
14315 (license license:bsd-3)))
14316
14317(define-public python2-semver
14318 (package-with-python2 python-semver))
14319
14320(define-public python-pyro4
14321 (package
14322 (name "python-pyro4")
ad1acb81 14323 (version "4.75")
44d10b1f
RW
14324 (source
14325 (origin
14326 (method url-fetch)
14327 (uri (pypi-uri "Pyro4" version))
14328 (sha256
ad1acb81 14329 (base32 "1dfpp36imddx19yv0kd28gk1l71ckhpqy6jd590wpm2680jw15rq"))))
44d10b1f
RW
14330 (build-system python-build-system)
14331 (propagated-inputs
14332 `(("python-serpent" ,python-serpent)))
14333 (home-page "https://pyro4.readthedocs.io")
14334 (synopsis "Distributed object middleware for Python")
14335 (description
14336 "Pyro enables you to build applications in which objects can talk to each
14337other over the network. You can just use normal Python method calls to call
14338objects on other machines, also known as remote procedure calls (RPC).")
14339 (license license:expat)))
14340
14341(define-public python2-pyro
14342 (package
14343 (name "python2-pyro")
14344 (version "3.16")
14345 (source
14346 (origin
14347 (method url-fetch)
14348 (uri (pypi-uri "Pyro" version))
14349 (file-name (string-append "Pyro-" version ".tar.gz"))
14350 (sha256
14351 (base32
14352 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
14353 (build-system python-build-system)
14354 (arguments
14355 ;; Pyro is not compatible with Python 3
14356 `(#:python ,python-2
14357 ;; Pyro has no test cases for automatic execution
14358 #:tests? #f))
14359 (home-page "http://pythonhosted.org/Pyro/")
14360 (synopsis "Distributed object manager for Python")
14361 (description "Pyro is a Distributed Object Technology system
14362written in Python that is designed to be easy to use. It resembles
14363Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
14364which is a system and language independent Distributed Object Technology
14365and has much more to offer than Pyro or RMI. Pyro 3.x is no
14366longer maintained. New projects should use Pyro4 instead, which
14367is the new Pyro version that is actively developed.")
14368 (license license:expat)))
14369
14370(define-public python2-scientific
14371 (package
14372 (name "python2-scientific")
14373 (version "2.9.4")
14374 (source
14375 (origin
14376 (method url-fetch)
14377 (uri (string-append "https://bitbucket.org/khinsen/"
14378 "scientificpython/downloads/ScientificPython-"
14379 version ".tar.gz"))
14380 (file-name (string-append "ScientificPython-" version ".tar.gz"))
14381 (sha256
14382 (base32
14383 "0fc69zhlsn9d2jvbzyjl9ah53vj598h84nkq230c83ahfvgzx5y3"))))
14384 (build-system python-build-system)
14385 (inputs
14386 `(("netcdf" ,netcdf)))
14387 (propagated-inputs
14388 `(("python-numpy" ,python2-numpy-1.8)
14389 ("python-pyro" ,python2-pyro)))
14390 (arguments
14391 ;; ScientificPython is not compatible with Python 3
14392 `(#:python ,python-2
14393 #:tests? #f ; No test suite
14394 #:phases
14395 (modify-phases %standard-phases
14396 (replace 'build
14397 (lambda* (#:key inputs #:allow-other-keys)
77e61e25
RW
14398 (invoke "python" "setup.py" "build"
14399 (string-append "--netcdf_prefix="
14400 (assoc-ref inputs "netcdf"))))))))
44d10b1f
RW
14401 (home-page "https://bitbucket.org/khinsen/scientificpython")
14402 (synopsis "Python modules for scientific computing")
14403 (description "ScientificPython is a collection of Python modules that are
14404useful for scientific computing. Most modules are rather general (Geometry,
14405physical units, automatic derivatives, ...) whereas others are more
14406domain-specific (e.g. netCDF and PDB support). The library is currently
14407not actively maintained and works only with Python 2 and NumPy < 1.9.")
14408 (license license:cecill-c)))
14409
14410(define-public python2-mmtk
14411 (package
14412 (name "python2-mmtk")
14413 (version "2.7.11")
14414 (source
14415 (origin
14416 (method url-fetch)
14417 (uri (string-append "https://bitbucket.org/khinsen/"
14418 "mmtk/downloads/MMTK-" version ".tar.gz"))
14419 (file-name (string-append "MMTK-" version ".tar.gz"))
14420 (sha256
14421 (base32
14422 "1d0nnjx4lwsvh8f99vv1r6gi50d93yba0adkz8b4zgv4za4c5862"))))
14423 (build-system python-build-system)
14424 (native-inputs
14425 `(("netcdf" ,netcdf)))
14426 (propagated-inputs
14427 `(("python-scientific" ,python2-scientific)
14428 ("python-tkinter" ,python-2 "tk")))
14429 (arguments
14430 `(#:python ,python-2
14431 #:tests? #f
14432 #:phases
14433 (modify-phases %standard-phases
14434 (add-before 'build 'includes-from-scientific
14435 (lambda* (#:key inputs #:allow-other-keys)
14436 (mkdir-p "Include/Scientific")
14437 (copy-recursively
14438 (string-append
14439 (assoc-ref inputs "python-scientific")
14440 "/include/python2.7/Scientific")
14441 "Include/Scientific"))))))
14442 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
14443 (synopsis "Python library for molecular simulation")
14444 (description "MMTK is a library for molecular simulations with an emphasis
14445on biomolecules. It provides widely used methods such as Molecular Dynamics
14446and normal mode analysis, but also basic routines for implementing new methods
14447for simulation and analysis. The library is currently not actively maintained
14448and works only with Python 2 and NumPy < 1.9.")
14449 (license license:cecill-c)))
14450
14451(define-public python-phonenumbers
14452 (package
14453 (name "python-phonenumbers")
14454 (version "8.9.1")
14455 (source
14456 (origin
14457 (method url-fetch)
14458 (uri (pypi-uri "phonenumbers" version))
14459 (sha256
14460 (base32
14461 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
14462 (build-system python-build-system)
14463 (home-page
14464 "https://github.com/daviddrysdale/python-phonenumbers")
14465 (synopsis
14466 "Python library for dealing with international phone numbers")
14467 (description
14468 "This package provides a Python port of Google's libphonenumber library.")
14469 (license license:asl2.0)))
14470
14471(define-public python2-phonenumbers
14472 (package-with-python2 python-phonenumbers))
14473
14474(define-public python-send2trash
14475 (package
14476 (name "python-send2trash")
d9b0216b 14477 (version "1.5.0")
44d10b1f 14478 (source
d9b0216b 14479 (origin (method git-fetch)
44d10b1f 14480 ;; Source tarball on PyPI doesn't include tests.
d9b0216b
RW
14481 (uri (git-reference
14482 (url "https://github.com/hsoft/send2trash.git")
14483 (commit version)))
14484 (file-name (git-file-name name version))
44d10b1f
RW
14485 (sha256
14486 (base32
d9b0216b 14487 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
44d10b1f
RW
14488 (build-system python-build-system)
14489 (arguments
14490 '(#:phases
14491 (modify-phases %standard-phases
14492 (add-before 'check 'pre-check
14493 (lambda _
14494 (mkdir-p "/tmp/foo")
14495 (setenv "HOME" "/tmp/foo")
14496 #t)))))
14497 (home-page "https://github.com/hsoft/send2trash")
14498 (synopsis "Send files to the user's @file{~/Trash} directory")
14499 (description "This package provides a Python library to send files to the
14500user's @file{~/Trash} directory.")
20b3fde7 14501 (properties `((python2-variant . ,(delay python2-send2trash))))
44d10b1f
RW
14502 (license license:bsd-3)))
14503
14504(define-public python2-send2trash
14505 (package
f32164ab 14506 (inherit (package-with-python2 (strip-python2-variant python-send2trash)))
44d10b1f
RW
14507 (arguments
14508 (substitute-keyword-arguments (package-arguments python-send2trash)
14509 ((#:phases phases)
14510 `(modify-phases ,phases
14511 (add-before 'check 'setenv
14512 (lambda _
14513 (setenv "PYTHONPATH"
14514 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
4782a06f 14515 #t))))))))
44d10b1f
RW
14516
14517(define-public python-yapf
14518 (package
14519 (name "python-yapf")
14520 (version "0.24.0")
14521 (source
14522 (origin
14523 (method url-fetch)
14524 (uri (pypi-uri "yapf" version))
14525 (sha256
14526 (base32
14527 "0anwby0ydmyzcsgjc5dn1ryddwvii4dq61vck447q0n96npnzfyf"))))
14528 (build-system python-build-system)
14529 (home-page "https://github.com/google/yapf")
14530 (synopsis "Formatter for Python code")
14531 (description "YAPF is a formatter for Python code. It's based off of
14532@dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
14533takes the code and reformats it to the best formatting that conforms to the
14534style guide, even if the original code didn't violate the style guide.")
14535 (license license:asl2.0)))
14536
14537(define-public python2-yapf
14538 (package-with-python2 python-yapf))
14539
14540(define-public python-gyp
14541 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
14542 (revision "0"))
14543 (package
14544 (name "python-gyp")
14545 ;; Google does not release versions,
14546 ;; based on second most recent commit date.
14547 (version (git-version "0.0.0" revision commit))
14548 (source
14549 (origin
14550 ;; Google does not release tarballs,
14551 ;; git checkout is needed.
14552 (method git-fetch)
14553 (uri (git-reference
14554 (url "https://chromium.googlesource.com/external/gyp")
14555 (commit commit)))
14556 (file-name (git-file-name name version))
14557 (sha256
14558 (base32
14559 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
14560 (build-system python-build-system)
14561 (home-page "https://gyp.gsrc.io/")
14562 (synopsis "GYP is a Meta-Build system")
14563 (description
14564 "GYP builds build systems for large, cross platform applications.
14565It can be used to generate XCode projects, Visual Studio projects, Ninja build
14566files, and Makefiles.")
14567 (license license:bsd-3))))
14568
14569(define-public python2-gyp
14570 (package-with-python2 python-gyp))
14571
14572(define-public python-whatever
14573 (package
14574 (name "python-whatever")
14575 (version "0.5")
14576 (source
14577 (origin
14578 (method url-fetch)
14579 (uri (string-append "https://github.com/Suor/whatever/archive/" version
14580 ".tar.gz"))
14581 (sha256
14582 (base32
14583 "1iqvnaf0zpc6b4rvbqq4xy45mszcscyzpzknv8wg6j84pbp22sap"))
14584 (file-name (string-append name "-" version ".tar.gz"))))
14585 (build-system python-build-system)
14586 (arguments
14587 `(#:phases
14588 (modify-phases %standard-phases
14589 (replace 'check
14590 (lambda _
14591 (invoke "py.test"))))))
14592 (native-inputs
14593 `(("python-pytest" ,python-pytest)))
14594 (home-page "http://github.com/Suor/whatever")
14595 (synopsis "Make anonymous functions by partial application of operators")
14596 (description "@code{whatever} provides an easy way to make anonymous
14597functions by partial application of operators.")
14598 (license license:bsd-3)))
14599
14600(define-public python2-whatever
14601 (package-with-python2 python-whatever))
14602
14603(define-public python-funcy
14604 (package
14605 (name "python-funcy")
9e396ab8 14606 (version "1.11")
44d10b1f
RW
14607 (source
14608 (origin
a85c6027
TGR
14609 (method git-fetch)
14610 (uri (git-reference
14611 (url "https://github.com/Suor/funcy.git")
14612 (commit version)))
44d10b1f 14613 (sha256
a85c6027
TGR
14614 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
14615 (file-name (git-file-name name version))))
44d10b1f
RW
14616 (build-system python-build-system)
14617 (arguments
14618 `(#:phases
14619 (modify-phases %standard-phases
14620 (replace 'check
14621 (lambda _
14622 (invoke "py.test"))))))
14623 (native-inputs
14624 `(("python-pytest" ,python-pytest)
14625 ("python-whatever" ,python-whatever)))
14626 (home-page "http://github.com/Suor/funcy")
14627 (synopsis "Functional tools")
14628 (description "@code{funcy} is a library that provides functional tools.
14629Examples are:
14630@enumerate
14631@item merge - Merges collections of the same type
14632@item walk - Type-preserving map
14633@item select - Selects a part of a collection
14634@item take - Takes the first n items of a collection
14635@item first - Takes the first item of a collection
14636@item remove - Predicated-removes items of a collection
14637@item concat - Concatenates two collections
14638@item flatten - Flattens a collection with subcollections
14639@item distinct - Returns only distinct items
14640@item split - Predicated-splits a collection
14641@item split_at - Splits a collection at a given item
14642@item group_by - Groups items by group
14643@item pairwise - Pairs off adjacent items
14644@item partial - Partially-applies a function
14645@item curry - Curries a function
14646@item compose - Composes functions
14647@item complement - Complements a predicate
14648@item all_fn - \"all\" with predicate
14649@end enumerate")
14650 (license license:bsd-3)))
14651
14652(define-public python2-funcy
14653 (package-with-python2 python-funcy))
14654
14655(define-public python-isoweek
14656 (package
14657 (name "python-isoweek")
14658 (version "1.3.3")
14659 (source
14660 (origin
14661 (method url-fetch)
14662 (uri (pypi-uri "isoweek" version))
14663 (sha256
14664 (base32
14665 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
14666 (build-system python-build-system)
14667 (home-page "https://github.com/gisle/isoweek")
14668 (synopsis "Objects representing a week")
14669 (description "The @code{isoweek} module provide the class Week that
14670implements the week definition of ISO 8601. This standard also defines
14671a notation for identifying weeks; yyyyWww (where the W is a literal).
14672Week instances stringify to this form.")
14673 (license license:bsd-3)))
14674
14675(define-public python2-isoweek
14676 (package-with-python2 python-isoweek))
14677
14678(define-public python-tokenize-rt
14679 (package
14680 (name "python-tokenize-rt")
14681 (version "2.0.1")
14682 (source
14683 (origin
14684 (method url-fetch)
14685 (uri (pypi-uri "tokenize-rt" version))
14686 (sha256
14687 (base32
14688 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
14689 (build-system python-build-system)
14690 (home-page "https://github.com/asottile/tokenize-rt")
14691 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
14692 (description
14693 "This Python library is a wrapper around @code{tokenize} from the Python
14694standard library. It provides two additional tokens @code{ESCAPED_NL} and
14695@code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
14696and @code{tokens_to_src} to roundtrip.")
14697 (license license:expat)))
14698
14699(define-public python-future-fstrings
14700 (package
14701 (name "python-future-fstrings")
14702 (version "0.4.1")
14703 (source
14704 (origin
14705 (method url-fetch)
14706 (uri (pypi-uri "future_fstrings" version))
14707 (sha256
14708 (base32
14709 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
14710 (build-system python-build-system)
14711 (propagated-inputs
14712 `(("python-tokenize-rt" ,python-tokenize-rt)))
14713 (home-page "https://github.com/asottile/future-fstrings")
14714 (synopsis "Backport of fstrings to Python < 3.6")
14715 (description
14716 "This package provides a UTF-8 compatible encoding
14717@code{future_fstrings}, which performs source manipulation. It decodes the
14718source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
14719@code{f} strings.")
14720 (license license:expat)))
14721
dae2eb1c
MC
14722(define-public python-typed-ast
14723 (package
14724 (name "python-typed-ast")
14725 (version "1.3.5")
14726 (source
14727 (origin
14728 (method url-fetch)
14729 (uri (pypi-uri "typed-ast" version))
14730 (sha256
14731 (base32
14732 "1m7pr6qpana3cvqwiw7mlvrgvmw27ch5mx1592572xhlki8g85ak"))))
14733 (build-system python-build-system)
14734 (arguments
14735 `(#:modules ((guix build utils)
14736 (guix build python-build-system)
14737 (ice-9 ftw)
14738 (srfi srfi-1)
14739 (srfi srfi-26))
14740 #:phases
14741 (modify-phases %standard-phases
14742 (replace 'check
14743 (lambda _
14744 (let ((cwd (getcwd)))
14745 (setenv "PYTHONPATH"
14746 (string-append cwd "/build/"
14747 (find (cut string-prefix? "lib" <>)
14748 (scandir (string-append cwd "/build")))
14749 ":"
14750 (getenv "PYTHONPATH"))))
14751 (invoke "pytest")
14752 #t)))))
14753 (native-inputs `(("python-pytest" ,python-pytest)))
14754 (home-page "https://github.com/python/typed_ast")
14755 (synopsis "Fork of Python @code{ast} modules with type comment support")
14756 (description "This package provides a parser similar to the standard
14757@code{ast} library. Unlike @code{ast}, the parsers in @code{typed_ast}
14758include PEP 484 type comments and are independent of the version of Python
14759under which they are run. The @code{typed_ast} parsers produce the standard
14760Python AST (plus type comments), and are both fast and correct, as they are
14761based on the CPython 2.7 and 3.7 parsers.")
14762 ;; See the file "LICENSE" for the details.
14763 (license (list license:psfl
14764 license:asl2.0
14765 license:expat)))) ;ast27/Parser/spark.py
14766
44d10b1f
RW
14767(define-public python-typing
14768 (package
14769 (name "python-typing")
14770 (version "3.6.6")
14771 (source
14772 (origin
14773 (method url-fetch)
14774 (uri (pypi-uri "typing" version))
14775 (sha256
14776 (base32
14777 "0ba9acs4awx15bf9v3nrs781msbd2nx826906nj6fqks2bvca9s0"))))
14778 (build-system python-build-system)
14779 (home-page "https://docs.python.org/3/library/typing.html")
14780 (synopsis "Type hints for Python")
14781 (description "This is a backport of the standard library @code{typing}
14782module to Python versions older than 3.5. Typing defines a standard notation
14783for Python function and variable type annotations. The notation can be used
14784for documenting code in a concise, standard format, and it has been designed
14785to also be used by static and runtime type checkers, static analyzers, IDEs
14786and other tools.")
14787 (license license:psfl)))
14788
14789(define-public python2-typing
14790 (package-with-python2 python-typing))
14791
f89d443b
VC
14792(define-public python-typing-extensions
14793 (package
14794 (name "python-typing-extensions")
14795 (version "3.7.2")
14796 (source
14797 (origin
14798 (method url-fetch)
14799 (uri (pypi-uri "typing_extensions" version))
14800 (sha256
14801 (base32
14802 "0wfsv71pvkyf2na938l579jh0v3kzl6g744ijgnahcwd4d9x0b7v"))))
14803 (build-system python-build-system)
14804 (home-page
14805 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
14806 (synopsis "Experimental type hints for Python")
14807 (description
14808 "The typing_extensions module contains additional @code{typing} hints not
14809yet present in the of the @code{typing} standard library.
14810Included are implementations of:
14811@enumerate
14812@item ClassVar
14813@item ContextManager
14814@item Counter
14815@item DefaultDict
14816@item Deque
14817@item NewType
14818@item NoReturn
14819@item overload
14820@item Protocol
14821@item runtime
14822@item Text
14823@item Type
14824@item TYPE_CHECKING
14825@item AsyncGenerator
14826@end enumerate\n")
14827 (license license:psfl)))
14828
44d10b1f
RW
14829(define-public bpython
14830 (package
14831 (name "bpython")
14832 (version "0.17.1")
14833 (source
14834 (origin
14835 (method url-fetch)
14836 (uri (pypi-uri "bpython" version))
14837 (sha256
14838 (base32
14839 "0bxhxi5zxdkrf8b4gwn0d363kdz3qnypjwhm1aydki53ph8ca1w9"))))
14840 (build-system python-build-system)
14841 (arguments
14842 `(#:phases
14843 (modify-phases %standard-phases
14844 (add-after 'unpack 'remove-failing-test
14845 (lambda _
14846 ;; Remove failing test. FIXME: make it pass
14847 (delete-file "bpython/test/test_args.py")
14848 #t))
14849 (add-after 'wrap 'add-aliases
14850 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
14851 (lambda* (#:key outputs #:allow-other-keys)
14852 (let ((out (assoc-ref outputs "out")))
14853 (for-each
14854 (lambda (old new)
14855 (symlink old (string-append out "/bin/" new)))
14856 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
14857 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
14858 #t)))))
14859 (propagated-inputs
14860 `(("python-pygments" ,python-pygments)
14861 ("python-requests" ,python-requests)
14862 ("python-babel" ,python-babel) ; optional, for internationalization
14863 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
14864 ("python-greenlet" ,python-greenlet)
14865 ("python-urwid" ,python-urwid) ; for bpython-urwid only
14866 ("python-six" ,python-six)))
14867 (native-inputs
14868 `(("python-sphinx" ,python-sphinx)
14869 ("python-mock" ,python-mock)))
14870 (home-page "https://bpython-interpreter.org/")
14871 (synopsis "Fancy interface to the Python interpreter")
14872 (description "Bpython is a fancy interface to the Python
14873interpreter. bpython's main features are
14874
14875@enumerate
14876@item in-line syntax highlighting,
14877@item readline-like autocomplete with suggestions displayed as you type,
14878@item expected parameter list for any Python function,
14879@item \"rewind\" function to pop the last line of code from memory and
14880 re-evaluate,
14881@item send the code you've entered off to a pastebin,
14882@item save the code you've entered to a file, and
14883@item auto-indentation.
14884@end enumerate")
14885 (license license:expat)))
14886
14887(define-public bpython2
14888 (let ((base (package-with-python2
14889 (strip-python2-variant bpython))))
14890 (package (inherit base)
14891 (name "bpython2")
14892 (arguments
14893 `(#:python ,python-2
14894 #:phases
14895 (modify-phases %standard-phases
14896 (add-after 'unpack 'remove-failing-test
14897 (lambda _
14898 ;; Remove failing test. FIXME: make it pass
14899 (delete-file "bpython/test/test_args.py")
14900 ;; Disable failing test-cases (renaming inhibits they are
14901 ;; discovered)
14902 (substitute* "bpython/test/test_curtsies_repl.py"
14903 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
14904 (string-append a "xxx_off_" b))
14905 (("^(\\s*def )(test_complex\\W)" _ a b)
14906 (string-append a "xxx_off_" b)))
14907 #t))
14908 (add-before 'build 'rename-scripts
14909 ;; rename the scripts to bypthon2, bpdb2, etc.
14910 (lambda _
14911 (substitute* "setup.py"
14912 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
14913 (string-append name "2" rest "\n"))
14914 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
14915 (string-append name "2" (or sub "") rest "\n")))
14916 #t))))))))
14917
14918(define-public python-pyinotify
14919 (package
14920 (name "python-pyinotify")
14921 (version "0.9.6")
14922 (source (origin
14923 (method url-fetch)
14924 (uri (pypi-uri "pyinotify" version))
14925 (sha256
14926 (base32
14927 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
14928 (build-system python-build-system)
14929 (arguments `(#:tests? #f)) ;no tests
14930 (home-page "https://github.com/seb-m/pyinotify")
14931 (synopsis "Python library for monitoring inotify events")
14932 (description
14933 "@code{pyinotify} provides a Python interface for monitoring
14934file system events on Linux.")
14935 (license license:expat)))
14936
14937(define-public python2-pyinotify
14938 (package-with-python2 python-pyinotify))
14939
14940;; Ada parser uses this version.
14941(define-public python2-quex-0.67.3
14942 (package
14943 (name "python2-quex")
14944 (version "0.67.3")
14945 (source
14946 (origin
14947 (method url-fetch)
14948 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
14949 (version-major+minor version)
14950 "/quex-" version ".zip"))
14951 (sha256
14952 (base32
14953 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
14954 (build-system python-build-system)
14955 (native-inputs
14956 `(("unzip" ,unzip)))
14957 (arguments
14958 `(#:python ,python-2
14959 #:tests? #f
14960 #:phases
14961 (modify-phases %standard-phases
14962 (delete 'configure)
14963 (delete 'build)
14964 (replace 'install
14965 (lambda* (#:key outputs #:allow-other-keys)
14966 (let* ((out (assoc-ref outputs "out"))
14967 (share/quex (string-append out "/share/quex"))
14968 (bin (string-append out "/bin")))
14969 (copy-recursively "." share/quex)
14970 (mkdir-p bin)
14971 (symlink (string-append share/quex "/quex-exe.py")
14972 (string-append bin "/quex"))
14973 #t))))))
14974 (native-search-paths
14975 (list (search-path-specification
14976 (variable "QUEX_PATH")
14977 (files '("share/quex")))))
14978 (home-page "http://quex.sourceforge.net/")
14979 (synopsis "Lexical analyzer generator in Python")
14980 (description "@code{quex} is a lexical analyzer generator in Python.")
14981 (license license:lgpl2.1+))) ; Non-military
14982
14983(define-public python2-quex
14984 (package (inherit python2-quex-0.67.3)
14985 (name "python2-quex")
14986 (version "0.68.1")
14987 (source
14988 (origin
14989 (method url-fetch)
14990 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
14991 (sha256
14992 (base32
14993 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
14994 (file-name (string-append name "-" version ".tar.gz"))))))
14995
14996(define-public python-more-itertools
14997 (package
14998 (name "python-more-itertools")
1b066827 14999 (version "7.1.0")
44d10b1f
RW
15000 (source
15001 (origin
15002 (method url-fetch)
15003 (uri (pypi-uri "more-itertools" version))
15004 (sha256
15005 (base32
1b066827 15006 "16phg2f2dvm6ci5wr49ncha5lmc0m2in3bsl33c61vzca4gkvd4b"))))
44d10b1f 15007 (build-system python-build-system)
44d10b1f
RW
15008 (home-page "https://github.com/erikrose/more-itertools")
15009 (synopsis "More routines for operating on iterables, beyond itertools")
15010 (description "Python's built-in @code{itertools} module implements a
15011number of iterator building blocks inspired by constructs from APL, Haskell,
15012and SML. @code{more-itertools} includes additional building blocks for
15013working with iterables.")
47f66348 15014 (properties `((python2-variant . ,(delay python2-more-itertools))))
44d10b1f
RW
15015 (license license:expat)))
15016
47f66348 15017;; The 5.x series are the last versions supporting Python 2.7.
44d10b1f 15018(define-public python2-more-itertools
47f66348
MB
15019 (package
15020 (inherit python-more-itertools)
15021 (name "python2-more-itertools")
15022 (version "5.0.0")
15023 (source (origin
15024 (method url-fetch)
15025 (uri (pypi-uri "more-itertools" version))
15026 (sha256
15027 (base32
15028 "1r12cm6mcdwdzz7d47a6g4l437xsvapdlgyhqay3i2nrlv03da9q"))))
15029 (arguments
15030 `(#:python ,python2-minimal))
15031 (propagated-inputs
15032 `(("python2-six" ,python2-six-bootstrap)))))
44d10b1f
RW
15033
15034(define-public python-latexcodec
15035 (package
15036 (name "python-latexcodec")
91b61f02 15037 (version "1.0.6")
44d10b1f
RW
15038 (source
15039 (origin
15040 (method url-fetch)
15041 (uri (pypi-uri "latexcodec" version))
15042 (sha256
91b61f02 15043 (base32 "0s4wdbg0w2l8pj3i0y4510i0s04p8nhxcsa2z41bjsv0k66npb81"))))
44d10b1f
RW
15044 (build-system python-build-system)
15045 (inputs
15046 `(("python-six" ,python-six)))
15047 (home-page "https://readthedocs.org/projects/latexcodec/")
15048 (synopsis "Work with LaTeX code in Python")
15049 (description "Lexer and codec to work with LaTeX code in Python.")
15050 (license license:expat)))
15051
15052(define-public python-pybtex
15053 (package
15054 (name "python-pybtex")
9441a9c1 15055 (version "0.22.2")
44d10b1f
RW
15056 (source
15057 (origin
15058 (method url-fetch)
15059 (uri (pypi-uri "pybtex" version))
15060 (sha256
9441a9c1 15061 (base32 "070wfcmxrd7xg1si421mi9150gmx2qwx431nwf69sq3hhmgnx080"))))
44d10b1f
RW
15062 (build-system python-build-system)
15063 (native-inputs
15064 `(("python-nose" ,python-nose)))
15065 (inputs
15066 `(("python-latexcodec" ,python-latexcodec)
15067 ("python-pyyaml" ,python-pyyaml)
15068 ("python-six" ,python-six)))
15069 (arguments
15070 `(#:test-target "nosetests"))
15071 (home-page "https://pybtex.org/")
15072 (synopsis "BibTeX-compatible bibliography processor")
15073 (description "Pybtex is a BibTeX-compatible bibliography processor written
15074in Python. You can simply type pybtex instead of bibtex.")
15075 (license license:expat)))
15076
15077(define-public python-onetimepass
15078 (package
15079 (name "python-onetimepass")
15080 (version "1.0.1")
15081 (source
15082 (origin
15083 (method url-fetch)
15084 (uri (pypi-uri "onetimepass" version))
15085 (sha256
15086 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
15087 (build-system python-build-system)
15088 (propagated-inputs `(("python-six" ,python-six)))
15089 (home-page "https://github.com/tadeck/onetimepass/")
15090 (synopsis "One-time password library")
15091 (description "Python one-time password library for HMAC-based (HOTP) and
15092time-based (TOTP) passwords.")
15093 (license license:expat)))
15094
15095(define-public python-parso
15096 (package
15097 (name "python-parso")
1475094a 15098 (version "0.5.1")
44d10b1f
RW
15099 (source
15100 (origin
15101 (method url-fetch)
15102 (uri (pypi-uri "parso" version))
15103 (sha256
15104 (base32
1475094a 15105 "171a9ivhxwsd52h1cgsz40zgzpgzscn7yqb7sdjhy8m1lzj0wsv6"))))
44d10b1f
RW
15106 (native-inputs
15107 `(("python-pytest" ,python-pytest)))
15108 (build-system python-build-system)
4eb97c25
MC
15109 (arguments
15110 `(#:phases (modify-phases %standard-phases
15111 (replace 'check
15112 (lambda _ (invoke "pytest" "-vv"))))))
44d10b1f
RW
15113 (home-page "https://github.com/davidhalter/parso")
15114 (synopsis "Python Parser")
15115 (description "Parso is a Python parser that supports error recovery and
15116round-trip parsing for different Python versions (in multiple Python versions).
15117Parso is also able to list multiple syntax errors in your Python file.")
15118 (license license:expat)))
15119
15120(define-public python2-parso
15121 (package-with-python2 python-parso))
15122
15123(define-public python-async-generator
15124 (package
15125 (name "python-async-generator")
94fcbf8d 15126 (version "1.10")
44d10b1f
RW
15127 (source
15128 (origin
15129 (method url-fetch)
15130 (uri (pypi-uri "async_generator" version))
15131 (sha256
15132 (base32
94fcbf8d 15133 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
44d10b1f
RW
15134 (build-system python-build-system)
15135 (native-inputs
15136 `(("python-pytest" ,python-pytest)))
15137 (home-page "https://github.com/python-trio/async_generator")
15138 (synopsis "Async generators and context managers for Python 3.5+")
15139 (description "@code{async_generator} back-ports Python 3.6's native async
15140generators and Python 3.7's context managers into Python 3.5.")
15141 ;; Dual licensed.
15142 (license (list license:expat license:asl2.0))))
15143
15144(define-public python-async-timeout
15145 (package
15146 (name "python-async-timeout")
15147 (version "3.0.1")
15148 (source
15149 (origin
15150 (method url-fetch)
15151 (uri (pypi-uri "async-timeout" version))
15152 (sha256
15153 (base32
15154 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
15155 (build-system python-build-system)
15156 (home-page "https://github.com/aio-libs/async_timeout/")
15157 (synopsis "Timeout context manager for asyncio programs")
15158 (description "@code{async-timeout} provides a timeout timeout context
15159manager compatible with @code{asyncio}.")
15160 (license license:asl2.0)))
15161
15162(define-public python-glob2
15163 (package
15164 (name "python-glob2")
4df49d19 15165 (version "0.7")
8fa2bcc7
TGR
15166 (source
15167 (origin
15168 (method git-fetch)
15169 (uri (git-reference
15170 (url "https://github.com/miracle2k/python-glob2.git")
4df49d19 15171 (commit (string-append "v" version))))
8fa2bcc7
TGR
15172 (file-name (git-file-name name version))
15173 (sha256
4df49d19 15174 (base32 "160nh2ay9lw2hi0rixpzb2k87r6ql56k0j2cm87lqz8xc8zbw919"))))
44d10b1f
RW
15175 (build-system python-build-system)
15176 (home-page "https://github.com/miracle2k/python-glob2/")
15177 (synopsis "Extended Version of the python buildin glob module")
15178 (description "This is an extended version of the Python
15179@url{http://docs.python.org/library/glob.html, built-in glob module} which
15180adds:
15181
15182@itemize
15183@item The ability to capture the text matched by glob patterns, and return
15184those matches alongside the file names.
15185@item A recursive @code{**} globbing syntax, akin for example to the
15186@code{globstar} option of Bash.
15187@item The ability to replace the file system functions used, in order to glob
15188on virtual file systems.
15189@item Compatible with Python 2 and Python 3 (tested with 3.3).
15190@end itemize
15191
15192Glob2 currently based on the glob code from Python 3.3.1.")
15193 (license license:bsd-2)))
15194
15195(define-public python2-glob2
15196 (package-with-python2 python-glob2))
15197
15198(define-public python-gipc
15199 (package
15200 (name "python-gipc")
15201 (version "0.6.0")
15202 (source
15203 (origin
15204 (method url-fetch)
15205 (uri (pypi-uri "gipc" version ".zip"))
15206 (sha256
15207 (base32
15208 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
15209 (build-system python-build-system)
15210 (native-inputs
15211 `(("unzip" ,unzip)))
15212 (propagated-inputs
15213 `(("python-gevent" ,python-gevent)))
15214 (home-page "http://gehrcke.de/gipc")
15215 (synopsis "Child process management in the context of gevent")
15216 (description "Usage of Python's multiprocessing package in a
15217gevent-powered application may raise problems. With @code{gipc},
15218process-based child processes can safely be created anywhere within a
15219gevent-powered application.")
15220 (license license:expat)))
15221
15222(define-public python2-gipc
15223 (package-with-python2 python-gipc))
15224
15225(define-public python-fusepy
15226 (package
15227 (name "python-fusepy")
15228 (version "2.0.4")
15229 (source
15230 (origin
15231 (method url-fetch)
15232 (uri (pypi-uri "fusepy" version))
15233 (sha256
15234 (base32
15235 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
15236 (build-system python-build-system)
15237 (arguments
15238 `(#:phases
15239 (modify-phases %standard-phases
15240 (add-before 'build 'set-library-file-name
15241 (lambda* (#:key inputs #:allow-other-keys)
15242 (let ((fuse (assoc-ref inputs "fuse")))
15243 (substitute* "fuse.py"
15244 (("find_library\\('fuse'\\)")
15245 (string-append "'" fuse "/lib/libfuse.so'")))
15246 #t))))))
15247 (propagated-inputs
15248 `(("fuse" ,fuse)))
15249 (home-page "https://github.com/fusepy/fusepy")
15250 (synopsis "Simple ctypes bindings for FUSE")
15251 (description "Python module that provides a simple interface to FUSE and
15252MacFUSE. The binding is created using the standard @code{ctypes} library.")
15253 (license license:isc)))
15254
15255(define-public python2-fusepy
15256 (package-with-python2 python-fusepy))
15257
15258(define-public python2-gdrivefs
15259 (package
15260 (name "python2-gdrivefs")
15261 (version "0.14.9")
15262 (source
15263 (origin
15264 (method url-fetch)
15265 (uri (pypi-uri "gdrivefs" version))
15266 (sha256
15267 (base32
15268 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
15269 (build-system python-build-system)
15270 (arguments
15271 `(#:python ,python-2
15272 #:phases
15273 (modify-phases %standard-phases
15274 (add-before 'build 'patch-setup-py
15275 (lambda _
15276 ;; Update requirements from dependency==version
15277 ;; to dependency>=version
15278 (substitute* "gdrivefs/resources/requirements.txt"
15279 (("==") ">="))
15280 #t)))))
15281 (native-inputs
15282 `(("python2-gipc" ,python2-gipc)
15283 ("python2-gevent" ,python2-gevent)
15284 ("python2-greenlet" ,python2-greenlet)
15285 ("python2-httplib2" ,python2-httplib2)
15286 ("python2-uritemplate" ,python2-uritemplate)
15287 ("python2-oauth2client" ,python2-oauth2client)
15288 ("python2-six" ,python2-six)))
15289 (propagated-inputs
15290 `(("python2-dateutil" ,python2-dateutil)
15291 ("python2-fusepy" ,python2-fusepy)
15292 ("python2-google-api-client" ,python2-google-api-client)))
15293 (home-page "https://github.com/dsoprea/GDriveFS")
15294 (synopsis "Mount Google Drive as a local file system")
15295 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
15296under Python 2.7.")
15297 (license license:gpl2)))
15298
15299(define-public pybind11
15300 (package
15301 (name "pybind11")
d478cc04 15302 (version "2.3.0")
44d10b1f
RW
15303 (source (origin
15304 (method git-fetch)
15305 (uri (git-reference
15306 (url "https://github.com/pybind/pybind11.git")
15307 (commit (string-append "v" version))))
15308 (sha256
15309 (base32
d478cc04 15310 "11b6dniri8m05spfd2a19irz82shf4sdca73566bniggrf3zclnf"))
44d10b1f
RW
15311 (file-name (git-file-name name version))))
15312 (build-system cmake-build-system)
15313 (native-inputs
15314 `(("python" ,python)
15315 ("python-pytest" ,python-pytest)))
15316 (arguments
15317 `(#:test-target "check"))
15318 (home-page "https://github.com/pybind/pybind11/")
15319 (synopsis "Seamless operability between C++11 and Python")
15320 (description "pybind11 is a lightweight header-only library that exposes
15321C++ types in Python and vice versa, mainly to create Python bindings of
15322existing C++ code. Its goals and syntax are similar to the excellent
15323Boost.Python library by David Abrahams: to minimize boilerplate code in
15324traditional extension modules by inferring type information using compile-time
15325introspection.")
15326 (license license:expat)))
15327
15328(define-public python-fasteners
15329 (package
15330 (name "python-fasteners")
15331 (version "0.14.1")
15332 (source
15333 (origin
15334 (method url-fetch)
15335 (uri (pypi-uri "fasteners" version))
15336 (sha256
15337 (base32
15338 "063y20kx01ihbz2mziapmjxi2cd0dq48jzg587xdsdp07xvpcz22"))))
15339 (build-system python-build-system)
15340 (propagated-inputs
15341 `(("python-monotonic" ,python-monotonic)
15342 ("python-six" ,python-six)
15343 ("python-testtools" ,python-testtools)))
15344 (home-page "https://github.com/harlowja/fasteners")
15345 (synopsis "Python package that provides useful locks")
15346 (description
15347 "This package provides a Python program that provides following locks:
15348
15349@itemize
15350@item Locking decorator
15351@item Reader-writer locks
15352@item Inter-process locks
15353@item Generic helpers
15354@end itemize\n")
15355 (properties `((python2-variant . ,(delay python2-fasteners))))
15356 (license license:asl2.0)))
15357
15358(define-public python2-fasteners
15359 (let ((base (package-with-python2 (strip-python2-variant python-fasteners))))
15360 (package
15361 (inherit base)
15362 (propagated-inputs
15363 `(("python2-futures" ,python2-futures)
15364 ,@(package-propagated-inputs base))))))
15365
15366(define-public python-requests-file
15367 (package
15368 (name "python-requests-file")
15369 (version "1.4.3")
15370 (source
15371 (origin
15372 (method url-fetch)
15373 (uri (pypi-uri "requests-file" version))
15374 (sha256
15375 (base32
15376 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
15377 (build-system python-build-system)
15378 (propagated-inputs
15379 `(("python-requests" ,python-requests)
15380 ("python-six" ,python-six)))
15381 (home-page
15382 "https://github.com/dashea/requests-file")
15383 (synopsis "File transport adapter for Requests")
15384 (description
15385 "Requests-File is a transport adapter for use with the Requests Python
52beae7b 15386library to allow local file system access via @code{file://} URLs.")
44d10b1f
RW
15387 (license license:asl2.0)))
15388
15389(define-public python2-requests-file
15390 (package-with-python2 python-requests-file))
15391
15392(define-public python-tldextract
15393 (package
15394 (name "python-tldextract")
15395 (version "2.2.0")
15396 (source
15397 (origin
15398 (method url-fetch)
15399 (uri (pypi-uri "tldextract" version))
15400 (sha256
15401 (base32
15402 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
15403 (build-system python-build-system)
15404 (native-inputs
15405 `(("python-pytest" ,python-pytest)
15406 ("python-responses" ,python-responses)))
15407 (propagated-inputs
15408 `(("python-idna" ,python-idna)
15409 ("python-requests" ,python-requests)
15410 ("python-requests-file" ,python-requests-file)))
15411 (home-page
15412 "https://github.com/john-kurkowski/tldextract")
15413 (synopsis
15414 "Separate the TLD from the registered domain and subdomains of a URL")
15415 (description
15416 "TLDExtract accurately separates the TLD from the registered domain and
15417subdomains of a URL, using the Public Suffix List. By default, this includes
15418the public ICANN TLDs and their exceptions. It can optionally support the
15419Public Suffix List's private domains as well.")
15420 (license license:bsd-3)))
15421
15422(define-public python2-tldextract
15423 (package-with-python2 python-tldextract))
15424
15425(define-public python-pynamecheap
15426 (package
15427 (name "python-pynamecheap")
15428 (version "0.0.3")
15429 (source
15430 (origin
15431 (method url-fetch)
15432 (uri (pypi-uri "PyNamecheap" version))
15433 (sha256
15434 (base32
15435 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
15436 (build-system python-build-system)
15437 (propagated-inputs
15438 `(("python-requests" ,python-requests)))
15439 (home-page
15440 "https://github.com/Bemmu/PyNamecheap")
15441 (synopsis
15442 "Namecheap API client in Python")
15443 (description
15444 "PyNamecheap is a Namecheap API client in Python.")
15445 (license license:expat)))
15446
15447(define-public python2-pynamecheap
15448 (package-with-python2 python-pynamecheap))
15449
15450(define-public python-dns-lexicon
15451 (package
15452 (name "python-dns-lexicon")
15453 (version "2.4.0")
15454 (source
15455 (origin
15456 (method url-fetch)
15457 (uri (pypi-uri "dns-lexicon" version))
15458 (sha256
15459 (base32
15460 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
15461 (build-system python-build-system)
15462 (arguments
15463 `(#:tests? #f)) ;requires internet access
15464 (propagated-inputs
15465 `(("python-future" ,python-future)
15466 ("python-pynamecheap" ,python-pynamecheap)
15467 ("python-requests" ,python-requests)
15468 ("python-tldextract" ,python-tldextract)
15469 ("python-urllib3" ,python-urllib3)))
15470 (home-page "https://github.com/AnalogJ/lexicon")
15471 (synopsis
15472 "Manipulate DNS records on various DNS providers")
15473 (description
15474 "Lexicon provides a way to manipulate DNS records on multiple DNS
15475providers in a standardized way. It has a CLI but it can also be used as a
15476Python library. It was designed to be used in automation, specifically with
15477Let's Encrypt.")
15478 (license license:expat)))
15479
15480(define-public python2-dns-lexicon
15481 (package-with-python2 python-dns-lexicon))
15482
15483(define-public python-commandlines
15484 (package
15485 (name "python-commandlines")
15486 (version "0.4.1")
15487 (source
15488 (origin
15489 (method url-fetch)
15490 (uri (pypi-uri "commandlines" version))
15491 (sha256
15492 (base32
15493 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
15494 (build-system python-build-system)
15495 (home-page "https://github.com/chrissimpkins/commandlines")
15496 (synopsis "Command line argument to object parsing library")
15497 (description
15498 "@code{Commandlines} is a Python library for command line application
15499development that supports command line argument parsing, command string
15500validation testing and application logic.")
15501 (license license:expat)))
15502
15503;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
15504;; python-numba. They have a very unflexible relationship.
15505(define-public python-numba
15506 (package
15507 (name "python-numba")
7757e6d8 15508 (version "0.42.0")
44d10b1f
RW
15509 (source
15510 (origin
15511 (method url-fetch)
15512 (uri (pypi-uri "numba" version))
15513 (sha256
15514 (base32
7757e6d8 15515 "03rqdfx0512lcri2bcpngx5k3jwfbqnanqj3n19c7d6h6hqxvq9x"))))
44d10b1f
RW
15516 (build-system python-build-system)
15517 (arguments
15518 `(#:modules ((guix build utils)
15519 (guix build python-build-system)
15520 (ice-9 ftw)
15521 (srfi srfi-1)
15522 (srfi srfi-26))
15523 #:phases
15524 (modify-phases %standard-phases
15525 (add-after 'unpack 'disable-proprietary-features
15526 (lambda _
15527 (setenv "NUMBA_DISABLE_HSA" "1")
15528 (setenv "NUMBA_DISABLE_CUDA" "1")
15529 #t))
15530 (add-after 'unpack 'remove-failing-tests
15531 (lambda _
15532 ;; FIXME: these tests fail for unknown reasons:
15533 ;; test_non_writable_pycache, test_non_creatable_pycache, and
15534 ;; test_frozen (all in numba.tests.test_dispatcher.TestCache).
15535 (substitute* "numba/tests/test_dispatcher.py"
15536 (("def test(_non_writable_pycache)" _ m)
15537 (string-append "def guix_skip" m))
15538 (("def test(_non_creatable_pycache)" _ m)
15539 (string-append "def guix_skip" m))
15540 (("def test(_frozen)" _ m)
15541 (string-append "def guix_skip" m)))
15542
15543 ;; These tests fail because we don't run the tests from the build
15544 ;; directory: test_setup_py_distutils, test_setup_py_setuptools
15545 ;; They ar in numba.tests.test_pycc.TestDistutilsSupport.
15546 (substitute* "numba/tests/test_pycc.py"
15547 (("def test(_setup_py_distutils|_setup_py_setuptools)" _ m)
15548 (string-append "def guix_skip" m)))
15549 #t))
15550 (replace 'check
15551 (lambda _
15552 (let ((cwd (getcwd)))
15553 (setenv "PYTHONPATH"
15554 (string-append cwd "/build/"
15555 (find (cut string-prefix? "lib" <>)
15556 (scandir (string-append cwd "/build")))
15557 ":"
15558 (getenv "PYTHONPATH")))
15559 ;; Something is wrong with the PYTHONPATH when running the
15560 ;; tests from the build directory, as it complains about not being
15561 ;; able to import certain modules.
15562 (with-directory-excursion "/tmp"
15563 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))
15564 #t)))))
15565 (propagated-inputs
15566 `(("python-llvmlite" ,python-llvmlite)
15567 ("python-numpy" ,python-numpy)
15568 ("python-singledispatch" ,python-singledispatch)))
15569 ;; Needed for tests.
15570 (inputs
15571 `(("python-jinja2" ,python-jinja2)
15572 ("python-pygments" ,python-pygments)))
15573 (home-page "https://numba.pydata.org")
15574 (synopsis "Compile Python code using LLVM")
15575 (description "Numba gives you the power to speed up your applications with
15576high performance functions written directly in Python. With a few
15577annotations, array-oriented and math-heavy Python code can be just-in-time
15578compiled to native machine instructions, similar in performance to C, C++ and
15579Fortran, without having to switch languages or Python interpreters.
15580
15581Numba works by generating optimized machine code using the LLVM compiler
15582infrastructure at import time, runtime, or statically (using the included pycc
15583tool).")
15584 (license license:bsd-3)))
15585
15586(define-public python-anndata
15587 (package
15588 (name "python-anndata")
8c9372c1 15589 (version "0.6.18")
44d10b1f
RW
15590 (source
15591 (origin
15592 (method url-fetch)
15593 (uri (pypi-uri "anndata" version))
15594 (sha256
15595 (base32
8c9372c1 15596 "03x83yjaccbqszj7x4fwwmpil0ai59yx64d1zmf2691za3j03w73"))))
44d10b1f
RW
15597 (build-system python-build-system)
15598 (propagated-inputs
15599 `(("python-h5py" ,python-h5py)
15600 ("python-natsort" ,python-natsort)
15601 ("python-pandas" ,python-pandas)
15602 ("python-scipy" ,python-scipy)))
15603 (home-page "https://github.com/theislab/anndata")
15604 (synopsis "Annotated data for data analysis pipelines")
15605 (description "Anndata is a package for simple (functional) high-level APIs
15606for data analysis pipelines. In this context, it provides an efficient,
15607scalable way of keeping track of data together with learned annotations and
15608reduces the code overhead typically encountered when using a mostly
15609object-oriented library such as @code{scikit-learn}.")
15610 (license license:bsd-3)))
15611
15612(define-public python-dill
15613 (package
15614 (name "python-dill")
c60b15cc 15615 (version "0.2.9")
44d10b1f
RW
15616 (source
15617 (origin
15618 (method url-fetch)
15619 (uri (pypi-uri "dill" version))
15620 (sha256
c60b15cc 15621 (base32 "0vwqyi6hyz2r29zydc78dqymkbc5y7gia16xcdh215cikxph9mpn"))))
44d10b1f 15622 (build-system python-build-system)
c60b15cc 15623 ;; FIXME: The check phase fails with "don't know how to make test from: …".
44d10b1f
RW
15624 (arguments '(#:tests? #f))
15625 (home-page "https://pypi.org/project/dill")
15626 (synopsis "Serialize all of Python")
15627 (description "Dill extends Python's @code{pickle} module for serializing
15628and de-serializing Python objects to the majority of the built-in Python
15629types. Dill provides the user the same interface as the @code{pickle} module,
15630and also includes some additional features. In addition to pickling Python
15631objects, @code{dill} provides the ability to save the state of an interpreter
61985d65 15632session in a single command. Hence, it would be feasible to save a
44d10b1f
RW
15633interpreter session, close the interpreter, ship the pickled file to another
15634computer, open a new interpreter, unpickle the session and thus continue from
15635the saved state of the original interpreter session.")
15636 (license license:bsd-3)))
15637
15638(define-public python-multiprocess
15639 (package
15640 (name "python-multiprocess")
15641 (version "0.70.6.1")
15642 (source
15643 (origin
15644 (method url-fetch)
15645 (uri (pypi-uri "multiprocess" version))
15646 (sha256
15647 (base32
15648 "1ip5caz67b3q0553mr8gm8xwsb8x500jn8ml0gihgyfy52m2ypcq"))))
15649 (build-system python-build-system)
15650 (propagated-inputs
15651 `(("python-dill" ,python-dill)))
15652 (home-page "https://pypi.org/project/multiprocess")
15653 (synopsis "Multiprocessing and multithreading in Python")
15654 (description
15655 "This package is a fork of the multiprocessing Python package, a package
15656which supports the spawning of processes using the API of the standard
15657library's @code{threading} module.")
15658 (license license:bsd-3)))
15659
15660(define-public python-toolz
15661 (package
15662 (name "python-toolz")
15663 (version "0.9.0")
15664 (source
15665 (origin
15666 (method url-fetch)
15667 (uri (pypi-uri "toolz" version))
15668 (sha256
15669 (base32
15670 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
15671 (build-system python-build-system)
15672 ;; FIXME: tests cannot be computed: "Can't perform this operation for
15673 ;; unregistered loader type"
15674 (arguments '(#:tests? #f))
15675 (home-page "https://github.com/pytoolz/toolz/")
15676 (synopsis "List processing tools and functional utilities")
15677 (description
15678 "This package provides a set of utility functions for iterators,
15679functions, and dictionaries.")
15680 (license license:bsd-3)))
15681
15682(define-public python2-toolz
15683 (package-with-python2 python-toolz))
15684
15685(define-public python-cytoolz
15686 (package
15687 (name "python-cytoolz")
15688 (version "0.9.0.1")
15689 (source
15690 (origin
15691 (method url-fetch)
15692 (uri (pypi-uri "cytoolz" version))
15693 (sha256
15694 (base32
15695 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
15696 (build-system python-build-system)
15697 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
15698 ;; 'exceptions'"
15699 (arguments '(#:tests? #f))
15700 (propagated-inputs
15701 `(("python-toolz" ,python-toolz)))
15702 (native-inputs
15703 `(("python-cython" ,python-cython)))
15704 (home-page "https://github.com/pytoolz/cytoolz")
15705 (synopsis "High performance functional utilities")
15706 (description
15707 "The cytoolz package implements the same API as provided by toolz. The
15708main differences are that @code{cytoolz} is faster and cytoolz offers a C API
15709that is accessible to other projects developed in Cython.")
15710 (license license:bsd-3)))
15711
15712(define-public python-sortedcontainers
15713 (package
15714 (name "python-sortedcontainers")
15715 (version "2.0.4")
15716 (source
15717 (origin
15718 (method url-fetch)
15719 (uri (pypi-uri "sortedcontainers" version))
15720 (sha256
15721 (base32
15722 "10hrk2k0hbf9x78vd3f0lj277m1yzfhzzxr0hja718liwb398wk0"))))
15723 (build-system python-build-system)
15724 (native-inputs
15725 `(("python-tox" ,python-tox)))
15726 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
15727 (synopsis "Sorted List, Sorted Dict, Sorted Set")
15728 (description
15729 "This package provides a sorted collections library, written in
15730pure-Python.")
15731 (license license:asl2.0)))
15732
15733(define-public python-cloudpickle
15734 (package
15735 (name "python-cloudpickle")
15736 (version "0.6.1")
15737 (source
15738 (origin
15739 (method url-fetch)
15740 (uri (pypi-uri "cloudpickle" version))
15741 (sha256
15742 (base32
15743 "1wdw89mlm7fqa3fm3ymskx05jrys66n8m1z1a8s0mss0799ahsgi"))))
15744 (build-system python-build-system)
15745 ;; FIXME: there are 5 errors in 122 tests:
15746 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.CloudPickleTest)
15747 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.CloudPickleTest)
15748 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.Protocol2CloudPickleTest)
15749 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.Protocol2CloudPickleTest)
15750 ;; ERROR: test_temp_file (tests.cloudpickle_file_test.CloudPickleFileTests)
15751 ;; TypeError: cannot serialize '_io.BufferedRandom' object
15752 (arguments '(#:tests? #f))
15753 (native-inputs
15754 `(("python-pytest" ,python-pytest)
15755 ("python-mock" ,python-mock)
15756 ("python-tornado" ,python-tornado)))
15757 (home-page "https://github.com/cloudpipe/cloudpickle")
15758 (synopsis "Extended pickling support for Python objects")
15759 (description
15760 "Cloudpickle makes it possible to serialize Python constructs not
15761supported by the default pickle module from the Python standard library. It
15762is especially useful for cluster computing where Python expressions are
15763shipped over the network to execute on remote hosts, possibly close to the
15764data.")
15765 (license license:bsd-3)))
15766
15767(define-public python2-cloudpickle
15768 (package-with-python2 python-cloudpickle))
15769
15770(define-public python-locket
15771 (package
15772 (name "python-locket")
15773 (version "0.2.0")
15774 (source
15775 (origin
15776 (method url-fetch)
15777 (uri (pypi-uri "locket" version))
15778 (sha256
15779 (base32
15780 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
15781 (build-system python-build-system)
15782 (home-page "https://github.com/mwilliamson/locket.py")
15783 (synopsis "File-based locks for Python")
15784 (description
15785 "Locket implements a lock that can be used by multiple processes provided
15786they use the same path.")
15787 (license license:bsd-2)))
15788
15789(define-public python2-locket
15790 (package-with-python2 python-locket))
15791
15792(define-public python-blosc
15793 (package
15794 (name "python-blosc")
15795 (version "1.5.1")
15796 (source
15797 (origin
15798 (method url-fetch)
15799 (uri (pypi-uri "blosc" version))
15800 (sha256
15801 (base32
15802 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
15803 (build-system python-build-system)
15804 ;; FIXME: all tests pass, but then this error is printed:
15805 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
15806 (arguments '(#:tests? #f))
15807 (propagated-inputs
15808 `(("python-numpy" ,python-numpy)))
15809 (home-page "https://github.com/blosc/python-blosc")
15810 (synopsis "Python wrapper for the Blosc data compressor library")
15811 (description "Blosc is a high performance compressor optimized for binary
15812data. It has been designed to transmit data to the processor cache faster
15813than the traditional, non-compressed, direct memory fetch approach via a
15814@code{memcpy()} system call.
15815
15816Blosc works well for compressing numerical arrays that contains data with
15817relatively low entropy, like sparse data, time series, grids with
15818regular-spaced values, etc.
15819
15820This Python package wraps the Blosc library.")
15821 (license license:bsd-3)))
15822
15823(define-public python2-blosc
15824 (package-with-python2 python-blosc))
15825
15826(define-public python-partd
15827 (package
15828 (name "python-partd")
15829 (version "0.3.9")
15830 (source
15831 (origin
15832 (method url-fetch)
15833 (uri (pypi-uri "partd" version))
15834 (sha256
15835 (base32
15836 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
15837 (build-system python-build-system)
15838 (propagated-inputs
15839 `(("python-blosc" ,python-blosc)
15840 ("python-locket" ,python-locket)
15841 ("python-numpy" ,python-numpy)
15842 ("python-pandas" ,python-pandas)
15843 ("python-pyzmq" ,python-pyzmq)
15844 ("python-toolz" ,python-toolz)))
15845 (home-page "https://github.com/dask/partd/")
15846 (synopsis "Appendable key-value storage")
15847 (description "Partd stores key-value pairs. Values are raw bytes. We
15848append on old values. Partd excels at shuffling operations.")
15849 (license license:bsd-3)))
15850
15851(define-public python2-partd
15852 (package-with-python2 python-partd))
15853
15854(define-public python-dask
15855 (package
15856 (name "python-dask")
0998175f 15857 (version "1.2.2")
44d10b1f
RW
15858 (source
15859 (origin
15860 (method url-fetch)
15861 (uri (pypi-uri "dask" version))
15862 (sha256
0998175f 15863 (base32 "0b29gvf96gmp20wicly3v3mhyc93zbm3mdv935fka6x0wax7cy2y"))))
44d10b1f
RW
15864 (build-system python-build-system)
15865 ;; A single test out of 5000+ fails. This test is marked as xfail when
15866 ;; pytest-xdist is used.
15867 (arguments
15868 `(#:phases
15869 (modify-phases %standard-phases
15870 (add-after 'unpack 'disable-broken-test
15871 (lambda _
15872 (substitute* "dask/tests/test_threaded.py"
15873 (("def test_interrupt\\(\\)" m)
15874 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
15875 m)))
15876 (when (which "python2")
15877 ;; This test fails with recent Pandas:
15878 ;; <https://github.com/dask/dask/issues/3794>.
15879 (substitute* "dask/dataframe/tests/test_dataframe.py"
15880 (("def test_info\\(\\)" m)
15881 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
15882 m))))
15883 #t))
15884 (replace 'check
15885 (lambda _ (invoke "pytest" "-vv"))))))
15886 (propagated-inputs
15887 `(("python-cloudpickle" ,python-cloudpickle)
15888 ("python-numpy" ,python-numpy)
15889 ("python-pandas" ,python-pandas)
15890 ("python-partd" ,python-partd)
15891 ("python-toolz" ,python-toolz)
15892 ("python-pyyaml" ,python-pyyaml)))
15893 (native-inputs
15894 `(("python-pytest" ,python-pytest)
15895 ("python-pytest-runner" ,python-pytest-runner)))
15896 (home-page "https://github.com/dask/dask/")
15897 (synopsis "Parallel computing with task scheduling")
15898 (description
15899 "Dask is a flexible parallel computing library for analytics. It
15900consists of two components: dynamic task scheduling optimized for computation,
15901and large data collections like parallel arrays, dataframes, and lists that
15902extend common interfaces like NumPy, Pandas, or Python iterators to
15903larger-than-memory or distributed environments. These parallel collections
15904run on top of the dynamic task schedulers. ")
15905 (license license:bsd-3)))
15906
15907(define-public python2-dask
15908 (package-with-python2 python-dask))
15909
15910(define-public python-ilinkedlist
15911 (package
15912 (name "python-ilinkedlist")
15913 (version "0.4.0")
15914 (source
15915 (origin
15916 (method url-fetch)
15917 (uri (pypi-uri "ilinkedlist" version))
15918 (sha256
15919 (base32
15920 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
15921 (build-system python-build-system)
15922 (native-inputs `(("python-pytest" ,python-pytest)))
15923 (inputs `(("python" ,python)))
15924 (home-page "https://github.com/luther9/ilinkedlist-py")
15925 (synopsis "Immutable linked list library")
15926 (description
15927 "This is a implementation of immutable linked lists for Python. It
15928contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
15929Since a linked list is treated as immutable, it is hashable, and its length
15930can be retrieved in constant time. Some of the terminology is inspired by
15931LISP. It is possible to create an improper list by creating a @code{Pair}
15932with a non-list @code{cdr}.")
15933 (license license:gpl3+)))
15934
15935(define-public python-readlike
15936 (package
15937 (name "python-readlike")
15938 (version "0.1.3")
15939 (source
15940 (origin
15941 (method url-fetch)
15942 (uri (pypi-uri "readlike" version))
15943 (sha256
15944 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
15945 (build-system python-build-system)
15946 (home-page "https://github.com/jangler/readlike")
15947 (synopsis "GNU Readline-like line editing module")
15948 (description
15949 "This Python module provides line editing functions similar to the default
15950Emacs-style ones of GNU Readline. Unlike the Python standard library's
15951@code{readline} package, this one allows access to those capabilties in settings
15952outside of a standard command-line interface. It is especially well-suited to
15953interfacing with Urwid, due to a shared syntax for describing key inputs.
15954
15955Currently, all stateless Readline commands are implemented. Yanking and history
15956are not supported.")
15957 (license license:expat)))
15958
15959(define-public python2-readlike
15960 (package-with-python2 python-readlike))
15961
15962(define-public python-reparser
15963 (package
15964 (name "python-reparser")
15965 (version "1.4.3")
15966 (source
15967 (origin
15968 (method url-fetch)
15969 (uri (pypi-uri "ReParser" version))
15970 (sha256
15971 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
15972 (build-system python-build-system)
15973 (home-page "https://github.com/xmikos/reparser")
15974 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
15975 (description
15976 "This Python library provides a simple lexer/parser for inline markup based
15977on regular expressions.")
15978 (license license:expat)))
15979
15980(define-public python2-reparser
15981 (let ((reparser (package-with-python2
15982 (strip-python2-variant python-reparser))))
15983 (package (inherit reparser)
15984 (propagated-inputs
15985 `(("python2-enum34" ,python2-enum34)
15986 ,@(package-propagated-inputs reparser))))))
15987
15988(define-public python-precis-i18n
15989 (package
15990 (name "python-precis-i18n")
15991 (version "1.0.0")
15992 (source
15993 (origin
15994 (method url-fetch)
15995 (uri (pypi-uri "precis_i18n" version))
15996 (sha256
15997 (base32
15998 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
15999 (build-system python-build-system)
16000 (home-page "https://github.com/byllyfish/precis_i18n")
16001 (synopsis "Implementation of the PRECIS framework")
16002 (description
16003 "This module implements the PRECIS Framework as described in RFC 8264,
16004RFC 8265 and RFC 8266.")
16005 (license license:expat)))
16006
d0446c4b
RW
16007(define-public python-absl-py
16008 (package
16009 (name "python-absl-py")
16010 (version "0.6.1")
16011 (source
16012 (origin
16013 (method url-fetch)
16014 (uri (pypi-uri "absl-py" version))
16015 (sha256
16016 (base32
16017 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
16018 (build-system python-build-system)
16019 (propagated-inputs
16020 `(("python-six" ,python-six)))
16021 (home-page "https://github.com/abseil/abseil-py")
16022 (synopsis "Abseil Python common libraries")
16023 (description
16024 "This package provides the Abseil Python Common Libraries, a collection
16025of Python libraries for building Python applications.")
16026 (license license:asl2.0)))
16027
81bed4e9
RW
16028(define-public python-astor
16029 (package
16030 (name "python-astor")
16031 (version "0.7.1")
16032 (source
16033 (origin
16034 (method url-fetch)
16035 (uri (pypi-uri "astor" version))
16036 (sha256
16037 (base32
16038 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
16039 (build-system python-build-system)
16040 ;; FIXME: There are two errors and two test failures.
16041 (arguments `(#:tests? #f))
16042 (home-page "https://github.com/berkerpeksag/astor")
39ee82ff 16043 (synopsis "Read and write Python ASTs")
81bed4e9 16044 (description "Astor is designed to allow easy manipulation of Python
39ee82ff 16045source via the Abstract Syntax Tree.")
81bed4e9
RW
16046 (license license:bsd-3)))
16047
39ee82ff
RW
16048(define-public python2-astor
16049 (package-with-python2 python-astor))
16050
22e623ae
RW
16051(define-public python-grpcio
16052 (package
16053 (name "python-grpcio")
16054 (version "1.17.1")
16055 (source
16056 (origin
16057 (method url-fetch)
16058 (uri (pypi-uri "grpcio" version))
16059 (sha256
16060 (base32
16061 "0qb9y6j83nxa6d4kc60i8yfgdm7a8ms7b54kncjzf5y7nsxp8rzx"))))
16062 (build-system python-build-system)
16063 (propagated-inputs
16064 `(("python-six" ,python-six)))
16065 (home-page "https://grpc.io")
16066 (synopsis "HTTP/2-based RPC framework")
16067 (description "This package provides a Python library for communicating
16068with the HTTP/2-based RPC framework gRPC.")
16069 (license license:asl2.0)))
16070
79869f80
RW
16071(define-public python-astunparse
16072 (package
16073 (name "python-astunparse")
47d79541 16074 (version "1.6.2")
79869f80
RW
16075 (source
16076 (origin
16077 (method url-fetch)
16078 (uri (pypi-uri "astunparse" version))
16079 (sha256
47d79541 16080 (base32 "0rzbc44xcvzjhhiy7wac96mgal5mcjz1mfq8rmvgswskf4kf9cys"))))
79869f80 16081 (build-system python-build-system)
47d79541 16082 (arguments '(#:tests? #f)) ; there are none
79869f80
RW
16083 (propagated-inputs
16084 `(("python-six" ,python-six)
16085 ("python-wheel" ,python-wheel)))
16086 (home-page "https://github.com/simonpercivall/astunparse")
16087 (synopsis "AST unparser for Python")
16088 (description "This package provides an AST unparser for Python. It is a
16089factored out version of @code{unparse} found in the Python source
16090distribution.")
16091 (license license:bsd-3)))
16092
2884aac0
RW
16093(define-public python-gast
16094 (package
16095 (name "python-gast")
bd300261 16096 (version "0.2.2")
2884aac0
RW
16097 (source
16098 (origin
16099 (method url-fetch)
16100 (uri (pypi-uri "gast" version))
16101 (sha256
bd300261 16102 (base32 "1w5dzdb3gpcfmd2s0b93d8gff40a1s41rv31458z14inb3s9v4zy"))))
2884aac0
RW
16103 (build-system python-build-system)
16104 (propagated-inputs
16105 `(("python-astunparse" ,python-astunparse)))
16106 (home-page "https://pypi.org/project/gast/")
16107 (synopsis "Generic Python AST that abstracts the underlying Python version")
16108 (description
16109 "GAST provides a compatibility layer between the AST of various Python
16110versions, as produced by @code{ast.parse} from the standard @code{ast}
16111module.")
16112 (license license:bsd-3)))
16113
44d10b1f
RW
16114(define-public python-wikidata
16115 (package
16116 (name "python-wikidata")
16117 (version "0.6.1")
16118 (source
16119 (origin
16120 (method url-fetch)
16121 (uri (pypi-uri "Wikidata" version))
16122 (sha256
16123 (base32
16124 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
16125 (build-system python-build-system)
16126 (propagated-inputs
16127 `(("python-babel" ,python-babel)))
16128 (home-page "https://github.com/dahlia/wikidata")
16129 (synopsis "Wikidata client library")
16130 (description
16131 "This package provides a Python interface to
16132@url{https://www.wikidata.org/, Wikidata}.")
16133 (properties '((upstream-name . "Wikidata")))
16134 (license license:gpl3+)))
16135
16136(define-public python-doctest-ignore-unicode
16137 (package
16138 (name "python-doctest-ignore-unicode")
16139 (version "0.1.2")
16140 (source
16141 (origin
16142 (method url-fetch)
16143 (uri (pypi-uri "doctest-ignore-unicode" version))
16144 (sha256
16145 (base32
16146 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
16147 (build-system python-build-system)
16148 (native-inputs
16149 `(("python-nose" ,python-nose)))
16150 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
16151 (synopsis "Ignore Unicode literal prefixes in doctests")
16152 (description
16153 "This package adds support for a flag to ignore Unicode literal prefixes
16154in doctests.")
16155 (license license:asl2.0)))
16156
16157(define-public python-attr
16158 (package
16159 (name "python-attr")
16160 (version "0.3.1")
16161 (source
16162 (origin
16163 (method url-fetch)
16164 (uri (pypi-uri "attr" version))
16165 (sha256
16166 (base32
16167 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
16168 (build-system python-build-system)
16169 (home-page "https://github.com/denis-ryzhkov/attr")
16170 (synopsis "Decorator for attributes of target function or class")
16171 (description "Simple decorator to set attributes of target function or
16172class in a @acronym{DRY, Don't Repeat Yourself} way.")
16173 (license license:expat)))
f98232a3
VC
16174
16175(define-public python-construct
16176 (package
16177 (name "python-construct")
16178 (version "2.9.45")
16179 (source
16180 (origin
16181 (method url-fetch)
16182 (uri (pypi-uri "construct" version))
16183 (sha256
16184 (base32
16185 "130iy05awzigm2xah2yvlmb08mac5bi4gzr5m3g7k1krs3ps0w92"))))
16186 (build-system python-build-system)
16187 (arguments
16188 `(#:tests? #f)) ; No tests exist.
16189 (propagated-inputs
16190 `(("python-extras" ,python-extras)
16191 ("python-arrow" ,python-arrow)
16192 ("python-numpy" ,python-numpy)
16193 ("python-ruamel.yaml" ,python-ruamel.yaml)))
16194 (home-page "http://construct.readthedocs.io")
16195 (synopsis "Declarative and symmetrical parser and builder for binary data")
16196 (description
16197 "This package provides both simple, atomic constructs (such as
16198integers of various sizes), as well as composite ones which allow you
16199form hierarchical and sequential structures of increasing complexity.
16200It features bit and byte granularity, easy debugging and testing, an
16201easy-to-extend subclass system, and lots of primitive constructs to
16202make your work easier.")
16203 (license license:expat)))
b742c006
LF
16204
16205(define-public python-humanize
16206 (package
16207 (name "python-humanize")
16208 (version "0.5.1")
16209 (source
16210 (origin
16211 (method url-fetch)
16212 (uri (pypi-uri "humanize" version))
16213 (sha256
16214 (base32
16215 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
16216 (arguments
16217 '(#:tests? #f)) ; tests not in pypi archive
16218 (build-system python-build-system)
16219 (home-page "https://github.com/jmoiron/humanize")
16220 (synopsis "Print numerical information in a human-readable form")
16221 (description "This package provides a Python module that displays numbers
16222and dates in \"human readable\" forms. For example, it would display
16223\"12345591313\" as \"12.3 billion\".")
16224 (license license:expat)))
d5bbf66d
LF
16225
16226(define-public python-txaio
16227 (package
16228 (name "python-txaio")
16229 (version "18.8.1")
16230 (source
16231 (origin
16232 (method url-fetch)
16233 (uri (pypi-uri "txaio" version))
16234 (sha256
16235 (base32
16236 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
16237 (build-system python-build-system)
16238 (propagated-inputs
16239 `(("python-twisted" ,python-twisted)
16240 ("python-six" ,python-six)))
16241 (home-page "https://github.com/crossbario/txaio")
16242 (synopsis "Compatibility layer between Python asyncio and Twisted")
16243 (description "Txaio provides a compatibility layer between the Python
16244@code{asyncio} module and @code{Twisted}.")
16245 (license license:expat)))
963dfd3a
RW
16246
16247(define-public python-toolshed
16248 (package
16249 (name "python-toolshed")
16250 (version "0.4.6")
16251 (source
16252 (origin
16253 (method url-fetch)
16254 (uri (pypi-uri "toolshed" version))
16255 (sha256
16256 (base32
16257 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
16258 (build-system python-build-system)
16259 (native-inputs
16260 `(("python-nose" ,python-nose)))
16261 (home-page "https://github.com/brentp/toolshed/")
16262 (synopsis "Collection of modules and functions for working with data")
16263 (description "This is a collection of well-tested, simple modules and
16264functions that aim to reduce boilerplate when working with data.")
16265 (license license:bsd-2)))
c91ecf2d
RW
16266
16267(define-public python-annoy
16268 (package
16269 (name "python-annoy")
16270 (version "1.15.1")
16271 (source
16272 (origin
16273 (method url-fetch)
16274 (uri (pypi-uri "annoy" version))
16275 (sha256
16276 (base32
16277 "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp"))))
16278 (build-system python-build-system)
16279 (native-inputs
16280 `(("python-nose" ,python-nose)))
16281 (home-page "https://github.com/spotify/annoy/")
16282 (synopsis "Approximate nearest neighbors library")
16283 (description
16284 "Annoy is a C++ library with Python bindings to search for points in
16285space that are close to a given query point. It also creates large read-only
16286file-based data structures that are @code{mmap}ped into memory so that many
16287processes may share the same data.")
16288 (license license:asl2.0)))
412342d1 16289
79bfa422 16290(define-public python-pylzma
412342d1 16291 (package
79bfa422
DM
16292 (name "python-pylzma")
16293 (version "0.5.0")
16294 (source
16295 (origin
16296 (method url-fetch)
16297 (uri (pypi-uri "pylzma" version))
16298 (sha256
16299 (base32
16300 "074anvhyjgsv2iby2ql1ixfvjgmhnvcwjbdz8gk70xzkzcm1fx5q"))))
412342d1 16301 (build-system python-build-system)
79bfa422
DM
16302 (home-page "http://www.joachim-bauch.de/projects/pylzma/")
16303 (synopsis "Python bindings for the LZMA library by Igor Pavlov.")
16304 (description "This package provides Python bindings for the LZMA library
16305by Igor Pavlov.")
16306 (license license:lgpl2.1+)))
16307
16308(define-public python2-pylzma
16309 (package-with-python2 python-pylzma))
f825e605 16310
6609ebe7
AG
16311(define-public python2-zeroconf
16312 (package
16313 (name "python2-zeroconf")
16314
16315 ;; This is the last version that supports Python 2.x.
16316 (version "0.19.1")
16317 (source
16318 (origin
16319 (method url-fetch)
16320 (uri (pypi-uri "zeroconf" version))
16321 (sha256
16322 (base32
16323 "0ykzg730n915qbrq9bn5pn06bv6rb5zawal4sqjyfnjjm66snkj3"))))
16324 (build-system python-build-system)
16325 (arguments
16326 `(#:python ,python-2
16327 #:phases
16328 (modify-phases %standard-phases
16329 (add-after 'unpack 'patch-requires
16330 (lambda* (#:key inputs #:allow-other-keys)
16331 (substitute* "setup.py"
16332 (("enum-compat")
16333 "enum34"))
16334 #t)))))
16335 (native-inputs
16336 `(("python2-six" ,python2-six)
16337 ("python2-enum32" ,python2-enum34)
16338 ("python2-netifaces" ,python2-netifaces)
16339 ("python2-typing" ,python2-typing)))
16340 (home-page "https://github.com/jstasiak/python-zeroconf")
16341 (synopsis "Pure Python mDNS service discovery")
16342 (description
16343 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
16344compatible).")
16345 (license license:lgpl2.1+)))
16346
f825e605
GLV
16347(define-public python-bsddb3
16348 (package
16349 (name "python-bsddb3")
16350 (version "6.2.6")
16351 (source
16352 (origin
16353 (method url-fetch)
16354 (uri (pypi-uri "bsddb3" version))
16355 (sha256
16356 (base32
16357 "019db2y6bfmiqbrgg9x9f6h72qjmqh05czdn2v5sy9bl0gs23mj2"))))
16358 (build-system python-build-system)
16359 (inputs
16360 `(("bdb" ,bdb)))
16361 (arguments
16362 '(#:phases
16363 (modify-phases %standard-phases
16364 (add-after 'unpack 'configure-locations
16365 (lambda* (#:key inputs #:allow-other-keys)
16366 (setenv "BERKELEYDB_DIR" (assoc-ref inputs "bdb"))
16367 (setenv "YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION" "1")
16368 #t))
16369 (replace 'check
16370 (lambda _
16371 (invoke "python3" "test3.py" "-v"))))))
16372 (home-page "https://www.jcea.es/programacion/pybsddb.htm")
16373 (synopsis "Python bindings for Oracle Berkeley DB")
16374 (description
16375 "This module provides a nearly complete wrapping of the Oracle/Sleepycat
16376C API for the Database Environment, Database, Cursor, Log Cursor, Sequence and
16377Transaction objects, and each of these is exposed as a Python type in the
16378bsddb3.db module. The database objects can use various access methods: btree,
16379hash, recno, and queue. Complete support of Berkeley DB distributed
16380transactions. Complete support for Berkeley DB Replication Manager.
16381Complete support for Berkeley DB Base Replication. Support for RPC.")
16382 (license license:bsd-3)))
edeb04bf
PL
16383
16384(define-public python-dbfread
16385 (package
16386 (name "python-dbfread")
16387 (version "2.0.7")
16388 (source (origin
16389 (method url-fetch)
16390 (uri (pypi-uri "dbfread" version))
16391 (sha256
16392 (base32
16393 "0gdpwdzf1fngsi6jrdyj4qdf6cr7gnnr3zp80dpkzbgz0spskj07"))))
16394 (build-system python-build-system)
16395 (native-inputs
16396 `(("python-pytest" ,python-pytest)))
16397 (home-page "https://dbfread.readthedocs.io")
16398 (synopsis "Read DBF Files with Python")
16399 (description
16400 "This library reads DBF files and returns the data as native Python data
16401types for further processing. It is primarily intended for batch jobs and
16402one-off scripts.")
16403 (license license:expat)))
e308b4f0
JM
16404
16405(define-public python-cached-property
16406 (package
16407 (name "python-cached-property")
16408 (version "1.5.1")
16409 (source
16410 (origin
16411 (method url-fetch)
16412 (uri (pypi-uri "cached-property" version))
16413 (sha256
16414 (base32
16415 "010m1bl380l2r3vwq24r5v14l6gwvgm9v0mqqjkjss552jgsa5wj"))))
16416 (build-system python-build-system)
16417 (arguments
16418 `(#:phases
16419 (modify-phases %standard-phases
16420 ;; https://github.com/pydanny/cached-property/issues/131
16421 ;; recent versions of freezegun break one test
16422 (add-after 'unpack 'disable-broken-test
16423 (lambda _
16424 (substitute* "tests/test_cached_property.py"
16425 (("def test_threads_ttl_expiry\\(self\\)" m)
16426 (string-append "@unittest.skip(\"Disabled by Guix\")\n"
16427 " " m)))
16428 #t)))))
16429 (native-inputs
16430 `(("python-freezegun" ,python-freezegun)))
16431 (home-page
16432 "https://github.com/pydanny/cached-property")
16433 (synopsis
16434 "Decorator for caching properties in classes")
16435 (description
16436 "This package provides a decorator which makes caching
16437time-or-computationally-expensive properties quick and easy and works in Python
164382 or 3.")
16439 (license license:bsd-3)))
dfe8a704
NG
16440
16441(define-public python-folium
16442 (package
16443 (name "python-folium")
16444 (version "0.10.0")
16445 (source
16446 (origin
16447 (method url-fetch)
16448 (uri (pypi-uri "folium" version))
16449 (sha256
16450 (base32
16451 "18fzxijsgrb95r0a8anc9ba5ijyw3nlnv3rpavfbkqa5v878x84f"))))
16452 (build-system python-build-system)
16453 (propagated-inputs
16454 `(("python-branca" ,python-branca)
16455 ("python-jinja2" ,python-jinja2)
16456 ("python-numpy" ,python-numpy)
16457 ("python-requests" ,python-requests)))
16458 (native-inputs
16459 `(("python-pytest" ,python-pytest)))
16460 (home-page "https://github.com/python-visualization/folium")
16461 (synopsis "Make beautiful maps with Leaflet.js & Python")
16462 (description "@code{folium} makes it easy to visualize data that’s been
16463manipulated in Python on an interactive leaflet map. It enables both the
16464binding of data to a map for @code{choropleth} visualizations as well as
16465passing rich vector/raster/HTML visualizations as markers on the map.
16466
16467The library has a number of built-in tilesets from OpenStreetMap, Mapbox, and
16468Stamen, and supports custom tilesets with Mapbox or Cloudmade API keys. It
16469supports Image, Video, GeoJSON and TopoJSON overlays.")
16470 (license license:expat)))
9dd5f475
LC
16471
16472(define-public jube
16473 (package
16474 ;; This is a command-line tool, so no "python-" prefix.
16475 (name "jube")
16476 (version "2.2.2")
16477 (source (origin
16478 (method url-fetch)
16479 (uri (string-append
16480 "http://apps.fz-juelich.de/jsc/jube/jube2/download.php?version="
16481 version))
16482 (sha256
16483 (base32
16484 "0xq4k1q63s1p6swgyp61vahlrd1fqmgbm0gm5kpj8ikwy0yc0nqk"))
16485 (file-name (string-append "jube-" version ".tar.gz"))))
16486 (build-system python-build-system)
16487 (home-page "https://apps.fz-juelich.de/jsc/jube/jube2/docu/index.html")
16488 (synopsis "Benchmarking environment")
16489 (description
16490 "JUBE helps perform and analyze benchmarks in a systematic way. For each
16491benchmarked application, benchmark data is stored in a format that allows JUBE
16492to deduct the desired information. This data can be parsed by automatic pre-
16493and post-processing scripts that draw information and store it more densely
16494for manual interpretation.")
a9f33960 16495 (license license:gpl3+)))
66436424
NG
16496
16497(define-public python-pyroutelib3
16498 (package
16499 (name "python-pyroutelib3")
16500 (version "1.3.post1")
16501 (source
16502 (origin
16503 (method url-fetch)
16504 (uri (pypi-uri "pyroutelib3" version))
16505 (sha256
16506 (base32
16507 "1hpbydpn2alyswiajfbvhzq4c7f36vdmvxy91hgv8l1lb2g2vfrj"))))
16508 (build-system python-build-system)
16509 (propagated-inputs
16510 `(("python-dateutil" ,python-dateutil)))
16511 (home-page "https://github.com/MKuranowski/pyroutelib3")
16512 (synopsis "Library for simple routing on OSM data")
16513 (description "Library for simple routing on OSM data")
16514 (license license:gpl3+)))
30e7c03a
GL
16515
16516(define-public python-elementpath
16517 (package
16518 (name "python-elementpath")
16519 (version "1.2.0")
16520 (source
16521 (origin
16522 (method url-fetch)
16523 (uri (pypi-uri "elementpath" version))
16524 (sha256
16525 (base32
16526 "1syn2z543brab23dskh3fjd9pqvz6npqbcicrs2d88dbg26xl08p"))))
16527 (build-system python-build-system)
16528 (home-page
16529 "https://github.com/sissaschool/elementpath")
16530 (synopsis
16531 "XPath 1.0/2.0 parsers and selectors for ElementTree and lxml")
16532 (description
16533 "The proposal of this package is to provide XPath 1.0 and 2.0 selectors
16534for Python's ElementTree XML data structures, both for the standard
16535ElementTree library and for the @uref{http://lxml.de, lxml.etree} library.
16536
16537For lxml.etree this package can be useful for providing XPath 2.0 selectors,
16538because lxml.etree already has it's own implementation of XPath 1.0.")
16539 (license license:expat)))
c1bbef69
16540
16541(define-public python-bibtexparser
16542 (package
16543 (name "python-bibtexparser")
16544 (version "1.1.0")
16545 (source
16546 (origin
16547 (method url-fetch)
16548 (uri (pypi-uri "bibtexparser" version))
16549 (sha256
16550 (base32
16551 "0zwhfkrzf3n5847dbnfng92k7ak199l9v6x6ax3dgdidfpm6d2fz"))))
16552 (build-system python-build-system)
16553 (propagated-inputs
16554 `(("python-pyparsing" ,python-pyparsing)))
16555 (native-inputs
16556 `(("python-future" ,python-future)))
16557 (home-page "https://github.com/sciunto-org/python-bibtexparser")
16558 (synopsis "Python library to parse BibTeX files")
16559 (description "BibtexParser is a Python library to parse BibTeX files.")
16560 (license (list license:bsd-3 license:lgpl3))))
8581b40d
HG
16561
16562(define-public python-distro
16563 (package
16564 (name "python-distro")
16565 (version "1.4.0")
16566 (source
16567 (origin
16568 (method url-fetch)
16569 (uri (pypi-uri "distro" version))
16570 (sha256
16571 (base32
16572 "0mrg75w4ap7mdzyga75yaid9n8bgb345ih5mwjp3plj6v1jxwb9n"))))
16573 (build-system python-build-system)
16574 (native-inputs
16575 `(("python-pytest" ,python-pytest)))
16576 (home-page "https://github.com/nir0s/distro")
16577 (synopsis
16578 "OS platform information API")
16579 (description
16580 "@code{distro} provides information about the OS distribution it runs on,
16581such as a reliable machine-readable ID, or version information.
16582
16583It is the recommended replacement for Python's original
16584`platform.linux_distribution` function (which will be removed in Python 3.8).
16585@code{distro} also provides a command-line interface to output the platform
16586information in various formats.")
16587 (license license:asl2.0)))