gnu: python-scipy: Move to (gnu packages python-science).
[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>
a0b2accf 41;;; Copyright © 2017, 2018, 2019 Mathieu Othacehe <m.othacehe@gmail.com>
44d10b1f
RW
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 55;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
85cfb0e9 56;;; Copyright © 2018, 2019 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 130 #:use-module (gnu packages python-crypto)
ca7c3653 131 #:use-module (gnu packages python-science)
44d10b1f
RW
132 #:use-module (gnu packages python-web)
133 #:use-module (gnu packages qt)
134 #:use-module (gnu packages readline)
135 #:use-module (gnu packages sdl)
136 #:use-module (gnu packages search)
137 #:use-module (gnu packages shells)
9d0c291e 138 #:use-module (gnu packages sphinx)
44d10b1f
RW
139 #:use-module (gnu packages ssh)
140 #:use-module (gnu packages terminals)
141 #:use-module (gnu packages tex)
142 #:use-module (gnu packages texinfo)
143 #:use-module (gnu packages time)
144 #:use-module (gnu packages tls)
145 #:use-module (gnu packages version-control)
146 #:use-module (gnu packages video)
147 #:use-module (gnu packages web)
148 #:use-module (gnu packages base)
149 #:use-module (gnu packages xml)
150 #:use-module (gnu packages xorg)
151 #:use-module (gnu packages xdisorg)
152 #:use-module (gnu packages tcl)
153 #:use-module (gnu packages bdw-gc)
f98232a3 154 #:use-module (gnu packages serialization)
44d10b1f
RW
155 #:use-module (guix packages)
156 #:use-module (guix download)
157 #:use-module (guix git-download)
a042d348 158 #:use-module (guix hg-download)
44d10b1f
RW
159 #:use-module (guix utils)
160 #:use-module (guix build-system gnu)
161 #:use-module (guix build-system cmake)
162 #:use-module (guix build-system python)
163 #:use-module (guix build-system trivial)
164 #:use-module (srfi srfi-1)
165 #:use-module (srfi srfi-26))
166
167(define-public python-psutil
168 (package
169 (name "python-psutil")
e9119ac1 170 (version "5.6.5")
44d10b1f
RW
171 (source
172 (origin
173 (method url-fetch)
174 (uri (pypi-uri "psutil" version))
175 (sha256
e9119ac1 176 (base32 "0isil5jxwwd8awz54qk28rpgjg43i5l6yl70g40vxwa4r4m56lfh"))))
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")
da107cf5 552 (version "1.0.4.2")
d362b11d
RW
553 (source
554 (origin
555 (method url-fetch)
556 (uri (pypi-uri "cftime" version))
557 (sha256
da107cf5 558 (base32 "0w0gi6jnch38hiygl62j4xkcirv4y3dcwrvxl9p7bsk6j27lzihs"))))
d362b11d
RW
559 (build-system python-build-system)
560 (propagated-inputs
561 `(("python-numpy" ,python-numpy)))
562 (native-inputs
563 `(("python-coveralls" ,python-coveralls)
564 ("python-cython" ,python-cython)
565 ("python-pytest-cov" ,python-pytest-cov)))
566 (home-page "https://github.com/Unidata/cftime")
567 (synopsis "Library for time handling")
568 (description
569 "This package provides time-handling functionality that used to be part
570of the netcdf4 package before.")
571 ;; This package claims to include code under the GPLv3 but is released
572 ;; under ISC.
573 (license (list license:isc license:gpl3+))))
574
44d10b1f
RW
575(define-public python-netcdf4
576 (package
577 (name "python-netcdf4")
93e7b209 578 (version "1.4.2")
44d10b1f
RW
579 (source
580 (origin
581 (method url-fetch)
582 (uri (pypi-uri "netCDF4" version))
583 (sha256
584 (base32
93e7b209 585 "0c0sklgrmv15ygliin8qq0hp7vanmbi74m6zpi0r1ksr0hssyd5r"))))
44d10b1f 586 (build-system python-build-system)
93e7b209
RW
587 (arguments
588 '(#:phases
589 (modify-phases %standard-phases
590 (add-after 'unpack 'configure-locations
591 (lambda* (#:key inputs #:allow-other-keys)
592 (setenv "HDF5_DIR" (assoc-ref inputs "hdf5"))
593 #t)))))
44d10b1f
RW
594 (native-inputs
595 `(("python-cython" ,python-cython)))
596 (propagated-inputs
93e7b209
RW
597 `(("python-numpy" ,python-numpy)
598 ("python-cftime" ,python-cftime)))
44d10b1f
RW
599 (inputs
600 `(("netcdf" ,netcdf)
601 ("hdf4" ,hdf4)
602 ("hdf5" ,hdf5)))
93e7b209 603 (home-page "https://github.com/Unidata/netcdf4-python")
44d10b1f
RW
604 (synopsis "Python/numpy interface to the netCDF library")
605 (description "Netcdf4-python is a Python interface to the netCDF C
606library. netCDF version 4 has many features not found in earlier
607versions of the library and is implemented on top of HDF5. This module
608can read and write files in both the new netCDF 4 and the old netCDF 3
609format, and can create files that are readable by HDF5 clients. The
610API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
611to users of that module.")
612 ;; The software is mainly ISC, but includes some files covered
613 ;; by the Expat license.
614 (license (list license:isc license:expat))))
615
616(define-public python2-netcdf4
617 (package-with-python2 python-netcdf4))
618
d6803445
TGR
619(define-public python-license-expression
620 (package
621 (name "python-license-expression")
622 (version "0.999")
623 (source
624 (origin
625 (method url-fetch)
626 (uri (pypi-uri "license-expression" version))
627 (sha256
628 (base32 "08ppb0bxbrsxazy88sgpl9yffvdsabw6dkk1nc332wcz2mphwwyf"))))
629 (build-system python-build-system)
630 (propagated-inputs
631 `(("python-boolean.py" ,python-boolean.py)))
632 (home-page "https://github.com/nexB/license-expression")
633 (synopsis "Apply boolean logic to license expressions")
634 (description
635 "This Python module defines a tiny language to evaluate and compare
636license expressions using boolean logic. Logical combinations of licenses can
637be tested for equality, containment, and equivalence. They can be normalised
638and simplified. It supports SPDX license expressions as well as other naming
639conventions and aliases in the same expression.")
640 (license license:gpl2+)))
641
44d10b1f
RW
642(define-public python-lockfile
643 (package
644 (name "python-lockfile")
645 (version "0.12.2")
646 (source
647 (origin
648 (method url-fetch)
8318bf07 649 (uri (pypi-uri "lockfile" version))
44d10b1f
RW
650 (sha256
651 (base32
652 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
653 (build-system python-build-system)
654 (arguments '(#:test-target "check"))
655 (native-inputs
656 `(("python-pbr" ,python-pbr)))
657 (home-page "https://launchpad.net/pylockfile")
658 (synopsis "Platform-independent file locking module")
659 (description
660 "The lockfile package exports a LockFile class which provides a simple
661API for locking files.")
662 (license license:expat)))
663
664(define-public python2-lockfile
665 (package-with-python2 python-lockfile))
666
667(define-public python-semantic-version
668 (package
669 (name "python-semantic-version")
670 (version "2.6.0")
671 (source
672 (origin
673 (method url-fetch)
674 (uri (pypi-uri "semantic_version" version))
675 (sha256
676 (base32
677 "1h2l9xyg1zzsda6kjcmfcgycbvrafwci283vcr1v5sbk01l2hhra"))))
678 (build-system python-build-system)
679 (arguments
680 `(#:tests? #f)) ; PyPI tarball lacks tests
681 (home-page "https://github.com/rbarrois/python-semanticversion")
682 (synopsis "Semantic versioning module for Python")
683 (description
684 "The @code{semantic_version} class is a small library for handling
685@uref{https://semver.org/, semantic versioning} (@dfn{SemVer}) in Python.
686
687It can compare versions, generate a new version that represents a bump in one of
688the version levels, and check whether any given string is a proper semantic
689version identifier.")
690 (license license:bsd-3)))
691
692(define-public python2-semantic-version
693 (package-with-python2 python-semantic-version))
694
695(define-public python-serpent
696 (package
697 (name "python-serpent")
fa9d14ac 698 (version "1.28")
44d10b1f
RW
699 (source
700 (origin
701 (method url-fetch)
702 (uri (pypi-uri "serpent" version))
703 (sha256
fa9d14ac 704 (base32 "1arnckykpkvv2qrp49l1k7q5mr5pisswl0rvdx98x8wsl1n361pk"))))
44d10b1f 705 (build-system python-build-system)
fa9d14ac
TGR
706 (native-inputs
707 `(("python-attrs" ,python-attrs)
708 ("python-pytz" ,python-pytz)))
44d10b1f
RW
709 (home-page "https://github.com/irmen/Serpent")
710 (synopsis "Serializer for literal Python expressions")
711 (description
1d3c7803
TGR
712 "Serpent provides @code{ast.literal_eval()}-compatible object tree
713serialization. It serializes an object tree into bytes (an utf-8 encoded
714string) that can be decoded and then passed as-is to @code{ast.literal_eval()}
715to rebuild the original object tree.
716
717Because only safe literals are encoded, it is safe to send serpent data to
718other machines, such as over the network.")
44d10b1f
RW
719 (license license:expat)))
720
721(define-public python-setuptools
722 (package
723 (name "python-setuptools")
e39d4933 724 (version "41.0.1")
44d10b1f
RW
725 (source
726 (origin
727 (method url-fetch)
728 (uri (pypi-uri "setuptools" version ".zip"))
729 (sha256
730 (base32
e39d4933 731 "04sns22y2hhsrwfy1mha2lgslvpjsjsz8xws7h2rh5a7ylkd28m2"))
44d10b1f
RW
732 (modules '((guix build utils)))
733 (snippet
734 '(begin
735 ;; Remove included binaries which are used to build self-extracting
736 ;; installers for Windows.
737 ;; TODO: Find some way to build them ourself so we can include them.
738 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
739 #t))))
740 (build-system python-build-system)
741 ;; FIXME: Tests require pytest, which itself relies on setuptools.
742 ;; One could bootstrap with an internal untested setuptools.
743 (arguments
744 `(#:tests? #f))
745 (home-page "https://pypi.python.org/pypi/setuptools")
746 (synopsis
747 "Library designed to facilitate packaging Python projects")
748 (description
749 "Setuptools is a fully-featured, stable library designed to facilitate
750packaging Python projects, where packaging includes:
751Python package and module definitions,
752distribution package metadata,
753test hooks,
754project installation,
755platform-specific details,
756Python 3 support.")
757 ;; TODO: setuptools now bundles the following libraries:
758 ;; packaging, pyparsing, six and appdirs. How to unbundle?
759 (license (list license:psfl ; setuptools itself
760 license:expat ; six, appdirs, pyparsing
761 license:asl2.0 ; packaging is dual ASL2/BSD-2
762 license:bsd-2))))
763
764(define-public python2-setuptools
765 (package-with-python2 python-setuptools))
766
0fdec2a3
MB
767;; The setuptools provided by Python 3.7.4 is too new for Tensorflow.
768(define-public python-setuptools-for-tensorflow
769 (hidden-package
770 (package
771 (inherit python-setuptools)
772 (version "39.1.0")
773 (source (origin
774 (inherit (package-source python-setuptools))
775 (uri (pypi-uri "setuptools" version ".zip"))
776 (sha256
777 (base32
778 "1mzdhvfhnv4lggxa8rjl0dzqxvfx377gg5sqs57v89wrp09lwj65")))))))
779
44d10b1f
RW
780(define-public python-uniseg
781 (package
782 (name "python-uniseg")
783 (version "0.7.1")
784 (source
785 (origin
786 (method url-fetch)
787 (uri (pypi-uri "uniseg" version ".zip"))
788 (sha256
789 (base32
790 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
791 (build-system python-build-system)
792 (arguments
793 '(#:tests? #f)) ; The test suite requires network access.
794 (native-inputs
795 `(("unzip" ,unzip)))
796 (home-page
797 "https://bitbucket.org/emptypage/uniseg-python")
798 (synopsis
799 "Python library to determine Unicode text segmentations")
800 (description
801 "Uniseg is a Python package used to determine Unicode text segmentations.
802Supported segmentations include:
803@enumerate
804@item @dfn{Code point} (any value in the Unicode codespace)
805@item @dfn{Grapheme cluster} (user-perceived character made of a single or
806multiple Unicode code points, e.g. \"G\" + acute-accent)
807@item Word break
808@item Sentence break
809@item Line break
810@end enumerate")
811 (license license:expat)))
812
813(define-public python2-uniseg
814 (package-with-python2 python-uniseg))
815
816(define-public python-humanfriendly
817 (package
818 (name "python-humanfriendly")
819 (version "4.4.1")
820 (source
821 (origin
822 (method url-fetch)
823 (uri (pypi-uri "humanfriendly" version))
824 (sha256
825 (base32
826 "0pisgizjql86785jchfjv217g0lsgk114g2lja5j4y3lsc3b9szi"))))
827 (build-system python-build-system)
828 (arguments
829 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
830 #:tests? #f))
831 (propagated-inputs
832 `(("python-monotonic" ,python-monotonic)))
833 (home-page "https://humanfriendly.readthedocs.io")
834 (synopsis "Human-friendly input and output in Python")
835 (description
836 "The functions and classes in @code{humanfriendly} can be used to make
837text interfaces more user-friendly. It includes tools to parse and format
838numbers, file sizes, and timespans, timers for long-running operations, menus
839to allow the user to choose from a list of options, and terminal interaction
840helpers.")
841 (license license:expat)))
842
843(define-public python2-humanfriendly
844 (package-with-python2 python-humanfriendly))
845
846(define-public python-capturer
847 (package
848 (name "python-capturer")
849 (version "2.4")
850 (source
851 (origin
852 (method url-fetch)
853 (uri (pypi-uri "capturer" version))
854 (sha256
855 (base32
856 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
857 (build-system python-build-system)
858 (arguments
859 `(#:tests? #f))
860 (propagated-inputs
861 `(("python-humanfriendly" ,python-humanfriendly)))
862 (home-page "https://capturer.readthedocs.io")
863 (synopsis "Capture stdout and stderr streams of the current process")
864 (description
865 "The capturer package makes it easy to capture the stdout and stderr
866streams of the current process and subprocesses. Output can be relayed
867to the terminal in real time but is also available to the Python program
868for additional processing.")
869 (license license:expat)))
870
871(define-public python2-capturer
872 (package-with-python2 python-capturer))
873
874(define-public python-case
875 (package
876 (name "python-case")
877 (version "1.5.3")
878 (source
879 (origin
880 (method url-fetch)
881 (uri (pypi-uri "case" version))
882 (sha256
883 (base32
884 "1cagg06vfph864s6l5jb0zqliwxh647bki8j6lf4a4qrv40jnhs8"))))
885 (build-system python-build-system)
886 (propagated-inputs
887 `(("python-mock" ,python-mock)
888 ("python-nose" ,python-nose)
889 ("python-six" ,python-six)
890 ("python-unittest2" ,python-unittest2)))
891 (native-inputs
892 `(("python-coverage" ,python-coverage)))
893 (home-page "https://github.com/celery/case")
894 (synopsis "Unittest utilities and convenience methods")
895 (description
896 "The @code{case} package provides utilities on top of unittest, including
897some helpful Python 2 compatibility convenience methods.")
898 (license license:bsd-3)))
899
900(define-public python-verboselogs
901 (package
902 (name "python-verboselogs")
903 (version "1.7")
904 (source
905 (origin
906 (method url-fetch)
907 (uri (pypi-uri "verboselogs" version))
908 (sha256
909 (base32
910 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
911 (build-system python-build-system)
1760c970
MO
912 (arguments
913 `(#:phases
914 (modify-phases %standard-phases
915 (replace 'check
916 (lambda _
917 ;; Do not run pylint plugin test, as astroid is an old
918 ;; unsupported version.
919 (invoke "pytest" "-v" "-k" "not test_pylint_plugin"
920 "verboselogs/tests.py"))))))
44d10b1f
RW
921 (native-inputs
922 `(("python-mock" ,python-mock)
1760c970 923 ("python-pytest" ,python-pytest)))
44d10b1f
RW
924 (home-page "https://verboselogs.readthedocs.io")
925 (synopsis "Verbose logging level for Python's logging module")
926 (description
927 "The @code{verboselogs} package extends Python's @code{logging} module to
928add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
929 (license license:expat)))
930
931(define-public python2-verboselogs
932 (package-with-python2 python-verboselogs))
933
934(define-public python-coloredlogs
935 (package
936 (name "python-coloredlogs")
b2b8a39c 937 (version "10.0")
44d10b1f
RW
938 (source
939 (origin
940 (method url-fetch)
941 (uri (pypi-uri "coloredlogs" version))
942 (sha256
943 (base32
b2b8a39c 944 "0dkw6xp0r1dwgz4s2f58npx5nxfq51wf4l6qkm5ib27slgfs4sdq"))))
44d10b1f
RW
945 (build-system python-build-system)
946 (arguments
947 `(;Tests require some updated modules
948 #:tests? #f))
949 (propagated-inputs
950 `(("python-capturer" ,python-capturer)))
951 (home-page "https://coloredlogs.readthedocs.io")
952 (synopsis "Colored stream handler for Python's logging module")
953 (description
954 "The @code{coloredlogs} package enables colored terminal output for
955Python's logging module. The @code{ColoredFormatter} class inherits from
956@code{logging.Formatter} and uses ANSI escape sequences to render your logging
957messages in color.")
958 (license license:expat)))
959
960(define-public python2-coloredlogs
961 (package-with-python2 python-coloredlogs))
962
af760990
VC
963(define-public python-editorconfig
964 (package
965 (name "python-editorconfig")
966 (version "0.12.2")
967 (source
968 (origin
969 (method url-fetch)
970 (uri (pypi-uri "EditorConfig" version))
971 (sha256
972 (base32
973 "0v55z351p9qkyp3bbspwywwn28sbcknhirngjbj779n3z52z63hv"))))
974 (build-system python-build-system)
975 (home-page "https://editorconfig.org/")
976 (synopsis "EditorConfig bindings for python")
977 (description "The EditorConfig project consists of a file format for
978defining coding styles and a collection of text editor plugins that enable
979editors to read the file format and adhere to defined styles. EditorConfig
980files are easily readable and they work nicely with version control systems.")
981 ;; "fnmatch.py" and "ini.py" are licensed under psfl, the rest is bsd-2.
982 (license (list license:bsd-2 license:psfl))))
983
4caf37b0
MC
984(define-public python-et-xmlfile
985 (package
986 (name "python-et-xmlfile")
987 (version "1.0.1")
988 (source
989 (origin
990 (method url-fetch)
991 (uri (pypi-uri "et_xmlfile" version))
992 (sha256
993 (base32
994 "0nrkhcb6jdrlb6pwkvd4rycw34y3s931hjf409ij9xkjsli9fkb1"))))
995 (build-system python-build-system)
996 (arguments
997 `(#:phases (modify-phases %standard-phases
998 (replace 'check
999 (lambda _
1000 (invoke "pytest"))))))
1001 (native-inputs
1002 `(("python-pytest" ,python-pytest)
1003 ("python-lxml" ,python-lxml))) ;used for the tests
1004 (home-page "https://bitbucket.org/openpyxl/et_xmlfile")
1005 (synopsis "Low memory implementation of @code{lxml.xmlfile}")
1006 (description "This Python library is based upon the @code{xmlfile} module
1007from @code{lxml}. It aims to provide a low memory, compatible implementation
1008of @code{xmlfile}.")
1009 (license license:expat)))
1010
1011(define-public python2-et-xmlfile
1012 (package-with-python2 python-et-xmlfile))
1013
a042d348
MC
1014(define-public python-openpyxl
1015 (package
1016 (name "python-openpyxl")
441e6d93 1017 (version "2.6.2")
a042d348
MC
1018 (source
1019 (origin
1020 ;; We use the upstream repository, as the tests are not included in the
1021 ;; PyPI releases.
1022 (method hg-fetch)
1023 (uri (hg-reference
1024 (url "https://bitbucket.org/openpyxl/openpyxl")
1025 (changeset version)))
1026 (file-name (string-append name "-" version "-checkout"))
1027 (sha256
441e6d93 1028 (base32 "1qhij6kcvdxqjy4g6193nsv4q7fy8n4fwyd3c2z047idlm6s3j4w"))))
a042d348
MC
1029 (build-system python-build-system)
1030 (arguments
1031 `(#:phases (modify-phases %standard-phases
1032 (replace 'check
1033 (lambda _
1034 (invoke "pytest"))))))
1035 (native-inputs
1036 ;; For the test suite.
1037 `(("python-lxml" ,python-lxml)
1038 ("python-pillow" ,python-pillow)
1039 ("python-pytest" ,python-pytest)))
1040 (propagated-inputs
1041 `(("python-et-xmlfile" ,python-et-xmlfile)
1042 ("python-jdcal" ,python-jdcal)))
1043 (home-page "https://openpyxl.readthedocs.io")
1044 (synopsis "Python library to read/write Excel 2010 XLSX/XLSM files")
1045 (description "This Python library allows reading and writing to the Excel XLSX, XLSM,
1046XLTX and XLTM file formats that are defined by the Office Open XML (OOXML)
1047standard.")
1048 (license license:expat)))
1049
44d10b1f
RW
1050(define-public python-eventlet
1051 (package
1052 (name "python-eventlet")
1053 (version "0.20.1")
1054 (source
1055 (origin
1056 (method url-fetch)
1057 (uri (pypi-uri "eventlet" version))
1058 (sha256
1059 (base32
1060 "0f3q55mq4n021wb7qa53pz3ix6i2py64sap66vsaqm2scjw83m9s"))))
1061 (build-system python-build-system)
1062 (propagated-inputs
1063 `(("python-greenlet" ,python-greenlet)))
1064 (arguments
1065 ;; TODO: Requires unpackaged 'enum-compat'.
1066 '(#:tests? #f))
1067 (home-page "http://eventlet.net")
1068 (synopsis "Concurrent networking library for Python")
1069 (description
1070 "Eventlet is a concurrent networking library for Python that
1071allows you to change how you run your code, not how you write it.
1072It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
1073Coroutines ensure that the developer uses a blocking style of programming
1074that is similar to threading, but provide the benefits of non-blocking I/O.
1075The event dispatch is implicit, which means you can easily use @code{Eventlet}
1076from the Python interpreter, or as a small part of a larger application.")
1077 (license license:expat)))
1078
1079(define-public python2-eventlet
1080 (let ((base (package-with-python2
1081 (strip-python2-variant python-eventlet))))
1082 (package (inherit base)
1083 (propagated-inputs
1084 `(("python2-enum34" ,python2-enum34)
1085 ,@(package-propagated-inputs base))))))
1086
1087(define-public python-six
1088 (package
1089 (name "python-six")
6c58a06e 1090 (version "1.12.0")
44d10b1f
RW
1091 (source
1092 (origin
1093 (method url-fetch)
1094 (uri (pypi-uri "six" version))
1095 (sha256
1096 (base32
6c58a06e 1097 "0wxs1q74v07ssjywbbm7x6h5v9qx209ld2yfsif4060sxi0h2sni"))))
44d10b1f
RW
1098 (build-system python-build-system)
1099 (arguments
1100 `(#:phases
1101 (modify-phases %standard-phases
1102 (replace 'check
1103 (lambda _
1104 (invoke "py.test" "-v"))))))
1105 (native-inputs
1106 `(("python-py" ,python-py)
1107 ("python-pytest" ,python-pytest-bootstrap)))
1108 (home-page "https://pypi.python.org/pypi/six/")
1109 (synopsis "Python 2 and 3 compatibility utilities")
1110 (description
1111 "Six is a Python 2 and 3 compatibility library. It provides utility
1112functions for smoothing over the differences between the Python versions with
1113the goal of writing Python code that is compatible on both Python versions.
1114Six supports every Python version since 2.5. It is contained in only one
1115Python file, so it can be easily copied into your project.")
1116 (license license:x11)))
1117
1118(define-public python2-six
1119 (package-with-python2 python-six))
1120
1121(define-public python-six-bootstrap
1122 (package
1123 (inherit python-six)
1124 (name "python-six-bootstrap")
1125 (native-inputs `())
1126 (arguments `(#:tests? #f))))
1127
1128(define-public python2-six-bootstrap
1129 (package-with-python2 python-six-bootstrap))
1130
1131(define-public python-schedule
1132 (package
1133 (name "python-schedule")
1134 (version "0.4.3")
1135 (source
1136 (origin
1137 (method url-fetch)
1138 (uri (pypi-uri "schedule" version))
1139 (sha256
1140 (base32
1141 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
1142 (build-system python-build-system)
1143 (native-inputs
1144 `(("python-pytest" ,python-pytest)
1145 ("python-mock" ,python-mock)))
1146 (home-page "https://github.com/dbader/schedule")
1147 (synopsis "Schedule periodic function calls in Python")
1148 (description
1149 "Schedule is an in-process scheduler for periodic jobs that uses the
1150builder pattern for configuration. Schedule lets you run Python functions (or
1151any other callable) periodically at pre-determined intervals using a simple,
1152human-friendly syntax.")
1153 (license license:expat)))
1154
1155(define-public python2-schedule
1156 (package-with-python2 python-schedule))
1157
1158(define-public python-pandas
1159 (package
1160 (name "python-pandas")
7a97a26d 1161 (version "0.25.2")
44d10b1f
RW
1162 (source
1163 (origin
1164 (method url-fetch)
1165 (uri (pypi-uri "pandas" version))
1166 (sha256
7a97a26d 1167 (base32 "1gp2pvzdiakvgjmykdzdlzrsfbg4vjm49jjdl9s0ha0a3yfs34fa"))))
44d10b1f
RW
1168 (build-system python-build-system)
1169 (arguments
1170 `(#:modules ((guix build utils)
1171 (guix build python-build-system)
1172 (ice-9 ftw)
1173 (srfi srfi-26))
1174 #:phases (modify-phases %standard-phases
c0d43f62
MC
1175 (add-after 'unpack 'patch-which
1176 (lambda* (#:key inputs #:allow-other-keys)
1177 (let ((which (assoc-ref inputs "which")))
1178 (substitute* "pandas/io/clipboard/__init__.py"
1179 (("^CHECK_CMD = .*")
1180 (string-append "CHECK_CMD = \"" which "\"\n"))))
1181 #t))
44d10b1f
RW
1182 (replace 'check
1183 (lambda _
1184 (let ((build-directory
1185 (string-append
1186 (getcwd) "/build/"
1187 (car (scandir "build"
1188 (cut string-prefix? "lib." <>))))))
1189 ;; Disable the "strict data files" option which causes
c0d43f62
MC
1190 ;; the build to error out if required data files are
1191 ;; not available (as is the case with PyPI archives).
44d10b1f
RW
1192 (substitute* "setup.cfg"
1193 (("addopts = --strict-data-files") "addopts = "))
1194 (with-directory-excursion build-directory
c0d43f62
MC
1195 ;; Delete tests that require "moto" which is not yet
1196 ;; in Guix.
44d10b1f
RW
1197 (for-each delete-file
1198 '("pandas/tests/io/conftest.py"
1199 "pandas/tests/io/json/test_compression.py"
1200 "pandas/tests/io/parser/test_network.py"
44d10b1f
RW
1201 "pandas/tests/io/test_parquet.py"))
1202 (invoke "pytest" "-vv" "pandas" "--skip-slow"
1203 "--skip-network" "-k"
1204 ;; XXX: Due to the deleted tests above.
1205 "not test_read_s3_jsonl"))))))))
1206 (propagated-inputs
1207 `(("python-numpy" ,python-numpy)
667c6ef5 1208 ("python-openpyxl" ,python-openpyxl)
44d10b1f 1209 ("python-pytz" ,python-pytz)
667c6ef5
MC
1210 ("python-dateutil" ,python-dateutil)
1211 ("python-xlrd" ,python-xlrd)))
c0d43f62
MC
1212 (inputs
1213 `(("which" ,which)))
44d10b1f
RW
1214 (native-inputs
1215 `(("python-cython" ,python-cython)
1216 ("python-beautifulsoup4" ,python-beautifulsoup4)
1217 ("python-lxml" ,python-lxml)
1218 ("python-html5lib" ,python-html5lib)
1219 ("python-nose" ,python-nose)
c0d43f62
MC
1220 ("python-pytest" ,python-pytest)
1221 ("python-pytest-mock" ,python-pytest-mock)))
44d10b1f
RW
1222 (home-page "https://pandas.pydata.org")
1223 (synopsis "Data structures for data analysis, time series, and statistics")
1224 (description
1225 "Pandas is a Python package providing fast, flexible, and expressive data
1226structures designed to make working with structured (tabular,
1227multidimensional, potentially heterogeneous) and time series data both easy
1228and intuitive. It aims to be the fundamental high-level building block for
1229doing practical, real world data analysis in Python.")
d8bb1097 1230 (properties `((python2-variant . ,(delay python2-pandas))))
44d10b1f
RW
1231 (license license:bsd-3)))
1232
d8bb1097 1233;; Pandas 0.24.x are the last versions that support Python 2.
44d10b1f 1234(define-public python2-pandas
d8bb1097
MB
1235 (let ((pandas (package-with-python2
1236 (strip-python2-variant python-pandas))))
1237 (package/inherit
1238 pandas
1239 (version "0.24.2")
1240 (source (origin
1241 (method url-fetch)
1242 (uri (pypi-uri "pandas" version))
1243 (sha256
1244 (base32
1245 "18imlm8xbhcbwy4wa957a1fkamrcb0z988z006jpfda3ki09z4ag")))))))
44d10b1f
RW
1246
1247(define-public python2-mechanize
1248 (package
1249 (name "python2-mechanize")
1250 (version "0.2.5")
1251 (source
1252 (origin
1253 (method url-fetch)
1cc184e6 1254 (uri (pypi-uri "mechanize" version))
44d10b1f
RW
1255 (sha256
1256 (base32
1257 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1258 (build-system python-build-system)
1259 (arguments
1260 `(#:python ,python-2 ; apparently incompatible with Python 3
1261 #:tests? #f))
1262 ;; test fails with message
1263 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1264 ;; (python-3.3.2) or
1265 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1266 ;; (python-2.7.5).
1267 ;; The source code is from March 2011 and probably not up-to-date
1268 ;; with respect to python unit tests.
1269 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1270 (synopsis
1271 "Stateful programmatic web browsing in Python")
1272 (description
1273 "Mechanize implements stateful programmatic web browsing in Python,
1274after Andy Lester’s Perl module WWW::Mechanize.")
1275 (license (license:non-copyleft
1276 "file://COPYING"
1277 "See COPYING in the distribution."))))
1278
1279
1280(define-public python-simplejson
1281 (package
1282 (name "python-simplejson")
1283 (version "3.14.0")
1284 (source
1285 (origin
1286 (method url-fetch)
1287 (uri (pypi-uri "simplejson" version))
1288 (sha256
1289 (base32
1290 "1lkv3xlf7ryzi69zqfdbkvpxdfy1rg1rq2yzcnxgf4km5m6difqy"))))
1291 (build-system python-build-system)
1292 (home-page "http://simplejson.readthedocs.org/en/latest/")
1293 (synopsis
1294 "Json library for Python")
1295 (description
1296 "JSON (JavaScript Object Notation) is a subset of JavaScript
1297syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1298format.
1299
1300Simplejson exposes an API familiar to users of the standard library marshal
1301and pickle modules. It is the externally maintained version of the json
1302library contained in Python 2.6, but maintains compatibility with Python 2.5
1303and (currently) has significant performance advantages, even without using
1304the optional C extension for speedups. Simplejson is also supported on
1305Python 3.3+.")
1306 (license license:x11)))
1307
1308(define-public python2-simplejson
1309 (package-with-python2 python-simplejson))
1310
1311
1312(define-public python-pyicu
1313 (package
1314 (name "python-pyicu")
dc23bb45 1315 (version "2.3.1")
44d10b1f
RW
1316 (source
1317 (origin
1318 (method url-fetch)
1319 (uri (pypi-uri "PyICU" version))
1320 (sha256
1321 (base32
dc23bb45 1322 "1x4w8m7ifki9z2a187pgjr33z6z0rp2fii9b73djak1vhm9v9cnx"))))
44d10b1f
RW
1323 (build-system python-build-system)
1324 (inputs
1325 `(("icu4c" ,icu4c)))
1326 (native-inputs
1327 `(("python-pytest" ,python-pytest)
1328 ("python-six" ,python-six)))
1329 (home-page "https://github.com/ovalhub/pyicu")
1330 (synopsis "Python extension wrapping the ICU C++ API")
1331 (description
1332 "PyICU is a python extension wrapping the ICU C++ API.")
1333 (properties `((python2-variant . ,(delay python2-pyicu))))
1334 (license license:x11)))
1335
1336(define-public python2-pyicu
1337 (let ((base (package-with-python2
1338 (strip-python2-variant python-pyicu))))
1339 (package
1340 (inherit base)
1341 (arguments
1342 `(,@(package-arguments base)
1343 #:phases
1344 (modify-phases %standard-phases
1345 (add-before 'check 'delete-failing-test
1346 (λ _
1347 ;; XXX: This fails due to Unicode issues unique to Python 2,
1348 ;; it seems: <https://github.com/ovalhub/pyicu/issues/61>.
1349 (delete-file "test/test_Script.py")
1350 #t))))))))
1351
1352(define-public python2-dogtail
1353 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1354 ;; spaces in indentation" with Python 3.
1355 (package
1356 (name "python2-dogtail")
1357 (version "0.9.9")
1358 (source (origin
1359 (method url-fetch)
1360 (uri (pypi-uri "dogtail" version))
1361 (sha256
1362 (base32
1363 "0p5wfssvzr9w0bvhllzbbd8fnp4cca2qxcpcsc33dchrmh5n552x"))))
1364 (build-system python-build-system)
1365 (arguments `(#:python ,python-2
1366 #:tests? #f)) ; invalid command "test"
1367 ;; Currently no offical homepage.
1368 (home-page "https://pypi.python.org/pypi/dogtail/")
1369 (synopsis "GUI test tool and automation framework written in Python")
1370 (description
1371 "Dogtail is a GUI test tool and automation framework written in Python.
1372It uses Accessibility (a11y) technologies to communicate with desktop
1373applications. dogtail scripts are written in Python and executed like any
1374other Python program.")
1375 (license license:gpl2+)))
1376
1377(define-public python-empy
1378 (package
1379 (name "python-empy")
0f6d5115 1380 (version "3.3.3")
44d10b1f
RW
1381 (source (origin
1382 (method url-fetch)
1383 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1384 version ".tar.gz"))
1385 (sha256
1386 (base32
0f6d5115 1387 "1mxfy5mgp473ga1pgz2nvm8ds6z4g3hdky8523z6jzvcs9ny6hcq"))))
44d10b1f
RW
1388 (build-system python-build-system)
1389 (arguments
0f6d5115 1390 `(#:tests? #f)) ; python2 only
44d10b1f
RW
1391 (home-page "http://www.alcyone.com/software/empy/")
1392 (synopsis "Templating system for Python")
1393 (description
1394 "EmPy is a system for embedding Python expressions and statements in
1395template text; it takes an EmPy source file, processes it, and produces
1396output. This is accomplished via expansions, which are special signals to the
1397EmPy system and are set off by a special prefix (by default the at sign, @@).
1398EmPy can expand arbitrary Python expressions and statements in this way, as
1399well as a variety of special forms. Textual data not explicitly delimited in
1400this way is sent unaffected to the output, allowing Python to be used in
1401effect as a markup language. Also supported are callbacks via hooks,
1402recording and playback via diversions, and dynamic, chainable filters. The
1403system is highly configurable via command line options and embedded
1404commands.")
1405 (license license:lgpl2.1+)))
1406
1407(define-public python2-empy
0f064242
TGR
1408 (let ((base (package-with-python2 (strip-python2-variant python-empy))))
1409 (package
1410 (inherit base)
1411 (arguments `(,@(package-arguments base)
1412 #:tests? #t)))))
44d10b1f
RW
1413
1414(define-public python2-element-tree
1415 (package
1416 (name "python2-element-tree")
1417 (version "1.2.6")
1418 (source (origin
1419 (method url-fetch)
1420 (uri (string-append
1421 "http://effbot.org/media/downloads/elementtree-"
1422 version "-20050316.tar.gz"))
1423 (sha256
1424 (base32
1425 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1426 (build-system python-build-system)
1427 (arguments
1428 `(#:python ,python-2 ; seems to be part of Python 3
1429 #:tests? #f)) ; no 'test' sub-command
1430 (synopsis "Toolkit for XML processing in Python")
1431 (description
1432 "ElementTree is a Python library supporting lightweight XML processing.")
1433 (home-page "http://effbot.org/zone/element-index.htm")
1434 (license (license:x11-style
1435 "http://docs.python.org/2/license.html"
1436 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1437
1438(define-public python2-pybugz
1439 (package
1440 (name "python2-pybugz")
1441 (version "0.6.11")
1442 (source (origin
1443 (method url-fetch)
1444 (uri (string-append
1445 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1446 version ".tar.gz"))
1447 (sha256
1448 (base32
1449 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1450 (patches (search-patches "pybugz-stty.patch"
1451 "pybugz-encode-error.patch"))))
1452 (build-system python-build-system)
1453 (arguments
1454 `(#:python ,python-2 ; SyntaxError with Python 3
1455 #:tests? #f)) ; no 'test' sub-command
1456 (propagated-inputs
1457 `(("element-tree" ,python2-element-tree)))
1458 (synopsis "Python and command-line interface to Bugzilla")
1459 (description
1460 "PyBugz is a Python library and command-line tool to query the Bugzilla
1461bug tracking system. It is meant as an aid to speed up interaction with the
1462bug tracker.")
1463 (home-page "http://www.liquidx.net/pybugz/")
1464 (license license:gpl2)))
1465
1466(define-public python2-enum
1467 (package
1468 (name "python2-enum")
1469 (version "0.4.6")
1470 (source (origin
1471 (method url-fetch)
1472 (uri (pypi-uri "enum" version))
1473 (sha256
1474 (base32
1475 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
1476 (build-system python-build-system)
1477 (arguments
1478 `(#:python ,python-2))
1479 (home-page "http://pypi.python.org/pypi/enum/")
1480 (synopsis "Robust enumerated type support in Python")
1481 (description
1482 "This provides a module for robust enumerations in Python. It has
1483been superseded by the Python standard library and is provided only for
1484compatibility.")
1485 ;; Choice of either license.
1486 (license (list license:gpl3+ license:psfl))))
1487
1488(define-public python-enum34
1489 (package
1490 (name "python-enum34")
1491 (version "1.1.6")
1492 (source
1493 (origin
1494 (method url-fetch)
1495 (uri (pypi-uri "enum34" version))
1496 (sha256
1497 (base32
1498 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
1499 (build-system python-build-system)
1500 (home-page "https://pypi.python.org/pypi/enum34")
1501 (synopsis "Backported Python 3.4 Enum")
1502 (description
1503 "Enum34 is the new Python stdlib enum module available in Python 3.4
1504backported for previous versions of Python from 2.4 to 3.3.")
1505 (license license:bsd-3)))
1506
1507(define-public python2-enum34
1508 (package-with-python2 python-enum34))
1509
1510(define-public python-parse-type
1511 (package
1512 (name "python-parse-type")
1513 (version "0.4.2")
1514 (source
1515 (origin
1516 (method url-fetch)
1517 (uri (pypi-uri "parse_type" version))
1518 (sha256
1519 (base32
1520 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
1521 (build-system python-build-system)
1522 (propagated-inputs
1523 `(("python-six" ,python-six)
1524 ("python-parse" ,python-parse)))
1525 (native-inputs
1526 `(("python-pytest" ,python-pytest)
1527 ("python-pytest-runner" ,python-pytest-runner)))
1528 (home-page "https://github.com/jenisys/parse_type")
1529 (synopsis "Extended parse module")
1530 (description
1531 "Parse_type extends the python parse module.")
1532 (properties
1533 `((python2-variant . ,(delay python2-parse-type))))
1534 (license license:bsd-3)))
1535
1536(define-public python2-parse-type
1537 (let ((base (package-with-python2
1538 (strip-python2-variant python-parse-type))))
1539 (package (inherit base)
1540 (propagated-inputs
1541 `(("python2-enum34" ,python2-enum34)
1542 ,@(package-propagated-inputs base))))))
1543
1544(define-public python-parse
1545 (package
1546 (name "python-parse")
1547 (version "1.8.4")
1548 (source
1549 (origin
1550 (method url-fetch)
1551 (uri (pypi-uri "parse" version))
1552 (sha256
1553 (base32
1554 "0f8997xr8nq2nq35iiviq8ningd1zvy59fg503xfpbi2dwhgdkf3"))))
1555 (build-system python-build-system)
1556 (arguments
1557 `(#:phases
1558 (modify-phases %standard-phases
1559 (replace 'check
1560 (lambda _ (invoke "python" "test_parse.py"))))))
1561 (home-page "https://github.com/r1chardj0n3s/parse")
1562 (synopsis "Parse strings")
1563 (description
1564 "Parse strings using a specification based on the Python @code{format()}
1565syntax.")
1566 (license license:x11)))
1567
1568(define-public python-polib
1569 (package
1570 (name "python-polib")
1571 (version "1.0.8")
1572 (source (origin
1573 (method url-fetch)
1574 (uri (pypi-uri "polib" version))
1575 (sha256
1576 (base32
1577 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1578 (build-system python-build-system)
1579 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1580 (synopsis "Manipulate, create and modify gettext files")
1581 (description "Polib can manipulate any gettext format (po, pot and mo)
1582files. It can be used to create po files from scratch or to modify
1583existing ones.")
1584 (license license:expat)))
1585
1586(define-public python2-polib
1587 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1588 (package
1589 (inherit base)
1590 (arguments `(,@(package-arguments base)
1591 ;; Tests don't work with python2.
1592 #:tests? #f)))))
1593
6830120e
TLC
1594(define-public python-poyo
1595 (package
1596 (name "python-poyo")
1597 (version "0.5.0")
1598 (source
1599 (origin
1600 (method url-fetch)
1601 (uri (pypi-uri "poyo" version))
1602 (sha256
1603 (base32
1604 "1pflivs6j22frz0v3dqxnvc8yb8fb52g11lqr88z0i8cg2m5csg2"))))
1605 (build-system python-build-system)
1606 (home-page "https://github.com/hackebrot/poyo")
1607 (synopsis "Lightweight YAML Parser for Python")
1608 (description
1609 "This package provides a lightweight YAML Parser for Python. It supports
1610only a chosen subset of the YAML format that is required to parse cookiecutter
1611user configuration files. It does not have support for serializing into YAML
1612and is not compatible with JSON.")
1613 (license license:expat)))
1614
44d10b1f
RW
1615(define-public scons
1616 (package
1617 (name "scons")
05487ed8 1618 (version "3.0.4")
44d10b1f 1619 (source (origin
ad34338d
RW
1620 (method git-fetch)
1621 (uri (git-reference
1622 (url "https://github.com/SCons/scons.git")
1623 (commit version)))
1624 (file-name (git-file-name name version))
44d10b1f
RW
1625 (sha256
1626 (base32
05487ed8 1627 "1xy8jrwz87y589ihcld4hv7wn122sjbz914xn8h50ww77wbhk8hn"))))
44d10b1f
RW
1628 (build-system python-build-system)
1629 (arguments
1630 `(#:use-setuptools? #f ; still relies on distutils
ad34338d
RW
1631 #:tests? #f ; no 'python setup.py test' command
1632 #:phases
1633 (modify-phases %standard-phases
1634 (add-before 'build 'bootstrap
1635 (lambda _
1636 (substitute* "src/engine/SCons/compat/__init__.py"
1637 (("sys.modules\\[new\\] = imp.load_module\\(old, \\*imp.find_module\\(old\\)\\)")
1638 "sys.modules[new] = __import__(old)"))
05487ed8
RW
1639 (substitute* "src/engine/SCons/Platform/__init__.py"
1640 (("mod = imp.load_module\\(full_name, file, path, desc\\)")
1641 "mod = __import__(full_name)"))
ad34338d
RW
1642 (invoke "python" "bootstrap.py" "build/scons" "DEVELOPER=guix")
1643 (chdir "build/scons")
1644 #t)))))
44d10b1f
RW
1645 (home-page "http://scons.org/")
1646 (synopsis "Software construction tool written in Python")
1647 (description
1648 "SCons is a software construction tool. Think of SCons as an improved,
1649cross-platform substitute for the classic Make utility with integrated
1650functionality similar to autoconf/automake and compiler caches such as ccache.
1651In short, SCons is an easier, more reliable and faster way to build
1652software.")
1653 (license license:x11)))
1654
1655(define-public scons-python2
1656 (package
1657 (inherit (package-with-python2 scons))
1658 (name "scons-python2")))
1659
1660(define-public python-extras
1661 (package
1662 (name "python-extras")
1663 (version "1.0.0")
1664 (source
1665 (origin
1666 (method url-fetch)
1667 (uri (pypi-uri "extras" version))
1668 (sha256
1669 (base32
1670 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
1671 (build-system python-build-system)
1672 (arguments
1673 ;; FIXME: Circular dependency on testtools.
1674 '(#:tests? #f))
1675 (home-page "https://github.com/testing-cabal/extras")
1676 (synopsis "Useful extensions to the Python standard library")
1677 (description
1678 "Extras is a set of extensions to the Python standard library.")
1679 (license license:expat)))
1680
1681(define-public python2-extras
1682 (package-with-python2 python-extras))
1683
1684(define-public python-mimeparse
1685 (package
1686 (name "python-mimeparse")
1687 (version "1.6.0")
1688 (source
1689 (origin
1690 (method url-fetch)
89bf667c 1691 (uri (pypi-uri "python-mimeparse" version))
44d10b1f
RW
1692 (sha256
1693 (base32
1694 "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n"))))
1695 (build-system python-build-system)
1696 (arguments
1697 '(#:phases
1698 (modify-phases %standard-phases
1699 (replace 'check
1700 (lambda _
1701 (invoke "./mimeparse_test.py"))))))
1702 (home-page
1703 "https://github.com/dbtsai/python-mimeparse")
1704 (synopsis "Python library for parsing MIME types")
1705 (description
1706 "Mimeparse provides basic functions for parsing MIME type names and
1707matching them against a list of media-ranges.")
1708 (license license:expat)))
1709
1710(define-public python2-mimeparse
1711 (package-with-python2 python-mimeparse))
1712
1713(define-public python-miniboa
1714 (package
1715 (name "python-miniboa")
1716 (version "1.0.7")
1717 (source
1718 (origin
1719 (method url-fetch)
1720 (uri (pypi-uri "miniboa" version))
1721 (sha256
1722 (base32
1723 "09jh3pn4rh7kh7jayanf8jzy6gp03791b5a193w6148cf3i6k9m3"))))
1724 (build-system python-build-system)
1725 (home-page "https://github.com/shmup/miniboa")
1726 (synopsis "Simple, single-threaded Telnet server")
1727 (description
1728 "Miniboa is a simple, asynchronous, single-threaded, poll-based Telnet
1729server.")
1730 (license license:asl2.0)))
1731
1732(define-public python2-miniboa
1733 (package-with-python2 python-miniboa))
1734
1735(define-public python-pafy
1736 (package
1737 (name "python-pafy")
1738 (version "0.5.3.1")
1739 (source
1740 (origin
1741 (method url-fetch)
1742 (uri (pypi-uri "pafy" version))
1743 (sha256
1744 (base32
1745 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
1746 (build-system python-build-system)
1747 (arguments
1748 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
1749 (propagated-inputs
1750 ;; Youtube-dl is a python package which is imported in the file
1751 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1752 `(("youtube-dl" ,youtube-dl)))
1753 (home-page "https://np1.github.io/pafy/")
1754 (synopsis "Retrieve YouTube content and metadata")
1755 (description
1756 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1757 (license license:lgpl3+)))
1758
1759(define-public python2-funcsigs
1760 (package
1761 (name "python2-funcsigs")
1762 (version "1.0.2")
1763 (source (origin
1764 (method url-fetch)
1765 (uri (pypi-uri "funcsigs" version))
1766 (sha256
1767 (base32
1768 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
1769 (build-system python-build-system)
1770 (arguments
1771 `(#:python ,python-2))
1772 (native-inputs
1773 `(("python2-unittest2" ,python2-unittest2)))
1774 (home-page "http://funcsigs.readthedocs.org")
1775 (synopsis "Python function signatures from PEP362")
1776 (description
1777 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
1778 (license license:asl2.0)))
1779
1780(define-public python2-funcsigs-bootstrap
1781 (package
1782 (inherit python2-funcsigs)
1783 (name "python2-funcsigs-bootstrap")
1784 (native-inputs `())
1785 (arguments
1786 `(#:tests? #f
1787 ,@(package-arguments python2-funcsigs)))))
1788
1789(define-public python-py
1790 (package
1791 (name "python-py")
08eba545 1792 (version "1.8.0")
44d10b1f
RW
1793 (source
1794 (origin
1795 (method url-fetch)
1796 (uri (pypi-uri "py" version))
1797 (sha256
1798 (base32
08eba545 1799 "0lsy1gajva083pzc7csj1cvbmminb7b4l6a0prdzyb3fd829nqyw"))))
44d10b1f
RW
1800 (build-system python-build-system)
1801 (arguments
1802 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1803 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1804 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1805 ;; Is this module globally installed?"
1806 '(#:tests? #f))
1807 (native-inputs
1808 `(("python-setuptools-scm" ,python-setuptools-scm)))
1809 (home-page "https://github.com/pytest-dev/py")
1810 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1811 (description
1812 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1813code introspection, and logging.")
1814 (license license:expat)))
1815
1816(define-public python2-py
1817 (package-with-python2 python-py))
1818
1819;; Recent versions of python-fixtures and python-testrepository need
1820;; python-pbr for packaging, which itself needs these two packages for
1821;; testing.
1822;; To fix this circular dependency, we use a build of python-pbr, based on the
1823;; same source, just without any test dependencies and with tests disabled.
1824;; python-pbr-minmal is then used to package python-fixtures and
1825;; python-testrepository.
1826;; Strictly speaking we currently could remove the test-requirements from the
1827;; normal python-pbr package (and save this package) since test are disabled
1828;; there anyway. But this may change in future.
1829(define-public python-pbr-minimal
1830 (package
1831 (name "python-pbr-minimal")
1832 (version "3.0.1")
1833 (source
1834 (origin
1835 (method url-fetch)
1836 (uri (pypi-uri "pbr" version))
1837 (sha256
1838 (base32
1839 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
1840 (build-system python-build-system)
1841 (arguments
1842 `(#:tests? #f))
1843 (home-page "http://docs.openstack.org/developer/pbr/")
1844 (synopsis "Minimal build of python-pbr used for bootstrapping")
1845 (description
1846 "Used only for bootstrapping python2-pbr, you should not need this.")
1847 (license license:asl2.0)))
1848
1849(define-public python2-pbr-minimal
1850 (package-with-python2 python-pbr-minimal))
1851
1852(define-public python-pbr
1853 (package
1854 (inherit python-pbr-minimal)
1855 (name "python-pbr")
1856 (arguments
1857 `(#:tests? #f)) ;; Most tests seem to use the Internet.
1858 (propagated-inputs
1859 `(("git" ,git))) ;; pbr actually uses the "git" binary.
1860 (native-inputs
1861 `(("python-fixtures" ,python-fixtures-bootstrap)
1862 ;; discover, coverage, hacking, subunit
1863 ("python-mock" ,python-mock)
1864 ("python-six" ,python-six)
1865 ("python-sphinx" ,python-sphinx)
1866 ("python-testrepository" ,python-testrepository-bootstrap)
1867 ("python-testresources" ,python-testresources-bootstrap)
1868 ("python-testscenarios" ,python-testscenarios-bootstrap)
1869 ("python-testtools" ,python-testtools-bootstrap)
1870 ("python-virtualenv" ,python-virtualenv)))
1871 (synopsis "Enhance the default behavior of Python’s setuptools")
1872 (description
1873 "Python Build Reasonableness (PBR) is a library that injects some useful
1874and sensible default behaviors into your setuptools run. It will set
1875versions, process requirements files and generate AUTHORS and ChangeLog file
1876from git information.
1877")))
1878
1879(define-public python2-pbr
1880 (package-with-python2 python-pbr))
1881
ea43f0d5
MB
1882(define-public python-pyrsistent
1883 (package
1884 (name "python-pyrsistent")
1885 (version "0.14.11")
1886 (home-page "https://github.com/tobgu/pyrsistent")
1887 (source (origin
1888 (method url-fetch)
1889 (uri (pypi-uri "pyrsistent" version))
1890 (sha256
1891 (base32
1892 "1qkh74bm296mp5g3r11lgsksr6bh4w1bf8pji4nmxdlfj542ga1w"))))
1893 (build-system python-build-system)
1894 (native-inputs
1895 `(("python-hypothesis" ,python-hypothesis)
1896 ("python-pytest" ,python-pytest)
1897 ("python-pytest-runner" ,python-pytest-runner)))
1898 (propagated-inputs
1899 `(("python-six" ,python-six)))
1900 (synopsis "Persistent data structures for Python")
1901 (description
1902 "Pyrsistent is a number of persistent collections (by some referred to as
1903functional data structures). Persistent in the sense that they are immutable.
1904
1905All methods on a data structure that would normally mutate it instead return a
1906new copy of the structure containing the requested updates. The original
1907structure is left untouched.")
1908 (license license:expat)))
1909
1910(define-public python2-pyrsistent
1911 (package-with-python2 python-pyrsistent))
1912
44d10b1f
RW
1913(define-public python-exif-read
1914 (package
1915 (name "python-exif-read")
1916 (version "2.1.2")
1917 (source (origin
1918 (method url-fetch)
1919 (uri (pypi-uri "ExifRead" version))
1920 (sha256
1921 (base32
1922 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
1923 (build-system python-build-system)
1924 (arguments `(#:tests? #f)) ; no tests
1925 (home-page "https://github.com/ianare/exif-py")
1926 (synopsis "Python library to extract EXIF data from image files")
1927 (description
1928 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
1929files.")
1930 (license license:bsd-3)))
1931
1932(define-public python2-exif-read
1933 (package-with-python2 python-exif-read))
1934
1935(define-public python-pyld
1936 (package
1937 (name "python-pyld")
6d4ed78d 1938 (version "1.0.5")
44d10b1f
RW
1939 (source (origin
1940 (method url-fetch)
1941 (uri (pypi-uri "PyLD" version))
1942 (sha256
1943 (base32
6d4ed78d 1944 "1ywbdbsrkg533qh8xn9ifjh2mvam6v5msrjyqq73jfpvcp89qvff"))))
44d10b1f
RW
1945 (build-system python-build-system)
1946 (home-page "https://github.com/digitalbazaar/pyld")
1947 (synopsis "Python implementation of the JSON-LD specification")
1948 (description
1949 "PyLD is an implementation of the JSON-LD specification.")
1950 (license license:bsd-3)))
1951
1952(define-public python2-pyld
1953 (package-with-python2 python-pyld))
1954
1955(define-public python-click
1956 (package
1957 (name "python-click")
61984855 1958 (version "7.0")
44d10b1f
RW
1959 (source
1960 (origin
1961 (method url-fetch)
1962 (uri (pypi-uri "click" version))
1963 (sha256
1964 (base32
61984855 1965 "1mzjixd4vjbjvzb6vylki9w1556a9qmdh35kzmq6cign46av952v"))))
44d10b1f
RW
1966 (build-system python-build-system)
1967 (arguments
8d7e7ca6 1968 `(#:phases
44d10b1f
RW
1969 (modify-phases %standard-phases
1970 (add-after 'unpack 'fix-paths
1971 (lambda* (#:key inputs #:allow-other-keys)
1972 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
1973 "cross-libc" "libc"))))
1974 (substitute* "click/_unicodefun.py"
1975 (("'locale'")
1976 (string-append "'" glibc "/bin/locale'"))))
8d7e7ca6
EF
1977 #t))
1978 (replace 'check
1979 (lambda _
1980 (invoke "python" "-m" "pytest"))))))
44d10b1f
RW
1981 (native-inputs
1982 `(("python-pytest" ,python-pytest)))
61984855 1983 (home-page "https://palletsprojects.com/p/click/")
44d10b1f
RW
1984 (synopsis "Command line library for Python")
1985 (description
1986 "Click is a Python package for creating command line interfaces in a
1987composable way with as little code as necessary. Its name stands for
1988\"Command Line Interface Creation Kit\". It's highly configurable but comes
1989with sensible defaults out of the box.")
1990 (license license:bsd-3)))
1991
1992(define-public python2-click
1993 (package-with-python2 python-click))
1994
1995(define-public python-wheel
1996 (package
1997 (name "python-wheel")
746c074b 1998 (version "0.32.3")
44d10b1f
RW
1999 (source
2000 (origin
2001 (method url-fetch)
2002 (uri (pypi-uri "wheel" version))
2003 (sha256
2004 (base32
746c074b 2005 "1dhxl1bf18bx9szmqcnxbg6204hp3im8089q3hkwh5jfa6zh75q2"))))
44d10b1f
RW
2006 (build-system python-build-system)
2007 (native-inputs
2008 `(("python-jsonschema" ,python-jsonschema)
2009 ("python-pytest-cov" ,python-pytest-cov)))
2010 (home-page "https://bitbucket.org/pypa/wheel/")
2011 (synopsis "Format for built Python packages")
2012 (description
2013 "A wheel is a ZIP-format archive with a specially formatted filename and
2014the @code{.whl} extension. It is designed to contain all the files for a PEP
2015376 compatible install in a way that is very close to the on-disk format. Many
2016packages will be properly installed with only the @code{Unpack} step and the
2017unpacked archive preserves enough information to @code{Spread} (copy data and
2018scripts to their final locations) at any later time. Wheel files can be
2019installed with a newer @code{pip} or with wheel's own command line utility.")
2020 (license license:expat)
2021 (properties `((python2-variant . ,(delay python2-wheel))))))
2022
2023(define-public python2-wheel
2024 (let ((wheel (package-with-python2
2025 (strip-python2-variant python-wheel))))
2026 (package (inherit wheel)
2027 (native-inputs `(("python2-functools32" ,python2-functools32)
2028 ,@(package-native-inputs wheel))))))
2029
2030(define-public python-vcversioner
2031 (package
2032 (name "python-vcversioner")
2033 (version "2.16.0.0")
2034 (source
2035 (origin
2036 (method url-fetch)
2037 (uri (pypi-uri "vcversioner" version))
2038 (sha256
2039 (base32
2040 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
2041 (build-system python-build-system)
2042 (synopsis "Python library for version number discovery")
2043 (description "Vcversioner is a Python library that inspects tagging
2044information in a variety of version control systems in order to discover
2045version numbers.")
2046 (home-page "https://github.com/habnabit/vcversioner")
2047 (license license:isc)))
2048
2049(define-public python2-vcversioner
2050 (package-with-python2 python-vcversioner))
2051
5591fc4f
MC
2052(define-public python-jdcal
2053 (package
2054 (name "python-jdcal")
2055 (version "1.4")
2056 (source
2057 (origin
2058 (method url-fetch)
2059 (uri (pypi-uri "jdcal" version))
2060 (sha256
2061 (base32
2062 "1ja6j2xq97bsl6rv09mhdx7n0xnrsfx0mj5xqza0mxghqmkm02pa"))))
2063 (build-system python-build-system)
2064 (arguments
2065 `(#:phases (modify-phases %standard-phases
2066 (replace 'check
2067 (lambda _
2068 (invoke "pytest"))))))
2069 (native-inputs
2070 `(("python-pytest" ,python-pytest)))
2071 (home-page "https://github.com/phn/jdcal")
2072 (synopsis "Functions to convert between Julian dates Gregorian dates")
2073 (description "This Python library provides functions for converting
2074between Julian dates and Gregorian dates.")
2075 (license license:bsd-2)))
2076
2077(define-public python2-jdcal
2078 (package-with-python2 python-jdcal))
2079
44d10b1f
RW
2080(define-public python-jsonschema
2081 (package
2082 (name "python-jsonschema")
1adde06e 2083 (version "3.0.1")
44d10b1f
RW
2084 (source (origin
2085 (method url-fetch)
786ccb87 2086 (uri (pypi-uri "jsonschema" version))
44d10b1f
RW
2087 (sha256
2088 (base32
1adde06e 2089 "03g20i1xfg4qdlk4475pl4pp7y0h37g1fbgs5qhy678q9xb822hc"))))
44d10b1f
RW
2090 (build-system python-build-system)
2091 (arguments
2092 '(#:phases
2093 (modify-phases %standard-phases
1adde06e
MB
2094 (replace 'check
2095 (lambda _
2096 (setenv "PYTHONPATH" (string-append ".:" (getenv "PYTHONPATH")))
2097 (invoke "trial" "jsonschema"))))))
44d10b1f 2098 (native-inputs
1adde06e
MB
2099 `(("python-setuptools_scm" ,python-setuptools-scm)
2100 ("python-twisted" ,python-twisted)))
2101 (propagated-inputs
2102 `(("python-attrs" ,python-attrs)
2103 ("python-pyrsistent" ,python-pyrsistent)
2104 ("python-six" ,python-six)))
44d10b1f
RW
2105 (home-page "https://github.com/Julian/jsonschema")
2106 (synopsis "Implementation of JSON Schema for Python")
2107 (description
2108 "Jsonschema is an implementation of JSON Schema for Python.")
2109 (license license:expat)
2110 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2111
2112(define-public python2-jsonschema
2113 (let ((jsonschema (package-with-python2
2114 (strip-python2-variant python-jsonschema))))
2115 (package (inherit jsonschema)
44d10b1f 2116 (propagated-inputs
1adde06e
MB
2117 `(("python2-functools32" ,python2-functools32)
2118 ,@(package-propagated-inputs jsonschema))))))
44d10b1f 2119
914bba28
TGR
2120;; This old version is still required by docker-compose as of 1.24.0.
2121(define-public python-jsonschema-2.6
2122 (package
2123 (name "python-jsonschema")
2124 (version "2.6.0")
2125 (source (origin
2126 (method url-fetch)
2127 (uri (pypi-uri "jsonschema" version))
2128 (sha256
2129 (base32
2130 "00kf3zmpp9ya4sydffpifn0j0mzm342a2vzh82p6r0vh10cg7xbg"))))
2131 (build-system python-build-system)
2132 (arguments
2133 '(#:phases
2134 (modify-phases %standard-phases
2135 (replace 'check (lambda _ (invoke "nosetests"))))))
2136 (native-inputs
2137 `(("python-nose" ,python-nose)
2138 ("python-vcversioner" ,python-vcversioner)))
2139 (home-page "https://github.com/Julian/jsonschema")
2140 (synopsis "Implementation of JSON Schema for Python")
2141 (description
2142 "Jsonschema is an implementation of JSON Schema for Python.")
2143 (license license:expat)
2144 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2145
44d10b1f
RW
2146(define-public python-schema
2147 (package
2148 (name "python-schema")
2149 (version "0.6.6")
2150 (source
2151 (origin
2152 (method url-fetch)
2153 (uri (pypi-uri "schema" version))
2154 (sha256
2155 (base32
2156 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
2157 (build-system python-build-system)
2158 (native-inputs
2159 `(("python-pytest" ,python-pytest)))
2160 (home-page "https://github.com/keleshev/schema")
2161 (synopsis "Simple data validation library")
2162 (description
2163 "@code{python-schema} is a library for validating Python data
2164structures, such as those obtained from config-files, forms, external
2165services or command-line parsing, converted from JSON/YAML (or
2166something else) to Python data-types.")
2167 (license license:psfl)))
2168
2169(define-public python2-schema
2170 (package-with-python2 python-schema))
2171
2172(define-public python-schema-0.5
2173 (package (inherit python-schema)
2174 (version "0.5.0")
2175 (source
2176 (origin
2177 (method url-fetch)
2178 (uri (pypi-uri "schema" version))
2179 (sha256
2180 (base32
2181 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
2182
2183(define-public python2-schema-0.5
2184 (package-with-python2 python-schema-0.5))
2185
2186(define-public python-kitchen
2187 (package
2188 (name "python-kitchen")
2189 (version "1.2.5")
2190 (source
2191 (origin
2192 (method url-fetch)
2193 (uri (pypi-uri "kitchen" version))
2194 (sha256
2195 (base32
2196 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
2197 (build-system python-build-system)
2198 (propagated-inputs
2199 `(("python-chardet" ,python-chardet)))
2200 (home-page "https://github.com/fedora-infra/kitchen")
2201 (synopsis "Python API for snippets")
2202 (description "@code{kitchen} module provides a python API for all sorts of
2203little useful snippets of code that everybody ends up writing for their projects
2204but never seem big enough to build an independent release. Use kitchen and stop
2205cutting and pasting that code over and over.")
2206 (license (list license:lgpl2.1+
2207 ;; subprocess.py, test_subprocess.py,
2208 ;; kitchen/pycompat25/defaultdict.py:
2209 license:psfl))))
2210
2211(define-public python2-kitchen
2212 (package-with-python2 python-kitchen))
2213
2214(define-public python-unidecode
2215 (package
2216 (name "python-unidecode")
eb80a300 2217 (version "1.1.1")
44d10b1f
RW
2218 (source (origin
2219 (method url-fetch)
2220 (uri (pypi-uri "Unidecode" version))
2221 (sha256
2222 (base32
eb80a300 2223 "1s6cp2lv4m0f00hjckjz8p6m7d3n3v16jvg353llf5ia1iqsnsib"))))
44d10b1f
RW
2224 (build-system python-build-system)
2225 (home-page "https://pypi.python.org/pypi/Unidecode")
2226 (synopsis "ASCII transliterations of Unicode text")
2227 (description
2228 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2229useful when integrating with legacy code that doesn't support Unicode, or for
2230ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2231machine identifiers from human-readable Unicode strings that should still be
2232somewhat intelligible.")
2233 (license license:gpl2+)))
2234
2235(define-public python2-unidecode
2236 (package-with-python2 python-unidecode))
2237
2238(define-public python-pyjwt
2239 (package
2240 (name "python-pyjwt")
be6f2f56 2241 (version "1.7.1")
44d10b1f
RW
2242 (source
2243 (origin
2244 (method url-fetch)
2245 (uri (pypi-uri "PyJWT" version))
2246 (sha256
2247 (base32
be6f2f56 2248 "15hflax5qkw1v6nssk1r0wkj83jgghskcmn875m3wgvpzdvajncd"))
44d10b1f
RW
2249 (modules '((guix build utils)))
2250 (snippet
2251 '(begin
2252 (for-each delete-file-recursively
2253 (find-files "." "\\.pyc$"))
2254 #t))))
2255 (build-system python-build-system)
2256 (native-inputs
2257 `(("python-pytest" ,python-pytest)
2258 ("python-pytest-cov" ,python-pytest-cov)
2259 ("python-pytest-runner" ,python-pytest-runner)))
2260 (home-page "https://github.com/progrium/pyjwt")
2261 (synopsis "JSON Web Token implementation in Python")
2262 (description
2263 "PyJWT is a JSON Web Token implementation written in Python.")
2264 (license license:expat)))
2265
2266(define-public python2-pyjwt
2267 (package-with-python2 python-pyjwt))
2268
2269(define-public python-pykka
2270 (package
2271 (name "python-pykka")
2272 (version "1.2.1")
2273 (source
2274 (origin
2275 (method url-fetch)
2276 (uri (pypi-uri "Pykka" version))
2277 (sha256
2278 (base32
2279 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
2280 (build-system python-build-system)
2281 (native-inputs
2282 `(("python-mock" ,python-mock)
2283 ("python-nose" ,python-nose)
2284 ("python-gevent" ,python-gevent)
2285 ("python-eventlet" ,python-eventlet)))
2286 (home-page "https://www.pykka.org/")
2287 (synopsis "Pykka is a Python implementation of the actor model")
2288 (description
2289 "Pykka is a Python implementation of the actor model.
2290The actor model introduces some simple rules to control the sharing
2291of state and cooperation between execution units, which makes it
2292easier to build concurrent applications.")
2293 (license license:asl2.0)))
2294
2295(define-public python2-pykka
2296 (package-with-python2 python-pykka))
2297
8d22f7e3
VC
2298(define-public python-pymsgbox
2299 (package
2300 (name "python-pymsgbox")
2301 (version "1.0.6")
2302 (source
2303 (origin
2304 (method git-fetch)
2305 (uri (git-reference
2306 ;; LICENSE.txt is not present on pypi
2307 (url "https://github.com/asweigart/PyMsgBox")
2308 (commit "55926b55f46caa969c5ddb87990ebea2737bd66f")))
2309 (file-name (git-file-name name version))
2310 (sha256
2311 (base32
2312 "0zy7rjfpwlrd8b64j7jk2lb8m2npc21rnpwakpfvwgl4nxdy80rg"))))
2313 (arguments
2314 ;; Circular dependency to run tests:
2315 ;; Tests need pyautogui, which depends on pymsgbox.
2316 '(#:tests? #f))
2317 (build-system python-build-system)
2318 (home-page "https://github.com/asweigart/PyMsgBox")
2319 (synopsis "Python module for JavaScript-like message boxes")
2320 (description
2321 "PyMsgBox is a simple, cross-platform, pure Python module for
2322JavaScript-like message boxes. Types of dialog boxes include:
2323@enumerate
2324@item alert
2325@item confirm
2326@item prompt
2327@item password
2328@end enumerate
2329")
2330 (license license:bsd-3)))
2331
44d10b1f
RW
2332(define-public python-pympler
2333 (package
2334 (name "python-pympler")
2335 (home-page "https://pythonhosted.org/Pympler/")
c498a07e 2336 (version "0.7")
44d10b1f
RW
2337 (source (origin
2338 (method url-fetch)
2339 (uri (pypi-uri "Pympler" version))
2340 (sha256
2341 (base32
c498a07e 2342 "0ki7bqp1h9l1xc2k1h4vjyzsgs20i8ingvcdhszyi72s28wyf4bs"))))
44d10b1f
RW
2343 (build-system python-build-system)
2344 (arguments
2345 `(#:phases (modify-phases %standard-phases
2346 (delete 'check)
2347 (add-after 'install 'check
2348 (lambda* (#:key inputs outputs #:allow-other-keys)
2349 (add-installed-pythonpath inputs outputs)
2350 (invoke "python" "setup.py" "test"))))))
2351 (synopsis "Measure, monitor and analyze memory behavior")
2352 (description
2353 "Pympler is a development tool to measure, monitor and analyze
2354the memory behavior of Python objects in a running Python application.
2355
2356By pympling a Python application, detailed insight in the size and the
2357lifetime of Python objects can be obtained. Undesirable or unexpected
2358runtime behavior like memory bloat and other @samp{pymples} can easily
2359be identified.
2360
2361A web profiling frontend exposes process statistics, garbage
2362visualisation and class tracker statistics.")
2363 (license license:asl2.0)))
2364
2365(define-public python2-pympler
2366 (package-with-python2 python-pympler))
2367
2368(define-public python-itsdangerous
2369 (package
2370 (name "python-itsdangerous")
acfcf2ed 2371 (version "1.1.0")
44d10b1f
RW
2372 (source
2373 (origin
2374 (method url-fetch)
acfcf2ed 2375 (uri (pypi-uri "itsdangerous" version))
44d10b1f
RW
2376 (sha256
2377 (base32
acfcf2ed 2378 "068zpbksq5q2z4dckh2k1zbcq43ay74ylqn77rni797j0wyh66rj"))))
44d10b1f 2379 (build-system python-build-system)
acfcf2ed 2380 (home-page "https://palletsprojects.com/p/itsdangerous/")
44d10b1f
RW
2381 (synopsis "Python library for passing data to/from untrusted environments")
2382 (description
2383 "Itsdangerous provides various helpers to pass trusted data to untrusted
2384environments and back.")
2385 (license license:bsd-3)))
2386
2387(define-public python2-itsdangerous
2388 (package-with-python2 python-itsdangerous))
2389
2390(define-public python-pyyaml
2391 (package
2392 (name "python-pyyaml")
2393 (version "3.13")
2394 (source
2395 (origin
2396 (method url-fetch)
2397 (uri (pypi-uri "PyYAML" version))
2398 (sha256
2399 (base32
2400 "1gx603g484z46cb74j9rzr6sjlh2vndxayicvlyhxdz98lhhkwry"))))
2401 (build-system python-build-system)
2402 (inputs
2403 `(("libyaml" ,libyaml)))
2404 (home-page "http://pyyaml.org/wiki/PyYAML")
2405 (synopsis "YAML parser and emitter for Python")
2406 (description
2407 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2408complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2409API, and sensible error messages. PyYAML supports standard YAML tags and
2410provides Python-specific tags that allow to represent an arbitrary Python
2411object.")
2412 (license license:expat)))
2413
2414(define-public python2-pyyaml
2415 (package-with-python2 python-pyyaml))
2416
2417(define-public python-vine
2418 (package
2419 (name "python-vine")
2420 (version "1.1.4")
2421 (source
2422 (origin
2423 (method url-fetch)
2424 (uri (pypi-uri "vine" version))
2425 (sha256
2426 (base32
2427 "0wkskb2hb494v9gixqnf4bl972p4ibcmxdykzpwjlfa5picns4aj"))))
2428 (build-system python-build-system)
2429 (native-inputs
2430 `(("python-pytest" ,python-pytest)
2431 ("python-case" ,python-case)))
2432 (home-page "https://github.com/celery/vine")
2433 (synopsis "Promises for Python")
2434 (description
2435 "@code{vine} provides a special implementation of promises in that it can
2436be used both for \"promise of a value\" and lazy evaluation. The biggest
2437upside for this is that everything in a promise can also be a promise,
2438e.g. filters, callbacks and errbacks can all be promises.")
2439 (license license:bsd-3)))
2440
2441(define-public python-virtualenv
2442 (package
2443 (name "python-virtualenv")
2782bd51 2444 (version "16.1.0")
44d10b1f
RW
2445 (source
2446 (origin
2447 (method url-fetch)
2448 (uri (pypi-uri "virtualenv" version))
2449 (sha256
2450 (base32
2782bd51 2451 "0242cg3hdq3qdvx5flyrki8lpwlgwf5k45c21ks5049fv7ygm6gq"))))
44d10b1f
RW
2452 (build-system python-build-system)
2453 (arguments
2454 `(#:phases
2455 (modify-phases %standard-phases
2782bd51 2456 (add-before 'check 'disable-failing-test
44d10b1f
RW
2457 (lambda _
2458 ;; Disable failing test. See upstream bug report
2459 ;; https://github.com/pypa/virtualenv/issues/957
2460 (substitute* "tests/test_virtualenv.py"
2461 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2782bd51 2462 #t)))))
44d10b1f
RW
2463 (native-inputs
2464 `(("python-mock" ,python-mock)
2465 ("python-pytest" ,python-pytest)))
2466 (home-page "https://virtualenv.pypa.io/")
2467 (synopsis "Virtual Python environment builder")
2468 (description
2469 "Virtualenv is a tool to create isolated Python environments.")
2470 (license license:expat)))
2471
2472(define-public python2-virtualenv
2473 (package-with-python2 python-virtualenv))
2474
2475(define-public python-markupsafe
2476 (package
2477 (name "python-markupsafe")
753eb411 2478 (version "1.1.1")
44d10b1f
RW
2479 (source
2480 (origin
2481 (method url-fetch)
5182927c 2482 (uri (pypi-uri "MarkupSafe" version))
44d10b1f
RW
2483 (sha256
2484 (base32
753eb411 2485 "0sqipg4fk7xbixqd8kq6rlkxj664d157bdwbh93farcphf92x1r9"))))
44d10b1f 2486 (build-system python-build-system)
753eb411
MB
2487 (arguments
2488 `(#:modules ((ice-9 ftw)
2489 (srfi srfi-1)
2490 (srfi srfi-26)
2491 (guix build utils)
2492 (guix build python-build-system))
2493 #:phases (modify-phases %standard-phases
2494 (replace 'check
2495 (lambda _
2496 (let ((cwd (getcwd))
2497 (libdir (find (cut string-prefix? "lib." <>)
2498 (scandir "build"))))
2499 (setenv "PYTHONPATH"
2500 (string-append cwd "/build/" libdir ":"
2501 (getenv "PYTHONPATH")))
2502 (invoke "pytest" "-vv")))))))
2503 (native-inputs
2504 `(("python-pytest" ,python-pytest)))
44d10b1f
RW
2505 (home-page "https://github.com/mitsuhiko/markupsafe")
2506 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2507 (description
2508 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2509for Python.")
2510 (license license:bsd-3)))
2511
2512(define-public python2-markupsafe
2513 (package-with-python2 python-markupsafe))
2514
2515(define-public python-jinja2
2516 (package
2517 (name "python-jinja2")
4a5c7934 2518 (version "2.10.1")
44d10b1f
RW
2519 (source
2520 (origin
2521 (method url-fetch)
2522 (uri (pypi-uri "Jinja2" version))
2523 (sha256
2524 (base32
4a5c7934 2525 "04shqrs56aj04ipyqykj512rw2l0zfammvj9krawzxz7xc14yp06"))))
44d10b1f
RW
2526 (build-system python-build-system)
2527 (propagated-inputs
2528 `(("python-markupsafe" ,python-markupsafe)))
2529 (home-page "http://jinja.pocoo.org/")
2530 (synopsis "Python template engine")
2531 (description
2532 "Jinja2 is a small but fast and easy to use stand-alone template engine
2533written in pure Python.")
2534 (license license:bsd-3)))
2535
2536(define-public python2-jinja2
2537 (package-with-python2 python-jinja2))
2538
ba42a6bf
TLC
2539(define-public python-jinja2-time
2540 (package
2541 (name "python-jinja2-time")
2542 (version "0.2.0")
2543 (source
2544 (origin
2545 (method url-fetch)
2546 (uri (pypi-uri "jinja2-time" version))
2547 (sha256
2548 (base32
2549 "0h0dr7cfpjnjj8bgl2vk9063a53649pn37wnlkd8hxjy656slkni"))))
2550 (build-system python-build-system)
2551 (propagated-inputs
2552 `(("python-arrow" ,python-arrow)
2553 ("python-jinja2" ,python-jinja2)))
2554 (home-page
2555 "https://github.com/hackebrot/jinja2-time")
2556 (synopsis "Jinja2 Extension for Dates and Times")
2557 (description
2558 "This package provides an extension for the template engine Jinja2. It
2559adds a 'now' tag providing a convenient access to the arrow.now() API from
2560templates. A format string can be provided to control the output.")
2561 (license license:expat)))
2562
44d10b1f
RW
2563(define-public python-pystache
2564 (package
2565 (name "python-pystache")
2566 (version "0.5.4")
2567 (source (origin
2568 (method url-fetch)
2569 (uri (pypi-uri "pystache" version))
2570 (sha256
2571 (base32
2572 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2573 (build-system python-build-system)
2574 (arguments
2575 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
2576 (home-page "http://defunkt.io/pystache/")
2577 (synopsis "Python logic-less template engine")
2578 (description
2579 "Pystache is a Python implementation of the framework agnostic,
2580logic-free templating system Mustache.")
2581 (license license:expat)
2582 (properties `((python2-variant . ,(delay python2-pystache))))))
2583
2584(define-public python2-pystache
2585 (package (inherit (package-with-python2
2586 (strip-python2-variant python-pystache)))
2587 (arguments
2588 `(#:python ,python-2
2589 #:phases
2590 (modify-phases %standard-phases
2591 (replace 'check
2592 (lambda _
dfafc29b 2593 (invoke "python" "test_pystache.py"))))))))
44d10b1f
RW
2594
2595(define-public python-joblib
2596 (package
2597 (name "python-joblib")
2598 (version "0.13.0")
2599 (source (origin
2600 (method url-fetch)
2601 (uri (pypi-uri "joblib" version))
2602 (sha256
2603 (base32
2604 "0612nazad8dxmn3xghfrmjax6456l4xy6hn9cngs7vydi14ds7v5"))))
2605 (build-system python-build-system)
2606 (arguments
2607 `(#:phases
2608 (modify-phases %standard-phases
2609 (replace 'check
2610 (lambda _ (invoke "pytest" "-v" "joblib"))))))
2611 (native-inputs
2612 `(("python-pytest" ,python-pytest)))
2613 (home-page "https://joblib.readthedocs.io/")
2614 (synopsis "Using Python functions as pipeline jobs")
2615 (description
2616 "Joblib is a set of tools to provide lightweight pipelining in Python.
2617In particular, joblib offers: transparent disk-caching of the output values
2618and lazy re-evaluation (memoize pattern), easy simple parallel computing
2619logging and tracing of the execution.")
2620 (license license:bsd-3)))
2621
2622(define-public python2-joblib
2623 (package-with-python2 python-joblib))
2624
a3363341
VC
2625(define-public python-daemon
2626 (package
2627 (name "python-daemon")
2628 (version "2.2.3")
2629 (source
2630 (origin
2631 (method url-fetch)
2632 (uri (pypi-uri "python-daemon" version))
2633 (sha256
2634 (base32
2635 "09fcjdjzk9ywmpnrj62iyxqgcygzdafsz41qlrk2dknzbagcmzmg"))))
2636 (build-system python-build-system)
2637 (arguments
2638 `(#:phases
2639 (modify-phases %standard-phases
2640 (add-before 'check 'disable-tests
2641 (lambda _
2642 ;; FIXME: Determine why test fails
2643 (substitute* "test/test_daemon.py"
2644 (("test_detaches_process_context")
2645 "skip_test_detaches_process_context"))
2646 #t)))))
2647 (propagated-inputs
2648 `(("python-lockfile" ,python-lockfile)))
2649 (native-inputs
2650 `(("python-unittest2" ,python-unittest2)
2651 ("python-testtools" ,python-testtools)
2652 ("python-testscenarios" ,python-testscenarios)
2653 ("python-mock" ,python-mock)
2654 ("python-docutils" ,python-docutils)))
2655 (home-page "https://pagure.io/python-daemon/")
2656 (synopsis "Python library for making a Unix daemon process")
2657 (description "Python-daemon is a library that assists a Python program to
2658turn itself into a well-behaved Unix daemon process, as specified in PEP 3143.
2659
2660This library provides a @code{DaemonContext} class that manages the following
2661important tasks for becoming a daemon process:
2662@enumerate
2663@item Detach the process into its own process group.
2664@item Set process environment appropriate for running inside a chroot.
2665@item Renounce suid and sgid privileges.
2666@item Close all open file descriptors.
2667@item Change the working directory, uid, gid, and umask.
2668@item Set appropriate signal handlers.
2669@item Open new file descriptors for stdin, stdout, and stderr.
2670@item Manage a specified PID lock file.
2671@item Register cleanup functions for at-exit processing.
2672@end enumerate")
2673 ;; Only setup.py is gpl3+, everything else is apache 2.0 licensed.
2674 (license (list license:asl2.0 license:gpl3+))))
2675
44d10b1f
RW
2676(define-public python-docutils
2677 (package
2678 (name "python-docutils")
2679 (version "0.14")
2680 (source
2681 (origin
2682 (method url-fetch)
2683 (uri (pypi-uri "docutils" version))
2684 (sha256
2685 (base32
2686 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))
2687 (build-system python-build-system)
2688 (arguments
2689 '(#:tests? #f)) ; no setup.py test command
2690 (home-page "http://docutils.sourceforge.net/")
2691 (synopsis "Python Documentation Utilities")
2692 (description
2693 "Docutils is a modular system for processing documentation into useful
2694formats, such as HTML, XML, and LaTeX. For input Docutils supports
2695reStructuredText.")
2696 ;; Most of the source code is public domain, but some source files are
2697 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
2698 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
2699
2700(define-public python2-docutils
2701 (package-with-python2 python-docutils))
2702
2703(define-public python-pygments
2704 (package
2705 (name "python-pygments")
eed81080 2706 (version "2.4.2")
44d10b1f
RW
2707 (source
2708 (origin
2709 (method url-fetch)
2710 (uri (pypi-uri "Pygments" version))
2711 (sha256
2712 (base32
eed81080 2713 "15v2sqm5g12bqa0c7wikfh9ck2nl97ayizy1hpqhmws5gqalq748"))))
44d10b1f
RW
2714 (build-system python-build-system)
2715 (arguments
2716 ;; FIXME: Tests require sphinx, which depends on this.
2717 '(#:tests? #f))
2718 (home-page "http://pygments.org/")
2719 (synopsis "Syntax highlighting")
2720 (description
2721 "Pygments is a syntax highlighting package written in Python.")
2722 (license license:bsd-2)))
2723
2724(define-public python2-pygments
2725 (package-with-python2 python-pygments))
2726
0f0a5ef9
MC
2727(define-public python-bumpversion
2728 (package
2729 (name "python-bumpversion")
2730 (version "0.5.3")
2731 (source
2732 (origin
2733 (method url-fetch)
2734 (uri (pypi-uri "bumpversion" version))
2735 (sha256
2736 (base32
2737 "0zn7694yfipxg35ikkfh7kvgl2fissha3dnqad2c5bvsvmrwhi37"))))
2738 (build-system python-build-system)
2739 (home-page "https://github.com/peritus/bumpversion")
2740 (synopsis "Tool to bump software version")
2741 (description "This tool provides a command-line interface (CLI) to bump a
2742software version simply.")
2743 (license license:expat)))
2744
b24fd2c2
MC
2745(define-public python-deprecated
2746 (package
2747 (name "python-deprecated")
2748 (version "1.2.5")
2749 (source
2750 (origin
2751 (method git-fetch)
2752 (uri (git-reference
2753 (url "https://github.com/tantale/deprecated.git")
2754 (commit (string-append "v" version))))
2755 (file-name (git-file-name name version))
2756 (sha256
2757 (base32
2758 "14909glxxwwc4b9qpz2b9jdriwzi5n65ichw85xqppap5f79wcwz"))))
2759 (build-system python-build-system)
2760 (arguments
2761 `(#:phases (modify-phases %standard-phases
2762 (replace 'check
2763 (lambda _
2764 (invoke "pytest"))))))
2765 (propagated-inputs
2766 `(("python-wrapt" ,python-wrapt)))
2767 (native-inputs
2768 `(("python-bumpversion" ,python-bumpversion)
2769 ("python-pytest" ,python-pytest)
2770 ("python-pytest-cov" ,python-pytest-cov)
2771 ("python-sphinx" ,python-sphinx)
2772 ("python-tox" ,python-tox)))
2773 (home-page "https://github.com/tantale/deprecated")
2774 (synopsis "Python decorator to deprecate classes, functions or methods")
2775 (description "The @code{deprecated} decorator provides a convenient way to deprecate
2776to deprecate classes, functions or methods.")
2777 (license license:expat)))
2778
d5a998fa
MC
2779(define-public python-pygithub
2780 (package
2781 (name "python-pygithub")
749e38d7 2782 (version "1.43.8")
d5a998fa
MC
2783 (source
2784 ;; We fetch from the Git repo because there are no tests in the PyPI
2785 ;; archive.
2786 (origin
2787 (method git-fetch)
2788 (uri (git-reference
2789 (url "https://github.com/PyGithub/PyGithub.git")
2790 (commit (string-append "v" version))))
2791 (file-name (git-file-name name version))
2792 (sha256
749e38d7 2793 (base32 "1625v558xga5mwhl9jqmibywy5qafmg1vqrirqz6zfq1la1d22mw"))))
d5a998fa
MC
2794 (build-system python-build-system)
2795 (arguments
2796 `(#:phases (modify-phases %standard-phases
2797 ;; Some tests rely on the network.
2798 (add-after 'unpack 'disable-failing-tests
2799 (lambda _
2800 (substitute* "tests/Issue142.py"
2801 (("testDecodeJson") "disabled_testDecodeJson"))
2802 #t))
2803 (add-before 'check 'prepare-for-tests
2804 (lambda _
2805 (for-each (lambda (f)
2806 (chmod f #o666))
2807 (find-files "./tests"))
2808 (system* "python" "-m" "lib2to3" "-w" "-n" "tests")
2809 (setenv "PYTHONPATH"
2810 (string-append "./tests:" (getenv "PYTHONPATH")))
2811 #t)))))
2812 (propagated-inputs
2813 `(("python-deprecated" ,python-deprecated)
2814 ("python-pyjwt" ,python-pyjwt)
2815 ("python-requests" ,python-requests)))
2816 (native-inputs `(("python-httpretty" ,python-httpretty)))
2817 (home-page "https://pygithub.readthedocs.io/en/latest/")
2818 (synopsis "Python library for the GitHub API")
2819 (description "This library allows managing GitHub resources such as
2820repositories, user profiles, and organizations in your Python applications,
2821using version 3 of the GitHub application programming interface (API).")
2822 (license license:lgpl3+)))
2823
c0c0bb38
MC
2824(define-public python-rellu
2825 (package
2826 (name "python-rellu")
2827 (version "0.7")
2828 (source
2829 (origin
2830 (method url-fetch)
2831 (uri (pypi-uri "rellu" version))
2832 (sha256
2833 (base32
2834 "1w0arpj1sm7vh29nrbnca4pnp8sx42l07r17inwqcjjf9bhng66x"))))
2835 (build-system python-build-system)
2836 (propagated-inputs
2837 `(("python-invoke" ,python-invoke)
2838 ("python-pygithub" ,python-pygithub)))
2839 (home-page "https://github.com/robotframework/rellu")
2840 (synopsis "Utilities to create PyPI releases")
2841 (description "This collection of utilities contains tooling and templates
2842to assist in creating releases on GitHub and publishing them on PyPI. It is
2843designed to be used by Robot Framework and tools and libraries in its
2844ecosystem, but can naturally be used also by other projects.")
2845 (license license:asl2.0)))
2846
b9790285
MC
2847(define-public python-robotframework
2848 (package
2849 (name "python-robotframework")
1710b8f8 2850 (version "3.1.2")
b9790285
MC
2851 ;; There are no tests in the PyPI archive.
2852 (source
2853 (origin
2854 (method git-fetch)
2855 (uri (git-reference
2856 (url "https://github.com/robotframework/robotframework.git")
2857 (commit (string-append "v" version))))
2858 (file-name (git-file-name name version))
2859 (sha256
1710b8f8 2860 (base32 "16gnxy0qinh8fhs0qvhff5z2xh49c3cqgm0d7bfjw120df6x7fym"))
b9790285
MC
2861 (patches (search-patches
2862 "python-robotframework-honor-source-date-epoch.patch"))))
2863 (build-system python-build-system)
2864 (arguments
2865 `(#:phases (modify-phases %standard-phases
2866 (add-before 'build 'build-and-install-doc
2867 (lambda* (#:key outputs #:allow-other-keys)
2868 (let* ((doc-output (assoc-ref outputs "doc"))
2869 (doc (string-append doc-output "/share/"
2870 ,name "-" ,version "/")))
2871 (invoke "invoke" "library-docs" "all")
2872 (mkdir-p doc)
2873 (copy-recursively "doc/libraries"
2874 (string-append doc "/libraries"))
2875 #t)))
2876 (replace 'check
2877 (lambda _
2878 (invoke "python" "utest/run.py"))))))
2879 (native-inputs
2880 `(("python-invoke" ,python-invoke)
2881 ("python-rellu" ,python-rellu)
2882 ("python:tk" ,python "tk"))) ;used when building the HTML doc
2883 (outputs '("out" "doc"))
2884 (home-page "https://robotframework.org")
2885 (synopsis "Generic automation framework")
2886 (description "Robot Framework is a generic automation framework for
2887acceptance testing, acceptance test driven development (ATDD), and robotic
2888process automation (RPA).")
2889 (license license:asl2.0)))
2890
5b84c120
MC
2891(define-public python-robotframework-lint
2892 ;; There is no properly tagged release; the commit below seems to correspond
2893 ;; to the 0.9 stable release available from PyPI. The tests are not
2894 ;; included in the PyPI archive, so we fetch the sources from the upstream
2895 ;; Git repo.
2896 (let ((commit "e851879bab1f63e4e53b34a4dc8a67ed95102830")
2897 (revision "1"))
2898 (package
2899 (name "python-robotframework-lint")
2900 (version (git-version "0.9.0" revision commit))
2901 (source
2902 (origin
2903 (method git-fetch)
2904 (uri (git-reference
2905 (url "https://github.com/boakley/robotframework-lint.git")
2906 (commit commit)))
2907 (file-name (git-file-name name version))
2908 (sha256
2909 (base32
2910 "1p6fknqg5sb9qz5857ji4a877657vgfjm5v3zn45994parx6ml1m"))))
2911 (build-system python-build-system)
2912 (arguments
2913 `(#:phases
2914 (modify-phases %standard-phases
2915 (replace 'check
2916 (lambda _
2917 (invoke "python" "-m" "robot" "-A"
2918 "tests/conf/default.args" "tests"))))))
2919 (propagated-inputs
2920 `(("python-robotframework" ,python-robotframework)))
2921 (home-page "https://github.com/boakley/robotframework-lint/")
2922 (synopsis "Static analysis tool (linter) for Robot Framework")
2923 (description "This package provides the @code{rflint} command-line
2924utility, a static analysis tool (linter) for Robot Framework source files.")
2925 (license license:asl2.0))))
2926
c0c64f17
MC
2927(define-public python-robotframework-sshlibrary
2928 (package
2929 (name "python-robotframework-sshlibrary")
2930 (version "3.3.0")
2931 ;; There are no tests in the PyPI archive.
2932 (source
2933 (origin
2934 (method git-fetch)
2935 (uri (git-reference
2936 (url "https://github.com/robotframework/SSHLibrary.git")
2937 (commit (string-append "v" version))))
2938 (file-name (git-file-name name version))
2939 (sha256
2940 (base32
2941 "1mk6dz2jqqndbx4yji09012q6rmadnqdywi7czvj62b0s07dr3r2"))))
2942 (build-system python-build-system)
2943 (arguments
2944 `(#:phases
2945 (modify-phases %standard-phases
2946 (add-before 'build 'build-and-install-doc
2947 (lambda* (#:key outputs #:allow-other-keys)
2948 (let* ((doc-output (assoc-ref outputs "doc"))
2949 (doc (string-append doc-output "/share/"
2950 ,name "-" ,version "/")))
2951 (invoke "chmod" "-R" "+w" "docs")
2952 (invoke "invoke" "kw-docs" "project-docs")
2953 (mkdir-p doc)
2954 (for-each delete-file (find-files "docs" "\\.rst"))
2955 (copy-recursively "docs" doc)
2956 #t)))
2957 (replace 'check
2958 (lambda _
2959 ;; Some tests require an SSH server; we remove them.
2960 (delete-file "utest/test_client_api.py")
2961 (delete-file "utest/test_scp.py")
2962 (invoke "python" "utest/run.py"))))))
2963 (propagated-inputs
2964 `(("python-robotframework" ,python-robotframework)
2965 ("python-paramiko" ,python-paramiko)
2966 ("python-scp" ,python-scp)))
2967 (native-inputs
2968 `(("openssh" ,openssh)
2969 ("which" ,which)
2970 ;; To generate the documentation
2971 ("python-docutils" ,python-docutils)
2972 ("python-invoke" ,python-invoke)
2973 ("python-pygments" ,python-pygments)
2974 ("python-rellu" ,python-rellu)))
2975 (outputs '("out" "doc"))
2976 (home-page "https://github.com/robotframework/SSHLibrary")
2977 (synopsis "Robot Framework library for SSH and SFTP")
2978 (description "SSHLibrary is a Robot Framework library providing support
2979for SSH and SFTP. It has the following main usages:
2980@itemize @bullet
2981@item Executing commands on the remote machine, either blocking or non-blocking.
2982@item Writing and reading in an interactive shell.
2983@item Transferring files and directories over SFTP.
2984@item Ensuring that files and directories exist on the remote machine.
2985@end itemize")
2986 (license license:asl2.0)))
2987
13d825fc
MC
2988(define-public python-scp
2989 (package
2990 (name "python-scp")
2991 (version "0.13.2")
2992 (source
2993 (origin
2994 (method url-fetch)
2995 (uri (pypi-uri "scp" version))
2996 (sha256
2997 (base32
2998 "1crlpw9lnn58fs1c1rmh7s7s9y5gkgpgjsqlvg9qa51kq1knx7gg"))))
2999 (build-system python-build-system)
3000 (arguments
3001 '(#:tests? #f)) ;tests require an SSH server
3002 (propagated-inputs
3003 `(("python-paramiko" ,python-paramiko)))
3004 (home-page "https://github.com/jbardin/scp.py")
3005 (synopsis "SCP protocol module for Python and Paramiko")
3006 (description "The scp module extends the Paramiko library to send and
3007receive files via the SCP1 protocol, as implemented by the OpenSSH
3008@command{scp} program.")
3009 (license license:gpl2+)))
3010
44d10b1f
RW
3011(define-public python-rst.linker
3012 (package
3013 (name "python-rst.linker")
d37e8e53 3014 (version "1.11")
44d10b1f
RW
3015 (source
3016 (origin
3017 (method url-fetch)
3018 (uri (pypi-uri "rst.linker" version))
3019 (sha256
d37e8e53 3020 (base32 "0pqsfqqx8h0pq21k8l3k62kznrgaj2ala93c64s4d9rpbr4mgkd2"))))
44d10b1f
RW
3021 (build-system python-build-system)
3022 (propagated-inputs
3023 `(("python-dateutil" ,python-dateutil)
3024 ("python-six" ,python-six)))
3025 (native-inputs
3026 `(("python-setuptools-scm" ,python-setuptools-scm)))
3027 ;; Test would require path.py, which would introduce a cyclic dependence.
3028 (arguments `(#:tests? #f))
3029 ;; Note: As of version 1.7 the documentation is not worth building.
3030 (home-page "https://github.com/jaraco/rst.linker")
3031 (synopsis "Sphinx plugin to add links and timestamps")
3032 (description "rst.linker allows to automatically replace text by a
3033reStructuredText external reference or timestamps. It's primary purpose is to
3034augment the changelog, but it can be used for other documents, too.")
3035 (license license:expat)))
3036
3037(define-public python2-rst.linker
3038 (package-with-python2 python-rst.linker))
3039
3040(define-public python-feedgenerator
3041 (package
3042 (name "python-feedgenerator")
3043 (version "1.9")
3044 (source
3045 (origin
3046 (method url-fetch)
3047 (uri (pypi-uri "feedgenerator" version))
3048 (sha256
3049 (base32
3050 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
3051 (modules '((guix build utils)))
3052 (snippet
3053 '(begin
3054 ;; Remove pre-compiled .pyc files from source.
3055 (for-each delete-file-recursively
3056 (find-files "." "__pycache__" #:directories? #t))
3057 (for-each delete-file (find-files "." "\\.pyc$"))
3058 #t))))
3059 (build-system python-build-system)
3060 (propagated-inputs
3061 `(("python-pytz" ,python-pytz)
3062 ("python-six" ,python-six)))
3063 (home-page "https://github.com/getpelican/feedgenerator")
3064 (synopsis
3065 "Standalone version of Django's Atom/RSS feed generator")
3066 (description
3067 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
3068which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
3069 (license license:bsd-3)))
3070
3071(define-public python2-feedgenerator
3072 (package-with-python2 python-feedgenerator))
3073
3074(define-public python-toml
3075 (package
3076 (name "python-toml")
3077 (version "0.9.4")
3078 (source
3079 (origin
3080 (method url-fetch)
3081 (uri (pypi-uri "toml" version))
3082 (sha256
3083 (base32
3084 "0bdbpbip67wdm6c7xwc6mmbmskyradj4cdxn1iibj4fcx1nbv1lf"))))
3085 (build-system python-build-system)
3086 (arguments
3087 `(#:tests? #f)) ;no tests suite in release
3088 (home-page "https://github.com/uiri/toml")
3089 (synopsis "Library for TOML")
3090 (description
3091 "@code{toml} is a library for parsing and creating Tom's Obvious, Minimal
3092Language (TOML) configuration files.")
3093 (license license:expat)))
3094
346c8752
BG
3095(define-public python-jsonrpc-server
3096 (package
3097 (name "python-jsonrpc-server")
3098 (version "0.1.2")
3099 (source
3100 (origin
3101 (method url-fetch)
3102 (uri (pypi-uri "python-jsonrpc-server" version))
3103 (sha256
3104 (base32
3105 "0m4ykpcdy52x37n1ikysp07j7p8ialcdvvvsrjp3545sn7iiid09"))))
3106 (build-system python-build-system)
3107 (propagated-inputs
3108 `(("python-future" ,python-future)
3109 ("python-mock" ,python-mock)
3110 ("python-pytest" ,python-pytest)))
3111 (home-page
3112 "https://github.com/palantir/python-jsonrpc-server")
3113 (synopsis "JSON RPC 2.0 server library")
3114 (description
1df5407c 3115 "This package provides a JSON RPC 2.0 server library for Python.")
346c8752
BG
3116 (license license:expat)))
3117
56f4ad47
BG
3118(define-public python-pydocstyle
3119 (package
3120 (name "python-pydocstyle")
3121 (version "3.0.0")
3122 (source
3123 (origin
3124 (method url-fetch)
3125 (uri (pypi-uri "pydocstyle" version))
3126 (sha256
3127 (base32
3128 "1m1xv9clkg9lgzyza6dnj359z04vh5g0h49nhzghv7lg81gchhap"))))
3129 (build-system python-build-system)
3130 (propagated-inputs
3131 `(("python-six" ,python-six)
3132 ("python-snowballstemmer" ,python-snowballstemmer)))
3133 (home-page
3134 "https://github.com/PyCQA/pydocstyle/")
3135 (synopsis "Python docstring style checker")
3136 (description
3137 "This package provides a style checker for the Python Language
3138Server (PLS).")
3139 (license license:expat)))
3140
be4d840c 3141(define-public python-language-server
808dd2d0
BL
3142 (package
3143 (name "python-language-server")
3144 (version "0.29.1")
3145 (source
3146 (origin
3147 (method url-fetch)
3148 (uri (pypi-uri "python-language-server" version))
3149 (sha256
3150 (base32
3151 "1f8qlflh6j3s7qfmzhirpl8fgidl6f0qbakdmiml96wdxzvka0s3"))))
3152 (build-system python-build-system)
3153 (propagated-inputs
3154 `(("python-pluggy" ,python-pluggy)
3155 ("python-jsonrpc-server" ,python-jsonrpc-server)
3156 ("python-jedi" ,python-jedi)
3157 ("python-yapf" ,python-yapf)
3158 ("python-pyflakes" ,python-pyflakes)
3159 ("python-pydocstyle" ,python-pydocstyle)
3160 ("python-pycodestyle" ,python-pycodestyle)
3161 ("python-mccabe" ,python-mccabe)
3162 ("python-rope" ,python-rope)
3163 ("python-autopep8" ,python-autopep8)
3164 ("python-flake8" ,python-flake8)
3165 ("python-pylint" ,python-pylint)))
3166 (home-page "https://github.com/palantir/python-language-server")
3167 (synopsis "Python implementation of the Language Server Protocol")
3168 (description
3169 "The Python Language Server (pyls) is an implementation of the Python 3
be4d840c
BG
3170language specification for the Language Server Protocol (LSP). This tool is
3171used in text editing environments to provide a complete and integrated
3172feature-set for programming Python effectively.")
808dd2d0 3173 (license license:expat)))
be4d840c 3174
44d10b1f
RW
3175(define-public python-black
3176 (package
3177 (name "python-black")
3178 (version "18.6b4")
3179 (source
3180 (origin
3181 (method url-fetch)
3182 (uri (pypi-uri "black" version))
3183 (sha256
3184 (base32
3185 "0i4sfqgz6w15vd50kbhi7g7rifgqlf8yfr8y78rypd56q64qn592"))))
3186 (build-system python-build-system)
3187 (arguments
3188 `(#:phases
3189 (modify-phases %standard-phases
3190 (add-after 'patch-source-shebangs 'patch-extra-shebangs
3191 (lambda _
3192 (let ((python3 (which "python3")))
3193 (substitute* '("tests/data/fmtonoff.py"
3194 "tests/data/string_prefixes.py"
3195 "tests/data/function.py")
3196 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
3197 (string-append "#!" python3 (if (string? minor-version)
3198 minor-version
3199 ""))))))))))
3200 (propagated-inputs
3201 `(("python-click" ,python-click)
3202 ("python-attrs" ,python-attrs)
3203 ("python-appdirs" ,python-appdirs)
3204 ("python-toml" ,python-toml)))
3205 (home-page "https://github.com/ambv/black")
3206 (synopsis "The uncompromising code formatter")
3207 (description "Black is the uncompromising Python code formatter.")
3208 (license license:expat)))
3209
3210(define-public python-blinker
3211 (package
3212 (name "python-blinker")
3213 (version "1.4")
3214 (source
3215 (origin
3216 (method url-fetch)
3217 (uri (pypi-uri "blinker" version))
3218 (sha256
3219 (base32
3220 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
3221 (build-system python-build-system)
3222 (home-page "http://pythonhosted.org/blinker/")
3223 (synopsis "Fast, simple object-to-object and broadcast signaling")
3224 (description
3225 "Blinker provides a fast dispatching system that allows any number of
3226interested parties to subscribe to events, or \"signals\".")
3227 (license license:expat)))
3228
3229(define-public python2-blinker
3230 (package-with-python2 python-blinker))
3231
3232(define-public pelican
3233 (package
3234 (name "pelican")
aa71b690 3235 (version "4.0.1")
44d10b1f
RW
3236 (source
3237 (origin
3238 (method url-fetch)
3239 (uri (pypi-uri "pelican" version))
3240 (sha256
3241 (base32
aa71b690 3242 "05yda7n6r0ll18fpdjzkzyr0ls8hbb86fnjyb33k9jvv5avah2lr"))))
44d10b1f
RW
3243 (build-system python-build-system)
3244 (propagated-inputs
3245 `(("python-feedgenerator" ,python-feedgenerator)
3246 ("python-jinja2" ,python-jinja2)
3247 ("python-pygments" ,python-pygments)
3248 ("python-docutils" ,python-docutils)
3249 ("python-pytz" ,python-pytz)
3250 ("python-blinker" ,python-blinker)
3251 ("python-unidecode" ,python-unidecode)
3252 ("python-six" ,python-six)
3253 ("python-dateutil" ,python-dateutil)
3254 ("python-markdown" ,python-markdown)))
3255 (home-page "https://getpelican.com/")
3256 (arguments
3257 `(;; XXX Requires a lot more packages to do unit tests :P
3258 #:tests? #f
3259 #:phases (modify-phases %standard-phases
3260 (add-before
3261 'install 'adjust-requires
3262 ;; Since feedgenerator is installed from git, it doesn't
3263 ;; conform to the version requirements.
3264 ;;
3265 ;; We *do have* "feedgenerator >= 1.6", but strip off the
3266 ;; version requirement so setuptools doesn't get confused.
3267 (lambda _
3268 (substitute* "setup.py"
3269 (("['\"]feedgenerator.*?['\"]")
3270 "'feedgenerator'")))))))
3271 (synopsis "Python-based static site publishing system")
3272 (description
3273 "Pelican is a tool to generate a static blog from reStructuredText,
3274Markdown input files, and more. Pelican uses Jinja2 for templating
3275and is very extensible.")
3276 (license license:agpl3+)))
3277
8c141421
JH
3278(define-public mallard-ducktype
3279 (package
3280 (name "mallard-ducktype")
12cc3da5 3281 (version "1.0.2")
8c141421
JH
3282 (source
3283 (origin
3284 (method git-fetch)
12cc3da5
JH
3285 ;; git-reference because tests are not included in pypi source tarball
3286 ;; https://issues.guix.gnu.org/issue/36755#2
8c141421
JH
3287 (uri (git-reference
3288 (url "https://github.com/projectmallard/mallard-ducktype.git")
3289 (commit version)))
3290 (file-name (git-file-name name version))
3291 (sha256
3292 (base32
12cc3da5 3293 "1jk9bfz7g04ip78s03b0xak6d54rj4h9zpgadkziy1ji216g6y4c"))))
8c141421 3294 (build-system python-build-system)
5246655f
EF
3295 (arguments
3296 '(#:phases
3297 (modify-phases %standard-phases
3298 (replace 'check
3299 (lambda _
3300 (with-directory-excursion "tests"
3301 (invoke "sh" "runtests")))))))
8c141421
JH
3302 (home-page "http://projectmallard.org")
3303 (synopsis "Convert Ducktype to Mallard documentation markup")
3304 (description
3305 "Ducktype is a lightweight syntax that can represent all the semantics
3306of the Mallard XML documentation system. Ducktype files can be converted to
3307Mallard using the @command{ducktype} tool. The yelp-tools package
3308provides additional functionality on the produced Mallard documents.")
3309 (license license:expat)))
3310
44d10b1f
RW
3311(define-public python-cython
3312 (package
3313 (name "python-cython")
6fd27a71 3314 (version "0.29.13")
44d10b1f
RW
3315 (source
3316 (origin
3317 (method url-fetch)
3318 (uri (pypi-uri "Cython" version))
3319 (sha256
6fd27a71
TGR
3320 (base32
3321 "13k37lrcgagwwnzr5bzririsscb793vndj234d475x1h9ad0d7f2"))))
44d10b1f
RW
3322 (build-system python-build-system)
3323 ;; we need the full python package and not just the python-wrapper
3324 ;; because we need libpython3.3m.so
3325 (inputs
3326 `(("python" ,python)))
3327 (arguments
3328 `(#:phases
3329 (modify-phases %standard-phases
3330 (add-before 'check 'set-HOME
3331 ;; some tests require access to "$HOME/.cython"
3332 (lambda _ (setenv "HOME" "/tmp") #t))
3333
3334 ;; FIXME: These tests started failing on armhf after the 0.28 update
3335 ;; (commit c69d11c5930), both with an error such as this:
3336 ;; compiling (cpp) and running dictcomp ...
3337 ;; === C/C++ compiler error output: ===
3338 ;; ‘
3339 ;; dictcomp.cpp:5221: confused by earlier errors, bailing out
3340 ;; See <https://hydra.gnu.org/build/2948724> for logs.
3341 ,@(if (target-arm32?)
3342 `((add-before 'check 'disable-failing-tests
3343 (lambda _
3344 (let ((disabled-tests (open-file "tests/bugs.txt" "a")))
3345 (for-each (lambda (test)
3346 (format disabled-tests "~a\n" test))
3347 '("memslice" "dictcomp"))
3348 (close-port disabled-tests)))))
3349 '())
3350
3351 (replace 'check
3352 (lambda _
e9194eb0
MB
3353 ;; Disable compiler optimizations to greatly reduce the running
3354 ;; time of the test suite.
3355 (setenv "CFLAGS" "-O0")
3356
3357 (invoke "python" "runtests.py" "-vv"
3358 "-j" (number->string (parallel-job-count))))))))
f319409b 3359 (home-page "https://cython.org/")
44d10b1f
RW
3360 (synopsis "C extensions for Python")
3361 (description "Cython is an optimising static compiler for both the Python
3362programming language and the extended Cython programming language. It makes
3363writing C extensions for Python as easy as Python itself.")
3364 (license license:asl2.0)
3365 (properties `((python2-variant . ,(delay python2-cython))))))
3366
3367(define-public python2-cython
da460865
MB
3368 (let ((base (package-with-python2 (strip-python2-variant python-cython))))
3369 (package
3370 (inherit base)
3371 (name "python2-cython")
3372 (inputs
3373 `(("python-2" ,python-2))) ;this is not automatically changed
3374 (arguments
3375 (substitute-keyword-arguments (package-arguments base)
3376 ((#:phases phases)
3377 `(modify-phases ,phases
3378 (add-before 'check 'adjust-test_embed
3379 (lambda _
3380 (substitute* "runtests.py"
3381 ;; test_embed goes great lengths to find the static libpythonX.Y.a
3382 ;; so it can give the right -L flag to GCC when embedding static
3383 ;; builds of Python. It is unaware that the Python "config"
3384 ;; directory (where the static library lives) was renamed in
3385 ;; Python 3, and falls back to sysconfig.get_config_var('LIBDIR'),
3386 ;; which works fine, because that is where the shared library is.
3387 ;;
3388 ;; It also appears to be unaware that the Makefile in Demos/embed
3389 ;; already unconditionally pass the static library location to GCC,
3390 ;; after checking sysconfig.get_config_var('LIBPL).
3391 ;;
3392 ;; The effect is that the linker is unable to resolve libexpat
3393 ;; symbols when building for Python 2, because neither the Python 2
3394 ;; shared library nor Expat is available. To fix it, we can either
3395 ;; add Expat as an input and make it visible to the linker, or just
3396 ;; prevent it from overriding the Python shared library location.
3397 ;; The end result is identical, so we take the easy route.
3398 ((" or libname not in os\\.listdir\\(libdir\\)")
3399 ""))
3400 #t)))))))))
44d10b1f
RW
3401
3402;; The RPython toolchain currently does not support Python 3.
3403(define-public python2-rpython
3404 (package
3405 (name "python2-rpython")
3406 (version "0.2.1")
3407 (source
3408 (origin
3409 (method url-fetch)
3410 (uri (pypi-uri "rpython" version))
3411 (sha256
3412 (base32
3413 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
3414 (build-system python-build-system)
3415 (arguments `(#:python ,python-2))
3416 (native-inputs
3417 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
3418 (home-page "https://rpython.readthedocs.org")
3419 (synopsis "Framework for implementing interpreters and virtual machines")
3420 (description "RPython is a translation and support framework for
3421producing implementations of dynamic languages, emphasizing a clean separation
3422between language specification and implementation aspects.")
3423 (license license:expat)))
3424
3425;; NOTE: when upgrading numpy please make sure that python-pandas and
3426;; python-scipy still build, as these three packages are often used together.
3427(define-public python-numpy
3428 (package
3429 (name "python-numpy")
8e5fbd5d 3430 (version "1.17.3")
44d10b1f
RW
3431 (source
3432 (origin
3433 (method url-fetch)
3434 (uri (string-append
3435 "https://github.com/numpy/numpy/releases/download/v"
3436 version "/numpy-" version ".tar.gz"))
3437 (sha256
3438 (base32
8e5fbd5d 3439 "1ak9dmjja0q90a7fsxli51ypcwssh8c4pb6f8wkrsnf2xgdk6dy9"))))
44d10b1f
RW
3440 (build-system python-build-system)
3441 (inputs
3442 `(("openblas" ,openblas)
3443 ("lapack" ,lapack)))
3444 (native-inputs
3445 `(("python-cython" ,python-cython)
3446 ("python-pytest" ,python-pytest)
3447 ("gfortran" ,gfortran)))
3448 (arguments
3449 `(#:phases
3450 (modify-phases %standard-phases
3451 (add-before 'build 'configure-blas-lapack
3452 (lambda* (#:key inputs #:allow-other-keys)
3453 (call-with-output-file "site.cfg"
3454 (lambda (port)
3455 (format port
3456 "[openblas]
3457libraries = openblas
3458library_dirs = ~a/lib
3459include_dirs = ~a/include
3460
3461# backslash-n to make emacs happy
3462\n[lapack]
3463lapack_libs = lapack
3464library_dirs = ~a/lib
3465include_dirs = ~a/include
3466"
3467 (assoc-ref inputs "openblas")
3468 (assoc-ref inputs "openblas")
3469 (assoc-ref inputs "lapack")
3470 (assoc-ref inputs "lapack"))))
3471 #t))
3472 (add-before 'build 'fix-executable-paths
3473 (lambda* (#:key inputs #:allow-other-keys)
3474 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
3475 ;; instead of /bin/sh.
3476 (substitute* "numpy/distutils/exec_command.py"
3477 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
3478 (string-append match-start (assoc-ref inputs "bash") match-end)))
3479 ;; Use "gcc" executable, not "cc".
3480 (substitute* "numpy/distutils/system_info.py"
3481 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3482 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
3483 #t))
3484 ;; Tests can only be run after the library has been installed and not
3485 ;; within the source directory.
3486 (delete 'check)
3487 (add-after 'install 'check
3488 (lambda* (#:key outputs inputs #:allow-other-keys)
3489 ;; Make installed package available for running the tests
3490 (add-installed-pythonpath inputs outputs)
3491 ;; Make sure "f2py" etc is found.
3492 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
3493 ":" (getenv "PATH")))
3494 (with-directory-excursion "/tmp"
3495 (invoke "python" "-c"
3496 "import numpy; numpy.test(verbose=2)")))))))
3497 (home-page "http://www.numpy.org/")
3498 (synopsis "Fundamental package for scientific computing with Python")
3499 (description "NumPy is the fundamental package for scientific computing
3500with Python. It contains among other things: a powerful N-dimensional array
3501object, sophisticated (broadcasting) functions, tools for integrating C/C++
3502and Fortran code, useful linear algebra, Fourier transform, and random number
3503capabilities.")
adb396ea 3504 (properties `((python2-variant . ,(delay python2-numpy))))
44d10b1f
RW
3505 (license license:bsd-3)))
3506
adb396ea 3507;; Numpy 1.16.x are the last versions that support Python 2.
44d10b1f 3508(define-public python2-numpy
adb396ea
MB
3509 (let ((numpy (package-with-python2
3510 (strip-python2-variant python-numpy))))
3511 (package/inherit
3512 numpy
3513 (version "1.16.5")
3514 (source (origin
3515 (method url-fetch)
3516 (uri (string-append
3517 "https://github.com/numpy/numpy/releases/download/v"
3518 version "/numpy-" version ".tar.gz"))
3519 (sha256
3520 (base32
3521 "0lg1cycxzi4rvvrd5zxinpdz0ni792fpx6xjd75z1923zcac8qrb")))))))
44d10b1f
RW
3522
3523;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
3524;; interest only for legacy code going back to NumPy's predecessor
3525;; Numeric.
3526(define-public python2-numpy-1.8
3527 (package (inherit python2-numpy)
3528 (version "1.8.2")
3529 (source
3530 (origin
3531 (method url-fetch)
3532 (uri (string-append
3533 "https://github.com/numpy/numpy/archive/v" version ".tar.gz"))
3534 (file-name (string-append "python2-numpy-" version ".tar.gz"))
3535 (sha256
3536 (base32
3537 "0sc20gz1b17xnyrkp5frca3ql5qfalpv916hfg2kqxpwr6jg0f1g"))))
3538 (arguments
3539 (substitute-keyword-arguments (package-arguments python2-numpy)
3540 ((#:phases phases)
3541 `(modify-phases ,phases
3542 (replace 'configure-blas-lapack
3543 (lambda* (#:key inputs #:allow-other-keys)
3544 (call-with-output-file "site.cfg"
3545 (lambda (port)
3546 (format port
3547 "[openblas]
3548libraries = openblas,lapack
3549library_dirs = ~a/lib:~a/lib
3550include_dirs = ~a/include:~a/include
3551"
3552 (assoc-ref inputs "openblas")
3553 (assoc-ref inputs "lapack")
3554 (assoc-ref inputs "openblas")
3555 (assoc-ref inputs "lapack"))))
3556 #t))))))
3557 (native-inputs
3558 `(("python2-nose" ,python2-nose)))
3559 (description "NumPy is the fundamental package for scientific computing
3560with Python. It contains among other things: a powerful N-dimensional array
3561object, sophisticated (broadcasting) functions, tools for integrating C/C++
3562and Fortran code, useful linear algebra, Fourier transform, and random number
3563capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
3564that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
3565Numeric.")
3566 (license license:bsd-3)))
3567
3568(define-public python-munch
3569 (package
3570 (name "python-munch")
3571 (version "2.0.4")
3572 (source
3573 (origin
3574 (method url-fetch)
3575 (uri (pypi-uri "munch" version))
3576 (sha256
3577 (base32
3578 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3579 (build-system python-build-system)
3580 (home-page "https://github.com/Infinidat/munch")
3581 (synopsis "Dot-accessible dictionary")
3582 (description "Munch is a dot-accessible dictionary similar to JavaScript
3583objects.")
3584 (license license:expat)))
3585
3586(define-public python2-munch
3587 (package-with-python2 python-munch))
3588
3589(define-public python-colormath
3590 (package
3591 (name "python-colormath")
3592 (version "3.0.0")
3593 (source
3594 (origin
3595 (method url-fetch)
3596 (uri (pypi-uri "colormath" version))
3597 (sha256
3598 (base32
3599 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
3600 (build-system python-build-system)
3601 (propagated-inputs
3602 `(("python-networkx" ,python-networkx)
3603 ("python-numpy" ,python-numpy)))
3604 (home-page "https://github.com/gtaylor/python-colormath")
3605 (synopsis "Color math and conversion library")
3606 (description
3607 "This is a Python library for color math and conversions.")
3608 (license license:bsd-3)))
3609
3610(define-public python2-colormath
3611 (package-with-python2 python-colormath))
3612
3613(define-public python-spectra
3614 (package
3615 (name "python-spectra")
3616 (version "0.0.11")
3617 (source
3618 (origin
3619 (method url-fetch)
3620 (uri (pypi-uri "spectra" version))
3621 (sha256
3622 (base32
3623 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
3624 (build-system python-build-system)
3625 (arguments
3626 `(#:phases
3627 (modify-phases %standard-phases
3628 (replace 'check
38ec0f6a 3629 (lambda _ (invoke "nosetests" "-v"))))))
44d10b1f
RW
3630 (propagated-inputs
3631 `(("python-colormath" ,python-colormath)))
3632 (native-inputs
3633 `(("python-nose" ,python-nose)))
3634 (home-page "https://github.com/jsvine/spectra")
3635 (synopsis "Color scales and color conversion")
3636 (description
3637 "This package provides a Python library intended to make color math,
3638color scales, and color space conversion easy. It has support for:
3639
3640@enumerate
3641@item Color scales
3642@item Color ranges
3643@item Color blending
3644@item Brightening/darkening colors
3645@item Saturating/desaturating colors
3646@item Conversion to/from multiple color spaces.
3647@end enumerate\n")
3648 (license license:expat)))
3649
3650(define-public python2-spectra
3651 (package-with-python2 python-spectra))
3652
3653(define-public python-numpy-documentation
3654 (package
3655 (name "python-numpy-documentation")
3656 (version (package-version python-numpy))
3657 (source (package-source python-numpy))
3658 (build-system python-build-system)
3659 (native-inputs
3660 `(("python-matplotlib" ,python-matplotlib)
3661 ("python-numpy" ,python-numpy)
3662 ("pkg-config" ,pkg-config)
3663 ("python-sphinx" ,python-sphinx)
3664 ("python-numpydoc" ,python-numpydoc)
f75aa97f 3665 ("texlive" ,(texlive-union (list texlive-fonts-cm-super
44d10b1f
RW
3666 texlive-fonts-ec
3667 texlive-generic-ifxetex
3668 texlive-generic-pdftex
f75aa97f 3669 texlive-amsfonts
44d10b1f
RW
3670 texlive-latex-capt-of
3671 texlive-latex-cmap
3672 texlive-latex-environ
3673 texlive-latex-eqparbox
3674 texlive-latex-etoolbox
3675 texlive-latex-expdlist
3676 texlive-latex-fancyhdr
3677 texlive-latex-fancyvrb
3678 texlive-latex-fncychap
3679 texlive-latex-float
3680 texlive-latex-framed
3681 texlive-latex-geometry
3682 texlive-latex-graphics
3683 texlive-latex-hyperref
3684 texlive-latex-mdwtools
3685 texlive-latex-multirow
3686 texlive-latex-needspace
3687 texlive-latex-oberdiek
3688 texlive-latex-parskip
3689 texlive-latex-preview
3690 texlive-latex-tabulary
3691 texlive-latex-threeparttable
3692 texlive-latex-titlesec
3693 texlive-latex-trimspaces
3694 texlive-latex-ucs
3695 texlive-latex-upquote
3696 texlive-latex-url
3697 texlive-latex-varwidth
3698 texlive-latex-wrapfig)))
3699 ("texinfo" ,texinfo)
3700 ("perl" ,perl)
3701 ("scipy-sphinx-theme"
3702 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
3703 (method git-fetch)
3704 (uri (git-reference
3705 (url "https://github.com/scipy/scipy-sphinx-theme.git")
3706 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
3707 (sha256
3708 (base32
3709 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
3710 ,@(package-native-inputs python-numpy)))
3711 (arguments
3712 `(#:tests? #f ; we're only generating the documentation
3713 #:phases
3714 (modify-phases %standard-phases
3715 (delete 'build)
3716 (replace 'install
3717 (lambda* (#:key inputs outputs #:allow-other-keys)
3718 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3719 (doc (string-append
3720 data "/doc/" ,name "-"
3721 ,(package-version python-numpy)))
3722 (info-reader (string-append data "/info"))
3723 (html (string-append doc "/html"))
3724 (scipy-sphinx-theme "scipy-sphinx-theme")
3725 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
3726 (pyver ,(string-append "PYVER=")))
3727
3728 ;; FIXME: this is needed to for texlive-union to generate
3729 ;; fonts, which are not found.
3730 (setenv "HOME" "/tmp")
3731
3732 (with-directory-excursion "doc"
3733 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
3734 (mkdir-p html)
4fc898da
RW
3735 (invoke "make" "html" pyver)
3736 (invoke "make" "latex" "PAPER=a4" pyver)
3737 (invoke "make" "-C" "build/latex"
44d10b1f
RW
3738 "all-pdf" "PAPER=a4" pyver)
3739 ;; FIXME: Generation of the info file fails.
4fc898da 3740 ;; (invoke "make" "info" pyver)
44d10b1f
RW
3741 ;; (mkdir-p info)
3742 ;; (copy-file "build/texinfo/numpy.info"
3743 ;; (string-append info "/numpy.info"))
3744 (for-each (lambda (file)
3745 (copy-file (string-append "build/latex" file)
3746 (string-append doc file)))
3747 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3748 (with-directory-excursion "build/html"
3749 (for-each (lambda (file)
3750 (let* ((dir (dirname file))
3751 (tgt-dir (string-append html "/" dir)))
3752 (unless (equal? "." dir)
3753 (mkdir-p tgt-dir))
3754 (install-file file html)))
3755 (find-files "." ".*")))))
3756 #t)))))
3757 (home-page (package-home-page python-numpy))
3758 (synopsis "Documentation for the python-numpy package")
3759 (description (package-description python-numpy))
3760 (license (package-license python-numpy))))
3761
3762(define-public python2-numpy-documentation
3763 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
3764 (package
3765 (inherit numpy-documentation)
3766 (native-inputs `(("python2-functools32" ,python2-functools32)
3767 ,@(package-native-inputs numpy-documentation))))))
3768
3769(define-public python-pygit2
3770 (package
3771 (name "python-pygit2")
dac8b275 3772 (version "0.28.2")
44d10b1f
RW
3773 (source
3774 (origin
3775 (method url-fetch)
3776 (uri (pypi-uri "pygit2" version))
3777 (sha256
dac8b275 3778 (base32 "11kzj5mjkspvplnpdb6bj8dcj6rgmkk986k8hjcklyg5yaxkz32d"))))
44d10b1f
RW
3779 (build-system python-build-system)
3780 (arguments
c3ecab0d 3781 '(#:tests? #f)) ; tests don't run correctly in our environment
44d10b1f
RW
3782 (propagated-inputs
3783 `(("python-six" ,python-six)
3784 ("python-cffi" ,python-cffi)
3785 ("libgit2" ,libgit2)
3786 ("python-tox" ,python-tox)))
3787 (native-inputs
3788 `(("python-pytest" ,python-pytest)))
3789 (home-page "https://github.com/libgit2/pygit2")
3790 (synopsis "Python bindings for libgit2")
3791 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3792library, libgit2 implements Git plumbing.")
3793 ;; GPL2.0 only, with linking exception.
3794 (license license:gpl2)))
3795
3796(define-public python2-pygit2
3797 (package-with-python2 python-pygit2))
3798
3799(define-public python-pyparsing
3800 (package
3801 (name "python-pyparsing")
6d3cff5a 3802 (version "2.3.1")
44d10b1f
RW
3803 (source
3804 (origin
3805 (method url-fetch)
3806 (uri (pypi-uri "pyparsing" version))
3807 (sha256
6d3cff5a 3808 (base32 "0yk6xl885b91dmlhlsap7x78hk2rdr879fln9anbq6k4ca42djb6"))))
44d10b1f
RW
3809 (build-system python-build-system)
3810 (outputs '("out" "doc"))
3811 (arguments
3812 `(#:tests? #f ; no test target
3813 #:phases
3814 (modify-phases %standard-phases
3815 (add-after 'install 'install-doc
3816 (lambda* (#:key outputs #:allow-other-keys)
3817 (let* ((doc (string-append (assoc-ref outputs "doc")
3818 "/share/doc/" ,name "-" ,version))
3819 (html-doc (string-append doc "/html"))
3820 (examples (string-append doc "/examples")))
3821 (mkdir-p html-doc)
3822 (mkdir-p examples)
3823 (for-each
3824 (lambda (dir tgt)
3825 (map (lambda (file)
3826 (install-file file tgt))
3827 (find-files dir ".*")))
3828 (list "docs" "htmldoc" "examples")
3829 (list doc html-doc examples))
3830 #t))))))
3831 (home-page "https://github.com/pyparsing/pyparsing")
3832 (synopsis "Python parsing class library")
3833 (description
3834 "The pyparsing module is an alternative approach to creating and
3835executing simple grammars, vs. the traditional lex/yacc approach, or the use
3836of regular expressions. The pyparsing module provides a library of classes
3837that client code uses to construct the grammar directly in Python code.")
3838 (license license:expat)))
3839
3840(define-public python2-pyparsing
3841 (package-with-python2 python-pyparsing))
3842
3843(define-public python-numpydoc
3844 (package
3845 (name "python-numpydoc")
3846 (version "0.8.0")
3847 (source
3848 (origin
3849 (method url-fetch)
3850 (uri (pypi-uri "numpydoc" version))
3851 (sha256
3852 (base32
3853 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
3854 (build-system python-build-system)
3855 (propagated-inputs
3856 `(("python-sphinx" ,python-sphinx)))
3857 (native-inputs
3858 `(("python-nose" ,python-nose)))
3859 (home-page "https://pypi.python.org/pypi/numpydoc")
3860 (synopsis
3861 "Numpy's Sphinx extensions")
3862 (description
3863 "Sphinx extension to support docstrings in Numpy format.")
3864 (license license:bsd-2)))
3865
3866(define-public python2-numpydoc
3867 (package-with-python2 python-numpydoc))
3868
3869(define-public python-numexpr
3870 (package
3871 (name "python-numexpr")
3872 (version "2.6.5")
3873 (source
3874 (origin
3875 (method url-fetch)
3876 (uri (pypi-uri "numexpr" version))
3877 (sha256
3878 (base32
3879 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
3880 (build-system python-build-system)
3881 (arguments `(#:tests? #f)) ; no tests included
3882 (propagated-inputs
3883 `(("python-numpy" ,python-numpy)))
3884 (home-page "https://github.com/pydata/numexpr")
3885 (synopsis "Fast numerical expression evaluator for NumPy")
3886 (description
3887 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3888expressions that operate on arrays are accelerated and use less memory than
3889doing the same calculation in Python. In addition, its multi-threaded
3890capabilities can make use of all your cores, which may accelerate
3891computations, most specially if they are not memory-bounded (e.g. those using
3892transcendental functions).")
3893 (license license:expat)))
3894
3895(define-public python2-numexpr
3896 (package-with-python2 python-numexpr))
3897
3898(define-public python-cycler
3899 (package
3900 (name "python-cycler")
3901 (version "0.10.0")
3902 (source (origin
3903 (method url-fetch)
3904 (uri (pypi-uri "cycler" version))
3905 (sha256
3906 (base32
3907 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
3908 (build-system python-build-system)
3909 (arguments
3910 ;; XXX: The current version requires 'coveralls' which we don't have.
3911 ;; Enable this for the next release which uses 'python-pytest'.
3912 '(#:tests? #f))
3913 (propagated-inputs
3914 `(("python-six" ,python-six)))
3915 (home-page "http://matplotlib.org/cycler/")
3916 (synopsis "Composable keyword argument iterator")
3917 (description
3918 "When using @code{matplotlib} and plotting more than one line, it is
3919common to want to be able to want to be able to cycle over one or more artist
3920styles; but the plotting logic can quickly become involved.
3921To address this and enable easy cycling over arbitrary @code{kwargs}, the
3922@code{Cycler} class was developed.")
3923 (license license:bsd-3)))
3924
3925(define-public python2-cycler
3926 (package-with-python2 python-cycler))
3927
3928(define-public python-colorspacious
3929 (package
3930 (name "python-colorspacious")
53a3ebed 3931 (version "1.1.2")
44d10b1f 3932 (source
dee92e65
TGR
3933 (origin
3934 (method git-fetch)
3935 (uri (git-reference
3936 (url "https://github.com/njsmith/colorspacious.git")
3937 (commit (string-append "v" version))))
3938 (file-name (git-file-name name version))
3939 (sha256
53a3ebed 3940 (base32 "0x7nkphr6g5ql5fvgss8l56rgiyjgh6fm8zzs73i94ci9wzlm63w"))))
44d10b1f
RW
3941 (build-system python-build-system)
3942 (propagated-inputs
3943 `(("python-numpy" ,python-numpy)))
3944 (native-inputs
3945 `(("python-nose" ,python-nose)))
3946 (arguments
3947 `(#:phases
3948 (modify-phases %standard-phases
3949 (replace 'check
3950 (lambda _
c988afda 3951 (invoke "nosetests" "--all-modules" "-v" "colorspacious"))))))
44d10b1f
RW
3952 (home-page "https://github.com/njsmith/colorspacious")
3953 (synopsis "Python library for colorspace conversions")
3954 (description "@code{colorspacious} is a Python library that lets you
3955convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
3956 (license license:expat)))
3957
3958(define-public python2-colorspacious
3959 (package-with-python2 python-colorspacious))
3960
3961(define-public python-matplotlib
3962 (package
3963 (name "python-matplotlib")
9e7cb2f1 3964 (version "3.1.2")
44d10b1f
RW
3965 (source
3966 (origin
3967 (method url-fetch)
3968 (uri (pypi-uri "matplotlib" version))
3969 (sha256
3970 (base32
9e7cb2f1 3971 "1nmshfqh7wyg15i16hx1yiylcvzkws29ivn66n3i0wyqwcpjr3lf"))))
44d10b1f
RW
3972 (build-system python-build-system)
3973 (propagated-inputs ; the following packages are all needed at run time
3974 `(("python-cycler" ,python-cycler)
3975 ("python-kiwisolver" ,python-kiwisolver)
3976 ("python-pyparsing" ,python-pyparsing)
3977 ("python-pygobject" ,python-pygobject)
3978 ("gobject-introspection" ,gobject-introspection)
3979 ("python-tkinter" ,python "tk")
3980 ("python-dateutil" ,python-dateutil)
3981 ("python-numpy" ,python-numpy)
3982 ("python-pillow" ,python-pillow)
3983 ("python-pytz" ,python-pytz)
3984 ("python-six" ,python-six)
44d10b1f
RW
3985 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3986 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3987 ;; object. For this reason we need to import both libraries.
5ea654cf 3988 ;; https://cairocffi.readthedocs.io/en/stable/cffi_api.html#converting-pycairo-wrappers-to-cairocffi
44d10b1f 3989 ("python-pycairo" ,python-pycairo)
44d10b1f
RW
3990 ("python-cairocffi" ,python-cairocffi)))
3991 (inputs
3992 `(("libpng" ,libpng)
3993 ("imagemagick" ,imagemagick)
3994 ("freetype" ,freetype)
3995 ("cairo" ,cairo)
3996 ("glib" ,glib)
3997 ;; FIXME: Add backends when available.
3998 ;("python-wxpython" ,python-wxpython)
3999 ("tcl" ,tcl)
4000 ("tk" ,tk)))
4001 (native-inputs
4002 `(("pkg-config" ,pkg-config)
5ea654cf
RW
4003 ("python-pytest" ,python-pytest)
4004 ("python-mock" ,python-mock)
4005 ("unzip" ,unzip)
4006 ("jquery-ui"
4007 ,(origin
4008 (method url-fetch)
4009 (uri "https://jqueryui.com/resources/download/jquery-ui-1.12.1.zip")
4010 (sha256
4011 (base32
4012 "0kb21xf38diqgxcdi1z3s9ssq36pldvyqxy56hn6pcva6rs3c8zq"))))))
44d10b1f
RW
4013 (arguments
4014 `(#:phases
4015 (modify-phases %standard-phases
5ea654cf
RW
4016 ;; XXX We disable all image comparison tests because we're using a
4017 ;; newer version of FreeType than matplotlib expects. This leads to
4018 ;; minor differences throughout the tests.
4019 (add-after 'unpack 'fix-and-disable-failing-tests
4020 (lambda _
4021 (substitute* (append (find-files "lib/matplotlib/tests/"
4022 "test_.*\\.py$")
4023 (find-files "lib/mpl_toolkits/tests"
4024 "test_.*\\.py$"))
4025 (("^from matplotlib" match)
4026 (string-append "import pytest\n" match))
4027 (("( *)@image_comparison" match indent)
4028 (string-append indent
4029 "@pytest.mark.skip(reason=\"unknown minor image differences\")\n"
4030 match)))
4031 (substitute* "lib/matplotlib/tests/test_animation.py"
4032 (("/bin/sh") (which "sh")))
4033 (for-each delete-file
4034 ;; test_normal_axes, test_get_tightbbox_polar
4035 '("lib/matplotlib/tests/test_axes.py"
9e7cb2f1
RW
4036 ;; We don't use the webagg backend and this test forces it.
4037 "lib/matplotlib/tests/test_backend_webagg.py"
5ea654cf
RW
4038 ;; test_outward_ticks
4039 "lib/matplotlib/tests/test_tightlayout.py"
9e7cb2f1
RW
4040 ;; test_hidden_axes fails with minor extent
4041 ;; differences, possibly due to the use of a
4042 ;; different version of FreeType.
4043 "lib/matplotlib/tests/test_constrainedlayout.py"
5ea654cf
RW
4044 ;; Fontconfig returns no fonts.
4045 "lib/matplotlib/tests/test_font_manager.py"))
4046 #t))
4047 (add-before 'install 'install-jquery-ui
4048 (lambda* (#:key outputs inputs #:allow-other-keys)
4049 (let ((dir (string-append (assoc-ref outputs "out")
4050 "/lib/python3.7/site-packages/matplotlib/backends/web_backend/")))
4051 (mkdir-p dir)
4052 (invoke "unzip"
4053 (assoc-ref inputs "jquery-ui")
4054 "-d" dir))
4055 #t))
c09f598d 4056 (replace 'check
5ea654cf
RW
4057 (lambda* (#:key outputs inputs #:allow-other-keys)
4058 (add-installed-pythonpath inputs outputs)
4059 (invoke "python" "tests.py" "-v"
9e7cb2f1 4060 "-m" "not network and not webagg")))
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))
38a404d5 4114 (delete 'fix-and-disable-failing-tests)
5d484f42 4115 (delete 'check))))) ; These tests weren't run the the past.
44d10b1f
RW
4116 ;; Make sure to use special packages for Python 2 instead
4117 ;; of those automatically rewritten by package-with-python2.
4118 (propagated-inputs
4119 `(("python2-pycairo" ,python2-pycairo)
4120 ("python2-backports-functools-lru-cache"
4121 ,python2-backports-functools-lru-cache)
4122 ("python2-functools32" ,python2-functools32)
4123 ("python2-pygobject-2" ,python2-pygobject-2)
4124 ("python2-subprocess32" ,python2-subprocess32)
4125 ("python2-tkinter" ,python-2 "tk")
4126 ,@(fold alist-delete (package-propagated-inputs matplotlib)
4127 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
4128
4129(define-public python-matplotlib-documentation
4130 (package
4131 (name "python-matplotlib-documentation")
4132 (version (package-version python-matplotlib))
4133 (source (package-source python-matplotlib))
4134 (build-system python-build-system)
4135 (native-inputs
4136 `(("python-matplotlib" ,python-matplotlib)
4137 ("python-colorspacious" ,python-colorspacious)
4138 ("python-sphinx" ,python-sphinx)
5ad0a452 4139 ("python-sphinx-copybutton" ,python-sphinx-copybutton)
44d10b1f
RW
4140 ("python-sphinx-gallery" ,python-sphinx-gallery)
4141 ("python-numpydoc" ,python-numpydoc)
4142 ("python-ipython" ,python-ipython)
e7a53914 4143 ("python-ipykernel" ,python-ipykernel)
44d10b1f
RW
4144 ("python-mock" ,python-mock)
4145 ("graphviz" ,graphviz)
f75aa97f 4146 ("texlive" ,(texlive-union (list texlive-amsfonts
e7a53914
RW
4147 texlive-latex-amsmath
4148 texlive-latex-enumitem
4149 texlive-latex-expdlist
4150 texlive-latex-geometry
4151 texlive-latex-preview
4152 texlive-latex-type1cm
4153 texlive-latex-ucs
4154
4155 texlive-generic-pdftex
4156
e7a53914
RW
4157 texlive-fonts-ec
4158 texlive-fonts-adobe-times
4159 texlive-fonts-txfonts)))
44d10b1f
RW
4160 ("texinfo" ,texinfo)
4161 ,@(package-native-inputs python-matplotlib)))
4162 (arguments
4163 `(#:tests? #f ; we're only generating documentation
4164 #:phases
4165 (modify-phases %standard-phases
5ea654cf
RW
4166 ;; The tests in python-matplotlib are run after the install phase, so
4167 ;; we need to delete the extra phase here.
4168 (delete 'check)
44d10b1f
RW
4169 (replace 'build
4170 (lambda _
4171 (chdir "doc")
e7a53914
RW
4172 (setenv "PYTHONPATH"
4173 (string-append (getenv "PYTHONPATH")
4174 ":" (getcwd) "/../examples/units"))
44d10b1f 4175 (substitute* "conf.py"
e7a53914
RW
4176 ;; Don't use git.
4177 (("^SHA = check_output.*")
4178 (string-append "SHA = \"" ,version "\"\n"))
4179 ;; Don't fetch intersphinx files from the Internet
4180 (("^explicit_order_folders" m)
4181 (string-append "intersphinx_mapping = {}\n" m))
4182 (("'sphinx.ext.intersphinx',") "")
4183 ;; Disable URL embedding which requires internet access.
4184 (("'https://docs.scipy.org/doc/numpy'") "None")
4185 (("'https://docs.scipy.org/doc/scipy/reference'") "None"))
4186 (invoke "make"
4187 "SPHINXBUILD=sphinx-build"
4188 "SPHINXOPTS=" ; don't abort on warnings
4189 "html" "texinfo")))
44d10b1f
RW
4190 (replace 'install
4191 (lambda* (#:key inputs outputs #:allow-other-keys)
4192 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
4193 (doc (string-append data "/doc/python-matplotlib-" ,version))
4194 (info (string-append data "/info"))
4195 (html (string-append doc "/html")))
4196 (mkdir-p html)
4197 (mkdir-p info)
4198 (copy-recursively "build/html" html)
4199 (symlink (string-append html "/_images")
4200 (string-append info "/matplotlib-figures"))
4201 (with-directory-excursion "build/texinfo"
4202 (substitute* "matplotlib.texi"
4203 (("@image\\{([^,]*)" all file)
4204 (string-append "@image{matplotlib-figures/" file)))
4205 (symlink (string-append html "/_images")
4206 "./matplotlib-figures")
e7a53914
RW
4207 (invoke "makeinfo" "--no-split"
4208 "-o" "matplotlib.info" "matplotlib.texi"))
4209 (install-file "build/texinfo/matplotlib.info" info))
44d10b1f
RW
4210 #t)))))
4211 (home-page (package-home-page python-matplotlib))
4212 (synopsis "Documentation for the python-matplotlib package")
4213 (description (package-description python-matplotlib))
4214 (license (package-license python-matplotlib))))
4215
4216(define-public python2-matplotlib-documentation
5ad0a452
RW
4217 (let ((parent (package-with-python2 python-matplotlib-documentation)))
4218 (package
4219 (inherit parent)
4220 (native-inputs
4221 (alist-delete "python-sphinx-copybutton"
4222 (package-native-inputs parent))))))
44d10b1f 4223
55dae98f
RW
4224(define-public python-matplotlib-venn
4225 (package
4226 (name "python-matplotlib-venn")
4227 (version "0.11.5")
4228 (source
4229 (origin
4230 (method url-fetch)
4231 (uri (pypi-uri "matplotlib-venn" version ".zip"))
4232 (sha256
4233 (base32
4234 "13w3i1wih0mij08hrgppzg0g9z50y54rc28l6gdi1r5w45l7l0dy"))))
4235 (build-system python-build-system)
4236 (arguments '(#:tests? #f)) ; tests are not included
4237 (propagated-inputs
4238 `(("python-matplotlib" ,python-matplotlib)
4239 ("python-numpy" ,python-numpy)
4240 ("python-scipy" ,python-scipy)))
4241 (native-inputs
4242 `(("unzip" ,unzip)))
4243 (home-page "https://github.com/konstantint/matplotlib-venn")
4244 (synopsis "Plot area-proportional Venn diagrams")
4245 (description
4246 "This package provides tools for plotting area-proportional two- and
4247three-way Venn diagrams in @code{matplotlib}.")
4248 (license license:expat)))
4249
44d10b1f
RW
4250(define-public python2-pysnptools
4251 (package
4252 (name "python2-pysnptools")
5d1ade85 4253 (version "0.3.13")
44d10b1f
RW
4254 (source
4255 (origin
4256 (method url-fetch)
5d1ade85 4257 (uri (pypi-uri "pysnptools" version))
44d10b1f
RW
4258 (sha256
4259 (base32
5d1ade85 4260 "0lnis5xsl7bi0hz4f7gbicahzi5zlxkc21nk3g374xv8fb5hb3qm"))))
44d10b1f
RW
4261 (build-system python-build-system)
4262 (arguments
5d1ade85
RW
4263 `(#:python ,python-2 ; only Python 2.7 is supported
4264 #:tests? #f)) ; test files (e.g. examples/toydata.bim) not included
44d10b1f
RW
4265 (propagated-inputs
4266 `(("python2-numpy" ,python2-numpy)
4267 ("python2-scipy" ,python2-scipy)
4268 ("python2-pandas" ,python2-pandas)))
44d10b1f 4269 (native-inputs
5d1ade85 4270 `(("python2-cython" ,python2-cython)))
1b66989b 4271 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
44d10b1f
RW
4272 (synopsis "Library for reading and manipulating genetic data")
4273 (description
4274 "PySnpTools is a library for reading and manipulating genetic data. It
4275can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
4276those files. It can also efficiently manipulate ranges of integers using set
4277operators such as union, intersection, and difference.")
4278 (license license:asl2.0)))
4279
44d10b1f
RW
4280(define-public python-socksipy-branch
4281 (package
4282 (name "python-socksipy-branch")
4283 (version "1.01")
4284 (source
4285 (origin
4286 (method url-fetch)
4287 (uri (pypi-uri "SocksiPy-branch" version))
4288 (sha256
4289 (base32
4290 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
4291 (build-system python-build-system)
4292 (arguments
4293 `(#:tests? #f)) ; There are no tests
4294 (home-page "https://code.google.com/archive/p/socksipy-branch/")
4295 (synopsis "Python SOCKS module")
4296 (description
4297 "SocksiPy - A Python SOCKS client module. It provides a
4298socket-like interface that supports connections to any TCP
4299service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
4300The original version was developed by Dan Haim, this is a
4301branch created by Mario Vilas to address some open issues,
4302as the original project seems to have been abandoned circa 2007.")
4303 (license license:bsd-3)))
4304
4305(define-public python2-socksipy-branch
4306 (package-with-python2 python-socksipy-branch))
4307
6fcceb23
AG
4308(define-public python-socksipychain
4309 (package
4310 (name "python-socksipychain")
4311 (version "2.0.15")
4312 (source
4313 (origin
4314 (method git-fetch)
4315 (uri (git-reference
4316 (url "https://github.com/pagekite/PySocksipyChain.git")
4317 (commit (string-append "v" version))))
4318 (file-name (git-file-name name version))
4319 (sha256
4320 (base32
4321 "1pkljnh9hfwla8sg7mil4f9zrnsqj0dbhr3crxjw3k8dnjz70dvk"))))
4322 (build-system python-build-system)
4323 (arguments
4324 `(#:tests? #f)) ; Tests try to access the network.
4325 (home-page "http://pagekite.net/wiki/Floss/PySocksipyChain/")
4326 (synopsis "Python SOCKS module with chained proxies support")
4327 (description
4328 "SocksiPyChain is a modified version of the SocksiPy SOCKS module, which
4329adds support for arbitrary chaining of proxy servers and various modes of
4330TLS/SSL encryption. It was developed for use in PageKite, and also includes
4331a simple netcat replacement with chaining support.")
4332 (license license:bsd-3)))
4333
4334(define-public python2-socksipychain
4335 (package-with-python2 python-socksipychain))
4336
44d10b1f
RW
4337(define-public python-pycodestyle
4338 (package
4339 (name "python-pycodestyle")
d16ef28b 4340 (version "2.5.0")
44d10b1f 4341 (source
ba88eea2
RW
4342 (origin
4343 (method url-fetch)
4344 (uri (pypi-uri "pycodestyle" version))
4345 (sha256
4346 (base32
d16ef28b 4347 "0v4prb05n21bm8650v0a01k1nyqjdmkrsm3zycfxh2j5k9n962p4"))))
44d10b1f
RW
4348 (build-system python-build-system)
4349 (home-page "https://pycodestyle.readthedocs.io/")
4350 (synopsis "Python style guide checker")
4351 (description "@code{pycodestyle} (formerly pep8) is a tool to check
4352Python code against some of the style conventions in
4353@url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
4354 (license license:expat)))
4355
4356(define-public python2-pycodestyle
4357 (package-with-python2 python-pycodestyle))
4358
4359(define-public python-multidict
4360 (package
4361 (name "python-multidict")
4362 (version "4.2.0")
4363 (source
4364 (origin
4365 (method url-fetch)
4366 (uri (pypi-uri "multidict" version))
4367 (sha256
4368 (base32
4369 "1vf5bq8hn5a9rvhr5v4fwbmarfsp35hhr8gs74kqfijy34j2f194"))))
4370 (build-system python-build-system)
4371 (native-inputs
4372 `(("python-pytest" ,python-pytest)
4373 ("python-pytest-runner" ,python-pytest-runner)))
4374 (home-page "https://github.com/aio-libs/multidict/")
4375 (synopsis "Multidict implementation")
4376 (description "Multidict is dict-like collection of key-value pairs
4377where key might be occurred more than once in the container.")
4378 (license license:asl2.0)))
4379
4380(define-public python-orderedmultidict
4381 (package
4382 (name "python-orderedmultidict")
4383 (version "0.7.11")
4384 (source
4385 (origin
4386 (method url-fetch)
4387 (uri (pypi-uri "orderedmultidict" version))
4388 (sha256
4389 (base32
4390 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
4391 (build-system python-build-system)
4392 (arguments
4393 `(#:phases
4394 (modify-phases %standard-phases
4395 (add-after 'unpack 'fix-tests
4396 (lambda _
4397 ;; The package uses nosetest for running the tests.
4398 ;; Adding this initfile allows to run the test suite
4399 ;; without requiring nosetest.
d1c4f329
RW
4400 (with-output-to-file "tests/__init__.py" newline)
4401 #t)))))
44d10b1f
RW
4402 (propagated-inputs
4403 `(("python-six" ,python-six)))
4404 (native-inputs
4405 `(("python-pycodestyle" ,python-pycodestyle)))
4406 (home-page "https://github.com/gruns/orderedmultidict")
4407 (synopsis "Python Ordered Multivalue Dictionary - omdict")
4408 (description "This package contains a library for ordered multivalue
4409dictionaries. A multivalue dictionary is a dictionary that can store
4410multiple values for the same key. An ordered multivalue dictionary is a
4411multivalue dictionary that retains the order of insertions and deletions.")
4412 (license license:unlicense)))
4413
4414(define-public python2-orderedmultidict
4415 (package-with-python2 python-orderedmultidict))
4416
4417(define-public python-autopep8
4418 (package
4419 (name "python-autopep8")
4420 (version "1.3.5")
4421 (source
4422 (origin
4423 (method url-fetch)
4424 (uri (pypi-uri "autopep8" version))
4425 (sha256
4426 (base32
4427 "192bvhzi4d0claqxgzymvv7k3qnj627742bc8sgxpzjj42pd9112"))))
4428 (build-system python-build-system)
4429 (propagated-inputs
4430 `(("python-pycodestyle" ,python-pycodestyle)))
4431 (home-page "https://github.com/hhatto/autopep8")
4432 (synopsis "Format Python code according to the PEP 8 style guide")
4433 (description
4434 "@code{autopep8} automatically formats Python code to conform to
4435the PEP 8 style guide. It uses the pycodestyle utility to determine
4436what parts of the code needs to be formatted. @code{autopep8} is
4437capable of fixing most of the formatting issues that can be reported
4438by pycodestyle.")
4439 (license (license:non-copyleft
4440 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
4441
4442(define-public python2-autopep8
4443 (package-with-python2 python-autopep8))
4444
4445(define-public python-distutils-extra
4446 (package
4447 (name "python-distutils-extra")
4448 (version "2.38")
4449 (source
4450 (origin
4451 (method url-fetch)
4452 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4453 version "/+download/python-distutils-extra-"
4454 version ".tar.gz"))
4455 (sha256
4456 (base32
4457 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4458 (build-system python-build-system)
4459 (home-page "https://launchpad.net/python-distutils-extra/")
4460 (synopsis "Enhancements to Python's distutils")
4461 (description
4462 "The python-distutils-extra module enables you to easily integrate
4463gettext support, themed icons, and scrollkeeper-based documentation into
4464Python's distutils.")
4465 (license license:gpl2)))
4466
4467(define-public python2-distutils-extra
4468 (package-with-python2 python-distutils-extra))
4469
4470(define-public python2-elib.intl
4471 (package
4472 (name "python2-elib.intl")
4473 (version "0.0.3")
4474 (source
4475 (origin
4476 ;; This project doesn't tag releases or publish tarballs, so we take
4477 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4478 (method git-fetch)
4479 (uri (git-reference
4480 (url "https://github.com/dieterv/elib.intl.git")
4481 (commit "d09997cfef")))
4482 (file-name (string-append name "-" version "-checkout"))
4483 (sha256
4484 (base32
4485 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4486 (build-system python-build-system)
4487 (arguments
4488 ;; incompatible with Python 3 (exception syntax)
4489 `(#:python ,python-2
4490 #:tests? #f))
4491 (home-page "https://github.com/dieterv/elib.intl")
4492 (synopsis "Enhanced internationalization for Python")
4493 (description
4494 "The elib.intl module provides enhanced internationalization (I18N)
4495services for your Python modules and applications.")
4496 (license license:lgpl3+)))
4497
4498(define-public python-olefile
4499 (package
4500 (name "python-olefile")
5bef0f10 4501 (version "0.46")
44d10b1f
RW
4502 (source
4503 (origin
4504 (method url-fetch)
5bef0f10
MB
4505 (uri (string-append "https://github.com/decalage2/olefile/releases/"
4506 "download/v" version "/olefile-" version ".tar.gz"))
44d10b1f
RW
4507 (file-name (string-append name "-" version ".tar.gz"))
4508 (sha256
4509 (base32
5bef0f10 4510 "1kjxh4gr651hpqkjfv89cfzr40hyvf3vjlda7mifiail83j7j07m"))))
44d10b1f 4511 (build-system python-build-system)
5bef0f10 4512 (home-page "https://www.decalage.info/python/olefileio")
44d10b1f
RW
4513 (synopsis "Read and write Microsoft OLE2 files.")
4514 (description
4515 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
4516Storage or Compound Document, Microsoft Office). It is an improved version of
4517the OleFileIO module from PIL, the Python Image Library.")
4518 (license license:bsd-3)))
4519
4520(define-public python2-olefile
4521 (package-with-python2 python-olefile))
4522
4523(define-public python-pillow
4524 (package
4525 (name "python-pillow")
5fbdd917 4526 (version "6.2.1")
44d10b1f
RW
4527 (source
4528 (origin
4529 (method url-fetch)
4530 (uri (pypi-uri "Pillow" version))
4531 (sha256
4532 (base32
5fbdd917 4533 "1c8wkzc58f5wdh006jvmwdk3wxld1xgagcbdvj7iv17qi0m9fkmz"))))
44d10b1f
RW
4534 (build-system python-build-system)
4535 (native-inputs
4536 `(("python-pytest" ,python-pytest)))
4537 (inputs
4538 `(("freetype" ,freetype)
4539 ("lcms" ,lcms)
44d10b1f 4540 ("libjpeg" ,libjpeg)
44d10b1f 4541 ("libtiff" ,libtiff)
0c4e1c5f
EF
4542 ("libwebp" ,libwebp)
4543 ("openjpeg" ,openjpeg)
4544 ("zlib" ,zlib)))
44d10b1f
RW
4545 (propagated-inputs
4546 `(("python-olefile" ,python-olefile)))
4547 (arguments
4548 `(#:phases
4549 (modify-phases %standard-phases
4550 (add-after 'unpack 'patch-ldconfig
4551 (lambda _
4552 (substitute* "setup.py"
4553 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
61b77ff3 4554 (replace 'check
979d8464
EF
4555 (lambda* (#:key outputs inputs tests? #:allow-other-keys)
4556 (if tests?
4557 (begin
4558 (setenv "HOME" (getcwd))
4559 ;; Make installed package available for running the tests.
4560 (add-installed-pythonpath inputs outputs)
4561 (invoke "python" "selftest.py" "--installed")
4562 (invoke "python" "-m" "pytest" "-vv"))
4563 #t))))))
44d10b1f
RW
4564 (home-page "https://python-pillow.org")
4565 (synopsis "Fork of the Python Imaging Library")
4566 (description
4567 "The Python Imaging Library adds image processing capabilities to your
4568Python interpreter. This library provides extensive file format support, an
4569efficient internal representation, and fairly powerful image processing
4570capabilities. The core image library is designed for fast access to data
4571stored in a few basic pixel formats. It should provide a solid foundation for
4572a general image processing tool.")
4573 (license (license:x11-style
4574 "http://www.pythonware.com/products/pil/license.htm"
4575 "The PIL Software License"))))
4576
4577(define-public python2-pillow
4578 (package-with-python2 python-pillow))
4579
4580(define-public python-pycparser
4581 (package
4582 (name "python-pycparser")
c6c0940e 4583 (version "2.19")
44d10b1f
RW
4584 (source
4585 (origin
4586 (method url-fetch)
4587 (uri (pypi-uri "pycparser" version))
4588 (sha256
4589 (base32
c6c0940e 4590 "1cr5dcj9628lkz1qlwq3fv97c25363qppkmcayqvd05dpy573259"))))
44d10b1f
RW
4591 (outputs '("out" "doc"))
4592 (build-system python-build-system)
4593 (native-inputs
4594 `(("pkg-config" ,pkg-config)))
4595 (arguments
4596 `(#:phases
4597 (modify-phases %standard-phases
4598 (replace 'check
4599 (lambda _
4600 (with-directory-excursion "tests"
acb75c03
RW
4601 (invoke "python" "all_tests.py"))
4602 #t))
44d10b1f
RW
4603 (add-after 'install 'install-doc
4604 (lambda* (#:key outputs #:allow-other-keys)
4605 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4606 (doc (string-append data "/doc/" ,name "-" ,version))
4607 (examples (string-append doc "/examples")))
4608 (mkdir-p examples)
4609 (for-each (lambda (file)
4610 (copy-file (string-append "." file)
4611 (string-append doc file)))
4612 '("/README.rst" "/CHANGES" "/LICENSE"))
c6c0940e
MB
4613 (copy-recursively "examples" examples)
4614 #t))))))
44d10b1f
RW
4615 (home-page "https://github.com/eliben/pycparser")
4616 (synopsis "C parser in Python")
4617 (description
4618 "Pycparser is a complete parser of the C language, written in pure Python
4619using the PLY parsing library. It parses C code into an AST and can serve as
4620a front-end for C compilers or analysis tools.")
4621 (license license:bsd-3)))
4622
4623(define-public python2-pycparser
4624 (package-with-python2 python-pycparser))
4625
4626(define-public python-pywavelets
4627 (package
4628 (name "python-pywavelets")
4629 (version "1.0.1")
4630 (home-page "https://github.com/PyWavelets/pywt")
4631 (source (origin
4632 (method url-fetch)
4633 (uri (pypi-uri "PyWavelets" version))
4634 (sha256
4635 (base32
4636 "1p3qv2v66ghnqrb1f98wyyhp9dz71jwcd6kfpsax65sfdpiyqp1w"))))
4637 (build-system python-build-system)
4638 (arguments
4639 '(#:modules ((ice-9 ftw)
4640 (srfi srfi-1)
4641 (srfi srfi-26)
4642 (guix build utils)
4643 (guix build python-build-system))
4644 #:phases (modify-phases %standard-phases
4645 (replace 'check
4646 (lambda _
4647 (let ((cwd (getcwd))
4648 (libdir (find (cut string-prefix? "lib." <>)
4649 (scandir "build"))))
4650 (with-directory-excursion (string-append cwd "/build/" libdir)
4651 (invoke "nosetests" "-v" "."))))))))
4652 (native-inputs
4653 `(("python-matplotlib" ,python-matplotlib) ;for tests
4654 ("python-nose" ,python-nose)))
4655 (propagated-inputs
4656 `(("python-numpy" ,python-numpy)))
4657 (synopsis "Wavelet transforms in Python")
4658 (description
4659 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
4660mathematical basis functions that are localized in both time and frequency.
4661Wavelet transforms are time-frequency transforms employing wavelets. They are
4662similar to Fourier transforms, the difference being that Fourier transforms are
4663localized only in frequency instead of in time and frequency.")
4664 (license license:expat)))
4665
4666(define-public python2-pywavelets
4667 (package-with-python2 python-pywavelets))
4668
4669(define-public python-xcffib
4670 (package
4671 (name "python-xcffib")
4672 (version "0.6.0")
4673 (source
4674 (origin
4675 (method url-fetch)
4676 (uri (pypi-uri "xcffib" version))
4677 (sha256
4678 (base32
4679 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
4680 (build-system python-build-system)
4681 (inputs
4682 `(("libxcb" ,libxcb)))
4683 (propagated-inputs
4684 `(("python-cffi" ,python-cffi) ; used at run time
4685 ("python-six" ,python-six)))
4686 (arguments
4687 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
4688 #:tests? #f
4689 #:phases
4690 (modify-phases %standard-phases
4691 (add-after 'unpack 'fix-libxcb-path
4692 (lambda* (#:key inputs #:allow-other-keys)
4693 (let ((libxcb (assoc-ref inputs "libxcb")))
4694 (substitute* '("xcffib/__init__.py")
4695 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
4696 #t)))
4697 (add-after 'install 'install-doc
4698 (lambda* (#:key outputs #:allow-other-keys)
4699 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4700 "/doc/" ,name "-" ,version)))
4701 (mkdir-p doc)
4702 (copy-file "README.md"
4703 (string-append doc "/README.md"))
4704 #t))))))
4705 (home-page "https://github.com/tych0/xcffib")
4706 (synopsis "XCB Python bindings")
4707 (description
4708 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4709support for Python 3 and PyPy. It is based on cffi.")
4710 (license license:expat)))
4711
4712(define-public python2-xcffib
4713 (package-with-python2 python-xcffib))
4714
4715(define-public python-cairocffi
4716 (package
4717 (name "python-cairocffi")
4718 (version "0.9.0")
4719 (source
4720 (origin
4721 (method url-fetch)
4722 (uri (pypi-uri "cairocffi" version))
4723 (sha256
4724 (base32
4725 "0dq3k4zhqd8cwsf3nyjqvjqm8wkvrjn1wjf44rl3v0h8kqx6qf0m"))
4726 (patches (search-patches "python-cairocffi-dlopen-path.patch"))))
4727 (build-system python-build-system)
4728 (outputs '("out" "doc"))
4729 (inputs
4730 `(("glib" ,glib)
4731 ("gtk+" ,gtk+)
4732 ("gdk-pixbuf" ,gdk-pixbuf)
4733 ("cairo" ,cairo)
4734 ("pango" ,pango)))
4735 (native-inputs
4736 `(("pkg-config" ,pkg-config)
4737 ("python-pytest" ,python-pytest)
4738 ("python-pytest-cov" ,python-pytest-cov)
4739 ("python-pytest-runner" ,python-pytest-runner)
4740 ("python-sphinx" ,python-sphinx)
4741 ("python-docutils" ,python-docutils)))
4742 (propagated-inputs
4743 `(("python-xcffib" ,python-xcffib))) ; used at run time
4744 (arguments
4745 `(#:phases
4746 (modify-phases %standard-phases
4747 (add-after 'unpack 'patch-paths
4748 (lambda* (#:key inputs outputs #:allow-other-keys)
4749 (substitute* (find-files "." "\\.py$")
4750 (("dlopen\\(ffi, 'cairo'")
4751 (string-append "dlopen(ffi, '" (assoc-ref inputs "cairo")
4752 "/lib/libcairo.so.2'"))
4753 (("dlopen\\(ffi, 'gdk-3'")
4754 (string-append "dlopen(ffi, '" (assoc-ref inputs "gtk+")
4755 "/lib/libgtk-3.so.0'"))
4756 (("dlopen\\(ffi, 'gdk_pixbuf-2.0'")
4757 (string-append "dlopen(ffi, '" (assoc-ref inputs "gdk-pixbuf")
4758 "/lib/libgdk_pixbuf-2.0.so.0'"))
4759 (("dlopen\\(ffi, 'glib-2.0'")
4760 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4761 "/lib/libglib-2.0.so.0'"))
4762 (("dlopen\\(ffi, 'gobject-2.0'")
4763 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4764 "/lib/libgobject-2.0.so.0'"))
4765 (("dlopen\\(ffi, 'pangocairo-1.0'")
4766 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4767 "/lib/libpangocairo-1.0.so.0'"))
4768 (("dlopen\\(ffi, 'pango-1.0'")
4769 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4770 "/lib/libpango-1.0.so.0'")))
4771 #t))
4772 (add-after 'install 'install-doc
4773 (lambda* (#:key inputs outputs #:allow-other-keys)
4774 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4775 (doc (string-append data "/doc/" ,name "-" ,version))
4776 (html (string-append doc "/html")))
4777 (setenv "LD_LIBRARY_PATH"
4778 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4779 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4780 (setenv "LANG" "en_US.UTF-8")
4781 (mkdir-p html)
4782 (for-each (lambda (file)
4783 (copy-file (string-append "." file)
4784 (string-append doc file)))
4785 '("/README.rst" "/CHANGES" "/LICENSE"))
4786 (system* "python" "setup.py" "build_sphinx")
4787 (copy-recursively "docs/_build/html" html)
4788 #t))))))
4789 (home-page "https://github.com/Kozea/cairocffi")
4790 (synopsis "Python bindings and object-oriented API for Cairo")
4791 (description
4792 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4793Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4794graphics library with support for multiple backends including image buffers,
4795PNG, PostScript, PDF, and SVG file output.")
4796 (license license:bsd-3)))
4797
4798(define-public python2-cairocffi
4799 (package-with-python2 python-cairocffi))
4800
4801(define-public python-decorator
4802 (package
4803 (name "python-decorator")
4804 (version "4.3.0")
4805 (source
4806 (origin
4807 (method url-fetch)
4808 (uri (pypi-uri "decorator" version))
4809 (sha256
4810 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
4811 (build-system python-build-system)
4812 (home-page "https://pypi.python.org/pypi/decorator/")
4813 (synopsis "Python module to simplify usage of decorators")
4814 (description
4815 "The aim of the decorator module is to simplify the usage of decorators
4816for the average programmer, and to popularize decorators usage giving examples
4817of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4818etc. The core of this module is a decorator factory.")
4819 (license license:expat)))
4820
4821(define-public python2-decorator
4822 (package-with-python2 python-decorator))
4823
4824(define-public python-drmaa
4825 (package
4826 (name "python-drmaa")
4827 (version "0.7.7")
4828 (source
4829 (origin
4830 (method url-fetch)
4831 (uri (pypi-uri "drmaa" version))
4832 (sha256
4833 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
4834 (build-system python-build-system)
4835 ;; The test suite requires libdrmaa which is provided by the cluster
4836 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4837 ;; should be set to the path of the libdrmaa library.
4838 (arguments '(#:tests? #f))
4839 (native-inputs
4840 `(("python-nose" ,python-nose)))
4841 (home-page "https://pypi.python.org/pypi/drmaa")
4842 (synopsis "Python bindings for the DRMAA library")
4843 (description
4844 "A Python package for Distributed Resource Management (DRM) job
4845submission and control. This package is an implementation of the DRMAA 1.0
4846Python language binding specification.")
4847 (license license:bsd-3)))
4848
4849(define-public python2-drmaa
4850 (package-with-python2 python-drmaa))
4851
4852(define-public python-grako
4853 (package
4854 (name "python-grako")
4855 (version "3.99.9")
4856 (source
4857 (origin
4858 (method url-fetch)
4859 (uri
4860 (pypi-uri "grako" version ".zip"))
4861 (sha256
4862 (base32
4863 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
4864 (build-system python-build-system)
4865 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
4866 (native-inputs
4867 `(("unzip" ,unzip)
4868 ("python-pytest" ,python-pytest)
4869 ("python-pytest-runner" ,python-pytest-runner)))
4870 (home-page "https://bitbucket.org/neogeny/grako")
4871 (synopsis "EBNF parser generator")
4872 (description
4873 "Grako takes a grammar in a variation of EBNF as input, and outputs a
4874memoizing PEG/Packrat parser in Python.")
4875 (license license:bsd-3)))
4876
4877(define-public python2-grako
4878 (package-with-python2 python-grako))
4879
4880(define-public python-gridmap
4881 (package
4882 (name "python-gridmap")
4883 (version "0.13.0")
4884 (source
4885 (origin
768fea0f
TGR
4886 (method git-fetch)
4887 (uri (git-reference
4888 (url "https://github.com/pygridtools/gridmap.git")
4889 (commit (string-append "v" version))))
4890 (file-name (git-file-name name version))
44d10b1f 4891 (sha256
768fea0f 4892 (base32 "1478lbwsr1w24cii2x01m2910fvh8r43ghnb78nc972a96hqiknm"))))
44d10b1f
RW
4893 (build-system python-build-system)
4894 (arguments
4895 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
4896 (propagated-inputs
4897 `(("python-psutil" ,python-psutil)
4898 ("python-drmaa" ,python-drmaa)
4899 ("python-pyzmq" ,python-pyzmq)))
4900 (home-page "https://github.com/pygridtools/gridmap")
4901 (synopsis "Create jobs on a cluster directly from Python")
4902 (description
4903 "Gridmap is a Python package to allow you to easily create jobs on the
4904cluster directly from Python. You can directly map Python functions onto the
4905cluster without needing to write any wrapper code yourself.")
4906 (license license:gpl3+)))
4907
4908(define-public python2-gridmap
4909 (package-with-python2 python-gridmap))
4910
4911(define-public python-honcho
4912 (package
4913 (name "python-honcho")
4914 (version "1.0.1")
4915 (source
4916 (origin
8524d130
TGR
4917 (method git-fetch)
4918 (uri (git-reference
4919 (url "https://github.com/nickstenning/honcho.git")
4920 (commit (string-append "v" version))))
4921 (file-name (git-file-name name version))
44d10b1f 4922 (sha256
8524d130 4923 (base32 "11bd87474qpif20xdcn0ra1idj5k16ka51i658wfpxwc6nzsn92b"))))
44d10b1f
RW
4924 (build-system python-build-system)
4925 (native-inputs
4926 `(("python-pytest" ,python-pytest)
4927 ("python-mock" ,python-mock)
4928 ("python-tox" ,python-tox)
4929 ("which" ,which))) ;for tests
4930 (propagated-inputs
4931 `(("python-jinja2" ,python-jinja2)))
4932 (arguments
4933 `(#:phases
4934 (modify-phases %standard-phases
4935 (delete 'check)
4936 (add-after 'install 'check
4937 (lambda* (#:key outputs inputs #:allow-other-keys)
4938 ;; fix honcho path in testsuite
4939 (substitute* "tests/conftest.py"
4940 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
4941 "/bin/honcho" "'")))
4942 ;; It's easier to run tests after install.
4943 ;; Make installed package available for running the tests
4944 (add-installed-pythonpath inputs outputs)
95b707fb 4945 (invoke "py.test" "-v"))))))
44d10b1f
RW
4946 (home-page "https://github.com/nickstenning/honcho")
4947 (synopsis "Manage Procfile-based applications")
4948 (description
4949 "A Procfile is a file which describes how to run an application
50fceab0 4950consisting of several processes. honcho starts all listed processes.
44d10b1f
RW
4951The output of all running processes is collected by honcho and
4952displayed.")
4953 (license license:expat)))
4954
4955(define-public python2-honcho
4956 (package-with-python2 python-honcho))
4957
4958(define-public python-pexpect
4959 (package
4960 (name "python-pexpect")
4961 (version "4.6.0")
4962 (source
4963 (origin
4964 (method url-fetch)
4965 (uri (pypi-uri "pexpect" version))
4966 (sha256
4967 (base32 "1fla85g47iaxxpjhp9vkxdnv4pgc7rplfy6ja491smrrk0jqi3ia"))))
4968 (build-system python-build-system)
4969 (arguments
4970 `(#:phases
4971 (modify-phases %standard-phases
4972 (add-before 'check 'prepare-tests
4973 (lambda _
4974 (substitute* (find-files "tests")
4975 (("/bin/ls") (which "ls"))
4976 (("/bin/echo") (which "echo"))
4977 (("/bin/which") (which "which"))
4978 ;; Many tests try to use the /bin directory which
4979 ;; is not present in the build environment.
4980 ;; Use one that's non-empty and unlikely to change.
4981 (("/bin'") "/dev'"))
4982 ;; XXX: Socket connection test gets "Connection reset by peer".
4983 ;; Why does it not work? Delete for now.
4984 (delete-file "tests/test_socket.py")
4985 #t))
4986 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
4987 (native-inputs
4988 `(("python-nose" ,python-nose)
4989 ("python-pytest" ,python-pytest)
4990 ("man-db" ,man-db)
4991 ("which" ,which)
4992 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
4993 (propagated-inputs
4994 `(("python-ptyprocess" ,python-ptyprocess)))
4995 (home-page "http://pexpect.readthedocs.org/")
4996 (synopsis "Controlling interactive console applications")
4997 (description
4998 "Pexpect is a pure Python module for spawning child applications;
4999controlling them; and responding to expected patterns in their output.
5000Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
5001child application and control it as if a human were typing commands.")
5002 (license license:isc)))
5003
5004(define-public python2-pexpect
5005 (package-with-python2 python-pexpect))
5006
5007(define-public python-setuptools-scm
5008 (package
5009 (name "python-setuptools-scm")
85092643 5010 (version "3.2.0")
44d10b1f
RW
5011 (source (origin
5012 (method url-fetch)
5013 (uri (pypi-uri "setuptools_scm" version))
5014 (sha256
5015 (base32
85092643 5016 "0n3knn3p1sqlx31k2lahn7z9bacvlv8nhlfidj77vz50bxqlgasj"))))
44d10b1f
RW
5017 (build-system python-build-system)
5018 (home-page "https://github.com/pypa/setuptools_scm/")
5019 (synopsis "Manage Python package versions in SCM metadata")
5020 (description
5021 "Setuptools_scm handles managing your Python package versions in
5022@dfn{software configuration management} (SCM) metadata instead of declaring
5023them as the version argument or in a SCM managed file.")
5024 (license license:expat)))
5025
a0b2accf
MO
5026;; Needed by python-lazy-object-proxy, remove on next update cycle.
5027(define-public python-setuptools-scm-3.3
5028 (package
5029 (inherit python-setuptools-scm)
5030 (version "3.3.3")
5031 (source (origin
5032 (method url-fetch)
5033 (uri (pypi-uri "setuptools_scm" version))
5034 (sha256
5035 (base32
5036 "19cyndx23xmpbhz4qrwmfwsmnnaczd0dw7qg977ksq2dbvxy29dx"))))))
5037
44d10b1f
RW
5038(define-public python2-setuptools-scm
5039 (package-with-python2 python-setuptools-scm))
5040
bb74ea09
RW
5041(define-public python-pathlib2
5042 (package
5043 (name "python-pathlib2")
5044 (version "2.3.3")
5045 (source
5046 (origin
5047 (method url-fetch)
5048 (uri (pypi-uri "pathlib2" version))
5049 (sha256
5050 (base32
5051 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
5052 (build-system python-build-system)
5053 (propagated-inputs
5054 `(("python-scandir" ,python-scandir)
5055 ("python-six" ,python-six)))
5056 (home-page "https://pypi.python.org/pypi/pathlib2/")
746d3384 5057 (synopsis "Object-oriented file system paths")
bb74ea09
RW
5058 (description "The goal of pathlib2 is to provide a backport of the
5059standard @code{pathlib} module which tracks the standard library module, so
5060all the newest features of the standard @code{pathlib} can be used also on
5061older Python versions.")
5062 (license license:expat)))
5063
15b65617
RW
5064(define-public python-importlib-metadata
5065 (package
5066 (name "python-importlib-metadata")
0af697d9 5067 (version "0.23")
15b65617
RW
5068 (source
5069 (origin
5070 (method url-fetch)
5071 (uri (pypi-uri "importlib_metadata" version))
5072 (sha256
0af697d9 5073 (base32 "09mdqdfv5rdrwz80jh9m379gxmvk2vhjfz0fg53hid00icvxf65a"))))
15b65617
RW
5074 (build-system python-build-system)
5075 (propagated-inputs
5076 `(("python-configparser" ,python-configparser)
5077 ("python-contextlib2" ,python-contextlib2)
5078 ("python-docutils" ,python-docutils)
5079 ("python-pathlib2" ,python-pathlib2)
5080 ("python-rst.linker" ,python-rst.linker)
5081 ("python-zipp" ,python-zipp)))
5082 (native-inputs
5083 `(("python-setuptools-scm" ,python-setuptools-scm)
5084 ("python-sphinx" ,python-sphinx)))
5085 (home-page "https://importlib-metadata.readthedocs.io/")
5086 (synopsis "Read metadata from Python packages")
5087 (description
5088 "@code{importlib_metadata} is a library which provides an API for
5089accessing an installed Python package's metadata, such as its entry points or
5090its top-level name. This functionality intends to replace most uses of
5091@code{pkg_resources} entry point API and metadata API. Along with
5092@code{importlib.resources} in Python 3.7 and newer, this can eliminate the
5093need to use the older and less efficient @code{pkg_resources} package.")
5094 (license license:asl2.0)))
5095
37c173d1
RW
5096(define-public python-jaraco-packaging
5097 (package
5098 (name "python-jaraco-packaging")
5099 (version "6.1")
5100 (source
5101 (origin
5102 (method url-fetch)
5103 (uri (pypi-uri "jaraco.packaging" version))
5104 (sha256
5105 (base32
5106 "0zimrnkh33b9g8ffw11mjh6kvs54cy5gcjw1h5cl1r7dc833dmkm"))))
5107 (build-system python-build-system)
5108 (propagated-inputs
5109 `(("python-pytest" ,python-pytest)
5110 ("python-pytest-checkdocs" ,python-pytest-checkdocs)
5111 ("python-pytest-flake8" ,python-pytest-flake8)
5112 ("python-rst.linker" ,python-rst.linker)
5113 ("python-setuptools" ,python-setuptools)
5114 ("python-setuptools-scm" ,python-setuptools-scm)
5115 ("python-six" ,python-six)
5116 ("python-sphinx" ,python-sphinx)))
5117 (home-page "https://github.com/jaraco/jaraco.packaging")
5118 (synopsis "Tools to supplement packaging Python releases")
5119 (description
5120 "This package provides various tools to supplement packaging Python
5121releases.")
5122 (license license:expat)))
5123
44d10b1f
RW
5124(define-public python-pathpy
5125 (package
5126 (name "python-pathpy")
a3dd8871 5127 (version "11.5.1")
44d10b1f
RW
5128 (source
5129 (origin
5130 (method url-fetch)
5131 (uri (pypi-uri "path.py" version))
5132 (sha256
a3dd8871 5133 (base32 "0ir9j1haq2jbi7aip6k2fa9l7q1l03k4hp1awxhjhcwzsnwp3ll8"))))
49ad11e9 5134 (outputs '("out" "doc"))
44d10b1f
RW
5135 (build-system python-build-system)
5136 (propagated-inputs
01a53e0b
MC
5137 `(("python-appdirs" ,python-appdirs)
5138 ("python-importlib-metadata" ,python-importlib-metadata)))
44d10b1f
RW
5139 (native-inputs
5140 `(("python-setuptools-scm" ,python-setuptools-scm)
5141 ("python-sphinx" ,python-sphinx)
5142 ("python-rst.linker" ,python-rst.linker)
5143 ("python-pytest" ,python-pytest)
49ad11e9
RW
5144 ("python-pytest-runner" ,python-pytest-runner)
5145 ("python-jaraco-packaging" ,python-jaraco-packaging)))
44d10b1f 5146 (arguments
49ad11e9
RW
5147 `(#:phases
5148 (modify-phases %standard-phases
5149 (add-after 'build 'build-doc
5150 (lambda _
5151 (setenv "LANG" "en_US.UTF-8")
5152 (invoke "python" "setup.py" "build_sphinx")))
5153 (add-after 'install 'install-doc
5154 (lambda* (#:key outputs #:allow-other-keys)
5155 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5156 (doc (string-append data "/doc/" ,name "-" ,version))
5157 (html (string-append doc "/html")))
5158 (mkdir-p html)
5159 (for-each (lambda (file)
5160 (copy-file file (string-append doc "/" file)))
5161 '("README.rst" "CHANGES.rst"))
5162 (copy-recursively "build/sphinx/html" html)
5163 #t)))
5164 (replace 'check
5165 (lambda _
5166 ;; The import time test aborts if an import takes longer than
5167 ;; 100ms. It may very well take a little longer than that.
5168 (invoke "pytest" "-v" "-k" "not test_import_time"))))))
44d10b1f
RW
5169 (home-page "https://github.com/jaraco/path.py")
5170 (synopsis "Python module wrapper for built-in os.path")
5171 (description
5172 "@code{path.py} implements path objects as first-class entities, allowing
5173common operations on files to be invoked on those path objects directly.")
5174 (license license:expat)))
5175
5176(define-public python2-pathpy
5177 (package-with-python2 python-pathpy))
5178
5179(define-public python-simplegeneric
5180 (package
5181 (name "python-simplegeneric")
5182 (version "0.8.1")
5183 (source
5184 (origin
5185 (method url-fetch)
6c8c3980 5186 (uri (pypi-uri "simplegeneric" version ".zip"))
44d10b1f
RW
5187 (sha256
5188 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
5189 (build-system python-build-system)
5190 (native-inputs
5191 `(("unzip" ,unzip)))
5192 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
5193 (synopsis "Python module for simple generic functions")
5194 (description
5195 "The simplegeneric module lets you define simple single-dispatch generic
5196functions, akin to Python’s built-in generic functions like @code{len()},
5197@code{iter()} and so on. However, instead of using specially-named methods,
5198these generic functions use simple lookup tables, akin to those used by
5199e.g. @code{pickle.dump()} and other generic functions found in the Python
5200standard library.")
5201 (license license:zpl2.1)))
5202
5203(define-public python2-simplegeneric
5204 (package-with-python2 python-simplegeneric))
5205
5206(define-public python-ipython-genutils
5207 ;; TODO: This package is retired, check if can be removed, see description.
5208 (package
5209 (name "python-ipython-genutils")
5210 (version "0.1.0")
5211 (source
5212 (origin
5213 (method url-fetch)
c9671d4b 5214 (uri (pypi-uri "ipython_genutils" version))
44d10b1f
RW
5215 (sha256
5216 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
5217 (build-system python-build-system)
5218 (arguments `(#:tests? #f)) ; no tests
5219 (home-page "https://ipython.org")
5220 (synopsis "Vestigial utilities from IPython")
5221 (description
5222 "This package provides retired utilities from IPython. No packages
5223outside IPython/Jupyter should depend on it.
5224
5225This package shouldn't exist. It contains some common utilities shared by
5226Jupyter and IPython projects during The Big Split. As soon as possible, those
5227packages will remove their dependency on this, and this package will go
5228away.")
5229 (license license:bsd-3)))
5230
5231(define-public python2-ipython-genutils
5232 (package-with-python2 python-ipython-genutils))
5233
5234(define-public python-traitlets
5235 (package
5236 (name "python-traitlets")
ac5e205a 5237 (version "4.3.3")
44d10b1f
RW
5238 (source
5239 (origin
5240 (method url-fetch)
5241 (uri (pypi-uri "traitlets" version))
5242 (sha256
5243 (base32
ac5e205a 5244 "1xsrwgivpkxlbr4dfndfsi098s29yqgswgjc1qqn69yxklvfw8yh"))))
44d10b1f
RW
5245 (build-system python-build-system)
5246 (arguments
5247 `(#:phases
5248 (modify-phases %standard-phases
5249 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
5250 (propagated-inputs
5251 `(("python-ipython-genutils" ,python-ipython-genutils)
ac5e205a 5252 ("python-decorator" ,python-decorator)))
44d10b1f
RW
5253 (native-inputs
5254 `(("python-pytest" ,python-pytest)))
5255 (properties `((python2-variant . ,(delay python2-traitlets))))
5256 (home-page "https://ipython.org")
5257 (synopsis "Configuration system for Python applications")
5258 (description
5259 "Traitlets is a framework that lets Python classes have attributes with
5260type checking, dynamically calculated default values, and ‘on change’
5261callbacks. The package also includes a mechanism to use traitlets for
5262configuration, loading values from files or from command line arguments. This
5263is a distinct layer on top of traitlets, so you can use traitlets in your code
5264without using the configuration machinery.")
5265 (license license:bsd-3)))
5266
5267(define-public python2-traitlets
5268 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
5269 (package
5270 (inherit traitlets)
5271 (propagated-inputs
5272 `(("python2-enum34" ,python2-enum34)
5273 ,@(package-propagated-inputs traitlets))))))
5274
5275(define-public python-jupyter-core
5276 (package
5277 (name "python-jupyter-core")
5278 (version "4.4.0")
5279 (source
5280 (origin
5281 (method url-fetch)
5282 (uri (string-append (pypi-uri "jupyter_core" version)))
5283 (sha256
5284 (base32
5285 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
5286 (build-system python-build-system)
5287 ;; FIXME: not sure how to run the tests
5288 (arguments `(#:tests? #f))
5289 (propagated-inputs
5290 `(("python-traitlets" ,python-traitlets)))
5291 (home-page "http://jupyter.org/")
5292 (synopsis "Jupyter base package")
5293 (description
5294 "Jupyter core is the base package on which Jupyter projects rely.")
5295 (license license:bsd-3)))
5296
5297(define-public python2-jupyter-core
5298 (package-with-python2 python-jupyter-core))
5299
5300(define-public python-jupyter-client
5301 (package
5302 (name "python-jupyter-client")
5303 (version "5.2.4")
5304 (source
5305 (origin
5306 (method url-fetch)
5307 (uri (pypi-uri "jupyter_client" version))
5308 (sha256
5309 (base32
5310 "0l9mh7ccrpl3lppym3dnky8n1nk7xarzzdcxf4q2s7aw203cpydm"))))
5311 (build-system python-build-system)
5312 ;; Tests fail because of missing native python kernel which I assume is
5313 ;; provided by the ipython package, which we cannot use because it would
5314 ;; cause a dependency cycle.
ddc586ea
LC
5315 (arguments
5316 `(#:tests? #f
5317
5318 #:phases (modify-phases %standard-phases
5319 (add-after 'unpack 'set-tool-file-names
5320 (lambda* (#:key inputs #:allow-other-keys)
5321 (let ((iproute (assoc-ref inputs "iproute")))
5322 (substitute* "jupyter_client/localinterfaces.py"
5323 (("'ip'")
5324 (string-append "'" iproute "/sbin/ip'")))
5325 #t))))))
5326 (inputs
5327 `(("iproute" ,iproute)))
44d10b1f
RW
5328 (propagated-inputs
5329 `(("python-pyzmq" ,python-pyzmq)
5330 ("python-traitlets" ,python-traitlets)
5331 ("python-jupyter-core" ,python-jupyter-core)))
5332 (home-page "http://jupyter.org/")
5333 (synopsis "Jupyter protocol implementation and client libraries")
5334 (description
5335 "The @code{jupyter_client} package contains the reference implementation
5336of the Jupyter protocol. It also provides client and kernel management APIs
5337for working with kernels, and the @code{jupyter kernelspec} entrypoint for
5338installing @code{kernelspec}s for use with Jupyter frontends.")
5339 (license license:bsd-3)))
5340
5341(define-public python2-jupyter-client
5342 (package-with-python2 python-jupyter-client))
5343
5344(define-public python-ipykernel
5345 (package
5346 (name "python-ipykernel")
08d0a355 5347 (version "5.1.3")
44d10b1f
RW
5348 (source
5349 (origin
5350 (method url-fetch)
5351 (uri (pypi-uri "ipykernel" version))
5352 (sha256
08d0a355 5353 (base32 "1a08y677lpn80qzvv7z0smgggmr5m5ayf0bs6vds47xpxl9sss5k"))))
44d10b1f
RW
5354 (build-system python-build-system)
5355 (arguments
5356 `(#:phases
5357 (modify-phases %standard-phases
5358 (replace 'check
5359 (lambda _
5360 (setenv "HOME" "/tmp")
5361 (invoke "pytest" "-v")
aa856d02
LC
5362 #t))
5363 (add-after 'install 'set-python-file-name
5364 (lambda* (#:key outputs #:allow-other-keys)
5365 ;; Record the absolute file name of the 'python' executable in
5366 ;; 'kernel.json'.
5367 (let ((out (assoc-ref outputs "out")))
5368 (substitute* (string-append out "/share/jupyter"
5369 "/kernels/python3/kernel.json")
5370 (("\"python\"")
5371 (string-append "\"" (which "python") "\"")))
5372 #t))))))
44d10b1f
RW
5373 (propagated-inputs
5374 `(("python-ipython" ,python-ipython)
5375 ;; imported at runtime during connect
5376 ("python-jupyter-client" ,python-jupyter-client)))
5377 (native-inputs
08d0a355
TGR
5378 `(("python-flaky" ,python-flaky)
5379 ("python-nose" ,python-nose)
5380 ("python-pytest" ,python-pytest)))
44d10b1f
RW
5381 (home-page "https://ipython.org")
5382 (synopsis "IPython Kernel for Jupyter")
5383 (description
5384 "This package provides the IPython kernel for Jupyter.")
5385 (license license:bsd-3)))
5386
0f378947 5387;; Version 5.1.1 and above no longer support Python 2.
44d10b1f 5388(define-public python2-ipykernel
0f378947
RW
5389 (package
5390 (name "python2-ipykernel")
5391 (version "5.1.0")
5392 (source
5393 (origin
5394 (method url-fetch)
5395 (uri (pypi-uri "ipykernel" version))
5396 (sha256
5397 (base32 "0br95qhrd5k65g10djngiy27hs0642301hlf2q142i8djabvzh0g"))))
5398 (build-system python-build-system)
5399 (arguments
5400 `(#:python ,python-2
5401 #:phases
5402 (modify-phases %standard-phases
5403 (replace 'check
5404 (lambda _
5405 (setenv "HOME" "/tmp")
5406 (invoke "pytest" "-v")
5407 #t)))))
5408 (propagated-inputs
5409 `(("python2-ipython" ,python2-ipython)
5410 ;; imported at runtime during connect
5411 ("python2-jupyter-client" ,python2-jupyter-client)))
5412 (native-inputs
5413 `(("python2-pytest" ,python2-pytest)
5414 ("python2-nose" ,python2-nose)))
5415 (home-page "https://ipython.org")
5416 (synopsis "IPython Kernel for Jupyter")
5417 (description
5418 "This package provides the IPython kernel for Jupyter.")
5419 (license license:bsd-3)))
44d10b1f 5420
966aa714
AE
5421(define-public python-pari-jupyter
5422 (package
5423 (name "python-pari-jupyter")
5424 (version "1.3.2")
5425 (source
5426 (origin
5427 (method url-fetch)
5428 (uri (pypi-uri "pari_jupyter" version))
5429 (sha256
5430 (base32
5431 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
5432 (build-system python-build-system)
5433 (propagated-inputs
5434 `(("python-ipykernel" ,python-ipykernel)))
5435 (inputs
5436 `(("pari-gp" ,pari-gp)
5437 ("readline" ,readline)))
5438 (arguments
5439 `(#:tests? #f)) ; no test suite
5440 (home-page
5441 "https://github.com/jdemeyer/pari_jupyter")
5442 (synopsis "A Jupyter kernel for PARI/GP")
5443 (description "The package provides a PARI/GP kernel for Jupyter.")
5444 (license license:gpl3+)))
5445
dede052a
RW
5446(define-public python-backcall
5447 (package
5448 (name "python-backcall")
5449 (version "0.1.0")
5450 (source
5451 (origin
5452 (method url-fetch)
5453 (uri (pypi-uri "backcall" version))
5454 (sha256
5455 (base32
5456 "1r01dqch3f8fdj3n6fviw8hxqrs6w5v0qw4izmvqzry1w9dxiv1q"))))
5457 (build-system python-build-system)
5458 (home-page "https://github.com/takluyver/backcall/")
5459 (synopsis "Specifications for callback functions passed in to an API")
5460 (description
5461 "If your code lets other people supply callback functions, it's important
5462to specify the function signature you expect, and check that functions support
5463that. Adding extra parameters later would break other peoples code unless
5464you're careful. The @code{backcall} package provides a way of specifying the
5465callback signature using a prototype function.")
5466 (license license:bsd-3)))
5467
44d10b1f
RW
5468;; This is the latest release of the LTS version of ipython with support for
5469;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
8b5f756c
RW
5470;; dropped support for Python 2.7.
5471(define-public python2-ipython
44d10b1f 5472 (package
8b5f756c 5473 (name "python2-ipython")
44d10b1f
RW
5474 (version "5.8.0")
5475 (source
5476 (origin
5477 (method url-fetch)
5478 (uri (pypi-uri "ipython" version ".tar.gz"))
5479 (sha256
5480 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
5481 (build-system python-build-system)
44d10b1f 5482 (propagated-inputs
8b5f756c
RW
5483 `(("python2-backports-shutil-get-terminal-size"
5484 ,python2-backports-shutil-get-terminal-size)
5485 ("python2-pathlib2" ,python2-pathlib2)
5486 ("python2-pyzmq" ,python2-pyzmq)
5487 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
5488 ("python2-terminado" ,python2-terminado)
5489 ("python2-matplotlib" ,python2-matplotlib)
5490 ("python2-numpy" ,python2-numpy)
5491 ("python2-numpydoc" ,python2-numpydoc)
5492 ("python2-jinja2" ,python2-jinja2)
5493 ("python2-mistune" ,python2-mistune)
5494 ("python2-pexpect" ,python2-pexpect)
5495 ("python2-pickleshare" ,python2-pickleshare)
5496 ("python2-simplegeneric" ,python2-simplegeneric)
5497 ("python2-jsonschema" ,python2-jsonschema)
5498 ("python2-traitlets" ,python2-traitlets)
5499 ("python2-nbformat" ,python2-nbformat)
5500 ("python2-pygments" ,python2-pygments)))
5501 (inputs
5502 `(("readline" ,readline)
5503 ("which" ,which)))
5504 (native-inputs
5505 `(("graphviz" ,graphviz)
5506 ("pkg-config" ,pkg-config)
5507 ("python2-requests" ,python2-requests) ;; for tests
5508 ("python2-testpath" ,python2-testpath)
5509 ("python2-mock" ,python2-mock)
5510 ("python2-nose" ,python2-nose)))
5511 (arguments
5512 `(#:python ,python-2
5513 #:phases
5514 (modify-phases %standard-phases
5515 (add-before 'check 'delete-broken-tests
5516 (lambda* (#:key inputs #:allow-other-keys)
5517 ;; These tests throw errors for unknown reasons.
5518 (delete-file "IPython/core/tests/test_profile.py")
5519 (delete-file "IPython/core/tests/test_interactiveshell.py")
5520 (delete-file "IPython/core/tests/test_magic.py")
5521 #t)))))
5522 (home-page "https://ipython.org")
5523 (synopsis "IPython is a tool for interactive computing in Python")
5524 (description
5525 "IPython provides a rich architecture for interactive computing with:
5526Powerful interactive shells, a browser-based notebook, support for interactive
5527data visualization, embeddable interpreters and tools for parallel
5528computing.")
5529 (license license:bsd-3)))
5530
5531(define-public python-ipython
5532 (package
5533 (name "python-ipython")
ee515773 5534 (version "7.9.0")
8b5f756c
RW
5535 (source
5536 (origin
5537 (method url-fetch)
5538 (uri (pypi-uri "ipython" version ".tar.gz"))
5539 (sha256
ee515773 5540 (base32 "103jkw18z7fnwdal1mdbijjxi1fndzn31g887lmj7ddpf2r07lyz"))))
8b5f756c
RW
5541 (build-system python-build-system)
5542 (propagated-inputs
5543 `(("python-backcall" ,python-backcall)
5544 ("python-pyzmq" ,python-pyzmq)
5545 ("python-prompt-toolkit" ,python-prompt-toolkit)
44d10b1f
RW
5546 ("python-terminado" ,python-terminado)
5547 ("python-matplotlib" ,python-matplotlib)
5548 ("python-numpy" ,python-numpy)
5549 ("python-numpydoc" ,python-numpydoc)
8b5f756c 5550 ("python-jedi" ,python-jedi)
44d10b1f
RW
5551 ("python-jinja2" ,python-jinja2)
5552 ("python-mistune" ,python-mistune)
5553 ("python-pexpect" ,python-pexpect)
5554 ("python-pickleshare" ,python-pickleshare)
5555 ("python-simplegeneric" ,python-simplegeneric)
5556 ("python-jsonschema" ,python-jsonschema)
5557 ("python-traitlets" ,python-traitlets)
5558 ("python-nbformat" ,python-nbformat)
5559 ("python-pygments" ,python-pygments)))
5560 (inputs
5561 `(("readline" ,readline)
5562 ("which" ,which)))
5563 (native-inputs
5564 `(("graphviz" ,graphviz)
5565 ("pkg-config" ,pkg-config)
5566 ("python-requests" ,python-requests) ;; for tests
5567 ("python-testpath" ,python-testpath)
8b5f756c 5568 ("python-nose" ,python-nose)))
44d10b1f
RW
5569 (arguments
5570 `(#:phases
5571 (modify-phases %standard-phases
0f272518
RW
5572 (add-after 'unpack 'make-docs-reproducible
5573 (lambda _
5574 (substitute* "IPython/sphinxext/ipython_directive.py"
5575 ((".*import datetime") "")
5576 ((".*datetime.datetime.now\\(\\)") "")
5577 (("%timeit") "# %timeit"))
5578 #t))
44d10b1f
RW
5579 ;; Tests can only be run after the library has been installed and not
5580 ;; within the source directory.
5581 (delete 'check)
5582 (add-after 'install 'check
5583 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5584 (if tests?
5585 (begin
5586 ;; Make installed package available for running the tests
5587 (add-installed-pythonpath inputs outputs)
5588 (setenv "HOME" "/tmp/") ;; required by a test
5589 ;; We only test the core because one of the other tests
5590 ;; tries to import ipykernel.
5591 (invoke "python" "IPython/testing/iptest.py"
5592 "-v" "IPython/core/tests"))
5593 #t)))
5594 (add-before 'check 'fix-tests
5595 (lambda* (#:key inputs #:allow-other-keys)
5596 (substitute* "./IPython/utils/_process_posix.py"
5597 (("/usr/bin/env', 'which") (which "which")))
5598 (substitute* "./IPython/core/tests/test_inputtransformer.py"
5599 (("#!/usr/bin/env python")
5600 (string-append "#!" (which "python"))))
44d10b1f
RW
5601 ;; This test introduces a circular dependency on ipykernel
5602 ;; (which depends on ipython).
5603 (delete-file "IPython/core/tests/test_display.py")
8b5f756c 5604 ;; AttributeError: module 'IPython.core' has no attribute 'formatters'
44d10b1f 5605 (delete-file "IPython/core/tests/test_interactiveshell.py")
44d10b1f
RW
5606 #t)))))
5607 (home-page "https://ipython.org")
5608 (synopsis "IPython is a tool for interactive computing in Python")
5609 (description
5610 "IPython provides a rich architecture for interactive computing with:
5611Powerful interactive shells, a browser-based notebook, support for interactive
5612data visualization, embeddable interpreters and tools for parallel
5613computing.")
8b5f756c 5614 (license license:bsd-3)))
44d10b1f 5615
8b5f756c
RW
5616(define-public python-ipython-documentation
5617 (package
5618 (inherit python-ipython)
5619 (name "python-ipython-documentation")
5620 (version (package-version python-ipython))
5621 (arguments
5622 `(#:phases
5623 (modify-phases %standard-phases
5624 (delete 'build)
5625 (delete 'check)
5626 (replace 'install
5627 (lambda* (#:key outputs #:allow-other-keys)
5628 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
5629 (doc (string-append data "/doc/" ,name "-" ,version))
5630 (html (string-append doc "/html"))
5631 (man1 (string-append data "/man/man1"))
5632 (info (string-append data "/info"))
5633 (examples (string-append doc "/examples"))
5634 (python-arg (string-append "PYTHON=" (which "python"))))
5635 (setenv "LANG" "en_US.utf8")
5636 (with-directory-excursion "docs"
5637 ;; FIXME: pdf fails to build
5638 ;;(system* "make" "pdf" "PAPER=a4")
5639 (system* "make" python-arg "html")
5640 ;; FIXME: the generated texi file contains ^@^@, which trips
5641 ;; up the parser.
5642 ;; (system* "make" python-arg "info")
5643 )
5644 (copy-recursively "docs/man" man1)
5645 (copy-recursively "examples" examples)
5646 (copy-recursively "docs/build/html" html)
5647 ;; (copy-file "docs/build/latex/ipython.pdf"
5648 ;; (string-append doc "/ipython.pdf"))
5649 (mkdir-p info)
5650 ;; (copy-file "docs/build/texinfo/ipython.info"
5651 ;; (string-append info "/ipython.info"))
5652 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
5653 #t)))))
5654 (inputs
5655 `(("python-ipython" ,python-ipython)
5656 ("python-ipykernel" ,python-ipykernel)))
5657 (native-inputs
5658 `(("python-sphinx" ,python-sphinx)
5659 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
5660 ;; FIXME: It's possible that a smaller union would work just as well.
f75aa97f 5661 ("texlive" ,(texlive-union (list texlive-amsfonts
8b5f756c
RW
5662 texlive-fonts-ec
5663 texlive-generic-ifxetex
5664 texlive-generic-pdftex
8b5f756c
RW
5665 texlive-latex-capt-of
5666 texlive-latex-cmap
5667 texlive-latex-environ
5668 texlive-latex-eqparbox
5669 texlive-latex-etoolbox
5670 texlive-latex-expdlist
5671 texlive-latex-fancyhdr
5672 texlive-latex-fancyvrb
5673 texlive-latex-fncychap
5674 texlive-latex-float
5675 texlive-latex-framed
5676 texlive-latex-geometry
5677 texlive-latex-graphics
5678 texlive-latex-hyperref
5679 texlive-latex-mdwtools
5680 texlive-latex-multirow
5681 texlive-latex-needspace
5682 texlive-latex-oberdiek
5683 texlive-latex-parskip
5684 texlive-latex-preview
5685 texlive-latex-tabulary
5686 texlive-latex-threeparttable
5687 texlive-latex-titlesec
5688 texlive-latex-trimspaces
5689 texlive-latex-ucs
5690 texlive-latex-upquote
5691 texlive-latex-url
5692 texlive-latex-varwidth
5693 texlive-latex-wrapfig)))
5694 ("texinfo" ,texinfo)))))
44d10b1f
RW
5695
5696(define-public python-urwid
5697 (package
5698 (name "python-urwid")
5699 (version "2.0.1")
5700 (source
5701 (origin
5702 (method url-fetch)
5703 (uri (pypi-uri "urwid" version))
5704 (sha256
5705 (base32
5706 "1g6cpicybvbananpjikmjk8npmjk4xvak1wjzji62wc600wkwkb4"))))
5707 (build-system python-build-system)
5708 (home-page "http://urwid.org")
5709 (synopsis "Console user interface library for Python")
5710 (description
5711 "Urwid is a curses-based UI/widget library for Python. It includes many
5712features useful for text console applications.")
5713 (license license:lgpl2.1+)))
5714
5715(define-public python2-urwid
5716 (package-with-python2 python-urwid))
5717
5718(define-public python-urwidtrees
5719 (package
5720 (name "python-urwidtrees")
5721 (version "1.0.2")
5722 (source
5723 (origin
5724 (method url-fetch)
5725 ;; package author intends on distributing via github rather than pypi:
5726 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
5727 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
5728 version ".tar.gz"))
5729 (file-name (string-append name "-" version ".tar.gz"))
5730 (sha256
5731 (base32
5732 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
5733 (build-system python-build-system)
5734 (arguments
5735 '(#:tests? #f)) ; no tests
5736 (propagated-inputs `(("python-urwid" ,python-urwid)))
5737 (home-page "https://github.com/pazz/urwidtrees")
5738 (synopsis "Tree widgets for urwid")
5739 (description "Urwidtrees is a Widget Container API for the @code{urwid}
5740toolkit. Use it to build trees of widgets.")
5741 (license license:gpl3+)))
5742
5743(define-public python2-urwidtrees
5744 (package-with-python2 python-urwidtrees))
5745
5746(define-public python-ua-parser
5747 (package
5748 (name "python-ua-parser")
5749 (version "0.8.0")
5750 (source
5751 (origin
5752 (method url-fetch)
5753 (uri (pypi-uri "ua-parser" version))
5754 (sha256
5755 (base32
5756 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
5757 (build-system python-build-system)
5758 (arguments
5759 `(#:tests? #f)) ;no test suite in release
5760 (native-inputs
5761 `(("python-pyyaml" ,python-pyyaml)))
5762 (home-page "https://github.com/ua-parser/uap-python")
5763 (synopsis "User agent parser")
5764 (description
5765 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
5766 (license license:asl2.0)))
5767
5768(define-public python2-ua-parser
5769 (package-with-python2 python-ua-parser))
5770
5771(define-public python-user-agents
5772 (package
5773 (name "python-user-agents")
5774 (version "1.1.0")
5775 (source
5776 (origin
5777 (method url-fetch)
5778 (uri (pypi-uri "user-agents" version))
5779 (sha256
5780 (base32
5781 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
5782 (build-system python-build-system)
5783 (arguments
5784 `(#:tests? #f)) ;missing devices.json test file in release
5785 (propagated-inputs
5786 `(("python-ua-parser" ,python-ua-parser)))
5787 (home-page "https://github.com/selwin/python-user-agents")
5788 (synopsis "User Agent strings parsing library")
5789 (description
5790 "A library to identify devices (phones, tablets) and their capabilities by
5791parsing (browser/HTTP) user agent strings.")
5792 (license license:expat)))
5793
5794(define-public python2-user-agents
5795 (package-with-python2 python-user-agents))
5796
5797(define-public python-dbus
5798 (package
5799 (name "python-dbus")
ba5ef999 5800 (version "1.2.14")
44d10b1f
RW
5801 (source
5802 (origin
5803 (method url-fetch)
5804 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
5805 "dbus-python-" version ".tar.gz"))
5806 (sha256
ba5ef999 5807 (base32 "0cdchkgnivlka4lf8q4qfk0yxq483i3r3aqickjf8hfn7nx0c0mi"))))
44d10b1f 5808 (build-system gnu-build-system)
44d10b1f
RW
5809 (native-inputs
5810 `(("pkg-config" ,pkg-config)))
5811 (inputs
5812 `(("python" ,python-wrapper)
5813 ("dbus-glib" ,dbus-glib)))
5814 (synopsis "Python bindings for D-bus")
5815 (description "python-dbus provides bindings for libdbus, the reference
5816implementation of D-Bus.")
5817 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
5818 (license license:expat)))
5819
5820(define-public python2-dbus
5821 (package (inherit python-dbus)
5822 (name "python2-dbus")
5823 (inputs `(("python" ,python-2)
5824 ,@(alist-delete "python"
5825 (package-inputs python-dbus)
ba5ef999 5826 equal?)))))
44d10b1f 5827
fb236fdd
AG
5828(define-public python-notify2
5829 (package
5830 (name "python-notify2")
5831 (version "0.3.1")
5832 (source
5833 (origin
5834 (method url-fetch)
5835 (uri (pypi-uri "notify2" version))
5836 (sha256
5837 (base32
5838 "0z8rrv9rsg1r2qgh2dxj3dfj5xnki98kgi3w839kqby4a26i1yik"))))
5839 (build-system python-build-system)
5840 (arguments `(#:tests? #f)) ; tests depend on system state
5841 (native-inputs
5842 `(("python-dbus" ,python-dbus)))
5843 (home-page "https://bitbucket.org/takluyver/pynotify2")
5844 (synopsis "Python interface to D-Bus notifications")
5845 (description
5846 "Pynotify2 provides a Python interface for sending D-Bus notifications.
5847It is a reimplementation of pynotify in pure Python, and an alternative to
5848the GObject Introspection bindings to libnotify for non-GTK applications.")
5849 (license (list license:bsd-2
5850 license:lgpl2.1+))))
5851
5852(define-public python2-notify2
5853 (package-with-python2 python-notify2))
5854
44d10b1f
RW
5855(define-public python-lxml
5856 (package
5857 (name "python-lxml")
2a74f928 5858 (version "4.4.1")
44d10b1f
RW
5859 (source
5860 (origin
5861 (method url-fetch)
5862 (uri (pypi-uri "lxml" version))
5863 (sha256
5864 (base32
2a74f928 5865 "14jnpfcpgqr9sx8ppd286jzcbk0b36hbqsvd8jkvffipzw5v8768"))))
44d10b1f 5866 (build-system python-build-system)
2f3c2daf
MB
5867 (arguments
5868 `(#:phases (modify-phases %standard-phases
5869 (replace 'check
5870 (lambda _
5871 (invoke "make" "test"))))))
44d10b1f
RW
5872 (inputs
5873 `(("libxml2" ,libxml2)
5874 ("libxslt" ,libxslt)))
5875 (home-page "http://lxml.de/")
5876 (synopsis
5877 "Python XML processing library")
5878 (description
5879 "The lxml XML toolkit is a Pythonic binding for the C libraries
5880libxml2 and libxslt.")
5881 (license license:bsd-3))) ; and a few more, see LICENSES.txt
5882
5883(define-public python2-lxml
5884 (package-with-python2 python-lxml))
5885
5886;; beautifulsoup4 has a totally different namespace than 3.x,
5887;; and pypi seems to put it under its own name, so I guess we should too
5888(define-public python-beautifulsoup4
5889 (package
5890 (name "python-beautifulsoup4")
abb53e6f 5891 (version "4.7.1")
44d10b1f
RW
5892 (source
5893 (origin
5894 (method url-fetch)
5895 (uri (pypi-uri "beautifulsoup4" version))
5896 (sha256
5897 (base32
abb53e6f 5898 "0j2kycz2dxgx68xzjm7rxg5xn6v61gq5ifvxyg99slmqkybnal4l"))))
44d10b1f
RW
5899 (build-system python-build-system)
5900 (arguments
5901 `(#:phases
5902 (modify-phases %standard-phases
5903 ;; The Python 2 source is the definitive source of beautifulsoup4. We
5904 ;; must use this conversion script when building with Python 3. The
5905 ;; conversion script also runs the tests.
5906 ;; For more information, see the file 'convert-py3k' in the source
5907 ;; distribution.
5908 (replace 'check
dff0197e 5909 (lambda _ (invoke "./convert-py3k"))))))
f83e10e4 5910 (propagated-inputs
abb53e6f 5911 `(("python-soupsieve" ,python-soupsieve)))
44d10b1f
RW
5912 (home-page
5913 "https://www.crummy.com/software/BeautifulSoup/bs4/")
5914 (synopsis
5915 "Python screen-scraping library")
5916 (description
5917 "Beautiful Soup is a Python library designed for rapidly setting up
5918screen-scraping projects. It offers Pythonic idioms for navigating,
5919searching, and modifying a parse tree, providing a toolkit for
5920dissecting a document and extracting what you need. It automatically
5921converts incoming documents to Unicode and outgoing documents to UTF-8.")
5922 (license license:expat)
5923 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
5924
5925(define-public python2-beautifulsoup4
5926 (package
5927 (inherit (package-with-python2
5928 (strip-python2-variant python-beautifulsoup4)))
5929 (arguments `(#:python ,python-2))))
5930
ad74978a
BT
5931(define-public python-soupsieve
5932 (package
5933 (name "python-soupsieve")
3367df31 5934 (version "1.9.5")
ad74978a
BT
5935 (source
5936 (origin
5937 (method url-fetch)
5938 (uri (pypi-uri "soupsieve" version))
5939 (sha256
5940 (base32
3367df31 5941 "1nhd0q0ifwva9wn645s6pn74p1rd97asn3qfg75nphx1wkgcbhg2"))))
ad74978a
BT
5942 (build-system python-build-system)
5943 (arguments `(#:tests? #f))
5944 ;;XXX: 2 tests fail currently despite claming they were to be
5945 ;;skipped. Also, beautifulsoup4 may depend on this in the future, so we
5946 ;;don't want to create a circular dependency.
5947 (home-page "https://github.com/facelessuser/soupsieve")
5948 (synopsis "CSS selector library")
5949 (description
5950 "Soup Sieve is a CSS selector library designed to be used with Beautiful
5951Soup 4. It aims to provide selecting, matching, and filtering using modern
5952CSS selectors. Soup Sieve currently provides selectors from the CSS level 1
5953specifications up through the latest CSS level 4 drafts and beyond (though
5954some are not yet implemented).")
d00b83fb 5955 (properties `((python2-variant . ,(delay python2-soupsieve))))
ad74978a
BT
5956 (license license:expat)))
5957
5958(define-public python2-soupsieve
d00b83fb 5959 (let ((base (package-with-python2 (strip-python2-variant python-soupsieve))))
ad74978a
BT
5960 (package
5961 (inherit base)
5962 (propagated-inputs
d00b83fb
MB
5963 `(("python2-backports-functools-lru-cache"
5964 ,python2-backports-functools-lru-cache)
5965 ,@(package-propagated-inputs base))))))
ad74978a 5966
44d10b1f
RW
5967(define-public python-netifaces
5968 (package
5969 (name "python-netifaces")
5970 (version "0.10.7")
5971 (source
5972 (origin
5973 (method url-fetch)
5974 (uri (pypi-uri "netifaces" version))
5975 (sha256
5976 (base32
5977 "1gccklrcplbbqh81g1mdgpa5y8na7kkf29cq2ka3f5a2fp5hyndx"))))
5978 (build-system python-build-system)
5979 (home-page "https://github.com/al45tair/netifaces")
5980 (synopsis
5981 "Python module for portable network interface information")
5982 (description
5983 "Netifaces is a Python module providing information on network
5984interfaces in an easy and portable manner.")
5985 (license license:expat)))
5986
5987(define-public python2-netifaces
5988 (package-with-python2 python-netifaces))
5989
5990(define-public python-networkx
5991 (package
5992 (name "python-networkx")
5993 (version "2.2")
5994 (source
5995 (origin
5996 (method url-fetch)
5997 (uri (pypi-uri "networkx" version ".zip"))
5998 (sha256
5999 (base32 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
6000 (build-system python-build-system)
6001 ;; python-decorator is needed at runtime.
6002 (propagated-inputs
6003 `(("python-decorator" ,python-decorator)))
6004 (native-inputs
6005 `(("python-nose" ,python-nose)
6006 ("unzip" ,unzip)))
6007 (home-page "https://networkx.github.io/")
6008 (synopsis "Python module for creating and manipulating graphs and networks")
6009 (description
6010 "NetworkX is a Python package for the creation, manipulation, and study
6011of the structure, dynamics, and functions of complex networks.")
6012 (license license:bsd-3)))
6013
6014(define-public python2-networkx
6015 (package-with-python2 python-networkx))
6016
6017(define-public python-datrie
6018 (package
6019 (name "python-datrie")
0b58cb42 6020 (version "0.8")
44d10b1f
RW
6021 (source
6022 (origin
6023 (method url-fetch)
6024 (uri (pypi-uri "datrie" version))
6025 (sha256
6026 (base32
0b58cb42 6027 "0338r8xgmpy78556jhms0h6qkvyjr10p8bpgdvcpqzm9lrmxmmdx"))))
44d10b1f 6028 (build-system python-build-system)
44d10b1f
RW
6029 (native-inputs
6030 `(("python-cython" ,python-cython)
6031 ("python-hypothesis" ,python-hypothesis)
6032 ("python-pytest" ,python-pytest)
6033 ("python-pytest-runner" ,python-pytest-runner)))
6034 (home-page "https://github.com/kmike/datrie")
6035 (synopsis "Fast, efficiently stored trie for Python")
6036 (description
6037 "This package provides a fast, efficiently stored trie implementation for
6038Python.")
6039 (license license:lgpl2.1+)))
6040
6041(define-public snakemake
6042 (package
6043 (name "snakemake")
93803c6b 6044 (version "5.7.1")
44d10b1f
RW
6045 (source
6046 (origin
6047 (method url-fetch)
6048 (uri (pypi-uri "snakemake" version))
6049 (sha256
93803c6b 6050 (base32 "1pnpvvn8n2a78cg360wz3ldmpqrsm2wzi0c0dmvki9fnsw6fxdas"))))
44d10b1f
RW
6051 (build-system python-build-system)
6052 (arguments
6053 ;; TODO: Package missing test dependencies.
6054 '(#:tests? #f
6055 #:phases
6056 (modify-phases %standard-phases
6057 ;; For cluster execution Snakemake will call Python. Since there is
6058 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
6059 ;; this by calling the snakemake wrapper instead.
6060 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
6061 (lambda* (#:key outputs #:allow-other-keys)
6062 (substitute* "snakemake/executors.py"
6063 (("\\{sys.executable\\} -m snakemake")
6064 (string-append (assoc-ref outputs "out")
6065 "/bin/snakemake")))
6066 #t)))))
6067 (propagated-inputs
8994ae34 6068 `(("python-appdirs" ,python-appdirs)
44d10b1f
RW
6069 ("python-configargparse" ,python-configargparse)
6070 ("python-datrie" ,python-datrie)
6071 ("python-docutils" ,python-docutils)
8994ae34 6072 ("python-gitpython" ,python-gitpython)
44d10b1f
RW
6073 ("python-jinja2" ,python-jinja2)
6074 ("python-jsonschema" ,python-jsonschema)
6075 ("python-networkx" ,python-networkx)
93803c6b 6076 ("python-psutil" ,python-psutil)
44d10b1f 6077 ("python-pyyaml" ,python-pyyaml)
8994ae34
TGR
6078 ("python-ratelimiter" ,python-ratelimiter)
6079 ("python-requests" ,python-requests)
6080 ("python-wrapt" ,python-wrapt)))
44d10b1f
RW
6081 (home-page "https://snakemake.readthedocs.io")
6082 (synopsis "Python-based execution environment for make-like workflows")
6083 (description
6084 "Snakemake aims to reduce the complexity of creating workflows by
6085providing a clean and modern domain specific specification language (DSL) in
6086Python style, together with a fast and comfortable execution environment.")
6087 (license license:expat)))
6088
44d10b1f
RW
6089(define-public python-pyqrcode
6090 (package
6091 (name "python-pyqrcode")
6092 (version "1.2.1")
6093 (source
6094 (origin
6095 (method url-fetch)
6096 (uri (pypi-uri "PyQRCode" version))
6097 (sha256
6098 (base32
6099 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
6100 (build-system python-build-system)
6101 (home-page
6102 "https://github.com/mnooner256/pyqrcode")
6103 (synopsis "QR code generator")
6104 (description
6105 "Pyqrcode is a QR code generator written purely in Python with
6106SVG, EPS, PNG and terminal output.")
6107 (license license:bsd-3)))
6108
6109(define-public python-seaborn
6110 (package
6111 (name "python-seaborn")
6112 (version "0.9.0")
6113 (source
6114 (origin
6115 (method url-fetch)
6116 (uri (pypi-uri "seaborn" version))
6117 (sha256
f9bd82e7
RW
6118 (base32 "0bqysi3fxfjl1866m5jq8z7mynhqbqnikim74dmzn8539iwkzj3n"))
6119 (patches
6120 (list (origin
6121 (method url-fetch)
6122 ;; This has already been merged, but there is no new
6123 ;; release including this patch. It fixes problems
6124 ;; with axis rotation that would lead to test
6125 ;; failures.
6126 (uri "https://patch-diff.githubusercontent.com/raw/mwaskom/seaborn/pull/1716.diff")
6127 (sha256
6128 (base32
6129 "1lm870z316n9ivsyr86hpk1gxaraw0mrjvq42lqsm0znhjdp9q9w"))
6130 (file-name "seaborn-0.9.0-axis-rotation.patch"))))))
44d10b1f
RW
6131 (build-system python-build-system)
6132 (arguments
6133 `(#:phases
6134 (modify-phases %standard-phases
6135 (add-before 'check 'start-xserver
6136 (lambda* (#:key inputs #:allow-other-keys)
6137 (let ((xorg-server (assoc-ref inputs "xorg-server")))
6138 ;; There must be a running X server and make check doesn't
6139 ;; start one. Therefore we must do it.
6140 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
6141 (setenv "DISPLAY" ":1")
6142 #t)))
a1322765
RW
6143 (add-after 'unpack 'fix-tests
6144 (lambda _
6145 ;; test_cbar_ticks fails probably because of matplotlib's
6146 ;; expectation of using an older version of FreeType.
6147 (delete-file "seaborn/tests/test_matrix.py")
6148 #t))
44d10b1f
RW
6149 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
6150 (propagated-inputs
6151 `(("python-pandas" ,python-pandas)
6152 ("python-matplotlib" ,python-matplotlib)
6153 ("python-numpy" ,python-numpy)
6154 ("python-scipy" ,python-scipy)))
6155 (native-inputs
6156 `(("python-pytest" ,python-pytest)
ff337525 6157 ("xorg-server" ,xorg-server-for-tests)))
44d10b1f
RW
6158 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
6159 (synopsis "Statistical data visualization")
6160 (description
6161 "Seaborn is a library for making attractive and informative statistical
6162graphics in Python. It is built on top of matplotlib and tightly integrated
6163with the PyData stack, including support for numpy and pandas data structures
6164and statistical routines from scipy and statsmodels.")
6165 (license license:bsd-3)))
6166
6167(define-public python2-seaborn
6168 (package-with-python2 python-seaborn))
6169
6170(define-public python-mpmath
6171 (package
6172 (name "python-mpmath")
6173 (version "0.19")
6174 (source (origin
6175 (method url-fetch)
6176 (uri (string-append "http://mpmath.org/files/mpmath-"
6177 version ".tar.gz"))
6178 (sha256
6179 (base32
6180 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
6181 (build-system python-build-system)
6182 (arguments
6183 '(#:phases
6184 (modify-phases %standard-phases
6185 (replace 'check
6186 (lambda _
5d7a6f1c 6187 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
44d10b1f
RW
6188 (home-page "http://mpmath.org")
6189 (synopsis "Arbitrary-precision floating-point arithmetic in python")
6190 (description
6191 "@code{mpmath} can be used as an arbitrary-precision substitute for
6192Python's float/complex types and math/cmath modules, but also does much
6193more advanced mathematics.")
6194 (license license:bsd-3)))
6195
6196(define-public python2-mpmath
6197 (package-with-python2 python-mpmath))
6198
6199(define-public python-bigfloat
6200 (package
6201 (name "python-bigfloat")
6202 (version "0.3.0")
6203 (source
6204 (origin
6205 (method url-fetch)
6206 (uri (pypi-uri "bigfloat" version))
6207 (sha256
6208 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
6209 (build-system python-build-system)
6210 (inputs
6211 `(("mpfr" ,mpfr)))
6212 (home-page "https://github.com/mdickinson/bigfloat")
6213 (synopsis "Arbitrary precision floating-point arithmetic for Python")
6214 (description
e36de31b 6215 "This package provides a Python interface to the MPFR library for
44d10b1f
RW
6216multiprecision arithmetic.")
6217 (license license:lgpl3+)))
6218
6219(define-public python2-bigfloat
6220 (package-with-python2 python-bigfloat))
6221
6222(define-public python-sympy
6223 (package
6224 (name "python-sympy")
6225 (version "1.1.1")
6226 (source
6227 (origin
6228 (method url-fetch)
6229 (uri (string-append
6230 "https://github.com/sympy/sympy/releases/download/sympy-"
6231 version "/sympy-" version ".tar.gz"))
6232 (sha256
6233 (base32 "190n29sppw7g8ihilc5451y7jlfcaw56crqiqbf1jff43dlmfnxc"))))
6234 (build-system python-build-system)
6235 (arguments
6236 `(#:phases
6237 (modify-phases %standard-phases
6238 ;; Run the core tests after installation. By default it would run
6239 ;; *all* tests, which take a very long time to complete and are known
6240 ;; to be flaky.
6241 (delete 'check)
6242 (add-after 'install 'check
6243 (lambda* (#:key outputs #:allow-other-keys)
6244 (invoke "python3" "-c" "import sympy; sympy.test(\"/core\")")
6245 #t)))))
6246 (propagated-inputs
6247 `(("python-mpmath" ,python-mpmath)))
6248 (home-page "http://www.sympy.org/")
6249 (synopsis "Python library for symbolic mathematics")
6250 (description
6251 "SymPy is a Python library for symbolic mathematics. It aims to become a
6252full-featured computer algebra system (CAS) while keeping the code as simple
6253as possible in order to be comprehensible and easily extensible.")
6254 (license license:bsd-3)))
6255
6256(define-public python2-sympy
6257 (package
6258 (inherit (package-with-python2 python-sympy))
6259 (arguments
6260 `(#:phases
6261 (modify-phases %standard-phases
6262 ;; Run the core tests after installation. By default it would run
6263 ;; *all* tests, which take a very long time to complete and are known
6264 ;; to be flaky.
6265 (delete 'check)
6266 (add-after 'install 'check
6267 (lambda* (#:key outputs #:allow-other-keys)
6268 (invoke "python" "-c" "import sympy; sympy.test(\"/core\")")
6269 #t)))))))
6270
6271(define-public python-q
6272 (package
6273 (name "python-q")
6274 (version "2.6")
6275 (source
6276 (origin
6277 (method url-fetch)
6278 (uri (pypi-uri "q" version))
6279 (sha256
6280 (base32
6281 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
6282 (build-system python-build-system)
6283 (home-page "https://github.com/zestyping/q")
6284 (synopsis "Quick-and-dirty debugging output for tired programmers")
6285 (description
6286 "q is a Python module for \"print\" style of debugging Python code. It
6287provides convenient short API for print out of values, tracebacks, and
6288falling into the Python interpreter.")
6289 (license license:asl2.0)))
6290
6291(define-public python2-q
6292 (package-with-python2 python-q))
6293
6294(define-public python2-xlib
6295 (package
6296 (name "python2-xlib")
6297 (version "0.14")
6298 (source (origin
6299 (method url-fetch)
6300 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
6301 "/" version "/"
6302 "python-xlib-" version ".tar.gz"))
6303 (sha256
6304 (base32
6305 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
6306 (build-system python-build-system)
6307 (arguments
6308 `(#:python ,python-2 ;Python 2 only
6309 #:tests? #f)) ;no tests
6310 (home-page "http://python-xlib.sourceforge.net/")
6311 (synopsis "Python X11 client library")
6312 (description
6313 "The Python X Library is intended to be a fully functional X client
6314library for Python programs. It is useful to implement low-level X clients.
6315It is written entirely in Python.")
6316 (license license:gpl2+)))
6317
6318(define-public python-singledispatch
6319 (package
6320 (name "python-singledispatch")
6321 (version "3.4.0.3")
6322 (source
6323 (origin
6324 (method url-fetch)
6325 (uri (pypi-uri "singledispatch" version))
6326 (sha256
6327 (base32
6328 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
6329 (build-system python-build-system)
6330 (native-inputs
6331 `(("python-six" ,python-six))) ; required for conversion, not at run-time
6332 (home-page
6333 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
6334 (synopsis "Backport of singledispatch feature from Python 3.4")
6335 (description
6336 "This library brings functools.singledispatch from Python 3.4 to Python
63372.6-3.3.")
6338 (license license:expat)))
6339
6340(define-public python2-singledispatch
6341 (package-with-python2 python-singledispatch))
6342
6343;; the python- version can be removed with python-3.5
6344(define-public python-backports-abc
6345 (package
6346 (name "python-backports-abc")
6347 (version "0.5")
6348 (source
6349 (origin
6350 (method url-fetch)
6351 (uri (pypi-uri "backports_abc" version))
6352 (sha256
6353 (base32
6354 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
6355 (build-system python-build-system)
6356 (home-page "https://github.com/cython/backports_abc")
6357 (synopsis "Backport of additions to the 'collections.abc' module")
6358 (description
6359 "Python-backports-abc provides a backport of additions to the
36a4366d 6360@code{collections.abc} module in Python-3.5.")
44d10b1f
RW
6361 (license license:psfl)))
6362
6363(define-public python2-backports-abc
6364 (package-with-python2 python-backports-abc))
6365
6366(define-public python-backports-csv
6367 (package
6368 (name "python-backports-csv")
6369 (version "1.0.5")
6370 (source
6371 (origin
6372 (method url-fetch)
6373 (uri (pypi-uri "backports.csv" version))
6374 (sha256
6375 (base32
6376 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
6377 (build-system python-build-system)
6378 (home-page "https://github.com/ryanhiebert/backports.csv")
6379 (synopsis "Backport of Python 3's csv module for Python 2")
6380 (description
6381 "Provides a backport of Python 3's @code{csv} module for parsing
6382comma separated values. The API of the @code{csv} module in Python 2
6383is drastically different from the @code{csv} module in Python 3.
6384This is due, for the most part, to the difference between str in
6385Python 2 and Python 3.")
6386 (license license:psfl)))
6387
6388(define-public python2-backports-csv
6389 (package-with-python2 python-backports-csv))
6390
6391(define-public python2-backports-shutil-get-terminal-size
6392 (package
6393 (name "python2-backports-shutil-get-terminal-size")
6394 (version "1.0.0")
6395 (source
6396 (origin
6397 (method url-fetch)
6398 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
6399 (sha256
6400 (base32
6401 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
6402 (build-system python-build-system)
6403 (arguments
6404 `(#:python ,python-2
6405 #:phases
6406 (modify-phases %standard-phases
6407 (replace 'check
6408 (lambda _
4a4a7d9a 6409 (invoke "py.test" "-v"))))))
44d10b1f
RW
6410 (native-inputs
6411 `(("python2-pytest" ,python2-pytest)))
6412 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
6413 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
6414 (description
6415 "This package provides a backport of the @code{get_terminal_size
6416function} from Python 3.3's @code{shutil}.
6417Unlike the original version it is written in pure Python rather than C,
6418so it might be a tiny bit slower.")
6419 (license license:expat)))
6420
6421(define-public python-waf
6422 (package
6423 (name "python-waf")
6424 (version "2.0.11")
6425 (source (origin
6426 (method url-fetch)
6427 (uri (string-append "https://waf.io/"
6428 "waf-" version ".tar.bz2"))
6429 (sha256
6430 (base32
6431 "13zrniwkmfqgsgzi9v5m1367fppp9yzrz6z2ny6hy8dmpb8mj4z4"))))
6432 (build-system python-build-system)
6433 (arguments
6434 '(#:phases
6435 (modify-phases %standard-phases
6436 (replace 'build
6437 (lambda _
6438 (invoke "python" "waf-light" "configure" "build")))
6439 (replace 'check
6440 (lambda _
6441 (invoke "python" "waf" "--version")))
6442 (replace 'install
6443 (lambda* (#:key outputs #:allow-other-keys)
6444 (let ((out (assoc-ref outputs "out")))
6445 (install-file "waf" (string-append out "/bin")))
6446 #t))
6447 ;; waf breaks when it is wrapped.
6448 (delete 'wrap))))
6449 (home-page "https://waf.io/")
6450 (synopsis "Python-based build system")
6451 (description
6452 "Waf is a Python-based framework for configuring, compiling and installing
6453applications.")
6454 (license license:bsd-3)))
6455
6456(define-public python2-waf
6457 (package-with-python2 python-waf))
6458
6459(define-public python-pyzmq
6460 (package
6461 (name "python-pyzmq")
6462 (version "17.1.2")
6463 (source
6464 (origin
6465 (method url-fetch)
6466 (uri (pypi-uri "pyzmq" version))
6467 (sha256
6468 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
6469 (build-system python-build-system)
6470 (arguments
6471 `(#:configure-flags
6472 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
6473 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
6474 ;; --inplace' for 'python setup.py test' to work.
6475 #:tests? #f))
6476 (inputs
6477 `(("zeromq" ,zeromq)))
6478 (native-inputs
6479 `(("pkg-config" ,pkg-config)
6480 ("python-nose" ,python-nose)))
6481 (home-page "https://github.com/zeromq/pyzmq")
6482 (synopsis "Python bindings for 0MQ")
6483 (description
6484 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
6485 (license license:bsd-4)))
6486
6487(define-public python2-pyzmq
6488 (package-with-python2 python-pyzmq))
6489
6490(define-public python-pep8
6491 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
6492 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
6493 ;; some dependents' test suites, and nothing more.
6494 (package
6495 (name "python-pep8")
6496 (version "1.7.0")
6497 (source
6498 (origin
6499 (method url-fetch)
6500 (uri (pypi-uri "pep8" version))
6501 (sha256
6502 (base32
2be878d8
CB
6503 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))
6504 (patches (search-patches "python-pep8-stdlib-tokenize-compat.patch"))))
44d10b1f
RW
6505 (build-system python-build-system)
6506 (home-page "https://pep8.readthedocs.org/")
6507 (synopsis "Python style guide checker")
6508 (description
6509 "This tools checks Python code against some of the style conventions in
6510PEP 8.")
6511 (license license:expat)))
6512
6513(define-public python2-pep8
6514 (package-with-python2 python-pep8))
6515
6516(define-public python-pyflakes
6517 (package
6518 (name "python-pyflakes")
d0cba11b 6519 (version "2.1.1")
44d10b1f
RW
6520 (source
6521 (origin
6522 (method url-fetch)
6523 (uri (pypi-uri "pyflakes" version))
6524 (sha256
6525 (base32
d0cba11b 6526 "18pq95a1xj2dgdd0m85gyfsn40jajj4xc3lp8wfv7igqhrc86xnr"))))
44d10b1f
RW
6527 (build-system python-build-system)
6528 (home-page
6529 "https://github.com/pyflakes/pyflakes")
6530 (synopsis "Passive checker of Python programs")
6531 (description
6532 "Pyflakes statically checks Python source code for common errors.")
6533 (license license:expat)))
6534
6535(define-public python2-pyflakes
6536 (package-with-python2 python-pyflakes))
6537
6538(define-public python-mccabe
6539 (package
6540 (name "python-mccabe")
6541 (version "0.6.1")
6542 (source
6543 (origin
6544 (method url-fetch)
6545 (uri (pypi-uri "mccabe" version))
6546 (sha256
6547 (base32
6548 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
6549 (build-system python-build-system)
6550 (native-inputs
6551 `(("python-pytest" ,python-pytest-bootstrap)
6552 ("python-pytest-runner" ,python-pytest-runner)))
6553 (home-page "https://github.com/flintwork/mccabe")
6554 (synopsis "McCabe checker, plugin for flake8")
6555 (description
6556 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
6557complexity of Python source code.")
6558 (license license:expat)))
6559
6560(define-public python2-mccabe
6561 (package-with-python2 python-mccabe))
6562
6563(define-public python-mccabe-0.2.1
6564 (package (inherit python-mccabe)
6565 (version "0.2.1")
6566 (source
6567 (origin
6568 (method url-fetch)
6569 (uri (pypi-uri "mccabe" version))
6570 (sha256
6571 (base32
6572 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
6573
6574(define-public python2-mccabe-0.2.1
6575 (package-with-python2 python-mccabe-0.2.1))
6576
6577;; Flake8 2.4.1 requires an older version of pep8.
6578;; This should be removed ASAP.
6579(define-public python-pep8-1.5.7
6580 (package (inherit python-pep8)
6581 (version "1.5.7")
6582 (source
f3576970
RW
6583 (origin
6584 (method url-fetch)
6585 (uri (pypi-uri "pep8" version))
6586 (sha256
6587 (base32
6588 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
44d10b1f
RW
6589 (arguments
6590 ;; XXX Tests not compatible with Python 3.5.
6591 '(#:tests? #f))))
6592
6593(define-public python2-pep8-1.5.7
6594 (package-with-python2 python-pep8-1.5.7))
6595
6596;; Flake8 2.4.1 requires an older version of pyflakes.
6597;; This should be removed ASAP.
6598(define-public python-pyflakes-0.8.1
6599 (package (inherit python-pyflakes)
6600 (version "0.8.1")
6601 (source
8c4dffb5
RW
6602 (origin
6603 (method url-fetch)
6604 (uri (pypi-uri "pyflakes" version))
6605 (sha256
6606 (base32
6607 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
44d10b1f
RW
6608 (arguments
6609 ;; XXX Tests not compatible with Python 3.5.
6610 '(#:tests? #f))))
6611
6612(define-public python2-pyflakes-0.8.1
6613 (package-with-python2 python-pyflakes-0.8.1))
6614
ac63cf0a 6615(define-public python-flake8
44d10b1f
RW
6616 (package
6617 (name "python-flake8")
beaff4a8 6618 (version "3.7.7")
ac63cf0a
MB
6619 (source (origin
6620 (method url-fetch)
6621 (uri (pypi-uri "flake8" version))
6622 (sha256
6623 (base32
beaff4a8 6624 "0qg6zggqigrd4k3gv88shd1a27d0cwgfql8vfiq2c7rl7w3rd6c5"))))
44d10b1f
RW
6625 (build-system python-build-system)
6626 (arguments
6627 `(#:phases
6628 (modify-phases %standard-phases
44d10b1f
RW
6629 (delete 'check)
6630 (add-after 'install 'check
6631 (lambda* (#:key inputs outputs #:allow-other-keys)
6632 (add-installed-pythonpath inputs outputs)
6633 (invoke "pytest" "-v")
6634 #t)))))
6635 (propagated-inputs
6636 `(("python-pycodestyle" ,python-pycodestyle)
beaff4a8 6637 ("python-entrypoints" ,python-entrypoints)
44d10b1f
RW
6638 ("python-pyflakes" ,python-pyflakes)
6639 ("python-mccabe" ,python-mccabe)))
6640 (native-inputs
6641 `(("python-mock" ,python-mock)
6642 ("python-pytest" ,python-pytest-bootstrap)
6643 ("python-pytest-runner" ,python-pytest-runner)))
6644 (home-page "https://gitlab.com/pycqa/flake8")
6645 (synopsis
6646 "The modular source code checker: pep8, pyflakes and co")
6647 (description
6648 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
ac63cf0a 6649 (properties `((python2-variant . ,(delay python2-flake8))))
44d10b1f
RW
6650 (license license:expat)))
6651
ac63cf0a
MB
6652(define-public python2-flake8
6653 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
44d10b1f
RW
6654 (package (inherit base)
6655 (propagated-inputs
6656 `(("python2-configparser" ,python2-configparser)
6657 ("python2-enum34" ,python2-enum34)
beaff4a8 6658 ("python2-typing" ,python2-typing)
44d10b1f
RW
6659 ,@(package-propagated-inputs base))))))
6660
44d10b1f
RW
6661;; python-hacking requires flake8 <2.6.0.
6662(define-public python-flake8-2.5
6663 (package
6664 (inherit python-flake8)
6665 (version "2.5.5")
6666 (source (origin
6667 (method url-fetch)
6668 (uri (pypi-uri "flake8" version))
6669 (sha256
6670 (base32
6671 "1snylqwbmrylbx3r1wpz8ggk98f6bcag4441ag8mm2l7wyn58sij"))))
6672 (propagated-inputs
6673 `(("python-pep8" ,python-pep8)
6674 ,@(package-propagated-inputs python-flake8)))
6675 (properties `((python2-variant . ,(delay python2-flake8-2.5))))))
6676
6677(define-public python2-flake8-2.5
6678 (package
6679 (inherit python2-flake8)
6680 (version (package-version python-flake8-2.5))
6681 (source (origin
6682 (inherit (package-source python-flake8-2.5))))
6683 (propagated-inputs
6684 `(("python2-pep8" ,python2-pep8)
6685 ,@(package-propagated-inputs python2-flake8)))))
6686
6687(define-public python-flake8-polyfill
6688 (package
6689 (name "python-flake8-polyfill")
6690 (version "1.0.2")
6691 (source
6692 (origin
6693 (method url-fetch)
6694 (uri (pypi-uri "flake8-polyfill" version))
6695 (sha256
6696 (base32
6697 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
6698 (build-system python-build-system)
6699 (arguments
6700 '(#:phases
6701 (modify-phases %standard-phases
6702 (replace 'check
6703 (lambda _
40a7153d
MB
6704 ;; Be compatible with Pytest 4:
6705 ;; https://gitlab.com/pycqa/flake8-polyfill/merge_requests/7
6706 (substitute* "setup.cfg"
6707 (("\\[pytest\\]")
6708 "[tool:pytest]"))
6709
44d10b1f
RW
6710 (setenv "PYTHONPATH"
6711 (string-append (getcwd) "/build/lib:"
6712 (getenv "PYTHONPATH")))
4f0a0894 6713 (invoke "py.test" "-v"))))))
44d10b1f
RW
6714 (native-inputs
6715 `(("python-flake8" ,python-flake8)
6716 ("python-mock" ,python-mock)
6717 ("python-pep8" ,python-pep8)
6718 ("python-pycodestyle" ,python-pycodestyle)
6719 ("python-pytest" ,python-pytest)))
6720 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
6721 (synopsis "Polyfill package for Flake8 plugins")
6722 (description
6723 "This package that provides some compatibility helpers for Flake8
6724plugins that intend to support Flake8 2.x and 3.x simultaneously.")
6725 (license license:expat)))
6726
6727(define-public python2-flake8-polyfill
6728 (package-with-python2 python-flake8-polyfill))
6729
6730(define-public python-mistune
6731 (package
6732 (name "python-mistune")
6733 (version "0.8.4")
6734 (source
6735 (origin
6736 (method url-fetch)
6737 (uri (pypi-uri "mistune" version))
6738 (sha256
6739 (base32
6740 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
6741 (build-system python-build-system)
6742 (native-inputs
6743 `(("python-nose" ,python-nose)
6744 ("python-cython" ,python-cython)))
6745 (home-page "https://github.com/lepture/mistune")
6746 (synopsis "Markdown parser in pure Python")
6747 (description "This package provides a fast markdown parser in pure
6748Python.")
6749 (license license:bsd-3)))
6750
6751(define-public python2-mistune
6752 (package-with-python2 python-mistune))
6753
6754(define-public python-markdown
6755 (package
6756 (name "python-markdown")
ceb1936a 6757 (version "3.1.1")
44d10b1f
RW
6758 (source
6759 (origin
6760 (method url-fetch)
6761 (uri (pypi-uri "Markdown" version))
6762 (sha256
6763 (base32
ceb1936a 6764 "0yhylk4ffqqs7x086fav4pnfsl1021v7lghznzkififprmmqfl1f"))))
44d10b1f
RW
6765 (build-system python-build-system)
6766 (native-inputs
6767 `(("python-nose" ,python-nose)
6768 ("python-pyyaml" ,python-pyyaml)))
6769 (home-page "https://python-markdown.github.io/")
6770 (synopsis "Python implementation of Markdown")
6771 (description
6772 "This package provides a Python implementation of John Gruber's
6773Markdown. The library features international input, various Markdown
6774extensions, and several HTML output formats. A command line wrapper
6775markdown_py is also provided to convert Markdown files to HTML.")
6776 (license license:bsd-3)))
6777
6778(define-public python2-markdown
6779 (package-with-python2 python-markdown))
6780
6781(define-public python-ptyprocess
6782 (package
6783 (name "python-ptyprocess")
6784 (version "0.5.2")
6785 (source
6786 (origin
6787 (method url-fetch)
6788 (uri (pypi-uri "ptyprocess" version))
6789 (sha256
6790 (base32
6791 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
6792 (build-system python-build-system)
6793 (native-inputs
6794 `(("python-nose" ,python-nose)))
6795 (arguments
6796 `(#:phases
6797 (modify-phases %standard-phases
6798 (replace 'check
7904d6fa 6799 (lambda _ (invoke "nosetests"))))))
44d10b1f
RW
6800 (home-page "https://github.com/pexpect/ptyprocess")
6801 (synopsis "Run a subprocess in a pseudo terminal")
6802 (description
6803 "This package provides a Python library used to launch a subprocess in a
6804pseudo terminal (pty), and interact with both the process and its pty.")
6805 (license license:isc)))
6806
6807(define-public python2-ptyprocess
6808 (package-with-python2 python-ptyprocess))
6809
6810(define-public python-cram
6811 (package
6812 (name "python-cram")
6813 (version "0.7")
6814 (home-page "https://bitheap.org/cram/")
6815 (source (origin
6816 (method url-fetch)
6817 (uri (list (string-append home-page "cram-"
6818 version ".tar.gz")
6819 (pypi-uri "cram" version)))
6820 (sha256
6821 (base32
6822 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
6823 (arguments
6824 '(#:phases
6825 (modify-phases %standard-phases
6826 (add-after 'unpack 'patch-source
6827 (lambda _
6828 (substitute* (find-files "cram" ".*\\.py$")
6829 ;; Replace default shell path.
6830 (("/bin/sh") (which "sh")))
6831 (substitute* (find-files "tests" ".*\\.t$")
6832 (("md5") "md5sum")
6833 (("/bin/bash") (which "bash"))
6834 (("/bin/sh") (which "sh")))
6835 (substitute* "cram/_test.py"
6836 ;; This hack works around a bug triggered by substituting
6837 ;; the /bin/sh paths. "tests/usage.t" compares the output of
6838 ;; "cram -h", which breaks the output at 80 characters. This
6839 ;; causes the line showing the default shell to break into two
6840 ;; lines, but the test expects a single line...
6841 (("env\\['COLUMNS'\\] = '80'")
6842 "env['COLUMNS'] = '160'"))
ff1e80d7
MB
6843
6844 (substitute* "Makefile"
6845 ;; Recent versions of python-coverage have caused the test
6846 ;; coverage to decrease (as of version 0.7). Allow that.
6847 (("--fail-under=100")
6848 "--fail-under=90"))
6849
44d10b1f 6850 #t))
ff1e80d7 6851 (replace 'check
44d10b1f 6852 ;; The test phase uses the built library and executable.
44d10b1f
RW
6853 (lambda* (#:key inputs outputs #:allow-other-keys)
6854 (add-installed-pythonpath inputs outputs)
6855 (setenv "PATH" (string-append (getenv "PATH") ":"
6856 (assoc-ref outputs "out") "/bin"))
2d7db192 6857 (invoke "make" "test"))))))
44d10b1f
RW
6858 (build-system python-build-system)
6859 (native-inputs
6860 `(("python-coverage" ,python-coverage)
6861 ("which" ,which)))
6862 (synopsis "Simple testing framework for command line applications")
6863 (description
6864 "Cram is a functional testing framework for command line applications.
6865Cram tests look like snippets of interactive shell sessions. Cram runs each
6866command and compares the command output in the test with the command’s actual
6867output.")
6868 (license license:gpl2+)))
6869
6870(define-public python2-cram
6871 (package-with-python2 python-cram))
6872
6873(define-public python-straight-plugin
6874 (package
6875 (name "python-straight-plugin")
6876 (version "1.4.1")
6877 (source
6878 (origin
6879 (method url-fetch)
6880 (uri (pypi-uri "straight.plugin" version))
6881 (sha256
6882 (base32
6883 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
6884 (build-system python-build-system)
6885 (home-page "https://github.com/ironfroggy/straight.plugin")
6886 (synopsis "Simple namespaced plugin facility")
6887 (description "Straight Plugin provides a type of plugin you can create from
6888almost any existing Python modules, and an easy way for outside developers to
6889add functionality and customization to your projects with their own plugins.")
6890 (license license:expat)))
6891
6892(define-public python2-straight-plugin
6893 (package-with-python2 python-straight-plugin))
6894
6895(define-public python-fonttools
6896 (package
6897 (name "python-fonttools")
1a4bb420 6898 (version "3.38.0")
44d10b1f
RW
6899 (source (origin
6900 (method url-fetch)
6901 (uri (pypi-uri "fonttools" version ".zip"))
6902 (sha256
6903 (base32
1a4bb420 6904 "12ripk3s7skgxr1bs9r8n13r94ym3s8iir7ivfixls9fa4dabmlh"))))
44d10b1f
RW
6905 (build-system python-build-system)
6906 (native-inputs
6907 `(("unzip" ,unzip)
6908 ("python-pytest" ,python-pytest)
6909 ("python-pytest-runner" ,python-pytest-runner)))
6910 (home-page "https://github.com/behdad/fonttools")
6911 (synopsis "Tools to manipulate font files")
6912 (description
6913 "FontTools/TTX is a library to manipulate font files from Python. It
6914supports reading and writing of TrueType/OpenType fonts, reading and writing
6915of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
6916also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
6917from an XML-based format.")
6918 (license license:expat)))
6919
6920(define-public python2-fonttools
6921 (package-with-python2 python-fonttools))
6922
6923(define-public python-ly
6924 (package
6925 (name "python-ly")
6926 (version "0.9.5")
6927 (source
6928 (origin
6929 (method url-fetch)
6930 (uri (pypi-uri name version))
6931 (sha256
6932 (base32
6933 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
6934 (build-system python-build-system)
6935 (arguments
6936 ;; FIXME: Some tests need network access.
6937 '(#:tests? #f))
6938 (synopsis "Tool and library for manipulating LilyPond files")
6939 (description "This package provides a Python library to parse, manipulate
6940or create documents in LilyPond format. A command line program ly is also
6941provided that can be used to do various manipulations with LilyPond files.")
6942 (home-page "https://pypi.python.org/pypi/python-ly")
6943 (license license:gpl2+)))
6944
6945(define-public python-appdirs
6946 (package
6947 (name "python-appdirs")
6948 (version "1.4.3")
6949 (source
6950 (origin
6951 (method url-fetch)
6952 (uri (pypi-uri "appdirs" version))
6953 (sha256
6954 (base32
6955 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
6956 (build-system python-build-system)
6957 (home-page "https://github.com/ActiveState/appdirs")
6958 (synopsis
6959 "Determine platform-specific dirs, e.g. a \"user data dir\"")
6960 (description
6961 "This module provides a portable way of finding out where user data
6962should be stored on various operating systems.")
6963 (license license:expat)))
6964
6965(define-public python2-appdirs
6966 (package-with-python2 python-appdirs))
6967
6968(define-public python-llfuse
6969 (package
6970 (name "python-llfuse")
6971 (version "1.3.5")
6972 (source (origin
6973 (method url-fetch)
6974 (uri (pypi-uri "llfuse" version ".tar.bz2"))
6975 (sha256
6976 (base32
6977 "1n7a90jww3ly49fm7x27m3xw3la3qfrnykcakga654g6kcyjlhbf"))))
6978 (build-system python-build-system)
6979 (inputs
6980 `(("fuse" ,fuse)
6981 ("attr" ,attr)))
6982 (native-inputs
6983 `(("pkg-config" ,pkg-config)))
6984 (synopsis "Python bindings for FUSE")
6985 (description
6986 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
6987 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
6988 (license license:lgpl2.0+)
6989 (properties `((python2-variant . ,(delay python2-llfuse))))))
6990
6991(define-public python2-llfuse
6992 (package (inherit (package-with-python2
6993 (strip-python2-variant python-llfuse)))
6994 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
6995
6996;; For attic-0.16
6997(define-public python-llfuse-0.41
6998 (package (inherit python-llfuse)
6999 (version "0.41.1")
7000 (source (origin
7001 (method url-fetch)
7002 (uri (string-append
7003 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
7004 "llfuse-" version ".tar.bz2"))
7005 (sha256
7006 (base32
7007 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
7008 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
7009 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
7010 (license (list license:expat license:lgpl2.0+))))
7011
7012(define-public python-msgpack
7013 (package
7014 (name "python-msgpack")
7015 (version "0.5.6")
7016 (source (origin
7017 (method url-fetch)
7018 (uri (pypi-uri "msgpack" version))
7019 (sha256
7020 (base32
7021 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
7022 (build-system python-build-system)
7023 (arguments
7024 `(#:modules ((guix build utils)
7025 (guix build python-build-system)
7026 (ice-9 ftw)
7027 (srfi srfi-1)
7028 (srfi srfi-26))
7029 #:phases
7030 (modify-phases %standard-phases
7031 (replace 'check
7032 (lambda _
7033 (let ((cwd (getcwd)))
7034 (setenv "PYTHONPATH"
7035 (string-append cwd "/build/"
7036 (find (cut string-prefix? "lib" <>)
7037 (scandir (string-append cwd "/build")))
7038 ":"
7039 (getenv "PYTHONPATH")))
7040 (invoke "pytest" "-v" "test")))))))
7041 (native-inputs
7042 `(("python-pytest" ,python-pytest)))
7043 (synopsis "MessagePack (de)serializer")
7044 (description "MessagePack is a fast, compact binary serialization format,
7045suitable for similar data to JSON. This package provides CPython bindings for
7046reading and writing MessagePack data.")
7047 (home-page "https://pypi.python.org/pypi/msgpack/")
7048 (license license:asl2.0)))
7049
7050;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
7051;; release 0.5. Some packages like borg still call it by the old name for now.
7052;; <https://bugs.gnu.org/30662>
7053(define-public python-msgpack-transitional
7054 (package
7055 (inherit python-msgpack)
7056 (name "python-msgpack-transitional")
7057 (arguments
7058 (substitute-keyword-arguments (package-arguments python-msgpack)
7059 ((#:phases phases)
7060 `(modify-phases ,phases
7061 (add-after 'unpack 'configure-transitional
7062 (lambda _
7063 ;; Keep using the old name.
7064 (substitute* "setup.py"
7065 (("TRANSITIONAL = False")
7066 "TRANSITIONAL = 1"))
7067 #t))))))))
7068
7069(define-public python2-msgpack
7070 (package-with-python2 python-msgpack))
7071
7072(define-public python-netaddr
7073 (package
7074 (name "python-netaddr")
7075 (version "0.7.19")
7076 (source
7077 (origin
7078 (method url-fetch)
7079 (uri (pypi-uri "netaddr" version))
7080 (sha256
7081 (base32
7082 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
7083 (build-system python-build-system)
7084 (arguments `(#:tests? #f)) ;; No tests.
7085 (home-page "https://github.com/drkjam/netaddr/")
7086 (synopsis "Pythonic manipulation of network addresses")
7087 (description
7088 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
7089and MAC network addresses.")
7090 (license license:bsd-3)))
7091
7092(define-public python2-netaddr
7093 (package-with-python2 python-netaddr))
7094
dd85eca0
AG
7095(define-public python2-pyroute2
7096 (package
7097 (name "python2-pyroute2")
7098 (version "0.5.6")
7099 (source
7100 (origin
7101 (method url-fetch)
7102 (uri (pypi-uri "pyroute2" version))
7103 (sha256
7104 (base32
7105 "1gmz4r1w0yzj6fjjypnalmfyy0lnfznydyn62gi3wk50j5hhxbny"))))
7106 (build-system python-build-system)
7107 (arguments
7108 `(#:python ,python-2)) ;Python 3.x is not supported
7109 (home-page "https://github.com/svinota/pyroute2")
7110 (synopsis "Python netlink library")
7111 (description
7112 "Pyroute2 is a pure Python netlink library with minimal dependencies.
7113Supported netlink families and protocols include:
7114@itemize
7115@item rtnl, network settings - addresses, routes, traffic controls
7116@item nfnetlink - netfilter API: ipset, nftables, ...
7117@item ipq - simplest userspace packet filtering, iptables QUEUE target
7118@item devlink - manage and monitor devlink-enabled hardware
7119@item generic - generic netlink families
7120 @itemize
7121 @item nl80211 - wireless functions API (basic support)
7122 @item taskstats - extended process statistics
7123 @item acpi_events - ACPI events monitoring
7124 @item thermal_events - thermal events monitoring
7125 @item VFS_DQUOT - disk quota events monitoring
7126 @end itemize
7127@end itemize")
7128 (license license:gpl2+)))
7129
44d10b1f
RW
7130(define-public python-wrapt
7131 (package
7132 (name "python-wrapt")
2271a1dc 7133 (version "1.11.2")
44d10b1f 7134 (source
2271a1dc
MB
7135 (origin
7136 (method url-fetch)
7137 (uri (pypi-uri "wrapt" version))
7138 (sha256
7139 (base32
7140 "1q81762dgsgrd12f8qc39zk8s5wll3m5xc32jdmlf6cls4gh4njn"))))
44d10b1f
RW
7141 (build-system python-build-system)
7142 (arguments
7143 ;; Tests are not included in the tarball, they are only available in the
7144 ;; git repository.
7145 `(#:tests? #f))
7146 (home-page "https://github.com/GrahamDumpleton/wrapt")
7147 (synopsis "Module for decorators, wrappers and monkey patching")
7148 (description
2271a1dc 7149 "The aim of the wrapt module is to provide a transparent object proxy for
44d10b1f
RW
7150 Python, which can be used as the basis for the construction of function
7151 wrappers and decorator functions.")
7152 (license license:bsd-2)))
7153
7154(define-public python2-wrapt
7155 (package-with-python2 python-wrapt))
7156
7157(define-public python-xlrd
7158 (package
7159 (name "python-xlrd")
3a2b1a3c 7160 (version "1.2.0")
44d10b1f
RW
7161 (source (origin
7162 (method url-fetch)
7163 (uri (pypi-uri "xlrd" version))
7164 (sha256
7165 (base32
3a2b1a3c 7166 "1ci93fda4n67qhdvfl16zasyxrpygzk53hs6m8z0rd4dxrnb6vjl"))))
44d10b1f
RW
7167 (build-system python-build-system)
7168 (arguments
7169 `(#:phases
7170 (modify-phases %standard-phases
3ccdd3a5
MO
7171 ;; Some tests depend on writing a temporary file to the user's home
7172 ;; directory.
3a2b1a3c
GL
7173 (add-after 'unpack 'fix-tests
7174 (lambda _
7175 (delete-file "tests/test_open_workbook.py")
7176 #t)))))
44d10b1f
RW
7177 (home-page "http://www.python-excel.org/")
7178 (synopsis "Library for extracting data from Excel files")
a0909286 7179 (description "This package provides a library to extract data from
44d10b1f
RW
7180spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
7181@samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
7182Unicode-aware. It is not intended as an end-user tool.")
7183 (license license:bsd-3)))
7184
7185(define-public python2-xlrd
7186 (package-with-python2 python-xlrd))
7187
7188(define-public python-prettytable
7189 (package
7190 (name "python-prettytable")
7191 (version "0.7.2")
7192 (source
7193 (origin
7194 (method url-fetch)
337c3a1e 7195 (uri (pypi-uri "prettytable" version ".tar.bz2"))
44d10b1f
RW
7196 (sha256
7197 (base32
7198 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
7199 (build-system python-build-system)
7200 (home-page "http://code.google.com/p/prettytable/")
7201 (synopsis "Display tabular data in an ASCII table format")
7202 (description
7203 "A library designed to represent tabular data in visually appealing ASCII
7204tables. PrettyTable allows for selection of which columns are to be printed,
7205independent alignment of columns (left or right justified or centred) and
7206printing of sub-tables by specifying a row range.")
7207 (license license:bsd-3)))
7208
7209(define-public python2-prettytable
7210 (package-with-python2 python-prettytable))
7211
7212(define-public python-tables
7213 (package
7214 (name "python-tables")
7215 (version "3.4.4")
7216 (source
7217 (origin
7218 (method url-fetch)
7219 (uri (pypi-uri "tables" version))
7220 (sha256
7221 (base32
7222 "0affz7k8babh8wdmsgrz5jxrd569by2w8ffimcxs9wiaf5rw1idx"))
7223 (modules '((guix build utils)))
7224 (snippet
7225 '(begin
7226 ;; Remove pre-compiled .pyc files from source.
7227 (for-each delete-file-recursively
7228 (find-files "." "__pycache__" #:directories? #t))
7229 (for-each delete-file (find-files "." "\\.pyc$"))
7230 #t))))
7231 (build-system python-build-system)
7232 (arguments
7233 `(;; FIXME: python-build-system does not pass configure-flags to "build"
7234 ;; or "check", so we must override the build and check phases.
7235 #:phases
7236 (modify-phases %standard-phases
7237 (add-after 'unpack 'use-gcc
7238 (lambda _
7239 (substitute* "setup.py"
7240 (("compiler = new_compiler\\(\\)" line)
7241 (string-append line
7242 "\ncompiler.set_executables(compiler='gcc',"
7243 "compiler_so='gcc',"
7244 "linker_exe='gcc',"
7245 "linker_so='gcc -shared')")))
7246 #t))
7247 (replace 'build
7248 (lambda* (#:key inputs #:allow-other-keys)
35d79d61
RW
7249 (invoke "python" "setup.py" "build"
7250 (string-append "--hdf5="
7251 (assoc-ref inputs "hdf5")))))
44d10b1f
RW
7252 (replace 'check
7253 (lambda* (#:key inputs #:allow-other-keys)
35d79d61
RW
7254 (invoke "python" "setup.py" "check"
7255 (string-append "--hdf5="
7256 (assoc-ref inputs "hdf5"))))))))
44d10b1f
RW
7257 (propagated-inputs
7258 `(("python-numexpr" ,python-numexpr)
7259 ("python-numpy" ,python-numpy)))
7260 (native-inputs
7261 `(("python-cython" ,python-cython)
7262 ("pkg-config" ,pkg-config)))
7263 (inputs
7264 `(("hdf5" ,hdf5)
7265 ("bzip2" ,bzip2)
7266 ("zlib" ,zlib)))
7267 (home-page "http://www.pytables.org/")
7268 (synopsis "Hierarchical datasets for Python")
7269 (description "PyTables is a package for managing hierarchical datasets and
7270designed to efficiently cope with extremely large amounts of data.")
7271 (license license:bsd-3)))
7272
7273(define-public python2-tables
7274 (package-with-python2 python-tables))
7275
7276(define-public python-pyasn1
7277 (package
7278 (name "python-pyasn1")
7279 (version "0.4.3")
7280 (source
7281 (origin
7282 (method url-fetch)
7283 (uri (pypi-uri "pyasn1" version))
7284 (sha256
7285 (base32
7286 "1z5h38anjzzrxpraa9iq9llffyx2zs8gx0q6dc1g029miwnn50gv"))))
7287 (build-system python-build-system)
7288 (home-page "http://pyasn1.sourceforge.net/")
7289 (synopsis "ASN.1 types and codecs")
7290 (description
7291 "This is an implementation of ASN.1 types and codecs in Python. It is
7292suitable for a wide range of protocols based on the ASN.1 specification.")
7293 (license license:bsd-2)))
7294
7295(define-public python2-pyasn1
7296 (package-with-python2 python-pyasn1))
7297
7298(define-public python-pyasn1-modules
7299 (package
7300 (name "python-pyasn1-modules")
7301 (version "0.2.2")
7302 (source
7303 (origin
7304 (method url-fetch)
7305 (uri (pypi-uri "pyasn1-modules" version))
7306 (sha256
7307 (base32
7308 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
7309 (build-system python-build-system)
7310 (propagated-inputs
7311 `(("python-pyasn1" ,python-pyasn1)))
7312 (home-page "https://sourceforge.net/projects/pyasn1/")
7313 (synopsis "ASN.1 codec implementations")
7314 (description
7315 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
7316implementations of ASN.1-based codecs and protocols.")
7317 (license license:bsd-3)))
7318
7319(define-public python2-pyasn1-modules
7320 (package-with-python2 python-pyasn1-modules))
7321
7322(define-public python-ipaddress
7323 (package
7324 (name "python-ipaddress")
7325 (version "1.0.22")
7326 (source (origin
7327 (method url-fetch)
7328 (uri (pypi-uri "ipaddress" version))
7329 (sha256
7330 (base32
7331 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
7332 (build-system python-build-system)
7333 (home-page "https://github.com/phihag/ipaddress")
7334 (synopsis "IP address manipulation library")
7335 (description
7336 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
7337 in Python. This library is used to create, poke at, and manipulate IPv4 and
7338 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
7339 module to older versions of Python.")
7340 (license license:psfl)))
7341
7342(define-public python2-ipaddress
7343 (package-with-python2 python-ipaddress))
7344
7345(define-public python2-ipaddr
7346 (package
7347 (name "python2-ipaddr")
7348 (version "2.1.11")
7349 (source
7350 (origin
7351 (method url-fetch)
7352 (uri (pypi-uri "ipaddr" version))
7353 (sha256
7354 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
7355 (build-system python-build-system)
7356 (arguments
7357 `(#:python ,python-2 ;version 2 only
7358 #:phases
7359 (modify-phases %standard-phases
7360 (replace 'check
40b8c4e3 7361 (lambda _ (invoke "python" "ipaddr_test.py"))))))
44d10b1f
RW
7362 (home-page "https://github.com/google/ipaddr-py")
7363 (synopsis "IP address manipulation library")
7364 (description
7365 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
7366IPv6 addresses and networks.
7367
7368For new implementations you may prefer to use the standard module
7369@code{ipaddress}, which was introduced in Python 3.3 and backported to older
7370versions of Python.")
7371 (license license:asl2.0)))
7372
7373(define-public python-idna
7374 (package
7375 (name "python-idna")
e95c9837 7376 (version "2.8")
44d10b1f
RW
7377 (source
7378 (origin
7379 (method url-fetch)
7380 (uri (pypi-uri "idna" version))
7381 (sha256
7382 (base32
e95c9837 7383 "01rlkigdxg17sf9yar1jl8n18ls59367wqh59hnawlyg53vb6my3"))))
44d10b1f
RW
7384 (build-system python-build-system)
7385 (home-page "https://github.com/kjd/idna")
7386 (synopsis "Internationalized domain names in applications")
7387 (description
7388 "This is a library to support the Internationalised Domain Names in
7389Applications (IDNA) protocol as specified in RFC 5891. This version of the
7390protocol is often referred to as “IDNA2008” and can produce different results
7391from the earlier standard from 2003. The library is also intended to act as a
7392suitable drop-in replacement for the “encodings.idna” module that comes with
7393the Python standard library but currently only supports the older 2003
7394specification.")
7395 (license license:bsd-4)))
7396
a76e6a69
JM
7397(define-public python-idna-2.7
7398 (package (inherit python-idna)
7399 (version "2.7")
7400 (source (origin
7401 (method url-fetch)
7402 (uri (pypi-uri "idna" version))
7403 (sha256
7404 (base32
7405 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))))
7406
7407
44d10b1f
RW
7408(define-public python2-idna
7409 (package-with-python2 python-idna))
7410
7411(define-public python-idna-ssl
7412 (package
7413 (name "python-idna-ssl")
7414 (version "1.0.1")
7415 (source
7416 (origin
7417 (method url-fetch)
7418 (uri (pypi-uri "idna-ssl" version))
7419 (sha256
7420 (base32
7421 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
7422 (build-system python-build-system)
7423 (arguments
7424 `(#:tests? #f)) ;circular dependency with python-aiohttp
7425 (home-page "https://github.com/aio-libs/idna-ssl")
7426 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
7427 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
7428domains support.")
7429 (license license:expat)))
7430
7431(define-public python-pretend
7432 (package
7433 (name "python-pretend")
7434 (version "1.0.9")
7435 (source
7436 (origin
7437 (method url-fetch)
9f1f22ee 7438 (uri (pypi-uri "pretend" version))
44d10b1f
RW
7439 (sha256
7440 (base32
7441 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
7442 (build-system python-build-system)
7443 (home-page "https://github.com/alex/pretend")
7444 (synopsis "Library for stubbing in Python")
7445 (description
7446 "Pretend is a library to make stubbing with Python easier. Stubbing is a
7447technique for writing tests. You may hear the term mixed up with mocks,
7448fakes, or doubles. Basically, a stub is an object that returns pre-canned
7449responses, rather than doing any computation.")
7450 (license license:bsd-3)))
7451
7452(define-public python2-pretend
7453 (package-with-python2 python-pretend))
7454
7455(define-public python-pip
7456 (package
7457 (name "python-pip")
523ba4b1 7458 (version "19.2.1")
44d10b1f
RW
7459 (source
7460 (origin
7461 (method url-fetch)
7462 (uri (pypi-uri "pip" version))
7463 (sha256
7464 (base32
523ba4b1 7465 "100sd12ss4mbdj5lf3wawad29cm573b27765mq098x6xhcj71395"))))
44d10b1f
RW
7466 (build-system python-build-system)
7467 (arguments
7468 '(#:tests? #f)) ; there are no tests in the pypi archive.
7469 (home-page "https://pip.pypa.io/")
7470 (synopsis "Package manager for Python software")
7471 (description
7472 "Pip is a package manager for Python software, that finds packages on the
7473Python Package Index (PyPI).")
7474 (license license:expat)))
7475
7476(define-public python2-pip
7477 (package-with-python2 python-pip))
7478
7479(define-public python-tlsh
7480 (package
7481 (name "python-tlsh")
7482 (version "3.4.5")
7483 (home-page "https://github.com/trendmicro/tlsh")
3e3ff8ad
TGR
7484 (source
7485 (origin
7486 (method git-fetch)
7487 (uri (git-reference
7488 (url "https://github.com/trendmicro/tlsh.git")
7489 (commit (string-append "v" version))))
7490 (file-name (git-file-name name version))
7491 (sha256
7492 (base32 "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll"))))
44d10b1f
RW
7493 (build-system cmake-build-system)
7494 (arguments
7495 '(#:out-of-source? #f
7496 #:phases (modify-phases %standard-phases
7497 (replace
7498 'install
7499 (lambda* (#:key outputs #:allow-other-keys)
7500 ;; Build and install the Python bindings. The underlying
7501 ;; C++ library is apparently not meant to be installed.
7502 (let ((out (assoc-ref outputs "out")))
7503 (with-directory-excursion "py_ext"
7504 (and (system* "python" "setup.py" "build")
7505 (system* "python" "setup.py" "install"
7506 (string-append "--prefix=" out))))))))))
7507 (inputs `(("python" ,python-wrapper))) ;for the bindings
7508 (synopsis "Fuzzy matching library for Python")
7509 (description
7510 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
7511Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
7512value which can be used for similarity comparisons. Similar objects have
7513similar hash values, which allows for the detection of similar objects by
7514comparing their hash values. The byte stream should have a sufficient amount
7515of complexity; for example, a byte stream of identical bytes will not generate
7516a hash value.")
7517 (license license:asl2.0)))
7518
7519(define-public python2-tlsh
7520 (package
7521 (inherit python-tlsh)
7522 (name "python2-tlsh")
7523 (inputs `(("python" ,python-2)))))
7524
7525(define-public python-termcolor
7526 (package
7527 (name "python-termcolor")
7528 (version "1.1.0")
7529 (source
7530 (origin
7531 (method url-fetch)
7532 (uri (pypi-uri "termcolor" version))
7533 (sha256
7534 (base32
7535 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
7536 (build-system python-build-system)
7537 (arguments
7538 ;; There are no tests.
7539 `(#:tests? #f))
7540 (home-page "https://pypi.python.org/pypi/termcolor")
7541 (synopsis "ANSII Color formatting for terminal output")
7542 (description
7543 "This package provides ANSII Color formatting for output in terminals.")
7544 (license license:expat)))
7545
7546(define-public python2-termcolor
7547 (package-with-python2 python-termcolor))
7548
7549(define-public python-libarchive-c
7550 (package
7551 (name "python-libarchive-c")
7552 (version "2.8")
7553 (source (origin
7554 (method url-fetch)
7555 (uri (pypi-uri "libarchive-c" version))
7556 (sha256
7557 (base32
7558 "0qg0v1s9c1xdk9philhnv8k6c6nicvnvfwlc0j9srg90jmdlvm06"))))
7559 (build-system python-build-system)
7560 (arguments
7561 '(#:phases (modify-phases %standard-phases
7562 (add-before
7563 'build 'reference-libarchive
7564 (lambda* (#:key inputs #:allow-other-keys)
7565 ;; Retain the absolute file name of libarchive.so.
7566 (let ((libarchive (assoc-ref inputs "libarchive")))
7567 (substitute* "libarchive/ffi.py"
7568 (("find_library\\('archive'\\)")
7569 (string-append "'" libarchive
7570 "/lib/libarchive.so'"))))))
7571 (replace 'check
7572 (lambda _ (invoke "pytest" "-vv"))))))
7573 (native-inputs
7574 `(("python-mock" ,python-mock)
7575 ("python-pytest" ,python-pytest)))
7576 (inputs
7577 `(("libarchive" ,libarchive)))
7578 (home-page "https://github.com/Changaco/python-libarchive-c")
7579 (synopsis "Python interface to libarchive")
7580 (description
7581 "This package provides Python bindings to libarchive, a C library to
7582access possibly compressed archives in many different formats. It uses
7583Python's @code{ctypes} foreign function interface (FFI).")
7584 (license license:lgpl2.0+)))
7585
7586(define-public python2-libarchive-c
7587 (package-with-python2 python-libarchive-c))
7588
7589(define-public python-file
7590 (package
7591 (inherit file)
7592 (name "python-file")
7593 (build-system python-build-system)
7594 (arguments
7595 '(#:tests? #f ;no tests
7596 #:configure-flags '("--single-version-externally-managed" "--root=/")
7597 #:phases (modify-phases %standard-phases
7598 (add-before 'build 'change-directory
7599 (lambda _
7600 (chdir "python")
7601 #t))
7602 (add-before 'build 'set-library-file-name
7603 (lambda* (#:key inputs #:allow-other-keys)
7604 (let ((file (assoc-ref inputs "file")))
7605 (substitute* "magic.py"
7606 (("find_library\\('magic'\\)")
7607 (string-append "'" file "/lib/libmagic.so'")))
7608 #t))))))
7609 (inputs `(("file" ,file)))
528ea990
LC
7610 (native-inputs (if (%current-target-system)
7611 `(("self" ,this-package))
7612 '()))
44d10b1f
RW
7613 (synopsis "Python bindings to the libmagic file type guesser. Note that
7614this module and the python-magic module both provide a \"magic.py\" file;
7615these two modules, which are different and were developed separately, both
7616serve the same purpose: provide Python bindings for libmagic.")))
7617
7618(define-public python2-file
7619 (package-with-python2 python-file))
7620
7621(define-public python-debian
7622 (package
7623 (name "python-debian")
7624 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
9f74bd31 7625 (version "0.1.36")
44d10b1f
RW
7626 (source
7627 (origin
9f74bd31
VC
7628 ;; Use git-fetch, as pypi doesn't include test suite.
7629 (method git-fetch)
7630 (uri (git-reference
7631 (url home-page)
7632 (commit version)))
7633 (file-name (git-file-name name version))
44d10b1f
RW
7634 (sha256
7635 (base32
9f74bd31 7636 "0qy6x28bj6yfikhjww932v5xq4mf5bm1iczl7acy4c7zm6mwhqfa"))))
44d10b1f 7637 (build-system python-build-system)
9f74bd31
VC
7638 (arguments
7639 `(#:phases (modify-phases %standard-phases
7640 (add-after 'unpack 'remove-debian-specific-tests
7641 ;; python-apt, apt and dpkg are not yet available in guix,
7642 ;; and these tests heavily depend on them.
7643 (lambda _
7644 (delete-file "lib/debian/tests/test_deb822.py")
7645 (delete-file "lib/debian/tests/test_debfile.py")
7646 #t)))))
44d10b1f 7647 (propagated-inputs
9f74bd31
VC
7648 `(("python-six" ,python-six)
7649 ("python-chardet" ,python-chardet)))
44d10b1f
RW
7650 (synopsis "Debian package related modules")
7651 (description
7652 ;; XXX: Use @enumerate instead of @itemize to work around
7653 ;; <http://bugs.gnu.org/21772>.
7654 "This package provides Python modules that abstract many formats of
7655Debian-related files, such as:
7656
7657@enumerate
7658@item Debtags information;
7659@item @file{debian/changelog} files;
7660@item packages files, pdiffs;
7661@item control files of single or multiple RFC822-style paragraphs---e.g.
7662 @file{debian/control}, @file{.changes}, @file{.dsc};
7663@item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
7664 contained files and meta-information.
7665@end enumerate\n")
7666
7667 ;; Modules are either GPLv2+ or GPLv3+.
7668 (license license:gpl3+)))
7669
7670(define-public python2-debian
7671 (package-with-python2 python-debian))
7672
7673(define-public python-nbformat
7674 (package
7675 (name "python-nbformat")
7676 (version "4.4.0")
7677 (source
7678 (origin
7679 (method url-fetch)
7680 (uri (pypi-uri "nbformat" version))
7681 (sha256
7682 (base32
7683 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
7684 (build-system python-build-system)
7685 (arguments `(#:tests? #f)) ; no test target
7686 (propagated-inputs
7687 `(("python-ipython-genutils" ,python-ipython-genutils)
7688 ("python-jsonschema" ,python-jsonschema)
7689 ("python-jupyter-core" ,python-jupyter-core)
7690 ("python-traitlets" ,python-traitlets)))
7691 (home-page "http://jupyter.org")
7692 (synopsis "Jupyter Notebook format")
7693 (description "This package provides the reference implementation of the
7694Jupyter Notebook format and Python APIs for working with notebooks.")
7695 (license license:bsd-3)))
7696
7697(define-public python2-nbformat
7698 (package-with-python2 python-nbformat))
7699
7700(define-public python-bleach
7701 (package
7702 (name "python-bleach")
ff0efc8f 7703 (version "3.1.0")
44d10b1f
RW
7704 (source
7705 (origin
7706 (method url-fetch)
7707 (uri (pypi-uri "bleach" version))
7708 (sha256
7709 (base32
ff0efc8f 7710 "1yhrgrhkln8bd6gn3imj69g1h4xqah9gaz9q26crqr6gmmvpzprz"))))
44d10b1f
RW
7711 (build-system python-build-system)
7712 (propagated-inputs
ff0efc8f 7713 `(("python-webencodings" ,python-webencodings)
44d10b1f
RW
7714 ("python-six" ,python-six)))
7715 (native-inputs
ff0efc8f
MB
7716 `(("python-pytest" ,python-pytest)
7717 ("python-pytest-runner" ,python-pytest-runner-2)))
44d10b1f
RW
7718 (home-page "https://github.com/jsocol/bleach")
7719 (synopsis "Whitelist-based HTML-sanitizing tool")
7720 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
7721 (license license:asl2.0)))
7722
7723(define-public python2-bleach
7724 (package-with-python2 python-bleach))
7725
7726(define-public python-entrypoints
7727 (package
7728 (name "python-entrypoints")
a7f1b718 7729 (version "0.3")
44d10b1f
RW
7730 (source
7731 (origin
7732 (method url-fetch)
a7f1b718 7733 (uri (pypi-uri "entrypoints" version))
44d10b1f
RW
7734 (sha256
7735 (base32
a7f1b718 7736 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
44d10b1f
RW
7737 (build-system python-build-system)
7738 ;; The package does not come with a setup.py file, so we have to generate
7739 ;; one ourselves.
7740 (arguments
7741 `(#:tests? #f
7742 #:phases
7743 (modify-phases %standard-phases
7744 (add-after 'unpack 'create-setup.py
7745 (lambda _
7746 (call-with-output-file "setup.py"
7747 (lambda (port)
7748 (format port "\
7749from setuptools import setup
7750setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
7751" ,version))))))))
7752 (home-page "https://github.com/takluyver/entrypoints")
7753 (synopsis "Discover and load entry points from installed Python packages")
7754 (description "Entry points are a way for Python packages to advertise
7755objects with some common interface. The most common examples are
7756@code{console_scripts} entry points, which define shell commands by
7757identifying a Python function to run. The @code{entrypoints} module contains
7758functions to find and load entry points.")
7759 (license license:expat)))
7760
7761(define-public python2-entrypoints
7762 (package-with-python2 python-entrypoints))
7763
7764(define-public python-nbconvert
7765 (package
7766 (name "python-nbconvert")
7767 (version "5.0.0b1")
7768 (source
7769 (origin
7770 (method url-fetch)
7771 (uri (pypi-uri "nbconvert" version))
7772 (sha256
7773 (base32
7774 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
7775 (build-system python-build-system)
7776 (arguments
7777 `(;; The "bdist_egg" target is disabled by default, causing the installation
7778 ;; to fail.
7779 #:configure-flags (list "bdist_egg")
7780 ;; FIXME: 5 failures, 40 errors.
7781 #:tests? #f))
7782 ;; #:phases
7783 ;; (modify-phases %standard-phases
7784 ;; (replace 'check
7785 ;; (lambda _
7786 ;; (zero? (system* "py.test" "-v")))))
7787 (native-inputs
7788 `(("python-pytest" ,python-pytest)))
7789 (propagated-inputs
7790 `(("python-bleach" ,python-bleach)
7791 ("python-entrypoints" ,python-entrypoints)
7792 ("python-jinja2" ,python-jinja2)
7793 ("python-jupyter-core" ,python-jupyter-core)
7794 ("python-mistune" ,python-mistune)
7795 ("python-nbformat" ,python-nbformat)
7796 ("python-pygments" ,python-pygments)
7797 ("python-traitlets" ,python-traitlets)))
7798 (home-page "http://jupyter.org")
7799 (synopsis "Converting Jupyter Notebooks")
7800 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
7801notebooks to various other formats via Jinja templates. It allows you to
7802convert an @code{.ipynb} notebook file into various static formats including:
7803
7804@enumerate
7805@item HTML
7806@item LaTeX
7807@item PDF
7808@item Reveal JS
7809@item Markdown (md)
7810@item ReStructured Text (rst)
7811@item executable script
7812@end enumerate\n")
7813 (license license:bsd-3)))
7814
7815(define-public python2-nbconvert
7816 (package-with-python2 python-nbconvert))
7817
44d10b1f
RW
7818(define-public python-notebook
7819 (package
7820 (name "python-notebook")
7821 (version "5.7.4")
7822 (source (origin
7823 (method url-fetch)
7824 (uri (pypi-uri "notebook" version))
7825 (sha256
7826 (base32
7827 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
7828 (build-system python-build-system)
7829 (arguments
7830 `(#:phases
7831 (modify-phases %standard-phases
7832 (replace 'check
7833 (lambda _
7834 ;; These tests require a browser
7835 (delete-file-recursively "notebook/tests/selenium")
7836 ;; Some tests need HOME
7837 (setenv "HOME" "/tmp")
7838 ;; This file contains "warningfilters", which are not supported
7839 ;; by this version of nose.
7840 (delete-file "setup.cfg")
7841 (with-directory-excursion "/tmp"
7842 (invoke "nosetests" "-v"))
7843 #t)))))
7844 (propagated-inputs
7845 `(("python-jupyter-core" ,python-jupyter-core)
7846 ("python-nbformat" ,python-nbformat)
7847 ("python-nbconvert" ,python-nbconvert)
7848 ("python-prometheus-client" ,python-prometheus-client)
7849 ("python-send2trash" ,python-send2trash)
7850 ("python-terminado" ,python-terminado)))
7851 (native-inputs
7852 `(("python-nose" ,python-nose)
7853 ("python-sphinx" ,python-sphinx)
7854 ("python-requests" ,python-requests)))
7855 (home-page "http://jupyter.org/")
7856 (synopsis "Web-based notebook environment for interactive computing")
7857 (description
7858 "The Jupyter HTML notebook is a web-based notebook environment for
7859interactive computing.")
7860 (properties `((python2-variant . ,(delay python2-notebook))))
7861 (license license:bsd-3)))
7862
7863(define-public python2-notebook
7864 (let ((base (package-with-python2
7865 (strip-python2-variant python-notebook))))
7866 (package (inherit base)
7867 (native-inputs
7868 `(("python2-mock" ,python2-mock)
7869 ,@(package-native-inputs base)))
7870 (arguments
7871 (substitute-keyword-arguments (package-arguments base)
7872 ((#:phases phases)
7873 `(modify-phases ,phases
7874 (add-before 'check 'disable-test-case
7875 ;; The test requires network access to localhost. Curiously it
7876 ;; fails with Python 2 only. Simply make the test-case return
7877 ;; immediately.
7878 (lambda _
7879 (substitute*
7880 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
7881 (("formats = self.nbconvert_api") "return #")))))))))))
7882
7883(define-public python-widgetsnbextension
7884 (package
7885 (name "python-widgetsnbextension")
7886 (version "3.4.2")
7887 (source
7888 (origin
7889 (method url-fetch)
7890 (uri (pypi-uri "widgetsnbextension" version))
7891 (sha256
7892 (base32
7893 "0rc2nivdy7k4m3vljx7wdh2jh11djapcgwhvzlbs0isl8gl8nqgs"))))
7894 (build-system python-build-system)
7895 (propagated-inputs
7896 `(("python-ipykernel" ,python-ipykernel)
7897 ("python-notebook" ,python-notebook)))
7898 (native-inputs
7899 `(("python-certifi" ,python-certifi)
7900 ("python-nose" ,python-nose)))
7901 (home-page "https://ipython.org")
7902 (synopsis "IPython HTML widgets for Jupyter")
7903 (description "This package provides interactive HTML widgets for Jupyter
7904notebooks.")
7905 (license license:bsd-3)))
7906
7907(define-public python2-widgetsnbextension
7908 (package-with-python2 python-widgetsnbextension))
7909
7910(define-public python-ipywidgets
7911 (package
7912 (name "python-ipywidgets")
7913 (version "5.2.2")
7914 (source
7915 (origin
7916 (method url-fetch)
7917 (uri (pypi-uri "ipywidgets" version))
7918 (sha256
7919 (base32
7920 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
7921 (build-system python-build-system)
7922 (propagated-inputs
7923 `(("python-ipython" ,python-ipython)
7924 ("python-traitlets" ,python-traitlets)
7925 ("python-widgetsnbextension" ,python-widgetsnbextension)))
7926 (native-inputs
7927 `(("python-nose" ,python-nose)
7928 ("python-pytest" ,python-pytest)))
7929 (home-page "https://ipython.org")
7930 (synopsis "IPython HTML widgets for Jupyter")
7931 (description "Ipywidgets are interactive HTML widgets for Jupyter
7932notebooks and the IPython kernel. Notebooks come alive when interactive
7933widgets are used. Users gain control of their data and can visualize changes
7934in the data.")
7935 (license license:bsd-3)))
7936
7937(define-public python2-ipywidgets
7938 (package-with-python2 python-ipywidgets))
7939
7940(define-public python-jupyter-console
7941 (package
7942 (name "python-jupyter-console")
becb9cbf 7943 (version "6.0.0")
44d10b1f
RW
7944 (source
7945 (origin
7946 (method url-fetch)
7947 (uri (pypi-uri "jupyter_console" version))
7948 (sha256
7949 (base32
becb9cbf 7950 "1xdjw11cppf1fxvwkw2bk13ckkwas3bdah8baingn9296mvfi31h"))))
44d10b1f 7951 (build-system python-build-system)
44d10b1f
RW
7952 (propagated-inputs
7953 `(("python-ipykernel" ,python-ipykernel)
7954 ("python-jupyter-client" ,python-jupyter-client)
becb9cbf 7955 ("python-prompt-toolkit" ,python-prompt-toolkit)
44d10b1f
RW
7956 ("python-pygments" ,python-pygments)))
7957 (native-inputs
7958 `(("python-nose" ,python-nose)))
7959 (home-page "https://jupyter.org")
7960 (synopsis "Jupyter terminal console")
7961 (description "This package provides a terminal-based console frontend for
7962Jupyter kernels. It also allows for console-based interaction with non-Python
7963Jupyter kernels such as IJulia and IRKernel.")
7964 (license license:bsd-3)))
7965
7966(define-public python2-jupyter-console
8e590c81
RW
7967 (package
7968 (name "python2-jupyter-console")
7969 (version "5.2.0")
7970 (source
7971 (origin
7972 (method url-fetch)
7973 (uri (pypi-uri "jupyter_console" version))
7974 (sha256
7975 (base32
7976 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
7977 (build-system python-build-system)
7978 ;; Tests only run in an TTY.
7979 (arguments `(#:tests? #f))
7980 (propagated-inputs
7981 `(("python2-ipykernel" ,python2-ipykernel)
7982 ("python2-jupyter-client" ,python2-jupyter-client)
7983 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
7984 ("python2-pygments" ,python2-pygments)))
7985 (native-inputs
7986 `(("python2-nose" ,python2-nose)))
7987 (home-page "https://jupyter.org")
7988 (synopsis "Jupyter terminal console")
7989 (description "This package provides a terminal-based console frontend for
7990Jupyter kernels. It also allows for console-based interaction with non-Python
7991Jupyter kernels such as IJulia and IRKernel.")
7992 (license license:bsd-3)))
44d10b1f
RW
7993
7994;; The python-ipython and python-jupyter-console require each other. To get
7995;; the functionality in both packages working, strip down the
7996;; python-jupyter-console package when using it as an input to python-ipython.
7997(define python-jupyter-console-minimal
7998 (package
7999 (inherit python-jupyter-console)
8000 (name "python-jupyter-console-minimal")
8001 (arguments
8002 (substitute-keyword-arguments
8003 (package-arguments python-jupyter-console)
8004 ((#:phases phases)
8005 `(modify-phases ,phases
8006 (add-after 'install 'delete-bin
8007 (lambda* (#:key outputs #:allow-other-keys)
8008 ;; Delete the bin files, to avoid conflicts in profiles
8009 ;; where python-ipython and python-jupyter-console are
8010 ;; both present.
8011 (delete-file-recursively
8012 (string-append
8013 (assoc-ref outputs "out") "/bin"))))))))
8014 ;; Remove the python-ipython propagated input, to avoid the cycle
8015 (propagated-inputs
8016 (alist-delete
8017 "python-ipython"
8018 (package-propagated-inputs python-jupyter-console)))))
8019
8020(define-public python-qtconsole
8021 (package
8022 (name "python-qtconsole")
8023 (version "4.4.3")
8024 (source
8025 (origin
8026 (method url-fetch)
8027 (uri (pypi-uri "qtconsole" version))
8028 (sha256
8029 (base32
8030 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
8031 (build-system python-build-system)
8032 (arguments
8033 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
8034 ;; but we only have the LTS version 5.x. This means that there might be
8035 ;; runtime errors, but since this is a dependency of the Jupyter package,
8036 ;; and Jupyter can be used without the qtconsole we can overlook this for
8037 ;; now.
8038 `(#:tests? #f
8039 #:phases
8040 (modify-phases %standard-phases
8041 (add-before 'check 'pre-check
8042 (lambda _
8043 (setenv "QT_QPA_PLATFORM" "offscreen")
8044 #t)))))
8045 (propagated-inputs
8046 `(("python-ipykernel" ,python-ipykernel)
8047 ("python-ipython" ,python-ipython)))
8048 (native-inputs
8049 `(("python-pytest" ,python-pytest)))
8050 (home-page "http://jupyter.org")
8051 (synopsis "Jupyter Qt console")
8052 (description "This package provides a Qt-based console for Jupyter with
8053support for rich media output.")
8054 (license license:bsd-3)))
8055
6ec87223
VC
8056(define-public python-jsbeautifier
8057 (package
8058 (name "python-jsbeautifier")
8059 (version "1.10.2")
8060 (home-page "https://github.com/beautify-web/js-beautify")
8061 (source (origin
8062 (method git-fetch)
8063 (uri (git-reference
8064 (url home-page)
8065 (commit (string-append "v" version))))
8066 (file-name (git-file-name name version))
8067 (sha256
8068 (base32
8069 "0wawb070ki1axb3jc9xvsrgpji52vcfif3zmjzc3z4g98m5xw4kg"))))
8070 (build-system python-build-system)
8071 (arguments
8072 `(#:phases (modify-phases %standard-phases
8073 (add-after 'unpack 'chdir
8074 (lambda _
8075 ;; The upstream Git repository contains all the code,
8076 ;; but this package only builds the python code.
8077 (chdir "python")
8078 #t))
8079 (add-after 'unpack 'patch-python-six-requirements
8080 (lambda _
8081 (substitute* "python/setup.py"
8082 (("six>=1.12.0")
8083 "six>=1.11.0"))
8084 #t)))))
8085 (propagated-inputs
8086 `(("python-editorconfig" ,python-editorconfig)
8087 ("python-six" ,python-six)))
8088 (native-inputs
8089 `(("python-pytest" ,python-pytest)))
8090 (synopsis "JavaScript unobfuscator and beautifier")
8091 (description "Beautify, unpack or deobfuscate JavaScript, leveraging
8092popular online obfuscators.")
8093 (license license:expat)))
8094
44d10b1f
RW
8095(define-public jupyter
8096 (package
8097 (name "jupyter")
8098 (version "1.0.0")
8099 (source
8100 (origin
8101 (method url-fetch)
8102 (uri (pypi-uri "jupyter" version))
8103 (sha256
8104 (base32
8105 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
8106 (build-system python-build-system)
8107 (arguments '(#:tests? #f)) ; there are none.
8108 (propagated-inputs
8109 `(("python-ipykernel" ,python-ipykernel)
8110 ("python-ipywidgets" ,python-ipywidgets)
8111 ("python-jupyter-console" ,python-jupyter-console)
8112 ("python-nbconvert" ,python-nbconvert)
8113 ("python-notebook" ,python-notebook)
8114 ("python-qtconsole" ,python-qtconsole)))
8115 (native-search-paths
8116 (list (search-path-specification
8117 (variable "JUPYTER_PATH")
8118 (files '("share/jupyter")))))
8119 (home-page "https://jupyter.org")
8120 (synopsis "Web application for interactive documents")
8121 (description
8122 "The Jupyter Notebook is a web application that allows you to create and
8123share documents that contain live code, equations, visualizations and
8124explanatory text. Uses include: data cleaning and transformation, numerical
8125simulation, statistical modeling, machine learning and much more.")
8126 (license license:bsd-3)))
8127
8128(define-public python-chardet
8129 (package
8130 (name "python-chardet")
8131 (version "3.0.4")
8132 (source
8133 (origin
8134 (method url-fetch)
8135 (uri (pypi-uri "chardet" version))
8136 (sha256
8137 (base32
8138 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
8139 (native-inputs
8140 `(("python-hypothesis" ,python-hypothesis)
8141 ("python-pytest" ,python-pytest)
8142 ("python-pytest-runner" ,python-pytest-runner)))
8143 (build-system python-build-system)
3d369407
MB
8144 ;; XXX: Incompatible with Pytest 4: <https://github.com/chardet/chardet/issues/173>.
8145 (arguments `(#:tests? #f))
44d10b1f
RW
8146 (home-page "https://github.com/chardet/chardet")
8147 (synopsis "Universal encoding detector for Python 2 and 3")
8148 (description
8149 "This package provides @code{chardet}, a Python module that can
8150automatically detect a wide range of file encodings.")
8151 (license license:lgpl2.1+)))
8152
8153(define-public python2-chardet
8154 (package-with-python2 python-chardet))
8155
8156(define-public python-docopt
8157 (package
8158 (name "python-docopt")
8159 (version "0.6.2")
8160 (source
8161 (origin
8162 (method url-fetch)
8163 ;; The release on PyPI does not include tests.
8164 (uri (string-append
8165 "https://github.com/docopt/docopt/archive/"
8166 version ".tar.gz"))
8167 (file-name (string-append name "-" version ".tar.gz"))
8168 (sha256
8169 (base32
8170 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
8171 (build-system python-build-system)
8172 (native-inputs
8173 `(("python-pytest" ,python-pytest)))
8174 (arguments
8175 `(#:phases
8176 (modify-phases %standard-phases
8177 (replace 'check
8178 (lambda _ (invoke "py.test"))))))
8179 (home-page "http://docopt.org")
8180 (synopsis "Command-line interface description language for Python")
8181 (description "This library allows the user to define a command-line
8182interface from a program's help message rather than specifying it
4ca7207b 8183programmatically with command-line parsers like @code{getopt} and
44d10b1f
RW
8184@code{argparse}.")
8185 (license license:expat)))
8186
8187(define-public python2-docopt
8188 (package-with-python2 python-docopt))
8189
8190(define-public python-pythondialog
8191 (package
8192 (name "python-pythondialog")
8193 (version "3.4.0")
8194 (source
8195 (origin
8196 (method url-fetch)
8197 (uri (pypi-uri "pythondialog" version))
8198 (sha256
8199 (base32
8200 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
8201 (build-system python-build-system)
8202 (arguments
8203 `(#:phases
8204 (modify-phases %standard-phases
8205 (add-after 'unpack 'patch-path
8206 (lambda* (#:key inputs #:allow-other-keys)
8207 (let* ((dialog (assoc-ref inputs "dialog")))
8208 ;; Since this library really wants to grovel the search path, we
8209 ;; must hardcode dialog's store path into it.
8210 (substitute* "dialog.py"
8211 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
8212 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
8213 #t))))
8214 #:tests? #f)) ; no test suite
8215 (propagated-inputs
8216 `(("dialog" ,dialog)))
8217 (home-page "http://pythondialog.sourceforge.net/")
8218 (synopsis "Python interface to the UNIX dialog utility")
8219 (description "A Python wrapper for the dialog utility. Its purpose is to
8220provide an easy to use, pythonic and comprehensive Python interface to dialog.
8221This allows one to make simple text-mode user interfaces on Unix-like systems")
8222 (license license:lgpl2.1)
8223 (properties `((python2-variant . ,(delay python2-pythondialog))))))
8224
8225(define-public python2-pythondialog
8226 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
8227 (package
8228 (inherit base)
8229 (version (package-version python-pythondialog))
8230 (source (origin
8231 (method url-fetch)
8232 (uri (pypi-uri "python2-pythondialog" version))
8233 (sha256
8234 (base32
8235 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
8236
8237(define-public python-configobj
8238 (package
8239 (name "python-configobj")
8240 (version "5.0.6")
8241 (source (origin
8242 (method url-fetch)
b0758fbb 8243 (uri (pypi-uri "configobj" version))
44d10b1f
RW
8244 (sha256
8245 (base32
8246 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
8247 ;; Patch setup.py so it looks for python-setuptools, which is
8248 ;; required to parse the keyword 'install_requires' in setup.py.
8249 (patches (search-patches "python-configobj-setuptools.patch"))))
8250 (build-system python-build-system)
8251 (propagated-inputs
8252 `(("python-six" ,python-six)))
8253 (synopsis "Config file reading, writing and validation")
8254 (description "ConfigObj is a simple but powerful config file reader and
8255writer: an ini file round tripper. Its main feature is that it is very easy to
8256use, with a straightforward programmer’s interface and a simple syntax for
8257config files.")
8258 (home-page "https://github.com/DiffSK/configobj")
8259 (license license:bsd-3)))
8260
8261(define-public python2-configobj
8262 (package-with-python2 python-configobj))
8263
8264(define-public python-configargparse
8265 (package
8266 (name "python-configargparse")
86ae491f 8267 (version "0.14.0")
44d10b1f
RW
8268 (source (origin
8269 (method url-fetch)
8270 (uri (pypi-uri "ConfigArgParse" version))
8271 (sha256
8272 (base32
86ae491f 8273 "149fy4zya0rsnlkvxbbq43cyr8lscb5k4pj1m6n7f1grwcmzwbif"))))
44d10b1f
RW
8274 (build-system python-build-system)
8275 (native-inputs
8276 `(("python-pyyaml" ,python-pyyaml)))
8277 (arguments
8278 `(#:phases
8279 (modify-phases %standard-phases
8280 (replace 'check
8281 (lambda _
8282 ;; Bypass setuptools-shim because one test relies on "setup.py"
8283 ;; being the first argument passed to the python call.
8284 ;;
8285 ;; NOTE: Many tests do not run because they rely on Python's
8286 ;; built-in test.test_argparse, but we remove the unit tests from
8287 ;; our Python installation.
8288 (invoke "python" "setup.py" "test"))))))
8289 (synopsis "Replacement for argparse")
8290 (description "A drop-in replacement for argparse that allows options to also
8291be set via config files and/or environment variables.")
8292 (home-page "https://github.com/bw2/ConfigArgParse")
8293 (license license:expat)))
8294
8295(define-public python2-configargparse
8296 (package-with-python2 python-configargparse))
8297
8298(define-public python-argparse-manpage
8299 (package
8300 (name "python-argparse-manpage")
8301 (version "1.1")
8302 (source
8303 (origin
8304 (method url-fetch)
8305 (uri (pypi-uri "argparse-manpage" version))
8306 (sha256
8307 (base32
8308 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
8309 (build-system python-build-system)
8310 (home-page "https://github.com/praiskup/argparse-manpage")
8311 (synopsis "Build manual page from Python's ArgumentParser object")
8312 (description
8313 "This package provides tools to build manual pages from Python's
8314@code{ArgumentParser} object.")
8315 (license license:asl2.0)))
8316
3e8f76d8
RW
8317(define-public python-contextlib2
8318 (package
8319 (name "python-contextlib2")
8320 (version "0.5.5")
8321 (source
8322 (origin
8323 (method url-fetch)
8324 (uri (pypi-uri "contextlib2" version))
8325 (sha256
8326 (base32
8327 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
8328 (build-system python-build-system)
8329 (home-page "http://contextlib2.readthedocs.org/")
8330 (synopsis "Tools for decorators and context managers")
8331 (description "This module is primarily a backport of the Python
83323.2 contextlib to earlier Python versions. Like contextlib, it
8333provides utilities for common tasks involving decorators and context
8334managers. It also contains additional features that are not part of
8335the standard library.")
8336 (license license:psfl)))
8337
44d10b1f
RW
8338(define-public python2-contextlib2
8339 (package
8340 (name "python2-contextlib2")
8341 (version "0.5.5")
8342 (source
8343 (origin
8344 (method url-fetch)
8345 (uri (pypi-uri "contextlib2" version))
8346 (sha256
8347 (base32
8348 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
8349 (build-system python-build-system)
8350 (arguments
8351 `(#:python ,python-2
8352 #:phases
8353 (modify-phases %standard-phases
8354 (replace 'check
8355 (lambda _ (invoke "python" "test_contextlib2.py" "-v"))))))
8356 (native-inputs
8357 `(("python2-unittest2" ,python2-unittest2)))
8358 (home-page "http://contextlib2.readthedocs.org/")
8359 (synopsis "Tools for decorators and context managers")
8360 (description "This module is primarily a backport of the Python
83613.2 contextlib to earlier Python versions. Like contextlib, it
8362provides utilities for common tasks involving decorators and context
8363managers. It also contains additional features that are not part of
8364the standard library.")
8365 (license license:psfl)))
8366
8367(define-public python-texttable
8368 (package
8369 (name "python-texttable")
52cc4892 8370 (version "0.9.1")
44d10b1f
RW
8371 (source
8372 (origin
8373 (method url-fetch)
8374 (uri (pypi-uri "texttable" version))
8375 (sha256
8376 (base32
52cc4892 8377 "0yawv64c0zbawwv6zz84whb32fnb2n9jylwjcfsrcdgh7xvl340i"))))
44d10b1f
RW
8378 (build-system python-build-system)
8379 (arguments '(#:tests? #f)) ; no tests
8380 (home-page "https://github.com/foutaise/texttable/")
8381 (synopsis "Python module for creating simple ASCII tables")
8382 (description "Texttable is a Python module for creating simple ASCII
8383tables.")
8384 (license license:lgpl2.1+)))
8385
8386(define-public python2-texttable
8387 (package-with-python2 python-texttable))
8388
8389(define-public python-atomicwrites
8390 (package
8391 (name "python-atomicwrites")
14f10479 8392 (version "1.3.0")
44d10b1f
RW
8393 (source (origin
8394 (method url-fetch)
8395 (uri (pypi-uri "atomicwrites" version))
8396 (sha256
8397 (base32
14f10479 8398 "19ngcscdf3jsqmpcxn6zl5b6anmsajb6izp1smcd1n02midl9abm"))))
44d10b1f
RW
8399 (build-system python-build-system)
8400 (synopsis "Atomic file writes in Python")
8401 (description "Library for atomic file writes using platform dependent tools
8402for atomic file system operations.")
8403 (home-page "https://github.com/untitaker/python-atomicwrites")
8404 (license license:expat)))
8405
8406(define-public python2-atomicwrites
8407 (package-with-python2 python-atomicwrites))
8408
8409(define-public python-click-threading
8410 (package
8411 (name "python-click-threading")
8412 (version "0.4.4")
8413 (source (origin
8414 (method url-fetch)
8415 (uri (pypi-uri "click-threading" version))
8416 (sha256
8417 (base32
8418 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
8419 (build-system python-build-system)
8420 (propagated-inputs
8421 `(("python-click" ,python-click)))
8422 (synopsis "Utilities for multithreading in Click")
8423 (description "This package provides utilities for multithreading in Click
8424applications.")
8425 (home-page "https://github.com/click-contrib/click-threading")
8426 (license license:expat)))
8427
8428(define-public python-click-log
8429 (package
8430 (name "python-click-log")
8431 (version "0.3.2")
8432 (source (origin
8433 (method url-fetch)
8434 (uri (pypi-uri "click-log" version))
8435 (sha256
8436 (base32
8437 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
8438 (build-system python-build-system)
8439 (propagated-inputs
8440 `(("python-click" ,python-click)))
8441 (synopsis "Logging for click applications")
8442 (description "This package provides a Python library for logging Click
8443applications.")
8444 (home-page "https://github.com/click-contrib/click-log")
8445 (license license:expat)))
8446
8447(define-public python-apipkg
8448 (package
8449 (name "python-apipkg")
8450 (version "1.4")
8451 (source (origin
8452 (method url-fetch)
8453 (uri (pypi-uri "apipkg" version))
8454 (sha256
8455 (base32
8456 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
8457 (build-system python-build-system)
8458 (native-inputs
8459 `(("python-pytest" ,python-pytest)))
8460 (synopsis "Namespace control and lazy-import mechanism")
8461 (description "With apipkg you can control the exported namespace of a Python
8462package and greatly reduce the number of imports for your users. It is a small
8463pure Python module that works on virtually all Python versions.")
8464 (home-page "https://github.com/pytest-dev/apipkg")
8465 (license license:expat)))
8466
8467(define-public python2-apipkg
8468 (package-with-python2 python-apipkg))
8469
8470(define-public python-execnet
8471 (package
8472 (name "python-execnet")
8473 (version "1.4.1")
8474 (source (origin
8475 (method url-fetch)
8476 (uri (pypi-uri "execnet" version))
8477 (sha256
8478 (base32
8479 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
8480 (build-system python-build-system)
8481 (arguments
8482 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
8483 ;; The two test failures are caused by the lack of an `ssh` executable.
8484 ;; The test suite can be run with pytest after the 'install' phase.
8485 #:tests? #f))
8486 (native-inputs
8487 `(("python-pytest" ,python-pytest)
8488 ("python-setuptools-scm" ,python-setuptools-scm)))
8489 (propagated-inputs
8490 `(("python-apipkg" ,python-apipkg)))
8491 (synopsis "Rapid multi-Python deployment")
8492 (description "Execnet provides a share-nothing model with
8493channel-send/receive communication for distributing execution across many
8494Python interpreters across version, platform and network barriers. It has a
8495minimal and fast API targeting the following uses:
8496@enumerate
8497@item distribute tasks to (many) local or remote CPUs
8498@item write and deploy hybrid multi-process applications
8499@item write scripts to administer multiple environments
8500@end enumerate")
8501 (home-page "http://codespeak.net/execnet/")
8502 (license license:expat)))
8503
8504(define-public python2-execnet
8505 (package-with-python2 python-execnet))
8506
8507(define-public python-icalendar
8508 (package
8509 (name "python-icalendar")
43ae8f79 8510 (version "4.0.4")
44d10b1f
RW
8511 (source (origin
8512 (method url-fetch)
8513 (uri (pypi-uri "icalendar" version))
8514 (sha256
8515 (base32
43ae8f79 8516 "16gjvqv0n05jrb9g228pdjgzd3amz2pdhvcgsn1jypszjg5m2w9l"))))
44d10b1f
RW
8517 (build-system python-build-system)
8518 (propagated-inputs
8519 `(("python-dateutil" ,python-dateutil)
8520 ("python-pytz" ,python-pytz)))
8521 (synopsis "Python library for parsing iCalendar files")
8522 (description "The icalendar package is a parser/generator of iCalendar
8523files for use with Python.")
8524 (home-page "https://github.com/collective/icalendar")
8525 (license license:bsd-2)))
8526
44d10b1f
RW
8527(define-public python-args
8528 (package
8529 (name "python-args")
8530 (version "0.1.0")
8531 (source (origin
8532 (method url-fetch)
8533 (uri (pypi-uri "args" version))
8534 (sha256
8535 (base32
8536 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
8537 (build-system python-build-system)
8538 (home-page "https://github.com/kennethreitz/args")
8539 (synopsis "Command-line argument parser")
8540 (description
8541 "This library provides a Python module to parse command-line arguments.")
8542 (license license:bsd-3)))
8543
8544(define-public python2-args
8545 (package-with-python2 python-args))
8546
8547(define-public python-clint
8548 (package
8549 (name "python-clint")
8550 (version "0.5.1")
8551 (source (origin
8552 (method url-fetch)
8553 (uri (pypi-uri "clint" version))
8554 (sha256
8555 (base32
8556 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
8557 (build-system python-build-system)
8558 (arguments
8559 '(#:phases
8560 (modify-phases %standard-phases
8561 (replace 'check
8562 (lambda _ (invoke "py.test" "-v"))))))
8563 (native-inputs
8564 `(("python-pytest" ,python-pytest)))
8565 (propagated-inputs
8566 `(("python-args" ,python-args)))
8567 (home-page "https://github.com/kennethreitz/clint")
8568 (synopsis "Command-line interface tools")
8569 (description
8570 "Clint is a Python module filled with a set of tools for developing
8571command-line applications, including tools for colored and indented
8572output, progress bar display, and pipes.")
8573 (license license:isc)))
8574
8575(define-public python2-clint
8576 (package-with-python2 python-clint))
8577
44d10b1f
RW
8578(define-public python-rply
8579 (package
8580 (name "python-rply")
8581 (version "0.7.5")
8582 (source (origin
8583 (method url-fetch)
8584 (uri (pypi-uri "rply" version))
8585 (sha256
8586 (base32
8587 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
8588 (build-system python-build-system)
8589 (propagated-inputs
8590 `(("python-appdirs" ,python-appdirs)))
8591 (home-page "https://github.com/alex/rply")
8592 (synopsis "Parser generator for Python")
8593 (description
8594 "This package provides a pure Python based parser generator, that also
8595works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
8596with a new public API, and RPython support.")
8597 (license license:bsd-3)))
8598
8599(define-public python2-rply
8600 (package-with-python2 python-rply))
8601
8602(define-public python-hy
8603 (package
8604 (name "python-hy")
8605 (version "0.13.0")
8606 (source (origin
8607 (method url-fetch)
8608 (uri (pypi-uri "hy" version))
8609 (sha256
8610 (base32
8611 "19sfymaksx9jhksfnb15ahid46mzrhdfzz6yy2craz2qnzvpmky8"))))
8612 (build-system python-build-system)
8613 (arguments
8614 '(#:phases
8615 (modify-phases %standard-phases
6ba6a1c1
JG
8616 (add-before 'install 'set-HOME
8617 (lambda _
8618 (setenv "HOME" "/tmp")))
44d10b1f
RW
8619 (replace 'check
8620 (lambda _
8621 ;; Tests require write access to HOME.
8622 (setenv "HOME" "/tmp")
8623 (invoke "nosetests"))))))
8624 (native-inputs
8625 `(("python-coverage" ,python-coverage)
8626 ("python-nose" ,python-nose)))
8627 (propagated-inputs
8628 `(("python-astor" ,python-astor)
8629 ("python-clint" ,python-clint)
8630 ("python-rply" ,python-rply)))
8631 (home-page "http://hylang.org/")
8632 (synopsis "Lisp frontend to Python")
8633 (description
8634 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
8635its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
8636Python at your fingertips, in Lisp form.")
8637 (license license:expat)))
8638
8639(define-public python2-hy
8640 (package-with-python2 python-hy))
8641
8642(define-public python2-functools32
8643 (package
8644 (name "python2-functools32")
8645 (version "3.2.3-2")
8646 (source
8647 (origin
8648 (method url-fetch)
8649 (uri (pypi-uri "functools32" version))
8650 (sha256
8651 (base32
8652 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
8653 (build-system python-build-system)
8654 (arguments
8655 `(#:python ,python-2
8656 #:tests? #f)) ; no test target
8657 (home-page "https://github.com/MiCHiLU/python-functools32")
8658 (synopsis
8659 "Backport of the functools module from Python 3.2.3")
8660 (description
8661 "This package is a backport of the @code{functools} module from Python
86623.2.3 for use with older versions of Python and PyPy.")
8663 (license license:expat)))
8664
8665(define-public python2-subprocess32
8666 (package
8667 (name "python2-subprocess32")
8668 (version "3.2.7")
8669 (source (origin
8670 (method url-fetch)
8671 (uri (pypi-uri "subprocess32" version))
8672 (sha256
8673 (base32
8674 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
8675 (patches
8676 (search-patches "python2-subprocess32-disable-input-test.patch"))))
8677 (build-system python-build-system)
8678 (arguments
8679 `(#:python ,python-2
8680 ;; The test suite fails with Python > 2.7.13:
8681 ;; import test.support
8682 ;; ImportError: No module named support
8683 #:tests? #f
8684 #:phases
8685 (modify-phases %standard-phases
8686 (add-after 'unpack 'patch-/bin/sh
8687 (lambda _
8688 (substitute* '("subprocess32.py"
8689 "test_subprocess32.py")
8690 (("/bin/sh") (which "sh")))
8691 #t)))))
8692 (home-page "https://github.com/google/python-subprocess32")
8693 (synopsis "Backport of the subprocess module from Python 3.2")
8694 (description
8695 "This is a backport of the @code{subprocess} standard library module
8696from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
8697new features. On POSIX systems it is guaranteed to be reliable when used
8698in threaded applications. It includes timeout support from Python 3.3 but
8699otherwise matches 3.2’s API.")
8700 (license license:psfl)))
8701
8702(define-public python2-futures
8703 (package
8704 (name "python2-futures")
8705 (version "3.2.0")
8706 (source
8707 (origin
8708 (method url-fetch)
8709 (uri (pypi-uri "futures" version))
8710 (sha256
8711 (base32
8712 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
8713 (build-system python-build-system)
ba88eea2
RW
8714 (arguments
8715 `(#:python ,python-2
8716 #:phases
8717 (modify-phases %standard-phases
8718 (replace 'check
8719 (lambda _
8720 (invoke "python" "test_futures.py")
8721 #t)))))
44d10b1f
RW
8722 (home-page "https://github.com/agronholm/pythonfutures")
8723 (synopsis
8724 "Backport of the concurrent.futures package from Python 3.2")
8725 (description
8726 "The concurrent.futures module provides a high-level interface for
8727asynchronously executing callables. This package backports the
8728concurrent.futures package from Python 3.2")
8729 (license license:bsd-3)))
8730
8731(define-public python-promise
8732 (package
8733 (name "python-promise")
8734 (version "0.4.2")
8735 (source
8736 (origin
8737 (method url-fetch)
8738 (uri (pypi-uri "promise" version))
8739 (sha256
8740 (base32
8741 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
8742 (build-system python-build-system)
8743 ;; Tests wants python-futures, which is a python2 only program, and
8744 ;; can't be found by python-promise at test time.
8745 (arguments `(#:tests? #f))
8746 (home-page "https://github.com/syrusakbary/promise")
8747 (synopsis "Promises/A+ implementation for Python")
8748 (description
8749 "Promises/A+ implementation for Python")
8750 (properties `((python2-variant . ,(delay python2-promise))))
8751 (license license:expat)))
8752
8753(define-public python2-promise
8754 (let ((promise (package-with-python2
8755 (strip-python2-variant python-promise))))
8756 (package (inherit promise)
8757 (arguments (substitute-keyword-arguments (package-arguments promise)
8758 ((#:tests? _) #t)))
8759 (native-inputs
8760 `(("python2-futures" ,python2-futures)
8761 ("python2-pytest" ,python2-pytest)
8762 ,@(package-native-inputs promise))))))
8763
d71d85cd
RW
8764(define-public python-progressbar33
8765 (package
8766 (name "python-progressbar33")
8767 (version "2.4")
8768 (source
8769 (origin
8770 (method url-fetch)
8771 (uri (pypi-uri "progressbar33" version))
8772 (sha256
8773 (base32
8774 "1zvf6zs5hzrc03p9nfs4p16vhilqikycvv1yk0pxn8s07fdhvzji"))))
8775 (build-system python-build-system)
8776 (home-page "http://github.com/germangh/python-progressbar")
8777 (synopsis "Text progress bar library for Python")
8778 (description
8779 "This package provides a text progress bar library for Python. This
8780version only differs from the original @code{progressbar} package in that it
8781uses relative package imports instead of absolute imports, which is necessary
8782for the module to work under Python 3.3.")
8783 ;; Either or both of these licenses may be selected.
8784 (license (list license:lgpl2.1+ license:bsd-3))))
8785
44d10b1f
RW
8786(define-public python-colorama
8787 (package
8788 (name "python-colorama")
8789 (version "0.3.9")
8790 (source
8791 (origin
8792 (method url-fetch)
8793 (uri (pypi-uri "colorama" version))
8794 (sha256
8795 (base32
8796 "1wd1szk0z3073ghx26ynw43gnc140ibln1safgsis6s6z3s25ss8"))))
8797 (build-system python-build-system)
8798 (synopsis "Colored terminal text rendering for Python")
8799 (description "Colorama is a Python library for rendering colored terminal
8800text.")
8801 (home-page "https://pypi.python.org/pypi/colorama")
8802 (license license:bsd-3)))
8803
8804(define-public python2-colorama
8805 (package-with-python2 python-colorama))
8806
8807(define-public python-rsa
8808 (package
8809 (name "python-rsa")
8810 (version "3.4.2")
8811 (source
8812 (origin
8813 (method url-fetch)
8814 (uri (pypi-uri "rsa" version))
8815 (sha256
8816 (base32
8817 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
8818 (build-system python-build-system)
8819 (propagated-inputs
8820 `(("python-pyasn1" ,python-pyasn1)))
8821 (synopsis "Pure-Python RSA implementation")
8822 (description "Python-RSA is a pure-Python RSA implementation. It supports
8823encryption and decryption, signing and verifying signatures, and key
8824generation according to PKCS#1 version 1.5. It can be used as a Python
8825library as well as on the command line.")
8826 (home-page "https://stuvel.eu/rsa")
8827 (license license:asl2.0)))
8828
8829(define-public python2-rsa
8830 (package-with-python2 python-rsa))
8831
8832(define-public python-pluggy
8833 (package
8834 (name "python-pluggy")
e5731c03 8835 (version "0.11.0")
44d10b1f
RW
8836 (source
8837 (origin
8838 (method url-fetch)
8839 (uri (pypi-uri "pluggy" version))
8840 (sha256
8841 (base32
e5731c03 8842 "10511a54dvafw1jrk75mrhml53c7b7w4yaw7241696lc2hfvr895"))))
44d10b1f
RW
8843 (build-system python-build-system)
8844 (native-inputs
8845 `(("python-setuptools-scm" ,python-setuptools-scm)))
8846 (synopsis "Plugin and hook calling mechanism for Python")
8847 (description "Pluggy is an extraction of the plugin manager as used by
8848Pytest but stripped of Pytest specific details.")
8849 (home-page "https://pypi.python.org/pypi/pluggy")
8850 (license license:expat)))
8851
8852(define-public python2-pluggy
8853 (package-with-python2 python-pluggy))
8854
8855(define-public python-tox
8856 (package
8857 (name "python-tox")
8858 (version "2.8.1")
8859 (source
8860 (origin
8861 (method url-fetch)
8862 (uri (pypi-uri "tox" version))
8863 (sha256
8864 (base32
8865 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
8866 (build-system python-build-system)
8867 (arguments
8868 ;; FIXME: Tests require pytest-timeout, which itself requires
8869 ;; pytest>=2.8.0 for installation.
8870 '(#:tests? #f))
8871 (propagated-inputs
8872 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
8873 ("python-py" ,python-py)
8874 ("python-virtualenv" ,python-virtualenv)))
8875 (native-inputs
8876 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
8877 ("python-pytest" ,python-pytest) ; >= 2.3.5
8878 ("python-setuptools-scm" ,python-setuptools-scm)))
8879 (home-page "http://tox.testrun.org/")
8880 (synopsis "Virtualenv-based automation of test activities")
8881 (description "Tox is a generic virtualenv management and test command line
8882tool. It can be used to check that a package installs correctly with
8883different Python versions and interpreters, or run tests in each type of
8884supported environment, or act as a frontend to continuous integration
8885servers.")
8886 (license license:expat)))
8887
8888(define-public python2-tox
8889 (package-with-python2 python-tox))
8890
8891(define-public python-jmespath
8892 (package
8893 (name "python-jmespath")
27fb781f 8894 (version "0.9.4")
44d10b1f
RW
8895 (source
8896 (origin
8897 (method url-fetch)
8898 (uri (pypi-uri "jmespath" version))
8899 (sha256
8900 (base32
27fb781f 8901 "0k0765x1mybcrzajh3hiqkl8sy9hs0bmn4900frxy0j3ykvaxqmx"))))
44d10b1f
RW
8902 (build-system python-build-system)
8903 (native-inputs
8904 `(("python-nose" ,python-nose)))
8905 (synopsis "JSON Matching Expressions")
8906 (description "JMESPath (pronounced “james path”) is a Python library that
8907allows one to declaratively specify how to extract elements from a JSON
8908document.")
8909 (home-page "https://github.com/jmespath/jmespath.py")
8910 (license license:expat)))
8911
8912(define-public python2-jmespath
8913 (package-with-python2 python-jmespath))
8914
8915(define-public python-botocore
8916 (package
7bcf827c
RW
8917 (name "python-botocore")
8918 (version "1.12.149")
8919 (source
8920 (origin
8921 (method url-fetch)
8922 (uri (pypi-uri "botocore" version))
8923 (sha256
8924 (base32
8925 "12597f74khp3ngwr282cb949w0gcqj20rkfc3x275dijavyy5cmf"))))
8926 (build-system python-build-system)
8927 (arguments
8928 ;; FIXME: Many tests are failing.
8929 '(#:tests? #f))
8930 (propagated-inputs
8931 `(("python-dateutil" ,python-dateutil)
8932 ("python-docutils" ,python-docutils)
8933 ("python-jmespath" ,python-jmespath)))
8934 (native-inputs
8935 `(("python-mock" ,python-mock)
8936 ("python-nose" ,python-nose)
8937 ("behave" ,behave)
8938 ("python-tox" ,python-tox)
8939 ("python-urllib3" ,python-urllib3)
8940 ("python-wheel" ,python-wheel)))
8941 (home-page "https://github.com/boto/botocore")
8942 (synopsis "Low-level interface to AWS")
8943 (description "Botocore is a Python library that provides a low-level
44d10b1f 8944interface to the Amazon Web Services (AWS) API.")
7bcf827c 8945 (license license:asl2.0)))
44d10b1f
RW
8946
8947(define-public python2-botocore
8948 (package-with-python2 python-botocore))
8949
8950(define-public python-xdo
8951 (package
8952 (name "python-xdo")
8953 (version "0.3")
8954 (source (origin
8955 (method url-fetch)
8956 (uri (string-append
8957 "http://http.debian.net/debian/pool/main/p/python-xdo/"
8958 "python-xdo_" version ".orig.tar.gz"))
8959 (sha256
8960 (base32
8961 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
8962 (build-system python-build-system)
8963 (arguments
8964 '(#:phases
8965 (modify-phases %standard-phases
8966 (add-before 'install 'patch-libxdo-path
8967 ;; Hardcode the path of dynamically loaded libxdo library.
8968 (lambda* (#:key inputs #:allow-other-keys)
8969 (let ((libxdo (string-append
8970 (assoc-ref inputs "xdotool")
8971 "/lib/libxdo.so")))
8972 (substitute* "xdo/_xdo.py"
8973 (("find_library\\(\"xdo\"\\)")
8974 (simple-format #f "\"~a\"" libxdo)))
8975 #t))))
8976 #:tests? #f)) ; no tests provided
8977 (propagated-inputs
8978 `(("python-six" ,python-six)))
8979 (inputs
8980 `(("xdotool" ,xdotool)
8981 ("libX11" ,libx11)))
8982 (home-page "https://tracker.debian.org/pkg/python-xdo")
8983 (synopsis "Python library for simulating X11 keyboard/mouse input")
8984 (description "Provides bindings to libxdo for manipulating X11 via simulated
8985input. (Note that this is mostly a legacy library; you may wish to look at
8986python-xdo for newer bindings.)")
8987 (license license:bsd-3)))
8988
8989(define-public python2-xdo
8990 (package-with-python2 python-xdo))
8991
8992(define-public python-mako
8993 (package
8994 (name "python-mako")
6bf53ad5 8995 (version "1.1.0")
44d10b1f
RW
8996 (source
8997 (origin
8998 (method url-fetch)
8999 (uri (pypi-uri "Mako" version))
9000 (sha256
9001 (base32
6bf53ad5 9002 "0jqa3qfpykyn4fmkn0kh6043sfls7br8i2bsdbccazcvk9cijsd3"))))
44d10b1f 9003 (build-system python-build-system)
6bf53ad5
MB
9004 (arguments
9005 `(#:phases (modify-phases %standard-phases
9006 (replace 'check
9007 (lambda _
9008 (invoke "pytest" "-vv"))))))
44d10b1f
RW
9009 (propagated-inputs
9010 `(("python-markupsafe" ,python-markupsafe)))
9011 (native-inputs
9012 `(("python-mock" ,python-mock)
44d10b1f 9013 ("python-pytest" ,python-pytest)))
7016e620 9014 (home-page "https://www.makotemplates.org/")
44d10b1f
RW
9015 (synopsis "Templating language for Python")
9016 (description "Mako is a templating language for Python that compiles
9017templates into Python modules.")
9018 (license license:expat)))
9019
9020(define-public python2-mako
9021 (package-with-python2 python-mako))
9022
9023(define-public python-waitress
9024 (package
9025 (name "python-waitress")
9026 (version "1.1.0")
9027 (source
9028 (origin
9029 (method url-fetch)
9030 (uri (pypi-uri "waitress" version))
9031 (patches (search-patches "python-waitress-fix-tests.patch"))
9032 (sha256
9033 (base32
9034 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
9035 (build-system python-build-system)
9036 (home-page "https://github.com/Pylons/waitress")
9037 (synopsis "Waitress WSGI server")
9038 (description "Waitress is meant to be a production-quality pure-Python WSGI
9039server with very acceptable performance.")
9040 (license license:zpl2.1)))
9041
9042(define-public python2-waitress
9043 (package-with-python2 python-waitress))
9044
b2b23d12
TLC
9045(define-public python-whichcraft
9046 (package
9047 (name "python-whichcraft")
9048 (version "0.6.1")
9049 (source
9050 (origin
9051 (method url-fetch)
9052 (uri (pypi-uri "whichcraft" version))
9053 (sha256
9054 (base32
9055 "11yfkzyplizdgndy34vyd5qlmr1n5mxis3a3svxmx8fnccdvknxc"))))
9056 (build-system python-build-system)
9057 (native-inputs
9058 `(("python-pytest" ,python-pytest)))
9059 (home-page "https://github.com/pydanny/whichcraft")
9060 (synopsis "Cross-platform cross-python shutil.which functionality")
9061 (description
9062 "This package provides a shim of the shutil.which function that's
9063designed to work across multiple versions of Python.")
9064 (license license:bsd-3)))
9065
1133ca44
TLC
9066(define-public python-cookiecutter
9067 (package
9068 (name "python-cookiecutter")
9069 (version "1.6.0")
9070 (source
9071 (origin
9072 (method url-fetch)
9073 (uri (pypi-uri "cookiecutter" version))
9074 (sha256
9075 (base32
9076 "0glsvaz8igi2wy1hsnhm9fkn6560vdvdixzvkq6dn20z3hpaa5hk"))))
9077 (build-system python-build-system)
9078 (native-inputs
9079 `(("python-freezegun" ,python-freezegun)
9080 ("python-pytest" ,python-pytest)
9081 ("python-pytest-catchlog" ,python-pytest-catchlog)
9082 ("python-pytest-cov" ,python-pytest-cov)
9083 ("python-pytest-mock" ,python-pytest-mock)))
9084 (propagated-inputs
9085 `(("python-binaryornot" ,python-binaryornot)
9086 ("python-click" ,python-click)
9087 ("python-future" ,python-future)
9088 ("python-jinja2" ,python-jinja2)
9089 ("python-jinja2-time" ,python-jinja2-time)
9090 ("python-poyo" ,python-poyo)
9091 ("python-requests" ,python-requests)
9092 ("python-whichcraft" ,python-whichcraft)))
9093 (home-page "https://github.com/audreyr/cookiecutter")
9094 (synopsis
9095 "Command-line utility that creates projects from project templates")
9096 (description
9097 "This package provides a command-line utility that creates projects from
9098project templates, e.g. creating a Python package project from a Python package
9099project template.")
9100 (license license:bsd-3)))
9101
44d10b1f
RW
9102(define-public python-pyquery
9103 (package
9104 (name "python-pyquery")
9105 (version "1.2.17")
9106 (source
9107 (origin
9108 (method url-fetch)
9109 (uri (pypi-uri "pyquery" version))
9110 (sha256
9111 (base32
9112 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
9113 (build-system python-build-system)
9114 (native-inputs
9115 `(("python-webob" ,python-webob)
9116 ("python-webtest" ,python-webtest)))
9117 (propagated-inputs
9118 `(("python-lxml" ,python-lxml)
9119 ("python-cssselect" ,python-cssselect)))
9120 (home-page "https://github.com/gawel/pyquery")
9121 (synopsis "Make jQuery-like queries on xml documents")
9122 (description "pyquery allows you to make jQuery queries on xml documents.
9123The API is as much as possible the similar to jQuery. pyquery uses lxml for
9124fast xml and html manipulation.")
9125 (license license:bsd-3)))
9126
44d10b1f
RW
9127(define-public python-anyjson
9128 (package
9129 (name "python-anyjson")
9130 (version "0.3.3")
9131 (source
9132 (origin
9133 (method url-fetch)
9134 (uri (pypi-uri "anyjson" version))
9135 (sha256
9136 (base32
9137 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
9138 (build-system python-build-system)
9139 (arguments
9140 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
9141 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
9142 ;; whatever) so this transformation needs to be done before the tests
9143 ;; can be run. Maybe we could add a build step to transform beforehand
9144 ;; but it could be annoying/difficult.
9145 ;; We can enable tests for the Python 2 version, though, and do below.
9146 #:tests? #f))
9147 (home-page "https://bitbucket.org/runeh/anyjson/")
9148 (synopsis
9149 "Wraps best available JSON implementation in a common interface")
9150 (description
9151 "Anyjson loads whichever is the fastest JSON module installed
9152and provides a uniform API regardless of which JSON implementation is used.")
9153 (license license:bsd-3)
9154 (properties `((python2-variant . ,(delay python2-anyjson))))))
9155
9156(define-public python2-anyjson
9157 (let ((anyjson (package-with-python2
9158 (strip-python2-variant python-anyjson))))
9159 (package
9160 (inherit anyjson)
9161 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
9162 #:tests? #t
9163 ,@(package-arguments anyjson)))
9164 (native-inputs `(("python2-nose" ,python2-nose))))))
9165
9166(define-public python-amqp
9167 (package
9168 (name "python-amqp")
9169 (version "2.3.2")
9170 (source
9171 (origin
9172 (method url-fetch)
9173 (uri (pypi-uri "amqp" version))
9174 (sha256
9175 (base32
9176 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
9177 (build-system python-build-system)
9178 (native-inputs
9179 `(("python-case" ,python-case)
9180 ("python-pytest-sugar" ,python-pytest-sugar)
9181 ("python-mock" ,python-mock)))
9182 (propagated-inputs
9183 `(("python-vine" ,python-vine)))
9184 (home-page "https://github.com/celery/py-amqp")
9185 (synopsis
9186 "Low-level AMQP client for Python (fork of amqplib)")
9187 (description
9188 "This is a fork of amqplib which was originally written by Barry Pederson.
9189It is maintained by the Celery project, and used by kombu as a pure python
9190alternative when librabbitmq is not available.")
9191 (license license:lgpl2.1+)
9192 (properties `((python2-variant . ,(delay python2-amqp))))))
9193
9194(define-public python2-amqp
9195 (let ((amqp (package-with-python2
9196 (strip-python2-variant python-amqp))))
9197 (package
9198 (inherit amqp)
9199 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
9200 ;; unmaintained. Weirdly, does not do this on the python 3
9201 ;; version?
9202 #:tests? #f
9203 ,@(package-arguments amqp))))))
9204
9205(define-public python-txamqp
9206 (package
9207 (name "python-txamqp")
9208 (version "0.8.2")
9209 (source
9210 (origin
9211 (method url-fetch)
9212 (uri (pypi-uri "txAMQP" version))
9213 (sha256
9214 (base32
9215 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
9216 (build-system python-build-system)
9217 (propagated-inputs
9218 `(("python-six" ,python-six)
9219 ("python-twisted" ,python-twisted)))
9220 (home-page "https://github.com/txamqp/txamqp")
9221 (synopsis "Communicate with AMQP peers and brokers using Twisted")
9222 (description
9223 "This package provides a Python library for communicating with AMQP peers
9224and brokers using the asynchronous networking framework Twisted. It contains
9225all the necessary code to connect, send and receive messages to/from an
9226AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
9227also includes support for using Thrift RPC over AMQP in Twisted
9228applications.")
9229 (license license:asl2.0)))
9230
9231(define-public python2-txamqp
9232 (package-with-python2 python-txamqp))
9233
9234(define-public python-kombu
9235 (package
9236 (name "python-kombu")
9237 (version "4.2.2")
9238 (source
9239 (origin
9240 (method url-fetch)
9241 (uri (pypi-uri "kombu" version))
9242 (sha256
9243 (base32
9244 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
9245 (build-system python-build-system)
9246 (native-inputs
9247 `(("python-mock" ,python-mock)
9248 ("python-case" ,python-case)
9249 ("python-pyro4" ,python-pyro4)
9250 ("python-pytest-sugar" ,python-pytest-sugar)
9251 ("python-pytz" ,python-pytz)))
9252 (propagated-inputs
9253 `(("python-anyjson" ,python-anyjson)
9254 ("python-amqp" ,python-amqp)
9255 ("python-redis" ,python-redis)))
9256 (home-page "https://kombu.readthedocs.io")
9257 (synopsis "Message passing library for Python")
9258 (description "The aim of Kombu is to make messaging in Python as easy as
9259possible by providing an idiomatic high-level interface for the AMQ protocol,
9260and also provide proven and tested solutions to common messaging problems.
9261AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
9262message orientation, queuing, routing, reliability and security, for which the
9263RabbitMQ messaging server is the most popular implementation.")
9264 (license license:bsd-3)
9265 (properties `((python2-variant . ,(delay python2-kombu))))))
9266
9267(define-public python2-kombu
9268 (let ((kombu (package-with-python2
9269 (strip-python2-variant python-kombu))))
9270 (package
9271 (inherit kombu)
9272 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
9273 ;; It works fine on the python3 variant.
9274 #:tests? #f
9275 ,@(package-arguments kombu)))
9276 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9277 ,@(package-native-inputs kombu))))))
9278
9279(define-public python-billiard
9280 (package
9281 (name "python-billiard")
9282 (version "3.5.0.5")
9283 (source
9284 (origin
9285 (method url-fetch)
9286 (uri (pypi-uri "billiard" version))
9287 (sha256
9288 (base32
9289 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
9290 (build-system python-build-system)
9291 (native-inputs
9292 `(("python-case" ,python-case)
9293 ("python-pytest" ,python-pytest)))
9294 (home-page "https://github.com/celery/billiard")
9295 (synopsis
9296 "Python multiprocessing fork with improvements and bugfixes")
9297 (description
9298 "Billiard is a fork of the Python 2.7 multiprocessing package. The
9299multiprocessing package itself is a renamed and updated version of R Oudkerk's
9300pyprocessing package. This standalone variant is intended to be compatible with
9301Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
9302 (license license:bsd-3)
9303 (properties `((python2-variant . ,(delay python2-billiard))))))
9304
9305(define-public python2-billiard
9306 (let ((billiard (package-with-python2
9307 (strip-python2-variant python-billiard))))
9308 (package
9309 (inherit billiard)
9310 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9311 ("python2-mock" ,python2-mock)
9312 ,@(package-native-inputs billiard))))))
9313
9314(define-public python-celery
9315 (package
9316 (name "python-celery")
9317 (version "4.2.1")
9318 (source
9319 (origin
9320 (method url-fetch)
9321 (uri (pypi-uri "celery" version))
9322 (sha256
9323 (base32
9324 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
9325 (build-system python-build-system)
9326 (arguments
9327 '(;; TODO The tests fail with Python 3.7
9328 ;; https://github.com/celery/celery/issues/4849
9329 #:tests? #f
9330 #:phases
9331 (modify-phases %standard-phases
9332 (add-after 'unpack 'patch-requirements
9333 (lambda _
9334 (substitute* "requirements/test.txt"
9335 (("pytest>=3\\.0,<3\\.3")
9336 "pytest>=3.0"))
9337 #t)))))
9338 (native-inputs
9339 `(("python-case" ,python-case)
9340 ("python-pytest" ,python-pytest)))
9341 (propagated-inputs
9342 `(("python-pytz" ,python-pytz)
9343 ("python-billiard" ,python-billiard)
9344 ("python-kombu" ,python-kombu)))
9345 (home-page "https://celeryproject.org")
9346 (synopsis "Distributed Task Queue")
9347 (description "Celery is an asynchronous task queue/job queue based on
9348distributed message passing. It is focused on real-time operation, but
9349supports scheduling as well. The execution units, called tasks, are executed
9350concurrently on a single or more worker servers using multiprocessing,
9351Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
9352synchronously (wait until ready).")
9353 (license license:bsd-3)
9354 (properties `((python2-variant . ,(delay python2-celery))))))
9355
9356(define-public python2-celery
9357 (let ((celery (package-with-python2
9358 (strip-python2-variant python-celery))))
9359 (package
9360 (inherit celery)
9361 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9362 ("python2-mock" ,python2-mock)
9363 ,@(package-native-inputs celery))))))
9364
9365(define-public python-translitcodec
9366 (package
9367 (name "python-translitcodec")
9368 (version "0.4.0")
9369 (source
9370 (origin
9371 (method url-fetch)
9372 (uri (pypi-uri "translitcodec" version))
9373 (sha256
9374 (base32
9375 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
9376 (build-system python-build-system)
9377 (arguments
9378 `(#:tests? #f)) ; no tests provided
9379 (home-page
9380 "https://github.com/claudep/translitcodec")
9381 (synopsis
9382 "Unicode to 8-bit charset transliteration codec")
9383 (description
9384 "This package contains codecs for transliterating ISO 10646 texts into
9385best-effort representations using smaller coded character sets (ASCII,
9386ISO 8859, etc.).")
9387 (license license:expat)))
9388
9389(define-public python2-translitcodec
9390 (package-with-python2 python-translitcodec))
9391
9392(define-public python-editor
9393 (package
9394 (name "python-editor")
9395 (version "0.5")
9396 (source
9397 (origin
9398 (method url-fetch)
9399 (uri (pypi-uri "python-editor" version))
9400 (sha256
9401 (base32
9402 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
9403 (build-system python-build-system)
9404 (home-page
9405 "https://github.com/fmoo/python-editor")
9406 (synopsis
9407 "Programmatically open an editor, capture the result")
9408 (description
9409 "python-editor is a library that provides the editor module for
9410programmatically interfacing with your system's $EDITOR.")
9411 (license license:asl2.0)))
9412
9413(define-public python2-editor
9414 (package-with-python2 python-editor))
9415
44d10b1f
RW
9416(define-public python-vobject
9417 (package
9418 (name "python-vobject")
9419 (version "0.9.5")
9420 (source (origin
9421 (method url-fetch)
9422 (uri (pypi-uri "vobject" version))
9423 (sha256
9424 (base32
9425 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
9426 (build-system python-build-system)
9427 (arguments
9428 '(;; The test suite relies on some non-portable Windows interfaces.
9429 #:tests? #f))
9430 (propagated-inputs
9431 `(("python-dateutil" ,python-dateutil)
9432 ("python-pyicu" ,python-pyicu)))
9433 (synopsis "Parse and generate vCard and vCalendar files")
9434 (description "Vobject is intended to be a full featured Python package for
9435parsing and generating vCard and vCalendar files. Currently, iCalendar files
9436are supported and well tested. vCard 3.0 files are supported, and all data
9437should be imported, but only a few components are understood in a sophisticated
9438way.")
9439 (home-page "http://eventable.github.io/vobject/")
9440 (license license:asl2.0)))
9441
9442(define-public python2-vobject
9443 (package-with-python2 python-vobject))
9444
9445(define-public python-munkres
9446 (package
9447 (name "python-munkres")
9448 (version "1.0.8")
9449 (source (origin
9450 (method url-fetch)
9451 (uri (pypi-uri "munkres" version))
9452 (sha256
9453 (base32
9454 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
9455 (build-system python-build-system)
9456 (arguments
9457 '(#:tests? #f)) ; no test suite
9458 (home-page "http://software.clapper.org/munkres/")
9459 (synopsis "Implementation of the Munkres algorithm")
9460 (description "The Munkres module provides an implementation of the Munkres
9461algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
9462useful for solving the Assignment Problem.")
9463 (license license:bsd-3)))
9464
9465(define-public python2-munkres
9466 (package-with-python2 python-munkres))
9467
9468(define-public python-whoosh
9469 (package
9470 (name "python-whoosh")
9471 (version "2.7.4")
9472 (source
9473 (origin
9474 (method url-fetch)
9475 (uri (pypi-uri "Whoosh" version))
9476 (sha256
9477 (base32
9478 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
9479 (build-system python-build-system)
2679d9a4 9480 (arguments '(#:tests? #f)) ; Test invocation is no longer supported by Python.
44d10b1f
RW
9481 (native-inputs
9482 `(("python-pytest" ,python-pytest)))
9483 (home-page "https://bitbucket.org/mchaput/whoosh")
9484 (synopsis "Full text indexing, search, and spell checking library")
9485 (description
9486 "Whoosh is a fast, pure-Python full text indexing, search, and spell
9487checking library.")
9488 (license license:bsd-2)))
9489
9490(define-public python2-whoosh
9491 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
9492 (package (inherit whoosh)
9493 (propagated-inputs
9494 `(("python2-backport-ssl-match-hostname"
9495 ,python2-backport-ssl-match-hostname)
9496 ,@(package-propagated-inputs whoosh))))))
9497
9498(define-public python-pathlib
9499 (package
9500 (name "python-pathlib")
9501 (version "1.0.1")
9502 (source (origin
9503 (method url-fetch)
9504 (uri (pypi-uri "pathlib" version))
9505 (sha256
9506 (base32
9507 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
9508 (build-system python-build-system)
9509 ;; The tests depend on the internal "test" module, which does not provide
9510 ;; a stable interface.
9511 (arguments `(#:tests? #f))
9512 (home-page "https://pathlib.readthedocs.org/")
9513 (synopsis "Object-oriented file system paths")
9514 (description "Pathlib offers a set of classes to handle file system paths.
9515It offers the following advantages over using string objects:
9516
9517@enumerate
9518@item No more cumbersome use of os and os.path functions. Everything can
9519be done easily through operators, attribute accesses, and method calls.
9520@item Embodies the semantics of different path types. For example,
9521comparing Windows paths ignores casing.
9522@item Well-defined semantics, eliminating any inconsistencies or
9523ambiguities (forward vs. backward slashes, etc.).
9524@end enumerate
9525
9526Note: In Python 3.4, pathlib is now part of the standard library. For other
9527Python versions please consider python-pathlib2 instead, which tracks the
9528standard library module. This module (python-pathlib) isn't maintained
9529anymore.")
9530 (license license:expat)))
9531
9532(define-public python2-pathlib
9533 (package-with-python2 python-pathlib))
9534
9535(define-public python2-pathlib2
9536 (package
9537 (name "python2-pathlib2")
54da6f9f 9538 (version "2.3.3")
44d10b1f
RW
9539 (source (origin
9540 (method url-fetch)
9541 (uri (pypi-uri "pathlib2" version))
9542 (sha256
9543 (base32
54da6f9f 9544 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
44d10b1f
RW
9545 (build-system python-build-system)
9546 ;; We only need the the Python 2 variant, since for Python 3 our minimum
9547 ;; version is 3.4 which already includes this package as part of the
9548 ;; standard library.
9549 (arguments
9550 `(#:python ,python-2))
9551 (propagated-inputs
9552 `(("python2-scandir" ,python2-scandir)
9553 ("python2-six" ,python2-six)))
9554 (home-page "https://pypi.python.org/pypi/pathlib2/")
9555 (synopsis "Object-oriented file system paths - backport of standard
9556pathlib module")
9557 (description "The goal of pathlib2 is to provide a backport of standard
9558pathlib module which tracks the standard library module, so all the newest
9559features of the standard pathlib can be used also on older Python versions.
9560
9561Pathlib offers a set of classes to handle file system paths. It offers the
9562following advantages over using string objects:
9563
9564@enumerate
9565@item No more cumbersome use of os and os.path functions. Everything can
9566be done easily through operators, attribute accesses, and method calls.
9567@item Embodies the semantics of different path types. For example,
9568comparing Windows paths ignores casing.
9569@item Well-defined semantics, eliminating any inconsistencies or
9570ambiguities (forward vs. backward slashes, etc.).
9571@end enumerate")
9572 (license license:expat)))
9573
9574(define-public python2-pathlib2-bootstrap
9575 (hidden-package
9576 (package
9577 (inherit python2-pathlib2)
9578 (name "python2-pathlib2-bootstrap")
9579 (propagated-inputs
9580 `(("python2-scandir" ,python2-scandir)
9581 ("python2-six" ,python2-six-bootstrap))))))
9582
9583(define-public python-jellyfish
9584 (package
9585 (name "python-jellyfish")
9586 (version "0.5.6")
9587 (source (origin
9588 (method url-fetch)
9589 (uri (pypi-uri "jellyfish" version))
9590 (sha256
9591 (base32
9592 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
9593 (build-system python-build-system)
9594 (native-inputs
9595 `(("python-pytest" ,python-pytest)))
9596 (home-page "https://github.com/jamesturk/jellyfish")
9597 (synopsis "Approximate and phonetic matching of strings")
9598 (description "Jellyfish uses a variety of string comparison and phonetic
9599encoding algorithms to do fuzzy string matching.")
9600 (license license:bsd-2)
9601 (properties `((python2-variant . ,(delay python2-jellyfish))))))
9602
9603(define-public python2-jellyfish
9604 (let ((jellyfish (package-with-python2
9605 (strip-python2-variant python-jellyfish))))
9606 (package (inherit jellyfish)
9607 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
9608 ,@(package-native-inputs jellyfish))))))
9609
9610(define-public python2-unicodecsv
9611 (package
9612 (name "python2-unicodecsv")
9613 (version "0.14.1")
9614 (source (origin
9615 (method url-fetch)
9616 ;; The test suite is not included in the PyPi release.
9617 ;; https://github.com/jdunck/python-unicodecsv/issues/19
9618 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
9619 "archive/" version ".tar.gz"))
9620 (file-name (string-append name "-" version ".tar.gz"))
9621 (sha256
9622 (base32
9623 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
9624 (build-system python-build-system)
9625 (arguments
9626 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
9627 #:python ,python-2))
9628 (native-inputs
9629 `(("python2-unittest2" ,python2-unittest2)))
9630 (home-page "https://github.com/jdunck/python-unicodecsv")
9631 (synopsis "Unicode CSV module for Python 2")
9632 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
9633module, adding support for Unicode strings.")
9634 (license license:bsd-2)))
9635
9636(define-public python-rarfile
9637 (package
9638 (name "python-rarfile")
9639 (version "2.8")
9640 (source (origin
9641 (method url-fetch)
9642 (uri (pypi-uri "rarfile" version))
9643 (sha256
9644 (base32
9645 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
9646 (build-system python-build-system)
9647 (arguments
9648 '(#:phases
9649 (modify-phases %standard-phases
9650 (replace 'check
9651 ;; Many tests fail, but the installation proceeds.
e59dd341 9652 (lambda _ (invoke "make" "-C" "test" "test"))))))
44d10b1f
RW
9653 (native-inputs
9654 `(("which" ,which))) ; required for tests
9655 (propagated-inputs
9656 `(("libarchive" ,libarchive)))
9657 (home-page "https://github.com/markokr/rarfile")
9658 (synopsis "RAR archive reader for Python")
9659 (description "This is Python module for RAR archive reading. The interface
9660is made as zipfile like as possible.")
9661 (license license:isc)))
9662
9663(define-public python2-rarfile
9664 (package-with-python2 python-rarfile))
9665
9666(define-public python-magic
9667 (package
9668 (name "python-magic")
9669 (version "0.4.15")
9670 (source
9671 (origin
9672 (method url-fetch)
9673 (uri (pypi-uri "python-magic" version))
9674 (sha256
9675 (base32
9676 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
9677 (file-name (string-append name "-" version "-checkout"))))
9678 (build-system python-build-system)
9679 (arguments
9680 ;; The tests are unreliable, so don't run them. The tests fail
9681 ;; under Python3 because they were written for Python2 and
9682 ;; contain import statements that do not work in Python3. One of
9683 ;; the tests fails under Python2 because its assertions are
9684 ;; overly stringent; it relies on comparing output strings which
9685 ;; are brittle and can change depending on the version of
9686 ;; libmagic being used and the system on which the test is
9687 ;; running. In my case, under GuixSD 0.10.0, only one test
9688 ;; failed, and it seems to have failed only because the version
9689 ;; of libmagic that is packaged in Guix outputs a slightly
9690 ;; different (but not wrong) string than the one that the test
9691 ;; expected.
9692 '(#:tests? #f
9693 #:phases (modify-phases %standard-phases
9694 ;; Replace a specific method call with a hard-coded
9695 ;; path to the necessary libmagic.so file in the
9696 ;; store. If we don't do this, then the method call
9697 ;; will fail to find the libmagic.so file, which in
9698 ;; turn will cause any application using
9699 ;; python-magic to fail.
9700 (add-before 'build 'hard-code-path-to-libmagic
9701 (lambda* (#:key inputs #:allow-other-keys)
9702 (let ((file (assoc-ref inputs "file")))
9703 (substitute* "magic.py"
9704 (("ctypes.util.find_library\\('magic'\\)")
9705 (string-append "'" file "/lib/libmagic.so'")))
9706 #t)))
9707 (add-before 'install 'disable-egg-compression
9708 (lambda _
9709 (let ((port (open-file "setup.cfg" "a")))
9710 (display "\n[easy_install]\nzip_ok = 0\n"
9711 port)
9712 (close-port port)
9713 #t))))))
9714 (inputs
9715 ;; python-magic needs to be able to find libmagic.so.
9716 `(("file" ,file)))
9717 (home-page
9718 "https://github.com/ahupp/python-magic")
9719 (synopsis
9720 "File type identification using libmagic")
9721 (description
9722 "This module uses ctypes to access the libmagic file type
9723identification library. It makes use of the local magic database and
9724supports both textual and MIME-type output. Note that this module and
9725the python-file module both provide a \"magic.py\" file; these two
9726modules, which are different and were developed separately, both serve
9727the same purpose: to provide Python bindings for libmagic.")
9728 (license license:expat)))
9729
9730(define-public python2-magic
9731 (package-with-python2 python-magic))
9732
9733(define-public python2-s3cmd
9734 (package
9735 (name "python2-s3cmd")
9736 (version "1.6.1")
9737 (source
9738 (origin
9739 (method url-fetch)
9740 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
9741 "s3cmd-" version ".tar.gz"))
9742 (sha256
9743 (base32
9744 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
9745 (build-system python-build-system)
9746 (arguments
9747 ;; s3cmd is written for python2 only and contains no tests.
9748 `(#:python ,python-2
9749 #:tests? #f))
9750 (propagated-inputs
9751 `(("python2-dateutil" ,python2-dateutil)
9752 ;; The python-file package also provides a magic.py module.
9753 ;; This is an unfortunate state of affairs; however, s3cmd
9754 ;; fails to install if it cannot find specifically the
9755 ;; python-magic package. Thus we include it, instead of using
9756 ;; python-file. Ironically, s3cmd sometimes works better
9757 ;; without libmagic bindings at all:
9758 ;; https://github.com/s3tools/s3cmd/issues/198
9759 ("python2-magic" ,python2-magic)))
9760 (home-page "http://s3tools.org/s3cmd")
9761 (synopsis "Command line tool for S3-compatible storage services")
9762 (description
9763 "S3cmd is a command line tool for uploading, retrieving and managing data
9764in storage services that are compatible with the Amazon Simple Storage
9765Service (S3) protocol, including S3 itself. It supports rsync-like backup,
9766GnuPG encryption, and more. It also supports management of Amazon's
9767CloudFront content delivery network.")
9768 (license license:gpl2+)))
9769
9770(define-public python-pkgconfig
9771 (package
9772 (name "python-pkgconfig")
9773 (version "1.3.1")
9774 (source
9775 (origin
9776 (method url-fetch)
9777 (uri (pypi-uri "pkgconfig" version))
9778 (sha256
9779 (base32
9780 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
9781 (build-system python-build-system)
9782 (native-inputs
9783 `(("python-nose" ,python-nose)))
9784 (inputs
9785 `(("pkg-config" ,pkg-config)))
9786 (arguments
9787 `(#:phases
9788 (modify-phases %standard-phases
9789 (add-before 'build 'patch
9790 ;; Hard-code the path to pkg-config.
9791 (lambda _
9792 (substitute* "pkgconfig/pkgconfig.py"
9793 (("cmd = 'pkg-config")
9794 (string-append "cmd = '" (which "pkg-config"))))
9795 #t))
9796 (replace 'check
9797 (lambda _
9798 (invoke "nosetests" "test.py"))))))
9799 (home-page "https://github.com/matze/pkgconfig")
9800 (synopsis "Python interface for pkg-config")
9801 (description "This module provides a Python interface to pkg-config. It
9802can be used to find all pkg-config packages, check if a package exists,
9803check if a package meets certain version requirements, query CFLAGS and
9804LDFLAGS and parse the output to build extensions with setup.py.")
9805 (license license:expat)))
9806
9807(define-public python2-pkgconfig
9808 (package-with-python2 python-pkgconfig))
9809
9810(define-public python-bz2file
9811 (package
9812 (name "python-bz2file")
9813 (version "0.98")
9814 (source
9815 (origin
9816 (method url-fetch)
9817 (uri (pypi-uri "bz2file" version))
9818 (sha256
9819 (base32
9820 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
9821 (build-system python-build-system)
9822 (arguments
9823 `(#:tests? #f)) ; Tests use deprecated python modules.
9824 (home-page "https://github.com/nvawda/bz2file")
9825 (synopsis "Read and write bzip2-compressed files")
9826 (description
9827 "Bz2file is a Python library for reading and writing bzip2-compressed
9828files. It contains a drop-in replacement for the I/O interface in the
9829standard library's @code{bz2} module, including features from the latest
9830development version of CPython that are not available in older releases.")
9831 (license license:asl2.0)))
9832
9833(define-public python2-bz2file
9834 (package-with-python2 python-bz2file))
9835
9836(define-public python-future
9837 (package
9838 (name "python-future")
d5d54030 9839 (version "0.17.1")
44d10b1f
RW
9840 (source
9841 (origin
9842 (method url-fetch)
9843 (uri (pypi-uri "future" version))
9844 (sha256
9845 (base32
d5d54030 9846 "1f2rlqn9rh7adgir52dlbqz69gsab44x0mlm8gf1cs7xvhv54137"))))
44d10b1f
RW
9847 (build-system python-build-system)
9848 ;; Many tests connect to the network or are otherwise flawed.
9849 ;; https://github.com/PythonCharmers/python-future/issues/210
9850 (arguments
9851 `(#:tests? #f))
9852 (home-page "http://python-future.org")
9853 (synopsis "Single-source support for Python 3 and 2")
9854 (description
9855 "@code{python-future} is the missing compatibility layer between Python 2 and
9856Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
9857to support both Python 2 and Python 3 with minimal overhead.")
9858 (license license:expat)))
9859
9860(define-public python2-future
9861 (package-with-python2 python-future))
9862
9863(define-public python-cysignals
9864 (package
9865 (name "python-cysignals")
8e3e51df 9866 (version "1.9.0")
44d10b1f
RW
9867 (source
9868 (origin
9869 (method url-fetch)
8e3e51df 9870 (uri (pypi-uri "cysignals" version))
44d10b1f
RW
9871 (sha256
9872 (base32
8e3e51df 9873 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
44d10b1f
RW
9874 (build-system python-build-system)
9875 (native-inputs
9876 `(("python-cython" ,python-cython)
9877 ("python-sphinx" ,python-sphinx)))
9878 (inputs
9879 `(("pari-gp" ,pari-gp)))
9880 (arguments
9881 `(#:modules ((guix build python-build-system)
9882 ((guix build gnu-build-system) #:prefix gnu:)
9883 (guix build utils))
9884 ;; FIXME: Tests are executed after installation and currently fail
9885 ;; when not installing into standard locations; the author is working
9886 ;; on a fix.
9887 #:tests? #f
9888 #:phases
9889 (modify-phases %standard-phases
9890 (add-before
9891 'build 'configure
9892 (assoc-ref gnu:%standard-phases 'configure)))))
9893 (home-page
9894 "https://github.com/sagemath/cysignals")
9895 (synopsis
9896 "Handling of interrupts and signals for Cython")
9897 (description
9898 "The cysignals package provides mechanisms to handle interrupts (and
9899other signals and errors) in Cython code, using two related approaches,
9900for mixed Cython/Python code or external C libraries and pure Cython code,
9901respectively.")
9902 (license license:lgpl3+)))
9903
9904(define-public python2-cysignals
9905 (package-with-python2 python-cysignals))
9906
9907(define-public python2-shedskin
9908 (package
9909 (name "python2-shedskin")
9910 (version "0.9.4")
9911 (source
9912 (origin
9913 (method url-fetch)
9914 (uri (string-append "https://github.com/shedskin/shedskin/"
9915 "releases/download/v" version
9916 "/shedskin-" version ".tgz"))
9917 (sha256
9918 (base32
9919 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
9920 (build-system python-build-system)
9921 (arguments
9922 `(#:python ,python-2
9923 #:phases (modify-phases %standard-phases
9924 (add-after 'unpack 'fix-resulting-include-libs
9925 (lambda* (#:key inputs #:allow-other-keys)
9926 (let ((libgc (assoc-ref inputs "libgc"))
9927 (pcre (assoc-ref inputs "pcre")))
9928 (substitute* "shedskin/makefile.py"
9929 (("variable == 'CCFLAGS':[ ]*")
9930 (string-append "variable == 'CCFLAGS':\n"
9931 " line += ' -I " pcre "/include"
9932 " -I " libgc "/include'"))
9933 (("variable == 'LFLAGS':[ ]*")
9934 (string-append "variable == 'LFLAGS':\n"
9935 " line += ' -L" pcre "/lib"
9936 " -L " libgc "/lib'")))
9937 #t))))))
9938 (inputs `(("pcre" ,pcre)
9939 ("libgc" ,libgc)))
9940 (home-page "https://shedskin.github.io/")
9941 (synopsis "Experimental Python-2 to C++ Compiler")
9942 (description (string-append "This is an experimental compiler for a subset of
9943Python. It generates C++ code and a Makefile."))
9944 (license (list license:gpl3 license:bsd-3 license:expat))))
9945
9946(define-public python2-rope
9947 (package
9948 (name "python2-rope")
a9ba0a31 9949 (version "0.11.0")
44d10b1f
RW
9950 (source
9951 (origin
9952 (method url-fetch)
9953 (uri (pypi-uri "rope" version))
9954 (sha256
9955 (base32
a9ba0a31 9956 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
44d10b1f 9957 (arguments
afb29715 9958 ;; Rope has only partial python3 support, see `python-rope'
44d10b1f
RW
9959 `(#:python ,python-2))
9960 (build-system python-build-system)
9961 (native-inputs
9962 `(("python2-unittest2" ,python2-unittest2)))
9963 (home-page "https://github.com/python-rope/rope")
9964 (synopsis "Refactoring library for Python")
9965 (description "Rope is a refactoring library for Python. It facilitates
9966the renaming, moving and extracting of attributes, functions, modules, fields
9967and parameters in Python 2 source code. These refactorings can also be applied
9968to occurrences in strings and comments.")
9969 (license license:gpl2)))
9970
2c880ef4
LC
9971(define-public python-rope
9972 (package
9973 (inherit python2-rope)
9974 (name "python-rope")
9975 (arguments `(#:python ,python-wrapper
9976 ;; XXX: Only partial python3 support, results in some failing
9977 ;; tests: <https://github.com/python-rope/rope/issues/247>.
9978 #:tests? #f))
9979 (properties `((python2-variant . ,(delay python2-rope))))))
9980
44d10b1f
RW
9981(define-public python-py3status
9982 (package
9983 (name "python-py3status")
ef68b35d 9984 (version "3.21")
44d10b1f
RW
9985 (source
9986 (origin
9987 (method url-fetch)
9988 (uri (pypi-uri "py3status" version))
9989 (sha256
ef68b35d 9990 (base32 "16z8zq83hxy48g6hh4xczbdz50qvxv9k1aahr4fqq7jis60cc262"))))
44d10b1f
RW
9991 (build-system python-build-system)
9992 (inputs
9993 `(("file" ,file)))
9994 (arguments
9995 '(#:phases
9996 (modify-phases %standard-phases
9997 ;; 'file' is used for detection of configuration file encoding
9998 ;; let's make link the dependency to particular input
9999 (add-before 'build 'patch-file-path
10000 (lambda* (#:key inputs #:allow-other-keys)
10001 (let ((file-path (assoc-ref inputs "file")))
10002 (substitute* "py3status/parse_config.py"
10003 (("\\['file', '-b'")
10004 (string-append "['" file-path "/bin/file', '-b'")))
10005 #t))))
10006 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
10007 (home-page "https://github.com/ultrabug/py3status")
10008 (synopsis "Extensible i3status wrapper written in Python")
10009 (description "py3status is an i3status wrapper which extends i3status
10010functionality in a modular way, allowing you to extend your panel with your
10011own code, responding to click events and updating clock every second.")
10012 (license license:bsd-3)))
10013
10014(define-public python-tblib
10015 (package
10016 (name "python-tblib")
10017 (version "1.3.2")
10018 (source (origin
10019 (method url-fetch)
10020 (uri (pypi-uri "tblib" version))
10021 (sha256 (base32
10022 "1rsg8h069kqgncyv8fgzyj6qflk6j10cb78pa5jk34ixwq044vj3"))))
10023 (build-system python-build-system)
10024 (arguments
10025 `(#:phases
10026 (modify-phases %standard-phases
10027 (add-before 'check 'adjust-tests
10028 (lambda _
10029 (when (which "python3")
10030 ;; Adjust the example output to match that of Python 3.7:
10031 ;; <https://github.com/ionelmc/python-tblib/issues/36>.
10032 (substitute* "README.rst"
10033 (("Exception\\('fail',") "Exception('fail'"))
10034 #t)))
10035 (replace 'check
10036 (lambda _
10037 ;; Upstream runs tests after installation and the package itself
10038 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
10039 ;; found.
10040 (setenv "PYTHONPATH"
10041 (string-append (getcwd) "/build/lib:"
10042 (getenv "PYTHONPATH")))
10043 (invoke "py.test" "-vv" "tests" "README.rst"))))))
10044 (native-inputs
10045 `(("python-pytest" ,python-pytest)
10046 ("python-six" ,python-six)))
10047 (home-page "https://github.com/ionelmc/python-tblib")
10048 (synopsis "Traceback serialization library")
10049 (description
10050 "Traceback serialization allows you to:
10051
10052@enumerate
10053@item Pickle tracebacks and raise exceptions with pickled tracebacks in
10054different processes. This allows better error handling when running code over
10055multiple processes (imagine multiprocessing, billiard, futures, celery etc).
10056
10057@item Parse traceback strings and raise with the parsed tracebacks.
10058@end enumerate\n")
10059 (license license:bsd-3)))
10060
10061(define-public python2-tblib
10062 (package-with-python2 python-tblib))
10063
10064(define-public python-greenlet
10065 (package
10066 (name "python-greenlet")
10067 (version "0.4.15")
10068 (source (origin
10069 (method url-fetch)
10070 (uri (pypi-uri "greenlet" version))
10071 (sha256
10072 (base32
10073 "1g4g1wwc472ds89zmqlpyan3fbnzpa8qm48z3z1y6mlk44z485ll"))))
10074 (build-system python-build-system)
10075 (home-page "https://greenlet.readthedocs.io/")
10076 (synopsis "Lightweight in-process concurrent programming")
10077 (description
10078 "Greenlet package is a spin-off of Stackless, a version of CPython
10079that supports micro-threads called \"tasklets\". Tasklets run
10080pseudo-concurrently (typically in a single or a few OS-level threads) and
10081are synchronized with data exchanges on \"channels\".")
10082 (license (list license:psfl license:expat))))
10083
10084(define-public python2-greenlet
10085 (package-with-python2 python-greenlet))
10086
10087(define-public python-objgraph
10088 (package
10089 (name "python-objgraph")
10090 (version "3.4.0")
10091 (source
10092 (origin
10093 (method url-fetch)
10094 (uri (pypi-uri "objgraph" version))
10095 (sha256
10096 (base32
10097 "184m09am5gpbqfaiy7l0hwh476mczbrly1dffs0rw2p1d1i2q32a"))))
10098 (build-system python-build-system)
10099 (propagated-inputs
10100 `(("python-graphviz" ,python-graphviz)))
10101 (native-inputs
10102 `(("python-mock" ,python-mock)
10103 ("graphviz" ,graphviz)))
10104 (home-page "https://mg.pov.lt/objgraph/")
10105 (synopsis "Draw Python object reference graphs with graphviz")
10106 (description
10107 "This package provides tools to draw Python object reference graphs with
10108graphviz.")
10109 (license license:expat)))
10110
10111(define-public python-gevent
10112 (package
10113 (name "python-gevent")
10114 (version "1.3.7")
10115 (source (origin
10116 (method url-fetch)
10117 (uri (pypi-uri "gevent" version))
10118 (sha256
10119 (base32
10120 "0b0fr04qdk1p4sniv87fh8z5psac60x01pv054kpgi94520g81iz"))
10121 (modules '((guix build utils)))
10122 (snippet
10123 '(begin
10124 ;; unbunding libev and c-ares
10125 (delete-file-recursively "deps")
10126 #t))))
10127 (build-system python-build-system)
10128 (arguments
10129 `(#:modules ((ice-9 ftw)
10130 (ice-9 match)
10131 (srfi srfi-26)
10132 (guix build utils)
10133 (guix build python-build-system))
10134 #:phases (modify-phases %standard-phases
44d10b1f
RW
10135 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
10136 (lambda _
10137 (substitute* "src/gevent/subprocess.py"
10138 (("/bin/sh") (which "sh")))
10139 (for-each (lambda (file)
10140 (substitute* file
10141 (("/bin/sh") (which "sh"))
10142 (("/bin/true") (which "true"))))
10143 (find-files "src/greentest" "\\.py$"))
10144 #t))
10145 (add-before 'build 'do-not-use-bundled-sources
10146 (lambda* (#:key inputs #:allow-other-keys)
10147 (setenv "CONFIG_SHELL" (which "bash"))
10148 (setenv "LIBEV_EMBED" "false")
10149 (setenv "CARES_EMBED" "false")
10150 (setenv "EMBED" "false")
10151
b5b56b7f
MB
10152 ;; Prevent building bundled libev.
10153 (substitute* "setup.py"
10154 (("run_make=_BUILDING")
10155 "run_make=False"))
10156
44d10b1f
RW
10157 (let ((greenlet (string-append
10158 (assoc-ref inputs "python-greenlet")
10159 "/include")))
10160 (match (scandir greenlet
10161 (lambda (item)
10162 (string-prefix? "python" item)))
10163 ((python)
b5b56b7f 10164 (setenv "C_INCLUDE_PATH"
44d10b1f
RW
10165 (string-append greenlet "/" python)))))
10166 #t))
10167 (add-before 'check 'skip-timer-test
10168 (lambda _
10169 ;; XXX: Skip 'TestTimerResolution', which appears to be
10170 ;; unreliable.
10171 (substitute* "src/greentest/test__core_timer.py"
10172 (("not greentest.RUNNING_ON_CI") "False"))
10173 #t))
10174 (replace 'check
10175 (lambda _
10176 ;; Make sure the build directory is on PYTHONPATH.
10177 (setenv "PYTHONPATH"
10178 (string-append
10179 (getenv "PYTHONPATH") ":"
10180 (getcwd) "/build/"
10181 (car (scandir "build" (cut string-prefix? "lib." <>)))))
10182 (with-directory-excursion "src/greentest"
10183 ;; XXX: Many tests require network access. Instead we only
10184 ;; run known-good tests. Unfortunately we cannot use
10185 ;; recursion here since this directory also contains
10186 ;; Python-version-specific subfolders.
10187 (apply invoke "python" "testrunner.py" "--config"
10188 "known_failures.py"
10189 (scandir "." (cut regexp-exec
10190 (make-regexp "test_+(subprocess|core)")
10191 <>)))))))))
10192 (propagated-inputs
10193 `(("python-greenlet" ,python-greenlet)
10194 ("python-objgraph" ,python-objgraph)))
10195 (native-inputs
b5b56b7f 10196 `(("python-six" ,python-six)))
44d10b1f
RW
10197 (inputs
10198 `(("c-ares" ,c-ares)
10199 ("libev" ,libev)))
10200 (home-page "http://www.gevent.org/")
10201 (synopsis "Coroutine-based network library")
10202 (description
10203 "gevent is a coroutine-based Python networking library that uses greenlet
10204to provide a high-level synchronous API on top of the libev event loop.")
10205 (license license:expat)
10206 (properties `((python2-variant . ,(delay python2-gevent))))))
10207
10208(define-public python2-gevent
10209 (let ((base (package-with-python2
10210 (strip-python2-variant python-gevent))))
10211 (package
10212 (inherit base)
10213 (native-inputs `(,@(package-native-inputs python-gevent)
10214 ("python-mock" ,python2-mock))))))
10215
10216(define-public python-fastimport
10217 (package
10218 (name "python-fastimport")
10219 (version "0.9.6")
10220 (source
10221 (origin
10222 (method url-fetch)
10223 (uri (pypi-uri "fastimport" version))
10224 (sha256
10225 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
10226 (build-system python-build-system)
10227 (home-page "https://github.com/jelmer/python-fastimport")
10228 (synopsis "VCS fastimport parser and generator in Python")
10229 (description "This package provides a parser for and generator of the Git
10230@url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
10231format.")
10232 (license license:gpl2+)))
10233
10234(define-public python2-fastimport
10235 (package-with-python2 python-fastimport))
10236
10237(define-public python-twisted
10238 (package
10239 (name "python-twisted")
fdfad2fc 10240 (version "19.7.0")
44d10b1f
RW
10241 (source (origin
10242 (method url-fetch)
10243 (uri (pypi-uri "Twisted" version ".tar.bz2"))
10244 (sha256
10245 (base32
fdfad2fc 10246 "17d3hnxv9qndagzz63mdpyk99xj63p9gq586vjn0rxk8cl197nym"))))
44d10b1f
RW
10247 (build-system python-build-system)
10248 (arguments
0107c9b8 10249 '(#:tests? #f)) ; FIXME: some tests fail
44d10b1f
RW
10250 (propagated-inputs
10251 `(("python-zope-interface" ,python-zope-interface)
52ca1c4a 10252 ("python-pyhamcrest" ,python-pyhamcrest)
44d10b1f 10253 ("python-incremental" ,python-incremental)
e5ba2fe3 10254 ("python-hyperlink" ,python-hyperlink)
44d10b1f
RW
10255 ("python-constantly" ,python-constantly)
10256 ("python-automat" ,python-automat)))
10257 (home-page "https://twistedmatrix.com/")
10258 (synopsis "Asynchronous networking framework written in Python")
10259 (description
10260 "Twisted is an extensible framework for Python programming, with special
10261focus on event-based network programming and multiprotocol integration.")
10262 (license license:expat)))
10263
10264(define-public python2-twisted
10265 (package-with-python2 python-twisted))
10266
10267(define-public python-pika
10268 (package
10269 (name "python-pika")
10270 (version "0.12.0")
10271 (source
10272 (origin
10273 (method url-fetch)
10274 (uri (pypi-uri "pika" version))
10275 (sha256
10276 (base32
10277 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
10278 (build-system python-build-system)
10279 (native-inputs
10280 `(("python-pyev" ,python-pyev)
10281 ("python-tornado" ,python-tornado)
10282 ("python-twisted" ,python-twisted)))
10283 (home-page "https://pika.readthedocs.org")
10284 (synopsis "Pure Python AMQP Client Library")
10285 (description
10286 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
10287Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
10288network support library.")
10289 (license license:bsd-3)))
10290
10291(define-public python2-pika
10292 (package-with-python2 python-pika))
10293
10294(define-public python-ply
10295 (package
10296 (name "python-ply")
10297 (version "3.10")
10298 (source
10299 (origin
10300 (method url-fetch)
10301 (uri (pypi-uri "ply" version))
10302 (sha256
10303 (base32
10304 "1jxsr1d2f732r6ljhvm827113dckwl6qwakfvpbdhcbhvpvlmscn"))))
10305 (build-system python-build-system)
10306 (home-page "http://www.dabeaz.com/ply/")
10307 (synopsis "Python Lex & Yacc")
10308 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
10309It uses LR parsing and does extensive error checking.")
10310 (license license:bsd-3)))
10311
10312(define-public python2-ply
10313 (package-with-python2 python-ply))
10314
10315(define-public python-tabulate
10316 (package
10317 (name "python-tabulate")
10318 (version "0.7.7")
10319 (source (origin
10320 (method url-fetch)
10321 (uri (pypi-uri "tabulate" version))
10322 (sha256
10323 (base32
10324 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
10325 (build-system python-build-system)
10326 (arguments
10327 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
10328 ;; and the latest release is not tagged in the upstream repository.
10329 '(#:tests? #f))
10330 (home-page "https://bitbucket.org/astanin/python-tabulate")
10331 (synopsis "Pretty-print tabular data")
10332 (description
10333 "Tabulate is a library and command-line utility to pretty-print tabular
10334data in Python.")
10335 (license license:expat)))
10336
10337(define-public python2-tabulate
10338 (package-with-python2 python-tabulate))
10339
10340(define-public python-kazoo
10341 (package
10342 (name "python-kazoo")
10343 (version "2.4.0")
10344 (source
10345 (origin
10346 (method url-fetch)
10347 (uri (pypi-uri "kazoo" version))
10348 (sha256
10349 (base32
10350 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
10351 (build-system python-build-system)
10352 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
10353 (propagated-inputs
10354 `(("python-six" ,python-six)))
10355 (home-page "https://kazoo.readthedocs.org")
10356 (synopsis "High-level Zookeeper client library")
10357 (description
10358 "Kazoo is a Python client library for the Apache Zookeeper distributed
10359application service. It is designed to be easy to use and to avoid common
10360programming errors.")
10361 (license license:asl2.0)))
10362
10363(define-public python2-kazoo
10364 (package-with-python2 python-kazoo))
10365
10366(define-public python-pykafka
10367 (package
10368 (name "python-pykafka")
10369 (version "2.4.0")
10370 (source (origin
10371 (method url-fetch)
0ca1d040 10372 (uri (pypi-uri "pykafka" version))
44d10b1f
RW
10373 (sha256
10374 (base32
10375 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
10376 (build-system python-build-system)
10377 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
10378 (propagated-inputs
10379 `(("python-gevent" ,python-gevent)
10380 ("python-kazoo" ,python-kazoo)
10381 ("python-tabulate" ,python-tabulate)))
10382 (inputs
10383 `(("librdkafka" ,librdkafka)))
10384 (home-page "https://pykafka.readthedocs.io/")
10385 (synopsis "Apache Kafka client for Python")
10386 (description
10387 "PyKafka is a client for the Apache Kafka distributed messaging system.
10388It includes Python implementations of Kafka producers and consumers, which
10389are optionally backed by a C extension built on librdkafka.")
10390 (license license:asl2.0)))
10391
10392(define-public python2-pykafka
10393 (package-with-python2 python-pykafka))
10394
10395(define-public python-wcwidth
10396 (package
10397 (name "python-wcwidth")
10398 (version "0.1.7")
10399 (source
10400 (origin
10401 (method url-fetch)
10402 (uri (pypi-uri "wcwidth" version))
10403 (sha256
10404 (base32
10405 "0pn6dflzm609m4r3i8ik5ni9ijjbb5fa3vg1n7hn6vkd49r77wrx"))))
10406 (build-system python-build-system)
10407 (home-page "https://github.com/jquast/wcwidth")
10408 (synopsis "Measure number of terminal column cells of wide-character codes")
10409 (description "Wcwidth measures the number of terminal column cells of
10410wide-character codes. It is useful for those implementing a terminal emulator,
10411or programs that carefully produce output to be interpreted by one. It is a
10412Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
10413specified in POSIX.1-2001 and POSIX.1-2008.")
10414 (license license:expat)))
10415
10416(define-public python2-wcwidth
10417 (package-with-python2 python-wcwidth))
10418
10419(define-public python2-jsonrpclib
10420 (package
10421 (name "python2-jsonrpclib")
10422 (version "0.1.7")
10423 (source (origin
10424 (method url-fetch)
6571bba0 10425 (uri (pypi-uri "jsonrpclib" version))
44d10b1f
RW
10426 (sha256
10427 (base32
10428 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
10429 (build-system python-build-system)
10430 (arguments
10431 `(#:tests? #f
10432 #:python ,python-2))
10433 (home-page "https://github.com/joshmarshall/jsonrpclib/")
10434 (synopsis "Implementation of JSON-RPC specification for Python")
10435 (description
10436 "This library is an implementation of the JSON-RPC specification.
10437It supports both the original 1.0 specification, as well as the
10438new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
10439etc.")
10440 (license license:asl2.0)))
10441
10442(define-public python-chai
10443 (package
10444 (name "python-chai")
10445 (version "1.1.2")
10446 (source (origin
10447 (method url-fetch)
10448 (uri (pypi-uri "chai" version))
10449 (sha256
10450 (base32
10451 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
10452 (build-system python-build-system)
10453 (home-page "https://github.com/agoragames/chai")
10454 (synopsis "Mocking framework for Python")
10455 (description
10456 "Chai provides an api for mocking, stubbing and spying your python
10457objects, patterned after the Mocha library for Ruby.")
10458 (license license:bsd-3)))
10459
10460(define-public python2-chai
10461 (package-with-python2 python-chai))
10462
10463(define-public python-inflection
10464 (package
10465 (name "python-inflection")
10466 (version "0.3.1")
10467 (source
10468 (origin (method url-fetch)
10469 (uri (pypi-uri "inflection" version))
10470 (sha256
10471 (base32
10472 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
10473 (build-system python-build-system)
10474 (native-inputs
10475 `(("python-pytest" ,python-pytest)))
10476 (home-page "https://github.com/jpvanhal/inflection")
10477 (synopsis "Python string transformation library")
10478 (description
10479 "Inflection is a string transformation library. It singularizes
10480and pluralizes English words, and transforms strings from CamelCase to
10481underscored string.")
10482 (license license:expat)))
10483
10484(define-public python2-inflection
10485 (package-with-python2 python-inflection))
10486
10487(define-public python-pylev
10488 (package
10489 (name "python-pylev")
10490 (version "1.3.0")
10491 (source (origin
10492 (method url-fetch)
10493 (uri (pypi-uri "pylev" version))
10494 (sha256
10495 (base32
10496 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
10497 (build-system python-build-system)
10498 (home-page "https://github.com/toastdriven/pylev")
10499 (synopsis "Levenshtein distance implementation in Python")
10500 (description "Pure Python Levenshtein implementation, based off the
10501Wikipedia code samples at
10502@url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
10503 (license license:bsd-3)))
10504
10505(define-public python2-pylev
10506 (package-with-python2 python-pylev))
10507
10508(define-public python-cleo
10509 (package
10510 (name "python-cleo")
af2d3713 10511 (version "0.6.8")
44d10b1f
RW
10512 (source (origin
10513 (method url-fetch)
10514 (uri (pypi-uri "cleo" version))
10515 (sha256
10516 (base32
af2d3713 10517 "06zp695hq835rkaq6irr1ds1dp2qfzyf32v60vxpd8rcnxv319l5"))))
44d10b1f
RW
10518 (build-system python-build-system)
10519 (native-inputs
af2d3713 10520 `( ;; For testing
44d10b1f
RW
10521 ("python-mock" ,python-mock)
10522 ("python-pytest-mock" ,python-pytest-mock)
10523 ("python-pytest" ,python-pytest)))
10524 (propagated-inputs
10525 `(("python-backpack" ,python-backpack)
10526 ("python-pastel" ,python-pastel)
10527 ("python-pylev" ,python-pylev)))
10528 (home-page "https://github.com/sdispater/cleo")
10529 (synopsis "Command-line arguments library for Python")
10530 (description
10531 "Cleo allows you to create command-line commands with signature in
10532docstring and colored output.")
10533 (license license:expat)))
10534
10535(define-public python2-cleo
10536 (package-with-python2 python-cleo))
10537
2be85c45
TLC
10538(define-public python-tomlkit
10539 (package
10540 (name "python-tomlkit")
10541 (version "0.5.7")
10542 (source
10543 (origin
10544 (method url-fetch)
10545 (uri (pypi-uri "tomlkit" version))
10546 (sha256
10547 (base32
10548 "18820ga5z3if1w8dvykxrfm000akracq01ic402xrbljgbn5grn4"))))
10549 (build-system python-build-system)
10550 (native-inputs
10551 `(("python-pytest" ,python-pytest)))
10552 (home-page
10553 "https://github.com/sdispater/tomlkit")
10554 (synopsis "Style preserving TOML library")
10555 (description
10556 "TOML Kit is a 0.5.0-compliant TOML library. It includes a parser that
10557preserves all comments, indentations, whitespace and internal element ordering,
10558and makes them accessible and editable via an intuitive API. It can also
10559create new TOML documents from scratch using the provided helpers. Part of the
10560implementation as been adapted, improved and fixed from Molten.")
10561 (license license:expat)))
10562
0bb32201
TLC
10563(define-public python-shellingham
10564 (package
10565 (name "python-shellingham")
10566 (version "1.3.1")
10567 (source
10568 (origin
10569 (method url-fetch)
10570 (uri (pypi-uri "shellingham" version))
10571 (sha256
10572 (base32
10573 "1q7kws7w4x2hji3g7y0ni9ddk4sd676ylrb3db54gbpys6xj6nwq"))))
10574 (build-system python-build-system)
10575 (home-page
10576 "https://github.com/sarugaku/shellingham")
10577 (synopsis "Tool to detect surrounding shell")
10578 (description
10579 "Shellingham detects what shell the current Python executable is
10580running in.")
10581 (license license:isc)))
10582
aee92957
TLC
10583(define-public python-memcached
10584 (package
10585 (name "python-memcached")
10586 (version "1.59")
10587 (source
10588 (origin
10589 (method url-fetch)
10590 (uri (pypi-uri "python-memcached" version))
10591 (sha256
10592 (base32
10593 "0kvyapavbirk2x3n1jx4yb9nyigrj1s3x15nm3qhpvhkpqvqdqm2"))))
10594 (build-system python-build-system)
10595 (propagated-inputs `(("python-six" ,python-six)))
10596 (home-page
10597 "https://github.com/linsomniac/python-memcached")
10598 (synopsis "Pure python memcached client")
10599 (description
10600 "This software is a pure Python interface to the memcached memory cache
10601daemon. It is the client side software which allows storing values in one or
10602more, possibly remote, memcached servers.")
10603 (license license:psfl)))
10604
b2ac2508
TLC
10605(define-public python-clikit
10606 (package
10607 (name "python-clikit")
10608 (version "0.2.4")
10609 (source
10610 (origin
10611 (method url-fetch)
10612 (uri (pypi-uri "clikit" version))
10613 (sha256
10614 (base32
10615 "0dc8czib5f4j9px1ivcpqnmivnx2zjpc0xb00ldrhsqylks7r06n"))))
10616 (build-system python-build-system)
10617 (propagated-inputs
10618 `(("python-pastel" ,python-pastel)
10619 ("python-pylev" ,python-pylev)))
10620 (home-page "https://github.com/sdispater/clikit")
10621 (synopsis "Group of utilities to build command line interfaces")
10622 (description
10623 "CliKit is a group of utilities to build testable command line
10624interfaces.")
10625 (license license:expat)))
10626
c6f008d6
TLC
10627(define-public python-msgpack-python
10628 (package
10629 (name "python-msgpack-python")
10630 (version "0.5.6")
10631 (source
10632 (origin
10633 (method url-fetch)
10634 (uri (pypi-uri "msgpack-python" version))
10635 (sha256
10636 (base32
10637 "16wh8qgybmfh4pjp8vfv78mdlkxfmcasg78lzlnm6nslsfkci31p"))))
10638 (build-system python-build-system)
10639 (home-page "http://msgpack.org/")
10640 (synopsis "Package to deserialize messages in MessagePack binary format")
10641 (description
10642 "MessagePack is an efficient binary serialization format. It lets you
10643exchange data among multiple languages like JSON. But it's faster and
10644smaller. Small integers are encoded into a single byte, and typical short
10645strings require only one extra byte in addition to the strings themselves.")
10646 (license license:asl2.0)))
10647
badc1c63
TLC
10648(define-public python-cachy
10649 (package
10650 (name "python-cachy")
10651 (version "0.2.0")
10652 (source
10653 (origin
10654 (method url-fetch)
10655 (uri (pypi-uri "cachy" version))
10656 (sha256
10657 (base32
10658 "0v6mjyhgx6j7ya20bk69cr3gdzdkdf6psay0h090rscclgji65dp"))))
10659 (build-system python-build-system)
10660 (native-inputs
10661 `(("python-fakeredis" ,python-fakeredis)
10662 ("python-flexmock" ,python-flexmock)
10663 ("python-pytest" ,python-pytest)))
10664 (propagated-inputs
10665 `(("python-memcached" ,python-memcached)
10666 ("python-msgpack-python" ,python-msgpack-python)
10667 ("python-redis" ,python-redis)))
10668 (home-page "https://github.com/sdispater/cachy")
10669 (synopsis "Simple yet effective caching library")
10670 (description
10671 "Cachy provides a simple yet effective caching library. A simple but
10672powerful API: thread-safety; decorator syntax; support for memcached, redis,
10673database, file, dict stores. Cachy supports python versions 2.7+ and 3.2+.")
10674 (license license:expat)))
10675
617bb67b
TLC
10676(define-public poetry
10677 (package
10678 (name "poetry")
10679 (version "0.12.17")
10680 ;; Poetry can only be built from source with poetry.
10681 (source
10682 (origin
10683 (method url-fetch)
10684 (uri (pypi-uri "poetry" version))
10685 (sha256
10686 (base32
10687 "0gxwcd65qjmzqzppf53x51sic1rbcd9py6cdzx3aprppipimslvf"))))
10688 (build-system python-build-system)
10689 (arguments
10690 `(#:tests? #f ;; Pypi does not have tests.
10691 #:phases
10692 (modify-phases %standard-phases
10693 (replace 'build
10694 (lambda _
10695 ;; Bug in poetry https://github.com/sdispater/poetry/issues/866.
10696 (invoke "sed" "-i" "-e" "s/from distutils.core/from setuptools/"
10697 "setup.py")
10698 #t)))))
10699 (propagated-inputs
10700 `(("python-cachecontrol" ,python-cachecontrol)
10701 ("python-cachy" ,python-cachy)
10702 ("python-cleo" ,python-cleo)
10703 ("python-glob2" ,python-glob2)
10704 ("python-html5lib" ,python-html5lib)
10705 ("python-jsonschema" ,python-jsonschema)
10706 ("python-msgpack" ,python-msgpack)
10707 ("python-pathlib2" ,python-pathlib2)
10708 ("python-pkginfo" ,python-pkginfo)
10709 ("python-pyparsing" ,python-pyparsing)
10710 ("python-pyrsistent" ,python-pyrsistent)
10711 ("python-requests" ,python-requests)
10712 ("python-requests-toolbelt" ,python-requests-toolbelt)
10713 ("python-shellingham" ,python-shellingham)
10714 ("python-tomlkit" ,python-tomlkit)
10715 ("python-virtualenv" ,python-virtualenv)))
10716 (home-page "https://poetry.eustace.io/")
10717 (synopsis "Python dependency management and packaging made easy")
10718 (description "Poetry is a tool for dependency management and packaging
10719in Python. It allows you to declare the libraries your project depends on and
10720it will manage (install/update) them for you.")
10721 (license license:expat)))
10722
44d10b1f
RW
10723(define-public python-lazy-object-proxy
10724 (package
10725 (name "python-lazy-object-proxy")
7454078a 10726 (version "1.4.3")
44d10b1f
RW
10727 (source (origin
10728 (method url-fetch)
10729 (uri (pypi-uri "lazy-object-proxy" version))
10730 (sha256
10731 (base32
7454078a 10732 "1w1aaay424ciz8fz3fkzxb0pxzfxn184f2whpyn4fx72bn50x47k"))))
63d4873b
MO
10733 (native-inputs
10734 `(("python-setuptools-scm" ,python-setuptools-scm-3.3)))
44d10b1f
RW
10735 (build-system python-build-system)
10736 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
10737 (synopsis "Lazy object proxy for python")
10738 (description
10739 "Lazy object proxy is an object that wraps a callable but defers the call
10740until the object is actually required, and caches the result of said call.")
10741 (license license:bsd-2)))
10742
10743(define-public python2-lazy-object-proxy
10744 (package-with-python2 python-lazy-object-proxy))
10745
10746(define-public python-dnspython
10747 (package
10748 (name "python-dnspython")
10749 (version "1.15.0")
10750 (source (origin
10751 (method url-fetch)
10752 (uri (string-append "http://www.dnspython.org/kits/"
10753 version "/dnspython-" version ".tar.gz"))
10754 (sha256
10755 (base32
10756 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
10757 (build-system python-build-system)
10758 (arguments '(#:tests? #f)) ; XXX: requires internet access
10759 (home-page "http://www.dnspython.org")
10760 (synopsis "DNS toolkit for Python")
10761 (description
10762 "dnspython is a DNS toolkit for Python. It supports almost all record
10763types. It can be used for queries, zone transfers, and dynamic updates.
10764It supports TSIG authenticated messages and EDNS0.")
10765 (license license:expat)))
10766
10767(define-public python2-dnspython
10768 (package-with-python2 python-dnspython))
10769
10770(define-public python-email-validator
10771 (package
10772 (name "python-email-validator")
10773 (version "1.0.2")
10774 (source
10775 (origin (method url-fetch)
10776 (uri (pypi-uri "email_validator" version))
10777 (sha256
10778 (base32
10779 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
10780 (build-system python-build-system)
10781 (arguments
10782 '(#:phases
10783 (modify-phases %standard-phases
10784 (add-before 'build 'use-dnspython
10785 (lambda _
10786 (substitute* "setup.py"
10787 (("dnspython3") "dnspython"))
10788 #t)))))
10789 (propagated-inputs
10790 `(("python-dnspython" ,python-dnspython)
10791 ("python-idna" ,python-idna)))
10792 (home-page "https://github.com/JoshData/python-email-validator")
10793 (synopsis "Email address validation library for Python")
10794 (description
10795 "This library validates email address syntax and deliverability.")
10796 (license license:cc0)))
10797
10798(define-public python2-email-validator
10799 (package-with-python2 python-email-validator))
10800
10801(define-public python-ukpostcodeparser
10802 (package
10803 (name "python-ukpostcodeparser")
10804 (version "1.0.3")
10805 (source (origin
10806 (method url-fetch)
10807 (uri (pypi-uri "UkPostcodeParser" version))
10808 (sha256
10809 (base32
10810 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
10811 (build-system python-build-system)
10812 (home-page "https://github.com/hamstah/ukpostcodeparser")
10813 (synopsis "UK Postcode parser for Python")
10814 (description
10815 "This library provides the @code{parse_uk_postcode} function for
10816parsing UK postcodes.")
10817 (license license:expat)))
10818
10819(define-public python2-ukpostcodeparser
10820 (package-with-python2 python-ukpostcodeparser))
10821
10822(define-public python-faker
10823 (package
10824 (name "python-faker")
10825 (version "0.7.9")
10826 (source (origin
10827 (method url-fetch)
10828 (uri (pypi-uri "Faker" version))
10829 (sha256
10830 (base32
10831 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
10832 (patches
10833 (search-patches "python-faker-fix-build-32bit.patch"))
10834 (modules '((guix build utils)))
10835 (snippet
10836 '(begin
10837 (for-each delete-file (find-files "." "\\.pyc$"))
10838 #t))))
10839 (build-system python-build-system)
10840 (arguments
10841 '(#:phases
10842 (modify-phases %standard-phases
10843 (replace 'check
49ff8827 10844 (lambda _ (invoke "python" "-m" "unittest" "-v" "tests"))))))
44d10b1f
RW
10845 (native-inputs
10846 `(;; For testing
10847 ("python-email-validator" ,python-email-validator)
10848 ("python-mock" ,python-mock)
10849 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
10850 (propagated-inputs
10851 `(("python-dateutil" ,python-dateutil)
10852 ("python-six" ,python-six)))
10853 (home-page "https://github.com/joke2k/faker")
10854 (synopsis "Python package that generates fake data")
10855 (description
10856 "Faker is a Python package that generates fake data such as names,
10857addresses, and phone numbers.")
10858 (license license:expat)
10859 (properties `((python2-variant . ,(delay python2-faker))))))
10860
10861(define-public python2-faker
10862 (let ((base (package-with-python2 (strip-python2-variant
10863 python-faker))))
10864 (package
10865 (inherit base)
10866 (propagated-inputs
10867 `(("python2-ipaddress" ,python2-ipaddress)
10868 ,@(package-propagated-inputs base))))))
10869
10870(define-public python-pyaml
10871 (package
10872 (name "python-pyaml")
10873 (version "18.11.0")
10874 (source (origin
10875 (method url-fetch)
10876 (uri (pypi-uri "pyaml" version))
10877 (sha256
10878 (base32
10879 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
10880 (build-system python-build-system)
10881 (native-inputs
10882 `(("python-unidecode" ,python-unidecode)))
10883 (propagated-inputs
10884 `(("python-pyyaml" ,python-pyyaml)))
10885 (home-page "https://github.com/mk-fg/pretty-yaml")
10886 (synopsis "YAML pretty-print library for Python")
10887 (description
10888 "pyaml is a PyYAML based python module to produce pretty and readable
10889YAML-serialized data.")
492e3a7a 10890 (license license:wtfpl2)))
44d10b1f
RW
10891
10892(define-public python2-pyaml
10893 (package-with-python2 python-pyaml))
10894
10895(define-public python-backpack
10896 (package
10897 (name "python-backpack")
10898 (version "0.1")
10899 (source
10900 (origin
10901 (method url-fetch)
10902 (uri (pypi-uri "backpack" version))
10903 (sha256
10904 (base32
10905 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
10906 (build-system python-build-system)
10907 (native-inputs
10908 `(("python-pytest" ,python-pytest)
10909 ("python-nose" ,python-nose)))
10910 (propagated-inputs
10911 `(("python-simplejson" ,python-simplejson)))
10912 (home-page "https://github.com/sdispater/backpack")
10913 (synopsis "Utilities for working with Python collections")
10914 (description "Backpack provides some useful utilities for working with
10915collections of data.")
10916 (license license:expat)))
10917
10918(define-public python2-backpack
10919 (package-with-python2 python-backpack))
10920
10921(define-public python-prompt-toolkit
10922 (package
10923 (name "python-prompt-toolkit")
10924 (version "2.0.7")
10925 (source
10926 (origin
10927 (method url-fetch)
10928 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10929 (sha256
10930 (base32
10931 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
10932 (build-system python-build-system)
10933 (arguments
10934 `(#:phases
10935 (modify-phases %standard-phases
10936 (delete 'check)
10937 (add-after 'install 'post-install-check
10938 (lambda* (#:key inputs outputs #:allow-other-keys)
10939 ;; HOME is needed for the test
10940 ;; "test_pathcompleter_can_expanduser".
10941 (setenv "HOME" "/tmp")
10942 (add-installed-pythonpath inputs outputs)
10943 (invoke "py.test"))))))
10944 (propagated-inputs
10945 `(("python-wcwidth" ,python-wcwidth)
10946 ("python-six" ,python-six)
10947 ("python-pygments" ,python-pygments)))
10948 (native-inputs
10949 `(("python-pytest" ,python-pytest)))
10950 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
10951 (synopsis "Library for building command line interfaces in Python")
10952 (description
10953 "Prompt-Toolkit is a library for building interactive command line
10954interfaces in Python. It's like GNU Readline but it also features syntax
10955highlighting while typing, out-of-the-box multi-line input editing, advanced
10956code completion, incremental search, support for Chinese double-width
10957characters, mouse support, and auto suggestions.")
10958 (license license:bsd-3)))
10959
10960(define-public python2-prompt-toolkit
10961 (package-with-python2 python-prompt-toolkit))
10962
10963(define-public python-prompt-toolkit-1
10964 (package (inherit python-prompt-toolkit)
10965 (version "1.0.15")
10966 (source
10967 (origin
10968 (method url-fetch)
10969 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10970 (sha256
10971 (base32
10972 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
10973
10974(define-public python2-prompt-toolkit-1
10975 (package-with-python2 python-prompt-toolkit-1))
10976
10977(define-public python-jedi
10978 (package
10979 (name "python-jedi")
296e1aea 10980 (version "0.15.1")
44d10b1f
RW
10981 (source
10982 (origin
10983 (method url-fetch)
10984 (uri (pypi-uri "jedi" version))
10985 (sha256
10986 (base32
296e1aea 10987 "0bp4pxhsynaarbvzblsn5x32lzp29svy3sxfy8i6m5iwz9s9r1ds"))))
44d10b1f
RW
10988 (build-system python-build-system)
10989 (arguments
296e1aea 10990 `(#:phases
44d10b1f 10991 (modify-phases %standard-phases
296e1aea
MC
10992 (add-after 'unpack 'disable-file-completion-test
10993 ;; A single parameterized test currently fail (see:
10994 ;; https://github.com/davidhalter/jedi/issues/1395). Remove it.
10995 (lambda _
10996 (substitute* "test/test_api/test_completion.py"
10997 ((".*'example.py', 'rb\"' \\+ join\\('\\.\\.'.*") ""))
10998 #t))
44d10b1f 10999 (replace 'check
296e1aea
MC
11000 (lambda _
11001 (setenv "HOME" "/tmp")
11002 (invoke "python" "-m" "pytest"))))))
44d10b1f
RW
11003 (native-inputs
11004 `(("python-pytest" ,python-pytest)
11005 ("python-docopt" ,python-docopt)))
11006 (propagated-inputs
11007 `(("python-parso" ,python-parso)))
11008 (home-page "https://github.com/davidhalter/jedi")
11009 (synopsis "Autocompletion and static analysis library for Python")
11010 (description
11011 "Jedi is a static analysis tool for Python that can be used in Integrated
11012Development Environments (@dfn{IDE}s) and text editors. It understands Python
11013on a deeper level than many other static analysis frameworks for Python.
11014
11015Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
11016well.")
11017 (license license:expat)))
11018
11019(define-public python2-jedi
296e1aea 11020 (package-with-python2 python-jedi))
44d10b1f
RW
11021
11022(define-public ptpython
11023 (package
11024 (name "ptpython")
11025 (version "0.34")
11026 (source (origin
11027 (method url-fetch)
11028 (uri (pypi-uri "ptpython" version))
11029 (sha256
11030 (base32
11031 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
11032 (build-system python-build-system)
11033 (arguments
11034 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
11035 (propagated-inputs
11036 `(("python-docopt" ,python-docopt)
11037 ("python-jedi" ,python-jedi)
11038 ("python-prompt-toolkit" ,python-prompt-toolkit)
11039 ("python-pygments" ,python-pygments)))
11040 (home-page "https://github.com/jonathanslenders/ptpython")
11041 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
11042 (description
11043 "ptpython is a Python read-eval-print loop with IDE-like features.
11044It supports syntax highlighting, multiline editing, autocompletion, mouse,
11045color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
11046etc.")
11047 (license license:bsd-3)
11048 (properties `((python2-variant . ,(delay ptpython-2))))))
11049
11050(define-public ptpython-2
11051 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
11052 (package
11053 (inherit base)
11054 (name "ptpython2"))))
11055
11056(define-public python-stem
11057 (package
11058 (name "python-stem")
e746d1c3 11059 (version "1.7.1")
44d10b1f
RW
11060 (source
11061 (origin
11062 (method url-fetch)
11063 (uri (pypi-uri "stem" version))
11064 (sha256
11065 (base32
e746d1c3 11066 "18lc95pmc7i089nlsb06dsxyjl5wbhxfqgdxbjcia35ndh8z7sn9"))))
44d10b1f
RW
11067 (build-system python-build-system)
11068 (arguments
11069 `(#:phases
11070 (modify-phases %standard-phases
11071 (replace 'check
11072 (lambda _
11073 (invoke "./run_tests.py" "--unit")
11074 #t)))))
11075 (native-inputs
11076 `(("python-mock" ,python-mock)
11077 ("python-pycodestyle" ,python-pycodestyle)
11078 ("python-pyflakes" ,python-pyflakes)))
11079 (home-page "https://stem.torproject.org/")
11080 (synopsis
11081 "Python controller library that allows applications to interact with Tor")
11082 (description
11083 "Stem is a Python controller library for Tor. With it you can use Tor's
11084control protocol to script against the Tor process and read descriptor data
11085relays publish about themselves.")
11086 (license license:lgpl3)))
11087
11088(define-public python2-stem
11089 (package-with-python2 python-stem))
11090
11091(define-public python-pyserial
11092 (package
11093 (name "python-pyserial")
11094 (version "3.1.1")
11095 (source
11096 (origin
11097 (method url-fetch)
11098 (uri (pypi-uri "pyserial" version))
11099 (sha256
11100 (base32
11101 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
11102 (build-system python-build-system)
11103 (arguments
11104 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
11105 ;; #:phases
11106 ;; (modify-phases %standard-phases
11107 ;; (replace 'check
11108 ;; (lambda _
11109 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
11110 (home-page
11111 "https://github.com/pyserial/pyserial")
11112 (synopsis "Python Serial Port Bindings")
11113 (description "@code{pyserial} provide serial port bindings for Python. It
11114supports different byte sizes, stop bits, parity and flow control with RTS/CTS
11115and/or Xon/Xoff. The port is accessed in RAW mode.")
11116 (license license:bsd-3)))
11117
11118(define-public python2-pyserial
11119 (package-with-python2 python-pyserial))
11120
11121(define-public python-kivy
11122 (package
11123 (name "python-kivy")
11124 (version "1.10.1")
11125 (source
11126 (origin
11127 (method url-fetch)
11128 (uri (pypi-uri "Kivy" version))
11129 (file-name (string-append name "-" version ".tar.gz"))
11130 (sha256
11131 (base32
11132 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
11133 (build-system python-build-system)
11134 (arguments
11135 `(#:tests? #f ; Tests require many optional packages
11136 #:phases
11137 (modify-phases %standard-phases
11138 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
11139 (lambda* (#:key inputs #:allow-other-keys)
11140 (setenv "KIVY_SDL2_PATH"
11141 (string-append (assoc-ref inputs "sdl-union")
11142 "/include/SDL2"))
11143 #t)))))
11144 (native-inputs
11145 `(("git" ,git)
11146 ("pkg-config" ,pkg-config)
11147 ("python-cython" ,python-cython)))
11148 (inputs
11149 `(("gstreamer" ,gstreamer)
11150 ("mesa" ,mesa)
11151 ("sdl-union"
11152 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
11153 (home-page "http://kivy.org")
11154 (synopsis
11155 "Multitouch application framework")
11156 (description
11157 "A software library for rapid development of
11158hardware-accelerated multitouch applications.")
11159 (license license:expat)))
11160
11161(define-public python2-kivy
11162 (package-with-python2 python-kivy))
11163
11164(define-public python-kivy-next
11165 (deprecated-package "python-kivy-next" python-kivy))
11166
11167(define-public python2-kivy-next
11168 (deprecated-package "python2-kivy-next" python2-kivy))
11169
11170(define-public python-binaryornot
11171 (package
11172 (name "python-binaryornot")
11173 (version "0.4.4")
11174 (source (origin
11175 (method url-fetch)
11176 (uri (pypi-uri "binaryornot" version))
11177 (sha256
11178 (base32
11179 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
11180 (build-system python-build-system)
86723f98
DM
11181 (arguments
11182 `(#:phases
11183 (modify-phases %standard-phases
ee623903 11184 (add-after 'unpack 'patch-tests
86723f98
DM
11185 (lambda _
11186 ;; TypeError: binary() got an unexpected keyword argument
11187 ;; 'average_size'.
11188 (substitute* "tests/test_check.py"
11189 (("average_size=512") ""))
11190 #t)))))
44d10b1f
RW
11191 (propagated-inputs
11192 `(("python-chardet" ,python-chardet)
11193 ("python-hypothesis" ,python-hypothesis)))
11194 (home-page "https://github.com/audreyr/binaryornot")
11195 (synopsis "Package to check if a file is binary or text")
11196 (description "Ultra-lightweight pure Python package to check if a file is
11197binary or text.")
11198 (license license:bsd-3)
11199 (properties `((python2-variant . ,(delay python2-binaryornot))))))
11200
11201(define-public python2-binaryornot
11202 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
11203 (package (inherit base)
11204 (propagated-inputs
11205 `(("python2-enum34" ,python2-enum34)
11206 ,@(package-propagated-inputs base))))))
11207
f315673d
VC
11208(define-public python-binwalk
11209 (let ((commit "64201acfb5b0a9cdd9faa58c40a36dcff8612e29")
11210 (revision "0"))
11211 (package
11212 (name "python-binwalk")
11213 (version (git-version "2.1.1" revision commit))
11214 (source
11215 (origin
11216 (method git-fetch)
11217 (uri (git-reference
11218 (url "https://github.com/ReFirmLabs/binwalk")
11219 (commit commit)))
11220 (file-name (git-file-name name version))
11221 (sha256
11222 (base32
11223 "1z7ca6rfp887hw5jc3sb45mm4fa0xid4lsp2z8g4r590dr7k7w15"))))
11224 (build-system python-build-system)
11225 (arguments
11226 `(#:phases
11227 (modify-phases %standard-phases
11228 (add-before 'check 'set-pythonpath
11229 (lambda _
11230 (setenv "PYTHONPATH"
11231 (string-append
11232 (getcwd) "/src/"
11233 ":" (getenv "PYTHONPATH")))
11234 (setenv "HOME" "")
11235 #t)))))
11236 (native-inputs
11237 `(("python-coverage" ,python-coverage)
11238 ("python-nose" ,python-nose)))
11239 (home-page "https://github.com/ReFirmLabs/binwalk")
11240 (synopsis "Firmware analysis tool")
11241 (description "Binwalk is a tool for analyzing, reverse engineering, and extracting firmware images")
11242 (license license:expat))))
11243
44d10b1f
RW
11244(define-public python-nltk
11245 (package
11246 (name "python-nltk")
11247 (version "3.2.1")
11248 (source (origin
11249 (method url-fetch)
11250 (uri (pypi-uri "nltk" version))
11251 (sha256
11252 (base32
11253 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
11254 (build-system python-build-system)
11255 (arguments
11256 '(;; The tests require some extra resources to be downloaded.
11257 ;; TODO Try packaging these resources.
11258 #:tests? #f))
11259 (home-page "http://nltk.org/")
11260 (synopsis "Natural Language Toolkit")
11261 (description "It provides interfaces to over 50 corpora and lexical
11262resources such as WordNet, along with a suite of text processing libraries
11263for classification, tokenization, stemming, tagging, parsing, and semantic
11264reasoning, wrappers for natural language processing libraries.")
11265 (license license:asl2.0)))
11266
11267(define-public python2-nltk
11268 (package-with-python2 python-nltk))
11269
11270(define-public python-pymongo
11271 (package
11272 (name "python-pymongo")
11273 (version "3.7.2")
11274 (source (origin
11275 (method url-fetch)
11276 (uri (pypi-uri "pymongo" version))
11277 (sha256
11278 (base32
11279 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
11280 (build-system python-build-system)
11281 (propagated-inputs
11282 `(("python-certifi" ,python-certifi)))
11283 (home-page "https://github.com/mongodb/mongo-python-driver")
11284 (synopsis "Python driver for MongoDB")
11285 (description "Python driver for MongoDB.")
11286 (license license:asl2.0)))
11287
11288(define-public python2-pymongo
11289 (package-with-python2 python-pymongo))
11290
44d10b1f
RW
11291(define-public python-consul
11292 (package
11293 (name "python-consul")
11294 (version "0.6.1")
11295 (source
11296 (origin
11297 (method url-fetch)
11298 (uri (pypi-uri "python-consul" version))
11299 (sha256
11300 (base32
11301 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
11302 (build-system python-build-system)
11303 (arguments
11304 '(#:tests? #f)) ; The tests are not distributed
11305 (propagated-inputs
11306 `(("python-requests" ,python-requests)
11307 ("python-six" ,python-six)))
11308 (home-page "https://github.com/cablehead/python-consul")
11309 (synopsis "Python client for Consul")
11310 (description
11311 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
11312discovery, monitoring and configuration.")
11313 (license license:expat)))
11314
11315(define-public python2-consul
11316 (package-with-python2 python-consul))
11317
11318(define-public python-schematics
11319 (package
11320 (name "python-schematics")
11321 (version "1.1.1")
11322 (source
1961d187
TGR
11323 (origin
11324 (method git-fetch)
11325 (uri (git-reference
11326 (url "https://github.com/schematics/schematics.git")
11327 (commit (string-append "v" version))))
11328 (file-name (git-file-name name version))
11329 (sha256
11330 (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd"))))
44d10b1f
RW
11331 (build-system python-build-system)
11332 (propagated-inputs
11333 `(("python-six" ,python-six)))
11334 (arguments
1961d187
TGR
11335 ;; The tests require a bunch of not very nice packages with fixed
11336 ;; version requirements (e.g. python-coveralls).
11337 `(#:tests? #f))
44d10b1f
RW
11338 (home-page "https://github.com/schematics/schematics")
11339 (synopsis "Python Data Structures for Humans")
11340 (description "Python Data Structures for Humans.")
11341 (license license:bsd-3)))
11342
11343(define-public python2-schematics
11344 (package-with-python2 python-schematics))
11345
11346(define-public python-odfpy
11347 (package
11348 (name "python-odfpy")
11349 (version "1.3.3")
11350 (source (origin
11351 (method url-fetch)
11352 (uri (pypi-uri "odfpy" version))
11353 (sha256
11354 (base32
11355 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
11356 (arguments
11357 `(#:modules ((srfi srfi-1)
11358 (guix build python-build-system)
11359 (guix build utils))
11360 #:phases
11361 (modify-phases %standard-phases
11362 (replace 'check
11363 ;; The test runner invokes python2 and python3 for test*.py.
11364 ;; To avoid having both in inputs, we replicate it here.
11365 (lambda _
21ccc01d
RW
11366 (for-each (lambda (test-file) (invoke "python" test-file))
11367 (find-files "tests" "^test.*\\.py$"))
11368 #t)))))
44d10b1f
RW
11369 (build-system python-build-system)
11370 (home-page "https://github.com/eea/odfpy")
11371 (synopsis "Python API and tools to manipulate OpenDocument files")
11372 (description "Collection of libraries and utility programs written in
11373Python to manipulate OpenDocument 1.2 files.")
11374 (license
11375 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
11376 ;; number of files with other licenses.
11377 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
11378
11379(define-public python2-odfpy
11380 (package-with-python2 python-odfpy))
11381
11382(define-public python-natsort
11383 (package
11384 (name "python-natsort")
11385 (version "5.4.1")
11386 (source (origin
11387 (method url-fetch)
11388 (uri (pypi-uri "natsort" version))
11389 (sha256
11390 (base32
11391 "0i732amg6yzkx4g4c9j09jmqq39q377x9cl2nbkm5hax2c2v0wxf"))))
11392 (build-system python-build-system)
11393 (arguments
11394 `(#:modules ((guix build utils)
11395 (guix build python-build-system)
11396 (srfi srfi-1)
11397 (srfi srfi-26)
11398 (ice-9 ftw))
11399 #:phases
11400 (modify-phases %standard-phases
11401 (add-before 'check 'set-cachedir
11402 ;; Tests require write access to $HOME by default
11403 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
11404 (replace 'check
11405 (lambda _
11406 (let ((cwd (getcwd)))
11407 (setenv "PYTHONPATH"
11408 (string-append
11409 cwd "/build/"
11410 (find (cut string-prefix? "lib" <>)
11411 (scandir (string-append cwd "/build")))
11412 ":"
11413 (getenv "PYTHONPATH")))
11414 (invoke "pytest" "-v")))))))
11415 (native-inputs
11416 `(("python-hypothesis" ,python-hypothesis)
11417 ("python-pytest-cov" ,python-pytest-cov)
11418 ("python-pytest-mock" ,python-pytest-mock)
11419 ("python-pytest" ,python-pytest)))
11420 (propagated-inputs ; TODO: Add python-fastnumbers.
11421 `(("python-pyicu" ,python-pyicu)))
11422 (home-page "https://github.com/SethMMorton/natsort")
11423 (synopsis "Natural sorting for python and shell")
11424 (description
11425 "Natsort lets you apply natural sorting on lists instead of
11426lexicographical. If you use the built-in @code{sorted} method in python
36a4366d
EF
11427on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4},
11428@code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20},
11429@code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that
11430identifies numbers and sorts them separately from strings. It can also sort
11431version numbers, real numbers, mixed types and more, and comes with a shell
11432command @command{natsort} that exposes this functionality in the command line.")
44d10b1f
RW
11433 (license license:expat)
11434 (properties `((python2-variant . ,(delay python2-natsort))))))
11435
11436(define-public python2-natsort
11437 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
11438 (package (inherit base)
11439 (native-inputs
11440 `(("python2-pathlib" ,python2-pathlib)
11441 ,@(package-native-inputs base))))))
11442
11443(define-public python-glances
11444 (package
11445 (name "python-glances")
9898a2d3 11446 (version "3.1.1")
44d10b1f
RW
11447 (source
11448 (origin
11449 (method url-fetch)
11450 (uri (pypi-uri "Glances" version))
11451 (sha256
11452 (base32
15b4c911
TGR
11453 "07j1ggzsqiskyz1i4mrnyr9i95v0dqi0i0hibnv1l188km8shmi8"))
11454 (modules '((guix build utils)))
11455 (snippet
11456 '(begin
11457 ;; Glances phones PyPI for weekly update checks by default.
11458 ;; Disable these. The user can re-enable them if desired.
11459 (substitute* "glances/outdated.py"
11460 (("^(.*)self\\.load_config\\(config\\)\n" line indentation)
11461 (string-append indentation
11462 "self.args.disable_check_update = True\n"
11463 line)))
11464 #t))))
44d10b1f
RW
11465 (build-system python-build-system)
11466 (propagated-inputs
9898a2d3
TGR
11467 `(("python-future" ,python-future)
11468 ("python-psutil" ,python-psutil)))
44d10b1f
RW
11469 (home-page
11470 "https://github.com/nicolargo/glances")
bab94ffa 11471 (synopsis "Cross-platform curses-based monitoring tool")
44d10b1f
RW
11472 (description
11473 "Glances is a curses-based monitoring tool for a wide variety of platforms.
bab94ffa
TGR
11474Glances uses the PsUtil library to get information from your system. It
11475monitors CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
44d10b1f
RW
11476 (license license:lgpl3+)))
11477
11478(define-public python2-glances
11479 (package-with-python2 python-glances))
11480
11481(define-public python-graphql-core
11482 (package
11483 (name "python-graphql-core")
11484 (version "0.5.3")
11485 (source
11486 (origin
11487 (method url-fetch)
11488 (uri (pypi-uri "graphql-core" version))
11489 (sha256
11490 (base32
11491 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
11492 (build-system python-build-system)
11493 (arguments
11494 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
11495 #:phases
11496 (modify-phases %standard-phases
11497 (add-after 'unpack 'patch-hardcoded-version
11498 (lambda _ (substitute*
11499 "setup.py"
11500 (("'gevent==1.1rc1'") "'gevent'"))
11501 #t)))))
11502 (native-inputs
11503 `(("python-gevent" ,python-gevent)
11504 ("python-mock" ,python-mock)
11505 ("python-pytest-mock" ,python-pytest-mock)))
11506 (propagated-inputs
11507 `(("python-promise" ,python-promise)
11508 ("python-six" ,python-six)))
11509 (home-page "https://github.com/graphql-python/graphql-core")
11510 (synopsis "GraphQL implementation for Python")
11511 (description
11512 "GraphQL implementation for Python. GraphQL is a data query language and
11513runtime designed and used to request and deliver data to mobile and web apps.
11514This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
11515to Python.")
11516 (license license:expat)))
11517
11518(define-public python2-graphql-core
11519 (package-with-python2 python-graphql-core))
11520
11521(define-public python-graphql-relay
11522 (package
11523 (name "python-graphql-relay")
11524 (version "0.4.5")
11525 (source
11526 (origin
11527 (method url-fetch)
11528 (uri (pypi-uri "graphql-relay" version))
11529 (sha256
11530 (base32
11531 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
11532 (build-system python-build-system)
11533 (arguments
11534 '(#:tests? #f)) ; The tests are not distributed
11535 (propagated-inputs
11536 `(("python-graphql-core" ,python-graphql-core)
11537 ("python-promise" ,python-promise)
11538 ("python-six" ,python-six)))
11539 (home-page "https://github.com/graphql-python/graphql-relay-py")
11540 (synopsis "Relay implementation for Python")
11541 (description
11542 "This is a library to allow the easy creation of Relay-compliant servers
11543using the GraphQL Python reference implementation of a GraphQL server. It
11544should be noted that the code is a exact port of the original
11545@url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
11546from Facebook.")
11547 (license license:expat)))
11548
11549(define-public python2-graphql-relay
11550 (package-with-python2 python-graphql-relay))
11551
11552(define-public python-graphene
11553 (package
11554 (name "python-graphene")
11555 (version "0.10.2")
11556 (source
11557 (origin
11558 (method url-fetch)
11559 (uri (pypi-uri "graphene" version))
11560 (sha256
11561 (base32
11562 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
11563 (build-system python-build-system)
11564 (propagated-inputs
11565 `(("python-graphql-core" ,python-graphql-core)
11566 ("python-graphql-relay" ,python-graphql-relay)
11567 ("python-iso8601" ,python-iso8601)
11568 ("python-promise" ,python-promise)
11569 ("python-six" ,python-six)))
11570 (arguments
11571 `(#:tests? #f)) ; no tests/ in the PyPI tarball
11572 (home-page "http://graphene-python.org/")
11573 (synopsis "GraphQL Framework for Python")
11574 (description
11575 "Graphene is a Python library for building GraphQL schemas/types.
11576A GraphQL schema describes your data model, and provides a GraphQL server
11577with an associated set of resolve methods that know how to fetch data.")
11578 (properties `((python2-variant . ,(delay python2-graphene))))
11579 (license license:expat)))
11580
11581(define-public python2-graphene
11582 (let ((base (package-with-python2
11583 (strip-python2-variant python-graphene))))
11584 (package (inherit base)
11585 (native-inputs
11586 `(("python2-sqlalchemy" ,python2-sqlalchemy)
11587 ,@(package-native-inputs base))))))
11588
11589(define-public python-nautilus
11590 (package
11591 (name "python-nautilus")
11592 (version "0.4.9")
11593 (source
11594 (origin
11595 (method url-fetch)
11596 (uri (pypi-uri "nautilus" version))
11597 (sha256
11598 (base32
11599 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
11600 (build-system python-build-system)
11601 (arguments `(#:tests? #f)) ; fails to import test modules
11602 (propagated-inputs
11603 `(("python-bcrypt" ,python-bcrypt)
11604 ("python-click" ,python-click)
11605 ("python-consul" ,python-consul)
11606 ("python-graphene" ,python-graphene)
11607 ("python-jinja2" ,python-jinja2)
11608 ("python-peewee" ,python-peewee)
11609 ("python-pika" ,python-pika)
11610 ("python-tornado" ,python-tornado)
11611 ("python-wtforms" ,python-wtforms)))
11612 (native-inputs
11613 `(("python-nose2" ,python-nose2)))
11614 (home-page "https://github.com/AlecAivazis/nautilus")
11615 (synopsis "Library for creating microservice applications")
11616 (description
11617 "Nautilus is a framework for flux based microservices that looks to
11618provide extendible implementations of common aspects of a cloud so that you can
11619focus on building massively scalable web applications.")
11620 (license license:expat)))
11621
11622(define-public python-snowballstemmer
11623 (package
11624 (name "python-snowballstemmer")
11625 (version "1.2.1")
11626 (source (origin
11627 (method url-fetch)
11628 (uri (pypi-uri "snowballstemmer" version))
11629 (sha256
11630 (base32
11631 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
11632 (build-system python-build-system)
11633 (arguments
11634 `(;; No tests exist
11635 #:tests? #f))
11636 (home-page "https://github.com/shibukawa/snowball_py")
11637 (synopsis "Snowball stemming library collection for Python")
11638 (description "This package provides 16 word stemmer algorithms generated
11639from Snowball algorithms. It includes the 15 original ones plus the Poerter
11640English stemmer.")
11641 (license license:bsd-3)))
11642
11643(define-public python2-snowballstemmer
11644 (package-with-python2 python-snowballstemmer))
11645
44d10b1f
RW
11646(define-public python-setproctitle
11647(package
11648 (name "python-setproctitle")
11649 (version "1.1.10")
11650 (source
11651 (origin
11652 (method url-fetch)
11653 (uri (pypi-uri "setproctitle" version))
11654 (sha256
11655 (base32
11656 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
11657 (build-system python-build-system)
11658 (arguments
11659 '(#:phases
11660 (modify-phases %standard-phases
11661 (add-before 'check 'patch-Makefile
11662 ;; Stricly this is only required for the python2 variant.
11663 ;; But adding a phase in an inherited package seems to be
11664 ;; cumbersum. So we patch even for python3.
11665 (lambda _
11666 (let ((nose (assoc-ref %build-inputs "python2-nose")))
11667 (when nose
11668 (substitute* "Makefile"
11669 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
11670 (string-append nose "/bin/nosetests "))))
11671 #t)))
11672 (replace 'check
11673 (lambda _
11674 (setenv "PYTHON" (or (which "python3") (which "python")))
11675 (setenv "PYCONFIG" (or (which "python3-config")
11676 (which "python-config")))
11677 (setenv "CC" "gcc")
11678 ;; No need to extend PYTHONPATH to find the built package, since
11679 ;; the Makefile will build anyway
11680 (invoke "make" "check"))))))
11681 (native-inputs
11682 `(("procps" ,procps))) ; required for tests
11683 (home-page
11684 "https://github.com/dvarrazzo/py-setproctitle")
11685 (synopsis
11686 "Setproctitle implementation for Python to customize the process title")
11687 (description "The library allows a process to change its title (as displayed
11688by system tools such as ps and top).
11689
11690Changing the title is mostly useful in multi-process systems, for
11691example when a master process is forked: changing the children's title
11692allows to identify the task each process is busy with. The technique
11693is used by PostgreSQL and the OpenSSH Server for example.")
11694 (license license:bsd-3)
11695 (properties `((python2-variant . ,(delay python2-setproctitle))))))
11696
11697(define-public python2-setproctitle
11698 (let ((base (package-with-python2
11699 (strip-python2-variant python-setproctitle))))
11700 (package
11701 (inherit base)
11702 (native-inputs `(("python2-nose" ,python2-nose)
11703 ,@(package-native-inputs base))))))
11704
11705(define-public python-validictory
11706 (package
11707 (name "python-validictory")
11708 (version "1.0.1")
11709 (source
11710 (origin
11711 (method url-fetch)
11712 (uri (pypi-uri "validictory" version))
11713 (sha256
11714 (base32
11715 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
11716 (build-system python-build-system)
11717 (arguments
11718 '(#:phases
11719 (modify-phases %standard-phases
11720 (add-after 'unpack 'bootstrap
11721 ;; Move the tests out of the package directory to avoid
11722 ;; packaging them.
11723 (lambda* _
11724 (rename-file "validictory/tests" "tests")
11725 (delete-file "tests/__init__.py")))
11726 (replace 'check
11727 (lambda _
11728 ;; Extend PYTHONPATH so the built package will be found.
11729 (setenv "PYTHONPATH"
11730 (string-append (getcwd) "/build/lib:"
11731 (getenv "PYTHONPATH")))
6568bd5d 11732 (invoke "py.test" "-vv" ))))))
44d10b1f
RW
11733 (native-inputs
11734 `(("python-pytest" ,python-pytest)))
11735 (home-page
11736 "https://github.com/jamesturk/validictory")
11737 (synopsis "General purpose Python data validator")
11738 (description "It allows validation of arbitrary Python data structures.
11739
11740The schema format is based on the JSON Schema
11741proposal (http://json-schema.org), so combined with json the library is also
11742useful as a validator for JSON data.")
11743 (license license:expat)))
11744
11745(define-public python2-validictory
11746 (package-with-python2 python-validictory))
11747
11748(define-public python-pyelftools
11749 (package
11750 (name "python-pyelftools")
11751 (version "0.25")
11752 (source
11753 (origin
11754 (method url-fetch)
11755 (uri (pypi-uri "pyelftools" version))
11756 (sha256
11757 (base32
11758 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
11759 (build-system python-build-system)
11760 (arguments
11761 `(#:phases
11762 (modify-phases %standard-phases
11763 (add-before 'check 'set-pythonpath
11764 (lambda _
11765 (setenv "PYTHONPATH"
11766 (string-append
11767 (getcwd) "/test/"
11768 ":" (getenv "PYTHONPATH")))
11769 #t)))))
11770 (home-page
11771 "https://github.com/eliben/pyelftools")
11772 (synopsis
11773 "Analyze binary and library file information")
11774 (description "This Python library provides interfaces for parsing and
11775analyzing two binary and library file formats; the Executable and Linking
11776Format (ELF), and debugging information in the Debugging With Attributed
11777Record Format (DWARF).")
11778 (license license:public-domain)))
11779
11780(define-public python-pyev
11781 (package
11782 (name "python-pyev")
11783 (version "0.9.0")
11784 (source
11785 (origin
11786 (method url-fetch)
11787 (uri (pypi-uri "pyev" version))
11788 (sha256
11789 (base32
11790 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
11791 (build-system python-build-system)
11792 (arguments
11793 `(#:tests? #f ; no test suite
11794 #:phases
11795 (modify-phases %standard-phases
11796 (add-after 'unpack 'patch
11797 (lambda* (#:key inputs #:allow-other-keys)
11798 (let ((libev (string-append (assoc-ref inputs "libev")
11799 "/lib/libev.so.4")))
11800 (substitute* "setup.py"
11801 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
11802 (string-append "libev_dll_name = \"" libev "\"")))))))))
11803 (inputs
11804 `(("libev" ,libev)))
11805 (home-page "http://pythonhosted.org/pyev/")
11806 (synopsis "Python libev interface")
11807 (description "Pyev provides a Python interface to libev.")
11808 (license license:gpl3)))
11809
11810(define-public python2-pyev
11811 (package-with-python2 python-pyev))
11812
11813(define-public python-imagesize
11814 (package
11815 (name "python-imagesize")
11816 (version "1.1.0")
11817 (source
11818 (origin
11819 (method url-fetch)
11820 (uri (pypi-uri "imagesize" version))
11821 (sha256
11822 (base32
11823 "1dg3wn7qpwmhgqc0r9na2ding1wif9q5spz3j9zn2riwphc2k0zk"))))
11824 (build-system python-build-system)
11825 (home-page "https://github.com/shibukawa/imagesize_py")
11826 (synopsis "Gets image size of files in various formats in Python")
11827 (description
11828 "This package allows determination of image size from
11829PNG, JPEG, JPEG2000 and GIF files in pure Python.")
11830 (license license:expat)))
11831
11832(define-public python2-imagesize
11833 (package-with-python2 python-imagesize))
11834
11835(define-public python-termstyle
11836 (package
11837 (name "python-termstyle")
11838 (version "0.1.11")
11839 (source
11840 (origin
11841 (method url-fetch)
11842 (uri (pypi-uri "termstyle" version))
11843 (sha256
11844 (base32
11845 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
11846 (build-system python-build-system)
11847 (arguments
11848 '(#:phases
11849 (modify-phases %standard-phases
11850 (replace 'check
11851 (lambda _
831080a6 11852 (invoke "python" "test3.py"))))))
44d10b1f
RW
11853 (home-page "https://github.com/gfxmonk/termstyle")
11854 (synopsis "Console text coloring for Python")
11855 (description "This package provides console text coloring for Python.")
11856 (license license:bsd-3)))
11857
11858(define-public python-argcomplete
11859 (package
11860 (name "python-argcomplete")
11861 (version "1.7.0")
11862 (source
11863 (origin
11864 (method url-fetch)
11865 (uri (pypi-uri "argcomplete" version))
11866 (sha256
11867 (base32
11868 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
11869 (build-system python-build-system)
11870 (native-inputs
11871 `(("python-pexpect" ,python-pexpect)
11872 ("tcsh" ,tcsh)
11873 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
11874 (home-page "https://github.com/kislyuk/argcomplete")
11875 (synopsis "Shell tab completion for Python argparse")
11876 (description "argcomplete provides extensible command line tab completion
11877of arguments and options for Python scripts using @code{argparse}. It's
11878particularly useful for programs with many options or sub-parsers that can
11879dynamically suggest completions; for example, when browsing resources over the
11880network.")
11881 (license license:asl2.0)))
11882
11883(define-public python2-argcomplete
11884 (package-with-python2 python-argcomplete))
11885
11886(define-public python-xopen
11887 (package
11888 (name "python-xopen")
24d64989 11889 (version "0.5.0")
44d10b1f
RW
11890 (source
11891 (origin
11892 (method url-fetch)
11893 (uri (pypi-uri "xopen" version))
11894 (sha256
11895 (base32
24d64989 11896 "17xbrgi23l87yg6h0qcknssp2q812miiy33qw6v45v5gx0jwv5xh"))))
44d10b1f 11897 (build-system python-build-system)
24d64989
RW
11898 (propagated-inputs
11899 `(("python-setuptools-scm" ,python-setuptools-scm)))
44d10b1f
RW
11900 (home-page "https://github.com/marcelm/xopen/")
11901 (synopsis "Open compressed files transparently")
11902 (description "This module provides an @code{xopen} function that works like
11903Python's built-in @code{open} function, but can also deal with compressed files.
11904Supported compression formats are gzip, bzip2 and, xz, and are automatically
11905recognized by their file extensions. The focus is on being as efficient as
11906possible on all supported Python versions.")
11907 (license license:expat)))
11908
11909(define-public python2-xopen
11910 (let ((base (package-with-python2
11911 (strip-python2-variant python-xopen))))
11912 (package
11913 (inherit base)
11914 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
11915 ,@(package-propagated-inputs base))))))
11916
11917(define-public python-cheetah
11918 (package
11919 (name "python-cheetah")
11920 (version "3.1.0")
11921 (source
11922 (origin
11923 (method url-fetch)
11924 (uri (pypi-uri "Cheetah3" version))
11925 (sha256
11926 (base32
11927 "1ihag9cxll6b86fc8v5lkhmr3brdbi4yiz16zpgw79yylmv8fgr9"))))
11928 (build-system python-build-system)
11929 (arguments
11930 `(#:modules ((guix build utils)
11931 (guix build python-build-system)
11932 (ice-9 ftw)
11933 (srfi srfi-1)
11934 (srfi srfi-26))
11935 #:phases (modify-phases %standard-phases
11936 (add-after 'unpack 'use-absolute-python
11937 (lambda _
11938 (substitute* "Cheetah/CheetahWrapper.py"
11939 (("#!/usr/bin/env python")
11940 (string-append "#!" (which "python"))))
11941 #t))
11942 (replace 'check
11943 (lambda _
11944 (let ((cwd (getcwd)))
11945 (setenv "PYTHONPATH"
11946 (string-append
11947 cwd "/build/"
11948 (find (cut string-prefix? "lib" <>)
11949 (scandir (string-append cwd "/build")))
11950 ":" (getenv "PYTHONPATH")))
11951 (setenv "PATH"
11952 (string-append (getenv "PATH")
11953 ":" cwd "/bin"))
11954 (setenv "TMPDIR" "/tmp")
11955
11956 (substitute* "Cheetah/Tests/Test.py"
11957 (("unittest.TextTestRunner\\(\\)")
11958 "unittest.TextTestRunner(verbosity=2)"))
11959
11960 (invoke "python" "Cheetah/Tests/Test.py")))))))
11961 (propagated-inputs
11962 `(("python-markdown" ,python-markdown))) ;optional
11963 (home-page "http://cheetahtemplate.org/")
11964 (synopsis "Template engine")
11965 (description "Cheetah is a text-based template engine and Python code
11966generator.
11967
11968Cheetah can be used as a standalone templating utility or referenced as
11969a library from other Python applications. It has many potential uses,
11970but web developers looking for a viable alternative to ASP, JSP, PHP and
11971PSP are expected to be its principle user group.
11972
11973Features:
11974@enumerate
11975@item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
11976 text-based format.
11977@item Cleanly separates content, graphic design, and program code.
11978@item Blends the power and flexibility of Python with a simple template language
11979 that non-programmers can understand.
11980@item Gives template writers full access to any Python data structure, module,
11981 function, object, or method in their templates.
11982@item Makes code reuse easy by providing an object-orientated interface to
11983 templates that is accessible from Python code or other Cheetah templates.
11984 One template can subclass another and selectively reimplement sections of it.
11985@item Provides a simple, yet powerful, caching mechanism that can dramatically
11986 improve the performance of a dynamic website.
11987@item Compiles templates into optimized, yet readable, Python code.
11988@end enumerate")
11989 (license (license:x11-style "file://LICENSE"))))
11990
11991(define-public python2-cheetah
11992 (package-with-python2 python-cheetah))
11993
11994(define-public python-dulwich
11995 (package
11996 (name "python-dulwich")
11997 (version "0.18.6")
11998 (source
11999 (origin
12000 (method url-fetch)
12001 (uri (list (string-append "https://www.dulwich.io/releases/"
12002 "dulwich-" version ".tar.gz")
12003 (pypi-uri "dulwich" version)))
12004 (sha256
12005 (base32
12006 "1aa1xfrxkc3j9s4xi0llhf5gndyi9ryprcxsqfa5fcb8ph34981q"))))
12007 (build-system python-build-system)
12008 (arguments
12009 `(#:phases
12010 (modify-phases %standard-phases
12011 (add-before 'check 'fix-tests
12012 (lambda* (#:key inputs #:allow-other-keys)
12013 ;; The tests use Popen with a custom environment which doesn't
12014 ;; include PATH.
12015 (substitute* "dulwich/tests/compat/utils.py"
12016 (("'git'") (string-append "'"
12017 (which "git")
12018 "'")))
12019 (substitute* '("dulwich/tests/test_repository.py"
12020 "dulwich/tests/test_hooks.py")
12021 (("#!/bin/sh") (string-append "#!" (which "sh"))))
12022 (setenv "TEST_RUNNER" "unittest")
12023 (setenv "PYTHONHASHSEED" "random")
12024 #t)))))
12025 (propagated-inputs
12026 `(("python-fastimport" ,python-fastimport)))
12027 (native-inputs
12028 `(("python-mock" ,python-mock)
12029 ("python-geventhttpclient" ,python-geventhttpclient)
12030 ("git" ,git)))
12031 (home-page "https://www.dulwich.io/")
12032 (synopsis "Git implementation in Python")
12033 (description "Dulwich is an implementation of the Git file formats and
12034protocols written in pure Python.")
12035 ;; Can be used with either license.
12036 (license (list license:asl2.0 license:gpl2+))))
12037
12038(define-public python2-dulwich
12039 (package-with-python2 python-dulwich))
12040
12041(define-public python-pbkdf2
12042 (package
12043 (name "python-pbkdf2")
12044 (version "1.3")
12045 (source
12046 (origin
12047 (method url-fetch)
12048 (uri (pypi-uri "pbkdf2" version))
12049 (sha256
12050 (base32
12051 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
12052 (build-system python-build-system)
12053 (arguments
12054 '(#:phases
12055 (modify-phases %standard-phases
12056 (replace 'check
12057 (lambda _
12058 (setenv "PYTHONPATH"
12059 (string-append (getcwd) "/build/lib:"
12060 (getenv "PYTHONPATH")))
ee2bb944 12061 (invoke "python" "test/test_pbkdf2.py"))))))
44d10b1f
RW
12062 (propagated-inputs
12063 `(("python-pycrypto" ,python-pycrypto))) ; optional
12064 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
12065 (synopsis "Password-based key derivation")
12066 (description "This module implements the password-based key derivation
12067function, PBKDF2, specified in RSA PKCS#5 v2.0.
12068
12069PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
12070is part of the RSA Public Key Cryptography Standards series. The provided
12071implementation takes a password or a passphrase and a salt value (and
12072optionally a iteration count, a digest module, and a MAC module) and provides
12073a file-like object from which an arbitrarly-sized key can be read.")
12074 (license license:expat)))
12075
12076(define-public python2-pbkdf2
12077 (package-with-python2 python-pbkdf2))
12078
12079(define-public python-qrcode
12080 (package
12081 (name "python-qrcode")
217ea1a1 12082 (version "6.1")
44d10b1f
RW
12083 (source
12084 (origin
12085 (method url-fetch)
12086 (uri (pypi-uri "qrcode" version))
12087 (sha256
217ea1a1 12088 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
44d10b1f
RW
12089 (build-system python-build-system)
12090 (arguments
12091 ;; FIXME: Tests require packaging 'pymaging'.
12092 '(#:tests? #f))
12093 (propagated-inputs
12094 `(("python-lxml" ,python-lxml) ; for SVG output
12095 ("python-pillow" ,python-pillow) ; for PNG output
12096 ("python-six" ,python-six)))
44d10b1f
RW
12097 (home-page "https://github.com/lincolnloop/python-qrcode")
12098 (synopsis "QR Code image generator")
12099 (description "This package provides a pure Python QR Code generator
12100module. It uses the Python Imaging Library (PIL) to allow for the generation
12101of QR Codes.
12102
12103In addition this package provides a command line tool to generate QR codes and
12104either write these QR codes to a file or do the output as ascii art at the
12105console.")
12106 (license license:bsd-3)))
12107
12108(define-public python2-qrcode
12109 (package-with-python2 python-qrcode))
12110
12111(define-public python-rst2ansi
12112 (package
12113 (name "python-rst2ansi")
12114 (version "0.1.5")
12115 (source
12116 (origin
12117 (method url-fetch)
12118 (uri (pypi-uri "rst2ansi" version))
12119 (sha256
12120 (base32
12121 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
12122 (build-system python-build-system)
12123 (propagated-inputs
12124 `(("python-docutils" ,python-docutils)))
12125 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
12126 (synopsis "Convert RST to ANSI-decorated console output")
12127 (description
12128 "Python module dedicated to rendering RST (reStructuredText) documents
12129to ansi-escaped strings suitable for display in a terminal.")
12130 (license license:expat)))
12131
12132(define-public python-ansi2html
12133 (package
12134 (name "python-ansi2html")
12135 (version "1.2.0")
12136 (source
12137 (origin
12138 (method url-fetch)
12139 (uri (pypi-uri "ansi2html" version))
12140 (sha256
12141 (base32
12142 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
12143 (build-system python-build-system)
12144 (native-inputs
12145 `(("python-mock" ,python-mock)
12146 ("python-nose" ,python-nose)))
12147 (propagated-inputs
12148 `(("python-six" ,python-six)))
12149 (home-page "https://github.com/ralphbean/ansi2html")
12150 (synopsis "Convert ANSI-decorated console output to HTML")
12151 (description
12152 "@command{ansi2html} is a Python library and command line utility for
12153convering text with ANSI color codes to HTML or LaTeX.")
12154 (license license:gpl3+)))
12155
12156(define-public python2-ansi2html
12157 (package-with-python2 python-ansi2html))
12158
12159(define-public python-ddt
12160 (package
12161 (name "python-ddt")
12162 (version "1.1.3")
12163 (source
12164 (origin
12165 (method url-fetch)
12166 (uri (pypi-uri "ddt" version))
12167 (sha256
12168 (base32
12169 "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk"))))
12170 (build-system python-build-system)
12171 (native-inputs
12172 `(("python-mock" ,python-mock)
12173 ("python-nose" ,python-nose)))
12174 (propagated-inputs
12175 `(("python-six" ,python-six)
12176 ("python-pyyaml" ,python-pyyaml)))
12177 (home-page "https://github.com/txels/ddt")
12178 (synopsis "Data-Driven Tests")
12179 (description
12180 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
12181running it with different test data, and make it appear as multiple test
12182cases.")
12183 (license license:expat)))
12184
12185(define-public python2-ddt
12186 (package-with-python2 python-ddt))
12187
12188(define-public python-pycountry
12189 (package
12190 (name "python-pycountry")
12191 (version "18.5.26")
12192 (source
12193 (origin
12194 (method url-fetch)
12195 (uri (pypi-uri "pycountry" version))
12196 (sha256
12197 (base32
12198 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
12199 (build-system python-build-system)
12200 (home-page "https://bitbucket.org/flyingcircus/pycountry")
12201 (synopsis "ISO databases for languages, countries, currencies, etc.")
12202 (description
12203 "@code{pycountry} provides the ISO databases for the standards:
12204@enumerate
12205@item 639-3 (Languages)
12206@item 3166 (Countries)
12207@item 3166-3 (Deleted Countries)
12208@item 3166-2 (Subdivisions of countries)
12209@item 4217 (Currencies)
12210@item 15924 (Scripts)
12211@end enumerate
12212It includes a copy from Debian’s pkg-isocodes and makes the data accessible
12213through a Python API.")
12214 (license license:lgpl2.1+)))
12215
12216(define-public python2-pycountry
12217 (package-with-python2 python-pycountry))
12218
12219(define-public python-pycosat
12220 (package
12221 (name "python-pycosat")
12222 (version "0.6.1")
12223 (source
12224 (origin
12225 (method url-fetch)
12226 (uri (pypi-uri "pycosat" version))
12227 (sha256
12228 (base32
12229 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
12230 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
12231 (build-system python-build-system)
12232 (home-page "https://github.com/ContinuumIO/pycosat")
12233 (synopsis "Bindings to picosat (a SAT solver)")
12234 (description
12235 "This package provides efficient Python bindings to @code{picosat} on
12236the C level. When importing pycosat, the @code{picosat} solver becomes part
12237of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
12238Problem} (SAT) solver.")
12239 (license license:expat)))
12240
12241(define-public python2-pycosat
12242 (package-with-python2 python-pycosat))
12243
12244(define-public python2-ruamel.ordereddict
12245 (package
12246 (name "python2-ruamel.ordereddict")
12247 (version "0.4.9")
12248 (source
12249 (origin
12250 (method url-fetch)
12251 (uri (pypi-uri "ruamel.ordereddict" version))
12252 (sha256
12253 (base32
12254 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
12255 (build-system python-build-system)
12256 (arguments
12257 `(#:python ,python-2
12258 #:phases
12259 (modify-phases %standard-phases
12260 (delete 'check)
12261 (add-after 'install 'check
12262 (lambda* (#:key inputs outputs #:allow-other-keys)
12263 (add-installed-pythonpath inputs outputs)
f987ac30 12264 (invoke "python" "test/testordereddict.py"))))))
44d10b1f
RW
12265 (home-page "https://bitbucket.org/ruamel/ordereddict")
12266 (synopsis "Version of dict that keeps keys in insertion order")
12267 (description
12268 "This is an implementation of an ordered dictionary with @dfn{Key
12269Insertion Order} (KIO: updates of values do not affect the position of the
12270key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
12271removed and put at the back). The standard library module @code{OrderedDict},
12272implemented later, implements a subset of @code{ordereddict} functionality.
12273Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
12274Order} (KSO, no sorting function can be specified, but a transform can be
12275specified to apply on the key before comparison (e.g. @code{string.lower})).")
12276 (license license:expat)))
12277
12278(define-public python-pypeg2
12279 (package
12280 (name "python-pypeg2")
12281 (version "2.15.2")
12282 (source
12283 (origin
12284 (method url-fetch)
12285 (uri (pypi-uri "pyPEG2" version))
12286 (sha256
12287 (base32
12288 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
12289 (build-system python-build-system)
12290 (propagated-inputs `(("python-lxml" ,python-lxml)))
12291 (arguments
12292 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
12293 '(#:tests? #f))
12294 (home-page "https://fdik.org/pyPEG/")
12295 (synopsis "Parsering Expression Grammars in Python")
12296 (description "PyPEG is an intrinsic parser interpreter framework for
12297Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
12298parse many formal languages.")
12299 (license license:gpl2)))
12300
12301(define-public python-incremental
12302 (package
12303 (name "python-incremental")
12304 (version "17.5.0")
12305 (source
12306 (origin
12307 (method url-fetch)
12308 (uri (pypi-uri "incremental" version))
12309 (sha256
12310 (base32
12311 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
12312 (build-system python-build-system)
12313 (home-page "https://github.com/hawkowl/incremental")
12314 (synopsis "Library for versioning Python projects")
12315 (description "Incremental is a small library that versions your Python
12316projects.")
12317 (license license:expat)))
12318
12319(define-public python2-incremental
12320 (package-with-python2 python-incremental))
12321
12322(define-public python-invoke
12323 (package
12324 (name "python-invoke")
12325 (home-page "http://www.pyinvoke.org/")
a5662319 12326 (version "1.3.0")
44d10b1f
RW
12327 (source (origin
12328 (method url-fetch)
12329 (uri (pypi-uri "invoke" version))
12330 (sha256
12331 (base32
a5662319 12332 "1nn7gad0rvy492acpyhkrp01zsk86acf34qhsvq4xmm6x39788n5"))))
44d10b1f
RW
12333 (build-system python-build-system)
12334 (arguments
12335 ;; XXX: Requires many dependencies that are not yet in Guix.
12336 `(#:tests? #f))
12337 (synopsis "Pythonic task execution")
12338 (description
12339 "Invoke is a Python task execution tool and library, drawing inspiration
12340from various sources to arrive at a powerful and clean feature set. It is
12341evolved from the Fabric project, but focuses on local and abstract concerns
12342instead of servers and network commands.")
12343 (license license:bsd-3)))
12344
12345(define-public python2-invoke
12346 (package-with-python2 python-invoke))
12347
12348(define-public python-automat
12349 (package
12350 (name "python-automat")
919d80a0 12351 (version "0.7.0")
44d10b1f
RW
12352 (source (origin
12353 (method url-fetch)
12354 (uri (pypi-uri "Automat" version))
12355 (sha256
12356 (base32
919d80a0 12357 "03ivg70n3b1cbcd2zvjhk8y4kmqxcvhmili39lmgx09dza1qpmyb"))))
44d10b1f
RW
12358 (build-system python-build-system)
12359 ;; We disable the tests because they require python-twisted, while
12360 ;; python-twisted depends on python-automat. Twisted is optional, but the
12361 ;; tests fail if it is not available. Also see
12362 ;; <https://github.com/glyph/automat/issues/71>.
12363 (arguments '(#:tests? #f))
12364 (native-inputs
12365 `(("python-m2r" ,python-m2r)
12366 ("python-setuptools-scm" ,python-setuptools-scm)
12367 ("python-graphviz" ,python-graphviz)))
12368 (propagated-inputs
12369 `(("python-six" ,python-six)
12370 ("python-attrs" ,python-attrs)))
12371 (home-page "https://github.com/glyph/Automat")
12372 (synopsis "Self-service finite-state machines")
12373 (description "Automat is a library for concise, idiomatic Python
12374expression of finite-state automata (particularly deterministic finite-state
12375transducers).")
12376 (license license:expat)))
12377
12378(define-public python2-automat
12379 (package-with-python2 python-automat))
12380
12381(define-public python-m2r
12382 (package
12383 (name "python-m2r")
bcfb8fac 12384 (version "0.2.1")
44d10b1f
RW
12385 (source (origin
12386 (method url-fetch)
12387 (uri (pypi-uri "m2r" version))
12388 (sha256
12389 (base32
bcfb8fac 12390 "16gdm8i06jjmlpvckpfmlkr4693dh0vs192vgsqn84fsdkbbm45z"))))
44d10b1f
RW
12391 (build-system python-build-system)
12392 (propagated-inputs
12393 `(("python-docutils" ,python-docutils)
12394 ("python-mistune" ,python-mistune)))
12395 (native-inputs
12396 `(("python-pygments" ,python-pygments)
12397 ("python-mock" ,python-mock)))
12398 (home-page "https://github.com/miyakogi/m2r")
12399 (synopsis "Markdown to reStructuredText converter")
12400 (description "M2R converts a markdown file including reST markups to valid
12401reST format.")
12402 (license license:expat)))
12403
12404(define-public python2-m2r
12405 (package-with-python2 python-m2r))
12406
12407(define-public python-constantly
12408 (package
12409 (name "python-constantly")
12410 (version "15.1.0")
12411 (source (origin
12412 (method url-fetch)
12413 (uri (pypi-uri "constantly" version))
12414 (sha256
12415 (base32
12416 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
12417 (build-system python-build-system)
12418 (home-page "https://github.com/twisted/constantly")
12419 (synopsis "Symbolic constants in Python")
12420 (description "Constantly is a Python library that provides symbolic
12421constant support. It includes collections and constants with text, numeric,
12422and bit flag values.")
12423 (license license:expat)))
12424
12425(define-public python2-constantly
12426 (package-with-python2 python-constantly))
12427
12428(define-public python-attrs
12429 (package
12430 (name "python-attrs")
c41d5144 12431 (version "19.1.0")
44d10b1f
RW
12432 (source (origin
12433 (method url-fetch)
12434 (uri (pypi-uri "attrs" version))
12435 (sha256
12436 (base32
c41d5144 12437 "16g33zr5f449lqc5wgvzpknxryfzrfsxcr6kpgxwn7l5fkv71f7h"))))
44d10b1f
RW
12438 (build-system python-build-system)
12439 (arguments
12440 `(#:modules ((guix build utils)
12441 (guix build python-build-system)
12442 (ice-9 ftw)
12443 (srfi srfi-1)
12444 (srfi srfi-26))
12445 #:phases (modify-phases %standard-phases
12446 (replace 'check
12447 (lambda _
12448 (let ((cwd (getcwd)))
12449 (setenv "PYTHONPATH"
12450 (string-append
12451 cwd "/build/"
12452 (find (cut string-prefix? "lib" <>)
12453 (scandir (string-append cwd "/build")))
12454 ":"
12455 (getenv "PYTHONPATH")))
12456 (invoke "python" "-m" "pytest")))))))
12457 (native-inputs
12458 `(("python-coverage" ,python-coverage)
12459 ("python-hypothesis" ,python-hypothesis)
12460 ("python-pympler" ,python-pympler)
12461 ("python-pytest" ,python-pytest)
12462 ("python-six" ,python-six)
12463 ("python-sphinx" ,python-sphinx)
12464 ("python-zope-interface" ,python-zope-interface)))
12465 (home-page "https://github.com/python-attrs/attrs/")
12466 (synopsis "Attributes without boilerplate")
12467 (description "@code{attrs} is a Python package with class decorators that
12468ease the chores of implementing the most common attribute-related object
12469protocols.")
12470 (license license:expat)))
12471
12472(define-public python2-attrs
12473 (package-with-python2 python-attrs))
12474
12475(define-public python-attrs-bootstrap
12476 (package
12477 (inherit python-attrs)
12478 (name "python-attrs-bootstrap")
44d10b1f
RW
12479 (native-inputs `())
12480 (arguments `(#:tests? #f))))
12481
12482(define-public python2-attrs-bootstrap
12483 (package-with-python2 python-attrs-bootstrap))
12484
12485(define-public python2-cliapp
12486 (package
12487 (name "python2-cliapp")
9064b84e 12488 (version "1.20180812.1")
44d10b1f
RW
12489 (source
12490 (origin
12491 (method url-fetch)
12492 (uri (string-append
12493 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
12494 version ".tar.gz"))
12495 (sha256
12496 (base32
9064b84e 12497 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
44d10b1f
RW
12498 (build-system python-build-system)
12499 (arguments
12500 `(#:python ,python-2
12501 #:phases
12502 (modify-phases %standard-phases
12503 ;; check phase needs to be run before the build phase. If not,
12504 ;; coverage-test-runner looks for tests for the built source files,
12505 ;; and fails.
12506 (delete 'check)
12507 (add-before 'build 'check
12508 (lambda _
12509 ;; Disable python3 tests
12510 (substitute* "check"
12511 (("python3") "# python3"))
6c826d32 12512 (invoke "./check"))))))
44d10b1f
RW
12513 (native-inputs
12514 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
12515 ("python2-pep8" ,python2-pep8)))
12516 (propagated-inputs
12517 `(("python2-pyaml" ,python2-pyaml)))
12518 (home-page "https://liw.fi/cliapp/")
12519 (synopsis "Python framework for command line programs")
12520 (description "@code{python2-cliapp} is a python framework for
12521command line programs. It contains the typical stuff such programs
12522need to do, such as parsing the command line for options, and
12523iterating over input files.")
12524 (license license:gpl2+)))
12525
12526(define-public python2-ttystatus
12527 (package
12528 (name "python2-ttystatus")
e516a9c2 12529 (version "0.36")
44d10b1f
RW
12530 (source
12531 (origin
12532 (method url-fetch)
12533 (uri (string-append
12534 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
12535 version ".tar.gz"))
12536 (sha256
12537 (base32
e516a9c2 12538 "06mdk4d19zw2j3is54gndhzl396g3xc8k52m7i86z69s9hcz71by"))))
44d10b1f
RW
12539 (build-system python-build-system)
12540 (native-inputs
12541 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
12542 ("python2-pep8" ,python2-pep8)))
12543 (arguments
12544 `(#:python ,python-2
12545 #:phases
12546 (modify-phases %standard-phases
12547 ;; check phase needs to be run before the build phase. If not,
12548 ;; coverage-test-runner looks for tests for the built source files,
12549 ;; and fails.
12550 (delete 'check)
12551 (add-before 'build 'check
cbeee881 12552 (lambda _ (invoke "make" "check"))))))
44d10b1f
RW
12553 (home-page "https://liw.fi/ttystatus/")
12554 (synopsis "Python library for showing progress reporting and
12555status updates on terminals")
12556 (description "@code{python2-ttystatus} is a python library for
12557showing progress reporting and status updates on terminals, for
12558command line programs. Output is automatically adapted to the width
12559of the terminal: truncated if it does not fit, and resized if the
12560terminal size changes.")
12561 (license license:gpl3+)))
12562
12563(define-public python2-tracing
12564 (package
12565 (name "python2-tracing")
12566 (version "0.10")
12567 (source
12568 (origin
12569 (method url-fetch)
12570 (uri (string-append
12571 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
12572 version ".tar.gz"))
12573 (sha256
12574 (base32
12575 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
12576 (build-system python-build-system)
12577 (arguments
12578 `(#:python ,python-2))
12579 (home-page "https://liw.fi/tracing/")
12580 (synopsis "Python debug logging helper")
12581 (description "@code{python2-tracing} is a python library for
12582logging debug messages. It provides a way to turn debugging messages
12583on and off, based on the filename they occur in. It is much faster
12584than using @code{logging.Filter} to accomplish the same thing, which
12585matters when code is run in production mode. The actual logging still
12586happens using the @code{logging} library.")
12587 (license license:gpl3+)))
12588
12589(define-public python2-larch
12590 (package
12591 (name "python2-larch")
12592 (version "1.20151025")
12593 (source
12594 (origin
12595 (method url-fetch)
12596 (uri (string-append
12597 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
12598 version ".tar.gz"))
12599 (patches (search-patches
12600 "python2-larch-coverage-4.0a6-compatibility.patch"))
12601 (sha256
12602 (base32
12603 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
12604 (build-system python-build-system)
12605 (arguments
12606 `(#:python ,python-2
12607 #:phases
12608 (modify-phases %standard-phases
12609 ;; check phase needs to be run before the build phase. If not,
12610 ;; coverage-test-runner looks for tests for the built source files,
12611 ;; and fails.
12612 (delete 'check)
12613 (add-before 'build 'check
204ad455 12614 (lambda _ (invoke "make" "check"))))))
44d10b1f
RW
12615 (native-inputs
12616 `(("cmdtest" ,cmdtest)
12617 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
12618 (propagated-inputs
12619 `(("python2-tracing" ,python2-tracing)))
12620 (home-page "https://liw.fi/larch/")
12621 (synopsis "Python copy-on-write B-tree library")
12622 (description "@code{python2-larch} is an implementation of
12623particular kind of B-tree, based on research by Ohad Rodeh. See
12624@url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
12625on the data structure.
12626
12627The distinctive feature of this B-tree is that a node is never
12628(conceptually) modified. Instead, all updates are done by
12629copy-on-write. This makes it easy to clone a tree, and modify only the
12630clone, while other processes access the original tree.")
12631 (license license:gpl3+)))
12632
12633(define-public python-astroid
12634 (package
12635 (name "python-astroid")
1c43c698 12636 (version "2.3.3")
44d10b1f
RW
12637 (source
12638 (origin
12639 (method url-fetch)
12640 (uri (pypi-uri "astroid" version))
12641 (sha256
1c43c698 12642 (base32 "0fnibsl2cb5mvzbfm7sycj85smx48f8w8m7ks1sqlmpr9ps0gski"))))
44d10b1f
RW
12643 (build-system python-build-system)
12644 (propagated-inputs
12645 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
12646 ("python-six" ,python-six)
f0935460 12647 ("python-typed-ast" ,python-typed-ast)
44d10b1f
RW
12648 ("python-wrapt" ,python-wrapt)))
12649 (native-inputs
12650 `(("python-dateutil" ,python-dateutil)
12651 ("python-nose" ,python-nose)
12652 ("python-pytest" ,python-pytest)
12653 ("python-pytest-runner" ,python-pytest-runner)))
12654 (arguments
12655 `(#:phases
12656 (modify-phases %standard-phases
12657 (add-after 'unpack 'remove-spurious-test
12658 (lambda _
12659 ;; This can be removed after upgrading from python-3.7
12660 ;; https://github.com/PyCQA/astroid/issues/593
12661 ;; https://bugs.python.org/issue34056
12662 (delete-file "astroid/tests/unittest_modutils.py")
12663 #t))
12664 (replace 'check
12665 (lambda _
12666 (invoke "pytest" "astroid"))))))
12667 (home-page "https://github.com/PyCQA/astroid")
12668 (synopsis "Common base representation of python source code for pylint and
12669other projects")
12670 (description "@code{python-astroid} provides a common base representation
12671of python source code for projects such as pychecker, pyreverse, pylint, etc.
12672
12673It provides a compatible representation which comes from the _ast module. It
12674rebuilds the tree generated by the builtin _ast module by recursively walking
12675down the AST and building an extended ast. The new node classes have
12676additional methods and attributes for different usages. They include some
12677support for static inference and local name scopes. Furthermore, astroid
12678builds partial trees by inspecting living objects.")
12679 (license license:lgpl2.1+)
12680 (properties `((python2-variant . ,(delay python2-astroid))))))
12681
12682(define-public python2-astroid
12683 (let ((base (package-with-python2
12684 (strip-python2-variant python-astroid))))
12685 (package (inherit base)
12686 ;; Version 2.x removes python2 support.
12687 (version "1.6.5")
12688 (source
12689 (origin
12690 (method url-fetch)
12691 (uri (pypi-uri "astroid" version))
12692 (sha256
12693 (base32
12694 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
12695 (arguments
12696 (substitute-keyword-arguments (package-arguments base)
12697 ((#:phases phases)
12698 `(modify-phases ,phases
12699 (add-after 'unpack 'remove-spurious-test
12700 (lambda _
12701 ;; https://github.com/PyCQA/astroid/issues/276
12702 (delete-file "astroid/tests/unittest_brain.py")
12703 #t))
12704 (replace 'check
12705 (lambda _
12706 (invoke"python" "-m" "unittest" "discover"
12707 "-p" "unittest*.py")))))))
12708 (native-inputs `())
12709 (propagated-inputs
12710 `(("python2-backports-functools-lru-cache"
12711 ,python2-backports-functools-lru-cache)
12712 ("python2-enum34" ,python2-enum34)
12713 ("python2-singledispatch" ,python2-singledispatch)
741f98b3
MO
12714 ,@(alist-delete "python-typed-ast"
12715 (package-propagated-inputs base)))))))
44d10b1f
RW
12716
12717(define-public python-isort
12718 (package
12719 (name "python-isort")
e2227b6a 12720 (version "4.3.4")
44d10b1f
RW
12721 (source
12722 (origin
e2227b6a
EF
12723 (method git-fetch)
12724 (uri (git-reference
12725 ;; Tests pass only from the Github sources
12726 (url "https://github.com/timothycrosley/isort")
12727 (commit version)))
12728 (file-name (git-file-name name version))
44d10b1f
RW
12729 (sha256
12730 (base32
e2227b6a 12731 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
44d10b1f
RW
12732 (build-system python-build-system)
12733 (native-inputs
12734 `(("python-mock" ,python-mock)
12735 ("python-pytest" ,python-pytest)))
12736 (home-page "https://github.com/timothycrosley/isort")
12737 (synopsis "Python utility/library to sort python imports")
12738 (description "@code{python-isort} is a python utility/library to sort
12739imports alphabetically, and automatically separated into sections. It
12740provides a command line utility, a python library and plugins for various
12741editors.")
e2227b6a
EF
12742 (license license:expat)
12743 (properties `((python2-variant . ,(delay python2-isort))))))
44d10b1f
RW
12744
12745(define-public python2-isort
e2227b6a
EF
12746 (let ((base (package-with-python2
12747 (strip-python2-variant python-isort))))
12748 (package (inherit base)
12749 (native-inputs
12750 `(("python2-futures" ,python2-futures)
12751 ,@(package-native-inputs base))))))
44d10b1f
RW
12752
12753(define-public python2-backports-functools-lru-cache
12754 (package
12755 (name "python2-backports-functools-lru-cache")
12756 (version "1.5")
12757 (source
12758 (origin
12759 (method url-fetch)
12760 ;; only the pypi tarballs contain the necessary metadata
12761 (uri (pypi-uri "backports.functools_lru_cache" version))
12762 (sha256
12763 (base32
12764 "06jgv8gib4fhky0p5cmxdghvsgjyzcdgk48k8pxb1ccf11znk64x"))))
12765 (build-system python-build-system)
12766 (native-inputs
12767 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
12768 (arguments
12769 `(#:python ,python-2))
12770 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
12771 (synopsis "Backport of functools.lru_cache from Python 3.3")
12772 (description "@code{python2-backports-functools-lru-cache} is a backport
12773of @code{functools.lru_cache} from python 3.3.")
12774 (license license:expat)))
12775
12776(define-public python-configparser
12777 (package
12778 (name "python-configparser")
84127f8c 12779 (version "3.7.1")
44d10b1f
RW
12780 (source
12781 (origin
12782 (method url-fetch)
84127f8c 12783 (uri (pypi-uri "configparser" version))
44d10b1f
RW
12784 (sha256
12785 (base32
84127f8c 12786 "0cnz213il9lhgda6x70fw7mfqr8da43s3wm343lwzhqx94mgmmav"))))
44d10b1f 12787 (build-system python-build-system)
809f003f 12788 (home-page "https://github.com/jaraco/configparser/")
44d10b1f
RW
12789 (synopsis "Backport of configparser from python 3.5")
12790 (description "@code{python-configparser} is a backport of
12791@code{configparser} from Python 3.5 so that it can be used directly
12792in other versions.")
12793 (license license:expat)))
12794
12795(define-public python2-configparser
12796 (package-with-python2 python-configparser))
12797
12798(define-public python-mando
12799 (package
12800 (name "python-mando")
12801 (version "0.6.4")
12802 (source (origin
12803 (method url-fetch)
12804 (uri (pypi-uri "mando" version))
12805 (sha256
12806 (base32
12807 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
12808 (build-system python-build-system)
12809 (propagated-inputs
12810 `(("python-rst2ansi" ,python-rst2ansi)
12811 ("python-six" ,python-six)))
12812 (native-inputs
12813 `(("python-pytest" ,python-pytest)))
12814 (home-page "https://mando.readthedocs.org/")
12815 (synopsis
12816 "Wrapper around argparse, allowing creation of complete CLI applications")
12817 (description
12818 "This package is a wrapper around argparse, allowing you to write complete CLI
12819applications in seconds while maintaining all the flexibility.")
12820 (license license:expat)))
12821
12822(define-public python2-mando
12823 (package-with-python2 python-mando))
12824
70daf82f
RW
12825(define-public python2-argparse
12826 (package
12827 (name "python2-argparse")
12828 (version "1.4.0")
12829 (source
12830 (origin
12831 (method url-fetch)
12832 (uri (pypi-uri "argparse" version))
12833 (sha256
12834 (base32
12835 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
12836 (build-system python-build-system)
12837 (arguments
12838 `(#:python ,python-2))
12839 (home-page "https://github.com/ThomasWaldmann/argparse/")
12840 (synopsis "Python command-line parsing library")
12841 (description
12842 "This package is mostly for people who want to have @code{argparse} on
12843older Pythons because it was not part of the standard library back then.")
12844 (license license:psfl)))
12845
44d10b1f
RW
12846(define-public python-fudge
12847 (package
12848 (name "python-fudge")
12849 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
12850 ;; package, which is currently the only use of this package.
12851 (version "0.9.6")
12852 (source
12853 (origin
12854 (method url-fetch)
12855 (uri (pypi-uri "fudge" version))
12856 (sha256
12857 (base32
12858 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
12859 (build-system python-build-system)
12860 (arguments
12861 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
12862 (home-page "https://github.com/fudge-py/fudge")
12863 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
12864 (description
12865 "Fudge is a Python module for using fake objects (mocks and stubs) to
12866test real ones.
12867
12868In readable Python code, you declare the methods available on your fake object
12869and how they should be called. Then you inject that into your application and
12870start testing. This declarative approach means you don’t have to record and
12871playback actions and you don’t have to inspect your fakes after running code.
12872If the fake object was used incorrectly then you’ll see an informative
12873exception message with a traceback that points to the culprit.")
12874 (license license:expat)))
12875
12876(define-public python2-fudge
12877 (package-with-python2 python-fudge))
12878
12879(define-public python-mwclient
12880 (package
12881 (name "python-mwclient")
12882 (version "0.8.4")
12883 (source
12884 (origin
12885 (method url-fetch)
12886 ;; The PyPI version wouldn't contain tests.
12887 (uri (string-append "https://github.com/mwclient/mwclient/archive/"
12888 "v" version ".tar.gz"))
12889 (file-name (string-append name "-" version ".tar.gz"))
12890 (sha256
12891 (base32
12892 "1jj0yhilkjir00719fc7w133x7hdyhkxhk6xblla4asig45klsfv"))))
12893 (build-system python-build-system)
12894 (propagated-inputs
12895 `(("python-requests" ,python-requests)
12896 ("python-requests-oauthlib"
12897 ,python-requests-oauthlib)
12898 ("python-six" ,python-six)))
12899 (native-inputs
12900 `(("python-mock" ,python-mock)
12901 ("python-pytest" ,python-pytest)
12902 ("python-pytest-pep8" ,python-pytest-pep8)
12903 ("python-pytest-cache" ,python-pytest-cache)
12904 ("python-pytest-cov" ,python-pytest-cov)
12905 ("python-responses" ,python-responses)))
12906 (home-page "https://github.com/btongminh/mwclient")
12907 (synopsis "MediaWiki API client")
12908 (description "This package provides a MediaWiki API client.")
12909 (license license:expat)))
12910
12911(define-public python2-mwclient
12912 (package-with-python2 python-mwclient))
12913
12914(define-public python-utils
12915 (package
12916 (name "python-utils")
12917 (version "2.1.0")
12918 (source (origin
12919 (method url-fetch)
12920 (uri (pypi-uri "python-utils" version))
12921 (sha256
12922 (base32
12923 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
12924 (build-system python-build-system)
12925 (native-inputs
12926 `(("pytest-runner" ,python-pytest-runner)
12927 ("pytest" ,python-pytest)
12928 ("six" ,python-six)))
12929 (home-page "https://github.com/WoLpH/python-utils")
12930 (synopsis "Convenient utilities not included with the standard Python install")
12931 (description
12932 "Python Utils is a collection of small Python functions and classes which
12933make common patterns shorter and easier.")
12934 (license license:bsd-2)))
12935
12936(define-public python2-utils
12937 (package-with-python2 python-utils))
12938
44d10b1f
RW
12939(define-public python-diff-match-patch
12940 (package
12941 (name "python-diff-match-patch")
12942 (version "20121119")
12943 (source
12944 (origin
12945 (method url-fetch)
12946 (uri (pypi-uri "diff-match-patch" version))
12947 (sha256
12948 (base32
12949 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
12950 (build-system python-build-system)
12951 (home-page "https://code.google.com/p/google-diff-match-patch")
12952 (synopsis "Synchronize plain text")
12953 (description "Diff Match and Patch libraries offer robust algorithms to
12954perform the operations required for synchronizing plain text.")
12955 (license license:asl2.0)))
12956
12957(define-public python2-diff-match-patch
12958 (package-with-python2 python-diff-match-patch))
12959
12960(define-public python-dirsync
12961 (package
12962 (name "python-dirsync")
12963 (version "2.2.3")
12964 (source
12965 (origin
12966 (method url-fetch)
12967 (uri (pypi-uri "dirsync" version))
12968 (sha256
12969 (base32
12970 "1r40fkanksagcszf1ag85mdr8w7rgc7196n6s1qlsk2abw6i7v0z"))))
12971 (build-system python-build-system)
12972 (propagated-inputs
12973 `(("six" ,python-six)))
12974 (home-page "https://bitbucket.org/tkhyn/dirsync")
12975 (synopsis "Advanced directory tree synchronisation tool")
12976 (description "Advanced directory tree synchronisation tool.")
12977 (license license:expat)))
12978
12979(define-public python2-dirsync
12980 (package-with-python2 python-dirsync))
12981
12982(define-public python-levenshtein
12983 (package
12984 (name "python-levenshtein")
12985 (version "0.12.0")
12986 (source
12987 (origin
12988 (method url-fetch)
12989 (uri (pypi-uri "python-Levenshtein" version))
12990 (sha256
12991 (base32
12992 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
12993 (build-system python-build-system)
12994 (home-page "https://github.com/ztane/python-Levenshtein")
12995 (synopsis "Fast computation of Levenshtein distance and string similarity")
12996 (description
12997 "The Levenshtein Python C extension module contains functions for fast computation of
12998@enumerate
12999@item Levenshtein (edit) distance, and edit operations
13000@item string similarity
13001@item approximate median strings, and generally string averaging
13002@item string sequence and set similarity
13003@end enumerate
13004It supports both normal and Unicode strings.")
13005 (license license:gpl2+)))
13006
13007(define-public python2-levenshtein
13008 (package-with-python2 python-levenshtein))
13009
13010(define-public python-scandir
13011 (package
13012 (name "python-scandir")
13013 (version "1.9.0")
13014 (source
13015 (origin
13016 (method url-fetch)
13017 (uri (pypi-uri "scandir" version))
13018 (sha256
13019 (base32 "0r3hvf1a9jm1rkqgx40gxkmccknkaiqjavs8lccgq9s8khh5x5s4"))))
13020 (build-system python-build-system)
13021 (arguments
13022 `(#:phases (modify-phases %standard-phases
13023 (replace 'check
13024 (lambda _
13025 (invoke "python" "test/run_tests.py"))))))
13026 (home-page "https://github.com/benhoyt/scandir")
13027 (synopsis "Directory iteration function")
13028 (description
13029 "Directory iteration function like os.listdir(), except that instead of
13030returning a list of bare filenames, it yields DirEntry objects that include
13031file type and stat information along with the name. Using scandir() increases
13032the speed of os.walk() by 2-20 times (depending on the platform and file
13033system) by avoiding unnecessary calls to os.stat() in most cases.
13034
13035This package is part of the Python standard library since version 3.5.")
13036 (license license:bsd-3)))
13037
13038(define-public python2-scandir
13039 (package-with-python2 python-scandir))
13040
13041(define-public python2-stemming
13042 (package
13043 (name "python2-stemming")
13044 (version "1.0.1")
13045 (source
13046 (origin
13047 (method url-fetch)
13048 (uri (pypi-uri "stemming" version))
13049 (sha256
13050 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
13051 (build-system python-build-system)
13052 (arguments
13053 `(#:python ,python-2))
13054 (home-page "https://bitbucket.org/mchaput/stemming/overview")
13055 (synopsis "Python implementations of various stemming algorithms")
13056 (description
13057 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
13058stemming algorithms for English. These implementations are straightforward and
13059efficient, unlike some Python versions of the same algorithms available on the
13060Web. This package is an extraction of the stemming code included in the Whoosh
13061search engine.")
13062 (license license:public-domain)))
13063
13064(define-public python-factory-boy
13065 (package
13066 (name "python-factory-boy")
13067 (version "2.8.1")
13068 (source
13069 (origin
13070 (method url-fetch)
13071 (uri (pypi-uri "factory_boy" version))
13072 (sha256
13073 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
13074 (build-system python-build-system)
13075 (arguments
13076 ;; Tests are not included in the tarball.
13077 `(#:tests? #f))
13078 (propagated-inputs
13079 `(("faker" ,python-faker)))
13080 (home-page "https://github.com/benhoyt/scandir")
13081 (synopsis "Versatile test fixtures replacement")
13082 (description
13083 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
13084
13085As a fixtures replacement tool, it aims to replace static, hard to maintain
13086fixtures with easy-to-use factories for complex object.
13087
13088Instead of building an exhaustive test setup with every possible combination
13089of corner cases, factory_boy allows you to use objects customized for the
13090current test, while only declaring the test-specific fields")
13091 (license license:expat)))
13092
13093(define-public python2-factory-boy
13094 (package-with-python2 python-factory-boy))
13095
13096(define-public python-translate-toolkit
13097 (package
13098 (name "python-translate-toolkit")
13099 (version "2.1.0")
13100 (source
13101 (origin
13102 (method url-fetch)
13103 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
13104 (sha256
13105 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
13106 (build-system python-build-system)
13107 (native-inputs
13108 `(("python-pytest" ,python-pytest)
13109 ("python-sphinx" ,python-sphinx)))
13110 (propagated-inputs
13111 `(("python-babel" ,python-babel)
13112 ("python-beautifulsoup4" ,python-beautifulsoup4)
13113 ("python-chardet" ,python-chardet)
13114 ("python-diff-match-patch" ,python-diff-match-patch)
13115 ("python-levenshtein" ,python-levenshtein)
13116 ("python-lxml" ,python-lxml)
13117 ("python-six" ,python-six)
13118 ("python-vobject" ,python-vobject)
13119 ("python-pyyaml" ,python-pyyaml)))
13120 (arguments
13121 ;; TODO: tests are not run, because they end with
13122 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
13123 ;; 'parse_funcs'
13124 ;; during test setup.
13125 `(#:tests? #f))
18919cf9 13126 (home-page "https://toolkit.translatehouse.org")
44d10b1f
RW
13127 (synopsis "Tools and API for translation and localization engineering")
13128 (description
13129 "Tools and API for translation and localization engineering. It contains
13130several utilities, as well as an API for building localization tools.")
13131 (license license:gpl2+)))
13132
13133(define-public python2-translate-toolkit
13134 (package-with-python2 python-translate-toolkit))
13135
13136(define-public python-packaging
13137 (package
13138 (name "python-packaging")
94295903 13139 (version "19.0")
44d10b1f
RW
13140 (source
13141 (origin
13142 (method url-fetch)
13143 (uri (pypi-uri "packaging" version))
13144 (sha256
13145 (base32
94295903 13146 "1brjhygq9dz6x1kdljivkjfldi3qf5rbkqgck1bpgv9qpv8ab60c"))))
44d10b1f
RW
13147 (build-system python-build-system)
13148 (arguments
13149 `(#:phases (modify-phases %standard-phases
13150 (replace 'check
13151 (lambda _ (invoke "py.test" "-vv"))))))
13152 (native-inputs
13153 `(("python-pretend" ,python-pretend)
13154 ("python-pytest" ,python-pytest)))
13155 (propagated-inputs
13156 `(("python-pyparsing" ,python-pyparsing)
13157 ("python-six" ,python-six)))
13158 (home-page "https://github.com/pypa/packaging")
13159 (synopsis "Core utilities for Python packages")
13160 (description "Packaging is a Python module for dealing with Python packages.
13161It offers an interface for working with package versions, names, and dependency
13162information.")
13163 ;; From 'LICENSE': This software is made available under the terms of
13164 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
13165 ;; Contributions to this software is made under the terms of *both* these
13166 ;; licenses.
13167 (license (list license:asl2.0 license:bsd-2))))
13168
13169(define-public python2-packaging
13170 (package-with-python2 python-packaging))
13171
13172(define-public python-relatorio
13173 (package
13174 (name "python-relatorio")
13175 (version "0.8.0")
13176 (source
13177 (origin
13178 (method url-fetch)
13179 (uri (pypi-uri "relatorio" version))
13180 (sha256
13181 (base32
13182 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
13183 (build-system python-build-system)
13184 (propagated-inputs
13185 `(("python-lxml" ,python-lxml)
13186 ("python-genshi" ,python-genshi)))
13187 (native-inputs
13188 `(("python-magic" ,python-magic)))
13189 (home-page "https://relatorio.tryton.org/")
13190 (synopsis "Templating library able to output ODT and PDF files")
13191 (description "Relatorio is a templating library which provides a way to
13192easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
13193for more filetypes can be easily added by creating plugins for them.")
13194 (license license:gpl3+)))
13195
13196(define-public python2-relatorio
13197 (package-with-python2 python-relatorio))
13198
13199(define-public python-radon
13200 (package
13201 (name "python-radon")
13202 (version "2.2.0")
13203 (source
13204 (origin
13205 (method url-fetch)
13206 (uri (pypi-uri "radon" version))
13207 (sha256
13208 (base32
13209 "07gq5hq4nrffxnlnksws9hrx7fd001gam63j62i82gyfr23gvdym"))))
13210 (build-system python-build-system)
13211 (arguments
13212 `(#:phases (modify-phases %standard-phases
13213 (replace 'check
13214 (lambda _
13215 (invoke "python" "radon/tests/run.py"))))))
13216 (propagated-inputs
13217 `(("python-colorama" ,python-colorama)
13218 ("python-flake8-polyfill" ,python-flake8-polyfill)
13219 ("python-mando" ,python-mando)))
13220 (native-inputs
13221 `(("python-pytest" ,python-pytest)
13222 ("python-pytest-mock" ,python-pytest-mock)))
13223 (home-page "https://radon.readthedocs.org/")
13224 (synopsis "Code Metrics in Python")
13225 (description "Radon is a Python tool which computes various code metrics.
13226Supported metrics are:
13227@itemize @bullet
13228@item raw metrics: SLOC, comment lines, blank lines, &c.
13229@item Cyclomatic Complexity (i.e. McCabe’s Complexity)
13230@item Halstead metrics (all of them)
13231@item the Maintainability Index (a Visual Studio metric)
13232@end itemize")
13233 (license license:expat)))
13234
13235(define-public python2-radon
13236 (package-with-python2 python-radon))
13237
13238(define-public python-sure
13239 (package
13240 (name "python-sure")
13241 (version "1.4.11")
13242 (source
13243 (origin
13244 (method url-fetch)
13245 (uri (pypi-uri "sure" version))
13246 (sha256
13247 (base32
13248 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
13249 (build-system python-build-system)
13250 (propagated-inputs
13251 `(("python-mock" ,python-mock)
13252 ("python-six" ,python-six)))
13253 (native-inputs
13254 `(("python-nose" ,python-nose)))
13255 (home-page "https://github.com/gabrielfalcao/sure")
13256 (synopsis "Automated testing library in python for python")
13257 (description
13258 "Sure is a python library that leverages a DSL for writing assertions.
13259Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
13260 (license license:gpl3+)))
13261
13262(define-public python2-sure
13263 (package-with-python2 python-sure))
13264
13265(define-public python2-couleur
13266 ;; This package does not seem to support python3 at all, hence,
13267 ;; only the python2 variant definition is provided.
13268 (package
13269 (name "python2-couleur")
13270 (version "0.6.2")
13271 (source
13272 (origin
13273 (method url-fetch)
13274 (uri (pypi-uri "couleur" version))
13275 (sha256
13276 (base32
13277 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
13278 (build-system python-build-system)
13279 (arguments
13280 `(#:python ,python-2))
13281 (home-page "https://github.com/gabrielfalcao/couleur")
13282 (synopsis
13283 "ANSI terminal tool for python, colored shell and other handy fancy features")
13284 (description
13285 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
13286terminal such as coloured output in the shell, overwriting output, indentation, etc.")
13287 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
13288 ;; https://github.com/gabrielfalcao/couleur/issues/11
13289 (license license:lgpl3+)))
13290
13291(define-public python-misaka
13292 (package
13293 (name "python-misaka")
0dcb3412 13294 (version "2.1.1")
44d10b1f
RW
13295 (source
13296 (origin
13297 (method url-fetch)
13298 (uri (pypi-uri "misaka" version))
13299 (sha256
13300 (base32
0dcb3412 13301 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
44d10b1f
RW
13302 (build-system python-build-system)
13303 (arguments
13304 `(;; Line 37 of setup.py calls self.run_command('develop')
13305 ;; in the 'check' phase. This command seems to be trying
13306 ;; to write to
13307 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
13308 ;; for which it does not have the permission to write.
13309 #:tests? #f))
13310 (propagated-inputs
13311 `(("python-cffi" ,python-cffi)))
13312 (home-page "https://github.com/FSX/misaka")
13313 (synopsis "Python binding for Hoedown")
13314 (description
13315 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
13316library written in C. It features a fast HTML renderer and functionality to make custom
13317renderers (e.g. man pages or LaTeX).")
13318 (license license:expat)))
13319
13320(define-public python2-misaka
13321 (package-with-python2 python-misaka))
13322
13323(define-public python2-steadymark
13324 ;; This is forced into being a python2 only variant
13325 ;; due to its dependence on couleur that has no support
13326 ;; for python3
13327 (package
13328 (name "python2-steadymark")
13329 (version "0.7.3")
13330 (source
13331 (origin
13332 (method url-fetch)
13333 (uri (pypi-uri "steadymark" version))
13334 (sha256
13335 (base32
13336 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
13337 (build-system python-build-system)
13338 (native-inputs
13339 `(("python-couleur" ,python2-couleur)
13340 ("python-sure" ,python2-sure)
13341 ("python-misaka" ,python2-misaka)))
13342 (arguments
13343 `(#:python ,python-2
13344 #:phases
13345 (modify-phases %standard-phases
13346 (add-before 'build 'patch-setup-py
13347 (lambda _
13348 ;; Update requirements from dependency==version
13349 ;; to dependency>=version
13350 (substitute* "setup.py"
13351 (("==") ">="))
13352 #t)))))
13353 (home-page "https://github.com/gabrielfalcao/steadymark")
13354 (synopsis "Markdown-based test runner for python")
13355 (description
13356 "@code{Steadymark} allows documentation to be written in github-flavoured
13357markdown. The documentation may contain snippets of code surrounded by python
13358code blocks and @code{Steadymark} will find these snippets and run them, making
13359sure that there are no old malfunctional examples in the documentation examples.")
13360 (license license:expat)))
13361
13362(define-public python-jsonpointer
13363 (package
13364 (name "python-jsonpointer")
13365 (version "1.10")
13366 (source
13367 (origin
13368 (method url-fetch)
13369 (uri (pypi-uri "jsonpointer" version))
13370 (sha256
13371 (base32
13372 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
13373 (build-system python-build-system)
13374 (home-page "https://github.com/stefankoegl/python-json-pointer")
13375 (synopsis "Identify specific nodes in a JSON document")
13376 (description "@code{jsonpointer} allows you to access specific nodes
13377by path in a JSON document (see RFC 6901).")
13378 (license license:bsd-3)))
13379
13380(define-public python2-jsonpointer
13381 (package-with-python2 python-jsonpointer))
13382
13383(define-public python-jsonpatch
13384 (package
13385 (name "python-jsonpatch")
13386 (version "1.16")
13387 (source
13388 (origin
13389 (method url-fetch)
13390 ;; pypi version lacks tests.js
13391 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
13392 "archive/v" version ".tar.gz"))
13393 (file-name (string-append name "-" version ".tar.gz"))
13394 (sha256
13395 (base32
13396 "085ykisl8v7mv9h7hvhdy3l2fjzs4214gx32r5k6nx4f76hbv6y5"))))
13397 (build-system python-build-system)
13398 (native-inputs
13399 `(("python-jsonpointer" ,python-jsonpointer)))
13400 (home-page "https://github.com/stefankoegl/python-json-patch")
13401 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
13402 (description "@code{jsonpatch} is a library and program that allows
13403applying JSON Patches according to RFC 6902.")
13404 (license license:bsd-3)))
13405
13406(define-public python2-jsonpatch
13407 (package-with-python2 python-jsonpatch))
13408
13409(define-public python-jsonpatch-0.4
13410 (package (inherit python-jsonpatch)
13411 (name "python-jsonpatch")
13412 (version "0.4")
13413 (source
13414 (origin
13415 (method url-fetch)
13416 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
13417 "archive/v" version ".tar.gz"))
13418 (file-name (string-append name "-" version ".tar.gz"))
13419 (sha256
13420 (base32
13421 "0j0cd9z9zyp8kppp464jxrfgrnbgkzl1yi10i5gsv8yz6d95929d"))))))
13422
13423(define-public python2-jsonpatch-0.4
13424 (package-with-python2 python-jsonpatch-0.4))
13425
13426(define-public python-rfc3986
13427 (package
13428 (name "python-rfc3986")
13429 (version "1.1.0")
13430 (source (origin
13431 (method url-fetch)
13432 (uri (pypi-uri "rfc3986" version))
13433 (sha256
13434 (base32
13435 "06wlmysw83f75ff84zr1yr6n0shvc2xn1n1sb4iwzqap9hf5fn44"))))
13436 (build-system python-build-system)
13437 (arguments
13438 `(#:modules ((guix build utils)
13439 (guix build python-build-system)
13440 (ice-9 ftw)
13441 (srfi srfi-1)
13442 (srfi srfi-26))
13443 #:phases
13444 (modify-phases %standard-phases
13445 (replace 'check
13446 (lambda _
13447 (let ((cwd (getcwd)))
13448 (setenv "PYTHONPATH"
13449 (string-append cwd "/build/"
13450 (find (cut string-prefix? "lib" <>)
13451 (scandir (string-append cwd "/build")))
13452 ":"
13453 (getenv "PYTHONPATH")))
13454 (invoke "pytest" "-v")))))))
13455 (native-inputs
13456 `(("python-pytest" ,python-pytest)))
13457 (home-page "https://rfc3986.readthedocs.io/")
13458 (synopsis "Parse and validate URI references")
13459 (description
13460 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
13461validation and authority parsing. This module also supports RFC@tie{}6874
13462which adds support for zone identifiers to IPv6 addresses.")
13463 (license license:asl2.0)))
13464
13465(define-public python2-rfc3986
13466 (package-with-python2 python-rfc3986))
13467
13468(define-public python-rfc3987
13469 (package
13470 (name "python-rfc3987")
13471 (version "1.3.7")
13472 (source
13473 (origin
13474 (method url-fetch)
13475 (uri (pypi-uri "rfc3987" version))
13476 (sha256
13477 (base32
13478 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
13479 (build-system python-build-system)
13480 (home-page "https://pypi.python.org/pypi/rfc3987")
13481 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
13482 (description "@code{rfc3987} provides routines for parsing and
13483validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
13484 (license license:gpl3+)))
13485
13486(define-public python2-rfc3987
13487 (package-with-python2 python-rfc3987))
13488
13489(define-public python-validate-email
13490 (package
13491 (name "python-validate-email")
13492 (version "1.3")
13493 (source
13494 (origin
13495 (method url-fetch)
13496 (uri (pypi-uri "validate_email" version))
13497 (sha256
13498 (base32
13499 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
13500 (build-system python-build-system)
13501 (home-page "https://github.com/syrusakbary/validate_email")
13502 (synopsis "Verifies if an email address is valid and really exists")
13503 (description "@code{validate_email} can be used to verify if an email
13504address is valid and really exists.")
13505 (license license:lgpl3+)))
13506
13507(define-public python2-validate-email
13508 (package-with-python2 python-validate-email))
13509
13510(define-public python-flex
13511 (package
13512 (name "python-flex")
13513 (version "6.10.0")
13514 (source
13515 (origin
13516 (method url-fetch)
13517 (uri (pypi-uri "flex" version))
13518 (sha256
13519 (base32
13520 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
13521 (build-system python-build-system)
13522 (propagated-inputs
13523 `(("python-click" ,python-click)
13524 ("python-iso8601" ,python-iso8601)
13525 ("python-jsonpointer" ,python-jsonpointer)
13526 ("python-pyyaml" ,python-pyyaml)
13527 ("python-requests" ,python-requests)
13528 ("python-rfc3987" ,python-rfc3987)
13529 ("python-six" ,python-six)
13530 ("python-validate-email" ,python-validate-email)))
13531 (home-page "https://github.com/pipermerriam/flex")
13532 (synopsis "Validates Swagger schemata")
13533 (description "@code{flex} can be used to validate Swagger schemata.")
13534 (license license:bsd-3)))
13535
13536(define-public python2-flex
13537 (package-with-python2 python-flex))
13538
13539(define-public python-marshmallow
13540 (package
13541 (name "python-marshmallow")
13542 (version "3.0.0b14")
13543 (source
13544 (origin
13545 (method url-fetch)
13546 (uri (pypi-uri "marshmallow" version))
13547 (sha256
13548 (base32
13549 "1digk3f5cfk7wmlka65mc7bzsd96pbsgcsvp6pimd5b4ff9zb5p3"))))
13550 (build-system python-build-system)
13551 (propagated-inputs
13552 `(("python-dateutil" ,python-dateutil)
13553 ("python-simplejson" ,python-simplejson)))
13554 (native-inputs
13555 `(("python-pytest" ,python-pytest)
13556 ("python-pytz" ,python-pytz)))
13557 (home-page "https://github.com/marshmallow-code/marshmallow")
13558 (synopsis "Convert complex datatypes to and from native
13559Python datatypes.")
13560 (description "@code{marshmallow} provides a library for converting
13561complex datatypes to and from native Python datatypes.")
13562 (license license:expat)))
13563
13564(define-public python2-marshmallow
13565 (package-with-python2 python-marshmallow))
13566
13567(define-public python-apispec
13568 (package
13569 (name "python-apispec")
13570 (version "0.25.3")
13571 (source
13572 (origin
13573 (method url-fetch)
13574 (uri (pypi-uri "apispec" version))
13575 (sha256
13576 (base32
13577 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
13578 (build-system python-build-system)
13579 (propagated-inputs
13580 `(("python-pyyaml" ,python-pyyaml)))
13581 (native-inputs
13582 `(("python-pytest" ,python-pytest)
13583 ("python-flask" ,python-flask)
13584 ("python-marshmallow" ,python-marshmallow)
13585 ("python-tornado" ,python-tornado)
13586 ("python-bottle" ,python-bottle)
13587 ("python-mock" ,python-mock)))
13588 (home-page "https://github.com/marshmallow-code/apispec")
13589 (synopsis "Swagger 2.0 API specification generator")
13590 (description "@code{python-apispec} is a pluggable API specification
13591generator. Currently supports the OpenAPI specification (f.k.a.
13592Swagger 2.0).")
13593 (license license:expat)))
13594
13595(define-public python2-apispec
13596 (package-with-python2 python-apispec))
13597
13598(define-public python-flasgger
13599 (package
13600 (name "python-flasgger")
13601 (version "0.6.3")
13602 (source
13603 (origin
1a04d421
TGR
13604 (method git-fetch)
13605 (uri (git-reference
13606 (url "https://github.com/rochacbruno/flasgger.git")
13607 (commit version)))
13608 (file-name (git-file-name name version))
44d10b1f 13609 (sha256
1a04d421 13610 (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn"))))
44d10b1f
RW
13611 (build-system python-build-system)
13612 (arguments
13613 `(#:phases
13614 (modify-phases %standard-phases
13615 (replace 'check
13616 (lambda* (#:key inputs outputs #:allow-other-keys)
13617 (substitute* "Makefile"
13618 (("flake8 flasgger --ignore=F403")
13619 "flake8 flasgger --ignore=E731,F403"))
13620 (setenv "PYTHONPATH" (string-append (getcwd)
13621 ":"
13622 (getenv "PYTHONPATH")))
ac599a09 13623 (invoke "py.test"))))))
44d10b1f
RW
13624 (propagated-inputs
13625 `(("python-flask" ,python-flask)
13626 ("python-pyyaml" ,python-pyyaml)
13627 ("python-jsonschema" ,python-jsonschema)
13628 ("python-mistune" ,python-mistune)
13629 ("python-six" ,python-six)))
13630 (native-inputs
13631 `(("python-decorator" ,python-decorator)
13632 ("python-flake8" ,python-flake8)
13633 ("python-flask-restful" ,python-flask-restful)
13634 ("python-flex" ,python-flex)
13635 ("python-pytest" ,python-pytest)
13636 ("python-pytest-cov" ,python-pytest-cov)
13637 ("python-marshmallow" ,python-marshmallow)
13638 ("python-apispec" ,python-apispec)))
13639 (home-page "https://github.com/rochacbruno/flasgger/")
13640 (synopsis "Extract Swagger specs from your Flask project")
13641 (description "@code{python-flasgger} allows extracting Swagger specs
13642from your Flask project. It is a fork of Flask-Swagger.")
13643 (license license:expat)))
13644
13645(define-public python2-flasgger
13646 (package-with-python2 python-flasgger))
13647
13648(define-public python-swagger-spec-validator
13649 (package
13650 (name "python-swagger-spec-validator")
fe9c5b1d 13651 (version "2.4.3")
44d10b1f
RW
13652 (source
13653 (origin
13654 (method url-fetch)
13655 (uri (pypi-uri "swagger-spec-validator" version))
13656 (sha256
13657 (base32
fe9c5b1d 13658 "11g627icrsqwazsncwi0sdvprcj6hwaayw5xk3xsj8d97bmrzqjp"))))
44d10b1f
RW
13659 (build-system python-build-system)
13660 (propagated-inputs
13661 `(("python-jsonschema" ,python-jsonschema)
fe9c5b1d 13662 ("python-pyyaml" ,python-pyyaml)
44d10b1f
RW
13663 ("python-six" ,python-six)))
13664 (home-page
13665 "https://github.com/Yelp/swagger_spec_validator")
13666 (synopsis "Validation of Swagger specifications")
13667 (description "@code{swagger_spec_validator} provides a library for
13668validating Swagger API specifications.")
13669 (license license:asl2.0)))
13670
13671(define-public python2-swagger-spec-validator
13672 (package-with-python2 python-swagger-spec-validator))
13673
13674(define-public python-apache-libcloud
13675 (package
13676 (name "python-apache-libcloud")
13677 (version "2.4.0")
13678 (source
13679 (origin
13680 (method url-fetch)
13681 (uri (pypi-uri "apache-libcloud" version))
13682 (sha256
13683 (base32
13684 "0daj3mkzw79v5zin2r1s2wkrz1hplfc16bwj4ss68i5qjq4l2p0j"))))
13685 (build-system python-build-system)
13686 (arguments
13687 `(#:phases
13688 (modify-phases %standard-phases
13689 (add-after 'unpack 'patch-ssh
13690 (lambda* (#:key inputs #:allow-other-keys)
13691 (substitute* "libcloud/compute/ssh.py"
13692 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
13693 "/bin/ssh" "'")))
13694 #t))
13695 (add-after 'unpack 'patch-tests
13696 (lambda _
13697 (substitute* "./libcloud/test/test_file_fixtures.py"
13698 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
13699 (("def _ascii") "def _raw_data(self, method, url, body, headers):
13700 return (httplib.OK,
13701 \"1234abcd\",
13702 {\"test\": \"value\"},
13703 httplib.responses[httplib.OK])
13704 def _ascii"))
13705 (substitute* "libcloud/test/compute/test_ssh_client.py"
13706 (("class ShellOutSSHClientTests")
13707 "@unittest.skip(\"Guix container doesn't have ssh service\")
13708class ShellOutSSHClientTests")
13709 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
13710 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
13711 (("'.xF0', '.x90', '.x8D', '.x88'")
13712 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
13713 #t))
13714 (add-before 'check 'copy-secret
13715 (lambda _
13716 (copy-file "libcloud/test/secrets.py-dist"
13717 "libcloud/test/secrets.py")
13718 #t)))))
13719 (inputs
13720 `(("openssh" ,openssh)))
13721 (propagated-inputs
13722 `(("python-paramiko" ,python-paramiko)
13723 ("python-requests" ,python-requests)))
13724 (native-inputs
13725 `(("python-lockfile" ,python-lockfile)
13726 ("python-mock" ,python-mock)
13727 ("python-pytest" ,python-pytest)
13728 ("python-pytest-runner" ,python-pytest-runner)
13729 ("python-requests-mock" ,python-requests-mock)))
13730 (home-page "https://libcloud.apache.org/")
13731 (synopsis "Unified Cloud API")
13732 (description "@code{libcloud} is a Python library for interacting with
13733many of the popular cloud service providers using a unified API.")
13734 (license license:asl2.0)))
13735
13736(define-public python2-apache-libcloud
13737 (package-with-python2 python-apache-libcloud))
13738
13739(define-public python-smmap2
13740 (package
13741 (name "python-smmap2")
13742 (version "2.0.3")
13743 (source
13744 (origin
13745 (method url-fetch)
13746 (uri (pypi-uri "smmap2" version))
13747 (sha256
13748 (base32
13749 "1hvn28p3zvxa98sbi9lrqvv2ps4q284j4jq9a619zw0m7yv0sly7"))))
13750 (build-system python-build-system)
13751 (native-inputs
13752 `(("python-nosexcover" ,python-nosexcover)))
13753 (home-page "https://github.com/Byron/smmap")
13754 (synopsis "Python sliding window memory map manager")
13755 (description "@code{smmap2} is a pure Python implementation of a sliding
13756window memory map manager.")
13757 (license license:bsd-3)))
13758
13759(define-public python2-smmap2
13760 (package-with-python2 python-smmap2))
13761
13762(define-public python-regex
13763 (package
13764 (name "python-regex")
c187c9d7 13765 (version "2019.04.14")
44d10b1f
RW
13766 (source (origin
13767 (method url-fetch)
13768 (uri (pypi-uri "regex" version))
13769 (sha256
13770 (base32
c187c9d7
BT
13771 "1a6hhfs6l6snr1z654ay6wzbmwdkmv282fzfkd5hk2d1n73y8v6m"))))
13772 ;; TODO: Fix and enable regex_test.py tests that complain about the
13773 ;; test.support module not existing.
44d10b1f
RW
13774 (build-system python-build-system)
13775 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
13776 (synopsis "Alternative regular expression module")
13777 (description "This regular expression implementation is backwards-
13778compatible with the standard @code{re} module, but offers additional
13779functionality like full case-folding for case-insensitive matches in Unicode.")
13780 (license license:psfl)))
13781
13782(define-public python2-regex
13783 (package-with-python2 python-regex))
13784
13785(define-public python2-pyopengl
13786 (package
13787 (name "python2-pyopengl")
13788 (version "3.1.0")
13789 (source
13790 (origin
13791 (method url-fetch)
13792 (uri (pypi-uri "PyOpenGL" version))
13793 (sha256
13794 (base32
13795 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
13796 (arguments
13797 `(#:python ,python-2))
13798 (build-system python-build-system)
13799 (home-page "http://pyopengl.sourceforge.net")
13800 (synopsis "Standard OpenGL bindings for Python")
13801 (description
13802 "PyOpenGL is the most common cross platform Python binding to OpenGL and
13803related APIs. The binding is created using the standard @code{ctypes}
13804library.")
13805 (license license:bsd-3)))
13806
13807(define-public python2-pyopengl-accelerate
13808 (package
13809 (inherit python2-pyopengl)
13810 (name "python2-pyopengl-accelerate")
13811 (version "3.1.0")
13812 (source
13813 (origin
13814 (method url-fetch)
13815 (uri (pypi-uri "PyOpenGL-accelerate" version))
13816 (sha256
13817 (base32
13818 "0464c1ifzk0k92lyndikmvzjgnx1y25r7bkkc8pnxm4kp1q4czwj"))))
13819 (synopsis "Acceleration code for PyOpenGL")
13820 (description
13821 "This is the Cython-coded accelerator module for PyOpenGL.")))
13822
13823(define-public python-rencode
13824 (package
13825 (name "python-rencode")
13826 (version "1.0.5")
13827 (source
13828 (origin
13829 (method url-fetch)
13830 (uri (pypi-uri "rencode" version))
13831 (sha256
13832 (base32
13833 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
13834 (build-system python-build-system)
13835 (arguments
13836 `(#:phases
13837 (modify-phases %standard-phases
13838 (add-before 'check 'delete-bogus-test
13839 ;; This test requires /home/aresch/Downloads, which is not provided by
13840 ;; the build environment.
13841 (lambda _
13842 (delete-file "rencode/t.py")
13843 #t)))))
13844 (native-inputs `(("pkg-config" ,pkg-config)
13845 ("python-cython" ,python-cython)))
13846 (home-page "https://github.com/aresch/rencode")
13847 (synopsis "Serialization of heterogeneous data structures")
13848 (description
13849 "The @code{rencode} module is a data structure serialization library,
13850similar to @code{bencode} from the BitTorrent project. For complex,
13851heterogeneous data structures with many small elements, r-encoding stake up
13852significantly less space than b-encodings. This version of rencode is a
13853complete rewrite in Cython to attempt to increase the performance over the
13854pure Python module.")
13855 (license license:bsd-3)))
13856
13857(define-public python2-rencode
13858 (package-with-python2 python-rencode))
13859
13860(define-public python-xenon
13861 (package
13862 (name "python-xenon")
13863 (version "0.5.4")
13864 (source
13865 (origin
13866 (method url-fetch)
13867 (uri (pypi-uri "xenon" version))
13868 (sha256
13869 (base32
13870 "029cbhysg2vr5n4jz8gpg2793f8wkwnqpr1qgv6c1dn685vy31mc"))))
13871 (build-system python-build-system)
13872 (native-inputs
13873 `(("python-pyyaml" ,python-pyyaml)
13874 ("python-radon" ,python-radon)
13875 ("python-requests" ,python-requests)
13876 ("python-flake8" ,python-flake8)
13877 ("python-tox" ,python-tox)))
13878 (arguments
13879 `(#:phases
13880 (modify-phases %standard-phases
13881 (add-before 'build 'patch-test-requirements
13882 (lambda _
13883 ;; Remove httpretty dependency for tests.
13884 (substitute* "setup.py"
13885 (("httpretty") ""))
13886 #t)))))
13887 (home-page "https://xenon.readthedocs.org/")
13888 (synopsis "Monitor code metrics for Python on your CI server")
13889 (description
13890 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
13891Ideally, @code{xenon} is run every time code is committed. Through command
13892line options, various thresholds can be set for the complexity of code. It
13893will fail (i.e. it will exit with a non-zero exit code) when any of these
13894requirements is not met.")
13895 (license license:expat)))
13896
13897(define-public python2-xenon
13898 (package-with-python2 python-xenon))
13899
13900(define-public python-pysocks
13901 (package
13902 (name "python-pysocks")
b8725cdf 13903 (version "1.7.0")
44d10b1f
RW
13904 (source
13905 (origin
13906 (method url-fetch)
13907 (uri (pypi-uri "PySocks" version))
13908 (sha256
13909 (base32
b8725cdf 13910 "0z4p31bpqm893cf87qqgb30k7nwd8kqfjwwjm5cvxb6zbyj1w0yr"))))
44d10b1f
RW
13911 (build-system python-build-system)
13912 (arguments `(#:tests? #f))
13913 (home-page "https://github.com/Anorov/PySocks")
13914 (synopsis "SOCKS client module")
13915 (description "@code{pysocks} is an updated and semi-actively maintained
13916version of @code{SocksiPy} with bug fixes and extra features.")
13917 (license license:bsd-3)))
13918
13919(define-public python2-pysocks
13920 (package-with-python2 python-pysocks))
13921
13922(define-public python-pydiff
13923 (package
13924 (name "python-pydiff")
13925 (version "0.2")
13926 (source
13927 (origin
13928 (method url-fetch)
13929 (uri (pypi-uri "pydiff" version))
13930 (sha256
13931 (base32
13932 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
13933 (build-system python-build-system)
13934 (home-page "https://github.com/myint/pydiff")
13935 (synopsis "Library to diff two Python files at the bytecode level")
13936 (description
13937 "@code{pydiff} makes it easy to look for actual code changes while
13938ignoring formatting changes.")
13939 (license license:expat)))
13940
13941(define-public python2-pydiff
13942 (package-with-python2 python-pydiff))
13943
13944(define-public python-tqdm
13945 (package
13946 (name "python-tqdm")
13947 (version "4.19.6")
13948 (source
13949 (origin
13950 (method url-fetch)
13951 (uri (pypi-uri "tqdm" version))
13952 (sha256
13953 (base32
13954 "1pw0ngm0zn9papdmkwipi3yih5c3di6d0w849bdmrraq4d2d9h2y"))))
13955 (build-system python-build-system)
13956 (native-inputs
13957 `(("python-flake8" ,python-flake8)
13958 ("python-nose" ,python-nose)
13959 ("python-coverage" ,python-coverage)))
13960 (home-page "https://github.com/tqdm/tqdm")
13961 (synopsis "Fast, extensible progress meter")
13962 (description
13963 "Make loops show a progress bar on the console by just wrapping any
13964iterable with @code{|tqdm(iterable)|}. Offers many options to define
13965design and layout.")
f875d76f
PL
13966 (license (list license:mpl2.0 license:expat))
13967 (properties `((python2-variant . ,(delay python2-tqdm))))))
44d10b1f
RW
13968
13969(define-public python2-tqdm
f875d76f
PL
13970 (let ((tqdm (package-with-python2
13971 (strip-python2-variant python-tqdm))))
13972 (package (inherit tqdm)
13973 (native-inputs `(("python2-functools32" ,python2-functools32)
13974 ,@(package-native-inputs tqdm))))))
44d10b1f
RW
13975
13976(define-public python-pkginfo
13977 (package
13978 (name "python-pkginfo")
13979 (version "1.4.2")
13980 (source
13981 (origin
13982 (method url-fetch)
13983 (uri (pypi-uri "pkginfo" version))
13984 (sha256
13985 (base32
13986 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
13987 (build-system python-build-system)
13988 (arguments
13989 ;; The tests are broken upstream.
13990 '(#:tests? #f))
13991 (home-page
13992 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
13993 (synopsis
13994 "Query metadatdata from sdists, bdists, and installed packages")
13995 (description
13996 "API to query the distutils metadata written in @file{PKG-INFO} inside a
13997source distriubtion (an sdist) or a binary distribution (e.g., created by
13998running bdist_egg). It can also query the EGG-INFO directory of an installed
13999distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
14000created by running @code{python setup.py develop}).")
14001 (license license:expat)))
14002
14003(define-public python2-pkginfo
14004 (package-with-python2 python-pkginfo))
14005
14006(define-public python-twine
14007 (package
14008 (name "python-twine")
14009 (version "1.9.1")
14010 (source
14011 (origin
14012 (method url-fetch)
14013 (uri (pypi-uri "twine" version))
14014 (sha256
14015 (base32
14016 "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a"))))
14017 (build-system python-build-system)
14018 (propagated-inputs
14019 `(("python-tqdm" ,python-tqdm)
14020 ("python-pkginfo" ,python-pkginfo)
14021 ("python-requests" ,python-requests)
14022 ("python-requests-toolbelt" ,python-requests-toolbelt)))
14023 (home-page "https://github.com/pypa/twine")
14024 (synopsis "Collection of utilities for interacting with PyPI")
14025 (description
14026 "@code{twine} currently supports registering projects and uploading
14027distributions. It authenticates the user over HTTPS, allows them to pre-sign
14028their files and supports any packaging format (including wheels).")
14029 (license license:asl2.0)))
14030
14031(define-public python2-twine
14032 (package-with-python2 python-twine))
14033
14034(define-public python-linecache2
14035 (package
14036 (name "python-linecache2")
14037 (version "1.0.0")
14038 (source
14039 (origin
14040 (method url-fetch)
14041 (uri (pypi-uri "linecache2" version))
14042 (sha256
14043 (base32
14044 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
14045 (build-system python-build-system)
14046 (arguments
14047 `(;; The tests depend on unittest2, and our version is a bit too old.
14048 #:tests? #f))
14049 (native-inputs
14050 `(("python-pbr" ,python-pbr-minimal)))
14051 (home-page
14052 "https://github.com/testing-cabal/linecache2")
14053 (synopsis "Backports of the linecache module")
14054 (description
14055 "The linecache module allows one to get any line from any file, while
14056attempting to optimize internally, using a cache, the common case where many
14057lines are read from a single file.")
14058 (license license:psfl)))
14059
14060(define-public python2-linecache2
14061 (package-with-python2 python-linecache2))
14062
14063(define-public python-traceback2
14064 (package
14065 (name "python-traceback2")
14066 (version "1.4.0")
14067 (source
14068 (origin
14069 (method url-fetch)
14070 (uri (pypi-uri "traceback2" version))
14071 (sha256
14072 (base32
14073 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
14074 (build-system python-build-system)
14075 (arguments
14076 `(;; python-traceback2 and python-unittest2 depend on one another.
14077 #:tests? #f))
14078 (native-inputs
14079 `(("python-pbr" ,python-pbr-minimal)))
14080 (propagated-inputs
14081 `(("python-linecache2" ,python-linecache2)))
14082 (home-page
14083 "https://github.com/testing-cabal/traceback2")
14084 (synopsis "Backports of the traceback module")
14085 (description
14086 "This module provides a standard interface to extract, format and print
14087stack traces of Python programs. It exactly mimics the behavior of the Python
14088interpreter when it prints a stack trace.")
14089 (license license:psfl)))
14090
14091(define-public python2-traceback2
14092 (package-with-python2 python-traceback2))
14093
14094(define-public python-ratelimiter
14095 (package
14096 (name "python-ratelimiter")
14097 (version "1.2.0")
14098 (source
14099 (origin
14100 (method url-fetch)
14101 (uri (pypi-uri "ratelimiter" version))
14102 (sha256
14103 (base32
14104 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
14105 (build-system python-build-system)
14106 (arguments
14107 '(#:tests? #f)) ; There are no tests in the pypi archive.
14108 (home-page "https://github.com/RazerM/ratelimiter")
14109 (synopsis "Simple rate limiting object")
14110 (description
14111 "The @code{ratelimiter} module ensures that an operation will not be
14112executed more than a given number of times during a given period.")
14113 (license license:asl2.0)))
14114
14115(define-public python2-ratelimiter
14116 (package-with-python2 python-ratelimiter))
14117
14118(define-public python-dukpy
14119 (package
14120 (name "python-dukpy")
14121 (version "0.3")
14122 (source
14123 (origin
5b77ebe1
TGR
14124 (method git-fetch)
14125 (uri (git-reference
14126 (url "https://github.com/kovidgoyal/dukpy.git")
14127 (commit (string-append "v" version))))
14128 (file-name (git-file-name name version))
44d10b1f 14129 (sha256
5b77ebe1 14130 (base32 "13h21nqzasv4zj32xs61brmc106pr2cx243672crcmwxxnjgaxls"))))
44d10b1f
RW
14131 (build-system python-build-system)
14132 (home-page "https://github.com/kovidgoyal/dukpy")
14133 (synopsis "Run JavaScript in python")
14134 (description
14135 "dukpy is a JavaScript runtime environment for Python using the duktape
14136embeddable JavaScript engine.")
14137 ;; Dukpy is licensed under MIT like the embedded duktape library,
14138 ;; with 'errors.c' as GPL3.
14139 (license (list license:expat license:gpl3))))
14140
14141(define-public python2-dukpy
14142 (package-with-python2 python-dukpy))
14143
14144(define-public python-jsonrpclib-pelix
14145 (package
14146 (name "python-jsonrpclib-pelix")
14147 (version "0.3.2")
14148 (source
14149 (origin
14150 (method url-fetch)
14151 (uri (pypi-uri "jsonrpclib-pelix" version))
14152 (sha256
14153 (base32
14154 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
14155 (build-system python-build-system)
14156 (arguments
14157 `(#:tests? #f)) ; no tests in PyPI tarball
14158 (home-page "https://github.com/tcalmant/jsonrpclib/")
14159 (synopsis "JSON-RPC 2.0 client library for Python")
14160 (description
14161 "This library implements the JSON-RPC v2.0
14162specification (backwards-compatible) as a client library for Python. This
14163version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
14164services.")
14165 (license license:asl2.0)))
14166
14167(define-public python2-jsonrpclib-pelix
14168 (package-with-python2 python-jsonrpclib-pelix))
14169
14170(define-public python-setuptools-scm-git-archive
14171 (package
14172 (name "python-setuptools-scm-git-archive")
14173 (version "1.0")
14174 (source
14175 (origin
14176 (method url-fetch)
14177 (uri (pypi-uri "setuptools_scm_git_archive" version))
14178 (sha256
14179 (base32
14180 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
14181 (build-system python-build-system)
14182 (native-inputs
14183 `(("python-pytest" ,python-pytest)))
14184 (propagated-inputs
14185 `(("python-setuptools-scm" ,python-setuptools-scm)))
14186 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
14187 (synopsis "Setuptools_scm plugin for git archives")
14188 (description
14189 "The setuptools_scm_git_archive package is a plugin to
14190setuptools_scm, which supports obtaining versions from git archives that
14191belong to tagged versions.")
14192 (license license:expat)))
14193
14194(define-public python2-setuptools-scm-git-archive
14195 (package-with-python2 python-setuptools-scm-git-archive))
14196
724a350c
RW
14197(define-public python-setuptools-git
14198 (package
14199 (name "python-setuptools-git")
14200 (version "1.2")
14201 (source
14202 (origin
14203 (method url-fetch)
14204 (uri (pypi-uri "setuptools-git" version))
14205 (sha256
14206 (base32
14207 "0i84qjwp5m0l9qagdjww2frdh63r37km1c48mrvbmaqsl1ni6r7z"))))
14208 (build-system python-build-system)
14209 (arguments
14210 `(#:phases
14211 (modify-phases %standard-phases
14212 ;; This is needed for tests.
14213 (add-after 'unpack 'configure-git
14214 (lambda _
14215 (setenv "HOME" "/tmp")
14216 (invoke "git" "config" "--global" "user.email" "guix")
14217 (invoke "git" "config" "--global" "user.name" "guix")
14218 #t)))))
14219 (native-inputs
14220 `(("git" ,git-minimal)))
14221 (home-page "https://github.com/msabramo/setuptools-git")
14222 (synopsis "Setuptools revision control system plugin for Git")
14223 (description
14224 "This package provides a plugin for Setuptools for revision control with
14225Git.")
14226 (license license:bsd-3)))
14227
44d10b1f
RW
14228(define-public python-pyclipper
14229 (package
14230 (name "python-pyclipper")
ff3d1b99 14231 (version "1.1.0.post3")
44d10b1f
RW
14232 (source
14233 (origin
14234 (method url-fetch)
14235 (uri (pypi-uri "pyclipper" version ".zip"))
14236 (sha256
ff3d1b99 14237 (base32 "164yksvqwqvwzh8f8lq92asg87hd8rvcy2xb5vm4y4ccvd5xgb7i"))
44d10b1f
RW
14238 (modules '((guix build utils)))
14239 (snippet
14240 '(begin
14241 ;; This file is generated by Cython.
14242 (delete-file "pyclipper/pyclipper.cpp") #t))))
14243 (build-system python-build-system)
14244 (arguments
14245 `(#:phases
14246 (modify-phases %standard-phases
14247 (add-before 'build 'cythonize-sources
14248 (lambda _
14249 (with-directory-excursion "pyclipper"
14250 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
14251 (propagated-inputs
14252 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
14253 (native-inputs
14254 `(("python-cython" ,python-cython)
14255 ("python-pytest" ,python-pytest)
14256 ("python-pytest-runner" ,python-pytest-runner)
14257 ("python-unittest2" ,python-unittest2)
14258 ("unzip" ,unzip)))
14259 (home-page "https://github.com/greginvm/pyclipper")
14260 (synopsis "Wrapper for Angus Johnson's Clipper library")
14261 (description
14262 "Pyclipper is a Cython wrapper for the C++ translation of the
14263Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
14264 (license license:expat)))
14265
14266(define-public python2-pyclipper
14267 (package-with-python2 python-pyclipper))
14268
14269(define-public python2-booleanoperations
14270 (package
14271 (name "python2-booleanoperations")
14272 (version "0.7.1")
14273 (source
14274 (origin
14275 (method url-fetch)
14276 (uri (pypi-uri "booleanOperations" version ".zip"))
14277 (sha256
14278 (base32
14279 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
14280 (build-system python-build-system)
14281 (arguments
14282 `(#:python ,python-2))
14283 (native-inputs
14284 `(("unzip" ,unzip)
14285 ("python2-pytest" ,python2-pytest)
14286 ("python2-pytest-runner" ,python2-pytest-runner)))
14287 (propagated-inputs
14288 `(("python-fonttools" ,python2-fonttools)
14289 ("python-pyclipper" ,python2-pyclipper)
14290 ("python-ufolib" ,python2-ufolib)))
14291 (home-page "https://github.com/typemytype/booleanOperations")
14292 (synopsis "Boolean operations on paths")
14293 (description
14294 "BooleanOperations provides a Python library that enables
14295boolean operations on paths.")
14296 (license license:expat)))
14297
14298(define-public python-tempdir
14299 (package
14300 (name "python-tempdir")
14301 (version "0.7.1")
14302 (source
14303 (origin
14304 (method url-fetch)
14305 (uri (pypi-uri "tempdir" version))
14306 (sha256
14307 (base32
14308 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
14309 (build-system python-build-system)
14310 (home-page "https://pypi.org/project/tempdir/")
14311 (arguments
14312 ;; the package has no tests
14313 '(#:tests? #f))
14314 (synopsis "Python library for managing temporary directories")
14315 (description
14316 "This library manages temporary directories that are automatically
14317deleted with all their contents when they are no longer needed. It is
14318particularly convenient for use in tests.")
14319 (license license:expat)))
14320
14321(define-public python2-tempdir
14322 (package-with-python2 python-tempdir))
14323
14324(define-public python-activepapers
14325 (package
14326 (name "python-activepapers")
14327 (version "0.2.2")
14328 (source
14329 (origin
14330 (method url-fetch)
14331 (uri (pypi-uri "ActivePapers.Py" version))
14332 (sha256
14333 (base32
14334 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
14335 (build-system python-build-system)
14336 (arguments
14337 `(#:modules ((ice-9 ftw)
14338 (srfi srfi-1)
14339 (guix build utils)
14340 (guix build python-build-system))
14341
14342 #:phases
14343 (modify-phases %standard-phases
14344 (add-after 'unpack 'delete-python2-code
14345 (lambda _
14346 (for-each delete-file
14347 '("lib/activepapers/builtins2.py"
14348 "lib/activepapers/standardlib2.py"
14349 "lib/activepapers/utility2.py"))))
14350 (replace 'check
14351 (lambda _
14352 ;; Deactivate the test cases that download files
14353 (setenv "NO_NETWORK_ACCESS" "1")
14354 ;; For some strange reason, some tests fail if nosetests runs all
14355 ;; test modules in a single execution. They pass if each test
14356 ;; module is run individually.
14357 (for-each (lambda (filename)
14358 (invoke "nosetests"
14359 (string-append "tests/" filename)))
14360 (scandir "tests"
14361 (lambda (filename)
14362 (string-suffix? ".py" filename)))))))))
14363 (native-inputs
14364 `(("python-tempdir" ,python-tempdir)
14365 ("python-nose" ,python-nose)))
14366 (propagated-inputs
14367 `(("python-h5py" ,python-h5py)))
14368 (home-page "http://www.activepapers.org/")
14369 (synopsis "Executable papers for scientific computing")
14370 (description
14371 "ActivePapers is a tool for working with executable papers, which
14372combine data, code, and documentation in single-file packages,
14373suitable for publication as supplementary material or on repositories
14374such as figshare or Zenodo.")
14375 (properties `((python2-variant . ,(delay python2-activepapers))))
14376 (license license:bsd-3)))
14377
14378(define-public python2-activepapers
14379 (let ((base (package-with-python2
14380 (strip-python2-variant python-activepapers))))
14381 (package
14382 (inherit base)
14383 (arguments
14384 (substitute-keyword-arguments (package-arguments base)
14385 ((#:phases phases)
14386 `(modify-phases ,phases
14387 (delete 'delete-python2-code)
14388 (add-after 'unpack 'delete-python3-code
14389 (lambda _
14390 (for-each delete-file
14391 '("lib/activepapers/builtins3.py"
14392 "lib/activepapers/standardlib3.py"
14393 "lib/activepapers/utility3.py")))))))))))
14394
14395(define-public python-semver
14396 (package
14397 (name "python-semver")
14398 (version "2.7.9")
14399 (source
14400 (origin
14401 (method url-fetch)
14402 (uri (pypi-uri "semver" version))
14403 (sha256
14404 (base32
14405 "0hhgqppchv59rqj0yzi1prdg2nfsywqmjsqy2rycyxm0hvxmbyqz"))))
14406 (build-system python-build-system)
14407 (arguments
14408 `(#:phases
14409 (modify-phases %standard-phases
14410 (add-after 'unpack 'patch-test-requirements
14411 (lambda _
14412 (substitute* "setup.py"
14413 ;; Our Python is new enough.
14414 (("'virtualenv<14\\.0\\.0'") "'virtualenv'"))
14415 #t)))))
14416 (native-inputs
14417 `(("python-tox" ,python-tox)
14418 ("python-virtualenv" ,python-virtualenv)))
14419 (home-page "https://github.com/k-bx/python-semver")
14420 (synopsis "Python helper for Semantic Versioning")
14421 (description "This package provides a Python library for
14422@url{Semantic Versioning, http://semver.org/}.")
14423 (license license:bsd-3)))
14424
14425(define-public python2-semver
14426 (package-with-python2 python-semver))
14427
14428(define-public python-pyro4
14429 (package
14430 (name "python-pyro4")
3ce91d44 14431 (version "4.77")
44d10b1f
RW
14432 (source
14433 (origin
14434 (method url-fetch)
14435 (uri (pypi-uri "Pyro4" version))
14436 (sha256
3ce91d44 14437 (base32 "0gsjg869y4gpy265s1gj1f2qy6jn5iz8r2bwwnq78r1r5yi15zib"))))
44d10b1f 14438 (build-system python-build-system)
3ce91d44
GL
14439 (arguments
14440 '(#:tests? #f)) ;FIXME: Some tests require network access.
14441 (native-inputs
14442 `(("python-cloudpickle" ,python-cloudpickle)
14443 ("python-dill" ,python-dill)
14444 ("python-msgpack" ,python-msgpack)))
44d10b1f
RW
14445 (propagated-inputs
14446 `(("python-serpent" ,python-serpent)))
14447 (home-page "https://pyro4.readthedocs.io")
14448 (synopsis "Distributed object middleware for Python")
14449 (description
14450 "Pyro enables you to build applications in which objects can talk to each
14451other over the network. You can just use normal Python method calls to call
14452objects on other machines, also known as remote procedure calls (RPC).")
14453 (license license:expat)))
14454
14455(define-public python2-pyro
14456 (package
14457 (name "python2-pyro")
14458 (version "3.16")
14459 (source
14460 (origin
14461 (method url-fetch)
14462 (uri (pypi-uri "Pyro" version))
14463 (file-name (string-append "Pyro-" version ".tar.gz"))
14464 (sha256
14465 (base32
14466 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
14467 (build-system python-build-system)
14468 (arguments
14469 ;; Pyro is not compatible with Python 3
14470 `(#:python ,python-2
14471 ;; Pyro has no test cases for automatic execution
14472 #:tests? #f))
14473 (home-page "http://pythonhosted.org/Pyro/")
14474 (synopsis "Distributed object manager for Python")
14475 (description "Pyro is a Distributed Object Technology system
14476written in Python that is designed to be easy to use. It resembles
14477Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
14478which is a system and language independent Distributed Object Technology
14479and has much more to offer than Pyro or RMI. Pyro 3.x is no
14480longer maintained. New projects should use Pyro4 instead, which
14481is the new Pyro version that is actively developed.")
14482 (license license:expat)))
14483
14484(define-public python2-scientific
14485 (package
14486 (name "python2-scientific")
14487 (version "2.9.4")
14488 (source
14489 (origin
c695f011
KH
14490 (method git-fetch)
14491 (uri (git-reference
14492 (url "https://github.com/khinsen/ScientificPython")
14493 (commit (string-append "rel" version))))
14494 (file-name (git-file-name name version))
44d10b1f
RW
14495 (sha256
14496 (base32
c695f011 14497 "16l48aj9fps9r7jyk8gpxppwrv0fqvlc13sayxskz28r5s6sjwbl"))))
44d10b1f
RW
14498 (build-system python-build-system)
14499 (inputs
14500 `(("netcdf" ,netcdf)))
14501 (propagated-inputs
14502 `(("python-numpy" ,python2-numpy-1.8)
14503 ("python-pyro" ,python2-pyro)))
14504 (arguments
14505 ;; ScientificPython is not compatible with Python 3
14506 `(#:python ,python-2
14507 #:tests? #f ; No test suite
14508 #:phases
14509 (modify-phases %standard-phases
14510 (replace 'build
14511 (lambda* (#:key inputs #:allow-other-keys)
77e61e25
RW
14512 (invoke "python" "setup.py" "build"
14513 (string-append "--netcdf_prefix="
14514 (assoc-ref inputs "netcdf"))))))))
c695f011 14515 (home-page "http://dirac.cnrs-orleans.fr/ScientificPython")
44d10b1f
RW
14516 (synopsis "Python modules for scientific computing")
14517 (description "ScientificPython is a collection of Python modules that are
14518useful for scientific computing. Most modules are rather general (Geometry,
14519physical units, automatic derivatives, ...) whereas others are more
14520domain-specific (e.g. netCDF and PDB support). The library is currently
14521not actively maintained and works only with Python 2 and NumPy < 1.9.")
14522 (license license:cecill-c)))
14523
14524(define-public python2-mmtk
14525 (package
14526 (name "python2-mmtk")
fe9b72c5 14527 (version "2.7.12")
44d10b1f
RW
14528 (source
14529 (origin
fe9b72c5
KH
14530 (method git-fetch)
14531 (uri (git-reference
14532 (url "https://github.com/khinsen/MMTK")
14533 (commit (string-append "rel" version))))
14534 (file-name (git-file-name name version))
44d10b1f
RW
14535 (sha256
14536 (base32
fe9b72c5 14537 "1fqwh3ba9jd42nigvn5shndgwb1zy7kh9520ncvqci7n8ffjr6p1"))))
44d10b1f
RW
14538 (build-system python-build-system)
14539 (native-inputs
14540 `(("netcdf" ,netcdf)))
14541 (propagated-inputs
14542 `(("python-scientific" ,python2-scientific)
14543 ("python-tkinter" ,python-2 "tk")))
14544 (arguments
14545 `(#:python ,python-2
14546 #:tests? #f
14547 #:phases
14548 (modify-phases %standard-phases
14549 (add-before 'build 'includes-from-scientific
14550 (lambda* (#:key inputs #:allow-other-keys)
14551 (mkdir-p "Include/Scientific")
14552 (copy-recursively
14553 (string-append
14554 (assoc-ref inputs "python-scientific")
14555 "/include/python2.7/Scientific")
14556 "Include/Scientific"))))))
14557 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
14558 (synopsis "Python library for molecular simulation")
14559 (description "MMTK is a library for molecular simulations with an emphasis
14560on biomolecules. It provides widely used methods such as Molecular Dynamics
14561and normal mode analysis, but also basic routines for implementing new methods
14562for simulation and analysis. The library is currently not actively maintained
14563and works only with Python 2 and NumPy < 1.9.")
14564 (license license:cecill-c)))
14565
14566(define-public python-phonenumbers
14567 (package
14568 (name "python-phonenumbers")
14569 (version "8.9.1")
14570 (source
14571 (origin
14572 (method url-fetch)
14573 (uri (pypi-uri "phonenumbers" version))
14574 (sha256
14575 (base32
14576 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
14577 (build-system python-build-system)
14578 (home-page
14579 "https://github.com/daviddrysdale/python-phonenumbers")
14580 (synopsis
14581 "Python library for dealing with international phone numbers")
14582 (description
14583 "This package provides a Python port of Google's libphonenumber library.")
14584 (license license:asl2.0)))
14585
14586(define-public python2-phonenumbers
14587 (package-with-python2 python-phonenumbers))
14588
14589(define-public python-send2trash
14590 (package
14591 (name "python-send2trash")
d9b0216b 14592 (version "1.5.0")
44d10b1f 14593 (source
d9b0216b 14594 (origin (method git-fetch)
44d10b1f 14595 ;; Source tarball on PyPI doesn't include tests.
d9b0216b
RW
14596 (uri (git-reference
14597 (url "https://github.com/hsoft/send2trash.git")
14598 (commit version)))
14599 (file-name (git-file-name name version))
44d10b1f
RW
14600 (sha256
14601 (base32
d9b0216b 14602 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
44d10b1f
RW
14603 (build-system python-build-system)
14604 (arguments
14605 '(#:phases
14606 (modify-phases %standard-phases
14607 (add-before 'check 'pre-check
14608 (lambda _
14609 (mkdir-p "/tmp/foo")
14610 (setenv "HOME" "/tmp/foo")
14611 #t)))))
14612 (home-page "https://github.com/hsoft/send2trash")
14613 (synopsis "Send files to the user's @file{~/Trash} directory")
14614 (description "This package provides a Python library to send files to the
14615user's @file{~/Trash} directory.")
20b3fde7 14616 (properties `((python2-variant . ,(delay python2-send2trash))))
44d10b1f
RW
14617 (license license:bsd-3)))
14618
14619(define-public python2-send2trash
14620 (package
f32164ab 14621 (inherit (package-with-python2 (strip-python2-variant python-send2trash)))
44d10b1f
RW
14622 (arguments
14623 (substitute-keyword-arguments (package-arguments python-send2trash)
14624 ((#:phases phases)
14625 `(modify-phases ,phases
14626 (add-before 'check 'setenv
14627 (lambda _
14628 (setenv "PYTHONPATH"
14629 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
4782a06f 14630 #t))))))))
44d10b1f
RW
14631
14632(define-public python-yapf
14633 (package
14634 (name "python-yapf")
14635 (version "0.24.0")
14636 (source
14637 (origin
14638 (method url-fetch)
14639 (uri (pypi-uri "yapf" version))
14640 (sha256
14641 (base32
14642 "0anwby0ydmyzcsgjc5dn1ryddwvii4dq61vck447q0n96npnzfyf"))))
14643 (build-system python-build-system)
14644 (home-page "https://github.com/google/yapf")
14645 (synopsis "Formatter for Python code")
14646 (description "YAPF is a formatter for Python code. It's based off of
14647@dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
14648takes the code and reformats it to the best formatting that conforms to the
14649style guide, even if the original code didn't violate the style guide.")
14650 (license license:asl2.0)))
14651
14652(define-public python2-yapf
14653 (package-with-python2 python-yapf))
14654
14655(define-public python-gyp
14656 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
14657 (revision "0"))
14658 (package
14659 (name "python-gyp")
14660 ;; Google does not release versions,
14661 ;; based on second most recent commit date.
14662 (version (git-version "0.0.0" revision commit))
14663 (source
14664 (origin
14665 ;; Google does not release tarballs,
14666 ;; git checkout is needed.
14667 (method git-fetch)
14668 (uri (git-reference
14669 (url "https://chromium.googlesource.com/external/gyp")
14670 (commit commit)))
14671 (file-name (git-file-name name version))
14672 (sha256
14673 (base32
14674 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
14675 (build-system python-build-system)
14676 (home-page "https://gyp.gsrc.io/")
14677 (synopsis "GYP is a Meta-Build system")
14678 (description
14679 "GYP builds build systems for large, cross platform applications.
14680It can be used to generate XCode projects, Visual Studio projects, Ninja build
14681files, and Makefiles.")
14682 (license license:bsd-3))))
14683
14684(define-public python2-gyp
14685 (package-with-python2 python-gyp))
14686
14687(define-public python-whatever
14688 (package
14689 (name "python-whatever")
97610a66 14690 (version "0.6")
44d10b1f
RW
14691 (source
14692 (origin
14693 (method url-fetch)
14694 (uri (string-append "https://github.com/Suor/whatever/archive/" version
14695 ".tar.gz"))
14696 (sha256
97610a66 14697 (base32 "1rchg9hrlvw4sn20lq1zspczr4x1pv57c02gv73igiqx1hqpy2nc"))
44d10b1f
RW
14698 (file-name (string-append name "-" version ".tar.gz"))))
14699 (build-system python-build-system)
14700 (arguments
14701 `(#:phases
14702 (modify-phases %standard-phases
14703 (replace 'check
14704 (lambda _
14705 (invoke "py.test"))))))
14706 (native-inputs
14707 `(("python-pytest" ,python-pytest)))
14708 (home-page "http://github.com/Suor/whatever")
14709 (synopsis "Make anonymous functions by partial application of operators")
14710 (description "@code{whatever} provides an easy way to make anonymous
14711functions by partial application of operators.")
14712 (license license:bsd-3)))
14713
14714(define-public python2-whatever
14715 (package-with-python2 python-whatever))
14716
14717(define-public python-funcy
14718 (package
14719 (name "python-funcy")
9e396ab8 14720 (version "1.11")
44d10b1f
RW
14721 (source
14722 (origin
a85c6027
TGR
14723 (method git-fetch)
14724 (uri (git-reference
14725 (url "https://github.com/Suor/funcy.git")
14726 (commit version)))
44d10b1f 14727 (sha256
a85c6027
TGR
14728 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
14729 (file-name (git-file-name name version))))
44d10b1f
RW
14730 (build-system python-build-system)
14731 (arguments
14732 `(#:phases
14733 (modify-phases %standard-phases
14734 (replace 'check
14735 (lambda _
14736 (invoke "py.test"))))))
14737 (native-inputs
14738 `(("python-pytest" ,python-pytest)
14739 ("python-whatever" ,python-whatever)))
14740 (home-page "http://github.com/Suor/funcy")
14741 (synopsis "Functional tools")
14742 (description "@code{funcy} is a library that provides functional tools.
14743Examples are:
14744@enumerate
14745@item merge - Merges collections of the same type
14746@item walk - Type-preserving map
14747@item select - Selects a part of a collection
14748@item take - Takes the first n items of a collection
14749@item first - Takes the first item of a collection
14750@item remove - Predicated-removes items of a collection
14751@item concat - Concatenates two collections
14752@item flatten - Flattens a collection with subcollections
14753@item distinct - Returns only distinct items
14754@item split - Predicated-splits a collection
14755@item split_at - Splits a collection at a given item
14756@item group_by - Groups items by group
14757@item pairwise - Pairs off adjacent items
14758@item partial - Partially-applies a function
14759@item curry - Curries a function
14760@item compose - Composes functions
14761@item complement - Complements a predicate
14762@item all_fn - \"all\" with predicate
14763@end enumerate")
14764 (license license:bsd-3)))
14765
14766(define-public python2-funcy
14767 (package-with-python2 python-funcy))
14768
14769(define-public python-isoweek
14770 (package
14771 (name "python-isoweek")
14772 (version "1.3.3")
14773 (source
14774 (origin
14775 (method url-fetch)
14776 (uri (pypi-uri "isoweek" version))
14777 (sha256
14778 (base32
14779 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
14780 (build-system python-build-system)
14781 (home-page "https://github.com/gisle/isoweek")
14782 (synopsis "Objects representing a week")
14783 (description "The @code{isoweek} module provide the class Week that
14784implements the week definition of ISO 8601. This standard also defines
14785a notation for identifying weeks; yyyyWww (where the W is a literal).
14786Week instances stringify to this form.")
14787 (license license:bsd-3)))
14788
14789(define-public python2-isoweek
14790 (package-with-python2 python-isoweek))
14791
14792(define-public python-tokenize-rt
14793 (package
14794 (name "python-tokenize-rt")
14795 (version "2.0.1")
14796 (source
14797 (origin
14798 (method url-fetch)
14799 (uri (pypi-uri "tokenize-rt" version))
14800 (sha256
14801 (base32
14802 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
14803 (build-system python-build-system)
14804 (home-page "https://github.com/asottile/tokenize-rt")
14805 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
14806 (description
14807 "This Python library is a wrapper around @code{tokenize} from the Python
14808standard library. It provides two additional tokens @code{ESCAPED_NL} and
14809@code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
14810and @code{tokens_to_src} to roundtrip.")
14811 (license license:expat)))
14812
14813(define-public python-future-fstrings
14814 (package
14815 (name "python-future-fstrings")
14816 (version "0.4.1")
14817 (source
14818 (origin
14819 (method url-fetch)
14820 (uri (pypi-uri "future_fstrings" version))
14821 (sha256
14822 (base32
14823 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
14824 (build-system python-build-system)
14825 (propagated-inputs
14826 `(("python-tokenize-rt" ,python-tokenize-rt)))
14827 (home-page "https://github.com/asottile/future-fstrings")
14828 (synopsis "Backport of fstrings to Python < 3.6")
14829 (description
14830 "This package provides a UTF-8 compatible encoding
14831@code{future_fstrings}, which performs source manipulation. It decodes the
14832source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
14833@code{f} strings.")
14834 (license license:expat)))
14835
dae2eb1c
MC
14836(define-public python-typed-ast
14837 (package
14838 (name "python-typed-ast")
bae89583 14839 (version "1.4.0")
dae2eb1c
MC
14840 (source
14841 (origin
bae89583
MO
14842 (method git-fetch)
14843 (uri (git-reference
14844 (url "https://github.com/python/typed_ast.git")
14845 (commit version)))
dae2eb1c 14846 (sha256
bae89583
MO
14847 (base32 "0l0hz809f7i356kmqkvfsaswiidb98j9hs9rrjnfawzqcbffzgyb"))
14848 (file-name (git-file-name name version))))
dae2eb1c
MC
14849 (build-system python-build-system)
14850 (arguments
14851 `(#:modules ((guix build utils)
14852 (guix build python-build-system)
14853 (ice-9 ftw)
14854 (srfi srfi-1)
14855 (srfi srfi-26))
14856 #:phases
14857 (modify-phases %standard-phases
14858 (replace 'check
14859 (lambda _
14860 (let ((cwd (getcwd)))
14861 (setenv "PYTHONPATH"
14862 (string-append cwd "/build/"
14863 (find (cut string-prefix? "lib" <>)
14864 (scandir (string-append cwd "/build")))
14865 ":"
14866 (getenv "PYTHONPATH"))))
14867 (invoke "pytest")
14868 #t)))))
14869 (native-inputs `(("python-pytest" ,python-pytest)))
14870 (home-page "https://github.com/python/typed_ast")
14871 (synopsis "Fork of Python @code{ast} modules with type comment support")
14872 (description "This package provides a parser similar to the standard
14873@code{ast} library. Unlike @code{ast}, the parsers in @code{typed_ast}
14874include PEP 484 type comments and are independent of the version of Python
14875under which they are run. The @code{typed_ast} parsers produce the standard
14876Python AST (plus type comments), and are both fast and correct, as they are
14877based on the CPython 2.7 and 3.7 parsers.")
14878 ;; See the file "LICENSE" for the details.
14879 (license (list license:psfl
14880 license:asl2.0
14881 license:expat)))) ;ast27/Parser/spark.py
14882
44d10b1f
RW
14883(define-public python-typing
14884 (package
14885 (name "python-typing")
14886 (version "3.6.6")
14887 (source
14888 (origin
14889 (method url-fetch)
14890 (uri (pypi-uri "typing" version))
14891 (sha256
14892 (base32
14893 "0ba9acs4awx15bf9v3nrs781msbd2nx826906nj6fqks2bvca9s0"))))
14894 (build-system python-build-system)
14895 (home-page "https://docs.python.org/3/library/typing.html")
14896 (synopsis "Type hints for Python")
14897 (description "This is a backport of the standard library @code{typing}
14898module to Python versions older than 3.5. Typing defines a standard notation
14899for Python function and variable type annotations. The notation can be used
14900for documenting code in a concise, standard format, and it has been designed
14901to also be used by static and runtime type checkers, static analyzers, IDEs
14902and other tools.")
14903 (license license:psfl)))
14904
14905(define-public python2-typing
14906 (package-with-python2 python-typing))
14907
f89d443b
VC
14908(define-public python-typing-extensions
14909 (package
14910 (name "python-typing-extensions")
14911 (version "3.7.2")
14912 (source
14913 (origin
14914 (method url-fetch)
14915 (uri (pypi-uri "typing_extensions" version))
14916 (sha256
14917 (base32
14918 "0wfsv71pvkyf2na938l579jh0v3kzl6g744ijgnahcwd4d9x0b7v"))))
14919 (build-system python-build-system)
14920 (home-page
14921 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
14922 (synopsis "Experimental type hints for Python")
14923 (description
14924 "The typing_extensions module contains additional @code{typing} hints not
14925yet present in the of the @code{typing} standard library.
14926Included are implementations of:
14927@enumerate
14928@item ClassVar
14929@item ContextManager
14930@item Counter
14931@item DefaultDict
14932@item Deque
14933@item NewType
14934@item NoReturn
14935@item overload
14936@item Protocol
14937@item runtime
14938@item Text
14939@item Type
14940@item TYPE_CHECKING
14941@item AsyncGenerator
14942@end enumerate\n")
14943 (license license:psfl)))
14944
44d10b1f
RW
14945(define-public bpython
14946 (package
14947 (name "bpython")
4de93b2f 14948 (version "0.18")
44d10b1f
RW
14949 (source
14950 (origin
14951 (method url-fetch)
14952 (uri (pypi-uri "bpython" version))
14953 (sha256
4de93b2f 14954 (base32 "1hl6frgvr2lqaxqczl8amg9xih32b3gzv429vs0qrjb8wpdj1k2n"))))
44d10b1f
RW
14955 (build-system python-build-system)
14956 (arguments
14957 `(#:phases
14958 (modify-phases %standard-phases
14959 (add-after 'unpack 'remove-failing-test
14960 (lambda _
14961 ;; Remove failing test. FIXME: make it pass
14962 (delete-file "bpython/test/test_args.py")
14963 #t))
14964 (add-after 'wrap 'add-aliases
14965 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
14966 (lambda* (#:key outputs #:allow-other-keys)
14967 (let ((out (assoc-ref outputs "out")))
14968 (for-each
14969 (lambda (old new)
14970 (symlink old (string-append out "/bin/" new)))
14971 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
14972 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
14973 #t)))))
14974 (propagated-inputs
14975 `(("python-pygments" ,python-pygments)
14976 ("python-requests" ,python-requests)
4de93b2f 14977 ("python-babel" ,python-babel) ; optional, for internationalization
44d10b1f
RW
14978 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
14979 ("python-greenlet" ,python-greenlet)
4de93b2f 14980 ("python-urwid" ,python-urwid) ; for bpython-urwid only
44d10b1f
RW
14981 ("python-six" ,python-six)))
14982 (native-inputs
14983 `(("python-sphinx" ,python-sphinx)
14984 ("python-mock" ,python-mock)))
14985 (home-page "https://bpython-interpreter.org/")
14986 (synopsis "Fancy interface to the Python interpreter")
14987 (description "Bpython is a fancy interface to the Python
14988interpreter. bpython's main features are
14989
14990@enumerate
14991@item in-line syntax highlighting,
14992@item readline-like autocomplete with suggestions displayed as you type,
14993@item expected parameter list for any Python function,
14994@item \"rewind\" function to pop the last line of code from memory and
14995 re-evaluate,
14996@item send the code you've entered off to a pastebin,
14997@item save the code you've entered to a file, and
14998@item auto-indentation.
14999@end enumerate")
15000 (license license:expat)))
15001
15002(define-public bpython2
15003 (let ((base (package-with-python2
15004 (strip-python2-variant bpython))))
15005 (package (inherit base)
15006 (name "bpython2")
15007 (arguments
15008 `(#:python ,python-2
15009 #:phases
15010 (modify-phases %standard-phases
15011 (add-after 'unpack 'remove-failing-test
15012 (lambda _
15013 ;; Remove failing test. FIXME: make it pass
15014 (delete-file "bpython/test/test_args.py")
15015 ;; Disable failing test-cases (renaming inhibits they are
15016 ;; discovered)
15017 (substitute* "bpython/test/test_curtsies_repl.py"
15018 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
15019 (string-append a "xxx_off_" b))
15020 (("^(\\s*def )(test_complex\\W)" _ a b)
15021 (string-append a "xxx_off_" b)))
15022 #t))
15023 (add-before 'build 'rename-scripts
15024 ;; rename the scripts to bypthon2, bpdb2, etc.
15025 (lambda _
15026 (substitute* "setup.py"
15027 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
15028 (string-append name "2" rest "\n"))
15029 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
15030 (string-append name "2" (or sub "") rest "\n")))
15031 #t))))))))
15032
15033(define-public python-pyinotify
15034 (package
15035 (name "python-pyinotify")
15036 (version "0.9.6")
15037 (source (origin
15038 (method url-fetch)
15039 (uri (pypi-uri "pyinotify" version))
15040 (sha256
15041 (base32
15042 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
15043 (build-system python-build-system)
15044 (arguments `(#:tests? #f)) ;no tests
15045 (home-page "https://github.com/seb-m/pyinotify")
15046 (synopsis "Python library for monitoring inotify events")
15047 (description
15048 "@code{pyinotify} provides a Python interface for monitoring
15049file system events on Linux.")
15050 (license license:expat)))
15051
15052(define-public python2-pyinotify
15053 (package-with-python2 python-pyinotify))
15054
15055;; Ada parser uses this version.
15056(define-public python2-quex-0.67.3
15057 (package
15058 (name "python2-quex")
15059 (version "0.67.3")
15060 (source
15061 (origin
15062 (method url-fetch)
15063 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
15064 (version-major+minor version)
15065 "/quex-" version ".zip"))
15066 (sha256
15067 (base32
15068 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
15069 (build-system python-build-system)
15070 (native-inputs
15071 `(("unzip" ,unzip)))
15072 (arguments
15073 `(#:python ,python-2
15074 #:tests? #f
15075 #:phases
15076 (modify-phases %standard-phases
15077 (delete 'configure)
15078 (delete 'build)
15079 (replace 'install
15080 (lambda* (#:key outputs #:allow-other-keys)
15081 (let* ((out (assoc-ref outputs "out"))
15082 (share/quex (string-append out "/share/quex"))
15083 (bin (string-append out "/bin")))
15084 (copy-recursively "." share/quex)
15085 (mkdir-p bin)
15086 (symlink (string-append share/quex "/quex-exe.py")
15087 (string-append bin "/quex"))
15088 #t))))))
15089 (native-search-paths
15090 (list (search-path-specification
15091 (variable "QUEX_PATH")
15092 (files '("share/quex")))))
15093 (home-page "http://quex.sourceforge.net/")
15094 (synopsis "Lexical analyzer generator in Python")
15095 (description "@code{quex} is a lexical analyzer generator in Python.")
15096 (license license:lgpl2.1+))) ; Non-military
15097
15098(define-public python2-quex
15099 (package (inherit python2-quex-0.67.3)
15100 (name "python2-quex")
15101 (version "0.68.1")
15102 (source
15103 (origin
15104 (method url-fetch)
15105 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
15106 (sha256
15107 (base32
15108 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
15109 (file-name (string-append name "-" version ".tar.gz"))))))
15110
15111(define-public python-more-itertools
15112 (package
15113 (name "python-more-itertools")
1b066827 15114 (version "7.1.0")
44d10b1f
RW
15115 (source
15116 (origin
15117 (method url-fetch)
15118 (uri (pypi-uri "more-itertools" version))
15119 (sha256
15120 (base32
1b066827 15121 "16phg2f2dvm6ci5wr49ncha5lmc0m2in3bsl33c61vzca4gkvd4b"))))
44d10b1f 15122 (build-system python-build-system)
44d10b1f
RW
15123 (home-page "https://github.com/erikrose/more-itertools")
15124 (synopsis "More routines for operating on iterables, beyond itertools")
15125 (description "Python's built-in @code{itertools} module implements a
15126number of iterator building blocks inspired by constructs from APL, Haskell,
15127and SML. @code{more-itertools} includes additional building blocks for
15128working with iterables.")
47f66348 15129 (properties `((python2-variant . ,(delay python2-more-itertools))))
44d10b1f
RW
15130 (license license:expat)))
15131
47f66348 15132;; The 5.x series are the last versions supporting Python 2.7.
44d10b1f 15133(define-public python2-more-itertools
47f66348
MB
15134 (package
15135 (inherit python-more-itertools)
15136 (name "python2-more-itertools")
15137 (version "5.0.0")
15138 (source (origin
15139 (method url-fetch)
15140 (uri (pypi-uri "more-itertools" version))
15141 (sha256
15142 (base32
15143 "1r12cm6mcdwdzz7d47a6g4l437xsvapdlgyhqay3i2nrlv03da9q"))))
15144 (arguments
15145 `(#:python ,python2-minimal))
15146 (propagated-inputs
15147 `(("python2-six" ,python2-six-bootstrap)))))
44d10b1f
RW
15148
15149(define-public python-latexcodec
15150 (package
15151 (name "python-latexcodec")
f3415ba5 15152 (version "1.0.7")
44d10b1f
RW
15153 (source
15154 (origin
15155 (method url-fetch)
15156 (uri (pypi-uri "latexcodec" version))
15157 (sha256
f3415ba5 15158 (base32 "0wnp3yqcgx0rpy8dz51vh75lbp2qif67da19zi7m3ca98n887hgb"))))
44d10b1f
RW
15159 (build-system python-build-system)
15160 (inputs
15161 `(("python-six" ,python-six)))
15162 (home-page "https://readthedocs.org/projects/latexcodec/")
15163 (synopsis "Work with LaTeX code in Python")
15164 (description "Lexer and codec to work with LaTeX code in Python.")
15165 (license license:expat)))
15166
15167(define-public python-pybtex
15168 (package
15169 (name "python-pybtex")
9441a9c1 15170 (version "0.22.2")
44d10b1f
RW
15171 (source
15172 (origin
15173 (method url-fetch)
15174 (uri (pypi-uri "pybtex" version))
15175 (sha256
9441a9c1 15176 (base32 "070wfcmxrd7xg1si421mi9150gmx2qwx431nwf69sq3hhmgnx080"))))
44d10b1f
RW
15177 (build-system python-build-system)
15178 (native-inputs
15179 `(("python-nose" ,python-nose)))
15180 (inputs
15181 `(("python-latexcodec" ,python-latexcodec)
15182 ("python-pyyaml" ,python-pyyaml)
15183 ("python-six" ,python-six)))
15184 (arguments
15185 `(#:test-target "nosetests"))
15186 (home-page "https://pybtex.org/")
15187 (synopsis "BibTeX-compatible bibliography processor")
15188 (description "Pybtex is a BibTeX-compatible bibliography processor written
15189in Python. You can simply type pybtex instead of bibtex.")
15190 (license license:expat)))
15191
15192(define-public python-onetimepass
15193 (package
15194 (name "python-onetimepass")
15195 (version "1.0.1")
15196 (source
15197 (origin
15198 (method url-fetch)
15199 (uri (pypi-uri "onetimepass" version))
15200 (sha256
15201 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
15202 (build-system python-build-system)
15203 (propagated-inputs `(("python-six" ,python-six)))
15204 (home-page "https://github.com/tadeck/onetimepass/")
15205 (synopsis "One-time password library")
15206 (description "Python one-time password library for HMAC-based (HOTP) and
15207time-based (TOTP) passwords.")
15208 (license license:expat)))
15209
15210(define-public python-parso
15211 (package
15212 (name "python-parso")
1475094a 15213 (version "0.5.1")
44d10b1f
RW
15214 (source
15215 (origin
15216 (method url-fetch)
15217 (uri (pypi-uri "parso" version))
15218 (sha256
15219 (base32
1475094a 15220 "171a9ivhxwsd52h1cgsz40zgzpgzscn7yqb7sdjhy8m1lzj0wsv6"))))
44d10b1f
RW
15221 (native-inputs
15222 `(("python-pytest" ,python-pytest)))
15223 (build-system python-build-system)
4eb97c25
MC
15224 (arguments
15225 `(#:phases (modify-phases %standard-phases
15226 (replace 'check
15227 (lambda _ (invoke "pytest" "-vv"))))))
44d10b1f
RW
15228 (home-page "https://github.com/davidhalter/parso")
15229 (synopsis "Python Parser")
15230 (description "Parso is a Python parser that supports error recovery and
15231round-trip parsing for different Python versions (in multiple Python versions).
15232Parso is also able to list multiple syntax errors in your Python file.")
15233 (license license:expat)))
15234
15235(define-public python2-parso
15236 (package-with-python2 python-parso))
15237
15238(define-public python-async-generator
15239 (package
15240 (name "python-async-generator")
94fcbf8d 15241 (version "1.10")
44d10b1f
RW
15242 (source
15243 (origin
15244 (method url-fetch)
15245 (uri (pypi-uri "async_generator" version))
15246 (sha256
15247 (base32
94fcbf8d 15248 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
44d10b1f
RW
15249 (build-system python-build-system)
15250 (native-inputs
15251 `(("python-pytest" ,python-pytest)))
15252 (home-page "https://github.com/python-trio/async_generator")
15253 (synopsis "Async generators and context managers for Python 3.5+")
15254 (description "@code{async_generator} back-ports Python 3.6's native async
15255generators and Python 3.7's context managers into Python 3.5.")
15256 ;; Dual licensed.
15257 (license (list license:expat license:asl2.0))))
15258
15259(define-public python-async-timeout
15260 (package
15261 (name "python-async-timeout")
15262 (version "3.0.1")
15263 (source
15264 (origin
15265 (method url-fetch)
15266 (uri (pypi-uri "async-timeout" version))
15267 (sha256
15268 (base32
15269 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
15270 (build-system python-build-system)
15271 (home-page "https://github.com/aio-libs/async_timeout/")
15272 (synopsis "Timeout context manager for asyncio programs")
15273 (description "@code{async-timeout} provides a timeout timeout context
15274manager compatible with @code{asyncio}.")
15275 (license license:asl2.0)))
15276
15277(define-public python-glob2
15278 (package
15279 (name "python-glob2")
4df49d19 15280 (version "0.7")
8fa2bcc7
TGR
15281 (source
15282 (origin
15283 (method git-fetch)
15284 (uri (git-reference
15285 (url "https://github.com/miracle2k/python-glob2.git")
4df49d19 15286 (commit (string-append "v" version))))
8fa2bcc7
TGR
15287 (file-name (git-file-name name version))
15288 (sha256
4df49d19 15289 (base32 "160nh2ay9lw2hi0rixpzb2k87r6ql56k0j2cm87lqz8xc8zbw919"))))
44d10b1f
RW
15290 (build-system python-build-system)
15291 (home-page "https://github.com/miracle2k/python-glob2/")
15292 (synopsis "Extended Version of the python buildin glob module")
15293 (description "This is an extended version of the Python
15294@url{http://docs.python.org/library/glob.html, built-in glob module} which
15295adds:
15296
15297@itemize
15298@item The ability to capture the text matched by glob patterns, and return
15299those matches alongside the file names.
15300@item A recursive @code{**} globbing syntax, akin for example to the
15301@code{globstar} option of Bash.
15302@item The ability to replace the file system functions used, in order to glob
15303on virtual file systems.
15304@item Compatible with Python 2 and Python 3 (tested with 3.3).
15305@end itemize
15306
15307Glob2 currently based on the glob code from Python 3.3.1.")
15308 (license license:bsd-2)))
15309
15310(define-public python2-glob2
15311 (package-with-python2 python-glob2))
15312
15313(define-public python-gipc
15314 (package
15315 (name "python-gipc")
15316 (version "0.6.0")
15317 (source
15318 (origin
15319 (method url-fetch)
15320 (uri (pypi-uri "gipc" version ".zip"))
15321 (sha256
15322 (base32
15323 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
15324 (build-system python-build-system)
15325 (native-inputs
15326 `(("unzip" ,unzip)))
15327 (propagated-inputs
15328 `(("python-gevent" ,python-gevent)))
15329 (home-page "http://gehrcke.de/gipc")
15330 (synopsis "Child process management in the context of gevent")
15331 (description "Usage of Python's multiprocessing package in a
15332gevent-powered application may raise problems. With @code{gipc},
15333process-based child processes can safely be created anywhere within a
15334gevent-powered application.")
15335 (license license:expat)))
15336
15337(define-public python2-gipc
15338 (package-with-python2 python-gipc))
15339
15340(define-public python-fusepy
15341 (package
15342 (name "python-fusepy")
15343 (version "2.0.4")
15344 (source
15345 (origin
15346 (method url-fetch)
15347 (uri (pypi-uri "fusepy" version))
15348 (sha256
15349 (base32
15350 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
15351 (build-system python-build-system)
15352 (arguments
15353 `(#:phases
15354 (modify-phases %standard-phases
15355 (add-before 'build 'set-library-file-name
15356 (lambda* (#:key inputs #:allow-other-keys)
15357 (let ((fuse (assoc-ref inputs "fuse")))
15358 (substitute* "fuse.py"
15359 (("find_library\\('fuse'\\)")
15360 (string-append "'" fuse "/lib/libfuse.so'")))
15361 #t))))))
15362 (propagated-inputs
15363 `(("fuse" ,fuse)))
15364 (home-page "https://github.com/fusepy/fusepy")
15365 (synopsis "Simple ctypes bindings for FUSE")
15366 (description "Python module that provides a simple interface to FUSE and
15367MacFUSE. The binding is created using the standard @code{ctypes} library.")
15368 (license license:isc)))
15369
15370(define-public python2-fusepy
15371 (package-with-python2 python-fusepy))
15372
15373(define-public python2-gdrivefs
15374 (package
15375 (name "python2-gdrivefs")
15376 (version "0.14.9")
15377 (source
15378 (origin
15379 (method url-fetch)
15380 (uri (pypi-uri "gdrivefs" version))
15381 (sha256
15382 (base32
15383 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
15384 (build-system python-build-system)
15385 (arguments
15386 `(#:python ,python-2
15387 #:phases
15388 (modify-phases %standard-phases
15389 (add-before 'build 'patch-setup-py
15390 (lambda _
15391 ;; Update requirements from dependency==version
15392 ;; to dependency>=version
15393 (substitute* "gdrivefs/resources/requirements.txt"
15394 (("==") ">="))
15395 #t)))))
15396 (native-inputs
15397 `(("python2-gipc" ,python2-gipc)
15398 ("python2-gevent" ,python2-gevent)
15399 ("python2-greenlet" ,python2-greenlet)
15400 ("python2-httplib2" ,python2-httplib2)
15401 ("python2-uritemplate" ,python2-uritemplate)
15402 ("python2-oauth2client" ,python2-oauth2client)
15403 ("python2-six" ,python2-six)))
15404 (propagated-inputs
15405 `(("python2-dateutil" ,python2-dateutil)
15406 ("python2-fusepy" ,python2-fusepy)
15407 ("python2-google-api-client" ,python2-google-api-client)))
15408 (home-page "https://github.com/dsoprea/GDriveFS")
15409 (synopsis "Mount Google Drive as a local file system")
15410 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
15411under Python 2.7.")
15412 (license license:gpl2)))
15413
15414(define-public pybind11
15415 (package
15416 (name "pybind11")
d478cc04 15417 (version "2.3.0")
44d10b1f
RW
15418 (source (origin
15419 (method git-fetch)
15420 (uri (git-reference
15421 (url "https://github.com/pybind/pybind11.git")
15422 (commit (string-append "v" version))))
15423 (sha256
15424 (base32
d478cc04 15425 "11b6dniri8m05spfd2a19irz82shf4sdca73566bniggrf3zclnf"))
44d10b1f
RW
15426 (file-name (git-file-name name version))))
15427 (build-system cmake-build-system)
15428 (native-inputs
15429 `(("python" ,python)
15430 ("python-pytest" ,python-pytest)))
15431 (arguments
15432 `(#:test-target "check"))
15433 (home-page "https://github.com/pybind/pybind11/")
15434 (synopsis "Seamless operability between C++11 and Python")
15435 (description "pybind11 is a lightweight header-only library that exposes
15436C++ types in Python and vice versa, mainly to create Python bindings of
15437existing C++ code. Its goals and syntax are similar to the excellent
15438Boost.Python library by David Abrahams: to minimize boilerplate code in
15439traditional extension modules by inferring type information using compile-time
15440introspection.")
15441 (license license:expat)))
15442
15443(define-public python-fasteners
15444 (package
15445 (name "python-fasteners")
15446 (version "0.14.1")
15447 (source
15448 (origin
15449 (method url-fetch)
15450 (uri (pypi-uri "fasteners" version))
15451 (sha256
15452 (base32
15453 "063y20kx01ihbz2mziapmjxi2cd0dq48jzg587xdsdp07xvpcz22"))))
15454 (build-system python-build-system)
15455 (propagated-inputs
15456 `(("python-monotonic" ,python-monotonic)
15457 ("python-six" ,python-six)
15458 ("python-testtools" ,python-testtools)))
15459 (home-page "https://github.com/harlowja/fasteners")
15460 (synopsis "Python package that provides useful locks")
15461 (description
15462 "This package provides a Python program that provides following locks:
15463
15464@itemize
15465@item Locking decorator
15466@item Reader-writer locks
15467@item Inter-process locks
15468@item Generic helpers
15469@end itemize\n")
15470 (properties `((python2-variant . ,(delay python2-fasteners))))
15471 (license license:asl2.0)))
15472
15473(define-public python2-fasteners
15474 (let ((base (package-with-python2 (strip-python2-variant python-fasteners))))
15475 (package
15476 (inherit base)
15477 (propagated-inputs
15478 `(("python2-futures" ,python2-futures)
15479 ,@(package-propagated-inputs base))))))
15480
15481(define-public python-requests-file
15482 (package
15483 (name "python-requests-file")
15484 (version "1.4.3")
15485 (source
15486 (origin
15487 (method url-fetch)
15488 (uri (pypi-uri "requests-file" version))
15489 (sha256
15490 (base32
15491 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
15492 (build-system python-build-system)
15493 (propagated-inputs
15494 `(("python-requests" ,python-requests)
15495 ("python-six" ,python-six)))
15496 (home-page
15497 "https://github.com/dashea/requests-file")
15498 (synopsis "File transport adapter for Requests")
15499 (description
15500 "Requests-File is a transport adapter for use with the Requests Python
52beae7b 15501library to allow local file system access via @code{file://} URLs.")
44d10b1f
RW
15502 (license license:asl2.0)))
15503
15504(define-public python2-requests-file
15505 (package-with-python2 python-requests-file))
15506
15507(define-public python-tldextract
15508 (package
15509 (name "python-tldextract")
15510 (version "2.2.0")
15511 (source
15512 (origin
15513 (method url-fetch)
15514 (uri (pypi-uri "tldextract" version))
15515 (sha256
15516 (base32
15517 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
15518 (build-system python-build-system)
15519 (native-inputs
15520 `(("python-pytest" ,python-pytest)
15521 ("python-responses" ,python-responses)))
15522 (propagated-inputs
15523 `(("python-idna" ,python-idna)
15524 ("python-requests" ,python-requests)
15525 ("python-requests-file" ,python-requests-file)))
15526 (home-page
15527 "https://github.com/john-kurkowski/tldextract")
15528 (synopsis
15529 "Separate the TLD from the registered domain and subdomains of a URL")
15530 (description
15531 "TLDExtract accurately separates the TLD from the registered domain and
15532subdomains of a URL, using the Public Suffix List. By default, this includes
15533the public ICANN TLDs and their exceptions. It can optionally support the
15534Public Suffix List's private domains as well.")
15535 (license license:bsd-3)))
15536
15537(define-public python2-tldextract
15538 (package-with-python2 python-tldextract))
15539
15540(define-public python-pynamecheap
15541 (package
15542 (name "python-pynamecheap")
15543 (version "0.0.3")
15544 (source
15545 (origin
15546 (method url-fetch)
15547 (uri (pypi-uri "PyNamecheap" version))
15548 (sha256
15549 (base32
15550 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
15551 (build-system python-build-system)
15552 (propagated-inputs
15553 `(("python-requests" ,python-requests)))
15554 (home-page
15555 "https://github.com/Bemmu/PyNamecheap")
15556 (synopsis
15557 "Namecheap API client in Python")
15558 (description
15559 "PyNamecheap is a Namecheap API client in Python.")
15560 (license license:expat)))
15561
15562(define-public python2-pynamecheap
15563 (package-with-python2 python-pynamecheap))
15564
15565(define-public python-dns-lexicon
15566 (package
15567 (name "python-dns-lexicon")
15568 (version "2.4.0")
15569 (source
15570 (origin
15571 (method url-fetch)
15572 (uri (pypi-uri "dns-lexicon" version))
15573 (sha256
15574 (base32
15575 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
15576 (build-system python-build-system)
15577 (arguments
15578 `(#:tests? #f)) ;requires internet access
15579 (propagated-inputs
15580 `(("python-future" ,python-future)
15581 ("python-pynamecheap" ,python-pynamecheap)
15582 ("python-requests" ,python-requests)
15583 ("python-tldextract" ,python-tldextract)
15584 ("python-urllib3" ,python-urllib3)))
15585 (home-page "https://github.com/AnalogJ/lexicon")
15586 (synopsis
15587 "Manipulate DNS records on various DNS providers")
15588 (description
15589 "Lexicon provides a way to manipulate DNS records on multiple DNS
15590providers in a standardized way. It has a CLI but it can also be used as a
15591Python library. It was designed to be used in automation, specifically with
15592Let's Encrypt.")
15593 (license license:expat)))
15594
15595(define-public python2-dns-lexicon
15596 (package-with-python2 python-dns-lexicon))
15597
15598(define-public python-commandlines
15599 (package
15600 (name "python-commandlines")
15601 (version "0.4.1")
15602 (source
15603 (origin
15604 (method url-fetch)
15605 (uri (pypi-uri "commandlines" version))
15606 (sha256
15607 (base32
15608 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
15609 (build-system python-build-system)
15610 (home-page "https://github.com/chrissimpkins/commandlines")
15611 (synopsis "Command line argument to object parsing library")
15612 (description
15613 "@code{Commandlines} is a Python library for command line application
15614development that supports command line argument parsing, command string
15615validation testing and application logic.")
15616 (license license:expat)))
15617
15618;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
15619;; python-numba. They have a very unflexible relationship.
15620(define-public python-numba
15621 (package
15622 (name "python-numba")
7757e6d8 15623 (version "0.42.0")
44d10b1f
RW
15624 (source
15625 (origin
15626 (method url-fetch)
15627 (uri (pypi-uri "numba" version))
15628 (sha256
15629 (base32
7757e6d8 15630 "03rqdfx0512lcri2bcpngx5k3jwfbqnanqj3n19c7d6h6hqxvq9x"))))
44d10b1f
RW
15631 (build-system python-build-system)
15632 (arguments
15633 `(#:modules ((guix build utils)
15634 (guix build python-build-system)
15635 (ice-9 ftw)
15636 (srfi srfi-1)
15637 (srfi srfi-26))
15638 #:phases
15639 (modify-phases %standard-phases
15640 (add-after 'unpack 'disable-proprietary-features
15641 (lambda _
15642 (setenv "NUMBA_DISABLE_HSA" "1")
15643 (setenv "NUMBA_DISABLE_CUDA" "1")
15644 #t))
15645 (add-after 'unpack 'remove-failing-tests
15646 (lambda _
15647 ;; FIXME: these tests fail for unknown reasons:
15648 ;; test_non_writable_pycache, test_non_creatable_pycache, and
15649 ;; test_frozen (all in numba.tests.test_dispatcher.TestCache).
15650 (substitute* "numba/tests/test_dispatcher.py"
15651 (("def test(_non_writable_pycache)" _ m)
15652 (string-append "def guix_skip" m))
15653 (("def test(_non_creatable_pycache)" _ m)
15654 (string-append "def guix_skip" m))
15655 (("def test(_frozen)" _ m)
15656 (string-append "def guix_skip" m)))
15657
15658 ;; These tests fail because we don't run the tests from the build
15659 ;; directory: test_setup_py_distutils, test_setup_py_setuptools
15660 ;; They ar in numba.tests.test_pycc.TestDistutilsSupport.
15661 (substitute* "numba/tests/test_pycc.py"
15662 (("def test(_setup_py_distutils|_setup_py_setuptools)" _ m)
15663 (string-append "def guix_skip" m)))
15664 #t))
15665 (replace 'check
15666 (lambda _
15667 (let ((cwd (getcwd)))
15668 (setenv "PYTHONPATH"
15669 (string-append cwd "/build/"
15670 (find (cut string-prefix? "lib" <>)
15671 (scandir (string-append cwd "/build")))
15672 ":"
15673 (getenv "PYTHONPATH")))
15674 ;; Something is wrong with the PYTHONPATH when running the
15675 ;; tests from the build directory, as it complains about not being
15676 ;; able to import certain modules.
15677 (with-directory-excursion "/tmp"
15678 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))
15679 #t)))))
15680 (propagated-inputs
15681 `(("python-llvmlite" ,python-llvmlite)
15682 ("python-numpy" ,python-numpy)
15683 ("python-singledispatch" ,python-singledispatch)))
15684 ;; Needed for tests.
15685 (inputs
15686 `(("python-jinja2" ,python-jinja2)
15687 ("python-pygments" ,python-pygments)))
15688 (home-page "https://numba.pydata.org")
15689 (synopsis "Compile Python code using LLVM")
15690 (description "Numba gives you the power to speed up your applications with
15691high performance functions written directly in Python. With a few
15692annotations, array-oriented and math-heavy Python code can be just-in-time
15693compiled to native machine instructions, similar in performance to C, C++ and
15694Fortran, without having to switch languages or Python interpreters.
15695
15696Numba works by generating optimized machine code using the LLVM compiler
15697infrastructure at import time, runtime, or statically (using the included pycc
15698tool).")
15699 (license license:bsd-3)))
15700
15701(define-public python-anndata
15702 (package
15703 (name "python-anndata")
8c9372c1 15704 (version "0.6.18")
44d10b1f
RW
15705 (source
15706 (origin
15707 (method url-fetch)
15708 (uri (pypi-uri "anndata" version))
15709 (sha256
15710 (base32
8c9372c1 15711 "03x83yjaccbqszj7x4fwwmpil0ai59yx64d1zmf2691za3j03w73"))))
44d10b1f
RW
15712 (build-system python-build-system)
15713 (propagated-inputs
15714 `(("python-h5py" ,python-h5py)
15715 ("python-natsort" ,python-natsort)
15716 ("python-pandas" ,python-pandas)
15717 ("python-scipy" ,python-scipy)))
15718 (home-page "https://github.com/theislab/anndata")
15719 (synopsis "Annotated data for data analysis pipelines")
15720 (description "Anndata is a package for simple (functional) high-level APIs
15721for data analysis pipelines. In this context, it provides an efficient,
15722scalable way of keeping track of data together with learned annotations and
15723reduces the code overhead typically encountered when using a mostly
15724object-oriented library such as @code{scikit-learn}.")
15725 (license license:bsd-3)))
15726
15727(define-public python-dill
15728 (package
15729 (name "python-dill")
c60b15cc 15730 (version "0.2.9")
44d10b1f
RW
15731 (source
15732 (origin
15733 (method url-fetch)
15734 (uri (pypi-uri "dill" version))
15735 (sha256
c60b15cc 15736 (base32 "0vwqyi6hyz2r29zydc78dqymkbc5y7gia16xcdh215cikxph9mpn"))))
44d10b1f 15737 (build-system python-build-system)
c60b15cc 15738 ;; FIXME: The check phase fails with "don't know how to make test from: …".
44d10b1f
RW
15739 (arguments '(#:tests? #f))
15740 (home-page "https://pypi.org/project/dill")
15741 (synopsis "Serialize all of Python")
15742 (description "Dill extends Python's @code{pickle} module for serializing
15743and de-serializing Python objects to the majority of the built-in Python
15744types. Dill provides the user the same interface as the @code{pickle} module,
15745and also includes some additional features. In addition to pickling Python
15746objects, @code{dill} provides the ability to save the state of an interpreter
61985d65 15747session in a single command. Hence, it would be feasible to save a
44d10b1f
RW
15748interpreter session, close the interpreter, ship the pickled file to another
15749computer, open a new interpreter, unpickle the session and thus continue from
15750the saved state of the original interpreter session.")
15751 (license license:bsd-3)))
15752
15753(define-public python-multiprocess
15754 (package
15755 (name "python-multiprocess")
15756 (version "0.70.6.1")
15757 (source
15758 (origin
15759 (method url-fetch)
15760 (uri (pypi-uri "multiprocess" version))
15761 (sha256
15762 (base32
15763 "1ip5caz67b3q0553mr8gm8xwsb8x500jn8ml0gihgyfy52m2ypcq"))))
15764 (build-system python-build-system)
15765 (propagated-inputs
15766 `(("python-dill" ,python-dill)))
15767 (home-page "https://pypi.org/project/multiprocess")
15768 (synopsis "Multiprocessing and multithreading in Python")
15769 (description
15770 "This package is a fork of the multiprocessing Python package, a package
15771which supports the spawning of processes using the API of the standard
15772library's @code{threading} module.")
15773 (license license:bsd-3)))
15774
15775(define-public python-toolz
15776 (package
15777 (name "python-toolz")
15778 (version "0.9.0")
15779 (source
15780 (origin
15781 (method url-fetch)
15782 (uri (pypi-uri "toolz" version))
15783 (sha256
15784 (base32
15785 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
15786 (build-system python-build-system)
15787 ;; FIXME: tests cannot be computed: "Can't perform this operation for
15788 ;; unregistered loader type"
15789 (arguments '(#:tests? #f))
15790 (home-page "https://github.com/pytoolz/toolz/")
15791 (synopsis "List processing tools and functional utilities")
15792 (description
15793 "This package provides a set of utility functions for iterators,
15794functions, and dictionaries.")
15795 (license license:bsd-3)))
15796
15797(define-public python2-toolz
15798 (package-with-python2 python-toolz))
15799
15800(define-public python-cytoolz
15801 (package
15802 (name "python-cytoolz")
15803 (version "0.9.0.1")
15804 (source
15805 (origin
15806 (method url-fetch)
15807 (uri (pypi-uri "cytoolz" version))
15808 (sha256
15809 (base32
15810 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
15811 (build-system python-build-system)
15812 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
15813 ;; 'exceptions'"
15814 (arguments '(#:tests? #f))
15815 (propagated-inputs
15816 `(("python-toolz" ,python-toolz)))
15817 (native-inputs
15818 `(("python-cython" ,python-cython)))
15819 (home-page "https://github.com/pytoolz/cytoolz")
15820 (synopsis "High performance functional utilities")
15821 (description
15822 "The cytoolz package implements the same API as provided by toolz. The
15823main differences are that @code{cytoolz} is faster and cytoolz offers a C API
15824that is accessible to other projects developed in Cython.")
15825 (license license:bsd-3)))
15826
15827(define-public python-sortedcontainers
15828 (package
15829 (name "python-sortedcontainers")
15830 (version "2.0.4")
15831 (source
15832 (origin
15833 (method url-fetch)
15834 (uri (pypi-uri "sortedcontainers" version))
15835 (sha256
15836 (base32
15837 "10hrk2k0hbf9x78vd3f0lj277m1yzfhzzxr0hja718liwb398wk0"))))
15838 (build-system python-build-system)
15839 (native-inputs
15840 `(("python-tox" ,python-tox)))
15841 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
15842 (synopsis "Sorted List, Sorted Dict, Sorted Set")
15843 (description
15844 "This package provides a sorted collections library, written in
15845pure-Python.")
15846 (license license:asl2.0)))
15847
15848(define-public python-cloudpickle
15849 (package
15850 (name "python-cloudpickle")
15851 (version "0.6.1")
15852 (source
15853 (origin
15854 (method url-fetch)
15855 (uri (pypi-uri "cloudpickle" version))
15856 (sha256
15857 (base32
15858 "1wdw89mlm7fqa3fm3ymskx05jrys66n8m1z1a8s0mss0799ahsgi"))))
15859 (build-system python-build-system)
15860 ;; FIXME: there are 5 errors in 122 tests:
15861 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.CloudPickleTest)
15862 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.CloudPickleTest)
15863 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.Protocol2CloudPickleTest)
15864 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.Protocol2CloudPickleTest)
15865 ;; ERROR: test_temp_file (tests.cloudpickle_file_test.CloudPickleFileTests)
15866 ;; TypeError: cannot serialize '_io.BufferedRandom' object
15867 (arguments '(#:tests? #f))
15868 (native-inputs
15869 `(("python-pytest" ,python-pytest)
15870 ("python-mock" ,python-mock)
15871 ("python-tornado" ,python-tornado)))
15872 (home-page "https://github.com/cloudpipe/cloudpickle")
15873 (synopsis "Extended pickling support for Python objects")
15874 (description
15875 "Cloudpickle makes it possible to serialize Python constructs not
15876supported by the default pickle module from the Python standard library. It
15877is especially useful for cluster computing where Python expressions are
15878shipped over the network to execute on remote hosts, possibly close to the
15879data.")
15880 (license license:bsd-3)))
15881
15882(define-public python2-cloudpickle
15883 (package-with-python2 python-cloudpickle))
15884
15885(define-public python-locket
15886 (package
15887 (name "python-locket")
15888 (version "0.2.0")
15889 (source
15890 (origin
15891 (method url-fetch)
15892 (uri (pypi-uri "locket" version))
15893 (sha256
15894 (base32
15895 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
15896 (build-system python-build-system)
15897 (home-page "https://github.com/mwilliamson/locket.py")
15898 (synopsis "File-based locks for Python")
15899 (description
15900 "Locket implements a lock that can be used by multiple processes provided
15901they use the same path.")
15902 (license license:bsd-2)))
15903
15904(define-public python2-locket
15905 (package-with-python2 python-locket))
15906
15907(define-public python-blosc
15908 (package
15909 (name "python-blosc")
15910 (version "1.5.1")
15911 (source
15912 (origin
15913 (method url-fetch)
15914 (uri (pypi-uri "blosc" version))
15915 (sha256
15916 (base32
15917 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
15918 (build-system python-build-system)
15919 ;; FIXME: all tests pass, but then this error is printed:
15920 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
15921 (arguments '(#:tests? #f))
15922 (propagated-inputs
15923 `(("python-numpy" ,python-numpy)))
15924 (home-page "https://github.com/blosc/python-blosc")
15925 (synopsis "Python wrapper for the Blosc data compressor library")
15926 (description "Blosc is a high performance compressor optimized for binary
15927data. It has been designed to transmit data to the processor cache faster
15928than the traditional, non-compressed, direct memory fetch approach via a
15929@code{memcpy()} system call.
15930
15931Blosc works well for compressing numerical arrays that contains data with
15932relatively low entropy, like sparse data, time series, grids with
15933regular-spaced values, etc.
15934
15935This Python package wraps the Blosc library.")
15936 (license license:bsd-3)))
15937
15938(define-public python2-blosc
15939 (package-with-python2 python-blosc))
15940
15941(define-public python-partd
15942 (package
15943 (name "python-partd")
15944 (version "0.3.9")
15945 (source
15946 (origin
15947 (method url-fetch)
15948 (uri (pypi-uri "partd" version))
15949 (sha256
15950 (base32
15951 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
15952 (build-system python-build-system)
15953 (propagated-inputs
15954 `(("python-blosc" ,python-blosc)
15955 ("python-locket" ,python-locket)
15956 ("python-numpy" ,python-numpy)
15957 ("python-pandas" ,python-pandas)
15958 ("python-pyzmq" ,python-pyzmq)
15959 ("python-toolz" ,python-toolz)))
15960 (home-page "https://github.com/dask/partd/")
15961 (synopsis "Appendable key-value storage")
15962 (description "Partd stores key-value pairs. Values are raw bytes. We
15963append on old values. Partd excels at shuffling operations.")
15964 (license license:bsd-3)))
15965
15966(define-public python2-partd
15967 (package-with-python2 python-partd))
15968
15969(define-public python-dask
15970 (package
15971 (name "python-dask")
0998175f 15972 (version "1.2.2")
44d10b1f
RW
15973 (source
15974 (origin
15975 (method url-fetch)
15976 (uri (pypi-uri "dask" version))
15977 (sha256
0998175f 15978 (base32 "0b29gvf96gmp20wicly3v3mhyc93zbm3mdv935fka6x0wax7cy2y"))))
44d10b1f
RW
15979 (build-system python-build-system)
15980 ;; A single test out of 5000+ fails. This test is marked as xfail when
15981 ;; pytest-xdist is used.
15982 (arguments
15983 `(#:phases
15984 (modify-phases %standard-phases
15985 (add-after 'unpack 'disable-broken-test
15986 (lambda _
15987 (substitute* "dask/tests/test_threaded.py"
15988 (("def test_interrupt\\(\\)" m)
15989 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
15990 m)))
15991 (when (which "python2")
15992 ;; This test fails with recent Pandas:
15993 ;; <https://github.com/dask/dask/issues/3794>.
15994 (substitute* "dask/dataframe/tests/test_dataframe.py"
15995 (("def test_info\\(\\)" m)
15996 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
15997 m))))
15998 #t))
15999 (replace 'check
16000 (lambda _ (invoke "pytest" "-vv"))))))
16001 (propagated-inputs
16002 `(("python-cloudpickle" ,python-cloudpickle)
16003 ("python-numpy" ,python-numpy)
16004 ("python-pandas" ,python-pandas)
16005 ("python-partd" ,python-partd)
16006 ("python-toolz" ,python-toolz)
16007 ("python-pyyaml" ,python-pyyaml)))
16008 (native-inputs
16009 `(("python-pytest" ,python-pytest)
16010 ("python-pytest-runner" ,python-pytest-runner)))
16011 (home-page "https://github.com/dask/dask/")
16012 (synopsis "Parallel computing with task scheduling")
16013 (description
16014 "Dask is a flexible parallel computing library for analytics. It
16015consists of two components: dynamic task scheduling optimized for computation,
16016and large data collections like parallel arrays, dataframes, and lists that
16017extend common interfaces like NumPy, Pandas, or Python iterators to
16018larger-than-memory or distributed environments. These parallel collections
16019run on top of the dynamic task schedulers. ")
16020 (license license:bsd-3)))
16021
16022(define-public python2-dask
16023 (package-with-python2 python-dask))
16024
16025(define-public python-ilinkedlist
16026 (package
16027 (name "python-ilinkedlist")
16028 (version "0.4.0")
16029 (source
16030 (origin
16031 (method url-fetch)
16032 (uri (pypi-uri "ilinkedlist" version))
16033 (sha256
16034 (base32
16035 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
16036 (build-system python-build-system)
16037 (native-inputs `(("python-pytest" ,python-pytest)))
16038 (inputs `(("python" ,python)))
16039 (home-page "https://github.com/luther9/ilinkedlist-py")
16040 (synopsis "Immutable linked list library")
16041 (description
16042 "This is a implementation of immutable linked lists for Python. It
16043contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
16044Since a linked list is treated as immutable, it is hashable, and its length
16045can be retrieved in constant time. Some of the terminology is inspired by
16046LISP. It is possible to create an improper list by creating a @code{Pair}
16047with a non-list @code{cdr}.")
16048 (license license:gpl3+)))
16049
16050(define-public python-readlike
16051 (package
16052 (name "python-readlike")
16053 (version "0.1.3")
16054 (source
16055 (origin
16056 (method url-fetch)
16057 (uri (pypi-uri "readlike" version))
16058 (sha256
16059 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
16060 (build-system python-build-system)
16061 (home-page "https://github.com/jangler/readlike")
16062 (synopsis "GNU Readline-like line editing module")
16063 (description
16064 "This Python module provides line editing functions similar to the default
16065Emacs-style ones of GNU Readline. Unlike the Python standard library's
16066@code{readline} package, this one allows access to those capabilties in settings
16067outside of a standard command-line interface. It is especially well-suited to
16068interfacing with Urwid, due to a shared syntax for describing key inputs.
16069
16070Currently, all stateless Readline commands are implemented. Yanking and history
16071are not supported.")
16072 (license license:expat)))
16073
16074(define-public python2-readlike
16075 (package-with-python2 python-readlike))
16076
16077(define-public python-reparser
16078 (package
16079 (name "python-reparser")
16080 (version "1.4.3")
16081 (source
16082 (origin
16083 (method url-fetch)
16084 (uri (pypi-uri "ReParser" version))
16085 (sha256
16086 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
16087 (build-system python-build-system)
16088 (home-page "https://github.com/xmikos/reparser")
16089 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
16090 (description
16091 "This Python library provides a simple lexer/parser for inline markup based
16092on regular expressions.")
16093 (license license:expat)))
16094
16095(define-public python2-reparser
16096 (let ((reparser (package-with-python2
16097 (strip-python2-variant python-reparser))))
16098 (package (inherit reparser)
16099 (propagated-inputs
16100 `(("python2-enum34" ,python2-enum34)
16101 ,@(package-propagated-inputs reparser))))))
16102
16103(define-public python-precis-i18n
16104 (package
16105 (name "python-precis-i18n")
16106 (version "1.0.0")
16107 (source
16108 (origin
16109 (method url-fetch)
16110 (uri (pypi-uri "precis_i18n" version))
16111 (sha256
16112 (base32
16113 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
16114 (build-system python-build-system)
16115 (home-page "https://github.com/byllyfish/precis_i18n")
16116 (synopsis "Implementation of the PRECIS framework")
16117 (description
16118 "This module implements the PRECIS Framework as described in RFC 8264,
16119RFC 8265 and RFC 8266.")
16120 (license license:expat)))
16121
d0446c4b
RW
16122(define-public python-absl-py
16123 (package
16124 (name "python-absl-py")
16125 (version "0.6.1")
16126 (source
16127 (origin
16128 (method url-fetch)
16129 (uri (pypi-uri "absl-py" version))
16130 (sha256
16131 (base32
16132 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
16133 (build-system python-build-system)
16134 (propagated-inputs
16135 `(("python-six" ,python-six)))
16136 (home-page "https://github.com/abseil/abseil-py")
16137 (synopsis "Abseil Python common libraries")
16138 (description
16139 "This package provides the Abseil Python Common Libraries, a collection
16140of Python libraries for building Python applications.")
16141 (license license:asl2.0)))
16142
81bed4e9
RW
16143(define-public python-astor
16144 (package
16145 (name "python-astor")
16146 (version "0.7.1")
16147 (source
16148 (origin
16149 (method url-fetch)
16150 (uri (pypi-uri "astor" version))
16151 (sha256
16152 (base32
16153 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
16154 (build-system python-build-system)
16155 ;; FIXME: There are two errors and two test failures.
16156 (arguments `(#:tests? #f))
16157 (home-page "https://github.com/berkerpeksag/astor")
39ee82ff 16158 (synopsis "Read and write Python ASTs")
81bed4e9 16159 (description "Astor is designed to allow easy manipulation of Python
39ee82ff 16160source via the Abstract Syntax Tree.")
81bed4e9
RW
16161 (license license:bsd-3)))
16162
39ee82ff
RW
16163(define-public python2-astor
16164 (package-with-python2 python-astor))
16165
22e623ae
RW
16166(define-public python-grpcio
16167 (package
16168 (name "python-grpcio")
16169 (version "1.17.1")
16170 (source
16171 (origin
16172 (method url-fetch)
16173 (uri (pypi-uri "grpcio" version))
16174 (sha256
16175 (base32
16176 "0qb9y6j83nxa6d4kc60i8yfgdm7a8ms7b54kncjzf5y7nsxp8rzx"))))
16177 (build-system python-build-system)
16178 (propagated-inputs
16179 `(("python-six" ,python-six)))
16180 (home-page "https://grpc.io")
16181 (synopsis "HTTP/2-based RPC framework")
16182 (description "This package provides a Python library for communicating
16183with the HTTP/2-based RPC framework gRPC.")
16184 (license license:asl2.0)))
16185
79869f80
RW
16186(define-public python-astunparse
16187 (package
16188 (name "python-astunparse")
47d79541 16189 (version "1.6.2")
79869f80
RW
16190 (source
16191 (origin
16192 (method url-fetch)
16193 (uri (pypi-uri "astunparse" version))
16194 (sha256
47d79541 16195 (base32 "0rzbc44xcvzjhhiy7wac96mgal5mcjz1mfq8rmvgswskf4kf9cys"))))
79869f80 16196 (build-system python-build-system)
47d79541 16197 (arguments '(#:tests? #f)) ; there are none
79869f80
RW
16198 (propagated-inputs
16199 `(("python-six" ,python-six)
16200 ("python-wheel" ,python-wheel)))
16201 (home-page "https://github.com/simonpercivall/astunparse")
16202 (synopsis "AST unparser for Python")
16203 (description "This package provides an AST unparser for Python. It is a
16204factored out version of @code{unparse} found in the Python source
16205distribution.")
16206 (license license:bsd-3)))
16207
2884aac0
RW
16208(define-public python-gast
16209 (package
16210 (name "python-gast")
bd300261 16211 (version "0.2.2")
2884aac0
RW
16212 (source
16213 (origin
16214 (method url-fetch)
16215 (uri (pypi-uri "gast" version))
16216 (sha256
bd300261 16217 (base32 "1w5dzdb3gpcfmd2s0b93d8gff40a1s41rv31458z14inb3s9v4zy"))))
2884aac0
RW
16218 (build-system python-build-system)
16219 (propagated-inputs
16220 `(("python-astunparse" ,python-astunparse)))
16221 (home-page "https://pypi.org/project/gast/")
16222 (synopsis "Generic Python AST that abstracts the underlying Python version")
16223 (description
16224 "GAST provides a compatibility layer between the AST of various Python
16225versions, as produced by @code{ast.parse} from the standard @code{ast}
16226module.")
16227 (license license:bsd-3)))
16228
44d10b1f
RW
16229(define-public python-wikidata
16230 (package
16231 (name "python-wikidata")
16232 (version "0.6.1")
16233 (source
16234 (origin
16235 (method url-fetch)
16236 (uri (pypi-uri "Wikidata" version))
16237 (sha256
16238 (base32
16239 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
16240 (build-system python-build-system)
16241 (propagated-inputs
16242 `(("python-babel" ,python-babel)))
16243 (home-page "https://github.com/dahlia/wikidata")
16244 (synopsis "Wikidata client library")
16245 (description
16246 "This package provides a Python interface to
16247@url{https://www.wikidata.org/, Wikidata}.")
16248 (properties '((upstream-name . "Wikidata")))
16249 (license license:gpl3+)))
16250
16251(define-public python-doctest-ignore-unicode
16252 (package
16253 (name "python-doctest-ignore-unicode")
16254 (version "0.1.2")
16255 (source
16256 (origin
16257 (method url-fetch)
16258 (uri (pypi-uri "doctest-ignore-unicode" version))
16259 (sha256
16260 (base32
16261 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
16262 (build-system python-build-system)
16263 (native-inputs
16264 `(("python-nose" ,python-nose)))
16265 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
16266 (synopsis "Ignore Unicode literal prefixes in doctests")
16267 (description
16268 "This package adds support for a flag to ignore Unicode literal prefixes
16269in doctests.")
16270 (license license:asl2.0)))
16271
16272(define-public python-attr
16273 (package
16274 (name "python-attr")
16275 (version "0.3.1")
16276 (source
16277 (origin
16278 (method url-fetch)
16279 (uri (pypi-uri "attr" version))
16280 (sha256
16281 (base32
16282 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
16283 (build-system python-build-system)
16284 (home-page "https://github.com/denis-ryzhkov/attr")
16285 (synopsis "Decorator for attributes of target function or class")
16286 (description "Simple decorator to set attributes of target function or
16287class in a @acronym{DRY, Don't Repeat Yourself} way.")
16288 (license license:expat)))
f98232a3
VC
16289
16290(define-public python-construct
16291 (package
16292 (name "python-construct")
16293 (version "2.9.45")
16294 (source
16295 (origin
16296 (method url-fetch)
16297 (uri (pypi-uri "construct" version))
16298 (sha256
16299 (base32
16300 "130iy05awzigm2xah2yvlmb08mac5bi4gzr5m3g7k1krs3ps0w92"))))
16301 (build-system python-build-system)
16302 (arguments
16303 `(#:tests? #f)) ; No tests exist.
16304 (propagated-inputs
16305 `(("python-extras" ,python-extras)
16306 ("python-arrow" ,python-arrow)
16307 ("python-numpy" ,python-numpy)
16308 ("python-ruamel.yaml" ,python-ruamel.yaml)))
16309 (home-page "http://construct.readthedocs.io")
16310 (synopsis "Declarative and symmetrical parser and builder for binary data")
16311 (description
16312 "This package provides both simple, atomic constructs (such as
16313integers of various sizes), as well as composite ones which allow you
16314form hierarchical and sequential structures of increasing complexity.
16315It features bit and byte granularity, easy debugging and testing, an
16316easy-to-extend subclass system, and lots of primitive constructs to
16317make your work easier.")
16318 (license license:expat)))
b742c006
LF
16319
16320(define-public python-humanize
16321 (package
16322 (name "python-humanize")
16323 (version "0.5.1")
16324 (source
16325 (origin
16326 (method url-fetch)
16327 (uri (pypi-uri "humanize" version))
16328 (sha256
16329 (base32
16330 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
16331 (arguments
16332 '(#:tests? #f)) ; tests not in pypi archive
16333 (build-system python-build-system)
16334 (home-page "https://github.com/jmoiron/humanize")
16335 (synopsis "Print numerical information in a human-readable form")
16336 (description "This package provides a Python module that displays numbers
16337and dates in \"human readable\" forms. For example, it would display
16338\"12345591313\" as \"12.3 billion\".")
16339 (license license:expat)))
d5bbf66d
LF
16340
16341(define-public python-txaio
16342 (package
16343 (name "python-txaio")
16344 (version "18.8.1")
16345 (source
16346 (origin
16347 (method url-fetch)
16348 (uri (pypi-uri "txaio" version))
16349 (sha256
16350 (base32
16351 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
16352 (build-system python-build-system)
16353 (propagated-inputs
16354 `(("python-twisted" ,python-twisted)
16355 ("python-six" ,python-six)))
16356 (home-page "https://github.com/crossbario/txaio")
16357 (synopsis "Compatibility layer between Python asyncio and Twisted")
16358 (description "Txaio provides a compatibility layer between the Python
16359@code{asyncio} module and @code{Twisted}.")
16360 (license license:expat)))
963dfd3a
RW
16361
16362(define-public python-toolshed
16363 (package
16364 (name "python-toolshed")
16365 (version "0.4.6")
16366 (source
16367 (origin
16368 (method url-fetch)
16369 (uri (pypi-uri "toolshed" version))
16370 (sha256
16371 (base32
16372 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
16373 (build-system python-build-system)
16374 (native-inputs
16375 `(("python-nose" ,python-nose)))
16376 (home-page "https://github.com/brentp/toolshed/")
16377 (synopsis "Collection of modules and functions for working with data")
16378 (description "This is a collection of well-tested, simple modules and
16379functions that aim to reduce boilerplate when working with data.")
16380 (license license:bsd-2)))
c91ecf2d
RW
16381
16382(define-public python-annoy
16383 (package
16384 (name "python-annoy")
16385 (version "1.15.1")
16386 (source
16387 (origin
16388 (method url-fetch)
16389 (uri (pypi-uri "annoy" version))
16390 (sha256
16391 (base32
16392 "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp"))))
16393 (build-system python-build-system)
16394 (native-inputs
16395 `(("python-nose" ,python-nose)))
16396 (home-page "https://github.com/spotify/annoy/")
16397 (synopsis "Approximate nearest neighbors library")
16398 (description
16399 "Annoy is a C++ library with Python bindings to search for points in
16400space that are close to a given query point. It also creates large read-only
16401file-based data structures that are @code{mmap}ped into memory so that many
16402processes may share the same data.")
16403 (license license:asl2.0)))
412342d1 16404
79bfa422 16405(define-public python-pylzma
412342d1 16406 (package
79bfa422
DM
16407 (name "python-pylzma")
16408 (version "0.5.0")
16409 (source
16410 (origin
16411 (method url-fetch)
16412 (uri (pypi-uri "pylzma" version))
16413 (sha256
16414 (base32
16415 "074anvhyjgsv2iby2ql1ixfvjgmhnvcwjbdz8gk70xzkzcm1fx5q"))))
412342d1 16416 (build-system python-build-system)
79bfa422
DM
16417 (home-page "http://www.joachim-bauch.de/projects/pylzma/")
16418 (synopsis "Python bindings for the LZMA library by Igor Pavlov.")
16419 (description "This package provides Python bindings for the LZMA library
16420by Igor Pavlov.")
16421 (license license:lgpl2.1+)))
16422
16423(define-public python2-pylzma
16424 (package-with-python2 python-pylzma))
f825e605 16425
6609ebe7
AG
16426(define-public python2-zeroconf
16427 (package
16428 (name "python2-zeroconf")
16429
16430 ;; This is the last version that supports Python 2.x.
16431 (version "0.19.1")
16432 (source
16433 (origin
16434 (method url-fetch)
16435 (uri (pypi-uri "zeroconf" version))
16436 (sha256
16437 (base32
16438 "0ykzg730n915qbrq9bn5pn06bv6rb5zawal4sqjyfnjjm66snkj3"))))
16439 (build-system python-build-system)
16440 (arguments
16441 `(#:python ,python-2
16442 #:phases
16443 (modify-phases %standard-phases
16444 (add-after 'unpack 'patch-requires
16445 (lambda* (#:key inputs #:allow-other-keys)
16446 (substitute* "setup.py"
16447 (("enum-compat")
16448 "enum34"))
16449 #t)))))
16450 (native-inputs
16451 `(("python2-six" ,python2-six)
16452 ("python2-enum32" ,python2-enum34)
16453 ("python2-netifaces" ,python2-netifaces)
16454 ("python2-typing" ,python2-typing)))
16455 (home-page "https://github.com/jstasiak/python-zeroconf")
16456 (synopsis "Pure Python mDNS service discovery")
16457 (description
16458 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
16459compatible).")
16460 (license license:lgpl2.1+)))
16461
f825e605
GLV
16462(define-public python-bsddb3
16463 (package
16464 (name "python-bsddb3")
16465 (version "6.2.6")
16466 (source
16467 (origin
16468 (method url-fetch)
16469 (uri (pypi-uri "bsddb3" version))
16470 (sha256
16471 (base32
16472 "019db2y6bfmiqbrgg9x9f6h72qjmqh05czdn2v5sy9bl0gs23mj2"))))
16473 (build-system python-build-system)
16474 (inputs
16475 `(("bdb" ,bdb)))
16476 (arguments
16477 '(#:phases
16478 (modify-phases %standard-phases
16479 (add-after 'unpack 'configure-locations
16480 (lambda* (#:key inputs #:allow-other-keys)
16481 (setenv "BERKELEYDB_DIR" (assoc-ref inputs "bdb"))
16482 (setenv "YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION" "1")
16483 #t))
16484 (replace 'check
16485 (lambda _
16486 (invoke "python3" "test3.py" "-v"))))))
16487 (home-page "https://www.jcea.es/programacion/pybsddb.htm")
16488 (synopsis "Python bindings for Oracle Berkeley DB")
16489 (description
16490 "This module provides a nearly complete wrapping of the Oracle/Sleepycat
16491C API for the Database Environment, Database, Cursor, Log Cursor, Sequence and
16492Transaction objects, and each of these is exposed as a Python type in the
16493bsddb3.db module. The database objects can use various access methods: btree,
16494hash, recno, and queue. Complete support of Berkeley DB distributed
16495transactions. Complete support for Berkeley DB Replication Manager.
16496Complete support for Berkeley DB Base Replication. Support for RPC.")
16497 (license license:bsd-3)))
edeb04bf
PL
16498
16499(define-public python-dbfread
16500 (package
16501 (name "python-dbfread")
16502 (version "2.0.7")
16503 (source (origin
16504 (method url-fetch)
16505 (uri (pypi-uri "dbfread" version))
16506 (sha256
16507 (base32
16508 "0gdpwdzf1fngsi6jrdyj4qdf6cr7gnnr3zp80dpkzbgz0spskj07"))))
16509 (build-system python-build-system)
16510 (native-inputs
16511 `(("python-pytest" ,python-pytest)))
16512 (home-page "https://dbfread.readthedocs.io")
16513 (synopsis "Read DBF Files with Python")
16514 (description
16515 "This library reads DBF files and returns the data as native Python data
16516types for further processing. It is primarily intended for batch jobs and
16517one-off scripts.")
16518 (license license:expat)))
e308b4f0
JM
16519
16520(define-public python-cached-property
16521 (package
16522 (name "python-cached-property")
16523 (version "1.5.1")
16524 (source
16525 (origin
16526 (method url-fetch)
16527 (uri (pypi-uri "cached-property" version))
16528 (sha256
16529 (base32
16530 "010m1bl380l2r3vwq24r5v14l6gwvgm9v0mqqjkjss552jgsa5wj"))))
16531 (build-system python-build-system)
16532 (arguments
16533 `(#:phases
16534 (modify-phases %standard-phases
16535 ;; https://github.com/pydanny/cached-property/issues/131
16536 ;; recent versions of freezegun break one test
16537 (add-after 'unpack 'disable-broken-test
16538 (lambda _
16539 (substitute* "tests/test_cached_property.py"
16540 (("def test_threads_ttl_expiry\\(self\\)" m)
16541 (string-append "@unittest.skip(\"Disabled by Guix\")\n"
16542 " " m)))
16543 #t)))))
16544 (native-inputs
16545 `(("python-freezegun" ,python-freezegun)))
16546 (home-page
16547 "https://github.com/pydanny/cached-property")
16548 (synopsis
16549 "Decorator for caching properties in classes")
16550 (description
16551 "This package provides a decorator which makes caching
16552time-or-computationally-expensive properties quick and easy and works in Python
165532 or 3.")
16554 (license license:bsd-3)))
dfe8a704
NG
16555
16556(define-public python-folium
16557 (package
16558 (name "python-folium")
16559 (version "0.10.0")
16560 (source
16561 (origin
16562 (method url-fetch)
16563 (uri (pypi-uri "folium" version))
16564 (sha256
16565 (base32
16566 "18fzxijsgrb95r0a8anc9ba5ijyw3nlnv3rpavfbkqa5v878x84f"))))
16567 (build-system python-build-system)
16568 (propagated-inputs
16569 `(("python-branca" ,python-branca)
16570 ("python-jinja2" ,python-jinja2)
16571 ("python-numpy" ,python-numpy)
16572 ("python-requests" ,python-requests)))
16573 (native-inputs
16574 `(("python-pytest" ,python-pytest)))
16575 (home-page "https://github.com/python-visualization/folium")
16576 (synopsis "Make beautiful maps with Leaflet.js & Python")
16577 (description "@code{folium} makes it easy to visualize data that’s been
16578manipulated in Python on an interactive leaflet map. It enables both the
16579binding of data to a map for @code{choropleth} visualizations as well as
16580passing rich vector/raster/HTML visualizations as markers on the map.
16581
16582The library has a number of built-in tilesets from OpenStreetMap, Mapbox, and
16583Stamen, and supports custom tilesets with Mapbox or Cloudmade API keys. It
16584supports Image, Video, GeoJSON and TopoJSON overlays.")
16585 (license license:expat)))
9dd5f475
LC
16586
16587(define-public jube
16588 (package
16589 ;; This is a command-line tool, so no "python-" prefix.
16590 (name "jube")
16591 (version "2.2.2")
16592 (source (origin
16593 (method url-fetch)
16594 (uri (string-append
16595 "http://apps.fz-juelich.de/jsc/jube/jube2/download.php?version="
16596 version))
16597 (sha256
16598 (base32
16599 "0xq4k1q63s1p6swgyp61vahlrd1fqmgbm0gm5kpj8ikwy0yc0nqk"))
16600 (file-name (string-append "jube-" version ".tar.gz"))))
16601 (build-system python-build-system)
16602 (home-page "https://apps.fz-juelich.de/jsc/jube/jube2/docu/index.html")
16603 (synopsis "Benchmarking environment")
16604 (description
16605 "JUBE helps perform and analyze benchmarks in a systematic way. For each
16606benchmarked application, benchmark data is stored in a format that allows JUBE
16607to deduct the desired information. This data can be parsed by automatic pre-
16608and post-processing scripts that draw information and store it more densely
16609for manual interpretation.")
a9f33960 16610 (license license:gpl3+)))
66436424
NG
16611
16612(define-public python-pyroutelib3
16613 (package
16614 (name "python-pyroutelib3")
16615 (version "1.3.post1")
16616 (source
16617 (origin
16618 (method url-fetch)
16619 (uri (pypi-uri "pyroutelib3" version))
16620 (sha256
16621 (base32
16622 "1hpbydpn2alyswiajfbvhzq4c7f36vdmvxy91hgv8l1lb2g2vfrj"))))
16623 (build-system python-build-system)
16624 (propagated-inputs
16625 `(("python-dateutil" ,python-dateutil)))
16626 (home-page "https://github.com/MKuranowski/pyroutelib3")
16627 (synopsis "Library for simple routing on OSM data")
16628 (description "Library for simple routing on OSM data")
16629 (license license:gpl3+)))
30e7c03a
GL
16630
16631(define-public python-elementpath
16632 (package
16633 (name "python-elementpath")
16634 (version "1.2.0")
16635 (source
16636 (origin
16637 (method url-fetch)
16638 (uri (pypi-uri "elementpath" version))
16639 (sha256
16640 (base32
16641 "1syn2z543brab23dskh3fjd9pqvz6npqbcicrs2d88dbg26xl08p"))))
16642 (build-system python-build-system)
16643 (home-page
16644 "https://github.com/sissaschool/elementpath")
16645 (synopsis
16646 "XPath 1.0/2.0 parsers and selectors for ElementTree and lxml")
16647 (description
16648 "The proposal of this package is to provide XPath 1.0 and 2.0 selectors
16649for Python's ElementTree XML data structures, both for the standard
16650ElementTree library and for the @uref{http://lxml.de, lxml.etree} library.
16651
16652For lxml.etree this package can be useful for providing XPath 2.0 selectors,
16653because lxml.etree already has it's own implementation of XPath 1.0.")
16654 (license license:expat)))
c1bbef69
16655
16656(define-public python-bibtexparser
16657 (package
16658 (name "python-bibtexparser")
16659 (version "1.1.0")
16660 (source
16661 (origin
16662 (method url-fetch)
16663 (uri (pypi-uri "bibtexparser" version))
16664 (sha256
16665 (base32
16666 "0zwhfkrzf3n5847dbnfng92k7ak199l9v6x6ax3dgdidfpm6d2fz"))))
16667 (build-system python-build-system)
16668 (propagated-inputs
16669 `(("python-pyparsing" ,python-pyparsing)))
16670 (native-inputs
16671 `(("python-future" ,python-future)))
16672 (home-page "https://github.com/sciunto-org/python-bibtexparser")
16673 (synopsis "Python library to parse BibTeX files")
16674 (description "BibtexParser is a Python library to parse BibTeX files.")
16675 (license (list license:bsd-3 license:lgpl3))))
8581b40d
HG
16676
16677(define-public python-distro
16678 (package
16679 (name "python-distro")
16680 (version "1.4.0")
16681 (source
16682 (origin
16683 (method url-fetch)
16684 (uri (pypi-uri "distro" version))
16685 (sha256
16686 (base32
16687 "0mrg75w4ap7mdzyga75yaid9n8bgb345ih5mwjp3plj6v1jxwb9n"))))
16688 (build-system python-build-system)
16689 (native-inputs
16690 `(("python-pytest" ,python-pytest)))
16691 (home-page "https://github.com/nir0s/distro")
16692 (synopsis
16693 "OS platform information API")
16694 (description
16695 "@code{distro} provides information about the OS distribution it runs on,
16696such as a reliable machine-readable ID, or version information.
16697
16698It is the recommended replacement for Python's original
16699`platform.linux_distribution` function (which will be removed in Python 3.8).
16700@code{distro} also provides a command-line interface to output the platform
16701information in various formats.")
16702 (license license:asl2.0)))
f2f41e1a
HG
16703
16704(define-public python-cairosvg
16705 (package
16706 (name "python-cairosvg")
16707 (version "2.4.2")
16708 (source
16709 (origin
16710 (method url-fetch)
16711 (uri (pypi-uri "CairoSVG" version))
16712 (sha256
16713 (base32 "1bb7irxbaxxb9ahm3z5wsx1q96mm5gzskc7b6q07h9ikcnb8yrjf"))))
16714 (build-system python-build-system)
16715 (arguments
16716 `(#:phases
16717 (modify-phases %standard-phases
16718 (replace 'check
16719 (lambda _ (invoke "pytest"))))))
16720 (propagated-inputs
16721 `(("python-cairocffi" ,python-cairocffi)
16722 ("python-cssselect2" ,python-cssselect2)
16723 ("python-defusedxml" ,python-defusedxml)
16724 ("python-pillow" ,python-pillow)
16725 ("python-tinycss2" ,python-tinycss2)))
16726 (native-inputs
16727 `(("python-pytest-flake8" ,python-pytest-flake8)
16728 ("python-pytest-isort" ,python-pytest-isort)
16729 ("python-pytest-runner" ,python-pytest-runner)))
16730 (home-page "https://cairosvg.org/")
16731 (synopsis "SVG to PDF/PS/PNG converter based on Cairo")
16732 (description "CairoSVG is a SVG converter based on Cairo. It can export
16733SVG files to PDF, PostScript and PNG files. The main part of CairoSVG is a
16734SVG parser, trying to follow the SVG 1.1 recommendation from the W3C. Once
16735parsed, the result is drawn to a Cairo surface that can be exported to
16736qvarious formats: PDF, PostScript, PNG and even SVG.")
16737 (license license:lgpl3+)))
ea1801e0
HG
16738
16739(define-public python-pyphen
16740 (package
16741 (name "python-pyphen")
16742 (version "0.9.5")
16743 (source
16744 (origin
16745 (method url-fetch)
16746 (uri (pypi-uri "Pyphen" version))
16747 (sha256
16748 (base32 "08c9y69ry9d6m4zalhnalg86lsp9v2j5n1ziw5vxfmiihx83lqrv"))))
16749 (build-system python-build-system)
16750 ;; TODO: Use the Guix system hyphenation packages hyphen-* rather than the
16751 ;; embedded set provided by upstream - like Debian does.
16752 (home-page "https://github.com/Kozea/Pyphen")
16753 (synopsis "Pure Python module to hyphenate text")
16754 (description "Pyphen is a pure Python module to hyphenate text using
16755existing Hunspell hyphenation dictionaries.")
16756 (license (list license:gpl2 license:lgpl2.1 license:mpl1.1))))
85cfb0e9
CL
16757
16758(define-public python-intelhex
16759 (package
16760 (name "python-intelhex")
16761 (version "2.2.1")
16762 (source
16763 (origin
16764 (method url-fetch)
16765 (uri (pypi-uri "intelhex" version))
16766 (sha256
16767 (base32
16768 "0ckqjbxd8gwcg98gfzpn4vq1qxzfvq3rdbrr1hikj1nmw08qb780"))))
16769 (build-system python-build-system)
16770 (arguments '(#:tests? #f)) ;issue with version
16771 (home-page "https://pypi.org/project/IntelHex/")
16772 (synopsis "Python library for Intel HEX files manipulations")
16773 (description "The Intel HEX file format is widely used in microprocessors
16774and microcontrollers area (embedded systems etc.) as the de facto standard for
16775representation of code to be programmed into microelectronic devices. This
16776package provides an intelhex Python library to read, write, create from
16777scratch and manipulate data from Intel HEX file format. It also includes
16778several convenience Python scripts, including \"classic\" hex2bin and bin2hex
16779converters and more, those based on the library itself.")
16780 (license license:bsd-3)))