gnu: rust-stdweb-internal-test-macro-0.1: Update to 0.1.1.
[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>
ae8db9ce 3;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 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>
11e46326 17;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
44d10b1f
RW
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>
fd5c264a 29;;; Copyright © 2016, 2017, 2018, 2019, 2020 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 33;;; Copyright © 2016, 2017, 2018 Arun Isaac <arunisaac@systemreboot.net>
7261bdca 34;;; Copyright © 2016, 2017, 2018, 2020 Julien Lepiller <julien@lepiller.eu>
783d1d40 35;;; Copyright © 2016, 2017, 2018, 2019, 2020 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>
e2ebbbcc 44;;; Copyright © 2017, 2018, 2019 Kei Kebreau <kkebreau@posteo.net>
44d10b1f
RW
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>
a2548a3b 54;;; Copyright © 2018, 2019, 2020 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>
046dd621 60;;; Copyright © 2019, 2020 Brett Gilio <brettg@gnu.org>
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>
dbcef44a 70;;; Copyright © 2019 Mădălin Ionel Patrașcu <madalinionel.patrascu@mdc-berlin.de>
479f4013 71;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
44d10b1f
RW
72;;;
73;;; This file is part of GNU Guix.
74;;;
75;;; GNU Guix is free software; you can redistribute it and/or modify it
76;;; under the terms of the GNU General Public License as published by
77;;; the Free Software Foundation; either version 3 of the License, or (at
78;;; your option) any later version.
79;;;
80;;; GNU Guix is distributed in the hope that it will be useful, but
81;;; WITHOUT ANY WARRANTY; without even the implied warranty of
82;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
83;;; GNU General Public License for more details.
84;;;
85;;; You should have received a copy of the GNU General Public License
86;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
87
88(define-module (gnu packages python-xyz)
89 #:use-module ((guix licenses) #:prefix license:)
90 #:use-module (gnu packages)
91 #:use-module (gnu packages algebra)
92 #:use-module (gnu packages adns)
93 #:use-module (gnu packages attr)
94 #:use-module (gnu packages backup)
95 #:use-module (gnu packages bash)
96 #:use-module (gnu packages check)
97 #:use-module (gnu packages compression)
98 #:use-module (gnu packages crypto)
99 #:use-module (gnu packages databases)
f825e605 100 #:use-module (gnu packages dbm)
2cbede59 101 #:use-module (gnu packages enchant)
44d10b1f
RW
102 #:use-module (gnu packages file)
103 #:use-module (gnu packages fontutils)
104 #:use-module (gnu packages gcc)
105 #:use-module (gnu packages geo)
106 #:use-module (gnu packages ghostscript)
107 #:use-module (gnu packages gl)
108 #:use-module (gnu packages glib)
e2ebbbcc 109 #:use-module (gnu packages gnome)
44d10b1f
RW
110 #:use-module (gnu packages graphviz)
111 #:use-module (gnu packages graphics)
112 #:use-module (gnu packages gstreamer)
113 #:use-module (gnu packages gtk)
114 #:use-module (gnu packages icu4c)
115 #:use-module (gnu packages image)
116 #:use-module (gnu packages imagemagick)
72c2478a 117 #:use-module (gnu packages kerberos)
44d10b1f
RW
118 #:use-module (gnu packages libevent)
119 #:use-module (gnu packages libffi)
120 #:use-module (gnu packages linux)
121 #:use-module (gnu packages llvm)
122 #:use-module (gnu packages man)
123 #:use-module (gnu packages maths)
42f0b0c2 124 #:use-module (gnu packages monitoring)
44d10b1f
RW
125 #:use-module (gnu packages multiprecision)
126 #:use-module (gnu packages networking)
127 #:use-module (gnu packages ncurses)
128 #:use-module (gnu packages openstack)
129 #:use-module (gnu packages pcre)
130 #:use-module (gnu packages perl)
131 #:use-module (gnu packages pkg-config)
132 #:use-module (gnu packages python)
d362b11d 133 #:use-module (gnu packages python-check)
15b65617 134 #:use-module (gnu packages python-compression)
44d10b1f 135 #:use-module (gnu packages python-crypto)
ca7c3653 136 #:use-module (gnu packages python-science)
44d10b1f
RW
137 #:use-module (gnu packages python-web)
138 #:use-module (gnu packages qt)
139 #:use-module (gnu packages readline)
140 #:use-module (gnu packages sdl)
141 #:use-module (gnu packages search)
142 #:use-module (gnu packages shells)
9d0c291e 143 #:use-module (gnu packages sphinx)
44d10b1f
RW
144 #:use-module (gnu packages ssh)
145 #:use-module (gnu packages terminals)
146 #:use-module (gnu packages tex)
147 #:use-module (gnu packages texinfo)
148 #:use-module (gnu packages time)
149 #:use-module (gnu packages tls)
150 #:use-module (gnu packages version-control)
151 #:use-module (gnu packages video)
152 #:use-module (gnu packages web)
153 #:use-module (gnu packages base)
154 #:use-module (gnu packages xml)
155 #:use-module (gnu packages xorg)
156 #:use-module (gnu packages xdisorg)
157 #:use-module (gnu packages tcl)
158 #:use-module (gnu packages bdw-gc)
f98232a3 159 #:use-module (gnu packages serialization)
44d10b1f
RW
160 #:use-module (guix packages)
161 #:use-module (guix download)
162 #:use-module (guix git-download)
a042d348 163 #:use-module (guix hg-download)
44d10b1f
RW
164 #:use-module (guix utils)
165 #:use-module (guix build-system gnu)
166 #:use-module (guix build-system cmake)
167 #:use-module (guix build-system python)
168 #:use-module (guix build-system trivial)
169 #:use-module (srfi srfi-1)
170 #:use-module (srfi srfi-26))
171
172(define-public python-psutil
173 (package
174 (name "python-psutil")
e9119ac1 175 (version "5.6.5")
44d10b1f
RW
176 (source
177 (origin
178 (method url-fetch)
179 (uri (pypi-uri "psutil" version))
180 (sha256
e9119ac1 181 (base32 "0isil5jxwwd8awz54qk28rpgjg43i5l6yl70g40vxwa4r4m56lfh"))))
44d10b1f
RW
182 (build-system python-build-system)
183 (arguments
184 ;; FIXME: some tests does not return and times out.
185 '(#:tests? #f))
186 (home-page "https://www.github.com/giampaolo/psutil")
187 (synopsis "Library for retrieving information on running processes")
188 (description
189 "psutil (Python system and process utilities) is a library for retrieving
190information on running processes and system utilization (CPU, memory, disks,
191network) in Python. It is useful mainly for system monitoring, profiling and
192limiting process resources and management of running processes. It implements
193many functionalities offered by command line tools such as: ps, top, lsof,
194netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
195pidof, tty, taskset, pmap.")
196 (properties `((python2-variant . ,(delay python2-psutil))))
197 (license license:bsd-3)))
198
199(define-public python2-psutil
200 (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
201 (package
202 (inherit base)
203 (propagated-inputs
204 `(("python2-enum34" ,python2-enum34) ;optional
205 ,@(package-propagated-inputs base))))))
206
207(define-public python-shapely
208 (package
209 (name "python-shapely")
6d94465b 210 (version "1.6.4.post2")
44d10b1f
RW
211 (source
212 (origin
213 (method url-fetch)
214 (uri (pypi-uri "Shapely" version))
215 (sha256
216 (base32
6d94465b 217 "03r42fmd9alp6r3q95ad6rldq2f7n1wimrw53zy5kpn33yv7pf64"))))
44d10b1f
RW
218 (build-system python-build-system)
219 (native-inputs
220 `(("python-cython" ,python-cython)
221 ("python-matplotlib" ,python-matplotlib)
222 ("python-pytest" ,python-pytest)
223 ("python-pytest-cov" ,python-pytest-cov)))
224 (inputs
225 `(("geos" ,geos)))
226 (propagated-inputs
227 `(("python-numpy" ,python-numpy)))
228 (arguments
229 `(#:phases
230 (modify-phases %standard-phases
231 (add-after 'unpack 'patch-geos-path
232 (lambda* (#:key inputs #:allow-other-keys)
233 (let ((geos (assoc-ref inputs "geos"))
234 (glibc (assoc-ref inputs ,(if (%current-target-system)
235 "cross-libc" "libc"))))
236 (substitute* "shapely/geos.py"
237 (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)")
238 (string-append "_lgeos = load_dll('geos_c', fallbacks=['"
239 geos "/lib/libgeos_c.so'])"))
240 (("free = load_dll\\('c'\\)\\.free")
241 (string-append "free = load_dll('c', fallbacks=['"
242 glibc "/lib/libc.so.6']).free"))))
243 #t)))))
244 (home-page "https://github.com/Toblerity/Shapely")
245 (synopsis "Library for the manipulation and analysis of geometric objects")
246 (description "Shapely is a Python package for manipulation and analysis of
247planar geometric objects. It is based on the @code{GEOS} library.")
248 (license license:bsd-3)))
249
a91f4eba
S
250(define-public python-shortuuid
251 (package
252 (name "python-shortuuid")
253 (version "0.5.0")
254 (source
255 (origin
256 (method url-fetch)
257 (uri (pypi-uri "shortuuid" version))
258 (sha256
259 (base32
260 "1f8i4zwj5vmpzbz6b17bljy4399gx5aq7vsyw63sz2qgyjcd73yh"))))
261 (build-system python-build-system)
262 (native-inputs
263 `(("python-pep8" ,python-pep8)))
264 (home-page "https://github.com/skorokithakis/shortuuid")
265 (synopsis "Generator library for concise, unambiguous and URL-safe UUIDs")
266 (description
267 "@code{shortuuid} is a Python library for generating concise, unambiguous
268and URL-safe UUIDs. UUIDs are generated using the built-in Python @code{uuid}
269module and then similar looking characters are removed.")
270 (license license:bsd-3)))
271
44d10b1f
RW
272(define-public python-logwrap
273 (package
274 (name "python-logwrap")
275 (version "3.2.1")
276 (source
277 (origin
278 (method url-fetch)
279 (uri (pypi-uri "logwrap" version ".zip"))
280 (sha256
281 (base32
282 "1d2k0hvpbi51vl410y8fbs5m0nxnlh2k7gr2nrh3k81ibhzscsra"))))
283 (build-system python-build-system)
284 (propagated-inputs
285 `(("python-six" ,python-six)
286 ("python-typing" ,python-typing)))
287 (native-inputs
288 `(("unzip" ,unzip)
289 ("python-cython" ,python-cython)
290 ("python-pytest" ,python-pytest)
291 ("python-pytest-cov" ,python-pytest-cov)
292 ("python-pytest-runner" ,python-pytest-runner)))
293 (home-page "https://github.com/penguinolog/logwrap")
294 (synopsis "Decorator for logging function arguments")
295 (description "This package provides a decorator to log function arguments
296and function call return values in a human-readable way.")
297 (license license:asl2.0)))
298
299(define-public python2-shapely
300 (package-with-python2 python-shapely))
301
302(define-public python-clyent
303 (package
304 (name "python-clyent")
305 (version "1.2.1")
306 (source
307 (origin
308 (method url-fetch)
309 (uri (pypi-uri "clyent" version))
310 (sha256
311 (base32
312 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
313 (build-system python-build-system)
314 (native-inputs
315 `(("python-mock" ,python-mock)))
316 (home-page "https://github.com/binstar/clyent")
317 (synopsis "Command line client library")
318 (description "Clyent is a Python command line utiliy library. It is used
319by @code{binstar}, @code{binstar-build} and @code{chalmers}.")
320 (license license:bsd-3)))
321
322(define-public python2-clyent
323 (package-with-python2 python-clyent))
324
325(define-public python-babel
326 (package
327 (name "python-babel")
93253411 328 (version "2.7.0")
44d10b1f
RW
329 (source
330 (origin
331 (method url-fetch)
332 (uri (pypi-uri "Babel" version))
333 (sha256
334 (base32
93253411 335 "0a7wawx8vsg7igvz6p3x909fskhg4b2y1910xk4f4c8y22p3aqg8"))))
44d10b1f
RW
336 (build-system python-build-system)
337 (native-inputs
338 `(("python-freezegun" ,python-freezegun)
339 ("python-pytest" ,python-pytest)))
340 (propagated-inputs
341 `(("python-pytz" ,python-pytz)))
342 (arguments
343 `(#:phases (modify-phases %standard-phases
344 (replace 'check
8acd1e90
MB
345 (lambda _
346 (invoke "pytest" "-vv" "-k"
347 (string-append
348 ;; XXX: These tests fail when using Pytest 4.x and
349 ;; Babel 2.6.0. Try removing this for later versions.
350 "not test_no_inherit_metazone_marker_never_in_output"
351 " and not test_smoke_dates"
352 " and not test_smoke_numbers")))))))
44d10b1f
RW
353 (home-page "http://babel.pocoo.org/")
354 (synopsis
355 "Tools for internationalizing Python applications")
356 (description
357 "Babel is composed of two major parts:
358- tools to build and work with gettext message catalogs
359- a Python interface to the CLDR (Common Locale Data Repository), providing
360access to various locale display names, localized number and date formatting,
361etc. ")
362 (license license:bsd-3)))
363
364(define-public python2-babel
365 (package-with-python2 python-babel))
366
93253411
MB
367;; Sphinx < 2.0 requires this version. Remove once no longer needed.
368(define-public python2-babel-2.6
369 (package
370 (inherit python2-babel)
371 (version "2.6.0")
372 (source (origin
373 (method url-fetch)
374 (uri (pypi-uri "Babel" version))
375 (sha256
376 (base32
377 "08rxmbx2s4irp0w0gmn498vns5xy0fagm0fg33xa772jiks51flc"))))))
378
44d10b1f
RW
379(define-public python2-backport-ssl-match-hostname
380 (package
381 (name "python2-backport-ssl-match-hostname")
382 (version "3.5.0.1")
383 (source
384 (origin
385 (method url-fetch)
2c1f0d09 386 (uri (pypi-uri "backports.ssl_match_hostname" version))
44d10b1f
RW
387 (sha256
388 (base32
389 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
390 (build-system python-build-system)
391 (arguments
392 `(#:python ,python-2
393 #:tests? #f)) ; no test target
394 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
395 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
396 (description
397 "This backport brings the ssl.match_hostname() function to users of
398earlier versions of Python. The function checks the hostname in the
399certificate returned by the server to which a connection has been established,
400and verifies that it matches the intended target hostname.")
401 (license license:psfl)))
402
dc827867
TGR
403(define-public python-boolean.py
404 (package
405 (name "python-boolean.py")
406 (version "3.6")
407 (source
408 (origin
409 ;; There's no source tarball on PyPI.
410 (method git-fetch)
411 (uri (git-reference
412 (url "https://github.com/bastikr/boolean.py")
413 (commit (string-append "v" version))))
414 (file-name (git-file-name name version))
415 (sha256
416 (base32 "1wc89y73va58cj7dsx6c199zpxsy9q53dsffsdj6zmc90inqz6qs"))))
417 (build-system python-build-system)
418 (home-page "https://github.com/bastikr/boolean.py")
419 (synopsis "Boolean algebra in one Python module")
420 (description
421 "This is a small Python library that implements boolean algebra.
422It defines two base elements, @code{TRUE} and @code{FALSE}, and a
423@code{Symbol} class that can take on one of these two values. Calculations
424are done only in terms of @code{AND}, @code{OR}, and @code{NOT}---other
425compositions like @code{XOR} and @code{NAND} are emulated on top of them.
426Expressions are constructed from parsed strings or directly in Python.")
427 (license license:bsd-2)))
428
44d10b1f
RW
429(define-public python-hdf4
430 (package
431 (name "python-hdf4")
432 (version "0.9")
433 (source
434 (origin
435 (method url-fetch)
436 (uri (pypi-uri name version))
437 (sha256
438 (base32
439 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
440 (build-system python-build-system)
441 (native-inputs `(("nose" ,python-nose)))
442 (propagated-inputs `(("numpy" ,python-numpy)))
443 (inputs
444 `(("hdf4" ,hdf4)
445 ("libjpeg" ,libjpeg)
446 ("zlib" ,zlib)))
447 (arguments
448 `(#:phases
449 (modify-phases %standard-phases
450 (replace 'check
451 (lambda _
452 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
453 ;; on to import numpy. Somehow this works on their CI system.
454 ;; Let's just manage PYTHONPATH here instead.
455 (substitute* "runexamples.sh"
456 (("export PYTHONPATH=.*") ""))
457 (setenv "PYTHONPATH"
458 (string-append (getcwd) ":"
459 (getenv "PYTHONPATH")))
460 (invoke "./runexamples.sh")
461 (invoke "nosetests" "-v"))))))
462 (home-page "https://github.com/fhs/python-hdf4")
463 (synopsis "Python interface to the NCSA HDF4 library")
464 (description
465 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
466which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
467NetCDF files can also be read and modified. Python-HDF4 is a fork of
468@url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
469 (license license:expat)))
470
471(define-public python2-hdf4
472 (package-with-python2 python-hdf4))
473
474(define-public python-h5py
475 (package
476 (name "python-h5py")
477 (version "2.8.0")
478 (source
479 (origin
480 (method url-fetch)
481 (uri (pypi-uri "h5py" version))
482 (sha256
483 (base32
484 "0mdr6wrq02ac93m1aqx9kad0ppfzmm4imlxqgyy1x4l7hmdcc9p6"))))
485 (build-system python-build-system)
486 (arguments
487 `(#:tests? #f ; no test target
488 #:phases
489 (modify-phases %standard-phases
490 (add-after 'unpack 'fix-hdf5-paths
491 (lambda* (#:key inputs #:allow-other-keys)
492 (let ((prefix (assoc-ref inputs "hdf5")))
493 (substitute* "setup_build.py"
494 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
495 (string-append "['" prefix "/lib" "']"))
496 (("'/opt/local/include', '/usr/local/include'")
497 (string-append "'" prefix "/include" "'")))
498 (substitute* "setup_configure.py"
499 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
500 (string-append "['" prefix "/lib" "']")))
501 #t))))))
502 (propagated-inputs
503 `(("python-six" ,python-six)
504 ("python-numpy" ,python-numpy)))
505 (inputs
506 `(("hdf5" ,hdf5)))
507 (native-inputs
508 `(("python-cython" ,python-cython)
509 ("python-pkgconfig" ,python-pkgconfig)))
510 (home-page "http://www.h5py.org/")
511 (synopsis "Read and write HDF5 files from Python")
512 (description
513 "The h5py package provides both a high- and low-level interface to the
514HDF5 library from Python. The low-level interface is intended to be a
515complete wrapping of the HDF5 API, while the high-level component supports
516access to HDF5 files, datasets and groups using established Python and NumPy
517concepts.")
518 (license license:bsd-3)))
519
520(define-public python2-h5py
521 (package-with-python2 python-h5py))
522
8b89dedc
RW
523(define-public python-sh
524 (package
525 (name "python-sh")
526 (version "1.12.14")
527 (source
528 (origin
529 (method url-fetch)
530 (uri (pypi-uri "sh" version))
531 (sha256
532 (base32
533 "1z2hx357xp3v4cv44xmqp7lli3frndqpyfmpbxf7n76h7s1zaaxm"))))
534 (build-system python-build-system)
fd3638d8
EF
535 (arguments
536 '(#:phases
537 (modify-phases %standard-phases
538 (replace 'check
539 (lambda _
ca983a2f
NG
540 ;; XXX: A Python 2 test fails when HOME=/homeless-shelter.
541 (setenv "HOME" "/tmp")
fd3638d8
EF
542 (invoke "python" "sh.py" "test"))))))
543 (native-inputs
544 `(("python-coverage" ,python-coverage)))
8b89dedc
RW
545 (home-page "https://github.com/amoffat/sh")
546 (synopsis "Python subprocess replacement")
547 (description "This package provides a replacement for Python's
548@code{subprocess} feature.")
549 (license license:expat)))
550
3869effd
RW
551(define-public python2-sh
552 (package-with-python2 python-sh))
553
d362b11d
RW
554(define-public python-cftime
555 (package
556 (name "python-cftime")
da107cf5 557 (version "1.0.4.2")
d362b11d
RW
558 (source
559 (origin
560 (method url-fetch)
561 (uri (pypi-uri "cftime" version))
562 (sha256
da107cf5 563 (base32 "0w0gi6jnch38hiygl62j4xkcirv4y3dcwrvxl9p7bsk6j27lzihs"))))
d362b11d
RW
564 (build-system python-build-system)
565 (propagated-inputs
566 `(("python-numpy" ,python-numpy)))
567 (native-inputs
568 `(("python-coveralls" ,python-coveralls)
569 ("python-cython" ,python-cython)
570 ("python-pytest-cov" ,python-pytest-cov)))
571 (home-page "https://github.com/Unidata/cftime")
572 (synopsis "Library for time handling")
573 (description
574 "This package provides time-handling functionality that used to be part
575of the netcdf4 package before.")
576 ;; This package claims to include code under the GPLv3 but is released
577 ;; under ISC.
578 (license (list license:isc license:gpl3+))))
579
44d10b1f
RW
580(define-public python-netcdf4
581 (package
582 (name "python-netcdf4")
93e7b209 583 (version "1.4.2")
44d10b1f
RW
584 (source
585 (origin
586 (method url-fetch)
587 (uri (pypi-uri "netCDF4" version))
588 (sha256
589 (base32
93e7b209 590 "0c0sklgrmv15ygliin8qq0hp7vanmbi74m6zpi0r1ksr0hssyd5r"))))
44d10b1f 591 (build-system python-build-system)
93e7b209
RW
592 (arguments
593 '(#:phases
594 (modify-phases %standard-phases
595 (add-after 'unpack 'configure-locations
596 (lambda* (#:key inputs #:allow-other-keys)
597 (setenv "HDF5_DIR" (assoc-ref inputs "hdf5"))
598 #t)))))
44d10b1f
RW
599 (native-inputs
600 `(("python-cython" ,python-cython)))
601 (propagated-inputs
93e7b209
RW
602 `(("python-numpy" ,python-numpy)
603 ("python-cftime" ,python-cftime)))
44d10b1f
RW
604 (inputs
605 `(("netcdf" ,netcdf)
606 ("hdf4" ,hdf4)
607 ("hdf5" ,hdf5)))
93e7b209 608 (home-page "https://github.com/Unidata/netcdf4-python")
44d10b1f
RW
609 (synopsis "Python/numpy interface to the netCDF library")
610 (description "Netcdf4-python is a Python interface to the netCDF C
611library. netCDF version 4 has many features not found in earlier
612versions of the library and is implemented on top of HDF5. This module
613can read and write files in both the new netCDF 4 and the old netCDF 3
614format, and can create files that are readable by HDF5 clients. The
615API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
616to users of that module.")
617 ;; The software is mainly ISC, but includes some files covered
618 ;; by the Expat license.
619 (license (list license:isc license:expat))))
620
621(define-public python2-netcdf4
622 (package-with-python2 python-netcdf4))
623
d6803445
TGR
624(define-public python-license-expression
625 (package
626 (name "python-license-expression")
627 (version "0.999")
628 (source
629 (origin
630 (method url-fetch)
631 (uri (pypi-uri "license-expression" version))
632 (sha256
633 (base32 "08ppb0bxbrsxazy88sgpl9yffvdsabw6dkk1nc332wcz2mphwwyf"))))
634 (build-system python-build-system)
635 (propagated-inputs
636 `(("python-boolean.py" ,python-boolean.py)))
637 (home-page "https://github.com/nexB/license-expression")
638 (synopsis "Apply boolean logic to license expressions")
639 (description
640 "This Python module defines a tiny language to evaluate and compare
641license expressions using boolean logic. Logical combinations of licenses can
642be tested for equality, containment, and equivalence. They can be normalised
643and simplified. It supports SPDX license expressions as well as other naming
644conventions and aliases in the same expression.")
645 (license license:gpl2+)))
646
44d10b1f
RW
647(define-public python-lockfile
648 (package
649 (name "python-lockfile")
650 (version "0.12.2")
651 (source
652 (origin
653 (method url-fetch)
8318bf07 654 (uri (pypi-uri "lockfile" version))
44d10b1f
RW
655 (sha256
656 (base32
657 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
658 (build-system python-build-system)
659 (arguments '(#:test-target "check"))
660 (native-inputs
661 `(("python-pbr" ,python-pbr)))
662 (home-page "https://launchpad.net/pylockfile")
663 (synopsis "Platform-independent file locking module")
664 (description
665 "The lockfile package exports a LockFile class which provides a simple
666API for locking files.")
667 (license license:expat)))
668
669(define-public python2-lockfile
670 (package-with-python2 python-lockfile))
671
672(define-public python-semantic-version
673 (package
674 (name "python-semantic-version")
675 (version "2.6.0")
676 (source
677 (origin
678 (method url-fetch)
679 (uri (pypi-uri "semantic_version" version))
680 (sha256
681 (base32
682 "1h2l9xyg1zzsda6kjcmfcgycbvrafwci283vcr1v5sbk01l2hhra"))))
683 (build-system python-build-system)
684 (arguments
685 `(#:tests? #f)) ; PyPI tarball lacks tests
686 (home-page "https://github.com/rbarrois/python-semanticversion")
687 (synopsis "Semantic versioning module for Python")
688 (description
689 "The @code{semantic_version} class is a small library for handling
690@uref{https://semver.org/, semantic versioning} (@dfn{SemVer}) in Python.
691
692It can compare versions, generate a new version that represents a bump in one of
693the version levels, and check whether any given string is a proper semantic
694version identifier.")
695 (license license:bsd-3)))
696
697(define-public python2-semantic-version
698 (package-with-python2 python-semantic-version))
699
700(define-public python-serpent
701 (package
702 (name "python-serpent")
fa9d14ac 703 (version "1.28")
44d10b1f
RW
704 (source
705 (origin
706 (method url-fetch)
707 (uri (pypi-uri "serpent" version))
708 (sha256
fa9d14ac 709 (base32 "1arnckykpkvv2qrp49l1k7q5mr5pisswl0rvdx98x8wsl1n361pk"))))
44d10b1f 710 (build-system python-build-system)
fa9d14ac
TGR
711 (native-inputs
712 `(("python-attrs" ,python-attrs)
713 ("python-pytz" ,python-pytz)))
44d10b1f
RW
714 (home-page "https://github.com/irmen/Serpent")
715 (synopsis "Serializer for literal Python expressions")
716 (description
1d3c7803
TGR
717 "Serpent provides @code{ast.literal_eval()}-compatible object tree
718serialization. It serializes an object tree into bytes (an utf-8 encoded
719string) that can be decoded and then passed as-is to @code{ast.literal_eval()}
720to rebuild the original object tree.
721
722Because only safe literals are encoded, it is safe to send serpent data to
723other machines, such as over the network.")
44d10b1f
RW
724 (license license:expat)))
725
726(define-public python-setuptools
727 (package
728 (name "python-setuptools")
e39d4933 729 (version "41.0.1")
44d10b1f
RW
730 (source
731 (origin
732 (method url-fetch)
733 (uri (pypi-uri "setuptools" version ".zip"))
734 (sha256
735 (base32
e39d4933 736 "04sns22y2hhsrwfy1mha2lgslvpjsjsz8xws7h2rh5a7ylkd28m2"))
44d10b1f
RW
737 (modules '((guix build utils)))
738 (snippet
739 '(begin
740 ;; Remove included binaries which are used to build self-extracting
741 ;; installers for Windows.
742 ;; TODO: Find some way to build them ourself so we can include them.
743 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
744 #t))))
745 (build-system python-build-system)
746 ;; FIXME: Tests require pytest, which itself relies on setuptools.
747 ;; One could bootstrap with an internal untested setuptools.
748 (arguments
749 `(#:tests? #f))
750 (home-page "https://pypi.python.org/pypi/setuptools")
751 (synopsis
752 "Library designed to facilitate packaging Python projects")
753 (description
754 "Setuptools is a fully-featured, stable library designed to facilitate
755packaging Python projects, where packaging includes:
756Python package and module definitions,
757distribution package metadata,
758test hooks,
759project installation,
760platform-specific details,
761Python 3 support.")
762 ;; TODO: setuptools now bundles the following libraries:
763 ;; packaging, pyparsing, six and appdirs. How to unbundle?
764 (license (list license:psfl ; setuptools itself
765 license:expat ; six, appdirs, pyparsing
766 license:asl2.0 ; packaging is dual ASL2/BSD-2
767 license:bsd-2))))
768
769(define-public python2-setuptools
770 (package-with-python2 python-setuptools))
771
0fdec2a3
MB
772;; The setuptools provided by Python 3.7.4 is too new for Tensorflow.
773(define-public python-setuptools-for-tensorflow
774 (hidden-package
775 (package
776 (inherit python-setuptools)
777 (version "39.1.0")
778 (source (origin
779 (inherit (package-source python-setuptools))
780 (uri (pypi-uri "setuptools" version ".zip"))
781 (sha256
782 (base32
783 "1mzdhvfhnv4lggxa8rjl0dzqxvfx377gg5sqs57v89wrp09lwj65")))))))
784
44d10b1f
RW
785(define-public python-uniseg
786 (package
787 (name "python-uniseg")
788 (version "0.7.1")
789 (source
790 (origin
791 (method url-fetch)
792 (uri (pypi-uri "uniseg" version ".zip"))
793 (sha256
794 (base32
795 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
796 (build-system python-build-system)
797 (arguments
798 '(#:tests? #f)) ; The test suite requires network access.
799 (native-inputs
800 `(("unzip" ,unzip)))
801 (home-page
802 "https://bitbucket.org/emptypage/uniseg-python")
803 (synopsis
804 "Python library to determine Unicode text segmentations")
805 (description
806 "Uniseg is a Python package used to determine Unicode text segmentations.
807Supported segmentations include:
808@enumerate
809@item @dfn{Code point} (any value in the Unicode codespace)
810@item @dfn{Grapheme cluster} (user-perceived character made of a single or
811multiple Unicode code points, e.g. \"G\" + acute-accent)
812@item Word break
813@item Sentence break
814@item Line break
815@end enumerate")
816 (license license:expat)))
817
818(define-public python2-uniseg
819 (package-with-python2 python-uniseg))
820
821(define-public python-humanfriendly
822 (package
823 (name "python-humanfriendly")
824 (version "4.4.1")
825 (source
826 (origin
827 (method url-fetch)
828 (uri (pypi-uri "humanfriendly" version))
829 (sha256
830 (base32
831 "0pisgizjql86785jchfjv217g0lsgk114g2lja5j4y3lsc3b9szi"))))
832 (build-system python-build-system)
833 (arguments
834 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
835 #:tests? #f))
836 (propagated-inputs
837 `(("python-monotonic" ,python-monotonic)))
838 (home-page "https://humanfriendly.readthedocs.io")
839 (synopsis "Human-friendly input and output in Python")
840 (description
841 "The functions and classes in @code{humanfriendly} can be used to make
842text interfaces more user-friendly. It includes tools to parse and format
843numbers, file sizes, and timespans, timers for long-running operations, menus
844to allow the user to choose from a list of options, and terminal interaction
845helpers.")
846 (license license:expat)))
847
848(define-public python2-humanfriendly
849 (package-with-python2 python-humanfriendly))
850
851(define-public python-capturer
852 (package
853 (name "python-capturer")
854 (version "2.4")
855 (source
856 (origin
857 (method url-fetch)
858 (uri (pypi-uri "capturer" version))
859 (sha256
860 (base32
861 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
862 (build-system python-build-system)
863 (arguments
864 `(#:tests? #f))
865 (propagated-inputs
866 `(("python-humanfriendly" ,python-humanfriendly)))
867 (home-page "https://capturer.readthedocs.io")
868 (synopsis "Capture stdout and stderr streams of the current process")
869 (description
870 "The capturer package makes it easy to capture the stdout and stderr
871streams of the current process and subprocesses. Output can be relayed
872to the terminal in real time but is also available to the Python program
873for additional processing.")
874 (license license:expat)))
875
876(define-public python2-capturer
877 (package-with-python2 python-capturer))
878
879(define-public python-case
880 (package
881 (name "python-case")
882 (version "1.5.3")
883 (source
884 (origin
885 (method url-fetch)
886 (uri (pypi-uri "case" version))
887 (sha256
888 (base32
889 "1cagg06vfph864s6l5jb0zqliwxh647bki8j6lf4a4qrv40jnhs8"))))
890 (build-system python-build-system)
891 (propagated-inputs
892 `(("python-mock" ,python-mock)
893 ("python-nose" ,python-nose)
894 ("python-six" ,python-six)
895 ("python-unittest2" ,python-unittest2)))
896 (native-inputs
897 `(("python-coverage" ,python-coverage)))
898 (home-page "https://github.com/celery/case")
899 (synopsis "Unittest utilities and convenience methods")
900 (description
901 "The @code{case} package provides utilities on top of unittest, including
902some helpful Python 2 compatibility convenience methods.")
903 (license license:bsd-3)))
904
905(define-public python-verboselogs
906 (package
907 (name "python-verboselogs")
908 (version "1.7")
909 (source
910 (origin
911 (method url-fetch)
912 (uri (pypi-uri "verboselogs" version))
913 (sha256
914 (base32
915 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
916 (build-system python-build-system)
1760c970
MO
917 (arguments
918 `(#:phases
919 (modify-phases %standard-phases
920 (replace 'check
921 (lambda _
922 ;; Do not run pylint plugin test, as astroid is an old
923 ;; unsupported version.
924 (invoke "pytest" "-v" "-k" "not test_pylint_plugin"
925 "verboselogs/tests.py"))))))
44d10b1f
RW
926 (native-inputs
927 `(("python-mock" ,python-mock)
1760c970 928 ("python-pytest" ,python-pytest)))
44d10b1f
RW
929 (home-page "https://verboselogs.readthedocs.io")
930 (synopsis "Verbose logging level for Python's logging module")
931 (description
932 "The @code{verboselogs} package extends Python's @code{logging} module to
933add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
934 (license license:expat)))
935
936(define-public python2-verboselogs
937 (package-with-python2 python-verboselogs))
938
939(define-public python-coloredlogs
940 (package
941 (name "python-coloredlogs")
b2b8a39c 942 (version "10.0")
44d10b1f
RW
943 (source
944 (origin
945 (method url-fetch)
946 (uri (pypi-uri "coloredlogs" version))
947 (sha256
948 (base32
b2b8a39c 949 "0dkw6xp0r1dwgz4s2f58npx5nxfq51wf4l6qkm5ib27slgfs4sdq"))))
44d10b1f
RW
950 (build-system python-build-system)
951 (arguments
952 `(;Tests require some updated modules
953 #:tests? #f))
954 (propagated-inputs
955 `(("python-capturer" ,python-capturer)))
956 (home-page "https://coloredlogs.readthedocs.io")
957 (synopsis "Colored stream handler for Python's logging module")
958 (description
959 "The @code{coloredlogs} package enables colored terminal output for
960Python's logging module. The @code{ColoredFormatter} class inherits from
961@code{logging.Formatter} and uses ANSI escape sequences to render your logging
962messages in color.")
963 (license license:expat)))
964
965(define-public python2-coloredlogs
966 (package-with-python2 python-coloredlogs))
967
af760990
VC
968(define-public python-editorconfig
969 (package
970 (name "python-editorconfig")
971 (version "0.12.2")
972 (source
973 (origin
974 (method url-fetch)
975 (uri (pypi-uri "EditorConfig" version))
976 (sha256
977 (base32
978 "0v55z351p9qkyp3bbspwywwn28sbcknhirngjbj779n3z52z63hv"))))
979 (build-system python-build-system)
980 (home-page "https://editorconfig.org/")
981 (synopsis "EditorConfig bindings for python")
982 (description "The EditorConfig project consists of a file format for
983defining coding styles and a collection of text editor plugins that enable
984editors to read the file format and adhere to defined styles. EditorConfig
985files are easily readable and they work nicely with version control systems.")
986 ;; "fnmatch.py" and "ini.py" are licensed under psfl, the rest is bsd-2.
987 (license (list license:bsd-2 license:psfl))))
988
4caf37b0
MC
989(define-public python-et-xmlfile
990 (package
991 (name "python-et-xmlfile")
992 (version "1.0.1")
993 (source
994 (origin
995 (method url-fetch)
996 (uri (pypi-uri "et_xmlfile" version))
997 (sha256
998 (base32
999 "0nrkhcb6jdrlb6pwkvd4rycw34y3s931hjf409ij9xkjsli9fkb1"))))
1000 (build-system python-build-system)
1001 (arguments
1002 `(#:phases (modify-phases %standard-phases
1003 (replace 'check
1004 (lambda _
1005 (invoke "pytest"))))))
1006 (native-inputs
1007 `(("python-pytest" ,python-pytest)
1008 ("python-lxml" ,python-lxml))) ;used for the tests
1009 (home-page "https://bitbucket.org/openpyxl/et_xmlfile")
1010 (synopsis "Low memory implementation of @code{lxml.xmlfile}")
1011 (description "This Python library is based upon the @code{xmlfile} module
1012from @code{lxml}. It aims to provide a low memory, compatible implementation
1013of @code{xmlfile}.")
1014 (license license:expat)))
1015
1016(define-public python2-et-xmlfile
1017 (package-with-python2 python-et-xmlfile))
1018
a042d348
MC
1019(define-public python-openpyxl
1020 (package
1021 (name "python-openpyxl")
441e6d93 1022 (version "2.6.2")
a042d348
MC
1023 (source
1024 (origin
1025 ;; We use the upstream repository, as the tests are not included in the
1026 ;; PyPI releases.
1027 (method hg-fetch)
1028 (uri (hg-reference
1029 (url "https://bitbucket.org/openpyxl/openpyxl")
1030 (changeset version)))
1031 (file-name (string-append name "-" version "-checkout"))
1032 (sha256
441e6d93 1033 (base32 "1qhij6kcvdxqjy4g6193nsv4q7fy8n4fwyd3c2z047idlm6s3j4w"))))
a042d348
MC
1034 (build-system python-build-system)
1035 (arguments
1036 `(#:phases (modify-phases %standard-phases
1037 (replace 'check
1038 (lambda _
1039 (invoke "pytest"))))))
1040 (native-inputs
1041 ;; For the test suite.
1042 `(("python-lxml" ,python-lxml)
1043 ("python-pillow" ,python-pillow)
1044 ("python-pytest" ,python-pytest)))
1045 (propagated-inputs
1046 `(("python-et-xmlfile" ,python-et-xmlfile)
1047 ("python-jdcal" ,python-jdcal)))
1048 (home-page "https://openpyxl.readthedocs.io")
1049 (synopsis "Python library to read/write Excel 2010 XLSX/XLSM files")
1050 (description "This Python library allows reading and writing to the Excel XLSX, XLSM,
1051XLTX and XLTM file formats that are defined by the Office Open XML (OOXML)
1052standard.")
1053 (license license:expat)))
1054
44d10b1f
RW
1055(define-public python-eventlet
1056 (package
1057 (name "python-eventlet")
c9876c9b 1058 (version "0.25.1")
44d10b1f
RW
1059 (source
1060 (origin
1061 (method url-fetch)
1062 (uri (pypi-uri "eventlet" version))
1063 (sha256
1064 (base32
c9876c9b 1065 "1hgz8jq19wlz8vwqj900ry8cjv578nz4scc91mlc8944yid6573c"))))
44d10b1f
RW
1066 (build-system python-build-system)
1067 (propagated-inputs
1068 `(("python-greenlet" ,python-greenlet)))
1069 (arguments
1070 ;; TODO: Requires unpackaged 'enum-compat'.
1071 '(#:tests? #f))
bff36617 1072 (home-page "https://eventlet.net")
44d10b1f
RW
1073 (synopsis "Concurrent networking library for Python")
1074 (description
1075 "Eventlet is a concurrent networking library for Python that
1076allows you to change how you run your code, not how you write it.
1077It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
1078Coroutines ensure that the developer uses a blocking style of programming
1079that is similar to threading, but provide the benefits of non-blocking I/O.
1080The event dispatch is implicit, which means you can easily use @code{Eventlet}
1081from the Python interpreter, or as a small part of a larger application.")
1082 (license license:expat)))
1083
1084(define-public python2-eventlet
1085 (let ((base (package-with-python2
1086 (strip-python2-variant python-eventlet))))
1087 (package (inherit base)
1088 (propagated-inputs
1089 `(("python2-enum34" ,python2-enum34)
1090 ,@(package-propagated-inputs base))))))
1091
1092(define-public python-six
1093 (package
1094 (name "python-six")
6c58a06e 1095 (version "1.12.0")
44d10b1f
RW
1096 (source
1097 (origin
1098 (method url-fetch)
1099 (uri (pypi-uri "six" version))
1100 (sha256
1101 (base32
6c58a06e 1102 "0wxs1q74v07ssjywbbm7x6h5v9qx209ld2yfsif4060sxi0h2sni"))))
44d10b1f
RW
1103 (build-system python-build-system)
1104 (arguments
1105 `(#:phases
1106 (modify-phases %standard-phases
1107 (replace 'check
1108 (lambda _
1109 (invoke "py.test" "-v"))))))
1110 (native-inputs
1111 `(("python-py" ,python-py)
1112 ("python-pytest" ,python-pytest-bootstrap)))
1113 (home-page "https://pypi.python.org/pypi/six/")
1114 (synopsis "Python 2 and 3 compatibility utilities")
1115 (description
1116 "Six is a Python 2 and 3 compatibility library. It provides utility
1117functions for smoothing over the differences between the Python versions with
1118the goal of writing Python code that is compatible on both Python versions.
1119Six supports every Python version since 2.5. It is contained in only one
1120Python file, so it can be easily copied into your project.")
1121 (license license:x11)))
1122
1123(define-public python2-six
1124 (package-with-python2 python-six))
1125
1126(define-public python-six-bootstrap
1127 (package
1128 (inherit python-six)
1129 (name "python-six-bootstrap")
1130 (native-inputs `())
1131 (arguments `(#:tests? #f))))
1132
1133(define-public python2-six-bootstrap
1134 (package-with-python2 python-six-bootstrap))
1135
1136(define-public python-schedule
1137 (package
1138 (name "python-schedule")
1139 (version "0.4.3")
1140 (source
1141 (origin
1142 (method url-fetch)
1143 (uri (pypi-uri "schedule" version))
1144 (sha256
1145 (base32
1146 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
1147 (build-system python-build-system)
1148 (native-inputs
1149 `(("python-pytest" ,python-pytest)
1150 ("python-mock" ,python-mock)))
1151 (home-page "https://github.com/dbader/schedule")
1152 (synopsis "Schedule periodic function calls in Python")
1153 (description
1154 "Schedule is an in-process scheduler for periodic jobs that uses the
1155builder pattern for configuration. Schedule lets you run Python functions (or
1156any other callable) periodically at pre-determined intervals using a simple,
1157human-friendly syntax.")
1158 (license license:expat)))
1159
1160(define-public python2-schedule
1161 (package-with-python2 python-schedule))
1162
44d10b1f
RW
1163(define-public python2-mechanize
1164 (package
1165 (name "python2-mechanize")
1166 (version "0.2.5")
1167 (source
1168 (origin
1169 (method url-fetch)
1cc184e6 1170 (uri (pypi-uri "mechanize" version))
44d10b1f
RW
1171 (sha256
1172 (base32
1173 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1174 (build-system python-build-system)
1175 (arguments
1176 `(#:python ,python-2 ; apparently incompatible with Python 3
1177 #:tests? #f))
1178 ;; test fails with message
1179 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1180 ;; (python-3.3.2) or
1181 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1182 ;; (python-2.7.5).
1183 ;; The source code is from March 2011 and probably not up-to-date
1184 ;; with respect to python unit tests.
1185 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1186 (synopsis
1187 "Stateful programmatic web browsing in Python")
1188 (description
1189 "Mechanize implements stateful programmatic web browsing in Python,
1190after Andy Lester’s Perl module WWW::Mechanize.")
1191 (license (license:non-copyleft
1192 "file://COPYING"
1193 "See COPYING in the distribution."))))
1194
1195
1196(define-public python-simplejson
1197 (package
1198 (name "python-simplejson")
1199 (version "3.14.0")
1200 (source
1201 (origin
1202 (method url-fetch)
1203 (uri (pypi-uri "simplejson" version))
1204 (sha256
1205 (base32
1206 "1lkv3xlf7ryzi69zqfdbkvpxdfy1rg1rq2yzcnxgf4km5m6difqy"))))
1207 (build-system python-build-system)
1208 (home-page "http://simplejson.readthedocs.org/en/latest/")
1209 (synopsis
1210 "Json library for Python")
1211 (description
1212 "JSON (JavaScript Object Notation) is a subset of JavaScript
1213syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1214format.
1215
1216Simplejson exposes an API familiar to users of the standard library marshal
1217and pickle modules. It is the externally maintained version of the json
1218library contained in Python 2.6, but maintains compatibility with Python 2.5
1219and (currently) has significant performance advantages, even without using
1220the optional C extension for speedups. Simplejson is also supported on
1221Python 3.3+.")
1222 (license license:x11)))
1223
1224(define-public python2-simplejson
1225 (package-with-python2 python-simplejson))
1226
1227
1228(define-public python-pyicu
1229 (package
1230 (name "python-pyicu")
dc23bb45 1231 (version "2.3.1")
44d10b1f
RW
1232 (source
1233 (origin
1234 (method url-fetch)
1235 (uri (pypi-uri "PyICU" version))
1236 (sha256
1237 (base32
dc23bb45 1238 "1x4w8m7ifki9z2a187pgjr33z6z0rp2fii9b73djak1vhm9v9cnx"))))
44d10b1f
RW
1239 (build-system python-build-system)
1240 (inputs
1241 `(("icu4c" ,icu4c)))
1242 (native-inputs
1243 `(("python-pytest" ,python-pytest)
1244 ("python-six" ,python-six)))
1245 (home-page "https://github.com/ovalhub/pyicu")
1246 (synopsis "Python extension wrapping the ICU C++ API")
1247 (description
1248 "PyICU is a python extension wrapping the ICU C++ API.")
1249 (properties `((python2-variant . ,(delay python2-pyicu))))
1250 (license license:x11)))
1251
1252(define-public python2-pyicu
1253 (let ((base (package-with-python2
1254 (strip-python2-variant python-pyicu))))
1255 (package
1256 (inherit base)
1257 (arguments
1258 `(,@(package-arguments base)
1259 #:phases
1260 (modify-phases %standard-phases
1261 (add-before 'check 'delete-failing-test
1262 (λ _
1263 ;; XXX: This fails due to Unicode issues unique to Python 2,
1264 ;; it seems: <https://github.com/ovalhub/pyicu/issues/61>.
1265 (delete-file "test/test_Script.py")
1266 #t))))))))
1267
1268(define-public python2-dogtail
1269 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1270 ;; spaces in indentation" with Python 3.
1271 (package
1272 (name "python2-dogtail")
1273 (version "0.9.9")
1274 (source (origin
1275 (method url-fetch)
1276 (uri (pypi-uri "dogtail" version))
1277 (sha256
1278 (base32
1279 "0p5wfssvzr9w0bvhllzbbd8fnp4cca2qxcpcsc33dchrmh5n552x"))))
1280 (build-system python-build-system)
1281 (arguments `(#:python ,python-2
1282 #:tests? #f)) ; invalid command "test"
1283 ;; Currently no offical homepage.
1284 (home-page "https://pypi.python.org/pypi/dogtail/")
1285 (synopsis "GUI test tool and automation framework written in Python")
1286 (description
1287 "Dogtail is a GUI test tool and automation framework written in Python.
1288It uses Accessibility (a11y) technologies to communicate with desktop
1289applications. dogtail scripts are written in Python and executed like any
1290other Python program.")
1291 (license license:gpl2+)))
1292
1293(define-public python-empy
1294 (package
1295 (name "python-empy")
0f6d5115 1296 (version "3.3.3")
44d10b1f
RW
1297 (source (origin
1298 (method url-fetch)
1299 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1300 version ".tar.gz"))
1301 (sha256
1302 (base32
0f6d5115 1303 "1mxfy5mgp473ga1pgz2nvm8ds6z4g3hdky8523z6jzvcs9ny6hcq"))))
44d10b1f
RW
1304 (build-system python-build-system)
1305 (arguments
0f6d5115 1306 `(#:tests? #f)) ; python2 only
44d10b1f
RW
1307 (home-page "http://www.alcyone.com/software/empy/")
1308 (synopsis "Templating system for Python")
1309 (description
1310 "EmPy is a system for embedding Python expressions and statements in
1311template text; it takes an EmPy source file, processes it, and produces
1312output. This is accomplished via expansions, which are special signals to the
1313EmPy system and are set off by a special prefix (by default the at sign, @@).
1314EmPy can expand arbitrary Python expressions and statements in this way, as
1315well as a variety of special forms. Textual data not explicitly delimited in
1316this way is sent unaffected to the output, allowing Python to be used in
1317effect as a markup language. Also supported are callbacks via hooks,
1318recording and playback via diversions, and dynamic, chainable filters. The
1319system is highly configurable via command line options and embedded
1320commands.")
1321 (license license:lgpl2.1+)))
1322
1323(define-public python2-empy
0f064242
TGR
1324 (let ((base (package-with-python2 (strip-python2-variant python-empy))))
1325 (package
1326 (inherit base)
1327 (arguments `(,@(package-arguments base)
1328 #:tests? #t)))))
44d10b1f
RW
1329
1330(define-public python2-element-tree
1331 (package
1332 (name "python2-element-tree")
1333 (version "1.2.6")
1334 (source (origin
1335 (method url-fetch)
1336 (uri (string-append
1337 "http://effbot.org/media/downloads/elementtree-"
1338 version "-20050316.tar.gz"))
1339 (sha256
1340 (base32
1341 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1342 (build-system python-build-system)
1343 (arguments
1344 `(#:python ,python-2 ; seems to be part of Python 3
1345 #:tests? #f)) ; no 'test' sub-command
1346 (synopsis "Toolkit for XML processing in Python")
1347 (description
1348 "ElementTree is a Python library supporting lightweight XML processing.")
1349 (home-page "http://effbot.org/zone/element-index.htm")
1350 (license (license:x11-style
1351 "http://docs.python.org/2/license.html"
1352 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1353
1354(define-public python2-pybugz
1355 (package
1356 (name "python2-pybugz")
1357 (version "0.6.11")
1358 (source (origin
1359 (method url-fetch)
1360 (uri (string-append
1361 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1362 version ".tar.gz"))
1363 (sha256
1364 (base32
1365 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1366 (patches (search-patches "pybugz-stty.patch"
1367 "pybugz-encode-error.patch"))))
1368 (build-system python-build-system)
1369 (arguments
1370 `(#:python ,python-2 ; SyntaxError with Python 3
1371 #:tests? #f)) ; no 'test' sub-command
1372 (propagated-inputs
1373 `(("element-tree" ,python2-element-tree)))
1374 (synopsis "Python and command-line interface to Bugzilla")
1375 (description
1376 "PyBugz is a Python library and command-line tool to query the Bugzilla
1377bug tracking system. It is meant as an aid to speed up interaction with the
1378bug tracker.")
1379 (home-page "http://www.liquidx.net/pybugz/")
1380 (license license:gpl2)))
1381
1382(define-public python2-enum
1383 (package
1384 (name "python2-enum")
1385 (version "0.4.6")
1386 (source (origin
1387 (method url-fetch)
1388 (uri (pypi-uri "enum" version))
1389 (sha256
1390 (base32
1391 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
1392 (build-system python-build-system)
1393 (arguments
1394 `(#:python ,python-2))
1395 (home-page "http://pypi.python.org/pypi/enum/")
1396 (synopsis "Robust enumerated type support in Python")
1397 (description
1398 "This provides a module for robust enumerations in Python. It has
1399been superseded by the Python standard library and is provided only for
1400compatibility.")
1401 ;; Choice of either license.
1402 (license (list license:gpl3+ license:psfl))))
1403
1404(define-public python-enum34
1405 (package
1406 (name "python-enum34")
1407 (version "1.1.6")
1408 (source
1409 (origin
1410 (method url-fetch)
1411 (uri (pypi-uri "enum34" version))
1412 (sha256
1413 (base32
1414 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
1415 (build-system python-build-system)
1416 (home-page "https://pypi.python.org/pypi/enum34")
1417 (synopsis "Backported Python 3.4 Enum")
1418 (description
1419 "Enum34 is the new Python stdlib enum module available in Python 3.4
1420backported for previous versions of Python from 2.4 to 3.3.")
1421 (license license:bsd-3)))
1422
1423(define-public python2-enum34
1424 (package-with-python2 python-enum34))
1425
1426(define-public python-parse-type
1427 (package
1428 (name "python-parse-type")
1429 (version "0.4.2")
1430 (source
1431 (origin
1432 (method url-fetch)
1433 (uri (pypi-uri "parse_type" version))
1434 (sha256
1435 (base32
1436 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
1437 (build-system python-build-system)
1438 (propagated-inputs
1439 `(("python-six" ,python-six)
1440 ("python-parse" ,python-parse)))
1441 (native-inputs
1442 `(("python-pytest" ,python-pytest)
1443 ("python-pytest-runner" ,python-pytest-runner)))
1444 (home-page "https://github.com/jenisys/parse_type")
1445 (synopsis "Extended parse module")
1446 (description
1447 "Parse_type extends the python parse module.")
1448 (properties
1449 `((python2-variant . ,(delay python2-parse-type))))
1450 (license license:bsd-3)))
1451
1452(define-public python2-parse-type
1453 (let ((base (package-with-python2
1454 (strip-python2-variant python-parse-type))))
1455 (package (inherit base)
1456 (propagated-inputs
1457 `(("python2-enum34" ,python2-enum34)
1458 ,@(package-propagated-inputs base))))))
1459
1460(define-public python-parse
1461 (package
1462 (name "python-parse")
1463 (version "1.8.4")
1464 (source
1465 (origin
1466 (method url-fetch)
1467 (uri (pypi-uri "parse" version))
1468 (sha256
1469 (base32
1470 "0f8997xr8nq2nq35iiviq8ningd1zvy59fg503xfpbi2dwhgdkf3"))))
1471 (build-system python-build-system)
1472 (arguments
1473 `(#:phases
1474 (modify-phases %standard-phases
1475 (replace 'check
1476 (lambda _ (invoke "python" "test_parse.py"))))))
1477 (home-page "https://github.com/r1chardj0n3s/parse")
1478 (synopsis "Parse strings")
1479 (description
1480 "Parse strings using a specification based on the Python @code{format()}
1481syntax.")
1482 (license license:x11)))
1483
1484(define-public python-polib
1485 (package
1486 (name "python-polib")
1487 (version "1.0.8")
1488 (source (origin
1489 (method url-fetch)
1490 (uri (pypi-uri "polib" version))
1491 (sha256
1492 (base32
1493 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1494 (build-system python-build-system)
1495 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1496 (synopsis "Manipulate, create and modify gettext files")
1497 (description "Polib can manipulate any gettext format (po, pot and mo)
1498files. It can be used to create po files from scratch or to modify
1499existing ones.")
1500 (license license:expat)))
1501
1502(define-public python2-polib
1503 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1504 (package
1505 (inherit base)
1506 (arguments `(,@(package-arguments base)
1507 ;; Tests don't work with python2.
1508 #:tests? #f)))))
1509
6830120e
TLC
1510(define-public python-poyo
1511 (package
1512 (name "python-poyo")
1513 (version "0.5.0")
1514 (source
1515 (origin
1516 (method url-fetch)
1517 (uri (pypi-uri "poyo" version))
1518 (sha256
1519 (base32
1520 "1pflivs6j22frz0v3dqxnvc8yb8fb52g11lqr88z0i8cg2m5csg2"))))
1521 (build-system python-build-system)
1522 (home-page "https://github.com/hackebrot/poyo")
1523 (synopsis "Lightweight YAML Parser for Python")
1524 (description
1525 "This package provides a lightweight YAML Parser for Python. It supports
1526only a chosen subset of the YAML format that is required to parse cookiecutter
1527user configuration files. It does not have support for serializing into YAML
1528and is not compatible with JSON.")
1529 (license license:expat)))
1530
44d10b1f
RW
1531(define-public scons
1532 (package
1533 (name "scons")
05487ed8 1534 (version "3.0.4")
44d10b1f 1535 (source (origin
ad34338d
RW
1536 (method git-fetch)
1537 (uri (git-reference
1538 (url "https://github.com/SCons/scons.git")
1539 (commit version)))
1540 (file-name (git-file-name name version))
44d10b1f
RW
1541 (sha256
1542 (base32
05487ed8 1543 "1xy8jrwz87y589ihcld4hv7wn122sjbz914xn8h50ww77wbhk8hn"))))
44d10b1f
RW
1544 (build-system python-build-system)
1545 (arguments
1546 `(#:use-setuptools? #f ; still relies on distutils
ad34338d
RW
1547 #:tests? #f ; no 'python setup.py test' command
1548 #:phases
1549 (modify-phases %standard-phases
1550 (add-before 'build 'bootstrap
1551 (lambda _
1552 (substitute* "src/engine/SCons/compat/__init__.py"
1553 (("sys.modules\\[new\\] = imp.load_module\\(old, \\*imp.find_module\\(old\\)\\)")
1554 "sys.modules[new] = __import__(old)"))
05487ed8
RW
1555 (substitute* "src/engine/SCons/Platform/__init__.py"
1556 (("mod = imp.load_module\\(full_name, file, path, desc\\)")
1557 "mod = __import__(full_name)"))
ad34338d
RW
1558 (invoke "python" "bootstrap.py" "build/scons" "DEVELOPER=guix")
1559 (chdir "build/scons")
1560 #t)))))
44d10b1f
RW
1561 (home-page "http://scons.org/")
1562 (synopsis "Software construction tool written in Python")
1563 (description
1564 "SCons is a software construction tool. Think of SCons as an improved,
1565cross-platform substitute for the classic Make utility with integrated
1566functionality similar to autoconf/automake and compiler caches such as ccache.
1567In short, SCons is an easier, more reliable and faster way to build
1568software.")
1569 (license license:x11)))
1570
1571(define-public scons-python2
1572 (package
1573 (inherit (package-with-python2 scons))
1574 (name "scons-python2")))
1575
1576(define-public python-extras
1577 (package
1578 (name "python-extras")
1579 (version "1.0.0")
1580 (source
1581 (origin
1582 (method url-fetch)
1583 (uri (pypi-uri "extras" version))
1584 (sha256
1585 (base32
1586 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
1587 (build-system python-build-system)
1588 (arguments
1589 ;; FIXME: Circular dependency on testtools.
1590 '(#:tests? #f))
1591 (home-page "https://github.com/testing-cabal/extras")
1592 (synopsis "Useful extensions to the Python standard library")
1593 (description
1594 "Extras is a set of extensions to the Python standard library.")
1595 (license license:expat)))
1596
1597(define-public python2-extras
1598 (package-with-python2 python-extras))
1599
1600(define-public python-mimeparse
1601 (package
1602 (name "python-mimeparse")
1603 (version "1.6.0")
1604 (source
1605 (origin
1606 (method url-fetch)
89bf667c 1607 (uri (pypi-uri "python-mimeparse" version))
44d10b1f
RW
1608 (sha256
1609 (base32
1610 "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n"))))
1611 (build-system python-build-system)
1612 (arguments
1613 '(#:phases
1614 (modify-phases %standard-phases
1615 (replace 'check
1616 (lambda _
1617 (invoke "./mimeparse_test.py"))))))
1618 (home-page
1619 "https://github.com/dbtsai/python-mimeparse")
1620 (synopsis "Python library for parsing MIME types")
1621 (description
1622 "Mimeparse provides basic functions for parsing MIME type names and
1623matching them against a list of media-ranges.")
1624 (license license:expat)))
1625
1626(define-public python2-mimeparse
1627 (package-with-python2 python-mimeparse))
1628
1629(define-public python-miniboa
1630 (package
1631 (name "python-miniboa")
1632 (version "1.0.7")
1633 (source
1634 (origin
1635 (method url-fetch)
1636 (uri (pypi-uri "miniboa" version))
1637 (sha256
1638 (base32
1639 "09jh3pn4rh7kh7jayanf8jzy6gp03791b5a193w6148cf3i6k9m3"))))
1640 (build-system python-build-system)
1641 (home-page "https://github.com/shmup/miniboa")
1642 (synopsis "Simple, single-threaded Telnet server")
1643 (description
1644 "Miniboa is a simple, asynchronous, single-threaded, poll-based Telnet
1645server.")
1646 (license license:asl2.0)))
1647
1648(define-public python2-miniboa
1649 (package-with-python2 python-miniboa))
1650
1651(define-public python-pafy
1652 (package
1653 (name "python-pafy")
1654 (version "0.5.3.1")
1655 (source
1656 (origin
1657 (method url-fetch)
1658 (uri (pypi-uri "pafy" version))
1659 (sha256
1660 (base32
1661 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
1662 (build-system python-build-system)
1663 (arguments
1664 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
1665 (propagated-inputs
1666 ;; Youtube-dl is a python package which is imported in the file
1667 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1668 `(("youtube-dl" ,youtube-dl)))
1669 (home-page "https://np1.github.io/pafy/")
1670 (synopsis "Retrieve YouTube content and metadata")
1671 (description
1672 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1673 (license license:lgpl3+)))
1674
1675(define-public python2-funcsigs
1676 (package
1677 (name "python2-funcsigs")
1678 (version "1.0.2")
1679 (source (origin
1680 (method url-fetch)
1681 (uri (pypi-uri "funcsigs" version))
1682 (sha256
1683 (base32
1684 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
1685 (build-system python-build-system)
1686 (arguments
1687 `(#:python ,python-2))
1688 (native-inputs
1689 `(("python2-unittest2" ,python2-unittest2)))
1690 (home-page "http://funcsigs.readthedocs.org")
1691 (synopsis "Python function signatures from PEP362")
1692 (description
1693 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
1694 (license license:asl2.0)))
1695
1696(define-public python2-funcsigs-bootstrap
1697 (package
1698 (inherit python2-funcsigs)
1699 (name "python2-funcsigs-bootstrap")
1700 (native-inputs `())
1701 (arguments
1702 `(#:tests? #f
1703 ,@(package-arguments python2-funcsigs)))))
1704
1705(define-public python-py
1706 (package
1707 (name "python-py")
08eba545 1708 (version "1.8.0")
44d10b1f
RW
1709 (source
1710 (origin
1711 (method url-fetch)
1712 (uri (pypi-uri "py" version))
1713 (sha256
1714 (base32
08eba545 1715 "0lsy1gajva083pzc7csj1cvbmminb7b4l6a0prdzyb3fd829nqyw"))))
44d10b1f
RW
1716 (build-system python-build-system)
1717 (arguments
1718 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1719 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1720 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1721 ;; Is this module globally installed?"
1722 '(#:tests? #f))
1723 (native-inputs
1724 `(("python-setuptools-scm" ,python-setuptools-scm)))
1725 (home-page "https://github.com/pytest-dev/py")
1726 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1727 (description
1728 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1729code introspection, and logging.")
1730 (license license:expat)))
1731
1732(define-public python2-py
1733 (package-with-python2 python-py))
1734
1735;; Recent versions of python-fixtures and python-testrepository need
1736;; python-pbr for packaging, which itself needs these two packages for
1737;; testing.
1738;; To fix this circular dependency, we use a build of python-pbr, based on the
1739;; same source, just without any test dependencies and with tests disabled.
1740;; python-pbr-minmal is then used to package python-fixtures and
1741;; python-testrepository.
1742;; Strictly speaking we currently could remove the test-requirements from the
1743;; normal python-pbr package (and save this package) since test are disabled
1744;; there anyway. But this may change in future.
1745(define-public python-pbr-minimal
1746 (package
1747 (name "python-pbr-minimal")
1748 (version "3.0.1")
1749 (source
1750 (origin
1751 (method url-fetch)
1752 (uri (pypi-uri "pbr" version))
1753 (sha256
1754 (base32
1755 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
1756 (build-system python-build-system)
1757 (arguments
1758 `(#:tests? #f))
1759 (home-page "http://docs.openstack.org/developer/pbr/")
1760 (synopsis "Minimal build of python-pbr used for bootstrapping")
1761 (description
1762 "Used only for bootstrapping python2-pbr, you should not need this.")
1763 (license license:asl2.0)))
1764
1765(define-public python2-pbr-minimal
1766 (package-with-python2 python-pbr-minimal))
1767
1768(define-public python-pbr
1769 (package
1770 (inherit python-pbr-minimal)
1771 (name "python-pbr")
1772 (arguments
1773 `(#:tests? #f)) ;; Most tests seem to use the Internet.
1774 (propagated-inputs
1775 `(("git" ,git))) ;; pbr actually uses the "git" binary.
1776 (native-inputs
1777 `(("python-fixtures" ,python-fixtures-bootstrap)
1778 ;; discover, coverage, hacking, subunit
1779 ("python-mock" ,python-mock)
1780 ("python-six" ,python-six)
1781 ("python-sphinx" ,python-sphinx)
1782 ("python-testrepository" ,python-testrepository-bootstrap)
1783 ("python-testresources" ,python-testresources-bootstrap)
1784 ("python-testscenarios" ,python-testscenarios-bootstrap)
1785 ("python-testtools" ,python-testtools-bootstrap)
1786 ("python-virtualenv" ,python-virtualenv)))
1787 (synopsis "Enhance the default behavior of Python’s setuptools")
1788 (description
1789 "Python Build Reasonableness (PBR) is a library that injects some useful
1790and sensible default behaviors into your setuptools run. It will set
1791versions, process requirements files and generate AUTHORS and ChangeLog file
1792from git information.
1793")))
1794
1795(define-public python2-pbr
1796 (package-with-python2 python-pbr))
1797
ea43f0d5
MB
1798(define-public python-pyrsistent
1799 (package
1800 (name "python-pyrsistent")
1801 (version "0.14.11")
1802 (home-page "https://github.com/tobgu/pyrsistent")
1803 (source (origin
1804 (method url-fetch)
1805 (uri (pypi-uri "pyrsistent" version))
1806 (sha256
1807 (base32
1808 "1qkh74bm296mp5g3r11lgsksr6bh4w1bf8pji4nmxdlfj542ga1w"))))
1809 (build-system python-build-system)
1810 (native-inputs
1811 `(("python-hypothesis" ,python-hypothesis)
1812 ("python-pytest" ,python-pytest)
1813 ("python-pytest-runner" ,python-pytest-runner)))
1814 (propagated-inputs
1815 `(("python-six" ,python-six)))
1816 (synopsis "Persistent data structures for Python")
1817 (description
1818 "Pyrsistent is a number of persistent collections (by some referred to as
1819functional data structures). Persistent in the sense that they are immutable.
1820
1821All methods on a data structure that would normally mutate it instead return a
1822new copy of the structure containing the requested updates. The original
1823structure is left untouched.")
1824 (license license:expat)))
1825
1826(define-public python2-pyrsistent
1827 (package-with-python2 python-pyrsistent))
1828
44d10b1f
RW
1829(define-public python-exif-read
1830 (package
1831 (name "python-exif-read")
1832 (version "2.1.2")
1833 (source (origin
1834 (method url-fetch)
1835 (uri (pypi-uri "ExifRead" version))
1836 (sha256
1837 (base32
1838 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
1839 (build-system python-build-system)
1840 (arguments `(#:tests? #f)) ; no tests
1841 (home-page "https://github.com/ianare/exif-py")
1842 (synopsis "Python library to extract EXIF data from image files")
1843 (description
1844 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
1845files.")
1846 (license license:bsd-3)))
1847
1848(define-public python2-exif-read
1849 (package-with-python2 python-exif-read))
1850
1851(define-public python-pyld
1852 (package
1853 (name "python-pyld")
6d4ed78d 1854 (version "1.0.5")
44d10b1f
RW
1855 (source (origin
1856 (method url-fetch)
1857 (uri (pypi-uri "PyLD" version))
1858 (sha256
1859 (base32
6d4ed78d 1860 "1ywbdbsrkg533qh8xn9ifjh2mvam6v5msrjyqq73jfpvcp89qvff"))))
44d10b1f
RW
1861 (build-system python-build-system)
1862 (home-page "https://github.com/digitalbazaar/pyld")
1863 (synopsis "Python implementation of the JSON-LD specification")
1864 (description
1865 "PyLD is an implementation of the JSON-LD specification.")
1866 (license license:bsd-3)))
1867
1868(define-public python2-pyld
1869 (package-with-python2 python-pyld))
1870
1871(define-public python-click
1872 (package
1873 (name "python-click")
61984855 1874 (version "7.0")
44d10b1f
RW
1875 (source
1876 (origin
1877 (method url-fetch)
1878 (uri (pypi-uri "click" version))
1879 (sha256
1880 (base32
61984855 1881 "1mzjixd4vjbjvzb6vylki9w1556a9qmdh35kzmq6cign46av952v"))))
44d10b1f
RW
1882 (build-system python-build-system)
1883 (arguments
8d7e7ca6 1884 `(#:phases
44d10b1f
RW
1885 (modify-phases %standard-phases
1886 (add-after 'unpack 'fix-paths
1887 (lambda* (#:key inputs #:allow-other-keys)
1888 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
1889 "cross-libc" "libc"))))
1890 (substitute* "click/_unicodefun.py"
1891 (("'locale'")
1892 (string-append "'" glibc "/bin/locale'"))))
8d7e7ca6
EF
1893 #t))
1894 (replace 'check
1895 (lambda _
1896 (invoke "python" "-m" "pytest"))))))
44d10b1f
RW
1897 (native-inputs
1898 `(("python-pytest" ,python-pytest)))
61984855 1899 (home-page "https://palletsprojects.com/p/click/")
44d10b1f
RW
1900 (synopsis "Command line library for Python")
1901 (description
1902 "Click is a Python package for creating command line interfaces in a
1903composable way with as little code as necessary. Its name stands for
1904\"Command Line Interface Creation Kit\". It's highly configurable but comes
1905with sensible defaults out of the box.")
1906 (license license:bsd-3)))
1907
1908(define-public python2-click
1909 (package-with-python2 python-click))
1910
1911(define-public python-wheel
1912 (package
1913 (name "python-wheel")
8f137daf 1914 (version "0.33.6")
44d10b1f
RW
1915 (source
1916 (origin
1917 (method url-fetch)
1918 (uri (pypi-uri "wheel" version))
1919 (sha256
1920 (base32
8f137daf 1921 "0ii6f34rvpjg3nmw4bc2h7fhdsy38y1h93hghncfs5akfrldmj8h"))))
44d10b1f 1922 (build-system python-build-system)
8f137daf
MB
1923 (arguments
1924 ;; FIXME: The test suite runs "python setup.py bdist_wheel", which in turn
1925 ;; fails to find the newly-built bdist_wheel library, even though it is
1926 ;; available on PYTHONPATH. What search path is consulted by setup.py?
1927 '(#:tests? #f))
44d10b1f
RW
1928 (home-page "https://bitbucket.org/pypa/wheel/")
1929 (synopsis "Format for built Python packages")
1930 (description
1931 "A wheel is a ZIP-format archive with a specially formatted filename and
1932the @code{.whl} extension. It is designed to contain all the files for a PEP
1933376 compatible install in a way that is very close to the on-disk format. Many
1934packages will be properly installed with only the @code{Unpack} step and the
1935unpacked archive preserves enough information to @code{Spread} (copy data and
1936scripts to their final locations) at any later time. Wheel files can be
1937installed with a newer @code{pip} or with wheel's own command line utility.")
8f137daf 1938 (license license:expat)))
44d10b1f
RW
1939
1940(define-public python2-wheel
8f137daf 1941 (package-with-python2 python-wheel))
44d10b1f
RW
1942
1943(define-public python-vcversioner
1944 (package
1945 (name "python-vcversioner")
1946 (version "2.16.0.0")
1947 (source
1948 (origin
1949 (method url-fetch)
1950 (uri (pypi-uri "vcversioner" version))
1951 (sha256
1952 (base32
1953 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
1954 (build-system python-build-system)
1955 (synopsis "Python library for version number discovery")
1956 (description "Vcversioner is a Python library that inspects tagging
1957information in a variety of version control systems in order to discover
1958version numbers.")
1959 (home-page "https://github.com/habnabit/vcversioner")
1960 (license license:isc)))
1961
1962(define-public python2-vcversioner
1963 (package-with-python2 python-vcversioner))
1964
5591fc4f
MC
1965(define-public python-jdcal
1966 (package
1967 (name "python-jdcal")
1968 (version "1.4")
1969 (source
1970 (origin
1971 (method url-fetch)
1972 (uri (pypi-uri "jdcal" version))
1973 (sha256
1974 (base32
1975 "1ja6j2xq97bsl6rv09mhdx7n0xnrsfx0mj5xqza0mxghqmkm02pa"))))
1976 (build-system python-build-system)
1977 (arguments
1978 `(#:phases (modify-phases %standard-phases
1979 (replace 'check
1980 (lambda _
1981 (invoke "pytest"))))))
1982 (native-inputs
1983 `(("python-pytest" ,python-pytest)))
1984 (home-page "https://github.com/phn/jdcal")
1985 (synopsis "Functions to convert between Julian dates Gregorian dates")
1986 (description "This Python library provides functions for converting
1987between Julian dates and Gregorian dates.")
1988 (license license:bsd-2)))
1989
1990(define-public python2-jdcal
1991 (package-with-python2 python-jdcal))
1992
06d41d8d
VC
1993(define-public python-jsondiff
1994 (package
1995 (name "python-jsondiff")
1996 (version "1.2.0")
1997 (source
1998 (origin
1999 (method url-fetch)
2000 (uri (pypi-uri "jsondiff" version))
2001 (sha256
2002 (base32
2003 "00v3689175aqzdscrxpffm712ylp8jvcpqdg51ca22ni6721p51l"))))
2004 (build-system python-build-system)
2005 (native-inputs
2006 `(("python-nose" ,python-nose)
2007 ("python-nose-random" ,python-nose-random)))
2008 (home-page
2009 "https://github.com/fzumstein/jsondiff")
2010 (synopsis "Compare JSON and JSON-like structures in Python")
2011 (description "@code{jsondiff} is a Python library which lets you
2012compare, diff, and patch JSON and JSON-like structures in Python.")
2013 (license license:expat)))
2014
44d10b1f
RW
2015(define-public python-jsonschema
2016 (package
2017 (name "python-jsonschema")
1adde06e 2018 (version "3.0.1")
44d10b1f
RW
2019 (source (origin
2020 (method url-fetch)
786ccb87 2021 (uri (pypi-uri "jsonschema" version))
44d10b1f
RW
2022 (sha256
2023 (base32
1adde06e 2024 "03g20i1xfg4qdlk4475pl4pp7y0h37g1fbgs5qhy678q9xb822hc"))))
44d10b1f
RW
2025 (build-system python-build-system)
2026 (arguments
2027 '(#:phases
2028 (modify-phases %standard-phases
1adde06e
MB
2029 (replace 'check
2030 (lambda _
2031 (setenv "PYTHONPATH" (string-append ".:" (getenv "PYTHONPATH")))
2032 (invoke "trial" "jsonschema"))))))
44d10b1f 2033 (native-inputs
1adde06e
MB
2034 `(("python-setuptools_scm" ,python-setuptools-scm)
2035 ("python-twisted" ,python-twisted)))
2036 (propagated-inputs
2037 `(("python-attrs" ,python-attrs)
2038 ("python-pyrsistent" ,python-pyrsistent)
2039 ("python-six" ,python-six)))
44d10b1f
RW
2040 (home-page "https://github.com/Julian/jsonschema")
2041 (synopsis "Implementation of JSON Schema for Python")
2042 (description
2043 "Jsonschema is an implementation of JSON Schema for Python.")
2044 (license license:expat)
2045 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2046
2047(define-public python2-jsonschema
2048 (let ((jsonschema (package-with-python2
2049 (strip-python2-variant python-jsonschema))))
2050 (package (inherit jsonschema)
44d10b1f 2051 (propagated-inputs
1adde06e
MB
2052 `(("python2-functools32" ,python2-functools32)
2053 ,@(package-propagated-inputs jsonschema))))))
44d10b1f 2054
914bba28
TGR
2055;; This old version is still required by docker-compose as of 1.24.0.
2056(define-public python-jsonschema-2.6
2057 (package
2058 (name "python-jsonschema")
2059 (version "2.6.0")
2060 (source (origin
2061 (method url-fetch)
2062 (uri (pypi-uri "jsonschema" version))
2063 (sha256
2064 (base32
2065 "00kf3zmpp9ya4sydffpifn0j0mzm342a2vzh82p6r0vh10cg7xbg"))))
2066 (build-system python-build-system)
2067 (arguments
2068 '(#:phases
2069 (modify-phases %standard-phases
2070 (replace 'check (lambda _ (invoke "nosetests"))))))
2071 (native-inputs
2072 `(("python-nose" ,python-nose)
2073 ("python-vcversioner" ,python-vcversioner)))
2074 (home-page "https://github.com/Julian/jsonschema")
2075 (synopsis "Implementation of JSON Schema for Python")
2076 (description
2077 "Jsonschema is an implementation of JSON Schema for Python.")
2078 (license license:expat)
2079 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2080
44d10b1f
RW
2081(define-public python-schema
2082 (package
2083 (name "python-schema")
2084 (version "0.6.6")
2085 (source
2086 (origin
2087 (method url-fetch)
2088 (uri (pypi-uri "schema" version))
2089 (sha256
2090 (base32
2091 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
2092 (build-system python-build-system)
2093 (native-inputs
2094 `(("python-pytest" ,python-pytest)))
2095 (home-page "https://github.com/keleshev/schema")
2096 (synopsis "Simple data validation library")
2097 (description
2098 "@code{python-schema} is a library for validating Python data
2099structures, such as those obtained from config-files, forms, external
2100services or command-line parsing, converted from JSON/YAML (or
2101something else) to Python data-types.")
2102 (license license:psfl)))
2103
2104(define-public python2-schema
2105 (package-with-python2 python-schema))
2106
2107(define-public python-schema-0.5
2108 (package (inherit python-schema)
2109 (version "0.5.0")
2110 (source
2111 (origin
2112 (method url-fetch)
2113 (uri (pypi-uri "schema" version))
2114 (sha256
2115 (base32
2116 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
2117
2118(define-public python2-schema-0.5
2119 (package-with-python2 python-schema-0.5))
2120
2121(define-public python-kitchen
2122 (package
2123 (name "python-kitchen")
2124 (version "1.2.5")
2125 (source
2126 (origin
2127 (method url-fetch)
2128 (uri (pypi-uri "kitchen" version))
2129 (sha256
2130 (base32
2131 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
2132 (build-system python-build-system)
2133 (propagated-inputs
2134 `(("python-chardet" ,python-chardet)))
2135 (home-page "https://github.com/fedora-infra/kitchen")
2136 (synopsis "Python API for snippets")
2137 (description "@code{kitchen} module provides a python API for all sorts of
2138little useful snippets of code that everybody ends up writing for their projects
2139but never seem big enough to build an independent release. Use kitchen and stop
2140cutting and pasting that code over and over.")
2141 (license (list license:lgpl2.1+
2142 ;; subprocess.py, test_subprocess.py,
2143 ;; kitchen/pycompat25/defaultdict.py:
2144 license:psfl))))
2145
2146(define-public python2-kitchen
2147 (package-with-python2 python-kitchen))
2148
2149(define-public python-unidecode
2150 (package
2151 (name "python-unidecode")
eb80a300 2152 (version "1.1.1")
44d10b1f
RW
2153 (source (origin
2154 (method url-fetch)
2155 (uri (pypi-uri "Unidecode" version))
2156 (sha256
2157 (base32
eb80a300 2158 "1s6cp2lv4m0f00hjckjz8p6m7d3n3v16jvg353llf5ia1iqsnsib"))))
44d10b1f
RW
2159 (build-system python-build-system)
2160 (home-page "https://pypi.python.org/pypi/Unidecode")
2161 (synopsis "ASCII transliterations of Unicode text")
2162 (description
2163 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2164useful when integrating with legacy code that doesn't support Unicode, or for
2165ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2166machine identifiers from human-readable Unicode strings that should still be
2167somewhat intelligible.")
2168 (license license:gpl2+)))
2169
2170(define-public python2-unidecode
2171 (package-with-python2 python-unidecode))
2172
2173(define-public python-pyjwt
2174 (package
2175 (name "python-pyjwt")
be6f2f56 2176 (version "1.7.1")
44d10b1f
RW
2177 (source
2178 (origin
2179 (method url-fetch)
2180 (uri (pypi-uri "PyJWT" version))
2181 (sha256
2182 (base32
be6f2f56 2183 "15hflax5qkw1v6nssk1r0wkj83jgghskcmn875m3wgvpzdvajncd"))
44d10b1f
RW
2184 (modules '((guix build utils)))
2185 (snippet
2186 '(begin
2187 (for-each delete-file-recursively
2188 (find-files "." "\\.pyc$"))
2189 #t))))
2190 (build-system python-build-system)
2191 (native-inputs
2192 `(("python-pytest" ,python-pytest)
2193 ("python-pytest-cov" ,python-pytest-cov)
2194 ("python-pytest-runner" ,python-pytest-runner)))
2195 (home-page "https://github.com/progrium/pyjwt")
2196 (synopsis "JSON Web Token implementation in Python")
2197 (description
2198 "PyJWT is a JSON Web Token implementation written in Python.")
2199 (license license:expat)))
2200
2201(define-public python2-pyjwt
2202 (package-with-python2 python-pyjwt))
2203
2204(define-public python-pykka
2205 (package
2206 (name "python-pykka")
2207 (version "1.2.1")
2208 (source
2209 (origin
2210 (method url-fetch)
2211 (uri (pypi-uri "Pykka" version))
2212 (sha256
2213 (base32
2214 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
2215 (build-system python-build-system)
2216 (native-inputs
2217 `(("python-mock" ,python-mock)
2218 ("python-nose" ,python-nose)
2219 ("python-gevent" ,python-gevent)
2220 ("python-eventlet" ,python-eventlet)))
2221 (home-page "https://www.pykka.org/")
2222 (synopsis "Pykka is a Python implementation of the actor model")
2223 (description
2224 "Pykka is a Python implementation of the actor model.
2225The actor model introduces some simple rules to control the sharing
2226of state and cooperation between execution units, which makes it
2227easier to build concurrent applications.")
2228 (license license:asl2.0)))
2229
2230(define-public python2-pykka
2231 (package-with-python2 python-pykka))
2232
8d22f7e3
VC
2233(define-public python-pymsgbox
2234 (package
2235 (name "python-pymsgbox")
2236 (version "1.0.6")
2237 (source
2238 (origin
2239 (method git-fetch)
2240 (uri (git-reference
2241 ;; LICENSE.txt is not present on pypi
2242 (url "https://github.com/asweigart/PyMsgBox")
2243 (commit "55926b55f46caa969c5ddb87990ebea2737bd66f")))
2244 (file-name (git-file-name name version))
2245 (sha256
2246 (base32
2247 "0zy7rjfpwlrd8b64j7jk2lb8m2npc21rnpwakpfvwgl4nxdy80rg"))))
2248 (arguments
2249 ;; Circular dependency to run tests:
2250 ;; Tests need pyautogui, which depends on pymsgbox.
2251 '(#:tests? #f))
2252 (build-system python-build-system)
2253 (home-page "https://github.com/asweigart/PyMsgBox")
2254 (synopsis "Python module for JavaScript-like message boxes")
2255 (description
2256 "PyMsgBox is a simple, cross-platform, pure Python module for
2257JavaScript-like message boxes. Types of dialog boxes include:
2258@enumerate
2259@item alert
2260@item confirm
2261@item prompt
2262@item password
2263@end enumerate
2264")
2265 (license license:bsd-3)))
2266
44d10b1f
RW
2267(define-public python-pympler
2268 (package
2269 (name "python-pympler")
2270 (home-page "https://pythonhosted.org/Pympler/")
6469af6f 2271 (version "0.8")
44d10b1f
RW
2272 (source (origin
2273 (method url-fetch)
2274 (uri (pypi-uri "Pympler" version))
2275 (sha256
2276 (base32
6469af6f 2277 "08mrpnb6cv2nvfncvr8a9a8bpwhnasa924anapnjvnaw5jcd4k7p"))))
44d10b1f
RW
2278 (build-system python-build-system)
2279 (arguments
2280 `(#:phases (modify-phases %standard-phases
2281 (delete 'check)
2282 (add-after 'install 'check
2283 (lambda* (#:key inputs outputs #:allow-other-keys)
2284 (add-installed-pythonpath inputs outputs)
2285 (invoke "python" "setup.py" "test"))))))
2286 (synopsis "Measure, monitor and analyze memory behavior")
2287 (description
2288 "Pympler is a development tool to measure, monitor and analyze
2289the memory behavior of Python objects in a running Python application.
2290
2291By pympling a Python application, detailed insight in the size and the
2292lifetime of Python objects can be obtained. Undesirable or unexpected
2293runtime behavior like memory bloat and other @samp{pymples} can easily
2294be identified.
2295
2296A web profiling frontend exposes process statistics, garbage
2297visualisation and class tracker statistics.")
2298 (license license:asl2.0)))
2299
2300(define-public python2-pympler
2301 (package-with-python2 python-pympler))
2302
2303(define-public python-itsdangerous
2304 (package
2305 (name "python-itsdangerous")
acfcf2ed 2306 (version "1.1.0")
44d10b1f
RW
2307 (source
2308 (origin
2309 (method url-fetch)
acfcf2ed 2310 (uri (pypi-uri "itsdangerous" version))
44d10b1f
RW
2311 (sha256
2312 (base32
acfcf2ed 2313 "068zpbksq5q2z4dckh2k1zbcq43ay74ylqn77rni797j0wyh66rj"))))
44d10b1f 2314 (build-system python-build-system)
acfcf2ed 2315 (home-page "https://palletsprojects.com/p/itsdangerous/")
44d10b1f
RW
2316 (synopsis "Python library for passing data to/from untrusted environments")
2317 (description
2318 "Itsdangerous provides various helpers to pass trusted data to untrusted
2319environments and back.")
2320 (license license:bsd-3)))
2321
2322(define-public python2-itsdangerous
2323 (package-with-python2 python-itsdangerous))
2324
2325(define-public python-pyyaml
2326 (package
2327 (name "python-pyyaml")
2328 (version "3.13")
2329 (source
2330 (origin
2331 (method url-fetch)
2332 (uri (pypi-uri "PyYAML" version))
2333 (sha256
2334 (base32
2335 "1gx603g484z46cb74j9rzr6sjlh2vndxayicvlyhxdz98lhhkwry"))))
2336 (build-system python-build-system)
2337 (inputs
2338 `(("libyaml" ,libyaml)))
2339 (home-page "http://pyyaml.org/wiki/PyYAML")
2340 (synopsis "YAML parser and emitter for Python")
2341 (description
2342 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2343complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2344API, and sensible error messages. PyYAML supports standard YAML tags and
2345provides Python-specific tags that allow to represent an arbitrary Python
2346object.")
2347 (license license:expat)))
2348
2349(define-public python2-pyyaml
2350 (package-with-python2 python-pyyaml))
2351
2352(define-public python-vine
2353 (package
2354 (name "python-vine")
2355 (version "1.1.4")
2356 (source
2357 (origin
2358 (method url-fetch)
2359 (uri (pypi-uri "vine" version))
2360 (sha256
2361 (base32
2362 "0wkskb2hb494v9gixqnf4bl972p4ibcmxdykzpwjlfa5picns4aj"))))
2363 (build-system python-build-system)
2364 (native-inputs
2365 `(("python-pytest" ,python-pytest)
2366 ("python-case" ,python-case)))
2367 (home-page "https://github.com/celery/vine")
2368 (synopsis "Promises for Python")
2369 (description
2370 "@code{vine} provides a special implementation of promises in that it can
2371be used both for \"promise of a value\" and lazy evaluation. The biggest
2372upside for this is that everything in a promise can also be a promise,
2373e.g. filters, callbacks and errbacks can all be promises.")
2374 (license license:bsd-3)))
2375
2376(define-public python-virtualenv
2377 (package
2378 (name "python-virtualenv")
2782bd51 2379 (version "16.1.0")
44d10b1f
RW
2380 (source
2381 (origin
2382 (method url-fetch)
2383 (uri (pypi-uri "virtualenv" version))
2384 (sha256
2385 (base32
2782bd51 2386 "0242cg3hdq3qdvx5flyrki8lpwlgwf5k45c21ks5049fv7ygm6gq"))))
44d10b1f
RW
2387 (build-system python-build-system)
2388 (arguments
2389 `(#:phases
2390 (modify-phases %standard-phases
2782bd51 2391 (add-before 'check 'disable-failing-test
44d10b1f
RW
2392 (lambda _
2393 ;; Disable failing test. See upstream bug report
2394 ;; https://github.com/pypa/virtualenv/issues/957
2395 (substitute* "tests/test_virtualenv.py"
2396 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2782bd51 2397 #t)))))
44d10b1f
RW
2398 (native-inputs
2399 `(("python-mock" ,python-mock)
2400 ("python-pytest" ,python-pytest)))
2401 (home-page "https://virtualenv.pypa.io/")
2402 (synopsis "Virtual Python environment builder")
2403 (description
2404 "Virtualenv is a tool to create isolated Python environments.")
2405 (license license:expat)))
2406
2407(define-public python2-virtualenv
2408 (package-with-python2 python-virtualenv))
2409
2410(define-public python-markupsafe
2411 (package
2412 (name "python-markupsafe")
753eb411 2413 (version "1.1.1")
44d10b1f
RW
2414 (source
2415 (origin
2416 (method url-fetch)
5182927c 2417 (uri (pypi-uri "MarkupSafe" version))
44d10b1f
RW
2418 (sha256
2419 (base32
753eb411 2420 "0sqipg4fk7xbixqd8kq6rlkxj664d157bdwbh93farcphf92x1r9"))))
44d10b1f 2421 (build-system python-build-system)
753eb411
MB
2422 (arguments
2423 `(#:modules ((ice-9 ftw)
2424 (srfi srfi-1)
2425 (srfi srfi-26)
2426 (guix build utils)
2427 (guix build python-build-system))
2428 #:phases (modify-phases %standard-phases
2429 (replace 'check
2430 (lambda _
2431 (let ((cwd (getcwd))
2432 (libdir (find (cut string-prefix? "lib." <>)
2433 (scandir "build"))))
2434 (setenv "PYTHONPATH"
2435 (string-append cwd "/build/" libdir ":"
2436 (getenv "PYTHONPATH")))
2437 (invoke "pytest" "-vv")))))))
2438 (native-inputs
2439 `(("python-pytest" ,python-pytest)))
44d10b1f
RW
2440 (home-page "https://github.com/mitsuhiko/markupsafe")
2441 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2442 (description
2443 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2444for Python.")
2445 (license license:bsd-3)))
2446
2447(define-public python2-markupsafe
2448 (package-with-python2 python-markupsafe))
2449
2450(define-public python-jinja2
2451 (package
2452 (name "python-jinja2")
4a5c7934 2453 (version "2.10.1")
44d10b1f
RW
2454 (source
2455 (origin
2456 (method url-fetch)
2457 (uri (pypi-uri "Jinja2" version))
2458 (sha256
2459 (base32
4a5c7934 2460 "04shqrs56aj04ipyqykj512rw2l0zfammvj9krawzxz7xc14yp06"))))
44d10b1f
RW
2461 (build-system python-build-system)
2462 (propagated-inputs
2463 `(("python-markupsafe" ,python-markupsafe)))
2464 (home-page "http://jinja.pocoo.org/")
2465 (synopsis "Python template engine")
2466 (description
2467 "Jinja2 is a small but fast and easy to use stand-alone template engine
2468written in pure Python.")
2469 (license license:bsd-3)))
2470
2471(define-public python2-jinja2
2472 (package-with-python2 python-jinja2))
2473
ba42a6bf
TLC
2474(define-public python-jinja2-time
2475 (package
2476 (name "python-jinja2-time")
2477 (version "0.2.0")
2478 (source
2479 (origin
2480 (method url-fetch)
2481 (uri (pypi-uri "jinja2-time" version))
2482 (sha256
2483 (base32
2484 "0h0dr7cfpjnjj8bgl2vk9063a53649pn37wnlkd8hxjy656slkni"))))
2485 (build-system python-build-system)
2486 (propagated-inputs
2487 `(("python-arrow" ,python-arrow)
2488 ("python-jinja2" ,python-jinja2)))
2489 (home-page
2490 "https://github.com/hackebrot/jinja2-time")
2491 (synopsis "Jinja2 Extension for Dates and Times")
2492 (description
2493 "This package provides an extension for the template engine Jinja2. It
2494adds a 'now' tag providing a convenient access to the arrow.now() API from
2495templates. A format string can be provided to control the output.")
2496 (license license:expat)))
2497
44d10b1f
RW
2498(define-public python-pystache
2499 (package
2500 (name "python-pystache")
2501 (version "0.5.4")
2502 (source (origin
2503 (method url-fetch)
2504 (uri (pypi-uri "pystache" version))
2505 (sha256
2506 (base32
2507 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2508 (build-system python-build-system)
2509 (arguments
2510 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
2511 (home-page "http://defunkt.io/pystache/")
2512 (synopsis "Python logic-less template engine")
2513 (description
2514 "Pystache is a Python implementation of the framework agnostic,
2515logic-free templating system Mustache.")
2516 (license license:expat)
2517 (properties `((python2-variant . ,(delay python2-pystache))))))
2518
2519(define-public python2-pystache
2520 (package (inherit (package-with-python2
2521 (strip-python2-variant python-pystache)))
2522 (arguments
2523 `(#:python ,python-2
2524 #:phases
2525 (modify-phases %standard-phases
2526 (replace 'check
2527 (lambda _
dfafc29b 2528 (invoke "python" "test_pystache.py"))))))))
44d10b1f
RW
2529
2530(define-public python-joblib
2531 (package
2532 (name "python-joblib")
2533 (version "0.13.0")
2534 (source (origin
2535 (method url-fetch)
2536 (uri (pypi-uri "joblib" version))
2537 (sha256
2538 (base32
2539 "0612nazad8dxmn3xghfrmjax6456l4xy6hn9cngs7vydi14ds7v5"))))
2540 (build-system python-build-system)
2541 (arguments
2542 `(#:phases
2543 (modify-phases %standard-phases
2544 (replace 'check
2545 (lambda _ (invoke "pytest" "-v" "joblib"))))))
2546 (native-inputs
2547 `(("python-pytest" ,python-pytest)))
2548 (home-page "https://joblib.readthedocs.io/")
2549 (synopsis "Using Python functions as pipeline jobs")
2550 (description
2551 "Joblib is a set of tools to provide lightweight pipelining in Python.
2552In particular, joblib offers: transparent disk-caching of the output values
2553and lazy re-evaluation (memoize pattern), easy simple parallel computing
2554logging and tracing of the execution.")
2555 (license license:bsd-3)))
2556
2557(define-public python2-joblib
2558 (package-with-python2 python-joblib))
2559
a3363341
VC
2560(define-public python-daemon
2561 (package
2562 (name "python-daemon")
2563 (version "2.2.3")
2564 (source
2565 (origin
2566 (method url-fetch)
2567 (uri (pypi-uri "python-daemon" version))
2568 (sha256
2569 (base32
2570 "09fcjdjzk9ywmpnrj62iyxqgcygzdafsz41qlrk2dknzbagcmzmg"))))
2571 (build-system python-build-system)
2572 (arguments
2573 `(#:phases
2574 (modify-phases %standard-phases
2575 (add-before 'check 'disable-tests
2576 (lambda _
2577 ;; FIXME: Determine why test fails
2578 (substitute* "test/test_daemon.py"
2579 (("test_detaches_process_context")
2580 "skip_test_detaches_process_context"))
2581 #t)))))
2582 (propagated-inputs
2583 `(("python-lockfile" ,python-lockfile)))
2584 (native-inputs
2585 `(("python-unittest2" ,python-unittest2)
2586 ("python-testtools" ,python-testtools)
2587 ("python-testscenarios" ,python-testscenarios)
2588 ("python-mock" ,python-mock)
2589 ("python-docutils" ,python-docutils)))
2590 (home-page "https://pagure.io/python-daemon/")
2591 (synopsis "Python library for making a Unix daemon process")
2592 (description "Python-daemon is a library that assists a Python program to
2593turn itself into a well-behaved Unix daemon process, as specified in PEP 3143.
2594
2595This library provides a @code{DaemonContext} class that manages the following
2596important tasks for becoming a daemon process:
2597@enumerate
2598@item Detach the process into its own process group.
2599@item Set process environment appropriate for running inside a chroot.
2600@item Renounce suid and sgid privileges.
2601@item Close all open file descriptors.
2602@item Change the working directory, uid, gid, and umask.
2603@item Set appropriate signal handlers.
2604@item Open new file descriptors for stdin, stdout, and stderr.
2605@item Manage a specified PID lock file.
2606@item Register cleanup functions for at-exit processing.
2607@end enumerate")
2608 ;; Only setup.py is gpl3+, everything else is apache 2.0 licensed.
2609 (license (list license:asl2.0 license:gpl3+))))
2610
544ea9c2
MB
2611(define-public python-anytree
2612 (package
2613 (name "python-anytree")
2614 (version "2.8.0")
2615 (source (origin
2616 (method url-fetch)
2617 (uri (pypi-uri "anytree" version))
2618 (sha256
2619 (base32
2620 "1aycpc387wqz7h9w2p53qxn43qsh3m6by6ak4kkc66x9aprr63rz"))))
2621 (build-system python-build-system)
2622 (propagated-inputs
2623 `(("python-six" ,python-six)))
2624 (native-inputs
2625 `(;; For tests.
2626 ("graphviz" ,graphviz) ;for 'dot'
2627 ("python-nose" ,python-nose)))
2628 (home-page "https://github.com/c0fec0de/anytree")
2629 (synopsis "Lightweight tree data library")
2630 (description
2631 "@code{anytree} is a simple, lightweight, and extensible tree data
2632structure for Python.")
2633 (license license:asl2.0)))
2634
44d10b1f
RW
2635(define-public python-docutils
2636 (package
2637 (name "python-docutils")
2638 (version "0.14")
2639 (source
2640 (origin
2641 (method url-fetch)
2642 (uri (pypi-uri "docutils" version))
2643 (sha256
2644 (base32
2645 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))
2646 (build-system python-build-system)
2647 (arguments
2648 '(#:tests? #f)) ; no setup.py test command
2649 (home-page "http://docutils.sourceforge.net/")
2650 (synopsis "Python Documentation Utilities")
2651 (description
2652 "Docutils is a modular system for processing documentation into useful
2653formats, such as HTML, XML, and LaTeX. For input Docutils supports
2654reStructuredText.")
2655 ;; Most of the source code is public domain, but some source files are
2656 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
2657 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
2658
2659(define-public python2-docutils
2660 (package-with-python2 python-docutils))
2661
2662(define-public python-pygments
2663 (package
2664 (name "python-pygments")
69002b21 2665 (version "2.5.2")
44d10b1f
RW
2666 (source
2667 (origin
2668 (method url-fetch)
2669 (uri (pypi-uri "Pygments" version))
2670 (sha256
2671 (base32
69002b21 2672 "1zmhnswy0wxfn0xprs9aqsvx2c3kmzfn2wx14q8cv3vpkxdamj4q"))))
44d10b1f
RW
2673 (build-system python-build-system)
2674 (arguments
2675 ;; FIXME: Tests require sphinx, which depends on this.
2676 '(#:tests? #f))
69002b21 2677 (home-page "https://pygments.org/")
44d10b1f
RW
2678 (synopsis "Syntax highlighting")
2679 (description
2680 "Pygments is a syntax highlighting package written in Python.")
2681 (license license:bsd-2)))
2682
2683(define-public python2-pygments
2684 (package-with-python2 python-pygments))
2685
0f0a5ef9
MC
2686(define-public python-bumpversion
2687 (package
2688 (name "python-bumpversion")
2689 (version "0.5.3")
2690 (source
2691 (origin
2692 (method url-fetch)
2693 (uri (pypi-uri "bumpversion" version))
2694 (sha256
2695 (base32
2696 "0zn7694yfipxg35ikkfh7kvgl2fissha3dnqad2c5bvsvmrwhi37"))))
2697 (build-system python-build-system)
2698 (home-page "https://github.com/peritus/bumpversion")
2699 (synopsis "Tool to bump software version")
2700 (description "This tool provides a command-line interface (CLI) to bump a
2701software version simply.")
2702 (license license:expat)))
2703
b24fd2c2
MC
2704(define-public python-deprecated
2705 (package
2706 (name "python-deprecated")
2707 (version "1.2.5")
2708 (source
2709 (origin
2710 (method git-fetch)
2711 (uri (git-reference
2712 (url "https://github.com/tantale/deprecated.git")
2713 (commit (string-append "v" version))))
2714 (file-name (git-file-name name version))
2715 (sha256
2716 (base32
2717 "14909glxxwwc4b9qpz2b9jdriwzi5n65ichw85xqppap5f79wcwz"))))
2718 (build-system python-build-system)
2719 (arguments
2720 `(#:phases (modify-phases %standard-phases
2721 (replace 'check
2722 (lambda _
2723 (invoke "pytest"))))))
2724 (propagated-inputs
2725 `(("python-wrapt" ,python-wrapt)))
2726 (native-inputs
2727 `(("python-bumpversion" ,python-bumpversion)
2728 ("python-pytest" ,python-pytest)
2729 ("python-pytest-cov" ,python-pytest-cov)
2730 ("python-sphinx" ,python-sphinx)
2731 ("python-tox" ,python-tox)))
2732 (home-page "https://github.com/tantale/deprecated")
2733 (synopsis "Python decorator to deprecate classes, functions or methods")
2734 (description "The @code{deprecated} decorator provides a convenient way to deprecate
2735to deprecate classes, functions or methods.")
2736 (license license:expat)))
2737
d5a998fa
MC
2738(define-public python-pygithub
2739 (package
2740 (name "python-pygithub")
749e38d7 2741 (version "1.43.8")
d5a998fa
MC
2742 (source
2743 ;; We fetch from the Git repo because there are no tests in the PyPI
2744 ;; archive.
2745 (origin
2746 (method git-fetch)
2747 (uri (git-reference
2748 (url "https://github.com/PyGithub/PyGithub.git")
2749 (commit (string-append "v" version))))
2750 (file-name (git-file-name name version))
2751 (sha256
749e38d7 2752 (base32 "1625v558xga5mwhl9jqmibywy5qafmg1vqrirqz6zfq1la1d22mw"))))
d5a998fa
MC
2753 (build-system python-build-system)
2754 (arguments
2755 `(#:phases (modify-phases %standard-phases
2756 ;; Some tests rely on the network.
2757 (add-after 'unpack 'disable-failing-tests
2758 (lambda _
2759 (substitute* "tests/Issue142.py"
2760 (("testDecodeJson") "disabled_testDecodeJson"))
2761 #t))
2762 (add-before 'check 'prepare-for-tests
2763 (lambda _
2764 (for-each (lambda (f)
2765 (chmod f #o666))
2766 (find-files "./tests"))
2767 (system* "python" "-m" "lib2to3" "-w" "-n" "tests")
2768 (setenv "PYTHONPATH"
2769 (string-append "./tests:" (getenv "PYTHONPATH")))
2770 #t)))))
2771 (propagated-inputs
2772 `(("python-deprecated" ,python-deprecated)
2773 ("python-pyjwt" ,python-pyjwt)
2774 ("python-requests" ,python-requests)))
2775 (native-inputs `(("python-httpretty" ,python-httpretty)))
2776 (home-page "https://pygithub.readthedocs.io/en/latest/")
2777 (synopsis "Python library for the GitHub API")
2778 (description "This library allows managing GitHub resources such as
2779repositories, user profiles, and organizations in your Python applications,
2780using version 3 of the GitHub application programming interface (API).")
2781 (license license:lgpl3+)))
2782
c0c0bb38
MC
2783(define-public python-rellu
2784 (package
2785 (name "python-rellu")
2786 (version "0.7")
2787 (source
2788 (origin
2789 (method url-fetch)
2790 (uri (pypi-uri "rellu" version))
2791 (sha256
2792 (base32
2793 "1w0arpj1sm7vh29nrbnca4pnp8sx42l07r17inwqcjjf9bhng66x"))))
2794 (build-system python-build-system)
2795 (propagated-inputs
2796 `(("python-invoke" ,python-invoke)
2797 ("python-pygithub" ,python-pygithub)))
2798 (home-page "https://github.com/robotframework/rellu")
2799 (synopsis "Utilities to create PyPI releases")
2800 (description "This collection of utilities contains tooling and templates
2801to assist in creating releases on GitHub and publishing them on PyPI. It is
2802designed to be used by Robot Framework and tools and libraries in its
2803ecosystem, but can naturally be used also by other projects.")
2804 (license license:asl2.0)))
2805
b9790285
MC
2806(define-public python-robotframework
2807 (package
2808 (name "python-robotframework")
1710b8f8 2809 (version "3.1.2")
b9790285
MC
2810 ;; There are no tests in the PyPI archive.
2811 (source
2812 (origin
2813 (method git-fetch)
2814 (uri (git-reference
2815 (url "https://github.com/robotframework/robotframework.git")
2816 (commit (string-append "v" version))))
2817 (file-name (git-file-name name version))
2818 (sha256
1710b8f8 2819 (base32 "16gnxy0qinh8fhs0qvhff5z2xh49c3cqgm0d7bfjw120df6x7fym"))
b9790285
MC
2820 (patches (search-patches
2821 "python-robotframework-honor-source-date-epoch.patch"))))
2822 (build-system python-build-system)
2823 (arguments
2824 `(#:phases (modify-phases %standard-phases
2825 (add-before 'build 'build-and-install-doc
2826 (lambda* (#:key outputs #:allow-other-keys)
2827 (let* ((doc-output (assoc-ref outputs "doc"))
2828 (doc (string-append doc-output "/share/"
2829 ,name "-" ,version "/")))
2830 (invoke "invoke" "library-docs" "all")
2831 (mkdir-p doc)
2832 (copy-recursively "doc/libraries"
2833 (string-append doc "/libraries"))
2834 #t)))
2835 (replace 'check
2836 (lambda _
2837 (invoke "python" "utest/run.py"))))))
2838 (native-inputs
2839 `(("python-invoke" ,python-invoke)
2840 ("python-rellu" ,python-rellu)
2841 ("python:tk" ,python "tk"))) ;used when building the HTML doc
2842 (outputs '("out" "doc"))
2843 (home-page "https://robotframework.org")
2844 (synopsis "Generic automation framework")
2845 (description "Robot Framework is a generic automation framework for
2846acceptance testing, acceptance test driven development (ATDD), and robotic
2847process automation (RPA).")
2848 (license license:asl2.0)))
2849
5b84c120
MC
2850(define-public python-robotframework-lint
2851 ;; There is no properly tagged release; the commit below seems to correspond
2852 ;; to the 0.9 stable release available from PyPI. The tests are not
2853 ;; included in the PyPI archive, so we fetch the sources from the upstream
2854 ;; Git repo.
2855 (let ((commit "e851879bab1f63e4e53b34a4dc8a67ed95102830")
2856 (revision "1"))
2857 (package
2858 (name "python-robotframework-lint")
2859 (version (git-version "0.9.0" revision commit))
2860 (source
2861 (origin
2862 (method git-fetch)
2863 (uri (git-reference
2864 (url "https://github.com/boakley/robotframework-lint.git")
2865 (commit commit)))
2866 (file-name (git-file-name name version))
2867 (sha256
2868 (base32
2869 "1p6fknqg5sb9qz5857ji4a877657vgfjm5v3zn45994parx6ml1m"))))
2870 (build-system python-build-system)
2871 (arguments
2872 `(#:phases
2873 (modify-phases %standard-phases
2874 (replace 'check
2875 (lambda _
2876 (invoke "python" "-m" "robot" "-A"
2877 "tests/conf/default.args" "tests"))))))
2878 (propagated-inputs
2879 `(("python-robotframework" ,python-robotframework)))
2880 (home-page "https://github.com/boakley/robotframework-lint/")
2881 (synopsis "Static analysis tool (linter) for Robot Framework")
2882 (description "This package provides the @code{rflint} command-line
2883utility, a static analysis tool (linter) for Robot Framework source files.")
2884 (license license:asl2.0))))
2885
c0c64f17
MC
2886(define-public python-robotframework-sshlibrary
2887 (package
2888 (name "python-robotframework-sshlibrary")
2889 (version "3.3.0")
2890 ;; There are no tests in the PyPI archive.
2891 (source
2892 (origin
2893 (method git-fetch)
2894 (uri (git-reference
2895 (url "https://github.com/robotframework/SSHLibrary.git")
2896 (commit (string-append "v" version))))
2897 (file-name (git-file-name name version))
2898 (sha256
2899 (base32
2900 "1mk6dz2jqqndbx4yji09012q6rmadnqdywi7czvj62b0s07dr3r2"))))
2901 (build-system python-build-system)
2902 (arguments
2903 `(#:phases
2904 (modify-phases %standard-phases
2905 (add-before 'build 'build-and-install-doc
2906 (lambda* (#:key outputs #:allow-other-keys)
2907 (let* ((doc-output (assoc-ref outputs "doc"))
2908 (doc (string-append doc-output "/share/"
2909 ,name "-" ,version "/")))
2910 (invoke "chmod" "-R" "+w" "docs")
2911 (invoke "invoke" "kw-docs" "project-docs")
2912 (mkdir-p doc)
2913 (for-each delete-file (find-files "docs" "\\.rst"))
2914 (copy-recursively "docs" doc)
2915 #t)))
2916 (replace 'check
2917 (lambda _
2918 ;; Some tests require an SSH server; we remove them.
2919 (delete-file "utest/test_client_api.py")
2920 (delete-file "utest/test_scp.py")
2921 (invoke "python" "utest/run.py"))))))
2922 (propagated-inputs
2923 `(("python-robotframework" ,python-robotframework)
2924 ("python-paramiko" ,python-paramiko)
2925 ("python-scp" ,python-scp)))
2926 (native-inputs
2927 `(("openssh" ,openssh)
2928 ("which" ,which)
2929 ;; To generate the documentation
2930 ("python-docutils" ,python-docutils)
2931 ("python-invoke" ,python-invoke)
2932 ("python-pygments" ,python-pygments)
2933 ("python-rellu" ,python-rellu)))
2934 (outputs '("out" "doc"))
2935 (home-page "https://github.com/robotframework/SSHLibrary")
2936 (synopsis "Robot Framework library for SSH and SFTP")
2937 (description "SSHLibrary is a Robot Framework library providing support
2938for SSH and SFTP. It has the following main usages:
2939@itemize @bullet
2940@item Executing commands on the remote machine, either blocking or non-blocking.
2941@item Writing and reading in an interactive shell.
2942@item Transferring files and directories over SFTP.
2943@item Ensuring that files and directories exist on the remote machine.
2944@end itemize")
2945 (license license:asl2.0)))
2946
b1daba94
VC
2947(define-public python-rstr
2948 (package
2949 (name "python-rstr")
2950 (version "2.2.6")
2951 (source
2952 (origin
2953 (method url-fetch)
2954 (uri (pypi-uri "rstr" version))
2955 (sha256
2956 (base32
2957 "197dw8mbq0pjjz1l6h1ksi62vgn7x55d373ch74y06744qiq5sjx"))))
2958 (build-system python-build-system)
2959 (home-page
2960 "http://bitbucket.org/leapfrogdevelopment/rstr/overview")
2961 (synopsis "Generate random strings in Python")
2962 (description "This package provides a python module for generating
2963random strings of various types. It could be useful for fuzz testing,
2964generating dummy data, or other applications. It has no dependencies
2965outside the standard library.")
2966 (license license:bsd-3)))
2967
13d825fc
MC
2968(define-public python-scp
2969 (package
2970 (name "python-scp")
2971 (version "0.13.2")
2972 (source
2973 (origin
2974 (method url-fetch)
2975 (uri (pypi-uri "scp" version))
2976 (sha256
2977 (base32
2978 "1crlpw9lnn58fs1c1rmh7s7s9y5gkgpgjsqlvg9qa51kq1knx7gg"))))
2979 (build-system python-build-system)
2980 (arguments
2981 '(#:tests? #f)) ;tests require an SSH server
2982 (propagated-inputs
2983 `(("python-paramiko" ,python-paramiko)))
2984 (home-page "https://github.com/jbardin/scp.py")
2985 (synopsis "SCP protocol module for Python and Paramiko")
2986 (description "The scp module extends the Paramiko library to send and
2987receive files via the SCP1 protocol, as implemented by the OpenSSH
2988@command{scp} program.")
2989 (license license:gpl2+)))
2990
44d10b1f
RW
2991(define-public python-rst.linker
2992 (package
2993 (name "python-rst.linker")
d37e8e53 2994 (version "1.11")
44d10b1f
RW
2995 (source
2996 (origin
2997 (method url-fetch)
2998 (uri (pypi-uri "rst.linker" version))
2999 (sha256
d37e8e53 3000 (base32 "0pqsfqqx8h0pq21k8l3k62kznrgaj2ala93c64s4d9rpbr4mgkd2"))))
44d10b1f
RW
3001 (build-system python-build-system)
3002 (propagated-inputs
3003 `(("python-dateutil" ,python-dateutil)
3004 ("python-six" ,python-six)))
3005 (native-inputs
3006 `(("python-setuptools-scm" ,python-setuptools-scm)))
3007 ;; Test would require path.py, which would introduce a cyclic dependence.
3008 (arguments `(#:tests? #f))
3009 ;; Note: As of version 1.7 the documentation is not worth building.
3010 (home-page "https://github.com/jaraco/rst.linker")
3011 (synopsis "Sphinx plugin to add links and timestamps")
3012 (description "rst.linker allows to automatically replace text by a
3013reStructuredText external reference or timestamps. It's primary purpose is to
3014augment the changelog, but it can be used for other documents, too.")
3015 (license license:expat)))
3016
3017(define-public python2-rst.linker
3018 (package-with-python2 python-rst.linker))
3019
3020(define-public python-feedgenerator
3021 (package
3022 (name "python-feedgenerator")
3023 (version "1.9")
3024 (source
3025 (origin
3026 (method url-fetch)
3027 (uri (pypi-uri "feedgenerator" version))
3028 (sha256
3029 (base32
3030 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
3031 (modules '((guix build utils)))
3032 (snippet
3033 '(begin
3034 ;; Remove pre-compiled .pyc files from source.
3035 (for-each delete-file-recursively
3036 (find-files "." "__pycache__" #:directories? #t))
3037 (for-each delete-file (find-files "." "\\.pyc$"))
3038 #t))))
3039 (build-system python-build-system)
3040 (propagated-inputs
3041 `(("python-pytz" ,python-pytz)
3042 ("python-six" ,python-six)))
3043 (home-page "https://github.com/getpelican/feedgenerator")
3044 (synopsis
3045 "Standalone version of Django's Atom/RSS feed generator")
3046 (description
3047 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
3048which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
3049 (license license:bsd-3)))
3050
3051(define-public python2-feedgenerator
3052 (package-with-python2 python-feedgenerator))
3053
3054(define-public python-toml
3055 (package
3056 (name "python-toml")
3057 (version "0.9.4")
3058 (source
3059 (origin
3060 (method url-fetch)
3061 (uri (pypi-uri "toml" version))
3062 (sha256
3063 (base32
3064 "0bdbpbip67wdm6c7xwc6mmbmskyradj4cdxn1iibj4fcx1nbv1lf"))))
3065 (build-system python-build-system)
3066 (arguments
3067 `(#:tests? #f)) ;no tests suite in release
3068 (home-page "https://github.com/uiri/toml")
3069 (synopsis "Library for TOML")
3070 (description
3071 "@code{toml} is a library for parsing and creating Tom's Obvious, Minimal
3072Language (TOML) configuration files.")
3073 (license license:expat)))
3074
346c8752
BG
3075(define-public python-jsonrpc-server
3076 (package
3077 (name "python-jsonrpc-server")
d6cf4c6e 3078 (version "0.3.2")
346c8752
BG
3079 (source
3080 (origin
3081 (method url-fetch)
3082 (uri (pypi-uri "python-jsonrpc-server" version))
3083 (sha256
3084 (base32
d6cf4c6e 3085 "0ddgdp26dfxaz6isjbb12974b3rxavgsqrn2zrmck62cmipg5g05"))))
346c8752
BG
3086 (build-system python-build-system)
3087 (propagated-inputs
3088 `(("python-future" ,python-future)
3089 ("python-mock" ,python-mock)
d6cf4c6e
BG
3090 ("python-pytest" ,python-pytest)
3091 ("python-ujson" ,python-ujson)))
346c8752
BG
3092 (home-page
3093 "https://github.com/palantir/python-jsonrpc-server")
3094 (synopsis "JSON RPC 2.0 server library")
3095 (description
1df5407c 3096 "This package provides a JSON RPC 2.0 server library for Python.")
346c8752
BG
3097 (license license:expat)))
3098
56f4ad47
BG
3099(define-public python-pydocstyle
3100 (package
3101 (name "python-pydocstyle")
3102 (version "3.0.0")
3103 (source
3104 (origin
3105 (method url-fetch)
3106 (uri (pypi-uri "pydocstyle" version))
3107 (sha256
3108 (base32
3109 "1m1xv9clkg9lgzyza6dnj359z04vh5g0h49nhzghv7lg81gchhap"))))
3110 (build-system python-build-system)
3111 (propagated-inputs
3112 `(("python-six" ,python-six)
3113 ("python-snowballstemmer" ,python-snowballstemmer)))
3114 (home-page
3115 "https://github.com/PyCQA/pydocstyle/")
3116 (synopsis "Python docstring style checker")
3117 (description
3118 "This package provides a style checker for the Python Language
3119Server (PLS).")
3120 (license license:expat)))
3121
be4d840c 3122(define-public python-language-server
808dd2d0
BL
3123 (package
3124 (name "python-language-server")
a42f1420 3125 (version "0.31.7")
808dd2d0
BL
3126 (source
3127 (origin
3128 (method url-fetch)
3129 (uri (pypi-uri "python-language-server" version))
3130 (sha256
3131 (base32
a42f1420 3132 "0f8rljff4h2ay9m2n9ang7axai37nzd39zd7m6c90rci5wh8cmxh"))))
808dd2d0
BL
3133 (build-system python-build-system)
3134 (propagated-inputs
3135 `(("python-pluggy" ,python-pluggy)
3136 ("python-jsonrpc-server" ,python-jsonrpc-server)
3137 ("python-jedi" ,python-jedi)
3138 ("python-yapf" ,python-yapf)
3139 ("python-pyflakes" ,python-pyflakes)
3140 ("python-pydocstyle" ,python-pydocstyle)
3141 ("python-pycodestyle" ,python-pycodestyle)
3142 ("python-mccabe" ,python-mccabe)
3143 ("python-rope" ,python-rope)
3144 ("python-autopep8" ,python-autopep8)
3145 ("python-flake8" ,python-flake8)
3146 ("python-pylint" ,python-pylint)))
3147 (home-page "https://github.com/palantir/python-language-server")
3148 (synopsis "Python implementation of the Language Server Protocol")
3149 (description
3150 "The Python Language Server (pyls) is an implementation of the Python 3
be4d840c
BG
3151language specification for the Language Server Protocol (LSP). This tool is
3152used in text editing environments to provide a complete and integrated
3153feature-set for programming Python effectively.")
808dd2d0 3154 (license license:expat)))
be4d840c 3155
44d10b1f
RW
3156(define-public python-black
3157 (package
3158 (name "python-black")
3159 (version "18.6b4")
3160 (source
3161 (origin
3162 (method url-fetch)
3163 (uri (pypi-uri "black" version))
3164 (sha256
3165 (base32
3166 "0i4sfqgz6w15vd50kbhi7g7rifgqlf8yfr8y78rypd56q64qn592"))))
3167 (build-system python-build-system)
3168 (arguments
3169 `(#:phases
3170 (modify-phases %standard-phases
3171 (add-after 'patch-source-shebangs 'patch-extra-shebangs
3172 (lambda _
3173 (let ((python3 (which "python3")))
3174 (substitute* '("tests/data/fmtonoff.py"
3175 "tests/data/string_prefixes.py"
3176 "tests/data/function.py")
3177 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
3178 (string-append "#!" python3 (if (string? minor-version)
3179 minor-version
3180 ""))))))))))
3181 (propagated-inputs
3182 `(("python-click" ,python-click)
3183 ("python-attrs" ,python-attrs)
3184 ("python-appdirs" ,python-appdirs)
3185 ("python-toml" ,python-toml)))
3186 (home-page "https://github.com/ambv/black")
3187 (synopsis "The uncompromising code formatter")
3188 (description "Black is the uncompromising Python code formatter.")
3189 (license license:expat)))
3190
3191(define-public python-blinker
3192 (package
3193 (name "python-blinker")
3194 (version "1.4")
3195 (source
3196 (origin
3197 (method url-fetch)
3198 (uri (pypi-uri "blinker" version))
3199 (sha256
3200 (base32
3201 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
3202 (build-system python-build-system)
3203 (home-page "http://pythonhosted.org/blinker/")
3204 (synopsis "Fast, simple object-to-object and broadcast signaling")
3205 (description
3206 "Blinker provides a fast dispatching system that allows any number of
3207interested parties to subscribe to events, or \"signals\".")
3208 (license license:expat)))
3209
3210(define-public python2-blinker
3211 (package-with-python2 python-blinker))
3212
3213(define-public pelican
3214 (package
3215 (name "pelican")
fa9e3b5e 3216 (version "4.2.0")
44d10b1f
RW
3217 (source
3218 (origin
3219 (method url-fetch)
3220 (uri (pypi-uri "pelican" version))
3221 (sha256
3222 (base32
fa9e3b5e 3223 "0mp7hjyhs38ag1hyfcy882g400z0babqi72pnli46dqijfhajzmy"))))
44d10b1f
RW
3224 (build-system python-build-system)
3225 (propagated-inputs
fa9e3b5e
VC
3226 `(("python-blinker" ,python-blinker)
3227 ("python-dateutil" ,python-dateutil)
3228 ("python-docutils" ,python-docutils)
3229 ("python-feedgenerator" ,python-feedgenerator)
44d10b1f 3230 ("python-jinja2" ,python-jinja2)
fa9e3b5e 3231 ("python-markdown" ,python-markdown)
44d10b1f 3232 ("python-pygments" ,python-pygments)
44d10b1f 3233 ("python-pytz" ,python-pytz)
44d10b1f 3234 ("python-six" ,python-six)
fa9e3b5e 3235 ("python-unidecode" ,python-unidecode)))
44d10b1f
RW
3236 (home-page "https://getpelican.com/")
3237 (arguments
3238 `(;; XXX Requires a lot more packages to do unit tests :P
fa9e3b5e 3239 #:tests? #f))
44d10b1f
RW
3240 (synopsis "Python-based static site publishing system")
3241 (description
3242 "Pelican is a tool to generate a static blog from reStructuredText,
3243Markdown input files, and more. Pelican uses Jinja2 for templating
3244and is very extensible.")
3245 (license license:agpl3+)))
3246
8c141421
JH
3247(define-public mallard-ducktype
3248 (package
3249 (name "mallard-ducktype")
12cc3da5 3250 (version "1.0.2")
8c141421
JH
3251 (source
3252 (origin
3253 (method git-fetch)
12cc3da5
JH
3254 ;; git-reference because tests are not included in pypi source tarball
3255 ;; https://issues.guix.gnu.org/issue/36755#2
8c141421
JH
3256 (uri (git-reference
3257 (url "https://github.com/projectmallard/mallard-ducktype.git")
3258 (commit version)))
3259 (file-name (git-file-name name version))
3260 (sha256
3261 (base32
12cc3da5 3262 "1jk9bfz7g04ip78s03b0xak6d54rj4h9zpgadkziy1ji216g6y4c"))))
8c141421 3263 (build-system python-build-system)
5246655f
EF
3264 (arguments
3265 '(#:phases
3266 (modify-phases %standard-phases
3267 (replace 'check
3268 (lambda _
3269 (with-directory-excursion "tests"
3270 (invoke "sh" "runtests")))))))
8c141421
JH
3271 (home-page "http://projectmallard.org")
3272 (synopsis "Convert Ducktype to Mallard documentation markup")
3273 (description
3274 "Ducktype is a lightweight syntax that can represent all the semantics
3275of the Mallard XML documentation system. Ducktype files can be converted to
3276Mallard using the @command{ducktype} tool. The yelp-tools package
3277provides additional functionality on the produced Mallard documents.")
3278 (license license:expat)))
3279
44d10b1f
RW
3280(define-public python-cython
3281 (package
3282 (name "python-cython")
6fd27a71 3283 (version "0.29.13")
44d10b1f
RW
3284 (source
3285 (origin
3286 (method url-fetch)
3287 (uri (pypi-uri "Cython" version))
3288 (sha256
6fd27a71
TGR
3289 (base32
3290 "13k37lrcgagwwnzr5bzririsscb793vndj234d475x1h9ad0d7f2"))))
44d10b1f
RW
3291 (build-system python-build-system)
3292 ;; we need the full python package and not just the python-wrapper
3293 ;; because we need libpython3.3m.so
3294 (inputs
3295 `(("python" ,python)))
3296 (arguments
3297 `(#:phases
3298 (modify-phases %standard-phases
3299 (add-before 'check 'set-HOME
3300 ;; some tests require access to "$HOME/.cython"
3301 (lambda _ (setenv "HOME" "/tmp") #t))
3302
3303 ;; FIXME: These tests started failing on armhf after the 0.28 update
3304 ;; (commit c69d11c5930), both with an error such as this:
3305 ;; compiling (cpp) and running dictcomp ...
3306 ;; === C/C++ compiler error output: ===
3307 ;; ‘
3308 ;; dictcomp.cpp:5221: confused by earlier errors, bailing out
3309 ;; See <https://hydra.gnu.org/build/2948724> for logs.
3310 ,@(if (target-arm32?)
3311 `((add-before 'check 'disable-failing-tests
3312 (lambda _
3313 (let ((disabled-tests (open-file "tests/bugs.txt" "a")))
3314 (for-each (lambda (test)
3315 (format disabled-tests "~a\n" test))
3316 '("memslice" "dictcomp"))
3317 (close-port disabled-tests)))))
3318 '())
3319
3320 (replace 'check
3321 (lambda _
e9194eb0
MB
3322 ;; Disable compiler optimizations to greatly reduce the running
3323 ;; time of the test suite.
3324 (setenv "CFLAGS" "-O0")
3325
3326 (invoke "python" "runtests.py" "-vv"
3327 "-j" (number->string (parallel-job-count))))))))
f319409b 3328 (home-page "https://cython.org/")
44d10b1f
RW
3329 (synopsis "C extensions for Python")
3330 (description "Cython is an optimising static compiler for both the Python
3331programming language and the extended Cython programming language. It makes
3332writing C extensions for Python as easy as Python itself.")
3333 (license license:asl2.0)
3334 (properties `((python2-variant . ,(delay python2-cython))))))
3335
3336(define-public python2-cython
da460865
MB
3337 (let ((base (package-with-python2 (strip-python2-variant python-cython))))
3338 (package
3339 (inherit base)
3340 (name "python2-cython")
3341 (inputs
3342 `(("python-2" ,python-2))) ;this is not automatically changed
3343 (arguments
3344 (substitute-keyword-arguments (package-arguments base)
3345 ((#:phases phases)
3346 `(modify-phases ,phases
3347 (add-before 'check 'adjust-test_embed
3348 (lambda _
3349 (substitute* "runtests.py"
3350 ;; test_embed goes great lengths to find the static libpythonX.Y.a
3351 ;; so it can give the right -L flag to GCC when embedding static
3352 ;; builds of Python. It is unaware that the Python "config"
3353 ;; directory (where the static library lives) was renamed in
3354 ;; Python 3, and falls back to sysconfig.get_config_var('LIBDIR'),
3355 ;; which works fine, because that is where the shared library is.
3356 ;;
3357 ;; It also appears to be unaware that the Makefile in Demos/embed
3358 ;; already unconditionally pass the static library location to GCC,
3359 ;; after checking sysconfig.get_config_var('LIBPL).
3360 ;;
3361 ;; The effect is that the linker is unable to resolve libexpat
3362 ;; symbols when building for Python 2, because neither the Python 2
3363 ;; shared library nor Expat is available. To fix it, we can either
3364 ;; add Expat as an input and make it visible to the linker, or just
3365 ;; prevent it from overriding the Python shared library location.
3366 ;; The end result is identical, so we take the easy route.
3367 ((" or libname not in os\\.listdir\\(libdir\\)")
3368 ""))
3369 #t)))))))))
44d10b1f
RW
3370
3371;; The RPython toolchain currently does not support Python 3.
3372(define-public python2-rpython
3373 (package
3374 (name "python2-rpython")
3375 (version "0.2.1")
3376 (source
3377 (origin
3378 (method url-fetch)
3379 (uri (pypi-uri "rpython" version))
3380 (sha256
3381 (base32
3382 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
3383 (build-system python-build-system)
3384 (arguments `(#:python ,python-2))
3385 (native-inputs
3386 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
3387 (home-page "https://rpython.readthedocs.org")
3388 (synopsis "Framework for implementing interpreters and virtual machines")
3389 (description "RPython is a translation and support framework for
3390producing implementations of dynamic languages, emphasizing a clean separation
3391between language specification and implementation aspects.")
3392 (license license:expat)))
3393
3394;; NOTE: when upgrading numpy please make sure that python-pandas and
3395;; python-scipy still build, as these three packages are often used together.
3396(define-public python-numpy
3397 (package
3398 (name "python-numpy")
8e5fbd5d 3399 (version "1.17.3")
44d10b1f
RW
3400 (source
3401 (origin
3402 (method url-fetch)
3403 (uri (string-append
3404 "https://github.com/numpy/numpy/releases/download/v"
3405 version "/numpy-" version ".tar.gz"))
3406 (sha256
3407 (base32
8e5fbd5d 3408 "1ak9dmjja0q90a7fsxli51ypcwssh8c4pb6f8wkrsnf2xgdk6dy9"))))
44d10b1f
RW
3409 (build-system python-build-system)
3410 (inputs
3411 `(("openblas" ,openblas)
3412 ("lapack" ,lapack)))
3413 (native-inputs
3414 `(("python-cython" ,python-cython)
3415 ("python-pytest" ,python-pytest)
3416 ("gfortran" ,gfortran)))
3417 (arguments
3418 `(#:phases
3419 (modify-phases %standard-phases
3420 (add-before 'build 'configure-blas-lapack
3421 (lambda* (#:key inputs #:allow-other-keys)
3422 (call-with-output-file "site.cfg"
3423 (lambda (port)
3424 (format port
3425 "[openblas]
3426libraries = openblas
3427library_dirs = ~a/lib
3428include_dirs = ~a/include
3429
3430# backslash-n to make emacs happy
3431\n[lapack]
3432lapack_libs = lapack
3433library_dirs = ~a/lib
3434include_dirs = ~a/include
3435"
3436 (assoc-ref inputs "openblas")
3437 (assoc-ref inputs "openblas")
3438 (assoc-ref inputs "lapack")
3439 (assoc-ref inputs "lapack"))))
3440 #t))
3441 (add-before 'build 'fix-executable-paths
3442 (lambda* (#:key inputs #:allow-other-keys)
3443 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
3444 ;; instead of /bin/sh.
3445 (substitute* "numpy/distutils/exec_command.py"
3446 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
3447 (string-append match-start (assoc-ref inputs "bash") match-end)))
3448 ;; Use "gcc" executable, not "cc".
3449 (substitute* "numpy/distutils/system_info.py"
3450 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3451 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
3452 #t))
3453 ;; Tests can only be run after the library has been installed and not
3454 ;; within the source directory.
3455 (delete 'check)
3456 (add-after 'install 'check
3457 (lambda* (#:key outputs inputs #:allow-other-keys)
3458 ;; Make installed package available for running the tests
3459 (add-installed-pythonpath inputs outputs)
3460 ;; Make sure "f2py" etc is found.
3461 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
3462 ":" (getenv "PATH")))
3463 (with-directory-excursion "/tmp"
3464 (invoke "python" "-c"
3465 "import numpy; numpy.test(verbose=2)")))))))
3466 (home-page "http://www.numpy.org/")
3467 (synopsis "Fundamental package for scientific computing with Python")
3468 (description "NumPy is the fundamental package for scientific computing
3469with Python. It contains among other things: a powerful N-dimensional array
3470object, sophisticated (broadcasting) functions, tools for integrating C/C++
3471and Fortran code, useful linear algebra, Fourier transform, and random number
3472capabilities.")
adb396ea 3473 (properties `((python2-variant . ,(delay python2-numpy))))
44d10b1f
RW
3474 (license license:bsd-3)))
3475
adb396ea 3476;; Numpy 1.16.x are the last versions that support Python 2.
44d10b1f 3477(define-public python2-numpy
adb396ea
MB
3478 (let ((numpy (package-with-python2
3479 (strip-python2-variant python-numpy))))
3480 (package/inherit
3481 numpy
3482 (version "1.16.5")
3483 (source (origin
3484 (method url-fetch)
3485 (uri (string-append
3486 "https://github.com/numpy/numpy/releases/download/v"
3487 version "/numpy-" version ".tar.gz"))
3488 (sha256
3489 (base32
3490 "0lg1cycxzi4rvvrd5zxinpdz0ni792fpx6xjd75z1923zcac8qrb")))))))
44d10b1f
RW
3491
3492;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
3493;; interest only for legacy code going back to NumPy's predecessor
3494;; Numeric.
3495(define-public python2-numpy-1.8
3496 (package (inherit python2-numpy)
3497 (version "1.8.2")
3498 (source
3499 (origin
6b61fc47
EF
3500 (method git-fetch)
3501 (uri (git-reference
3502 (url "https://github.com/numpy/numpy")
3503 (commit (string-append "v" version))))
3504 (file-name (git-file-name "numpy" version))
44d10b1f
RW
3505 (sha256
3506 (base32
6b61fc47 3507 "0ikgi15rsqwbkfsjjxrwh40lqyal2wvyp3923y6w6ch3dcr82sfk"))))
44d10b1f
RW
3508 (arguments
3509 (substitute-keyword-arguments (package-arguments python2-numpy)
3510 ((#:phases phases)
3511 `(modify-phases ,phases
3512 (replace 'configure-blas-lapack
3513 (lambda* (#:key inputs #:allow-other-keys)
3514 (call-with-output-file "site.cfg"
3515 (lambda (port)
3516 (format port
3517 "[openblas]
3518libraries = openblas,lapack
3519library_dirs = ~a/lib:~a/lib
3520include_dirs = ~a/include:~a/include
3521"
3522 (assoc-ref inputs "openblas")
3523 (assoc-ref inputs "lapack")
3524 (assoc-ref inputs "openblas")
3525 (assoc-ref inputs "lapack"))))
3526 #t))))))
3527 (native-inputs
3528 `(("python2-nose" ,python2-nose)))
3529 (description "NumPy is the fundamental package for scientific computing
3530with Python. It contains among other things: a powerful N-dimensional array
3531object, sophisticated (broadcasting) functions, tools for integrating C/C++
3532and Fortran code, useful linear algebra, Fourier transform, and random number
3533capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
3534that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
3535Numeric.")
3536 (license license:bsd-3)))
3537
3538(define-public python-munch
3539 (package
3540 (name "python-munch")
3541 (version "2.0.4")
3542 (source
3543 (origin
3544 (method url-fetch)
3545 (uri (pypi-uri "munch" version))
3546 (sha256
3547 (base32
3548 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3549 (build-system python-build-system)
3550 (home-page "https://github.com/Infinidat/munch")
3551 (synopsis "Dot-accessible dictionary")
3552 (description "Munch is a dot-accessible dictionary similar to JavaScript
3553objects.")
3554 (license license:expat)))
3555
3556(define-public python2-munch
3557 (package-with-python2 python-munch))
3558
3559(define-public python-colormath
3560 (package
3561 (name "python-colormath")
3562 (version "3.0.0")
3563 (source
3564 (origin
3565 (method url-fetch)
3566 (uri (pypi-uri "colormath" version))
3567 (sha256
3568 (base32
3569 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
3570 (build-system python-build-system)
3571 (propagated-inputs
3572 `(("python-networkx" ,python-networkx)
3573 ("python-numpy" ,python-numpy)))
3574 (home-page "https://github.com/gtaylor/python-colormath")
3575 (synopsis "Color math and conversion library")
3576 (description
3577 "This is a Python library for color math and conversions.")
3578 (license license:bsd-3)))
3579
3580(define-public python2-colormath
3581 (package-with-python2 python-colormath))
3582
3583(define-public python-spectra
3584 (package
3585 (name "python-spectra")
3586 (version "0.0.11")
3587 (source
3588 (origin
3589 (method url-fetch)
3590 (uri (pypi-uri "spectra" version))
3591 (sha256
3592 (base32
3593 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
3594 (build-system python-build-system)
3595 (arguments
3596 `(#:phases
3597 (modify-phases %standard-phases
3598 (replace 'check
38ec0f6a 3599 (lambda _ (invoke "nosetests" "-v"))))))
44d10b1f
RW
3600 (propagated-inputs
3601 `(("python-colormath" ,python-colormath)))
3602 (native-inputs
3603 `(("python-nose" ,python-nose)))
3604 (home-page "https://github.com/jsvine/spectra")
3605 (synopsis "Color scales and color conversion")
3606 (description
3607 "This package provides a Python library intended to make color math,
3608color scales, and color space conversion easy. It has support for:
3609
3610@enumerate
3611@item Color scales
3612@item Color ranges
3613@item Color blending
3614@item Brightening/darkening colors
3615@item Saturating/desaturating colors
3616@item Conversion to/from multiple color spaces.
3617@end enumerate\n")
3618 (license license:expat)))
3619
3620(define-public python2-spectra
3621 (package-with-python2 python-spectra))
3622
3623(define-public python-numpy-documentation
3624 (package
3625 (name "python-numpy-documentation")
3626 (version (package-version python-numpy))
3627 (source (package-source python-numpy))
3628 (build-system python-build-system)
3629 (native-inputs
3630 `(("python-matplotlib" ,python-matplotlib)
3631 ("python-numpy" ,python-numpy)
3632 ("pkg-config" ,pkg-config)
3633 ("python-sphinx" ,python-sphinx)
3634 ("python-numpydoc" ,python-numpydoc)
f75aa97f 3635 ("texlive" ,(texlive-union (list texlive-fonts-cm-super
44d10b1f
RW
3636 texlive-fonts-ec
3637 texlive-generic-ifxetex
3638 texlive-generic-pdftex
f75aa97f 3639 texlive-amsfonts
44d10b1f
RW
3640 texlive-latex-capt-of
3641 texlive-latex-cmap
3642 texlive-latex-environ
3643 texlive-latex-eqparbox
3644 texlive-latex-etoolbox
3645 texlive-latex-expdlist
3646 texlive-latex-fancyhdr
3647 texlive-latex-fancyvrb
3648 texlive-latex-fncychap
3649 texlive-latex-float
3650 texlive-latex-framed
3651 texlive-latex-geometry
3652 texlive-latex-graphics
3653 texlive-latex-hyperref
3654 texlive-latex-mdwtools
3655 texlive-latex-multirow
3656 texlive-latex-needspace
3657 texlive-latex-oberdiek
3658 texlive-latex-parskip
3659 texlive-latex-preview
3660 texlive-latex-tabulary
3661 texlive-latex-threeparttable
3662 texlive-latex-titlesec
3663 texlive-latex-trimspaces
3664 texlive-latex-ucs
3665 texlive-latex-upquote
3666 texlive-latex-url
3667 texlive-latex-varwidth
3668 texlive-latex-wrapfig)))
3669 ("texinfo" ,texinfo)
3670 ("perl" ,perl)
3671 ("scipy-sphinx-theme"
3672 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
3673 (method git-fetch)
3674 (uri (git-reference
3675 (url "https://github.com/scipy/scipy-sphinx-theme.git")
3676 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
3677 (sha256
3678 (base32
3679 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
3680 ,@(package-native-inputs python-numpy)))
3681 (arguments
3682 `(#:tests? #f ; we're only generating the documentation
3683 #:phases
3684 (modify-phases %standard-phases
3685 (delete 'build)
3686 (replace 'install
3687 (lambda* (#:key inputs outputs #:allow-other-keys)
3688 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3689 (doc (string-append
3690 data "/doc/" ,name "-"
3691 ,(package-version python-numpy)))
3692 (info-reader (string-append data "/info"))
3693 (html (string-append doc "/html"))
3694 (scipy-sphinx-theme "scipy-sphinx-theme")
3695 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
3696 (pyver ,(string-append "PYVER=")))
3697
3698 ;; FIXME: this is needed to for texlive-union to generate
3699 ;; fonts, which are not found.
3700 (setenv "HOME" "/tmp")
3701
3702 (with-directory-excursion "doc"
3703 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
3704 (mkdir-p html)
4fc898da
RW
3705 (invoke "make" "html" pyver)
3706 (invoke "make" "latex" "PAPER=a4" pyver)
3707 (invoke "make" "-C" "build/latex"
44d10b1f
RW
3708 "all-pdf" "PAPER=a4" pyver)
3709 ;; FIXME: Generation of the info file fails.
4fc898da 3710 ;; (invoke "make" "info" pyver)
44d10b1f
RW
3711 ;; (mkdir-p info)
3712 ;; (copy-file "build/texinfo/numpy.info"
3713 ;; (string-append info "/numpy.info"))
3714 (for-each (lambda (file)
3715 (copy-file (string-append "build/latex" file)
3716 (string-append doc file)))
3717 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3718 (with-directory-excursion "build/html"
3719 (for-each (lambda (file)
3720 (let* ((dir (dirname file))
3721 (tgt-dir (string-append html "/" dir)))
3722 (unless (equal? "." dir)
3723 (mkdir-p tgt-dir))
3724 (install-file file html)))
3725 (find-files "." ".*")))))
3726 #t)))))
3727 (home-page (package-home-page python-numpy))
3728 (synopsis "Documentation for the python-numpy package")
3729 (description (package-description python-numpy))
3730 (license (package-license python-numpy))))
3731
3732(define-public python2-numpy-documentation
3733 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
3734 (package
3735 (inherit numpy-documentation)
3736 (native-inputs `(("python2-functools32" ,python2-functools32)
3737 ,@(package-native-inputs numpy-documentation))))))
3738
3739(define-public python-pygit2
3740 (package
3741 (name "python-pygit2")
dac8b275 3742 (version "0.28.2")
44d10b1f
RW
3743 (source
3744 (origin
3745 (method url-fetch)
3746 (uri (pypi-uri "pygit2" version))
3747 (sha256
dac8b275 3748 (base32 "11kzj5mjkspvplnpdb6bj8dcj6rgmkk986k8hjcklyg5yaxkz32d"))))
44d10b1f
RW
3749 (build-system python-build-system)
3750 (arguments
c3ecab0d 3751 '(#:tests? #f)) ; tests don't run correctly in our environment
44d10b1f
RW
3752 (propagated-inputs
3753 `(("python-six" ,python-six)
3754 ("python-cffi" ,python-cffi)
3755 ("libgit2" ,libgit2)
3756 ("python-tox" ,python-tox)))
3757 (native-inputs
3758 `(("python-pytest" ,python-pytest)))
3759 (home-page "https://github.com/libgit2/pygit2")
3760 (synopsis "Python bindings for libgit2")
3761 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3762library, libgit2 implements Git plumbing.")
3763 ;; GPL2.0 only, with linking exception.
3764 (license license:gpl2)))
3765
3766(define-public python2-pygit2
3767 (package-with-python2 python-pygit2))
3768
3769(define-public python-pyparsing
3770 (package
3771 (name "python-pyparsing")
6d3cff5a 3772 (version "2.3.1")
44d10b1f
RW
3773 (source
3774 (origin
3775 (method url-fetch)
3776 (uri (pypi-uri "pyparsing" version))
3777 (sha256
6d3cff5a 3778 (base32 "0yk6xl885b91dmlhlsap7x78hk2rdr879fln9anbq6k4ca42djb6"))))
44d10b1f
RW
3779 (build-system python-build-system)
3780 (outputs '("out" "doc"))
3781 (arguments
3782 `(#:tests? #f ; no test target
3783 #:phases
3784 (modify-phases %standard-phases
3785 (add-after 'install 'install-doc
3786 (lambda* (#:key outputs #:allow-other-keys)
3787 (let* ((doc (string-append (assoc-ref outputs "doc")
3788 "/share/doc/" ,name "-" ,version))
3789 (html-doc (string-append doc "/html"))
3790 (examples (string-append doc "/examples")))
3791 (mkdir-p html-doc)
3792 (mkdir-p examples)
3793 (for-each
3794 (lambda (dir tgt)
3795 (map (lambda (file)
3796 (install-file file tgt))
3797 (find-files dir ".*")))
3798 (list "docs" "htmldoc" "examples")
3799 (list doc html-doc examples))
3800 #t))))))
3801 (home-page "https://github.com/pyparsing/pyparsing")
3802 (synopsis "Python parsing class library")
3803 (description
3804 "The pyparsing module is an alternative approach to creating and
3805executing simple grammars, vs. the traditional lex/yacc approach, or the use
3806of regular expressions. The pyparsing module provides a library of classes
3807that client code uses to construct the grammar directly in Python code.")
3808 (license license:expat)))
3809
3810(define-public python2-pyparsing
3811 (package-with-python2 python-pyparsing))
3812
3813(define-public python-numpydoc
3814 (package
3815 (name "python-numpydoc")
3816 (version "0.8.0")
3817 (source
3818 (origin
3819 (method url-fetch)
3820 (uri (pypi-uri "numpydoc" version))
3821 (sha256
3822 (base32
3823 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
3824 (build-system python-build-system)
3825 (propagated-inputs
3826 `(("python-sphinx" ,python-sphinx)))
3827 (native-inputs
3828 `(("python-nose" ,python-nose)))
3829 (home-page "https://pypi.python.org/pypi/numpydoc")
3830 (synopsis
3831 "Numpy's Sphinx extensions")
3832 (description
3833 "Sphinx extension to support docstrings in Numpy format.")
3834 (license license:bsd-2)))
3835
3836(define-public python2-numpydoc
3837 (package-with-python2 python-numpydoc))
3838
3839(define-public python-numexpr
3840 (package
3841 (name "python-numexpr")
3842 (version "2.6.5")
3843 (source
3844 (origin
3845 (method url-fetch)
3846 (uri (pypi-uri "numexpr" version))
3847 (sha256
3848 (base32
3849 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
3850 (build-system python-build-system)
3851 (arguments `(#:tests? #f)) ; no tests included
3852 (propagated-inputs
3853 `(("python-numpy" ,python-numpy)))
3854 (home-page "https://github.com/pydata/numexpr")
3855 (synopsis "Fast numerical expression evaluator for NumPy")
3856 (description
3857 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3858expressions that operate on arrays are accelerated and use less memory than
3859doing the same calculation in Python. In addition, its multi-threaded
3860capabilities can make use of all your cores, which may accelerate
3861computations, most specially if they are not memory-bounded (e.g. those using
3862transcendental functions).")
3863 (license license:expat)))
3864
3865(define-public python2-numexpr
3866 (package-with-python2 python-numexpr))
3867
3868(define-public python-cycler
3869 (package
3870 (name "python-cycler")
3871 (version "0.10.0")
3872 (source (origin
3873 (method url-fetch)
3874 (uri (pypi-uri "cycler" version))
3875 (sha256
3876 (base32
3877 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
3878 (build-system python-build-system)
3879 (arguments
3880 ;; XXX: The current version requires 'coveralls' which we don't have.
3881 ;; Enable this for the next release which uses 'python-pytest'.
3882 '(#:tests? #f))
3883 (propagated-inputs
3884 `(("python-six" ,python-six)))
3885 (home-page "http://matplotlib.org/cycler/")
3886 (synopsis "Composable keyword argument iterator")
3887 (description
3888 "When using @code{matplotlib} and plotting more than one line, it is
3889common to want to be able to want to be able to cycle over one or more artist
3890styles; but the plotting logic can quickly become involved.
3891To address this and enable easy cycling over arbitrary @code{kwargs}, the
3892@code{Cycler} class was developed.")
3893 (license license:bsd-3)))
3894
3895(define-public python2-cycler
3896 (package-with-python2 python-cycler))
3897
3898(define-public python-colorspacious
3899 (package
3900 (name "python-colorspacious")
53a3ebed 3901 (version "1.1.2")
44d10b1f 3902 (source
dee92e65
TGR
3903 (origin
3904 (method git-fetch)
3905 (uri (git-reference
3906 (url "https://github.com/njsmith/colorspacious.git")
3907 (commit (string-append "v" version))))
3908 (file-name (git-file-name name version))
3909 (sha256
53a3ebed 3910 (base32 "0x7nkphr6g5ql5fvgss8l56rgiyjgh6fm8zzs73i94ci9wzlm63w"))))
44d10b1f
RW
3911 (build-system python-build-system)
3912 (propagated-inputs
3913 `(("python-numpy" ,python-numpy)))
3914 (native-inputs
3915 `(("python-nose" ,python-nose)))
3916 (arguments
3917 `(#:phases
3918 (modify-phases %standard-phases
3919 (replace 'check
3920 (lambda _
c988afda 3921 (invoke "nosetests" "--all-modules" "-v" "colorspacious"))))))
44d10b1f
RW
3922 (home-page "https://github.com/njsmith/colorspacious")
3923 (synopsis "Python library for colorspace conversions")
3924 (description "@code{colorspacious} is a Python library that lets you
3925convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
3926 (license license:expat)))
3927
3928(define-public python2-colorspacious
3929 (package-with-python2 python-colorspacious))
3930
3931(define-public python-matplotlib
3932 (package
3933 (name "python-matplotlib")
9e7cb2f1 3934 (version "3.1.2")
44d10b1f
RW
3935 (source
3936 (origin
3937 (method url-fetch)
3938 (uri (pypi-uri "matplotlib" version))
3939 (sha256
3940 (base32
9e7cb2f1 3941 "1nmshfqh7wyg15i16hx1yiylcvzkws29ivn66n3i0wyqwcpjr3lf"))))
44d10b1f
RW
3942 (build-system python-build-system)
3943 (propagated-inputs ; the following packages are all needed at run time
3944 `(("python-cycler" ,python-cycler)
3945 ("python-kiwisolver" ,python-kiwisolver)
3946 ("python-pyparsing" ,python-pyparsing)
3947 ("python-pygobject" ,python-pygobject)
3948 ("gobject-introspection" ,gobject-introspection)
3949 ("python-tkinter" ,python "tk")
3950 ("python-dateutil" ,python-dateutil)
3951 ("python-numpy" ,python-numpy)
3952 ("python-pillow" ,python-pillow)
3953 ("python-pytz" ,python-pytz)
3954 ("python-six" ,python-six)
44d10b1f
RW
3955 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3956 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3957 ;; object. For this reason we need to import both libraries.
5ea654cf 3958 ;; https://cairocffi.readthedocs.io/en/stable/cffi_api.html#converting-pycairo-wrappers-to-cairocffi
44d10b1f 3959 ("python-pycairo" ,python-pycairo)
44d10b1f
RW
3960 ("python-cairocffi" ,python-cairocffi)))
3961 (inputs
3962 `(("libpng" ,libpng)
3963 ("imagemagick" ,imagemagick)
3964 ("freetype" ,freetype)
3965 ("cairo" ,cairo)
3966 ("glib" ,glib)
3967 ;; FIXME: Add backends when available.
3968 ;("python-wxpython" ,python-wxpython)
3969 ("tcl" ,tcl)
3970 ("tk" ,tk)))
3971 (native-inputs
3972 `(("pkg-config" ,pkg-config)
5ea654cf
RW
3973 ("python-pytest" ,python-pytest)
3974 ("python-mock" ,python-mock)
3975 ("unzip" ,unzip)
3976 ("jquery-ui"
3977 ,(origin
3978 (method url-fetch)
3979 (uri "https://jqueryui.com/resources/download/jquery-ui-1.12.1.zip")
3980 (sha256
3981 (base32
3982 "0kb21xf38diqgxcdi1z3s9ssq36pldvyqxy56hn6pcva6rs3c8zq"))))))
44d10b1f
RW
3983 (arguments
3984 `(#:phases
3985 (modify-phases %standard-phases
5ea654cf
RW
3986 ;; XXX We disable all image comparison tests because we're using a
3987 ;; newer version of FreeType than matplotlib expects. This leads to
3988 ;; minor differences throughout the tests.
3989 (add-after 'unpack 'fix-and-disable-failing-tests
3990 (lambda _
3991 (substitute* (append (find-files "lib/matplotlib/tests/"
3992 "test_.*\\.py$")
3993 (find-files "lib/mpl_toolkits/tests"
3994 "test_.*\\.py$"))
3995 (("^from matplotlib" match)
3996 (string-append "import pytest\n" match))
3997 (("( *)@image_comparison" match indent)
3998 (string-append indent
3999 "@pytest.mark.skip(reason=\"unknown minor image differences\")\n"
4000 match)))
4001 (substitute* "lib/matplotlib/tests/test_animation.py"
4002 (("/bin/sh") (which "sh")))
4003 (for-each delete-file
4004 ;; test_normal_axes, test_get_tightbbox_polar
4005 '("lib/matplotlib/tests/test_axes.py"
9e7cb2f1
RW
4006 ;; We don't use the webagg backend and this test forces it.
4007 "lib/matplotlib/tests/test_backend_webagg.py"
5ea654cf
RW
4008 ;; test_outward_ticks
4009 "lib/matplotlib/tests/test_tightlayout.py"
9e7cb2f1
RW
4010 ;; test_hidden_axes fails with minor extent
4011 ;; differences, possibly due to the use of a
4012 ;; different version of FreeType.
4013 "lib/matplotlib/tests/test_constrainedlayout.py"
5ea654cf
RW
4014 ;; Fontconfig returns no fonts.
4015 "lib/matplotlib/tests/test_font_manager.py"))
4016 #t))
4017 (add-before 'install 'install-jquery-ui
4018 (lambda* (#:key outputs inputs #:allow-other-keys)
4019 (let ((dir (string-append (assoc-ref outputs "out")
4020 "/lib/python3.7/site-packages/matplotlib/backends/web_backend/")))
4021 (mkdir-p dir)
4022 (invoke "unzip"
4023 (assoc-ref inputs "jquery-ui")
4024 "-d" dir))
4025 #t))
c09f598d 4026 (replace 'check
5ea654cf
RW
4027 (lambda* (#:key outputs inputs #:allow-other-keys)
4028 (add-installed-pythonpath inputs outputs)
4029 (invoke "python" "tests.py" "-v"
9e7cb2f1 4030 "-m" "not network and not webagg")))
44d10b1f
RW
4031 (add-before 'build 'configure-environment
4032 (lambda* (#:key outputs inputs #:allow-other-keys)
34c2a16b
RW
4033 (let ((cairo (assoc-ref inputs "cairo")))
4034 ;; Setting this directory in the 'basedirlist' of 'setup.cfg'
44d10b1f 4035 ;; has not effect.
34c2a16b 4036 (setenv "LD_LIBRARY_PATH" (string-append cairo "/lib"))
44d10b1f
RW
4037 (setenv "HOME" (getcwd))
4038 (call-with-output-file "setup.cfg"
4039 (lambda (port)
4040 (format port "[directories]~%
4041basedirlist = ~a,~a~%
5ea654cf
RW
4042[packages]~%
4043tests = True~%"
44d10b1f
RW
4044 (assoc-ref inputs "tcl")
4045 (assoc-ref inputs "tk")))))
4046 #t)))))
339b5828 4047 (home-page "https://matplotlib.org/")
44d10b1f
RW
4048 (synopsis "2D plotting library for Python")
4049 (description
4050 "Matplotlib is a Python 2D plotting library which produces publication
4051quality figures in a variety of hardcopy formats and interactive environments
4052across platforms. Matplotlib can be used in Python scripts, the python and
4053ipython shell, web application servers, and six graphical user interface
4054toolkits.")
4055 (license license:psfl)
4056 (properties `((python2-variant . ,(delay python2-matplotlib))))))
4057
4058(define-public python2-matplotlib
4059 (let ((matplotlib (package-with-python2
4060 (strip-python2-variant python-matplotlib))))
4061 (package (inherit matplotlib)
7380df73 4062 (version "2.2.4")
5ea654cf
RW
4063 (source
4064 (origin
4065 (method url-fetch)
4066 (uri (pypi-uri "matplotlib" version))
4067 (sha256
4068 (base32
7380df73 4069 "09i1gnrra1590brc1f8d5rh2zvnknmfgzp613ab0462qkrwj15h2"))))
5d484f42
EF
4070 (arguments
4071 (substitute-keyword-arguments (package-arguments matplotlib)
4072 ((#:phases phases)
4073 `(modify-phases ,phases
66a3c2db
EF
4074 (replace 'install-jquery-ui
4075 (lambda* (#:key outputs inputs #:allow-other-keys)
4076 (let ((dir (string-append (assoc-ref outputs "out")
4077 "/lib/python2.7/site-packages/"
4078 "matplotlib/backends/web_backend/")))
4079 (mkdir-p dir)
4080 (invoke "unzip"
4081 (assoc-ref inputs "jquery-ui")
4082 "-d" dir))
4083 #t))
38a404d5 4084 (delete 'fix-and-disable-failing-tests)
5d484f42 4085 (delete 'check))))) ; These tests weren't run the the past.
44d10b1f
RW
4086 ;; Make sure to use special packages for Python 2 instead
4087 ;; of those automatically rewritten by package-with-python2.
4088 (propagated-inputs
4089 `(("python2-pycairo" ,python2-pycairo)
4090 ("python2-backports-functools-lru-cache"
4091 ,python2-backports-functools-lru-cache)
4092 ("python2-functools32" ,python2-functools32)
4093 ("python2-pygobject-2" ,python2-pygobject-2)
4094 ("python2-subprocess32" ,python2-subprocess32)
4095 ("python2-tkinter" ,python-2 "tk")
4096 ,@(fold alist-delete (package-propagated-inputs matplotlib)
4097 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
4098
4099(define-public python-matplotlib-documentation
4100 (package
4101 (name "python-matplotlib-documentation")
4102 (version (package-version python-matplotlib))
4103 (source (package-source python-matplotlib))
4104 (build-system python-build-system)
4105 (native-inputs
4106 `(("python-matplotlib" ,python-matplotlib)
4107 ("python-colorspacious" ,python-colorspacious)
4108 ("python-sphinx" ,python-sphinx)
5ad0a452 4109 ("python-sphinx-copybutton" ,python-sphinx-copybutton)
44d10b1f
RW
4110 ("python-sphinx-gallery" ,python-sphinx-gallery)
4111 ("python-numpydoc" ,python-numpydoc)
4112 ("python-ipython" ,python-ipython)
e7a53914 4113 ("python-ipykernel" ,python-ipykernel)
44d10b1f
RW
4114 ("python-mock" ,python-mock)
4115 ("graphviz" ,graphviz)
f75aa97f 4116 ("texlive" ,(texlive-union (list texlive-amsfonts
e7a53914
RW
4117 texlive-latex-amsmath
4118 texlive-latex-enumitem
4119 texlive-latex-expdlist
4120 texlive-latex-geometry
4121 texlive-latex-preview
4122 texlive-latex-type1cm
4123 texlive-latex-ucs
4124
4125 texlive-generic-pdftex
4126
e7a53914
RW
4127 texlive-fonts-ec
4128 texlive-fonts-adobe-times
4129 texlive-fonts-txfonts)))
44d10b1f
RW
4130 ("texinfo" ,texinfo)
4131 ,@(package-native-inputs python-matplotlib)))
4132 (arguments
4133 `(#:tests? #f ; we're only generating documentation
4134 #:phases
4135 (modify-phases %standard-phases
5ea654cf
RW
4136 ;; The tests in python-matplotlib are run after the install phase, so
4137 ;; we need to delete the extra phase here.
4138 (delete 'check)
44d10b1f
RW
4139 (replace 'build
4140 (lambda _
4141 (chdir "doc")
e7a53914
RW
4142 (setenv "PYTHONPATH"
4143 (string-append (getenv "PYTHONPATH")
4144 ":" (getcwd) "/../examples/units"))
44d10b1f 4145 (substitute* "conf.py"
e7a53914
RW
4146 ;; Don't use git.
4147 (("^SHA = check_output.*")
4148 (string-append "SHA = \"" ,version "\"\n"))
4149 ;; Don't fetch intersphinx files from the Internet
4150 (("^explicit_order_folders" m)
4151 (string-append "intersphinx_mapping = {}\n" m))
4152 (("'sphinx.ext.intersphinx',") "")
4153 ;; Disable URL embedding which requires internet access.
4154 (("'https://docs.scipy.org/doc/numpy'") "None")
4155 (("'https://docs.scipy.org/doc/scipy/reference'") "None"))
4156 (invoke "make"
4157 "SPHINXBUILD=sphinx-build"
4158 "SPHINXOPTS=" ; don't abort on warnings
4159 "html" "texinfo")))
44d10b1f
RW
4160 (replace 'install
4161 (lambda* (#:key inputs outputs #:allow-other-keys)
4162 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
4163 (doc (string-append data "/doc/python-matplotlib-" ,version))
4164 (info (string-append data "/info"))
4165 (html (string-append doc "/html")))
4166 (mkdir-p html)
4167 (mkdir-p info)
4168 (copy-recursively "build/html" html)
4169 (symlink (string-append html "/_images")
4170 (string-append info "/matplotlib-figures"))
4171 (with-directory-excursion "build/texinfo"
4172 (substitute* "matplotlib.texi"
4173 (("@image\\{([^,]*)" all file)
4174 (string-append "@image{matplotlib-figures/" file)))
4175 (symlink (string-append html "/_images")
4176 "./matplotlib-figures")
e7a53914
RW
4177 (invoke "makeinfo" "--no-split"
4178 "-o" "matplotlib.info" "matplotlib.texi"))
4179 (install-file "build/texinfo/matplotlib.info" info))
44d10b1f
RW
4180 #t)))))
4181 (home-page (package-home-page python-matplotlib))
4182 (synopsis "Documentation for the python-matplotlib package")
4183 (description (package-description python-matplotlib))
4184 (license (package-license python-matplotlib))))
4185
4186(define-public python2-matplotlib-documentation
5ad0a452
RW
4187 (let ((parent (package-with-python2 python-matplotlib-documentation)))
4188 (package
4189 (inherit parent)
4190 (native-inputs
4191 (alist-delete "python-sphinx-copybutton"
4192 (package-native-inputs parent))))))
44d10b1f 4193
55dae98f
RW
4194(define-public python-matplotlib-venn
4195 (package
4196 (name "python-matplotlib-venn")
4197 (version "0.11.5")
4198 (source
4199 (origin
4200 (method url-fetch)
4201 (uri (pypi-uri "matplotlib-venn" version ".zip"))
4202 (sha256
4203 (base32
4204 "13w3i1wih0mij08hrgppzg0g9z50y54rc28l6gdi1r5w45l7l0dy"))))
4205 (build-system python-build-system)
4206 (arguments '(#:tests? #f)) ; tests are not included
4207 (propagated-inputs
4208 `(("python-matplotlib" ,python-matplotlib)
4209 ("python-numpy" ,python-numpy)
4210 ("python-scipy" ,python-scipy)))
4211 (native-inputs
4212 `(("unzip" ,unzip)))
4213 (home-page "https://github.com/konstantint/matplotlib-venn")
4214 (synopsis "Plot area-proportional Venn diagrams")
4215 (description
4216 "This package provides tools for plotting area-proportional two- and
4217three-way Venn diagrams in @code{matplotlib}.")
4218 (license license:expat)))
4219
44d10b1f
RW
4220(define-public python2-pysnptools
4221 (package
4222 (name "python2-pysnptools")
5d1ade85 4223 (version "0.3.13")
44d10b1f
RW
4224 (source
4225 (origin
4226 (method url-fetch)
5d1ade85 4227 (uri (pypi-uri "pysnptools" version))
44d10b1f
RW
4228 (sha256
4229 (base32
5d1ade85 4230 "0lnis5xsl7bi0hz4f7gbicahzi5zlxkc21nk3g374xv8fb5hb3qm"))))
44d10b1f
RW
4231 (build-system python-build-system)
4232 (arguments
5d1ade85
RW
4233 `(#:python ,python-2 ; only Python 2.7 is supported
4234 #:tests? #f)) ; test files (e.g. examples/toydata.bim) not included
44d10b1f
RW
4235 (propagated-inputs
4236 `(("python2-numpy" ,python2-numpy)
4237 ("python2-scipy" ,python2-scipy)
4238 ("python2-pandas" ,python2-pandas)))
44d10b1f 4239 (native-inputs
5d1ade85 4240 `(("python2-cython" ,python2-cython)))
1b66989b 4241 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
44d10b1f
RW
4242 (synopsis "Library for reading and manipulating genetic data")
4243 (description
4244 "PySnpTools is a library for reading and manipulating genetic data. It
4245can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
4246those files. It can also efficiently manipulate ranges of integers using set
4247operators such as union, intersection, and difference.")
4248 (license license:asl2.0)))
4249
44d10b1f
RW
4250(define-public python-socksipy-branch
4251 (package
4252 (name "python-socksipy-branch")
4253 (version "1.01")
4254 (source
4255 (origin
4256 (method url-fetch)
4257 (uri (pypi-uri "SocksiPy-branch" version))
4258 (sha256
4259 (base32
4260 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
4261 (build-system python-build-system)
4262 (arguments
4263 `(#:tests? #f)) ; There are no tests
4264 (home-page "https://code.google.com/archive/p/socksipy-branch/")
4265 (synopsis "Python SOCKS module")
4266 (description
4267 "SocksiPy - A Python SOCKS client module. It provides a
4268socket-like interface that supports connections to any TCP
4269service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
4270The original version was developed by Dan Haim, this is a
4271branch created by Mario Vilas to address some open issues,
4272as the original project seems to have been abandoned circa 2007.")
4273 (license license:bsd-3)))
4274
4275(define-public python2-socksipy-branch
4276 (package-with-python2 python-socksipy-branch))
4277
6fcceb23
AG
4278(define-public python-socksipychain
4279 (package
4280 (name "python-socksipychain")
d97cdff1 4281 (version "2.1.0")
6fcceb23
AG
4282 (source
4283 (origin
4284 (method git-fetch)
4285 (uri (git-reference
4286 (url "https://github.com/pagekite/PySocksipyChain.git")
4287 (commit (string-append "v" version))))
4288 (file-name (git-file-name name version))
4289 (sha256
4290 (base32
d97cdff1 4291 "0idm9a050rd2kbgbz2sk9ib9589kj4xh1xdnggs6xbq2v2y8f6zn"))))
6fcceb23
AG
4292 (build-system python-build-system)
4293 (arguments
4294 `(#:tests? #f)) ; Tests try to access the network.
4295 (home-page "http://pagekite.net/wiki/Floss/PySocksipyChain/")
4296 (synopsis "Python SOCKS module with chained proxies support")
4297 (description
4298 "SocksiPyChain is a modified version of the SocksiPy SOCKS module, which
4299adds support for arbitrary chaining of proxy servers and various modes of
4300TLS/SSL encryption. It was developed for use in PageKite, and also includes
4301a simple netcat replacement with chaining support.")
4302 (license license:bsd-3)))
4303
44d10b1f
RW
4304(define-public python-pycodestyle
4305 (package
4306 (name "python-pycodestyle")
d16ef28b 4307 (version "2.5.0")
44d10b1f 4308 (source
ba88eea2
RW
4309 (origin
4310 (method url-fetch)
4311 (uri (pypi-uri "pycodestyle" version))
4312 (sha256
4313 (base32
d16ef28b 4314 "0v4prb05n21bm8650v0a01k1nyqjdmkrsm3zycfxh2j5k9n962p4"))))
44d10b1f
RW
4315 (build-system python-build-system)
4316 (home-page "https://pycodestyle.readthedocs.io/")
4317 (synopsis "Python style guide checker")
4318 (description "@code{pycodestyle} (formerly pep8) is a tool to check
4319Python code against some of the style conventions in
4320@url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
4321 (license license:expat)))
4322
4323(define-public python2-pycodestyle
4324 (package-with-python2 python-pycodestyle))
4325
4326(define-public python-multidict
4327 (package
4328 (name "python-multidict")
4329 (version "4.2.0")
4330 (source
4331 (origin
4332 (method url-fetch)
4333 (uri (pypi-uri "multidict" version))
4334 (sha256
4335 (base32
4336 "1vf5bq8hn5a9rvhr5v4fwbmarfsp35hhr8gs74kqfijy34j2f194"))))
4337 (build-system python-build-system)
4338 (native-inputs
4339 `(("python-pytest" ,python-pytest)
4340 ("python-pytest-runner" ,python-pytest-runner)))
4341 (home-page "https://github.com/aio-libs/multidict/")
4342 (synopsis "Multidict implementation")
4343 (description "Multidict is dict-like collection of key-value pairs
4344where key might be occurred more than once in the container.")
4345 (license license:asl2.0)))
4346
4347(define-public python-orderedmultidict
4348 (package
4349 (name "python-orderedmultidict")
4350 (version "0.7.11")
4351 (source
4352 (origin
4353 (method url-fetch)
4354 (uri (pypi-uri "orderedmultidict" version))
4355 (sha256
4356 (base32
4357 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
4358 (build-system python-build-system)
4359 (arguments
4360 `(#:phases
4361 (modify-phases %standard-phases
4362 (add-after 'unpack 'fix-tests
4363 (lambda _
4364 ;; The package uses nosetest for running the tests.
4365 ;; Adding this initfile allows to run the test suite
4366 ;; without requiring nosetest.
d1c4f329
RW
4367 (with-output-to-file "tests/__init__.py" newline)
4368 #t)))))
44d10b1f
RW
4369 (propagated-inputs
4370 `(("python-six" ,python-six)))
4371 (native-inputs
4372 `(("python-pycodestyle" ,python-pycodestyle)))
4373 (home-page "https://github.com/gruns/orderedmultidict")
4374 (synopsis "Python Ordered Multivalue Dictionary - omdict")
4375 (description "This package contains a library for ordered multivalue
4376dictionaries. A multivalue dictionary is a dictionary that can store
4377multiple values for the same key. An ordered multivalue dictionary is a
4378multivalue dictionary that retains the order of insertions and deletions.")
4379 (license license:unlicense)))
4380
4381(define-public python2-orderedmultidict
4382 (package-with-python2 python-orderedmultidict))
4383
4384(define-public python-autopep8
4385 (package
4386 (name "python-autopep8")
4387 (version "1.3.5")
4388 (source
4389 (origin
4390 (method url-fetch)
4391 (uri (pypi-uri "autopep8" version))
4392 (sha256
4393 (base32
4394 "192bvhzi4d0claqxgzymvv7k3qnj627742bc8sgxpzjj42pd9112"))))
4395 (build-system python-build-system)
4396 (propagated-inputs
4397 `(("python-pycodestyle" ,python-pycodestyle)))
4398 (home-page "https://github.com/hhatto/autopep8")
4399 (synopsis "Format Python code according to the PEP 8 style guide")
4400 (description
4401 "@code{autopep8} automatically formats Python code to conform to
4402the PEP 8 style guide. It uses the pycodestyle utility to determine
4403what parts of the code needs to be formatted. @code{autopep8} is
4404capable of fixing most of the formatting issues that can be reported
4405by pycodestyle.")
4406 (license (license:non-copyleft
4407 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
4408
4409(define-public python2-autopep8
4410 (package-with-python2 python-autopep8))
4411
4412(define-public python-distutils-extra
4413 (package
4414 (name "python-distutils-extra")
4415 (version "2.38")
4416 (source
4417 (origin
4418 (method url-fetch)
4419 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4420 version "/+download/python-distutils-extra-"
4421 version ".tar.gz"))
4422 (sha256
4423 (base32
4424 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4425 (build-system python-build-system)
4426 (home-page "https://launchpad.net/python-distutils-extra/")
4427 (synopsis "Enhancements to Python's distutils")
4428 (description
4429 "The python-distutils-extra module enables you to easily integrate
4430gettext support, themed icons, and scrollkeeper-based documentation into
4431Python's distutils.")
4432 (license license:gpl2)))
4433
4434(define-public python2-distutils-extra
4435 (package-with-python2 python-distutils-extra))
4436
4437(define-public python2-elib.intl
4438 (package
4439 (name "python2-elib.intl")
4440 (version "0.0.3")
4441 (source
4442 (origin
4443 ;; This project doesn't tag releases or publish tarballs, so we take
4444 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4445 (method git-fetch)
4446 (uri (git-reference
4447 (url "https://github.com/dieterv/elib.intl.git")
4448 (commit "d09997cfef")))
4449 (file-name (string-append name "-" version "-checkout"))
4450 (sha256
4451 (base32
4452 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4453 (build-system python-build-system)
4454 (arguments
4455 ;; incompatible with Python 3 (exception syntax)
4456 `(#:python ,python-2
4457 #:tests? #f))
4458 (home-page "https://github.com/dieterv/elib.intl")
4459 (synopsis "Enhanced internationalization for Python")
4460 (description
4461 "The elib.intl module provides enhanced internationalization (I18N)
4462services for your Python modules and applications.")
4463 (license license:lgpl3+)))
4464
4465(define-public python-olefile
4466 (package
4467 (name "python-olefile")
5bef0f10 4468 (version "0.46")
44d10b1f
RW
4469 (source
4470 (origin
4471 (method url-fetch)
5bef0f10
MB
4472 (uri (string-append "https://github.com/decalage2/olefile/releases/"
4473 "download/v" version "/olefile-" version ".tar.gz"))
44d10b1f
RW
4474 (file-name (string-append name "-" version ".tar.gz"))
4475 (sha256
4476 (base32
5bef0f10 4477 "1kjxh4gr651hpqkjfv89cfzr40hyvf3vjlda7mifiail83j7j07m"))))
44d10b1f 4478 (build-system python-build-system)
5bef0f10 4479 (home-page "https://www.decalage.info/python/olefileio")
44d10b1f
RW
4480 (synopsis "Read and write Microsoft OLE2 files.")
4481 (description
4482 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
4483Storage or Compound Document, Microsoft Office). It is an improved version of
4484the OleFileIO module from PIL, the Python Image Library.")
4485 (license license:bsd-3)))
4486
4487(define-public python2-olefile
4488 (package-with-python2 python-olefile))
4489
4490(define-public python-pillow
4491 (package
4492 (name "python-pillow")
5fbdd917 4493 (version "6.2.1")
44d10b1f
RW
4494 (source
4495 (origin
4496 (method url-fetch)
4497 (uri (pypi-uri "Pillow" version))
4498 (sha256
4499 (base32
5fbdd917 4500 "1c8wkzc58f5wdh006jvmwdk3wxld1xgagcbdvj7iv17qi0m9fkmz"))))
44d10b1f
RW
4501 (build-system python-build-system)
4502 (native-inputs
4503 `(("python-pytest" ,python-pytest)))
4504 (inputs
4505 `(("freetype" ,freetype)
4506 ("lcms" ,lcms)
44d10b1f 4507 ("libjpeg" ,libjpeg)
44d10b1f 4508 ("libtiff" ,libtiff)
0c4e1c5f
EF
4509 ("libwebp" ,libwebp)
4510 ("openjpeg" ,openjpeg)
4511 ("zlib" ,zlib)))
44d10b1f
RW
4512 (propagated-inputs
4513 `(("python-olefile" ,python-olefile)))
4514 (arguments
4515 `(#:phases
4516 (modify-phases %standard-phases
4517 (add-after 'unpack 'patch-ldconfig
4518 (lambda _
4519 (substitute* "setup.py"
4520 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
61b77ff3 4521 (replace 'check
979d8464
EF
4522 (lambda* (#:key outputs inputs tests? #:allow-other-keys)
4523 (if tests?
4524 (begin
4525 (setenv "HOME" (getcwd))
4526 ;; Make installed package available for running the tests.
4527 (add-installed-pythonpath inputs outputs)
4528 (invoke "python" "selftest.py" "--installed")
4529 (invoke "python" "-m" "pytest" "-vv"))
4530 #t))))))
44d10b1f
RW
4531 (home-page "https://python-pillow.org")
4532 (synopsis "Fork of the Python Imaging Library")
4533 (description
4534 "The Python Imaging Library adds image processing capabilities to your
4535Python interpreter. This library provides extensive file format support, an
4536efficient internal representation, and fairly powerful image processing
4537capabilities. The core image library is designed for fast access to data
4538stored in a few basic pixel formats. It should provide a solid foundation for
4539a general image processing tool.")
4540 (license (license:x11-style
4541 "http://www.pythonware.com/products/pil/license.htm"
4542 "The PIL Software License"))))
4543
4544(define-public python2-pillow
4545 (package-with-python2 python-pillow))
4546
4547(define-public python-pycparser
4548 (package
4549 (name "python-pycparser")
c6c0940e 4550 (version "2.19")
44d10b1f
RW
4551 (source
4552 (origin
4553 (method url-fetch)
4554 (uri (pypi-uri "pycparser" version))
4555 (sha256
4556 (base32
c6c0940e 4557 "1cr5dcj9628lkz1qlwq3fv97c25363qppkmcayqvd05dpy573259"))))
44d10b1f
RW
4558 (outputs '("out" "doc"))
4559 (build-system python-build-system)
4560 (native-inputs
4561 `(("pkg-config" ,pkg-config)))
4562 (arguments
4563 `(#:phases
4564 (modify-phases %standard-phases
4565 (replace 'check
4566 (lambda _
4567 (with-directory-excursion "tests"
acb75c03
RW
4568 (invoke "python" "all_tests.py"))
4569 #t))
44d10b1f
RW
4570 (add-after 'install 'install-doc
4571 (lambda* (#:key outputs #:allow-other-keys)
4572 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4573 (doc (string-append data "/doc/" ,name "-" ,version))
4574 (examples (string-append doc "/examples")))
4575 (mkdir-p examples)
4576 (for-each (lambda (file)
4577 (copy-file (string-append "." file)
4578 (string-append doc file)))
4579 '("/README.rst" "/CHANGES" "/LICENSE"))
c6c0940e
MB
4580 (copy-recursively "examples" examples)
4581 #t))))))
44d10b1f
RW
4582 (home-page "https://github.com/eliben/pycparser")
4583 (synopsis "C parser in Python")
4584 (description
4585 "Pycparser is a complete parser of the C language, written in pure Python
4586using the PLY parsing library. It parses C code into an AST and can serve as
4587a front-end for C compilers or analysis tools.")
4588 (license license:bsd-3)))
4589
4590(define-public python2-pycparser
4591 (package-with-python2 python-pycparser))
4592
4593(define-public python-pywavelets
4594 (package
4595 (name "python-pywavelets")
4596 (version "1.0.1")
4597 (home-page "https://github.com/PyWavelets/pywt")
4598 (source (origin
4599 (method url-fetch)
4600 (uri (pypi-uri "PyWavelets" version))
4601 (sha256
4602 (base32
4603 "1p3qv2v66ghnqrb1f98wyyhp9dz71jwcd6kfpsax65sfdpiyqp1w"))))
4604 (build-system python-build-system)
4605 (arguments
4606 '(#:modules ((ice-9 ftw)
4607 (srfi srfi-1)
4608 (srfi srfi-26)
4609 (guix build utils)
4610 (guix build python-build-system))
4611 #:phases (modify-phases %standard-phases
4612 (replace 'check
4613 (lambda _
4614 (let ((cwd (getcwd))
4615 (libdir (find (cut string-prefix? "lib." <>)
4616 (scandir "build"))))
4617 (with-directory-excursion (string-append cwd "/build/" libdir)
4618 (invoke "nosetests" "-v" "."))))))))
4619 (native-inputs
4620 `(("python-matplotlib" ,python-matplotlib) ;for tests
4621 ("python-nose" ,python-nose)))
4622 (propagated-inputs
4623 `(("python-numpy" ,python-numpy)))
4624 (synopsis "Wavelet transforms in Python")
4625 (description
4626 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
4627mathematical basis functions that are localized in both time and frequency.
4628Wavelet transforms are time-frequency transforms employing wavelets. They are
4629similar to Fourier transforms, the difference being that Fourier transforms are
4630localized only in frequency instead of in time and frequency.")
4631 (license license:expat)))
4632
4633(define-public python2-pywavelets
4634 (package-with-python2 python-pywavelets))
4635
4636(define-public python-xcffib
4637 (package
4638 (name "python-xcffib")
4639 (version "0.6.0")
4640 (source
4641 (origin
4642 (method url-fetch)
4643 (uri (pypi-uri "xcffib" version))
4644 (sha256
4645 (base32
4646 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
4647 (build-system python-build-system)
4648 (inputs
4649 `(("libxcb" ,libxcb)))
4650 (propagated-inputs
4651 `(("python-cffi" ,python-cffi) ; used at run time
4652 ("python-six" ,python-six)))
4653 (arguments
4654 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
4655 #:tests? #f
4656 #:phases
4657 (modify-phases %standard-phases
4658 (add-after 'unpack 'fix-libxcb-path
4659 (lambda* (#:key inputs #:allow-other-keys)
4660 (let ((libxcb (assoc-ref inputs "libxcb")))
4661 (substitute* '("xcffib/__init__.py")
4662 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
4663 #t)))
4664 (add-after 'install 'install-doc
4665 (lambda* (#:key outputs #:allow-other-keys)
4666 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4667 "/doc/" ,name "-" ,version)))
4668 (mkdir-p doc)
4669 (copy-file "README.md"
4670 (string-append doc "/README.md"))
4671 #t))))))
4672 (home-page "https://github.com/tych0/xcffib")
4673 (synopsis "XCB Python bindings")
4674 (description
4675 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4676support for Python 3 and PyPy. It is based on cffi.")
4677 (license license:expat)))
4678
4679(define-public python2-xcffib
4680 (package-with-python2 python-xcffib))
4681
4682(define-public python-cairocffi
4683 (package
4684 (name "python-cairocffi")
4685 (version "0.9.0")
4686 (source
4687 (origin
4688 (method url-fetch)
4689 (uri (pypi-uri "cairocffi" version))
4690 (sha256
4691 (base32
4692 "0dq3k4zhqd8cwsf3nyjqvjqm8wkvrjn1wjf44rl3v0h8kqx6qf0m"))
4693 (patches (search-patches "python-cairocffi-dlopen-path.patch"))))
4694 (build-system python-build-system)
4695 (outputs '("out" "doc"))
4696 (inputs
4697 `(("glib" ,glib)
4698 ("gtk+" ,gtk+)
4699 ("gdk-pixbuf" ,gdk-pixbuf)
4700 ("cairo" ,cairo)
4701 ("pango" ,pango)))
4702 (native-inputs
4703 `(("pkg-config" ,pkg-config)
4704 ("python-pytest" ,python-pytest)
4705 ("python-pytest-cov" ,python-pytest-cov)
4706 ("python-pytest-runner" ,python-pytest-runner)
4707 ("python-sphinx" ,python-sphinx)
4708 ("python-docutils" ,python-docutils)))
4709 (propagated-inputs
4710 `(("python-xcffib" ,python-xcffib))) ; used at run time
4711 (arguments
4712 `(#:phases
4713 (modify-phases %standard-phases
4714 (add-after 'unpack 'patch-paths
4715 (lambda* (#:key inputs outputs #:allow-other-keys)
4716 (substitute* (find-files "." "\\.py$")
4717 (("dlopen\\(ffi, 'cairo'")
4718 (string-append "dlopen(ffi, '" (assoc-ref inputs "cairo")
4719 "/lib/libcairo.so.2'"))
4720 (("dlopen\\(ffi, 'gdk-3'")
4721 (string-append "dlopen(ffi, '" (assoc-ref inputs "gtk+")
4722 "/lib/libgtk-3.so.0'"))
4723 (("dlopen\\(ffi, 'gdk_pixbuf-2.0'")
4724 (string-append "dlopen(ffi, '" (assoc-ref inputs "gdk-pixbuf")
4725 "/lib/libgdk_pixbuf-2.0.so.0'"))
4726 (("dlopen\\(ffi, 'glib-2.0'")
4727 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4728 "/lib/libglib-2.0.so.0'"))
4729 (("dlopen\\(ffi, 'gobject-2.0'")
4730 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4731 "/lib/libgobject-2.0.so.0'"))
4732 (("dlopen\\(ffi, 'pangocairo-1.0'")
4733 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4734 "/lib/libpangocairo-1.0.so.0'"))
4735 (("dlopen\\(ffi, 'pango-1.0'")
4736 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4737 "/lib/libpango-1.0.so.0'")))
4738 #t))
4739 (add-after 'install 'install-doc
4740 (lambda* (#:key inputs outputs #:allow-other-keys)
4741 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4742 (doc (string-append data "/doc/" ,name "-" ,version))
4743 (html (string-append doc "/html")))
4744 (setenv "LD_LIBRARY_PATH"
4745 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4746 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4747 (setenv "LANG" "en_US.UTF-8")
4748 (mkdir-p html)
4749 (for-each (lambda (file)
4750 (copy-file (string-append "." file)
4751 (string-append doc file)))
4752 '("/README.rst" "/CHANGES" "/LICENSE"))
4753 (system* "python" "setup.py" "build_sphinx")
4754 (copy-recursively "docs/_build/html" html)
4755 #t))))))
4756 (home-page "https://github.com/Kozea/cairocffi")
4757 (synopsis "Python bindings and object-oriented API for Cairo")
4758 (description
4759 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4760Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4761graphics library with support for multiple backends including image buffers,
4762PNG, PostScript, PDF, and SVG file output.")
4763 (license license:bsd-3)))
4764
4765(define-public python2-cairocffi
4766 (package-with-python2 python-cairocffi))
4767
4768(define-public python-decorator
4769 (package
4770 (name "python-decorator")
4771 (version "4.3.0")
4772 (source
4773 (origin
4774 (method url-fetch)
4775 (uri (pypi-uri "decorator" version))
4776 (sha256
4777 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
4778 (build-system python-build-system)
4779 (home-page "https://pypi.python.org/pypi/decorator/")
4780 (synopsis "Python module to simplify usage of decorators")
4781 (description
4782 "The aim of the decorator module is to simplify the usage of decorators
4783for the average programmer, and to popularize decorators usage giving examples
4784of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4785etc. The core of this module is a decorator factory.")
4786 (license license:expat)))
4787
4788(define-public python2-decorator
4789 (package-with-python2 python-decorator))
4790
4791(define-public python-drmaa
4792 (package
4793 (name "python-drmaa")
4794 (version "0.7.7")
4795 (source
4796 (origin
4797 (method url-fetch)
4798 (uri (pypi-uri "drmaa" version))
4799 (sha256
4800 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
4801 (build-system python-build-system)
4802 ;; The test suite requires libdrmaa which is provided by the cluster
4803 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4804 ;; should be set to the path of the libdrmaa library.
4805 (arguments '(#:tests? #f))
4806 (native-inputs
4807 `(("python-nose" ,python-nose)))
4808 (home-page "https://pypi.python.org/pypi/drmaa")
4809 (synopsis "Python bindings for the DRMAA library")
4810 (description
4811 "A Python package for Distributed Resource Management (DRM) job
4812submission and control. This package is an implementation of the DRMAA 1.0
4813Python language binding specification.")
4814 (license license:bsd-3)))
4815
4816(define-public python2-drmaa
4817 (package-with-python2 python-drmaa))
4818
4819(define-public python-grako
4820 (package
4821 (name "python-grako")
4822 (version "3.99.9")
4823 (source
4824 (origin
4825 (method url-fetch)
4826 (uri
4827 (pypi-uri "grako" version ".zip"))
4828 (sha256
4829 (base32
4830 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
4831 (build-system python-build-system)
4832 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
4833 (native-inputs
4834 `(("unzip" ,unzip)
4835 ("python-pytest" ,python-pytest)
4836 ("python-pytest-runner" ,python-pytest-runner)))
4837 (home-page "https://bitbucket.org/neogeny/grako")
4838 (synopsis "EBNF parser generator")
4839 (description
4840 "Grako takes a grammar in a variation of EBNF as input, and outputs a
4841memoizing PEG/Packrat parser in Python.")
4842 (license license:bsd-3)))
4843
4844(define-public python2-grako
4845 (package-with-python2 python-grako))
4846
4847(define-public python-gridmap
4848 (package
4849 (name "python-gridmap")
4850 (version "0.13.0")
4851 (source
4852 (origin
768fea0f
TGR
4853 (method git-fetch)
4854 (uri (git-reference
4855 (url "https://github.com/pygridtools/gridmap.git")
4856 (commit (string-append "v" version))))
4857 (file-name (git-file-name name version))
44d10b1f 4858 (sha256
768fea0f 4859 (base32 "1478lbwsr1w24cii2x01m2910fvh8r43ghnb78nc972a96hqiknm"))))
44d10b1f
RW
4860 (build-system python-build-system)
4861 (arguments
4862 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
4863 (propagated-inputs
4864 `(("python-psutil" ,python-psutil)
4865 ("python-drmaa" ,python-drmaa)
4866 ("python-pyzmq" ,python-pyzmq)))
4867 (home-page "https://github.com/pygridtools/gridmap")
4868 (synopsis "Create jobs on a cluster directly from Python")
4869 (description
4870 "Gridmap is a Python package to allow you to easily create jobs on the
4871cluster directly from Python. You can directly map Python functions onto the
4872cluster without needing to write any wrapper code yourself.")
4873 (license license:gpl3+)))
4874
4875(define-public python2-gridmap
4876 (package-with-python2 python-gridmap))
4877
4878(define-public python-honcho
4879 (package
4880 (name "python-honcho")
4881 (version "1.0.1")
4882 (source
4883 (origin
8524d130
TGR
4884 (method git-fetch)
4885 (uri (git-reference
4886 (url "https://github.com/nickstenning/honcho.git")
4887 (commit (string-append "v" version))))
4888 (file-name (git-file-name name version))
44d10b1f 4889 (sha256
8524d130 4890 (base32 "11bd87474qpif20xdcn0ra1idj5k16ka51i658wfpxwc6nzsn92b"))))
44d10b1f
RW
4891 (build-system python-build-system)
4892 (native-inputs
4893 `(("python-pytest" ,python-pytest)
4894 ("python-mock" ,python-mock)
4895 ("python-tox" ,python-tox)
4896 ("which" ,which))) ;for tests
4897 (propagated-inputs
4898 `(("python-jinja2" ,python-jinja2)))
4899 (arguments
4900 `(#:phases
4901 (modify-phases %standard-phases
4902 (delete 'check)
4903 (add-after 'install 'check
4904 (lambda* (#:key outputs inputs #:allow-other-keys)
4905 ;; fix honcho path in testsuite
4906 (substitute* "tests/conftest.py"
4907 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
4908 "/bin/honcho" "'")))
4909 ;; It's easier to run tests after install.
4910 ;; Make installed package available for running the tests
4911 (add-installed-pythonpath inputs outputs)
95b707fb 4912 (invoke "py.test" "-v"))))))
44d10b1f
RW
4913 (home-page "https://github.com/nickstenning/honcho")
4914 (synopsis "Manage Procfile-based applications")
4915 (description
4916 "A Procfile is a file which describes how to run an application
50fceab0 4917consisting of several processes. honcho starts all listed processes.
44d10b1f
RW
4918The output of all running processes is collected by honcho and
4919displayed.")
4920 (license license:expat)))
4921
4922(define-public python2-honcho
4923 (package-with-python2 python-honcho))
4924
4925(define-public python-pexpect
4926 (package
4927 (name "python-pexpect")
4928 (version "4.6.0")
4929 (source
4930 (origin
4931 (method url-fetch)
4932 (uri (pypi-uri "pexpect" version))
4933 (sha256
4934 (base32 "1fla85g47iaxxpjhp9vkxdnv4pgc7rplfy6ja491smrrk0jqi3ia"))))
4935 (build-system python-build-system)
4936 (arguments
4937 `(#:phases
4938 (modify-phases %standard-phases
4939 (add-before 'check 'prepare-tests
4940 (lambda _
4941 (substitute* (find-files "tests")
4942 (("/bin/ls") (which "ls"))
4943 (("/bin/echo") (which "echo"))
4944 (("/bin/which") (which "which"))
4945 ;; Many tests try to use the /bin directory which
4946 ;; is not present in the build environment.
4947 ;; Use one that's non-empty and unlikely to change.
4948 (("/bin'") "/dev'"))
4949 ;; XXX: Socket connection test gets "Connection reset by peer".
4950 ;; Why does it not work? Delete for now.
4951 (delete-file "tests/test_socket.py")
4952 #t))
4953 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
4954 (native-inputs
4955 `(("python-nose" ,python-nose)
4956 ("python-pytest" ,python-pytest)
4957 ("man-db" ,man-db)
4958 ("which" ,which)
4959 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
4960 (propagated-inputs
4961 `(("python-ptyprocess" ,python-ptyprocess)))
4962 (home-page "http://pexpect.readthedocs.org/")
4963 (synopsis "Controlling interactive console applications")
4964 (description
4965 "Pexpect is a pure Python module for spawning child applications;
4966controlling them; and responding to expected patterns in their output.
4967Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4968child application and control it as if a human were typing commands.")
4969 (license license:isc)))
4970
4971(define-public python2-pexpect
4972 (package-with-python2 python-pexpect))
4973
4974(define-public python-setuptools-scm
4975 (package
4976 (name "python-setuptools-scm")
85092643 4977 (version "3.2.0")
44d10b1f
RW
4978 (source (origin
4979 (method url-fetch)
4980 (uri (pypi-uri "setuptools_scm" version))
4981 (sha256
4982 (base32
85092643 4983 "0n3knn3p1sqlx31k2lahn7z9bacvlv8nhlfidj77vz50bxqlgasj"))))
44d10b1f
RW
4984 (build-system python-build-system)
4985 (home-page "https://github.com/pypa/setuptools_scm/")
4986 (synopsis "Manage Python package versions in SCM metadata")
4987 (description
4988 "Setuptools_scm handles managing your Python package versions in
4989@dfn{software configuration management} (SCM) metadata instead of declaring
4990them as the version argument or in a SCM managed file.")
4991 (license license:expat)))
4992
a0b2accf
MO
4993;; Needed by python-lazy-object-proxy, remove on next update cycle.
4994(define-public python-setuptools-scm-3.3
4995 (package
4996 (inherit python-setuptools-scm)
4997 (version "3.3.3")
4998 (source (origin
4999 (method url-fetch)
5000 (uri (pypi-uri "setuptools_scm" version))
5001 (sha256
5002 (base32
5003 "19cyndx23xmpbhz4qrwmfwsmnnaczd0dw7qg977ksq2dbvxy29dx"))))))
5004
44d10b1f
RW
5005(define-public python2-setuptools-scm
5006 (package-with-python2 python-setuptools-scm))
5007
bb74ea09
RW
5008(define-public python-pathlib2
5009 (package
5010 (name "python-pathlib2")
5011 (version "2.3.3")
5012 (source
5013 (origin
5014 (method url-fetch)
5015 (uri (pypi-uri "pathlib2" version))
5016 (sha256
5017 (base32
5018 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
5019 (build-system python-build-system)
5020 (propagated-inputs
5021 `(("python-scandir" ,python-scandir)
5022 ("python-six" ,python-six)))
5023 (home-page "https://pypi.python.org/pypi/pathlib2/")
746d3384 5024 (synopsis "Object-oriented file system paths")
bb74ea09
RW
5025 (description "The goal of pathlib2 is to provide a backport of the
5026standard @code{pathlib} module which tracks the standard library module, so
5027all the newest features of the standard @code{pathlib} can be used also on
5028older Python versions.")
5029 (license license:expat)))
5030
fd5c264a
MB
5031(define-public python2-importlib-resources
5032 (package
5033 (name "python2-importlib-resources")
5034 (version "1.0.2")
5035 (source (origin
5036 (method url-fetch)
5037 (uri (pypi-uri "importlib_resources" version))
5038 (sha256
5039 (base32
5040 "0y3hg12iby1qyaspnbisz4s4vxax7syikk3skznwqizqyv89y9yk"))))
5041 (build-system python-build-system)
5042 (arguments
5043 `(#:python ,python-2))
5044 (native-inputs
5045 `(("python-wheel" ,python2-wheel)))
5046 (propagated-inputs
5047 `(("python-pathlib2" ,python2-pathlib2)
5048 ("python-typing" ,python2-typing)))
5049 (home-page "https://gitlab.com/python-devs/importlib_resources")
5050 (synopsis "Backport of @code{importlib.resources} from Python 3.7")
5051 (description
5052 "This package provides an implementation of @code{importlib.resources}
5053for older versions of Python.")
5054 (license license:asl2.0)))
5055
15b65617
RW
5056(define-public python-importlib-metadata
5057 (package
5058 (name "python-importlib-metadata")
4dc04d11 5059 (version "1.4.0")
15b65617
RW
5060 (source
5061 (origin
5062 (method url-fetch)
5063 (uri (pypi-uri "importlib_metadata" version))
5064 (sha256
4dc04d11 5065 (base32 "1n76444v7zn910xrhh8954jdn4byxbn9f1jck6b85a716mbh2z7i"))))
15b65617
RW
5066 (build-system python-build-system)
5067 (propagated-inputs
4dc04d11 5068 `(("python-zipp" ,python-zipp)))
15b65617
RW
5069 (native-inputs
5070 `(("python-setuptools-scm" ,python-setuptools-scm)
4dc04d11 5071 ("python-packaging" ,python-packaging)))
15b65617
RW
5072 (home-page "https://importlib-metadata.readthedocs.io/")
5073 (synopsis "Read metadata from Python packages")
5074 (description
5075 "@code{importlib_metadata} is a library which provides an API for
5076accessing an installed Python package's metadata, such as its entry points or
5077its top-level name. This functionality intends to replace most uses of
5078@code{pkg_resources} entry point API and metadata API. Along with
5079@code{importlib.resources} in Python 3.7 and newer, this can eliminate the
5080need to use the older and less efficient @code{pkg_resources} package.")
3dfb3d44 5081 (properties `((python2-variant . ,(delay python2-importlib-metadata))))
15b65617
RW
5082 (license license:asl2.0)))
5083
5efa04dd
MB
5084(define-public python2-importlib-metadata
5085 (let ((base (package-with-python2 (strip-python2-variant
5086 python-importlib-metadata))))
5087 (package/inherit
5088 base
5089 (name "python2-importlib-metadata")
5090 (propagated-inputs
5091 `(("python-configparser" ,python2-configparser)
5092 ("python-contextlib2" ,python2-contextlib2)
5093 ("python-importlib-resources" ,python2-importlib-resources)
5094 ("python-pathlib2" ,python2-pathlib2)
5095 ,@(package-propagated-inputs base))))))
5096
37c173d1
RW
5097(define-public python-jaraco-packaging
5098 (package
5099 (name "python-jaraco-packaging")
5100 (version "6.1")
5101 (source
5102 (origin
5103 (method url-fetch)
5104 (uri (pypi-uri "jaraco.packaging" version))
5105 (sha256
5106 (base32
5107 "0zimrnkh33b9g8ffw11mjh6kvs54cy5gcjw1h5cl1r7dc833dmkm"))))
5108 (build-system python-build-system)
5109 (propagated-inputs
5110 `(("python-pytest" ,python-pytest)
5111 ("python-pytest-checkdocs" ,python-pytest-checkdocs)
5112 ("python-pytest-flake8" ,python-pytest-flake8)
5113 ("python-rst.linker" ,python-rst.linker)
5114 ("python-setuptools" ,python-setuptools)
5115 ("python-setuptools-scm" ,python-setuptools-scm)
5116 ("python-six" ,python-six)
5117 ("python-sphinx" ,python-sphinx)))
5118 (home-page "https://github.com/jaraco/jaraco.packaging")
5119 (synopsis "Tools to supplement packaging Python releases")
5120 (description
5121 "This package provides various tools to supplement packaging Python
5122releases.")
5123 (license license:expat)))
5124
44d10b1f
RW
5125(define-public python-pathpy
5126 (package
5127 (name "python-pathpy")
a3dd8871 5128 (version "11.5.1")
44d10b1f
RW
5129 (source
5130 (origin
5131 (method url-fetch)
5132 (uri (pypi-uri "path.py" version))
5133 (sha256
a3dd8871 5134 (base32 "0ir9j1haq2jbi7aip6k2fa9l7q1l03k4hp1awxhjhcwzsnwp3ll8"))))
49ad11e9 5135 (outputs '("out" "doc"))
44d10b1f
RW
5136 (build-system python-build-system)
5137 (propagated-inputs
01a53e0b
MC
5138 `(("python-appdirs" ,python-appdirs)
5139 ("python-importlib-metadata" ,python-importlib-metadata)))
44d10b1f
RW
5140 (native-inputs
5141 `(("python-setuptools-scm" ,python-setuptools-scm)
5142 ("python-sphinx" ,python-sphinx)
5143 ("python-rst.linker" ,python-rst.linker)
5144 ("python-pytest" ,python-pytest)
49ad11e9
RW
5145 ("python-pytest-runner" ,python-pytest-runner)
5146 ("python-jaraco-packaging" ,python-jaraco-packaging)))
44d10b1f 5147 (arguments
49ad11e9
RW
5148 `(#:phases
5149 (modify-phases %standard-phases
5150 (add-after 'build 'build-doc
5151 (lambda _
5152 (setenv "LANG" "en_US.UTF-8")
5153 (invoke "python" "setup.py" "build_sphinx")))
5154 (add-after 'install 'install-doc
5155 (lambda* (#:key outputs #:allow-other-keys)
5156 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5157 (doc (string-append data "/doc/" ,name "-" ,version))
5158 (html (string-append doc "/html")))
5159 (mkdir-p html)
5160 (for-each (lambda (file)
5161 (copy-file file (string-append doc "/" file)))
5162 '("README.rst" "CHANGES.rst"))
5163 (copy-recursively "build/sphinx/html" html)
5164 #t)))
5165 (replace 'check
5166 (lambda _
5167 ;; The import time test aborts if an import takes longer than
5168 ;; 100ms. It may very well take a little longer than that.
5169 (invoke "pytest" "-v" "-k" "not test_import_time"))))))
44d10b1f
RW
5170 (home-page "https://github.com/jaraco/path.py")
5171 (synopsis "Python module wrapper for built-in os.path")
5172 (description
5173 "@code{path.py} implements path objects as first-class entities, allowing
5174common operations on files to be invoked on those path objects directly.")
5175 (license license:expat)))
5176
5177(define-public python2-pathpy
5178 (package-with-python2 python-pathpy))
5179
5180(define-public python-simplegeneric
5181 (package
5182 (name "python-simplegeneric")
5183 (version "0.8.1")
5184 (source
5185 (origin
5186 (method url-fetch)
6c8c3980 5187 (uri (pypi-uri "simplegeneric" version ".zip"))
44d10b1f
RW
5188 (sha256
5189 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
5190 (build-system python-build-system)
5191 (native-inputs
5192 `(("unzip" ,unzip)))
5193 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
5194 (synopsis "Python module for simple generic functions")
5195 (description
5196 "The simplegeneric module lets you define simple single-dispatch generic
5197functions, akin to Python’s built-in generic functions like @code{len()},
5198@code{iter()} and so on. However, instead of using specially-named methods,
5199these generic functions use simple lookup tables, akin to those used by
5200e.g. @code{pickle.dump()} and other generic functions found in the Python
5201standard library.")
5202 (license license:zpl2.1)))
5203
5204(define-public python2-simplegeneric
5205 (package-with-python2 python-simplegeneric))
5206
5207(define-public python-ipython-genutils
5208 ;; TODO: This package is retired, check if can be removed, see description.
5209 (package
5210 (name "python-ipython-genutils")
5211 (version "0.1.0")
5212 (source
5213 (origin
5214 (method url-fetch)
c9671d4b 5215 (uri (pypi-uri "ipython_genutils" version))
44d10b1f
RW
5216 (sha256
5217 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
5218 (build-system python-build-system)
5219 (arguments `(#:tests? #f)) ; no tests
5220 (home-page "https://ipython.org")
5221 (synopsis "Vestigial utilities from IPython")
5222 (description
5223 "This package provides retired utilities from IPython. No packages
5224outside IPython/Jupyter should depend on it.
5225
5226This package shouldn't exist. It contains some common utilities shared by
5227Jupyter and IPython projects during The Big Split. As soon as possible, those
5228packages will remove their dependency on this, and this package will go
5229away.")
5230 (license license:bsd-3)))
5231
5232(define-public python2-ipython-genutils
5233 (package-with-python2 python-ipython-genutils))
5234
5235(define-public python-traitlets
5236 (package
5237 (name "python-traitlets")
ac5e205a 5238 (version "4.3.3")
44d10b1f
RW
5239 (source
5240 (origin
5241 (method url-fetch)
5242 (uri (pypi-uri "traitlets" version))
5243 (sha256
5244 (base32
ac5e205a 5245 "1xsrwgivpkxlbr4dfndfsi098s29yqgswgjc1qqn69yxklvfw8yh"))))
44d10b1f
RW
5246 (build-system python-build-system)
5247 (arguments
5248 `(#:phases
5249 (modify-phases %standard-phases
5250 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
5251 (propagated-inputs
5252 `(("python-ipython-genutils" ,python-ipython-genutils)
ac5e205a 5253 ("python-decorator" ,python-decorator)))
44d10b1f
RW
5254 (native-inputs
5255 `(("python-pytest" ,python-pytest)))
5256 (properties `((python2-variant . ,(delay python2-traitlets))))
5257 (home-page "https://ipython.org")
5258 (synopsis "Configuration system for Python applications")
5259 (description
5260 "Traitlets is a framework that lets Python classes have attributes with
5261type checking, dynamically calculated default values, and ‘on change’
5262callbacks. The package also includes a mechanism to use traitlets for
5263configuration, loading values from files or from command line arguments. This
5264is a distinct layer on top of traitlets, so you can use traitlets in your code
5265without using the configuration machinery.")
5266 (license license:bsd-3)))
5267
5268(define-public python2-traitlets
5269 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
5270 (package
5271 (inherit traitlets)
5272 (propagated-inputs
5273 `(("python2-enum34" ,python2-enum34)
5274 ,@(package-propagated-inputs traitlets))))))
5275
5276(define-public python-jupyter-core
5277 (package
5278 (name "python-jupyter-core")
5279 (version "4.4.0")
5280 (source
5281 (origin
5282 (method url-fetch)
5283 (uri (string-append (pypi-uri "jupyter_core" version)))
5284 (sha256
5285 (base32
5286 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
5287 (build-system python-build-system)
5288 ;; FIXME: not sure how to run the tests
5289 (arguments `(#:tests? #f))
5290 (propagated-inputs
5291 `(("python-traitlets" ,python-traitlets)))
5292 (home-page "http://jupyter.org/")
5293 (synopsis "Jupyter base package")
5294 (description
5295 "Jupyter core is the base package on which Jupyter projects rely.")
5296 (license license:bsd-3)))
5297
5298(define-public python2-jupyter-core
5299 (package-with-python2 python-jupyter-core))
5300
5301(define-public python-jupyter-client
5302 (package
5303 (name "python-jupyter-client")
5304 (version "5.2.4")
5305 (source
5306 (origin
5307 (method url-fetch)
5308 (uri (pypi-uri "jupyter_client" version))
5309 (sha256
5310 (base32
5311 "0l9mh7ccrpl3lppym3dnky8n1nk7xarzzdcxf4q2s7aw203cpydm"))))
5312 (build-system python-build-system)
5313 ;; Tests fail because of missing native python kernel which I assume is
5314 ;; provided by the ipython package, which we cannot use because it would
5315 ;; cause a dependency cycle.
ddc586ea
LC
5316 (arguments
5317 `(#:tests? #f
5318
5319 #:phases (modify-phases %standard-phases
5320 (add-after 'unpack 'set-tool-file-names
5321 (lambda* (#:key inputs #:allow-other-keys)
5322 (let ((iproute (assoc-ref inputs "iproute")))
5323 (substitute* "jupyter_client/localinterfaces.py"
5324 (("'ip'")
5325 (string-append "'" iproute "/sbin/ip'")))
5326 #t))))))
5327 (inputs
5328 `(("iproute" ,iproute)))
44d10b1f
RW
5329 (propagated-inputs
5330 `(("python-pyzmq" ,python-pyzmq)
5331 ("python-traitlets" ,python-traitlets)
5332 ("python-jupyter-core" ,python-jupyter-core)))
5333 (home-page "http://jupyter.org/")
5334 (synopsis "Jupyter protocol implementation and client libraries")
5335 (description
5336 "The @code{jupyter_client} package contains the reference implementation
5337of the Jupyter protocol. It also provides client and kernel management APIs
5338for working with kernels, and the @code{jupyter kernelspec} entrypoint for
5339installing @code{kernelspec}s for use with Jupyter frontends.")
5340 (license license:bsd-3)))
5341
5342(define-public python2-jupyter-client
5343 (package-with-python2 python-jupyter-client))
5344
5345(define-public python-ipykernel
5346 (package
5347 (name "python-ipykernel")
08d0a355 5348 (version "5.1.3")
44d10b1f
RW
5349 (source
5350 (origin
5351 (method url-fetch)
5352 (uri (pypi-uri "ipykernel" version))
5353 (sha256
08d0a355 5354 (base32 "1a08y677lpn80qzvv7z0smgggmr5m5ayf0bs6vds47xpxl9sss5k"))))
44d10b1f
RW
5355 (build-system python-build-system)
5356 (arguments
5357 `(#:phases
5358 (modify-phases %standard-phases
5359 (replace 'check
5360 (lambda _
5361 (setenv "HOME" "/tmp")
5362 (invoke "pytest" "-v")
aa856d02
LC
5363 #t))
5364 (add-after 'install 'set-python-file-name
5365 (lambda* (#:key outputs #:allow-other-keys)
5366 ;; Record the absolute file name of the 'python' executable in
5367 ;; 'kernel.json'.
5368 (let ((out (assoc-ref outputs "out")))
5369 (substitute* (string-append out "/share/jupyter"
5370 "/kernels/python3/kernel.json")
5371 (("\"python\"")
5372 (string-append "\"" (which "python") "\"")))
5373 #t))))))
44d10b1f
RW
5374 (propagated-inputs
5375 `(("python-ipython" ,python-ipython)
5376 ;; imported at runtime during connect
5377 ("python-jupyter-client" ,python-jupyter-client)))
5378 (native-inputs
08d0a355
TGR
5379 `(("python-flaky" ,python-flaky)
5380 ("python-nose" ,python-nose)
5381 ("python-pytest" ,python-pytest)))
44d10b1f
RW
5382 (home-page "https://ipython.org")
5383 (synopsis "IPython Kernel for Jupyter")
5384 (description
5385 "This package provides the IPython kernel for Jupyter.")
5386 (license license:bsd-3)))
5387
0f378947 5388;; Version 5.1.1 and above no longer support Python 2.
44d10b1f 5389(define-public python2-ipykernel
0f378947
RW
5390 (package
5391 (name "python2-ipykernel")
5392 (version "5.1.0")
5393 (source
5394 (origin
5395 (method url-fetch)
5396 (uri (pypi-uri "ipykernel" version))
5397 (sha256
5398 (base32 "0br95qhrd5k65g10djngiy27hs0642301hlf2q142i8djabvzh0g"))))
5399 (build-system python-build-system)
5400 (arguments
5401 `(#:python ,python-2
5402 #:phases
5403 (modify-phases %standard-phases
5404 (replace 'check
5405 (lambda _
5406 (setenv "HOME" "/tmp")
5407 (invoke "pytest" "-v")
5408 #t)))))
5409 (propagated-inputs
5410 `(("python2-ipython" ,python2-ipython)
5411 ;; imported at runtime during connect
5412 ("python2-jupyter-client" ,python2-jupyter-client)))
5413 (native-inputs
5414 `(("python2-pytest" ,python2-pytest)
5415 ("python2-nose" ,python2-nose)))
5416 (home-page "https://ipython.org")
5417 (synopsis "IPython Kernel for Jupyter")
5418 (description
5419 "This package provides the IPython kernel for Jupyter.")
5420 (license license:bsd-3)))
44d10b1f 5421
966aa714
AE
5422(define-public python-pari-jupyter
5423 (package
5424 (name "python-pari-jupyter")
5425 (version "1.3.2")
5426 (source
5427 (origin
5428 (method url-fetch)
5429 (uri (pypi-uri "pari_jupyter" version))
5430 (sha256
5431 (base32
5432 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
5433 (build-system python-build-system)
5434 (propagated-inputs
5435 `(("python-ipykernel" ,python-ipykernel)))
5436 (inputs
5437 `(("pari-gp" ,pari-gp)
5438 ("readline" ,readline)))
5439 (arguments
5440 `(#:tests? #f)) ; no test suite
5441 (home-page
5442 "https://github.com/jdemeyer/pari_jupyter")
5443 (synopsis "A Jupyter kernel for PARI/GP")
5444 (description "The package provides a PARI/GP kernel for Jupyter.")
5445 (license license:gpl3+)))
5446
dede052a
RW
5447(define-public python-backcall
5448 (package
5449 (name "python-backcall")
5450 (version "0.1.0")
5451 (source
5452 (origin
5453 (method url-fetch)
5454 (uri (pypi-uri "backcall" version))
5455 (sha256
5456 (base32
5457 "1r01dqch3f8fdj3n6fviw8hxqrs6w5v0qw4izmvqzry1w9dxiv1q"))))
5458 (build-system python-build-system)
5459 (home-page "https://github.com/takluyver/backcall/")
5460 (synopsis "Specifications for callback functions passed in to an API")
5461 (description
5462 "If your code lets other people supply callback functions, it's important
5463to specify the function signature you expect, and check that functions support
5464that. Adding extra parameters later would break other peoples code unless
5465you're careful. The @code{backcall} package provides a way of specifying the
5466callback signature using a prototype function.")
5467 (license license:bsd-3)))
5468
44d10b1f
RW
5469;; This is the latest release of the LTS version of ipython with support for
5470;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
8b5f756c
RW
5471;; dropped support for Python 2.7.
5472(define-public python2-ipython
44d10b1f 5473 (package
8b5f756c 5474 (name "python2-ipython")
44d10b1f
RW
5475 (version "5.8.0")
5476 (source
5477 (origin
5478 (method url-fetch)
5479 (uri (pypi-uri "ipython" version ".tar.gz"))
5480 (sha256
5481 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
5482 (build-system python-build-system)
44d10b1f 5483 (propagated-inputs
8b5f756c
RW
5484 `(("python2-backports-shutil-get-terminal-size"
5485 ,python2-backports-shutil-get-terminal-size)
5486 ("python2-pathlib2" ,python2-pathlib2)
5487 ("python2-pyzmq" ,python2-pyzmq)
5488 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
5489 ("python2-terminado" ,python2-terminado)
5490 ("python2-matplotlib" ,python2-matplotlib)
5491 ("python2-numpy" ,python2-numpy)
5492 ("python2-numpydoc" ,python2-numpydoc)
5493 ("python2-jinja2" ,python2-jinja2)
5494 ("python2-mistune" ,python2-mistune)
5495 ("python2-pexpect" ,python2-pexpect)
5496 ("python2-pickleshare" ,python2-pickleshare)
5497 ("python2-simplegeneric" ,python2-simplegeneric)
5498 ("python2-jsonschema" ,python2-jsonschema)
5499 ("python2-traitlets" ,python2-traitlets)
5500 ("python2-nbformat" ,python2-nbformat)
5501 ("python2-pygments" ,python2-pygments)))
5502 (inputs
5503 `(("readline" ,readline)
5504 ("which" ,which)))
5505 (native-inputs
5506 `(("graphviz" ,graphviz)
5507 ("pkg-config" ,pkg-config)
5508 ("python2-requests" ,python2-requests) ;; for tests
5509 ("python2-testpath" ,python2-testpath)
5510 ("python2-mock" ,python2-mock)
5511 ("python2-nose" ,python2-nose)))
5512 (arguments
5513 `(#:python ,python-2
5514 #:phases
5515 (modify-phases %standard-phases
5516 (add-before 'check 'delete-broken-tests
5517 (lambda* (#:key inputs #:allow-other-keys)
5518 ;; These tests throw errors for unknown reasons.
5519 (delete-file "IPython/core/tests/test_profile.py")
5520 (delete-file "IPython/core/tests/test_interactiveshell.py")
5521 (delete-file "IPython/core/tests/test_magic.py")
5522 #t)))))
5523 (home-page "https://ipython.org")
5524 (synopsis "IPython is a tool for interactive computing in Python")
5525 (description
5526 "IPython provides a rich architecture for interactive computing with:
5527Powerful interactive shells, a browser-based notebook, support for interactive
5528data visualization, embeddable interpreters and tools for parallel
5529computing.")
5530 (license license:bsd-3)))
5531
5532(define-public python-ipython
5533 (package
5534 (name "python-ipython")
ee515773 5535 (version "7.9.0")
8b5f756c
RW
5536 (source
5537 (origin
5538 (method url-fetch)
5539 (uri (pypi-uri "ipython" version ".tar.gz"))
5540 (sha256
ee515773 5541 (base32 "103jkw18z7fnwdal1mdbijjxi1fndzn31g887lmj7ddpf2r07lyz"))))
8b5f756c
RW
5542 (build-system python-build-system)
5543 (propagated-inputs
5544 `(("python-backcall" ,python-backcall)
5545 ("python-pyzmq" ,python-pyzmq)
5546 ("python-prompt-toolkit" ,python-prompt-toolkit)
44d10b1f
RW
5547 ("python-terminado" ,python-terminado)
5548 ("python-matplotlib" ,python-matplotlib)
5549 ("python-numpy" ,python-numpy)
5550 ("python-numpydoc" ,python-numpydoc)
8b5f756c 5551 ("python-jedi" ,python-jedi)
44d10b1f
RW
5552 ("python-jinja2" ,python-jinja2)
5553 ("python-mistune" ,python-mistune)
5554 ("python-pexpect" ,python-pexpect)
5555 ("python-pickleshare" ,python-pickleshare)
5556 ("python-simplegeneric" ,python-simplegeneric)
5557 ("python-jsonschema" ,python-jsonschema)
5558 ("python-traitlets" ,python-traitlets)
5559 ("python-nbformat" ,python-nbformat)
5560 ("python-pygments" ,python-pygments)))
5561 (inputs
5562 `(("readline" ,readline)
5563 ("which" ,which)))
5564 (native-inputs
5565 `(("graphviz" ,graphviz)
5566 ("pkg-config" ,pkg-config)
5567 ("python-requests" ,python-requests) ;; for tests
5568 ("python-testpath" ,python-testpath)
8b5f756c 5569 ("python-nose" ,python-nose)))
44d10b1f
RW
5570 (arguments
5571 `(#:phases
5572 (modify-phases %standard-phases
0f272518
RW
5573 (add-after 'unpack 'make-docs-reproducible
5574 (lambda _
5575 (substitute* "IPython/sphinxext/ipython_directive.py"
5576 ((".*import datetime") "")
5577 ((".*datetime.datetime.now\\(\\)") "")
5578 (("%timeit") "# %timeit"))
5579 #t))
44d10b1f
RW
5580 ;; Tests can only be run after the library has been installed and not
5581 ;; within the source directory.
5582 (delete 'check)
5583 (add-after 'install 'check
5584 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5585 (if tests?
5586 (begin
5587 ;; Make installed package available for running the tests
5588 (add-installed-pythonpath inputs outputs)
5589 (setenv "HOME" "/tmp/") ;; required by a test
5590 ;; We only test the core because one of the other tests
5591 ;; tries to import ipykernel.
5592 (invoke "python" "IPython/testing/iptest.py"
5593 "-v" "IPython/core/tests"))
5594 #t)))
5595 (add-before 'check 'fix-tests
5596 (lambda* (#:key inputs #:allow-other-keys)
5597 (substitute* "./IPython/utils/_process_posix.py"
5598 (("/usr/bin/env', 'which") (which "which")))
5599 (substitute* "./IPython/core/tests/test_inputtransformer.py"
5600 (("#!/usr/bin/env python")
5601 (string-append "#!" (which "python"))))
44d10b1f
RW
5602 ;; This test introduces a circular dependency on ipykernel
5603 ;; (which depends on ipython).
5604 (delete-file "IPython/core/tests/test_display.py")
8b5f756c 5605 ;; AttributeError: module 'IPython.core' has no attribute 'formatters'
44d10b1f 5606 (delete-file "IPython/core/tests/test_interactiveshell.py")
44d10b1f
RW
5607 #t)))))
5608 (home-page "https://ipython.org")
5609 (synopsis "IPython is a tool for interactive computing in Python")
5610 (description
5611 "IPython provides a rich architecture for interactive computing with:
5612Powerful interactive shells, a browser-based notebook, support for interactive
5613data visualization, embeddable interpreters and tools for parallel
5614computing.")
8b5f756c 5615 (license license:bsd-3)))
44d10b1f 5616
8b5f756c
RW
5617(define-public python-ipython-documentation
5618 (package
5619 (inherit python-ipython)
5620 (name "python-ipython-documentation")
5621 (version (package-version python-ipython))
5622 (arguments
5623 `(#:phases
5624 (modify-phases %standard-phases
5625 (delete 'build)
5626 (delete 'check)
5627 (replace 'install
5628 (lambda* (#:key outputs #:allow-other-keys)
5629 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
5630 (doc (string-append data "/doc/" ,name "-" ,version))
5631 (html (string-append doc "/html"))
5632 (man1 (string-append data "/man/man1"))
5633 (info (string-append data "/info"))
5634 (examples (string-append doc "/examples"))
5635 (python-arg (string-append "PYTHON=" (which "python"))))
5636 (setenv "LANG" "en_US.utf8")
5637 (with-directory-excursion "docs"
5638 ;; FIXME: pdf fails to build
5639 ;;(system* "make" "pdf" "PAPER=a4")
5640 (system* "make" python-arg "html")
5641 ;; FIXME: the generated texi file contains ^@^@, which trips
5642 ;; up the parser.
5643 ;; (system* "make" python-arg "info")
5644 )
5645 (copy-recursively "docs/man" man1)
5646 (copy-recursively "examples" examples)
5647 (copy-recursively "docs/build/html" html)
5648 ;; (copy-file "docs/build/latex/ipython.pdf"
5649 ;; (string-append doc "/ipython.pdf"))
5650 (mkdir-p info)
5651 ;; (copy-file "docs/build/texinfo/ipython.info"
5652 ;; (string-append info "/ipython.info"))
5653 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
5654 #t)))))
5655 (inputs
5656 `(("python-ipython" ,python-ipython)
5657 ("python-ipykernel" ,python-ipykernel)))
5658 (native-inputs
5659 `(("python-sphinx" ,python-sphinx)
5660 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
5661 ;; FIXME: It's possible that a smaller union would work just as well.
f75aa97f 5662 ("texlive" ,(texlive-union (list texlive-amsfonts
8b5f756c
RW
5663 texlive-fonts-ec
5664 texlive-generic-ifxetex
5665 texlive-generic-pdftex
8b5f756c
RW
5666 texlive-latex-capt-of
5667 texlive-latex-cmap
5668 texlive-latex-environ
5669 texlive-latex-eqparbox
5670 texlive-latex-etoolbox
5671 texlive-latex-expdlist
5672 texlive-latex-fancyhdr
5673 texlive-latex-fancyvrb
5674 texlive-latex-fncychap
5675 texlive-latex-float
5676 texlive-latex-framed
5677 texlive-latex-geometry
5678 texlive-latex-graphics
5679 texlive-latex-hyperref
5680 texlive-latex-mdwtools
5681 texlive-latex-multirow
5682 texlive-latex-needspace
5683 texlive-latex-oberdiek
5684 texlive-latex-parskip
5685 texlive-latex-preview
5686 texlive-latex-tabulary
5687 texlive-latex-threeparttable
5688 texlive-latex-titlesec
5689 texlive-latex-trimspaces
5690 texlive-latex-ucs
5691 texlive-latex-upquote
5692 texlive-latex-url
5693 texlive-latex-varwidth
5694 texlive-latex-wrapfig)))
5695 ("texinfo" ,texinfo)))))
44d10b1f
RW
5696
5697(define-public python-urwid
5698 (package
5699 (name "python-urwid")
5700 (version "2.0.1")
5701 (source
5702 (origin
5703 (method url-fetch)
5704 (uri (pypi-uri "urwid" version))
5705 (sha256
5706 (base32
5707 "1g6cpicybvbananpjikmjk8npmjk4xvak1wjzji62wc600wkwkb4"))))
5708 (build-system python-build-system)
5709 (home-page "http://urwid.org")
5710 (synopsis "Console user interface library for Python")
5711 (description
5712 "Urwid is a curses-based UI/widget library for Python. It includes many
5713features useful for text console applications.")
5714 (license license:lgpl2.1+)))
5715
5716(define-public python2-urwid
5717 (package-with-python2 python-urwid))
5718
5719(define-public python-urwidtrees
5720 (package
5721 (name "python-urwidtrees")
5722 (version "1.0.2")
5723 (source
5724 (origin
c8364072 5725 (method git-fetch)
44d10b1f
RW
5726 ;; package author intends on distributing via github rather than pypi:
5727 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
c8364072
EF
5728 (uri (git-reference
5729 (url "https://github.com/pazz/urwidtrees")
5730 (commit version)))
5731 (file-name (git-file-name name version))
44d10b1f
RW
5732 (sha256
5733 (base32
c8364072 5734 "1n1kpidvkdnsqyb82vlvk78gmly96kh8351lqxn2pzgwwns6fml2"))))
44d10b1f
RW
5735 (build-system python-build-system)
5736 (arguments
26bb7fc6
EF
5737 '(#:use-setuptools? #f
5738 #:tests? #f)) ; no tests
44d10b1f
RW
5739 (propagated-inputs `(("python-urwid" ,python-urwid)))
5740 (home-page "https://github.com/pazz/urwidtrees")
5741 (synopsis "Tree widgets for urwid")
5742 (description "Urwidtrees is a Widget Container API for the @code{urwid}
5743toolkit. Use it to build trees of widgets.")
5744 (license license:gpl3+)))
5745
5746(define-public python2-urwidtrees
5747 (package-with-python2 python-urwidtrees))
5748
5749(define-public python-ua-parser
5750 (package
5751 (name "python-ua-parser")
5752 (version "0.8.0")
5753 (source
5754 (origin
5755 (method url-fetch)
5756 (uri (pypi-uri "ua-parser" version))
5757 (sha256
5758 (base32
5759 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
5760 (build-system python-build-system)
5761 (arguments
5762 `(#:tests? #f)) ;no test suite in release
5763 (native-inputs
5764 `(("python-pyyaml" ,python-pyyaml)))
5765 (home-page "https://github.com/ua-parser/uap-python")
5766 (synopsis "User agent parser")
5767 (description
5768 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
5769 (license license:asl2.0)))
5770
5771(define-public python2-ua-parser
5772 (package-with-python2 python-ua-parser))
5773
5774(define-public python-user-agents
5775 (package
5776 (name "python-user-agents")
5777 (version "1.1.0")
5778 (source
5779 (origin
5780 (method url-fetch)
5781 (uri (pypi-uri "user-agents" version))
5782 (sha256
5783 (base32
5784 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
5785 (build-system python-build-system)
5786 (arguments
5787 `(#:tests? #f)) ;missing devices.json test file in release
5788 (propagated-inputs
5789 `(("python-ua-parser" ,python-ua-parser)))
5790 (home-page "https://github.com/selwin/python-user-agents")
5791 (synopsis "User Agent strings parsing library")
5792 (description
5793 "A library to identify devices (phones, tablets) and their capabilities by
5794parsing (browser/HTTP) user agent strings.")
5795 (license license:expat)))
5796
5797(define-public python2-user-agents
5798 (package-with-python2 python-user-agents))
5799
5800(define-public python-dbus
5801 (package
5802 (name "python-dbus")
ba5ef999 5803 (version "1.2.14")
44d10b1f
RW
5804 (source
5805 (origin
5806 (method url-fetch)
5807 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
5808 "dbus-python-" version ".tar.gz"))
5809 (sha256
ba5ef999 5810 (base32 "0cdchkgnivlka4lf8q4qfk0yxq483i3r3aqickjf8hfn7nx0c0mi"))))
44d10b1f 5811 (build-system gnu-build-system)
44d10b1f
RW
5812 (native-inputs
5813 `(("pkg-config" ,pkg-config)))
5814 (inputs
5815 `(("python" ,python-wrapper)
5816 ("dbus-glib" ,dbus-glib)))
5817 (synopsis "Python bindings for D-bus")
5818 (description "python-dbus provides bindings for libdbus, the reference
5819implementation of D-Bus.")
5820 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
5821 (license license:expat)))
5822
5823(define-public python2-dbus
5824 (package (inherit python-dbus)
5825 (name "python2-dbus")
5826 (inputs `(("python" ,python-2)
5827 ,@(alist-delete "python"
5828 (package-inputs python-dbus)
ba5ef999 5829 equal?)))))
44d10b1f 5830
fb236fdd
AG
5831(define-public python-notify2
5832 (package
5833 (name "python-notify2")
5834 (version "0.3.1")
5835 (source
5836 (origin
5837 (method url-fetch)
5838 (uri (pypi-uri "notify2" version))
5839 (sha256
5840 (base32
5841 "0z8rrv9rsg1r2qgh2dxj3dfj5xnki98kgi3w839kqby4a26i1yik"))))
5842 (build-system python-build-system)
5843 (arguments `(#:tests? #f)) ; tests depend on system state
5844 (native-inputs
5845 `(("python-dbus" ,python-dbus)))
5846 (home-page "https://bitbucket.org/takluyver/pynotify2")
5847 (synopsis "Python interface to D-Bus notifications")
5848 (description
5849 "Pynotify2 provides a Python interface for sending D-Bus notifications.
5850It is a reimplementation of pynotify in pure Python, and an alternative to
5851the GObject Introspection bindings to libnotify for non-GTK applications.")
5852 (license (list license:bsd-2
5853 license:lgpl2.1+))))
5854
5855(define-public python2-notify2
5856 (package-with-python2 python-notify2))
5857
44d10b1f
RW
5858;; beautifulsoup4 has a totally different namespace than 3.x,
5859;; and pypi seems to put it under its own name, so I guess we should too
5860(define-public python-beautifulsoup4
5861 (package
5862 (name "python-beautifulsoup4")
abb53e6f 5863 (version "4.7.1")
44d10b1f
RW
5864 (source
5865 (origin
5866 (method url-fetch)
5867 (uri (pypi-uri "beautifulsoup4" version))
5868 (sha256
5869 (base32
abb53e6f 5870 "0j2kycz2dxgx68xzjm7rxg5xn6v61gq5ifvxyg99slmqkybnal4l"))))
44d10b1f
RW
5871 (build-system python-build-system)
5872 (arguments
5873 `(#:phases
5874 (modify-phases %standard-phases
5875 ;; The Python 2 source is the definitive source of beautifulsoup4. We
5876 ;; must use this conversion script when building with Python 3. The
5877 ;; conversion script also runs the tests.
5878 ;; For more information, see the file 'convert-py3k' in the source
5879 ;; distribution.
5880 (replace 'check
dff0197e 5881 (lambda _ (invoke "./convert-py3k"))))))
f83e10e4 5882 (propagated-inputs
abb53e6f 5883 `(("python-soupsieve" ,python-soupsieve)))
44d10b1f
RW
5884 (home-page
5885 "https://www.crummy.com/software/BeautifulSoup/bs4/")
5886 (synopsis
5887 "Python screen-scraping library")
5888 (description
5889 "Beautiful Soup is a Python library designed for rapidly setting up
5890screen-scraping projects. It offers Pythonic idioms for navigating,
5891searching, and modifying a parse tree, providing a toolkit for
5892dissecting a document and extracting what you need. It automatically
5893converts incoming documents to Unicode and outgoing documents to UTF-8.")
5894 (license license:expat)
5895 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
5896
5897(define-public python2-beautifulsoup4
5898 (package
5899 (inherit (package-with-python2
5900 (strip-python2-variant python-beautifulsoup4)))
5901 (arguments `(#:python ,python-2))))
5902
ad74978a
BT
5903(define-public python-soupsieve
5904 (package
5905 (name "python-soupsieve")
3367df31 5906 (version "1.9.5")
ad74978a
BT
5907 (source
5908 (origin
5909 (method url-fetch)
5910 (uri (pypi-uri "soupsieve" version))
5911 (sha256
5912 (base32
3367df31 5913 "1nhd0q0ifwva9wn645s6pn74p1rd97asn3qfg75nphx1wkgcbhg2"))))
ad74978a
BT
5914 (build-system python-build-system)
5915 (arguments `(#:tests? #f))
5916 ;;XXX: 2 tests fail currently despite claming they were to be
5917 ;;skipped. Also, beautifulsoup4 may depend on this in the future, so we
5918 ;;don't want to create a circular dependency.
5919 (home-page "https://github.com/facelessuser/soupsieve")
5920 (synopsis "CSS selector library")
5921 (description
5922 "Soup Sieve is a CSS selector library designed to be used with Beautiful
5923Soup 4. It aims to provide selecting, matching, and filtering using modern
5924CSS selectors. Soup Sieve currently provides selectors from the CSS level 1
5925specifications up through the latest CSS level 4 drafts and beyond (though
5926some are not yet implemented).")
d00b83fb 5927 (properties `((python2-variant . ,(delay python2-soupsieve))))
ad74978a
BT
5928 (license license:expat)))
5929
5930(define-public python2-soupsieve
d00b83fb 5931 (let ((base (package-with-python2 (strip-python2-variant python-soupsieve))))
ad74978a
BT
5932 (package
5933 (inherit base)
5934 (propagated-inputs
d00b83fb
MB
5935 `(("python2-backports-functools-lru-cache"
5936 ,python2-backports-functools-lru-cache)
5937 ,@(package-propagated-inputs base))))))
ad74978a 5938
44d10b1f
RW
5939(define-public python-netifaces
5940 (package
5941 (name "python-netifaces")
5942 (version "0.10.7")
5943 (source
5944 (origin
5945 (method url-fetch)
5946 (uri (pypi-uri "netifaces" version))
5947 (sha256
5948 (base32
5949 "1gccklrcplbbqh81g1mdgpa5y8na7kkf29cq2ka3f5a2fp5hyndx"))))
5950 (build-system python-build-system)
5951 (home-page "https://github.com/al45tair/netifaces")
5952 (synopsis
5953 "Python module for portable network interface information")
5954 (description
5955 "Netifaces is a Python module providing information on network
5956interfaces in an easy and portable manner.")
5957 (license license:expat)))
5958
5959(define-public python2-netifaces
5960 (package-with-python2 python-netifaces))
5961
5962(define-public python-networkx
5963 (package
5964 (name "python-networkx")
5965 (version "2.2")
5966 (source
5967 (origin
5968 (method url-fetch)
5969 (uri (pypi-uri "networkx" version ".zip"))
5970 (sha256
5971 (base32 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
5972 (build-system python-build-system)
5973 ;; python-decorator is needed at runtime.
5974 (propagated-inputs
5975 `(("python-decorator" ,python-decorator)))
5976 (native-inputs
5977 `(("python-nose" ,python-nose)
5978 ("unzip" ,unzip)))
5979 (home-page "https://networkx.github.io/")
5980 (synopsis "Python module for creating and manipulating graphs and networks")
5981 (description
5982 "NetworkX is a Python package for the creation, manipulation, and study
5983of the structure, dynamics, and functions of complex networks.")
5984 (license license:bsd-3)))
5985
5986(define-public python2-networkx
5987 (package-with-python2 python-networkx))
5988
5989(define-public python-datrie
5990 (package
5991 (name "python-datrie")
0b58cb42 5992 (version "0.8")
44d10b1f
RW
5993 (source
5994 (origin
5995 (method url-fetch)
5996 (uri (pypi-uri "datrie" version))
5997 (sha256
5998 (base32
0b58cb42 5999 "0338r8xgmpy78556jhms0h6qkvyjr10p8bpgdvcpqzm9lrmxmmdx"))))
44d10b1f 6000 (build-system python-build-system)
44d10b1f
RW
6001 (native-inputs
6002 `(("python-cython" ,python-cython)
6003 ("python-hypothesis" ,python-hypothesis)
6004 ("python-pytest" ,python-pytest)
6005 ("python-pytest-runner" ,python-pytest-runner)))
6006 (home-page "https://github.com/kmike/datrie")
6007 (synopsis "Fast, efficiently stored trie for Python")
6008 (description
6009 "This package provides a fast, efficiently stored trie implementation for
6010Python.")
6011 (license license:lgpl2.1+)))
6012
6013(define-public snakemake
6014 (package
6015 (name "snakemake")
93803c6b 6016 (version "5.7.1")
44d10b1f
RW
6017 (source
6018 (origin
6019 (method url-fetch)
6020 (uri (pypi-uri "snakemake" version))
6021 (sha256
93803c6b 6022 (base32 "1pnpvvn8n2a78cg360wz3ldmpqrsm2wzi0c0dmvki9fnsw6fxdas"))))
44d10b1f
RW
6023 (build-system python-build-system)
6024 (arguments
6025 ;; TODO: Package missing test dependencies.
6026 '(#:tests? #f
6027 #:phases
6028 (modify-phases %standard-phases
6029 ;; For cluster execution Snakemake will call Python. Since there is
6030 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
6031 ;; this by calling the snakemake wrapper instead.
6032 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
6033 (lambda* (#:key outputs #:allow-other-keys)
6034 (substitute* "snakemake/executors.py"
6035 (("\\{sys.executable\\} -m snakemake")
6036 (string-append (assoc-ref outputs "out")
6037 "/bin/snakemake")))
6038 #t)))))
6039 (propagated-inputs
8994ae34 6040 `(("python-appdirs" ,python-appdirs)
44d10b1f
RW
6041 ("python-configargparse" ,python-configargparse)
6042 ("python-datrie" ,python-datrie)
6043 ("python-docutils" ,python-docutils)
8994ae34 6044 ("python-gitpython" ,python-gitpython)
44d10b1f
RW
6045 ("python-jinja2" ,python-jinja2)
6046 ("python-jsonschema" ,python-jsonschema)
6047 ("python-networkx" ,python-networkx)
93803c6b 6048 ("python-psutil" ,python-psutil)
44d10b1f 6049 ("python-pyyaml" ,python-pyyaml)
8994ae34
TGR
6050 ("python-ratelimiter" ,python-ratelimiter)
6051 ("python-requests" ,python-requests)
6052 ("python-wrapt" ,python-wrapt)))
44d10b1f
RW
6053 (home-page "https://snakemake.readthedocs.io")
6054 (synopsis "Python-based execution environment for make-like workflows")
6055 (description
6056 "Snakemake aims to reduce the complexity of creating workflows by
6057providing a clean and modern domain specific specification language (DSL) in
6058Python style, together with a fast and comfortable execution environment.")
6059 (license license:expat)))
6060
44d10b1f
RW
6061(define-public python-pyqrcode
6062 (package
6063 (name "python-pyqrcode")
6064 (version "1.2.1")
6065 (source
6066 (origin
6067 (method url-fetch)
6068 (uri (pypi-uri "PyQRCode" version))
6069 (sha256
6070 (base32
6071 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
6072 (build-system python-build-system)
6073 (home-page
6074 "https://github.com/mnooner256/pyqrcode")
6075 (synopsis "QR code generator")
6076 (description
6077 "Pyqrcode is a QR code generator written purely in Python with
6078SVG, EPS, PNG and terminal output.")
6079 (license license:bsd-3)))
6080
6081(define-public python-seaborn
6082 (package
6083 (name "python-seaborn")
6084 (version "0.9.0")
6085 (source
6086 (origin
6087 (method url-fetch)
6088 (uri (pypi-uri "seaborn" version))
6089 (sha256
f9bd82e7
RW
6090 (base32 "0bqysi3fxfjl1866m5jq8z7mynhqbqnikim74dmzn8539iwkzj3n"))
6091 (patches
6092 (list (origin
6093 (method url-fetch)
6094 ;; This has already been merged, but there is no new
6095 ;; release including this patch. It fixes problems
6096 ;; with axis rotation that would lead to test
6097 ;; failures.
6098 (uri "https://patch-diff.githubusercontent.com/raw/mwaskom/seaborn/pull/1716.diff")
6099 (sha256
6100 (base32
6101 "1lm870z316n9ivsyr86hpk1gxaraw0mrjvq42lqsm0znhjdp9q9w"))
6102 (file-name "seaborn-0.9.0-axis-rotation.patch"))))))
44d10b1f
RW
6103 (build-system python-build-system)
6104 (arguments
6105 `(#:phases
6106 (modify-phases %standard-phases
6107 (add-before 'check 'start-xserver
6108 (lambda* (#:key inputs #:allow-other-keys)
6109 (let ((xorg-server (assoc-ref inputs "xorg-server")))
6110 ;; There must be a running X server and make check doesn't
6111 ;; start one. Therefore we must do it.
6112 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
6113 (setenv "DISPLAY" ":1")
6114 #t)))
a1322765
RW
6115 (add-after 'unpack 'fix-tests
6116 (lambda _
6117 ;; test_cbar_ticks fails probably because of matplotlib's
6118 ;; expectation of using an older version of FreeType.
6119 (delete-file "seaborn/tests/test_matrix.py")
6120 #t))
44d10b1f
RW
6121 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
6122 (propagated-inputs
6123 `(("python-pandas" ,python-pandas)
6124 ("python-matplotlib" ,python-matplotlib)
6125 ("python-numpy" ,python-numpy)
6126 ("python-scipy" ,python-scipy)))
6127 (native-inputs
6128 `(("python-pytest" ,python-pytest)
ff337525 6129 ("xorg-server" ,xorg-server-for-tests)))
44d10b1f
RW
6130 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
6131 (synopsis "Statistical data visualization")
6132 (description
6133 "Seaborn is a library for making attractive and informative statistical
6134graphics in Python. It is built on top of matplotlib and tightly integrated
6135with the PyData stack, including support for numpy and pandas data structures
6136and statistical routines from scipy and statsmodels.")
6137 (license license:bsd-3)))
6138
6139(define-public python2-seaborn
6140 (package-with-python2 python-seaborn))
6141
6142(define-public python-mpmath
6143 (package
6144 (name "python-mpmath")
6145 (version "0.19")
6146 (source (origin
6147 (method url-fetch)
6148 (uri (string-append "http://mpmath.org/files/mpmath-"
6149 version ".tar.gz"))
6150 (sha256
6151 (base32
6152 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
6153 (build-system python-build-system)
6154 (arguments
6155 '(#:phases
6156 (modify-phases %standard-phases
6157 (replace 'check
6158 (lambda _
5d7a6f1c 6159 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
44d10b1f
RW
6160 (home-page "http://mpmath.org")
6161 (synopsis "Arbitrary-precision floating-point arithmetic in python")
6162 (description
6163 "@code{mpmath} can be used as an arbitrary-precision substitute for
6164Python's float/complex types and math/cmath modules, but also does much
6165more advanced mathematics.")
6166 (license license:bsd-3)))
6167
6168(define-public python2-mpmath
6169 (package-with-python2 python-mpmath))
6170
6171(define-public python-bigfloat
6172 (package
6173 (name "python-bigfloat")
6174 (version "0.3.0")
6175 (source
6176 (origin
6177 (method url-fetch)
6178 (uri (pypi-uri "bigfloat" version))
6179 (sha256
6180 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
6181 (build-system python-build-system)
6182 (inputs
6183 `(("mpfr" ,mpfr)))
6184 (home-page "https://github.com/mdickinson/bigfloat")
6185 (synopsis "Arbitrary precision floating-point arithmetic for Python")
6186 (description
e36de31b 6187 "This package provides a Python interface to the MPFR library for
44d10b1f
RW
6188multiprecision arithmetic.")
6189 (license license:lgpl3+)))
6190
6191(define-public python2-bigfloat
6192 (package-with-python2 python-bigfloat))
6193
6194(define-public python-sympy
6195 (package
6196 (name "python-sympy")
6197 (version "1.1.1")
6198 (source
6199 (origin
6200 (method url-fetch)
6201 (uri (string-append
6202 "https://github.com/sympy/sympy/releases/download/sympy-"
6203 version "/sympy-" version ".tar.gz"))
6204 (sha256
6205 (base32 "190n29sppw7g8ihilc5451y7jlfcaw56crqiqbf1jff43dlmfnxc"))))
6206 (build-system python-build-system)
6207 (arguments
6208 `(#:phases
6209 (modify-phases %standard-phases
6210 ;; Run the core tests after installation. By default it would run
6211 ;; *all* tests, which take a very long time to complete and are known
6212 ;; to be flaky.
6213 (delete 'check)
6214 (add-after 'install 'check
6215 (lambda* (#:key outputs #:allow-other-keys)
6216 (invoke "python3" "-c" "import sympy; sympy.test(\"/core\")")
6217 #t)))))
6218 (propagated-inputs
6219 `(("python-mpmath" ,python-mpmath)))
6220 (home-page "http://www.sympy.org/")
6221 (synopsis "Python library for symbolic mathematics")
6222 (description
6223 "SymPy is a Python library for symbolic mathematics. It aims to become a
6224full-featured computer algebra system (CAS) while keeping the code as simple
6225as possible in order to be comprehensible and easily extensible.")
6226 (license license:bsd-3)))
6227
6228(define-public python2-sympy
6229 (package
6230 (inherit (package-with-python2 python-sympy))
6231 (arguments
6232 `(#:phases
6233 (modify-phases %standard-phases
6234 ;; Run the core tests after installation. By default it would run
6235 ;; *all* tests, which take a very long time to complete and are known
6236 ;; to be flaky.
6237 (delete 'check)
6238 (add-after 'install 'check
6239 (lambda* (#:key outputs #:allow-other-keys)
6240 (invoke "python" "-c" "import sympy; sympy.test(\"/core\")")
6241 #t)))))))
6242
6243(define-public python-q
6244 (package
6245 (name "python-q")
6246 (version "2.6")
6247 (source
6248 (origin
6249 (method url-fetch)
6250 (uri (pypi-uri "q" version))
6251 (sha256
6252 (base32
6253 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
6254 (build-system python-build-system)
6255 (home-page "https://github.com/zestyping/q")
6256 (synopsis "Quick-and-dirty debugging output for tired programmers")
6257 (description
6258 "q is a Python module for \"print\" style of debugging Python code. It
6259provides convenient short API for print out of values, tracebacks, and
6260falling into the Python interpreter.")
6261 (license license:asl2.0)))
6262
6263(define-public python2-q
6264 (package-with-python2 python-q))
6265
6266(define-public python2-xlib
6267 (package
6268 (name "python2-xlib")
6269 (version "0.14")
6270 (source (origin
6271 (method url-fetch)
6272 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
6273 "/" version "/"
6274 "python-xlib-" version ".tar.gz"))
6275 (sha256
6276 (base32
6277 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
6278 (build-system python-build-system)
6279 (arguments
6280 `(#:python ,python-2 ;Python 2 only
6281 #:tests? #f)) ;no tests
6282 (home-page "http://python-xlib.sourceforge.net/")
6283 (synopsis "Python X11 client library")
6284 (description
6285 "The Python X Library is intended to be a fully functional X client
6286library for Python programs. It is useful to implement low-level X clients.
6287It is written entirely in Python.")
6288 (license license:gpl2+)))
6289
6290(define-public python-singledispatch
6291 (package
6292 (name "python-singledispatch")
6293 (version "3.4.0.3")
6294 (source
6295 (origin
6296 (method url-fetch)
6297 (uri (pypi-uri "singledispatch" version))
6298 (sha256
6299 (base32
6300 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
6301 (build-system python-build-system)
6302 (native-inputs
6303 `(("python-six" ,python-six))) ; required for conversion, not at run-time
6304 (home-page
6305 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
6306 (synopsis "Backport of singledispatch feature from Python 3.4")
6307 (description
6308 "This library brings functools.singledispatch from Python 3.4 to Python
63092.6-3.3.")
6310 (license license:expat)))
6311
6312(define-public python2-singledispatch
6313 (package-with-python2 python-singledispatch))
6314
6315;; the python- version can be removed with python-3.5
6316(define-public python-backports-abc
6317 (package
6318 (name "python-backports-abc")
6319 (version "0.5")
6320 (source
6321 (origin
6322 (method url-fetch)
6323 (uri (pypi-uri "backports_abc" version))
6324 (sha256
6325 (base32
6326 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
6327 (build-system python-build-system)
6328 (home-page "https://github.com/cython/backports_abc")
6329 (synopsis "Backport of additions to the 'collections.abc' module")
6330 (description
6331 "Python-backports-abc provides a backport of additions to the
36a4366d 6332@code{collections.abc} module in Python-3.5.")
44d10b1f
RW
6333 (license license:psfl)))
6334
6335(define-public python2-backports-abc
6336 (package-with-python2 python-backports-abc))
6337
6338(define-public python-backports-csv
6339 (package
6340 (name "python-backports-csv")
6341 (version "1.0.5")
6342 (source
6343 (origin
6344 (method url-fetch)
6345 (uri (pypi-uri "backports.csv" version))
6346 (sha256
6347 (base32
6348 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
6349 (build-system python-build-system)
6350 (home-page "https://github.com/ryanhiebert/backports.csv")
6351 (synopsis "Backport of Python 3's csv module for Python 2")
6352 (description
6353 "Provides a backport of Python 3's @code{csv} module for parsing
6354comma separated values. The API of the @code{csv} module in Python 2
6355is drastically different from the @code{csv} module in Python 3.
6356This is due, for the most part, to the difference between str in
6357Python 2 and Python 3.")
6358 (license license:psfl)))
6359
6360(define-public python2-backports-csv
6361 (package-with-python2 python-backports-csv))
6362
6363(define-public python2-backports-shutil-get-terminal-size
6364 (package
6365 (name "python2-backports-shutil-get-terminal-size")
6366 (version "1.0.0")
6367 (source
6368 (origin
6369 (method url-fetch)
6370 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
6371 (sha256
6372 (base32
6373 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
6374 (build-system python-build-system)
6375 (arguments
6376 `(#:python ,python-2
6377 #:phases
6378 (modify-phases %standard-phases
6379 (replace 'check
6380 (lambda _
4a4a7d9a 6381 (invoke "py.test" "-v"))))))
44d10b1f
RW
6382 (native-inputs
6383 `(("python2-pytest" ,python2-pytest)))
6384 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
6385 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
6386 (description
6387 "This package provides a backport of the @code{get_terminal_size
6388function} from Python 3.3's @code{shutil}.
6389Unlike the original version it is written in pure Python rather than C,
6390so it might be a tiny bit slower.")
6391 (license license:expat)))
6392
6393(define-public python-waf
6394 (package
6395 (name "python-waf")
6c2c11fa 6396 (version "2.0.19")
44d10b1f
RW
6397 (source (origin
6398 (method url-fetch)
6399 (uri (string-append "https://waf.io/"
6400 "waf-" version ".tar.bz2"))
6401 (sha256
6402 (base32
6c2c11fa 6403 "19dvqbsvxz7ch03dh1v0znklrwxlz6yzddc3k9smzrrgny4jch6q"))))
44d10b1f
RW
6404 (build-system python-build-system)
6405 (arguments
6406 '(#:phases
6407 (modify-phases %standard-phases
6408 (replace 'build
6409 (lambda _
633c8b71
MO
6410 ;; XXX: Find a way to add all extra tools.
6411 (let ((tools '("gccdeps"
6412 "clang_compilation_database")))
6413 (invoke "python" "waf-light" "configure" "build"
6414 (string-append "--tools="
6415 (string-join tools ","))))))
44d10b1f
RW
6416 (replace 'check
6417 (lambda _
6418 (invoke "python" "waf" "--version")))
6419 (replace 'install
6420 (lambda* (#:key outputs #:allow-other-keys)
6421 (let ((out (assoc-ref outputs "out")))
6422 (install-file "waf" (string-append out "/bin")))
6423 #t))
6424 ;; waf breaks when it is wrapped.
6425 (delete 'wrap))))
6426 (home-page "https://waf.io/")
6427 (synopsis "Python-based build system")
6428 (description
6429 "Waf is a Python-based framework for configuring, compiling and installing
6430applications.")
6431 (license license:bsd-3)))
6432
6433(define-public python2-waf
6434 (package-with-python2 python-waf))
6435
6436(define-public python-pyzmq
6437 (package
6438 (name "python-pyzmq")
6439 (version "17.1.2")
6440 (source
6441 (origin
6442 (method url-fetch)
6443 (uri (pypi-uri "pyzmq" version))
6444 (sha256
6445 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
6446 (build-system python-build-system)
6447 (arguments
6448 `(#:configure-flags
6449 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
6450 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
6451 ;; --inplace' for 'python setup.py test' to work.
6452 #:tests? #f))
6453 (inputs
6454 `(("zeromq" ,zeromq)))
6455 (native-inputs
6456 `(("pkg-config" ,pkg-config)
6457 ("python-nose" ,python-nose)))
6458 (home-page "https://github.com/zeromq/pyzmq")
6459 (synopsis "Python bindings for 0MQ")
6460 (description
6461 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
6462 (license license:bsd-4)))
6463
6464(define-public python2-pyzmq
6465 (package-with-python2 python-pyzmq))
6466
6467(define-public python-pep8
6468 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
6469 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
6470 ;; some dependents' test suites, and nothing more.
6471 (package
6472 (name "python-pep8")
6473 (version "1.7.0")
6474 (source
6475 (origin
6476 (method url-fetch)
6477 (uri (pypi-uri "pep8" version))
6478 (sha256
6479 (base32
2be878d8
CB
6480 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))
6481 (patches (search-patches "python-pep8-stdlib-tokenize-compat.patch"))))
44d10b1f
RW
6482 (build-system python-build-system)
6483 (home-page "https://pep8.readthedocs.org/")
6484 (synopsis "Python style guide checker")
6485 (description
6486 "This tools checks Python code against some of the style conventions in
6487PEP 8.")
6488 (license license:expat)))
6489
6490(define-public python2-pep8
6491 (package-with-python2 python-pep8))
6492
6493(define-public python-pyflakes
6494 (package
6495 (name "python-pyflakes")
d0cba11b 6496 (version "2.1.1")
44d10b1f
RW
6497 (source
6498 (origin
6499 (method url-fetch)
6500 (uri (pypi-uri "pyflakes" version))
6501 (sha256
6502 (base32
d0cba11b 6503 "18pq95a1xj2dgdd0m85gyfsn40jajj4xc3lp8wfv7igqhrc86xnr"))))
44d10b1f
RW
6504 (build-system python-build-system)
6505 (home-page
6506 "https://github.com/pyflakes/pyflakes")
6507 (synopsis "Passive checker of Python programs")
6508 (description
6509 "Pyflakes statically checks Python source code for common errors.")
6510 (license license:expat)))
6511
6512(define-public python2-pyflakes
6513 (package-with-python2 python-pyflakes))
6514
6515(define-public python-mccabe
6516 (package
6517 (name "python-mccabe")
6518 (version "0.6.1")
6519 (source
6520 (origin
6521 (method url-fetch)
6522 (uri (pypi-uri "mccabe" version))
6523 (sha256
6524 (base32
6525 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
6526 (build-system python-build-system)
6527 (native-inputs
6528 `(("python-pytest" ,python-pytest-bootstrap)
6529 ("python-pytest-runner" ,python-pytest-runner)))
6530 (home-page "https://github.com/flintwork/mccabe")
6531 (synopsis "McCabe checker, plugin for flake8")
6532 (description
6533 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
6534complexity of Python source code.")
6535 (license license:expat)))
6536
6537(define-public python2-mccabe
6538 (package-with-python2 python-mccabe))
6539
6540(define-public python-mccabe-0.2.1
6541 (package (inherit python-mccabe)
6542 (version "0.2.1")
6543 (source
6544 (origin
6545 (method url-fetch)
6546 (uri (pypi-uri "mccabe" version))
6547 (sha256
6548 (base32
6549 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
6550
6551(define-public python2-mccabe-0.2.1
6552 (package-with-python2 python-mccabe-0.2.1))
6553
6554;; Flake8 2.4.1 requires an older version of pep8.
6555;; This should be removed ASAP.
6556(define-public python-pep8-1.5.7
6557 (package (inherit python-pep8)
6558 (version "1.5.7")
6559 (source
f3576970
RW
6560 (origin
6561 (method url-fetch)
6562 (uri (pypi-uri "pep8" version))
6563 (sha256
6564 (base32
6565 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
44d10b1f
RW
6566 (arguments
6567 ;; XXX Tests not compatible with Python 3.5.
6568 '(#:tests? #f))))
6569
6570(define-public python2-pep8-1.5.7
6571 (package-with-python2 python-pep8-1.5.7))
6572
6573;; Flake8 2.4.1 requires an older version of pyflakes.
6574;; This should be removed ASAP.
6575(define-public python-pyflakes-0.8.1
6576 (package (inherit python-pyflakes)
6577 (version "0.8.1")
6578 (source
8c4dffb5
RW
6579 (origin
6580 (method url-fetch)
6581 (uri (pypi-uri "pyflakes" version))
6582 (sha256
6583 (base32
6584 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
44d10b1f
RW
6585 (arguments
6586 ;; XXX Tests not compatible with Python 3.5.
6587 '(#:tests? #f))))
6588
6589(define-public python2-pyflakes-0.8.1
6590 (package-with-python2 python-pyflakes-0.8.1))
6591
ac63cf0a 6592(define-public python-flake8
44d10b1f
RW
6593 (package
6594 (name "python-flake8")
beaff4a8 6595 (version "3.7.7")
ac63cf0a
MB
6596 (source (origin
6597 (method url-fetch)
6598 (uri (pypi-uri "flake8" version))
6599 (sha256
6600 (base32
beaff4a8 6601 "0qg6zggqigrd4k3gv88shd1a27d0cwgfql8vfiq2c7rl7w3rd6c5"))))
44d10b1f
RW
6602 (build-system python-build-system)
6603 (arguments
6604 `(#:phases
6605 (modify-phases %standard-phases
44d10b1f
RW
6606 (delete 'check)
6607 (add-after 'install 'check
6608 (lambda* (#:key inputs outputs #:allow-other-keys)
6609 (add-installed-pythonpath inputs outputs)
6610 (invoke "pytest" "-v")
6611 #t)))))
6612 (propagated-inputs
6613 `(("python-pycodestyle" ,python-pycodestyle)
beaff4a8 6614 ("python-entrypoints" ,python-entrypoints)
44d10b1f
RW
6615 ("python-pyflakes" ,python-pyflakes)
6616 ("python-mccabe" ,python-mccabe)))
6617 (native-inputs
6618 `(("python-mock" ,python-mock)
6619 ("python-pytest" ,python-pytest-bootstrap)
6620 ("python-pytest-runner" ,python-pytest-runner)))
6621 (home-page "https://gitlab.com/pycqa/flake8")
6622 (synopsis
6623 "The modular source code checker: pep8, pyflakes and co")
6624 (description
6625 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
ac63cf0a 6626 (properties `((python2-variant . ,(delay python2-flake8))))
44d10b1f
RW
6627 (license license:expat)))
6628
ac63cf0a
MB
6629(define-public python2-flake8
6630 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
44d10b1f
RW
6631 (package (inherit base)
6632 (propagated-inputs
6633 `(("python2-configparser" ,python2-configparser)
6634 ("python2-enum34" ,python2-enum34)
beaff4a8 6635 ("python2-typing" ,python2-typing)
44d10b1f
RW
6636 ,@(package-propagated-inputs base))))))
6637
44d10b1f
RW
6638;; python-hacking requires flake8 <2.6.0.
6639(define-public python-flake8-2.5
6640 (package
6641 (inherit python-flake8)
6642 (version "2.5.5")
6643 (source (origin
6644 (method url-fetch)
6645 (uri (pypi-uri "flake8" version))
6646 (sha256
6647 (base32
6648 "1snylqwbmrylbx3r1wpz8ggk98f6bcag4441ag8mm2l7wyn58sij"))))
6649 (propagated-inputs
6650 `(("python-pep8" ,python-pep8)
6651 ,@(package-propagated-inputs python-flake8)))
6652 (properties `((python2-variant . ,(delay python2-flake8-2.5))))))
6653
6654(define-public python2-flake8-2.5
6655 (package
6656 (inherit python2-flake8)
6657 (version (package-version python-flake8-2.5))
6658 (source (origin
6659 (inherit (package-source python-flake8-2.5))))
6660 (propagated-inputs
6661 `(("python2-pep8" ,python2-pep8)
6662 ,@(package-propagated-inputs python2-flake8)))))
6663
6664(define-public python-flake8-polyfill
6665 (package
6666 (name "python-flake8-polyfill")
6667 (version "1.0.2")
6668 (source
6669 (origin
6670 (method url-fetch)
6671 (uri (pypi-uri "flake8-polyfill" version))
6672 (sha256
6673 (base32
6674 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
6675 (build-system python-build-system)
6676 (arguments
6677 '(#:phases
6678 (modify-phases %standard-phases
6679 (replace 'check
6680 (lambda _
40a7153d
MB
6681 ;; Be compatible with Pytest 4:
6682 ;; https://gitlab.com/pycqa/flake8-polyfill/merge_requests/7
6683 (substitute* "setup.cfg"
6684 (("\\[pytest\\]")
6685 "[tool:pytest]"))
6686
44d10b1f
RW
6687 (setenv "PYTHONPATH"
6688 (string-append (getcwd) "/build/lib:"
6689 (getenv "PYTHONPATH")))
4f0a0894 6690 (invoke "py.test" "-v"))))))
44d10b1f
RW
6691 (native-inputs
6692 `(("python-flake8" ,python-flake8)
6693 ("python-mock" ,python-mock)
6694 ("python-pep8" ,python-pep8)
6695 ("python-pycodestyle" ,python-pycodestyle)
6696 ("python-pytest" ,python-pytest)))
6697 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
6698 (synopsis "Polyfill package for Flake8 plugins")
6699 (description
6700 "This package that provides some compatibility helpers for Flake8
6701plugins that intend to support Flake8 2.x and 3.x simultaneously.")
6702 (license license:expat)))
6703
6704(define-public python2-flake8-polyfill
6705 (package-with-python2 python-flake8-polyfill))
6706
6707(define-public python-mistune
6708 (package
6709 (name "python-mistune")
6710 (version "0.8.4")
6711 (source
6712 (origin
6713 (method url-fetch)
6714 (uri (pypi-uri "mistune" version))
6715 (sha256
6716 (base32
6717 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
6718 (build-system python-build-system)
6719 (native-inputs
6720 `(("python-nose" ,python-nose)
6721 ("python-cython" ,python-cython)))
6722 (home-page "https://github.com/lepture/mistune")
6723 (synopsis "Markdown parser in pure Python")
6724 (description "This package provides a fast markdown parser in pure
6725Python.")
6726 (license license:bsd-3)))
6727
6728(define-public python2-mistune
6729 (package-with-python2 python-mistune))
6730
6731(define-public python-markdown
6732 (package
6733 (name "python-markdown")
ceb1936a 6734 (version "3.1.1")
44d10b1f
RW
6735 (source
6736 (origin
6737 (method url-fetch)
6738 (uri (pypi-uri "Markdown" version))
6739 (sha256
6740 (base32
ceb1936a 6741 "0yhylk4ffqqs7x086fav4pnfsl1021v7lghznzkififprmmqfl1f"))))
44d10b1f
RW
6742 (build-system python-build-system)
6743 (native-inputs
6744 `(("python-nose" ,python-nose)
6745 ("python-pyyaml" ,python-pyyaml)))
6746 (home-page "https://python-markdown.github.io/")
6747 (synopsis "Python implementation of Markdown")
6748 (description
6749 "This package provides a Python implementation of John Gruber's
6750Markdown. The library features international input, various Markdown
6751extensions, and several HTML output formats. A command line wrapper
6752markdown_py is also provided to convert Markdown files to HTML.")
6753 (license license:bsd-3)))
6754
6755(define-public python2-markdown
6756 (package-with-python2 python-markdown))
6757
6758(define-public python-ptyprocess
6759 (package
6760 (name "python-ptyprocess")
6761 (version "0.5.2")
6762 (source
6763 (origin
6764 (method url-fetch)
6765 (uri (pypi-uri "ptyprocess" version))
6766 (sha256
6767 (base32
6768 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
6769 (build-system python-build-system)
6770 (native-inputs
6771 `(("python-nose" ,python-nose)))
6772 (arguments
6773 `(#:phases
6774 (modify-phases %standard-phases
6775 (replace 'check
7904d6fa 6776 (lambda _ (invoke "nosetests"))))))
44d10b1f
RW
6777 (home-page "https://github.com/pexpect/ptyprocess")
6778 (synopsis "Run a subprocess in a pseudo terminal")
6779 (description
6780 "This package provides a Python library used to launch a subprocess in a
6781pseudo terminal (pty), and interact with both the process and its pty.")
6782 (license license:isc)))
6783
6784(define-public python2-ptyprocess
6785 (package-with-python2 python-ptyprocess))
6786
6787(define-public python-cram
6788 (package
6789 (name "python-cram")
6790 (version "0.7")
6791 (home-page "https://bitheap.org/cram/")
6792 (source (origin
6793 (method url-fetch)
6794 (uri (list (string-append home-page "cram-"
6795 version ".tar.gz")
6796 (pypi-uri "cram" version)))
6797 (sha256
6798 (base32
6799 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
6800 (arguments
6801 '(#:phases
6802 (modify-phases %standard-phases
6803 (add-after 'unpack 'patch-source
6804 (lambda _
6805 (substitute* (find-files "cram" ".*\\.py$")
6806 ;; Replace default shell path.
6807 (("/bin/sh") (which "sh")))
6808 (substitute* (find-files "tests" ".*\\.t$")
6809 (("md5") "md5sum")
6810 (("/bin/bash") (which "bash"))
6811 (("/bin/sh") (which "sh")))
6812 (substitute* "cram/_test.py"
6813 ;; This hack works around a bug triggered by substituting
6814 ;; the /bin/sh paths. "tests/usage.t" compares the output of
6815 ;; "cram -h", which breaks the output at 80 characters. This
6816 ;; causes the line showing the default shell to break into two
6817 ;; lines, but the test expects a single line...
6818 (("env\\['COLUMNS'\\] = '80'")
6819 "env['COLUMNS'] = '160'"))
ff1e80d7
MB
6820
6821 (substitute* "Makefile"
6822 ;; Recent versions of python-coverage have caused the test
6823 ;; coverage to decrease (as of version 0.7). Allow that.
6824 (("--fail-under=100")
6825 "--fail-under=90"))
6826
44d10b1f 6827 #t))
ff1e80d7 6828 (replace 'check
44d10b1f 6829 ;; The test phase uses the built library and executable.
44d10b1f
RW
6830 (lambda* (#:key inputs outputs #:allow-other-keys)
6831 (add-installed-pythonpath inputs outputs)
6832 (setenv "PATH" (string-append (getenv "PATH") ":"
6833 (assoc-ref outputs "out") "/bin"))
2d7db192 6834 (invoke "make" "test"))))))
44d10b1f
RW
6835 (build-system python-build-system)
6836 (native-inputs
6837 `(("python-coverage" ,python-coverage)
6838 ("which" ,which)))
6839 (synopsis "Simple testing framework for command line applications")
6840 (description
6841 "Cram is a functional testing framework for command line applications.
6842Cram tests look like snippets of interactive shell sessions. Cram runs each
6843command and compares the command output in the test with the command’s actual
6844output.")
6845 (license license:gpl2+)))
6846
6847(define-public python2-cram
6848 (package-with-python2 python-cram))
6849
6850(define-public python-straight-plugin
6851 (package
6852 (name "python-straight-plugin")
6853 (version "1.4.1")
6854 (source
6855 (origin
6856 (method url-fetch)
6857 (uri (pypi-uri "straight.plugin" version))
6858 (sha256
6859 (base32
6860 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
6861 (build-system python-build-system)
6862 (home-page "https://github.com/ironfroggy/straight.plugin")
6863 (synopsis "Simple namespaced plugin facility")
6864 (description "Straight Plugin provides a type of plugin you can create from
6865almost any existing Python modules, and an easy way for outside developers to
6866add functionality and customization to your projects with their own plugins.")
6867 (license license:expat)))
6868
6869(define-public python2-straight-plugin
6870 (package-with-python2 python-straight-plugin))
6871
6872(define-public python-fonttools
6873 (package
6874 (name "python-fonttools")
1a4bb420 6875 (version "3.38.0")
44d10b1f
RW
6876 (source (origin
6877 (method url-fetch)
6878 (uri (pypi-uri "fonttools" version ".zip"))
6879 (sha256
6880 (base32
1a4bb420 6881 "12ripk3s7skgxr1bs9r8n13r94ym3s8iir7ivfixls9fa4dabmlh"))))
44d10b1f
RW
6882 (build-system python-build-system)
6883 (native-inputs
6884 `(("unzip" ,unzip)
6885 ("python-pytest" ,python-pytest)
6886 ("python-pytest-runner" ,python-pytest-runner)))
9d25a454 6887 (home-page "https://github.com/fonttools/fonttools")
44d10b1f
RW
6888 (synopsis "Tools to manipulate font files")
6889 (description
6890 "FontTools/TTX is a library to manipulate font files from Python. It
6891supports reading and writing of TrueType/OpenType fonts, reading and writing
6892of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
6893also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
6894from an XML-based format.")
6895 (license license:expat)))
6896
6897(define-public python2-fonttools
6898 (package-with-python2 python-fonttools))
6899
6900(define-public python-ly
6901 (package
6902 (name "python-ly")
6903 (version "0.9.5")
6904 (source
6905 (origin
6906 (method url-fetch)
6907 (uri (pypi-uri name version))
6908 (sha256
6909 (base32
6910 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
6911 (build-system python-build-system)
6912 (arguments
6913 ;; FIXME: Some tests need network access.
6914 '(#:tests? #f))
6915 (synopsis "Tool and library for manipulating LilyPond files")
6916 (description "This package provides a Python library to parse, manipulate
6917or create documents in LilyPond format. A command line program ly is also
6918provided that can be used to do various manipulations with LilyPond files.")
6919 (home-page "https://pypi.python.org/pypi/python-ly")
6920 (license license:gpl2+)))
6921
6922(define-public python-appdirs
6923 (package
6924 (name "python-appdirs")
6925 (version "1.4.3")
6926 (source
6927 (origin
6928 (method url-fetch)
6929 (uri (pypi-uri "appdirs" version))
6930 (sha256
6931 (base32
6932 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
6933 (build-system python-build-system)
6934 (home-page "https://github.com/ActiveState/appdirs")
6935 (synopsis
6936 "Determine platform-specific dirs, e.g. a \"user data dir\"")
6937 (description
6938 "This module provides a portable way of finding out where user data
6939should be stored on various operating systems.")
6940 (license license:expat)))
6941
6942(define-public python2-appdirs
6943 (package-with-python2 python-appdirs))
6944
6945(define-public python-llfuse
6946 (package
6947 (name "python-llfuse")
6948 (version "1.3.5")
6949 (source (origin
6950 (method url-fetch)
6951 (uri (pypi-uri "llfuse" version ".tar.bz2"))
6952 (sha256
6953 (base32
6954 "1n7a90jww3ly49fm7x27m3xw3la3qfrnykcakga654g6kcyjlhbf"))))
6955 (build-system python-build-system)
6956 (inputs
6957 `(("fuse" ,fuse)
6958 ("attr" ,attr)))
6959 (native-inputs
6960 `(("pkg-config" ,pkg-config)))
6961 (synopsis "Python bindings for FUSE")
6962 (description
6963 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
6964 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
6965 (license license:lgpl2.0+)
6966 (properties `((python2-variant . ,(delay python2-llfuse))))))
6967
6968(define-public python2-llfuse
6969 (package (inherit (package-with-python2
6970 (strip-python2-variant python-llfuse)))
6971 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
6972
6973;; For attic-0.16
6974(define-public python-llfuse-0.41
6975 (package (inherit python-llfuse)
6976 (version "0.41.1")
6977 (source (origin
6978 (method url-fetch)
6979 (uri (string-append
6980 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6981 "llfuse-" version ".tar.bz2"))
6982 (sha256
6983 (base32
6984 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
6985 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
6986 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
6987 (license (list license:expat license:lgpl2.0+))))
6988
6989(define-public python-msgpack
6990 (package
6991 (name "python-msgpack")
6992 (version "0.5.6")
6993 (source (origin
6994 (method url-fetch)
6995 (uri (pypi-uri "msgpack" version))
6996 (sha256
6997 (base32
6998 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
6999 (build-system python-build-system)
7000 (arguments
7001 `(#:modules ((guix build utils)
7002 (guix build python-build-system)
7003 (ice-9 ftw)
7004 (srfi srfi-1)
7005 (srfi srfi-26))
7006 #:phases
7007 (modify-phases %standard-phases
7008 (replace 'check
7009 (lambda _
7010 (let ((cwd (getcwd)))
7011 (setenv "PYTHONPATH"
7012 (string-append cwd "/build/"
7013 (find (cut string-prefix? "lib" <>)
7014 (scandir (string-append cwd "/build")))
7015 ":"
7016 (getenv "PYTHONPATH")))
7017 (invoke "pytest" "-v" "test")))))))
7018 (native-inputs
7019 `(("python-pytest" ,python-pytest)))
7020 (synopsis "MessagePack (de)serializer")
7021 (description "MessagePack is a fast, compact binary serialization format,
7022suitable for similar data to JSON. This package provides CPython bindings for
7023reading and writing MessagePack data.")
7024 (home-page "https://pypi.python.org/pypi/msgpack/")
7025 (license license:asl2.0)))
7026
7027;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
7028;; release 0.5. Some packages like borg still call it by the old name for now.
7029;; <https://bugs.gnu.org/30662>
7030(define-public python-msgpack-transitional
7031 (package
7032 (inherit python-msgpack)
7033 (name "python-msgpack-transitional")
7034 (arguments
7035 (substitute-keyword-arguments (package-arguments python-msgpack)
7036 ((#:phases phases)
7037 `(modify-phases ,phases
7038 (add-after 'unpack 'configure-transitional
7039 (lambda _
7040 ;; Keep using the old name.
7041 (substitute* "setup.py"
7042 (("TRANSITIONAL = False")
7043 "TRANSITIONAL = 1"))
7044 #t))))))))
7045
7046(define-public python2-msgpack
7047 (package-with-python2 python-msgpack))
7048
7049(define-public python-netaddr
7050 (package
7051 (name "python-netaddr")
7052 (version "0.7.19")
7053 (source
7054 (origin
7055 (method url-fetch)
7056 (uri (pypi-uri "netaddr" version))
7057 (sha256
7058 (base32
7059 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
7060 (build-system python-build-system)
7061 (arguments `(#:tests? #f)) ;; No tests.
7062 (home-page "https://github.com/drkjam/netaddr/")
7063 (synopsis "Pythonic manipulation of network addresses")
7064 (description
7065 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
7066and MAC network addresses.")
7067 (license license:bsd-3)))
7068
7069(define-public python2-netaddr
7070 (package-with-python2 python-netaddr))
7071
dd85eca0
AG
7072(define-public python2-pyroute2
7073 (package
7074 (name "python2-pyroute2")
7075 (version "0.5.6")
7076 (source
7077 (origin
7078 (method url-fetch)
7079 (uri (pypi-uri "pyroute2" version))
7080 (sha256
7081 (base32
7082 "1gmz4r1w0yzj6fjjypnalmfyy0lnfznydyn62gi3wk50j5hhxbny"))))
7083 (build-system python-build-system)
7084 (arguments
7085 `(#:python ,python-2)) ;Python 3.x is not supported
7086 (home-page "https://github.com/svinota/pyroute2")
7087 (synopsis "Python netlink library")
7088 (description
7089 "Pyroute2 is a pure Python netlink library with minimal dependencies.
7090Supported netlink families and protocols include:
7091@itemize
7092@item rtnl, network settings - addresses, routes, traffic controls
7093@item nfnetlink - netfilter API: ipset, nftables, ...
7094@item ipq - simplest userspace packet filtering, iptables QUEUE target
7095@item devlink - manage and monitor devlink-enabled hardware
7096@item generic - generic netlink families
7097 @itemize
7098 @item nl80211 - wireless functions API (basic support)
7099 @item taskstats - extended process statistics
7100 @item acpi_events - ACPI events monitoring
7101 @item thermal_events - thermal events monitoring
7102 @item VFS_DQUOT - disk quota events monitoring
7103 @end itemize
7104@end itemize")
7105 (license license:gpl2+)))
7106
44d10b1f
RW
7107(define-public python-wrapt
7108 (package
7109 (name "python-wrapt")
2271a1dc 7110 (version "1.11.2")
44d10b1f 7111 (source
2271a1dc
MB
7112 (origin
7113 (method url-fetch)
7114 (uri (pypi-uri "wrapt" version))
7115 (sha256
7116 (base32
7117 "1q81762dgsgrd12f8qc39zk8s5wll3m5xc32jdmlf6cls4gh4njn"))))
44d10b1f
RW
7118 (build-system python-build-system)
7119 (arguments
7120 ;; Tests are not included in the tarball, they are only available in the
7121 ;; git repository.
7122 `(#:tests? #f))
7123 (home-page "https://github.com/GrahamDumpleton/wrapt")
7124 (synopsis "Module for decorators, wrappers and monkey patching")
7125 (description
2271a1dc 7126 "The aim of the wrapt module is to provide a transparent object proxy for
44d10b1f
RW
7127 Python, which can be used as the basis for the construction of function
7128 wrappers and decorator functions.")
7129 (license license:bsd-2)))
7130
7131(define-public python2-wrapt
7132 (package-with-python2 python-wrapt))
7133
7134(define-public python-xlrd
7135 (package
7136 (name "python-xlrd")
3a2b1a3c 7137 (version "1.2.0")
44d10b1f
RW
7138 (source (origin
7139 (method url-fetch)
7140 (uri (pypi-uri "xlrd" version))
7141 (sha256
7142 (base32
3a2b1a3c 7143 "1ci93fda4n67qhdvfl16zasyxrpygzk53hs6m8z0rd4dxrnb6vjl"))))
44d10b1f
RW
7144 (build-system python-build-system)
7145 (arguments
7146 `(#:phases
7147 (modify-phases %standard-phases
3ccdd3a5
MO
7148 ;; Some tests depend on writing a temporary file to the user's home
7149 ;; directory.
3a2b1a3c
GL
7150 (add-after 'unpack 'fix-tests
7151 (lambda _
7152 (delete-file "tests/test_open_workbook.py")
7153 #t)))))
44d10b1f
RW
7154 (home-page "http://www.python-excel.org/")
7155 (synopsis "Library for extracting data from Excel files")
a0909286 7156 (description "This package provides a library to extract data from
44d10b1f
RW
7157spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
7158@samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
7159Unicode-aware. It is not intended as an end-user tool.")
7160 (license license:bsd-3)))
7161
7162(define-public python2-xlrd
7163 (package-with-python2 python-xlrd))
7164
7165(define-public python-prettytable
7166 (package
7167 (name "python-prettytable")
7168 (version "0.7.2")
7169 (source
7170 (origin
7171 (method url-fetch)
337c3a1e 7172 (uri (pypi-uri "prettytable" version ".tar.bz2"))
44d10b1f
RW
7173 (sha256
7174 (base32
7175 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
7176 (build-system python-build-system)
7177 (home-page "http://code.google.com/p/prettytable/")
7178 (synopsis "Display tabular data in an ASCII table format")
7179 (description
7180 "A library designed to represent tabular data in visually appealing ASCII
7181tables. PrettyTable allows for selection of which columns are to be printed,
7182independent alignment of columns (left or right justified or centred) and
7183printing of sub-tables by specifying a row range.")
7184 (license license:bsd-3)))
7185
7186(define-public python2-prettytable
7187 (package-with-python2 python-prettytable))
7188
7189(define-public python-tables
7190 (package
7191 (name "python-tables")
7192 (version "3.4.4")
7193 (source
7194 (origin
7195 (method url-fetch)
7196 (uri (pypi-uri "tables" version))
7197 (sha256
7198 (base32
7199 "0affz7k8babh8wdmsgrz5jxrd569by2w8ffimcxs9wiaf5rw1idx"))
7200 (modules '((guix build utils)))
7201 (snippet
7202 '(begin
7203 ;; Remove pre-compiled .pyc files from source.
7204 (for-each delete-file-recursively
7205 (find-files "." "__pycache__" #:directories? #t))
7206 (for-each delete-file (find-files "." "\\.pyc$"))
7207 #t))))
7208 (build-system python-build-system)
7209 (arguments
7210 `(;; FIXME: python-build-system does not pass configure-flags to "build"
7211 ;; or "check", so we must override the build and check phases.
7212 #:phases
7213 (modify-phases %standard-phases
7214 (add-after 'unpack 'use-gcc
7215 (lambda _
7216 (substitute* "setup.py"
7217 (("compiler = new_compiler\\(\\)" line)
7218 (string-append line
7219 "\ncompiler.set_executables(compiler='gcc',"
7220 "compiler_so='gcc',"
7221 "linker_exe='gcc',"
7222 "linker_so='gcc -shared')")))
7223 #t))
7224 (replace 'build
7225 (lambda* (#:key inputs #:allow-other-keys)
35d79d61
RW
7226 (invoke "python" "setup.py" "build"
7227 (string-append "--hdf5="
7228 (assoc-ref inputs "hdf5")))))
44d10b1f
RW
7229 (replace 'check
7230 (lambda* (#:key inputs #:allow-other-keys)
35d79d61
RW
7231 (invoke "python" "setup.py" "check"
7232 (string-append "--hdf5="
7233 (assoc-ref inputs "hdf5"))))))))
44d10b1f
RW
7234 (propagated-inputs
7235 `(("python-numexpr" ,python-numexpr)
7236 ("python-numpy" ,python-numpy)))
7237 (native-inputs
7238 `(("python-cython" ,python-cython)
7239 ("pkg-config" ,pkg-config)))
7240 (inputs
7241 `(("hdf5" ,hdf5)
7242 ("bzip2" ,bzip2)
7243 ("zlib" ,zlib)))
7244 (home-page "http://www.pytables.org/")
7245 (synopsis "Hierarchical datasets for Python")
7246 (description "PyTables is a package for managing hierarchical datasets and
7247designed to efficiently cope with extremely large amounts of data.")
7248 (license license:bsd-3)))
7249
7250(define-public python2-tables
7251 (package-with-python2 python-tables))
7252
7253(define-public python-pyasn1
7254 (package
7255 (name "python-pyasn1")
7256 (version "0.4.3")
7257 (source
7258 (origin
7259 (method url-fetch)
7260 (uri (pypi-uri "pyasn1" version))
7261 (sha256
7262 (base32
7263 "1z5h38anjzzrxpraa9iq9llffyx2zs8gx0q6dc1g029miwnn50gv"))))
7264 (build-system python-build-system)
7265 (home-page "http://pyasn1.sourceforge.net/")
7266 (synopsis "ASN.1 types and codecs")
7267 (description
7268 "This is an implementation of ASN.1 types and codecs in Python. It is
7269suitable for a wide range of protocols based on the ASN.1 specification.")
7270 (license license:bsd-2)))
7271
7272(define-public python2-pyasn1
7273 (package-with-python2 python-pyasn1))
7274
7275(define-public python-pyasn1-modules
7276 (package
7277 (name "python-pyasn1-modules")
7278 (version "0.2.2")
7279 (source
7280 (origin
7281 (method url-fetch)
7282 (uri (pypi-uri "pyasn1-modules" version))
7283 (sha256
7284 (base32
7285 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
7286 (build-system python-build-system)
7287 (propagated-inputs
7288 `(("python-pyasn1" ,python-pyasn1)))
7289 (home-page "https://sourceforge.net/projects/pyasn1/")
7290 (synopsis "ASN.1 codec implementations")
7291 (description
7292 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
7293implementations of ASN.1-based codecs and protocols.")
7294 (license license:bsd-3)))
7295
7296(define-public python2-pyasn1-modules
7297 (package-with-python2 python-pyasn1-modules))
7298
7299(define-public python-ipaddress
7300 (package
7301 (name "python-ipaddress")
7302 (version "1.0.22")
7303 (source (origin
7304 (method url-fetch)
7305 (uri (pypi-uri "ipaddress" version))
7306 (sha256
7307 (base32
7308 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
7309 (build-system python-build-system)
7310 (home-page "https://github.com/phihag/ipaddress")
7311 (synopsis "IP address manipulation library")
7312 (description
7313 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
7314 in Python. This library is used to create, poke at, and manipulate IPv4 and
7315 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
7316 module to older versions of Python.")
7317 (license license:psfl)))
7318
7319(define-public python2-ipaddress
7320 (package-with-python2 python-ipaddress))
7321
7322(define-public python2-ipaddr
7323 (package
7324 (name "python2-ipaddr")
7325 (version "2.1.11")
7326 (source
7327 (origin
7328 (method url-fetch)
7329 (uri (pypi-uri "ipaddr" version))
7330 (sha256
7331 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
7332 (build-system python-build-system)
7333 (arguments
7334 `(#:python ,python-2 ;version 2 only
7335 #:phases
7336 (modify-phases %standard-phases
7337 (replace 'check
40b8c4e3 7338 (lambda _ (invoke "python" "ipaddr_test.py"))))))
44d10b1f
RW
7339 (home-page "https://github.com/google/ipaddr-py")
7340 (synopsis "IP address manipulation library")
7341 (description
7342 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
7343IPv6 addresses and networks.
7344
7345For new implementations you may prefer to use the standard module
7346@code{ipaddress}, which was introduced in Python 3.3 and backported to older
7347versions of Python.")
7348 (license license:asl2.0)))
7349
7350(define-public python-idna
7351 (package
7352 (name "python-idna")
e95c9837 7353 (version "2.8")
44d10b1f
RW
7354 (source
7355 (origin
7356 (method url-fetch)
7357 (uri (pypi-uri "idna" version))
7358 (sha256
7359 (base32
e95c9837 7360 "01rlkigdxg17sf9yar1jl8n18ls59367wqh59hnawlyg53vb6my3"))))
44d10b1f
RW
7361 (build-system python-build-system)
7362 (home-page "https://github.com/kjd/idna")
7363 (synopsis "Internationalized domain names in applications")
7364 (description
7365 "This is a library to support the Internationalised Domain Names in
7366Applications (IDNA) protocol as specified in RFC 5891. This version of the
7367protocol is often referred to as “IDNA2008” and can produce different results
7368from the earlier standard from 2003. The library is also intended to act as a
7369suitable drop-in replacement for the “encodings.idna” module that comes with
7370the Python standard library but currently only supports the older 2003
7371specification.")
7372 (license license:bsd-4)))
7373
a76e6a69
JM
7374(define-public python-idna-2.7
7375 (package (inherit python-idna)
7376 (version "2.7")
7377 (source (origin
7378 (method url-fetch)
7379 (uri (pypi-uri "idna" version))
7380 (sha256
7381 (base32
7382 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))))
7383
7384
44d10b1f
RW
7385(define-public python2-idna
7386 (package-with-python2 python-idna))
7387
7388(define-public python-idna-ssl
7389 (package
7390 (name "python-idna-ssl")
7391 (version "1.0.1")
7392 (source
7393 (origin
7394 (method url-fetch)
7395 (uri (pypi-uri "idna-ssl" version))
7396 (sha256
7397 (base32
7398 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
7399 (build-system python-build-system)
7400 (arguments
7401 `(#:tests? #f)) ;circular dependency with python-aiohttp
7402 (home-page "https://github.com/aio-libs/idna-ssl")
7403 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
7404 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
7405domains support.")
7406 (license license:expat)))
7407
7408(define-public python-pretend
7409 (package
7410 (name "python-pretend")
7411 (version "1.0.9")
7412 (source
7413 (origin
7414 (method url-fetch)
9f1f22ee 7415 (uri (pypi-uri "pretend" version))
44d10b1f
RW
7416 (sha256
7417 (base32
7418 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
7419 (build-system python-build-system)
7420 (home-page "https://github.com/alex/pretend")
7421 (synopsis "Library for stubbing in Python")
7422 (description
7423 "Pretend is a library to make stubbing with Python easier. Stubbing is a
7424technique for writing tests. You may hear the term mixed up with mocks,
7425fakes, or doubles. Basically, a stub is an object that returns pre-canned
7426responses, rather than doing any computation.")
7427 (license license:bsd-3)))
7428
7429(define-public python2-pretend
7430 (package-with-python2 python-pretend))
7431
7432(define-public python-pip
7433 (package
7434 (name "python-pip")
523ba4b1 7435 (version "19.2.1")
44d10b1f
RW
7436 (source
7437 (origin
7438 (method url-fetch)
7439 (uri (pypi-uri "pip" version))
7440 (sha256
7441 (base32
523ba4b1 7442 "100sd12ss4mbdj5lf3wawad29cm573b27765mq098x6xhcj71395"))))
44d10b1f
RW
7443 (build-system python-build-system)
7444 (arguments
7445 '(#:tests? #f)) ; there are no tests in the pypi archive.
7446 (home-page "https://pip.pypa.io/")
7447 (synopsis "Package manager for Python software")
7448 (description
7449 "Pip is a package manager for Python software, that finds packages on the
7450Python Package Index (PyPI).")
7451 (license license:expat)))
7452
7453(define-public python2-pip
7454 (package-with-python2 python-pip))
7455
7456(define-public python-tlsh
7457 (package
7458 (name "python-tlsh")
7459 (version "3.4.5")
7460 (home-page "https://github.com/trendmicro/tlsh")
3e3ff8ad
TGR
7461 (source
7462 (origin
7463 (method git-fetch)
7464 (uri (git-reference
7465 (url "https://github.com/trendmicro/tlsh.git")
7466 (commit (string-append "v" version))))
7467 (file-name (git-file-name name version))
7468 (sha256
7469 (base32 "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll"))))
44d10b1f
RW
7470 (build-system cmake-build-system)
7471 (arguments
7472 '(#:out-of-source? #f
7473 #:phases (modify-phases %standard-phases
7474 (replace
7475 'install
7476 (lambda* (#:key outputs #:allow-other-keys)
7477 ;; Build and install the Python bindings. The underlying
7478 ;; C++ library is apparently not meant to be installed.
7479 (let ((out (assoc-ref outputs "out")))
7480 (with-directory-excursion "py_ext"
7481 (and (system* "python" "setup.py" "build")
7482 (system* "python" "setup.py" "install"
7483 (string-append "--prefix=" out))))))))))
7484 (inputs `(("python" ,python-wrapper))) ;for the bindings
7485 (synopsis "Fuzzy matching library for Python")
7486 (description
7487 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
7488Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
7489value which can be used for similarity comparisons. Similar objects have
7490similar hash values, which allows for the detection of similar objects by
7491comparing their hash values. The byte stream should have a sufficient amount
7492of complexity; for example, a byte stream of identical bytes will not generate
7493a hash value.")
7494 (license license:asl2.0)))
7495
7496(define-public python2-tlsh
7497 (package
7498 (inherit python-tlsh)
7499 (name "python2-tlsh")
7500 (inputs `(("python" ,python-2)))))
7501
7502(define-public python-termcolor
7503 (package
7504 (name "python-termcolor")
7505 (version "1.1.0")
7506 (source
7507 (origin
7508 (method url-fetch)
7509 (uri (pypi-uri "termcolor" version))
7510 (sha256
7511 (base32
7512 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
7513 (build-system python-build-system)
7514 (arguments
7515 ;; There are no tests.
7516 `(#:tests? #f))
7517 (home-page "https://pypi.python.org/pypi/termcolor")
7518 (synopsis "ANSII Color formatting for terminal output")
7519 (description
7520 "This package provides ANSII Color formatting for output in terminals.")
7521 (license license:expat)))
7522
7523(define-public python2-termcolor
7524 (package-with-python2 python-termcolor))
7525
7526(define-public python-libarchive-c
7527 (package
7528 (name "python-libarchive-c")
7529 (version "2.8")
7530 (source (origin
7531 (method url-fetch)
7532 (uri (pypi-uri "libarchive-c" version))
7533 (sha256
7534 (base32
7535 "0qg0v1s9c1xdk9philhnv8k6c6nicvnvfwlc0j9srg90jmdlvm06"))))
7536 (build-system python-build-system)
7537 (arguments
7538 '(#:phases (modify-phases %standard-phases
7539 (add-before
7540 'build 'reference-libarchive
7541 (lambda* (#:key inputs #:allow-other-keys)
7542 ;; Retain the absolute file name of libarchive.so.
7543 (let ((libarchive (assoc-ref inputs "libarchive")))
7544 (substitute* "libarchive/ffi.py"
7545 (("find_library\\('archive'\\)")
7546 (string-append "'" libarchive
7547 "/lib/libarchive.so'"))))))
7548 (replace 'check
7549 (lambda _ (invoke "pytest" "-vv"))))))
7550 (native-inputs
7551 `(("python-mock" ,python-mock)
7552 ("python-pytest" ,python-pytest)))
7553 (inputs
7554 `(("libarchive" ,libarchive)))
7555 (home-page "https://github.com/Changaco/python-libarchive-c")
7556 (synopsis "Python interface to libarchive")
7557 (description
7558 "This package provides Python bindings to libarchive, a C library to
7559access possibly compressed archives in many different formats. It uses
7560Python's @code{ctypes} foreign function interface (FFI).")
7561 (license license:lgpl2.0+)))
7562
7563(define-public python2-libarchive-c
7564 (package-with-python2 python-libarchive-c))
7565
7566(define-public python-file
7567 (package
7568 (inherit file)
7569 (name "python-file")
7570 (build-system python-build-system)
7571 (arguments
7572 '(#:tests? #f ;no tests
7573 #:configure-flags '("--single-version-externally-managed" "--root=/")
7574 #:phases (modify-phases %standard-phases
7575 (add-before 'build 'change-directory
7576 (lambda _
7577 (chdir "python")
7578 #t))
7579 (add-before 'build 'set-library-file-name
7580 (lambda* (#:key inputs #:allow-other-keys)
7581 (let ((file (assoc-ref inputs "file")))
7582 (substitute* "magic.py"
7583 (("find_library\\('magic'\\)")
7584 (string-append "'" file "/lib/libmagic.so'")))
7585 #t))))))
7586 (inputs `(("file" ,file)))
528ea990
LC
7587 (native-inputs (if (%current-target-system)
7588 `(("self" ,this-package))
7589 '()))
44d10b1f
RW
7590 (synopsis "Python bindings to the libmagic file type guesser. Note that
7591this module and the python-magic module both provide a \"magic.py\" file;
7592these two modules, which are different and were developed separately, both
7593serve the same purpose: provide Python bindings for libmagic.")))
7594
7595(define-public python2-file
7596 (package-with-python2 python-file))
7597
7598(define-public python-debian
7599 (package
7600 (name "python-debian")
7601 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
9f74bd31 7602 (version "0.1.36")
44d10b1f
RW
7603 (source
7604 (origin
9f74bd31
VC
7605 ;; Use git-fetch, as pypi doesn't include test suite.
7606 (method git-fetch)
7607 (uri (git-reference
7608 (url home-page)
7609 (commit version)))
7610 (file-name (git-file-name name version))
44d10b1f
RW
7611 (sha256
7612 (base32
9f74bd31 7613 "0qy6x28bj6yfikhjww932v5xq4mf5bm1iczl7acy4c7zm6mwhqfa"))))
44d10b1f 7614 (build-system python-build-system)
9f74bd31
VC
7615 (arguments
7616 `(#:phases (modify-phases %standard-phases
7617 (add-after 'unpack 'remove-debian-specific-tests
7618 ;; python-apt, apt and dpkg are not yet available in guix,
7619 ;; and these tests heavily depend on them.
7620 (lambda _
7621 (delete-file "lib/debian/tests/test_deb822.py")
7622 (delete-file "lib/debian/tests/test_debfile.py")
7623 #t)))))
44d10b1f 7624 (propagated-inputs
9f74bd31
VC
7625 `(("python-six" ,python-six)
7626 ("python-chardet" ,python-chardet)))
44d10b1f
RW
7627 (synopsis "Debian package related modules")
7628 (description
7629 ;; XXX: Use @enumerate instead of @itemize to work around
7630 ;; <http://bugs.gnu.org/21772>.
7631 "This package provides Python modules that abstract many formats of
7632Debian-related files, such as:
7633
7634@enumerate
7635@item Debtags information;
7636@item @file{debian/changelog} files;
7637@item packages files, pdiffs;
7638@item control files of single or multiple RFC822-style paragraphs---e.g.
7639 @file{debian/control}, @file{.changes}, @file{.dsc};
7640@item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
7641 contained files and meta-information.
7642@end enumerate\n")
7643
7644 ;; Modules are either GPLv2+ or GPLv3+.
7645 (license license:gpl3+)))
7646
44d10b1f
RW
7647(define-public python-nbformat
7648 (package
7649 (name "python-nbformat")
7650 (version "4.4.0")
7651 (source
7652 (origin
7653 (method url-fetch)
7654 (uri (pypi-uri "nbformat" version))
7655 (sha256
7656 (base32
7657 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
7658 (build-system python-build-system)
7659 (arguments `(#:tests? #f)) ; no test target
7660 (propagated-inputs
7661 `(("python-ipython-genutils" ,python-ipython-genutils)
7662 ("python-jsonschema" ,python-jsonschema)
7663 ("python-jupyter-core" ,python-jupyter-core)
7664 ("python-traitlets" ,python-traitlets)))
7665 (home-page "http://jupyter.org")
7666 (synopsis "Jupyter Notebook format")
7667 (description "This package provides the reference implementation of the
7668Jupyter Notebook format and Python APIs for working with notebooks.")
7669 (license license:bsd-3)))
7670
7671(define-public python2-nbformat
7672 (package-with-python2 python-nbformat))
7673
7674(define-public python-bleach
7675 (package
7676 (name "python-bleach")
ff0efc8f 7677 (version "3.1.0")
44d10b1f
RW
7678 (source
7679 (origin
7680 (method url-fetch)
7681 (uri (pypi-uri "bleach" version))
7682 (sha256
7683 (base32
ff0efc8f 7684 "1yhrgrhkln8bd6gn3imj69g1h4xqah9gaz9q26crqr6gmmvpzprz"))))
44d10b1f
RW
7685 (build-system python-build-system)
7686 (propagated-inputs
ff0efc8f 7687 `(("python-webencodings" ,python-webencodings)
44d10b1f
RW
7688 ("python-six" ,python-six)))
7689 (native-inputs
ff0efc8f
MB
7690 `(("python-pytest" ,python-pytest)
7691 ("python-pytest-runner" ,python-pytest-runner-2)))
44d10b1f
RW
7692 (home-page "https://github.com/jsocol/bleach")
7693 (synopsis "Whitelist-based HTML-sanitizing tool")
7694 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
7695 (license license:asl2.0)))
7696
7697(define-public python2-bleach
7698 (package-with-python2 python-bleach))
7699
7700(define-public python-entrypoints
7701 (package
7702 (name "python-entrypoints")
a7f1b718 7703 (version "0.3")
44d10b1f
RW
7704 (source
7705 (origin
7706 (method url-fetch)
a7f1b718 7707 (uri (pypi-uri "entrypoints" version))
44d10b1f
RW
7708 (sha256
7709 (base32
a7f1b718 7710 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
44d10b1f
RW
7711 (build-system python-build-system)
7712 ;; The package does not come with a setup.py file, so we have to generate
7713 ;; one ourselves.
7714 (arguments
7715 `(#:tests? #f
7716 #:phases
7717 (modify-phases %standard-phases
7718 (add-after 'unpack 'create-setup.py
7719 (lambda _
7720 (call-with-output-file "setup.py"
7721 (lambda (port)
7722 (format port "\
7723from setuptools import setup
7724setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
7725" ,version))))))))
7726 (home-page "https://github.com/takluyver/entrypoints")
7727 (synopsis "Discover and load entry points from installed Python packages")
7728 (description "Entry points are a way for Python packages to advertise
7729objects with some common interface. The most common examples are
7730@code{console_scripts} entry points, which define shell commands by
7731identifying a Python function to run. The @code{entrypoints} module contains
7732functions to find and load entry points.")
7733 (license license:expat)))
7734
7735(define-public python2-entrypoints
7736 (package-with-python2 python-entrypoints))
7737
7738(define-public python-nbconvert
7739 (package
7740 (name "python-nbconvert")
7741 (version "5.0.0b1")
7742 (source
7743 (origin
7744 (method url-fetch)
7745 (uri (pypi-uri "nbconvert" version))
7746 (sha256
7747 (base32
7748 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
7749 (build-system python-build-system)
7750 (arguments
7751 `(;; The "bdist_egg" target is disabled by default, causing the installation
7752 ;; to fail.
7753 #:configure-flags (list "bdist_egg")
7754 ;; FIXME: 5 failures, 40 errors.
7755 #:tests? #f))
7756 ;; #:phases
7757 ;; (modify-phases %standard-phases
7758 ;; (replace 'check
7759 ;; (lambda _
7760 ;; (zero? (system* "py.test" "-v")))))
7761 (native-inputs
7762 `(("python-pytest" ,python-pytest)))
7763 (propagated-inputs
7764 `(("python-bleach" ,python-bleach)
7765 ("python-entrypoints" ,python-entrypoints)
7766 ("python-jinja2" ,python-jinja2)
7767 ("python-jupyter-core" ,python-jupyter-core)
7768 ("python-mistune" ,python-mistune)
7769 ("python-nbformat" ,python-nbformat)
7770 ("python-pygments" ,python-pygments)
7771 ("python-traitlets" ,python-traitlets)))
7772 (home-page "http://jupyter.org")
7773 (synopsis "Converting Jupyter Notebooks")
7774 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
7775notebooks to various other formats via Jinja templates. It allows you to
7776convert an @code{.ipynb} notebook file into various static formats including:
7777
7778@enumerate
7779@item HTML
7780@item LaTeX
7781@item PDF
7782@item Reveal JS
7783@item Markdown (md)
7784@item ReStructured Text (rst)
7785@item executable script
7786@end enumerate\n")
7787 (license license:bsd-3)))
7788
7789(define-public python2-nbconvert
7790 (package-with-python2 python-nbconvert))
7791
44d10b1f
RW
7792(define-public python-notebook
7793 (package
7794 (name "python-notebook")
7795 (version "5.7.4")
7796 (source (origin
7797 (method url-fetch)
7798 (uri (pypi-uri "notebook" version))
7799 (sha256
7800 (base32
7801 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
7802 (build-system python-build-system)
7803 (arguments
7804 `(#:phases
7805 (modify-phases %standard-phases
7806 (replace 'check
7807 (lambda _
7808 ;; These tests require a browser
7809 (delete-file-recursively "notebook/tests/selenium")
7810 ;; Some tests need HOME
7811 (setenv "HOME" "/tmp")
7812 ;; This file contains "warningfilters", which are not supported
7813 ;; by this version of nose.
7814 (delete-file "setup.cfg")
7815 (with-directory-excursion "/tmp"
7816 (invoke "nosetests" "-v"))
7817 #t)))))
7818 (propagated-inputs
7819 `(("python-jupyter-core" ,python-jupyter-core)
7820 ("python-nbformat" ,python-nbformat)
7821 ("python-nbconvert" ,python-nbconvert)
7822 ("python-prometheus-client" ,python-prometheus-client)
7823 ("python-send2trash" ,python-send2trash)
7824 ("python-terminado" ,python-terminado)))
7825 (native-inputs
7826 `(("python-nose" ,python-nose)
7827 ("python-sphinx" ,python-sphinx)
7828 ("python-requests" ,python-requests)))
7829 (home-page "http://jupyter.org/")
7830 (synopsis "Web-based notebook environment for interactive computing")
7831 (description
7832 "The Jupyter HTML notebook is a web-based notebook environment for
7833interactive computing.")
7834 (properties `((python2-variant . ,(delay python2-notebook))))
7835 (license license:bsd-3)))
7836
7837(define-public python2-notebook
7838 (let ((base (package-with-python2
7839 (strip-python2-variant python-notebook))))
7840 (package (inherit base)
7841 (native-inputs
7842 `(("python2-mock" ,python2-mock)
7843 ,@(package-native-inputs base)))
7844 (arguments
7845 (substitute-keyword-arguments (package-arguments base)
7846 ((#:phases phases)
7847 `(modify-phases ,phases
7848 (add-before 'check 'disable-test-case
7849 ;; The test requires network access to localhost. Curiously it
7850 ;; fails with Python 2 only. Simply make the test-case return
7851 ;; immediately.
7852 (lambda _
7853 (substitute*
7854 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
7855 (("formats = self.nbconvert_api") "return #")))))))))))
7856
7857(define-public python-widgetsnbextension
7858 (package
7859 (name "python-widgetsnbextension")
7860 (version "3.4.2")
7861 (source
7862 (origin
7863 (method url-fetch)
7864 (uri (pypi-uri "widgetsnbextension" version))
7865 (sha256
7866 (base32
7867 "0rc2nivdy7k4m3vljx7wdh2jh11djapcgwhvzlbs0isl8gl8nqgs"))))
7868 (build-system python-build-system)
7869 (propagated-inputs
7870 `(("python-ipykernel" ,python-ipykernel)
7871 ("python-notebook" ,python-notebook)))
7872 (native-inputs
7873 `(("python-certifi" ,python-certifi)
7874 ("python-nose" ,python-nose)))
7875 (home-page "https://ipython.org")
7876 (synopsis "IPython HTML widgets for Jupyter")
7877 (description "This package provides interactive HTML widgets for Jupyter
7878notebooks.")
7879 (license license:bsd-3)))
7880
7881(define-public python2-widgetsnbextension
7882 (package-with-python2 python-widgetsnbextension))
7883
7884(define-public python-ipywidgets
7885 (package
7886 (name "python-ipywidgets")
7887 (version "5.2.2")
7888 (source
7889 (origin
7890 (method url-fetch)
7891 (uri (pypi-uri "ipywidgets" version))
7892 (sha256
7893 (base32
7894 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
7895 (build-system python-build-system)
7896 (propagated-inputs
7897 `(("python-ipython" ,python-ipython)
7898 ("python-traitlets" ,python-traitlets)
7899 ("python-widgetsnbextension" ,python-widgetsnbextension)))
7900 (native-inputs
7901 `(("python-nose" ,python-nose)
7902 ("python-pytest" ,python-pytest)))
7903 (home-page "https://ipython.org")
7904 (synopsis "IPython HTML widgets for Jupyter")
7905 (description "Ipywidgets are interactive HTML widgets for Jupyter
7906notebooks and the IPython kernel. Notebooks come alive when interactive
7907widgets are used. Users gain control of their data and can visualize changes
7908in the data.")
7909 (license license:bsd-3)))
7910
7911(define-public python2-ipywidgets
7912 (package-with-python2 python-ipywidgets))
7913
7914(define-public python-jupyter-console
7915 (package
7916 (name "python-jupyter-console")
becb9cbf 7917 (version "6.0.0")
44d10b1f
RW
7918 (source
7919 (origin
7920 (method url-fetch)
7921 (uri (pypi-uri "jupyter_console" version))
7922 (sha256
7923 (base32
becb9cbf 7924 "1xdjw11cppf1fxvwkw2bk13ckkwas3bdah8baingn9296mvfi31h"))))
44d10b1f 7925 (build-system python-build-system)
44d10b1f
RW
7926 (propagated-inputs
7927 `(("python-ipykernel" ,python-ipykernel)
7928 ("python-jupyter-client" ,python-jupyter-client)
becb9cbf 7929 ("python-prompt-toolkit" ,python-prompt-toolkit)
44d10b1f
RW
7930 ("python-pygments" ,python-pygments)))
7931 (native-inputs
7932 `(("python-nose" ,python-nose)))
7933 (home-page "https://jupyter.org")
7934 (synopsis "Jupyter terminal console")
7935 (description "This package provides a terminal-based console frontend for
7936Jupyter kernels. It also allows for console-based interaction with non-Python
7937Jupyter kernels such as IJulia and IRKernel.")
7938 (license license:bsd-3)))
7939
7940(define-public python2-jupyter-console
8e590c81
RW
7941 (package
7942 (name "python2-jupyter-console")
7943 (version "5.2.0")
7944 (source
7945 (origin
7946 (method url-fetch)
7947 (uri (pypi-uri "jupyter_console" version))
7948 (sha256
7949 (base32
7950 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
7951 (build-system python-build-system)
7952 ;; Tests only run in an TTY.
7953 (arguments `(#:tests? #f))
7954 (propagated-inputs
7955 `(("python2-ipykernel" ,python2-ipykernel)
7956 ("python2-jupyter-client" ,python2-jupyter-client)
7957 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
7958 ("python2-pygments" ,python2-pygments)))
7959 (native-inputs
7960 `(("python2-nose" ,python2-nose)))
7961 (home-page "https://jupyter.org")
7962 (synopsis "Jupyter terminal console")
7963 (description "This package provides a terminal-based console frontend for
7964Jupyter kernels. It also allows for console-based interaction with non-Python
7965Jupyter kernels such as IJulia and IRKernel.")
7966 (license license:bsd-3)))
44d10b1f
RW
7967
7968;; The python-ipython and python-jupyter-console require each other. To get
7969;; the functionality in both packages working, strip down the
7970;; python-jupyter-console package when using it as an input to python-ipython.
7971(define python-jupyter-console-minimal
7972 (package
7973 (inherit python-jupyter-console)
7974 (name "python-jupyter-console-minimal")
7975 (arguments
7976 (substitute-keyword-arguments
7977 (package-arguments python-jupyter-console)
7978 ((#:phases phases)
7979 `(modify-phases ,phases
7980 (add-after 'install 'delete-bin
7981 (lambda* (#:key outputs #:allow-other-keys)
7982 ;; Delete the bin files, to avoid conflicts in profiles
7983 ;; where python-ipython and python-jupyter-console are
7984 ;; both present.
7985 (delete-file-recursively
7986 (string-append
7987 (assoc-ref outputs "out") "/bin"))))))))
7988 ;; Remove the python-ipython propagated input, to avoid the cycle
7989 (propagated-inputs
7990 (alist-delete
7991 "python-ipython"
7992 (package-propagated-inputs python-jupyter-console)))))
7993
7994(define-public python-qtconsole
7995 (package
7996 (name "python-qtconsole")
7997 (version "4.4.3")
7998 (source
7999 (origin
8000 (method url-fetch)
8001 (uri (pypi-uri "qtconsole" version))
8002 (sha256
8003 (base32
8004 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
8005 (build-system python-build-system)
8006 (arguments
8007 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
8008 ;; but we only have the LTS version 5.x. This means that there might be
8009 ;; runtime errors, but since this is a dependency of the Jupyter package,
8010 ;; and Jupyter can be used without the qtconsole we can overlook this for
8011 ;; now.
8012 `(#:tests? #f
8013 #:phases
8014 (modify-phases %standard-phases
8015 (add-before 'check 'pre-check
8016 (lambda _
8017 (setenv "QT_QPA_PLATFORM" "offscreen")
8018 #t)))))
8019 (propagated-inputs
8020 `(("python-ipykernel" ,python-ipykernel)
8021 ("python-ipython" ,python-ipython)))
8022 (native-inputs
8023 `(("python-pytest" ,python-pytest)))
8024 (home-page "http://jupyter.org")
8025 (synopsis "Jupyter Qt console")
8026 (description "This package provides a Qt-based console for Jupyter with
8027support for rich media output.")
8028 (license license:bsd-3)))
8029
6ec87223
VC
8030(define-public python-jsbeautifier
8031 (package
8032 (name "python-jsbeautifier")
8033 (version "1.10.2")
8034 (home-page "https://github.com/beautify-web/js-beautify")
8035 (source (origin
8036 (method git-fetch)
8037 (uri (git-reference
8038 (url home-page)
8039 (commit (string-append "v" version))))
8040 (file-name (git-file-name name version))
8041 (sha256
8042 (base32
8043 "0wawb070ki1axb3jc9xvsrgpji52vcfif3zmjzc3z4g98m5xw4kg"))))
8044 (build-system python-build-system)
8045 (arguments
8046 `(#:phases (modify-phases %standard-phases
8047 (add-after 'unpack 'chdir
8048 (lambda _
8049 ;; The upstream Git repository contains all the code,
8050 ;; but this package only builds the python code.
8051 (chdir "python")
8052 #t))
8053 (add-after 'unpack 'patch-python-six-requirements
8054 (lambda _
8055 (substitute* "python/setup.py"
8056 (("six>=1.12.0")
8057 "six>=1.11.0"))
8058 #t)))))
8059 (propagated-inputs
8060 `(("python-editorconfig" ,python-editorconfig)
8061 ("python-six" ,python-six)))
8062 (native-inputs
8063 `(("python-pytest" ,python-pytest)))
8064 (synopsis "JavaScript unobfuscator and beautifier")
8065 (description "Beautify, unpack or deobfuscate JavaScript, leveraging
8066popular online obfuscators.")
8067 (license license:expat)))
8068
44d10b1f
RW
8069(define-public jupyter
8070 (package
8071 (name "jupyter")
8072 (version "1.0.0")
8073 (source
8074 (origin
8075 (method url-fetch)
8076 (uri (pypi-uri "jupyter" version))
8077 (sha256
8078 (base32
8079 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
8080 (build-system python-build-system)
8081 (arguments '(#:tests? #f)) ; there are none.
8082 (propagated-inputs
8083 `(("python-ipykernel" ,python-ipykernel)
8084 ("python-ipywidgets" ,python-ipywidgets)
8085 ("python-jupyter-console" ,python-jupyter-console)
8086 ("python-nbconvert" ,python-nbconvert)
8087 ("python-notebook" ,python-notebook)
8088 ("python-qtconsole" ,python-qtconsole)))
8089 (native-search-paths
8090 (list (search-path-specification
8091 (variable "JUPYTER_PATH")
8092 (files '("share/jupyter")))))
8093 (home-page "https://jupyter.org")
8094 (synopsis "Web application for interactive documents")
8095 (description
8096 "The Jupyter Notebook is a web application that allows you to create and
8097share documents that contain live code, equations, visualizations and
8098explanatory text. Uses include: data cleaning and transformation, numerical
8099simulation, statistical modeling, machine learning and much more.")
8100 (license license:bsd-3)))
8101
8102(define-public python-chardet
8103 (package
8104 (name "python-chardet")
8105 (version "3.0.4")
8106 (source
8107 (origin
8108 (method url-fetch)
8109 (uri (pypi-uri "chardet" version))
8110 (sha256
8111 (base32
8112 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
8113 (native-inputs
8114 `(("python-hypothesis" ,python-hypothesis)
8115 ("python-pytest" ,python-pytest)
8116 ("python-pytest-runner" ,python-pytest-runner)))
8117 (build-system python-build-system)
3d369407
MB
8118 ;; XXX: Incompatible with Pytest 4: <https://github.com/chardet/chardet/issues/173>.
8119 (arguments `(#:tests? #f))
44d10b1f
RW
8120 (home-page "https://github.com/chardet/chardet")
8121 (synopsis "Universal encoding detector for Python 2 and 3")
8122 (description
8123 "This package provides @code{chardet}, a Python module that can
8124automatically detect a wide range of file encodings.")
8125 (license license:lgpl2.1+)))
8126
8127(define-public python2-chardet
8128 (package-with-python2 python-chardet))
8129
8130(define-public python-docopt
8131 (package
8132 (name "python-docopt")
8133 (version "0.6.2")
8134 (source
8135 (origin
11e46326 8136 (method git-fetch)
44d10b1f 8137 ;; The release on PyPI does not include tests.
11e46326
EF
8138 (uri (git-reference
8139 (url "https://github.com/docopt/docopt")
8140 (commit version)))
8141 (file-name (git-file-name name version))
44d10b1f
RW
8142 (sha256
8143 (base32
11e46326 8144 "0aad9gbswnnhssin2q0m5lmpm0ahyf80ahs2zjigbn5y7fvljnd0"))))
44d10b1f
RW
8145 (build-system python-build-system)
8146 (native-inputs
8147 `(("python-pytest" ,python-pytest)))
8148 (arguments
8149 `(#:phases
8150 (modify-phases %standard-phases
8151 (replace 'check
8152 (lambda _ (invoke "py.test"))))))
8153 (home-page "http://docopt.org")
8154 (synopsis "Command-line interface description language for Python")
8155 (description "This library allows the user to define a command-line
8156interface from a program's help message rather than specifying it
4ca7207b 8157programmatically with command-line parsers like @code{getopt} and
44d10b1f
RW
8158@code{argparse}.")
8159 (license license:expat)))
8160
8161(define-public python2-docopt
8162 (package-with-python2 python-docopt))
8163
8164(define-public python-pythondialog
8165 (package
8166 (name "python-pythondialog")
8167 (version "3.4.0")
8168 (source
8169 (origin
8170 (method url-fetch)
8171 (uri (pypi-uri "pythondialog" version))
8172 (sha256
8173 (base32
8174 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
8175 (build-system python-build-system)
8176 (arguments
8177 `(#:phases
8178 (modify-phases %standard-phases
8179 (add-after 'unpack 'patch-path
8180 (lambda* (#:key inputs #:allow-other-keys)
8181 (let* ((dialog (assoc-ref inputs "dialog")))
8182 ;; Since this library really wants to grovel the search path, we
8183 ;; must hardcode dialog's store path into it.
8184 (substitute* "dialog.py"
8185 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
8186 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
8187 #t))))
8188 #:tests? #f)) ; no test suite
8189 (propagated-inputs
8190 `(("dialog" ,dialog)))
8191 (home-page "http://pythondialog.sourceforge.net/")
8192 (synopsis "Python interface to the UNIX dialog utility")
8193 (description "A Python wrapper for the dialog utility. Its purpose is to
8194provide an easy to use, pythonic and comprehensive Python interface to dialog.
8195This allows one to make simple text-mode user interfaces on Unix-like systems")
8196 (license license:lgpl2.1)
8197 (properties `((python2-variant . ,(delay python2-pythondialog))))))
8198
8199(define-public python2-pythondialog
8200 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
8201 (package
8202 (inherit base)
8203 (version (package-version python-pythondialog))
8204 (source (origin
8205 (method url-fetch)
8206 (uri (pypi-uri "python2-pythondialog" version))
8207 (sha256
8208 (base32
8209 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
8210
8211(define-public python-configobj
8212 (package
8213 (name "python-configobj")
8214 (version "5.0.6")
8215 (source (origin
8216 (method url-fetch)
b0758fbb 8217 (uri (pypi-uri "configobj" version))
44d10b1f
RW
8218 (sha256
8219 (base32
8220 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
8221 ;; Patch setup.py so it looks for python-setuptools, which is
8222 ;; required to parse the keyword 'install_requires' in setup.py.
8223 (patches (search-patches "python-configobj-setuptools.patch"))))
8224 (build-system python-build-system)
8225 (propagated-inputs
8226 `(("python-six" ,python-six)))
8227 (synopsis "Config file reading, writing and validation")
8228 (description "ConfigObj is a simple but powerful config file reader and
8229writer: an ini file round tripper. Its main feature is that it is very easy to
8230use, with a straightforward programmer’s interface and a simple syntax for
8231config files.")
8232 (home-page "https://github.com/DiffSK/configobj")
8233 (license license:bsd-3)))
8234
8235(define-public python2-configobj
8236 (package-with-python2 python-configobj))
8237
8238(define-public python-configargparse
8239 (package
8240 (name "python-configargparse")
86ae491f 8241 (version "0.14.0")
44d10b1f
RW
8242 (source (origin
8243 (method url-fetch)
8244 (uri (pypi-uri "ConfigArgParse" version))
8245 (sha256
8246 (base32
86ae491f 8247 "149fy4zya0rsnlkvxbbq43cyr8lscb5k4pj1m6n7f1grwcmzwbif"))))
44d10b1f
RW
8248 (build-system python-build-system)
8249 (native-inputs
8250 `(("python-pyyaml" ,python-pyyaml)))
8251 (arguments
8252 `(#:phases
8253 (modify-phases %standard-phases
8254 (replace 'check
8255 (lambda _
8256 ;; Bypass setuptools-shim because one test relies on "setup.py"
8257 ;; being the first argument passed to the python call.
8258 ;;
8259 ;; NOTE: Many tests do not run because they rely on Python's
8260 ;; built-in test.test_argparse, but we remove the unit tests from
8261 ;; our Python installation.
8262 (invoke "python" "setup.py" "test"))))))
8263 (synopsis "Replacement for argparse")
8264 (description "A drop-in replacement for argparse that allows options to also
8265be set via config files and/or environment variables.")
8266 (home-page "https://github.com/bw2/ConfigArgParse")
8267 (license license:expat)))
8268
8269(define-public python2-configargparse
8270 (package-with-python2 python-configargparse))
8271
8272(define-public python-argparse-manpage
8273 (package
8274 (name "python-argparse-manpage")
8275 (version "1.1")
8276 (source
8277 (origin
8278 (method url-fetch)
8279 (uri (pypi-uri "argparse-manpage" version))
8280 (sha256
8281 (base32
8282 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
8283 (build-system python-build-system)
8284 (home-page "https://github.com/praiskup/argparse-manpage")
8285 (synopsis "Build manual page from Python's ArgumentParser object")
8286 (description
8287 "This package provides tools to build manual pages from Python's
8288@code{ArgumentParser} object.")
8289 (license license:asl2.0)))
8290
3e8f76d8
RW
8291(define-public python-contextlib2
8292 (package
8293 (name "python-contextlib2")
8294 (version "0.5.5")
8295 (source
8296 (origin
8297 (method url-fetch)
8298 (uri (pypi-uri "contextlib2" version))
8299 (sha256
8300 (base32
8301 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
8302 (build-system python-build-system)
8303 (home-page "http://contextlib2.readthedocs.org/")
8304 (synopsis "Tools for decorators and context managers")
8305 (description "This module is primarily a backport of the Python
83063.2 contextlib to earlier Python versions. Like contextlib, it
8307provides utilities for common tasks involving decorators and context
8308managers. It also contains additional features that are not part of
8309the standard library.")
1e158ba1 8310 (properties `((python2-variant . ,(delay python2-contextlib2))))
3e8f76d8
RW
8311 (license license:psfl)))
8312
44d10b1f 8313(define-public python2-contextlib2
1e158ba1
EF
8314 (let ((base (package-with-python2
8315 (strip-python2-variant python-contextlib2))))
8316 (package
8317 (inherit base)
8318 (arguments
8319 (substitute-keyword-arguments (package-arguments base)
8320 ((#:phases phases)
8321 `(modify-phases ,phases
8322 (replace 'check
8323 (lambda _ (invoke "python" "test_contextlib2.py" "-v")))))))
8324 (native-inputs
8325 `(("python2-unittest2" ,python2-unittest2))))))
44d10b1f
RW
8326
8327(define-public python-texttable
8328 (package
8329 (name "python-texttable")
52cc4892 8330 (version "0.9.1")
44d10b1f
RW
8331 (source
8332 (origin
8333 (method url-fetch)
8334 (uri (pypi-uri "texttable" version))
8335 (sha256
8336 (base32
52cc4892 8337 "0yawv64c0zbawwv6zz84whb32fnb2n9jylwjcfsrcdgh7xvl340i"))))
44d10b1f
RW
8338 (build-system python-build-system)
8339 (arguments '(#:tests? #f)) ; no tests
8340 (home-page "https://github.com/foutaise/texttable/")
8341 (synopsis "Python module for creating simple ASCII tables")
8342 (description "Texttable is a Python module for creating simple ASCII
8343tables.")
8344 (license license:lgpl2.1+)))
8345
8346(define-public python2-texttable
8347 (package-with-python2 python-texttable))
8348
8349(define-public python-atomicwrites
8350 (package
8351 (name "python-atomicwrites")
14f10479 8352 (version "1.3.0")
44d10b1f
RW
8353 (source (origin
8354 (method url-fetch)
8355 (uri (pypi-uri "atomicwrites" version))
8356 (sha256
8357 (base32
14f10479 8358 "19ngcscdf3jsqmpcxn6zl5b6anmsajb6izp1smcd1n02midl9abm"))))
44d10b1f
RW
8359 (build-system python-build-system)
8360 (synopsis "Atomic file writes in Python")
8361 (description "Library for atomic file writes using platform dependent tools
8362for atomic file system operations.")
8363 (home-page "https://github.com/untitaker/python-atomicwrites")
8364 (license license:expat)))
8365
8366(define-public python2-atomicwrites
8367 (package-with-python2 python-atomicwrites))
8368
8369(define-public python-click-threading
8370 (package
8371 (name "python-click-threading")
8372 (version "0.4.4")
8373 (source (origin
8374 (method url-fetch)
8375 (uri (pypi-uri "click-threading" version))
8376 (sha256
8377 (base32
8378 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
8379 (build-system python-build-system)
8380 (propagated-inputs
8381 `(("python-click" ,python-click)))
8382 (synopsis "Utilities for multithreading in Click")
8383 (description "This package provides utilities for multithreading in Click
8384applications.")
8385 (home-page "https://github.com/click-contrib/click-threading")
8386 (license license:expat)))
8387
8388(define-public python-click-log
8389 (package
8390 (name "python-click-log")
8391 (version "0.3.2")
8392 (source (origin
8393 (method url-fetch)
8394 (uri (pypi-uri "click-log" version))
8395 (sha256
8396 (base32
8397 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
8398 (build-system python-build-system)
8399 (propagated-inputs
8400 `(("python-click" ,python-click)))
8401 (synopsis "Logging for click applications")
8402 (description "This package provides a Python library for logging Click
8403applications.")
8404 (home-page "https://github.com/click-contrib/click-log")
8405 (license license:expat)))
8406
8407(define-public python-apipkg
8408 (package
8409 (name "python-apipkg")
8410 (version "1.4")
8411 (source (origin
8412 (method url-fetch)
8413 (uri (pypi-uri "apipkg" version))
8414 (sha256
8415 (base32
8416 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
8417 (build-system python-build-system)
8418 (native-inputs
8419 `(("python-pytest" ,python-pytest)))
8420 (synopsis "Namespace control and lazy-import mechanism")
8421 (description "With apipkg you can control the exported namespace of a Python
8422package and greatly reduce the number of imports for your users. It is a small
8423pure Python module that works on virtually all Python versions.")
8424 (home-page "https://github.com/pytest-dev/apipkg")
8425 (license license:expat)))
8426
8427(define-public python2-apipkg
8428 (package-with-python2 python-apipkg))
8429
8430(define-public python-execnet
8431 (package
8432 (name "python-execnet")
8433 (version "1.4.1")
8434 (source (origin
8435 (method url-fetch)
8436 (uri (pypi-uri "execnet" version))
8437 (sha256
8438 (base32
8439 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
8440 (build-system python-build-system)
8441 (arguments
8442 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
8443 ;; The two test failures are caused by the lack of an `ssh` executable.
8444 ;; The test suite can be run with pytest after the 'install' phase.
8445 #:tests? #f))
8446 (native-inputs
8447 `(("python-pytest" ,python-pytest)
8448 ("python-setuptools-scm" ,python-setuptools-scm)))
8449 (propagated-inputs
8450 `(("python-apipkg" ,python-apipkg)))
8451 (synopsis "Rapid multi-Python deployment")
8452 (description "Execnet provides a share-nothing model with
8453channel-send/receive communication for distributing execution across many
8454Python interpreters across version, platform and network barriers. It has a
8455minimal and fast API targeting the following uses:
8456@enumerate
8457@item distribute tasks to (many) local or remote CPUs
8458@item write and deploy hybrid multi-process applications
8459@item write scripts to administer multiple environments
8460@end enumerate")
8461 (home-page "http://codespeak.net/execnet/")
8462 (license license:expat)))
8463
8464(define-public python2-execnet
8465 (package-with-python2 python-execnet))
8466
8467(define-public python-icalendar
8468 (package
8469 (name "python-icalendar")
43ae8f79 8470 (version "4.0.4")
44d10b1f
RW
8471 (source (origin
8472 (method url-fetch)
8473 (uri (pypi-uri "icalendar" version))
8474 (sha256
8475 (base32
43ae8f79 8476 "16gjvqv0n05jrb9g228pdjgzd3amz2pdhvcgsn1jypszjg5m2w9l"))))
44d10b1f
RW
8477 (build-system python-build-system)
8478 (propagated-inputs
8479 `(("python-dateutil" ,python-dateutil)
8480 ("python-pytz" ,python-pytz)))
8481 (synopsis "Python library for parsing iCalendar files")
8482 (description "The icalendar package is a parser/generator of iCalendar
8483files for use with Python.")
8484 (home-page "https://github.com/collective/icalendar")
8485 (license license:bsd-2)))
8486
44d10b1f
RW
8487(define-public python-args
8488 (package
8489 (name "python-args")
8490 (version "0.1.0")
8491 (source (origin
8492 (method url-fetch)
8493 (uri (pypi-uri "args" version))
8494 (sha256
8495 (base32
8496 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
8497 (build-system python-build-system)
8498 (home-page "https://github.com/kennethreitz/args")
8499 (synopsis "Command-line argument parser")
8500 (description
8501 "This library provides a Python module to parse command-line arguments.")
8502 (license license:bsd-3)))
8503
8504(define-public python2-args
8505 (package-with-python2 python-args))
8506
8507(define-public python-clint
8508 (package
8509 (name "python-clint")
8510 (version "0.5.1")
8511 (source (origin
8512 (method url-fetch)
8513 (uri (pypi-uri "clint" version))
8514 (sha256
8515 (base32
8516 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
8517 (build-system python-build-system)
8518 (arguments
8519 '(#:phases
8520 (modify-phases %standard-phases
8521 (replace 'check
8522 (lambda _ (invoke "py.test" "-v"))))))
8523 (native-inputs
8524 `(("python-pytest" ,python-pytest)))
8525 (propagated-inputs
8526 `(("python-args" ,python-args)))
8527 (home-page "https://github.com/kennethreitz/clint")
8528 (synopsis "Command-line interface tools")
8529 (description
8530 "Clint is a Python module filled with a set of tools for developing
8531command-line applications, including tools for colored and indented
8532output, progress bar display, and pipes.")
8533 (license license:isc)))
8534
8535(define-public python2-clint
8536 (package-with-python2 python-clint))
8537
44d10b1f
RW
8538(define-public python-rply
8539 (package
8540 (name "python-rply")
8541 (version "0.7.5")
8542 (source (origin
8543 (method url-fetch)
8544 (uri (pypi-uri "rply" version))
8545 (sha256
8546 (base32
8547 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
8548 (build-system python-build-system)
8549 (propagated-inputs
8550 `(("python-appdirs" ,python-appdirs)))
8551 (home-page "https://github.com/alex/rply")
8552 (synopsis "Parser generator for Python")
8553 (description
8554 "This package provides a pure Python based parser generator, that also
8555works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
8556with a new public API, and RPython support.")
8557 (license license:bsd-3)))
8558
8559(define-public python2-rply
8560 (package-with-python2 python-rply))
8561
8562(define-public python-hy
8563 (package
8564 (name "python-hy")
c215051d 8565 (version "0.17.0")
44d10b1f
RW
8566 (source (origin
8567 (method url-fetch)
8568 (uri (pypi-uri "hy" version))
8569 (sha256
8570 (base32
c215051d 8571 "1gdbqsirsdxj320wnp7my5awzs1kfs6m4fqmkzbd1zd47qzj0zfi"))))
44d10b1f
RW
8572 (build-system python-build-system)
8573 (arguments
8574 '(#:phases
8575 (modify-phases %standard-phases
6ba6a1c1
JG
8576 (add-before 'install 'set-HOME
8577 (lambda _
8578 (setenv "HOME" "/tmp")))
44d10b1f
RW
8579 (replace 'check
8580 (lambda _
8581 ;; Tests require write access to HOME.
8582 (setenv "HOME" "/tmp")
8583 (invoke "nosetests"))))))
8584 (native-inputs
8585 `(("python-coverage" ,python-coverage)
8586 ("python-nose" ,python-nose)))
8587 (propagated-inputs
8588 `(("python-astor" ,python-astor)
8589 ("python-clint" ,python-clint)
c215051d
JG
8590 ("python-rply" ,python-rply)
8591 ("python-fastentrypoints"
8592 ,python-fastentrypoints)
8593 ("python-funcparserlib"
8594 ,python-funcparserlib)))
44d10b1f
RW
8595 (home-page "http://hylang.org/")
8596 (synopsis "Lisp frontend to Python")
8597 (description
8598 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
8599its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
8600Python at your fingertips, in Lisp form.")
8601 (license license:expat)))
8602
8603(define-public python2-hy
8604 (package-with-python2 python-hy))
8605
8606(define-public python2-functools32
8607 (package
8608 (name "python2-functools32")
8609 (version "3.2.3-2")
8610 (source
8611 (origin
8612 (method url-fetch)
8613 (uri (pypi-uri "functools32" version))
8614 (sha256
8615 (base32
8616 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
8617 (build-system python-build-system)
8618 (arguments
8619 `(#:python ,python-2
8620 #:tests? #f)) ; no test target
8621 (home-page "https://github.com/MiCHiLU/python-functools32")
8622 (synopsis
8623 "Backport of the functools module from Python 3.2.3")
8624 (description
8625 "This package is a backport of the @code{functools} module from Python
86263.2.3 for use with older versions of Python and PyPy.")
8627 (license license:expat)))
8628
8629(define-public python2-subprocess32
8630 (package
8631 (name "python2-subprocess32")
8632 (version "3.2.7")
8633 (source (origin
8634 (method url-fetch)
8635 (uri (pypi-uri "subprocess32" version))
8636 (sha256
8637 (base32
8638 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
8639 (patches
8640 (search-patches "python2-subprocess32-disable-input-test.patch"))))
8641 (build-system python-build-system)
8642 (arguments
8643 `(#:python ,python-2
8644 ;; The test suite fails with Python > 2.7.13:
8645 ;; import test.support
8646 ;; ImportError: No module named support
8647 #:tests? #f
8648 #:phases
8649 (modify-phases %standard-phases
8650 (add-after 'unpack 'patch-/bin/sh
8651 (lambda _
8652 (substitute* '("subprocess32.py"
8653 "test_subprocess32.py")
8654 (("/bin/sh") (which "sh")))
8655 #t)))))
8656 (home-page "https://github.com/google/python-subprocess32")
8657 (synopsis "Backport of the subprocess module from Python 3.2")
8658 (description
8659 "This is a backport of the @code{subprocess} standard library module
8660from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
8661new features. On POSIX systems it is guaranteed to be reliable when used
8662in threaded applications. It includes timeout support from Python 3.3 but
8663otherwise matches 3.2’s API.")
8664 (license license:psfl)))
8665
8666(define-public python2-futures
8667 (package
8668 (name "python2-futures")
8669 (version "3.2.0")
8670 (source
8671 (origin
8672 (method url-fetch)
8673 (uri (pypi-uri "futures" version))
8674 (sha256
8675 (base32
8676 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
8677 (build-system python-build-system)
ba88eea2
RW
8678 (arguments
8679 `(#:python ,python-2
8680 #:phases
8681 (modify-phases %standard-phases
8682 (replace 'check
8683 (lambda _
8684 (invoke "python" "test_futures.py")
8685 #t)))))
44d10b1f
RW
8686 (home-page "https://github.com/agronholm/pythonfutures")
8687 (synopsis
8688 "Backport of the concurrent.futures package from Python 3.2")
8689 (description
8690 "The concurrent.futures module provides a high-level interface for
8691asynchronously executing callables. This package backports the
8692concurrent.futures package from Python 3.2")
8693 (license license:bsd-3)))
8694
8695(define-public python-promise
8696 (package
8697 (name "python-promise")
8698 (version "0.4.2")
8699 (source
8700 (origin
8701 (method url-fetch)
8702 (uri (pypi-uri "promise" version))
8703 (sha256
8704 (base32
8705 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
8706 (build-system python-build-system)
8707 ;; Tests wants python-futures, which is a python2 only program, and
8708 ;; can't be found by python-promise at test time.
8709 (arguments `(#:tests? #f))
8710 (home-page "https://github.com/syrusakbary/promise")
8711 (synopsis "Promises/A+ implementation for Python")
8712 (description
8713 "Promises/A+ implementation for Python")
8714 (properties `((python2-variant . ,(delay python2-promise))))
8715 (license license:expat)))
8716
8717(define-public python2-promise
8718 (let ((promise (package-with-python2
8719 (strip-python2-variant python-promise))))
8720 (package (inherit promise)
8721 (arguments (substitute-keyword-arguments (package-arguments promise)
8722 ((#:tests? _) #t)))
8723 (native-inputs
8724 `(("python2-futures" ,python2-futures)
8725 ("python2-pytest" ,python2-pytest)
8726 ,@(package-native-inputs promise))))))
8727
d71d85cd
RW
8728(define-public python-progressbar33
8729 (package
8730 (name "python-progressbar33")
8731 (version "2.4")
8732 (source
8733 (origin
8734 (method url-fetch)
8735 (uri (pypi-uri "progressbar33" version))
8736 (sha256
8737 (base32
8738 "1zvf6zs5hzrc03p9nfs4p16vhilqikycvv1yk0pxn8s07fdhvzji"))))
8739 (build-system python-build-system)
8740 (home-page "http://github.com/germangh/python-progressbar")
8741 (synopsis "Text progress bar library for Python")
8742 (description
8743 "This package provides a text progress bar library for Python. This
8744version only differs from the original @code{progressbar} package in that it
8745uses relative package imports instead of absolute imports, which is necessary
8746for the module to work under Python 3.3.")
8747 ;; Either or both of these licenses may be selected.
8748 (license (list license:lgpl2.1+ license:bsd-3))))
8749
44d10b1f
RW
8750(define-public python-colorama
8751 (package
8752 (name "python-colorama")
8753 (version "0.3.9")
8754 (source
8755 (origin
8756 (method url-fetch)
8757 (uri (pypi-uri "colorama" version))
8758 (sha256
8759 (base32
8760 "1wd1szk0z3073ghx26ynw43gnc140ibln1safgsis6s6z3s25ss8"))))
8761 (build-system python-build-system)
8762 (synopsis "Colored terminal text rendering for Python")
8763 (description "Colorama is a Python library for rendering colored terminal
8764text.")
8765 (home-page "https://pypi.python.org/pypi/colorama")
8766 (license license:bsd-3)))
8767
8768(define-public python2-colorama
8769 (package-with-python2 python-colorama))
8770
8771(define-public python-rsa
8772 (package
8773 (name "python-rsa")
8774 (version "3.4.2")
8775 (source
8776 (origin
8777 (method url-fetch)
8778 (uri (pypi-uri "rsa" version))
8779 (sha256
8780 (base32
8781 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
8782 (build-system python-build-system)
8783 (propagated-inputs
8784 `(("python-pyasn1" ,python-pyasn1)))
8785 (synopsis "Pure-Python RSA implementation")
8786 (description "Python-RSA is a pure-Python RSA implementation. It supports
8787encryption and decryption, signing and verifying signatures, and key
8788generation according to PKCS#1 version 1.5. It can be used as a Python
8789library as well as on the command line.")
8790 (home-page "https://stuvel.eu/rsa")
8791 (license license:asl2.0)))
8792
8793(define-public python2-rsa
8794 (package-with-python2 python-rsa))
8795
8796(define-public python-pluggy
8797 (package
8798 (name "python-pluggy")
e5731c03 8799 (version "0.11.0")
44d10b1f
RW
8800 (source
8801 (origin
8802 (method url-fetch)
8803 (uri (pypi-uri "pluggy" version))
8804 (sha256
8805 (base32
e5731c03 8806 "10511a54dvafw1jrk75mrhml53c7b7w4yaw7241696lc2hfvr895"))))
44d10b1f
RW
8807 (build-system python-build-system)
8808 (native-inputs
8809 `(("python-setuptools-scm" ,python-setuptools-scm)))
8810 (synopsis "Plugin and hook calling mechanism for Python")
8811 (description "Pluggy is an extraction of the plugin manager as used by
8812Pytest but stripped of Pytest specific details.")
8813 (home-page "https://pypi.python.org/pypi/pluggy")
8814 (license license:expat)))
8815
8816(define-public python2-pluggy
8817 (package-with-python2 python-pluggy))
8818
8819(define-public python-tox
8820 (package
8821 (name "python-tox")
8822 (version "2.8.1")
8823 (source
8824 (origin
8825 (method url-fetch)
8826 (uri (pypi-uri "tox" version))
8827 (sha256
8828 (base32
8829 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
8830 (build-system python-build-system)
8831 (arguments
8832 ;; FIXME: Tests require pytest-timeout, which itself requires
8833 ;; pytest>=2.8.0 for installation.
8834 '(#:tests? #f))
8835 (propagated-inputs
8836 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
8837 ("python-py" ,python-py)
8838 ("python-virtualenv" ,python-virtualenv)))
8839 (native-inputs
8840 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
8841 ("python-pytest" ,python-pytest) ; >= 2.3.5
8842 ("python-setuptools-scm" ,python-setuptools-scm)))
8843 (home-page "http://tox.testrun.org/")
8844 (synopsis "Virtualenv-based automation of test activities")
8845 (description "Tox is a generic virtualenv management and test command line
8846tool. It can be used to check that a package installs correctly with
8847different Python versions and interpreters, or run tests in each type of
8848supported environment, or act as a frontend to continuous integration
8849servers.")
8850 (license license:expat)))
8851
8852(define-public python2-tox
8853 (package-with-python2 python-tox))
8854
8855(define-public python-jmespath
8856 (package
8857 (name "python-jmespath")
27fb781f 8858 (version "0.9.4")
44d10b1f
RW
8859 (source
8860 (origin
8861 (method url-fetch)
8862 (uri (pypi-uri "jmespath" version))
8863 (sha256
8864 (base32
27fb781f 8865 "0k0765x1mybcrzajh3hiqkl8sy9hs0bmn4900frxy0j3ykvaxqmx"))))
44d10b1f
RW
8866 (build-system python-build-system)
8867 (native-inputs
8868 `(("python-nose" ,python-nose)))
8869 (synopsis "JSON Matching Expressions")
8870 (description "JMESPath (pronounced “james path”) is a Python library that
8871allows one to declaratively specify how to extract elements from a JSON
8872document.")
8873 (home-page "https://github.com/jmespath/jmespath.py")
8874 (license license:expat)))
8875
8876(define-public python2-jmespath
8877 (package-with-python2 python-jmespath))
8878
8879(define-public python-botocore
8880 (package
7bcf827c
RW
8881 (name "python-botocore")
8882 (version "1.12.149")
8883 (source
8884 (origin
8885 (method url-fetch)
8886 (uri (pypi-uri "botocore" version))
8887 (sha256
8888 (base32
8889 "12597f74khp3ngwr282cb949w0gcqj20rkfc3x275dijavyy5cmf"))))
8890 (build-system python-build-system)
8891 (arguments
8892 ;; FIXME: Many tests are failing.
8893 '(#:tests? #f))
8894 (propagated-inputs
8895 `(("python-dateutil" ,python-dateutil)
8896 ("python-docutils" ,python-docutils)
8897 ("python-jmespath" ,python-jmespath)))
8898 (native-inputs
8899 `(("python-mock" ,python-mock)
8900 ("python-nose" ,python-nose)
8901 ("behave" ,behave)
8902 ("python-tox" ,python-tox)
8903 ("python-urllib3" ,python-urllib3)
8904 ("python-wheel" ,python-wheel)))
8905 (home-page "https://github.com/boto/botocore")
8906 (synopsis "Low-level interface to AWS")
8907 (description "Botocore is a Python library that provides a low-level
44d10b1f 8908interface to the Amazon Web Services (AWS) API.")
7bcf827c 8909 (license license:asl2.0)))
44d10b1f
RW
8910
8911(define-public python2-botocore
8912 (package-with-python2 python-botocore))
8913
8914(define-public python-xdo
8915 (package
8916 (name "python-xdo")
8917 (version "0.3")
8918 (source (origin
8919 (method url-fetch)
8920 (uri (string-append
8921 "http://http.debian.net/debian/pool/main/p/python-xdo/"
8922 "python-xdo_" version ".orig.tar.gz"))
8923 (sha256
8924 (base32
8925 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
8926 (build-system python-build-system)
8927 (arguments
8928 '(#:phases
8929 (modify-phases %standard-phases
8930 (add-before 'install 'patch-libxdo-path
8931 ;; Hardcode the path of dynamically loaded libxdo library.
8932 (lambda* (#:key inputs #:allow-other-keys)
8933 (let ((libxdo (string-append
8934 (assoc-ref inputs "xdotool")
8935 "/lib/libxdo.so")))
8936 (substitute* "xdo/_xdo.py"
8937 (("find_library\\(\"xdo\"\\)")
8938 (simple-format #f "\"~a\"" libxdo)))
8939 #t))))
8940 #:tests? #f)) ; no tests provided
8941 (propagated-inputs
8942 `(("python-six" ,python-six)))
8943 (inputs
8944 `(("xdotool" ,xdotool)
8945 ("libX11" ,libx11)))
8946 (home-page "https://tracker.debian.org/pkg/python-xdo")
8947 (synopsis "Python library for simulating X11 keyboard/mouse input")
8948 (description "Provides bindings to libxdo for manipulating X11 via simulated
8949input. (Note that this is mostly a legacy library; you may wish to look at
8950python-xdo for newer bindings.)")
8951 (license license:bsd-3)))
8952
8953(define-public python2-xdo
8954 (package-with-python2 python-xdo))
8955
8956(define-public python-mako
8957 (package
8958 (name "python-mako")
6bf53ad5 8959 (version "1.1.0")
44d10b1f
RW
8960 (source
8961 (origin
8962 (method url-fetch)
8963 (uri (pypi-uri "Mako" version))
8964 (sha256
8965 (base32
6bf53ad5 8966 "0jqa3qfpykyn4fmkn0kh6043sfls7br8i2bsdbccazcvk9cijsd3"))))
44d10b1f 8967 (build-system python-build-system)
6bf53ad5
MB
8968 (arguments
8969 `(#:phases (modify-phases %standard-phases
8970 (replace 'check
8971 (lambda _
8972 (invoke "pytest" "-vv"))))))
44d10b1f
RW
8973 (propagated-inputs
8974 `(("python-markupsafe" ,python-markupsafe)))
8975 (native-inputs
8976 `(("python-mock" ,python-mock)
44d10b1f 8977 ("python-pytest" ,python-pytest)))
7016e620 8978 (home-page "https://www.makotemplates.org/")
44d10b1f
RW
8979 (synopsis "Templating language for Python")
8980 (description "Mako is a templating language for Python that compiles
8981templates into Python modules.")
8982 (license license:expat)))
8983
8984(define-public python2-mako
8985 (package-with-python2 python-mako))
8986
8987(define-public python-waitress
8988 (package
8989 (name "python-waitress")
8990 (version "1.1.0")
8991 (source
8992 (origin
8993 (method url-fetch)
8994 (uri (pypi-uri "waitress" version))
8995 (patches (search-patches "python-waitress-fix-tests.patch"))
8996 (sha256
8997 (base32
8998 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
8999 (build-system python-build-system)
9000 (home-page "https://github.com/Pylons/waitress")
9001 (synopsis "Waitress WSGI server")
9002 (description "Waitress is meant to be a production-quality pure-Python WSGI
9003server with very acceptable performance.")
9004 (license license:zpl2.1)))
9005
9006(define-public python2-waitress
9007 (package-with-python2 python-waitress))
9008
b2b23d12
TLC
9009(define-public python-whichcraft
9010 (package
9011 (name "python-whichcraft")
9012 (version "0.6.1")
9013 (source
9014 (origin
9015 (method url-fetch)
9016 (uri (pypi-uri "whichcraft" version))
9017 (sha256
9018 (base32
9019 "11yfkzyplizdgndy34vyd5qlmr1n5mxis3a3svxmx8fnccdvknxc"))))
9020 (build-system python-build-system)
9021 (native-inputs
9022 `(("python-pytest" ,python-pytest)))
9023 (home-page "https://github.com/pydanny/whichcraft")
9024 (synopsis "Cross-platform cross-python shutil.which functionality")
9025 (description
9026 "This package provides a shim of the shutil.which function that's
9027designed to work across multiple versions of Python.")
9028 (license license:bsd-3)))
9029
1133ca44
TLC
9030(define-public python-cookiecutter
9031 (package
9032 (name "python-cookiecutter")
9033 (version "1.6.0")
9034 (source
9035 (origin
9036 (method url-fetch)
9037 (uri (pypi-uri "cookiecutter" version))
9038 (sha256
9039 (base32
9040 "0glsvaz8igi2wy1hsnhm9fkn6560vdvdixzvkq6dn20z3hpaa5hk"))))
9041 (build-system python-build-system)
9042 (native-inputs
9043 `(("python-freezegun" ,python-freezegun)
9044 ("python-pytest" ,python-pytest)
9045 ("python-pytest-catchlog" ,python-pytest-catchlog)
9046 ("python-pytest-cov" ,python-pytest-cov)
9047 ("python-pytest-mock" ,python-pytest-mock)))
9048 (propagated-inputs
9049 `(("python-binaryornot" ,python-binaryornot)
9050 ("python-click" ,python-click)
9051 ("python-future" ,python-future)
9052 ("python-jinja2" ,python-jinja2)
9053 ("python-jinja2-time" ,python-jinja2-time)
9054 ("python-poyo" ,python-poyo)
9055 ("python-requests" ,python-requests)
9056 ("python-whichcraft" ,python-whichcraft)))
9057 (home-page "https://github.com/audreyr/cookiecutter")
9058 (synopsis
9059 "Command-line utility that creates projects from project templates")
9060 (description
9061 "This package provides a command-line utility that creates projects from
9062project templates, e.g. creating a Python package project from a Python package
9063project template.")
9064 (license license:bsd-3)))
9065
44d10b1f
RW
9066(define-public python-pyquery
9067 (package
9068 (name "python-pyquery")
9069 (version "1.2.17")
9070 (source
9071 (origin
9072 (method url-fetch)
9073 (uri (pypi-uri "pyquery" version))
9074 (sha256
9075 (base32
9076 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
9077 (build-system python-build-system)
9078 (native-inputs
9079 `(("python-webob" ,python-webob)
9080 ("python-webtest" ,python-webtest)))
9081 (propagated-inputs
9082 `(("python-lxml" ,python-lxml)
9083 ("python-cssselect" ,python-cssselect)))
9084 (home-page "https://github.com/gawel/pyquery")
9085 (synopsis "Make jQuery-like queries on xml documents")
9086 (description "pyquery allows you to make jQuery queries on xml documents.
9087The API is as much as possible the similar to jQuery. pyquery uses lxml for
9088fast xml and html manipulation.")
9089 (license license:bsd-3)))
9090
44d10b1f
RW
9091(define-public python-anyjson
9092 (package
9093 (name "python-anyjson")
9094 (version "0.3.3")
9095 (source
9096 (origin
9097 (method url-fetch)
9098 (uri (pypi-uri "anyjson" version))
9099 (sha256
9100 (base32
9101 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
9102 (build-system python-build-system)
9103 (arguments
9104 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
9105 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
9106 ;; whatever) so this transformation needs to be done before the tests
9107 ;; can be run. Maybe we could add a build step to transform beforehand
9108 ;; but it could be annoying/difficult.
9109 ;; We can enable tests for the Python 2 version, though, and do below.
9110 #:tests? #f))
9111 (home-page "https://bitbucket.org/runeh/anyjson/")
9112 (synopsis
9113 "Wraps best available JSON implementation in a common interface")
9114 (description
9115 "Anyjson loads whichever is the fastest JSON module installed
9116and provides a uniform API regardless of which JSON implementation is used.")
9117 (license license:bsd-3)
9118 (properties `((python2-variant . ,(delay python2-anyjson))))))
9119
9120(define-public python2-anyjson
9121 (let ((anyjson (package-with-python2
9122 (strip-python2-variant python-anyjson))))
9123 (package
9124 (inherit anyjson)
9125 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
9126 #:tests? #t
9127 ,@(package-arguments anyjson)))
9128 (native-inputs `(("python2-nose" ,python2-nose))))))
9129
9130(define-public python-amqp
9131 (package
9132 (name "python-amqp")
9133 (version "2.3.2")
9134 (source
9135 (origin
9136 (method url-fetch)
9137 (uri (pypi-uri "amqp" version))
9138 (sha256
9139 (base32
9140 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
9141 (build-system python-build-system)
9142 (native-inputs
9143 `(("python-case" ,python-case)
9144 ("python-pytest-sugar" ,python-pytest-sugar)
9145 ("python-mock" ,python-mock)))
9146 (propagated-inputs
9147 `(("python-vine" ,python-vine)))
9148 (home-page "https://github.com/celery/py-amqp")
9149 (synopsis
9150 "Low-level AMQP client for Python (fork of amqplib)")
9151 (description
9152 "This is a fork of amqplib which was originally written by Barry Pederson.
9153It is maintained by the Celery project, and used by kombu as a pure python
9154alternative when librabbitmq is not available.")
9155 (license license:lgpl2.1+)
9156 (properties `((python2-variant . ,(delay python2-amqp))))))
9157
9158(define-public python2-amqp
9159 (let ((amqp (package-with-python2
9160 (strip-python2-variant python-amqp))))
9161 (package
9162 (inherit amqp)
9163 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
9164 ;; unmaintained. Weirdly, does not do this on the python 3
9165 ;; version?
9166 #:tests? #f
9167 ,@(package-arguments amqp))))))
9168
9169(define-public python-txamqp
9170 (package
9171 (name "python-txamqp")
9172 (version "0.8.2")
9173 (source
9174 (origin
9175 (method url-fetch)
9176 (uri (pypi-uri "txAMQP" version))
9177 (sha256
9178 (base32
9179 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
9180 (build-system python-build-system)
9181 (propagated-inputs
9182 `(("python-six" ,python-six)
9183 ("python-twisted" ,python-twisted)))
9184 (home-page "https://github.com/txamqp/txamqp")
9185 (synopsis "Communicate with AMQP peers and brokers using Twisted")
9186 (description
9187 "This package provides a Python library for communicating with AMQP peers
9188and brokers using the asynchronous networking framework Twisted. It contains
9189all the necessary code to connect, send and receive messages to/from an
9190AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
9191also includes support for using Thrift RPC over AMQP in Twisted
9192applications.")
9193 (license license:asl2.0)))
9194
9195(define-public python2-txamqp
9196 (package-with-python2 python-txamqp))
9197
9198(define-public python-kombu
9199 (package
9200 (name "python-kombu")
9201 (version "4.2.2")
9202 (source
9203 (origin
9204 (method url-fetch)
9205 (uri (pypi-uri "kombu" version))
9206 (sha256
9207 (base32
9208 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
9209 (build-system python-build-system)
9210 (native-inputs
9211 `(("python-mock" ,python-mock)
9212 ("python-case" ,python-case)
9213 ("python-pyro4" ,python-pyro4)
9214 ("python-pytest-sugar" ,python-pytest-sugar)
9215 ("python-pytz" ,python-pytz)))
9216 (propagated-inputs
9217 `(("python-anyjson" ,python-anyjson)
9218 ("python-amqp" ,python-amqp)
9219 ("python-redis" ,python-redis)))
9220 (home-page "https://kombu.readthedocs.io")
9221 (synopsis "Message passing library for Python")
9222 (description "The aim of Kombu is to make messaging in Python as easy as
9223possible by providing an idiomatic high-level interface for the AMQ protocol,
9224and also provide proven and tested solutions to common messaging problems.
9225AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
9226message orientation, queuing, routing, reliability and security, for which the
9227RabbitMQ messaging server is the most popular implementation.")
9228 (license license:bsd-3)
9229 (properties `((python2-variant . ,(delay python2-kombu))))))
9230
9231(define-public python2-kombu
9232 (let ((kombu (package-with-python2
9233 (strip-python2-variant python-kombu))))
9234 (package
9235 (inherit kombu)
9236 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
9237 ;; It works fine on the python3 variant.
9238 #:tests? #f
9239 ,@(package-arguments kombu)))
9240 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9241 ,@(package-native-inputs kombu))))))
9242
9243(define-public python-billiard
9244 (package
9245 (name "python-billiard")
9246 (version "3.5.0.5")
9247 (source
9248 (origin
9249 (method url-fetch)
9250 (uri (pypi-uri "billiard" version))
9251 (sha256
9252 (base32
9253 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
9254 (build-system python-build-system)
9255 (native-inputs
9256 `(("python-case" ,python-case)
9257 ("python-pytest" ,python-pytest)))
9258 (home-page "https://github.com/celery/billiard")
9259 (synopsis
9260 "Python multiprocessing fork with improvements and bugfixes")
9261 (description
9262 "Billiard is a fork of the Python 2.7 multiprocessing package. The
9263multiprocessing package itself is a renamed and updated version of R Oudkerk's
9264pyprocessing package. This standalone variant is intended to be compatible with
9265Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
9266 (license license:bsd-3)
9267 (properties `((python2-variant . ,(delay python2-billiard))))))
9268
9269(define-public python2-billiard
9270 (let ((billiard (package-with-python2
9271 (strip-python2-variant python-billiard))))
9272 (package
9273 (inherit billiard)
9274 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9275 ("python2-mock" ,python2-mock)
9276 ,@(package-native-inputs billiard))))))
9277
9278(define-public python-celery
9279 (package
9280 (name "python-celery")
9281 (version "4.2.1")
9282 (source
9283 (origin
9284 (method url-fetch)
9285 (uri (pypi-uri "celery" version))
9286 (sha256
9287 (base32
9288 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
9289 (build-system python-build-system)
9290 (arguments
9291 '(;; TODO The tests fail with Python 3.7
9292 ;; https://github.com/celery/celery/issues/4849
9293 #:tests? #f
9294 #:phases
9295 (modify-phases %standard-phases
9296 (add-after 'unpack 'patch-requirements
9297 (lambda _
9298 (substitute* "requirements/test.txt"
9299 (("pytest>=3\\.0,<3\\.3")
9300 "pytest>=3.0"))
9301 #t)))))
9302 (native-inputs
9303 `(("python-case" ,python-case)
9304 ("python-pytest" ,python-pytest)))
9305 (propagated-inputs
9306 `(("python-pytz" ,python-pytz)
9307 ("python-billiard" ,python-billiard)
9308 ("python-kombu" ,python-kombu)))
9309 (home-page "https://celeryproject.org")
9310 (synopsis "Distributed Task Queue")
9311 (description "Celery is an asynchronous task queue/job queue based on
9312distributed message passing. It is focused on real-time operation, but
9313supports scheduling as well. The execution units, called tasks, are executed
9314concurrently on a single or more worker servers using multiprocessing,
9315Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
9316synchronously (wait until ready).")
9317 (license license:bsd-3)
9318 (properties `((python2-variant . ,(delay python2-celery))))))
9319
9320(define-public python2-celery
9321 (let ((celery (package-with-python2
9322 (strip-python2-variant python-celery))))
9323 (package
9324 (inherit celery)
9325 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9326 ("python2-mock" ,python2-mock)
9327 ,@(package-native-inputs celery))))))
9328
9329(define-public python-translitcodec
9330 (package
9331 (name "python-translitcodec")
9332 (version "0.4.0")
9333 (source
9334 (origin
9335 (method url-fetch)
9336 (uri (pypi-uri "translitcodec" version))
9337 (sha256
9338 (base32
9339 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
9340 (build-system python-build-system)
9341 (arguments
9342 `(#:tests? #f)) ; no tests provided
9343 (home-page
9344 "https://github.com/claudep/translitcodec")
9345 (synopsis
9346 "Unicode to 8-bit charset transliteration codec")
9347 (description
9348 "This package contains codecs for transliterating ISO 10646 texts into
9349best-effort representations using smaller coded character sets (ASCII,
9350ISO 8859, etc.).")
9351 (license license:expat)))
9352
9353(define-public python2-translitcodec
9354 (package-with-python2 python-translitcodec))
9355
9356(define-public python-editor
9357 (package
9358 (name "python-editor")
9359 (version "0.5")
9360 (source
9361 (origin
9362 (method url-fetch)
9363 (uri (pypi-uri "python-editor" version))
9364 (sha256
9365 (base32
9366 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
9367 (build-system python-build-system)
9368 (home-page
9369 "https://github.com/fmoo/python-editor")
9370 (synopsis
9371 "Programmatically open an editor, capture the result")
9372 (description
9373 "python-editor is a library that provides the editor module for
9374programmatically interfacing with your system's $EDITOR.")
9375 (license license:asl2.0)))
9376
9377(define-public python2-editor
9378 (package-with-python2 python-editor))
9379
44d10b1f
RW
9380(define-public python-vobject
9381 (package
9382 (name "python-vobject")
9383 (version "0.9.5")
9384 (source (origin
9385 (method url-fetch)
9386 (uri (pypi-uri "vobject" version))
9387 (sha256
9388 (base32
9389 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
9390 (build-system python-build-system)
9391 (arguments
9392 '(;; The test suite relies on some non-portable Windows interfaces.
9393 #:tests? #f))
9394 (propagated-inputs
9395 `(("python-dateutil" ,python-dateutil)
9396 ("python-pyicu" ,python-pyicu)))
9397 (synopsis "Parse and generate vCard and vCalendar files")
9398 (description "Vobject is intended to be a full featured Python package for
9399parsing and generating vCard and vCalendar files. Currently, iCalendar files
9400are supported and well tested. vCard 3.0 files are supported, and all data
9401should be imported, but only a few components are understood in a sophisticated
9402way.")
9403 (home-page "http://eventable.github.io/vobject/")
9404 (license license:asl2.0)))
9405
9406(define-public python2-vobject
9407 (package-with-python2 python-vobject))
9408
9409(define-public python-munkres
9410 (package
9411 (name "python-munkres")
9412 (version "1.0.8")
9413 (source (origin
9414 (method url-fetch)
9415 (uri (pypi-uri "munkres" version))
9416 (sha256
9417 (base32
9418 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
9419 (build-system python-build-system)
9420 (arguments
9421 '(#:tests? #f)) ; no test suite
9422 (home-page "http://software.clapper.org/munkres/")
9423 (synopsis "Implementation of the Munkres algorithm")
9424 (description "The Munkres module provides an implementation of the Munkres
9425algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
9426useful for solving the Assignment Problem.")
9427 (license license:bsd-3)))
9428
9429(define-public python2-munkres
9430 (package-with-python2 python-munkres))
9431
9432(define-public python-whoosh
9433 (package
9434 (name "python-whoosh")
9435 (version "2.7.4")
9436 (source
9437 (origin
9438 (method url-fetch)
9439 (uri (pypi-uri "Whoosh" version))
9440 (sha256
9441 (base32
9442 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
9443 (build-system python-build-system)
2679d9a4 9444 (arguments '(#:tests? #f)) ; Test invocation is no longer supported by Python.
44d10b1f
RW
9445 (native-inputs
9446 `(("python-pytest" ,python-pytest)))
9447 (home-page "https://bitbucket.org/mchaput/whoosh")
9448 (synopsis "Full text indexing, search, and spell checking library")
9449 (description
9450 "Whoosh is a fast, pure-Python full text indexing, search, and spell
9451checking library.")
9452 (license license:bsd-2)))
9453
9454(define-public python2-whoosh
9455 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
9456 (package (inherit whoosh)
9457 (propagated-inputs
9458 `(("python2-backport-ssl-match-hostname"
9459 ,python2-backport-ssl-match-hostname)
9460 ,@(package-propagated-inputs whoosh))))))
9461
9462(define-public python-pathlib
9463 (package
9464 (name "python-pathlib")
9465 (version "1.0.1")
9466 (source (origin
9467 (method url-fetch)
9468 (uri (pypi-uri "pathlib" version))
9469 (sha256
9470 (base32
9471 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
9472 (build-system python-build-system)
9473 ;; The tests depend on the internal "test" module, which does not provide
9474 ;; a stable interface.
9475 (arguments `(#:tests? #f))
9476 (home-page "https://pathlib.readthedocs.org/")
9477 (synopsis "Object-oriented file system paths")
9478 (description "Pathlib offers a set of classes to handle file system paths.
9479It offers the following advantages over using string objects:
9480
9481@enumerate
9482@item No more cumbersome use of os and os.path functions. Everything can
9483be done easily through operators, attribute accesses, and method calls.
9484@item Embodies the semantics of different path types. For example,
9485comparing Windows paths ignores casing.
9486@item Well-defined semantics, eliminating any inconsistencies or
9487ambiguities (forward vs. backward slashes, etc.).
9488@end enumerate
9489
9490Note: In Python 3.4, pathlib is now part of the standard library. For other
9491Python versions please consider python-pathlib2 instead, which tracks the
9492standard library module. This module (python-pathlib) isn't maintained
9493anymore.")
9494 (license license:expat)))
9495
9496(define-public python2-pathlib
9497 (package-with-python2 python-pathlib))
9498
9499(define-public python2-pathlib2
9500 (package
9501 (name "python2-pathlib2")
54da6f9f 9502 (version "2.3.3")
44d10b1f
RW
9503 (source (origin
9504 (method url-fetch)
9505 (uri (pypi-uri "pathlib2" version))
9506 (sha256
9507 (base32
54da6f9f 9508 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
44d10b1f
RW
9509 (build-system python-build-system)
9510 ;; We only need the the Python 2 variant, since for Python 3 our minimum
9511 ;; version is 3.4 which already includes this package as part of the
9512 ;; standard library.
9513 (arguments
9514 `(#:python ,python-2))
9515 (propagated-inputs
9516 `(("python2-scandir" ,python2-scandir)
9517 ("python2-six" ,python2-six)))
9518 (home-page "https://pypi.python.org/pypi/pathlib2/")
9519 (synopsis "Object-oriented file system paths - backport of standard
9520pathlib module")
9521 (description "The goal of pathlib2 is to provide a backport of standard
9522pathlib module which tracks the standard library module, so all the newest
9523features of the standard pathlib can be used also on older Python versions.
9524
9525Pathlib offers a set of classes to handle file system paths. It offers the
9526following advantages over using string objects:
9527
9528@enumerate
9529@item No more cumbersome use of os and os.path functions. Everything can
9530be done easily through operators, attribute accesses, and method calls.
9531@item Embodies the semantics of different path types. For example,
9532comparing Windows paths ignores casing.
9533@item Well-defined semantics, eliminating any inconsistencies or
9534ambiguities (forward vs. backward slashes, etc.).
9535@end enumerate")
9536 (license license:expat)))
9537
9538(define-public python2-pathlib2-bootstrap
9539 (hidden-package
9540 (package
9541 (inherit python2-pathlib2)
9542 (name "python2-pathlib2-bootstrap")
9543 (propagated-inputs
9544 `(("python2-scandir" ,python2-scandir)
9545 ("python2-six" ,python2-six-bootstrap))))))
9546
9547(define-public python-jellyfish
9548 (package
9549 (name "python-jellyfish")
9550 (version "0.5.6")
9551 (source (origin
9552 (method url-fetch)
9553 (uri (pypi-uri "jellyfish" version))
9554 (sha256
9555 (base32
9556 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
9557 (build-system python-build-system)
9558 (native-inputs
9559 `(("python-pytest" ,python-pytest)))
9560 (home-page "https://github.com/jamesturk/jellyfish")
9561 (synopsis "Approximate and phonetic matching of strings")
9562 (description "Jellyfish uses a variety of string comparison and phonetic
9563encoding algorithms to do fuzzy string matching.")
9564 (license license:bsd-2)
9565 (properties `((python2-variant . ,(delay python2-jellyfish))))))
9566
9567(define-public python2-jellyfish
9568 (let ((jellyfish (package-with-python2
9569 (strip-python2-variant python-jellyfish))))
9570 (package (inherit jellyfish)
9571 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
9572 ,@(package-native-inputs jellyfish))))))
9573
9574(define-public python2-unicodecsv
9575 (package
9576 (name "python2-unicodecsv")
9577 (version "0.14.1")
9578 (source (origin
f711b71b 9579 (method git-fetch)
44d10b1f
RW
9580 ;; The test suite is not included in the PyPi release.
9581 ;; https://github.com/jdunck/python-unicodecsv/issues/19
f711b71b
EF
9582 (uri (git-reference
9583 (url "https://github.com/jdunck/python-unicodecsv")
9584 (commit version)))
9585 (file-name (git-file-name name version))
44d10b1f
RW
9586 (sha256
9587 (base32
f711b71b 9588 "15hx2k41a2lpv4hcml9zp4cvlx1171mnb5s4s13xc1pxkq3vgdjy"))))
44d10b1f
RW
9589 (build-system python-build-system)
9590 (arguments
9591 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
9592 #:python ,python-2))
9593 (native-inputs
9594 `(("python2-unittest2" ,python2-unittest2)))
9595 (home-page "https://github.com/jdunck/python-unicodecsv")
9596 (synopsis "Unicode CSV module for Python 2")
9597 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
9598module, adding support for Unicode strings.")
9599 (license license:bsd-2)))
9600
9601(define-public python-rarfile
9602 (package
9603 (name "python-rarfile")
9604 (version "2.8")
9605 (source (origin
9606 (method url-fetch)
9607 (uri (pypi-uri "rarfile" version))
9608 (sha256
9609 (base32
9610 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
9611 (build-system python-build-system)
9612 (arguments
9613 '(#:phases
9614 (modify-phases %standard-phases
9615 (replace 'check
9616 ;; Many tests fail, but the installation proceeds.
e59dd341 9617 (lambda _ (invoke "make" "-C" "test" "test"))))))
44d10b1f
RW
9618 (native-inputs
9619 `(("which" ,which))) ; required for tests
9620 (propagated-inputs
9621 `(("libarchive" ,libarchive)))
9622 (home-page "https://github.com/markokr/rarfile")
9623 (synopsis "RAR archive reader for Python")
9624 (description "This is Python module for RAR archive reading. The interface
9625is made as zipfile like as possible.")
9626 (license license:isc)))
9627
9628(define-public python2-rarfile
9629 (package-with-python2 python-rarfile))
9630
9631(define-public python-magic
9632 (package
9633 (name "python-magic")
9634 (version "0.4.15")
9635 (source
9636 (origin
9637 (method url-fetch)
9638 (uri (pypi-uri "python-magic" version))
9639 (sha256
9640 (base32
9641 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
9642 (file-name (string-append name "-" version "-checkout"))))
9643 (build-system python-build-system)
9644 (arguments
9645 ;; The tests are unreliable, so don't run them. The tests fail
9646 ;; under Python3 because they were written for Python2 and
9647 ;; contain import statements that do not work in Python3. One of
9648 ;; the tests fails under Python2 because its assertions are
9649 ;; overly stringent; it relies on comparing output strings which
9650 ;; are brittle and can change depending on the version of
9651 ;; libmagic being used and the system on which the test is
9652 ;; running. In my case, under GuixSD 0.10.0, only one test
9653 ;; failed, and it seems to have failed only because the version
9654 ;; of libmagic that is packaged in Guix outputs a slightly
9655 ;; different (but not wrong) string than the one that the test
9656 ;; expected.
9657 '(#:tests? #f
9658 #:phases (modify-phases %standard-phases
9659 ;; Replace a specific method call with a hard-coded
9660 ;; path to the necessary libmagic.so file in the
9661 ;; store. If we don't do this, then the method call
9662 ;; will fail to find the libmagic.so file, which in
9663 ;; turn will cause any application using
9664 ;; python-magic to fail.
9665 (add-before 'build 'hard-code-path-to-libmagic
9666 (lambda* (#:key inputs #:allow-other-keys)
9667 (let ((file (assoc-ref inputs "file")))
9668 (substitute* "magic.py"
9669 (("ctypes.util.find_library\\('magic'\\)")
9670 (string-append "'" file "/lib/libmagic.so'")))
9671 #t)))
9672 (add-before 'install 'disable-egg-compression
9673 (lambda _
9674 (let ((port (open-file "setup.cfg" "a")))
9675 (display "\n[easy_install]\nzip_ok = 0\n"
9676 port)
9677 (close-port port)
9678 #t))))))
9679 (inputs
9680 ;; python-magic needs to be able to find libmagic.so.
9681 `(("file" ,file)))
9682 (home-page
9683 "https://github.com/ahupp/python-magic")
9684 (synopsis
9685 "File type identification using libmagic")
9686 (description
9687 "This module uses ctypes to access the libmagic file type
9688identification library. It makes use of the local magic database and
9689supports both textual and MIME-type output. Note that this module and
9690the python-file module both provide a \"magic.py\" file; these two
9691modules, which are different and were developed separately, both serve
9692the same purpose: to provide Python bindings for libmagic.")
9693 (license license:expat)))
9694
9695(define-public python2-magic
9696 (package-with-python2 python-magic))
9697
9698(define-public python2-s3cmd
9699 (package
9700 (name "python2-s3cmd")
9701 (version "1.6.1")
9702 (source
9703 (origin
9704 (method url-fetch)
9705 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
9706 "s3cmd-" version ".tar.gz"))
9707 (sha256
9708 (base32
9709 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
9710 (build-system python-build-system)
9711 (arguments
9712 ;; s3cmd is written for python2 only and contains no tests.
9713 `(#:python ,python-2
9714 #:tests? #f))
9715 (propagated-inputs
9716 `(("python2-dateutil" ,python2-dateutil)
9717 ;; The python-file package also provides a magic.py module.
9718 ;; This is an unfortunate state of affairs; however, s3cmd
9719 ;; fails to install if it cannot find specifically the
9720 ;; python-magic package. Thus we include it, instead of using
9721 ;; python-file. Ironically, s3cmd sometimes works better
9722 ;; without libmagic bindings at all:
9723 ;; https://github.com/s3tools/s3cmd/issues/198
9724 ("python2-magic" ,python2-magic)))
9725 (home-page "http://s3tools.org/s3cmd")
9726 (synopsis "Command line tool for S3-compatible storage services")
9727 (description
9728 "S3cmd is a command line tool for uploading, retrieving and managing data
9729in storage services that are compatible with the Amazon Simple Storage
9730Service (S3) protocol, including S3 itself. It supports rsync-like backup,
9731GnuPG encryption, and more. It also supports management of Amazon's
9732CloudFront content delivery network.")
9733 (license license:gpl2+)))
9734
9735(define-public python-pkgconfig
9736 (package
9737 (name "python-pkgconfig")
9738 (version "1.3.1")
9739 (source
9740 (origin
9741 (method url-fetch)
9742 (uri (pypi-uri "pkgconfig" version))
9743 (sha256
9744 (base32
9745 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
9746 (build-system python-build-system)
9747 (native-inputs
9748 `(("python-nose" ,python-nose)))
9749 (inputs
9750 `(("pkg-config" ,pkg-config)))
9751 (arguments
9752 `(#:phases
9753 (modify-phases %standard-phases
9754 (add-before 'build 'patch
9755 ;; Hard-code the path to pkg-config.
9756 (lambda _
9757 (substitute* "pkgconfig/pkgconfig.py"
9758 (("cmd = 'pkg-config")
9759 (string-append "cmd = '" (which "pkg-config"))))
9760 #t))
9761 (replace 'check
9762 (lambda _
9763 (invoke "nosetests" "test.py"))))))
9764 (home-page "https://github.com/matze/pkgconfig")
9765 (synopsis "Python interface for pkg-config")
9766 (description "This module provides a Python interface to pkg-config. It
9767can be used to find all pkg-config packages, check if a package exists,
9768check if a package meets certain version requirements, query CFLAGS and
9769LDFLAGS and parse the output to build extensions with setup.py.")
9770 (license license:expat)))
9771
9772(define-public python2-pkgconfig
9773 (package-with-python2 python-pkgconfig))
9774
9775(define-public python-bz2file
9776 (package
9777 (name "python-bz2file")
9778 (version "0.98")
9779 (source
9780 (origin
9781 (method url-fetch)
9782 (uri (pypi-uri "bz2file" version))
9783 (sha256
9784 (base32
9785 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
9786 (build-system python-build-system)
9787 (arguments
9788 `(#:tests? #f)) ; Tests use deprecated python modules.
9789 (home-page "https://github.com/nvawda/bz2file")
9790 (synopsis "Read and write bzip2-compressed files")
9791 (description
9792 "Bz2file is a Python library for reading and writing bzip2-compressed
9793files. It contains a drop-in replacement for the I/O interface in the
9794standard library's @code{bz2} module, including features from the latest
9795development version of CPython that are not available in older releases.")
9796 (license license:asl2.0)))
9797
9798(define-public python2-bz2file
9799 (package-with-python2 python-bz2file))
9800
9801(define-public python-future
9802 (package
9803 (name "python-future")
d5d54030 9804 (version "0.17.1")
44d10b1f
RW
9805 (source
9806 (origin
9807 (method url-fetch)
9808 (uri (pypi-uri "future" version))
9809 (sha256
9810 (base32
d5d54030 9811 "1f2rlqn9rh7adgir52dlbqz69gsab44x0mlm8gf1cs7xvhv54137"))))
44d10b1f
RW
9812 (build-system python-build-system)
9813 ;; Many tests connect to the network or are otherwise flawed.
9814 ;; https://github.com/PythonCharmers/python-future/issues/210
9815 (arguments
9816 `(#:tests? #f))
9817 (home-page "http://python-future.org")
9818 (synopsis "Single-source support for Python 3 and 2")
9819 (description
9820 "@code{python-future} is the missing compatibility layer between Python 2 and
9821Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
9822to support both Python 2 and Python 3 with minimal overhead.")
9823 (license license:expat)))
9824
9825(define-public python2-future
9826 (package-with-python2 python-future))
9827
9828(define-public python-cysignals
9829 (package
9830 (name "python-cysignals")
8e3e51df 9831 (version "1.9.0")
44d10b1f
RW
9832 (source
9833 (origin
9834 (method url-fetch)
8e3e51df 9835 (uri (pypi-uri "cysignals" version))
44d10b1f
RW
9836 (sha256
9837 (base32
8e3e51df 9838 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
44d10b1f
RW
9839 (build-system python-build-system)
9840 (native-inputs
9841 `(("python-cython" ,python-cython)
9842 ("python-sphinx" ,python-sphinx)))
9843 (inputs
9844 `(("pari-gp" ,pari-gp)))
9845 (arguments
9846 `(#:modules ((guix build python-build-system)
9847 ((guix build gnu-build-system) #:prefix gnu:)
9848 (guix build utils))
9849 ;; FIXME: Tests are executed after installation and currently fail
9850 ;; when not installing into standard locations; the author is working
9851 ;; on a fix.
9852 #:tests? #f
9853 #:phases
9854 (modify-phases %standard-phases
9855 (add-before
9856 'build 'configure
9857 (assoc-ref gnu:%standard-phases 'configure)))))
9858 (home-page
9859 "https://github.com/sagemath/cysignals")
9860 (synopsis
9861 "Handling of interrupts and signals for Cython")
9862 (description
9863 "The cysignals package provides mechanisms to handle interrupts (and
9864other signals and errors) in Cython code, using two related approaches,
9865for mixed Cython/Python code or external C libraries and pure Cython code,
9866respectively.")
9867 (license license:lgpl3+)))
9868
9869(define-public python2-cysignals
9870 (package-with-python2 python-cysignals))
9871
9872(define-public python2-shedskin
9873 (package
9874 (name "python2-shedskin")
9875 (version "0.9.4")
9876 (source
9877 (origin
9878 (method url-fetch)
9879 (uri (string-append "https://github.com/shedskin/shedskin/"
9880 "releases/download/v" version
9881 "/shedskin-" version ".tgz"))
9882 (sha256
9883 (base32
9884 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
9885 (build-system python-build-system)
9886 (arguments
9887 `(#:python ,python-2
9888 #:phases (modify-phases %standard-phases
9889 (add-after 'unpack 'fix-resulting-include-libs
9890 (lambda* (#:key inputs #:allow-other-keys)
9891 (let ((libgc (assoc-ref inputs "libgc"))
9892 (pcre (assoc-ref inputs "pcre")))
9893 (substitute* "shedskin/makefile.py"
9894 (("variable == 'CCFLAGS':[ ]*")
9895 (string-append "variable == 'CCFLAGS':\n"
9896 " line += ' -I " pcre "/include"
9897 " -I " libgc "/include'"))
9898 (("variable == 'LFLAGS':[ ]*")
9899 (string-append "variable == 'LFLAGS':\n"
9900 " line += ' -L" pcre "/lib"
9901 " -L " libgc "/lib'")))
9902 #t))))))
9903 (inputs `(("pcre" ,pcre)
9904 ("libgc" ,libgc)))
9905 (home-page "https://shedskin.github.io/")
9906 (synopsis "Experimental Python-2 to C++ Compiler")
9907 (description (string-append "This is an experimental compiler for a subset of
9908Python. It generates C++ code and a Makefile."))
9909 (license (list license:gpl3 license:bsd-3 license:expat))))
9910
9911(define-public python2-rope
9912 (package
9913 (name "python2-rope")
a9ba0a31 9914 (version "0.11.0")
44d10b1f
RW
9915 (source
9916 (origin
9917 (method url-fetch)
9918 (uri (pypi-uri "rope" version))
9919 (sha256
9920 (base32
a9ba0a31 9921 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
44d10b1f 9922 (arguments
afb29715 9923 ;; Rope has only partial python3 support, see `python-rope'
44d10b1f
RW
9924 `(#:python ,python-2))
9925 (build-system python-build-system)
9926 (native-inputs
9927 `(("python2-unittest2" ,python2-unittest2)))
9928 (home-page "https://github.com/python-rope/rope")
9929 (synopsis "Refactoring library for Python")
9930 (description "Rope is a refactoring library for Python. It facilitates
9931the renaming, moving and extracting of attributes, functions, modules, fields
9932and parameters in Python 2 source code. These refactorings can also be applied
9933to occurrences in strings and comments.")
9934 (license license:gpl2)))
9935
2c880ef4
LC
9936(define-public python-rope
9937 (package
9938 (inherit python2-rope)
9939 (name "python-rope")
9940 (arguments `(#:python ,python-wrapper
9941 ;; XXX: Only partial python3 support, results in some failing
9942 ;; tests: <https://github.com/python-rope/rope/issues/247>.
9943 #:tests? #f))
9944 (properties `((python2-variant . ,(delay python2-rope))))))
9945
44d10b1f
RW
9946(define-public python-py3status
9947 (package
9948 (name "python-py3status")
ef68b35d 9949 (version "3.21")
44d10b1f
RW
9950 (source
9951 (origin
9952 (method url-fetch)
9953 (uri (pypi-uri "py3status" version))
9954 (sha256
ef68b35d 9955 (base32 "16z8zq83hxy48g6hh4xczbdz50qvxv9k1aahr4fqq7jis60cc262"))))
44d10b1f
RW
9956 (build-system python-build-system)
9957 (inputs
9958 `(("file" ,file)))
9959 (arguments
9960 '(#:phases
9961 (modify-phases %standard-phases
9962 ;; 'file' is used for detection of configuration file encoding
9963 ;; let's make link the dependency to particular input
9964 (add-before 'build 'patch-file-path
9965 (lambda* (#:key inputs #:allow-other-keys)
9966 (let ((file-path (assoc-ref inputs "file")))
9967 (substitute* "py3status/parse_config.py"
6a6b8a3f 9968 (("\\[\"file\", \"-b\"")
44d10b1f
RW
9969 (string-append "['" file-path "/bin/file', '-b'")))
9970 #t))))
9971 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
9972 (home-page "https://github.com/ultrabug/py3status")
9973 (synopsis "Extensible i3status wrapper written in Python")
9974 (description "py3status is an i3status wrapper which extends i3status
9975functionality in a modular way, allowing you to extend your panel with your
9976own code, responding to click events and updating clock every second.")
9977 (license license:bsd-3)))
9978
9979(define-public python-tblib
9980 (package
9981 (name "python-tblib")
9982 (version "1.3.2")
9983 (source (origin
9984 (method url-fetch)
9985 (uri (pypi-uri "tblib" version))
9986 (sha256 (base32
9987 "1rsg8h069kqgncyv8fgzyj6qflk6j10cb78pa5jk34ixwq044vj3"))))
9988 (build-system python-build-system)
9989 (arguments
9990 `(#:phases
9991 (modify-phases %standard-phases
9992 (add-before 'check 'adjust-tests
9993 (lambda _
9994 (when (which "python3")
9995 ;; Adjust the example output to match that of Python 3.7:
9996 ;; <https://github.com/ionelmc/python-tblib/issues/36>.
9997 (substitute* "README.rst"
9998 (("Exception\\('fail',") "Exception('fail'"))
9999 #t)))
10000 (replace 'check
10001 (lambda _
10002 ;; Upstream runs tests after installation and the package itself
10003 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
10004 ;; found.
10005 (setenv "PYTHONPATH"
10006 (string-append (getcwd) "/build/lib:"
10007 (getenv "PYTHONPATH")))
10008 (invoke "py.test" "-vv" "tests" "README.rst"))))))
10009 (native-inputs
10010 `(("python-pytest" ,python-pytest)
10011 ("python-six" ,python-six)))
10012 (home-page "https://github.com/ionelmc/python-tblib")
10013 (synopsis "Traceback serialization library")
10014 (description
10015 "Traceback serialization allows you to:
10016
10017@enumerate
10018@item Pickle tracebacks and raise exceptions with pickled tracebacks in
10019different processes. This allows better error handling when running code over
10020multiple processes (imagine multiprocessing, billiard, futures, celery etc).
10021
10022@item Parse traceback strings and raise with the parsed tracebacks.
10023@end enumerate\n")
10024 (license license:bsd-3)))
10025
10026(define-public python2-tblib
10027 (package-with-python2 python-tblib))
10028
10029(define-public python-greenlet
10030 (package
10031 (name "python-greenlet")
10032 (version "0.4.15")
10033 (source (origin
10034 (method url-fetch)
10035 (uri (pypi-uri "greenlet" version))
10036 (sha256
10037 (base32
10038 "1g4g1wwc472ds89zmqlpyan3fbnzpa8qm48z3z1y6mlk44z485ll"))))
10039 (build-system python-build-system)
10040 (home-page "https://greenlet.readthedocs.io/")
10041 (synopsis "Lightweight in-process concurrent programming")
10042 (description
10043 "Greenlet package is a spin-off of Stackless, a version of CPython
10044that supports micro-threads called \"tasklets\". Tasklets run
10045pseudo-concurrently (typically in a single or a few OS-level threads) and
10046are synchronized with data exchanges on \"channels\".")
10047 (license (list license:psfl license:expat))))
10048
10049(define-public python2-greenlet
10050 (package-with-python2 python-greenlet))
10051
10052(define-public python-objgraph
10053 (package
10054 (name "python-objgraph")
eebc03bb 10055 (version "3.4.1")
44d10b1f
RW
10056 (source
10057 (origin
10058 (method url-fetch)
10059 (uri (pypi-uri "objgraph" version))
10060 (sha256
10061 (base32
eebc03bb 10062 "19qmqsh984zq1rzzjy4vqnmviaqnymcyl8h7z99pnicbgwnm2adz"))))
44d10b1f
RW
10063 (build-system python-build-system)
10064 (propagated-inputs
10065 `(("python-graphviz" ,python-graphviz)))
10066 (native-inputs
10067 `(("python-mock" ,python-mock)
10068 ("graphviz" ,graphviz)))
10069 (home-page "https://mg.pov.lt/objgraph/")
10070 (synopsis "Draw Python object reference graphs with graphviz")
10071 (description
10072 "This package provides tools to draw Python object reference graphs with
10073graphviz.")
10074 (license license:expat)))
10075
ffe58d1d
MB
10076(define-public python2-objgraph
10077 (package-with-python2 python-objgraph))
10078
44d10b1f
RW
10079(define-public python-gevent
10080 (package
10081 (name "python-gevent")
10082 (version "1.3.7")
10083 (source (origin
10084 (method url-fetch)
10085 (uri (pypi-uri "gevent" version))
10086 (sha256
10087 (base32
10088 "0b0fr04qdk1p4sniv87fh8z5psac60x01pv054kpgi94520g81iz"))
10089 (modules '((guix build utils)))
10090 (snippet
10091 '(begin
10092 ;; unbunding libev and c-ares
10093 (delete-file-recursively "deps")
10094 #t))))
10095 (build-system python-build-system)
10096 (arguments
10097 `(#:modules ((ice-9 ftw)
10098 (ice-9 match)
10099 (srfi srfi-26)
10100 (guix build utils)
10101 (guix build python-build-system))
10102 #:phases (modify-phases %standard-phases
44d10b1f
RW
10103 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
10104 (lambda _
10105 (substitute* "src/gevent/subprocess.py"
10106 (("/bin/sh") (which "sh")))
10107 (for-each (lambda (file)
10108 (substitute* file
10109 (("/bin/sh") (which "sh"))
10110 (("/bin/true") (which "true"))))
10111 (find-files "src/greentest" "\\.py$"))
10112 #t))
10113 (add-before 'build 'do-not-use-bundled-sources
10114 (lambda* (#:key inputs #:allow-other-keys)
10115 (setenv "CONFIG_SHELL" (which "bash"))
10116 (setenv "LIBEV_EMBED" "false")
10117 (setenv "CARES_EMBED" "false")
10118 (setenv "EMBED" "false")
10119
b5b56b7f
MB
10120 ;; Prevent building bundled libev.
10121 (substitute* "setup.py"
10122 (("run_make=_BUILDING")
10123 "run_make=False"))
10124
44d10b1f
RW
10125 (let ((greenlet (string-append
10126 (assoc-ref inputs "python-greenlet")
10127 "/include")))
10128 (match (scandir greenlet
10129 (lambda (item)
10130 (string-prefix? "python" item)))
10131 ((python)
b5b56b7f 10132 (setenv "C_INCLUDE_PATH"
44d10b1f
RW
10133 (string-append greenlet "/" python)))))
10134 #t))
10135 (add-before 'check 'skip-timer-test
10136 (lambda _
10137 ;; XXX: Skip 'TestTimerResolution', which appears to be
10138 ;; unreliable.
10139 (substitute* "src/greentest/test__core_timer.py"
10140 (("not greentest.RUNNING_ON_CI") "False"))
10141 #t))
10142 (replace 'check
10143 (lambda _
10144 ;; Make sure the build directory is on PYTHONPATH.
10145 (setenv "PYTHONPATH"
10146 (string-append
10147 (getenv "PYTHONPATH") ":"
10148 (getcwd) "/build/"
10149 (car (scandir "build" (cut string-prefix? "lib." <>)))))
10150 (with-directory-excursion "src/greentest"
10151 ;; XXX: Many tests require network access. Instead we only
10152 ;; run known-good tests. Unfortunately we cannot use
10153 ;; recursion here since this directory also contains
10154 ;; Python-version-specific subfolders.
10155 (apply invoke "python" "testrunner.py" "--config"
10156 "known_failures.py"
10157 (scandir "." (cut regexp-exec
10158 (make-regexp "test_+(subprocess|core)")
10159 <>)))))))))
10160 (propagated-inputs
10161 `(("python-greenlet" ,python-greenlet)
10162 ("python-objgraph" ,python-objgraph)))
10163 (native-inputs
b5b56b7f 10164 `(("python-six" ,python-six)))
44d10b1f
RW
10165 (inputs
10166 `(("c-ares" ,c-ares)
10167 ("libev" ,libev)))
10168 (home-page "http://www.gevent.org/")
10169 (synopsis "Coroutine-based network library")
10170 (description
10171 "gevent is a coroutine-based Python networking library that uses greenlet
10172to provide a high-level synchronous API on top of the libev event loop.")
10173 (license license:expat)
10174 (properties `((python2-variant . ,(delay python2-gevent))))))
10175
10176(define-public python2-gevent
10177 (let ((base (package-with-python2
10178 (strip-python2-variant python-gevent))))
10179 (package
10180 (inherit base)
10181 (native-inputs `(,@(package-native-inputs python-gevent)
10182 ("python-mock" ,python2-mock))))))
10183
10184(define-public python-fastimport
10185 (package
10186 (name "python-fastimport")
10187 (version "0.9.6")
10188 (source
10189 (origin
10190 (method url-fetch)
10191 (uri (pypi-uri "fastimport" version))
10192 (sha256
10193 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
10194 (build-system python-build-system)
10195 (home-page "https://github.com/jelmer/python-fastimport")
10196 (synopsis "VCS fastimport parser and generator in Python")
10197 (description "This package provides a parser for and generator of the Git
10198@url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
10199format.")
10200 (license license:gpl2+)))
10201
10202(define-public python2-fastimport
10203 (package-with-python2 python-fastimport))
10204
10205(define-public python-twisted
10206 (package
10207 (name "python-twisted")
fdfad2fc 10208 (version "19.7.0")
44d10b1f
RW
10209 (source (origin
10210 (method url-fetch)
10211 (uri (pypi-uri "Twisted" version ".tar.bz2"))
10212 (sha256
10213 (base32
fdfad2fc 10214 "17d3hnxv9qndagzz63mdpyk99xj63p9gq586vjn0rxk8cl197nym"))))
44d10b1f
RW
10215 (build-system python-build-system)
10216 (arguments
0107c9b8 10217 '(#:tests? #f)) ; FIXME: some tests fail
44d10b1f
RW
10218 (propagated-inputs
10219 `(("python-zope-interface" ,python-zope-interface)
52ca1c4a 10220 ("python-pyhamcrest" ,python-pyhamcrest)
44d10b1f 10221 ("python-incremental" ,python-incremental)
e5ba2fe3 10222 ("python-hyperlink" ,python-hyperlink)
44d10b1f
RW
10223 ("python-constantly" ,python-constantly)
10224 ("python-automat" ,python-automat)))
10225 (home-page "https://twistedmatrix.com/")
10226 (synopsis "Asynchronous networking framework written in Python")
10227 (description
10228 "Twisted is an extensible framework for Python programming, with special
10229focus on event-based network programming and multiprotocol integration.")
10230 (license license:expat)))
10231
10232(define-public python2-twisted
10233 (package-with-python2 python-twisted))
10234
10235(define-public python-pika
10236 (package
10237 (name "python-pika")
10238 (version "0.12.0")
10239 (source
10240 (origin
10241 (method url-fetch)
10242 (uri (pypi-uri "pika" version))
10243 (sha256
10244 (base32
10245 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
10246 (build-system python-build-system)
10247 (native-inputs
10248 `(("python-pyev" ,python-pyev)
10249 ("python-tornado" ,python-tornado)
10250 ("python-twisted" ,python-twisted)))
10251 (home-page "https://pika.readthedocs.org")
10252 (synopsis "Pure Python AMQP Client Library")
10253 (description
10254 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
10255Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
10256network support library.")
10257 (license license:bsd-3)))
10258
10259(define-public python2-pika
10260 (package-with-python2 python-pika))
10261
10262(define-public python-ply
10263 (package
10264 (name "python-ply")
10265 (version "3.10")
10266 (source
10267 (origin
10268 (method url-fetch)
10269 (uri (pypi-uri "ply" version))
10270 (sha256
10271 (base32
10272 "1jxsr1d2f732r6ljhvm827113dckwl6qwakfvpbdhcbhvpvlmscn"))))
10273 (build-system python-build-system)
10274 (home-page "http://www.dabeaz.com/ply/")
10275 (synopsis "Python Lex & Yacc")
10276 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
10277It uses LR parsing and does extensive error checking.")
10278 (license license:bsd-3)))
10279
10280(define-public python2-ply
10281 (package-with-python2 python-ply))
10282
10283(define-public python-tabulate
10284 (package
10285 (name "python-tabulate")
10286 (version "0.7.7")
10287 (source (origin
10288 (method url-fetch)
10289 (uri (pypi-uri "tabulate" version))
10290 (sha256
10291 (base32
10292 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
10293 (build-system python-build-system)
10294 (arguments
10295 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
10296 ;; and the latest release is not tagged in the upstream repository.
10297 '(#:tests? #f))
10298 (home-page "https://bitbucket.org/astanin/python-tabulate")
10299 (synopsis "Pretty-print tabular data")
10300 (description
10301 "Tabulate is a library and command-line utility to pretty-print tabular
10302data in Python.")
10303 (license license:expat)))
10304
10305(define-public python2-tabulate
10306 (package-with-python2 python-tabulate))
10307
10308(define-public python-kazoo
10309 (package
10310 (name "python-kazoo")
10311 (version "2.4.0")
10312 (source
10313 (origin
10314 (method url-fetch)
10315 (uri (pypi-uri "kazoo" version))
10316 (sha256
10317 (base32
10318 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
10319 (build-system python-build-system)
10320 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
10321 (propagated-inputs
10322 `(("python-six" ,python-six)))
10323 (home-page "https://kazoo.readthedocs.org")
10324 (synopsis "High-level Zookeeper client library")
10325 (description
10326 "Kazoo is a Python client library for the Apache Zookeeper distributed
10327application service. It is designed to be easy to use and to avoid common
10328programming errors.")
10329 (license license:asl2.0)))
10330
10331(define-public python2-kazoo
10332 (package-with-python2 python-kazoo))
10333
10334(define-public python-pykafka
10335 (package
10336 (name "python-pykafka")
10337 (version "2.4.0")
10338 (source (origin
10339 (method url-fetch)
0ca1d040 10340 (uri (pypi-uri "pykafka" version))
44d10b1f
RW
10341 (sha256
10342 (base32
10343 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
10344 (build-system python-build-system)
10345 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
10346 (propagated-inputs
10347 `(("python-gevent" ,python-gevent)
10348 ("python-kazoo" ,python-kazoo)
10349 ("python-tabulate" ,python-tabulate)))
10350 (inputs
10351 `(("librdkafka" ,librdkafka)))
10352 (home-page "https://pykafka.readthedocs.io/")
10353 (synopsis "Apache Kafka client for Python")
10354 (description
10355 "PyKafka is a client for the Apache Kafka distributed messaging system.
10356It includes Python implementations of Kafka producers and consumers, which
10357are optionally backed by a C extension built on librdkafka.")
10358 (license license:asl2.0)))
10359
10360(define-public python2-pykafka
10361 (package-with-python2 python-pykafka))
10362
10363(define-public python-wcwidth
28ac442b
MB
10364 (package
10365 (name "python-wcwidth")
574a71a7 10366 (version "0.1.8")
28ac442b
MB
10367 (source (origin
10368 (method url-fetch)
10369 (uri (pypi-uri "wcwidth" version))
10370 (sha256
10371 (base32
574a71a7 10372 "1a1pzds3xzfylm5mnc5f6c1p8kiig0daqjc9gygd9rc3cj53x2zj"))))
28ac442b
MB
10373 (build-system python-build-system)
10374 (home-page "https://github.com/jquast/wcwidth")
10375 (synopsis "Measure number of terminal column cells of wide-character codes")
10376 (description "Wcwidth measures the number of terminal column cells of
44d10b1f
RW
10377wide-character codes. It is useful for those implementing a terminal emulator,
10378or programs that carefully produce output to be interpreted by one. It is a
10379Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
10380specified in POSIX.1-2001 and POSIX.1-2008.")
28ac442b 10381 (license license:expat)))
44d10b1f
RW
10382
10383(define-public python2-wcwidth
10384 (package-with-python2 python-wcwidth))
10385
10386(define-public python2-jsonrpclib
10387 (package
10388 (name "python2-jsonrpclib")
10389 (version "0.1.7")
10390 (source (origin
10391 (method url-fetch)
6571bba0 10392 (uri (pypi-uri "jsonrpclib" version))
44d10b1f
RW
10393 (sha256
10394 (base32
10395 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
10396 (build-system python-build-system)
10397 (arguments
10398 `(#:tests? #f
10399 #:python ,python-2))
10400 (home-page "https://github.com/joshmarshall/jsonrpclib/")
10401 (synopsis "Implementation of JSON-RPC specification for Python")
10402 (description
10403 "This library is an implementation of the JSON-RPC specification.
10404It supports both the original 1.0 specification, as well as the
10405new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
10406etc.")
10407 (license license:asl2.0)))
10408
10409(define-public python-chai
10410 (package
10411 (name "python-chai")
10412 (version "1.1.2")
10413 (source (origin
10414 (method url-fetch)
10415 (uri (pypi-uri "chai" version))
10416 (sha256
10417 (base32
10418 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
10419 (build-system python-build-system)
10420 (home-page "https://github.com/agoragames/chai")
10421 (synopsis "Mocking framework for Python")
10422 (description
10423 "Chai provides an api for mocking, stubbing and spying your python
10424objects, patterned after the Mocha library for Ruby.")
10425 (license license:bsd-3)))
10426
10427(define-public python2-chai
10428 (package-with-python2 python-chai))
10429
10430(define-public python-inflection
10431 (package
10432 (name "python-inflection")
10433 (version "0.3.1")
10434 (source
10435 (origin (method url-fetch)
10436 (uri (pypi-uri "inflection" version))
10437 (sha256
10438 (base32
10439 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
10440 (build-system python-build-system)
10441 (native-inputs
10442 `(("python-pytest" ,python-pytest)))
10443 (home-page "https://github.com/jpvanhal/inflection")
10444 (synopsis "Python string transformation library")
10445 (description
10446 "Inflection is a string transformation library. It singularizes
10447and pluralizes English words, and transforms strings from CamelCase to
10448underscored string.")
10449 (license license:expat)))
10450
10451(define-public python2-inflection
10452 (package-with-python2 python-inflection))
10453
10454(define-public python-pylev
10455 (package
10456 (name "python-pylev")
10457 (version "1.3.0")
10458 (source (origin
10459 (method url-fetch)
10460 (uri (pypi-uri "pylev" version))
10461 (sha256
10462 (base32
10463 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
10464 (build-system python-build-system)
10465 (home-page "https://github.com/toastdriven/pylev")
10466 (synopsis "Levenshtein distance implementation in Python")
10467 (description "Pure Python Levenshtein implementation, based off the
10468Wikipedia code samples at
10469@url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
10470 (license license:bsd-3)))
10471
10472(define-public python2-pylev
10473 (package-with-python2 python-pylev))
10474
10475(define-public python-cleo
10476 (package
10477 (name "python-cleo")
0c101a04 10478 (version "0.7.6")
44d10b1f
RW
10479 (source (origin
10480 (method url-fetch)
10481 (uri (pypi-uri "cleo" version))
10482 (sha256
10483 (base32
0c101a04 10484 "02dlc0rn43zgvw0s5v4j80bca9n1jfpwy3r78gn9qjgk0qj39kwr"))))
44d10b1f
RW
10485 (build-system python-build-system)
10486 (native-inputs
af2d3713 10487 `( ;; For testing
44d10b1f
RW
10488 ("python-mock" ,python-mock)
10489 ("python-pytest-mock" ,python-pytest-mock)
10490 ("python-pytest" ,python-pytest)))
10491 (propagated-inputs
10492 `(("python-backpack" ,python-backpack)
0c101a04 10493 ("python-clikit" ,python-clikit)
44d10b1f
RW
10494 ("python-pastel" ,python-pastel)
10495 ("python-pylev" ,python-pylev)))
10496 (home-page "https://github.com/sdispater/cleo")
10497 (synopsis "Command-line arguments library for Python")
10498 (description
10499 "Cleo allows you to create command-line commands with signature in
10500docstring and colored output.")
10501 (license license:expat)))
10502
10503(define-public python2-cleo
10504 (package-with-python2 python-cleo))
10505
2be85c45
TLC
10506(define-public python-tomlkit
10507 (package
10508 (name "python-tomlkit")
20c9914e 10509 (version "0.5.8")
2be85c45
TLC
10510 (source
10511 (origin
10512 (method url-fetch)
10513 (uri (pypi-uri "tomlkit" version))
10514 (sha256
10515 (base32
20c9914e 10516 "0sf2a4q61kf344hjbw8kb6za1hlccl89j9lzqw0l2zpddp0hrh9j"))))
2be85c45
TLC
10517 (build-system python-build-system)
10518 (native-inputs
10519 `(("python-pytest" ,python-pytest)))
10520 (home-page
10521 "https://github.com/sdispater/tomlkit")
10522 (synopsis "Style preserving TOML library")
10523 (description
10524 "TOML Kit is a 0.5.0-compliant TOML library. It includes a parser that
10525preserves all comments, indentations, whitespace and internal element ordering,
10526and makes them accessible and editable via an intuitive API. It can also
10527create new TOML documents from scratch using the provided helpers. Part of the
10528implementation as been adapted, improved and fixed from Molten.")
10529 (license license:expat)))
10530
0bb32201
TLC
10531(define-public python-shellingham
10532 (package
10533 (name "python-shellingham")
10534 (version "1.3.1")
10535 (source
10536 (origin
10537 (method url-fetch)
10538 (uri (pypi-uri "shellingham" version))
10539 (sha256
10540 (base32
10541 "1q7kws7w4x2hji3g7y0ni9ddk4sd676ylrb3db54gbpys6xj6nwq"))))
10542 (build-system python-build-system)
10543 (home-page
10544 "https://github.com/sarugaku/shellingham")
10545 (synopsis "Tool to detect surrounding shell")
10546 (description
10547 "Shellingham detects what shell the current Python executable is
10548running in.")
10549 (license license:isc)))
10550
aee92957
TLC
10551(define-public python-memcached
10552 (package
10553 (name "python-memcached")
10554 (version "1.59")
10555 (source
10556 (origin
10557 (method url-fetch)
10558 (uri (pypi-uri "python-memcached" version))
10559 (sha256
10560 (base32
10561 "0kvyapavbirk2x3n1jx4yb9nyigrj1s3x15nm3qhpvhkpqvqdqm2"))))
10562 (build-system python-build-system)
10563 (propagated-inputs `(("python-six" ,python-six)))
10564 (home-page
10565 "https://github.com/linsomniac/python-memcached")
10566 (synopsis "Pure python memcached client")
10567 (description
10568 "This software is a pure Python interface to the memcached memory cache
10569daemon. It is the client side software which allows storing values in one or
10570more, possibly remote, memcached servers.")
10571 (license license:psfl)))
10572
b2ac2508
TLC
10573(define-public python-clikit
10574 (package
10575 (name "python-clikit")
4573b94d 10576 (version "0.4.1")
b2ac2508
TLC
10577 (source
10578 (origin
10579 (method url-fetch)
10580 (uri (pypi-uri "clikit" version))
10581 (sha256
10582 (base32
4573b94d 10583 "10gab65pq0jdf589n33sj2513pxal2lisl4xwf1ijysdjxmpdr4a"))))
b2ac2508
TLC
10584 (build-system python-build-system)
10585 (propagated-inputs
10586 `(("python-pastel" ,python-pastel)
10587 ("python-pylev" ,python-pylev)))
10588 (home-page "https://github.com/sdispater/clikit")
10589 (synopsis "Group of utilities to build command line interfaces")
10590 (description
10591 "CliKit is a group of utilities to build testable command line
10592interfaces.")
10593 (license license:expat)))
10594
c6f008d6
TLC
10595(define-public python-msgpack-python
10596 (package
10597 (name "python-msgpack-python")
10598 (version "0.5.6")
10599 (source
10600 (origin
10601 (method url-fetch)
10602 (uri (pypi-uri "msgpack-python" version))
10603 (sha256
10604 (base32
10605 "16wh8qgybmfh4pjp8vfv78mdlkxfmcasg78lzlnm6nslsfkci31p"))))
10606 (build-system python-build-system)
10607 (home-page "http://msgpack.org/")
10608 (synopsis "Package to deserialize messages in MessagePack binary format")
10609 (description
10610 "MessagePack is an efficient binary serialization format. It lets you
10611exchange data among multiple languages like JSON. But it's faster and
10612smaller. Small integers are encoded into a single byte, and typical short
10613strings require only one extra byte in addition to the strings themselves.")
10614 (license license:asl2.0)))
10615
badc1c63
TLC
10616(define-public python-cachy
10617 (package
10618 (name "python-cachy")
10619 (version "0.2.0")
10620 (source
10621 (origin
10622 (method url-fetch)
10623 (uri (pypi-uri "cachy" version))
10624 (sha256
10625 (base32
10626 "0v6mjyhgx6j7ya20bk69cr3gdzdkdf6psay0h090rscclgji65dp"))))
10627 (build-system python-build-system)
10628 (native-inputs
10629 `(("python-fakeredis" ,python-fakeredis)
10630 ("python-flexmock" ,python-flexmock)
10631 ("python-pytest" ,python-pytest)))
10632 (propagated-inputs
10633 `(("python-memcached" ,python-memcached)
10634 ("python-msgpack-python" ,python-msgpack-python)
10635 ("python-redis" ,python-redis)))
10636 (home-page "https://github.com/sdispater/cachy")
10637 (synopsis "Simple yet effective caching library")
10638 (description
10639 "Cachy provides a simple yet effective caching library. A simple but
10640powerful API: thread-safety; decorator syntax; support for memcached, redis,
10641database, file, dict stores. Cachy supports python versions 2.7+ and 3.2+.")
10642 (license license:expat)))
10643
617bb67b
TLC
10644(define-public poetry
10645 (package
10646 (name "poetry")
10647 (version "0.12.17")
10648 ;; Poetry can only be built from source with poetry.
10649 (source
10650 (origin
10651 (method url-fetch)
10652 (uri (pypi-uri "poetry" version))
10653 (sha256
10654 (base32
10655 "0gxwcd65qjmzqzppf53x51sic1rbcd9py6cdzx3aprppipimslvf"))))
10656 (build-system python-build-system)
10657 (arguments
10658 `(#:tests? #f ;; Pypi does not have tests.
10659 #:phases
10660 (modify-phases %standard-phases
10661 (replace 'build
10662 (lambda _
10663 ;; Bug in poetry https://github.com/sdispater/poetry/issues/866.
10664 (invoke "sed" "-i" "-e" "s/from distutils.core/from setuptools/"
10665 "setup.py")
10666 #t)))))
10667 (propagated-inputs
10668 `(("python-cachecontrol" ,python-cachecontrol)
10669 ("python-cachy" ,python-cachy)
10670 ("python-cleo" ,python-cleo)
10671 ("python-glob2" ,python-glob2)
10672 ("python-html5lib" ,python-html5lib)
10673 ("python-jsonschema" ,python-jsonschema)
10674 ("python-msgpack" ,python-msgpack)
617bb67b
TLC
10675 ("python-pkginfo" ,python-pkginfo)
10676 ("python-pyparsing" ,python-pyparsing)
10677 ("python-pyrsistent" ,python-pyrsistent)
10678 ("python-requests" ,python-requests)
10679 ("python-requests-toolbelt" ,python-requests-toolbelt)
10680 ("python-shellingham" ,python-shellingham)
10681 ("python-tomlkit" ,python-tomlkit)
10682 ("python-virtualenv" ,python-virtualenv)))
10683 (home-page "https://poetry.eustace.io/")
10684 (synopsis "Python dependency management and packaging made easy")
10685 (description "Poetry is a tool for dependency management and packaging
10686in Python. It allows you to declare the libraries your project depends on and
10687it will manage (install/update) them for you.")
10688 (license license:expat)))
10689
44d10b1f
RW
10690(define-public python-lazy-object-proxy
10691 (package
10692 (name "python-lazy-object-proxy")
7454078a 10693 (version "1.4.3")
44d10b1f
RW
10694 (source (origin
10695 (method url-fetch)
10696 (uri (pypi-uri "lazy-object-proxy" version))
10697 (sha256
10698 (base32
7454078a 10699 "1w1aaay424ciz8fz3fkzxb0pxzfxn184f2whpyn4fx72bn50x47k"))))
63d4873b
MO
10700 (native-inputs
10701 `(("python-setuptools-scm" ,python-setuptools-scm-3.3)))
44d10b1f
RW
10702 (build-system python-build-system)
10703 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
10704 (synopsis "Lazy object proxy for python")
10705 (description
10706 "Lazy object proxy is an object that wraps a callable but defers the call
10707until the object is actually required, and caches the result of said call.")
10708 (license license:bsd-2)))
10709
10710(define-public python2-lazy-object-proxy
10711 (package-with-python2 python-lazy-object-proxy))
10712
10713(define-public python-dnspython
10714 (package
10715 (name "python-dnspython")
10716 (version "1.15.0")
10717 (source (origin
10718 (method url-fetch)
10719 (uri (string-append "http://www.dnspython.org/kits/"
10720 version "/dnspython-" version ".tar.gz"))
10721 (sha256
10722 (base32
10723 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
10724 (build-system python-build-system)
10725 (arguments '(#:tests? #f)) ; XXX: requires internet access
10726 (home-page "http://www.dnspython.org")
10727 (synopsis "DNS toolkit for Python")
10728 (description
10729 "dnspython is a DNS toolkit for Python. It supports almost all record
10730types. It can be used for queries, zone transfers, and dynamic updates.
10731It supports TSIG authenticated messages and EDNS0.")
10732 (license license:expat)))
10733
10734(define-public python2-dnspython
10735 (package-with-python2 python-dnspython))
10736
10737(define-public python-email-validator
10738 (package
10739 (name "python-email-validator")
10740 (version "1.0.2")
10741 (source
10742 (origin (method url-fetch)
10743 (uri (pypi-uri "email_validator" version))
10744 (sha256
10745 (base32
10746 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
10747 (build-system python-build-system)
10748 (arguments
10749 '(#:phases
10750 (modify-phases %standard-phases
10751 (add-before 'build 'use-dnspython
10752 (lambda _
10753 (substitute* "setup.py"
10754 (("dnspython3") "dnspython"))
10755 #t)))))
10756 (propagated-inputs
10757 `(("python-dnspython" ,python-dnspython)
10758 ("python-idna" ,python-idna)))
10759 (home-page "https://github.com/JoshData/python-email-validator")
10760 (synopsis "Email address validation library for Python")
10761 (description
10762 "This library validates email address syntax and deliverability.")
10763 (license license:cc0)))
10764
10765(define-public python2-email-validator
10766 (package-with-python2 python-email-validator))
10767
10768(define-public python-ukpostcodeparser
10769 (package
10770 (name "python-ukpostcodeparser")
10771 (version "1.0.3")
10772 (source (origin
10773 (method url-fetch)
10774 (uri (pypi-uri "UkPostcodeParser" version))
10775 (sha256
10776 (base32
10777 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
10778 (build-system python-build-system)
10779 (home-page "https://github.com/hamstah/ukpostcodeparser")
10780 (synopsis "UK Postcode parser for Python")
10781 (description
10782 "This library provides the @code{parse_uk_postcode} function for
10783parsing UK postcodes.")
10784 (license license:expat)))
10785
10786(define-public python2-ukpostcodeparser
10787 (package-with-python2 python-ukpostcodeparser))
10788
10789(define-public python-faker
10790 (package
10791 (name "python-faker")
10792 (version "0.7.9")
10793 (source (origin
10794 (method url-fetch)
10795 (uri (pypi-uri "Faker" version))
10796 (sha256
10797 (base32
10798 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
10799 (patches
10800 (search-patches "python-faker-fix-build-32bit.patch"))
10801 (modules '((guix build utils)))
10802 (snippet
10803 '(begin
10804 (for-each delete-file (find-files "." "\\.pyc$"))
10805 #t))))
10806 (build-system python-build-system)
10807 (arguments
10808 '(#:phases
10809 (modify-phases %standard-phases
10810 (replace 'check
49ff8827 10811 (lambda _ (invoke "python" "-m" "unittest" "-v" "tests"))))))
44d10b1f
RW
10812 (native-inputs
10813 `(;; For testing
10814 ("python-email-validator" ,python-email-validator)
10815 ("python-mock" ,python-mock)
10816 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
10817 (propagated-inputs
10818 `(("python-dateutil" ,python-dateutil)
10819 ("python-six" ,python-six)))
10820 (home-page "https://github.com/joke2k/faker")
10821 (synopsis "Python package that generates fake data")
10822 (description
10823 "Faker is a Python package that generates fake data such as names,
10824addresses, and phone numbers.")
10825 (license license:expat)
10826 (properties `((python2-variant . ,(delay python2-faker))))))
10827
10828(define-public python2-faker
10829 (let ((base (package-with-python2 (strip-python2-variant
10830 python-faker))))
10831 (package
10832 (inherit base)
10833 (propagated-inputs
10834 `(("python2-ipaddress" ,python2-ipaddress)
10835 ,@(package-propagated-inputs base))))))
10836
10837(define-public python-pyaml
10838 (package
10839 (name "python-pyaml")
10840 (version "18.11.0")
10841 (source (origin
10842 (method url-fetch)
10843 (uri (pypi-uri "pyaml" version))
10844 (sha256
10845 (base32
10846 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
10847 (build-system python-build-system)
10848 (native-inputs
10849 `(("python-unidecode" ,python-unidecode)))
10850 (propagated-inputs
10851 `(("python-pyyaml" ,python-pyyaml)))
10852 (home-page "https://github.com/mk-fg/pretty-yaml")
10853 (synopsis "YAML pretty-print library for Python")
10854 (description
10855 "pyaml is a PyYAML based python module to produce pretty and readable
10856YAML-serialized data.")
492e3a7a 10857 (license license:wtfpl2)))
44d10b1f
RW
10858
10859(define-public python2-pyaml
10860 (package-with-python2 python-pyaml))
10861
10862(define-public python-backpack
10863 (package
10864 (name "python-backpack")
10865 (version "0.1")
10866 (source
10867 (origin
10868 (method url-fetch)
10869 (uri (pypi-uri "backpack" version))
10870 (sha256
10871 (base32
10872 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
10873 (build-system python-build-system)
10874 (native-inputs
10875 `(("python-pytest" ,python-pytest)
10876 ("python-nose" ,python-nose)))
10877 (propagated-inputs
10878 `(("python-simplejson" ,python-simplejson)))
10879 (home-page "https://github.com/sdispater/backpack")
10880 (synopsis "Utilities for working with Python collections")
10881 (description "Backpack provides some useful utilities for working with
10882collections of data.")
10883 (license license:expat)))
10884
10885(define-public python2-backpack
10886 (package-with-python2 python-backpack))
10887
10888(define-public python-prompt-toolkit
10889 (package
10890 (name "python-prompt-toolkit")
10891 (version "2.0.7")
10892 (source
10893 (origin
10894 (method url-fetch)
10895 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10896 (sha256
10897 (base32
10898 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
10899 (build-system python-build-system)
10900 (arguments
10901 `(#:phases
10902 (modify-phases %standard-phases
10903 (delete 'check)
10904 (add-after 'install 'post-install-check
10905 (lambda* (#:key inputs outputs #:allow-other-keys)
10906 ;; HOME is needed for the test
10907 ;; "test_pathcompleter_can_expanduser".
10908 (setenv "HOME" "/tmp")
10909 (add-installed-pythonpath inputs outputs)
10910 (invoke "py.test"))))))
10911 (propagated-inputs
10912 `(("python-wcwidth" ,python-wcwidth)
10913 ("python-six" ,python-six)
10914 ("python-pygments" ,python-pygments)))
10915 (native-inputs
10916 `(("python-pytest" ,python-pytest)))
10917 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
10918 (synopsis "Library for building command line interfaces in Python")
10919 (description
10920 "Prompt-Toolkit is a library for building interactive command line
10921interfaces in Python. It's like GNU Readline but it also features syntax
10922highlighting while typing, out-of-the-box multi-line input editing, advanced
10923code completion, incremental search, support for Chinese double-width
10924characters, mouse support, and auto suggestions.")
10925 (license license:bsd-3)))
10926
10927(define-public python2-prompt-toolkit
10928 (package-with-python2 python-prompt-toolkit))
10929
10930(define-public python-prompt-toolkit-1
10931 (package (inherit python-prompt-toolkit)
10932 (version "1.0.15")
10933 (source
10934 (origin
10935 (method url-fetch)
10936 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10937 (sha256
10938 (base32
10939 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
10940
10941(define-public python2-prompt-toolkit-1
10942 (package-with-python2 python-prompt-toolkit-1))
10943
10944(define-public python-jedi
10945 (package
10946 (name "python-jedi")
296e1aea 10947 (version "0.15.1")
44d10b1f
RW
10948 (source
10949 (origin
10950 (method url-fetch)
10951 (uri (pypi-uri "jedi" version))
10952 (sha256
10953 (base32
296e1aea 10954 "0bp4pxhsynaarbvzblsn5x32lzp29svy3sxfy8i6m5iwz9s9r1ds"))))
44d10b1f
RW
10955 (build-system python-build-system)
10956 (arguments
296e1aea 10957 `(#:phases
44d10b1f 10958 (modify-phases %standard-phases
296e1aea
MC
10959 (add-after 'unpack 'disable-file-completion-test
10960 ;; A single parameterized test currently fail (see:
10961 ;; https://github.com/davidhalter/jedi/issues/1395). Remove it.
10962 (lambda _
10963 (substitute* "test/test_api/test_completion.py"
10964 ((".*'example.py', 'rb\"' \\+ join\\('\\.\\.'.*") ""))
10965 #t))
44d10b1f 10966 (replace 'check
296e1aea
MC
10967 (lambda _
10968 (setenv "HOME" "/tmp")
10969 (invoke "python" "-m" "pytest"))))))
44d10b1f
RW
10970 (native-inputs
10971 `(("python-pytest" ,python-pytest)
10972 ("python-docopt" ,python-docopt)))
10973 (propagated-inputs
10974 `(("python-parso" ,python-parso)))
10975 (home-page "https://github.com/davidhalter/jedi")
10976 (synopsis "Autocompletion and static analysis library for Python")
10977 (description
10978 "Jedi is a static analysis tool for Python that can be used in Integrated
10979Development Environments (@dfn{IDE}s) and text editors. It understands Python
10980on a deeper level than many other static analysis frameworks for Python.
10981
10982Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
10983well.")
10984 (license license:expat)))
10985
10986(define-public python2-jedi
296e1aea 10987 (package-with-python2 python-jedi))
44d10b1f
RW
10988
10989(define-public ptpython
10990 (package
10991 (name "ptpython")
10992 (version "0.34")
10993 (source (origin
10994 (method url-fetch)
10995 (uri (pypi-uri "ptpython" version))
10996 (sha256
10997 (base32
10998 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
10999 (build-system python-build-system)
11000 (arguments
11001 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
11002 (propagated-inputs
11003 `(("python-docopt" ,python-docopt)
11004 ("python-jedi" ,python-jedi)
11005 ("python-prompt-toolkit" ,python-prompt-toolkit)
11006 ("python-pygments" ,python-pygments)))
11007 (home-page "https://github.com/jonathanslenders/ptpython")
11008 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
11009 (description
11010 "ptpython is a Python read-eval-print loop with IDE-like features.
11011It supports syntax highlighting, multiline editing, autocompletion, mouse,
11012color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
11013etc.")
11014 (license license:bsd-3)
11015 (properties `((python2-variant . ,(delay ptpython-2))))))
11016
11017(define-public ptpython-2
11018 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
11019 (package
11020 (inherit base)
11021 (name "ptpython2"))))
11022
11023(define-public python-stem
11024 (package
11025 (name "python-stem")
e746d1c3 11026 (version "1.7.1")
44d10b1f
RW
11027 (source
11028 (origin
11029 (method url-fetch)
11030 (uri (pypi-uri "stem" version))
11031 (sha256
11032 (base32
e746d1c3 11033 "18lc95pmc7i089nlsb06dsxyjl5wbhxfqgdxbjcia35ndh8z7sn9"))))
44d10b1f
RW
11034 (build-system python-build-system)
11035 (arguments
11036 `(#:phases
11037 (modify-phases %standard-phases
11038 (replace 'check
11039 (lambda _
11040 (invoke "./run_tests.py" "--unit")
11041 #t)))))
11042 (native-inputs
11043 `(("python-mock" ,python-mock)
11044 ("python-pycodestyle" ,python-pycodestyle)
11045 ("python-pyflakes" ,python-pyflakes)))
11046 (home-page "https://stem.torproject.org/")
11047 (synopsis
11048 "Python controller library that allows applications to interact with Tor")
11049 (description
11050 "Stem is a Python controller library for Tor. With it you can use Tor's
11051control protocol to script against the Tor process and read descriptor data
11052relays publish about themselves.")
11053 (license license:lgpl3)))
11054
11055(define-public python2-stem
11056 (package-with-python2 python-stem))
11057
11058(define-public python-pyserial
11059 (package
11060 (name "python-pyserial")
00d81f98 11061 (version "3.4")
44d10b1f
RW
11062 (source
11063 (origin
11064 (method url-fetch)
11065 (uri (pypi-uri "pyserial" version))
11066 (sha256
11067 (base32
00d81f98 11068 "09y68bczw324a4jb9a1cfwrbjhq179vnfkkkrybbksp0vqgl0bbf"))))
44d10b1f
RW
11069 (build-system python-build-system)
11070 (arguments
11071 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
11072 ;; #:phases
11073 ;; (modify-phases %standard-phases
11074 ;; (replace 'check
11075 ;; (lambda _
11076 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
11077 (home-page
11078 "https://github.com/pyserial/pyserial")
11079 (synopsis "Python Serial Port Bindings")
11080 (description "@code{pyserial} provide serial port bindings for Python. It
11081supports different byte sizes, stop bits, parity and flow control with RTS/CTS
11082and/or Xon/Xoff. The port is accessed in RAW mode.")
11083 (license license:bsd-3)))
11084
11085(define-public python2-pyserial
11086 (package-with-python2 python-pyserial))
11087
11088(define-public python-kivy
11089 (package
11090 (name "python-kivy")
11091 (version "1.10.1")
11092 (source
11093 (origin
11094 (method url-fetch)
11095 (uri (pypi-uri "Kivy" version))
11096 (file-name (string-append name "-" version ".tar.gz"))
11097 (sha256
11098 (base32
11099 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
11100 (build-system python-build-system)
11101 (arguments
11102 `(#:tests? #f ; Tests require many optional packages
11103 #:phases
11104 (modify-phases %standard-phases
11105 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
11106 (lambda* (#:key inputs #:allow-other-keys)
11107 (setenv "KIVY_SDL2_PATH"
11108 (string-append (assoc-ref inputs "sdl-union")
11109 "/include/SDL2"))
11110 #t)))))
11111 (native-inputs
11112 `(("git" ,git)
11113 ("pkg-config" ,pkg-config)
11114 ("python-cython" ,python-cython)))
11115 (inputs
11116 `(("gstreamer" ,gstreamer)
11117 ("mesa" ,mesa)
11118 ("sdl-union"
11119 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
11120 (home-page "http://kivy.org")
11121 (synopsis
11122 "Multitouch application framework")
11123 (description
11124 "A software library for rapid development of
11125hardware-accelerated multitouch applications.")
11126 (license license:expat)))
11127
11128(define-public python2-kivy
11129 (package-with-python2 python-kivy))
11130
11131(define-public python-kivy-next
11132 (deprecated-package "python-kivy-next" python-kivy))
11133
11134(define-public python2-kivy-next
11135 (deprecated-package "python2-kivy-next" python2-kivy))
11136
11137(define-public python-binaryornot
11138 (package
11139 (name "python-binaryornot")
11140 (version "0.4.4")
11141 (source (origin
11142 (method url-fetch)
11143 (uri (pypi-uri "binaryornot" version))
11144 (sha256
11145 (base32
11146 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
11147 (build-system python-build-system)
86723f98
DM
11148 (arguments
11149 `(#:phases
11150 (modify-phases %standard-phases
ee623903 11151 (add-after 'unpack 'patch-tests
86723f98
DM
11152 (lambda _
11153 ;; TypeError: binary() got an unexpected keyword argument
11154 ;; 'average_size'.
11155 (substitute* "tests/test_check.py"
11156 (("average_size=512") ""))
11157 #t)))))
44d10b1f
RW
11158 (propagated-inputs
11159 `(("python-chardet" ,python-chardet)
11160 ("python-hypothesis" ,python-hypothesis)))
11161 (home-page "https://github.com/audreyr/binaryornot")
11162 (synopsis "Package to check if a file is binary or text")
11163 (description "Ultra-lightweight pure Python package to check if a file is
11164binary or text.")
11165 (license license:bsd-3)
11166 (properties `((python2-variant . ,(delay python2-binaryornot))))))
11167
11168(define-public python2-binaryornot
11169 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
11170 (package (inherit base)
11171 (propagated-inputs
11172 `(("python2-enum34" ,python2-enum34)
11173 ,@(package-propagated-inputs base))))))
11174
f315673d
VC
11175(define-public python-binwalk
11176 (let ((commit "64201acfb5b0a9cdd9faa58c40a36dcff8612e29")
11177 (revision "0"))
11178 (package
11179 (name "python-binwalk")
11180 (version (git-version "2.1.1" revision commit))
11181 (source
11182 (origin
11183 (method git-fetch)
11184 (uri (git-reference
11185 (url "https://github.com/ReFirmLabs/binwalk")
11186 (commit commit)))
11187 (file-name (git-file-name name version))
11188 (sha256
11189 (base32
11190 "1z7ca6rfp887hw5jc3sb45mm4fa0xid4lsp2z8g4r590dr7k7w15"))))
11191 (build-system python-build-system)
11192 (arguments
11193 `(#:phases
11194 (modify-phases %standard-phases
11195 (add-before 'check 'set-pythonpath
11196 (lambda _
11197 (setenv "PYTHONPATH"
11198 (string-append
11199 (getcwd) "/src/"
11200 ":" (getenv "PYTHONPATH")))
11201 (setenv "HOME" "")
11202 #t)))))
11203 (native-inputs
11204 `(("python-coverage" ,python-coverage)
11205 ("python-nose" ,python-nose)))
11206 (home-page "https://github.com/ReFirmLabs/binwalk")
11207 (synopsis "Firmware analysis tool")
11208 (description "Binwalk is a tool for analyzing, reverse engineering, and extracting firmware images")
11209 (license license:expat))))
11210
44d10b1f
RW
11211(define-public python-nltk
11212 (package
11213 (name "python-nltk")
11214 (version "3.2.1")
11215 (source (origin
11216 (method url-fetch)
11217 (uri (pypi-uri "nltk" version))
11218 (sha256
11219 (base32
11220 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
11221 (build-system python-build-system)
11222 (arguments
11223 '(;; The tests require some extra resources to be downloaded.
11224 ;; TODO Try packaging these resources.
11225 #:tests? #f))
11226 (home-page "http://nltk.org/")
11227 (synopsis "Natural Language Toolkit")
11228 (description "It provides interfaces to over 50 corpora and lexical
11229resources such as WordNet, along with a suite of text processing libraries
11230for classification, tokenization, stemming, tagging, parsing, and semantic
11231reasoning, wrappers for natural language processing libraries.")
11232 (license license:asl2.0)))
11233
11234(define-public python2-nltk
11235 (package-with-python2 python-nltk))
11236
11237(define-public python-pymongo
11238 (package
11239 (name "python-pymongo")
11240 (version "3.7.2")
11241 (source (origin
11242 (method url-fetch)
11243 (uri (pypi-uri "pymongo" version))
11244 (sha256
11245 (base32
11246 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
11247 (build-system python-build-system)
11248 (propagated-inputs
11249 `(("python-certifi" ,python-certifi)))
11250 (home-page "https://github.com/mongodb/mongo-python-driver")
11251 (synopsis "Python driver for MongoDB")
11252 (description "Python driver for MongoDB.")
11253 (license license:asl2.0)))
11254
11255(define-public python2-pymongo
11256 (package-with-python2 python-pymongo))
11257
44d10b1f
RW
11258(define-public python-consul
11259 (package
11260 (name "python-consul")
11261 (version "0.6.1")
11262 (source
11263 (origin
11264 (method url-fetch)
11265 (uri (pypi-uri "python-consul" version))
11266 (sha256
11267 (base32
11268 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
11269 (build-system python-build-system)
11270 (arguments
11271 '(#:tests? #f)) ; The tests are not distributed
11272 (propagated-inputs
11273 `(("python-requests" ,python-requests)
11274 ("python-six" ,python-six)))
11275 (home-page "https://github.com/cablehead/python-consul")
11276 (synopsis "Python client for Consul")
11277 (description
11278 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
11279discovery, monitoring and configuration.")
11280 (license license:expat)))
11281
11282(define-public python2-consul
11283 (package-with-python2 python-consul))
11284
11285(define-public python-schematics
11286 (package
11287 (name "python-schematics")
11288 (version "1.1.1")
11289 (source
1961d187
TGR
11290 (origin
11291 (method git-fetch)
11292 (uri (git-reference
11293 (url "https://github.com/schematics/schematics.git")
11294 (commit (string-append "v" version))))
11295 (file-name (git-file-name name version))
11296 (sha256
11297 (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd"))))
44d10b1f
RW
11298 (build-system python-build-system)
11299 (propagated-inputs
11300 `(("python-six" ,python-six)))
11301 (arguments
1961d187
TGR
11302 ;; The tests require a bunch of not very nice packages with fixed
11303 ;; version requirements (e.g. python-coveralls).
11304 `(#:tests? #f))
44d10b1f
RW
11305 (home-page "https://github.com/schematics/schematics")
11306 (synopsis "Python Data Structures for Humans")
11307 (description "Python Data Structures for Humans.")
11308 (license license:bsd-3)))
11309
11310(define-public python2-schematics
11311 (package-with-python2 python-schematics))
11312
11313(define-public python-odfpy
11314 (package
11315 (name "python-odfpy")
11316 (version "1.3.3")
11317 (source (origin
11318 (method url-fetch)
11319 (uri (pypi-uri "odfpy" version))
11320 (sha256
11321 (base32
11322 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
11323 (arguments
11324 `(#:modules ((srfi srfi-1)
11325 (guix build python-build-system)
11326 (guix build utils))
11327 #:phases
11328 (modify-phases %standard-phases
11329 (replace 'check
11330 ;; The test runner invokes python2 and python3 for test*.py.
11331 ;; To avoid having both in inputs, we replicate it here.
11332 (lambda _
21ccc01d
RW
11333 (for-each (lambda (test-file) (invoke "python" test-file))
11334 (find-files "tests" "^test.*\\.py$"))
11335 #t)))))
44d10b1f
RW
11336 (build-system python-build-system)
11337 (home-page "https://github.com/eea/odfpy")
11338 (synopsis "Python API and tools to manipulate OpenDocument files")
11339 (description "Collection of libraries and utility programs written in
11340Python to manipulate OpenDocument 1.2 files.")
11341 (license
11342 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
11343 ;; number of files with other licenses.
11344 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
11345
11346(define-public python2-odfpy
11347 (package-with-python2 python-odfpy))
11348
11349(define-public python-natsort
11350 (package
11351 (name "python-natsort")
11352 (version "5.4.1")
11353 (source (origin
11354 (method url-fetch)
11355 (uri (pypi-uri "natsort" version))
11356 (sha256
11357 (base32
11358 "0i732amg6yzkx4g4c9j09jmqq39q377x9cl2nbkm5hax2c2v0wxf"))))
11359 (build-system python-build-system)
11360 (arguments
11361 `(#:modules ((guix build utils)
11362 (guix build python-build-system)
11363 (srfi srfi-1)
11364 (srfi srfi-26)
11365 (ice-9 ftw))
11366 #:phases
11367 (modify-phases %standard-phases
11368 (add-before 'check 'set-cachedir
11369 ;; Tests require write access to $HOME by default
11370 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
11371 (replace 'check
11372 (lambda _
11373 (let ((cwd (getcwd)))
11374 (setenv "PYTHONPATH"
11375 (string-append
11376 cwd "/build/"
11377 (find (cut string-prefix? "lib" <>)
11378 (scandir (string-append cwd "/build")))
11379 ":"
11380 (getenv "PYTHONPATH")))
11381 (invoke "pytest" "-v")))))))
11382 (native-inputs
11383 `(("python-hypothesis" ,python-hypothesis)
11384 ("python-pytest-cov" ,python-pytest-cov)
11385 ("python-pytest-mock" ,python-pytest-mock)
11386 ("python-pytest" ,python-pytest)))
11387 (propagated-inputs ; TODO: Add python-fastnumbers.
11388 `(("python-pyicu" ,python-pyicu)))
11389 (home-page "https://github.com/SethMMorton/natsort")
11390 (synopsis "Natural sorting for python and shell")
11391 (description
11392 "Natsort lets you apply natural sorting on lists instead of
11393lexicographical. If you use the built-in @code{sorted} method in python
36a4366d
EF
11394on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4},
11395@code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20},
11396@code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that
11397identifies numbers and sorts them separately from strings. It can also sort
11398version numbers, real numbers, mixed types and more, and comes with a shell
11399command @command{natsort} that exposes this functionality in the command line.")
44d10b1f
RW
11400 (license license:expat)
11401 (properties `((python2-variant . ,(delay python2-natsort))))))
11402
11403(define-public python2-natsort
11404 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
11405 (package (inherit base)
11406 (native-inputs
11407 `(("python2-pathlib" ,python2-pathlib)
11408 ,@(package-native-inputs base))))))
11409
11410(define-public python-glances
11411 (package
11412 (name "python-glances")
a4ac25df 11413 (version "3.1.2")
44d10b1f
RW
11414 (source
11415 (origin
11416 (method url-fetch)
11417 (uri (pypi-uri "Glances" version))
11418 (sha256
a4ac25df 11419 (base32 "15384pbvw9wj4sb8zgvd9v1812vrypbyjg0acicjf1hdb3p30fkk"))
15b4c911
TGR
11420 (modules '((guix build utils)))
11421 (snippet
11422 '(begin
11423 ;; Glances phones PyPI for weekly update checks by default.
11424 ;; Disable these. The user can re-enable them if desired.
11425 (substitute* "glances/outdated.py"
11426 (("^(.*)self\\.load_config\\(config\\)\n" line indentation)
11427 (string-append indentation
11428 "self.args.disable_check_update = True\n"
11429 line)))
11430 #t))))
44d10b1f
RW
11431 (build-system python-build-system)
11432 (propagated-inputs
9898a2d3
TGR
11433 `(("python-future" ,python-future)
11434 ("python-psutil" ,python-psutil)))
a4ac25df 11435 (home-page "https://github.com/nicolargo/glances")
bab94ffa 11436 (synopsis "Cross-platform curses-based monitoring tool")
44d10b1f
RW
11437 (description
11438 "Glances is a curses-based monitoring tool for a wide variety of platforms.
bab94ffa
TGR
11439Glances uses the PsUtil library to get information from your system. It
11440monitors CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
44d10b1f
RW
11441 (license license:lgpl3+)))
11442
11443(define-public python2-glances
11444 (package-with-python2 python-glances))
11445
11446(define-public python-graphql-core
11447 (package
11448 (name "python-graphql-core")
11449 (version "0.5.3")
11450 (source
11451 (origin
11452 (method url-fetch)
11453 (uri (pypi-uri "graphql-core" version))
11454 (sha256
11455 (base32
11456 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
11457 (build-system python-build-system)
11458 (arguments
11459 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
11460 #:phases
11461 (modify-phases %standard-phases
11462 (add-after 'unpack 'patch-hardcoded-version
11463 (lambda _ (substitute*
11464 "setup.py"
11465 (("'gevent==1.1rc1'") "'gevent'"))
11466 #t)))))
11467 (native-inputs
11468 `(("python-gevent" ,python-gevent)
11469 ("python-mock" ,python-mock)
11470 ("python-pytest-mock" ,python-pytest-mock)))
11471 (propagated-inputs
11472 `(("python-promise" ,python-promise)
11473 ("python-six" ,python-six)))
11474 (home-page "https://github.com/graphql-python/graphql-core")
11475 (synopsis "GraphQL implementation for Python")
11476 (description
11477 "GraphQL implementation for Python. GraphQL is a data query language and
11478runtime designed and used to request and deliver data to mobile and web apps.
11479This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
11480to Python.")
11481 (license license:expat)))
11482
11483(define-public python2-graphql-core
11484 (package-with-python2 python-graphql-core))
11485
11486(define-public python-graphql-relay
11487 (package
11488 (name "python-graphql-relay")
11489 (version "0.4.5")
11490 (source
11491 (origin
11492 (method url-fetch)
11493 (uri (pypi-uri "graphql-relay" version))
11494 (sha256
11495 (base32
11496 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
11497 (build-system python-build-system)
11498 (arguments
11499 '(#:tests? #f)) ; The tests are not distributed
11500 (propagated-inputs
11501 `(("python-graphql-core" ,python-graphql-core)
11502 ("python-promise" ,python-promise)
11503 ("python-six" ,python-six)))
11504 (home-page "https://github.com/graphql-python/graphql-relay-py")
11505 (synopsis "Relay implementation for Python")
11506 (description
11507 "This is a library to allow the easy creation of Relay-compliant servers
11508using the GraphQL Python reference implementation of a GraphQL server. It
11509should be noted that the code is a exact port of the original
11510@url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
11511from Facebook.")
11512 (license license:expat)))
11513
11514(define-public python2-graphql-relay
11515 (package-with-python2 python-graphql-relay))
11516
11517(define-public python-graphene
11518 (package
11519 (name "python-graphene")
11520 (version "0.10.2")
11521 (source
11522 (origin
11523 (method url-fetch)
11524 (uri (pypi-uri "graphene" version))
11525 (sha256
11526 (base32
11527 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
11528 (build-system python-build-system)
11529 (propagated-inputs
11530 `(("python-graphql-core" ,python-graphql-core)
11531 ("python-graphql-relay" ,python-graphql-relay)
11532 ("python-iso8601" ,python-iso8601)
11533 ("python-promise" ,python-promise)
11534 ("python-six" ,python-six)))
11535 (arguments
11536 `(#:tests? #f)) ; no tests/ in the PyPI tarball
11537 (home-page "http://graphene-python.org/")
11538 (synopsis "GraphQL Framework for Python")
11539 (description
11540 "Graphene is a Python library for building GraphQL schemas/types.
11541A GraphQL schema describes your data model, and provides a GraphQL server
11542with an associated set of resolve methods that know how to fetch data.")
11543 (properties `((python2-variant . ,(delay python2-graphene))))
11544 (license license:expat)))
11545
11546(define-public python2-graphene
11547 (let ((base (package-with-python2
11548 (strip-python2-variant python-graphene))))
11549 (package (inherit base)
11550 (native-inputs
11551 `(("python2-sqlalchemy" ,python2-sqlalchemy)
11552 ,@(package-native-inputs base))))))
11553
11554(define-public python-nautilus
11555 (package
11556 (name "python-nautilus")
11557 (version "0.4.9")
11558 (source
11559 (origin
11560 (method url-fetch)
11561 (uri (pypi-uri "nautilus" version))
11562 (sha256
11563 (base32
11564 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
11565 (build-system python-build-system)
11566 (arguments `(#:tests? #f)) ; fails to import test modules
11567 (propagated-inputs
11568 `(("python-bcrypt" ,python-bcrypt)
11569 ("python-click" ,python-click)
11570 ("python-consul" ,python-consul)
11571 ("python-graphene" ,python-graphene)
11572 ("python-jinja2" ,python-jinja2)
11573 ("python-peewee" ,python-peewee)
11574 ("python-pika" ,python-pika)
11575 ("python-tornado" ,python-tornado)
11576 ("python-wtforms" ,python-wtforms)))
11577 (native-inputs
11578 `(("python-nose2" ,python-nose2)))
11579 (home-page "https://github.com/AlecAivazis/nautilus")
11580 (synopsis "Library for creating microservice applications")
11581 (description
11582 "Nautilus is a framework for flux based microservices that looks to
11583provide extendible implementations of common aspects of a cloud so that you can
11584focus on building massively scalable web applications.")
11585 (license license:expat)))
11586
11587(define-public python-snowballstemmer
11588 (package
11589 (name "python-snowballstemmer")
11590 (version "1.2.1")
11591 (source (origin
11592 (method url-fetch)
11593 (uri (pypi-uri "snowballstemmer" version))
11594 (sha256
11595 (base32
11596 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
11597 (build-system python-build-system)
11598 (arguments
11599 `(;; No tests exist
11600 #:tests? #f))
11601 (home-page "https://github.com/shibukawa/snowball_py")
11602 (synopsis "Snowball stemming library collection for Python")
11603 (description "This package provides 16 word stemmer algorithms generated
11604from Snowball algorithms. It includes the 15 original ones plus the Poerter
11605English stemmer.")
11606 (license license:bsd-3)))
11607
11608(define-public python2-snowballstemmer
11609 (package-with-python2 python-snowballstemmer))
11610
44d10b1f
RW
11611(define-public python-setproctitle
11612(package
11613 (name "python-setproctitle")
11614 (version "1.1.10")
11615 (source
11616 (origin
11617 (method url-fetch)
11618 (uri (pypi-uri "setproctitle" version))
11619 (sha256
11620 (base32
11621 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
11622 (build-system python-build-system)
11623 (arguments
11624 '(#:phases
11625 (modify-phases %standard-phases
11626 (add-before 'check 'patch-Makefile
11627 ;; Stricly this is only required for the python2 variant.
11628 ;; But adding a phase in an inherited package seems to be
11629 ;; cumbersum. So we patch even for python3.
11630 (lambda _
11631 (let ((nose (assoc-ref %build-inputs "python2-nose")))
11632 (when nose
11633 (substitute* "Makefile"
11634 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
11635 (string-append nose "/bin/nosetests "))))
11636 #t)))
11637 (replace 'check
11638 (lambda _
11639 (setenv "PYTHON" (or (which "python3") (which "python")))
11640 (setenv "PYCONFIG" (or (which "python3-config")
11641 (which "python-config")))
11642 (setenv "CC" "gcc")
11643 ;; No need to extend PYTHONPATH to find the built package, since
11644 ;; the Makefile will build anyway
11645 (invoke "make" "check"))))))
11646 (native-inputs
11647 `(("procps" ,procps))) ; required for tests
11648 (home-page
11649 "https://github.com/dvarrazzo/py-setproctitle")
11650 (synopsis
11651 "Setproctitle implementation for Python to customize the process title")
11652 (description "The library allows a process to change its title (as displayed
11653by system tools such as ps and top).
11654
11655Changing the title is mostly useful in multi-process systems, for
11656example when a master process is forked: changing the children's title
11657allows to identify the task each process is busy with. The technique
11658is used by PostgreSQL and the OpenSSH Server for example.")
11659 (license license:bsd-3)
11660 (properties `((python2-variant . ,(delay python2-setproctitle))))))
11661
11662(define-public python2-setproctitle
11663 (let ((base (package-with-python2
11664 (strip-python2-variant python-setproctitle))))
11665 (package
11666 (inherit base)
11667 (native-inputs `(("python2-nose" ,python2-nose)
11668 ,@(package-native-inputs base))))))
11669
11670(define-public python-validictory
11671 (package
11672 (name "python-validictory")
11673 (version "1.0.1")
11674 (source
11675 (origin
11676 (method url-fetch)
11677 (uri (pypi-uri "validictory" version))
11678 (sha256
11679 (base32
11680 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
11681 (build-system python-build-system)
11682 (arguments
11683 '(#:phases
11684 (modify-phases %standard-phases
11685 (add-after 'unpack 'bootstrap
11686 ;; Move the tests out of the package directory to avoid
11687 ;; packaging them.
11688 (lambda* _
11689 (rename-file "validictory/tests" "tests")
11690 (delete-file "tests/__init__.py")))
11691 (replace 'check
11692 (lambda _
11693 ;; Extend PYTHONPATH so the built package will be found.
11694 (setenv "PYTHONPATH"
11695 (string-append (getcwd) "/build/lib:"
11696 (getenv "PYTHONPATH")))
6568bd5d 11697 (invoke "py.test" "-vv" ))))))
44d10b1f
RW
11698 (native-inputs
11699 `(("python-pytest" ,python-pytest)))
11700 (home-page
11701 "https://github.com/jamesturk/validictory")
11702 (synopsis "General purpose Python data validator")
11703 (description "It allows validation of arbitrary Python data structures.
11704
11705The schema format is based on the JSON Schema
11706proposal (http://json-schema.org), so combined with json the library is also
11707useful as a validator for JSON data.")
11708 (license license:expat)))
11709
11710(define-public python2-validictory
11711 (package-with-python2 python-validictory))
11712
11713(define-public python-pyelftools
11714 (package
11715 (name "python-pyelftools")
11716 (version "0.25")
11717 (source
11718 (origin
11719 (method url-fetch)
11720 (uri (pypi-uri "pyelftools" version))
11721 (sha256
11722 (base32
11723 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
11724 (build-system python-build-system)
11725 (arguments
11726 `(#:phases
11727 (modify-phases %standard-phases
11728 (add-before 'check 'set-pythonpath
11729 (lambda _
11730 (setenv "PYTHONPATH"
11731 (string-append
11732 (getcwd) "/test/"
11733 ":" (getenv "PYTHONPATH")))
11734 #t)))))
11735 (home-page
11736 "https://github.com/eliben/pyelftools")
11737 (synopsis
11738 "Analyze binary and library file information")
11739 (description "This Python library provides interfaces for parsing and
11740analyzing two binary and library file formats; the Executable and Linking
11741Format (ELF), and debugging information in the Debugging With Attributed
11742Record Format (DWARF).")
11743 (license license:public-domain)))
11744
11745(define-public python-pyev
11746 (package
11747 (name "python-pyev")
11748 (version "0.9.0")
11749 (source
11750 (origin
11751 (method url-fetch)
11752 (uri (pypi-uri "pyev" version))
11753 (sha256
11754 (base32
11755 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
11756 (build-system python-build-system)
11757 (arguments
11758 `(#:tests? #f ; no test suite
11759 #:phases
11760 (modify-phases %standard-phases
11761 (add-after 'unpack 'patch
11762 (lambda* (#:key inputs #:allow-other-keys)
11763 (let ((libev (string-append (assoc-ref inputs "libev")
11764 "/lib/libev.so.4")))
11765 (substitute* "setup.py"
11766 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
11767 (string-append "libev_dll_name = \"" libev "\"")))))))))
11768 (inputs
11769 `(("libev" ,libev)))
11770 (home-page "http://pythonhosted.org/pyev/")
11771 (synopsis "Python libev interface")
11772 (description "Pyev provides a Python interface to libev.")
11773 (license license:gpl3)))
11774
11775(define-public python2-pyev
11776 (package-with-python2 python-pyev))
11777
11778(define-public python-imagesize
11779 (package
11780 (name "python-imagesize")
11781 (version "1.1.0")
11782 (source
11783 (origin
11784 (method url-fetch)
11785 (uri (pypi-uri "imagesize" version))
11786 (sha256
11787 (base32
11788 "1dg3wn7qpwmhgqc0r9na2ding1wif9q5spz3j9zn2riwphc2k0zk"))))
11789 (build-system python-build-system)
11790 (home-page "https://github.com/shibukawa/imagesize_py")
11791 (synopsis "Gets image size of files in various formats in Python")
11792 (description
11793 "This package allows determination of image size from
11794PNG, JPEG, JPEG2000 and GIF files in pure Python.")
11795 (license license:expat)))
11796
11797(define-public python2-imagesize
11798 (package-with-python2 python-imagesize))
11799
11800(define-public python-termstyle
11801 (package
11802 (name "python-termstyle")
11803 (version "0.1.11")
11804 (source
11805 (origin
11806 (method url-fetch)
11807 (uri (pypi-uri "termstyle" version))
11808 (sha256
11809 (base32
11810 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
11811 (build-system python-build-system)
11812 (arguments
11813 '(#:phases
11814 (modify-phases %standard-phases
11815 (replace 'check
11816 (lambda _
831080a6 11817 (invoke "python" "test3.py"))))))
44d10b1f
RW
11818 (home-page "https://github.com/gfxmonk/termstyle")
11819 (synopsis "Console text coloring for Python")
11820 (description "This package provides console text coloring for Python.")
11821 (license license:bsd-3)))
11822
11823(define-public python-argcomplete
11824 (package
11825 (name "python-argcomplete")
98aecd3a 11826 (version "1.10.3")
44d10b1f 11827 (source
98aecd3a
RW
11828 (origin
11829 (method url-fetch)
11830 (uri (pypi-uri "argcomplete" version))
11831 (sha256
11832 (base32
11833 "02jkc44drb0yjz6x28lvg6rj607n8r2irdpdvyylm8xnycn54zx3"))))
44d10b1f 11834 (build-system python-build-system)
98aecd3a
RW
11835 (arguments
11836 `(#:phases
11837 (modify-phases %standard-phases
11838 (add-after 'unpack 'embed-tool-references
11839 (lambda _
11840 (substitute* "argcomplete/bash_completion.d/python-argcomplete.sh"
11841 ((" grep")
11842 (string-append " " (which "grep")))
11843 ((" egrep")
11844 (string-append " " (which "egrep")))
11845 (("elif which")
11846 (string-append "elif " (which "which")))
11847 (("\\$\\(which")
11848 (string-append "$(" (which "which"))))
11849 #t)))))
11850 (inputs
11851 `(("grep" ,grep)
11852 ("which" ,which)))
44d10b1f 11853 (native-inputs
98aecd3a
RW
11854 `(("python-coverage" ,python-coverage)
11855 ("python-flake8" ,python-flake8)
11856 ("python-pexpect" ,python-pexpect)
11857 ("python-wheel" ,python-wheel)
44d10b1f 11858 ("tcsh" ,tcsh)
98aecd3a
RW
11859 ("fish" ,fish)
11860 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
44d10b1f
RW
11861 (home-page "https://github.com/kislyuk/argcomplete")
11862 (synopsis "Shell tab completion for Python argparse")
11863 (description "argcomplete provides extensible command line tab completion
11864of arguments and options for Python scripts using @code{argparse}. It's
11865particularly useful for programs with many options or sub-parsers that can
11866dynamically suggest completions; for example, when browsing resources over the
11867network.")
11868 (license license:asl2.0)))
11869
11870(define-public python2-argcomplete
11871 (package-with-python2 python-argcomplete))
11872
11873(define-public python-xopen
11874 (package
11875 (name "python-xopen")
24d64989 11876 (version "0.5.0")
44d10b1f
RW
11877 (source
11878 (origin
11879 (method url-fetch)
11880 (uri (pypi-uri "xopen" version))
11881 (sha256
11882 (base32
24d64989 11883 "17xbrgi23l87yg6h0qcknssp2q812miiy33qw6v45v5gx0jwv5xh"))))
44d10b1f 11884 (build-system python-build-system)
24d64989
RW
11885 (propagated-inputs
11886 `(("python-setuptools-scm" ,python-setuptools-scm)))
44d10b1f
RW
11887 (home-page "https://github.com/marcelm/xopen/")
11888 (synopsis "Open compressed files transparently")
11889 (description "This module provides an @code{xopen} function that works like
11890Python's built-in @code{open} function, but can also deal with compressed files.
11891Supported compression formats are gzip, bzip2 and, xz, and are automatically
11892recognized by their file extensions. The focus is on being as efficient as
11893possible on all supported Python versions.")
11894 (license license:expat)))
11895
11896(define-public python2-xopen
11897 (let ((base (package-with-python2
11898 (strip-python2-variant python-xopen))))
11899 (package
11900 (inherit base)
11901 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
11902 ,@(package-propagated-inputs base))))))
11903
11904(define-public python-cheetah
11905 (package
11906 (name "python-cheetah")
11907 (version "3.1.0")
11908 (source
11909 (origin
11910 (method url-fetch)
11911 (uri (pypi-uri "Cheetah3" version))
11912 (sha256
11913 (base32
11914 "1ihag9cxll6b86fc8v5lkhmr3brdbi4yiz16zpgw79yylmv8fgr9"))))
11915 (build-system python-build-system)
11916 (arguments
11917 `(#:modules ((guix build utils)
11918 (guix build python-build-system)
11919 (ice-9 ftw)
11920 (srfi srfi-1)
11921 (srfi srfi-26))
11922 #:phases (modify-phases %standard-phases
11923 (add-after 'unpack 'use-absolute-python
11924 (lambda _
11925 (substitute* "Cheetah/CheetahWrapper.py"
11926 (("#!/usr/bin/env python")
11927 (string-append "#!" (which "python"))))
11928 #t))
11929 (replace 'check
11930 (lambda _
11931 (let ((cwd (getcwd)))
11932 (setenv "PYTHONPATH"
11933 (string-append
11934 cwd "/build/"
11935 (find (cut string-prefix? "lib" <>)
11936 (scandir (string-append cwd "/build")))
11937 ":" (getenv "PYTHONPATH")))
11938 (setenv "PATH"
11939 (string-append (getenv "PATH")
11940 ":" cwd "/bin"))
11941 (setenv "TMPDIR" "/tmp")
11942
11943 (substitute* "Cheetah/Tests/Test.py"
11944 (("unittest.TextTestRunner\\(\\)")
11945 "unittest.TextTestRunner(verbosity=2)"))
11946
11947 (invoke "python" "Cheetah/Tests/Test.py")))))))
11948 (propagated-inputs
11949 `(("python-markdown" ,python-markdown))) ;optional
11950 (home-page "http://cheetahtemplate.org/")
11951 (synopsis "Template engine")
11952 (description "Cheetah is a text-based template engine and Python code
11953generator.
11954
11955Cheetah can be used as a standalone templating utility or referenced as
11956a library from other Python applications. It has many potential uses,
11957but web developers looking for a viable alternative to ASP, JSP, PHP and
11958PSP are expected to be its principle user group.
11959
11960Features:
11961@enumerate
11962@item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
11963 text-based format.
11964@item Cleanly separates content, graphic design, and program code.
11965@item Blends the power and flexibility of Python with a simple template language
11966 that non-programmers can understand.
11967@item Gives template writers full access to any Python data structure, module,
11968 function, object, or method in their templates.
11969@item Makes code reuse easy by providing an object-orientated interface to
11970 templates that is accessible from Python code or other Cheetah templates.
11971 One template can subclass another and selectively reimplement sections of it.
11972@item Provides a simple, yet powerful, caching mechanism that can dramatically
11973 improve the performance of a dynamic website.
11974@item Compiles templates into optimized, yet readable, Python code.
11975@end enumerate")
11976 (license (license:x11-style "file://LICENSE"))))
11977
11978(define-public python2-cheetah
11979 (package-with-python2 python-cheetah))
11980
11981(define-public python-dulwich
11982 (package
11983 (name "python-dulwich")
11984 (version "0.18.6")
11985 (source
11986 (origin
11987 (method url-fetch)
11988 (uri (list (string-append "https://www.dulwich.io/releases/"
11989 "dulwich-" version ".tar.gz")
11990 (pypi-uri "dulwich" version)))
11991 (sha256
11992 (base32
11993 "1aa1xfrxkc3j9s4xi0llhf5gndyi9ryprcxsqfa5fcb8ph34981q"))))
11994 (build-system python-build-system)
11995 (arguments
11996 `(#:phases
11997 (modify-phases %standard-phases
11998 (add-before 'check 'fix-tests
11999 (lambda* (#:key inputs #:allow-other-keys)
12000 ;; The tests use Popen with a custom environment which doesn't
12001 ;; include PATH.
12002 (substitute* "dulwich/tests/compat/utils.py"
12003 (("'git'") (string-append "'"
12004 (which "git")
12005 "'")))
12006 (substitute* '("dulwich/tests/test_repository.py"
12007 "dulwich/tests/test_hooks.py")
12008 (("#!/bin/sh") (string-append "#!" (which "sh"))))
12009 (setenv "TEST_RUNNER" "unittest")
12010 (setenv "PYTHONHASHSEED" "random")
12011 #t)))))
12012 (propagated-inputs
12013 `(("python-fastimport" ,python-fastimport)))
12014 (native-inputs
12015 `(("python-mock" ,python-mock)
12016 ("python-geventhttpclient" ,python-geventhttpclient)
12017 ("git" ,git)))
12018 (home-page "https://www.dulwich.io/")
12019 (synopsis "Git implementation in Python")
12020 (description "Dulwich is an implementation of the Git file formats and
12021protocols written in pure Python.")
12022 ;; Can be used with either license.
12023 (license (list license:asl2.0 license:gpl2+))))
12024
12025(define-public python2-dulwich
12026 (package-with-python2 python-dulwich))
12027
12028(define-public python-pbkdf2
12029 (package
12030 (name "python-pbkdf2")
12031 (version "1.3")
12032 (source
12033 (origin
12034 (method url-fetch)
12035 (uri (pypi-uri "pbkdf2" version))
12036 (sha256
12037 (base32
12038 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
12039 (build-system python-build-system)
12040 (arguments
12041 '(#:phases
12042 (modify-phases %standard-phases
12043 (replace 'check
12044 (lambda _
12045 (setenv "PYTHONPATH"
12046 (string-append (getcwd) "/build/lib:"
12047 (getenv "PYTHONPATH")))
ee2bb944 12048 (invoke "python" "test/test_pbkdf2.py"))))))
44d10b1f
RW
12049 (propagated-inputs
12050 `(("python-pycrypto" ,python-pycrypto))) ; optional
12051 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
12052 (synopsis "Password-based key derivation")
12053 (description "This module implements the password-based key derivation
12054function, PBKDF2, specified in RSA PKCS#5 v2.0.
12055
12056PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
12057is part of the RSA Public Key Cryptography Standards series. The provided
12058implementation takes a password or a passphrase and a salt value (and
12059optionally a iteration count, a digest module, and a MAC module) and provides
12060a file-like object from which an arbitrarly-sized key can be read.")
12061 (license license:expat)))
12062
12063(define-public python2-pbkdf2
12064 (package-with-python2 python-pbkdf2))
12065
12066(define-public python-qrcode
12067 (package
12068 (name "python-qrcode")
217ea1a1 12069 (version "6.1")
44d10b1f
RW
12070 (source
12071 (origin
12072 (method url-fetch)
12073 (uri (pypi-uri "qrcode" version))
12074 (sha256
217ea1a1 12075 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
44d10b1f
RW
12076 (build-system python-build-system)
12077 (arguments
12078 ;; FIXME: Tests require packaging 'pymaging'.
12079 '(#:tests? #f))
12080 (propagated-inputs
12081 `(("python-lxml" ,python-lxml) ; for SVG output
12082 ("python-pillow" ,python-pillow) ; for PNG output
12083 ("python-six" ,python-six)))
44d10b1f
RW
12084 (home-page "https://github.com/lincolnloop/python-qrcode")
12085 (synopsis "QR Code image generator")
12086 (description "This package provides a pure Python QR Code generator
12087module. It uses the Python Imaging Library (PIL) to allow for the generation
12088of QR Codes.
12089
12090In addition this package provides a command line tool to generate QR codes and
12091either write these QR codes to a file or do the output as ascii art at the
12092console.")
12093 (license license:bsd-3)))
12094
12095(define-public python2-qrcode
12096 (package-with-python2 python-qrcode))
12097
12098(define-public python-rst2ansi
12099 (package
12100 (name "python-rst2ansi")
12101 (version "0.1.5")
12102 (source
12103 (origin
12104 (method url-fetch)
12105 (uri (pypi-uri "rst2ansi" version))
12106 (sha256
12107 (base32
12108 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
12109 (build-system python-build-system)
12110 (propagated-inputs
12111 `(("python-docutils" ,python-docutils)))
12112 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
12113 (synopsis "Convert RST to ANSI-decorated console output")
12114 (description
12115 "Python module dedicated to rendering RST (reStructuredText) documents
12116to ansi-escaped strings suitable for display in a terminal.")
12117 (license license:expat)))
12118
12119(define-public python-ansi2html
12120 (package
12121 (name "python-ansi2html")
12122 (version "1.2.0")
12123 (source
12124 (origin
12125 (method url-fetch)
12126 (uri (pypi-uri "ansi2html" version))
12127 (sha256
12128 (base32
12129 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
12130 (build-system python-build-system)
12131 (native-inputs
12132 `(("python-mock" ,python-mock)
12133 ("python-nose" ,python-nose)))
12134 (propagated-inputs
12135 `(("python-six" ,python-six)))
12136 (home-page "https://github.com/ralphbean/ansi2html")
12137 (synopsis "Convert ANSI-decorated console output to HTML")
12138 (description
12139 "@command{ansi2html} is a Python library and command line utility for
12140convering text with ANSI color codes to HTML or LaTeX.")
12141 (license license:gpl3+)))
12142
12143(define-public python2-ansi2html
12144 (package-with-python2 python-ansi2html))
12145
12146(define-public python-ddt
12147 (package
12148 (name "python-ddt")
12149 (version "1.1.3")
12150 (source
12151 (origin
12152 (method url-fetch)
12153 (uri (pypi-uri "ddt" version))
12154 (sha256
12155 (base32
12156 "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk"))))
12157 (build-system python-build-system)
12158 (native-inputs
12159 `(("python-mock" ,python-mock)
12160 ("python-nose" ,python-nose)))
12161 (propagated-inputs
12162 `(("python-six" ,python-six)
12163 ("python-pyyaml" ,python-pyyaml)))
12164 (home-page "https://github.com/txels/ddt")
12165 (synopsis "Data-Driven Tests")
12166 (description
12167 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
12168running it with different test data, and make it appear as multiple test
12169cases.")
12170 (license license:expat)))
12171
12172(define-public python2-ddt
12173 (package-with-python2 python-ddt))
12174
12175(define-public python-pycountry
12176 (package
12177 (name "python-pycountry")
12178 (version "18.5.26")
12179 (source
12180 (origin
12181 (method url-fetch)
12182 (uri (pypi-uri "pycountry" version))
12183 (sha256
12184 (base32
12185 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
12186 (build-system python-build-system)
12187 (home-page "https://bitbucket.org/flyingcircus/pycountry")
12188 (synopsis "ISO databases for languages, countries, currencies, etc.")
12189 (description
12190 "@code{pycountry} provides the ISO databases for the standards:
12191@enumerate
12192@item 639-3 (Languages)
12193@item 3166 (Countries)
12194@item 3166-3 (Deleted Countries)
12195@item 3166-2 (Subdivisions of countries)
12196@item 4217 (Currencies)
12197@item 15924 (Scripts)
12198@end enumerate
12199It includes a copy from Debian’s pkg-isocodes and makes the data accessible
12200through a Python API.")
12201 (license license:lgpl2.1+)))
12202
12203(define-public python2-pycountry
12204 (package-with-python2 python-pycountry))
12205
12206(define-public python-pycosat
12207 (package
12208 (name "python-pycosat")
12209 (version "0.6.1")
12210 (source
12211 (origin
12212 (method url-fetch)
12213 (uri (pypi-uri "pycosat" version))
12214 (sha256
12215 (base32
12216 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
12217 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
12218 (build-system python-build-system)
12219 (home-page "https://github.com/ContinuumIO/pycosat")
12220 (synopsis "Bindings to picosat (a SAT solver)")
12221 (description
12222 "This package provides efficient Python bindings to @code{picosat} on
12223the C level. When importing pycosat, the @code{picosat} solver becomes part
12224of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
12225Problem} (SAT) solver.")
12226 (license license:expat)))
12227
12228(define-public python2-pycosat
12229 (package-with-python2 python-pycosat))
12230
12231(define-public python2-ruamel.ordereddict
12232 (package
12233 (name "python2-ruamel.ordereddict")
12234 (version "0.4.9")
12235 (source
12236 (origin
12237 (method url-fetch)
12238 (uri (pypi-uri "ruamel.ordereddict" version))
12239 (sha256
12240 (base32
12241 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
12242 (build-system python-build-system)
12243 (arguments
12244 `(#:python ,python-2
12245 #:phases
12246 (modify-phases %standard-phases
12247 (delete 'check)
12248 (add-after 'install 'check
12249 (lambda* (#:key inputs outputs #:allow-other-keys)
12250 (add-installed-pythonpath inputs outputs)
f987ac30 12251 (invoke "python" "test/testordereddict.py"))))))
44d10b1f
RW
12252 (home-page "https://bitbucket.org/ruamel/ordereddict")
12253 (synopsis "Version of dict that keeps keys in insertion order")
12254 (description
12255 "This is an implementation of an ordered dictionary with @dfn{Key
12256Insertion Order} (KIO: updates of values do not affect the position of the
12257key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
12258removed and put at the back). The standard library module @code{OrderedDict},
12259implemented later, implements a subset of @code{ordereddict} functionality.
12260Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
12261Order} (KSO, no sorting function can be specified, but a transform can be
12262specified to apply on the key before comparison (e.g. @code{string.lower})).")
12263 (license license:expat)))
12264
12265(define-public python-pypeg2
12266 (package
12267 (name "python-pypeg2")
12268 (version "2.15.2")
12269 (source
12270 (origin
12271 (method url-fetch)
12272 (uri (pypi-uri "pyPEG2" version))
12273 (sha256
12274 (base32
12275 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
12276 (build-system python-build-system)
12277 (propagated-inputs `(("python-lxml" ,python-lxml)))
12278 (arguments
12279 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
12280 '(#:tests? #f))
12281 (home-page "https://fdik.org/pyPEG/")
12282 (synopsis "Parsering Expression Grammars in Python")
12283 (description "PyPEG is an intrinsic parser interpreter framework for
12284Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
12285parse many formal languages.")
12286 (license license:gpl2)))
12287
12288(define-public python-incremental
12289 (package
12290 (name "python-incremental")
12291 (version "17.5.0")
12292 (source
12293 (origin
12294 (method url-fetch)
12295 (uri (pypi-uri "incremental" version))
12296 (sha256
12297 (base32
12298 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
12299 (build-system python-build-system)
12300 (home-page "https://github.com/hawkowl/incremental")
12301 (synopsis "Library for versioning Python projects")
12302 (description "Incremental is a small library that versions your Python
12303projects.")
12304 (license license:expat)))
12305
12306(define-public python2-incremental
12307 (package-with-python2 python-incremental))
12308
12309(define-public python-invoke
12310 (package
12311 (name "python-invoke")
12312 (home-page "http://www.pyinvoke.org/")
a5662319 12313 (version "1.3.0")
44d10b1f
RW
12314 (source (origin
12315 (method url-fetch)
12316 (uri (pypi-uri "invoke" version))
12317 (sha256
12318 (base32
a5662319 12319 "1nn7gad0rvy492acpyhkrp01zsk86acf34qhsvq4xmm6x39788n5"))))
44d10b1f
RW
12320 (build-system python-build-system)
12321 (arguments
12322 ;; XXX: Requires many dependencies that are not yet in Guix.
12323 `(#:tests? #f))
12324 (synopsis "Pythonic task execution")
12325 (description
12326 "Invoke is a Python task execution tool and library, drawing inspiration
12327from various sources to arrive at a powerful and clean feature set. It is
12328evolved from the Fabric project, but focuses on local and abstract concerns
12329instead of servers and network commands.")
12330 (license license:bsd-3)))
12331
12332(define-public python2-invoke
12333 (package-with-python2 python-invoke))
12334
12335(define-public python-automat
12336 (package
12337 (name "python-automat")
919d80a0 12338 (version "0.7.0")
44d10b1f
RW
12339 (source (origin
12340 (method url-fetch)
12341 (uri (pypi-uri "Automat" version))
12342 (sha256
12343 (base32
919d80a0 12344 "03ivg70n3b1cbcd2zvjhk8y4kmqxcvhmili39lmgx09dza1qpmyb"))))
44d10b1f
RW
12345 (build-system python-build-system)
12346 ;; We disable the tests because they require python-twisted, while
12347 ;; python-twisted depends on python-automat. Twisted is optional, but the
12348 ;; tests fail if it is not available. Also see
12349 ;; <https://github.com/glyph/automat/issues/71>.
12350 (arguments '(#:tests? #f))
12351 (native-inputs
12352 `(("python-m2r" ,python-m2r)
12353 ("python-setuptools-scm" ,python-setuptools-scm)
12354 ("python-graphviz" ,python-graphviz)))
12355 (propagated-inputs
12356 `(("python-six" ,python-six)
12357 ("python-attrs" ,python-attrs)))
12358 (home-page "https://github.com/glyph/Automat")
12359 (synopsis "Self-service finite-state machines")
12360 (description "Automat is a library for concise, idiomatic Python
12361expression of finite-state automata (particularly deterministic finite-state
12362transducers).")
12363 (license license:expat)))
12364
12365(define-public python2-automat
12366 (package-with-python2 python-automat))
12367
12368(define-public python-m2r
12369 (package
12370 (name "python-m2r")
bcfb8fac 12371 (version "0.2.1")
44d10b1f
RW
12372 (source (origin
12373 (method url-fetch)
12374 (uri (pypi-uri "m2r" version))
12375 (sha256
12376 (base32
bcfb8fac 12377 "16gdm8i06jjmlpvckpfmlkr4693dh0vs192vgsqn84fsdkbbm45z"))))
44d10b1f
RW
12378 (build-system python-build-system)
12379 (propagated-inputs
12380 `(("python-docutils" ,python-docutils)
12381 ("python-mistune" ,python-mistune)))
12382 (native-inputs
12383 `(("python-pygments" ,python-pygments)
12384 ("python-mock" ,python-mock)))
12385 (home-page "https://github.com/miyakogi/m2r")
12386 (synopsis "Markdown to reStructuredText converter")
12387 (description "M2R converts a markdown file including reST markups to valid
12388reST format.")
12389 (license license:expat)))
12390
12391(define-public python2-m2r
12392 (package-with-python2 python-m2r))
12393
12394(define-public python-constantly
12395 (package
12396 (name "python-constantly")
12397 (version "15.1.0")
12398 (source (origin
12399 (method url-fetch)
12400 (uri (pypi-uri "constantly" version))
12401 (sha256
12402 (base32
12403 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
12404 (build-system python-build-system)
12405 (home-page "https://github.com/twisted/constantly")
12406 (synopsis "Symbolic constants in Python")
12407 (description "Constantly is a Python library that provides symbolic
12408constant support. It includes collections and constants with text, numeric,
12409and bit flag values.")
12410 (license license:expat)))
12411
12412(define-public python2-constantly
12413 (package-with-python2 python-constantly))
12414
12415(define-public python-attrs
12416 (package
12417 (name "python-attrs")
c41d5144 12418 (version "19.1.0")
44d10b1f
RW
12419 (source (origin
12420 (method url-fetch)
12421 (uri (pypi-uri "attrs" version))
12422 (sha256
12423 (base32
c41d5144 12424 "16g33zr5f449lqc5wgvzpknxryfzrfsxcr6kpgxwn7l5fkv71f7h"))))
44d10b1f
RW
12425 (build-system python-build-system)
12426 (arguments
12427 `(#:modules ((guix build utils)
12428 (guix build python-build-system)
12429 (ice-9 ftw)
12430 (srfi srfi-1)
12431 (srfi srfi-26))
12432 #:phases (modify-phases %standard-phases
12433 (replace 'check
12434 (lambda _
12435 (let ((cwd (getcwd)))
12436 (setenv "PYTHONPATH"
12437 (string-append
12438 cwd "/build/"
12439 (find (cut string-prefix? "lib" <>)
12440 (scandir (string-append cwd "/build")))
12441 ":"
12442 (getenv "PYTHONPATH")))
12443 (invoke "python" "-m" "pytest")))))))
12444 (native-inputs
12445 `(("python-coverage" ,python-coverage)
12446 ("python-hypothesis" ,python-hypothesis)
12447 ("python-pympler" ,python-pympler)
12448 ("python-pytest" ,python-pytest)
12449 ("python-six" ,python-six)
12450 ("python-sphinx" ,python-sphinx)
12451 ("python-zope-interface" ,python-zope-interface)))
12452 (home-page "https://github.com/python-attrs/attrs/")
12453 (synopsis "Attributes without boilerplate")
12454 (description "@code{attrs} is a Python package with class decorators that
12455ease the chores of implementing the most common attribute-related object
12456protocols.")
12457 (license license:expat)))
12458
12459(define-public python2-attrs
12460 (package-with-python2 python-attrs))
12461
12462(define-public python-attrs-bootstrap
12463 (package
12464 (inherit python-attrs)
12465 (name "python-attrs-bootstrap")
44d10b1f
RW
12466 (native-inputs `())
12467 (arguments `(#:tests? #f))))
12468
12469(define-public python2-attrs-bootstrap
12470 (package-with-python2 python-attrs-bootstrap))
12471
12472(define-public python2-cliapp
12473 (package
12474 (name "python2-cliapp")
9064b84e 12475 (version "1.20180812.1")
44d10b1f
RW
12476 (source
12477 (origin
12478 (method url-fetch)
12479 (uri (string-append
12480 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
12481 version ".tar.gz"))
12482 (sha256
12483 (base32
9064b84e 12484 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
44d10b1f
RW
12485 (build-system python-build-system)
12486 (arguments
12487 `(#:python ,python-2
12488 #:phases
12489 (modify-phases %standard-phases
12490 ;; check phase needs to be run before the build phase. If not,
12491 ;; coverage-test-runner looks for tests for the built source files,
12492 ;; and fails.
12493 (delete 'check)
12494 (add-before 'build 'check
12495 (lambda _
12496 ;; Disable python3 tests
12497 (substitute* "check"
12498 (("python3") "# python3"))
6c826d32 12499 (invoke "./check"))))))
44d10b1f
RW
12500 (native-inputs
12501 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
12502 ("python2-pep8" ,python2-pep8)))
12503 (propagated-inputs
12504 `(("python2-pyaml" ,python2-pyaml)))
12505 (home-page "https://liw.fi/cliapp/")
12506 (synopsis "Python framework for command line programs")
12507 (description "@code{python2-cliapp} is a python framework for
12508command line programs. It contains the typical stuff such programs
12509need to do, such as parsing the command line for options, and
12510iterating over input files.")
12511 (license license:gpl2+)))
12512
12513(define-public python2-ttystatus
12514 (package
12515 (name "python2-ttystatus")
e516a9c2 12516 (version "0.36")
44d10b1f
RW
12517 (source
12518 (origin
12519 (method url-fetch)
12520 (uri (string-append
12521 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
12522 version ".tar.gz"))
12523 (sha256
12524 (base32
e516a9c2 12525 "06mdk4d19zw2j3is54gndhzl396g3xc8k52m7i86z69s9hcz71by"))))
44d10b1f
RW
12526 (build-system python-build-system)
12527 (native-inputs
12528 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
12529 ("python2-pep8" ,python2-pep8)))
12530 (arguments
12531 `(#:python ,python-2
12532 #:phases
12533 (modify-phases %standard-phases
12534 ;; check phase needs to be run before the build phase. If not,
12535 ;; coverage-test-runner looks for tests for the built source files,
12536 ;; and fails.
12537 (delete 'check)
12538 (add-before 'build 'check
cbeee881 12539 (lambda _ (invoke "make" "check"))))))
44d10b1f
RW
12540 (home-page "https://liw.fi/ttystatus/")
12541 (synopsis "Python library for showing progress reporting and
12542status updates on terminals")
12543 (description "@code{python2-ttystatus} is a python library for
12544showing progress reporting and status updates on terminals, for
12545command line programs. Output is automatically adapted to the width
12546of the terminal: truncated if it does not fit, and resized if the
12547terminal size changes.")
12548 (license license:gpl3+)))
12549
12550(define-public python2-tracing
12551 (package
12552 (name "python2-tracing")
12553 (version "0.10")
12554 (source
12555 (origin
12556 (method url-fetch)
12557 (uri (string-append
12558 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
12559 version ".tar.gz"))
12560 (sha256
12561 (base32
12562 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
12563 (build-system python-build-system)
12564 (arguments
12565 `(#:python ,python-2))
12566 (home-page "https://liw.fi/tracing/")
12567 (synopsis "Python debug logging helper")
12568 (description "@code{python2-tracing} is a python library for
12569logging debug messages. It provides a way to turn debugging messages
12570on and off, based on the filename they occur in. It is much faster
12571than using @code{logging.Filter} to accomplish the same thing, which
12572matters when code is run in production mode. The actual logging still
12573happens using the @code{logging} library.")
12574 (license license:gpl3+)))
12575
12576(define-public python2-larch
12577 (package
12578 (name "python2-larch")
12579 (version "1.20151025")
12580 (source
12581 (origin
12582 (method url-fetch)
12583 (uri (string-append
12584 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
12585 version ".tar.gz"))
12586 (patches (search-patches
12587 "python2-larch-coverage-4.0a6-compatibility.patch"))
12588 (sha256
12589 (base32
12590 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
12591 (build-system python-build-system)
12592 (arguments
12593 `(#:python ,python-2
12594 #:phases
12595 (modify-phases %standard-phases
12596 ;; check phase needs to be run before the build phase. If not,
12597 ;; coverage-test-runner looks for tests for the built source files,
12598 ;; and fails.
12599 (delete 'check)
12600 (add-before 'build 'check
204ad455 12601 (lambda _ (invoke "make" "check"))))))
44d10b1f
RW
12602 (native-inputs
12603 `(("cmdtest" ,cmdtest)
12604 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
12605 (propagated-inputs
12606 `(("python2-tracing" ,python2-tracing)))
12607 (home-page "https://liw.fi/larch/")
12608 (synopsis "Python copy-on-write B-tree library")
12609 (description "@code{python2-larch} is an implementation of
12610particular kind of B-tree, based on research by Ohad Rodeh. See
12611@url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
12612on the data structure.
12613
12614The distinctive feature of this B-tree is that a node is never
12615(conceptually) modified. Instead, all updates are done by
12616copy-on-write. This makes it easy to clone a tree, and modify only the
12617clone, while other processes access the original tree.")
12618 (license license:gpl3+)))
12619
12620(define-public python-astroid
12621 (package
12622 (name "python-astroid")
1c43c698 12623 (version "2.3.3")
44d10b1f
RW
12624 (source
12625 (origin
12626 (method url-fetch)
12627 (uri (pypi-uri "astroid" version))
12628 (sha256
1c43c698 12629 (base32 "0fnibsl2cb5mvzbfm7sycj85smx48f8w8m7ks1sqlmpr9ps0gski"))))
44d10b1f
RW
12630 (build-system python-build-system)
12631 (propagated-inputs
12632 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
12633 ("python-six" ,python-six)
f0935460 12634 ("python-typed-ast" ,python-typed-ast)
44d10b1f
RW
12635 ("python-wrapt" ,python-wrapt)))
12636 (native-inputs
12637 `(("python-dateutil" ,python-dateutil)
12638 ("python-nose" ,python-nose)
12639 ("python-pytest" ,python-pytest)
12640 ("python-pytest-runner" ,python-pytest-runner)))
12641 (arguments
12642 `(#:phases
12643 (modify-phases %standard-phases
12644 (add-after 'unpack 'remove-spurious-test
12645 (lambda _
12646 ;; This can be removed after upgrading from python-3.7
12647 ;; https://github.com/PyCQA/astroid/issues/593
12648 ;; https://bugs.python.org/issue34056
12649 (delete-file "astroid/tests/unittest_modutils.py")
12650 #t))
12651 (replace 'check
12652 (lambda _
12653 (invoke "pytest" "astroid"))))))
12654 (home-page "https://github.com/PyCQA/astroid")
12655 (synopsis "Common base representation of python source code for pylint and
12656other projects")
12657 (description "@code{python-astroid} provides a common base representation
12658of python source code for projects such as pychecker, pyreverse, pylint, etc.
12659
12660It provides a compatible representation which comes from the _ast module. It
12661rebuilds the tree generated by the builtin _ast module by recursively walking
12662down the AST and building an extended ast. The new node classes have
12663additional methods and attributes for different usages. They include some
12664support for static inference and local name scopes. Furthermore, astroid
12665builds partial trees by inspecting living objects.")
12666 (license license:lgpl2.1+)
12667 (properties `((python2-variant . ,(delay python2-astroid))))))
12668
12669(define-public python2-astroid
12670 (let ((base (package-with-python2
12671 (strip-python2-variant python-astroid))))
12672 (package (inherit base)
12673 ;; Version 2.x removes python2 support.
12674 (version "1.6.5")
12675 (source
12676 (origin
12677 (method url-fetch)
12678 (uri (pypi-uri "astroid" version))
12679 (sha256
12680 (base32
12681 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
12682 (arguments
12683 (substitute-keyword-arguments (package-arguments base)
12684 ((#:phases phases)
12685 `(modify-phases ,phases
12686 (add-after 'unpack 'remove-spurious-test
12687 (lambda _
12688 ;; https://github.com/PyCQA/astroid/issues/276
12689 (delete-file "astroid/tests/unittest_brain.py")
12690 #t))
12691 (replace 'check
12692 (lambda _
12693 (invoke"python" "-m" "unittest" "discover"
12694 "-p" "unittest*.py")))))))
12695 (native-inputs `())
12696 (propagated-inputs
12697 `(("python2-backports-functools-lru-cache"
12698 ,python2-backports-functools-lru-cache)
12699 ("python2-enum34" ,python2-enum34)
12700 ("python2-singledispatch" ,python2-singledispatch)
741f98b3
MO
12701 ,@(alist-delete "python-typed-ast"
12702 (package-propagated-inputs base)))))))
44d10b1f
RW
12703
12704(define-public python-isort
12705 (package
12706 (name "python-isort")
e2227b6a 12707 (version "4.3.4")
44d10b1f
RW
12708 (source
12709 (origin
e2227b6a
EF
12710 (method git-fetch)
12711 (uri (git-reference
12712 ;; Tests pass only from the Github sources
12713 (url "https://github.com/timothycrosley/isort")
12714 (commit version)))
12715 (file-name (git-file-name name version))
44d10b1f
RW
12716 (sha256
12717 (base32
e2227b6a 12718 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
44d10b1f
RW
12719 (build-system python-build-system)
12720 (native-inputs
12721 `(("python-mock" ,python-mock)
12722 ("python-pytest" ,python-pytest)))
12723 (home-page "https://github.com/timothycrosley/isort")
12724 (synopsis "Python utility/library to sort python imports")
12725 (description "@code{python-isort} is a python utility/library to sort
12726imports alphabetically, and automatically separated into sections. It
12727provides a command line utility, a python library and plugins for various
12728editors.")
e2227b6a
EF
12729 (license license:expat)
12730 (properties `((python2-variant . ,(delay python2-isort))))))
44d10b1f
RW
12731
12732(define-public python2-isort
e2227b6a
EF
12733 (let ((base (package-with-python2
12734 (strip-python2-variant python-isort))))
12735 (package (inherit base)
12736 (native-inputs
12737 `(("python2-futures" ,python2-futures)
12738 ,@(package-native-inputs base))))))
44d10b1f
RW
12739
12740(define-public python2-backports-functools-lru-cache
12741 (package
12742 (name "python2-backports-functools-lru-cache")
12743 (version "1.5")
12744 (source
12745 (origin
12746 (method url-fetch)
12747 ;; only the pypi tarballs contain the necessary metadata
12748 (uri (pypi-uri "backports.functools_lru_cache" version))
12749 (sha256
12750 (base32
12751 "06jgv8gib4fhky0p5cmxdghvsgjyzcdgk48k8pxb1ccf11znk64x"))))
12752 (build-system python-build-system)
12753 (native-inputs
12754 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
12755 (arguments
12756 `(#:python ,python-2))
12757 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
12758 (synopsis "Backport of functools.lru_cache from Python 3.3")
12759 (description "@code{python2-backports-functools-lru-cache} is a backport
12760of @code{functools.lru_cache} from python 3.3.")
12761 (license license:expat)))
12762
12763(define-public python-configparser
12764 (package
12765 (name "python-configparser")
84127f8c 12766 (version "3.7.1")
44d10b1f
RW
12767 (source
12768 (origin
12769 (method url-fetch)
84127f8c 12770 (uri (pypi-uri "configparser" version))
44d10b1f
RW
12771 (sha256
12772 (base32
84127f8c 12773 "0cnz213il9lhgda6x70fw7mfqr8da43s3wm343lwzhqx94mgmmav"))))
44d10b1f 12774 (build-system python-build-system)
809f003f 12775 (home-page "https://github.com/jaraco/configparser/")
44d10b1f
RW
12776 (synopsis "Backport of configparser from python 3.5")
12777 (description "@code{python-configparser} is a backport of
12778@code{configparser} from Python 3.5 so that it can be used directly
12779in other versions.")
12780 (license license:expat)))
12781
12782(define-public python2-configparser
12783 (package-with-python2 python-configparser))
12784
12785(define-public python-mando
12786 (package
12787 (name "python-mando")
12788 (version "0.6.4")
12789 (source (origin
12790 (method url-fetch)
12791 (uri (pypi-uri "mando" version))
12792 (sha256
12793 (base32
12794 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
12795 (build-system python-build-system)
12796 (propagated-inputs
12797 `(("python-rst2ansi" ,python-rst2ansi)
12798 ("python-six" ,python-six)))
12799 (native-inputs
12800 `(("python-pytest" ,python-pytest)))
12801 (home-page "https://mando.readthedocs.org/")
12802 (synopsis
12803 "Wrapper around argparse, allowing creation of complete CLI applications")
12804 (description
12805 "This package is a wrapper around argparse, allowing you to write complete CLI
12806applications in seconds while maintaining all the flexibility.")
12807 (license license:expat)))
12808
12809(define-public python2-mando
12810 (package-with-python2 python-mando))
12811
70daf82f
RW
12812(define-public python2-argparse
12813 (package
12814 (name "python2-argparse")
12815 (version "1.4.0")
12816 (source
12817 (origin
12818 (method url-fetch)
12819 (uri (pypi-uri "argparse" version))
12820 (sha256
12821 (base32
12822 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
12823 (build-system python-build-system)
12824 (arguments
12825 `(#:python ,python-2))
12826 (home-page "https://github.com/ThomasWaldmann/argparse/")
12827 (synopsis "Python command-line parsing library")
12828 (description
12829 "This package is mostly for people who want to have @code{argparse} on
12830older Pythons because it was not part of the standard library back then.")
12831 (license license:psfl)))
12832
44d10b1f
RW
12833(define-public python-fudge
12834 (package
12835 (name "python-fudge")
12836 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
12837 ;; package, which is currently the only use of this package.
12838 (version "0.9.6")
12839 (source
12840 (origin
12841 (method url-fetch)
12842 (uri (pypi-uri "fudge" version))
12843 (sha256
12844 (base32
12845 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
12846 (build-system python-build-system)
12847 (arguments
12848 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
12849 (home-page "https://github.com/fudge-py/fudge")
12850 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
12851 (description
12852 "Fudge is a Python module for using fake objects (mocks and stubs) to
12853test real ones.
12854
12855In readable Python code, you declare the methods available on your fake object
12856and how they should be called. Then you inject that into your application and
12857start testing. This declarative approach means you don’t have to record and
12858playback actions and you don’t have to inspect your fakes after running code.
12859If the fake object was used incorrectly then you’ll see an informative
12860exception message with a traceback that points to the culprit.")
12861 (license license:expat)))
12862
12863(define-public python2-fudge
12864 (package-with-python2 python-fudge))
12865
12866(define-public python-mwclient
12867 (package
12868 (name "python-mwclient")
957c6833 12869 (version "0.10.0")
44d10b1f
RW
12870 (source
12871 (origin
957c6833 12872 (method git-fetch)
44d10b1f 12873 ;; The PyPI version wouldn't contain tests.
957c6833
EF
12874 (uri (git-reference
12875 (url "https://github.com/mwclient/mwclient")
12876 (commit (string-append "v" version))))
12877 (file-name (git-file-name name version))
44d10b1f
RW
12878 (sha256
12879 (base32
957c6833 12880 "1c3q6lwmb05yqywc4ya98ca7hsl15niili8rccl4n1yqp77c103v"))))
44d10b1f
RW
12881 (build-system python-build-system)
12882 (propagated-inputs
957c6833 12883 `(("python-requests-oauthlib" ,python-requests-oauthlib)
44d10b1f
RW
12884 ("python-six" ,python-six)))
12885 (native-inputs
12886 `(("python-mock" ,python-mock)
12887 ("python-pytest" ,python-pytest)
44d10b1f 12888 ("python-pytest-cov" ,python-pytest-cov)
957c6833 12889 ("python-pytest-runner" ,python-pytest-runner)
44d10b1f
RW
12890 ("python-responses" ,python-responses)))
12891 (home-page "https://github.com/btongminh/mwclient")
12892 (synopsis "MediaWiki API client")
12893 (description "This package provides a MediaWiki API client.")
12894 (license license:expat)))
12895
12896(define-public python2-mwclient
12897 (package-with-python2 python-mwclient))
12898
12899(define-public python-utils
12900 (package
12901 (name "python-utils")
12902 (version "2.1.0")
12903 (source (origin
12904 (method url-fetch)
12905 (uri (pypi-uri "python-utils" version))
12906 (sha256
12907 (base32
12908 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
12909 (build-system python-build-system)
12910 (native-inputs
12911 `(("pytest-runner" ,python-pytest-runner)
12912 ("pytest" ,python-pytest)
12913 ("six" ,python-six)))
12914 (home-page "https://github.com/WoLpH/python-utils")
12915 (synopsis "Convenient utilities not included with the standard Python install")
12916 (description
12917 "Python Utils is a collection of small Python functions and classes which
12918make common patterns shorter and easier.")
12919 (license license:bsd-2)))
12920
12921(define-public python2-utils
12922 (package-with-python2 python-utils))
12923
44d10b1f
RW
12924(define-public python-diff-match-patch
12925 (package
12926 (name "python-diff-match-patch")
12927 (version "20121119")
12928 (source
12929 (origin
12930 (method url-fetch)
12931 (uri (pypi-uri "diff-match-patch" version))
12932 (sha256
12933 (base32
12934 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
12935 (build-system python-build-system)
12936 (home-page "https://code.google.com/p/google-diff-match-patch")
12937 (synopsis "Synchronize plain text")
12938 (description "Diff Match and Patch libraries offer robust algorithms to
12939perform the operations required for synchronizing plain text.")
12940 (license license:asl2.0)))
12941
12942(define-public python2-diff-match-patch
12943 (package-with-python2 python-diff-match-patch))
12944
12945(define-public python-dirsync
12946 (package
12947 (name "python-dirsync")
12948 (version "2.2.3")
12949 (source
12950 (origin
12951 (method url-fetch)
12952 (uri (pypi-uri "dirsync" version))
12953 (sha256
12954 (base32
12955 "1r40fkanksagcszf1ag85mdr8w7rgc7196n6s1qlsk2abw6i7v0z"))))
12956 (build-system python-build-system)
12957 (propagated-inputs
12958 `(("six" ,python-six)))
12959 (home-page "https://bitbucket.org/tkhyn/dirsync")
12960 (synopsis "Advanced directory tree synchronisation tool")
12961 (description "Advanced directory tree synchronisation tool.")
12962 (license license:expat)))
12963
12964(define-public python2-dirsync
12965 (package-with-python2 python-dirsync))
12966
12967(define-public python-levenshtein
12968 (package
12969 (name "python-levenshtein")
12970 (version "0.12.0")
12971 (source
12972 (origin
12973 (method url-fetch)
12974 (uri (pypi-uri "python-Levenshtein" version))
12975 (sha256
12976 (base32
12977 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
12978 (build-system python-build-system)
12979 (home-page "https://github.com/ztane/python-Levenshtein")
12980 (synopsis "Fast computation of Levenshtein distance and string similarity")
12981 (description
12982 "The Levenshtein Python C extension module contains functions for fast computation of
12983@enumerate
12984@item Levenshtein (edit) distance, and edit operations
12985@item string similarity
12986@item approximate median strings, and generally string averaging
12987@item string sequence and set similarity
12988@end enumerate
12989It supports both normal and Unicode strings.")
12990 (license license:gpl2+)))
12991
12992(define-public python2-levenshtein
12993 (package-with-python2 python-levenshtein))
12994
12995(define-public python-scandir
12996 (package
12997 (name "python-scandir")
12998 (version "1.9.0")
12999 (source
13000 (origin
13001 (method url-fetch)
13002 (uri (pypi-uri "scandir" version))
13003 (sha256
13004 (base32 "0r3hvf1a9jm1rkqgx40gxkmccknkaiqjavs8lccgq9s8khh5x5s4"))))
13005 (build-system python-build-system)
13006 (arguments
13007 `(#:phases (modify-phases %standard-phases
13008 (replace 'check
13009 (lambda _
13010 (invoke "python" "test/run_tests.py"))))))
13011 (home-page "https://github.com/benhoyt/scandir")
13012 (synopsis "Directory iteration function")
13013 (description
13014 "Directory iteration function like os.listdir(), except that instead of
13015returning a list of bare filenames, it yields DirEntry objects that include
13016file type and stat information along with the name. Using scandir() increases
13017the speed of os.walk() by 2-20 times (depending on the platform and file
13018system) by avoiding unnecessary calls to os.stat() in most cases.
13019
13020This package is part of the Python standard library since version 3.5.")
13021 (license license:bsd-3)))
13022
13023(define-public python2-scandir
13024 (package-with-python2 python-scandir))
13025
13026(define-public python2-stemming
13027 (package
13028 (name "python2-stemming")
13029 (version "1.0.1")
13030 (source
13031 (origin
13032 (method url-fetch)
13033 (uri (pypi-uri "stemming" version))
13034 (sha256
13035 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
13036 (build-system python-build-system)
13037 (arguments
13038 `(#:python ,python-2))
13039 (home-page "https://bitbucket.org/mchaput/stemming/overview")
13040 (synopsis "Python implementations of various stemming algorithms")
13041 (description
13042 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
13043stemming algorithms for English. These implementations are straightforward and
13044efficient, unlike some Python versions of the same algorithms available on the
13045Web. This package is an extraction of the stemming code included in the Whoosh
13046search engine.")
13047 (license license:public-domain)))
13048
13049(define-public python-factory-boy
13050 (package
13051 (name "python-factory-boy")
13052 (version "2.8.1")
13053 (source
13054 (origin
13055 (method url-fetch)
13056 (uri (pypi-uri "factory_boy" version))
13057 (sha256
13058 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
13059 (build-system python-build-system)
13060 (arguments
13061 ;; Tests are not included in the tarball.
13062 `(#:tests? #f))
13063 (propagated-inputs
13064 `(("faker" ,python-faker)))
13065 (home-page "https://github.com/benhoyt/scandir")
13066 (synopsis "Versatile test fixtures replacement")
13067 (description
13068 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
13069
13070As a fixtures replacement tool, it aims to replace static, hard to maintain
13071fixtures with easy-to-use factories for complex object.
13072
13073Instead of building an exhaustive test setup with every possible combination
13074of corner cases, factory_boy allows you to use objects customized for the
13075current test, while only declaring the test-specific fields")
13076 (license license:expat)))
13077
13078(define-public python2-factory-boy
13079 (package-with-python2 python-factory-boy))
13080
13081(define-public python-translate-toolkit
13082 (package
13083 (name "python-translate-toolkit")
13084 (version "2.1.0")
13085 (source
13086 (origin
13087 (method url-fetch)
13088 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
13089 (sha256
13090 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
13091 (build-system python-build-system)
13092 (native-inputs
13093 `(("python-pytest" ,python-pytest)
13094 ("python-sphinx" ,python-sphinx)))
13095 (propagated-inputs
13096 `(("python-babel" ,python-babel)
13097 ("python-beautifulsoup4" ,python-beautifulsoup4)
13098 ("python-chardet" ,python-chardet)
13099 ("python-diff-match-patch" ,python-diff-match-patch)
13100 ("python-levenshtein" ,python-levenshtein)
13101 ("python-lxml" ,python-lxml)
13102 ("python-six" ,python-six)
13103 ("python-vobject" ,python-vobject)
13104 ("python-pyyaml" ,python-pyyaml)))
13105 (arguments
13106 ;; TODO: tests are not run, because they end with
13107 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
13108 ;; 'parse_funcs'
13109 ;; during test setup.
13110 `(#:tests? #f))
18919cf9 13111 (home-page "https://toolkit.translatehouse.org")
44d10b1f
RW
13112 (synopsis "Tools and API for translation and localization engineering")
13113 (description
13114 "Tools and API for translation and localization engineering. It contains
13115several utilities, as well as an API for building localization tools.")
13116 (license license:gpl2+)))
13117
13118(define-public python2-translate-toolkit
13119 (package-with-python2 python-translate-toolkit))
13120
13121(define-public python-packaging
13122 (package
13123 (name "python-packaging")
a72a1892 13124 (version "20.0")
44d10b1f
RW
13125 (source
13126 (origin
13127 (method url-fetch)
13128 (uri (pypi-uri "packaging" version))
20bf58bf
MB
13129 ;; XXX: The URL in the patch file is wrong, it should be
13130 ;; <https://github.com/pypa/packaging/pull/256>.
fdd0c369 13131 (patches (search-patches "python-packaging-test-arch.patch"))
44d10b1f
RW
13132 (sha256
13133 (base32
a72a1892 13134 "1y2ip3a4ykkpgnwgn85j6hkspcl0cg3mzms97f40mk57vwqq67gy"))))
44d10b1f
RW
13135 (build-system python-build-system)
13136 (arguments
13137 `(#:phases (modify-phases %standard-phases
13138 (replace 'check
13139 (lambda _ (invoke "py.test" "-vv"))))))
13140 (native-inputs
13141 `(("python-pretend" ,python-pretend)
13142 ("python-pytest" ,python-pytest)))
13143 (propagated-inputs
13144 `(("python-pyparsing" ,python-pyparsing)
13145 ("python-six" ,python-six)))
13146 (home-page "https://github.com/pypa/packaging")
13147 (synopsis "Core utilities for Python packages")
13148 (description "Packaging is a Python module for dealing with Python packages.
13149It offers an interface for working with package versions, names, and dependency
13150information.")
13151 ;; From 'LICENSE': This software is made available under the terms of
13152 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
13153 ;; Contributions to this software is made under the terms of *both* these
13154 ;; licenses.
13155 (license (list license:asl2.0 license:bsd-2))))
13156
13157(define-public python2-packaging
13158 (package-with-python2 python-packaging))
13159
13160(define-public python-relatorio
13161 (package
13162 (name "python-relatorio")
13163 (version "0.8.0")
13164 (source
13165 (origin
13166 (method url-fetch)
13167 (uri (pypi-uri "relatorio" version))
13168 (sha256
13169 (base32
13170 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
13171 (build-system python-build-system)
13172 (propagated-inputs
13173 `(("python-lxml" ,python-lxml)
13174 ("python-genshi" ,python-genshi)))
13175 (native-inputs
13176 `(("python-magic" ,python-magic)))
13177 (home-page "https://relatorio.tryton.org/")
13178 (synopsis "Templating library able to output ODT and PDF files")
13179 (description "Relatorio is a templating library which provides a way to
13180easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
13181for more filetypes can be easily added by creating plugins for them.")
13182 (license license:gpl3+)))
13183
13184(define-public python2-relatorio
13185 (package-with-python2 python-relatorio))
13186
13187(define-public python-radon
13188 (package
13189 (name "python-radon")
13190 (version "2.2.0")
13191 (source
13192 (origin
13193 (method url-fetch)
13194 (uri (pypi-uri "radon" version))
13195 (sha256
13196 (base32
13197 "07gq5hq4nrffxnlnksws9hrx7fd001gam63j62i82gyfr23gvdym"))))
13198 (build-system python-build-system)
13199 (arguments
13200 `(#:phases (modify-phases %standard-phases
13201 (replace 'check
13202 (lambda _
13203 (invoke "python" "radon/tests/run.py"))))))
13204 (propagated-inputs
13205 `(("python-colorama" ,python-colorama)
13206 ("python-flake8-polyfill" ,python-flake8-polyfill)
13207 ("python-mando" ,python-mando)))
13208 (native-inputs
13209 `(("python-pytest" ,python-pytest)
13210 ("python-pytest-mock" ,python-pytest-mock)))
13211 (home-page "https://radon.readthedocs.org/")
13212 (synopsis "Code Metrics in Python")
13213 (description "Radon is a Python tool which computes various code metrics.
13214Supported metrics are:
13215@itemize @bullet
13216@item raw metrics: SLOC, comment lines, blank lines, &c.
13217@item Cyclomatic Complexity (i.e. McCabe’s Complexity)
13218@item Halstead metrics (all of them)
13219@item the Maintainability Index (a Visual Studio metric)
13220@end itemize")
13221 (license license:expat)))
13222
13223(define-public python2-radon
13224 (package-with-python2 python-radon))
13225
13226(define-public python-sure
13227 (package
13228 (name "python-sure")
13229 (version "1.4.11")
13230 (source
13231 (origin
13232 (method url-fetch)
13233 (uri (pypi-uri "sure" version))
13234 (sha256
13235 (base32
13236 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
13237 (build-system python-build-system)
13238 (propagated-inputs
13239 `(("python-mock" ,python-mock)
13240 ("python-six" ,python-six)))
13241 (native-inputs
13242 `(("python-nose" ,python-nose)))
13243 (home-page "https://github.com/gabrielfalcao/sure")
13244 (synopsis "Automated testing library in python for python")
13245 (description
13246 "Sure is a python library that leverages a DSL for writing assertions.
13247Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
13248 (license license:gpl3+)))
13249
13250(define-public python2-sure
13251 (package-with-python2 python-sure))
13252
13253(define-public python2-couleur
13254 ;; This package does not seem to support python3 at all, hence,
13255 ;; only the python2 variant definition is provided.
13256 (package
13257 (name "python2-couleur")
13258 (version "0.6.2")
13259 (source
13260 (origin
13261 (method url-fetch)
13262 (uri (pypi-uri "couleur" version))
13263 (sha256
13264 (base32
13265 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
13266 (build-system python-build-system)
13267 (arguments
13268 `(#:python ,python-2))
13269 (home-page "https://github.com/gabrielfalcao/couleur")
13270 (synopsis
13271 "ANSI terminal tool for python, colored shell and other handy fancy features")
13272 (description
13273 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
13274terminal such as coloured output in the shell, overwriting output, indentation, etc.")
13275 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
13276 ;; https://github.com/gabrielfalcao/couleur/issues/11
13277 (license license:lgpl3+)))
13278
13279(define-public python-misaka
13280 (package
13281 (name "python-misaka")
0dcb3412 13282 (version "2.1.1")
44d10b1f
RW
13283 (source
13284 (origin
13285 (method url-fetch)
13286 (uri (pypi-uri "misaka" version))
13287 (sha256
13288 (base32
0dcb3412 13289 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
44d10b1f
RW
13290 (build-system python-build-system)
13291 (arguments
13292 `(;; Line 37 of setup.py calls self.run_command('develop')
13293 ;; in the 'check' phase. This command seems to be trying
13294 ;; to write to
13295 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
13296 ;; for which it does not have the permission to write.
13297 #:tests? #f))
13298 (propagated-inputs
13299 `(("python-cffi" ,python-cffi)))
13300 (home-page "https://github.com/FSX/misaka")
13301 (synopsis "Python binding for Hoedown")
13302 (description
13303 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
13304library written in C. It features a fast HTML renderer and functionality to make custom
13305renderers (e.g. man pages or LaTeX).")
13306 (license license:expat)))
13307
13308(define-public python2-misaka
13309 (package-with-python2 python-misaka))
13310
13311(define-public python2-steadymark
13312 ;; This is forced into being a python2 only variant
13313 ;; due to its dependence on couleur that has no support
13314 ;; for python3
13315 (package
13316 (name "python2-steadymark")
13317 (version "0.7.3")
13318 (source
13319 (origin
13320 (method url-fetch)
13321 (uri (pypi-uri "steadymark" version))
13322 (sha256
13323 (base32
13324 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
13325 (build-system python-build-system)
13326 (native-inputs
13327 `(("python-couleur" ,python2-couleur)
13328 ("python-sure" ,python2-sure)
13329 ("python-misaka" ,python2-misaka)))
13330 (arguments
13331 `(#:python ,python-2
13332 #:phases
13333 (modify-phases %standard-phases
13334 (add-before 'build 'patch-setup-py
13335 (lambda _
13336 ;; Update requirements from dependency==version
13337 ;; to dependency>=version
13338 (substitute* "setup.py"
13339 (("==") ">="))
13340 #t)))))
13341 (home-page "https://github.com/gabrielfalcao/steadymark")
13342 (synopsis "Markdown-based test runner for python")
13343 (description
13344 "@code{Steadymark} allows documentation to be written in github-flavoured
13345markdown. The documentation may contain snippets of code surrounded by python
13346code blocks and @code{Steadymark} will find these snippets and run them, making
13347sure that there are no old malfunctional examples in the documentation examples.")
13348 (license license:expat)))
13349
13350(define-public python-jsonpointer
13351 (package
13352 (name "python-jsonpointer")
13353 (version "1.10")
13354 (source
13355 (origin
13356 (method url-fetch)
13357 (uri (pypi-uri "jsonpointer" version))
13358 (sha256
13359 (base32
13360 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
13361 (build-system python-build-system)
13362 (home-page "https://github.com/stefankoegl/python-json-pointer")
13363 (synopsis "Identify specific nodes in a JSON document")
13364 (description "@code{jsonpointer} allows you to access specific nodes
13365by path in a JSON document (see RFC 6901).")
13366 (license license:bsd-3)))
13367
13368(define-public python2-jsonpointer
13369 (package-with-python2 python-jsonpointer))
13370
13371(define-public python-jsonpatch
13372 (package
13373 (name "python-jsonpatch")
13374 (version "1.16")
13375 (source
13376 (origin
854c5c95 13377 (method git-fetch)
44d10b1f 13378 ;; pypi version lacks tests.js
854c5c95
EF
13379 (uri (git-reference
13380 (url "https://github.com/stefankoegl/python-json-patch")
13381 (commit (string-append "v" version))))
13382 (file-name (git-file-name name version))
44d10b1f
RW
13383 (sha256
13384 (base32
854c5c95 13385 "0k9pff06lxama3nhsc7cdxbp83422bdy8ifs52i6xkas8hpyzfzr"))))
44d10b1f
RW
13386 (build-system python-build-system)
13387 (native-inputs
13388 `(("python-jsonpointer" ,python-jsonpointer)))
13389 (home-page "https://github.com/stefankoegl/python-json-patch")
13390 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
13391 (description "@code{jsonpatch} is a library and program that allows
13392applying JSON Patches according to RFC 6902.")
13393 (license license:bsd-3)))
13394
13395(define-public python2-jsonpatch
13396 (package-with-python2 python-jsonpatch))
13397
13398(define-public python-jsonpatch-0.4
13399 (package (inherit python-jsonpatch)
13400 (name "python-jsonpatch")
13401 (version "0.4")
13402 (source
13403 (origin
a9722d0d
EF
13404 (method git-fetch)
13405 (uri (git-reference
13406 (url "https://github.com/stefankoegl/python-json-patch")
13407 (commit (string-append "v" version))))
13408 (file-name (git-file-name name version))
44d10b1f
RW
13409 (sha256
13410 (base32
a9722d0d 13411 "1fq02y57kinyknxjcav0slcb0k9mwdffqw2hnlhdkpj7palh2mwk"))))))
44d10b1f
RW
13412
13413(define-public python2-jsonpatch-0.4
13414 (package-with-python2 python-jsonpatch-0.4))
13415
13416(define-public python-rfc3986
13417 (package
13418 (name "python-rfc3986")
13419 (version "1.1.0")
13420 (source (origin
13421 (method url-fetch)
13422 (uri (pypi-uri "rfc3986" version))
13423 (sha256
13424 (base32
13425 "06wlmysw83f75ff84zr1yr6n0shvc2xn1n1sb4iwzqap9hf5fn44"))))
13426 (build-system python-build-system)
13427 (arguments
13428 `(#:modules ((guix build utils)
13429 (guix build python-build-system)
13430 (ice-9 ftw)
13431 (srfi srfi-1)
13432 (srfi srfi-26))
13433 #:phases
13434 (modify-phases %standard-phases
13435 (replace 'check
13436 (lambda _
13437 (let ((cwd (getcwd)))
13438 (setenv "PYTHONPATH"
13439 (string-append cwd "/build/"
13440 (find (cut string-prefix? "lib" <>)
13441 (scandir (string-append cwd "/build")))
13442 ":"
13443 (getenv "PYTHONPATH")))
13444 (invoke "pytest" "-v")))))))
13445 (native-inputs
13446 `(("python-pytest" ,python-pytest)))
13447 (home-page "https://rfc3986.readthedocs.io/")
13448 (synopsis "Parse and validate URI references")
13449 (description
13450 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
13451validation and authority parsing. This module also supports RFC@tie{}6874
13452which adds support for zone identifiers to IPv6 addresses.")
13453 (license license:asl2.0)))
13454
13455(define-public python2-rfc3986
13456 (package-with-python2 python-rfc3986))
13457
13458(define-public python-rfc3987
13459 (package
13460 (name "python-rfc3987")
13461 (version "1.3.7")
13462 (source
13463 (origin
13464 (method url-fetch)
13465 (uri (pypi-uri "rfc3987" version))
13466 (sha256
13467 (base32
13468 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
13469 (build-system python-build-system)
13470 (home-page "https://pypi.python.org/pypi/rfc3987")
13471 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
13472 (description "@code{rfc3987} provides routines for parsing and
13473validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
13474 (license license:gpl3+)))
13475
13476(define-public python2-rfc3987
13477 (package-with-python2 python-rfc3987))
13478
13479(define-public python-validate-email
13480 (package
13481 (name "python-validate-email")
13482 (version "1.3")
13483 (source
13484 (origin
13485 (method url-fetch)
13486 (uri (pypi-uri "validate_email" version))
13487 (sha256
13488 (base32
13489 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
13490 (build-system python-build-system)
13491 (home-page "https://github.com/syrusakbary/validate_email")
13492 (synopsis "Verifies if an email address is valid and really exists")
13493 (description "@code{validate_email} can be used to verify if an email
13494address is valid and really exists.")
13495 (license license:lgpl3+)))
13496
13497(define-public python2-validate-email
13498 (package-with-python2 python-validate-email))
13499
13500(define-public python-flex
13501 (package
13502 (name "python-flex")
13503 (version "6.10.0")
13504 (source
13505 (origin
13506 (method url-fetch)
13507 (uri (pypi-uri "flex" version))
13508 (sha256
13509 (base32
13510 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
13511 (build-system python-build-system)
13512 (propagated-inputs
13513 `(("python-click" ,python-click)
13514 ("python-iso8601" ,python-iso8601)
13515 ("python-jsonpointer" ,python-jsonpointer)
13516 ("python-pyyaml" ,python-pyyaml)
13517 ("python-requests" ,python-requests)
13518 ("python-rfc3987" ,python-rfc3987)
13519 ("python-six" ,python-six)
13520 ("python-validate-email" ,python-validate-email)))
13521 (home-page "https://github.com/pipermerriam/flex")
13522 (synopsis "Validates Swagger schemata")
13523 (description "@code{flex} can be used to validate Swagger schemata.")
13524 (license license:bsd-3)))
13525
13526(define-public python2-flex
13527 (package-with-python2 python-flex))
13528
13529(define-public python-marshmallow
13530 (package
13531 (name "python-marshmallow")
13532 (version "3.0.0b14")
13533 (source
13534 (origin
13535 (method url-fetch)
13536 (uri (pypi-uri "marshmallow" version))
13537 (sha256
13538 (base32
13539 "1digk3f5cfk7wmlka65mc7bzsd96pbsgcsvp6pimd5b4ff9zb5p3"))))
13540 (build-system python-build-system)
13541 (propagated-inputs
13542 `(("python-dateutil" ,python-dateutil)
13543 ("python-simplejson" ,python-simplejson)))
13544 (native-inputs
13545 `(("python-pytest" ,python-pytest)
13546 ("python-pytz" ,python-pytz)))
13547 (home-page "https://github.com/marshmallow-code/marshmallow")
13548 (synopsis "Convert complex datatypes to and from native
13549Python datatypes.")
13550 (description "@code{marshmallow} provides a library for converting
13551complex datatypes to and from native Python datatypes.")
13552 (license license:expat)))
13553
13554(define-public python2-marshmallow
13555 (package-with-python2 python-marshmallow))
13556
13557(define-public python-apispec
13558 (package
13559 (name "python-apispec")
13560 (version "0.25.3")
13561 (source
13562 (origin
13563 (method url-fetch)
13564 (uri (pypi-uri "apispec" version))
13565 (sha256
13566 (base32
13567 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
13568 (build-system python-build-system)
13569 (propagated-inputs
13570 `(("python-pyyaml" ,python-pyyaml)))
13571 (native-inputs
13572 `(("python-pytest" ,python-pytest)
13573 ("python-flask" ,python-flask)
13574 ("python-marshmallow" ,python-marshmallow)
13575 ("python-tornado" ,python-tornado)
13576 ("python-bottle" ,python-bottle)
13577 ("python-mock" ,python-mock)))
13578 (home-page "https://github.com/marshmallow-code/apispec")
13579 (synopsis "Swagger 2.0 API specification generator")
13580 (description "@code{python-apispec} is a pluggable API specification
13581generator. Currently supports the OpenAPI specification (f.k.a.
13582Swagger 2.0).")
13583 (license license:expat)))
13584
13585(define-public python2-apispec
13586 (package-with-python2 python-apispec))
13587
13588(define-public python-flasgger
13589 (package
13590 (name "python-flasgger")
13591 (version "0.6.3")
13592 (source
13593 (origin
1a04d421
TGR
13594 (method git-fetch)
13595 (uri (git-reference
13596 (url "https://github.com/rochacbruno/flasgger.git")
13597 (commit version)))
13598 (file-name (git-file-name name version))
44d10b1f 13599 (sha256
1a04d421 13600 (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn"))))
44d10b1f
RW
13601 (build-system python-build-system)
13602 (arguments
13603 `(#:phases
13604 (modify-phases %standard-phases
13605 (replace 'check
13606 (lambda* (#:key inputs outputs #:allow-other-keys)
13607 (substitute* "Makefile"
13608 (("flake8 flasgger --ignore=F403")
13609 "flake8 flasgger --ignore=E731,F403"))
13610 (setenv "PYTHONPATH" (string-append (getcwd)
13611 ":"
13612 (getenv "PYTHONPATH")))
ac599a09 13613 (invoke "py.test"))))))
44d10b1f
RW
13614 (propagated-inputs
13615 `(("python-flask" ,python-flask)
13616 ("python-pyyaml" ,python-pyyaml)
13617 ("python-jsonschema" ,python-jsonschema)
13618 ("python-mistune" ,python-mistune)
13619 ("python-six" ,python-six)))
13620 (native-inputs
13621 `(("python-decorator" ,python-decorator)
13622 ("python-flake8" ,python-flake8)
13623 ("python-flask-restful" ,python-flask-restful)
13624 ("python-flex" ,python-flex)
13625 ("python-pytest" ,python-pytest)
13626 ("python-pytest-cov" ,python-pytest-cov)
13627 ("python-marshmallow" ,python-marshmallow)
13628 ("python-apispec" ,python-apispec)))
13629 (home-page "https://github.com/rochacbruno/flasgger/")
13630 (synopsis "Extract Swagger specs from your Flask project")
13631 (description "@code{python-flasgger} allows extracting Swagger specs
13632from your Flask project. It is a fork of Flask-Swagger.")
13633 (license license:expat)))
13634
13635(define-public python2-flasgger
13636 (package-with-python2 python-flasgger))
13637
13638(define-public python-swagger-spec-validator
13639 (package
13640 (name "python-swagger-spec-validator")
fe9c5b1d 13641 (version "2.4.3")
44d10b1f
RW
13642 (source
13643 (origin
13644 (method url-fetch)
13645 (uri (pypi-uri "swagger-spec-validator" version))
13646 (sha256
13647 (base32
fe9c5b1d 13648 "11g627icrsqwazsncwi0sdvprcj6hwaayw5xk3xsj8d97bmrzqjp"))))
44d10b1f
RW
13649 (build-system python-build-system)
13650 (propagated-inputs
13651 `(("python-jsonschema" ,python-jsonschema)
fe9c5b1d 13652 ("python-pyyaml" ,python-pyyaml)
44d10b1f
RW
13653 ("python-six" ,python-six)))
13654 (home-page
13655 "https://github.com/Yelp/swagger_spec_validator")
13656 (synopsis "Validation of Swagger specifications")
13657 (description "@code{swagger_spec_validator} provides a library for
13658validating Swagger API specifications.")
13659 (license license:asl2.0)))
13660
13661(define-public python2-swagger-spec-validator
13662 (package-with-python2 python-swagger-spec-validator))
13663
13664(define-public python-apache-libcloud
13665 (package
13666 (name "python-apache-libcloud")
13667 (version "2.4.0")
13668 (source
13669 (origin
13670 (method url-fetch)
13671 (uri (pypi-uri "apache-libcloud" version))
13672 (sha256
13673 (base32
13674 "0daj3mkzw79v5zin2r1s2wkrz1hplfc16bwj4ss68i5qjq4l2p0j"))))
13675 (build-system python-build-system)
13676 (arguments
13677 `(#:phases
13678 (modify-phases %standard-phases
13679 (add-after 'unpack 'patch-ssh
13680 (lambda* (#:key inputs #:allow-other-keys)
13681 (substitute* "libcloud/compute/ssh.py"
13682 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
13683 "/bin/ssh" "'")))
13684 #t))
13685 (add-after 'unpack 'patch-tests
13686 (lambda _
13687 (substitute* "./libcloud/test/test_file_fixtures.py"
13688 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
13689 (("def _ascii") "def _raw_data(self, method, url, body, headers):
13690 return (httplib.OK,
13691 \"1234abcd\",
13692 {\"test\": \"value\"},
13693 httplib.responses[httplib.OK])
13694 def _ascii"))
13695 (substitute* "libcloud/test/compute/test_ssh_client.py"
13696 (("class ShellOutSSHClientTests")
13697 "@unittest.skip(\"Guix container doesn't have ssh service\")
13698class ShellOutSSHClientTests")
13699 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
13700 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
13701 (("'.xF0', '.x90', '.x8D', '.x88'")
13702 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
13703 #t))
13704 (add-before 'check 'copy-secret
13705 (lambda _
13706 (copy-file "libcloud/test/secrets.py-dist"
13707 "libcloud/test/secrets.py")
13708 #t)))))
13709 (inputs
13710 `(("openssh" ,openssh)))
13711 (propagated-inputs
13712 `(("python-paramiko" ,python-paramiko)
13713 ("python-requests" ,python-requests)))
13714 (native-inputs
13715 `(("python-lockfile" ,python-lockfile)
13716 ("python-mock" ,python-mock)
13717 ("python-pytest" ,python-pytest)
13718 ("python-pytest-runner" ,python-pytest-runner)
13719 ("python-requests-mock" ,python-requests-mock)))
13720 (home-page "https://libcloud.apache.org/")
13721 (synopsis "Unified Cloud API")
13722 (description "@code{libcloud} is a Python library for interacting with
13723many of the popular cloud service providers using a unified API.")
13724 (license license:asl2.0)))
13725
13726(define-public python2-apache-libcloud
13727 (package-with-python2 python-apache-libcloud))
13728
13729(define-public python-smmap2
13730 (package
13731 (name "python-smmap2")
cd199a45 13732 (version "2.0.5")
44d10b1f
RW
13733 (source
13734 (origin
13735 (method url-fetch)
13736 (uri (pypi-uri "smmap2" version))
13737 (sha256
cd199a45 13738 (base32 "16k03pcnxd3lgzwgbd7nl4jwzm1wmahirvd09kljnzvy96hgza99"))))
44d10b1f
RW
13739 (build-system python-build-system)
13740 (native-inputs
13741 `(("python-nosexcover" ,python-nosexcover)))
13742 (home-page "https://github.com/Byron/smmap")
13743 (synopsis "Python sliding window memory map manager")
13744 (description "@code{smmap2} is a pure Python implementation of a sliding
13745window memory map manager.")
13746 (license license:bsd-3)))
13747
13748(define-public python2-smmap2
13749 (package-with-python2 python-smmap2))
13750
13751(define-public python-regex
13752 (package
13753 (name "python-regex")
c187c9d7 13754 (version "2019.04.14")
44d10b1f
RW
13755 (source (origin
13756 (method url-fetch)
13757 (uri (pypi-uri "regex" version))
13758 (sha256
13759 (base32
c187c9d7
BT
13760 "1a6hhfs6l6snr1z654ay6wzbmwdkmv282fzfkd5hk2d1n73y8v6m"))))
13761 ;; TODO: Fix and enable regex_test.py tests that complain about the
13762 ;; test.support module not existing.
44d10b1f
RW
13763 (build-system python-build-system)
13764 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
13765 (synopsis "Alternative regular expression module")
13766 (description "This regular expression implementation is backwards-
13767compatible with the standard @code{re} module, but offers additional
13768functionality like full case-folding for case-insensitive matches in Unicode.")
13769 (license license:psfl)))
13770
13771(define-public python2-regex
13772 (package-with-python2 python-regex))
13773
13774(define-public python2-pyopengl
13775 (package
13776 (name "python2-pyopengl")
13777 (version "3.1.0")
13778 (source
13779 (origin
13780 (method url-fetch)
13781 (uri (pypi-uri "PyOpenGL" version))
13782 (sha256
13783 (base32
13784 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
13785 (arguments
13786 `(#:python ,python-2))
13787 (build-system python-build-system)
13788 (home-page "http://pyopengl.sourceforge.net")
13789 (synopsis "Standard OpenGL bindings for Python")
13790 (description
13791 "PyOpenGL is the most common cross platform Python binding to OpenGL and
13792related APIs. The binding is created using the standard @code{ctypes}
13793library.")
13794 (license license:bsd-3)))
13795
13796(define-public python2-pyopengl-accelerate
13797 (package
13798 (inherit python2-pyopengl)
13799 (name "python2-pyopengl-accelerate")
13800 (version "3.1.0")
13801 (source
13802 (origin
13803 (method url-fetch)
13804 (uri (pypi-uri "PyOpenGL-accelerate" version))
13805 (sha256
13806 (base32
13807 "0464c1ifzk0k92lyndikmvzjgnx1y25r7bkkc8pnxm4kp1q4czwj"))))
13808 (synopsis "Acceleration code for PyOpenGL")
13809 (description
13810 "This is the Cython-coded accelerator module for PyOpenGL.")))
13811
13812(define-public python-rencode
13813 (package
13814 (name "python-rencode")
13815 (version "1.0.5")
13816 (source
13817 (origin
13818 (method url-fetch)
13819 (uri (pypi-uri "rencode" version))
13820 (sha256
13821 (base32
13822 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
13823 (build-system python-build-system)
13824 (arguments
13825 `(#:phases
13826 (modify-phases %standard-phases
13827 (add-before 'check 'delete-bogus-test
13828 ;; This test requires /home/aresch/Downloads, which is not provided by
13829 ;; the build environment.
13830 (lambda _
13831 (delete-file "rencode/t.py")
13832 #t)))))
13833 (native-inputs `(("pkg-config" ,pkg-config)
13834 ("python-cython" ,python-cython)))
13835 (home-page "https://github.com/aresch/rencode")
13836 (synopsis "Serialization of heterogeneous data structures")
13837 (description
13838 "The @code{rencode} module is a data structure serialization library,
13839similar to @code{bencode} from the BitTorrent project. For complex,
13840heterogeneous data structures with many small elements, r-encoding stake up
13841significantly less space than b-encodings. This version of rencode is a
13842complete rewrite in Cython to attempt to increase the performance over the
13843pure Python module.")
13844 (license license:bsd-3)))
13845
13846(define-public python2-rencode
13847 (package-with-python2 python-rencode))
13848
13849(define-public python-xenon
13850 (package
13851 (name "python-xenon")
13852 (version "0.5.4")
13853 (source
13854 (origin
13855 (method url-fetch)
13856 (uri (pypi-uri "xenon" version))
13857 (sha256
13858 (base32
13859 "029cbhysg2vr5n4jz8gpg2793f8wkwnqpr1qgv6c1dn685vy31mc"))))
13860 (build-system python-build-system)
13861 (native-inputs
13862 `(("python-pyyaml" ,python-pyyaml)
13863 ("python-radon" ,python-radon)
13864 ("python-requests" ,python-requests)
13865 ("python-flake8" ,python-flake8)
13866 ("python-tox" ,python-tox)))
13867 (arguments
13868 `(#:phases
13869 (modify-phases %standard-phases
13870 (add-before 'build 'patch-test-requirements
13871 (lambda _
13872 ;; Remove httpretty dependency for tests.
13873 (substitute* "setup.py"
13874 (("httpretty") ""))
13875 #t)))))
13876 (home-page "https://xenon.readthedocs.org/")
13877 (synopsis "Monitor code metrics for Python on your CI server")
13878 (description
13879 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
13880Ideally, @code{xenon} is run every time code is committed. Through command
13881line options, various thresholds can be set for the complexity of code. It
13882will fail (i.e. it will exit with a non-zero exit code) when any of these
13883requirements is not met.")
13884 (license license:expat)))
13885
13886(define-public python2-xenon
13887 (package-with-python2 python-xenon))
13888
13889(define-public python-pysocks
13890 (package
13891 (name "python-pysocks")
b8725cdf 13892 (version "1.7.0")
44d10b1f
RW
13893 (source
13894 (origin
13895 (method url-fetch)
13896 (uri (pypi-uri "PySocks" version))
13897 (sha256
13898 (base32
b8725cdf 13899 "0z4p31bpqm893cf87qqgb30k7nwd8kqfjwwjm5cvxb6zbyj1w0yr"))))
44d10b1f
RW
13900 (build-system python-build-system)
13901 (arguments `(#:tests? #f))
13902 (home-page "https://github.com/Anorov/PySocks")
13903 (synopsis "SOCKS client module")
13904 (description "@code{pysocks} is an updated and semi-actively maintained
13905version of @code{SocksiPy} with bug fixes and extra features.")
13906 (license license:bsd-3)))
13907
13908(define-public python2-pysocks
13909 (package-with-python2 python-pysocks))
13910
13911(define-public python-pydiff
13912 (package
13913 (name "python-pydiff")
13914 (version "0.2")
13915 (source
13916 (origin
13917 (method url-fetch)
13918 (uri (pypi-uri "pydiff" version))
13919 (sha256
13920 (base32
13921 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
13922 (build-system python-build-system)
13923 (home-page "https://github.com/myint/pydiff")
13924 (synopsis "Library to diff two Python files at the bytecode level")
13925 (description
13926 "@code{pydiff} makes it easy to look for actual code changes while
13927ignoring formatting changes.")
13928 (license license:expat)))
13929
13930(define-public python2-pydiff
13931 (package-with-python2 python-pydiff))
13932
13933(define-public python-tqdm
13934 (package
13935 (name "python-tqdm")
13936 (version "4.19.6")
13937 (source
13938 (origin
13939 (method url-fetch)
13940 (uri (pypi-uri "tqdm" version))
13941 (sha256
13942 (base32
13943 "1pw0ngm0zn9papdmkwipi3yih5c3di6d0w849bdmrraq4d2d9h2y"))))
13944 (build-system python-build-system)
13945 (native-inputs
13946 `(("python-flake8" ,python-flake8)
13947 ("python-nose" ,python-nose)
13948 ("python-coverage" ,python-coverage)))
13949 (home-page "https://github.com/tqdm/tqdm")
13950 (synopsis "Fast, extensible progress meter")
13951 (description
13952 "Make loops show a progress bar on the console by just wrapping any
13953iterable with @code{|tqdm(iterable)|}. Offers many options to define
13954design and layout.")
f875d76f
PL
13955 (license (list license:mpl2.0 license:expat))
13956 (properties `((python2-variant . ,(delay python2-tqdm))))))
44d10b1f
RW
13957
13958(define-public python2-tqdm
f875d76f
PL
13959 (let ((tqdm (package-with-python2
13960 (strip-python2-variant python-tqdm))))
13961 (package (inherit tqdm)
13962 (native-inputs `(("python2-functools32" ,python2-functools32)
13963 ,@(package-native-inputs tqdm))))))
44d10b1f
RW
13964
13965(define-public python-pkginfo
13966 (package
13967 (name "python-pkginfo")
13968 (version "1.4.2")
13969 (source
13970 (origin
13971 (method url-fetch)
13972 (uri (pypi-uri "pkginfo" version))
13973 (sha256
13974 (base32
13975 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
13976 (build-system python-build-system)
13977 (arguments
13978 ;; The tests are broken upstream.
13979 '(#:tests? #f))
13980 (home-page
13981 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
13982 (synopsis
13983 "Query metadatdata from sdists, bdists, and installed packages")
13984 (description
13985 "API to query the distutils metadata written in @file{PKG-INFO} inside a
13986source distriubtion (an sdist) or a binary distribution (e.g., created by
13987running bdist_egg). It can also query the EGG-INFO directory of an installed
13988distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
13989created by running @code{python setup.py develop}).")
13990 (license license:expat)))
13991
13992(define-public python2-pkginfo
13993 (package-with-python2 python-pkginfo))
13994
13995(define-public python-twine
13996 (package
13997 (name "python-twine")
13998 (version "1.9.1")
13999 (source
14000 (origin
14001 (method url-fetch)
14002 (uri (pypi-uri "twine" version))
14003 (sha256
14004 (base32
14005 "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a"))))
14006 (build-system python-build-system)
14007 (propagated-inputs
14008 `(("python-tqdm" ,python-tqdm)
14009 ("python-pkginfo" ,python-pkginfo)
14010 ("python-requests" ,python-requests)
14011 ("python-requests-toolbelt" ,python-requests-toolbelt)))
14012 (home-page "https://github.com/pypa/twine")
14013 (synopsis "Collection of utilities for interacting with PyPI")
14014 (description
14015 "@code{twine} currently supports registering projects and uploading
14016distributions. It authenticates the user over HTTPS, allows them to pre-sign
14017their files and supports any packaging format (including wheels).")
14018 (license license:asl2.0)))
14019
14020(define-public python2-twine
14021 (package-with-python2 python-twine))
14022
14023(define-public python-linecache2
14024 (package
14025 (name "python-linecache2")
14026 (version "1.0.0")
14027 (source
14028 (origin
14029 (method url-fetch)
14030 (uri (pypi-uri "linecache2" version))
14031 (sha256
14032 (base32
14033 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
14034 (build-system python-build-system)
14035 (arguments
14036 `(;; The tests depend on unittest2, and our version is a bit too old.
14037 #:tests? #f))
14038 (native-inputs
14039 `(("python-pbr" ,python-pbr-minimal)))
14040 (home-page
14041 "https://github.com/testing-cabal/linecache2")
14042 (synopsis "Backports of the linecache module")
14043 (description
14044 "The linecache module allows one to get any line from any file, while
14045attempting to optimize internally, using a cache, the common case where many
14046lines are read from a single file.")
14047 (license license:psfl)))
14048
14049(define-public python2-linecache2
14050 (package-with-python2 python-linecache2))
14051
14052(define-public python-traceback2
14053 (package
14054 (name "python-traceback2")
14055 (version "1.4.0")
14056 (source
14057 (origin
14058 (method url-fetch)
14059 (uri (pypi-uri "traceback2" version))
14060 (sha256
14061 (base32
14062 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
14063 (build-system python-build-system)
14064 (arguments
14065 `(;; python-traceback2 and python-unittest2 depend on one another.
14066 #:tests? #f))
14067 (native-inputs
14068 `(("python-pbr" ,python-pbr-minimal)))
14069 (propagated-inputs
14070 `(("python-linecache2" ,python-linecache2)))
14071 (home-page
14072 "https://github.com/testing-cabal/traceback2")
14073 (synopsis "Backports of the traceback module")
14074 (description
14075 "This module provides a standard interface to extract, format and print
14076stack traces of Python programs. It exactly mimics the behavior of the Python
14077interpreter when it prints a stack trace.")
14078 (license license:psfl)))
14079
14080(define-public python2-traceback2
14081 (package-with-python2 python-traceback2))
14082
14083(define-public python-ratelimiter
14084 (package
14085 (name "python-ratelimiter")
14086 (version "1.2.0")
14087 (source
14088 (origin
14089 (method url-fetch)
14090 (uri (pypi-uri "ratelimiter" version))
14091 (sha256
14092 (base32
14093 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
14094 (build-system python-build-system)
14095 (arguments
14096 '(#:tests? #f)) ; There are no tests in the pypi archive.
14097 (home-page "https://github.com/RazerM/ratelimiter")
14098 (synopsis "Simple rate limiting object")
14099 (description
14100 "The @code{ratelimiter} module ensures that an operation will not be
14101executed more than a given number of times during a given period.")
14102 (license license:asl2.0)))
14103
14104(define-public python2-ratelimiter
14105 (package-with-python2 python-ratelimiter))
14106
14107(define-public python-dukpy
14108 (package
14109 (name "python-dukpy")
14110 (version "0.3")
14111 (source
14112 (origin
5b77ebe1
TGR
14113 (method git-fetch)
14114 (uri (git-reference
14115 (url "https://github.com/kovidgoyal/dukpy.git")
14116 (commit (string-append "v" version))))
14117 (file-name (git-file-name name version))
44d10b1f 14118 (sha256
5b77ebe1 14119 (base32 "13h21nqzasv4zj32xs61brmc106pr2cx243672crcmwxxnjgaxls"))))
44d10b1f
RW
14120 (build-system python-build-system)
14121 (home-page "https://github.com/kovidgoyal/dukpy")
14122 (synopsis "Run JavaScript in python")
14123 (description
14124 "dukpy is a JavaScript runtime environment for Python using the duktape
14125embeddable JavaScript engine.")
14126 ;; Dukpy is licensed under MIT like the embedded duktape library,
14127 ;; with 'errors.c' as GPL3.
14128 (license (list license:expat license:gpl3))))
14129
14130(define-public python2-dukpy
14131 (package-with-python2 python-dukpy))
14132
14133(define-public python-jsonrpclib-pelix
14134 (package
14135 (name "python-jsonrpclib-pelix")
14136 (version "0.3.2")
14137 (source
14138 (origin
14139 (method url-fetch)
14140 (uri (pypi-uri "jsonrpclib-pelix" version))
14141 (sha256
14142 (base32
14143 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
14144 (build-system python-build-system)
14145 (arguments
14146 `(#:tests? #f)) ; no tests in PyPI tarball
14147 (home-page "https://github.com/tcalmant/jsonrpclib/")
14148 (synopsis "JSON-RPC 2.0 client library for Python")
14149 (description
14150 "This library implements the JSON-RPC v2.0
14151specification (backwards-compatible) as a client library for Python. This
14152version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
14153services.")
14154 (license license:asl2.0)))
14155
14156(define-public python2-jsonrpclib-pelix
14157 (package-with-python2 python-jsonrpclib-pelix))
14158
14159(define-public python-setuptools-scm-git-archive
14160 (package
14161 (name "python-setuptools-scm-git-archive")
14162 (version "1.0")
14163 (source
14164 (origin
14165 (method url-fetch)
14166 (uri (pypi-uri "setuptools_scm_git_archive" version))
14167 (sha256
14168 (base32
14169 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
14170 (build-system python-build-system)
14171 (native-inputs
14172 `(("python-pytest" ,python-pytest)))
14173 (propagated-inputs
14174 `(("python-setuptools-scm" ,python-setuptools-scm)))
14175 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
14176 (synopsis "Setuptools_scm plugin for git archives")
14177 (description
14178 "The setuptools_scm_git_archive package is a plugin to
14179setuptools_scm, which supports obtaining versions from git archives that
14180belong to tagged versions.")
14181 (license license:expat)))
14182
14183(define-public python2-setuptools-scm-git-archive
14184 (package-with-python2 python-setuptools-scm-git-archive))
14185
724a350c
RW
14186(define-public python-setuptools-git
14187 (package
14188 (name "python-setuptools-git")
14189 (version "1.2")
14190 (source
14191 (origin
14192 (method url-fetch)
14193 (uri (pypi-uri "setuptools-git" version))
14194 (sha256
14195 (base32
14196 "0i84qjwp5m0l9qagdjww2frdh63r37km1c48mrvbmaqsl1ni6r7z"))))
14197 (build-system python-build-system)
14198 (arguments
14199 `(#:phases
14200 (modify-phases %standard-phases
14201 ;; This is needed for tests.
14202 (add-after 'unpack 'configure-git
14203 (lambda _
14204 (setenv "HOME" "/tmp")
14205 (invoke "git" "config" "--global" "user.email" "guix")
14206 (invoke "git" "config" "--global" "user.name" "guix")
14207 #t)))))
14208 (native-inputs
14209 `(("git" ,git-minimal)))
14210 (home-page "https://github.com/msabramo/setuptools-git")
14211 (synopsis "Setuptools revision control system plugin for Git")
14212 (description
14213 "This package provides a plugin for Setuptools for revision control with
14214Git.")
14215 (license license:bsd-3)))
14216
44d10b1f
RW
14217(define-public python-pyclipper
14218 (package
14219 (name "python-pyclipper")
ff3d1b99 14220 (version "1.1.0.post3")
44d10b1f
RW
14221 (source
14222 (origin
14223 (method url-fetch)
14224 (uri (pypi-uri "pyclipper" version ".zip"))
14225 (sha256
ff3d1b99 14226 (base32 "164yksvqwqvwzh8f8lq92asg87hd8rvcy2xb5vm4y4ccvd5xgb7i"))
44d10b1f
RW
14227 (modules '((guix build utils)))
14228 (snippet
14229 '(begin
14230 ;; This file is generated by Cython.
14231 (delete-file "pyclipper/pyclipper.cpp") #t))))
14232 (build-system python-build-system)
14233 (arguments
14234 `(#:phases
14235 (modify-phases %standard-phases
14236 (add-before 'build 'cythonize-sources
14237 (lambda _
14238 (with-directory-excursion "pyclipper"
14239 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
14240 (propagated-inputs
14241 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
14242 (native-inputs
14243 `(("python-cython" ,python-cython)
14244 ("python-pytest" ,python-pytest)
14245 ("python-pytest-runner" ,python-pytest-runner)
14246 ("python-unittest2" ,python-unittest2)
14247 ("unzip" ,unzip)))
14248 (home-page "https://github.com/greginvm/pyclipper")
14249 (synopsis "Wrapper for Angus Johnson's Clipper library")
14250 (description
14251 "Pyclipper is a Cython wrapper for the C++ translation of the
14252Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
14253 (license license:expat)))
14254
14255(define-public python2-pyclipper
14256 (package-with-python2 python-pyclipper))
14257
14258(define-public python2-booleanoperations
14259 (package
14260 (name "python2-booleanoperations")
14261 (version "0.7.1")
14262 (source
14263 (origin
14264 (method url-fetch)
14265 (uri (pypi-uri "booleanOperations" version ".zip"))
14266 (sha256
14267 (base32
14268 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
14269 (build-system python-build-system)
14270 (arguments
14271 `(#:python ,python-2))
14272 (native-inputs
14273 `(("unzip" ,unzip)
14274 ("python2-pytest" ,python2-pytest)
14275 ("python2-pytest-runner" ,python2-pytest-runner)))
14276 (propagated-inputs
14277 `(("python-fonttools" ,python2-fonttools)
14278 ("python-pyclipper" ,python2-pyclipper)
14279 ("python-ufolib" ,python2-ufolib)))
14280 (home-page "https://github.com/typemytype/booleanOperations")
14281 (synopsis "Boolean operations on paths")
14282 (description
14283 "BooleanOperations provides a Python library that enables
14284boolean operations on paths.")
14285 (license license:expat)))
14286
14287(define-public python-tempdir
14288 (package
14289 (name "python-tempdir")
14290 (version "0.7.1")
14291 (source
14292 (origin
14293 (method url-fetch)
14294 (uri (pypi-uri "tempdir" version))
14295 (sha256
14296 (base32
14297 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
14298 (build-system python-build-system)
14299 (home-page "https://pypi.org/project/tempdir/")
14300 (arguments
14301 ;; the package has no tests
14302 '(#:tests? #f))
14303 (synopsis "Python library for managing temporary directories")
14304 (description
14305 "This library manages temporary directories that are automatically
14306deleted with all their contents when they are no longer needed. It is
14307particularly convenient for use in tests.")
14308 (license license:expat)))
14309
14310(define-public python2-tempdir
14311 (package-with-python2 python-tempdir))
14312
14313(define-public python-activepapers
14314 (package
14315 (name "python-activepapers")
14316 (version "0.2.2")
14317 (source
14318 (origin
14319 (method url-fetch)
14320 (uri (pypi-uri "ActivePapers.Py" version))
14321 (sha256
14322 (base32
14323 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
14324 (build-system python-build-system)
14325 (arguments
14326 `(#:modules ((ice-9 ftw)
14327 (srfi srfi-1)
14328 (guix build utils)
14329 (guix build python-build-system))
14330
14331 #:phases
14332 (modify-phases %standard-phases
14333 (add-after 'unpack 'delete-python2-code
14334 (lambda _
14335 (for-each delete-file
14336 '("lib/activepapers/builtins2.py"
14337 "lib/activepapers/standardlib2.py"
14338 "lib/activepapers/utility2.py"))))
14339 (replace 'check
14340 (lambda _
14341 ;; Deactivate the test cases that download files
14342 (setenv "NO_NETWORK_ACCESS" "1")
14343 ;; For some strange reason, some tests fail if nosetests runs all
14344 ;; test modules in a single execution. They pass if each test
14345 ;; module is run individually.
14346 (for-each (lambda (filename)
14347 (invoke "nosetests"
14348 (string-append "tests/" filename)))
14349 (scandir "tests"
14350 (lambda (filename)
14351 (string-suffix? ".py" filename)))))))))
14352 (native-inputs
14353 `(("python-tempdir" ,python-tempdir)
14354 ("python-nose" ,python-nose)))
14355 (propagated-inputs
14356 `(("python-h5py" ,python-h5py)))
14357 (home-page "http://www.activepapers.org/")
14358 (synopsis "Executable papers for scientific computing")
14359 (description
14360 "ActivePapers is a tool for working with executable papers, which
14361combine data, code, and documentation in single-file packages,
14362suitable for publication as supplementary material or on repositories
14363such as figshare or Zenodo.")
14364 (properties `((python2-variant . ,(delay python2-activepapers))))
14365 (license license:bsd-3)))
14366
14367(define-public python2-activepapers
14368 (let ((base (package-with-python2
14369 (strip-python2-variant python-activepapers))))
14370 (package
14371 (inherit base)
14372 (arguments
14373 (substitute-keyword-arguments (package-arguments base)
14374 ((#:phases phases)
14375 `(modify-phases ,phases
14376 (delete 'delete-python2-code)
14377 (add-after 'unpack 'delete-python3-code
14378 (lambda _
14379 (for-each delete-file
14380 '("lib/activepapers/builtins3.py"
14381 "lib/activepapers/standardlib3.py"
14382 "lib/activepapers/utility3.py")))))))))))
14383
14384(define-public python-semver
14385 (package
14386 (name "python-semver")
594280b1 14387 (version "2.9.0")
44d10b1f 14388 (source
2ecbba24
BG
14389 (origin
14390 (method url-fetch)
14391 (uri (pypi-uri "semver" version))
14392 (sha256
14393 (base32
14394 "183kg1rhzz3hqizvphkd8hlbf1zxfx8737zhfkmqzxi71jmdw7pd"))))
44d10b1f 14395 (build-system python-build-system)
44d10b1f
RW
14396 (native-inputs
14397 `(("python-tox" ,python-tox)
14398 ("python-virtualenv" ,python-virtualenv)))
14399 (home-page "https://github.com/k-bx/python-semver")
14400 (synopsis "Python helper for Semantic Versioning")
14401 (description "This package provides a Python library for
14402@url{Semantic Versioning, http://semver.org/}.")
14403 (license license:bsd-3)))
14404
14405(define-public python2-semver
14406 (package-with-python2 python-semver))
14407
14408(define-public python-pyro4
14409 (package
14410 (name "python-pyro4")
3ce91d44 14411 (version "4.77")
44d10b1f
RW
14412 (source
14413 (origin
14414 (method url-fetch)
14415 (uri (pypi-uri "Pyro4" version))
14416 (sha256
3ce91d44 14417 (base32 "0gsjg869y4gpy265s1gj1f2qy6jn5iz8r2bwwnq78r1r5yi15zib"))))
44d10b1f 14418 (build-system python-build-system)
3ce91d44
GL
14419 (arguments
14420 '(#:tests? #f)) ;FIXME: Some tests require network access.
14421 (native-inputs
14422 `(("python-cloudpickle" ,python-cloudpickle)
14423 ("python-dill" ,python-dill)
14424 ("python-msgpack" ,python-msgpack)))
44d10b1f
RW
14425 (propagated-inputs
14426 `(("python-serpent" ,python-serpent)))
14427 (home-page "https://pyro4.readthedocs.io")
14428 (synopsis "Distributed object middleware for Python")
14429 (description
14430 "Pyro enables you to build applications in which objects can talk to each
14431other over the network. You can just use normal Python method calls to call
14432objects on other machines, also known as remote procedure calls (RPC).")
14433 (license license:expat)))
14434
14435(define-public python2-pyro
14436 (package
14437 (name "python2-pyro")
14438 (version "3.16")
14439 (source
14440 (origin
14441 (method url-fetch)
14442 (uri (pypi-uri "Pyro" version))
14443 (file-name (string-append "Pyro-" version ".tar.gz"))
14444 (sha256
14445 (base32
14446 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
14447 (build-system python-build-system)
14448 (arguments
14449 ;; Pyro is not compatible with Python 3
14450 `(#:python ,python-2
14451 ;; Pyro has no test cases for automatic execution
14452 #:tests? #f))
14453 (home-page "http://pythonhosted.org/Pyro/")
14454 (synopsis "Distributed object manager for Python")
14455 (description "Pyro is a Distributed Object Technology system
14456written in Python that is designed to be easy to use. It resembles
14457Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
14458which is a system and language independent Distributed Object Technology
14459and has much more to offer than Pyro or RMI. Pyro 3.x is no
14460longer maintained. New projects should use Pyro4 instead, which
14461is the new Pyro version that is actively developed.")
14462 (license license:expat)))
14463
14464(define-public python2-scientific
14465 (package
14466 (name "python2-scientific")
14467 (version "2.9.4")
14468 (source
14469 (origin
c695f011
KH
14470 (method git-fetch)
14471 (uri (git-reference
14472 (url "https://github.com/khinsen/ScientificPython")
14473 (commit (string-append "rel" version))))
14474 (file-name (git-file-name name version))
44d10b1f
RW
14475 (sha256
14476 (base32
c695f011 14477 "16l48aj9fps9r7jyk8gpxppwrv0fqvlc13sayxskz28r5s6sjwbl"))))
44d10b1f
RW
14478 (build-system python-build-system)
14479 (inputs
14480 `(("netcdf" ,netcdf)))
14481 (propagated-inputs
14482 `(("python-numpy" ,python2-numpy-1.8)
14483 ("python-pyro" ,python2-pyro)))
14484 (arguments
14485 ;; ScientificPython is not compatible with Python 3
14486 `(#:python ,python-2
14487 #:tests? #f ; No test suite
14488 #:phases
14489 (modify-phases %standard-phases
14490 (replace 'build
14491 (lambda* (#:key inputs #:allow-other-keys)
77e61e25
RW
14492 (invoke "python" "setup.py" "build"
14493 (string-append "--netcdf_prefix="
14494 (assoc-ref inputs "netcdf"))))))))
c695f011 14495 (home-page "http://dirac.cnrs-orleans.fr/ScientificPython")
44d10b1f
RW
14496 (synopsis "Python modules for scientific computing")
14497 (description "ScientificPython is a collection of Python modules that are
14498useful for scientific computing. Most modules are rather general (Geometry,
14499physical units, automatic derivatives, ...) whereas others are more
14500domain-specific (e.g. netCDF and PDB support). The library is currently
14501not actively maintained and works only with Python 2 and NumPy < 1.9.")
14502 (license license:cecill-c)))
14503
14504(define-public python2-mmtk
14505 (package
14506 (name "python2-mmtk")
fe9b72c5 14507 (version "2.7.12")
44d10b1f
RW
14508 (source
14509 (origin
fe9b72c5
KH
14510 (method git-fetch)
14511 (uri (git-reference
14512 (url "https://github.com/khinsen/MMTK")
14513 (commit (string-append "rel" version))))
14514 (file-name (git-file-name name version))
44d10b1f
RW
14515 (sha256
14516 (base32
fe9b72c5 14517 "1fqwh3ba9jd42nigvn5shndgwb1zy7kh9520ncvqci7n8ffjr6p1"))))
44d10b1f
RW
14518 (build-system python-build-system)
14519 (native-inputs
14520 `(("netcdf" ,netcdf)))
14521 (propagated-inputs
14522 `(("python-scientific" ,python2-scientific)
14523 ("python-tkinter" ,python-2 "tk")))
14524 (arguments
14525 `(#:python ,python-2
14526 #:tests? #f
14527 #:phases
14528 (modify-phases %standard-phases
14529 (add-before 'build 'includes-from-scientific
14530 (lambda* (#:key inputs #:allow-other-keys)
14531 (mkdir-p "Include/Scientific")
14532 (copy-recursively
14533 (string-append
14534 (assoc-ref inputs "python-scientific")
14535 "/include/python2.7/Scientific")
14536 "Include/Scientific"))))))
14537 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
14538 (synopsis "Python library for molecular simulation")
14539 (description "MMTK is a library for molecular simulations with an emphasis
14540on biomolecules. It provides widely used methods such as Molecular Dynamics
14541and normal mode analysis, but also basic routines for implementing new methods
14542for simulation and analysis. The library is currently not actively maintained
14543and works only with Python 2 and NumPy < 1.9.")
14544 (license license:cecill-c)))
14545
14546(define-public python-phonenumbers
14547 (package
14548 (name "python-phonenumbers")
14549 (version "8.9.1")
14550 (source
14551 (origin
14552 (method url-fetch)
14553 (uri (pypi-uri "phonenumbers" version))
14554 (sha256
14555 (base32
14556 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
14557 (build-system python-build-system)
14558 (home-page
14559 "https://github.com/daviddrysdale/python-phonenumbers")
14560 (synopsis
14561 "Python library for dealing with international phone numbers")
14562 (description
14563 "This package provides a Python port of Google's libphonenumber library.")
14564 (license license:asl2.0)))
14565
14566(define-public python2-phonenumbers
14567 (package-with-python2 python-phonenumbers))
14568
14569(define-public python-send2trash
14570 (package
14571 (name "python-send2trash")
d9b0216b 14572 (version "1.5.0")
44d10b1f 14573 (source
d9b0216b 14574 (origin (method git-fetch)
44d10b1f 14575 ;; Source tarball on PyPI doesn't include tests.
d9b0216b
RW
14576 (uri (git-reference
14577 (url "https://github.com/hsoft/send2trash.git")
14578 (commit version)))
14579 (file-name (git-file-name name version))
44d10b1f
RW
14580 (sha256
14581 (base32
d9b0216b 14582 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
44d10b1f
RW
14583 (build-system python-build-system)
14584 (arguments
14585 '(#:phases
14586 (modify-phases %standard-phases
14587 (add-before 'check 'pre-check
14588 (lambda _
14589 (mkdir-p "/tmp/foo")
14590 (setenv "HOME" "/tmp/foo")
14591 #t)))))
14592 (home-page "https://github.com/hsoft/send2trash")
14593 (synopsis "Send files to the user's @file{~/Trash} directory")
14594 (description "This package provides a Python library to send files to the
14595user's @file{~/Trash} directory.")
20b3fde7 14596 (properties `((python2-variant . ,(delay python2-send2trash))))
44d10b1f
RW
14597 (license license:bsd-3)))
14598
14599(define-public python2-send2trash
14600 (package
f32164ab 14601 (inherit (package-with-python2 (strip-python2-variant python-send2trash)))
44d10b1f
RW
14602 (arguments
14603 (substitute-keyword-arguments (package-arguments python-send2trash)
14604 ((#:phases phases)
14605 `(modify-phases ,phases
14606 (add-before 'check 'setenv
14607 (lambda _
14608 (setenv "PYTHONPATH"
14609 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
4782a06f 14610 #t))))))))
44d10b1f
RW
14611
14612(define-public python-yapf
14613 (package
14614 (name "python-yapf")
19ba75dc 14615 (version "0.29.0")
44d10b1f
RW
14616 (source
14617 (origin
14618 (method url-fetch)
14619 (uri (pypi-uri "yapf" version))
14620 (sha256
14621 (base32
19ba75dc 14622 "1pj3xzblmbssshi889b6n9hwqbjpabw6j0fimlng2sshd3226bki"))))
44d10b1f
RW
14623 (build-system python-build-system)
14624 (home-page "https://github.com/google/yapf")
14625 (synopsis "Formatter for Python code")
14626 (description "YAPF is a formatter for Python code. It's based off of
14627@dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
14628takes the code and reformats it to the best formatting that conforms to the
14629style guide, even if the original code didn't violate the style guide.")
14630 (license license:asl2.0)))
14631
14632(define-public python2-yapf
14633 (package-with-python2 python-yapf))
14634
14635(define-public python-gyp
14636 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
14637 (revision "0"))
14638 (package
14639 (name "python-gyp")
14640 ;; Google does not release versions,
14641 ;; based on second most recent commit date.
14642 (version (git-version "0.0.0" revision commit))
14643 (source
14644 (origin
14645 ;; Google does not release tarballs,
14646 ;; git checkout is needed.
14647 (method git-fetch)
14648 (uri (git-reference
14649 (url "https://chromium.googlesource.com/external/gyp")
14650 (commit commit)))
14651 (file-name (git-file-name name version))
14652 (sha256
14653 (base32
14654 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
14655 (build-system python-build-system)
14656 (home-page "https://gyp.gsrc.io/")
14657 (synopsis "GYP is a Meta-Build system")
14658 (description
14659 "GYP builds build systems for large, cross platform applications.
14660It can be used to generate XCode projects, Visual Studio projects, Ninja build
14661files, and Makefiles.")
14662 (license license:bsd-3))))
14663
14664(define-public python2-gyp
14665 (package-with-python2 python-gyp))
14666
14667(define-public python-whatever
14668 (package
14669 (name "python-whatever")
97610a66 14670 (version "0.6")
44d10b1f
RW
14671 (source
14672 (origin
ac0ea38c
EF
14673 (method git-fetch)
14674 (uri (git-reference
14675 (url "https://github.com/Suor/whatever")
14676 (commit version)))
14677 (file-name (git-file-name name version))
44d10b1f 14678 (sha256
ac0ea38c 14679 (base32 "1q7ajgqjfivxqsqgnhp4lc4p6jxyh4zprcsdbpd6dw54inaf0av5"))))
44d10b1f
RW
14680 (build-system python-build-system)
14681 (arguments
14682 `(#:phases
14683 (modify-phases %standard-phases
14684 (replace 'check
14685 (lambda _
14686 (invoke "py.test"))))))
14687 (native-inputs
14688 `(("python-pytest" ,python-pytest)))
14689 (home-page "http://github.com/Suor/whatever")
14690 (synopsis "Make anonymous functions by partial application of operators")
14691 (description "@code{whatever} provides an easy way to make anonymous
14692functions by partial application of operators.")
14693 (license license:bsd-3)))
14694
14695(define-public python2-whatever
14696 (package-with-python2 python-whatever))
14697
14698(define-public python-funcy
14699 (package
14700 (name "python-funcy")
9e396ab8 14701 (version "1.11")
44d10b1f
RW
14702 (source
14703 (origin
a85c6027
TGR
14704 (method git-fetch)
14705 (uri (git-reference
14706 (url "https://github.com/Suor/funcy.git")
14707 (commit version)))
44d10b1f 14708 (sha256
a85c6027
TGR
14709 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
14710 (file-name (git-file-name name version))))
44d10b1f
RW
14711 (build-system python-build-system)
14712 (arguments
14713 `(#:phases
14714 (modify-phases %standard-phases
14715 (replace 'check
14716 (lambda _
14717 (invoke "py.test"))))))
14718 (native-inputs
14719 `(("python-pytest" ,python-pytest)
14720 ("python-whatever" ,python-whatever)))
14721 (home-page "http://github.com/Suor/funcy")
14722 (synopsis "Functional tools")
14723 (description "@code{funcy} is a library that provides functional tools.
14724Examples are:
14725@enumerate
14726@item merge - Merges collections of the same type
14727@item walk - Type-preserving map
14728@item select - Selects a part of a collection
14729@item take - Takes the first n items of a collection
14730@item first - Takes the first item of a collection
14731@item remove - Predicated-removes items of a collection
14732@item concat - Concatenates two collections
14733@item flatten - Flattens a collection with subcollections
14734@item distinct - Returns only distinct items
14735@item split - Predicated-splits a collection
14736@item split_at - Splits a collection at a given item
14737@item group_by - Groups items by group
14738@item pairwise - Pairs off adjacent items
14739@item partial - Partially-applies a function
14740@item curry - Curries a function
14741@item compose - Composes functions
14742@item complement - Complements a predicate
14743@item all_fn - \"all\" with predicate
14744@end enumerate")
14745 (license license:bsd-3)))
14746
14747(define-public python2-funcy
14748 (package-with-python2 python-funcy))
14749
14750(define-public python-isoweek
14751 (package
14752 (name "python-isoweek")
14753 (version "1.3.3")
14754 (source
14755 (origin
14756 (method url-fetch)
14757 (uri (pypi-uri "isoweek" version))
14758 (sha256
14759 (base32
14760 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
14761 (build-system python-build-system)
14762 (home-page "https://github.com/gisle/isoweek")
14763 (synopsis "Objects representing a week")
14764 (description "The @code{isoweek} module provide the class Week that
14765implements the week definition of ISO 8601. This standard also defines
14766a notation for identifying weeks; yyyyWww (where the W is a literal).
14767Week instances stringify to this form.")
14768 (license license:bsd-3)))
14769
14770(define-public python2-isoweek
14771 (package-with-python2 python-isoweek))
14772
14773(define-public python-tokenize-rt
14774 (package
14775 (name "python-tokenize-rt")
14776 (version "2.0.1")
14777 (source
14778 (origin
14779 (method url-fetch)
14780 (uri (pypi-uri "tokenize-rt" version))
14781 (sha256
14782 (base32
14783 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
14784 (build-system python-build-system)
14785 (home-page "https://github.com/asottile/tokenize-rt")
14786 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
14787 (description
14788 "This Python library is a wrapper around @code{tokenize} from the Python
14789standard library. It provides two additional tokens @code{ESCAPED_NL} and
14790@code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
14791and @code{tokens_to_src} to roundtrip.")
14792 (license license:expat)))
14793
14794(define-public python-future-fstrings
14795 (package
14796 (name "python-future-fstrings")
14797 (version "0.4.1")
14798 (source
14799 (origin
14800 (method url-fetch)
14801 (uri (pypi-uri "future_fstrings" version))
14802 (sha256
14803 (base32
14804 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
14805 (build-system python-build-system)
14806 (propagated-inputs
14807 `(("python-tokenize-rt" ,python-tokenize-rt)))
14808 (home-page "https://github.com/asottile/future-fstrings")
14809 (synopsis "Backport of fstrings to Python < 3.6")
14810 (description
14811 "This package provides a UTF-8 compatible encoding
14812@code{future_fstrings}, which performs source manipulation. It decodes the
14813source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
14814@code{f} strings.")
14815 (license license:expat)))
14816
dae2eb1c
MC
14817(define-public python-typed-ast
14818 (package
14819 (name "python-typed-ast")
bae89583 14820 (version "1.4.0")
dae2eb1c
MC
14821 (source
14822 (origin
bae89583
MO
14823 (method git-fetch)
14824 (uri (git-reference
14825 (url "https://github.com/python/typed_ast.git")
14826 (commit version)))
dae2eb1c 14827 (sha256
bae89583
MO
14828 (base32 "0l0hz809f7i356kmqkvfsaswiidb98j9hs9rrjnfawzqcbffzgyb"))
14829 (file-name (git-file-name name version))))
dae2eb1c
MC
14830 (build-system python-build-system)
14831 (arguments
14832 `(#:modules ((guix build utils)
14833 (guix build python-build-system)
14834 (ice-9 ftw)
14835 (srfi srfi-1)
14836 (srfi srfi-26))
14837 #:phases
14838 (modify-phases %standard-phases
14839 (replace 'check
14840 (lambda _
14841 (let ((cwd (getcwd)))
14842 (setenv "PYTHONPATH"
14843 (string-append cwd "/build/"
14844 (find (cut string-prefix? "lib" <>)
14845 (scandir (string-append cwd "/build")))
14846 ":"
14847 (getenv "PYTHONPATH"))))
14848 (invoke "pytest")
14849 #t)))))
14850 (native-inputs `(("python-pytest" ,python-pytest)))
14851 (home-page "https://github.com/python/typed_ast")
14852 (synopsis "Fork of Python @code{ast} modules with type comment support")
14853 (description "This package provides a parser similar to the standard
14854@code{ast} library. Unlike @code{ast}, the parsers in @code{typed_ast}
14855include PEP 484 type comments and are independent of the version of Python
14856under which they are run. The @code{typed_ast} parsers produce the standard
14857Python AST (plus type comments), and are both fast and correct, as they are
14858based on the CPython 2.7 and 3.7 parsers.")
14859 ;; See the file "LICENSE" for the details.
14860 (license (list license:psfl
14861 license:asl2.0
14862 license:expat)))) ;ast27/Parser/spark.py
14863
44d10b1f
RW
14864(define-public python-typing
14865 (package
14866 (name "python-typing")
14867 (version "3.6.6")
14868 (source
14869 (origin
14870 (method url-fetch)
14871 (uri (pypi-uri "typing" version))
14872 (sha256
14873 (base32
14874 "0ba9acs4awx15bf9v3nrs781msbd2nx826906nj6fqks2bvca9s0"))))
14875 (build-system python-build-system)
14876 (home-page "https://docs.python.org/3/library/typing.html")
14877 (synopsis "Type hints for Python")
14878 (description "This is a backport of the standard library @code{typing}
14879module to Python versions older than 3.5. Typing defines a standard notation
14880for Python function and variable type annotations. The notation can be used
14881for documenting code in a concise, standard format, and it has been designed
14882to also be used by static and runtime type checkers, static analyzers, IDEs
14883and other tools.")
14884 (license license:psfl)))
14885
14886(define-public python2-typing
14887 (package-with-python2 python-typing))
14888
f89d443b
VC
14889(define-public python-typing-extensions
14890 (package
14891 (name "python-typing-extensions")
14892 (version "3.7.2")
14893 (source
14894 (origin
14895 (method url-fetch)
14896 (uri (pypi-uri "typing_extensions" version))
14897 (sha256
14898 (base32
14899 "0wfsv71pvkyf2na938l579jh0v3kzl6g744ijgnahcwd4d9x0b7v"))))
14900 (build-system python-build-system)
14901 (home-page
14902 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
14903 (synopsis "Experimental type hints for Python")
14904 (description
14905 "The typing_extensions module contains additional @code{typing} hints not
14906yet present in the of the @code{typing} standard library.
14907Included are implementations of:
14908@enumerate
14909@item ClassVar
14910@item ContextManager
14911@item Counter
14912@item DefaultDict
14913@item Deque
14914@item NewType
14915@item NoReturn
14916@item overload
14917@item Protocol
14918@item runtime
14919@item Text
14920@item Type
14921@item TYPE_CHECKING
14922@item AsyncGenerator
14923@end enumerate\n")
14924 (license license:psfl)))
14925
44d10b1f
RW
14926(define-public bpython
14927 (package
14928 (name "bpython")
4de93b2f 14929 (version "0.18")
44d10b1f
RW
14930 (source
14931 (origin
14932 (method url-fetch)
14933 (uri (pypi-uri "bpython" version))
14934 (sha256
4de93b2f 14935 (base32 "1hl6frgvr2lqaxqczl8amg9xih32b3gzv429vs0qrjb8wpdj1k2n"))))
44d10b1f
RW
14936 (build-system python-build-system)
14937 (arguments
14938 `(#:phases
14939 (modify-phases %standard-phases
14940 (add-after 'unpack 'remove-failing-test
14941 (lambda _
14942 ;; Remove failing test. FIXME: make it pass
14943 (delete-file "bpython/test/test_args.py")
14944 #t))
14945 (add-after 'wrap 'add-aliases
14946 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
14947 (lambda* (#:key outputs #:allow-other-keys)
14948 (let ((out (assoc-ref outputs "out")))
14949 (for-each
14950 (lambda (old new)
14951 (symlink old (string-append out "/bin/" new)))
14952 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
14953 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
14954 #t)))))
14955 (propagated-inputs
14956 `(("python-pygments" ,python-pygments)
14957 ("python-requests" ,python-requests)
4de93b2f 14958 ("python-babel" ,python-babel) ; optional, for internationalization
44d10b1f
RW
14959 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
14960 ("python-greenlet" ,python-greenlet)
4de93b2f 14961 ("python-urwid" ,python-urwid) ; for bpython-urwid only
44d10b1f
RW
14962 ("python-six" ,python-six)))
14963 (native-inputs
14964 `(("python-sphinx" ,python-sphinx)
14965 ("python-mock" ,python-mock)))
14966 (home-page "https://bpython-interpreter.org/")
14967 (synopsis "Fancy interface to the Python interpreter")
14968 (description "Bpython is a fancy interface to the Python
14969interpreter. bpython's main features are
14970
14971@enumerate
14972@item in-line syntax highlighting,
14973@item readline-like autocomplete with suggestions displayed as you type,
14974@item expected parameter list for any Python function,
14975@item \"rewind\" function to pop the last line of code from memory and
14976 re-evaluate,
14977@item send the code you've entered off to a pastebin,
14978@item save the code you've entered to a file, and
14979@item auto-indentation.
14980@end enumerate")
14981 (license license:expat)))
14982
14983(define-public bpython2
14984 (let ((base (package-with-python2
14985 (strip-python2-variant bpython))))
14986 (package (inherit base)
14987 (name "bpython2")
14988 (arguments
14989 `(#:python ,python-2
14990 #:phases
14991 (modify-phases %standard-phases
14992 (add-after 'unpack 'remove-failing-test
14993 (lambda _
14994 ;; Remove failing test. FIXME: make it pass
14995 (delete-file "bpython/test/test_args.py")
14996 ;; Disable failing test-cases (renaming inhibits they are
14997 ;; discovered)
14998 (substitute* "bpython/test/test_curtsies_repl.py"
14999 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
15000 (string-append a "xxx_off_" b))
15001 (("^(\\s*def )(test_complex\\W)" _ a b)
15002 (string-append a "xxx_off_" b)))
15003 #t))
15004 (add-before 'build 'rename-scripts
15005 ;; rename the scripts to bypthon2, bpdb2, etc.
15006 (lambda _
15007 (substitute* "setup.py"
15008 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
15009 (string-append name "2" rest "\n"))
15010 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
15011 (string-append name "2" (or sub "") rest "\n")))
15012 #t))))))))
15013
15014(define-public python-pyinotify
15015 (package
15016 (name "python-pyinotify")
15017 (version "0.9.6")
15018 (source (origin
15019 (method url-fetch)
15020 (uri (pypi-uri "pyinotify" version))
15021 (sha256
15022 (base32
15023 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
15024 (build-system python-build-system)
15025 (arguments `(#:tests? #f)) ;no tests
15026 (home-page "https://github.com/seb-m/pyinotify")
15027 (synopsis "Python library for monitoring inotify events")
15028 (description
15029 "@code{pyinotify} provides a Python interface for monitoring
15030file system events on Linux.")
15031 (license license:expat)))
15032
15033(define-public python2-pyinotify
15034 (package-with-python2 python-pyinotify))
15035
15036;; Ada parser uses this version.
15037(define-public python2-quex-0.67.3
15038 (package
15039 (name "python2-quex")
15040 (version "0.67.3")
15041 (source
15042 (origin
15043 (method url-fetch)
15044 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
15045 (version-major+minor version)
15046 "/quex-" version ".zip"))
15047 (sha256
15048 (base32
15049 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
15050 (build-system python-build-system)
15051 (native-inputs
15052 `(("unzip" ,unzip)))
15053 (arguments
15054 `(#:python ,python-2
15055 #:tests? #f
15056 #:phases
15057 (modify-phases %standard-phases
15058 (delete 'configure)
15059 (delete 'build)
15060 (replace 'install
15061 (lambda* (#:key outputs #:allow-other-keys)
15062 (let* ((out (assoc-ref outputs "out"))
15063 (share/quex (string-append out "/share/quex"))
15064 (bin (string-append out "/bin")))
15065 (copy-recursively "." share/quex)
15066 (mkdir-p bin)
15067 (symlink (string-append share/quex "/quex-exe.py")
15068 (string-append bin "/quex"))
15069 #t))))))
15070 (native-search-paths
15071 (list (search-path-specification
15072 (variable "QUEX_PATH")
15073 (files '("share/quex")))))
15074 (home-page "http://quex.sourceforge.net/")
15075 (synopsis "Lexical analyzer generator in Python")
15076 (description "@code{quex} is a lexical analyzer generator in Python.")
15077 (license license:lgpl2.1+))) ; Non-military
15078
15079(define-public python2-quex
15080 (package (inherit python2-quex-0.67.3)
15081 (name "python2-quex")
15082 (version "0.68.1")
15083 (source
15084 (origin
15085 (method url-fetch)
15086 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
15087 (sha256
15088 (base32
15089 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
15090 (file-name (string-append name "-" version ".tar.gz"))))))
15091
15092(define-public python-more-itertools
15093 (package
15094 (name "python-more-itertools")
1b066827 15095 (version "7.1.0")
44d10b1f
RW
15096 (source
15097 (origin
15098 (method url-fetch)
15099 (uri (pypi-uri "more-itertools" version))
15100 (sha256
15101 (base32
1b066827 15102 "16phg2f2dvm6ci5wr49ncha5lmc0m2in3bsl33c61vzca4gkvd4b"))))
44d10b1f 15103 (build-system python-build-system)
44d10b1f
RW
15104 (home-page "https://github.com/erikrose/more-itertools")
15105 (synopsis "More routines for operating on iterables, beyond itertools")
15106 (description "Python's built-in @code{itertools} module implements a
15107number of iterator building blocks inspired by constructs from APL, Haskell,
15108and SML. @code{more-itertools} includes additional building blocks for
15109working with iterables.")
47f66348 15110 (properties `((python2-variant . ,(delay python2-more-itertools))))
44d10b1f
RW
15111 (license license:expat)))
15112
47f66348 15113;; The 5.x series are the last versions supporting Python 2.7.
44d10b1f 15114(define-public python2-more-itertools
47f66348
MB
15115 (package
15116 (inherit python-more-itertools)
15117 (name "python2-more-itertools")
15118 (version "5.0.0")
15119 (source (origin
15120 (method url-fetch)
15121 (uri (pypi-uri "more-itertools" version))
15122 (sha256
15123 (base32
15124 "1r12cm6mcdwdzz7d47a6g4l437xsvapdlgyhqay3i2nrlv03da9q"))))
15125 (arguments
15126 `(#:python ,python2-minimal))
15127 (propagated-inputs
15128 `(("python2-six" ,python2-six-bootstrap)))))
44d10b1f
RW
15129
15130(define-public python-latexcodec
15131 (package
15132 (name "python-latexcodec")
f3415ba5 15133 (version "1.0.7")
44d10b1f
RW
15134 (source
15135 (origin
15136 (method url-fetch)
15137 (uri (pypi-uri "latexcodec" version))
15138 (sha256
f3415ba5 15139 (base32 "0wnp3yqcgx0rpy8dz51vh75lbp2qif67da19zi7m3ca98n887hgb"))))
44d10b1f
RW
15140 (build-system python-build-system)
15141 (inputs
15142 `(("python-six" ,python-six)))
15143 (home-page "https://readthedocs.org/projects/latexcodec/")
15144 (synopsis "Work with LaTeX code in Python")
15145 (description "Lexer and codec to work with LaTeX code in Python.")
15146 (license license:expat)))
15147
15148(define-public python-pybtex
15149 (package
15150 (name "python-pybtex")
9441a9c1 15151 (version "0.22.2")
44d10b1f
RW
15152 (source
15153 (origin
15154 (method url-fetch)
15155 (uri (pypi-uri "pybtex" version))
15156 (sha256
9441a9c1 15157 (base32 "070wfcmxrd7xg1si421mi9150gmx2qwx431nwf69sq3hhmgnx080"))))
44d10b1f
RW
15158 (build-system python-build-system)
15159 (native-inputs
15160 `(("python-nose" ,python-nose)))
15161 (inputs
15162 `(("python-latexcodec" ,python-latexcodec)
15163 ("python-pyyaml" ,python-pyyaml)
15164 ("python-six" ,python-six)))
15165 (arguments
15166 `(#:test-target "nosetests"))
15167 (home-page "https://pybtex.org/")
15168 (synopsis "BibTeX-compatible bibliography processor")
15169 (description "Pybtex is a BibTeX-compatible bibliography processor written
15170in Python. You can simply type pybtex instead of bibtex.")
15171 (license license:expat)))
15172
15173(define-public python-onetimepass
15174 (package
15175 (name "python-onetimepass")
15176 (version "1.0.1")
15177 (source
15178 (origin
15179 (method url-fetch)
15180 (uri (pypi-uri "onetimepass" version))
15181 (sha256
15182 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
15183 (build-system python-build-system)
15184 (propagated-inputs `(("python-six" ,python-six)))
15185 (home-page "https://github.com/tadeck/onetimepass/")
15186 (synopsis "One-time password library")
15187 (description "Python one-time password library for HMAC-based (HOTP) and
15188time-based (TOTP) passwords.")
15189 (license license:expat)))
15190
15191(define-public python-parso
15192 (package
15193 (name "python-parso")
170d5844 15194 (version "0.5.2")
44d10b1f
RW
15195 (source
15196 (origin
15197 (method url-fetch)
15198 (uri (pypi-uri "parso" version))
15199 (sha256
15200 (base32
170d5844 15201 "1qgvrkpma7vylrk047mxxvqd66nwqk978n3ig2w8iz9m3bgjbksm"))))
44d10b1f
RW
15202 (native-inputs
15203 `(("python-pytest" ,python-pytest)))
15204 (build-system python-build-system)
4eb97c25
MC
15205 (arguments
15206 `(#:phases (modify-phases %standard-phases
15207 (replace 'check
15208 (lambda _ (invoke "pytest" "-vv"))))))
44d10b1f
RW
15209 (home-page "https://github.com/davidhalter/parso")
15210 (synopsis "Python Parser")
15211 (description "Parso is a Python parser that supports error recovery and
15212round-trip parsing for different Python versions (in multiple Python versions).
15213Parso is also able to list multiple syntax errors in your Python file.")
15214 (license license:expat)))
15215
15216(define-public python2-parso
15217 (package-with-python2 python-parso))
15218
15219(define-public python-async-generator
15220 (package
15221 (name "python-async-generator")
94fcbf8d 15222 (version "1.10")
44d10b1f
RW
15223 (source
15224 (origin
15225 (method url-fetch)
15226 (uri (pypi-uri "async_generator" version))
15227 (sha256
15228 (base32
94fcbf8d 15229 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
44d10b1f
RW
15230 (build-system python-build-system)
15231 (native-inputs
15232 `(("python-pytest" ,python-pytest)))
15233 (home-page "https://github.com/python-trio/async_generator")
15234 (synopsis "Async generators and context managers for Python 3.5+")
15235 (description "@code{async_generator} back-ports Python 3.6's native async
15236generators and Python 3.7's context managers into Python 3.5.")
15237 ;; Dual licensed.
15238 (license (list license:expat license:asl2.0))))
15239
15240(define-public python-async-timeout
15241 (package
15242 (name "python-async-timeout")
15243 (version "3.0.1")
15244 (source
15245 (origin
15246 (method url-fetch)
15247 (uri (pypi-uri "async-timeout" version))
15248 (sha256
15249 (base32
15250 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
15251 (build-system python-build-system)
15252 (home-page "https://github.com/aio-libs/async_timeout/")
15253 (synopsis "Timeout context manager for asyncio programs")
15254 (description "@code{async-timeout} provides a timeout timeout context
15255manager compatible with @code{asyncio}.")
15256 (license license:asl2.0)))
15257
15258(define-public python-glob2
15259 (package
15260 (name "python-glob2")
4df49d19 15261 (version "0.7")
8fa2bcc7
TGR
15262 (source
15263 (origin
15264 (method git-fetch)
15265 (uri (git-reference
15266 (url "https://github.com/miracle2k/python-glob2.git")
4df49d19 15267 (commit (string-append "v" version))))
8fa2bcc7
TGR
15268 (file-name (git-file-name name version))
15269 (sha256
4df49d19 15270 (base32 "160nh2ay9lw2hi0rixpzb2k87r6ql56k0j2cm87lqz8xc8zbw919"))))
44d10b1f
RW
15271 (build-system python-build-system)
15272 (home-page "https://github.com/miracle2k/python-glob2/")
15273 (synopsis "Extended Version of the python buildin glob module")
15274 (description "This is an extended version of the Python
15275@url{http://docs.python.org/library/glob.html, built-in glob module} which
15276adds:
15277
15278@itemize
15279@item The ability to capture the text matched by glob patterns, and return
15280those matches alongside the file names.
15281@item A recursive @code{**} globbing syntax, akin for example to the
15282@code{globstar} option of Bash.
15283@item The ability to replace the file system functions used, in order to glob
15284on virtual file systems.
15285@item Compatible with Python 2 and Python 3 (tested with 3.3).
15286@end itemize
15287
15288Glob2 currently based on the glob code from Python 3.3.1.")
15289 (license license:bsd-2)))
15290
15291(define-public python2-glob2
15292 (package-with-python2 python-glob2))
15293
15294(define-public python-gipc
15295 (package
15296 (name "python-gipc")
15297 (version "0.6.0")
15298 (source
15299 (origin
15300 (method url-fetch)
15301 (uri (pypi-uri "gipc" version ".zip"))
15302 (sha256
15303 (base32
15304 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
15305 (build-system python-build-system)
15306 (native-inputs
15307 `(("unzip" ,unzip)))
15308 (propagated-inputs
15309 `(("python-gevent" ,python-gevent)))
15310 (home-page "http://gehrcke.de/gipc")
15311 (synopsis "Child process management in the context of gevent")
15312 (description "Usage of Python's multiprocessing package in a
15313gevent-powered application may raise problems. With @code{gipc},
15314process-based child processes can safely be created anywhere within a
15315gevent-powered application.")
15316 (license license:expat)))
15317
15318(define-public python2-gipc
15319 (package-with-python2 python-gipc))
15320
15321(define-public python-fusepy
15322 (package
15323 (name "python-fusepy")
15324 (version "2.0.4")
15325 (source
15326 (origin
15327 (method url-fetch)
15328 (uri (pypi-uri "fusepy" version))
15329 (sha256
15330 (base32
15331 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
15332 (build-system python-build-system)
15333 (arguments
15334 `(#:phases
15335 (modify-phases %standard-phases
15336 (add-before 'build 'set-library-file-name
15337 (lambda* (#:key inputs #:allow-other-keys)
15338 (let ((fuse (assoc-ref inputs "fuse")))
15339 (substitute* "fuse.py"
15340 (("find_library\\('fuse'\\)")
15341 (string-append "'" fuse "/lib/libfuse.so'")))
15342 #t))))))
15343 (propagated-inputs
15344 `(("fuse" ,fuse)))
15345 (home-page "https://github.com/fusepy/fusepy")
15346 (synopsis "Simple ctypes bindings for FUSE")
15347 (description "Python module that provides a simple interface to FUSE and
15348MacFUSE. The binding is created using the standard @code{ctypes} library.")
15349 (license license:isc)))
15350
15351(define-public python2-fusepy
15352 (package-with-python2 python-fusepy))
15353
15354(define-public python2-gdrivefs
15355 (package
15356 (name "python2-gdrivefs")
15357 (version "0.14.9")
15358 (source
15359 (origin
15360 (method url-fetch)
15361 (uri (pypi-uri "gdrivefs" version))
15362 (sha256
15363 (base32
15364 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
15365 (build-system python-build-system)
15366 (arguments
15367 `(#:python ,python-2
15368 #:phases
15369 (modify-phases %standard-phases
15370 (add-before 'build 'patch-setup-py
15371 (lambda _
15372 ;; Update requirements from dependency==version
15373 ;; to dependency>=version
15374 (substitute* "gdrivefs/resources/requirements.txt"
15375 (("==") ">="))
15376 #t)))))
15377 (native-inputs
15378 `(("python2-gipc" ,python2-gipc)
15379 ("python2-gevent" ,python2-gevent)
15380 ("python2-greenlet" ,python2-greenlet)
15381 ("python2-httplib2" ,python2-httplib2)
15382 ("python2-uritemplate" ,python2-uritemplate)
15383 ("python2-oauth2client" ,python2-oauth2client)
15384 ("python2-six" ,python2-six)))
15385 (propagated-inputs
15386 `(("python2-dateutil" ,python2-dateutil)
15387 ("python2-fusepy" ,python2-fusepy)
15388 ("python2-google-api-client" ,python2-google-api-client)))
15389 (home-page "https://github.com/dsoprea/GDriveFS")
15390 (synopsis "Mount Google Drive as a local file system")
15391 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
15392under Python 2.7.")
15393 (license license:gpl2)))
15394
15395(define-public pybind11
15396 (package
15397 (name "pybind11")
0690f324 15398 (version "2.4.3")
44d10b1f
RW
15399 (source (origin
15400 (method git-fetch)
15401 (uri (git-reference
15402 (url "https://github.com/pybind/pybind11.git")
15403 (commit (string-append "v" version))))
15404 (sha256
15405 (base32
0690f324 15406 "0k89w4bsfbpzw963ykg1cyszi3h3nk393qd31m6y46pcfxkqh4rd"))
44d10b1f
RW
15407 (file-name (git-file-name name version))))
15408 (build-system cmake-build-system)
15409 (native-inputs
3cf579e9 15410 `(("python" ,python-wrapper)
ae8db9ce
LC
15411
15412 ;; The following dependencies are used for tests.
15413 ("python-pytest" ,python-pytest)
15414 ("catch" ,catch-framework2-1)
15415 ("eigen" ,eigen)))
44d10b1f 15416 (arguments
ae8db9ce
LC
15417 `(#:configure-flags
15418 (list (string-append "-DCATCH_INCLUDE_DIR="
15419 (assoc-ref %build-inputs "catch")
15420 "/include/catch"))
15421
3cf579e9
LC
15422 #:phases (modify-phases %standard-phases
15423 (add-after 'install 'install-python
15424 (lambda* (#:key outputs #:allow-other-keys)
15425 (let ((out (assoc-ref outputs "out")))
15426 (with-directory-excursion "../source"
15427 (setenv "PYBIND11_USE_CMAKE" "yes")
15428 (invoke "python" "setup.py" "install"
15429 "--single-version-externally-managed"
15430 "--root=/"
15431 (string-append "--prefix=" out)))))))
15432
ae8db9ce 15433 #:test-target "check"))
44d10b1f
RW
15434 (home-page "https://github.com/pybind/pybind11/")
15435 (synopsis "Seamless operability between C++11 and Python")
ab17297a
LC
15436 (description
15437 "@code{pybind11} is a lightweight header-only library that exposes C++
15438types in Python and vice versa, mainly to create Python bindings of existing
15439C++ code. Its goals and syntax are similar to the @code{Boost.Python}
15440library: to minimize boilerplate code in traditional extension modules by
15441inferring type information using compile-time introspection.")
65eada58 15442 (license license:bsd-3)))
44d10b1f
RW
15443
15444(define-public python-fasteners
15445 (package
15446 (name "python-fasteners")
15447 (version "0.14.1")
15448 (source
15449 (origin
15450 (method url-fetch)
15451 (uri (pypi-uri "fasteners" version))
15452 (sha256
15453 (base32
15454 "063y20kx01ihbz2mziapmjxi2cd0dq48jzg587xdsdp07xvpcz22"))))
15455 (build-system python-build-system)
15456 (propagated-inputs
15457 `(("python-monotonic" ,python-monotonic)
15458 ("python-six" ,python-six)
15459 ("python-testtools" ,python-testtools)))
15460 (home-page "https://github.com/harlowja/fasteners")
15461 (synopsis "Python package that provides useful locks")
15462 (description
15463 "This package provides a Python program that provides following locks:
15464
15465@itemize
15466@item Locking decorator
15467@item Reader-writer locks
15468@item Inter-process locks
15469@item Generic helpers
15470@end itemize\n")
15471 (properties `((python2-variant . ,(delay python2-fasteners))))
15472 (license license:asl2.0)))
15473
15474(define-public python2-fasteners
15475 (let ((base (package-with-python2 (strip-python2-variant python-fasteners))))
15476 (package
15477 (inherit base)
15478 (propagated-inputs
15479 `(("python2-futures" ,python2-futures)
15480 ,@(package-propagated-inputs base))))))
15481
15482(define-public python-requests-file
15483 (package
15484 (name "python-requests-file")
15485 (version "1.4.3")
15486 (source
15487 (origin
15488 (method url-fetch)
15489 (uri (pypi-uri "requests-file" version))
15490 (sha256
15491 (base32
15492 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
15493 (build-system python-build-system)
15494 (propagated-inputs
15495 `(("python-requests" ,python-requests)
15496 ("python-six" ,python-six)))
15497 (home-page
15498 "https://github.com/dashea/requests-file")
15499 (synopsis "File transport adapter for Requests")
15500 (description
15501 "Requests-File is a transport adapter for use with the Requests Python
52beae7b 15502library to allow local file system access via @code{file://} URLs.")
44d10b1f
RW
15503 (license license:asl2.0)))
15504
15505(define-public python2-requests-file
15506 (package-with-python2 python-requests-file))
15507
15508(define-public python-tldextract
15509 (package
15510 (name "python-tldextract")
15511 (version "2.2.0")
15512 (source
15513 (origin
15514 (method url-fetch)
15515 (uri (pypi-uri "tldextract" version))
15516 (sha256
15517 (base32
15518 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
15519 (build-system python-build-system)
15520 (native-inputs
15521 `(("python-pytest" ,python-pytest)
15522 ("python-responses" ,python-responses)))
15523 (propagated-inputs
15524 `(("python-idna" ,python-idna)
15525 ("python-requests" ,python-requests)
15526 ("python-requests-file" ,python-requests-file)))
15527 (home-page
15528 "https://github.com/john-kurkowski/tldextract")
15529 (synopsis
15530 "Separate the TLD from the registered domain and subdomains of a URL")
15531 (description
15532 "TLDExtract accurately separates the TLD from the registered domain and
15533subdomains of a URL, using the Public Suffix List. By default, this includes
15534the public ICANN TLDs and their exceptions. It can optionally support the
15535Public Suffix List's private domains as well.")
15536 (license license:bsd-3)))
15537
15538(define-public python2-tldextract
15539 (package-with-python2 python-tldextract))
15540
15541(define-public python-pynamecheap
15542 (package
15543 (name "python-pynamecheap")
15544 (version "0.0.3")
15545 (source
15546 (origin
15547 (method url-fetch)
15548 (uri (pypi-uri "PyNamecheap" version))
15549 (sha256
15550 (base32
15551 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
15552 (build-system python-build-system)
15553 (propagated-inputs
15554 `(("python-requests" ,python-requests)))
15555 (home-page
15556 "https://github.com/Bemmu/PyNamecheap")
15557 (synopsis
15558 "Namecheap API client in Python")
15559 (description
15560 "PyNamecheap is a Namecheap API client in Python.")
15561 (license license:expat)))
15562
15563(define-public python2-pynamecheap
15564 (package-with-python2 python-pynamecheap))
15565
15566(define-public python-dns-lexicon
15567 (package
15568 (name "python-dns-lexicon")
15569 (version "2.4.0")
15570 (source
15571 (origin
15572 (method url-fetch)
15573 (uri (pypi-uri "dns-lexicon" version))
15574 (sha256
15575 (base32
15576 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
15577 (build-system python-build-system)
15578 (arguments
15579 `(#:tests? #f)) ;requires internet access
15580 (propagated-inputs
15581 `(("python-future" ,python-future)
15582 ("python-pynamecheap" ,python-pynamecheap)
15583 ("python-requests" ,python-requests)
15584 ("python-tldextract" ,python-tldextract)
15585 ("python-urllib3" ,python-urllib3)))
15586 (home-page "https://github.com/AnalogJ/lexicon")
15587 (synopsis
15588 "Manipulate DNS records on various DNS providers")
15589 (description
15590 "Lexicon provides a way to manipulate DNS records on multiple DNS
15591providers in a standardized way. It has a CLI but it can also be used as a
15592Python library. It was designed to be used in automation, specifically with
15593Let's Encrypt.")
15594 (license license:expat)))
15595
15596(define-public python2-dns-lexicon
15597 (package-with-python2 python-dns-lexicon))
15598
15599(define-public python-commandlines
15600 (package
15601 (name "python-commandlines")
15602 (version "0.4.1")
15603 (source
15604 (origin
15605 (method url-fetch)
15606 (uri (pypi-uri "commandlines" version))
15607 (sha256
15608 (base32
15609 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
15610 (build-system python-build-system)
15611 (home-page "https://github.com/chrissimpkins/commandlines")
15612 (synopsis "Command line argument to object parsing library")
15613 (description
15614 "@code{Commandlines} is a Python library for command line application
15615development that supports command line argument parsing, command string
15616validation testing and application logic.")
15617 (license license:expat)))
15618
15619;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
15620;; python-numba. They have a very unflexible relationship.
15621(define-public python-numba
15622 (package
15623 (name "python-numba")
65f84096 15624 (version "0.46.0")
44d10b1f
RW
15625 (source
15626 (origin
15627 (method url-fetch)
15628 (uri (pypi-uri "numba" version))
15629 (sha256
15630 (base32
65f84096 15631 "1vnfzcq6fcnkmdms6114d49awvvj5181fl7z1wlha27qc2paxjy2"))))
44d10b1f
RW
15632 (build-system python-build-system)
15633 (arguments
15634 `(#:modules ((guix build utils)
15635 (guix build python-build-system)
15636 (ice-9 ftw)
15637 (srfi srfi-1)
15638 (srfi srfi-26))
15639 #:phases
15640 (modify-phases %standard-phases
15641 (add-after 'unpack 'disable-proprietary-features
15642 (lambda _
15643 (setenv "NUMBA_DISABLE_HSA" "1")
15644 (setenv "NUMBA_DISABLE_CUDA" "1")
15645 #t))
15646 (add-after 'unpack 'remove-failing-tests
15647 (lambda _
65f84096 15648 ;; FIXME: These tests fail for unknown reasons:
44d10b1f
RW
15649 ;; test_non_writable_pycache, test_non_creatable_pycache, and
15650 ;; test_frozen (all in numba.tests.test_dispatcher.TestCache).
15651 (substitute* "numba/tests/test_dispatcher.py"
15652 (("def test(_non_writable_pycache)" _ m)
15653 (string-append "def guix_skip" m))
15654 (("def test(_non_creatable_pycache)" _ m)
15655 (string-append "def guix_skip" m))
15656 (("def test(_frozen)" _ m)
15657 (string-append "def guix_skip" m)))
15658
15659 ;; These tests fail because we don't run the tests from the build
15660 ;; directory: test_setup_py_distutils, test_setup_py_setuptools
65f84096 15661 ;; They are in numba.tests.test_pycc.TestDistutilsSupport.
44d10b1f
RW
15662 (substitute* "numba/tests/test_pycc.py"
15663 (("def test(_setup_py_distutils|_setup_py_setuptools)" _ m)
15664 (string-append "def guix_skip" m)))
65f84096
BG
15665
15666 ;; These tests fail because our version of Python does not have
15667 ;; a recognizable front-end for the Numba distribution to use
15668 ;; to check against.
15669 (substitute* "numba/tests/test_entrypoints.py"
15670 (("def test(_init_entrypoint)" _ m)
15671 (string-append "def guix_skip" m)))
15672 (substitute* "numba/tests/test_jitclasses.py"
15673 (("def test(_jitclass_longlabel_not_truncated)" _ m)
15674 (string-append "def guix_skip" m)))
44d10b1f
RW
15675 #t))
15676 (replace 'check
15677 (lambda _
15678 (let ((cwd (getcwd)))
15679 (setenv "PYTHONPATH"
15680 (string-append cwd "/build/"
15681 (find (cut string-prefix? "lib" <>)
15682 (scandir (string-append cwd "/build")))
15683 ":"
15684 (getenv "PYTHONPATH")))
15685 ;; Something is wrong with the PYTHONPATH when running the
15686 ;; tests from the build directory, as it complains about not being
15687 ;; able to import certain modules.
15688 (with-directory-excursion "/tmp"
15689 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))
15690 #t)))))
15691 (propagated-inputs
15692 `(("python-llvmlite" ,python-llvmlite)
15693 ("python-numpy" ,python-numpy)
15694 ("python-singledispatch" ,python-singledispatch)))
15695 ;; Needed for tests.
15696 (inputs
15697 `(("python-jinja2" ,python-jinja2)
15698 ("python-pygments" ,python-pygments)))
15699 (home-page "https://numba.pydata.org")
15700 (synopsis "Compile Python code using LLVM")
15701 (description "Numba gives you the power to speed up your applications with
15702high performance functions written directly in Python. With a few
15703annotations, array-oriented and math-heavy Python code can be just-in-time
15704compiled to native machine instructions, similar in performance to C, C++ and
15705Fortran, without having to switch languages or Python interpreters.
15706
15707Numba works by generating optimized machine code using the LLVM compiler
15708infrastructure at import time, runtime, or statically (using the included pycc
15709tool).")
15710 (license license:bsd-3)))
15711
15712(define-public python-anndata
15713 (package
15714 (name "python-anndata")
8c9372c1 15715 (version "0.6.18")
44d10b1f
RW
15716 (source
15717 (origin
15718 (method url-fetch)
15719 (uri (pypi-uri "anndata" version))
15720 (sha256
15721 (base32
8c9372c1 15722 "03x83yjaccbqszj7x4fwwmpil0ai59yx64d1zmf2691za3j03w73"))))
44d10b1f
RW
15723 (build-system python-build-system)
15724 (propagated-inputs
15725 `(("python-h5py" ,python-h5py)
15726 ("python-natsort" ,python-natsort)
15727 ("python-pandas" ,python-pandas)
15728 ("python-scipy" ,python-scipy)))
15729 (home-page "https://github.com/theislab/anndata")
15730 (synopsis "Annotated data for data analysis pipelines")
15731 (description "Anndata is a package for simple (functional) high-level APIs
15732for data analysis pipelines. In this context, it provides an efficient,
15733scalable way of keeping track of data together with learned annotations and
15734reduces the code overhead typically encountered when using a mostly
15735object-oriented library such as @code{scikit-learn}.")
15736 (license license:bsd-3)))
15737
15738(define-public python-dill
15739 (package
15740 (name "python-dill")
32be3577 15741 (version "0.3.1.1")
44d10b1f
RW
15742 (source
15743 (origin
15744 (method url-fetch)
15745 (uri (pypi-uri "dill" version))
15746 (sha256
32be3577 15747 (base32 "1704g8z70d210ksgbccs2v545v9w0wc6lx15m296alb7jf0yzn22"))))
44d10b1f 15748 (build-system python-build-system)
32be3577
MIP
15749 (arguments
15750 `(#:phases
15751 (modify-phases %standard-phases
15752 (replace 'check
15753 (lambda _
15754 (with-directory-excursion "/tmp"
15755 (invoke "nosetests" "-v"))
15756 #t)))))
15757 (native-inputs
15758 `(("python-nose" ,python-nose)))
15759 (home-page "https://pypi.org/project/dill/")
44d10b1f
RW
15760 (synopsis "Serialize all of Python")
15761 (description "Dill extends Python's @code{pickle} module for serializing
15762and de-serializing Python objects to the majority of the built-in Python
15763types. Dill provides the user the same interface as the @code{pickle} module,
15764and also includes some additional features. In addition to pickling Python
15765objects, @code{dill} provides the ability to save the state of an interpreter
61985d65 15766session in a single command. Hence, it would be feasible to save a
44d10b1f
RW
15767interpreter session, close the interpreter, ship the pickled file to another
15768computer, open a new interpreter, unpickle the session and thus continue from
15769the saved state of the original interpreter session.")
15770 (license license:bsd-3)))
15771
15772(define-public python-multiprocess
15773 (package
15774 (name "python-multiprocess")
fcc4e9e7 15775 (version "0.70.9")
44d10b1f
RW
15776 (source
15777 (origin
15778 (method url-fetch)
15779 (uri (pypi-uri "multiprocess" version))
15780 (sha256
15781 (base32
fcc4e9e7 15782 "1r882nvd44xqwbrclwqx5rhs80l6809rcvpc7pkpgnij06cvvmcz"))))
44d10b1f 15783 (build-system python-build-system)
fcc4e9e7
MIP
15784 (arguments
15785 `(#:phases
15786 (modify-phases %standard-phases
15787 (add-after 'unpack 'disable-broken-tests
15788 (lambda _
15789 ;; This test is broken as there is no keyboard interrupt.
15790 (substitute* "py3.7/multiprocess/tests/__init__.py"
15791 (("^(.*)def test_wait_result"
15792 line indent)
15793 (string-append indent
15794 "@unittest.skip(\"Disabled by Guix\")\n"
15795 line)))
15796 #t))
15797 ;; Tests must be run after installation.
15798 (delete 'check)
15799 (add-after 'install 'check
15800 (lambda* (#:key inputs outputs #:allow-other-keys)
15801 (add-installed-pythonpath inputs outputs)
15802 (invoke "python" "-m" "multiprocess.tests")
15803 #t)))))
44d10b1f
RW
15804 (propagated-inputs
15805 `(("python-dill" ,python-dill)))
fcc4e9e7 15806 (home-page "https://pypi.org/project/multiprocess/")
44d10b1f
RW
15807 (synopsis "Multiprocessing and multithreading in Python")
15808 (description
15809 "This package is a fork of the multiprocessing Python package, a package
15810which supports the spawning of processes using the API of the standard
15811library's @code{threading} module.")
15812 (license license:bsd-3)))
15813
15814(define-public python-toolz
15815 (package
15816 (name "python-toolz")
15817 (version "0.9.0")
15818 (source
15819 (origin
15820 (method url-fetch)
15821 (uri (pypi-uri "toolz" version))
15822 (sha256
15823 (base32
15824 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
15825 (build-system python-build-system)
15826 ;; FIXME: tests cannot be computed: "Can't perform this operation for
15827 ;; unregistered loader type"
15828 (arguments '(#:tests? #f))
15829 (home-page "https://github.com/pytoolz/toolz/")
15830 (synopsis "List processing tools and functional utilities")
15831 (description
15832 "This package provides a set of utility functions for iterators,
15833functions, and dictionaries.")
15834 (license license:bsd-3)))
15835
15836(define-public python2-toolz
15837 (package-with-python2 python-toolz))
15838
15839(define-public python-cytoolz
15840 (package
15841 (name "python-cytoolz")
15842 (version "0.9.0.1")
15843 (source
15844 (origin
15845 (method url-fetch)
15846 (uri (pypi-uri "cytoolz" version))
15847 (sha256
15848 (base32
15849 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
15850 (build-system python-build-system)
15851 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
15852 ;; 'exceptions'"
15853 (arguments '(#:tests? #f))
15854 (propagated-inputs
15855 `(("python-toolz" ,python-toolz)))
15856 (native-inputs
15857 `(("python-cython" ,python-cython)))
15858 (home-page "https://github.com/pytoolz/cytoolz")
15859 (synopsis "High performance functional utilities")
15860 (description
15861 "The cytoolz package implements the same API as provided by toolz. The
15862main differences are that @code{cytoolz} is faster and cytoolz offers a C API
15863that is accessible to other projects developed in Cython.")
15864 (license license:bsd-3)))
15865
15866(define-public python-sortedcontainers
15867 (package
15868 (name "python-sortedcontainers")
b244f166 15869 (version "2.1.0")
44d10b1f
RW
15870 (source
15871 (origin
15872 (method url-fetch)
15873 (uri (pypi-uri "sortedcontainers" version))
15874 (sha256
15875 (base32
b244f166 15876 "0fm0w5id2yhqld95hg2m636vjgkz377rvgdfqaxc25vbylr9lklp"))))
44d10b1f
RW
15877 (build-system python-build-system)
15878 (native-inputs
15879 `(("python-tox" ,python-tox)))
15880 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
15881 (synopsis "Sorted List, Sorted Dict, Sorted Set")
15882 (description
15883 "This package provides a sorted collections library, written in
15884pure-Python.")
15885 (license license:asl2.0)))
15886
15887(define-public python-cloudpickle
15888 (package
15889 (name "python-cloudpickle")
15890 (version "0.6.1")
15891 (source
15892 (origin
15893 (method url-fetch)
15894 (uri (pypi-uri "cloudpickle" version))
15895 (sha256
15896 (base32
15897 "1wdw89mlm7fqa3fm3ymskx05jrys66n8m1z1a8s0mss0799ahsgi"))))
15898 (build-system python-build-system)
15899 ;; FIXME: there are 5 errors in 122 tests:
15900 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.CloudPickleTest)
15901 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.CloudPickleTest)
15902 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.Protocol2CloudPickleTest)
15903 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.Protocol2CloudPickleTest)
15904 ;; ERROR: test_temp_file (tests.cloudpickle_file_test.CloudPickleFileTests)
15905 ;; TypeError: cannot serialize '_io.BufferedRandom' object
15906 (arguments '(#:tests? #f))
15907 (native-inputs
15908 `(("python-pytest" ,python-pytest)
15909 ("python-mock" ,python-mock)
15910 ("python-tornado" ,python-tornado)))
15911 (home-page "https://github.com/cloudpipe/cloudpickle")
15912 (synopsis "Extended pickling support for Python objects")
15913 (description
15914 "Cloudpickle makes it possible to serialize Python constructs not
15915supported by the default pickle module from the Python standard library. It
15916is especially useful for cluster computing where Python expressions are
15917shipped over the network to execute on remote hosts, possibly close to the
15918data.")
15919 (license license:bsd-3)))
15920
15921(define-public python2-cloudpickle
15922 (package-with-python2 python-cloudpickle))
15923
15924(define-public python-locket
15925 (package
15926 (name "python-locket")
15927 (version "0.2.0")
15928 (source
15929 (origin
15930 (method url-fetch)
15931 (uri (pypi-uri "locket" version))
15932 (sha256
15933 (base32
15934 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
15935 (build-system python-build-system)
15936 (home-page "https://github.com/mwilliamson/locket.py")
15937 (synopsis "File-based locks for Python")
15938 (description
15939 "Locket implements a lock that can be used by multiple processes provided
15940they use the same path.")
15941 (license license:bsd-2)))
15942
15943(define-public python2-locket
15944 (package-with-python2 python-locket))
15945
15946(define-public python-blosc
15947 (package
15948 (name "python-blosc")
15949 (version "1.5.1")
15950 (source
15951 (origin
15952 (method url-fetch)
15953 (uri (pypi-uri "blosc" version))
15954 (sha256
15955 (base32
15956 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
15957 (build-system python-build-system)
15958 ;; FIXME: all tests pass, but then this error is printed:
15959 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
15960 (arguments '(#:tests? #f))
15961 (propagated-inputs
15962 `(("python-numpy" ,python-numpy)))
15963 (home-page "https://github.com/blosc/python-blosc")
15964 (synopsis "Python wrapper for the Blosc data compressor library")
15965 (description "Blosc is a high performance compressor optimized for binary
15966data. It has been designed to transmit data to the processor cache faster
15967than the traditional, non-compressed, direct memory fetch approach via a
15968@code{memcpy()} system call.
15969
15970Blosc works well for compressing numerical arrays that contains data with
15971relatively low entropy, like sparse data, time series, grids with
15972regular-spaced values, etc.
15973
15974This Python package wraps the Blosc library.")
15975 (license license:bsd-3)))
15976
15977(define-public python2-blosc
15978 (package-with-python2 python-blosc))
15979
15980(define-public python-partd
15981 (package
15982 (name "python-partd")
15983 (version "0.3.9")
15984 (source
15985 (origin
15986 (method url-fetch)
15987 (uri (pypi-uri "partd" version))
15988 (sha256
15989 (base32
15990 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
15991 (build-system python-build-system)
15992 (propagated-inputs
15993 `(("python-blosc" ,python-blosc)
15994 ("python-locket" ,python-locket)
15995 ("python-numpy" ,python-numpy)
15996 ("python-pandas" ,python-pandas)
15997 ("python-pyzmq" ,python-pyzmq)
15998 ("python-toolz" ,python-toolz)))
15999 (home-page "https://github.com/dask/partd/")
16000 (synopsis "Appendable key-value storage")
16001 (description "Partd stores key-value pairs. Values are raw bytes. We
16002append on old values. Partd excels at shuffling operations.")
16003 (license license:bsd-3)))
16004
16005(define-public python2-partd
16006 (package-with-python2 python-partd))
16007
c70a0191
RW
16008(define-public python-fsspec
16009 (package
16010 (name "python-fsspec")
16011 (version "0.6.1")
16012 (source
16013 (origin
16014 (method url-fetch)
16015 (uri (pypi-uri "fsspec" version))
16016 (sha256
16017 (base32
16018 "1g9ba8v04s1nrh7pvzfm2md7ivl2mrz3hcq3y9d1a44gd62h17zj"))))
16019 (build-system python-build-system)
16020 (arguments '(#:tests? #f)) ; there are none
16021 (home-page "https://github.com/intake/filesystem_spec")
16022 (synopsis "File-system specification")
16023 (description "The purpose of this package is to produce a template or
16024specification for a file-system interface, that specific implementations
16025should follow, so that applications making use of them can rely on a common
16026behavior and not have to worry about the specific internal implementation
16027decisions with any given backend.")
16028 (license license:bsd-3)))
16029
44d10b1f
RW
16030(define-public python-dask
16031 (package
16032 (name "python-dask")
86c7ca07 16033 (version "2.9.0")
44d10b1f
RW
16034 (source
16035 (origin
16036 (method url-fetch)
16037 (uri (pypi-uri "dask" version))
16038 (sha256
86c7ca07 16039 (base32 "1w1hqr8vyx6ygwflj2737dcy0mmgvrc0s602gnny8pzlcbs9m76b"))))
44d10b1f 16040 (build-system python-build-system)
44d10b1f
RW
16041 (arguments
16042 `(#:phases
16043 (modify-phases %standard-phases
86c7ca07 16044 (add-after 'unpack 'disable-broken-tests
44d10b1f 16045 (lambda _
86c7ca07 16046 ;; This test is marked as xfail when pytest-xdist is used.
44d10b1f
RW
16047 (substitute* "dask/tests/test_threaded.py"
16048 (("def test_interrupt\\(\\)" m)
16049 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
16050 m)))
86c7ca07
RW
16051 ;; This one fails with a type error:
16052 ;; TypeError: Already tz-aware, use tz_convert to convert.
16053 (substitute* "dask/dataframe/tests/test_shuffle.py"
16054 (("def test_set_index_timestamp\\(\\)" m)
16055 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
16056 m)))
44d10b1f
RW
16057 #t))
16058 (replace 'check
16059 (lambda _ (invoke "pytest" "-vv"))))))
16060 (propagated-inputs
16061 `(("python-cloudpickle" ,python-cloudpickle)
86c7ca07 16062 ("python-fsspec" ,python-fsspec)
44d10b1f 16063 ("python-numpy" ,python-numpy)
86c7ca07 16064 ("python-packaging" ,python-packaging)
44d10b1f
RW
16065 ("python-pandas" ,python-pandas)
16066 ("python-partd" ,python-partd)
16067 ("python-toolz" ,python-toolz)
16068 ("python-pyyaml" ,python-pyyaml)))
16069 (native-inputs
16070 `(("python-pytest" ,python-pytest)
16071 ("python-pytest-runner" ,python-pytest-runner)))
16072 (home-page "https://github.com/dask/dask/")
16073 (synopsis "Parallel computing with task scheduling")
16074 (description
16075 "Dask is a flexible parallel computing library for analytics. It
16076consists of two components: dynamic task scheduling optimized for computation,
16077and large data collections like parallel arrays, dataframes, and lists that
16078extend common interfaces like NumPy, Pandas, or Python iterators to
16079larger-than-memory or distributed environments. These parallel collections
16080run on top of the dynamic task schedulers. ")
16081 (license license:bsd-3)))
16082
44d10b1f
RW
16083(define-public python-ilinkedlist
16084 (package
16085 (name "python-ilinkedlist")
16086 (version "0.4.0")
16087 (source
16088 (origin
16089 (method url-fetch)
16090 (uri (pypi-uri "ilinkedlist" version))
16091 (sha256
16092 (base32
16093 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
16094 (build-system python-build-system)
16095 (native-inputs `(("python-pytest" ,python-pytest)))
16096 (inputs `(("python" ,python)))
16097 (home-page "https://github.com/luther9/ilinkedlist-py")
16098 (synopsis "Immutable linked list library")
16099 (description
16100 "This is a implementation of immutable linked lists for Python. It
16101contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
16102Since a linked list is treated as immutable, it is hashable, and its length
16103can be retrieved in constant time. Some of the terminology is inspired by
16104LISP. It is possible to create an improper list by creating a @code{Pair}
16105with a non-list @code{cdr}.")
16106 (license license:gpl3+)))
16107
16108(define-public python-readlike
16109 (package
16110 (name "python-readlike")
16111 (version "0.1.3")
16112 (source
16113 (origin
16114 (method url-fetch)
16115 (uri (pypi-uri "readlike" version))
16116 (sha256
16117 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
16118 (build-system python-build-system)
16119 (home-page "https://github.com/jangler/readlike")
16120 (synopsis "GNU Readline-like line editing module")
16121 (description
16122 "This Python module provides line editing functions similar to the default
16123Emacs-style ones of GNU Readline. Unlike the Python standard library's
16124@code{readline} package, this one allows access to those capabilties in settings
16125outside of a standard command-line interface. It is especially well-suited to
16126interfacing with Urwid, due to a shared syntax for describing key inputs.
16127
16128Currently, all stateless Readline commands are implemented. Yanking and history
16129are not supported.")
16130 (license license:expat)))
16131
16132(define-public python2-readlike
16133 (package-with-python2 python-readlike))
16134
16135(define-public python-reparser
16136 (package
16137 (name "python-reparser")
16138 (version "1.4.3")
16139 (source
16140 (origin
16141 (method url-fetch)
16142 (uri (pypi-uri "ReParser" version))
16143 (sha256
16144 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
16145 (build-system python-build-system)
16146 (home-page "https://github.com/xmikos/reparser")
16147 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
16148 (description
16149 "This Python library provides a simple lexer/parser for inline markup based
16150on regular expressions.")
16151 (license license:expat)))
16152
16153(define-public python2-reparser
16154 (let ((reparser (package-with-python2
16155 (strip-python2-variant python-reparser))))
16156 (package (inherit reparser)
16157 (propagated-inputs
16158 `(("python2-enum34" ,python2-enum34)
16159 ,@(package-propagated-inputs reparser))))))
16160
16161(define-public python-precis-i18n
16162 (package
16163 (name "python-precis-i18n")
16164 (version "1.0.0")
16165 (source
16166 (origin
16167 (method url-fetch)
16168 (uri (pypi-uri "precis_i18n" version))
16169 (sha256
16170 (base32
16171 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
16172 (build-system python-build-system)
16173 (home-page "https://github.com/byllyfish/precis_i18n")
16174 (synopsis "Implementation of the PRECIS framework")
16175 (description
16176 "This module implements the PRECIS Framework as described in RFC 8264,
16177RFC 8265 and RFC 8266.")
16178 (license license:expat)))
16179
d0446c4b
RW
16180(define-public python-absl-py
16181 (package
16182 (name "python-absl-py")
16183 (version "0.6.1")
16184 (source
16185 (origin
16186 (method url-fetch)
16187 (uri (pypi-uri "absl-py" version))
16188 (sha256
16189 (base32
16190 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
16191 (build-system python-build-system)
16192 (propagated-inputs
16193 `(("python-six" ,python-six)))
16194 (home-page "https://github.com/abseil/abseil-py")
16195 (synopsis "Abseil Python common libraries")
16196 (description
16197 "This package provides the Abseil Python Common Libraries, a collection
16198of Python libraries for building Python applications.")
16199 (license license:asl2.0)))
16200
81bed4e9
RW
16201(define-public python-astor
16202 (package
16203 (name "python-astor")
16204 (version "0.7.1")
16205 (source
16206 (origin
16207 (method url-fetch)
16208 (uri (pypi-uri "astor" version))
16209 (sha256
16210 (base32
16211 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
16212 (build-system python-build-system)
16213 ;; FIXME: There are two errors and two test failures.
16214 (arguments `(#:tests? #f))
16215 (home-page "https://github.com/berkerpeksag/astor")
39ee82ff 16216 (synopsis "Read and write Python ASTs")
81bed4e9 16217 (description "Astor is designed to allow easy manipulation of Python
39ee82ff 16218source via the Abstract Syntax Tree.")
81bed4e9
RW
16219 (license license:bsd-3)))
16220
39ee82ff
RW
16221(define-public python2-astor
16222 (package-with-python2 python-astor))
16223
22e623ae
RW
16224(define-public python-grpcio
16225 (package
16226 (name "python-grpcio")
16227 (version "1.17.1")
16228 (source
16229 (origin
16230 (method url-fetch)
16231 (uri (pypi-uri "grpcio" version))
16232 (sha256
16233 (base32
16234 "0qb9y6j83nxa6d4kc60i8yfgdm7a8ms7b54kncjzf5y7nsxp8rzx"))))
16235 (build-system python-build-system)
16236 (propagated-inputs
16237 `(("python-six" ,python-six)))
16238 (home-page "https://grpc.io")
16239 (synopsis "HTTP/2-based RPC framework")
16240 (description "This package provides a Python library for communicating
16241with the HTTP/2-based RPC framework gRPC.")
16242 (license license:asl2.0)))
16243
79869f80
RW
16244(define-public python-astunparse
16245 (package
16246 (name "python-astunparse")
47d79541 16247 (version "1.6.2")
79869f80
RW
16248 (source
16249 (origin
16250 (method url-fetch)
16251 (uri (pypi-uri "astunparse" version))
16252 (sha256
47d79541 16253 (base32 "0rzbc44xcvzjhhiy7wac96mgal5mcjz1mfq8rmvgswskf4kf9cys"))))
79869f80 16254 (build-system python-build-system)
47d79541 16255 (arguments '(#:tests? #f)) ; there are none
79869f80
RW
16256 (propagated-inputs
16257 `(("python-six" ,python-six)
16258 ("python-wheel" ,python-wheel)))
16259 (home-page "https://github.com/simonpercivall/astunparse")
16260 (synopsis "AST unparser for Python")
16261 (description "This package provides an AST unparser for Python. It is a
16262factored out version of @code{unparse} found in the Python source
16263distribution.")
16264 (license license:bsd-3)))
16265
2884aac0
RW
16266(define-public python-gast
16267 (package
16268 (name "python-gast")
bd300261 16269 (version "0.2.2")
2884aac0
RW
16270 (source
16271 (origin
16272 (method url-fetch)
16273 (uri (pypi-uri "gast" version))
16274 (sha256
bd300261 16275 (base32 "1w5dzdb3gpcfmd2s0b93d8gff40a1s41rv31458z14inb3s9v4zy"))))
2884aac0
RW
16276 (build-system python-build-system)
16277 (propagated-inputs
16278 `(("python-astunparse" ,python-astunparse)))
16279 (home-page "https://pypi.org/project/gast/")
16280 (synopsis "Generic Python AST that abstracts the underlying Python version")
16281 (description
16282 "GAST provides a compatibility layer between the AST of various Python
16283versions, as produced by @code{ast.parse} from the standard @code{ast}
16284module.")
16285 (license license:bsd-3)))
16286
44d10b1f
RW
16287(define-public python-wikidata
16288 (package
16289 (name "python-wikidata")
16290 (version "0.6.1")
16291 (source
16292 (origin
16293 (method url-fetch)
16294 (uri (pypi-uri "Wikidata" version))
16295 (sha256
16296 (base32
16297 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
16298 (build-system python-build-system)
16299 (propagated-inputs
16300 `(("python-babel" ,python-babel)))
16301 (home-page "https://github.com/dahlia/wikidata")
16302 (synopsis "Wikidata client library")
16303 (description
16304 "This package provides a Python interface to
16305@url{https://www.wikidata.org/, Wikidata}.")
16306 (properties '((upstream-name . "Wikidata")))
16307 (license license:gpl3+)))
16308
16309(define-public python-doctest-ignore-unicode
16310 (package
16311 (name "python-doctest-ignore-unicode")
16312 (version "0.1.2")
16313 (source
16314 (origin
16315 (method url-fetch)
16316 (uri (pypi-uri "doctest-ignore-unicode" version))
16317 (sha256
16318 (base32
16319 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
16320 (build-system python-build-system)
16321 (native-inputs
16322 `(("python-nose" ,python-nose)))
16323 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
16324 (synopsis "Ignore Unicode literal prefixes in doctests")
16325 (description
16326 "This package adds support for a flag to ignore Unicode literal prefixes
16327in doctests.")
16328 (license license:asl2.0)))
16329
16330(define-public python-attr
16331 (package
16332 (name "python-attr")
16333 (version "0.3.1")
16334 (source
16335 (origin
16336 (method url-fetch)
16337 (uri (pypi-uri "attr" version))
16338 (sha256
16339 (base32
16340 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
16341 (build-system python-build-system)
16342 (home-page "https://github.com/denis-ryzhkov/attr")
16343 (synopsis "Decorator for attributes of target function or class")
16344 (description "Simple decorator to set attributes of target function or
16345class in a @acronym{DRY, Don't Repeat Yourself} way.")
16346 (license license:expat)))
f98232a3
VC
16347
16348(define-public python-construct
16349 (package
16350 (name "python-construct")
16351 (version "2.9.45")
16352 (source
16353 (origin
16354 (method url-fetch)
16355 (uri (pypi-uri "construct" version))
16356 (sha256
16357 (base32
16358 "130iy05awzigm2xah2yvlmb08mac5bi4gzr5m3g7k1krs3ps0w92"))))
16359 (build-system python-build-system)
16360 (arguments
16361 `(#:tests? #f)) ; No tests exist.
16362 (propagated-inputs
16363 `(("python-extras" ,python-extras)
16364 ("python-arrow" ,python-arrow)
16365 ("python-numpy" ,python-numpy)
16366 ("python-ruamel.yaml" ,python-ruamel.yaml)))
16367 (home-page "http://construct.readthedocs.io")
16368 (synopsis "Declarative and symmetrical parser and builder for binary data")
16369 (description
16370 "This package provides both simple, atomic constructs (such as
16371integers of various sizes), as well as composite ones which allow you
16372form hierarchical and sequential structures of increasing complexity.
16373It features bit and byte granularity, easy debugging and testing, an
16374easy-to-extend subclass system, and lots of primitive constructs to
16375make your work easier.")
16376 (license license:expat)))
b742c006
LF
16377
16378(define-public python-humanize
16379 (package
16380 (name "python-humanize")
16381 (version "0.5.1")
16382 (source
16383 (origin
16384 (method url-fetch)
16385 (uri (pypi-uri "humanize" version))
16386 (sha256
16387 (base32
16388 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
16389 (arguments
16390 '(#:tests? #f)) ; tests not in pypi archive
16391 (build-system python-build-system)
16392 (home-page "https://github.com/jmoiron/humanize")
16393 (synopsis "Print numerical information in a human-readable form")
16394 (description "This package provides a Python module that displays numbers
16395and dates in \"human readable\" forms. For example, it would display
16396\"12345591313\" as \"12.3 billion\".")
16397 (license license:expat)))
d5bbf66d
LF
16398
16399(define-public python-txaio
16400 (package
16401 (name "python-txaio")
16402 (version "18.8.1")
16403 (source
16404 (origin
16405 (method url-fetch)
16406 (uri (pypi-uri "txaio" version))
16407 (sha256
16408 (base32
16409 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
16410 (build-system python-build-system)
16411 (propagated-inputs
16412 `(("python-twisted" ,python-twisted)
16413 ("python-six" ,python-six)))
16414 (home-page "https://github.com/crossbario/txaio")
16415 (synopsis "Compatibility layer between Python asyncio and Twisted")
16416 (description "Txaio provides a compatibility layer between the Python
16417@code{asyncio} module and @code{Twisted}.")
16418 (license license:expat)))
963dfd3a
RW
16419
16420(define-public python-toolshed
16421 (package
16422 (name "python-toolshed")
16423 (version "0.4.6")
16424 (source
16425 (origin
16426 (method url-fetch)
16427 (uri (pypi-uri "toolshed" version))
16428 (sha256
16429 (base32
16430 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
16431 (build-system python-build-system)
16432 (native-inputs
16433 `(("python-nose" ,python-nose)))
16434 (home-page "https://github.com/brentp/toolshed/")
16435 (synopsis "Collection of modules and functions for working with data")
16436 (description "This is a collection of well-tested, simple modules and
16437functions that aim to reduce boilerplate when working with data.")
16438 (license license:bsd-2)))
c91ecf2d
RW
16439
16440(define-public python-annoy
16441 (package
16442 (name "python-annoy")
16443 (version "1.15.1")
16444 (source
16445 (origin
16446 (method url-fetch)
16447 (uri (pypi-uri "annoy" version))
16448 (sha256
16449 (base32
16450 "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp"))))
16451 (build-system python-build-system)
16452 (native-inputs
16453 `(("python-nose" ,python-nose)))
16454 (home-page "https://github.com/spotify/annoy/")
16455 (synopsis "Approximate nearest neighbors library")
16456 (description
16457 "Annoy is a C++ library with Python bindings to search for points in
16458space that are close to a given query point. It also creates large read-only
16459file-based data structures that are @code{mmap}ped into memory so that many
16460processes may share the same data.")
16461 (license license:asl2.0)))
412342d1 16462
79bfa422 16463(define-public python-pylzma
412342d1 16464 (package
79bfa422
DM
16465 (name "python-pylzma")
16466 (version "0.5.0")
16467 (source
16468 (origin
16469 (method url-fetch)
16470 (uri (pypi-uri "pylzma" version))
16471 (sha256
16472 (base32
16473 "074anvhyjgsv2iby2ql1ixfvjgmhnvcwjbdz8gk70xzkzcm1fx5q"))))
412342d1 16474 (build-system python-build-system)
79bfa422
DM
16475 (home-page "http://www.joachim-bauch.de/projects/pylzma/")
16476 (synopsis "Python bindings for the LZMA library by Igor Pavlov.")
16477 (description "This package provides Python bindings for the LZMA library
16478by Igor Pavlov.")
16479 (license license:lgpl2.1+)))
16480
16481(define-public python2-pylzma
16482 (package-with-python2 python-pylzma))
f825e605 16483
6609ebe7
AG
16484(define-public python2-zeroconf
16485 (package
16486 (name "python2-zeroconf")
16487
16488 ;; This is the last version that supports Python 2.x.
16489 (version "0.19.1")
16490 (source
16491 (origin
16492 (method url-fetch)
16493 (uri (pypi-uri "zeroconf" version))
16494 (sha256
16495 (base32
16496 "0ykzg730n915qbrq9bn5pn06bv6rb5zawal4sqjyfnjjm66snkj3"))))
16497 (build-system python-build-system)
16498 (arguments
16499 `(#:python ,python-2
16500 #:phases
16501 (modify-phases %standard-phases
16502 (add-after 'unpack 'patch-requires
16503 (lambda* (#:key inputs #:allow-other-keys)
16504 (substitute* "setup.py"
16505 (("enum-compat")
16506 "enum34"))
16507 #t)))))
16508 (native-inputs
16509 `(("python2-six" ,python2-six)
16510 ("python2-enum32" ,python2-enum34)
16511 ("python2-netifaces" ,python2-netifaces)
16512 ("python2-typing" ,python2-typing)))
16513 (home-page "https://github.com/jstasiak/python-zeroconf")
16514 (synopsis "Pure Python mDNS service discovery")
16515 (description
16516 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
16517compatible).")
16518 (license license:lgpl2.1+)))
16519
f825e605
GLV
16520(define-public python-bsddb3
16521 (package
16522 (name "python-bsddb3")
16523 (version "6.2.6")
16524 (source
16525 (origin
16526 (method url-fetch)
16527 (uri (pypi-uri "bsddb3" version))
16528 (sha256
16529 (base32
16530 "019db2y6bfmiqbrgg9x9f6h72qjmqh05czdn2v5sy9bl0gs23mj2"))))
16531 (build-system python-build-system)
16532 (inputs
16533 `(("bdb" ,bdb)))
16534 (arguments
16535 '(#:phases
16536 (modify-phases %standard-phases
16537 (add-after 'unpack 'configure-locations
16538 (lambda* (#:key inputs #:allow-other-keys)
16539 (setenv "BERKELEYDB_DIR" (assoc-ref inputs "bdb"))
16540 (setenv "YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION" "1")
16541 #t))
16542 (replace 'check
16543 (lambda _
16544 (invoke "python3" "test3.py" "-v"))))))
16545 (home-page "https://www.jcea.es/programacion/pybsddb.htm")
16546 (synopsis "Python bindings for Oracle Berkeley DB")
16547 (description
16548 "This module provides a nearly complete wrapping of the Oracle/Sleepycat
16549C API for the Database Environment, Database, Cursor, Log Cursor, Sequence and
16550Transaction objects, and each of these is exposed as a Python type in the
16551bsddb3.db module. The database objects can use various access methods: btree,
16552hash, recno, and queue. Complete support of Berkeley DB distributed
16553transactions. Complete support for Berkeley DB Replication Manager.
16554Complete support for Berkeley DB Base Replication. Support for RPC.")
16555 (license license:bsd-3)))
edeb04bf
PL
16556
16557(define-public python-dbfread
16558 (package
16559 (name "python-dbfread")
16560 (version "2.0.7")
16561 (source (origin
16562 (method url-fetch)
16563 (uri (pypi-uri "dbfread" version))
16564 (sha256
16565 (base32
16566 "0gdpwdzf1fngsi6jrdyj4qdf6cr7gnnr3zp80dpkzbgz0spskj07"))))
16567 (build-system python-build-system)
16568 (native-inputs
16569 `(("python-pytest" ,python-pytest)))
16570 (home-page "https://dbfread.readthedocs.io")
16571 (synopsis "Read DBF Files with Python")
16572 (description
16573 "This library reads DBF files and returns the data as native Python data
16574types for further processing. It is primarily intended for batch jobs and
16575one-off scripts.")
16576 (license license:expat)))
e308b4f0
JM
16577
16578(define-public python-cached-property
16579 (package
16580 (name "python-cached-property")
16581 (version "1.5.1")
16582 (source
16583 (origin
16584 (method url-fetch)
16585 (uri (pypi-uri "cached-property" version))
16586 (sha256
16587 (base32
16588 "010m1bl380l2r3vwq24r5v14l6gwvgm9v0mqqjkjss552jgsa5wj"))))
16589 (build-system python-build-system)
16590 (arguments
16591 `(#:phases
16592 (modify-phases %standard-phases
16593 ;; https://github.com/pydanny/cached-property/issues/131
16594 ;; recent versions of freezegun break one test
16595 (add-after 'unpack 'disable-broken-test
16596 (lambda _
16597 (substitute* "tests/test_cached_property.py"
16598 (("def test_threads_ttl_expiry\\(self\\)" m)
16599 (string-append "@unittest.skip(\"Disabled by Guix\")\n"
16600 " " m)))
16601 #t)))))
16602 (native-inputs
16603 `(("python-freezegun" ,python-freezegun)))
16604 (home-page
16605 "https://github.com/pydanny/cached-property")
16606 (synopsis
16607 "Decorator for caching properties in classes")
16608 (description
16609 "This package provides a decorator which makes caching
16610time-or-computationally-expensive properties quick and easy and works in Python
166112 or 3.")
16612 (license license:bsd-3)))
dfe8a704
NG
16613
16614(define-public python-folium
16615 (package
16616 (name "python-folium")
d3bc1ea9 16617 (version "0.10.1")
dfe8a704
NG
16618 (source
16619 (origin
16620 (method url-fetch)
16621 (uri (pypi-uri "folium" version))
16622 (sha256
16623 (base32
d3bc1ea9 16624 "0gcc267wxwxr57ry86pqpbiyfvl0g48hfvgy0f2mz9s58g87kgzd"))))
dfe8a704
NG
16625 (build-system python-build-system)
16626 (propagated-inputs
16627 `(("python-branca" ,python-branca)
16628 ("python-jinja2" ,python-jinja2)
16629 ("python-numpy" ,python-numpy)
16630 ("python-requests" ,python-requests)))
16631 (native-inputs
16632 `(("python-pytest" ,python-pytest)))
16633 (home-page "https://github.com/python-visualization/folium")
16634 (synopsis "Make beautiful maps with Leaflet.js & Python")
16635 (description "@code{folium} makes it easy to visualize data that’s been
16636manipulated in Python on an interactive leaflet map. It enables both the
16637binding of data to a map for @code{choropleth} visualizations as well as
16638passing rich vector/raster/HTML visualizations as markers on the map.
16639
16640The library has a number of built-in tilesets from OpenStreetMap, Mapbox, and
16641Stamen, and supports custom tilesets with Mapbox or Cloudmade API keys. It
16642supports Image, Video, GeoJSON and TopoJSON overlays.")
16643 (license license:expat)))
9dd5f475
LC
16644
16645(define-public jube
16646 (package
16647 ;; This is a command-line tool, so no "python-" prefix.
16648 (name "jube")
16649 (version "2.2.2")
16650 (source (origin
16651 (method url-fetch)
16652 (uri (string-append
16653 "http://apps.fz-juelich.de/jsc/jube/jube2/download.php?version="
16654 version))
16655 (sha256
16656 (base32
16657 "0xq4k1q63s1p6swgyp61vahlrd1fqmgbm0gm5kpj8ikwy0yc0nqk"))
16658 (file-name (string-append "jube-" version ".tar.gz"))))
16659 (build-system python-build-system)
16660 (home-page "https://apps.fz-juelich.de/jsc/jube/jube2/docu/index.html")
16661 (synopsis "Benchmarking environment")
16662 (description
16663 "JUBE helps perform and analyze benchmarks in a systematic way. For each
16664benchmarked application, benchmark data is stored in a format that allows JUBE
16665to deduct the desired information. This data can be parsed by automatic pre-
16666and post-processing scripts that draw information and store it more densely
16667for manual interpretation.")
a9f33960 16668 (license license:gpl3+)))
66436424
NG
16669
16670(define-public python-pyroutelib3
16671 (package
16672 (name "python-pyroutelib3")
16673 (version "1.3.post1")
16674 (source
16675 (origin
16676 (method url-fetch)
16677 (uri (pypi-uri "pyroutelib3" version))
16678 (sha256
16679 (base32
16680 "1hpbydpn2alyswiajfbvhzq4c7f36vdmvxy91hgv8l1lb2g2vfrj"))))
16681 (build-system python-build-system)
16682 (propagated-inputs
16683 `(("python-dateutil" ,python-dateutil)))
16684 (home-page "https://github.com/MKuranowski/pyroutelib3")
16685 (synopsis "Library for simple routing on OSM data")
16686 (description "Library for simple routing on OSM data")
16687 (license license:gpl3+)))
30e7c03a 16688
c1bbef69
16689(define-public python-bibtexparser
16690 (package
16691 (name "python-bibtexparser")
16692 (version "1.1.0")
16693 (source
16694 (origin
16695 (method url-fetch)
16696 (uri (pypi-uri "bibtexparser" version))
16697 (sha256
16698 (base32
16699 "0zwhfkrzf3n5847dbnfng92k7ak199l9v6x6ax3dgdidfpm6d2fz"))))
16700 (build-system python-build-system)
16701 (propagated-inputs
16702 `(("python-pyparsing" ,python-pyparsing)))
16703 (native-inputs
16704 `(("python-future" ,python-future)))
16705 (home-page "https://github.com/sciunto-org/python-bibtexparser")
16706 (synopsis "Python library to parse BibTeX files")
16707 (description "BibtexParser is a Python library to parse BibTeX files.")
16708 (license (list license:bsd-3 license:lgpl3))))
8581b40d
HG
16709
16710(define-public python-distro
16711 (package
16712 (name "python-distro")
16713 (version "1.4.0")
16714 (source
16715 (origin
16716 (method url-fetch)
16717 (uri (pypi-uri "distro" version))
16718 (sha256
16719 (base32
16720 "0mrg75w4ap7mdzyga75yaid9n8bgb345ih5mwjp3plj6v1jxwb9n"))))
16721 (build-system python-build-system)
16722 (native-inputs
16723 `(("python-pytest" ,python-pytest)))
16724 (home-page "https://github.com/nir0s/distro")
16725 (synopsis
16726 "OS platform information API")
16727 (description
16728 "@code{distro} provides information about the OS distribution it runs on,
16729such as a reliable machine-readable ID, or version information.
16730
16731It is the recommended replacement for Python's original
16732`platform.linux_distribution` function (which will be removed in Python 3.8).
16733@code{distro} also provides a command-line interface to output the platform
16734information in various formats.")
16735 (license license:asl2.0)))
f2f41e1a
HG
16736
16737(define-public python-cairosvg
16738 (package
16739 (name "python-cairosvg")
16740 (version "2.4.2")
16741 (source
16742 (origin
16743 (method url-fetch)
16744 (uri (pypi-uri "CairoSVG" version))
16745 (sha256
16746 (base32 "1bb7irxbaxxb9ahm3z5wsx1q96mm5gzskc7b6q07h9ikcnb8yrjf"))))
16747 (build-system python-build-system)
16748 (arguments
16749 `(#:phases
16750 (modify-phases %standard-phases
16751 (replace 'check
16752 (lambda _ (invoke "pytest"))))))
16753 (propagated-inputs
16754 `(("python-cairocffi" ,python-cairocffi)
16755 ("python-cssselect2" ,python-cssselect2)
16756 ("python-defusedxml" ,python-defusedxml)
16757 ("python-pillow" ,python-pillow)
16758 ("python-tinycss2" ,python-tinycss2)))
16759 (native-inputs
16760 `(("python-pytest-flake8" ,python-pytest-flake8)
16761 ("python-pytest-isort" ,python-pytest-isort)
16762 ("python-pytest-runner" ,python-pytest-runner)))
16763 (home-page "https://cairosvg.org/")
16764 (synopsis "SVG to PDF/PS/PNG converter based on Cairo")
16765 (description "CairoSVG is a SVG converter based on Cairo. It can export
16766SVG files to PDF, PostScript and PNG files. The main part of CairoSVG is a
16767SVG parser, trying to follow the SVG 1.1 recommendation from the W3C. Once
16768parsed, the result is drawn to a Cairo surface that can be exported to
16769qvarious formats: PDF, PostScript, PNG and even SVG.")
16770 (license license:lgpl3+)))
ea1801e0
HG
16771
16772(define-public python-pyphen
16773 (package
16774 (name "python-pyphen")
16775 (version "0.9.5")
16776 (source
16777 (origin
16778 (method url-fetch)
16779 (uri (pypi-uri "Pyphen" version))
16780 (sha256
16781 (base32 "08c9y69ry9d6m4zalhnalg86lsp9v2j5n1ziw5vxfmiihx83lqrv"))))
16782 (build-system python-build-system)
16783 ;; TODO: Use the Guix system hyphenation packages hyphen-* rather than the
16784 ;; embedded set provided by upstream - like Debian does.
16785 (home-page "https://github.com/Kozea/Pyphen")
16786 (synopsis "Pure Python module to hyphenate text")
16787 (description "Pyphen is a pure Python module to hyphenate text using
16788existing Hunspell hyphenation dictionaries.")
16789 (license (list license:gpl2 license:lgpl2.1 license:mpl1.1))))
85cfb0e9
CL
16790
16791(define-public python-intelhex
16792 (package
16793 (name "python-intelhex")
16794 (version "2.2.1")
16795 (source
16796 (origin
16797 (method url-fetch)
16798 (uri (pypi-uri "intelhex" version))
16799 (sha256
16800 (base32
16801 "0ckqjbxd8gwcg98gfzpn4vq1qxzfvq3rdbrr1hikj1nmw08qb780"))))
16802 (build-system python-build-system)
16803 (arguments '(#:tests? #f)) ;issue with version
16804 (home-page "https://pypi.org/project/IntelHex/")
16805 (synopsis "Python library for Intel HEX files manipulations")
16806 (description "The Intel HEX file format is widely used in microprocessors
16807and microcontrollers area (embedded systems etc.) as the de facto standard for
16808representation of code to be programmed into microelectronic devices. This
16809package provides an intelhex Python library to read, write, create from
16810scratch and manipulate data from Intel HEX file format. It also includes
16811several convenience Python scripts, including \"classic\" hex2bin and bin2hex
16812converters and more, those based on the library itself.")
16813 (license license:bsd-3)))
34bf6869
CL
16814
16815(define-public python-pykwalify
16816 (package
16817 (name "python-pykwalify")
16818 (version "1.7.0")
16819 (source
16820 (origin
16821 (method url-fetch)
16822 (uri (pypi-uri "pykwalify" version))
16823 (sha256
16824 (base32
16825 "1cnfzkg1b01f825ikpw2fhjclf9c8akxjfrbd1vc22x1lg2kk2vy"))))
16826 (build-system python-build-system)
16827 (arguments '(#:tests? #f)) ;missing dependencies
16828 (propagated-inputs
16829 `(("python-dateutil" ,python-dateutil)
16830 ("python-docopt" ,python-docopt)
16831 ("python-pyyaml" ,python-pyyaml)))
16832 (home-page "https://github.com/grokzen/pykwalify")
16833 (synopsis
16834 "Python lib/cli for JSON/YAML schema validation")
16835 (description
16836 "This package provides a parser, schema validator, and data binding tool
16837for YAML and JSON.")
16838 (license license:expat)))
e2ebbbcc
KK
16839
16840(define-public python-dbusmock
16841 (package
022b0d5f
BG
16842 (name "python-dbusmock")
16843 (version "0.18.3")
16844 (source
16845 (origin
16846 (method url-fetch)
16847 (uri (pypi-uri "python-dbusmock" version))
16848 (sha256
e2ebbbcc 16849 (base32
022b0d5f
BG
16850 "0hp2kyac88nh9iv6l8hlmv7s1sa1s5f1a3wc2pmlmmxnd211fjlr"))))
16851 (build-system python-build-system)
16852 (arguments
16853 '(#:phases
16854 (modify-phases %standard-phases
16855 (add-after 'unpack 'patch-shell-path
16856 (lambda _
16857 (substitute* "tests/test_code.py"
16858 (("/bin/bash") (which "bash")))
16859 #t)))))
16860 (native-inputs
16861 `(;; For tests.
16862 ("dbus" ,dbus) ; for dbus-daemon
16863 ("python-nose" ,python-nose)
16864 ("which" ,which)))
16865 (propagated-inputs
16866 `(("python-dbus" ,python-dbus)
16867 ("python-pygobject" ,python-pygobject)))
16868 (home-page "https://github.com/martinpitt/python-dbusmock")
16869 (synopsis "Python library for mock D-Bus objects")
16870 (description "python-dbusmock allows for the easy creation of mock objects on
e2ebbbcc
KK
16871D-Bus. This is useful for writing tests for software which talks to D-Bus
16872services such as upower, systemd, logind, gnome-session or others, and it is
16873hard (or impossible without root privileges) to set the state of the real
16874services to what you expect in your tests.")
022b0d5f 16875 (license license:lgpl3+)))
b657b23f
BG
16876
16877(define-public python-ujson
16878 (package
16879 (name "python-ujson")
16880 (version "1.35")
16881 (source
16882 (origin
16883 (method url-fetch)
16884 (uri (pypi-uri "ujson" version))
16885 (sha256
16886 (base32
16887 "11jz5wi7mbgqcsz52iqhpyykiaasila4lq8cmc2d54bfa3jp6q7n"))))
16888 (build-system python-build-system)
16889 (home-page "http://www.esn.me")
16890 (synopsis
16891 "Ultra fast JSON encoder and decoder for Python")
16892 (description
16893 "UltraJSON is an ultra fast JSON encoder and decoder written in pure C with
16894 bindings for Python 2.5+ and 3.")
16895 (license license:bsd-3)))
16896
16897(define-public python2-ujson
16898 (package-with-python2 python-ujson))
dbcef44a
MIP
16899
16900(define-public python-iocapture
16901 ;; The latest release is more than a year older than this commit.
16902 (let ((commit "fdc021c431d0840303908dfc3ca8769db383595c")
16903 (revision "1"))
16904 (package
16905 (name "python-iocapture")
16906 (version "0.1.2")
16907 (source
16908 (origin
16909 (method git-fetch)
16910 (uri (git-reference
16911 (url "https://github.com/oinume/iocapture.git")
16912 (commit commit)))
16913 (file-name (git-file-name name version))
16914 (sha256
16915 (base32
16916 "1mkbhqibxvgwg0p7slr8dfraa3g2s6bsayladhax2jccwj4kcndz"))))
16917 (build-system python-build-system)
16918 (arguments
16919 `(#:phases
16920 (modify-phases %standard-phases
16921 (delete 'check)
16922 (add-after 'install 'check
16923 (lambda* (#:key inputs outputs #:allow-other-keys)
16924 (add-installed-pythonpath inputs outputs)
16925 (invoke "py.test" "-v" "tests")
16926 #t)))))
16927 (propagated-inputs
16928 `(("python-flexmock" ,python-flexmock)
16929 ("python-pytest" ,python-pytest)
16930 ("python-pytest-cov" ,python-pytest-cov)
16931 ("python-six" ,python-six)))
16932 (home-page "https://github.com/oinume/iocapture")
16933 (synopsis "Python capturing tool for stdout and stderr")
16934 (description
16935 "This package helps you to capture the standard out (stdout) and the
16936standard error channel (stderr) in your program.")
16937 (license license:expat))))
db6bd842
MIP
16938
16939(define-public python-argh
16940 ;; There are 21 commits since the latest release containing important
16941 ;; improvements.
16942 (let ((commit "dcd3253f2994400a6a58a700c118c53765bc50a4")
16943 (revision "1"))
16944 (package
16945 (name "python-argh")
16946 (version (git-version "0.26.2" revision commit))
16947 (source
16948 (origin
16949 (method git-fetch)
16950 (uri (git-reference
16951 (url "https://github.com/neithere/argh.git")
16952 (commit commit)))
16953 (file-name (git-file-name name version))
16954 (sha256
16955 (base32
16956 "1p5h3dnpbsjmqrvil96s71asc6i3gpinmbrabqmwnrsxprz7r3ns"))))
16957 (build-system python-build-system)
16958 (propagated-inputs
16959 `(("python-iocapture" ,python-iocapture)
16960 ("python-mock" ,python-mock)
16961 ("python-pytest" ,python-pytest)
16962 ("python-pytest-cov" ,python-pytest-cov)
16963 ("python-pytest-xdist" ,python-pytest-xdist)
16964 ("python-tox" ,python-tox)))
16965 (home-page "https://github.com/neithere/argh/")
16966 (synopsis "Argparse wrapper with natural syntax")
16967 (description
16968 "python-argh is a small library that provides several layers of
16969abstraction on top of @code{python-argparse}. The layers can be mixed. It is
16970always possible to declare a command with the highest possible (and least
16971flexible) layer and then tune the behaviour with any of the lower layers
16972including the native API of @code{python-argparse}.")
16973 (license license:lgpl3+))))
073723fa
MIP
16974
16975(define-public python-ppft
16976 (package
16977 (name "python-ppft")
16978 (version "1.6.6.1")
16979 (source
16980 (origin
16981 (method url-fetch)
16982 (uri (pypi-uri "ppft" version))
16983 (sha256
16984 (base32
16985 "1z1invkhszc5d2mvgr221v7cszzifcc77mz0pv3wjp6x5q2768cy"))))
16986 (build-system python-build-system)
16987 (arguments '(#:tests? #f)) ; there are none
16988 (propagated-inputs
16989 `(("python-six" ,python-six)))
16990 (home-page "https://pypi.org/project/ppft/")
16991 (synopsis "Fork of Parallel Python")
16992 (description
16993 "This package is a fork of Parallel Python. The Parallel Python
16994module (@code{pp}) provides an easy and efficient way to create
16995parallel-enabled applications for @dfn{symmetric multiprocessing} (SMP)
16996computers and clusters. It features cross-platform portability and dynamic
16997load balancing.")
16998 (license license:bsd-3)))
8451ea19
MIP
16999
17000(define-public python-pox
17001 (package
17002 (name "python-pox")
17003 (version "0.2.7")
17004 (source
17005 (origin
17006 (method url-fetch)
17007 (uri (pypi-uri "pox" version))
17008 (sha256
17009 (base32
17010 "0y17ckc2p6i6709s279sjdj4q459mpcc38ymg9zv9y6vl6jf3bq6"))))
17011 (build-system python-build-system)
17012 (arguments
17013 `(#:phases
17014 (modify-phases %standard-phases
17015 (replace 'check
17016 (lambda _
17017 (mkdir-p "/tmp/guix")
17018 (setenv "SHELL" "bash")
17019 (setenv "USERNAME" "guix")
17020 (setenv "HOME" "/tmp/guix") ; must end on USERNAME...
17021 (invoke "py.test" "-vv")
17022 #t)))))
17023 (native-inputs
17024 `(("python-pytest" ,python-pytest)
17025 ("which" ,which)))
17026 (home-page "https://pypi.org/project/pox/")
17027 (synopsis "Python utilities for filesystem exploration and automated builds")
17028 (description
17029 "Pox provides a collection of utilities for navigating and manipulating
17030filesystems. This module is designed to facilitate some of the low level
17031operating system interactions that are useful when exploring a filesystem on a
17032remote host. Pox provides Python equivalents of several shell commands such
17033as @command{which} and @command{find}. These commands allow automated
17034discovery of what has been installed on an operating system, and where the
17035essential tools are located.")
17036 (license license:bsd-3)))
7e476ae8
MIP
17037
17038(define-public python-pathos
17039 (package
17040 (name "python-pathos")
17041 (version "0.2.5")
17042 (source
17043 (origin
17044 (method url-fetch)
17045 (uri (pypi-uri "pathos" version))
17046 (sha256
17047 (base32
17048 "0in8hxdz7k081ijn6q94gr39ycy7363sx4zysmbwyvd7snqjrbi1"))))
17049 (build-system python-build-system)
8f82e7e3
EF
17050 (arguments
17051 '(#:phases
17052 (modify-phases %standard-phases
17053 (replace 'check
17054 (lambda _
17055 (setenv "PYTHONPATH"
17056 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
17057 (invoke "python" "./tests/__main__.py"))))))
7e476ae8
MIP
17058 (propagated-inputs
17059 `(("python-dill" ,python-dill)
17060 ("python-multiprocess" ,python-multiprocess)
17061 ("python-pox" ,python-pox)
17062 ("python-ppft" ,python-ppft)))
8f82e7e3
EF
17063 (native-inputs
17064 `(("python-pytest" ,python-pytest)))
7e476ae8
MIP
17065 (home-page "https://pypi.org/project/pathos/")
17066 (synopsis
17067 "Parallel graph management and execution in heterogeneous computing")
17068 (description
17069 "Python-pathos is a framework for heterogenous computing. It provides a
17070consistent high-level interface for configuring and launching parallel
17071computations across heterogenous resources. Python-pathos provides configurable
17072launchers for parallel and distributed computing, where each launcher contains
17073the syntactic logic to configure and launch jobs in an execution environment.")
17074 (license license:bsd-3)))
54e5ee5a
BG
17075
17076(define-public python-flit
17077 (package
17078 (name "python-flit")
17079 (version "2.1.0")
17080 (source
17081 (origin
17082 (method url-fetch)
17083 (uri (pypi-uri "flit" version))
17084 (sha256
17085 (base32
17086 "0h5vvmqinqzn97mr3ix7zx53af9ad4fimjjwqpx88yp8qhz4r5bc"))))
17087 (build-system python-build-system)
17088 (arguments
17089 `(#:tests? #f)) ; XXX: Check requires network access.
17090 (home-page "https://flit.readthedocs.io/")
17091 (synopsis
17092 "Simple packaging tool for simple packages")
17093 (description
17094 "Flit is a simple way to put Python packages and modules on PyPI. Flit
17095packages a single importable module or package at a time, using the import
17096name as the name on PyPI. All subpackages and data files within a package
17097are included automatically.")
17098 (license license:bsd-3)))
02139b42
BG
17099
17100(define-public python-pathtools
17101 (package
17102 (name "python-pathtools")
17103 (version "0.1.2")
17104 (source
17105 (origin
17106 (method url-fetch)
17107 (uri (pypi-uri "pathtools" version))
17108 (sha256
17109 (base32
17110 "1h7iam33vwxk8bvslfj4qlsdprdnwf8bvzhqh3jq5frr391cadbw"))))
17111 (build-system python-build-system)
17112 (home-page
17113 "https://github.com/gorakhargosh/pathtools")
17114 (synopsis "Path utilities for Python")
17115 (description "Pattern matching and various utilities for file systems
17116paths.")
17117 (license license:expat)))
6b520177
JG
17118
17119(define-public python-fastentrypoints
17120 (package
17121 (name "python-fastentrypoints")
17122 (version "0.12")
17123 (source
17124 (origin
17125 (method url-fetch)
17126 (uri (pypi-uri "fastentrypoints" version))
17127 (sha256
17128 (base32
17129 "02s1j8i2dzbpbwgq2a3fiqwm3cnmhii2qzc0k42l0rdxd4a4ya7z"))))
17130 (build-system python-build-system)
17131 (home-page
17132 "https://github.com/ninjaaron/fast-entry_points")
17133 (synopsis
17134 "Makes entry_points specified in setup.py load more quickly")
17135 (description
17136 "Using entry_points in your setup.py makes scripts that start really
17137slowly because it imports pkg_resources. This package allows such setup
17138scripts to load entry points more quickly.")
17139 (license license:bsd-3)))
c5eb8cf8
JG
17140
17141(define-public python-funcparserlib
17142 (package
17143 (name "python-funcparserlib")
17144 (version "0.3.6")
17145 (source
17146 (origin
17147 (method url-fetch)
17148 (uri (pypi-uri "funcparserlib" version))
17149 (sha256
17150 (base32
17151 "07f9cgjr3h4j2m67fhwapn8fja87vazl58zsj4yppf9y3an2x6dp"))))
17152 (native-inputs
17153 `(("python-tox" ,python-tox)))
17154 (arguments
17155 `(#:phases
17156 (modify-phases %standard-phases
17157 (replace 'check
17158 (lambda _
17159 (invoke "tox"))))))
17160 (build-system python-build-system)
17161 (home-page
17162 "https://github.com/vlasovskikh/funcparserlib")
17163 (synopsis
17164 "Recursive descent parsing library based on functional combinators")
17165 (description
11140cf1 17166 "This package is a recursive descent parsing library for Python based on
c5eb8cf8
JG
17167functional combinators. Parser combinators are just higher-order functions
17168that take parsers as their arguments and return them as result values.")
17169 (license license:expat)))
602f3b67
NG
17170
17171(define-public python-speg
17172 (package
17173 (name "python-speg")
17174 (version "0.3")
17175 (source
17176 (origin
17177 (method url-fetch)
17178 (uri (pypi-uri "speg" version ".zip"))
17179 (sha256
17180 (base32 "0w9y4jf4787dzhy6rvhwi0mpl0r8qkqmqmyv2hpwdpv8w53yzjqh"))))
17181 (arguments
17182 `(#:tests? #f)) ;FIXME: tests fail, not sure why
17183 (native-inputs
17184 `(("unzip" ,unzip)))
17185 (build-system python-build-system)
17186 (home-page "https://github.com/avakar/speg")
17187 (synopsis "PEG-based parser interpreter with memoization")
17188 (description "This package is a PEG-based parser and interpreter with
17189memoization.")
17190 (license license:expat)))
07c8177b
NG
17191
17192(define-public python-cson
17193 (package
17194 (name "python-cson")
17195 (version "0.8")
17196 (source
17197 (origin
17198 (method url-fetch)
17199 (uri (pypi-uri "cson" version))
17200 (sha256
17201 (base32 "00cyvigg4npbph39ghkg77xbxisa6plf75vii24igxfizik0337f"))))
17202 (build-system python-build-system)
17203 (propagated-inputs
17204 `(("python-speg" ,python-speg)))
17205 (home-page "https://github.com/avakar/pycson")
17206 (synopsis "Parser for Coffeescript Object Notation (CSON)")
17207 (description "This package is a parser for Coffeescript Object
17208Notation (CSON).")
17209 (license license:expat)))
e24c672e
LDB
17210
17211(define-public python-asynctest
17212 (package
17213 (name "python-asynctest")
17214 (version "0.13.0")
17215 (source
17216 (origin
17217 (method url-fetch)
17218 (uri (pypi-uri "asynctest" version))
17219 (sha256
17220 (base32
17221 "1b3zsy7p84gag6q8ai2ylyrhx213qdk2h2zb6im3xn0m5n264y62"))))
17222 (build-system python-build-system)
17223 (arguments
17224 '(#:phases
17225 (modify-phases %standard-phases
17226 (replace 'check
17227 (lambda _
17228 (invoke "python" "-X" "dev" "-m" "unittest" "-v" "test")))
17229 (add-after 'unpack 'disable-tests
17230 (lambda* _
17231 (substitute* "test/test_selector.py"
17232 ;; XXX: This test fails for unknown reason inside the build
17233 ;; environment.
17234 (("def test_events_watched_outside_test_are_ignored")
17235 "@unittest.skip('disabled by guix')
17236 def test_events_watched_outside_test_are_ignored")))))))
17237 (home-page "https://github.com/Martiusweb/asynctest")
17238 (synopsis "Extension of unittest for testing asyncio libraries")
17239 (description
17240 "The package asynctest is built on top of the standard unittest module
17241and cuts down boilerplate code when testing libraries for asyncio.")
17242 (license license:asl2.0)))
1cc9c38e
LDB
17243
17244(define-public python-aionotify
17245 (package
17246 (name "python-aionotify")
17247 (version "0.2.0")
17248 (source
17249 (origin
17250 ;; Source tarball on PyPi lacks tests
17251 (method git-fetch)
17252 (uri (git-reference
17253 (url "https://github.com/rbarrois/aionotify")
17254 (commit (string-append "v" version))))
17255 (file-name (git-file-name name version))
17256 (sha256
17257 (base32 "1sk9i8czxgsbrswsf1nlb4c82vgnlzi8zrvrxdip92w2z8hqh43y"))))
17258 (build-system python-build-system)
17259 (native-inputs `(("python-asynctest" ,python-asynctest)))
17260 (home-page "https://github.com/rbarrois/aionotify")
17261 (synopsis "Asyncio-powered inotify library")
17262 (description
17263 "@code{aionotify} is a simple, asyncio-based inotify library.")
17264 (license license:bsd-3)))
84efaa3b
LDB
17265
17266(define-public python-forbiddenfruit
17267 (package
17268 (name "python-forbiddenfruit")
17269 (version "0.1.3")
17270 (source
17271 (origin
17272 ;; Source tarball on PyPi lacks Makefile that builds and runs tests
17273 (method git-fetch)
17274 (uri (git-reference
17275 (url "https://github.com/clarete/forbiddenfruit")
17276 (commit version)))
17277 (file-name (git-file-name name version))
17278 (sha256
17279 (base32 "1fp2xvdqpi910j9r3q68x38phpxbm700gjdi2m2j5gs91xdnyyh2"))))
17280 (build-system python-build-system)
17281 (arguments
17282 '(#:phases
17283 (modify-phases %standard-phases
17284 (replace 'check
17285 (lambda _
17286 (invoke "make" "SKIP_DEPS=1"))))))
17287 (native-inputs
17288 `(("python-nose" ,python-nose)
17289 ("python-coverage" ,python-coverage)))
17290 (home-page "https://github.com/clarete/forbiddenfruit")
17291 (synopsis "Patch python built-in objects")
17292 (description "This project allows Python code to extend built-in types.")
17293 (license (list license:gpl3+ license:expat))))
9786258b
LDB
17294
17295(define-public python-shouldbe
17296 (package
17297 (name "python-shouldbe")
17298 (version "0.1.2")
17299 (source
17300 (origin
17301 (method url-fetch)
17302 (uri (pypi-uri "shouldbe" version))
17303 (sha256
17304 (base32
17305 "16zbvjxf71dl4yfbgcr6idyim3mdrfvix1dv8b95p0s9z07372pj"))))
17306 (build-system python-build-system)
17307 (propagated-inputs
17308 `(("python-forbiddenfruit" ,python-forbiddenfruit)))
17309 (native-inputs
17310 `(("python-nose" ,python-nose)))
17311 (home-page "https://github.com/directxman12/should_be")
17312 (synopsis "Python Assertion Helpers inspired by Shouldly")
17313 (description
17314 "Python Assertion Helpers inspired by Shouldly.")
17315 (license license:isc)))
72c2478a
LDB
17316
17317(define-public python-k5test
17318 (package
17319 (name "python-k5test")
17320 (version "0.9.2")
17321 (source
17322 (origin
17323 (method url-fetch)
17324 (uri (pypi-uri "k5test" version))
17325 (sha256
17326 (base32
17327 "1lqp3jgfngyhaxjgj3n230hn90wsylwilh120yjf62h7b1s02mh8"))))
17328 (build-system python-build-system)
17329 (propagated-inputs
17330 `(("python-six" ,python-six)
17331 ;; `which`, `kadmin.local` binaries called inside library
17332 ("which" ,which)
17333 ("mit-krb5" ,mit-krb5)))
17334 (native-inputs `(("mit-krb5" ,mit-krb5)))
17335 (arguments
17336 '(#:phases
17337 (modify-phases %standard-phases
17338 (add-after 'unpack 'patch-paths
17339 (lambda* _
17340 (substitute* "k5test/realm.py"
17341 (("'kadmin_local'") "'kadmin.local'")))))))
17342 (home-page "https://github.com/pythongssapi/k5test")
17343 (synopsis "Library for setting up self-contained Kerberos 5 environments")
17344 (description
17345 "@code{k5test} is a library for setting up self-contained Kerberos 5
17346environments, and running Python unit tests inside those environments. It is
17347based on the file of the same name found alongside the MIT Kerberos 5 unit
17348tests.")
17349 (license license:isc)))
a8ef4978
LDB
17350
17351(define-public python-gssapi
17352 (package
17353 (name "python-gssapi")
17354 (version "1.6.1")
17355 (source
17356 (origin
17357 (method url-fetch)
17358 (uri (pypi-uri "gssapi" version))
17359 (sha256
17360 (base32
17361 "1gymg4asvwrz7y13qpwp2s5g8qwq179d72gkj09q6bfcgs82l5wr"))))
17362 (build-system python-build-system)
17363 (propagated-inputs
17364 `(("python-decorator" ,python-decorator)
17365 ("python-six" ,python-six)))
17366 (inputs
17367 `(("mit-krb5" ,mit-krb5)))
17368 ;; for tests
17369 (native-inputs
17370 `(("python-shouldbe" ,python-shouldbe)
17371 ("python-parameterized" ,python-parameterized)
17372 ("python-k5test" ,python-k5test)
17373 ("python-nose" ,python-nose)))
17374 (home-page "https://github.com/pythongssapi/python-gssapi")
17375 (synopsis "Python GSSAPI Wrapper")
17376 (description
17377 "Python-GSSAPI provides both low-level and high level wrappers around the
17378GSSAPI C libraries. While it focuses on the Kerberos mechanism, it should
17379also be useable with other GSSAPI mechanisms.")
17380 (license license:isc)))
7261bdca
JL
17381
17382(define-public python-check-manifest
17383 (package
17384 (name "python-check-manifest")
17385 (version "0.37")
17386 (source
17387 (origin
17388 (method url-fetch)
17389 (uri (pypi-uri "check-manifest" version))
17390 (sha256
17391 (base32
17392 "0lk45ifdv2cpkl6ayfyix7jwmnxa1rha7xvb0ih5999k115wzqs4"))))
17393 (build-system python-build-system)
17394 (native-inputs
17395 `(("python-mock" ,python-mock)
17396 ("git" ,git)))
17397 (home-page "https://github.com/mgedmin/check-manifest")
17398 (synopsis "Check MANIFEST.in in a Python source package for completeness")
17399 (description "Python package can include a MANIFEST.in file to help with
17400sending package files to the Python Package Index. This package checks that
17401file to ensure it completely and accurately describes your project.")
17402 (license license:expat)))
b487b7b5
JL
17403
17404(define-public python-android-stringslib
17405 (package
17406 (name "python-android-stringslib")
17407 (version "0.1.2")
17408 (source
17409 (origin
17410 (method git-fetch)
17411 (uri (git-reference
17412 (url "https://framagit.org/tyreunom/python-android-strings-lib")
17413 (commit (string-append "v" version))))
17414 (file-name (git-file-name name version))
17415 (sha256
17416 (base32
17417 "0gij55qzzq1h83kfpvhai1vf78kkhyvxa6l17m2nl24454lhfin4"))))
17418 (build-system python-build-system)
17419 (arguments
17420 `(#:tests? #f))
17421 (home-page "https://framagit.org/tyreunom/python-android-strings-lib")
17422 (synopsis "Android strings.xml support")
17423 (description "Android Strings Lib provides support for android's strings.xml
17424files. These files are used to translate strings in android apps.")
17425 (license license:expat)))
87435943 17426
7dec888f
JL
17427(define-public python-watchdog
17428 (package
17429 (name "python-watchdog")
17430 (version "0.9.0")
17431 (source
17432 (origin
17433 (method url-fetch)
17434 (uri (pypi-uri "watchdog" version))
17435 (sha256
17436 (base32
17437 "07cnvvlpif7a6cg4rav39zq8fxa5pfqawchr46433pij0y6napwn"))))
17438 (build-system python-build-system)
17439 (arguments
17440 `(#:phases
17441 (modify-phases %standard-phases
17442 (add-before 'check 'remove-failing
17443 (lambda _
17444 (delete-file "tests/test_inotify_buffer.py")
17445 (delete-file "tests/test_snapshot_diff.py")
17446 #t)))))
17447 (propagated-inputs
17448 `(("python-argh" ,python-argh)
17449 ("python-pathtools" ,python-pathtools)
17450 ("python-pyyaml" ,python-pyyaml)))
17451 (native-inputs
17452 `(("python-pytest-cov" ,python-pytest-cov)
17453 ("python-pytest-timeout" ,python-pytest-timeout)))
17454 (home-page "https://github.com/gorakhargosh/watchdog")
17455 (synopsis "Filesystem events monitoring")
17456 (description "This package provides a way to monitor filesystem events
17457such as a file modification and trigger an action. This is similar to inotify,
17458but portable.")
17459 (license license:asl2.0)))
2cbede59
JL
17460
17461(define-public offlate
17462 (package
17463 (name "offlate")
17464 (version "0.5")
17465 (source
17466 (origin
17467 (method git-fetch)
17468 (uri (git-reference
17469 (url "https://framagit.org/tyreunom/offlate")
17470 (commit version)))
17471 (file-name (git-file-name name version))
17472 (sha256
17473 (base32
17474 "13pqnbl05wcyldfvl75fp89vjgwsvxyc69vhnb17kkha2rc2k1h7"))))
17475 (build-system python-build-system)
17476 (arguments
17477 ;; No tests
17478 `(#:tests? #f))
17479 (propagated-inputs
17480 `(("python-android-stringslib" ,python-android-stringslib)
17481 ("python-dateutil" ,python-dateutil)
17482 ("python-gitlab" ,python-gitlab)
17483 ("python-lxml" ,python-lxml)
17484 ("python-polib" ,python-polib)
17485 ("python-pyenchant" ,python-pyenchant)
17486 ("python-pygit2" ,python-pygit2)
17487 ("python-pygithub" ,python-pygithub)
17488 ("python-pyqt" ,python-pyqt)
17489 ("python-requests" ,python-requests)
17490 ("python-ruamel.yaml" ,python-ruamel.yaml)
17491 ("python-translation-finder" ,python-translation-finder)
17492 ("python-watchdog" ,python-watchdog)))
17493 (native-inputs
17494 `(("qttools" ,qttools)))
17495 (home-page "https://framagit.org/tyreunom/offlate")
17496 (synopsis "Offline translation interface for online translation tools")
17497 (description "Offlate offers a unified interface for different translation
17498file formats, as well as many different online translation platforms. You can
17499use it to get work from online platforms, specialized such as the Translation
17500Project, or not such a gitlab instance when your upstream doesn't use any
17501dedicated platform. The tool proposes a unified interface for any format and
17502an upload option to send your work back to the platform.")
17503 (license license:gpl3+)))
479f4013
JK
17504
17505(define-public python-pypng
17506 (package
17507 (name "python-pypng")
17508 (version "0.0.20")
17509 (source
17510 (origin
17511 (method url-fetch)
17512 (uri (pypi-uri "pypng" version))
17513 (sha256
17514 (base32 "02qpa22ls41vwsrzw9r9qhj1nhq05p03hb5473pay6y980s86chh"))))
17515 (build-system python-build-system)
17516 (home-page "https://github.com/drj11/pypng")
17517 (synopsis "Pure Python PNG image encoder/decoder")
17518 (description
17519 "The PyPNG module implements support for PNG images. It reads and writes
17520PNG files with all allowable bit depths (1/2/4/8/16/24/32/48/64 bits per
17521pixel) and colour combinations: greyscale (1/2/4/8/16 bit); RGB, RGBA,
17522LA (greyscale with alpha) with 8/16 bits per channel; colour mapped
17523images (1/2/4/8 bit). Adam7 interlacing is supported for reading and writing.
17524A number of optional chunks can be specified (when writing) and
17525understood (when reading): tRNS, bKGD, gAMA.
17526
17527PyPNG is not a high level toolkit for image processing (like PIL) and does not
17528aim at being a replacement or competitor. Its strength lies in fine-grained
17529extensive support of PNG features. It can also read and write Netpbm PAM
17530files, with a focus on its use as an intermediate format for implementing
17531custom PNG processing.")
17532 (license license:expat)))