gnu: python-snowballstemmer: Update to 2.0.0.
[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")
dab3c841 328 (version "2.8.0")
44d10b1f
RW
329 (source
330 (origin
331 (method url-fetch)
332 (uri (pypi-uri "Babel" version))
333 (sha256
334 (base32
dab3c841 335 "0f0f2vvs1mpdpz2c0mg1mnc3sih8bizmc1h9m67kdsnqs3i2mb0s"))))
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")
3220e44f 3283 (version "0.29.15")
44d10b1f
RW
3284 (source
3285 (origin
3286 (method url-fetch)
3287 (uri (pypi-uri "Cython" version))
3288 (sha256
6fd27a71 3289 (base32
3220e44f 3290 "0c5cjyxfvba6c0vih1fvhywp8bpz30vwvbjqdm1q1k55xzhmkn30"))))
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))
44d10b1f
RW
3302 (replace 'check
3303 (lambda _
e9194eb0
MB
3304 ;; Disable compiler optimizations to greatly reduce the running
3305 ;; time of the test suite.
3306 (setenv "CFLAGS" "-O0")
3307
3308 (invoke "python" "runtests.py" "-vv"
3309 "-j" (number->string (parallel-job-count))))))))
f319409b 3310 (home-page "https://cython.org/")
44d10b1f
RW
3311 (synopsis "C extensions for Python")
3312 (description "Cython is an optimising static compiler for both the Python
3313programming language and the extended Cython programming language. It makes
3314writing C extensions for Python as easy as Python itself.")
3315 (license license:asl2.0)
3316 (properties `((python2-variant . ,(delay python2-cython))))))
3317
3318(define-public python2-cython
da460865
MB
3319 (let ((base (package-with-python2 (strip-python2-variant python-cython))))
3320 (package
3321 (inherit base)
3322 (name "python2-cython")
3323 (inputs
3324 `(("python-2" ,python-2))) ;this is not automatically changed
3325 (arguments
3326 (substitute-keyword-arguments (package-arguments base)
3327 ((#:phases phases)
3328 `(modify-phases ,phases
3329 (add-before 'check 'adjust-test_embed
3330 (lambda _
3331 (substitute* "runtests.py"
3332 ;; test_embed goes great lengths to find the static libpythonX.Y.a
3333 ;; so it can give the right -L flag to GCC when embedding static
3334 ;; builds of Python. It is unaware that the Python "config"
3335 ;; directory (where the static library lives) was renamed in
3336 ;; Python 3, and falls back to sysconfig.get_config_var('LIBDIR'),
3337 ;; which works fine, because that is where the shared library is.
3338 ;;
3339 ;; It also appears to be unaware that the Makefile in Demos/embed
3340 ;; already unconditionally pass the static library location to GCC,
3341 ;; after checking sysconfig.get_config_var('LIBPL).
3342 ;;
3343 ;; The effect is that the linker is unable to resolve libexpat
3344 ;; symbols when building for Python 2, because neither the Python 2
3345 ;; shared library nor Expat is available. To fix it, we can either
3346 ;; add Expat as an input and make it visible to the linker, or just
3347 ;; prevent it from overriding the Python shared library location.
3348 ;; The end result is identical, so we take the easy route.
3349 ((" or libname not in os\\.listdir\\(libdir\\)")
3350 ""))
3351 #t)))))))))
44d10b1f
RW
3352
3353;; The RPython toolchain currently does not support Python 3.
3354(define-public python2-rpython
3355 (package
3356 (name "python2-rpython")
3357 (version "0.2.1")
3358 (source
3359 (origin
3360 (method url-fetch)
3361 (uri (pypi-uri "rpython" version))
3362 (sha256
3363 (base32
3364 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
3365 (build-system python-build-system)
3366 (arguments `(#:python ,python-2))
3367 (native-inputs
3368 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
3369 (home-page "https://rpython.readthedocs.org")
3370 (synopsis "Framework for implementing interpreters and virtual machines")
3371 (description "RPython is a translation and support framework for
3372producing implementations of dynamic languages, emphasizing a clean separation
3373between language specification and implementation aspects.")
3374 (license license:expat)))
3375
3376;; NOTE: when upgrading numpy please make sure that python-pandas and
3377;; python-scipy still build, as these three packages are often used together.
3378(define-public python-numpy
3379 (package
3380 (name "python-numpy")
8e5fbd5d 3381 (version "1.17.3")
44d10b1f
RW
3382 (source
3383 (origin
3384 (method url-fetch)
3385 (uri (string-append
3386 "https://github.com/numpy/numpy/releases/download/v"
3387 version "/numpy-" version ".tar.gz"))
3388 (sha256
3389 (base32
8e5fbd5d 3390 "1ak9dmjja0q90a7fsxli51ypcwssh8c4pb6f8wkrsnf2xgdk6dy9"))))
44d10b1f
RW
3391 (build-system python-build-system)
3392 (inputs
3393 `(("openblas" ,openblas)
3394 ("lapack" ,lapack)))
3395 (native-inputs
3396 `(("python-cython" ,python-cython)
3397 ("python-pytest" ,python-pytest)
3398 ("gfortran" ,gfortran)))
3399 (arguments
3400 `(#:phases
3401 (modify-phases %standard-phases
3402 (add-before 'build 'configure-blas-lapack
3403 (lambda* (#:key inputs #:allow-other-keys)
3404 (call-with-output-file "site.cfg"
3405 (lambda (port)
3406 (format port
3407 "[openblas]
3408libraries = openblas
3409library_dirs = ~a/lib
3410include_dirs = ~a/include
3411
3412# backslash-n to make emacs happy
3413\n[lapack]
3414lapack_libs = lapack
3415library_dirs = ~a/lib
3416include_dirs = ~a/include
3417"
3418 (assoc-ref inputs "openblas")
3419 (assoc-ref inputs "openblas")
3420 (assoc-ref inputs "lapack")
3421 (assoc-ref inputs "lapack"))))
3422 #t))
3423 (add-before 'build 'fix-executable-paths
3424 (lambda* (#:key inputs #:allow-other-keys)
3425 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
3426 ;; instead of /bin/sh.
3427 (substitute* "numpy/distutils/exec_command.py"
3428 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
3429 (string-append match-start (assoc-ref inputs "bash") match-end)))
3430 ;; Use "gcc" executable, not "cc".
3431 (substitute* "numpy/distutils/system_info.py"
3432 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3433 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
3434 #t))
3435 ;; Tests can only be run after the library has been installed and not
3436 ;; within the source directory.
3437 (delete 'check)
3438 (add-after 'install 'check
3439 (lambda* (#:key outputs inputs #:allow-other-keys)
3440 ;; Make installed package available for running the tests
3441 (add-installed-pythonpath inputs outputs)
3442 ;; Make sure "f2py" etc is found.
3443 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
3444 ":" (getenv "PATH")))
3445 (with-directory-excursion "/tmp"
3446 (invoke "python" "-c"
3447 "import numpy; numpy.test(verbose=2)")))))))
3448 (home-page "http://www.numpy.org/")
3449 (synopsis "Fundamental package for scientific computing with Python")
3450 (description "NumPy is the fundamental package for scientific computing
3451with Python. It contains among other things: a powerful N-dimensional array
3452object, sophisticated (broadcasting) functions, tools for integrating C/C++
3453and Fortran code, useful linear algebra, Fourier transform, and random number
3454capabilities.")
adb396ea 3455 (properties `((python2-variant . ,(delay python2-numpy))))
44d10b1f
RW
3456 (license license:bsd-3)))
3457
adb396ea 3458;; Numpy 1.16.x are the last versions that support Python 2.
44d10b1f 3459(define-public python2-numpy
adb396ea
MB
3460 (let ((numpy (package-with-python2
3461 (strip-python2-variant python-numpy))))
3462 (package/inherit
3463 numpy
3464 (version "1.16.5")
3465 (source (origin
3466 (method url-fetch)
3467 (uri (string-append
3468 "https://github.com/numpy/numpy/releases/download/v"
3469 version "/numpy-" version ".tar.gz"))
3470 (sha256
3471 (base32
3472 "0lg1cycxzi4rvvrd5zxinpdz0ni792fpx6xjd75z1923zcac8qrb")))))))
44d10b1f
RW
3473
3474;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
3475;; interest only for legacy code going back to NumPy's predecessor
3476;; Numeric.
3477(define-public python2-numpy-1.8
3478 (package (inherit python2-numpy)
3479 (version "1.8.2")
3480 (source
3481 (origin
6b61fc47
EF
3482 (method git-fetch)
3483 (uri (git-reference
3484 (url "https://github.com/numpy/numpy")
3485 (commit (string-append "v" version))))
3486 (file-name (git-file-name "numpy" version))
44d10b1f
RW
3487 (sha256
3488 (base32
6b61fc47 3489 "0ikgi15rsqwbkfsjjxrwh40lqyal2wvyp3923y6w6ch3dcr82sfk"))))
44d10b1f
RW
3490 (arguments
3491 (substitute-keyword-arguments (package-arguments python2-numpy)
3492 ((#:phases phases)
3493 `(modify-phases ,phases
3494 (replace 'configure-blas-lapack
3495 (lambda* (#:key inputs #:allow-other-keys)
3496 (call-with-output-file "site.cfg"
3497 (lambda (port)
3498 (format port
3499 "[openblas]
3500libraries = openblas,lapack
3501library_dirs = ~a/lib:~a/lib
3502include_dirs = ~a/include:~a/include
3503"
3504 (assoc-ref inputs "openblas")
3505 (assoc-ref inputs "lapack")
3506 (assoc-ref inputs "openblas")
3507 (assoc-ref inputs "lapack"))))
3508 #t))))))
3509 (native-inputs
3510 `(("python2-nose" ,python2-nose)))
3511 (description "NumPy is the fundamental package for scientific computing
3512with Python. It contains among other things: a powerful N-dimensional array
3513object, sophisticated (broadcasting) functions, tools for integrating C/C++
3514and Fortran code, useful linear algebra, Fourier transform, and random number
3515capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
3516that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
3517Numeric.")
3518 (license license:bsd-3)))
3519
3520(define-public python-munch
3521 (package
3522 (name "python-munch")
3523 (version "2.0.4")
3524 (source
3525 (origin
3526 (method url-fetch)
3527 (uri (pypi-uri "munch" version))
3528 (sha256
3529 (base32
3530 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3531 (build-system python-build-system)
3532 (home-page "https://github.com/Infinidat/munch")
3533 (synopsis "Dot-accessible dictionary")
3534 (description "Munch is a dot-accessible dictionary similar to JavaScript
3535objects.")
3536 (license license:expat)))
3537
3538(define-public python2-munch
3539 (package-with-python2 python-munch))
3540
3541(define-public python-colormath
3542 (package
3543 (name "python-colormath")
3544 (version "3.0.0")
3545 (source
3546 (origin
3547 (method url-fetch)
3548 (uri (pypi-uri "colormath" version))
3549 (sha256
3550 (base32
3551 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
3552 (build-system python-build-system)
3553 (propagated-inputs
3554 `(("python-networkx" ,python-networkx)
3555 ("python-numpy" ,python-numpy)))
3556 (home-page "https://github.com/gtaylor/python-colormath")
3557 (synopsis "Color math and conversion library")
3558 (description
3559 "This is a Python library for color math and conversions.")
3560 (license license:bsd-3)))
3561
3562(define-public python2-colormath
3563 (package-with-python2 python-colormath))
3564
3565(define-public python-spectra
3566 (package
3567 (name "python-spectra")
3568 (version "0.0.11")
3569 (source
3570 (origin
3571 (method url-fetch)
3572 (uri (pypi-uri "spectra" version))
3573 (sha256
3574 (base32
3575 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
3576 (build-system python-build-system)
3577 (arguments
3578 `(#:phases
3579 (modify-phases %standard-phases
3580 (replace 'check
38ec0f6a 3581 (lambda _ (invoke "nosetests" "-v"))))))
44d10b1f
RW
3582 (propagated-inputs
3583 `(("python-colormath" ,python-colormath)))
3584 (native-inputs
3585 `(("python-nose" ,python-nose)))
3586 (home-page "https://github.com/jsvine/spectra")
3587 (synopsis "Color scales and color conversion")
3588 (description
3589 "This package provides a Python library intended to make color math,
3590color scales, and color space conversion easy. It has support for:
3591
3592@enumerate
3593@item Color scales
3594@item Color ranges
3595@item Color blending
3596@item Brightening/darkening colors
3597@item Saturating/desaturating colors
3598@item Conversion to/from multiple color spaces.
3599@end enumerate\n")
3600 (license license:expat)))
3601
3602(define-public python2-spectra
3603 (package-with-python2 python-spectra))
3604
3605(define-public python-numpy-documentation
3606 (package
3607 (name "python-numpy-documentation")
3608 (version (package-version python-numpy))
3609 (source (package-source python-numpy))
3610 (build-system python-build-system)
3611 (native-inputs
3612 `(("python-matplotlib" ,python-matplotlib)
3613 ("python-numpy" ,python-numpy)
3614 ("pkg-config" ,pkg-config)
3615 ("python-sphinx" ,python-sphinx)
3616 ("python-numpydoc" ,python-numpydoc)
f75aa97f 3617 ("texlive" ,(texlive-union (list texlive-fonts-cm-super
44d10b1f
RW
3618 texlive-fonts-ec
3619 texlive-generic-ifxetex
3620 texlive-generic-pdftex
f75aa97f 3621 texlive-amsfonts
44d10b1f
RW
3622 texlive-latex-capt-of
3623 texlive-latex-cmap
3624 texlive-latex-environ
3625 texlive-latex-eqparbox
3626 texlive-latex-etoolbox
3627 texlive-latex-expdlist
3628 texlive-latex-fancyhdr
3629 texlive-latex-fancyvrb
3630 texlive-latex-fncychap
3631 texlive-latex-float
3632 texlive-latex-framed
3633 texlive-latex-geometry
3634 texlive-latex-graphics
3635 texlive-latex-hyperref
3636 texlive-latex-mdwtools
3637 texlive-latex-multirow
3638 texlive-latex-needspace
3639 texlive-latex-oberdiek
3640 texlive-latex-parskip
3641 texlive-latex-preview
3642 texlive-latex-tabulary
3643 texlive-latex-threeparttable
3644 texlive-latex-titlesec
3645 texlive-latex-trimspaces
3646 texlive-latex-ucs
3647 texlive-latex-upquote
3648 texlive-latex-url
3649 texlive-latex-varwidth
3650 texlive-latex-wrapfig)))
3651 ("texinfo" ,texinfo)
3652 ("perl" ,perl)
3653 ("scipy-sphinx-theme"
3654 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
3655 (method git-fetch)
3656 (uri (git-reference
3657 (url "https://github.com/scipy/scipy-sphinx-theme.git")
3658 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
3659 (sha256
3660 (base32
3661 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
3662 ,@(package-native-inputs python-numpy)))
3663 (arguments
3664 `(#:tests? #f ; we're only generating the documentation
3665 #:phases
3666 (modify-phases %standard-phases
3667 (delete 'build)
3668 (replace 'install
3669 (lambda* (#:key inputs outputs #:allow-other-keys)
3670 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3671 (doc (string-append
3672 data "/doc/" ,name "-"
3673 ,(package-version python-numpy)))
3674 (info-reader (string-append data "/info"))
3675 (html (string-append doc "/html"))
3676 (scipy-sphinx-theme "scipy-sphinx-theme")
3677 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
3678 (pyver ,(string-append "PYVER=")))
3679
3680 ;; FIXME: this is needed to for texlive-union to generate
3681 ;; fonts, which are not found.
3682 (setenv "HOME" "/tmp")
3683
3684 (with-directory-excursion "doc"
3685 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
3686 (mkdir-p html)
4fc898da
RW
3687 (invoke "make" "html" pyver)
3688 (invoke "make" "latex" "PAPER=a4" pyver)
3689 (invoke "make" "-C" "build/latex"
44d10b1f
RW
3690 "all-pdf" "PAPER=a4" pyver)
3691 ;; FIXME: Generation of the info file fails.
4fc898da 3692 ;; (invoke "make" "info" pyver)
44d10b1f
RW
3693 ;; (mkdir-p info)
3694 ;; (copy-file "build/texinfo/numpy.info"
3695 ;; (string-append info "/numpy.info"))
3696 (for-each (lambda (file)
3697 (copy-file (string-append "build/latex" file)
3698 (string-append doc file)))
3699 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3700 (with-directory-excursion "build/html"
3701 (for-each (lambda (file)
3702 (let* ((dir (dirname file))
3703 (tgt-dir (string-append html "/" dir)))
3704 (unless (equal? "." dir)
3705 (mkdir-p tgt-dir))
3706 (install-file file html)))
3707 (find-files "." ".*")))))
3708 #t)))))
3709 (home-page (package-home-page python-numpy))
3710 (synopsis "Documentation for the python-numpy package")
3711 (description (package-description python-numpy))
3712 (license (package-license python-numpy))))
3713
3714(define-public python2-numpy-documentation
3715 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
3716 (package
3717 (inherit numpy-documentation)
3718 (native-inputs `(("python2-functools32" ,python2-functools32)
3719 ,@(package-native-inputs numpy-documentation))))))
3720
3721(define-public python-pygit2
3722 (package
3723 (name "python-pygit2")
dac8b275 3724 (version "0.28.2")
44d10b1f
RW
3725 (source
3726 (origin
3727 (method url-fetch)
3728 (uri (pypi-uri "pygit2" version))
3729 (sha256
dac8b275 3730 (base32 "11kzj5mjkspvplnpdb6bj8dcj6rgmkk986k8hjcklyg5yaxkz32d"))))
44d10b1f
RW
3731 (build-system python-build-system)
3732 (arguments
c3ecab0d 3733 '(#:tests? #f)) ; tests don't run correctly in our environment
44d10b1f
RW
3734 (propagated-inputs
3735 `(("python-six" ,python-six)
3736 ("python-cffi" ,python-cffi)
3737 ("libgit2" ,libgit2)
3738 ("python-tox" ,python-tox)))
3739 (native-inputs
3740 `(("python-pytest" ,python-pytest)))
3741 (home-page "https://github.com/libgit2/pygit2")
3742 (synopsis "Python bindings for libgit2")
3743 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3744library, libgit2 implements Git plumbing.")
3745 ;; GPL2.0 only, with linking exception.
3746 (license license:gpl2)))
3747
3748(define-public python2-pygit2
3749 (package-with-python2 python-pygit2))
3750
3751(define-public python-pyparsing
3752 (package
3753 (name "python-pyparsing")
6d3cff5a 3754 (version "2.3.1")
44d10b1f
RW
3755 (source
3756 (origin
3757 (method url-fetch)
3758 (uri (pypi-uri "pyparsing" version))
3759 (sha256
6d3cff5a 3760 (base32 "0yk6xl885b91dmlhlsap7x78hk2rdr879fln9anbq6k4ca42djb6"))))
44d10b1f
RW
3761 (build-system python-build-system)
3762 (outputs '("out" "doc"))
3763 (arguments
3764 `(#:tests? #f ; no test target
3765 #:phases
3766 (modify-phases %standard-phases
3767 (add-after 'install 'install-doc
3768 (lambda* (#:key outputs #:allow-other-keys)
3769 (let* ((doc (string-append (assoc-ref outputs "doc")
3770 "/share/doc/" ,name "-" ,version))
3771 (html-doc (string-append doc "/html"))
3772 (examples (string-append doc "/examples")))
3773 (mkdir-p html-doc)
3774 (mkdir-p examples)
3775 (for-each
3776 (lambda (dir tgt)
3777 (map (lambda (file)
3778 (install-file file tgt))
3779 (find-files dir ".*")))
3780 (list "docs" "htmldoc" "examples")
3781 (list doc html-doc examples))
3782 #t))))))
3783 (home-page "https://github.com/pyparsing/pyparsing")
3784 (synopsis "Python parsing class library")
3785 (description
3786 "The pyparsing module is an alternative approach to creating and
3787executing simple grammars, vs. the traditional lex/yacc approach, or the use
3788of regular expressions. The pyparsing module provides a library of classes
3789that client code uses to construct the grammar directly in Python code.")
3790 (license license:expat)))
3791
3792(define-public python2-pyparsing
3793 (package-with-python2 python-pyparsing))
3794
3795(define-public python-numpydoc
3796 (package
3797 (name "python-numpydoc")
3798 (version "0.8.0")
3799 (source
3800 (origin
3801 (method url-fetch)
3802 (uri (pypi-uri "numpydoc" version))
3803 (sha256
3804 (base32
3805 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
3806 (build-system python-build-system)
3807 (propagated-inputs
3808 `(("python-sphinx" ,python-sphinx)))
3809 (native-inputs
3810 `(("python-nose" ,python-nose)))
3811 (home-page "https://pypi.python.org/pypi/numpydoc")
3812 (synopsis
3813 "Numpy's Sphinx extensions")
3814 (description
3815 "Sphinx extension to support docstrings in Numpy format.")
3816 (license license:bsd-2)))
3817
3818(define-public python2-numpydoc
3819 (package-with-python2 python-numpydoc))
3820
3821(define-public python-numexpr
3822 (package
3823 (name "python-numexpr")
3824 (version "2.6.5")
3825 (source
3826 (origin
3827 (method url-fetch)
3828 (uri (pypi-uri "numexpr" version))
3829 (sha256
3830 (base32
3831 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
3832 (build-system python-build-system)
3833 (arguments `(#:tests? #f)) ; no tests included
3834 (propagated-inputs
3835 `(("python-numpy" ,python-numpy)))
3836 (home-page "https://github.com/pydata/numexpr")
3837 (synopsis "Fast numerical expression evaluator for NumPy")
3838 (description
3839 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3840expressions that operate on arrays are accelerated and use less memory than
3841doing the same calculation in Python. In addition, its multi-threaded
3842capabilities can make use of all your cores, which may accelerate
3843computations, most specially if they are not memory-bounded (e.g. those using
3844transcendental functions).")
3845 (license license:expat)))
3846
3847(define-public python2-numexpr
3848 (package-with-python2 python-numexpr))
3849
3850(define-public python-cycler
3851 (package
3852 (name "python-cycler")
3853 (version "0.10.0")
3854 (source (origin
3855 (method url-fetch)
3856 (uri (pypi-uri "cycler" version))
3857 (sha256
3858 (base32
3859 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
3860 (build-system python-build-system)
3861 (arguments
3862 ;; XXX: The current version requires 'coveralls' which we don't have.
3863 ;; Enable this for the next release which uses 'python-pytest'.
3864 '(#:tests? #f))
3865 (propagated-inputs
3866 `(("python-six" ,python-six)))
3867 (home-page "http://matplotlib.org/cycler/")
3868 (synopsis "Composable keyword argument iterator")
3869 (description
3870 "When using @code{matplotlib} and plotting more than one line, it is
3871common to want to be able to want to be able to cycle over one or more artist
3872styles; but the plotting logic can quickly become involved.
3873To address this and enable easy cycling over arbitrary @code{kwargs}, the
3874@code{Cycler} class was developed.")
3875 (license license:bsd-3)))
3876
3877(define-public python2-cycler
3878 (package-with-python2 python-cycler))
3879
3880(define-public python-colorspacious
3881 (package
3882 (name "python-colorspacious")
53a3ebed 3883 (version "1.1.2")
44d10b1f 3884 (source
dee92e65
TGR
3885 (origin
3886 (method git-fetch)
3887 (uri (git-reference
3888 (url "https://github.com/njsmith/colorspacious.git")
3889 (commit (string-append "v" version))))
3890 (file-name (git-file-name name version))
3891 (sha256
53a3ebed 3892 (base32 "0x7nkphr6g5ql5fvgss8l56rgiyjgh6fm8zzs73i94ci9wzlm63w"))))
44d10b1f
RW
3893 (build-system python-build-system)
3894 (propagated-inputs
3895 `(("python-numpy" ,python-numpy)))
3896 (native-inputs
3897 `(("python-nose" ,python-nose)))
3898 (arguments
3899 `(#:phases
3900 (modify-phases %standard-phases
3901 (replace 'check
3902 (lambda _
c988afda 3903 (invoke "nosetests" "--all-modules" "-v" "colorspacious"))))))
44d10b1f
RW
3904 (home-page "https://github.com/njsmith/colorspacious")
3905 (synopsis "Python library for colorspace conversions")
3906 (description "@code{colorspacious} is a Python library that lets you
3907convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
3908 (license license:expat)))
3909
3910(define-public python2-colorspacious
3911 (package-with-python2 python-colorspacious))
3912
3913(define-public python-matplotlib
3914 (package
3915 (name "python-matplotlib")
9e7cb2f1 3916 (version "3.1.2")
44d10b1f
RW
3917 (source
3918 (origin
3919 (method url-fetch)
3920 (uri (pypi-uri "matplotlib" version))
3921 (sha256
3922 (base32
9e7cb2f1 3923 "1nmshfqh7wyg15i16hx1yiylcvzkws29ivn66n3i0wyqwcpjr3lf"))))
44d10b1f
RW
3924 (build-system python-build-system)
3925 (propagated-inputs ; the following packages are all needed at run time
3926 `(("python-cycler" ,python-cycler)
3927 ("python-kiwisolver" ,python-kiwisolver)
3928 ("python-pyparsing" ,python-pyparsing)
3929 ("python-pygobject" ,python-pygobject)
3930 ("gobject-introspection" ,gobject-introspection)
3931 ("python-tkinter" ,python "tk")
3932 ("python-dateutil" ,python-dateutil)
3933 ("python-numpy" ,python-numpy)
3934 ("python-pillow" ,python-pillow)
3935 ("python-pytz" ,python-pytz)
3936 ("python-six" ,python-six)
44d10b1f
RW
3937 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3938 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3939 ;; object. For this reason we need to import both libraries.
5ea654cf 3940 ;; https://cairocffi.readthedocs.io/en/stable/cffi_api.html#converting-pycairo-wrappers-to-cairocffi
44d10b1f 3941 ("python-pycairo" ,python-pycairo)
44d10b1f
RW
3942 ("python-cairocffi" ,python-cairocffi)))
3943 (inputs
3944 `(("libpng" ,libpng)
3945 ("imagemagick" ,imagemagick)
3946 ("freetype" ,freetype)
3947 ("cairo" ,cairo)
3948 ("glib" ,glib)
3949 ;; FIXME: Add backends when available.
3950 ;("python-wxpython" ,python-wxpython)
3951 ("tcl" ,tcl)
3952 ("tk" ,tk)))
3953 (native-inputs
3954 `(("pkg-config" ,pkg-config)
5ea654cf
RW
3955 ("python-pytest" ,python-pytest)
3956 ("python-mock" ,python-mock)
3957 ("unzip" ,unzip)
3958 ("jquery-ui"
3959 ,(origin
3960 (method url-fetch)
3961 (uri "https://jqueryui.com/resources/download/jquery-ui-1.12.1.zip")
3962 (sha256
3963 (base32
3964 "0kb21xf38diqgxcdi1z3s9ssq36pldvyqxy56hn6pcva6rs3c8zq"))))))
44d10b1f
RW
3965 (arguments
3966 `(#:phases
3967 (modify-phases %standard-phases
5ea654cf
RW
3968 ;; XXX We disable all image comparison tests because we're using a
3969 ;; newer version of FreeType than matplotlib expects. This leads to
3970 ;; minor differences throughout the tests.
3971 (add-after 'unpack 'fix-and-disable-failing-tests
3972 (lambda _
3973 (substitute* (append (find-files "lib/matplotlib/tests/"
3974 "test_.*\\.py$")
3975 (find-files "lib/mpl_toolkits/tests"
3976 "test_.*\\.py$"))
3977 (("^from matplotlib" match)
3978 (string-append "import pytest\n" match))
3979 (("( *)@image_comparison" match indent)
3980 (string-append indent
3981 "@pytest.mark.skip(reason=\"unknown minor image differences\")\n"
3982 match)))
3983 (substitute* "lib/matplotlib/tests/test_animation.py"
3984 (("/bin/sh") (which "sh")))
3985 (for-each delete-file
3986 ;; test_normal_axes, test_get_tightbbox_polar
3987 '("lib/matplotlib/tests/test_axes.py"
9e7cb2f1
RW
3988 ;; We don't use the webagg backend and this test forces it.
3989 "lib/matplotlib/tests/test_backend_webagg.py"
5ea654cf
RW
3990 ;; test_outward_ticks
3991 "lib/matplotlib/tests/test_tightlayout.py"
9e7cb2f1
RW
3992 ;; test_hidden_axes fails with minor extent
3993 ;; differences, possibly due to the use of a
3994 ;; different version of FreeType.
3995 "lib/matplotlib/tests/test_constrainedlayout.py"
5ea654cf
RW
3996 ;; Fontconfig returns no fonts.
3997 "lib/matplotlib/tests/test_font_manager.py"))
3998 #t))
3999 (add-before 'install 'install-jquery-ui
4000 (lambda* (#:key outputs inputs #:allow-other-keys)
4001 (let ((dir (string-append (assoc-ref outputs "out")
4002 "/lib/python3.7/site-packages/matplotlib/backends/web_backend/")))
4003 (mkdir-p dir)
4004 (invoke "unzip"
4005 (assoc-ref inputs "jquery-ui")
4006 "-d" dir))
4007 #t))
c09f598d 4008 (replace 'check
5ea654cf
RW
4009 (lambda* (#:key outputs inputs #:allow-other-keys)
4010 (add-installed-pythonpath inputs outputs)
4011 (invoke "python" "tests.py" "-v"
9e7cb2f1 4012 "-m" "not network and not webagg")))
44d10b1f
RW
4013 (add-before 'build 'configure-environment
4014 (lambda* (#:key outputs inputs #:allow-other-keys)
34c2a16b
RW
4015 (let ((cairo (assoc-ref inputs "cairo")))
4016 ;; Setting this directory in the 'basedirlist' of 'setup.cfg'
44d10b1f 4017 ;; has not effect.
34c2a16b 4018 (setenv "LD_LIBRARY_PATH" (string-append cairo "/lib"))
44d10b1f
RW
4019 (setenv "HOME" (getcwd))
4020 (call-with-output-file "setup.cfg"
4021 (lambda (port)
4022 (format port "[directories]~%
4023basedirlist = ~a,~a~%
5ea654cf
RW
4024[packages]~%
4025tests = True~%"
44d10b1f
RW
4026 (assoc-ref inputs "tcl")
4027 (assoc-ref inputs "tk")))))
4028 #t)))))
339b5828 4029 (home-page "https://matplotlib.org/")
44d10b1f
RW
4030 (synopsis "2D plotting library for Python")
4031 (description
4032 "Matplotlib is a Python 2D plotting library which produces publication
4033quality figures in a variety of hardcopy formats and interactive environments
4034across platforms. Matplotlib can be used in Python scripts, the python and
4035ipython shell, web application servers, and six graphical user interface
4036toolkits.")
4037 (license license:psfl)
4038 (properties `((python2-variant . ,(delay python2-matplotlib))))))
4039
4040(define-public python2-matplotlib
4041 (let ((matplotlib (package-with-python2
4042 (strip-python2-variant python-matplotlib))))
4043 (package (inherit matplotlib)
7380df73 4044 (version "2.2.4")
5ea654cf
RW
4045 (source
4046 (origin
4047 (method url-fetch)
4048 (uri (pypi-uri "matplotlib" version))
4049 (sha256
4050 (base32
7380df73 4051 "09i1gnrra1590brc1f8d5rh2zvnknmfgzp613ab0462qkrwj15h2"))))
5d484f42
EF
4052 (arguments
4053 (substitute-keyword-arguments (package-arguments matplotlib)
4054 ((#:phases phases)
4055 `(modify-phases ,phases
66a3c2db
EF
4056 (replace 'install-jquery-ui
4057 (lambda* (#:key outputs inputs #:allow-other-keys)
4058 (let ((dir (string-append (assoc-ref outputs "out")
4059 "/lib/python2.7/site-packages/"
4060 "matplotlib/backends/web_backend/")))
4061 (mkdir-p dir)
4062 (invoke "unzip"
4063 (assoc-ref inputs "jquery-ui")
4064 "-d" dir))
4065 #t))
38a404d5 4066 (delete 'fix-and-disable-failing-tests)
5d484f42 4067 (delete 'check))))) ; These tests weren't run the the past.
44d10b1f
RW
4068 ;; Make sure to use special packages for Python 2 instead
4069 ;; of those automatically rewritten by package-with-python2.
4070 (propagated-inputs
4071 `(("python2-pycairo" ,python2-pycairo)
4072 ("python2-backports-functools-lru-cache"
4073 ,python2-backports-functools-lru-cache)
4074 ("python2-functools32" ,python2-functools32)
4075 ("python2-pygobject-2" ,python2-pygobject-2)
4076 ("python2-subprocess32" ,python2-subprocess32)
4077 ("python2-tkinter" ,python-2 "tk")
4078 ,@(fold alist-delete (package-propagated-inputs matplotlib)
4079 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
4080
4081(define-public python-matplotlib-documentation
4082 (package
4083 (name "python-matplotlib-documentation")
4084 (version (package-version python-matplotlib))
4085 (source (package-source python-matplotlib))
4086 (build-system python-build-system)
4087 (native-inputs
4088 `(("python-matplotlib" ,python-matplotlib)
4089 ("python-colorspacious" ,python-colorspacious)
4090 ("python-sphinx" ,python-sphinx)
5ad0a452 4091 ("python-sphinx-copybutton" ,python-sphinx-copybutton)
44d10b1f
RW
4092 ("python-sphinx-gallery" ,python-sphinx-gallery)
4093 ("python-numpydoc" ,python-numpydoc)
4094 ("python-ipython" ,python-ipython)
e7a53914 4095 ("python-ipykernel" ,python-ipykernel)
44d10b1f
RW
4096 ("python-mock" ,python-mock)
4097 ("graphviz" ,graphviz)
f75aa97f 4098 ("texlive" ,(texlive-union (list texlive-amsfonts
e7a53914
RW
4099 texlive-latex-amsmath
4100 texlive-latex-enumitem
4101 texlive-latex-expdlist
4102 texlive-latex-geometry
4103 texlive-latex-preview
4104 texlive-latex-type1cm
4105 texlive-latex-ucs
4106
4107 texlive-generic-pdftex
4108
e7a53914
RW
4109 texlive-fonts-ec
4110 texlive-fonts-adobe-times
4111 texlive-fonts-txfonts)))
44d10b1f
RW
4112 ("texinfo" ,texinfo)
4113 ,@(package-native-inputs python-matplotlib)))
4114 (arguments
4115 `(#:tests? #f ; we're only generating documentation
4116 #:phases
4117 (modify-phases %standard-phases
5ea654cf
RW
4118 ;; The tests in python-matplotlib are run after the install phase, so
4119 ;; we need to delete the extra phase here.
4120 (delete 'check)
44d10b1f
RW
4121 (replace 'build
4122 (lambda _
4123 (chdir "doc")
e7a53914
RW
4124 (setenv "PYTHONPATH"
4125 (string-append (getenv "PYTHONPATH")
4126 ":" (getcwd) "/../examples/units"))
44d10b1f 4127 (substitute* "conf.py"
e7a53914
RW
4128 ;; Don't use git.
4129 (("^SHA = check_output.*")
4130 (string-append "SHA = \"" ,version "\"\n"))
4131 ;; Don't fetch intersphinx files from the Internet
4132 (("^explicit_order_folders" m)
4133 (string-append "intersphinx_mapping = {}\n" m))
4134 (("'sphinx.ext.intersphinx',") "")
4135 ;; Disable URL embedding which requires internet access.
4136 (("'https://docs.scipy.org/doc/numpy'") "None")
4137 (("'https://docs.scipy.org/doc/scipy/reference'") "None"))
4138 (invoke "make"
4139 "SPHINXBUILD=sphinx-build"
4140 "SPHINXOPTS=" ; don't abort on warnings
4141 "html" "texinfo")))
44d10b1f
RW
4142 (replace 'install
4143 (lambda* (#:key inputs outputs #:allow-other-keys)
4144 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
4145 (doc (string-append data "/doc/python-matplotlib-" ,version))
4146 (info (string-append data "/info"))
4147 (html (string-append doc "/html")))
4148 (mkdir-p html)
4149 (mkdir-p info)
4150 (copy-recursively "build/html" html)
4151 (symlink (string-append html "/_images")
4152 (string-append info "/matplotlib-figures"))
4153 (with-directory-excursion "build/texinfo"
4154 (substitute* "matplotlib.texi"
4155 (("@image\\{([^,]*)" all file)
4156 (string-append "@image{matplotlib-figures/" file)))
4157 (symlink (string-append html "/_images")
4158 "./matplotlib-figures")
e7a53914
RW
4159 (invoke "makeinfo" "--no-split"
4160 "-o" "matplotlib.info" "matplotlib.texi"))
4161 (install-file "build/texinfo/matplotlib.info" info))
44d10b1f
RW
4162 #t)))))
4163 (home-page (package-home-page python-matplotlib))
4164 (synopsis "Documentation for the python-matplotlib package")
4165 (description (package-description python-matplotlib))
4166 (license (package-license python-matplotlib))))
4167
4168(define-public python2-matplotlib-documentation
5ad0a452
RW
4169 (let ((parent (package-with-python2 python-matplotlib-documentation)))
4170 (package
4171 (inherit parent)
4172 (native-inputs
4173 (alist-delete "python-sphinx-copybutton"
4174 (package-native-inputs parent))))))
44d10b1f 4175
55dae98f
RW
4176(define-public python-matplotlib-venn
4177 (package
4178 (name "python-matplotlib-venn")
4179 (version "0.11.5")
4180 (source
4181 (origin
4182 (method url-fetch)
4183 (uri (pypi-uri "matplotlib-venn" version ".zip"))
4184 (sha256
4185 (base32
4186 "13w3i1wih0mij08hrgppzg0g9z50y54rc28l6gdi1r5w45l7l0dy"))))
4187 (build-system python-build-system)
4188 (arguments '(#:tests? #f)) ; tests are not included
4189 (propagated-inputs
4190 `(("python-matplotlib" ,python-matplotlib)
4191 ("python-numpy" ,python-numpy)
4192 ("python-scipy" ,python-scipy)))
4193 (native-inputs
4194 `(("unzip" ,unzip)))
4195 (home-page "https://github.com/konstantint/matplotlib-venn")
4196 (synopsis "Plot area-proportional Venn diagrams")
4197 (description
4198 "This package provides tools for plotting area-proportional two- and
4199three-way Venn diagrams in @code{matplotlib}.")
4200 (license license:expat)))
4201
44d10b1f
RW
4202(define-public python2-pysnptools
4203 (package
4204 (name "python2-pysnptools")
5d1ade85 4205 (version "0.3.13")
44d10b1f
RW
4206 (source
4207 (origin
4208 (method url-fetch)
5d1ade85 4209 (uri (pypi-uri "pysnptools" version))
44d10b1f
RW
4210 (sha256
4211 (base32
5d1ade85 4212 "0lnis5xsl7bi0hz4f7gbicahzi5zlxkc21nk3g374xv8fb5hb3qm"))))
44d10b1f
RW
4213 (build-system python-build-system)
4214 (arguments
5d1ade85
RW
4215 `(#:python ,python-2 ; only Python 2.7 is supported
4216 #:tests? #f)) ; test files (e.g. examples/toydata.bim) not included
44d10b1f
RW
4217 (propagated-inputs
4218 `(("python2-numpy" ,python2-numpy)
4219 ("python2-scipy" ,python2-scipy)
4220 ("python2-pandas" ,python2-pandas)))
44d10b1f 4221 (native-inputs
5d1ade85 4222 `(("python2-cython" ,python2-cython)))
1b66989b 4223 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
44d10b1f
RW
4224 (synopsis "Library for reading and manipulating genetic data")
4225 (description
4226 "PySnpTools is a library for reading and manipulating genetic data. It
4227can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
4228those files. It can also efficiently manipulate ranges of integers using set
4229operators such as union, intersection, and difference.")
4230 (license license:asl2.0)))
4231
44d10b1f
RW
4232(define-public python-socksipy-branch
4233 (package
4234 (name "python-socksipy-branch")
4235 (version "1.01")
4236 (source
4237 (origin
4238 (method url-fetch)
4239 (uri (pypi-uri "SocksiPy-branch" version))
4240 (sha256
4241 (base32
4242 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
4243 (build-system python-build-system)
4244 (arguments
4245 `(#:tests? #f)) ; There are no tests
4246 (home-page "https://code.google.com/archive/p/socksipy-branch/")
4247 (synopsis "Python SOCKS module")
4248 (description
4249 "SocksiPy - A Python SOCKS client module. It provides a
4250socket-like interface that supports connections to any TCP
4251service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
4252The original version was developed by Dan Haim, this is a
4253branch created by Mario Vilas to address some open issues,
4254as the original project seems to have been abandoned circa 2007.")
4255 (license license:bsd-3)))
4256
4257(define-public python2-socksipy-branch
4258 (package-with-python2 python-socksipy-branch))
4259
6fcceb23
AG
4260(define-public python-socksipychain
4261 (package
4262 (name "python-socksipychain")
d97cdff1 4263 (version "2.1.0")
6fcceb23
AG
4264 (source
4265 (origin
4266 (method git-fetch)
4267 (uri (git-reference
4268 (url "https://github.com/pagekite/PySocksipyChain.git")
4269 (commit (string-append "v" version))))
4270 (file-name (git-file-name name version))
4271 (sha256
4272 (base32
d97cdff1 4273 "0idm9a050rd2kbgbz2sk9ib9589kj4xh1xdnggs6xbq2v2y8f6zn"))))
6fcceb23
AG
4274 (build-system python-build-system)
4275 (arguments
4276 `(#:tests? #f)) ; Tests try to access the network.
4277 (home-page "http://pagekite.net/wiki/Floss/PySocksipyChain/")
4278 (synopsis "Python SOCKS module with chained proxies support")
4279 (description
4280 "SocksiPyChain is a modified version of the SocksiPy SOCKS module, which
4281adds support for arbitrary chaining of proxy servers and various modes of
4282TLS/SSL encryption. It was developed for use in PageKite, and also includes
4283a simple netcat replacement with chaining support.")
4284 (license license:bsd-3)))
4285
44d10b1f
RW
4286(define-public python-pycodestyle
4287 (package
4288 (name "python-pycodestyle")
d16ef28b 4289 (version "2.5.0")
44d10b1f 4290 (source
ba88eea2
RW
4291 (origin
4292 (method url-fetch)
4293 (uri (pypi-uri "pycodestyle" version))
4294 (sha256
4295 (base32
d16ef28b 4296 "0v4prb05n21bm8650v0a01k1nyqjdmkrsm3zycfxh2j5k9n962p4"))))
44d10b1f
RW
4297 (build-system python-build-system)
4298 (home-page "https://pycodestyle.readthedocs.io/")
4299 (synopsis "Python style guide checker")
4300 (description "@code{pycodestyle} (formerly pep8) is a tool to check
4301Python code against some of the style conventions in
4302@url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
4303 (license license:expat)))
4304
4305(define-public python2-pycodestyle
4306 (package-with-python2 python-pycodestyle))
4307
4308(define-public python-multidict
4309 (package
4310 (name "python-multidict")
4311 (version "4.2.0")
4312 (source
4313 (origin
4314 (method url-fetch)
4315 (uri (pypi-uri "multidict" version))
4316 (sha256
4317 (base32
4318 "1vf5bq8hn5a9rvhr5v4fwbmarfsp35hhr8gs74kqfijy34j2f194"))))
4319 (build-system python-build-system)
4320 (native-inputs
4321 `(("python-pytest" ,python-pytest)
4322 ("python-pytest-runner" ,python-pytest-runner)))
4323 (home-page "https://github.com/aio-libs/multidict/")
4324 (synopsis "Multidict implementation")
4325 (description "Multidict is dict-like collection of key-value pairs
4326where key might be occurred more than once in the container.")
4327 (license license:asl2.0)))
4328
4329(define-public python-orderedmultidict
4330 (package
4331 (name "python-orderedmultidict")
4332 (version "0.7.11")
4333 (source
4334 (origin
4335 (method url-fetch)
4336 (uri (pypi-uri "orderedmultidict" version))
4337 (sha256
4338 (base32
4339 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
4340 (build-system python-build-system)
4341 (arguments
4342 `(#:phases
4343 (modify-phases %standard-phases
4344 (add-after 'unpack 'fix-tests
4345 (lambda _
4346 ;; The package uses nosetest for running the tests.
4347 ;; Adding this initfile allows to run the test suite
4348 ;; without requiring nosetest.
d1c4f329
RW
4349 (with-output-to-file "tests/__init__.py" newline)
4350 #t)))))
44d10b1f
RW
4351 (propagated-inputs
4352 `(("python-six" ,python-six)))
4353 (native-inputs
4354 `(("python-pycodestyle" ,python-pycodestyle)))
4355 (home-page "https://github.com/gruns/orderedmultidict")
4356 (synopsis "Python Ordered Multivalue Dictionary - omdict")
4357 (description "This package contains a library for ordered multivalue
4358dictionaries. A multivalue dictionary is a dictionary that can store
4359multiple values for the same key. An ordered multivalue dictionary is a
4360multivalue dictionary that retains the order of insertions and deletions.")
4361 (license license:unlicense)))
4362
4363(define-public python2-orderedmultidict
4364 (package-with-python2 python-orderedmultidict))
4365
4366(define-public python-autopep8
4367 (package
4368 (name "python-autopep8")
4369 (version "1.3.5")
4370 (source
4371 (origin
4372 (method url-fetch)
4373 (uri (pypi-uri "autopep8" version))
4374 (sha256
4375 (base32
4376 "192bvhzi4d0claqxgzymvv7k3qnj627742bc8sgxpzjj42pd9112"))))
4377 (build-system python-build-system)
4378 (propagated-inputs
4379 `(("python-pycodestyle" ,python-pycodestyle)))
4380 (home-page "https://github.com/hhatto/autopep8")
4381 (synopsis "Format Python code according to the PEP 8 style guide")
4382 (description
4383 "@code{autopep8} automatically formats Python code to conform to
4384the PEP 8 style guide. It uses the pycodestyle utility to determine
4385what parts of the code needs to be formatted. @code{autopep8} is
4386capable of fixing most of the formatting issues that can be reported
4387by pycodestyle.")
4388 (license (license:non-copyleft
4389 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
4390
4391(define-public python2-autopep8
4392 (package-with-python2 python-autopep8))
4393
4394(define-public python-distutils-extra
4395 (package
4396 (name "python-distutils-extra")
4397 (version "2.38")
4398 (source
4399 (origin
4400 (method url-fetch)
4401 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4402 version "/+download/python-distutils-extra-"
4403 version ".tar.gz"))
4404 (sha256
4405 (base32
4406 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4407 (build-system python-build-system)
4408 (home-page "https://launchpad.net/python-distutils-extra/")
4409 (synopsis "Enhancements to Python's distutils")
4410 (description
4411 "The python-distutils-extra module enables you to easily integrate
4412gettext support, themed icons, and scrollkeeper-based documentation into
4413Python's distutils.")
4414 (license license:gpl2)))
4415
4416(define-public python2-distutils-extra
4417 (package-with-python2 python-distutils-extra))
4418
4419(define-public python2-elib.intl
4420 (package
4421 (name "python2-elib.intl")
4422 (version "0.0.3")
4423 (source
4424 (origin
4425 ;; This project doesn't tag releases or publish tarballs, so we take
4426 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4427 (method git-fetch)
4428 (uri (git-reference
4429 (url "https://github.com/dieterv/elib.intl.git")
4430 (commit "d09997cfef")))
4431 (file-name (string-append name "-" version "-checkout"))
4432 (sha256
4433 (base32
4434 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4435 (build-system python-build-system)
4436 (arguments
4437 ;; incompatible with Python 3 (exception syntax)
4438 `(#:python ,python-2
4439 #:tests? #f))
4440 (home-page "https://github.com/dieterv/elib.intl")
4441 (synopsis "Enhanced internationalization for Python")
4442 (description
4443 "The elib.intl module provides enhanced internationalization (I18N)
4444services for your Python modules and applications.")
4445 (license license:lgpl3+)))
4446
4447(define-public python-olefile
4448 (package
4449 (name "python-olefile")
5bef0f10 4450 (version "0.46")
44d10b1f
RW
4451 (source
4452 (origin
4453 (method url-fetch)
5bef0f10
MB
4454 (uri (string-append "https://github.com/decalage2/olefile/releases/"
4455 "download/v" version "/olefile-" version ".tar.gz"))
44d10b1f
RW
4456 (file-name (string-append name "-" version ".tar.gz"))
4457 (sha256
4458 (base32
5bef0f10 4459 "1kjxh4gr651hpqkjfv89cfzr40hyvf3vjlda7mifiail83j7j07m"))))
44d10b1f 4460 (build-system python-build-system)
5bef0f10 4461 (home-page "https://www.decalage.info/python/olefileio")
44d10b1f
RW
4462 (synopsis "Read and write Microsoft OLE2 files.")
4463 (description
4464 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
4465Storage or Compound Document, Microsoft Office). It is an improved version of
4466the OleFileIO module from PIL, the Python Image Library.")
4467 (license license:bsd-3)))
4468
4469(define-public python2-olefile
4470 (package-with-python2 python-olefile))
4471
4472(define-public python-pillow
4473 (package
4474 (name "python-pillow")
5fbdd917 4475 (version "6.2.1")
44d10b1f
RW
4476 (source
4477 (origin
4478 (method url-fetch)
4479 (uri (pypi-uri "Pillow" version))
4480 (sha256
4481 (base32
5fbdd917 4482 "1c8wkzc58f5wdh006jvmwdk3wxld1xgagcbdvj7iv17qi0m9fkmz"))))
44d10b1f
RW
4483 (build-system python-build-system)
4484 (native-inputs
4485 `(("python-pytest" ,python-pytest)))
4486 (inputs
4487 `(("freetype" ,freetype)
4488 ("lcms" ,lcms)
44d10b1f 4489 ("libjpeg" ,libjpeg)
44d10b1f 4490 ("libtiff" ,libtiff)
0c4e1c5f
EF
4491 ("libwebp" ,libwebp)
4492 ("openjpeg" ,openjpeg)
4493 ("zlib" ,zlib)))
44d10b1f
RW
4494 (propagated-inputs
4495 `(("python-olefile" ,python-olefile)))
4496 (arguments
4497 `(#:phases
4498 (modify-phases %standard-phases
4499 (add-after 'unpack 'patch-ldconfig
4500 (lambda _
4501 (substitute* "setup.py"
4502 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
61b77ff3 4503 (replace 'check
979d8464
EF
4504 (lambda* (#:key outputs inputs tests? #:allow-other-keys)
4505 (if tests?
4506 (begin
4507 (setenv "HOME" (getcwd))
4508 ;; Make installed package available for running the tests.
4509 (add-installed-pythonpath inputs outputs)
4510 (invoke "python" "selftest.py" "--installed")
4511 (invoke "python" "-m" "pytest" "-vv"))
4512 #t))))))
44d10b1f
RW
4513 (home-page "https://python-pillow.org")
4514 (synopsis "Fork of the Python Imaging Library")
4515 (description
4516 "The Python Imaging Library adds image processing capabilities to your
4517Python interpreter. This library provides extensive file format support, an
4518efficient internal representation, and fairly powerful image processing
4519capabilities. The core image library is designed for fast access to data
4520stored in a few basic pixel formats. It should provide a solid foundation for
4521a general image processing tool.")
4522 (license (license:x11-style
4523 "http://www.pythonware.com/products/pil/license.htm"
4524 "The PIL Software License"))))
4525
4526(define-public python2-pillow
4527 (package-with-python2 python-pillow))
4528
4529(define-public python-pycparser
4530 (package
4531 (name "python-pycparser")
c6c0940e 4532 (version "2.19")
44d10b1f
RW
4533 (source
4534 (origin
4535 (method url-fetch)
4536 (uri (pypi-uri "pycparser" version))
4537 (sha256
4538 (base32
c6c0940e 4539 "1cr5dcj9628lkz1qlwq3fv97c25363qppkmcayqvd05dpy573259"))))
44d10b1f
RW
4540 (outputs '("out" "doc"))
4541 (build-system python-build-system)
4542 (native-inputs
4543 `(("pkg-config" ,pkg-config)))
4544 (arguments
4545 `(#:phases
4546 (modify-phases %standard-phases
4547 (replace 'check
4548 (lambda _
4549 (with-directory-excursion "tests"
acb75c03
RW
4550 (invoke "python" "all_tests.py"))
4551 #t))
44d10b1f
RW
4552 (add-after 'install 'install-doc
4553 (lambda* (#:key outputs #:allow-other-keys)
4554 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4555 (doc (string-append data "/doc/" ,name "-" ,version))
4556 (examples (string-append doc "/examples")))
4557 (mkdir-p examples)
4558 (for-each (lambda (file)
4559 (copy-file (string-append "." file)
4560 (string-append doc file)))
4561 '("/README.rst" "/CHANGES" "/LICENSE"))
c6c0940e
MB
4562 (copy-recursively "examples" examples)
4563 #t))))))
44d10b1f
RW
4564 (home-page "https://github.com/eliben/pycparser")
4565 (synopsis "C parser in Python")
4566 (description
4567 "Pycparser is a complete parser of the C language, written in pure Python
4568using the PLY parsing library. It parses C code into an AST and can serve as
4569a front-end for C compilers or analysis tools.")
4570 (license license:bsd-3)))
4571
4572(define-public python2-pycparser
4573 (package-with-python2 python-pycparser))
4574
4575(define-public python-pywavelets
4576 (package
4577 (name "python-pywavelets")
4578 (version "1.0.1")
4579 (home-page "https://github.com/PyWavelets/pywt")
4580 (source (origin
4581 (method url-fetch)
4582 (uri (pypi-uri "PyWavelets" version))
4583 (sha256
4584 (base32
4585 "1p3qv2v66ghnqrb1f98wyyhp9dz71jwcd6kfpsax65sfdpiyqp1w"))))
4586 (build-system python-build-system)
4587 (arguments
4588 '(#:modules ((ice-9 ftw)
4589 (srfi srfi-1)
4590 (srfi srfi-26)
4591 (guix build utils)
4592 (guix build python-build-system))
4593 #:phases (modify-phases %standard-phases
4594 (replace 'check
4595 (lambda _
4596 (let ((cwd (getcwd))
4597 (libdir (find (cut string-prefix? "lib." <>)
4598 (scandir "build"))))
4599 (with-directory-excursion (string-append cwd "/build/" libdir)
4600 (invoke "nosetests" "-v" "."))))))))
4601 (native-inputs
4602 `(("python-matplotlib" ,python-matplotlib) ;for tests
4603 ("python-nose" ,python-nose)))
4604 (propagated-inputs
4605 `(("python-numpy" ,python-numpy)))
4606 (synopsis "Wavelet transforms in Python")
4607 (description
4608 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
4609mathematical basis functions that are localized in both time and frequency.
4610Wavelet transforms are time-frequency transforms employing wavelets. They are
4611similar to Fourier transforms, the difference being that Fourier transforms are
4612localized only in frequency instead of in time and frequency.")
4613 (license license:expat)))
4614
4615(define-public python2-pywavelets
4616 (package-with-python2 python-pywavelets))
4617
4618(define-public python-xcffib
4619 (package
4620 (name "python-xcffib")
4621 (version "0.6.0")
4622 (source
4623 (origin
4624 (method url-fetch)
4625 (uri (pypi-uri "xcffib" version))
4626 (sha256
4627 (base32
4628 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
4629 (build-system python-build-system)
4630 (inputs
4631 `(("libxcb" ,libxcb)))
4632 (propagated-inputs
4633 `(("python-cffi" ,python-cffi) ; used at run time
4634 ("python-six" ,python-six)))
4635 (arguments
4636 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
4637 #:tests? #f
4638 #:phases
4639 (modify-phases %standard-phases
4640 (add-after 'unpack 'fix-libxcb-path
4641 (lambda* (#:key inputs #:allow-other-keys)
4642 (let ((libxcb (assoc-ref inputs "libxcb")))
4643 (substitute* '("xcffib/__init__.py")
4644 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
4645 #t)))
4646 (add-after 'install 'install-doc
4647 (lambda* (#:key outputs #:allow-other-keys)
4648 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4649 "/doc/" ,name "-" ,version)))
4650 (mkdir-p doc)
4651 (copy-file "README.md"
4652 (string-append doc "/README.md"))
4653 #t))))))
4654 (home-page "https://github.com/tych0/xcffib")
4655 (synopsis "XCB Python bindings")
4656 (description
4657 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4658support for Python 3 and PyPy. It is based on cffi.")
4659 (license license:expat)))
4660
4661(define-public python2-xcffib
4662 (package-with-python2 python-xcffib))
4663
4664(define-public python-cairocffi
4665 (package
4666 (name "python-cairocffi")
4667 (version "0.9.0")
4668 (source
4669 (origin
4670 (method url-fetch)
4671 (uri (pypi-uri "cairocffi" version))
4672 (sha256
4673 (base32
4674 "0dq3k4zhqd8cwsf3nyjqvjqm8wkvrjn1wjf44rl3v0h8kqx6qf0m"))
4675 (patches (search-patches "python-cairocffi-dlopen-path.patch"))))
4676 (build-system python-build-system)
4677 (outputs '("out" "doc"))
4678 (inputs
4679 `(("glib" ,glib)
4680 ("gtk+" ,gtk+)
4681 ("gdk-pixbuf" ,gdk-pixbuf)
4682 ("cairo" ,cairo)
4683 ("pango" ,pango)))
4684 (native-inputs
4685 `(("pkg-config" ,pkg-config)
4686 ("python-pytest" ,python-pytest)
4687 ("python-pytest-cov" ,python-pytest-cov)
4688 ("python-pytest-runner" ,python-pytest-runner)
4689 ("python-sphinx" ,python-sphinx)
4690 ("python-docutils" ,python-docutils)))
4691 (propagated-inputs
4692 `(("python-xcffib" ,python-xcffib))) ; used at run time
4693 (arguments
4694 `(#:phases
4695 (modify-phases %standard-phases
4696 (add-after 'unpack 'patch-paths
4697 (lambda* (#:key inputs outputs #:allow-other-keys)
4698 (substitute* (find-files "." "\\.py$")
4699 (("dlopen\\(ffi, 'cairo'")
4700 (string-append "dlopen(ffi, '" (assoc-ref inputs "cairo")
4701 "/lib/libcairo.so.2'"))
4702 (("dlopen\\(ffi, 'gdk-3'")
4703 (string-append "dlopen(ffi, '" (assoc-ref inputs "gtk+")
4704 "/lib/libgtk-3.so.0'"))
4705 (("dlopen\\(ffi, 'gdk_pixbuf-2.0'")
4706 (string-append "dlopen(ffi, '" (assoc-ref inputs "gdk-pixbuf")
4707 "/lib/libgdk_pixbuf-2.0.so.0'"))
4708 (("dlopen\\(ffi, 'glib-2.0'")
4709 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4710 "/lib/libglib-2.0.so.0'"))
4711 (("dlopen\\(ffi, 'gobject-2.0'")
4712 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4713 "/lib/libgobject-2.0.so.0'"))
4714 (("dlopen\\(ffi, 'pangocairo-1.0'")
4715 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4716 "/lib/libpangocairo-1.0.so.0'"))
4717 (("dlopen\\(ffi, 'pango-1.0'")
4718 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4719 "/lib/libpango-1.0.so.0'")))
4720 #t))
4721 (add-after 'install 'install-doc
4722 (lambda* (#:key inputs outputs #:allow-other-keys)
4723 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4724 (doc (string-append data "/doc/" ,name "-" ,version))
4725 (html (string-append doc "/html")))
4726 (setenv "LD_LIBRARY_PATH"
4727 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4728 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4729 (setenv "LANG" "en_US.UTF-8")
4730 (mkdir-p html)
4731 (for-each (lambda (file)
4732 (copy-file (string-append "." file)
4733 (string-append doc file)))
4734 '("/README.rst" "/CHANGES" "/LICENSE"))
4735 (system* "python" "setup.py" "build_sphinx")
4736 (copy-recursively "docs/_build/html" html)
4737 #t))))))
4738 (home-page "https://github.com/Kozea/cairocffi")
4739 (synopsis "Python bindings and object-oriented API for Cairo")
4740 (description
4741 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4742Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4743graphics library with support for multiple backends including image buffers,
4744PNG, PostScript, PDF, and SVG file output.")
4745 (license license:bsd-3)))
4746
4747(define-public python2-cairocffi
4748 (package-with-python2 python-cairocffi))
4749
4750(define-public python-decorator
4751 (package
4752 (name "python-decorator")
4753 (version "4.3.0")
4754 (source
4755 (origin
4756 (method url-fetch)
4757 (uri (pypi-uri "decorator" version))
4758 (sha256
4759 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
4760 (build-system python-build-system)
4761 (home-page "https://pypi.python.org/pypi/decorator/")
4762 (synopsis "Python module to simplify usage of decorators")
4763 (description
4764 "The aim of the decorator module is to simplify the usage of decorators
4765for the average programmer, and to popularize decorators usage giving examples
4766of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4767etc. The core of this module is a decorator factory.")
4768 (license license:expat)))
4769
4770(define-public python2-decorator
4771 (package-with-python2 python-decorator))
4772
4773(define-public python-drmaa
4774 (package
4775 (name "python-drmaa")
4776 (version "0.7.7")
4777 (source
4778 (origin
4779 (method url-fetch)
4780 (uri (pypi-uri "drmaa" version))
4781 (sha256
4782 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
4783 (build-system python-build-system)
4784 ;; The test suite requires libdrmaa which is provided by the cluster
4785 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4786 ;; should be set to the path of the libdrmaa library.
4787 (arguments '(#:tests? #f))
4788 (native-inputs
4789 `(("python-nose" ,python-nose)))
4790 (home-page "https://pypi.python.org/pypi/drmaa")
4791 (synopsis "Python bindings for the DRMAA library")
4792 (description
4793 "A Python package for Distributed Resource Management (DRM) job
4794submission and control. This package is an implementation of the DRMAA 1.0
4795Python language binding specification.")
4796 (license license:bsd-3)))
4797
4798(define-public python2-drmaa
4799 (package-with-python2 python-drmaa))
4800
4801(define-public python-grako
4802 (package
4803 (name "python-grako")
4804 (version "3.99.9")
4805 (source
4806 (origin
4807 (method url-fetch)
4808 (uri
4809 (pypi-uri "grako" version ".zip"))
4810 (sha256
4811 (base32
4812 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
4813 (build-system python-build-system)
4814 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
4815 (native-inputs
4816 `(("unzip" ,unzip)
4817 ("python-pytest" ,python-pytest)
4818 ("python-pytest-runner" ,python-pytest-runner)))
4819 (home-page "https://bitbucket.org/neogeny/grako")
4820 (synopsis "EBNF parser generator")
4821 (description
4822 "Grako takes a grammar in a variation of EBNF as input, and outputs a
4823memoizing PEG/Packrat parser in Python.")
4824 (license license:bsd-3)))
4825
4826(define-public python2-grako
4827 (package-with-python2 python-grako))
4828
4829(define-public python-gridmap
4830 (package
4831 (name "python-gridmap")
4832 (version "0.13.0")
4833 (source
4834 (origin
768fea0f
TGR
4835 (method git-fetch)
4836 (uri (git-reference
4837 (url "https://github.com/pygridtools/gridmap.git")
4838 (commit (string-append "v" version))))
4839 (file-name (git-file-name name version))
44d10b1f 4840 (sha256
768fea0f 4841 (base32 "1478lbwsr1w24cii2x01m2910fvh8r43ghnb78nc972a96hqiknm"))))
44d10b1f
RW
4842 (build-system python-build-system)
4843 (arguments
4844 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
4845 (propagated-inputs
4846 `(("python-psutil" ,python-psutil)
4847 ("python-drmaa" ,python-drmaa)
4848 ("python-pyzmq" ,python-pyzmq)))
4849 (home-page "https://github.com/pygridtools/gridmap")
4850 (synopsis "Create jobs on a cluster directly from Python")
4851 (description
4852 "Gridmap is a Python package to allow you to easily create jobs on the
4853cluster directly from Python. You can directly map Python functions onto the
4854cluster without needing to write any wrapper code yourself.")
4855 (license license:gpl3+)))
4856
4857(define-public python2-gridmap
4858 (package-with-python2 python-gridmap))
4859
4860(define-public python-honcho
4861 (package
4862 (name "python-honcho")
4863 (version "1.0.1")
4864 (source
4865 (origin
8524d130
TGR
4866 (method git-fetch)
4867 (uri (git-reference
4868 (url "https://github.com/nickstenning/honcho.git")
4869 (commit (string-append "v" version))))
4870 (file-name (git-file-name name version))
44d10b1f 4871 (sha256
8524d130 4872 (base32 "11bd87474qpif20xdcn0ra1idj5k16ka51i658wfpxwc6nzsn92b"))))
44d10b1f
RW
4873 (build-system python-build-system)
4874 (native-inputs
4875 `(("python-pytest" ,python-pytest)
4876 ("python-mock" ,python-mock)
4877 ("python-tox" ,python-tox)
4878 ("which" ,which))) ;for tests
4879 (propagated-inputs
4880 `(("python-jinja2" ,python-jinja2)))
4881 (arguments
4882 `(#:phases
4883 (modify-phases %standard-phases
4884 (delete 'check)
4885 (add-after 'install 'check
4886 (lambda* (#:key outputs inputs #:allow-other-keys)
4887 ;; fix honcho path in testsuite
4888 (substitute* "tests/conftest.py"
4889 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
4890 "/bin/honcho" "'")))
4891 ;; It's easier to run tests after install.
4892 ;; Make installed package available for running the tests
4893 (add-installed-pythonpath inputs outputs)
95b707fb 4894 (invoke "py.test" "-v"))))))
44d10b1f
RW
4895 (home-page "https://github.com/nickstenning/honcho")
4896 (synopsis "Manage Procfile-based applications")
4897 (description
4898 "A Procfile is a file which describes how to run an application
50fceab0 4899consisting of several processes. honcho starts all listed processes.
44d10b1f
RW
4900The output of all running processes is collected by honcho and
4901displayed.")
4902 (license license:expat)))
4903
4904(define-public python2-honcho
4905 (package-with-python2 python-honcho))
4906
4907(define-public python-pexpect
4908 (package
4909 (name "python-pexpect")
4910 (version "4.6.0")
4911 (source
4912 (origin
4913 (method url-fetch)
4914 (uri (pypi-uri "pexpect" version))
4915 (sha256
4916 (base32 "1fla85g47iaxxpjhp9vkxdnv4pgc7rplfy6ja491smrrk0jqi3ia"))))
4917 (build-system python-build-system)
4918 (arguments
4919 `(#:phases
4920 (modify-phases %standard-phases
4921 (add-before 'check 'prepare-tests
4922 (lambda _
4923 (substitute* (find-files "tests")
4924 (("/bin/ls") (which "ls"))
4925 (("/bin/echo") (which "echo"))
4926 (("/bin/which") (which "which"))
4927 ;; Many tests try to use the /bin directory which
4928 ;; is not present in the build environment.
4929 ;; Use one that's non-empty and unlikely to change.
4930 (("/bin'") "/dev'"))
4931 ;; XXX: Socket connection test gets "Connection reset by peer".
4932 ;; Why does it not work? Delete for now.
4933 (delete-file "tests/test_socket.py")
4934 #t))
4935 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
4936 (native-inputs
4937 `(("python-nose" ,python-nose)
4938 ("python-pytest" ,python-pytest)
4939 ("man-db" ,man-db)
4940 ("which" ,which)
4941 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
4942 (propagated-inputs
4943 `(("python-ptyprocess" ,python-ptyprocess)))
4944 (home-page "http://pexpect.readthedocs.org/")
4945 (synopsis "Controlling interactive console applications")
4946 (description
4947 "Pexpect is a pure Python module for spawning child applications;
4948controlling them; and responding to expected patterns in their output.
4949Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4950child application and control it as if a human were typing commands.")
4951 (license license:isc)))
4952
4953(define-public python2-pexpect
4954 (package-with-python2 python-pexpect))
4955
4956(define-public python-setuptools-scm
4957 (package
4958 (name "python-setuptools-scm")
85092643 4959 (version "3.2.0")
44d10b1f
RW
4960 (source (origin
4961 (method url-fetch)
4962 (uri (pypi-uri "setuptools_scm" version))
4963 (sha256
4964 (base32
85092643 4965 "0n3knn3p1sqlx31k2lahn7z9bacvlv8nhlfidj77vz50bxqlgasj"))))
44d10b1f
RW
4966 (build-system python-build-system)
4967 (home-page "https://github.com/pypa/setuptools_scm/")
4968 (synopsis "Manage Python package versions in SCM metadata")
4969 (description
4970 "Setuptools_scm handles managing your Python package versions in
4971@dfn{software configuration management} (SCM) metadata instead of declaring
4972them as the version argument or in a SCM managed file.")
4973 (license license:expat)))
4974
a0b2accf
MO
4975;; Needed by python-lazy-object-proxy, remove on next update cycle.
4976(define-public python-setuptools-scm-3.3
4977 (package
4978 (inherit python-setuptools-scm)
4979 (version "3.3.3")
4980 (source (origin
4981 (method url-fetch)
4982 (uri (pypi-uri "setuptools_scm" version))
4983 (sha256
4984 (base32
4985 "19cyndx23xmpbhz4qrwmfwsmnnaczd0dw7qg977ksq2dbvxy29dx"))))))
4986
44d10b1f
RW
4987(define-public python2-setuptools-scm
4988 (package-with-python2 python-setuptools-scm))
4989
bb74ea09
RW
4990(define-public python-pathlib2
4991 (package
4992 (name "python-pathlib2")
4993 (version "2.3.3")
4994 (source
4995 (origin
4996 (method url-fetch)
4997 (uri (pypi-uri "pathlib2" version))
4998 (sha256
4999 (base32
5000 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
5001 (build-system python-build-system)
5002 (propagated-inputs
5003 `(("python-scandir" ,python-scandir)
5004 ("python-six" ,python-six)))
5005 (home-page "https://pypi.python.org/pypi/pathlib2/")
746d3384 5006 (synopsis "Object-oriented file system paths")
bb74ea09
RW
5007 (description "The goal of pathlib2 is to provide a backport of the
5008standard @code{pathlib} module which tracks the standard library module, so
5009all the newest features of the standard @code{pathlib} can be used also on
5010older Python versions.")
5011 (license license:expat)))
5012
fd5c264a
MB
5013(define-public python2-importlib-resources
5014 (package
5015 (name "python2-importlib-resources")
5016 (version "1.0.2")
5017 (source (origin
5018 (method url-fetch)
5019 (uri (pypi-uri "importlib_resources" version))
5020 (sha256
5021 (base32
5022 "0y3hg12iby1qyaspnbisz4s4vxax7syikk3skznwqizqyv89y9yk"))))
5023 (build-system python-build-system)
5024 (arguments
5025 `(#:python ,python-2))
5026 (native-inputs
5027 `(("python-wheel" ,python2-wheel)))
5028 (propagated-inputs
5029 `(("python-pathlib2" ,python2-pathlib2)
5030 ("python-typing" ,python2-typing)))
5031 (home-page "https://gitlab.com/python-devs/importlib_resources")
5032 (synopsis "Backport of @code{importlib.resources} from Python 3.7")
5033 (description
5034 "This package provides an implementation of @code{importlib.resources}
5035for older versions of Python.")
5036 (license license:asl2.0)))
5037
15b65617
RW
5038(define-public python-importlib-metadata
5039 (package
5040 (name "python-importlib-metadata")
4dc04d11 5041 (version "1.4.0")
15b65617
RW
5042 (source
5043 (origin
5044 (method url-fetch)
5045 (uri (pypi-uri "importlib_metadata" version))
5046 (sha256
4dc04d11 5047 (base32 "1n76444v7zn910xrhh8954jdn4byxbn9f1jck6b85a716mbh2z7i"))))
15b65617
RW
5048 (build-system python-build-system)
5049 (propagated-inputs
4dc04d11 5050 `(("python-zipp" ,python-zipp)))
15b65617
RW
5051 (native-inputs
5052 `(("python-setuptools-scm" ,python-setuptools-scm)
4dc04d11 5053 ("python-packaging" ,python-packaging)))
15b65617
RW
5054 (home-page "https://importlib-metadata.readthedocs.io/")
5055 (synopsis "Read metadata from Python packages")
5056 (description
5057 "@code{importlib_metadata} is a library which provides an API for
5058accessing an installed Python package's metadata, such as its entry points or
5059its top-level name. This functionality intends to replace most uses of
5060@code{pkg_resources} entry point API and metadata API. Along with
5061@code{importlib.resources} in Python 3.7 and newer, this can eliminate the
5062need to use the older and less efficient @code{pkg_resources} package.")
3dfb3d44 5063 (properties `((python2-variant . ,(delay python2-importlib-metadata))))
15b65617
RW
5064 (license license:asl2.0)))
5065
5efa04dd
MB
5066(define-public python2-importlib-metadata
5067 (let ((base (package-with-python2 (strip-python2-variant
5068 python-importlib-metadata))))
5069 (package/inherit
5070 base
5071 (name "python2-importlib-metadata")
5072 (propagated-inputs
5073 `(("python-configparser" ,python2-configparser)
5074 ("python-contextlib2" ,python2-contextlib2)
5075 ("python-importlib-resources" ,python2-importlib-resources)
5076 ("python-pathlib2" ,python2-pathlib2)
5077 ,@(package-propagated-inputs base))))))
5078
37c173d1
RW
5079(define-public python-jaraco-packaging
5080 (package
5081 (name "python-jaraco-packaging")
5082 (version "6.1")
5083 (source
5084 (origin
5085 (method url-fetch)
5086 (uri (pypi-uri "jaraco.packaging" version))
5087 (sha256
5088 (base32
5089 "0zimrnkh33b9g8ffw11mjh6kvs54cy5gcjw1h5cl1r7dc833dmkm"))))
5090 (build-system python-build-system)
5091 (propagated-inputs
5092 `(("python-pytest" ,python-pytest)
5093 ("python-pytest-checkdocs" ,python-pytest-checkdocs)
5094 ("python-pytest-flake8" ,python-pytest-flake8)
5095 ("python-rst.linker" ,python-rst.linker)
5096 ("python-setuptools" ,python-setuptools)
5097 ("python-setuptools-scm" ,python-setuptools-scm)
5098 ("python-six" ,python-six)
5099 ("python-sphinx" ,python-sphinx)))
5100 (home-page "https://github.com/jaraco/jaraco.packaging")
5101 (synopsis "Tools to supplement packaging Python releases")
5102 (description
5103 "This package provides various tools to supplement packaging Python
5104releases.")
5105 (license license:expat)))
5106
44d10b1f
RW
5107(define-public python-pathpy
5108 (package
5109 (name "python-pathpy")
a3dd8871 5110 (version "11.5.1")
44d10b1f
RW
5111 (source
5112 (origin
5113 (method url-fetch)
5114 (uri (pypi-uri "path.py" version))
5115 (sha256
a3dd8871 5116 (base32 "0ir9j1haq2jbi7aip6k2fa9l7q1l03k4hp1awxhjhcwzsnwp3ll8"))))
49ad11e9 5117 (outputs '("out" "doc"))
44d10b1f
RW
5118 (build-system python-build-system)
5119 (propagated-inputs
01a53e0b
MC
5120 `(("python-appdirs" ,python-appdirs)
5121 ("python-importlib-metadata" ,python-importlib-metadata)))
44d10b1f
RW
5122 (native-inputs
5123 `(("python-setuptools-scm" ,python-setuptools-scm)
5124 ("python-sphinx" ,python-sphinx)
5125 ("python-rst.linker" ,python-rst.linker)
5126 ("python-pytest" ,python-pytest)
49ad11e9
RW
5127 ("python-pytest-runner" ,python-pytest-runner)
5128 ("python-jaraco-packaging" ,python-jaraco-packaging)))
44d10b1f 5129 (arguments
49ad11e9
RW
5130 `(#:phases
5131 (modify-phases %standard-phases
5132 (add-after 'build 'build-doc
5133 (lambda _
5134 (setenv "LANG" "en_US.UTF-8")
5135 (invoke "python" "setup.py" "build_sphinx")))
5136 (add-after 'install 'install-doc
5137 (lambda* (#:key outputs #:allow-other-keys)
5138 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5139 (doc (string-append data "/doc/" ,name "-" ,version))
5140 (html (string-append doc "/html")))
5141 (mkdir-p html)
5142 (for-each (lambda (file)
5143 (copy-file file (string-append doc "/" file)))
5144 '("README.rst" "CHANGES.rst"))
5145 (copy-recursively "build/sphinx/html" html)
5146 #t)))
5147 (replace 'check
5148 (lambda _
5149 ;; The import time test aborts if an import takes longer than
5150 ;; 100ms. It may very well take a little longer than that.
5151 (invoke "pytest" "-v" "-k" "not test_import_time"))))))
44d10b1f
RW
5152 (home-page "https://github.com/jaraco/path.py")
5153 (synopsis "Python module wrapper for built-in os.path")
5154 (description
5155 "@code{path.py} implements path objects as first-class entities, allowing
5156common operations on files to be invoked on those path objects directly.")
5157 (license license:expat)))
5158
5159(define-public python2-pathpy
5160 (package-with-python2 python-pathpy))
5161
5162(define-public python-simplegeneric
5163 (package
5164 (name "python-simplegeneric")
5165 (version "0.8.1")
5166 (source
5167 (origin
5168 (method url-fetch)
6c8c3980 5169 (uri (pypi-uri "simplegeneric" version ".zip"))
44d10b1f
RW
5170 (sha256
5171 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
5172 (build-system python-build-system)
5173 (native-inputs
5174 `(("unzip" ,unzip)))
5175 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
5176 (synopsis "Python module for simple generic functions")
5177 (description
5178 "The simplegeneric module lets you define simple single-dispatch generic
5179functions, akin to Python’s built-in generic functions like @code{len()},
5180@code{iter()} and so on. However, instead of using specially-named methods,
5181these generic functions use simple lookup tables, akin to those used by
5182e.g. @code{pickle.dump()} and other generic functions found in the Python
5183standard library.")
5184 (license license:zpl2.1)))
5185
5186(define-public python2-simplegeneric
5187 (package-with-python2 python-simplegeneric))
5188
5189(define-public python-ipython-genutils
5190 ;; TODO: This package is retired, check if can be removed, see description.
5191 (package
5192 (name "python-ipython-genutils")
5193 (version "0.1.0")
5194 (source
5195 (origin
5196 (method url-fetch)
c9671d4b 5197 (uri (pypi-uri "ipython_genutils" version))
44d10b1f
RW
5198 (sha256
5199 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
5200 (build-system python-build-system)
5201 (arguments `(#:tests? #f)) ; no tests
5202 (home-page "https://ipython.org")
5203 (synopsis "Vestigial utilities from IPython")
5204 (description
5205 "This package provides retired utilities from IPython. No packages
5206outside IPython/Jupyter should depend on it.
5207
5208This package shouldn't exist. It contains some common utilities shared by
5209Jupyter and IPython projects during The Big Split. As soon as possible, those
5210packages will remove their dependency on this, and this package will go
5211away.")
5212 (license license:bsd-3)))
5213
5214(define-public python2-ipython-genutils
5215 (package-with-python2 python-ipython-genutils))
5216
5217(define-public python-traitlets
5218 (package
5219 (name "python-traitlets")
ac5e205a 5220 (version "4.3.3")
44d10b1f
RW
5221 (source
5222 (origin
5223 (method url-fetch)
5224 (uri (pypi-uri "traitlets" version))
5225 (sha256
5226 (base32
ac5e205a 5227 "1xsrwgivpkxlbr4dfndfsi098s29yqgswgjc1qqn69yxklvfw8yh"))))
44d10b1f
RW
5228 (build-system python-build-system)
5229 (arguments
5230 `(#:phases
5231 (modify-phases %standard-phases
5232 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
5233 (propagated-inputs
5234 `(("python-ipython-genutils" ,python-ipython-genutils)
ac5e205a 5235 ("python-decorator" ,python-decorator)))
44d10b1f
RW
5236 (native-inputs
5237 `(("python-pytest" ,python-pytest)))
5238 (properties `((python2-variant . ,(delay python2-traitlets))))
5239 (home-page "https://ipython.org")
5240 (synopsis "Configuration system for Python applications")
5241 (description
5242 "Traitlets is a framework that lets Python classes have attributes with
5243type checking, dynamically calculated default values, and ‘on change’
5244callbacks. The package also includes a mechanism to use traitlets for
5245configuration, loading values from files or from command line arguments. This
5246is a distinct layer on top of traitlets, so you can use traitlets in your code
5247without using the configuration machinery.")
5248 (license license:bsd-3)))
5249
5250(define-public python2-traitlets
5251 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
5252 (package
5253 (inherit traitlets)
5254 (propagated-inputs
5255 `(("python2-enum34" ,python2-enum34)
5256 ,@(package-propagated-inputs traitlets))))))
5257
5258(define-public python-jupyter-core
5259 (package
5260 (name "python-jupyter-core")
5261 (version "4.4.0")
5262 (source
5263 (origin
5264 (method url-fetch)
5265 (uri (string-append (pypi-uri "jupyter_core" version)))
5266 (sha256
5267 (base32
5268 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
5269 (build-system python-build-system)
5270 ;; FIXME: not sure how to run the tests
5271 (arguments `(#:tests? #f))
5272 (propagated-inputs
5273 `(("python-traitlets" ,python-traitlets)))
5274 (home-page "http://jupyter.org/")
5275 (synopsis "Jupyter base package")
5276 (description
5277 "Jupyter core is the base package on which Jupyter projects rely.")
5278 (license license:bsd-3)))
5279
5280(define-public python2-jupyter-core
5281 (package-with-python2 python-jupyter-core))
5282
5283(define-public python-jupyter-client
5284 (package
5285 (name "python-jupyter-client")
5286 (version "5.2.4")
5287 (source
5288 (origin
5289 (method url-fetch)
5290 (uri (pypi-uri "jupyter_client" version))
5291 (sha256
5292 (base32
5293 "0l9mh7ccrpl3lppym3dnky8n1nk7xarzzdcxf4q2s7aw203cpydm"))))
5294 (build-system python-build-system)
5295 ;; Tests fail because of missing native python kernel which I assume is
5296 ;; provided by the ipython package, which we cannot use because it would
5297 ;; cause a dependency cycle.
ddc586ea
LC
5298 (arguments
5299 `(#:tests? #f
5300
5301 #:phases (modify-phases %standard-phases
5302 (add-after 'unpack 'set-tool-file-names
5303 (lambda* (#:key inputs #:allow-other-keys)
5304 (let ((iproute (assoc-ref inputs "iproute")))
5305 (substitute* "jupyter_client/localinterfaces.py"
5306 (("'ip'")
5307 (string-append "'" iproute "/sbin/ip'")))
5308 #t))))))
5309 (inputs
5310 `(("iproute" ,iproute)))
44d10b1f
RW
5311 (propagated-inputs
5312 `(("python-pyzmq" ,python-pyzmq)
5313 ("python-traitlets" ,python-traitlets)
5314 ("python-jupyter-core" ,python-jupyter-core)))
5315 (home-page "http://jupyter.org/")
5316 (synopsis "Jupyter protocol implementation and client libraries")
5317 (description
5318 "The @code{jupyter_client} package contains the reference implementation
5319of the Jupyter protocol. It also provides client and kernel management APIs
5320for working with kernels, and the @code{jupyter kernelspec} entrypoint for
5321installing @code{kernelspec}s for use with Jupyter frontends.")
5322 (license license:bsd-3)))
5323
5324(define-public python2-jupyter-client
5325 (package-with-python2 python-jupyter-client))
5326
5327(define-public python-ipykernel
5328 (package
5329 (name "python-ipykernel")
08d0a355 5330 (version "5.1.3")
44d10b1f
RW
5331 (source
5332 (origin
5333 (method url-fetch)
5334 (uri (pypi-uri "ipykernel" version))
5335 (sha256
08d0a355 5336 (base32 "1a08y677lpn80qzvv7z0smgggmr5m5ayf0bs6vds47xpxl9sss5k"))))
44d10b1f
RW
5337 (build-system python-build-system)
5338 (arguments
5339 `(#:phases
5340 (modify-phases %standard-phases
5341 (replace 'check
5342 (lambda _
5343 (setenv "HOME" "/tmp")
5344 (invoke "pytest" "-v")
aa856d02
LC
5345 #t))
5346 (add-after 'install 'set-python-file-name
5347 (lambda* (#:key outputs #:allow-other-keys)
5348 ;; Record the absolute file name of the 'python' executable in
5349 ;; 'kernel.json'.
5350 (let ((out (assoc-ref outputs "out")))
5351 (substitute* (string-append out "/share/jupyter"
5352 "/kernels/python3/kernel.json")
5353 (("\"python\"")
5354 (string-append "\"" (which "python") "\"")))
5355 #t))))))
44d10b1f
RW
5356 (propagated-inputs
5357 `(("python-ipython" ,python-ipython)
5358 ;; imported at runtime during connect
5359 ("python-jupyter-client" ,python-jupyter-client)))
5360 (native-inputs
08d0a355
TGR
5361 `(("python-flaky" ,python-flaky)
5362 ("python-nose" ,python-nose)
5363 ("python-pytest" ,python-pytest)))
44d10b1f
RW
5364 (home-page "https://ipython.org")
5365 (synopsis "IPython Kernel for Jupyter")
5366 (description
5367 "This package provides the IPython kernel for Jupyter.")
5368 (license license:bsd-3)))
5369
0f378947 5370;; Version 5.1.1 and above no longer support Python 2.
44d10b1f 5371(define-public python2-ipykernel
0f378947
RW
5372 (package
5373 (name "python2-ipykernel")
5374 (version "5.1.0")
5375 (source
5376 (origin
5377 (method url-fetch)
5378 (uri (pypi-uri "ipykernel" version))
5379 (sha256
5380 (base32 "0br95qhrd5k65g10djngiy27hs0642301hlf2q142i8djabvzh0g"))))
5381 (build-system python-build-system)
5382 (arguments
5383 `(#:python ,python-2
5384 #:phases
5385 (modify-phases %standard-phases
5386 (replace 'check
5387 (lambda _
5388 (setenv "HOME" "/tmp")
5389 (invoke "pytest" "-v")
5390 #t)))))
5391 (propagated-inputs
5392 `(("python2-ipython" ,python2-ipython)
5393 ;; imported at runtime during connect
5394 ("python2-jupyter-client" ,python2-jupyter-client)))
5395 (native-inputs
5396 `(("python2-pytest" ,python2-pytest)
5397 ("python2-nose" ,python2-nose)))
5398 (home-page "https://ipython.org")
5399 (synopsis "IPython Kernel for Jupyter")
5400 (description
5401 "This package provides the IPython kernel for Jupyter.")
5402 (license license:bsd-3)))
44d10b1f 5403
966aa714
AE
5404(define-public python-pari-jupyter
5405 (package
5406 (name "python-pari-jupyter")
5407 (version "1.3.2")
5408 (source
5409 (origin
5410 (method url-fetch)
5411 (uri (pypi-uri "pari_jupyter" version))
5412 (sha256
5413 (base32
5414 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
5415 (build-system python-build-system)
5416 (propagated-inputs
5417 `(("python-ipykernel" ,python-ipykernel)))
5418 (inputs
5419 `(("pari-gp" ,pari-gp)
5420 ("readline" ,readline)))
5421 (arguments
5422 `(#:tests? #f)) ; no test suite
5423 (home-page
5424 "https://github.com/jdemeyer/pari_jupyter")
5425 (synopsis "A Jupyter kernel for PARI/GP")
5426 (description "The package provides a PARI/GP kernel for Jupyter.")
5427 (license license:gpl3+)))
5428
dede052a
RW
5429(define-public python-backcall
5430 (package
5431 (name "python-backcall")
5432 (version "0.1.0")
5433 (source
5434 (origin
5435 (method url-fetch)
5436 (uri (pypi-uri "backcall" version))
5437 (sha256
5438 (base32
5439 "1r01dqch3f8fdj3n6fviw8hxqrs6w5v0qw4izmvqzry1w9dxiv1q"))))
5440 (build-system python-build-system)
5441 (home-page "https://github.com/takluyver/backcall/")
5442 (synopsis "Specifications for callback functions passed in to an API")
5443 (description
5444 "If your code lets other people supply callback functions, it's important
5445to specify the function signature you expect, and check that functions support
5446that. Adding extra parameters later would break other peoples code unless
5447you're careful. The @code{backcall} package provides a way of specifying the
5448callback signature using a prototype function.")
5449 (license license:bsd-3)))
5450
44d10b1f
RW
5451;; This is the latest release of the LTS version of ipython with support for
5452;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
8b5f756c
RW
5453;; dropped support for Python 2.7.
5454(define-public python2-ipython
44d10b1f 5455 (package
8b5f756c 5456 (name "python2-ipython")
44d10b1f
RW
5457 (version "5.8.0")
5458 (source
5459 (origin
5460 (method url-fetch)
5461 (uri (pypi-uri "ipython" version ".tar.gz"))
5462 (sha256
5463 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
5464 (build-system python-build-system)
44d10b1f 5465 (propagated-inputs
8b5f756c
RW
5466 `(("python2-backports-shutil-get-terminal-size"
5467 ,python2-backports-shutil-get-terminal-size)
5468 ("python2-pathlib2" ,python2-pathlib2)
5469 ("python2-pyzmq" ,python2-pyzmq)
5470 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
5471 ("python2-terminado" ,python2-terminado)
5472 ("python2-matplotlib" ,python2-matplotlib)
5473 ("python2-numpy" ,python2-numpy)
5474 ("python2-numpydoc" ,python2-numpydoc)
5475 ("python2-jinja2" ,python2-jinja2)
5476 ("python2-mistune" ,python2-mistune)
5477 ("python2-pexpect" ,python2-pexpect)
5478 ("python2-pickleshare" ,python2-pickleshare)
5479 ("python2-simplegeneric" ,python2-simplegeneric)
5480 ("python2-jsonschema" ,python2-jsonschema)
5481 ("python2-traitlets" ,python2-traitlets)
5482 ("python2-nbformat" ,python2-nbformat)
5483 ("python2-pygments" ,python2-pygments)))
5484 (inputs
5485 `(("readline" ,readline)
5486 ("which" ,which)))
5487 (native-inputs
5488 `(("graphviz" ,graphviz)
5489 ("pkg-config" ,pkg-config)
5490 ("python2-requests" ,python2-requests) ;; for tests
5491 ("python2-testpath" ,python2-testpath)
5492 ("python2-mock" ,python2-mock)
5493 ("python2-nose" ,python2-nose)))
5494 (arguments
5495 `(#:python ,python-2
5496 #:phases
5497 (modify-phases %standard-phases
5498 (add-before 'check 'delete-broken-tests
5499 (lambda* (#:key inputs #:allow-other-keys)
5500 ;; These tests throw errors for unknown reasons.
5501 (delete-file "IPython/core/tests/test_profile.py")
5502 (delete-file "IPython/core/tests/test_interactiveshell.py")
5503 (delete-file "IPython/core/tests/test_magic.py")
5504 #t)))))
5505 (home-page "https://ipython.org")
5506 (synopsis "IPython is a tool for interactive computing in Python")
5507 (description
5508 "IPython provides a rich architecture for interactive computing with:
5509Powerful interactive shells, a browser-based notebook, support for interactive
5510data visualization, embeddable interpreters and tools for parallel
5511computing.")
5512 (license license:bsd-3)))
5513
5514(define-public python-ipython
5515 (package
5516 (name "python-ipython")
ee515773 5517 (version "7.9.0")
8b5f756c
RW
5518 (source
5519 (origin
5520 (method url-fetch)
5521 (uri (pypi-uri "ipython" version ".tar.gz"))
5522 (sha256
ee515773 5523 (base32 "103jkw18z7fnwdal1mdbijjxi1fndzn31g887lmj7ddpf2r07lyz"))))
8b5f756c
RW
5524 (build-system python-build-system)
5525 (propagated-inputs
5526 `(("python-backcall" ,python-backcall)
5527 ("python-pyzmq" ,python-pyzmq)
5528 ("python-prompt-toolkit" ,python-prompt-toolkit)
44d10b1f
RW
5529 ("python-terminado" ,python-terminado)
5530 ("python-matplotlib" ,python-matplotlib)
5531 ("python-numpy" ,python-numpy)
5532 ("python-numpydoc" ,python-numpydoc)
8b5f756c 5533 ("python-jedi" ,python-jedi)
44d10b1f
RW
5534 ("python-jinja2" ,python-jinja2)
5535 ("python-mistune" ,python-mistune)
5536 ("python-pexpect" ,python-pexpect)
5537 ("python-pickleshare" ,python-pickleshare)
5538 ("python-simplegeneric" ,python-simplegeneric)
5539 ("python-jsonschema" ,python-jsonschema)
5540 ("python-traitlets" ,python-traitlets)
5541 ("python-nbformat" ,python-nbformat)
5542 ("python-pygments" ,python-pygments)))
5543 (inputs
5544 `(("readline" ,readline)
5545 ("which" ,which)))
5546 (native-inputs
5547 `(("graphviz" ,graphviz)
5548 ("pkg-config" ,pkg-config)
5549 ("python-requests" ,python-requests) ;; for tests
5550 ("python-testpath" ,python-testpath)
8b5f756c 5551 ("python-nose" ,python-nose)))
44d10b1f
RW
5552 (arguments
5553 `(#:phases
5554 (modify-phases %standard-phases
0f272518
RW
5555 (add-after 'unpack 'make-docs-reproducible
5556 (lambda _
5557 (substitute* "IPython/sphinxext/ipython_directive.py"
5558 ((".*import datetime") "")
5559 ((".*datetime.datetime.now\\(\\)") "")
5560 (("%timeit") "# %timeit"))
5561 #t))
44d10b1f
RW
5562 ;; Tests can only be run after the library has been installed and not
5563 ;; within the source directory.
5564 (delete 'check)
5565 (add-after 'install 'check
5566 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5567 (if tests?
5568 (begin
5569 ;; Make installed package available for running the tests
5570 (add-installed-pythonpath inputs outputs)
5571 (setenv "HOME" "/tmp/") ;; required by a test
5572 ;; We only test the core because one of the other tests
5573 ;; tries to import ipykernel.
5574 (invoke "python" "IPython/testing/iptest.py"
5575 "-v" "IPython/core/tests"))
5576 #t)))
5577 (add-before 'check 'fix-tests
5578 (lambda* (#:key inputs #:allow-other-keys)
5579 (substitute* "./IPython/utils/_process_posix.py"
5580 (("/usr/bin/env', 'which") (which "which")))
5581 (substitute* "./IPython/core/tests/test_inputtransformer.py"
5582 (("#!/usr/bin/env python")
5583 (string-append "#!" (which "python"))))
44d10b1f
RW
5584 ;; This test introduces a circular dependency on ipykernel
5585 ;; (which depends on ipython).
5586 (delete-file "IPython/core/tests/test_display.py")
8b5f756c 5587 ;; AttributeError: module 'IPython.core' has no attribute 'formatters'
44d10b1f 5588 (delete-file "IPython/core/tests/test_interactiveshell.py")
44d10b1f
RW
5589 #t)))))
5590 (home-page "https://ipython.org")
5591 (synopsis "IPython is a tool for interactive computing in Python")
5592 (description
5593 "IPython provides a rich architecture for interactive computing with:
5594Powerful interactive shells, a browser-based notebook, support for interactive
5595data visualization, embeddable interpreters and tools for parallel
5596computing.")
8b5f756c 5597 (license license:bsd-3)))
44d10b1f 5598
8b5f756c
RW
5599(define-public python-ipython-documentation
5600 (package
5601 (inherit python-ipython)
5602 (name "python-ipython-documentation")
5603 (version (package-version python-ipython))
5604 (arguments
5605 `(#:phases
5606 (modify-phases %standard-phases
5607 (delete 'build)
5608 (delete 'check)
5609 (replace 'install
5610 (lambda* (#:key outputs #:allow-other-keys)
5611 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
5612 (doc (string-append data "/doc/" ,name "-" ,version))
5613 (html (string-append doc "/html"))
5614 (man1 (string-append data "/man/man1"))
5615 (info (string-append data "/info"))
5616 (examples (string-append doc "/examples"))
5617 (python-arg (string-append "PYTHON=" (which "python"))))
5618 (setenv "LANG" "en_US.utf8")
5619 (with-directory-excursion "docs"
5620 ;; FIXME: pdf fails to build
5621 ;;(system* "make" "pdf" "PAPER=a4")
5622 (system* "make" python-arg "html")
5623 ;; FIXME: the generated texi file contains ^@^@, which trips
5624 ;; up the parser.
5625 ;; (system* "make" python-arg "info")
5626 )
5627 (copy-recursively "docs/man" man1)
5628 (copy-recursively "examples" examples)
5629 (copy-recursively "docs/build/html" html)
5630 ;; (copy-file "docs/build/latex/ipython.pdf"
5631 ;; (string-append doc "/ipython.pdf"))
5632 (mkdir-p info)
5633 ;; (copy-file "docs/build/texinfo/ipython.info"
5634 ;; (string-append info "/ipython.info"))
5635 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
5636 #t)))))
5637 (inputs
5638 `(("python-ipython" ,python-ipython)
5639 ("python-ipykernel" ,python-ipykernel)))
5640 (native-inputs
5641 `(("python-sphinx" ,python-sphinx)
5642 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
5643 ;; FIXME: It's possible that a smaller union would work just as well.
f75aa97f 5644 ("texlive" ,(texlive-union (list texlive-amsfonts
8b5f756c
RW
5645 texlive-fonts-ec
5646 texlive-generic-ifxetex
5647 texlive-generic-pdftex
8b5f756c
RW
5648 texlive-latex-capt-of
5649 texlive-latex-cmap
5650 texlive-latex-environ
5651 texlive-latex-eqparbox
5652 texlive-latex-etoolbox
5653 texlive-latex-expdlist
5654 texlive-latex-fancyhdr
5655 texlive-latex-fancyvrb
5656 texlive-latex-fncychap
5657 texlive-latex-float
5658 texlive-latex-framed
5659 texlive-latex-geometry
5660 texlive-latex-graphics
5661 texlive-latex-hyperref
5662 texlive-latex-mdwtools
5663 texlive-latex-multirow
5664 texlive-latex-needspace
5665 texlive-latex-oberdiek
5666 texlive-latex-parskip
5667 texlive-latex-preview
5668 texlive-latex-tabulary
5669 texlive-latex-threeparttable
5670 texlive-latex-titlesec
5671 texlive-latex-trimspaces
5672 texlive-latex-ucs
5673 texlive-latex-upquote
5674 texlive-latex-url
5675 texlive-latex-varwidth
5676 texlive-latex-wrapfig)))
5677 ("texinfo" ,texinfo)))))
44d10b1f
RW
5678
5679(define-public python-urwid
5680 (package
5681 (name "python-urwid")
5682 (version "2.0.1")
5683 (source
5684 (origin
5685 (method url-fetch)
5686 (uri (pypi-uri "urwid" version))
5687 (sha256
5688 (base32
5689 "1g6cpicybvbananpjikmjk8npmjk4xvak1wjzji62wc600wkwkb4"))))
5690 (build-system python-build-system)
5691 (home-page "http://urwid.org")
5692 (synopsis "Console user interface library for Python")
5693 (description
5694 "Urwid is a curses-based UI/widget library for Python. It includes many
5695features useful for text console applications.")
5696 (license license:lgpl2.1+)))
5697
5698(define-public python2-urwid
5699 (package-with-python2 python-urwid))
5700
5701(define-public python-urwidtrees
5702 (package
5703 (name "python-urwidtrees")
5704 (version "1.0.2")
5705 (source
5706 (origin
c8364072 5707 (method git-fetch)
44d10b1f
RW
5708 ;; package author intends on distributing via github rather than pypi:
5709 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
c8364072
EF
5710 (uri (git-reference
5711 (url "https://github.com/pazz/urwidtrees")
5712 (commit version)))
5713 (file-name (git-file-name name version))
44d10b1f
RW
5714 (sha256
5715 (base32
c8364072 5716 "1n1kpidvkdnsqyb82vlvk78gmly96kh8351lqxn2pzgwwns6fml2"))))
44d10b1f
RW
5717 (build-system python-build-system)
5718 (arguments
26bb7fc6
EF
5719 '(#:use-setuptools? #f
5720 #:tests? #f)) ; no tests
44d10b1f
RW
5721 (propagated-inputs `(("python-urwid" ,python-urwid)))
5722 (home-page "https://github.com/pazz/urwidtrees")
5723 (synopsis "Tree widgets for urwid")
5724 (description "Urwidtrees is a Widget Container API for the @code{urwid}
5725toolkit. Use it to build trees of widgets.")
5726 (license license:gpl3+)))
5727
5728(define-public python2-urwidtrees
5729 (package-with-python2 python-urwidtrees))
5730
5731(define-public python-ua-parser
5732 (package
5733 (name "python-ua-parser")
5734 (version "0.8.0")
5735 (source
5736 (origin
5737 (method url-fetch)
5738 (uri (pypi-uri "ua-parser" version))
5739 (sha256
5740 (base32
5741 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
5742 (build-system python-build-system)
5743 (arguments
5744 `(#:tests? #f)) ;no test suite in release
5745 (native-inputs
5746 `(("python-pyyaml" ,python-pyyaml)))
5747 (home-page "https://github.com/ua-parser/uap-python")
5748 (synopsis "User agent parser")
5749 (description
5750 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
5751 (license license:asl2.0)))
5752
5753(define-public python2-ua-parser
5754 (package-with-python2 python-ua-parser))
5755
5756(define-public python-user-agents
5757 (package
5758 (name "python-user-agents")
5759 (version "1.1.0")
5760 (source
5761 (origin
5762 (method url-fetch)
5763 (uri (pypi-uri "user-agents" version))
5764 (sha256
5765 (base32
5766 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
5767 (build-system python-build-system)
5768 (arguments
5769 `(#:tests? #f)) ;missing devices.json test file in release
5770 (propagated-inputs
5771 `(("python-ua-parser" ,python-ua-parser)))
5772 (home-page "https://github.com/selwin/python-user-agents")
5773 (synopsis "User Agent strings parsing library")
5774 (description
5775 "A library to identify devices (phones, tablets) and their capabilities by
5776parsing (browser/HTTP) user agent strings.")
5777 (license license:expat)))
5778
5779(define-public python2-user-agents
5780 (package-with-python2 python-user-agents))
5781
5782(define-public python-dbus
5783 (package
5784 (name "python-dbus")
ba5ef999 5785 (version "1.2.14")
44d10b1f
RW
5786 (source
5787 (origin
5788 (method url-fetch)
5789 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
5790 "dbus-python-" version ".tar.gz"))
5791 (sha256
ba5ef999 5792 (base32 "0cdchkgnivlka4lf8q4qfk0yxq483i3r3aqickjf8hfn7nx0c0mi"))))
44d10b1f 5793 (build-system gnu-build-system)
44d10b1f
RW
5794 (native-inputs
5795 `(("pkg-config" ,pkg-config)))
5796 (inputs
5797 `(("python" ,python-wrapper)
5798 ("dbus-glib" ,dbus-glib)))
5799 (synopsis "Python bindings for D-bus")
5800 (description "python-dbus provides bindings for libdbus, the reference
5801implementation of D-Bus.")
5802 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
5803 (license license:expat)))
5804
5805(define-public python2-dbus
5806 (package (inherit python-dbus)
5807 (name "python2-dbus")
5808 (inputs `(("python" ,python-2)
5809 ,@(alist-delete "python"
5810 (package-inputs python-dbus)
ba5ef999 5811 equal?)))))
44d10b1f 5812
fb236fdd
AG
5813(define-public python-notify2
5814 (package
5815 (name "python-notify2")
5816 (version "0.3.1")
5817 (source
5818 (origin
5819 (method url-fetch)
5820 (uri (pypi-uri "notify2" version))
5821 (sha256
5822 (base32
5823 "0z8rrv9rsg1r2qgh2dxj3dfj5xnki98kgi3w839kqby4a26i1yik"))))
5824 (build-system python-build-system)
5825 (arguments `(#:tests? #f)) ; tests depend on system state
5826 (native-inputs
5827 `(("python-dbus" ,python-dbus)))
5828 (home-page "https://bitbucket.org/takluyver/pynotify2")
5829 (synopsis "Python interface to D-Bus notifications")
5830 (description
5831 "Pynotify2 provides a Python interface for sending D-Bus notifications.
5832It is a reimplementation of pynotify in pure Python, and an alternative to
5833the GObject Introspection bindings to libnotify for non-GTK applications.")
5834 (license (list license:bsd-2
5835 license:lgpl2.1+))))
5836
5837(define-public python2-notify2
5838 (package-with-python2 python-notify2))
5839
44d10b1f
RW
5840;; beautifulsoup4 has a totally different namespace than 3.x,
5841;; and pypi seems to put it under its own name, so I guess we should too
5842(define-public python-beautifulsoup4
5843 (package
5844 (name "python-beautifulsoup4")
abb53e6f 5845 (version "4.7.1")
44d10b1f
RW
5846 (source
5847 (origin
5848 (method url-fetch)
5849 (uri (pypi-uri "beautifulsoup4" version))
5850 (sha256
5851 (base32
abb53e6f 5852 "0j2kycz2dxgx68xzjm7rxg5xn6v61gq5ifvxyg99slmqkybnal4l"))))
44d10b1f
RW
5853 (build-system python-build-system)
5854 (arguments
5855 `(#:phases
5856 (modify-phases %standard-phases
5857 ;; The Python 2 source is the definitive source of beautifulsoup4. We
5858 ;; must use this conversion script when building with Python 3. The
5859 ;; conversion script also runs the tests.
5860 ;; For more information, see the file 'convert-py3k' in the source
5861 ;; distribution.
5862 (replace 'check
dff0197e 5863 (lambda _ (invoke "./convert-py3k"))))))
f83e10e4 5864 (propagated-inputs
abb53e6f 5865 `(("python-soupsieve" ,python-soupsieve)))
44d10b1f
RW
5866 (home-page
5867 "https://www.crummy.com/software/BeautifulSoup/bs4/")
5868 (synopsis
5869 "Python screen-scraping library")
5870 (description
5871 "Beautiful Soup is a Python library designed for rapidly setting up
5872screen-scraping projects. It offers Pythonic idioms for navigating,
5873searching, and modifying a parse tree, providing a toolkit for
5874dissecting a document and extracting what you need. It automatically
5875converts incoming documents to Unicode and outgoing documents to UTF-8.")
5876 (license license:expat)
5877 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
5878
5879(define-public python2-beautifulsoup4
5880 (package
5881 (inherit (package-with-python2
5882 (strip-python2-variant python-beautifulsoup4)))
5883 (arguments `(#:python ,python-2))))
5884
ad74978a
BT
5885(define-public python-soupsieve
5886 (package
5887 (name "python-soupsieve")
3367df31 5888 (version "1.9.5")
ad74978a
BT
5889 (source
5890 (origin
5891 (method url-fetch)
5892 (uri (pypi-uri "soupsieve" version))
5893 (sha256
5894 (base32
3367df31 5895 "1nhd0q0ifwva9wn645s6pn74p1rd97asn3qfg75nphx1wkgcbhg2"))))
ad74978a
BT
5896 (build-system python-build-system)
5897 (arguments `(#:tests? #f))
5898 ;;XXX: 2 tests fail currently despite claming they were to be
5899 ;;skipped. Also, beautifulsoup4 may depend on this in the future, so we
5900 ;;don't want to create a circular dependency.
5901 (home-page "https://github.com/facelessuser/soupsieve")
5902 (synopsis "CSS selector library")
5903 (description
5904 "Soup Sieve is a CSS selector library designed to be used with Beautiful
5905Soup 4. It aims to provide selecting, matching, and filtering using modern
5906CSS selectors. Soup Sieve currently provides selectors from the CSS level 1
5907specifications up through the latest CSS level 4 drafts and beyond (though
5908some are not yet implemented).")
d00b83fb 5909 (properties `((python2-variant . ,(delay python2-soupsieve))))
ad74978a
BT
5910 (license license:expat)))
5911
5912(define-public python2-soupsieve
d00b83fb 5913 (let ((base (package-with-python2 (strip-python2-variant python-soupsieve))))
ad74978a
BT
5914 (package
5915 (inherit base)
5916 (propagated-inputs
d00b83fb
MB
5917 `(("python2-backports-functools-lru-cache"
5918 ,python2-backports-functools-lru-cache)
5919 ,@(package-propagated-inputs base))))))
ad74978a 5920
44d10b1f
RW
5921(define-public python-netifaces
5922 (package
5923 (name "python-netifaces")
5924 (version "0.10.7")
5925 (source
5926 (origin
5927 (method url-fetch)
5928 (uri (pypi-uri "netifaces" version))
5929 (sha256
5930 (base32
5931 "1gccklrcplbbqh81g1mdgpa5y8na7kkf29cq2ka3f5a2fp5hyndx"))))
5932 (build-system python-build-system)
5933 (home-page "https://github.com/al45tair/netifaces")
5934 (synopsis
5935 "Python module for portable network interface information")
5936 (description
5937 "Netifaces is a Python module providing information on network
5938interfaces in an easy and portable manner.")
5939 (license license:expat)))
5940
5941(define-public python2-netifaces
5942 (package-with-python2 python-netifaces))
5943
5944(define-public python-networkx
5945 (package
5946 (name "python-networkx")
5947 (version "2.2")
5948 (source
5949 (origin
5950 (method url-fetch)
5951 (uri (pypi-uri "networkx" version ".zip"))
5952 (sha256
5953 (base32 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
5954 (build-system python-build-system)
5955 ;; python-decorator is needed at runtime.
5956 (propagated-inputs
5957 `(("python-decorator" ,python-decorator)))
5958 (native-inputs
5959 `(("python-nose" ,python-nose)
5960 ("unzip" ,unzip)))
5961 (home-page "https://networkx.github.io/")
5962 (synopsis "Python module for creating and manipulating graphs and networks")
5963 (description
5964 "NetworkX is a Python package for the creation, manipulation, and study
5965of the structure, dynamics, and functions of complex networks.")
5966 (license license:bsd-3)))
5967
5968(define-public python2-networkx
5969 (package-with-python2 python-networkx))
5970
5971(define-public python-datrie
5972 (package
5973 (name "python-datrie")
0b58cb42 5974 (version "0.8")
44d10b1f
RW
5975 (source
5976 (origin
5977 (method url-fetch)
5978 (uri (pypi-uri "datrie" version))
5979 (sha256
5980 (base32
0b58cb42 5981 "0338r8xgmpy78556jhms0h6qkvyjr10p8bpgdvcpqzm9lrmxmmdx"))))
44d10b1f 5982 (build-system python-build-system)
44d10b1f
RW
5983 (native-inputs
5984 `(("python-cython" ,python-cython)
5985 ("python-hypothesis" ,python-hypothesis)
5986 ("python-pytest" ,python-pytest)
5987 ("python-pytest-runner" ,python-pytest-runner)))
5988 (home-page "https://github.com/kmike/datrie")
5989 (synopsis "Fast, efficiently stored trie for Python")
5990 (description
5991 "This package provides a fast, efficiently stored trie implementation for
5992Python.")
5993 (license license:lgpl2.1+)))
5994
5995(define-public snakemake
5996 (package
5997 (name "snakemake")
93803c6b 5998 (version "5.7.1")
44d10b1f
RW
5999 (source
6000 (origin
6001 (method url-fetch)
6002 (uri (pypi-uri "snakemake" version))
6003 (sha256
93803c6b 6004 (base32 "1pnpvvn8n2a78cg360wz3ldmpqrsm2wzi0c0dmvki9fnsw6fxdas"))))
44d10b1f
RW
6005 (build-system python-build-system)
6006 (arguments
6007 ;; TODO: Package missing test dependencies.
6008 '(#:tests? #f
6009 #:phases
6010 (modify-phases %standard-phases
6011 ;; For cluster execution Snakemake will call Python. Since there is
6012 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
6013 ;; this by calling the snakemake wrapper instead.
6014 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
6015 (lambda* (#:key outputs #:allow-other-keys)
6016 (substitute* "snakemake/executors.py"
6017 (("\\{sys.executable\\} -m snakemake")
6018 (string-append (assoc-ref outputs "out")
6019 "/bin/snakemake")))
6020 #t)))))
6021 (propagated-inputs
8994ae34 6022 `(("python-appdirs" ,python-appdirs)
44d10b1f
RW
6023 ("python-configargparse" ,python-configargparse)
6024 ("python-datrie" ,python-datrie)
6025 ("python-docutils" ,python-docutils)
8994ae34 6026 ("python-gitpython" ,python-gitpython)
44d10b1f
RW
6027 ("python-jinja2" ,python-jinja2)
6028 ("python-jsonschema" ,python-jsonschema)
6029 ("python-networkx" ,python-networkx)
93803c6b 6030 ("python-psutil" ,python-psutil)
44d10b1f 6031 ("python-pyyaml" ,python-pyyaml)
8994ae34
TGR
6032 ("python-ratelimiter" ,python-ratelimiter)
6033 ("python-requests" ,python-requests)
6034 ("python-wrapt" ,python-wrapt)))
44d10b1f
RW
6035 (home-page "https://snakemake.readthedocs.io")
6036 (synopsis "Python-based execution environment for make-like workflows")
6037 (description
6038 "Snakemake aims to reduce the complexity of creating workflows by
6039providing a clean and modern domain specific specification language (DSL) in
6040Python style, together with a fast and comfortable execution environment.")
6041 (license license:expat)))
6042
44d10b1f
RW
6043(define-public python-pyqrcode
6044 (package
6045 (name "python-pyqrcode")
6046 (version "1.2.1")
6047 (source
6048 (origin
6049 (method url-fetch)
6050 (uri (pypi-uri "PyQRCode" version))
6051 (sha256
6052 (base32
6053 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
6054 (build-system python-build-system)
6055 (home-page
6056 "https://github.com/mnooner256/pyqrcode")
6057 (synopsis "QR code generator")
6058 (description
6059 "Pyqrcode is a QR code generator written purely in Python with
6060SVG, EPS, PNG and terminal output.")
6061 (license license:bsd-3)))
6062
6063(define-public python-seaborn
6064 (package
6065 (name "python-seaborn")
6066 (version "0.9.0")
6067 (source
6068 (origin
6069 (method url-fetch)
6070 (uri (pypi-uri "seaborn" version))
6071 (sha256
f9bd82e7
RW
6072 (base32 "0bqysi3fxfjl1866m5jq8z7mynhqbqnikim74dmzn8539iwkzj3n"))
6073 (patches
6074 (list (origin
6075 (method url-fetch)
6076 ;; This has already been merged, but there is no new
6077 ;; release including this patch. It fixes problems
6078 ;; with axis rotation that would lead to test
6079 ;; failures.
6080 (uri "https://patch-diff.githubusercontent.com/raw/mwaskom/seaborn/pull/1716.diff")
6081 (sha256
6082 (base32
6083 "1lm870z316n9ivsyr86hpk1gxaraw0mrjvq42lqsm0znhjdp9q9w"))
6084 (file-name "seaborn-0.9.0-axis-rotation.patch"))))))
44d10b1f
RW
6085 (build-system python-build-system)
6086 (arguments
6087 `(#:phases
6088 (modify-phases %standard-phases
6089 (add-before 'check 'start-xserver
6090 (lambda* (#:key inputs #:allow-other-keys)
6091 (let ((xorg-server (assoc-ref inputs "xorg-server")))
6092 ;; There must be a running X server and make check doesn't
6093 ;; start one. Therefore we must do it.
6094 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
6095 (setenv "DISPLAY" ":1")
6096 #t)))
a1322765
RW
6097 (add-after 'unpack 'fix-tests
6098 (lambda _
6099 ;; test_cbar_ticks fails probably because of matplotlib's
6100 ;; expectation of using an older version of FreeType.
6101 (delete-file "seaborn/tests/test_matrix.py")
6102 #t))
44d10b1f
RW
6103 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
6104 (propagated-inputs
6105 `(("python-pandas" ,python-pandas)
6106 ("python-matplotlib" ,python-matplotlib)
6107 ("python-numpy" ,python-numpy)
6108 ("python-scipy" ,python-scipy)))
6109 (native-inputs
6110 `(("python-pytest" ,python-pytest)
ff337525 6111 ("xorg-server" ,xorg-server-for-tests)))
44d10b1f
RW
6112 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
6113 (synopsis "Statistical data visualization")
6114 (description
6115 "Seaborn is a library for making attractive and informative statistical
6116graphics in Python. It is built on top of matplotlib and tightly integrated
6117with the PyData stack, including support for numpy and pandas data structures
6118and statistical routines from scipy and statsmodels.")
6119 (license license:bsd-3)))
6120
6121(define-public python2-seaborn
6122 (package-with-python2 python-seaborn))
6123
6124(define-public python-mpmath
6125 (package
6126 (name "python-mpmath")
6127 (version "0.19")
6128 (source (origin
6129 (method url-fetch)
6130 (uri (string-append "http://mpmath.org/files/mpmath-"
6131 version ".tar.gz"))
6132 (sha256
6133 (base32
6134 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
6135 (build-system python-build-system)
6136 (arguments
6137 '(#:phases
6138 (modify-phases %standard-phases
6139 (replace 'check
6140 (lambda _
5d7a6f1c 6141 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
44d10b1f
RW
6142 (home-page "http://mpmath.org")
6143 (synopsis "Arbitrary-precision floating-point arithmetic in python")
6144 (description
6145 "@code{mpmath} can be used as an arbitrary-precision substitute for
6146Python's float/complex types and math/cmath modules, but also does much
6147more advanced mathematics.")
6148 (license license:bsd-3)))
6149
6150(define-public python2-mpmath
6151 (package-with-python2 python-mpmath))
6152
6153(define-public python-bigfloat
6154 (package
6155 (name "python-bigfloat")
6156 (version "0.3.0")
6157 (source
6158 (origin
6159 (method url-fetch)
6160 (uri (pypi-uri "bigfloat" version))
6161 (sha256
6162 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
6163 (build-system python-build-system)
6164 (inputs
6165 `(("mpfr" ,mpfr)))
6166 (home-page "https://github.com/mdickinson/bigfloat")
6167 (synopsis "Arbitrary precision floating-point arithmetic for Python")
6168 (description
e36de31b 6169 "This package provides a Python interface to the MPFR library for
44d10b1f
RW
6170multiprecision arithmetic.")
6171 (license license:lgpl3+)))
6172
6173(define-public python2-bigfloat
6174 (package-with-python2 python-bigfloat))
6175
6176(define-public python-sympy
6177 (package
6178 (name "python-sympy")
6179 (version "1.1.1")
6180 (source
6181 (origin
6182 (method url-fetch)
6183 (uri (string-append
6184 "https://github.com/sympy/sympy/releases/download/sympy-"
6185 version "/sympy-" version ".tar.gz"))
6186 (sha256
6187 (base32 "190n29sppw7g8ihilc5451y7jlfcaw56crqiqbf1jff43dlmfnxc"))))
6188 (build-system python-build-system)
6189 (arguments
6190 `(#:phases
6191 (modify-phases %standard-phases
6192 ;; Run the core tests after installation. By default it would run
6193 ;; *all* tests, which take a very long time to complete and are known
6194 ;; to be flaky.
6195 (delete 'check)
6196 (add-after 'install 'check
6197 (lambda* (#:key outputs #:allow-other-keys)
6198 (invoke "python3" "-c" "import sympy; sympy.test(\"/core\")")
6199 #t)))))
6200 (propagated-inputs
6201 `(("python-mpmath" ,python-mpmath)))
6202 (home-page "http://www.sympy.org/")
6203 (synopsis "Python library for symbolic mathematics")
6204 (description
6205 "SymPy is a Python library for symbolic mathematics. It aims to become a
6206full-featured computer algebra system (CAS) while keeping the code as simple
6207as possible in order to be comprehensible and easily extensible.")
6208 (license license:bsd-3)))
6209
6210(define-public python2-sympy
6211 (package
6212 (inherit (package-with-python2 python-sympy))
6213 (arguments
6214 `(#:phases
6215 (modify-phases %standard-phases
6216 ;; Run the core tests after installation. By default it would run
6217 ;; *all* tests, which take a very long time to complete and are known
6218 ;; to be flaky.
6219 (delete 'check)
6220 (add-after 'install 'check
6221 (lambda* (#:key outputs #:allow-other-keys)
6222 (invoke "python" "-c" "import sympy; sympy.test(\"/core\")")
6223 #t)))))))
6224
6225(define-public python-q
6226 (package
6227 (name "python-q")
6228 (version "2.6")
6229 (source
6230 (origin
6231 (method url-fetch)
6232 (uri (pypi-uri "q" version))
6233 (sha256
6234 (base32
6235 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
6236 (build-system python-build-system)
6237 (home-page "https://github.com/zestyping/q")
6238 (synopsis "Quick-and-dirty debugging output for tired programmers")
6239 (description
6240 "q is a Python module for \"print\" style of debugging Python code. It
6241provides convenient short API for print out of values, tracebacks, and
6242falling into the Python interpreter.")
6243 (license license:asl2.0)))
6244
6245(define-public python2-q
6246 (package-with-python2 python-q))
6247
6248(define-public python2-xlib
6249 (package
6250 (name "python2-xlib")
6251 (version "0.14")
6252 (source (origin
6253 (method url-fetch)
6254 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
6255 "/" version "/"
6256 "python-xlib-" version ".tar.gz"))
6257 (sha256
6258 (base32
6259 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
6260 (build-system python-build-system)
6261 (arguments
6262 `(#:python ,python-2 ;Python 2 only
6263 #:tests? #f)) ;no tests
6264 (home-page "http://python-xlib.sourceforge.net/")
6265 (synopsis "Python X11 client library")
6266 (description
6267 "The Python X Library is intended to be a fully functional X client
6268library for Python programs. It is useful to implement low-level X clients.
6269It is written entirely in Python.")
6270 (license license:gpl2+)))
6271
6272(define-public python-singledispatch
6273 (package
6274 (name "python-singledispatch")
6275 (version "3.4.0.3")
6276 (source
6277 (origin
6278 (method url-fetch)
6279 (uri (pypi-uri "singledispatch" version))
6280 (sha256
6281 (base32
6282 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
6283 (build-system python-build-system)
6284 (native-inputs
6285 `(("python-six" ,python-six))) ; required for conversion, not at run-time
6286 (home-page
6287 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
6288 (synopsis "Backport of singledispatch feature from Python 3.4")
6289 (description
6290 "This library brings functools.singledispatch from Python 3.4 to Python
62912.6-3.3.")
6292 (license license:expat)))
6293
6294(define-public python2-singledispatch
6295 (package-with-python2 python-singledispatch))
6296
6297;; the python- version can be removed with python-3.5
6298(define-public python-backports-abc
6299 (package
6300 (name "python-backports-abc")
6301 (version "0.5")
6302 (source
6303 (origin
6304 (method url-fetch)
6305 (uri (pypi-uri "backports_abc" version))
6306 (sha256
6307 (base32
6308 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
6309 (build-system python-build-system)
6310 (home-page "https://github.com/cython/backports_abc")
6311 (synopsis "Backport of additions to the 'collections.abc' module")
6312 (description
6313 "Python-backports-abc provides a backport of additions to the
36a4366d 6314@code{collections.abc} module in Python-3.5.")
44d10b1f
RW
6315 (license license:psfl)))
6316
6317(define-public python2-backports-abc
6318 (package-with-python2 python-backports-abc))
6319
6320(define-public python-backports-csv
6321 (package
6322 (name "python-backports-csv")
6323 (version "1.0.5")
6324 (source
6325 (origin
6326 (method url-fetch)
6327 (uri (pypi-uri "backports.csv" version))
6328 (sha256
6329 (base32
6330 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
6331 (build-system python-build-system)
6332 (home-page "https://github.com/ryanhiebert/backports.csv")
6333 (synopsis "Backport of Python 3's csv module for Python 2")
6334 (description
6335 "Provides a backport of Python 3's @code{csv} module for parsing
6336comma separated values. The API of the @code{csv} module in Python 2
6337is drastically different from the @code{csv} module in Python 3.
6338This is due, for the most part, to the difference between str in
6339Python 2 and Python 3.")
6340 (license license:psfl)))
6341
6342(define-public python2-backports-csv
6343 (package-with-python2 python-backports-csv))
6344
6345(define-public python2-backports-shutil-get-terminal-size
6346 (package
6347 (name "python2-backports-shutil-get-terminal-size")
6348 (version "1.0.0")
6349 (source
6350 (origin
6351 (method url-fetch)
6352 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
6353 (sha256
6354 (base32
6355 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
6356 (build-system python-build-system)
6357 (arguments
6358 `(#:python ,python-2
6359 #:phases
6360 (modify-phases %standard-phases
6361 (replace 'check
6362 (lambda _
4a4a7d9a 6363 (invoke "py.test" "-v"))))))
44d10b1f
RW
6364 (native-inputs
6365 `(("python2-pytest" ,python2-pytest)))
6366 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
6367 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
6368 (description
6369 "This package provides a backport of the @code{get_terminal_size
6370function} from Python 3.3's @code{shutil}.
6371Unlike the original version it is written in pure Python rather than C,
6372so it might be a tiny bit slower.")
6373 (license license:expat)))
6374
6375(define-public python-waf
6376 (package
6377 (name "python-waf")
6c2c11fa 6378 (version "2.0.19")
44d10b1f
RW
6379 (source (origin
6380 (method url-fetch)
6381 (uri (string-append "https://waf.io/"
6382 "waf-" version ".tar.bz2"))
6383 (sha256
6384 (base32
6c2c11fa 6385 "19dvqbsvxz7ch03dh1v0znklrwxlz6yzddc3k9smzrrgny4jch6q"))))
44d10b1f
RW
6386 (build-system python-build-system)
6387 (arguments
6388 '(#:phases
6389 (modify-phases %standard-phases
6390 (replace 'build
6391 (lambda _
633c8b71
MO
6392 ;; XXX: Find a way to add all extra tools.
6393 (let ((tools '("gccdeps"
6394 "clang_compilation_database")))
6395 (invoke "python" "waf-light" "configure" "build"
6396 (string-append "--tools="
6397 (string-join tools ","))))))
44d10b1f
RW
6398 (replace 'check
6399 (lambda _
6400 (invoke "python" "waf" "--version")))
6401 (replace 'install
6402 (lambda* (#:key outputs #:allow-other-keys)
6403 (let ((out (assoc-ref outputs "out")))
6404 (install-file "waf" (string-append out "/bin")))
6405 #t))
6406 ;; waf breaks when it is wrapped.
6407 (delete 'wrap))))
6408 (home-page "https://waf.io/")
6409 (synopsis "Python-based build system")
6410 (description
6411 "Waf is a Python-based framework for configuring, compiling and installing
6412applications.")
6413 (license license:bsd-3)))
6414
6415(define-public python2-waf
6416 (package-with-python2 python-waf))
6417
6418(define-public python-pyzmq
6419 (package
6420 (name "python-pyzmq")
6421 (version "17.1.2")
6422 (source
6423 (origin
6424 (method url-fetch)
6425 (uri (pypi-uri "pyzmq" version))
6426 (sha256
6427 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
6428 (build-system python-build-system)
6429 (arguments
6430 `(#:configure-flags
6431 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
6432 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
6433 ;; --inplace' for 'python setup.py test' to work.
6434 #:tests? #f))
6435 (inputs
6436 `(("zeromq" ,zeromq)))
6437 (native-inputs
6438 `(("pkg-config" ,pkg-config)
6439 ("python-nose" ,python-nose)))
6440 (home-page "https://github.com/zeromq/pyzmq")
6441 (synopsis "Python bindings for 0MQ")
6442 (description
6443 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
6444 (license license:bsd-4)))
6445
6446(define-public python2-pyzmq
6447 (package-with-python2 python-pyzmq))
6448
6449(define-public python-pep8
6450 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
6451 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
6452 ;; some dependents' test suites, and nothing more.
6453 (package
6454 (name "python-pep8")
6455 (version "1.7.0")
6456 (source
6457 (origin
6458 (method url-fetch)
6459 (uri (pypi-uri "pep8" version))
6460 (sha256
6461 (base32
2be878d8
CB
6462 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))
6463 (patches (search-patches "python-pep8-stdlib-tokenize-compat.patch"))))
44d10b1f
RW
6464 (build-system python-build-system)
6465 (home-page "https://pep8.readthedocs.org/")
6466 (synopsis "Python style guide checker")
6467 (description
6468 "This tools checks Python code against some of the style conventions in
6469PEP 8.")
6470 (license license:expat)))
6471
6472(define-public python2-pep8
6473 (package-with-python2 python-pep8))
6474
6475(define-public python-pyflakes
6476 (package
6477 (name "python-pyflakes")
d0cba11b 6478 (version "2.1.1")
44d10b1f
RW
6479 (source
6480 (origin
6481 (method url-fetch)
6482 (uri (pypi-uri "pyflakes" version))
6483 (sha256
6484 (base32
d0cba11b 6485 "18pq95a1xj2dgdd0m85gyfsn40jajj4xc3lp8wfv7igqhrc86xnr"))))
44d10b1f
RW
6486 (build-system python-build-system)
6487 (home-page
6488 "https://github.com/pyflakes/pyflakes")
6489 (synopsis "Passive checker of Python programs")
6490 (description
6491 "Pyflakes statically checks Python source code for common errors.")
6492 (license license:expat)))
6493
6494(define-public python2-pyflakes
6495 (package-with-python2 python-pyflakes))
6496
6497(define-public python-mccabe
6498 (package
6499 (name "python-mccabe")
6500 (version "0.6.1")
6501 (source
6502 (origin
6503 (method url-fetch)
6504 (uri (pypi-uri "mccabe" version))
6505 (sha256
6506 (base32
6507 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
6508 (build-system python-build-system)
6509 (native-inputs
6510 `(("python-pytest" ,python-pytest-bootstrap)
6511 ("python-pytest-runner" ,python-pytest-runner)))
6512 (home-page "https://github.com/flintwork/mccabe")
6513 (synopsis "McCabe checker, plugin for flake8")
6514 (description
6515 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
6516complexity of Python source code.")
6517 (license license:expat)))
6518
6519(define-public python2-mccabe
6520 (package-with-python2 python-mccabe))
6521
6522(define-public python-mccabe-0.2.1
6523 (package (inherit python-mccabe)
6524 (version "0.2.1")
6525 (source
6526 (origin
6527 (method url-fetch)
6528 (uri (pypi-uri "mccabe" version))
6529 (sha256
6530 (base32
6531 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
6532
6533(define-public python2-mccabe-0.2.1
6534 (package-with-python2 python-mccabe-0.2.1))
6535
6536;; Flake8 2.4.1 requires an older version of pep8.
6537;; This should be removed ASAP.
6538(define-public python-pep8-1.5.7
6539 (package (inherit python-pep8)
6540 (version "1.5.7")
6541 (source
f3576970
RW
6542 (origin
6543 (method url-fetch)
6544 (uri (pypi-uri "pep8" version))
6545 (sha256
6546 (base32
6547 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
44d10b1f
RW
6548 (arguments
6549 ;; XXX Tests not compatible with Python 3.5.
6550 '(#:tests? #f))))
6551
6552(define-public python2-pep8-1.5.7
6553 (package-with-python2 python-pep8-1.5.7))
6554
6555;; Flake8 2.4.1 requires an older version of pyflakes.
6556;; This should be removed ASAP.
6557(define-public python-pyflakes-0.8.1
6558 (package (inherit python-pyflakes)
6559 (version "0.8.1")
6560 (source
8c4dffb5
RW
6561 (origin
6562 (method url-fetch)
6563 (uri (pypi-uri "pyflakes" version))
6564 (sha256
6565 (base32
6566 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
44d10b1f
RW
6567 (arguments
6568 ;; XXX Tests not compatible with Python 3.5.
6569 '(#:tests? #f))))
6570
6571(define-public python2-pyflakes-0.8.1
6572 (package-with-python2 python-pyflakes-0.8.1))
6573
ac63cf0a 6574(define-public python-flake8
44d10b1f
RW
6575 (package
6576 (name "python-flake8")
beaff4a8 6577 (version "3.7.7")
ac63cf0a
MB
6578 (source (origin
6579 (method url-fetch)
6580 (uri (pypi-uri "flake8" version))
6581 (sha256
6582 (base32
beaff4a8 6583 "0qg6zggqigrd4k3gv88shd1a27d0cwgfql8vfiq2c7rl7w3rd6c5"))))
44d10b1f
RW
6584 (build-system python-build-system)
6585 (arguments
6586 `(#:phases
6587 (modify-phases %standard-phases
44d10b1f
RW
6588 (delete 'check)
6589 (add-after 'install 'check
6590 (lambda* (#:key inputs outputs #:allow-other-keys)
6591 (add-installed-pythonpath inputs outputs)
6592 (invoke "pytest" "-v")
6593 #t)))))
6594 (propagated-inputs
6595 `(("python-pycodestyle" ,python-pycodestyle)
beaff4a8 6596 ("python-entrypoints" ,python-entrypoints)
44d10b1f
RW
6597 ("python-pyflakes" ,python-pyflakes)
6598 ("python-mccabe" ,python-mccabe)))
6599 (native-inputs
6600 `(("python-mock" ,python-mock)
6601 ("python-pytest" ,python-pytest-bootstrap)
6602 ("python-pytest-runner" ,python-pytest-runner)))
6603 (home-page "https://gitlab.com/pycqa/flake8")
6604 (synopsis
6605 "The modular source code checker: pep8, pyflakes and co")
6606 (description
6607 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
ac63cf0a 6608 (properties `((python2-variant . ,(delay python2-flake8))))
44d10b1f
RW
6609 (license license:expat)))
6610
ac63cf0a
MB
6611(define-public python2-flake8
6612 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
44d10b1f
RW
6613 (package (inherit base)
6614 (propagated-inputs
6615 `(("python2-configparser" ,python2-configparser)
6616 ("python2-enum34" ,python2-enum34)
beaff4a8 6617 ("python2-typing" ,python2-typing)
44d10b1f
RW
6618 ,@(package-propagated-inputs base))))))
6619
44d10b1f
RW
6620;; python-hacking requires flake8 <2.6.0.
6621(define-public python-flake8-2.5
6622 (package
6623 (inherit python-flake8)
6624 (version "2.5.5")
6625 (source (origin
6626 (method url-fetch)
6627 (uri (pypi-uri "flake8" version))
6628 (sha256
6629 (base32
6630 "1snylqwbmrylbx3r1wpz8ggk98f6bcag4441ag8mm2l7wyn58sij"))))
6631 (propagated-inputs
6632 `(("python-pep8" ,python-pep8)
6633 ,@(package-propagated-inputs python-flake8)))
6634 (properties `((python2-variant . ,(delay python2-flake8-2.5))))))
6635
6636(define-public python2-flake8-2.5
6637 (package
6638 (inherit python2-flake8)
6639 (version (package-version python-flake8-2.5))
6640 (source (origin
6641 (inherit (package-source python-flake8-2.5))))
6642 (propagated-inputs
6643 `(("python2-pep8" ,python2-pep8)
6644 ,@(package-propagated-inputs python2-flake8)))))
6645
6646(define-public python-flake8-polyfill
6647 (package
6648 (name "python-flake8-polyfill")
6649 (version "1.0.2")
6650 (source
6651 (origin
6652 (method url-fetch)
6653 (uri (pypi-uri "flake8-polyfill" version))
6654 (sha256
6655 (base32
6656 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
6657 (build-system python-build-system)
6658 (arguments
6659 '(#:phases
6660 (modify-phases %standard-phases
6661 (replace 'check
6662 (lambda _
40a7153d
MB
6663 ;; Be compatible with Pytest 4:
6664 ;; https://gitlab.com/pycqa/flake8-polyfill/merge_requests/7
6665 (substitute* "setup.cfg"
6666 (("\\[pytest\\]")
6667 "[tool:pytest]"))
6668
44d10b1f
RW
6669 (setenv "PYTHONPATH"
6670 (string-append (getcwd) "/build/lib:"
6671 (getenv "PYTHONPATH")))
4f0a0894 6672 (invoke "py.test" "-v"))))))
44d10b1f
RW
6673 (native-inputs
6674 `(("python-flake8" ,python-flake8)
6675 ("python-mock" ,python-mock)
6676 ("python-pep8" ,python-pep8)
6677 ("python-pycodestyle" ,python-pycodestyle)
6678 ("python-pytest" ,python-pytest)))
6679 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
6680 (synopsis "Polyfill package for Flake8 plugins")
6681 (description
6682 "This package that provides some compatibility helpers for Flake8
6683plugins that intend to support Flake8 2.x and 3.x simultaneously.")
6684 (license license:expat)))
6685
6686(define-public python2-flake8-polyfill
6687 (package-with-python2 python-flake8-polyfill))
6688
6689(define-public python-mistune
6690 (package
6691 (name "python-mistune")
6692 (version "0.8.4")
6693 (source
6694 (origin
6695 (method url-fetch)
6696 (uri (pypi-uri "mistune" version))
6697 (sha256
6698 (base32
6699 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
6700 (build-system python-build-system)
6701 (native-inputs
6702 `(("python-nose" ,python-nose)
6703 ("python-cython" ,python-cython)))
6704 (home-page "https://github.com/lepture/mistune")
6705 (synopsis "Markdown parser in pure Python")
6706 (description "This package provides a fast markdown parser in pure
6707Python.")
6708 (license license:bsd-3)))
6709
6710(define-public python2-mistune
6711 (package-with-python2 python-mistune))
6712
6713(define-public python-markdown
6714 (package
6715 (name "python-markdown")
2537ce68 6716 (version "3.2")
44d10b1f
RW
6717 (source
6718 (origin
6719 (method url-fetch)
6720 (uri (pypi-uri "Markdown" version))
6721 (sha256
6722 (base32
2537ce68 6723 "1gwqrhrp0n9xllgmjc8n1p260968kr0dd2jncjkj4r617q61imss"))))
44d10b1f
RW
6724 (build-system python-build-system)
6725 (native-inputs
6726 `(("python-nose" ,python-nose)
6727 ("python-pyyaml" ,python-pyyaml)))
6728 (home-page "https://python-markdown.github.io/")
6729 (synopsis "Python implementation of Markdown")
6730 (description
6731 "This package provides a Python implementation of John Gruber's
6732Markdown. The library features international input, various Markdown
6733extensions, and several HTML output formats. A command line wrapper
6734markdown_py is also provided to convert Markdown files to HTML.")
2537ce68 6735 (properties `((python2-variant . ,(delay python2-markdown))))
44d10b1f
RW
6736 (license license:bsd-3)))
6737
2537ce68 6738;; Markdown 3.2 dropped support for Python 2.
44d10b1f 6739(define-public python2-markdown
2537ce68
MB
6740 (let ((base (package-with-python2 (strip-python2-variant python-markdown))))
6741 (package/inherit
6742 base
6743 (version "3.1.1")
6744 (source (origin
6745 (method url-fetch)
6746 (uri (pypi-uri "Markdown" version))
6747 (sha256
6748 (base32
6749 "0yhylk4ffqqs7x086fav4pnfsl1021v7lghznzkififprmmqfl1f")))))))
44d10b1f
RW
6750
6751(define-public python-ptyprocess
6752 (package
6753 (name "python-ptyprocess")
6754 (version "0.5.2")
6755 (source
6756 (origin
6757 (method url-fetch)
6758 (uri (pypi-uri "ptyprocess" version))
6759 (sha256
6760 (base32
6761 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
6762 (build-system python-build-system)
6763 (native-inputs
6764 `(("python-nose" ,python-nose)))
6765 (arguments
6766 `(#:phases
6767 (modify-phases %standard-phases
6768 (replace 'check
7904d6fa 6769 (lambda _ (invoke "nosetests"))))))
44d10b1f
RW
6770 (home-page "https://github.com/pexpect/ptyprocess")
6771 (synopsis "Run a subprocess in a pseudo terminal")
6772 (description
6773 "This package provides a Python library used to launch a subprocess in a
6774pseudo terminal (pty), and interact with both the process and its pty.")
6775 (license license:isc)))
6776
6777(define-public python2-ptyprocess
6778 (package-with-python2 python-ptyprocess))
6779
6780(define-public python-cram
6781 (package
6782 (name "python-cram")
6783 (version "0.7")
6784 (home-page "https://bitheap.org/cram/")
6785 (source (origin
6786 (method url-fetch)
6787 (uri (list (string-append home-page "cram-"
6788 version ".tar.gz")
6789 (pypi-uri "cram" version)))
6790 (sha256
6791 (base32
6792 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
6793 (arguments
6794 '(#:phases
6795 (modify-phases %standard-phases
6796 (add-after 'unpack 'patch-source
6797 (lambda _
6798 (substitute* (find-files "cram" ".*\\.py$")
6799 ;; Replace default shell path.
6800 (("/bin/sh") (which "sh")))
6801 (substitute* (find-files "tests" ".*\\.t$")
6802 (("md5") "md5sum")
6803 (("/bin/bash") (which "bash"))
6804 (("/bin/sh") (which "sh")))
6805 (substitute* "cram/_test.py"
6806 ;; This hack works around a bug triggered by substituting
6807 ;; the /bin/sh paths. "tests/usage.t" compares the output of
6808 ;; "cram -h", which breaks the output at 80 characters. This
6809 ;; causes the line showing the default shell to break into two
6810 ;; lines, but the test expects a single line...
6811 (("env\\['COLUMNS'\\] = '80'")
6812 "env['COLUMNS'] = '160'"))
ff1e80d7
MB
6813
6814 (substitute* "Makefile"
6815 ;; Recent versions of python-coverage have caused the test
6816 ;; coverage to decrease (as of version 0.7). Allow that.
6817 (("--fail-under=100")
6818 "--fail-under=90"))
6819
44d10b1f 6820 #t))
ff1e80d7 6821 (replace 'check
44d10b1f 6822 ;; The test phase uses the built library and executable.
44d10b1f
RW
6823 (lambda* (#:key inputs outputs #:allow-other-keys)
6824 (add-installed-pythonpath inputs outputs)
6825 (setenv "PATH" (string-append (getenv "PATH") ":"
6826 (assoc-ref outputs "out") "/bin"))
2d7db192 6827 (invoke "make" "test"))))))
44d10b1f
RW
6828 (build-system python-build-system)
6829 (native-inputs
6830 `(("python-coverage" ,python-coverage)
6831 ("which" ,which)))
6832 (synopsis "Simple testing framework for command line applications")
6833 (description
6834 "Cram is a functional testing framework for command line applications.
6835Cram tests look like snippets of interactive shell sessions. Cram runs each
6836command and compares the command output in the test with the command’s actual
6837output.")
6838 (license license:gpl2+)))
6839
6840(define-public python2-cram
6841 (package-with-python2 python-cram))
6842
6843(define-public python-straight-plugin
6844 (package
6845 (name "python-straight-plugin")
6846 (version "1.4.1")
6847 (source
6848 (origin
6849 (method url-fetch)
6850 (uri (pypi-uri "straight.plugin" version))
6851 (sha256
6852 (base32
6853 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
6854 (build-system python-build-system)
6855 (home-page "https://github.com/ironfroggy/straight.plugin")
6856 (synopsis "Simple namespaced plugin facility")
6857 (description "Straight Plugin provides a type of plugin you can create from
6858almost any existing Python modules, and an easy way for outside developers to
6859add functionality and customization to your projects with their own plugins.")
6860 (license license:expat)))
6861
6862(define-public python2-straight-plugin
6863 (package-with-python2 python-straight-plugin))
6864
6865(define-public python-fonttools
6866 (package
6867 (name "python-fonttools")
1a4bb420 6868 (version "3.38.0")
44d10b1f
RW
6869 (source (origin
6870 (method url-fetch)
6871 (uri (pypi-uri "fonttools" version ".zip"))
6872 (sha256
6873 (base32
1a4bb420 6874 "12ripk3s7skgxr1bs9r8n13r94ym3s8iir7ivfixls9fa4dabmlh"))))
44d10b1f
RW
6875 (build-system python-build-system)
6876 (native-inputs
6877 `(("unzip" ,unzip)
6878 ("python-pytest" ,python-pytest)
6879 ("python-pytest-runner" ,python-pytest-runner)))
9d25a454 6880 (home-page "https://github.com/fonttools/fonttools")
44d10b1f
RW
6881 (synopsis "Tools to manipulate font files")
6882 (description
6883 "FontTools/TTX is a library to manipulate font files from Python. It
6884supports reading and writing of TrueType/OpenType fonts, reading and writing
6885of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
6886also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
6887from an XML-based format.")
6888 (license license:expat)))
6889
6890(define-public python2-fonttools
6891 (package-with-python2 python-fonttools))
6892
6893(define-public python-ly
6894 (package
6895 (name "python-ly")
6896 (version "0.9.5")
6897 (source
6898 (origin
6899 (method url-fetch)
6900 (uri (pypi-uri name version))
6901 (sha256
6902 (base32
6903 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
6904 (build-system python-build-system)
6905 (arguments
6906 ;; FIXME: Some tests need network access.
6907 '(#:tests? #f))
6908 (synopsis "Tool and library for manipulating LilyPond files")
6909 (description "This package provides a Python library to parse, manipulate
6910or create documents in LilyPond format. A command line program ly is also
6911provided that can be used to do various manipulations with LilyPond files.")
6912 (home-page "https://pypi.python.org/pypi/python-ly")
6913 (license license:gpl2+)))
6914
6915(define-public python-appdirs
6916 (package
6917 (name "python-appdirs")
6918 (version "1.4.3")
6919 (source
6920 (origin
6921 (method url-fetch)
6922 (uri (pypi-uri "appdirs" version))
6923 (sha256
6924 (base32
6925 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
6926 (build-system python-build-system)
6927 (home-page "https://github.com/ActiveState/appdirs")
6928 (synopsis
6929 "Determine platform-specific dirs, e.g. a \"user data dir\"")
6930 (description
6931 "This module provides a portable way of finding out where user data
6932should be stored on various operating systems.")
6933 (license license:expat)))
6934
6935(define-public python2-appdirs
6936 (package-with-python2 python-appdirs))
6937
6938(define-public python-llfuse
6939 (package
6940 (name "python-llfuse")
6941 (version "1.3.5")
6942 (source (origin
6943 (method url-fetch)
6944 (uri (pypi-uri "llfuse" version ".tar.bz2"))
6945 (sha256
6946 (base32
6947 "1n7a90jww3ly49fm7x27m3xw3la3qfrnykcakga654g6kcyjlhbf"))))
6948 (build-system python-build-system)
6949 (inputs
6950 `(("fuse" ,fuse)
6951 ("attr" ,attr)))
6952 (native-inputs
6953 `(("pkg-config" ,pkg-config)))
6954 (synopsis "Python bindings for FUSE")
6955 (description
6956 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
6957 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
6958 (license license:lgpl2.0+)
6959 (properties `((python2-variant . ,(delay python2-llfuse))))))
6960
6961(define-public python2-llfuse
6962 (package (inherit (package-with-python2
6963 (strip-python2-variant python-llfuse)))
6964 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
6965
6966;; For attic-0.16
6967(define-public python-llfuse-0.41
6968 (package (inherit python-llfuse)
6969 (version "0.41.1")
6970 (source (origin
6971 (method url-fetch)
6972 (uri (string-append
6973 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6974 "llfuse-" version ".tar.bz2"))
6975 (sha256
6976 (base32
6977 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
6978 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
6979 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
6980 (license (list license:expat license:lgpl2.0+))))
6981
6982(define-public python-msgpack
6983 (package
6984 (name "python-msgpack")
6985 (version "0.5.6")
6986 (source (origin
6987 (method url-fetch)
6988 (uri (pypi-uri "msgpack" version))
6989 (sha256
6990 (base32
6991 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
6992 (build-system python-build-system)
6993 (arguments
6994 `(#:modules ((guix build utils)
6995 (guix build python-build-system)
6996 (ice-9 ftw)
6997 (srfi srfi-1)
6998 (srfi srfi-26))
6999 #:phases
7000 (modify-phases %standard-phases
7001 (replace 'check
7002 (lambda _
7003 (let ((cwd (getcwd)))
7004 (setenv "PYTHONPATH"
7005 (string-append cwd "/build/"
7006 (find (cut string-prefix? "lib" <>)
7007 (scandir (string-append cwd "/build")))
7008 ":"
7009 (getenv "PYTHONPATH")))
7010 (invoke "pytest" "-v" "test")))))))
7011 (native-inputs
7012 `(("python-pytest" ,python-pytest)))
7013 (synopsis "MessagePack (de)serializer")
7014 (description "MessagePack is a fast, compact binary serialization format,
7015suitable for similar data to JSON. This package provides CPython bindings for
7016reading and writing MessagePack data.")
7017 (home-page "https://pypi.python.org/pypi/msgpack/")
7018 (license license:asl2.0)))
7019
7020;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
7021;; release 0.5. Some packages like borg still call it by the old name for now.
7022;; <https://bugs.gnu.org/30662>
7023(define-public python-msgpack-transitional
7024 (package
7025 (inherit python-msgpack)
7026 (name "python-msgpack-transitional")
7027 (arguments
7028 (substitute-keyword-arguments (package-arguments python-msgpack)
7029 ((#:phases phases)
7030 `(modify-phases ,phases
7031 (add-after 'unpack 'configure-transitional
7032 (lambda _
7033 ;; Keep using the old name.
7034 (substitute* "setup.py"
7035 (("TRANSITIONAL = False")
7036 "TRANSITIONAL = 1"))
7037 #t))))))))
7038
7039(define-public python2-msgpack
7040 (package-with-python2 python-msgpack))
7041
7042(define-public python-netaddr
7043 (package
7044 (name "python-netaddr")
7045 (version "0.7.19")
7046 (source
7047 (origin
7048 (method url-fetch)
7049 (uri (pypi-uri "netaddr" version))
7050 (sha256
7051 (base32
7052 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
7053 (build-system python-build-system)
7054 (arguments `(#:tests? #f)) ;; No tests.
7055 (home-page "https://github.com/drkjam/netaddr/")
7056 (synopsis "Pythonic manipulation of network addresses")
7057 (description
7058 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
7059and MAC network addresses.")
7060 (license license:bsd-3)))
7061
7062(define-public python2-netaddr
7063 (package-with-python2 python-netaddr))
7064
dd85eca0
AG
7065(define-public python2-pyroute2
7066 (package
7067 (name "python2-pyroute2")
7068 (version "0.5.6")
7069 (source
7070 (origin
7071 (method url-fetch)
7072 (uri (pypi-uri "pyroute2" version))
7073 (sha256
7074 (base32
7075 "1gmz4r1w0yzj6fjjypnalmfyy0lnfznydyn62gi3wk50j5hhxbny"))))
7076 (build-system python-build-system)
7077 (arguments
7078 `(#:python ,python-2)) ;Python 3.x is not supported
7079 (home-page "https://github.com/svinota/pyroute2")
7080 (synopsis "Python netlink library")
7081 (description
7082 "Pyroute2 is a pure Python netlink library with minimal dependencies.
7083Supported netlink families and protocols include:
7084@itemize
7085@item rtnl, network settings - addresses, routes, traffic controls
7086@item nfnetlink - netfilter API: ipset, nftables, ...
7087@item ipq - simplest userspace packet filtering, iptables QUEUE target
7088@item devlink - manage and monitor devlink-enabled hardware
7089@item generic - generic netlink families
7090 @itemize
7091 @item nl80211 - wireless functions API (basic support)
7092 @item taskstats - extended process statistics
7093 @item acpi_events - ACPI events monitoring
7094 @item thermal_events - thermal events monitoring
7095 @item VFS_DQUOT - disk quota events monitoring
7096 @end itemize
7097@end itemize")
7098 (license license:gpl2+)))
7099
44d10b1f
RW
7100(define-public python-wrapt
7101 (package
7102 (name "python-wrapt")
2271a1dc 7103 (version "1.11.2")
44d10b1f 7104 (source
2271a1dc
MB
7105 (origin
7106 (method url-fetch)
7107 (uri (pypi-uri "wrapt" version))
7108 (sha256
7109 (base32
7110 "1q81762dgsgrd12f8qc39zk8s5wll3m5xc32jdmlf6cls4gh4njn"))))
44d10b1f
RW
7111 (build-system python-build-system)
7112 (arguments
7113 ;; Tests are not included in the tarball, they are only available in the
7114 ;; git repository.
7115 `(#:tests? #f))
7116 (home-page "https://github.com/GrahamDumpleton/wrapt")
7117 (synopsis "Module for decorators, wrappers and monkey patching")
7118 (description
2271a1dc 7119 "The aim of the wrapt module is to provide a transparent object proxy for
44d10b1f
RW
7120 Python, which can be used as the basis for the construction of function
7121 wrappers and decorator functions.")
7122 (license license:bsd-2)))
7123
7124(define-public python2-wrapt
7125 (package-with-python2 python-wrapt))
7126
7127(define-public python-xlrd
7128 (package
7129 (name "python-xlrd")
3a2b1a3c 7130 (version "1.2.0")
44d10b1f
RW
7131 (source (origin
7132 (method url-fetch)
7133 (uri (pypi-uri "xlrd" version))
7134 (sha256
7135 (base32
3a2b1a3c 7136 "1ci93fda4n67qhdvfl16zasyxrpygzk53hs6m8z0rd4dxrnb6vjl"))))
44d10b1f
RW
7137 (build-system python-build-system)
7138 (arguments
7139 `(#:phases
7140 (modify-phases %standard-phases
3ccdd3a5
MO
7141 ;; Some tests depend on writing a temporary file to the user's home
7142 ;; directory.
3a2b1a3c
GL
7143 (add-after 'unpack 'fix-tests
7144 (lambda _
7145 (delete-file "tests/test_open_workbook.py")
7146 #t)))))
44d10b1f
RW
7147 (home-page "http://www.python-excel.org/")
7148 (synopsis "Library for extracting data from Excel files")
a0909286 7149 (description "This package provides a library to extract data from
44d10b1f
RW
7150spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
7151@samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
7152Unicode-aware. It is not intended as an end-user tool.")
7153 (license license:bsd-3)))
7154
7155(define-public python2-xlrd
7156 (package-with-python2 python-xlrd))
7157
7158(define-public python-prettytable
7159 (package
7160 (name "python-prettytable")
7161 (version "0.7.2")
7162 (source
7163 (origin
7164 (method url-fetch)
337c3a1e 7165 (uri (pypi-uri "prettytable" version ".tar.bz2"))
44d10b1f
RW
7166 (sha256
7167 (base32
7168 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
7169 (build-system python-build-system)
7170 (home-page "http://code.google.com/p/prettytable/")
7171 (synopsis "Display tabular data in an ASCII table format")
7172 (description
7173 "A library designed to represent tabular data in visually appealing ASCII
7174tables. PrettyTable allows for selection of which columns are to be printed,
7175independent alignment of columns (left or right justified or centred) and
7176printing of sub-tables by specifying a row range.")
7177 (license license:bsd-3)))
7178
7179(define-public python2-prettytable
7180 (package-with-python2 python-prettytable))
7181
7182(define-public python-tables
7183 (package
7184 (name "python-tables")
7185 (version "3.4.4")
7186 (source
7187 (origin
7188 (method url-fetch)
7189 (uri (pypi-uri "tables" version))
7190 (sha256
7191 (base32
7192 "0affz7k8babh8wdmsgrz5jxrd569by2w8ffimcxs9wiaf5rw1idx"))
7193 (modules '((guix build utils)))
7194 (snippet
7195 '(begin
7196 ;; Remove pre-compiled .pyc files from source.
7197 (for-each delete-file-recursively
7198 (find-files "." "__pycache__" #:directories? #t))
7199 (for-each delete-file (find-files "." "\\.pyc$"))
7200 #t))))
7201 (build-system python-build-system)
7202 (arguments
7203 `(;; FIXME: python-build-system does not pass configure-flags to "build"
7204 ;; or "check", so we must override the build and check phases.
7205 #:phases
7206 (modify-phases %standard-phases
7207 (add-after 'unpack 'use-gcc
7208 (lambda _
7209 (substitute* "setup.py"
7210 (("compiler = new_compiler\\(\\)" line)
7211 (string-append line
7212 "\ncompiler.set_executables(compiler='gcc',"
7213 "compiler_so='gcc',"
7214 "linker_exe='gcc',"
7215 "linker_so='gcc -shared')")))
7216 #t))
7217 (replace 'build
7218 (lambda* (#:key inputs #:allow-other-keys)
35d79d61
RW
7219 (invoke "python" "setup.py" "build"
7220 (string-append "--hdf5="
7221 (assoc-ref inputs "hdf5")))))
44d10b1f
RW
7222 (replace 'check
7223 (lambda* (#:key inputs #:allow-other-keys)
35d79d61
RW
7224 (invoke "python" "setup.py" "check"
7225 (string-append "--hdf5="
7226 (assoc-ref inputs "hdf5"))))))))
44d10b1f
RW
7227 (propagated-inputs
7228 `(("python-numexpr" ,python-numexpr)
7229 ("python-numpy" ,python-numpy)))
7230 (native-inputs
7231 `(("python-cython" ,python-cython)
7232 ("pkg-config" ,pkg-config)))
7233 (inputs
7234 `(("hdf5" ,hdf5)
7235 ("bzip2" ,bzip2)
7236 ("zlib" ,zlib)))
7237 (home-page "http://www.pytables.org/")
7238 (synopsis "Hierarchical datasets for Python")
7239 (description "PyTables is a package for managing hierarchical datasets and
7240designed to efficiently cope with extremely large amounts of data.")
7241 (license license:bsd-3)))
7242
7243(define-public python2-tables
7244 (package-with-python2 python-tables))
7245
7246(define-public python-pyasn1
7247 (package
7248 (name "python-pyasn1")
7249 (version "0.4.3")
7250 (source
7251 (origin
7252 (method url-fetch)
7253 (uri (pypi-uri "pyasn1" version))
7254 (sha256
7255 (base32
7256 "1z5h38anjzzrxpraa9iq9llffyx2zs8gx0q6dc1g029miwnn50gv"))))
7257 (build-system python-build-system)
7258 (home-page "http://pyasn1.sourceforge.net/")
7259 (synopsis "ASN.1 types and codecs")
7260 (description
7261 "This is an implementation of ASN.1 types and codecs in Python. It is
7262suitable for a wide range of protocols based on the ASN.1 specification.")
7263 (license license:bsd-2)))
7264
7265(define-public python2-pyasn1
7266 (package-with-python2 python-pyasn1))
7267
7268(define-public python-pyasn1-modules
7269 (package
7270 (name "python-pyasn1-modules")
7271 (version "0.2.2")
7272 (source
7273 (origin
7274 (method url-fetch)
7275 (uri (pypi-uri "pyasn1-modules" version))
7276 (sha256
7277 (base32
7278 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
7279 (build-system python-build-system)
7280 (propagated-inputs
7281 `(("python-pyasn1" ,python-pyasn1)))
7282 (home-page "https://sourceforge.net/projects/pyasn1/")
7283 (synopsis "ASN.1 codec implementations")
7284 (description
7285 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
7286implementations of ASN.1-based codecs and protocols.")
7287 (license license:bsd-3)))
7288
7289(define-public python2-pyasn1-modules
7290 (package-with-python2 python-pyasn1-modules))
7291
7292(define-public python-ipaddress
7293 (package
7294 (name "python-ipaddress")
7295 (version "1.0.22")
7296 (source (origin
7297 (method url-fetch)
7298 (uri (pypi-uri "ipaddress" version))
7299 (sha256
7300 (base32
7301 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
7302 (build-system python-build-system)
7303 (home-page "https://github.com/phihag/ipaddress")
7304 (synopsis "IP address manipulation library")
7305 (description
7306 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
7307 in Python. This library is used to create, poke at, and manipulate IPv4 and
7308 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
7309 module to older versions of Python.")
7310 (license license:psfl)))
7311
7312(define-public python2-ipaddress
7313 (package-with-python2 python-ipaddress))
7314
7315(define-public python2-ipaddr
7316 (package
7317 (name "python2-ipaddr")
7318 (version "2.1.11")
7319 (source
7320 (origin
7321 (method url-fetch)
7322 (uri (pypi-uri "ipaddr" version))
7323 (sha256
7324 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
7325 (build-system python-build-system)
7326 (arguments
7327 `(#:python ,python-2 ;version 2 only
7328 #:phases
7329 (modify-phases %standard-phases
7330 (replace 'check
40b8c4e3 7331 (lambda _ (invoke "python" "ipaddr_test.py"))))))
44d10b1f
RW
7332 (home-page "https://github.com/google/ipaddr-py")
7333 (synopsis "IP address manipulation library")
7334 (description
7335 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
7336IPv6 addresses and networks.
7337
7338For new implementations you may prefer to use the standard module
7339@code{ipaddress}, which was introduced in Python 3.3 and backported to older
7340versions of Python.")
7341 (license license:asl2.0)))
7342
7343(define-public python-idna
7344 (package
7345 (name "python-idna")
e95c9837 7346 (version "2.8")
44d10b1f
RW
7347 (source
7348 (origin
7349 (method url-fetch)
7350 (uri (pypi-uri "idna" version))
7351 (sha256
7352 (base32
e95c9837 7353 "01rlkigdxg17sf9yar1jl8n18ls59367wqh59hnawlyg53vb6my3"))))
44d10b1f
RW
7354 (build-system python-build-system)
7355 (home-page "https://github.com/kjd/idna")
7356 (synopsis "Internationalized domain names in applications")
7357 (description
7358 "This is a library to support the Internationalised Domain Names in
7359Applications (IDNA) protocol as specified in RFC 5891. This version of the
7360protocol is often referred to as “IDNA2008” and can produce different results
7361from the earlier standard from 2003. The library is also intended to act as a
7362suitable drop-in replacement for the “encodings.idna” module that comes with
7363the Python standard library but currently only supports the older 2003
7364specification.")
7365 (license license:bsd-4)))
7366
a76e6a69
JM
7367(define-public python-idna-2.7
7368 (package (inherit python-idna)
7369 (version "2.7")
7370 (source (origin
7371 (method url-fetch)
7372 (uri (pypi-uri "idna" version))
7373 (sha256
7374 (base32
7375 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))))
7376
7377
44d10b1f
RW
7378(define-public python2-idna
7379 (package-with-python2 python-idna))
7380
7381(define-public python-idna-ssl
7382 (package
7383 (name "python-idna-ssl")
7384 (version "1.0.1")
7385 (source
7386 (origin
7387 (method url-fetch)
7388 (uri (pypi-uri "idna-ssl" version))
7389 (sha256
7390 (base32
7391 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
7392 (build-system python-build-system)
7393 (arguments
7394 `(#:tests? #f)) ;circular dependency with python-aiohttp
7395 (home-page "https://github.com/aio-libs/idna-ssl")
7396 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
7397 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
7398domains support.")
7399 (license license:expat)))
7400
7401(define-public python-pretend
7402 (package
7403 (name "python-pretend")
7404 (version "1.0.9")
7405 (source
7406 (origin
7407 (method url-fetch)
9f1f22ee 7408 (uri (pypi-uri "pretend" version))
44d10b1f
RW
7409 (sha256
7410 (base32
7411 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
7412 (build-system python-build-system)
7413 (home-page "https://github.com/alex/pretend")
7414 (synopsis "Library for stubbing in Python")
7415 (description
7416 "Pretend is a library to make stubbing with Python easier. Stubbing is a
7417technique for writing tests. You may hear the term mixed up with mocks,
7418fakes, or doubles. Basically, a stub is an object that returns pre-canned
7419responses, rather than doing any computation.")
7420 (license license:bsd-3)))
7421
7422(define-public python2-pretend
7423 (package-with-python2 python-pretend))
7424
7425(define-public python-pip
7426 (package
7427 (name "python-pip")
0a193d32 7428 (version "20.0.2")
44d10b1f
RW
7429 (source
7430 (origin
7431 (method url-fetch)
7432 (uri (pypi-uri "pip" version))
7433 (sha256
7434 (base32
0a193d32 7435 "0zwnlsjn6mb742cr995zfbk9v56ygxp8w3k49601r9by9kmcic3x"))))
44d10b1f
RW
7436 (build-system python-build-system)
7437 (arguments
7438 '(#:tests? #f)) ; there are no tests in the pypi archive.
7439 (home-page "https://pip.pypa.io/")
7440 (synopsis "Package manager for Python software")
7441 (description
7442 "Pip is a package manager for Python software, that finds packages on the
7443Python Package Index (PyPI).")
7444 (license license:expat)))
7445
7446(define-public python2-pip
7447 (package-with-python2 python-pip))
7448
7449(define-public python-tlsh
7450 (package
7451 (name "python-tlsh")
7452 (version "3.4.5")
7453 (home-page "https://github.com/trendmicro/tlsh")
3e3ff8ad
TGR
7454 (source
7455 (origin
7456 (method git-fetch)
7457 (uri (git-reference
7458 (url "https://github.com/trendmicro/tlsh.git")
7459 (commit (string-append "v" version))))
7460 (file-name (git-file-name name version))
7461 (sha256
7462 (base32 "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll"))))
44d10b1f
RW
7463 (build-system cmake-build-system)
7464 (arguments
7465 '(#:out-of-source? #f
7466 #:phases (modify-phases %standard-phases
7467 (replace
7468 'install
7469 (lambda* (#:key outputs #:allow-other-keys)
7470 ;; Build and install the Python bindings. The underlying
7471 ;; C++ library is apparently not meant to be installed.
7472 (let ((out (assoc-ref outputs "out")))
7473 (with-directory-excursion "py_ext"
7474 (and (system* "python" "setup.py" "build")
7475 (system* "python" "setup.py" "install"
7476 (string-append "--prefix=" out))))))))))
7477 (inputs `(("python" ,python-wrapper))) ;for the bindings
7478 (synopsis "Fuzzy matching library for Python")
7479 (description
7480 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
7481Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
7482value which can be used for similarity comparisons. Similar objects have
7483similar hash values, which allows for the detection of similar objects by
7484comparing their hash values. The byte stream should have a sufficient amount
7485of complexity; for example, a byte stream of identical bytes will not generate
7486a hash value.")
7487 (license license:asl2.0)))
7488
7489(define-public python2-tlsh
7490 (package
7491 (inherit python-tlsh)
7492 (name "python2-tlsh")
7493 (inputs `(("python" ,python-2)))))
7494
7495(define-public python-termcolor
7496 (package
7497 (name "python-termcolor")
7498 (version "1.1.0")
7499 (source
7500 (origin
7501 (method url-fetch)
7502 (uri (pypi-uri "termcolor" version))
7503 (sha256
7504 (base32
7505 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
7506 (build-system python-build-system)
7507 (arguments
7508 ;; There are no tests.
7509 `(#:tests? #f))
7510 (home-page "https://pypi.python.org/pypi/termcolor")
7511 (synopsis "ANSII Color formatting for terminal output")
7512 (description
7513 "This package provides ANSII Color formatting for output in terminals.")
7514 (license license:expat)))
7515
7516(define-public python2-termcolor
7517 (package-with-python2 python-termcolor))
7518
7519(define-public python-libarchive-c
7520 (package
7521 (name "python-libarchive-c")
7522 (version "2.8")
7523 (source (origin
7524 (method url-fetch)
7525 (uri (pypi-uri "libarchive-c" version))
7526 (sha256
7527 (base32
7528 "0qg0v1s9c1xdk9philhnv8k6c6nicvnvfwlc0j9srg90jmdlvm06"))))
7529 (build-system python-build-system)
7530 (arguments
7531 '(#:phases (modify-phases %standard-phases
7532 (add-before
7533 'build 'reference-libarchive
7534 (lambda* (#:key inputs #:allow-other-keys)
7535 ;; Retain the absolute file name of libarchive.so.
7536 (let ((libarchive (assoc-ref inputs "libarchive")))
7537 (substitute* "libarchive/ffi.py"
7538 (("find_library\\('archive'\\)")
7539 (string-append "'" libarchive
7540 "/lib/libarchive.so'"))))))
7541 (replace 'check
7542 (lambda _ (invoke "pytest" "-vv"))))))
7543 (native-inputs
7544 `(("python-mock" ,python-mock)
7545 ("python-pytest" ,python-pytest)))
7546 (inputs
7547 `(("libarchive" ,libarchive)))
7548 (home-page "https://github.com/Changaco/python-libarchive-c")
7549 (synopsis "Python interface to libarchive")
7550 (description
7551 "This package provides Python bindings to libarchive, a C library to
7552access possibly compressed archives in many different formats. It uses
7553Python's @code{ctypes} foreign function interface (FFI).")
7554 (license license:lgpl2.0+)))
7555
7556(define-public python2-libarchive-c
7557 (package-with-python2 python-libarchive-c))
7558
7559(define-public python-file
7560 (package
7561 (inherit file)
7562 (name "python-file")
7563 (build-system python-build-system)
7564 (arguments
7565 '(#:tests? #f ;no tests
7566 #:configure-flags '("--single-version-externally-managed" "--root=/")
7567 #:phases (modify-phases %standard-phases
7568 (add-before 'build 'change-directory
7569 (lambda _
7570 (chdir "python")
7571 #t))
7572 (add-before 'build 'set-library-file-name
7573 (lambda* (#:key inputs #:allow-other-keys)
7574 (let ((file (assoc-ref inputs "file")))
7575 (substitute* "magic.py"
7576 (("find_library\\('magic'\\)")
7577 (string-append "'" file "/lib/libmagic.so'")))
7578 #t))))))
7579 (inputs `(("file" ,file)))
528ea990
LC
7580 (native-inputs (if (%current-target-system)
7581 `(("self" ,this-package))
7582 '()))
44d10b1f
RW
7583 (synopsis "Python bindings to the libmagic file type guesser. Note that
7584this module and the python-magic module both provide a \"magic.py\" file;
7585these two modules, which are different and were developed separately, both
7586serve the same purpose: provide Python bindings for libmagic.")))
7587
7588(define-public python2-file
7589 (package-with-python2 python-file))
7590
7591(define-public python-debian
7592 (package
7593 (name "python-debian")
7594 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
9f74bd31 7595 (version "0.1.36")
44d10b1f
RW
7596 (source
7597 (origin
9f74bd31
VC
7598 ;; Use git-fetch, as pypi doesn't include test suite.
7599 (method git-fetch)
7600 (uri (git-reference
7601 (url home-page)
7602 (commit version)))
7603 (file-name (git-file-name name version))
44d10b1f
RW
7604 (sha256
7605 (base32
9f74bd31 7606 "0qy6x28bj6yfikhjww932v5xq4mf5bm1iczl7acy4c7zm6mwhqfa"))))
44d10b1f 7607 (build-system python-build-system)
9f74bd31
VC
7608 (arguments
7609 `(#:phases (modify-phases %standard-phases
7610 (add-after 'unpack 'remove-debian-specific-tests
7611 ;; python-apt, apt and dpkg are not yet available in guix,
7612 ;; and these tests heavily depend on them.
7613 (lambda _
7614 (delete-file "lib/debian/tests/test_deb822.py")
7615 (delete-file "lib/debian/tests/test_debfile.py")
7616 #t)))))
44d10b1f 7617 (propagated-inputs
9f74bd31
VC
7618 `(("python-six" ,python-six)
7619 ("python-chardet" ,python-chardet)))
44d10b1f
RW
7620 (synopsis "Debian package related modules")
7621 (description
7622 ;; XXX: Use @enumerate instead of @itemize to work around
7623 ;; <http://bugs.gnu.org/21772>.
7624 "This package provides Python modules that abstract many formats of
7625Debian-related files, such as:
7626
7627@enumerate
7628@item Debtags information;
7629@item @file{debian/changelog} files;
7630@item packages files, pdiffs;
7631@item control files of single or multiple RFC822-style paragraphs---e.g.
7632 @file{debian/control}, @file{.changes}, @file{.dsc};
7633@item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
7634 contained files and meta-information.
7635@end enumerate\n")
7636
7637 ;; Modules are either GPLv2+ or GPLv3+.
7638 (license license:gpl3+)))
7639
44d10b1f
RW
7640(define-public python-nbformat
7641 (package
7642 (name "python-nbformat")
7643 (version "4.4.0")
7644 (source
7645 (origin
7646 (method url-fetch)
7647 (uri (pypi-uri "nbformat" version))
7648 (sha256
7649 (base32
7650 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
7651 (build-system python-build-system)
7652 (arguments `(#:tests? #f)) ; no test target
7653 (propagated-inputs
7654 `(("python-ipython-genutils" ,python-ipython-genutils)
7655 ("python-jsonschema" ,python-jsonschema)
7656 ("python-jupyter-core" ,python-jupyter-core)
7657 ("python-traitlets" ,python-traitlets)))
7658 (home-page "http://jupyter.org")
7659 (synopsis "Jupyter Notebook format")
7660 (description "This package provides the reference implementation of the
7661Jupyter Notebook format and Python APIs for working with notebooks.")
7662 (license license:bsd-3)))
7663
7664(define-public python2-nbformat
7665 (package-with-python2 python-nbformat))
7666
7667(define-public python-bleach
7668 (package
7669 (name "python-bleach")
ff0efc8f 7670 (version "3.1.0")
44d10b1f
RW
7671 (source
7672 (origin
7673 (method url-fetch)
7674 (uri (pypi-uri "bleach" version))
7675 (sha256
7676 (base32
ff0efc8f 7677 "1yhrgrhkln8bd6gn3imj69g1h4xqah9gaz9q26crqr6gmmvpzprz"))))
44d10b1f
RW
7678 (build-system python-build-system)
7679 (propagated-inputs
ff0efc8f 7680 `(("python-webencodings" ,python-webencodings)
44d10b1f
RW
7681 ("python-six" ,python-six)))
7682 (native-inputs
ff0efc8f
MB
7683 `(("python-pytest" ,python-pytest)
7684 ("python-pytest-runner" ,python-pytest-runner-2)))
44d10b1f
RW
7685 (home-page "https://github.com/jsocol/bleach")
7686 (synopsis "Whitelist-based HTML-sanitizing tool")
7687 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
7688 (license license:asl2.0)))
7689
7690(define-public python2-bleach
7691 (package-with-python2 python-bleach))
7692
7693(define-public python-entrypoints
7694 (package
7695 (name "python-entrypoints")
a7f1b718 7696 (version "0.3")
44d10b1f
RW
7697 (source
7698 (origin
7699 (method url-fetch)
a7f1b718 7700 (uri (pypi-uri "entrypoints" version))
44d10b1f
RW
7701 (sha256
7702 (base32
a7f1b718 7703 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
44d10b1f
RW
7704 (build-system python-build-system)
7705 ;; The package does not come with a setup.py file, so we have to generate
7706 ;; one ourselves.
7707 (arguments
7708 `(#:tests? #f
7709 #:phases
7710 (modify-phases %standard-phases
7711 (add-after 'unpack 'create-setup.py
7712 (lambda _
7713 (call-with-output-file "setup.py"
7714 (lambda (port)
7715 (format port "\
7716from setuptools import setup
7717setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
7718" ,version))))))))
7719 (home-page "https://github.com/takluyver/entrypoints")
7720 (synopsis "Discover and load entry points from installed Python packages")
7721 (description "Entry points are a way for Python packages to advertise
7722objects with some common interface. The most common examples are
7723@code{console_scripts} entry points, which define shell commands by
7724identifying a Python function to run. The @code{entrypoints} module contains
7725functions to find and load entry points.")
7726 (license license:expat)))
7727
7728(define-public python2-entrypoints
7729 (package-with-python2 python-entrypoints))
7730
7731(define-public python-nbconvert
7732 (package
7733 (name "python-nbconvert")
7734 (version "5.0.0b1")
7735 (source
7736 (origin
7737 (method url-fetch)
7738 (uri (pypi-uri "nbconvert" version))
7739 (sha256
7740 (base32
7741 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
7742 (build-system python-build-system)
7743 (arguments
7744 `(;; The "bdist_egg" target is disabled by default, causing the installation
7745 ;; to fail.
7746 #:configure-flags (list "bdist_egg")
7747 ;; FIXME: 5 failures, 40 errors.
7748 #:tests? #f))
7749 ;; #:phases
7750 ;; (modify-phases %standard-phases
7751 ;; (replace 'check
7752 ;; (lambda _
7753 ;; (zero? (system* "py.test" "-v")))))
7754 (native-inputs
7755 `(("python-pytest" ,python-pytest)))
7756 (propagated-inputs
7757 `(("python-bleach" ,python-bleach)
7758 ("python-entrypoints" ,python-entrypoints)
7759 ("python-jinja2" ,python-jinja2)
7760 ("python-jupyter-core" ,python-jupyter-core)
7761 ("python-mistune" ,python-mistune)
7762 ("python-nbformat" ,python-nbformat)
7763 ("python-pygments" ,python-pygments)
7764 ("python-traitlets" ,python-traitlets)))
7765 (home-page "http://jupyter.org")
7766 (synopsis "Converting Jupyter Notebooks")
7767 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
7768notebooks to various other formats via Jinja templates. It allows you to
7769convert an @code{.ipynb} notebook file into various static formats including:
7770
7771@enumerate
7772@item HTML
7773@item LaTeX
7774@item PDF
7775@item Reveal JS
7776@item Markdown (md)
7777@item ReStructured Text (rst)
7778@item executable script
7779@end enumerate\n")
7780 (license license:bsd-3)))
7781
7782(define-public python2-nbconvert
7783 (package-with-python2 python-nbconvert))
7784
44d10b1f
RW
7785(define-public python-notebook
7786 (package
7787 (name "python-notebook")
7788 (version "5.7.4")
7789 (source (origin
7790 (method url-fetch)
7791 (uri (pypi-uri "notebook" version))
7792 (sha256
7793 (base32
7794 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
7795 (build-system python-build-system)
7796 (arguments
7797 `(#:phases
7798 (modify-phases %standard-phases
7799 (replace 'check
7800 (lambda _
7801 ;; These tests require a browser
7802 (delete-file-recursively "notebook/tests/selenium")
7803 ;; Some tests need HOME
7804 (setenv "HOME" "/tmp")
7805 ;; This file contains "warningfilters", which are not supported
7806 ;; by this version of nose.
7807 (delete-file "setup.cfg")
7808 (with-directory-excursion "/tmp"
7809 (invoke "nosetests" "-v"))
7810 #t)))))
7811 (propagated-inputs
7812 `(("python-jupyter-core" ,python-jupyter-core)
7813 ("python-nbformat" ,python-nbformat)
7814 ("python-nbconvert" ,python-nbconvert)
7815 ("python-prometheus-client" ,python-prometheus-client)
7816 ("python-send2trash" ,python-send2trash)
7817 ("python-terminado" ,python-terminado)))
7818 (native-inputs
7819 `(("python-nose" ,python-nose)
7820 ("python-sphinx" ,python-sphinx)
7821 ("python-requests" ,python-requests)))
7822 (home-page "http://jupyter.org/")
7823 (synopsis "Web-based notebook environment for interactive computing")
7824 (description
7825 "The Jupyter HTML notebook is a web-based notebook environment for
7826interactive computing.")
7827 (properties `((python2-variant . ,(delay python2-notebook))))
7828 (license license:bsd-3)))
7829
7830(define-public python2-notebook
7831 (let ((base (package-with-python2
7832 (strip-python2-variant python-notebook))))
7833 (package (inherit base)
7834 (native-inputs
7835 `(("python2-mock" ,python2-mock)
7836 ,@(package-native-inputs base)))
7837 (arguments
7838 (substitute-keyword-arguments (package-arguments base)
7839 ((#:phases phases)
7840 `(modify-phases ,phases
7841 (add-before 'check 'disable-test-case
7842 ;; The test requires network access to localhost. Curiously it
7843 ;; fails with Python 2 only. Simply make the test-case return
7844 ;; immediately.
7845 (lambda _
7846 (substitute*
7847 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
7848 (("formats = self.nbconvert_api") "return #")))))))))))
7849
7850(define-public python-widgetsnbextension
7851 (package
7852 (name "python-widgetsnbextension")
7853 (version "3.4.2")
7854 (source
7855 (origin
7856 (method url-fetch)
7857 (uri (pypi-uri "widgetsnbextension" version))
7858 (sha256
7859 (base32
7860 "0rc2nivdy7k4m3vljx7wdh2jh11djapcgwhvzlbs0isl8gl8nqgs"))))
7861 (build-system python-build-system)
7862 (propagated-inputs
7863 `(("python-ipykernel" ,python-ipykernel)
7864 ("python-notebook" ,python-notebook)))
7865 (native-inputs
7866 `(("python-certifi" ,python-certifi)
7867 ("python-nose" ,python-nose)))
7868 (home-page "https://ipython.org")
7869 (synopsis "IPython HTML widgets for Jupyter")
7870 (description "This package provides interactive HTML widgets for Jupyter
7871notebooks.")
7872 (license license:bsd-3)))
7873
7874(define-public python2-widgetsnbextension
7875 (package-with-python2 python-widgetsnbextension))
7876
7877(define-public python-ipywidgets
7878 (package
7879 (name "python-ipywidgets")
7880 (version "5.2.2")
7881 (source
7882 (origin
7883 (method url-fetch)
7884 (uri (pypi-uri "ipywidgets" version))
7885 (sha256
7886 (base32
7887 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
7888 (build-system python-build-system)
7889 (propagated-inputs
7890 `(("python-ipython" ,python-ipython)
7891 ("python-traitlets" ,python-traitlets)
7892 ("python-widgetsnbextension" ,python-widgetsnbextension)))
7893 (native-inputs
7894 `(("python-nose" ,python-nose)
7895 ("python-pytest" ,python-pytest)))
7896 (home-page "https://ipython.org")
7897 (synopsis "IPython HTML widgets for Jupyter")
7898 (description "Ipywidgets are interactive HTML widgets for Jupyter
7899notebooks and the IPython kernel. Notebooks come alive when interactive
7900widgets are used. Users gain control of their data and can visualize changes
7901in the data.")
7902 (license license:bsd-3)))
7903
7904(define-public python2-ipywidgets
7905 (package-with-python2 python-ipywidgets))
7906
7907(define-public python-jupyter-console
7908 (package
7909 (name "python-jupyter-console")
becb9cbf 7910 (version "6.0.0")
44d10b1f
RW
7911 (source
7912 (origin
7913 (method url-fetch)
7914 (uri (pypi-uri "jupyter_console" version))
7915 (sha256
7916 (base32
becb9cbf 7917 "1xdjw11cppf1fxvwkw2bk13ckkwas3bdah8baingn9296mvfi31h"))))
44d10b1f 7918 (build-system python-build-system)
44d10b1f
RW
7919 (propagated-inputs
7920 `(("python-ipykernel" ,python-ipykernel)
7921 ("python-jupyter-client" ,python-jupyter-client)
becb9cbf 7922 ("python-prompt-toolkit" ,python-prompt-toolkit)
44d10b1f
RW
7923 ("python-pygments" ,python-pygments)))
7924 (native-inputs
7925 `(("python-nose" ,python-nose)))
7926 (home-page "https://jupyter.org")
7927 (synopsis "Jupyter terminal console")
7928 (description "This package provides a terminal-based console frontend for
7929Jupyter kernels. It also allows for console-based interaction with non-Python
7930Jupyter kernels such as IJulia and IRKernel.")
7931 (license license:bsd-3)))
7932
7933(define-public python2-jupyter-console
8e590c81
RW
7934 (package
7935 (name "python2-jupyter-console")
7936 (version "5.2.0")
7937 (source
7938 (origin
7939 (method url-fetch)
7940 (uri (pypi-uri "jupyter_console" version))
7941 (sha256
7942 (base32
7943 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
7944 (build-system python-build-system)
7945 ;; Tests only run in an TTY.
7946 (arguments `(#:tests? #f))
7947 (propagated-inputs
7948 `(("python2-ipykernel" ,python2-ipykernel)
7949 ("python2-jupyter-client" ,python2-jupyter-client)
7950 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
7951 ("python2-pygments" ,python2-pygments)))
7952 (native-inputs
7953 `(("python2-nose" ,python2-nose)))
7954 (home-page "https://jupyter.org")
7955 (synopsis "Jupyter terminal console")
7956 (description "This package provides a terminal-based console frontend for
7957Jupyter kernels. It also allows for console-based interaction with non-Python
7958Jupyter kernels such as IJulia and IRKernel.")
7959 (license license:bsd-3)))
44d10b1f
RW
7960
7961;; The python-ipython and python-jupyter-console require each other. To get
7962;; the functionality in both packages working, strip down the
7963;; python-jupyter-console package when using it as an input to python-ipython.
7964(define python-jupyter-console-minimal
7965 (package
7966 (inherit python-jupyter-console)
7967 (name "python-jupyter-console-minimal")
7968 (arguments
7969 (substitute-keyword-arguments
7970 (package-arguments python-jupyter-console)
7971 ((#:phases phases)
7972 `(modify-phases ,phases
7973 (add-after 'install 'delete-bin
7974 (lambda* (#:key outputs #:allow-other-keys)
7975 ;; Delete the bin files, to avoid conflicts in profiles
7976 ;; where python-ipython and python-jupyter-console are
7977 ;; both present.
7978 (delete-file-recursively
7979 (string-append
7980 (assoc-ref outputs "out") "/bin"))))))))
7981 ;; Remove the python-ipython propagated input, to avoid the cycle
7982 (propagated-inputs
7983 (alist-delete
7984 "python-ipython"
7985 (package-propagated-inputs python-jupyter-console)))))
7986
7987(define-public python-qtconsole
7988 (package
7989 (name "python-qtconsole")
7990 (version "4.4.3")
7991 (source
7992 (origin
7993 (method url-fetch)
7994 (uri (pypi-uri "qtconsole" version))
7995 (sha256
7996 (base32
7997 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
7998 (build-system python-build-system)
7999 (arguments
8000 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
8001 ;; but we only have the LTS version 5.x. This means that there might be
8002 ;; runtime errors, but since this is a dependency of the Jupyter package,
8003 ;; and Jupyter can be used without the qtconsole we can overlook this for
8004 ;; now.
8005 `(#:tests? #f
8006 #:phases
8007 (modify-phases %standard-phases
8008 (add-before 'check 'pre-check
8009 (lambda _
8010 (setenv "QT_QPA_PLATFORM" "offscreen")
8011 #t)))))
8012 (propagated-inputs
8013 `(("python-ipykernel" ,python-ipykernel)
8014 ("python-ipython" ,python-ipython)))
8015 (native-inputs
8016 `(("python-pytest" ,python-pytest)))
8017 (home-page "http://jupyter.org")
8018 (synopsis "Jupyter Qt console")
8019 (description "This package provides a Qt-based console for Jupyter with
8020support for rich media output.")
8021 (license license:bsd-3)))
8022
6ec87223
VC
8023(define-public python-jsbeautifier
8024 (package
8025 (name "python-jsbeautifier")
8026 (version "1.10.2")
8027 (home-page "https://github.com/beautify-web/js-beautify")
8028 (source (origin
8029 (method git-fetch)
8030 (uri (git-reference
8031 (url home-page)
8032 (commit (string-append "v" version))))
8033 (file-name (git-file-name name version))
8034 (sha256
8035 (base32
8036 "0wawb070ki1axb3jc9xvsrgpji52vcfif3zmjzc3z4g98m5xw4kg"))))
8037 (build-system python-build-system)
8038 (arguments
8039 `(#:phases (modify-phases %standard-phases
8040 (add-after 'unpack 'chdir
8041 (lambda _
8042 ;; The upstream Git repository contains all the code,
8043 ;; but this package only builds the python code.
8044 (chdir "python")
8045 #t))
8046 (add-after 'unpack 'patch-python-six-requirements
8047 (lambda _
8048 (substitute* "python/setup.py"
8049 (("six>=1.12.0")
8050 "six>=1.11.0"))
8051 #t)))))
8052 (propagated-inputs
8053 `(("python-editorconfig" ,python-editorconfig)
8054 ("python-six" ,python-six)))
8055 (native-inputs
8056 `(("python-pytest" ,python-pytest)))
8057 (synopsis "JavaScript unobfuscator and beautifier")
8058 (description "Beautify, unpack or deobfuscate JavaScript, leveraging
8059popular online obfuscators.")
8060 (license license:expat)))
8061
44d10b1f
RW
8062(define-public jupyter
8063 (package
8064 (name "jupyter")
8065 (version "1.0.0")
8066 (source
8067 (origin
8068 (method url-fetch)
8069 (uri (pypi-uri "jupyter" version))
8070 (sha256
8071 (base32
8072 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
8073 (build-system python-build-system)
8074 (arguments '(#:tests? #f)) ; there are none.
8075 (propagated-inputs
8076 `(("python-ipykernel" ,python-ipykernel)
8077 ("python-ipywidgets" ,python-ipywidgets)
8078 ("python-jupyter-console" ,python-jupyter-console)
8079 ("python-nbconvert" ,python-nbconvert)
8080 ("python-notebook" ,python-notebook)
8081 ("python-qtconsole" ,python-qtconsole)))
8082 (native-search-paths
8083 (list (search-path-specification
8084 (variable "JUPYTER_PATH")
8085 (files '("share/jupyter")))))
8086 (home-page "https://jupyter.org")
8087 (synopsis "Web application for interactive documents")
8088 (description
8089 "The Jupyter Notebook is a web application that allows you to create and
8090share documents that contain live code, equations, visualizations and
8091explanatory text. Uses include: data cleaning and transformation, numerical
8092simulation, statistical modeling, machine learning and much more.")
8093 (license license:bsd-3)))
8094
8095(define-public python-chardet
8096 (package
8097 (name "python-chardet")
8098 (version "3.0.4")
8099 (source
8100 (origin
8101 (method url-fetch)
8102 (uri (pypi-uri "chardet" version))
8103 (sha256
8104 (base32
8105 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
8106 (native-inputs
8107 `(("python-hypothesis" ,python-hypothesis)
8108 ("python-pytest" ,python-pytest)
8109 ("python-pytest-runner" ,python-pytest-runner)))
8110 (build-system python-build-system)
3d369407
MB
8111 ;; XXX: Incompatible with Pytest 4: <https://github.com/chardet/chardet/issues/173>.
8112 (arguments `(#:tests? #f))
44d10b1f
RW
8113 (home-page "https://github.com/chardet/chardet")
8114 (synopsis "Universal encoding detector for Python 2 and 3")
8115 (description
8116 "This package provides @code{chardet}, a Python module that can
8117automatically detect a wide range of file encodings.")
8118 (license license:lgpl2.1+)))
8119
8120(define-public python2-chardet
8121 (package-with-python2 python-chardet))
8122
8123(define-public python-docopt
8124 (package
8125 (name "python-docopt")
8126 (version "0.6.2")
8127 (source
8128 (origin
11e46326 8129 (method git-fetch)
44d10b1f 8130 ;; The release on PyPI does not include tests.
11e46326
EF
8131 (uri (git-reference
8132 (url "https://github.com/docopt/docopt")
8133 (commit version)))
8134 (file-name (git-file-name name version))
44d10b1f
RW
8135 (sha256
8136 (base32
11e46326 8137 "0aad9gbswnnhssin2q0m5lmpm0ahyf80ahs2zjigbn5y7fvljnd0"))))
44d10b1f
RW
8138 (build-system python-build-system)
8139 (native-inputs
8140 `(("python-pytest" ,python-pytest)))
8141 (arguments
8142 `(#:phases
8143 (modify-phases %standard-phases
8144 (replace 'check
8145 (lambda _ (invoke "py.test"))))))
8146 (home-page "http://docopt.org")
8147 (synopsis "Command-line interface description language for Python")
8148 (description "This library allows the user to define a command-line
8149interface from a program's help message rather than specifying it
4ca7207b 8150programmatically with command-line parsers like @code{getopt} and
44d10b1f
RW
8151@code{argparse}.")
8152 (license license:expat)))
8153
8154(define-public python2-docopt
8155 (package-with-python2 python-docopt))
8156
8157(define-public python-pythondialog
8158 (package
8159 (name "python-pythondialog")
8160 (version "3.4.0")
8161 (source
8162 (origin
8163 (method url-fetch)
8164 (uri (pypi-uri "pythondialog" version))
8165 (sha256
8166 (base32
8167 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
8168 (build-system python-build-system)
8169 (arguments
8170 `(#:phases
8171 (modify-phases %standard-phases
8172 (add-after 'unpack 'patch-path
8173 (lambda* (#:key inputs #:allow-other-keys)
8174 (let* ((dialog (assoc-ref inputs "dialog")))
8175 ;; Since this library really wants to grovel the search path, we
8176 ;; must hardcode dialog's store path into it.
8177 (substitute* "dialog.py"
8178 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
8179 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
8180 #t))))
8181 #:tests? #f)) ; no test suite
8182 (propagated-inputs
8183 `(("dialog" ,dialog)))
8184 (home-page "http://pythondialog.sourceforge.net/")
8185 (synopsis "Python interface to the UNIX dialog utility")
8186 (description "A Python wrapper for the dialog utility. Its purpose is to
8187provide an easy to use, pythonic and comprehensive Python interface to dialog.
8188This allows one to make simple text-mode user interfaces on Unix-like systems")
8189 (license license:lgpl2.1)
8190 (properties `((python2-variant . ,(delay python2-pythondialog))))))
8191
8192(define-public python2-pythondialog
8193 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
8194 (package
8195 (inherit base)
8196 (version (package-version python-pythondialog))
8197 (source (origin
8198 (method url-fetch)
8199 (uri (pypi-uri "python2-pythondialog" version))
8200 (sha256
8201 (base32
8202 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
8203
8204(define-public python-configobj
8205 (package
8206 (name "python-configobj")
8207 (version "5.0.6")
8208 (source (origin
8209 (method url-fetch)
b0758fbb 8210 (uri (pypi-uri "configobj" version))
44d10b1f
RW
8211 (sha256
8212 (base32
8213 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
8214 ;; Patch setup.py so it looks for python-setuptools, which is
8215 ;; required to parse the keyword 'install_requires' in setup.py.
8216 (patches (search-patches "python-configobj-setuptools.patch"))))
8217 (build-system python-build-system)
8218 (propagated-inputs
8219 `(("python-six" ,python-six)))
8220 (synopsis "Config file reading, writing and validation")
8221 (description "ConfigObj is a simple but powerful config file reader and
8222writer: an ini file round tripper. Its main feature is that it is very easy to
8223use, with a straightforward programmer’s interface and a simple syntax for
8224config files.")
8225 (home-page "https://github.com/DiffSK/configobj")
8226 (license license:bsd-3)))
8227
8228(define-public python2-configobj
8229 (package-with-python2 python-configobj))
8230
8231(define-public python-configargparse
8232 (package
8233 (name "python-configargparse")
86ae491f 8234 (version "0.14.0")
44d10b1f
RW
8235 (source (origin
8236 (method url-fetch)
8237 (uri (pypi-uri "ConfigArgParse" version))
8238 (sha256
8239 (base32
86ae491f 8240 "149fy4zya0rsnlkvxbbq43cyr8lscb5k4pj1m6n7f1grwcmzwbif"))))
44d10b1f
RW
8241 (build-system python-build-system)
8242 (native-inputs
8243 `(("python-pyyaml" ,python-pyyaml)))
8244 (arguments
8245 `(#:phases
8246 (modify-phases %standard-phases
8247 (replace 'check
8248 (lambda _
8249 ;; Bypass setuptools-shim because one test relies on "setup.py"
8250 ;; being the first argument passed to the python call.
8251 ;;
8252 ;; NOTE: Many tests do not run because they rely on Python's
8253 ;; built-in test.test_argparse, but we remove the unit tests from
8254 ;; our Python installation.
8255 (invoke "python" "setup.py" "test"))))))
8256 (synopsis "Replacement for argparse")
8257 (description "A drop-in replacement for argparse that allows options to also
8258be set via config files and/or environment variables.")
8259 (home-page "https://github.com/bw2/ConfigArgParse")
8260 (license license:expat)))
8261
8262(define-public python2-configargparse
8263 (package-with-python2 python-configargparse))
8264
8265(define-public python-argparse-manpage
8266 (package
8267 (name "python-argparse-manpage")
8268 (version "1.1")
8269 (source
8270 (origin
8271 (method url-fetch)
8272 (uri (pypi-uri "argparse-manpage" version))
8273 (sha256
8274 (base32
8275 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
8276 (build-system python-build-system)
8277 (home-page "https://github.com/praiskup/argparse-manpage")
8278 (synopsis "Build manual page from Python's ArgumentParser object")
8279 (description
8280 "This package provides tools to build manual pages from Python's
8281@code{ArgumentParser} object.")
8282 (license license:asl2.0)))
8283
3e8f76d8
RW
8284(define-public python-contextlib2
8285 (package
8286 (name "python-contextlib2")
8287 (version "0.5.5")
8288 (source
8289 (origin
8290 (method url-fetch)
8291 (uri (pypi-uri "contextlib2" version))
8292 (sha256
8293 (base32
8294 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
8295 (build-system python-build-system)
8296 (home-page "http://contextlib2.readthedocs.org/")
8297 (synopsis "Tools for decorators and context managers")
8298 (description "This module is primarily a backport of the Python
82993.2 contextlib to earlier Python versions. Like contextlib, it
8300provides utilities for common tasks involving decorators and context
8301managers. It also contains additional features that are not part of
8302the standard library.")
1e158ba1 8303 (properties `((python2-variant . ,(delay python2-contextlib2))))
3e8f76d8
RW
8304 (license license:psfl)))
8305
44d10b1f 8306(define-public python2-contextlib2
1e158ba1
EF
8307 (let ((base (package-with-python2
8308 (strip-python2-variant python-contextlib2))))
8309 (package
8310 (inherit base)
8311 (arguments
8312 (substitute-keyword-arguments (package-arguments base)
8313 ((#:phases phases)
8314 `(modify-phases ,phases
8315 (replace 'check
8316 (lambda _ (invoke "python" "test_contextlib2.py" "-v")))))))
8317 (native-inputs
8318 `(("python2-unittest2" ,python2-unittest2))))))
44d10b1f
RW
8319
8320(define-public python-texttable
8321 (package
8322 (name "python-texttable")
52cc4892 8323 (version "0.9.1")
44d10b1f
RW
8324 (source
8325 (origin
8326 (method url-fetch)
8327 (uri (pypi-uri "texttable" version))
8328 (sha256
8329 (base32
52cc4892 8330 "0yawv64c0zbawwv6zz84whb32fnb2n9jylwjcfsrcdgh7xvl340i"))))
44d10b1f
RW
8331 (build-system python-build-system)
8332 (arguments '(#:tests? #f)) ; no tests
8333 (home-page "https://github.com/foutaise/texttable/")
8334 (synopsis "Python module for creating simple ASCII tables")
8335 (description "Texttable is a Python module for creating simple ASCII
8336tables.")
8337 (license license:lgpl2.1+)))
8338
8339(define-public python2-texttable
8340 (package-with-python2 python-texttable))
8341
8342(define-public python-atomicwrites
8343 (package
8344 (name "python-atomicwrites")
14f10479 8345 (version "1.3.0")
44d10b1f
RW
8346 (source (origin
8347 (method url-fetch)
8348 (uri (pypi-uri "atomicwrites" version))
8349 (sha256
8350 (base32
14f10479 8351 "19ngcscdf3jsqmpcxn6zl5b6anmsajb6izp1smcd1n02midl9abm"))))
44d10b1f
RW
8352 (build-system python-build-system)
8353 (synopsis "Atomic file writes in Python")
8354 (description "Library for atomic file writes using platform dependent tools
8355for atomic file system operations.")
8356 (home-page "https://github.com/untitaker/python-atomicwrites")
8357 (license license:expat)))
8358
8359(define-public python2-atomicwrites
8360 (package-with-python2 python-atomicwrites))
8361
8362(define-public python-click-threading
8363 (package
8364 (name "python-click-threading")
8365 (version "0.4.4")
8366 (source (origin
8367 (method url-fetch)
8368 (uri (pypi-uri "click-threading" version))
8369 (sha256
8370 (base32
8371 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
8372 (build-system python-build-system)
8373 (propagated-inputs
8374 `(("python-click" ,python-click)))
8375 (synopsis "Utilities for multithreading in Click")
8376 (description "This package provides utilities for multithreading in Click
8377applications.")
8378 (home-page "https://github.com/click-contrib/click-threading")
8379 (license license:expat)))
8380
8381(define-public python-click-log
8382 (package
8383 (name "python-click-log")
8384 (version "0.3.2")
8385 (source (origin
8386 (method url-fetch)
8387 (uri (pypi-uri "click-log" version))
8388 (sha256
8389 (base32
8390 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
8391 (build-system python-build-system)
8392 (propagated-inputs
8393 `(("python-click" ,python-click)))
8394 (synopsis "Logging for click applications")
8395 (description "This package provides a Python library for logging Click
8396applications.")
8397 (home-page "https://github.com/click-contrib/click-log")
8398 (license license:expat)))
8399
8400(define-public python-apipkg
8401 (package
8402 (name "python-apipkg")
8403 (version "1.4")
8404 (source (origin
8405 (method url-fetch)
8406 (uri (pypi-uri "apipkg" version))
8407 (sha256
8408 (base32
8409 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
8410 (build-system python-build-system)
8411 (native-inputs
8412 `(("python-pytest" ,python-pytest)))
8413 (synopsis "Namespace control and lazy-import mechanism")
8414 (description "With apipkg you can control the exported namespace of a Python
8415package and greatly reduce the number of imports for your users. It is a small
8416pure Python module that works on virtually all Python versions.")
8417 (home-page "https://github.com/pytest-dev/apipkg")
8418 (license license:expat)))
8419
8420(define-public python2-apipkg
8421 (package-with-python2 python-apipkg))
8422
8423(define-public python-execnet
8424 (package
8425 (name "python-execnet")
8426 (version "1.4.1")
8427 (source (origin
8428 (method url-fetch)
8429 (uri (pypi-uri "execnet" version))
8430 (sha256
8431 (base32
8432 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
8433 (build-system python-build-system)
8434 (arguments
8435 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
8436 ;; The two test failures are caused by the lack of an `ssh` executable.
8437 ;; The test suite can be run with pytest after the 'install' phase.
8438 #:tests? #f))
8439 (native-inputs
8440 `(("python-pytest" ,python-pytest)
8441 ("python-setuptools-scm" ,python-setuptools-scm)))
8442 (propagated-inputs
8443 `(("python-apipkg" ,python-apipkg)))
8444 (synopsis "Rapid multi-Python deployment")
8445 (description "Execnet provides a share-nothing model with
8446channel-send/receive communication for distributing execution across many
8447Python interpreters across version, platform and network barriers. It has a
8448minimal and fast API targeting the following uses:
8449@enumerate
8450@item distribute tasks to (many) local or remote CPUs
8451@item write and deploy hybrid multi-process applications
8452@item write scripts to administer multiple environments
8453@end enumerate")
8454 (home-page "http://codespeak.net/execnet/")
8455 (license license:expat)))
8456
8457(define-public python2-execnet
8458 (package-with-python2 python-execnet))
8459
8460(define-public python-icalendar
8461 (package
8462 (name "python-icalendar")
43ae8f79 8463 (version "4.0.4")
44d10b1f
RW
8464 (source (origin
8465 (method url-fetch)
8466 (uri (pypi-uri "icalendar" version))
8467 (sha256
8468 (base32
43ae8f79 8469 "16gjvqv0n05jrb9g228pdjgzd3amz2pdhvcgsn1jypszjg5m2w9l"))))
44d10b1f
RW
8470 (build-system python-build-system)
8471 (propagated-inputs
8472 `(("python-dateutil" ,python-dateutil)
8473 ("python-pytz" ,python-pytz)))
8474 (synopsis "Python library for parsing iCalendar files")
8475 (description "The icalendar package is a parser/generator of iCalendar
8476files for use with Python.")
8477 (home-page "https://github.com/collective/icalendar")
8478 (license license:bsd-2)))
8479
44d10b1f
RW
8480(define-public python-args
8481 (package
8482 (name "python-args")
8483 (version "0.1.0")
8484 (source (origin
8485 (method url-fetch)
8486 (uri (pypi-uri "args" version))
8487 (sha256
8488 (base32
8489 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
8490 (build-system python-build-system)
8491 (home-page "https://github.com/kennethreitz/args")
8492 (synopsis "Command-line argument parser")
8493 (description
8494 "This library provides a Python module to parse command-line arguments.")
8495 (license license:bsd-3)))
8496
8497(define-public python2-args
8498 (package-with-python2 python-args))
8499
8500(define-public python-clint
8501 (package
8502 (name "python-clint")
8503 (version "0.5.1")
8504 (source (origin
8505 (method url-fetch)
8506 (uri (pypi-uri "clint" version))
8507 (sha256
8508 (base32
8509 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
8510 (build-system python-build-system)
8511 (arguments
8512 '(#:phases
8513 (modify-phases %standard-phases
8514 (replace 'check
8515 (lambda _ (invoke "py.test" "-v"))))))
8516 (native-inputs
8517 `(("python-pytest" ,python-pytest)))
8518 (propagated-inputs
8519 `(("python-args" ,python-args)))
8520 (home-page "https://github.com/kennethreitz/clint")
8521 (synopsis "Command-line interface tools")
8522 (description
8523 "Clint is a Python module filled with a set of tools for developing
8524command-line applications, including tools for colored and indented
8525output, progress bar display, and pipes.")
8526 (license license:isc)))
8527
8528(define-public python2-clint
8529 (package-with-python2 python-clint))
8530
44d10b1f
RW
8531(define-public python-rply
8532 (package
8533 (name "python-rply")
8534 (version "0.7.5")
8535 (source (origin
8536 (method url-fetch)
8537 (uri (pypi-uri "rply" version))
8538 (sha256
8539 (base32
8540 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
8541 (build-system python-build-system)
8542 (propagated-inputs
8543 `(("python-appdirs" ,python-appdirs)))
8544 (home-page "https://github.com/alex/rply")
8545 (synopsis "Parser generator for Python")
8546 (description
8547 "This package provides a pure Python based parser generator, that also
8548works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
8549with a new public API, and RPython support.")
8550 (license license:bsd-3)))
8551
8552(define-public python2-rply
8553 (package-with-python2 python-rply))
8554
8555(define-public python-hy
8556 (package
8557 (name "python-hy")
c215051d 8558 (version "0.17.0")
44d10b1f
RW
8559 (source (origin
8560 (method url-fetch)
8561 (uri (pypi-uri "hy" version))
8562 (sha256
8563 (base32
c215051d 8564 "1gdbqsirsdxj320wnp7my5awzs1kfs6m4fqmkzbd1zd47qzj0zfi"))))
44d10b1f
RW
8565 (build-system python-build-system)
8566 (arguments
8567 '(#:phases
8568 (modify-phases %standard-phases
6ba6a1c1
JG
8569 (add-before 'install 'set-HOME
8570 (lambda _
8571 (setenv "HOME" "/tmp")))
44d10b1f
RW
8572 (replace 'check
8573 (lambda _
8574 ;; Tests require write access to HOME.
8575 (setenv "HOME" "/tmp")
8576 (invoke "nosetests"))))))
8577 (native-inputs
8578 `(("python-coverage" ,python-coverage)
8579 ("python-nose" ,python-nose)))
8580 (propagated-inputs
8581 `(("python-astor" ,python-astor)
8582 ("python-clint" ,python-clint)
c215051d
JG
8583 ("python-rply" ,python-rply)
8584 ("python-fastentrypoints"
8585 ,python-fastentrypoints)
8586 ("python-funcparserlib"
8587 ,python-funcparserlib)))
44d10b1f
RW
8588 (home-page "http://hylang.org/")
8589 (synopsis "Lisp frontend to Python")
8590 (description
8591 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
8592its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
8593Python at your fingertips, in Lisp form.")
8594 (license license:expat)))
8595
8596(define-public python2-hy
8597 (package-with-python2 python-hy))
8598
8599(define-public python2-functools32
8600 (package
8601 (name "python2-functools32")
8602 (version "3.2.3-2")
8603 (source
8604 (origin
8605 (method url-fetch)
8606 (uri (pypi-uri "functools32" version))
8607 (sha256
8608 (base32
8609 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
8610 (build-system python-build-system)
8611 (arguments
8612 `(#:python ,python-2
8613 #:tests? #f)) ; no test target
8614 (home-page "https://github.com/MiCHiLU/python-functools32")
8615 (synopsis
8616 "Backport of the functools module from Python 3.2.3")
8617 (description
8618 "This package is a backport of the @code{functools} module from Python
86193.2.3 for use with older versions of Python and PyPy.")
8620 (license license:expat)))
8621
8622(define-public python2-subprocess32
8623 (package
8624 (name "python2-subprocess32")
8625 (version "3.2.7")
8626 (source (origin
8627 (method url-fetch)
8628 (uri (pypi-uri "subprocess32" version))
8629 (sha256
8630 (base32
8631 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
8632 (patches
8633 (search-patches "python2-subprocess32-disable-input-test.patch"))))
8634 (build-system python-build-system)
8635 (arguments
8636 `(#:python ,python-2
8637 ;; The test suite fails with Python > 2.7.13:
8638 ;; import test.support
8639 ;; ImportError: No module named support
8640 #:tests? #f
8641 #:phases
8642 (modify-phases %standard-phases
8643 (add-after 'unpack 'patch-/bin/sh
8644 (lambda _
8645 (substitute* '("subprocess32.py"
8646 "test_subprocess32.py")
8647 (("/bin/sh") (which "sh")))
8648 #t)))))
8649 (home-page "https://github.com/google/python-subprocess32")
8650 (synopsis "Backport of the subprocess module from Python 3.2")
8651 (description
8652 "This is a backport of the @code{subprocess} standard library module
8653from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
8654new features. On POSIX systems it is guaranteed to be reliable when used
8655in threaded applications. It includes timeout support from Python 3.3 but
8656otherwise matches 3.2’s API.")
8657 (license license:psfl)))
8658
8659(define-public python2-futures
8660 (package
8661 (name "python2-futures")
8662 (version "3.2.0")
8663 (source
8664 (origin
8665 (method url-fetch)
8666 (uri (pypi-uri "futures" version))
8667 (sha256
8668 (base32
8669 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
8670 (build-system python-build-system)
ba88eea2
RW
8671 (arguments
8672 `(#:python ,python-2
8673 #:phases
8674 (modify-phases %standard-phases
8675 (replace 'check
8676 (lambda _
8677 (invoke "python" "test_futures.py")
8678 #t)))))
44d10b1f
RW
8679 (home-page "https://github.com/agronholm/pythonfutures")
8680 (synopsis
8681 "Backport of the concurrent.futures package from Python 3.2")
8682 (description
8683 "The concurrent.futures module provides a high-level interface for
8684asynchronously executing callables. This package backports the
8685concurrent.futures package from Python 3.2")
8686 (license license:bsd-3)))
8687
8688(define-public python-promise
8689 (package
8690 (name "python-promise")
8691 (version "0.4.2")
8692 (source
8693 (origin
8694 (method url-fetch)
8695 (uri (pypi-uri "promise" version))
8696 (sha256
8697 (base32
8698 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
8699 (build-system python-build-system)
8700 ;; Tests wants python-futures, which is a python2 only program, and
8701 ;; can't be found by python-promise at test time.
8702 (arguments `(#:tests? #f))
8703 (home-page "https://github.com/syrusakbary/promise")
8704 (synopsis "Promises/A+ implementation for Python")
8705 (description
8706 "Promises/A+ implementation for Python")
8707 (properties `((python2-variant . ,(delay python2-promise))))
8708 (license license:expat)))
8709
8710(define-public python2-promise
8711 (let ((promise (package-with-python2
8712 (strip-python2-variant python-promise))))
8713 (package (inherit promise)
8714 (arguments (substitute-keyword-arguments (package-arguments promise)
8715 ((#:tests? _) #t)))
8716 (native-inputs
8717 `(("python2-futures" ,python2-futures)
8718 ("python2-pytest" ,python2-pytest)
8719 ,@(package-native-inputs promise))))))
8720
d71d85cd
RW
8721(define-public python-progressbar33
8722 (package
8723 (name "python-progressbar33")
8724 (version "2.4")
8725 (source
8726 (origin
8727 (method url-fetch)
8728 (uri (pypi-uri "progressbar33" version))
8729 (sha256
8730 (base32
8731 "1zvf6zs5hzrc03p9nfs4p16vhilqikycvv1yk0pxn8s07fdhvzji"))))
8732 (build-system python-build-system)
8733 (home-page "http://github.com/germangh/python-progressbar")
8734 (synopsis "Text progress bar library for Python")
8735 (description
8736 "This package provides a text progress bar library for Python. This
8737version only differs from the original @code{progressbar} package in that it
8738uses relative package imports instead of absolute imports, which is necessary
8739for the module to work under Python 3.3.")
8740 ;; Either or both of these licenses may be selected.
8741 (license (list license:lgpl2.1+ license:bsd-3))))
8742
44d10b1f
RW
8743(define-public python-colorama
8744 (package
8745 (name "python-colorama")
8746 (version "0.3.9")
8747 (source
8748 (origin
8749 (method url-fetch)
8750 (uri (pypi-uri "colorama" version))
8751 (sha256
8752 (base32
8753 "1wd1szk0z3073ghx26ynw43gnc140ibln1safgsis6s6z3s25ss8"))))
8754 (build-system python-build-system)
8755 (synopsis "Colored terminal text rendering for Python")
8756 (description "Colorama is a Python library for rendering colored terminal
8757text.")
8758 (home-page "https://pypi.python.org/pypi/colorama")
8759 (license license:bsd-3)))
8760
8761(define-public python2-colorama
8762 (package-with-python2 python-colorama))
8763
8764(define-public python-rsa
8765 (package
8766 (name "python-rsa")
8767 (version "3.4.2")
8768 (source
8769 (origin
8770 (method url-fetch)
8771 (uri (pypi-uri "rsa" version))
8772 (sha256
8773 (base32
8774 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
8775 (build-system python-build-system)
8776 (propagated-inputs
8777 `(("python-pyasn1" ,python-pyasn1)))
8778 (synopsis "Pure-Python RSA implementation")
8779 (description "Python-RSA is a pure-Python RSA implementation. It supports
8780encryption and decryption, signing and verifying signatures, and key
8781generation according to PKCS#1 version 1.5. It can be used as a Python
8782library as well as on the command line.")
8783 (home-page "https://stuvel.eu/rsa")
8784 (license license:asl2.0)))
8785
8786(define-public python2-rsa
8787 (package-with-python2 python-rsa))
8788
8789(define-public python-pluggy
8790 (package
8791 (name "python-pluggy")
e5731c03 8792 (version "0.11.0")
44d10b1f
RW
8793 (source
8794 (origin
8795 (method url-fetch)
8796 (uri (pypi-uri "pluggy" version))
8797 (sha256
8798 (base32
e5731c03 8799 "10511a54dvafw1jrk75mrhml53c7b7w4yaw7241696lc2hfvr895"))))
44d10b1f
RW
8800 (build-system python-build-system)
8801 (native-inputs
8802 `(("python-setuptools-scm" ,python-setuptools-scm)))
8803 (synopsis "Plugin and hook calling mechanism for Python")
8804 (description "Pluggy is an extraction of the plugin manager as used by
8805Pytest but stripped of Pytest specific details.")
8806 (home-page "https://pypi.python.org/pypi/pluggy")
8807 (license license:expat)))
8808
8809(define-public python2-pluggy
8810 (package-with-python2 python-pluggy))
8811
8812(define-public python-tox
8813 (package
8814 (name "python-tox")
8815 (version "2.8.1")
8816 (source
8817 (origin
8818 (method url-fetch)
8819 (uri (pypi-uri "tox" version))
8820 (sha256
8821 (base32
8822 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
8823 (build-system python-build-system)
8824 (arguments
8825 ;; FIXME: Tests require pytest-timeout, which itself requires
8826 ;; pytest>=2.8.0 for installation.
8827 '(#:tests? #f))
8828 (propagated-inputs
8829 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
8830 ("python-py" ,python-py)
8831 ("python-virtualenv" ,python-virtualenv)))
8832 (native-inputs
8833 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
8834 ("python-pytest" ,python-pytest) ; >= 2.3.5
8835 ("python-setuptools-scm" ,python-setuptools-scm)))
d81fb2ae 8836 (home-page "https://tox.readthedocs.io")
44d10b1f
RW
8837 (synopsis "Virtualenv-based automation of test activities")
8838 (description "Tox is a generic virtualenv management and test command line
8839tool. It can be used to check that a package installs correctly with
8840different Python versions and interpreters, or run tests in each type of
8841supported environment, or act as a frontend to continuous integration
8842servers.")
8843 (license license:expat)))
8844
8845(define-public python2-tox
8846 (package-with-python2 python-tox))
8847
8848(define-public python-jmespath
8849 (package
8850 (name "python-jmespath")
27fb781f 8851 (version "0.9.4")
44d10b1f
RW
8852 (source
8853 (origin
8854 (method url-fetch)
8855 (uri (pypi-uri "jmespath" version))
8856 (sha256
8857 (base32
27fb781f 8858 "0k0765x1mybcrzajh3hiqkl8sy9hs0bmn4900frxy0j3ykvaxqmx"))))
44d10b1f
RW
8859 (build-system python-build-system)
8860 (native-inputs
8861 `(("python-nose" ,python-nose)))
8862 (synopsis "JSON Matching Expressions")
8863 (description "JMESPath (pronounced “james path”) is a Python library that
8864allows one to declaratively specify how to extract elements from a JSON
8865document.")
8866 (home-page "https://github.com/jmespath/jmespath.py")
8867 (license license:expat)))
8868
8869(define-public python2-jmespath
8870 (package-with-python2 python-jmespath))
8871
8872(define-public python-botocore
8873 (package
7bcf827c
RW
8874 (name "python-botocore")
8875 (version "1.12.149")
8876 (source
8877 (origin
8878 (method url-fetch)
8879 (uri (pypi-uri "botocore" version))
8880 (sha256
8881 (base32
8882 "12597f74khp3ngwr282cb949w0gcqj20rkfc3x275dijavyy5cmf"))))
8883 (build-system python-build-system)
8884 (arguments
8885 ;; FIXME: Many tests are failing.
8886 '(#:tests? #f))
8887 (propagated-inputs
8888 `(("python-dateutil" ,python-dateutil)
8889 ("python-docutils" ,python-docutils)
8890 ("python-jmespath" ,python-jmespath)))
8891 (native-inputs
8892 `(("python-mock" ,python-mock)
8893 ("python-nose" ,python-nose)
8894 ("behave" ,behave)
8895 ("python-tox" ,python-tox)
8896 ("python-urllib3" ,python-urllib3)
8897 ("python-wheel" ,python-wheel)))
8898 (home-page "https://github.com/boto/botocore")
8899 (synopsis "Low-level interface to AWS")
8900 (description "Botocore is a Python library that provides a low-level
44d10b1f 8901interface to the Amazon Web Services (AWS) API.")
7bcf827c 8902 (license license:asl2.0)))
44d10b1f
RW
8903
8904(define-public python2-botocore
8905 (package-with-python2 python-botocore))
8906
8907(define-public python-xdo
8908 (package
8909 (name "python-xdo")
8910 (version "0.3")
8911 (source (origin
8912 (method url-fetch)
8913 (uri (string-append
8914 "http://http.debian.net/debian/pool/main/p/python-xdo/"
8915 "python-xdo_" version ".orig.tar.gz"))
8916 (sha256
8917 (base32
8918 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
8919 (build-system python-build-system)
8920 (arguments
8921 '(#:phases
8922 (modify-phases %standard-phases
8923 (add-before 'install 'patch-libxdo-path
8924 ;; Hardcode the path of dynamically loaded libxdo library.
8925 (lambda* (#:key inputs #:allow-other-keys)
8926 (let ((libxdo (string-append
8927 (assoc-ref inputs "xdotool")
8928 "/lib/libxdo.so")))
8929 (substitute* "xdo/_xdo.py"
8930 (("find_library\\(\"xdo\"\\)")
8931 (simple-format #f "\"~a\"" libxdo)))
8932 #t))))
8933 #:tests? #f)) ; no tests provided
8934 (propagated-inputs
8935 `(("python-six" ,python-six)))
8936 (inputs
8937 `(("xdotool" ,xdotool)
8938 ("libX11" ,libx11)))
8939 (home-page "https://tracker.debian.org/pkg/python-xdo")
8940 (synopsis "Python library for simulating X11 keyboard/mouse input")
8941 (description "Provides bindings to libxdo for manipulating X11 via simulated
8942input. (Note that this is mostly a legacy library; you may wish to look at
8943python-xdo for newer bindings.)")
8944 (license license:bsd-3)))
8945
8946(define-public python2-xdo
8947 (package-with-python2 python-xdo))
8948
8949(define-public python-mako
8950 (package
8951 (name "python-mako")
4d3c2cb7 8952 (version "1.1.1")
44d10b1f
RW
8953 (source
8954 (origin
8955 (method url-fetch)
8956 (uri (pypi-uri "Mako" version))
8957 (sha256
8958 (base32
4d3c2cb7 8959 "193mds7lv91pphnvn6c1n55rhjkgq94asdzgrsb2fiqx7rrsd119"))))
44d10b1f 8960 (build-system python-build-system)
6bf53ad5
MB
8961 (arguments
8962 `(#:phases (modify-phases %standard-phases
8963 (replace 'check
8964 (lambda _
8965 (invoke "pytest" "-vv"))))))
44d10b1f
RW
8966 (propagated-inputs
8967 `(("python-markupsafe" ,python-markupsafe)))
8968 (native-inputs
8969 `(("python-mock" ,python-mock)
44d10b1f 8970 ("python-pytest" ,python-pytest)))
7016e620 8971 (home-page "https://www.makotemplates.org/")
44d10b1f
RW
8972 (synopsis "Templating language for Python")
8973 (description "Mako is a templating language for Python that compiles
8974templates into Python modules.")
8975 (license license:expat)))
8976
8977(define-public python2-mako
8978 (package-with-python2 python-mako))
8979
8980(define-public python-waitress
8981 (package
8982 (name "python-waitress")
8983 (version "1.1.0")
8984 (source
8985 (origin
8986 (method url-fetch)
8987 (uri (pypi-uri "waitress" version))
8988 (patches (search-patches "python-waitress-fix-tests.patch"))
8989 (sha256
8990 (base32
8991 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
8992 (build-system python-build-system)
8993 (home-page "https://github.com/Pylons/waitress")
8994 (synopsis "Waitress WSGI server")
8995 (description "Waitress is meant to be a production-quality pure-Python WSGI
8996server with very acceptable performance.")
8997 (license license:zpl2.1)))
8998
8999(define-public python2-waitress
9000 (package-with-python2 python-waitress))
9001
b2b23d12
TLC
9002(define-public python-whichcraft
9003 (package
9004 (name "python-whichcraft")
9005 (version "0.6.1")
9006 (source
9007 (origin
9008 (method url-fetch)
9009 (uri (pypi-uri "whichcraft" version))
9010 (sha256
9011 (base32
9012 "11yfkzyplizdgndy34vyd5qlmr1n5mxis3a3svxmx8fnccdvknxc"))))
9013 (build-system python-build-system)
9014 (native-inputs
9015 `(("python-pytest" ,python-pytest)))
9016 (home-page "https://github.com/pydanny/whichcraft")
9017 (synopsis "Cross-platform cross-python shutil.which functionality")
9018 (description
9019 "This package provides a shim of the shutil.which function that's
9020designed to work across multiple versions of Python.")
9021 (license license:bsd-3)))
9022
1133ca44
TLC
9023(define-public python-cookiecutter
9024 (package
9025 (name "python-cookiecutter")
9026 (version "1.6.0")
9027 (source
9028 (origin
9029 (method url-fetch)
9030 (uri (pypi-uri "cookiecutter" version))
9031 (sha256
9032 (base32
9033 "0glsvaz8igi2wy1hsnhm9fkn6560vdvdixzvkq6dn20z3hpaa5hk"))))
9034 (build-system python-build-system)
9035 (native-inputs
9036 `(("python-freezegun" ,python-freezegun)
9037 ("python-pytest" ,python-pytest)
9038 ("python-pytest-catchlog" ,python-pytest-catchlog)
9039 ("python-pytest-cov" ,python-pytest-cov)
9040 ("python-pytest-mock" ,python-pytest-mock)))
9041 (propagated-inputs
9042 `(("python-binaryornot" ,python-binaryornot)
9043 ("python-click" ,python-click)
9044 ("python-future" ,python-future)
9045 ("python-jinja2" ,python-jinja2)
9046 ("python-jinja2-time" ,python-jinja2-time)
9047 ("python-poyo" ,python-poyo)
9048 ("python-requests" ,python-requests)
9049 ("python-whichcraft" ,python-whichcraft)))
9050 (home-page "https://github.com/audreyr/cookiecutter")
9051 (synopsis
9052 "Command-line utility that creates projects from project templates")
9053 (description
9054 "This package provides a command-line utility that creates projects from
9055project templates, e.g. creating a Python package project from a Python package
9056project template.")
9057 (license license:bsd-3)))
9058
44d10b1f
RW
9059(define-public python-pyquery
9060 (package
9061 (name "python-pyquery")
9062 (version "1.2.17")
9063 (source
9064 (origin
9065 (method url-fetch)
9066 (uri (pypi-uri "pyquery" version))
9067 (sha256
9068 (base32
9069 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
9070 (build-system python-build-system)
9071 (native-inputs
9072 `(("python-webob" ,python-webob)
9073 ("python-webtest" ,python-webtest)))
9074 (propagated-inputs
9075 `(("python-lxml" ,python-lxml)
9076 ("python-cssselect" ,python-cssselect)))
9077 (home-page "https://github.com/gawel/pyquery")
9078 (synopsis "Make jQuery-like queries on xml documents")
9079 (description "pyquery allows you to make jQuery queries on xml documents.
9080The API is as much as possible the similar to jQuery. pyquery uses lxml for
9081fast xml and html manipulation.")
9082 (license license:bsd-3)))
9083
44d10b1f
RW
9084(define-public python-anyjson
9085 (package
9086 (name "python-anyjson")
9087 (version "0.3.3")
9088 (source
9089 (origin
9090 (method url-fetch)
9091 (uri (pypi-uri "anyjson" version))
9092 (sha256
9093 (base32
9094 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
9095 (build-system python-build-system)
9096 (arguments
9097 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
9098 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
9099 ;; whatever) so this transformation needs to be done before the tests
9100 ;; can be run. Maybe we could add a build step to transform beforehand
9101 ;; but it could be annoying/difficult.
9102 ;; We can enable tests for the Python 2 version, though, and do below.
9103 #:tests? #f))
9104 (home-page "https://bitbucket.org/runeh/anyjson/")
9105 (synopsis
9106 "Wraps best available JSON implementation in a common interface")
9107 (description
9108 "Anyjson loads whichever is the fastest JSON module installed
9109and provides a uniform API regardless of which JSON implementation is used.")
9110 (license license:bsd-3)
9111 (properties `((python2-variant . ,(delay python2-anyjson))))))
9112
9113(define-public python2-anyjson
9114 (let ((anyjson (package-with-python2
9115 (strip-python2-variant python-anyjson))))
9116 (package
9117 (inherit anyjson)
9118 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
9119 #:tests? #t
9120 ,@(package-arguments anyjson)))
9121 (native-inputs `(("python2-nose" ,python2-nose))))))
9122
9123(define-public python-amqp
9124 (package
9125 (name "python-amqp")
9126 (version "2.3.2")
9127 (source
9128 (origin
9129 (method url-fetch)
9130 (uri (pypi-uri "amqp" version))
9131 (sha256
9132 (base32
9133 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
9134 (build-system python-build-system)
9135 (native-inputs
9136 `(("python-case" ,python-case)
9137 ("python-pytest-sugar" ,python-pytest-sugar)
9138 ("python-mock" ,python-mock)))
9139 (propagated-inputs
9140 `(("python-vine" ,python-vine)))
9141 (home-page "https://github.com/celery/py-amqp")
9142 (synopsis
9143 "Low-level AMQP client for Python (fork of amqplib)")
9144 (description
9145 "This is a fork of amqplib which was originally written by Barry Pederson.
9146It is maintained by the Celery project, and used by kombu as a pure python
9147alternative when librabbitmq is not available.")
9148 (license license:lgpl2.1+)
9149 (properties `((python2-variant . ,(delay python2-amqp))))))
9150
9151(define-public python2-amqp
9152 (let ((amqp (package-with-python2
9153 (strip-python2-variant python-amqp))))
9154 (package
9155 (inherit amqp)
9156 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
9157 ;; unmaintained. Weirdly, does not do this on the python 3
9158 ;; version?
9159 #:tests? #f
9160 ,@(package-arguments amqp))))))
9161
9162(define-public python-txamqp
9163 (package
9164 (name "python-txamqp")
9165 (version "0.8.2")
9166 (source
9167 (origin
9168 (method url-fetch)
9169 (uri (pypi-uri "txAMQP" version))
9170 (sha256
9171 (base32
9172 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
9173 (build-system python-build-system)
9174 (propagated-inputs
9175 `(("python-six" ,python-six)
9176 ("python-twisted" ,python-twisted)))
9177 (home-page "https://github.com/txamqp/txamqp")
9178 (synopsis "Communicate with AMQP peers and brokers using Twisted")
9179 (description
9180 "This package provides a Python library for communicating with AMQP peers
9181and brokers using the asynchronous networking framework Twisted. It contains
9182all the necessary code to connect, send and receive messages to/from an
9183AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
9184also includes support for using Thrift RPC over AMQP in Twisted
9185applications.")
9186 (license license:asl2.0)))
9187
9188(define-public python2-txamqp
9189 (package-with-python2 python-txamqp))
9190
9191(define-public python-kombu
9192 (package
9193 (name "python-kombu")
9194 (version "4.2.2")
9195 (source
9196 (origin
9197 (method url-fetch)
9198 (uri (pypi-uri "kombu" version))
9199 (sha256
9200 (base32
9201 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
9202 (build-system python-build-system)
9203 (native-inputs
9204 `(("python-mock" ,python-mock)
9205 ("python-case" ,python-case)
9206 ("python-pyro4" ,python-pyro4)
9207 ("python-pytest-sugar" ,python-pytest-sugar)
9208 ("python-pytz" ,python-pytz)))
9209 (propagated-inputs
9210 `(("python-anyjson" ,python-anyjson)
9211 ("python-amqp" ,python-amqp)
9212 ("python-redis" ,python-redis)))
9213 (home-page "https://kombu.readthedocs.io")
9214 (synopsis "Message passing library for Python")
9215 (description "The aim of Kombu is to make messaging in Python as easy as
9216possible by providing an idiomatic high-level interface for the AMQ protocol,
9217and also provide proven and tested solutions to common messaging problems.
9218AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
9219message orientation, queuing, routing, reliability and security, for which the
9220RabbitMQ messaging server is the most popular implementation.")
9221 (license license:bsd-3)
9222 (properties `((python2-variant . ,(delay python2-kombu))))))
9223
9224(define-public python2-kombu
9225 (let ((kombu (package-with-python2
9226 (strip-python2-variant python-kombu))))
9227 (package
9228 (inherit kombu)
9229 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
9230 ;; It works fine on the python3 variant.
9231 #:tests? #f
9232 ,@(package-arguments kombu)))
9233 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9234 ,@(package-native-inputs kombu))))))
9235
9236(define-public python-billiard
9237 (package
9238 (name "python-billiard")
9239 (version "3.5.0.5")
9240 (source
9241 (origin
9242 (method url-fetch)
9243 (uri (pypi-uri "billiard" version))
9244 (sha256
9245 (base32
9246 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
9247 (build-system python-build-system)
9248 (native-inputs
9249 `(("python-case" ,python-case)
9250 ("python-pytest" ,python-pytest)))
9251 (home-page "https://github.com/celery/billiard")
9252 (synopsis
9253 "Python multiprocessing fork with improvements and bugfixes")
9254 (description
9255 "Billiard is a fork of the Python 2.7 multiprocessing package. The
9256multiprocessing package itself is a renamed and updated version of R Oudkerk's
9257pyprocessing package. This standalone variant is intended to be compatible with
9258Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
9259 (license license:bsd-3)
9260 (properties `((python2-variant . ,(delay python2-billiard))))))
9261
9262(define-public python2-billiard
9263 (let ((billiard (package-with-python2
9264 (strip-python2-variant python-billiard))))
9265 (package
9266 (inherit billiard)
9267 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9268 ("python2-mock" ,python2-mock)
9269 ,@(package-native-inputs billiard))))))
9270
9271(define-public python-celery
9272 (package
9273 (name "python-celery")
9274 (version "4.2.1")
9275 (source
9276 (origin
9277 (method url-fetch)
9278 (uri (pypi-uri "celery" version))
9279 (sha256
9280 (base32
9281 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
9282 (build-system python-build-system)
9283 (arguments
9284 '(;; TODO The tests fail with Python 3.7
9285 ;; https://github.com/celery/celery/issues/4849
9286 #:tests? #f
9287 #:phases
9288 (modify-phases %standard-phases
9289 (add-after 'unpack 'patch-requirements
9290 (lambda _
9291 (substitute* "requirements/test.txt"
9292 (("pytest>=3\\.0,<3\\.3")
9293 "pytest>=3.0"))
9294 #t)))))
9295 (native-inputs
9296 `(("python-case" ,python-case)
9297 ("python-pytest" ,python-pytest)))
9298 (propagated-inputs
9299 `(("python-pytz" ,python-pytz)
9300 ("python-billiard" ,python-billiard)
9301 ("python-kombu" ,python-kombu)))
9302 (home-page "https://celeryproject.org")
9303 (synopsis "Distributed Task Queue")
9304 (description "Celery is an asynchronous task queue/job queue based on
9305distributed message passing. It is focused on real-time operation, but
9306supports scheduling as well. The execution units, called tasks, are executed
9307concurrently on a single or more worker servers using multiprocessing,
9308Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
9309synchronously (wait until ready).")
9310 (license license:bsd-3)
9311 (properties `((python2-variant . ,(delay python2-celery))))))
9312
9313(define-public python2-celery
9314 (let ((celery (package-with-python2
9315 (strip-python2-variant python-celery))))
9316 (package
9317 (inherit celery)
9318 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9319 ("python2-mock" ,python2-mock)
9320 ,@(package-native-inputs celery))))))
9321
9322(define-public python-translitcodec
9323 (package
9324 (name "python-translitcodec")
9325 (version "0.4.0")
9326 (source
9327 (origin
9328 (method url-fetch)
9329 (uri (pypi-uri "translitcodec" version))
9330 (sha256
9331 (base32
9332 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
9333 (build-system python-build-system)
9334 (arguments
9335 `(#:tests? #f)) ; no tests provided
9336 (home-page
9337 "https://github.com/claudep/translitcodec")
9338 (synopsis
9339 "Unicode to 8-bit charset transliteration codec")
9340 (description
9341 "This package contains codecs for transliterating ISO 10646 texts into
9342best-effort representations using smaller coded character sets (ASCII,
9343ISO 8859, etc.).")
9344 (license license:expat)))
9345
9346(define-public python2-translitcodec
9347 (package-with-python2 python-translitcodec))
9348
9349(define-public python-editor
9350 (package
9351 (name "python-editor")
9352 (version "0.5")
9353 (source
9354 (origin
9355 (method url-fetch)
9356 (uri (pypi-uri "python-editor" version))
9357 (sha256
9358 (base32
9359 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
9360 (build-system python-build-system)
9361 (home-page
9362 "https://github.com/fmoo/python-editor")
9363 (synopsis
9364 "Programmatically open an editor, capture the result")
9365 (description
9366 "python-editor is a library that provides the editor module for
9367programmatically interfacing with your system's $EDITOR.")
9368 (license license:asl2.0)))
9369
9370(define-public python2-editor
9371 (package-with-python2 python-editor))
9372
44d10b1f
RW
9373(define-public python-vobject
9374 (package
9375 (name "python-vobject")
9376 (version "0.9.5")
9377 (source (origin
9378 (method url-fetch)
9379 (uri (pypi-uri "vobject" version))
9380 (sha256
9381 (base32
9382 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
9383 (build-system python-build-system)
9384 (arguments
9385 '(;; The test suite relies on some non-portable Windows interfaces.
9386 #:tests? #f))
9387 (propagated-inputs
9388 `(("python-dateutil" ,python-dateutil)
9389 ("python-pyicu" ,python-pyicu)))
9390 (synopsis "Parse and generate vCard and vCalendar files")
9391 (description "Vobject is intended to be a full featured Python package for
9392parsing and generating vCard and vCalendar files. Currently, iCalendar files
9393are supported and well tested. vCard 3.0 files are supported, and all data
9394should be imported, but only a few components are understood in a sophisticated
9395way.")
9396 (home-page "http://eventable.github.io/vobject/")
9397 (license license:asl2.0)))
9398
9399(define-public python2-vobject
9400 (package-with-python2 python-vobject))
9401
9402(define-public python-munkres
9403 (package
9404 (name "python-munkres")
9405 (version "1.0.8")
9406 (source (origin
9407 (method url-fetch)
9408 (uri (pypi-uri "munkres" version))
9409 (sha256
9410 (base32
9411 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
9412 (build-system python-build-system)
9413 (arguments
9414 '(#:tests? #f)) ; no test suite
9415 (home-page "http://software.clapper.org/munkres/")
9416 (synopsis "Implementation of the Munkres algorithm")
9417 (description "The Munkres module provides an implementation of the Munkres
9418algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
9419useful for solving the Assignment Problem.")
9420 (license license:bsd-3)))
9421
9422(define-public python2-munkres
9423 (package-with-python2 python-munkres))
9424
9425(define-public python-whoosh
9426 (package
9427 (name "python-whoosh")
9428 (version "2.7.4")
9429 (source
9430 (origin
9431 (method url-fetch)
9432 (uri (pypi-uri "Whoosh" version))
9433 (sha256
9434 (base32
9435 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
9436 (build-system python-build-system)
2679d9a4 9437 (arguments '(#:tests? #f)) ; Test invocation is no longer supported by Python.
44d10b1f
RW
9438 (native-inputs
9439 `(("python-pytest" ,python-pytest)))
9440 (home-page "https://bitbucket.org/mchaput/whoosh")
9441 (synopsis "Full text indexing, search, and spell checking library")
9442 (description
9443 "Whoosh is a fast, pure-Python full text indexing, search, and spell
9444checking library.")
9445 (license license:bsd-2)))
9446
9447(define-public python2-whoosh
9448 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
9449 (package (inherit whoosh)
9450 (propagated-inputs
9451 `(("python2-backport-ssl-match-hostname"
9452 ,python2-backport-ssl-match-hostname)
9453 ,@(package-propagated-inputs whoosh))))))
9454
9455(define-public python-pathlib
9456 (package
9457 (name "python-pathlib")
9458 (version "1.0.1")
9459 (source (origin
9460 (method url-fetch)
9461 (uri (pypi-uri "pathlib" version))
9462 (sha256
9463 (base32
9464 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
9465 (build-system python-build-system)
9466 ;; The tests depend on the internal "test" module, which does not provide
9467 ;; a stable interface.
9468 (arguments `(#:tests? #f))
9469 (home-page "https://pathlib.readthedocs.org/")
9470 (synopsis "Object-oriented file system paths")
9471 (description "Pathlib offers a set of classes to handle file system paths.
9472It offers the following advantages over using string objects:
9473
9474@enumerate
9475@item No more cumbersome use of os and os.path functions. Everything can
9476be done easily through operators, attribute accesses, and method calls.
9477@item Embodies the semantics of different path types. For example,
9478comparing Windows paths ignores casing.
9479@item Well-defined semantics, eliminating any inconsistencies or
9480ambiguities (forward vs. backward slashes, etc.).
9481@end enumerate
9482
9483Note: In Python 3.4, pathlib is now part of the standard library. For other
9484Python versions please consider python-pathlib2 instead, which tracks the
9485standard library module. This module (python-pathlib) isn't maintained
9486anymore.")
9487 (license license:expat)))
9488
9489(define-public python2-pathlib
9490 (package-with-python2 python-pathlib))
9491
9492(define-public python2-pathlib2
9493 (package
9494 (name "python2-pathlib2")
54da6f9f 9495 (version "2.3.3")
44d10b1f
RW
9496 (source (origin
9497 (method url-fetch)
9498 (uri (pypi-uri "pathlib2" version))
9499 (sha256
9500 (base32
54da6f9f 9501 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
44d10b1f
RW
9502 (build-system python-build-system)
9503 ;; We only need the the Python 2 variant, since for Python 3 our minimum
9504 ;; version is 3.4 which already includes this package as part of the
9505 ;; standard library.
9506 (arguments
9507 `(#:python ,python-2))
9508 (propagated-inputs
9509 `(("python2-scandir" ,python2-scandir)
9510 ("python2-six" ,python2-six)))
9511 (home-page "https://pypi.python.org/pypi/pathlib2/")
9512 (synopsis "Object-oriented file system paths - backport of standard
9513pathlib module")
9514 (description "The goal of pathlib2 is to provide a backport of standard
9515pathlib module which tracks the standard library module, so all the newest
9516features of the standard pathlib can be used also on older Python versions.
9517
9518Pathlib offers a set of classes to handle file system paths. It offers the
9519following advantages over using string objects:
9520
9521@enumerate
9522@item No more cumbersome use of os and os.path functions. Everything can
9523be done easily through operators, attribute accesses, and method calls.
9524@item Embodies the semantics of different path types. For example,
9525comparing Windows paths ignores casing.
9526@item Well-defined semantics, eliminating any inconsistencies or
9527ambiguities (forward vs. backward slashes, etc.).
9528@end enumerate")
9529 (license license:expat)))
9530
9531(define-public python2-pathlib2-bootstrap
9532 (hidden-package
9533 (package
9534 (inherit python2-pathlib2)
9535 (name "python2-pathlib2-bootstrap")
9536 (propagated-inputs
9537 `(("python2-scandir" ,python2-scandir)
9538 ("python2-six" ,python2-six-bootstrap))))))
9539
9540(define-public python-jellyfish
9541 (package
9542 (name "python-jellyfish")
9543 (version "0.5.6")
9544 (source (origin
9545 (method url-fetch)
9546 (uri (pypi-uri "jellyfish" version))
9547 (sha256
9548 (base32
9549 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
9550 (build-system python-build-system)
9551 (native-inputs
9552 `(("python-pytest" ,python-pytest)))
9553 (home-page "https://github.com/jamesturk/jellyfish")
9554 (synopsis "Approximate and phonetic matching of strings")
9555 (description "Jellyfish uses a variety of string comparison and phonetic
9556encoding algorithms to do fuzzy string matching.")
9557 (license license:bsd-2)
9558 (properties `((python2-variant . ,(delay python2-jellyfish))))))
9559
9560(define-public python2-jellyfish
9561 (let ((jellyfish (package-with-python2
9562 (strip-python2-variant python-jellyfish))))
9563 (package (inherit jellyfish)
9564 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
9565 ,@(package-native-inputs jellyfish))))))
9566
9567(define-public python2-unicodecsv
9568 (package
9569 (name "python2-unicodecsv")
9570 (version "0.14.1")
9571 (source (origin
f711b71b 9572 (method git-fetch)
44d10b1f
RW
9573 ;; The test suite is not included in the PyPi release.
9574 ;; https://github.com/jdunck/python-unicodecsv/issues/19
f711b71b
EF
9575 (uri (git-reference
9576 (url "https://github.com/jdunck/python-unicodecsv")
9577 (commit version)))
9578 (file-name (git-file-name name version))
44d10b1f
RW
9579 (sha256
9580 (base32
f711b71b 9581 "15hx2k41a2lpv4hcml9zp4cvlx1171mnb5s4s13xc1pxkq3vgdjy"))))
44d10b1f
RW
9582 (build-system python-build-system)
9583 (arguments
9584 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
9585 #:python ,python-2))
9586 (native-inputs
9587 `(("python2-unittest2" ,python2-unittest2)))
9588 (home-page "https://github.com/jdunck/python-unicodecsv")
9589 (synopsis "Unicode CSV module for Python 2")
9590 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
9591module, adding support for Unicode strings.")
9592 (license license:bsd-2)))
9593
9594(define-public python-rarfile
9595 (package
9596 (name "python-rarfile")
9597 (version "2.8")
9598 (source (origin
9599 (method url-fetch)
9600 (uri (pypi-uri "rarfile" version))
9601 (sha256
9602 (base32
9603 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
9604 (build-system python-build-system)
9605 (arguments
9606 '(#:phases
9607 (modify-phases %standard-phases
9608 (replace 'check
9609 ;; Many tests fail, but the installation proceeds.
e59dd341 9610 (lambda _ (invoke "make" "-C" "test" "test"))))))
44d10b1f
RW
9611 (native-inputs
9612 `(("which" ,which))) ; required for tests
9613 (propagated-inputs
9614 `(("libarchive" ,libarchive)))
9615 (home-page "https://github.com/markokr/rarfile")
9616 (synopsis "RAR archive reader for Python")
9617 (description "This is Python module for RAR archive reading. The interface
9618is made as zipfile like as possible.")
9619 (license license:isc)))
9620
9621(define-public python2-rarfile
9622 (package-with-python2 python-rarfile))
9623
9624(define-public python-magic
9625 (package
9626 (name "python-magic")
9627 (version "0.4.15")
9628 (source
9629 (origin
9630 (method url-fetch)
9631 (uri (pypi-uri "python-magic" version))
9632 (sha256
9633 (base32
9634 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
9635 (file-name (string-append name "-" version "-checkout"))))
9636 (build-system python-build-system)
9637 (arguments
9638 ;; The tests are unreliable, so don't run them. The tests fail
9639 ;; under Python3 because they were written for Python2 and
9640 ;; contain import statements that do not work in Python3. One of
9641 ;; the tests fails under Python2 because its assertions are
9642 ;; overly stringent; it relies on comparing output strings which
9643 ;; are brittle and can change depending on the version of
9644 ;; libmagic being used and the system on which the test is
9645 ;; running. In my case, under GuixSD 0.10.0, only one test
9646 ;; failed, and it seems to have failed only because the version
9647 ;; of libmagic that is packaged in Guix outputs a slightly
9648 ;; different (but not wrong) string than the one that the test
9649 ;; expected.
9650 '(#:tests? #f
9651 #:phases (modify-phases %standard-phases
9652 ;; Replace a specific method call with a hard-coded
9653 ;; path to the necessary libmagic.so file in the
9654 ;; store. If we don't do this, then the method call
9655 ;; will fail to find the libmagic.so file, which in
9656 ;; turn will cause any application using
9657 ;; python-magic to fail.
9658 (add-before 'build 'hard-code-path-to-libmagic
9659 (lambda* (#:key inputs #:allow-other-keys)
9660 (let ((file (assoc-ref inputs "file")))
9661 (substitute* "magic.py"
9662 (("ctypes.util.find_library\\('magic'\\)")
9663 (string-append "'" file "/lib/libmagic.so'")))
9664 #t)))
9665 (add-before 'install 'disable-egg-compression
9666 (lambda _
9667 (let ((port (open-file "setup.cfg" "a")))
9668 (display "\n[easy_install]\nzip_ok = 0\n"
9669 port)
9670 (close-port port)
9671 #t))))))
9672 (inputs
9673 ;; python-magic needs to be able to find libmagic.so.
9674 `(("file" ,file)))
9675 (home-page
9676 "https://github.com/ahupp/python-magic")
9677 (synopsis
9678 "File type identification using libmagic")
9679 (description
9680 "This module uses ctypes to access the libmagic file type
9681identification library. It makes use of the local magic database and
9682supports both textual and MIME-type output. Note that this module and
9683the python-file module both provide a \"magic.py\" file; these two
9684modules, which are different and were developed separately, both serve
9685the same purpose: to provide Python bindings for libmagic.")
9686 (license license:expat)))
9687
9688(define-public python2-magic
9689 (package-with-python2 python-magic))
9690
9691(define-public python2-s3cmd
9692 (package
9693 (name "python2-s3cmd")
9694 (version "1.6.1")
9695 (source
9696 (origin
9697 (method url-fetch)
9698 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
9699 "s3cmd-" version ".tar.gz"))
9700 (sha256
9701 (base32
9702 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
9703 (build-system python-build-system)
9704 (arguments
9705 ;; s3cmd is written for python2 only and contains no tests.
9706 `(#:python ,python-2
9707 #:tests? #f))
9708 (propagated-inputs
9709 `(("python2-dateutil" ,python2-dateutil)
9710 ;; The python-file package also provides a magic.py module.
9711 ;; This is an unfortunate state of affairs; however, s3cmd
9712 ;; fails to install if it cannot find specifically the
9713 ;; python-magic package. Thus we include it, instead of using
9714 ;; python-file. Ironically, s3cmd sometimes works better
9715 ;; without libmagic bindings at all:
9716 ;; https://github.com/s3tools/s3cmd/issues/198
9717 ("python2-magic" ,python2-magic)))
9718 (home-page "http://s3tools.org/s3cmd")
9719 (synopsis "Command line tool for S3-compatible storage services")
9720 (description
9721 "S3cmd is a command line tool for uploading, retrieving and managing data
9722in storage services that are compatible with the Amazon Simple Storage
9723Service (S3) protocol, including S3 itself. It supports rsync-like backup,
9724GnuPG encryption, and more. It also supports management of Amazon's
9725CloudFront content delivery network.")
9726 (license license:gpl2+)))
9727
9728(define-public python-pkgconfig
9729 (package
9730 (name "python-pkgconfig")
9731 (version "1.3.1")
9732 (source
9733 (origin
9734 (method url-fetch)
9735 (uri (pypi-uri "pkgconfig" version))
9736 (sha256
9737 (base32
9738 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
9739 (build-system python-build-system)
9740 (native-inputs
9741 `(("python-nose" ,python-nose)))
9742 (inputs
9743 `(("pkg-config" ,pkg-config)))
9744 (arguments
9745 `(#:phases
9746 (modify-phases %standard-phases
9747 (add-before 'build 'patch
9748 ;; Hard-code the path to pkg-config.
9749 (lambda _
9750 (substitute* "pkgconfig/pkgconfig.py"
9751 (("cmd = 'pkg-config")
9752 (string-append "cmd = '" (which "pkg-config"))))
9753 #t))
9754 (replace 'check
9755 (lambda _
9756 (invoke "nosetests" "test.py"))))))
9757 (home-page "https://github.com/matze/pkgconfig")
9758 (synopsis "Python interface for pkg-config")
9759 (description "This module provides a Python interface to pkg-config. It
9760can be used to find all pkg-config packages, check if a package exists,
9761check if a package meets certain version requirements, query CFLAGS and
9762LDFLAGS and parse the output to build extensions with setup.py.")
9763 (license license:expat)))
9764
9765(define-public python2-pkgconfig
9766 (package-with-python2 python-pkgconfig))
9767
9768(define-public python-bz2file
9769 (package
9770 (name "python-bz2file")
9771 (version "0.98")
9772 (source
9773 (origin
9774 (method url-fetch)
9775 (uri (pypi-uri "bz2file" version))
9776 (sha256
9777 (base32
9778 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
9779 (build-system python-build-system)
9780 (arguments
9781 `(#:tests? #f)) ; Tests use deprecated python modules.
9782 (home-page "https://github.com/nvawda/bz2file")
9783 (synopsis "Read and write bzip2-compressed files")
9784 (description
9785 "Bz2file is a Python library for reading and writing bzip2-compressed
9786files. It contains a drop-in replacement for the I/O interface in the
9787standard library's @code{bz2} module, including features from the latest
9788development version of CPython that are not available in older releases.")
9789 (license license:asl2.0)))
9790
9791(define-public python2-bz2file
9792 (package-with-python2 python-bz2file))
9793
9794(define-public python-future
9795 (package
9796 (name "python-future")
d5d54030 9797 (version "0.17.1")
44d10b1f
RW
9798 (source
9799 (origin
9800 (method url-fetch)
9801 (uri (pypi-uri "future" version))
9802 (sha256
9803 (base32
d5d54030 9804 "1f2rlqn9rh7adgir52dlbqz69gsab44x0mlm8gf1cs7xvhv54137"))))
44d10b1f
RW
9805 (build-system python-build-system)
9806 ;; Many tests connect to the network or are otherwise flawed.
9807 ;; https://github.com/PythonCharmers/python-future/issues/210
9808 (arguments
9809 `(#:tests? #f))
9810 (home-page "http://python-future.org")
9811 (synopsis "Single-source support for Python 3 and 2")
9812 (description
9813 "@code{python-future} is the missing compatibility layer between Python 2 and
9814Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
9815to support both Python 2 and Python 3 with minimal overhead.")
9816 (license license:expat)))
9817
9818(define-public python2-future
9819 (package-with-python2 python-future))
9820
9821(define-public python-cysignals
9822 (package
9823 (name "python-cysignals")
8e3e51df 9824 (version "1.9.0")
44d10b1f
RW
9825 (source
9826 (origin
9827 (method url-fetch)
8e3e51df 9828 (uri (pypi-uri "cysignals" version))
44d10b1f
RW
9829 (sha256
9830 (base32
8e3e51df 9831 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
44d10b1f
RW
9832 (build-system python-build-system)
9833 (native-inputs
9834 `(("python-cython" ,python-cython)
9835 ("python-sphinx" ,python-sphinx)))
9836 (inputs
9837 `(("pari-gp" ,pari-gp)))
9838 (arguments
9839 `(#:modules ((guix build python-build-system)
9840 ((guix build gnu-build-system) #:prefix gnu:)
9841 (guix build utils))
9842 ;; FIXME: Tests are executed after installation and currently fail
9843 ;; when not installing into standard locations; the author is working
9844 ;; on a fix.
9845 #:tests? #f
9846 #:phases
9847 (modify-phases %standard-phases
9848 (add-before
9849 'build 'configure
9850 (assoc-ref gnu:%standard-phases 'configure)))))
9851 (home-page
9852 "https://github.com/sagemath/cysignals")
9853 (synopsis
9854 "Handling of interrupts and signals for Cython")
9855 (description
9856 "The cysignals package provides mechanisms to handle interrupts (and
9857other signals and errors) in Cython code, using two related approaches,
9858for mixed Cython/Python code or external C libraries and pure Cython code,
9859respectively.")
9860 (license license:lgpl3+)))
9861
9862(define-public python2-cysignals
9863 (package-with-python2 python-cysignals))
9864
9865(define-public python2-shedskin
9866 (package
9867 (name "python2-shedskin")
9868 (version "0.9.4")
9869 (source
9870 (origin
9871 (method url-fetch)
9872 (uri (string-append "https://github.com/shedskin/shedskin/"
9873 "releases/download/v" version
9874 "/shedskin-" version ".tgz"))
9875 (sha256
9876 (base32
9877 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
9878 (build-system python-build-system)
9879 (arguments
9880 `(#:python ,python-2
9881 #:phases (modify-phases %standard-phases
9882 (add-after 'unpack 'fix-resulting-include-libs
9883 (lambda* (#:key inputs #:allow-other-keys)
9884 (let ((libgc (assoc-ref inputs "libgc"))
9885 (pcre (assoc-ref inputs "pcre")))
9886 (substitute* "shedskin/makefile.py"
9887 (("variable == 'CCFLAGS':[ ]*")
9888 (string-append "variable == 'CCFLAGS':\n"
9889 " line += ' -I " pcre "/include"
9890 " -I " libgc "/include'"))
9891 (("variable == 'LFLAGS':[ ]*")
9892 (string-append "variable == 'LFLAGS':\n"
9893 " line += ' -L" pcre "/lib"
9894 " -L " libgc "/lib'")))
9895 #t))))))
9896 (inputs `(("pcre" ,pcre)
9897 ("libgc" ,libgc)))
9898 (home-page "https://shedskin.github.io/")
9899 (synopsis "Experimental Python-2 to C++ Compiler")
9900 (description (string-append "This is an experimental compiler for a subset of
9901Python. It generates C++ code and a Makefile."))
9902 (license (list license:gpl3 license:bsd-3 license:expat))))
9903
9904(define-public python2-rope
9905 (package
9906 (name "python2-rope")
a9ba0a31 9907 (version "0.11.0")
44d10b1f
RW
9908 (source
9909 (origin
9910 (method url-fetch)
9911 (uri (pypi-uri "rope" version))
9912 (sha256
9913 (base32
a9ba0a31 9914 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
44d10b1f 9915 (arguments
afb29715 9916 ;; Rope has only partial python3 support, see `python-rope'
44d10b1f
RW
9917 `(#:python ,python-2))
9918 (build-system python-build-system)
9919 (native-inputs
9920 `(("python2-unittest2" ,python2-unittest2)))
9921 (home-page "https://github.com/python-rope/rope")
9922 (synopsis "Refactoring library for Python")
9923 (description "Rope is a refactoring library for Python. It facilitates
9924the renaming, moving and extracting of attributes, functions, modules, fields
9925and parameters in Python 2 source code. These refactorings can also be applied
9926to occurrences in strings and comments.")
9927 (license license:gpl2)))
9928
2c880ef4
LC
9929(define-public python-rope
9930 (package
9931 (inherit python2-rope)
9932 (name "python-rope")
9933 (arguments `(#:python ,python-wrapper
9934 ;; XXX: Only partial python3 support, results in some failing
9935 ;; tests: <https://github.com/python-rope/rope/issues/247>.
9936 #:tests? #f))
9937 (properties `((python2-variant . ,(delay python2-rope))))))
9938
44d10b1f
RW
9939(define-public python-py3status
9940 (package
9941 (name "python-py3status")
ef68b35d 9942 (version "3.21")
44d10b1f
RW
9943 (source
9944 (origin
9945 (method url-fetch)
9946 (uri (pypi-uri "py3status" version))
9947 (sha256
ef68b35d 9948 (base32 "16z8zq83hxy48g6hh4xczbdz50qvxv9k1aahr4fqq7jis60cc262"))))
44d10b1f
RW
9949 (build-system python-build-system)
9950 (inputs
9951 `(("file" ,file)))
9952 (arguments
9953 '(#:phases
9954 (modify-phases %standard-phases
9955 ;; 'file' is used for detection of configuration file encoding
9956 ;; let's make link the dependency to particular input
9957 (add-before 'build 'patch-file-path
9958 (lambda* (#:key inputs #:allow-other-keys)
9959 (let ((file-path (assoc-ref inputs "file")))
9960 (substitute* "py3status/parse_config.py"
6a6b8a3f 9961 (("\\[\"file\", \"-b\"")
44d10b1f
RW
9962 (string-append "['" file-path "/bin/file', '-b'")))
9963 #t))))
9964 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
9965 (home-page "https://github.com/ultrabug/py3status")
9966 (synopsis "Extensible i3status wrapper written in Python")
9967 (description "py3status is an i3status wrapper which extends i3status
9968functionality in a modular way, allowing you to extend your panel with your
9969own code, responding to click events and updating clock every second.")
9970 (license license:bsd-3)))
9971
9972(define-public python-tblib
9973 (package
9974 (name "python-tblib")
9975 (version "1.3.2")
9976 (source (origin
9977 (method url-fetch)
9978 (uri (pypi-uri "tblib" version))
9979 (sha256 (base32
9980 "1rsg8h069kqgncyv8fgzyj6qflk6j10cb78pa5jk34ixwq044vj3"))))
9981 (build-system python-build-system)
9982 (arguments
9983 `(#:phases
9984 (modify-phases %standard-phases
9985 (add-before 'check 'adjust-tests
9986 (lambda _
9987 (when (which "python3")
9988 ;; Adjust the example output to match that of Python 3.7:
9989 ;; <https://github.com/ionelmc/python-tblib/issues/36>.
9990 (substitute* "README.rst"
9991 (("Exception\\('fail',") "Exception('fail'"))
9992 #t)))
9993 (replace 'check
9994 (lambda _
9995 ;; Upstream runs tests after installation and the package itself
9996 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
9997 ;; found.
9998 (setenv "PYTHONPATH"
9999 (string-append (getcwd) "/build/lib:"
10000 (getenv "PYTHONPATH")))
10001 (invoke "py.test" "-vv" "tests" "README.rst"))))))
10002 (native-inputs
10003 `(("python-pytest" ,python-pytest)
10004 ("python-six" ,python-six)))
10005 (home-page "https://github.com/ionelmc/python-tblib")
10006 (synopsis "Traceback serialization library")
10007 (description
10008 "Traceback serialization allows you to:
10009
10010@enumerate
10011@item Pickle tracebacks and raise exceptions with pickled tracebacks in
10012different processes. This allows better error handling when running code over
10013multiple processes (imagine multiprocessing, billiard, futures, celery etc).
10014
10015@item Parse traceback strings and raise with the parsed tracebacks.
10016@end enumerate\n")
10017 (license license:bsd-3)))
10018
10019(define-public python2-tblib
10020 (package-with-python2 python-tblib))
10021
10022(define-public python-greenlet
10023 (package
10024 (name "python-greenlet")
10025 (version "0.4.15")
10026 (source (origin
10027 (method url-fetch)
10028 (uri (pypi-uri "greenlet" version))
10029 (sha256
10030 (base32
10031 "1g4g1wwc472ds89zmqlpyan3fbnzpa8qm48z3z1y6mlk44z485ll"))))
10032 (build-system python-build-system)
10033 (home-page "https://greenlet.readthedocs.io/")
10034 (synopsis "Lightweight in-process concurrent programming")
10035 (description
10036 "Greenlet package is a spin-off of Stackless, a version of CPython
10037that supports micro-threads called \"tasklets\". Tasklets run
10038pseudo-concurrently (typically in a single or a few OS-level threads) and
10039are synchronized with data exchanges on \"channels\".")
10040 (license (list license:psfl license:expat))))
10041
10042(define-public python2-greenlet
10043 (package-with-python2 python-greenlet))
10044
10045(define-public python-objgraph
10046 (package
10047 (name "python-objgraph")
eebc03bb 10048 (version "3.4.1")
44d10b1f
RW
10049 (source
10050 (origin
10051 (method url-fetch)
10052 (uri (pypi-uri "objgraph" version))
10053 (sha256
10054 (base32
eebc03bb 10055 "19qmqsh984zq1rzzjy4vqnmviaqnymcyl8h7z99pnicbgwnm2adz"))))
44d10b1f
RW
10056 (build-system python-build-system)
10057 (propagated-inputs
10058 `(("python-graphviz" ,python-graphviz)))
10059 (native-inputs
10060 `(("python-mock" ,python-mock)
10061 ("graphviz" ,graphviz)))
10062 (home-page "https://mg.pov.lt/objgraph/")
10063 (synopsis "Draw Python object reference graphs with graphviz")
10064 (description
10065 "This package provides tools to draw Python object reference graphs with
10066graphviz.")
10067 (license license:expat)))
10068
ffe58d1d
MB
10069(define-public python2-objgraph
10070 (package-with-python2 python-objgraph))
10071
44d10b1f
RW
10072(define-public python-gevent
10073 (package
10074 (name "python-gevent")
10075 (version "1.3.7")
10076 (source (origin
10077 (method url-fetch)
10078 (uri (pypi-uri "gevent" version))
10079 (sha256
10080 (base32
10081 "0b0fr04qdk1p4sniv87fh8z5psac60x01pv054kpgi94520g81iz"))
10082 (modules '((guix build utils)))
10083 (snippet
10084 '(begin
10085 ;; unbunding libev and c-ares
10086 (delete-file-recursively "deps")
10087 #t))))
10088 (build-system python-build-system)
10089 (arguments
10090 `(#:modules ((ice-9 ftw)
10091 (ice-9 match)
10092 (srfi srfi-26)
10093 (guix build utils)
10094 (guix build python-build-system))
10095 #:phases (modify-phases %standard-phases
44d10b1f
RW
10096 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
10097 (lambda _
10098 (substitute* "src/gevent/subprocess.py"
10099 (("/bin/sh") (which "sh")))
10100 (for-each (lambda (file)
10101 (substitute* file
10102 (("/bin/sh") (which "sh"))
10103 (("/bin/true") (which "true"))))
10104 (find-files "src/greentest" "\\.py$"))
10105 #t))
10106 (add-before 'build 'do-not-use-bundled-sources
10107 (lambda* (#:key inputs #:allow-other-keys)
10108 (setenv "CONFIG_SHELL" (which "bash"))
10109 (setenv "LIBEV_EMBED" "false")
10110 (setenv "CARES_EMBED" "false")
10111 (setenv "EMBED" "false")
10112
b5b56b7f
MB
10113 ;; Prevent building bundled libev.
10114 (substitute* "setup.py"
10115 (("run_make=_BUILDING")
10116 "run_make=False"))
10117
44d10b1f
RW
10118 (let ((greenlet (string-append
10119 (assoc-ref inputs "python-greenlet")
10120 "/include")))
10121 (match (scandir greenlet
10122 (lambda (item)
10123 (string-prefix? "python" item)))
10124 ((python)
b5b56b7f 10125 (setenv "C_INCLUDE_PATH"
44d10b1f
RW
10126 (string-append greenlet "/" python)))))
10127 #t))
10128 (add-before 'check 'skip-timer-test
10129 (lambda _
10130 ;; XXX: Skip 'TestTimerResolution', which appears to be
10131 ;; unreliable.
10132 (substitute* "src/greentest/test__core_timer.py"
10133 (("not greentest.RUNNING_ON_CI") "False"))
10134 #t))
10135 (replace 'check
10136 (lambda _
10137 ;; Make sure the build directory is on PYTHONPATH.
10138 (setenv "PYTHONPATH"
10139 (string-append
10140 (getenv "PYTHONPATH") ":"
10141 (getcwd) "/build/"
10142 (car (scandir "build" (cut string-prefix? "lib." <>)))))
10143 (with-directory-excursion "src/greentest"
10144 ;; XXX: Many tests require network access. Instead we only
10145 ;; run known-good tests. Unfortunately we cannot use
10146 ;; recursion here since this directory also contains
10147 ;; Python-version-specific subfolders.
10148 (apply invoke "python" "testrunner.py" "--config"
10149 "known_failures.py"
10150 (scandir "." (cut regexp-exec
10151 (make-regexp "test_+(subprocess|core)")
10152 <>)))))))))
10153 (propagated-inputs
10154 `(("python-greenlet" ,python-greenlet)
10155 ("python-objgraph" ,python-objgraph)))
10156 (native-inputs
b5b56b7f 10157 `(("python-six" ,python-six)))
44d10b1f
RW
10158 (inputs
10159 `(("c-ares" ,c-ares)
10160 ("libev" ,libev)))
10161 (home-page "http://www.gevent.org/")
10162 (synopsis "Coroutine-based network library")
10163 (description
10164 "gevent is a coroutine-based Python networking library that uses greenlet
10165to provide a high-level synchronous API on top of the libev event loop.")
10166 (license license:expat)
10167 (properties `((python2-variant . ,(delay python2-gevent))))))
10168
10169(define-public python2-gevent
10170 (let ((base (package-with-python2
10171 (strip-python2-variant python-gevent))))
10172 (package
10173 (inherit base)
10174 (native-inputs `(,@(package-native-inputs python-gevent)
10175 ("python-mock" ,python2-mock))))))
10176
10177(define-public python-fastimport
10178 (package
10179 (name "python-fastimport")
10180 (version "0.9.6")
10181 (source
10182 (origin
10183 (method url-fetch)
10184 (uri (pypi-uri "fastimport" version))
10185 (sha256
10186 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
10187 (build-system python-build-system)
10188 (home-page "https://github.com/jelmer/python-fastimport")
10189 (synopsis "VCS fastimport parser and generator in Python")
10190 (description "This package provides a parser for and generator of the Git
10191@url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
10192format.")
10193 (license license:gpl2+)))
10194
10195(define-public python2-fastimport
10196 (package-with-python2 python-fastimport))
10197
10198(define-public python-twisted
10199 (package
10200 (name "python-twisted")
fdfad2fc 10201 (version "19.7.0")
44d10b1f
RW
10202 (source (origin
10203 (method url-fetch)
10204 (uri (pypi-uri "Twisted" version ".tar.bz2"))
10205 (sha256
10206 (base32
fdfad2fc 10207 "17d3hnxv9qndagzz63mdpyk99xj63p9gq586vjn0rxk8cl197nym"))))
44d10b1f
RW
10208 (build-system python-build-system)
10209 (arguments
0107c9b8 10210 '(#:tests? #f)) ; FIXME: some tests fail
44d10b1f
RW
10211 (propagated-inputs
10212 `(("python-zope-interface" ,python-zope-interface)
52ca1c4a 10213 ("python-pyhamcrest" ,python-pyhamcrest)
44d10b1f 10214 ("python-incremental" ,python-incremental)
e5ba2fe3 10215 ("python-hyperlink" ,python-hyperlink)
44d10b1f
RW
10216 ("python-constantly" ,python-constantly)
10217 ("python-automat" ,python-automat)))
10218 (home-page "https://twistedmatrix.com/")
10219 (synopsis "Asynchronous networking framework written in Python")
10220 (description
10221 "Twisted is an extensible framework for Python programming, with special
10222focus on event-based network programming and multiprotocol integration.")
10223 (license license:expat)))
10224
10225(define-public python2-twisted
10226 (package-with-python2 python-twisted))
10227
10228(define-public python-pika
10229 (package
10230 (name "python-pika")
10231 (version "0.12.0")
10232 (source
10233 (origin
10234 (method url-fetch)
10235 (uri (pypi-uri "pika" version))
10236 (sha256
10237 (base32
10238 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
10239 (build-system python-build-system)
10240 (native-inputs
10241 `(("python-pyev" ,python-pyev)
10242 ("python-tornado" ,python-tornado)
10243 ("python-twisted" ,python-twisted)))
10244 (home-page "https://pika.readthedocs.org")
10245 (synopsis "Pure Python AMQP Client Library")
10246 (description
10247 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
10248Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
10249network support library.")
10250 (license license:bsd-3)))
10251
10252(define-public python2-pika
10253 (package-with-python2 python-pika))
10254
10255(define-public python-ply
10256 (package
10257 (name "python-ply")
10258 (version "3.10")
10259 (source
10260 (origin
10261 (method url-fetch)
10262 (uri (pypi-uri "ply" version))
10263 (sha256
10264 (base32
10265 "1jxsr1d2f732r6ljhvm827113dckwl6qwakfvpbdhcbhvpvlmscn"))))
10266 (build-system python-build-system)
10267 (home-page "http://www.dabeaz.com/ply/")
10268 (synopsis "Python Lex & Yacc")
10269 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
10270It uses LR parsing and does extensive error checking.")
10271 (license license:bsd-3)))
10272
10273(define-public python2-ply
10274 (package-with-python2 python-ply))
10275
10276(define-public python-tabulate
10277 (package
10278 (name "python-tabulate")
10279 (version "0.7.7")
10280 (source (origin
10281 (method url-fetch)
10282 (uri (pypi-uri "tabulate" version))
10283 (sha256
10284 (base32
10285 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
10286 (build-system python-build-system)
10287 (arguments
10288 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
10289 ;; and the latest release is not tagged in the upstream repository.
10290 '(#:tests? #f))
10291 (home-page "https://bitbucket.org/astanin/python-tabulate")
10292 (synopsis "Pretty-print tabular data")
10293 (description
10294 "Tabulate is a library and command-line utility to pretty-print tabular
10295data in Python.")
10296 (license license:expat)))
10297
10298(define-public python2-tabulate
10299 (package-with-python2 python-tabulate))
10300
10301(define-public python-kazoo
10302 (package
10303 (name "python-kazoo")
10304 (version "2.4.0")
10305 (source
10306 (origin
10307 (method url-fetch)
10308 (uri (pypi-uri "kazoo" version))
10309 (sha256
10310 (base32
10311 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
10312 (build-system python-build-system)
10313 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
10314 (propagated-inputs
10315 `(("python-six" ,python-six)))
10316 (home-page "https://kazoo.readthedocs.org")
10317 (synopsis "High-level Zookeeper client library")
10318 (description
10319 "Kazoo is a Python client library for the Apache Zookeeper distributed
10320application service. It is designed to be easy to use and to avoid common
10321programming errors.")
10322 (license license:asl2.0)))
10323
10324(define-public python2-kazoo
10325 (package-with-python2 python-kazoo))
10326
10327(define-public python-pykafka
10328 (package
10329 (name "python-pykafka")
10330 (version "2.4.0")
10331 (source (origin
10332 (method url-fetch)
0ca1d040 10333 (uri (pypi-uri "pykafka" version))
44d10b1f
RW
10334 (sha256
10335 (base32
10336 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
10337 (build-system python-build-system)
10338 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
10339 (propagated-inputs
10340 `(("python-gevent" ,python-gevent)
10341 ("python-kazoo" ,python-kazoo)
10342 ("python-tabulate" ,python-tabulate)))
10343 (inputs
10344 `(("librdkafka" ,librdkafka)))
10345 (home-page "https://pykafka.readthedocs.io/")
10346 (synopsis "Apache Kafka client for Python")
10347 (description
10348 "PyKafka is a client for the Apache Kafka distributed messaging system.
10349It includes Python implementations of Kafka producers and consumers, which
10350are optionally backed by a C extension built on librdkafka.")
10351 (license license:asl2.0)))
10352
10353(define-public python2-pykafka
10354 (package-with-python2 python-pykafka))
10355
10356(define-public python-wcwidth
28ac442b
MB
10357 (package
10358 (name "python-wcwidth")
574a71a7 10359 (version "0.1.8")
28ac442b
MB
10360 (source (origin
10361 (method url-fetch)
10362 (uri (pypi-uri "wcwidth" version))
10363 (sha256
10364 (base32
574a71a7 10365 "1a1pzds3xzfylm5mnc5f6c1p8kiig0daqjc9gygd9rc3cj53x2zj"))))
28ac442b
MB
10366 (build-system python-build-system)
10367 (home-page "https://github.com/jquast/wcwidth")
10368 (synopsis "Measure number of terminal column cells of wide-character codes")
10369 (description "Wcwidth measures the number of terminal column cells of
44d10b1f
RW
10370wide-character codes. It is useful for those implementing a terminal emulator,
10371or programs that carefully produce output to be interpreted by one. It is a
10372Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
10373specified in POSIX.1-2001 and POSIX.1-2008.")
28ac442b 10374 (license license:expat)))
44d10b1f
RW
10375
10376(define-public python2-wcwidth
10377 (package-with-python2 python-wcwidth))
10378
10379(define-public python2-jsonrpclib
10380 (package
10381 (name "python2-jsonrpclib")
10382 (version "0.1.7")
10383 (source (origin
10384 (method url-fetch)
6571bba0 10385 (uri (pypi-uri "jsonrpclib" version))
44d10b1f
RW
10386 (sha256
10387 (base32
10388 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
10389 (build-system python-build-system)
10390 (arguments
10391 `(#:tests? #f
10392 #:python ,python-2))
10393 (home-page "https://github.com/joshmarshall/jsonrpclib/")
10394 (synopsis "Implementation of JSON-RPC specification for Python")
10395 (description
10396 "This library is an implementation of the JSON-RPC specification.
10397It supports both the original 1.0 specification, as well as the
10398new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
10399etc.")
10400 (license license:asl2.0)))
10401
10402(define-public python-chai
10403 (package
10404 (name "python-chai")
10405 (version "1.1.2")
10406 (source (origin
10407 (method url-fetch)
10408 (uri (pypi-uri "chai" version))
10409 (sha256
10410 (base32
10411 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
10412 (build-system python-build-system)
10413 (home-page "https://github.com/agoragames/chai")
10414 (synopsis "Mocking framework for Python")
10415 (description
10416 "Chai provides an api for mocking, stubbing and spying your python
10417objects, patterned after the Mocha library for Ruby.")
10418 (license license:bsd-3)))
10419
10420(define-public python2-chai
10421 (package-with-python2 python-chai))
10422
10423(define-public python-inflection
10424 (package
10425 (name "python-inflection")
10426 (version "0.3.1")
10427 (source
10428 (origin (method url-fetch)
10429 (uri (pypi-uri "inflection" version))
10430 (sha256
10431 (base32
10432 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
10433 (build-system python-build-system)
10434 (native-inputs
10435 `(("python-pytest" ,python-pytest)))
10436 (home-page "https://github.com/jpvanhal/inflection")
10437 (synopsis "Python string transformation library")
10438 (description
10439 "Inflection is a string transformation library. It singularizes
10440and pluralizes English words, and transforms strings from CamelCase to
10441underscored string.")
10442 (license license:expat)))
10443
10444(define-public python2-inflection
10445 (package-with-python2 python-inflection))
10446
10447(define-public python-pylev
10448 (package
10449 (name "python-pylev")
10450 (version "1.3.0")
10451 (source (origin
10452 (method url-fetch)
10453 (uri (pypi-uri "pylev" version))
10454 (sha256
10455 (base32
10456 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
10457 (build-system python-build-system)
10458 (home-page "https://github.com/toastdriven/pylev")
10459 (synopsis "Levenshtein distance implementation in Python")
10460 (description "Pure Python Levenshtein implementation, based off the
10461Wikipedia code samples at
10462@url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
10463 (license license:bsd-3)))
10464
10465(define-public python2-pylev
10466 (package-with-python2 python-pylev))
10467
10468(define-public python-cleo
10469 (package
10470 (name "python-cleo")
0c101a04 10471 (version "0.7.6")
44d10b1f
RW
10472 (source (origin
10473 (method url-fetch)
10474 (uri (pypi-uri "cleo" version))
10475 (sha256
10476 (base32
0c101a04 10477 "02dlc0rn43zgvw0s5v4j80bca9n1jfpwy3r78gn9qjgk0qj39kwr"))))
44d10b1f
RW
10478 (build-system python-build-system)
10479 (native-inputs
af2d3713 10480 `( ;; For testing
44d10b1f
RW
10481 ("python-mock" ,python-mock)
10482 ("python-pytest-mock" ,python-pytest-mock)
10483 ("python-pytest" ,python-pytest)))
10484 (propagated-inputs
10485 `(("python-backpack" ,python-backpack)
0c101a04 10486 ("python-clikit" ,python-clikit)
44d10b1f
RW
10487 ("python-pastel" ,python-pastel)
10488 ("python-pylev" ,python-pylev)))
10489 (home-page "https://github.com/sdispater/cleo")
10490 (synopsis "Command-line arguments library for Python")
10491 (description
10492 "Cleo allows you to create command-line commands with signature in
10493docstring and colored output.")
10494 (license license:expat)))
10495
10496(define-public python2-cleo
10497 (package-with-python2 python-cleo))
10498
2be85c45
TLC
10499(define-public python-tomlkit
10500 (package
10501 (name "python-tomlkit")
20c9914e 10502 (version "0.5.8")
2be85c45
TLC
10503 (source
10504 (origin
10505 (method url-fetch)
10506 (uri (pypi-uri "tomlkit" version))
10507 (sha256
10508 (base32
20c9914e 10509 "0sf2a4q61kf344hjbw8kb6za1hlccl89j9lzqw0l2zpddp0hrh9j"))))
2be85c45
TLC
10510 (build-system python-build-system)
10511 (native-inputs
10512 `(("python-pytest" ,python-pytest)))
10513 (home-page
10514 "https://github.com/sdispater/tomlkit")
10515 (synopsis "Style preserving TOML library")
10516 (description
10517 "TOML Kit is a 0.5.0-compliant TOML library. It includes a parser that
10518preserves all comments, indentations, whitespace and internal element ordering,
10519and makes them accessible and editable via an intuitive API. It can also
10520create new TOML documents from scratch using the provided helpers. Part of the
10521implementation as been adapted, improved and fixed from Molten.")
10522 (license license:expat)))
10523
0bb32201
TLC
10524(define-public python-shellingham
10525 (package
10526 (name "python-shellingham")
10527 (version "1.3.1")
10528 (source
10529 (origin
10530 (method url-fetch)
10531 (uri (pypi-uri "shellingham" version))
10532 (sha256
10533 (base32
10534 "1q7kws7w4x2hji3g7y0ni9ddk4sd676ylrb3db54gbpys6xj6nwq"))))
10535 (build-system python-build-system)
10536 (home-page
10537 "https://github.com/sarugaku/shellingham")
10538 (synopsis "Tool to detect surrounding shell")
10539 (description
10540 "Shellingham detects what shell the current Python executable is
10541running in.")
10542 (license license:isc)))
10543
aee92957
TLC
10544(define-public python-memcached
10545 (package
10546 (name "python-memcached")
10547 (version "1.59")
10548 (source
10549 (origin
10550 (method url-fetch)
10551 (uri (pypi-uri "python-memcached" version))
10552 (sha256
10553 (base32
10554 "0kvyapavbirk2x3n1jx4yb9nyigrj1s3x15nm3qhpvhkpqvqdqm2"))))
10555 (build-system python-build-system)
10556 (propagated-inputs `(("python-six" ,python-six)))
10557 (home-page
10558 "https://github.com/linsomniac/python-memcached")
10559 (synopsis "Pure python memcached client")
10560 (description
10561 "This software is a pure Python interface to the memcached memory cache
10562daemon. It is the client side software which allows storing values in one or
10563more, possibly remote, memcached servers.")
10564 (license license:psfl)))
10565
b2ac2508
TLC
10566(define-public python-clikit
10567 (package
10568 (name "python-clikit")
4573b94d 10569 (version "0.4.1")
b2ac2508
TLC
10570 (source
10571 (origin
10572 (method url-fetch)
10573 (uri (pypi-uri "clikit" version))
10574 (sha256
10575 (base32
4573b94d 10576 "10gab65pq0jdf589n33sj2513pxal2lisl4xwf1ijysdjxmpdr4a"))))
b2ac2508
TLC
10577 (build-system python-build-system)
10578 (propagated-inputs
10579 `(("python-pastel" ,python-pastel)
10580 ("python-pylev" ,python-pylev)))
10581 (home-page "https://github.com/sdispater/clikit")
10582 (synopsis "Group of utilities to build command line interfaces")
10583 (description
10584 "CliKit is a group of utilities to build testable command line
10585interfaces.")
10586 (license license:expat)))
10587
c6f008d6
TLC
10588(define-public python-msgpack-python
10589 (package
10590 (name "python-msgpack-python")
10591 (version "0.5.6")
10592 (source
10593 (origin
10594 (method url-fetch)
10595 (uri (pypi-uri "msgpack-python" version))
10596 (sha256
10597 (base32
10598 "16wh8qgybmfh4pjp8vfv78mdlkxfmcasg78lzlnm6nslsfkci31p"))))
10599 (build-system python-build-system)
10600 (home-page "http://msgpack.org/")
10601 (synopsis "Package to deserialize messages in MessagePack binary format")
10602 (description
10603 "MessagePack is an efficient binary serialization format. It lets you
10604exchange data among multiple languages like JSON. But it's faster and
10605smaller. Small integers are encoded into a single byte, and typical short
10606strings require only one extra byte in addition to the strings themselves.")
10607 (license license:asl2.0)))
10608
badc1c63
TLC
10609(define-public python-cachy
10610 (package
10611 (name "python-cachy")
10612 (version "0.2.0")
10613 (source
10614 (origin
10615 (method url-fetch)
10616 (uri (pypi-uri "cachy" version))
10617 (sha256
10618 (base32
10619 "0v6mjyhgx6j7ya20bk69cr3gdzdkdf6psay0h090rscclgji65dp"))))
10620 (build-system python-build-system)
10621 (native-inputs
10622 `(("python-fakeredis" ,python-fakeredis)
10623 ("python-flexmock" ,python-flexmock)
10624 ("python-pytest" ,python-pytest)))
10625 (propagated-inputs
10626 `(("python-memcached" ,python-memcached)
10627 ("python-msgpack-python" ,python-msgpack-python)
10628 ("python-redis" ,python-redis)))
10629 (home-page "https://github.com/sdispater/cachy")
10630 (synopsis "Simple yet effective caching library")
10631 (description
10632 "Cachy provides a simple yet effective caching library. A simple but
10633powerful API: thread-safety; decorator syntax; support for memcached, redis,
10634database, file, dict stores. Cachy supports python versions 2.7+ and 3.2+.")
10635 (license license:expat)))
10636
617bb67b
TLC
10637(define-public poetry
10638 (package
10639 (name "poetry")
10640 (version "0.12.17")
10641 ;; Poetry can only be built from source with poetry.
10642 (source
10643 (origin
10644 (method url-fetch)
10645 (uri (pypi-uri "poetry" version))
10646 (sha256
10647 (base32
10648 "0gxwcd65qjmzqzppf53x51sic1rbcd9py6cdzx3aprppipimslvf"))))
10649 (build-system python-build-system)
10650 (arguments
10651 `(#:tests? #f ;; Pypi does not have tests.
10652 #:phases
10653 (modify-phases %standard-phases
10654 (replace 'build
10655 (lambda _
10656 ;; Bug in poetry https://github.com/sdispater/poetry/issues/866.
10657 (invoke "sed" "-i" "-e" "s/from distutils.core/from setuptools/"
10658 "setup.py")
10659 #t)))))
10660 (propagated-inputs
10661 `(("python-cachecontrol" ,python-cachecontrol)
10662 ("python-cachy" ,python-cachy)
10663 ("python-cleo" ,python-cleo)
10664 ("python-glob2" ,python-glob2)
10665 ("python-html5lib" ,python-html5lib)
10666 ("python-jsonschema" ,python-jsonschema)
10667 ("python-msgpack" ,python-msgpack)
617bb67b
TLC
10668 ("python-pkginfo" ,python-pkginfo)
10669 ("python-pyparsing" ,python-pyparsing)
10670 ("python-pyrsistent" ,python-pyrsistent)
10671 ("python-requests" ,python-requests)
10672 ("python-requests-toolbelt" ,python-requests-toolbelt)
10673 ("python-shellingham" ,python-shellingham)
10674 ("python-tomlkit" ,python-tomlkit)
10675 ("python-virtualenv" ,python-virtualenv)))
10676 (home-page "https://poetry.eustace.io/")
10677 (synopsis "Python dependency management and packaging made easy")
10678 (description "Poetry is a tool for dependency management and packaging
10679in Python. It allows you to declare the libraries your project depends on and
10680it will manage (install/update) them for you.")
10681 (license license:expat)))
10682
44d10b1f
RW
10683(define-public python-lazy-object-proxy
10684 (package
10685 (name "python-lazy-object-proxy")
7454078a 10686 (version "1.4.3")
44d10b1f
RW
10687 (source (origin
10688 (method url-fetch)
10689 (uri (pypi-uri "lazy-object-proxy" version))
10690 (sha256
10691 (base32
7454078a 10692 "1w1aaay424ciz8fz3fkzxb0pxzfxn184f2whpyn4fx72bn50x47k"))))
63d4873b
MO
10693 (native-inputs
10694 `(("python-setuptools-scm" ,python-setuptools-scm-3.3)))
44d10b1f
RW
10695 (build-system python-build-system)
10696 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
10697 (synopsis "Lazy object proxy for python")
10698 (description
10699 "Lazy object proxy is an object that wraps a callable but defers the call
10700until the object is actually required, and caches the result of said call.")
10701 (license license:bsd-2)))
10702
10703(define-public python2-lazy-object-proxy
10704 (package-with-python2 python-lazy-object-proxy))
10705
10706(define-public python-dnspython
10707 (package
10708 (name "python-dnspython")
10709 (version "1.15.0")
10710 (source (origin
10711 (method url-fetch)
10712 (uri (string-append "http://www.dnspython.org/kits/"
10713 version "/dnspython-" version ".tar.gz"))
10714 (sha256
10715 (base32
10716 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
10717 (build-system python-build-system)
10718 (arguments '(#:tests? #f)) ; XXX: requires internet access
10719 (home-page "http://www.dnspython.org")
10720 (synopsis "DNS toolkit for Python")
10721 (description
10722 "dnspython is a DNS toolkit for Python. It supports almost all record
10723types. It can be used for queries, zone transfers, and dynamic updates.
10724It supports TSIG authenticated messages and EDNS0.")
10725 (license license:expat)))
10726
10727(define-public python2-dnspython
10728 (package-with-python2 python-dnspython))
10729
10730(define-public python-email-validator
10731 (package
10732 (name "python-email-validator")
10733 (version "1.0.2")
10734 (source
10735 (origin (method url-fetch)
10736 (uri (pypi-uri "email_validator" version))
10737 (sha256
10738 (base32
10739 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
10740 (build-system python-build-system)
10741 (arguments
10742 '(#:phases
10743 (modify-phases %standard-phases
10744 (add-before 'build 'use-dnspython
10745 (lambda _
10746 (substitute* "setup.py"
10747 (("dnspython3") "dnspython"))
10748 #t)))))
10749 (propagated-inputs
10750 `(("python-dnspython" ,python-dnspython)
10751 ("python-idna" ,python-idna)))
10752 (home-page "https://github.com/JoshData/python-email-validator")
10753 (synopsis "Email address validation library for Python")
10754 (description
10755 "This library validates email address syntax and deliverability.")
10756 (license license:cc0)))
10757
10758(define-public python2-email-validator
10759 (package-with-python2 python-email-validator))
10760
10761(define-public python-ukpostcodeparser
10762 (package
10763 (name "python-ukpostcodeparser")
10764 (version "1.0.3")
10765 (source (origin
10766 (method url-fetch)
10767 (uri (pypi-uri "UkPostcodeParser" version))
10768 (sha256
10769 (base32
10770 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
10771 (build-system python-build-system)
10772 (home-page "https://github.com/hamstah/ukpostcodeparser")
10773 (synopsis "UK Postcode parser for Python")
10774 (description
10775 "This library provides the @code{parse_uk_postcode} function for
10776parsing UK postcodes.")
10777 (license license:expat)))
10778
10779(define-public python2-ukpostcodeparser
10780 (package-with-python2 python-ukpostcodeparser))
10781
10782(define-public python-faker
10783 (package
10784 (name "python-faker")
10785 (version "0.7.9")
10786 (source (origin
10787 (method url-fetch)
10788 (uri (pypi-uri "Faker" version))
10789 (sha256
10790 (base32
10791 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
10792 (patches
10793 (search-patches "python-faker-fix-build-32bit.patch"))
10794 (modules '((guix build utils)))
10795 (snippet
10796 '(begin
10797 (for-each delete-file (find-files "." "\\.pyc$"))
10798 #t))))
10799 (build-system python-build-system)
10800 (arguments
10801 '(#:phases
10802 (modify-phases %standard-phases
10803 (replace 'check
49ff8827 10804 (lambda _ (invoke "python" "-m" "unittest" "-v" "tests"))))))
44d10b1f
RW
10805 (native-inputs
10806 `(;; For testing
10807 ("python-email-validator" ,python-email-validator)
10808 ("python-mock" ,python-mock)
10809 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
10810 (propagated-inputs
10811 `(("python-dateutil" ,python-dateutil)
10812 ("python-six" ,python-six)))
10813 (home-page "https://github.com/joke2k/faker")
10814 (synopsis "Python package that generates fake data")
10815 (description
10816 "Faker is a Python package that generates fake data such as names,
10817addresses, and phone numbers.")
10818 (license license:expat)
10819 (properties `((python2-variant . ,(delay python2-faker))))))
10820
10821(define-public python2-faker
10822 (let ((base (package-with-python2 (strip-python2-variant
10823 python-faker))))
10824 (package
10825 (inherit base)
10826 (propagated-inputs
10827 `(("python2-ipaddress" ,python2-ipaddress)
10828 ,@(package-propagated-inputs base))))))
10829
10830(define-public python-pyaml
10831 (package
10832 (name "python-pyaml")
10833 (version "18.11.0")
10834 (source (origin
10835 (method url-fetch)
10836 (uri (pypi-uri "pyaml" version))
10837 (sha256
10838 (base32
10839 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
10840 (build-system python-build-system)
10841 (native-inputs
10842 `(("python-unidecode" ,python-unidecode)))
10843 (propagated-inputs
10844 `(("python-pyyaml" ,python-pyyaml)))
10845 (home-page "https://github.com/mk-fg/pretty-yaml")
10846 (synopsis "YAML pretty-print library for Python")
10847 (description
10848 "pyaml is a PyYAML based python module to produce pretty and readable
10849YAML-serialized data.")
492e3a7a 10850 (license license:wtfpl2)))
44d10b1f
RW
10851
10852(define-public python2-pyaml
10853 (package-with-python2 python-pyaml))
10854
10855(define-public python-backpack
10856 (package
10857 (name "python-backpack")
10858 (version "0.1")
10859 (source
10860 (origin
10861 (method url-fetch)
10862 (uri (pypi-uri "backpack" version))
10863 (sha256
10864 (base32
10865 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
10866 (build-system python-build-system)
10867 (native-inputs
10868 `(("python-pytest" ,python-pytest)
10869 ("python-nose" ,python-nose)))
10870 (propagated-inputs
10871 `(("python-simplejson" ,python-simplejson)))
10872 (home-page "https://github.com/sdispater/backpack")
10873 (synopsis "Utilities for working with Python collections")
10874 (description "Backpack provides some useful utilities for working with
10875collections of data.")
10876 (license license:expat)))
10877
10878(define-public python2-backpack
10879 (package-with-python2 python-backpack))
10880
10881(define-public python-prompt-toolkit
10882 (package
10883 (name "python-prompt-toolkit")
10884 (version "2.0.7")
10885 (source
10886 (origin
10887 (method url-fetch)
10888 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10889 (sha256
10890 (base32
10891 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
10892 (build-system python-build-system)
10893 (arguments
10894 `(#:phases
10895 (modify-phases %standard-phases
10896 (delete 'check)
10897 (add-after 'install 'post-install-check
10898 (lambda* (#:key inputs outputs #:allow-other-keys)
10899 ;; HOME is needed for the test
10900 ;; "test_pathcompleter_can_expanduser".
10901 (setenv "HOME" "/tmp")
10902 (add-installed-pythonpath inputs outputs)
10903 (invoke "py.test"))))))
10904 (propagated-inputs
10905 `(("python-wcwidth" ,python-wcwidth)
10906 ("python-six" ,python-six)
10907 ("python-pygments" ,python-pygments)))
10908 (native-inputs
10909 `(("python-pytest" ,python-pytest)))
10910 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
10911 (synopsis "Library for building command line interfaces in Python")
10912 (description
10913 "Prompt-Toolkit is a library for building interactive command line
10914interfaces in Python. It's like GNU Readline but it also features syntax
10915highlighting while typing, out-of-the-box multi-line input editing, advanced
10916code completion, incremental search, support for Chinese double-width
10917characters, mouse support, and auto suggestions.")
10918 (license license:bsd-3)))
10919
10920(define-public python2-prompt-toolkit
10921 (package-with-python2 python-prompt-toolkit))
10922
10923(define-public python-prompt-toolkit-1
10924 (package (inherit python-prompt-toolkit)
10925 (version "1.0.15")
10926 (source
10927 (origin
10928 (method url-fetch)
10929 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10930 (sha256
10931 (base32
10932 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
10933
10934(define-public python2-prompt-toolkit-1
10935 (package-with-python2 python-prompt-toolkit-1))
10936
10937(define-public python-jedi
10938 (package
10939 (name "python-jedi")
296e1aea 10940 (version "0.15.1")
44d10b1f
RW
10941 (source
10942 (origin
10943 (method url-fetch)
10944 (uri (pypi-uri "jedi" version))
10945 (sha256
10946 (base32
296e1aea 10947 "0bp4pxhsynaarbvzblsn5x32lzp29svy3sxfy8i6m5iwz9s9r1ds"))))
44d10b1f
RW
10948 (build-system python-build-system)
10949 (arguments
296e1aea 10950 `(#:phases
44d10b1f 10951 (modify-phases %standard-phases
296e1aea
MC
10952 (add-after 'unpack 'disable-file-completion-test
10953 ;; A single parameterized test currently fail (see:
10954 ;; https://github.com/davidhalter/jedi/issues/1395). Remove it.
10955 (lambda _
10956 (substitute* "test/test_api/test_completion.py"
10957 ((".*'example.py', 'rb\"' \\+ join\\('\\.\\.'.*") ""))
10958 #t))
44d10b1f 10959 (replace 'check
296e1aea
MC
10960 (lambda _
10961 (setenv "HOME" "/tmp")
10962 (invoke "python" "-m" "pytest"))))))
44d10b1f
RW
10963 (native-inputs
10964 `(("python-pytest" ,python-pytest)
10965 ("python-docopt" ,python-docopt)))
10966 (propagated-inputs
10967 `(("python-parso" ,python-parso)))
10968 (home-page "https://github.com/davidhalter/jedi")
10969 (synopsis "Autocompletion and static analysis library for Python")
10970 (description
10971 "Jedi is a static analysis tool for Python that can be used in Integrated
10972Development Environments (@dfn{IDE}s) and text editors. It understands Python
10973on a deeper level than many other static analysis frameworks for Python.
10974
10975Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
10976well.")
10977 (license license:expat)))
10978
10979(define-public python2-jedi
296e1aea 10980 (package-with-python2 python-jedi))
44d10b1f
RW
10981
10982(define-public ptpython
10983 (package
10984 (name "ptpython")
10985 (version "0.34")
10986 (source (origin
10987 (method url-fetch)
10988 (uri (pypi-uri "ptpython" version))
10989 (sha256
10990 (base32
10991 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
10992 (build-system python-build-system)
10993 (arguments
10994 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
10995 (propagated-inputs
10996 `(("python-docopt" ,python-docopt)
10997 ("python-jedi" ,python-jedi)
10998 ("python-prompt-toolkit" ,python-prompt-toolkit)
10999 ("python-pygments" ,python-pygments)))
11000 (home-page "https://github.com/jonathanslenders/ptpython")
11001 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
11002 (description
11003 "ptpython is a Python read-eval-print loop with IDE-like features.
11004It supports syntax highlighting, multiline editing, autocompletion, mouse,
11005color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
11006etc.")
11007 (license license:bsd-3)
11008 (properties `((python2-variant . ,(delay ptpython-2))))))
11009
11010(define-public ptpython-2
11011 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
11012 (package
11013 (inherit base)
11014 (name "ptpython2"))))
11015
11016(define-public python-stem
11017 (package
11018 (name "python-stem")
e746d1c3 11019 (version "1.7.1")
44d10b1f
RW
11020 (source
11021 (origin
11022 (method url-fetch)
11023 (uri (pypi-uri "stem" version))
11024 (sha256
11025 (base32
e746d1c3 11026 "18lc95pmc7i089nlsb06dsxyjl5wbhxfqgdxbjcia35ndh8z7sn9"))))
44d10b1f
RW
11027 (build-system python-build-system)
11028 (arguments
11029 `(#:phases
11030 (modify-phases %standard-phases
11031 (replace 'check
11032 (lambda _
11033 (invoke "./run_tests.py" "--unit")
11034 #t)))))
11035 (native-inputs
11036 `(("python-mock" ,python-mock)
11037 ("python-pycodestyle" ,python-pycodestyle)
11038 ("python-pyflakes" ,python-pyflakes)))
11039 (home-page "https://stem.torproject.org/")
11040 (synopsis
11041 "Python controller library that allows applications to interact with Tor")
11042 (description
11043 "Stem is a Python controller library for Tor. With it you can use Tor's
11044control protocol to script against the Tor process and read descriptor data
11045relays publish about themselves.")
11046 (license license:lgpl3)))
11047
11048(define-public python2-stem
11049 (package-with-python2 python-stem))
11050
11051(define-public python-pyserial
11052 (package
11053 (name "python-pyserial")
00d81f98 11054 (version "3.4")
44d10b1f
RW
11055 (source
11056 (origin
11057 (method url-fetch)
11058 (uri (pypi-uri "pyserial" version))
11059 (sha256
11060 (base32
00d81f98 11061 "09y68bczw324a4jb9a1cfwrbjhq179vnfkkkrybbksp0vqgl0bbf"))))
44d10b1f
RW
11062 (build-system python-build-system)
11063 (arguments
11064 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
11065 ;; #:phases
11066 ;; (modify-phases %standard-phases
11067 ;; (replace 'check
11068 ;; (lambda _
11069 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
11070 (home-page
11071 "https://github.com/pyserial/pyserial")
11072 (synopsis "Python Serial Port Bindings")
11073 (description "@code{pyserial} provide serial port bindings for Python. It
11074supports different byte sizes, stop bits, parity and flow control with RTS/CTS
11075and/or Xon/Xoff. The port is accessed in RAW mode.")
11076 (license license:bsd-3)))
11077
11078(define-public python2-pyserial
11079 (package-with-python2 python-pyserial))
11080
11081(define-public python-kivy
11082 (package
11083 (name "python-kivy")
11084 (version "1.10.1")
11085 (source
11086 (origin
11087 (method url-fetch)
11088 (uri (pypi-uri "Kivy" version))
11089 (file-name (string-append name "-" version ".tar.gz"))
11090 (sha256
11091 (base32
11092 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
11093 (build-system python-build-system)
11094 (arguments
11095 `(#:tests? #f ; Tests require many optional packages
11096 #:phases
11097 (modify-phases %standard-phases
11098 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
11099 (lambda* (#:key inputs #:allow-other-keys)
11100 (setenv "KIVY_SDL2_PATH"
11101 (string-append (assoc-ref inputs "sdl-union")
11102 "/include/SDL2"))
11103 #t)))))
11104 (native-inputs
11105 `(("git" ,git)
11106 ("pkg-config" ,pkg-config)
11107 ("python-cython" ,python-cython)))
11108 (inputs
11109 `(("gstreamer" ,gstreamer)
11110 ("mesa" ,mesa)
11111 ("sdl-union"
11112 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
11113 (home-page "http://kivy.org")
11114 (synopsis
11115 "Multitouch application framework")
11116 (description
11117 "A software library for rapid development of
11118hardware-accelerated multitouch applications.")
11119 (license license:expat)))
11120
11121(define-public python2-kivy
11122 (package-with-python2 python-kivy))
11123
11124(define-public python-kivy-next
11125 (deprecated-package "python-kivy-next" python-kivy))
11126
11127(define-public python2-kivy-next
11128 (deprecated-package "python2-kivy-next" python2-kivy))
11129
11130(define-public python-binaryornot
11131 (package
11132 (name "python-binaryornot")
11133 (version "0.4.4")
11134 (source (origin
11135 (method url-fetch)
11136 (uri (pypi-uri "binaryornot" version))
11137 (sha256
11138 (base32
11139 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
11140 (build-system python-build-system)
86723f98
DM
11141 (arguments
11142 `(#:phases
11143 (modify-phases %standard-phases
ee623903 11144 (add-after 'unpack 'patch-tests
86723f98
DM
11145 (lambda _
11146 ;; TypeError: binary() got an unexpected keyword argument
11147 ;; 'average_size'.
11148 (substitute* "tests/test_check.py"
11149 (("average_size=512") ""))
11150 #t)))))
44d10b1f
RW
11151 (propagated-inputs
11152 `(("python-chardet" ,python-chardet)
11153 ("python-hypothesis" ,python-hypothesis)))
11154 (home-page "https://github.com/audreyr/binaryornot")
11155 (synopsis "Package to check if a file is binary or text")
11156 (description "Ultra-lightweight pure Python package to check if a file is
11157binary or text.")
11158 (license license:bsd-3)
11159 (properties `((python2-variant . ,(delay python2-binaryornot))))))
11160
11161(define-public python2-binaryornot
11162 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
11163 (package (inherit base)
11164 (propagated-inputs
11165 `(("python2-enum34" ,python2-enum34)
11166 ,@(package-propagated-inputs base))))))
11167
f315673d
VC
11168(define-public python-binwalk
11169 (let ((commit "64201acfb5b0a9cdd9faa58c40a36dcff8612e29")
11170 (revision "0"))
11171 (package
11172 (name "python-binwalk")
11173 (version (git-version "2.1.1" revision commit))
11174 (source
11175 (origin
11176 (method git-fetch)
11177 (uri (git-reference
11178 (url "https://github.com/ReFirmLabs/binwalk")
11179 (commit commit)))
11180 (file-name (git-file-name name version))
11181 (sha256
11182 (base32
11183 "1z7ca6rfp887hw5jc3sb45mm4fa0xid4lsp2z8g4r590dr7k7w15"))))
11184 (build-system python-build-system)
11185 (arguments
11186 `(#:phases
11187 (modify-phases %standard-phases
11188 (add-before 'check 'set-pythonpath
11189 (lambda _
11190 (setenv "PYTHONPATH"
11191 (string-append
11192 (getcwd) "/src/"
11193 ":" (getenv "PYTHONPATH")))
11194 (setenv "HOME" "")
11195 #t)))))
11196 (native-inputs
11197 `(("python-coverage" ,python-coverage)
11198 ("python-nose" ,python-nose)))
11199 (home-page "https://github.com/ReFirmLabs/binwalk")
11200 (synopsis "Firmware analysis tool")
11201 (description "Binwalk is a tool for analyzing, reverse engineering, and extracting firmware images")
11202 (license license:expat))))
11203
44d10b1f
RW
11204(define-public python-nltk
11205 (package
11206 (name "python-nltk")
11207 (version "3.2.1")
11208 (source (origin
11209 (method url-fetch)
11210 (uri (pypi-uri "nltk" version))
11211 (sha256
11212 (base32
11213 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
11214 (build-system python-build-system)
11215 (arguments
11216 '(;; The tests require some extra resources to be downloaded.
11217 ;; TODO Try packaging these resources.
11218 #:tests? #f))
11219 (home-page "http://nltk.org/")
11220 (synopsis "Natural Language Toolkit")
11221 (description "It provides interfaces to over 50 corpora and lexical
11222resources such as WordNet, along with a suite of text processing libraries
11223for classification, tokenization, stemming, tagging, parsing, and semantic
11224reasoning, wrappers for natural language processing libraries.")
11225 (license license:asl2.0)))
11226
11227(define-public python2-nltk
11228 (package-with-python2 python-nltk))
11229
11230(define-public python-pymongo
11231 (package
11232 (name "python-pymongo")
11233 (version "3.7.2")
11234 (source (origin
11235 (method url-fetch)
11236 (uri (pypi-uri "pymongo" version))
11237 (sha256
11238 (base32
11239 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
11240 (build-system python-build-system)
11241 (propagated-inputs
11242 `(("python-certifi" ,python-certifi)))
11243 (home-page "https://github.com/mongodb/mongo-python-driver")
11244 (synopsis "Python driver for MongoDB")
11245 (description "Python driver for MongoDB.")
11246 (license license:asl2.0)))
11247
11248(define-public python2-pymongo
11249 (package-with-python2 python-pymongo))
11250
44d10b1f
RW
11251(define-public python-consul
11252 (package
11253 (name "python-consul")
11254 (version "0.6.1")
11255 (source
11256 (origin
11257 (method url-fetch)
11258 (uri (pypi-uri "python-consul" version))
11259 (sha256
11260 (base32
11261 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
11262 (build-system python-build-system)
11263 (arguments
11264 '(#:tests? #f)) ; The tests are not distributed
11265 (propagated-inputs
11266 `(("python-requests" ,python-requests)
11267 ("python-six" ,python-six)))
11268 (home-page "https://github.com/cablehead/python-consul")
11269 (synopsis "Python client for Consul")
11270 (description
11271 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
11272discovery, monitoring and configuration.")
11273 (license license:expat)))
11274
11275(define-public python2-consul
11276 (package-with-python2 python-consul))
11277
11278(define-public python-schematics
11279 (package
11280 (name "python-schematics")
11281 (version "1.1.1")
11282 (source
1961d187
TGR
11283 (origin
11284 (method git-fetch)
11285 (uri (git-reference
11286 (url "https://github.com/schematics/schematics.git")
11287 (commit (string-append "v" version))))
11288 (file-name (git-file-name name version))
11289 (sha256
11290 (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd"))))
44d10b1f
RW
11291 (build-system python-build-system)
11292 (propagated-inputs
11293 `(("python-six" ,python-six)))
11294 (arguments
1961d187
TGR
11295 ;; The tests require a bunch of not very nice packages with fixed
11296 ;; version requirements (e.g. python-coveralls).
11297 `(#:tests? #f))
44d10b1f
RW
11298 (home-page "https://github.com/schematics/schematics")
11299 (synopsis "Python Data Structures for Humans")
11300 (description "Python Data Structures for Humans.")
11301 (license license:bsd-3)))
11302
11303(define-public python2-schematics
11304 (package-with-python2 python-schematics))
11305
11306(define-public python-odfpy
11307 (package
11308 (name "python-odfpy")
11309 (version "1.3.3")
11310 (source (origin
11311 (method url-fetch)
11312 (uri (pypi-uri "odfpy" version))
11313 (sha256
11314 (base32
11315 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
11316 (arguments
11317 `(#:modules ((srfi srfi-1)
11318 (guix build python-build-system)
11319 (guix build utils))
11320 #:phases
11321 (modify-phases %standard-phases
11322 (replace 'check
11323 ;; The test runner invokes python2 and python3 for test*.py.
11324 ;; To avoid having both in inputs, we replicate it here.
11325 (lambda _
21ccc01d
RW
11326 (for-each (lambda (test-file) (invoke "python" test-file))
11327 (find-files "tests" "^test.*\\.py$"))
11328 #t)))))
44d10b1f
RW
11329 (build-system python-build-system)
11330 (home-page "https://github.com/eea/odfpy")
11331 (synopsis "Python API and tools to manipulate OpenDocument files")
11332 (description "Collection of libraries and utility programs written in
11333Python to manipulate OpenDocument 1.2 files.")
11334 (license
11335 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
11336 ;; number of files with other licenses.
11337 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
11338
11339(define-public python2-odfpy
11340 (package-with-python2 python-odfpy))
11341
11342(define-public python-natsort
11343 (package
11344 (name "python-natsort")
11345 (version "5.4.1")
11346 (source (origin
11347 (method url-fetch)
11348 (uri (pypi-uri "natsort" version))
11349 (sha256
11350 (base32
11351 "0i732amg6yzkx4g4c9j09jmqq39q377x9cl2nbkm5hax2c2v0wxf"))))
11352 (build-system python-build-system)
11353 (arguments
11354 `(#:modules ((guix build utils)
11355 (guix build python-build-system)
11356 (srfi srfi-1)
11357 (srfi srfi-26)
11358 (ice-9 ftw))
11359 #:phases
11360 (modify-phases %standard-phases
11361 (add-before 'check 'set-cachedir
11362 ;; Tests require write access to $HOME by default
11363 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
11364 (replace 'check
11365 (lambda _
11366 (let ((cwd (getcwd)))
11367 (setenv "PYTHONPATH"
11368 (string-append
11369 cwd "/build/"
11370 (find (cut string-prefix? "lib" <>)
11371 (scandir (string-append cwd "/build")))
11372 ":"
11373 (getenv "PYTHONPATH")))
11374 (invoke "pytest" "-v")))))))
11375 (native-inputs
11376 `(("python-hypothesis" ,python-hypothesis)
11377 ("python-pytest-cov" ,python-pytest-cov)
11378 ("python-pytest-mock" ,python-pytest-mock)
11379 ("python-pytest" ,python-pytest)))
11380 (propagated-inputs ; TODO: Add python-fastnumbers.
11381 `(("python-pyicu" ,python-pyicu)))
11382 (home-page "https://github.com/SethMMorton/natsort")
11383 (synopsis "Natural sorting for python and shell")
11384 (description
11385 "Natsort lets you apply natural sorting on lists instead of
11386lexicographical. If you use the built-in @code{sorted} method in python
36a4366d
EF
11387on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4},
11388@code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20},
11389@code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that
11390identifies numbers and sorts them separately from strings. It can also sort
11391version numbers, real numbers, mixed types and more, and comes with a shell
11392command @command{natsort} that exposes this functionality in the command line.")
44d10b1f
RW
11393 (license license:expat)
11394 (properties `((python2-variant . ,(delay python2-natsort))))))
11395
11396(define-public python2-natsort
11397 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
11398 (package (inherit base)
11399 (native-inputs
11400 `(("python2-pathlib" ,python2-pathlib)
11401 ,@(package-native-inputs base))))))
11402
11403(define-public python-glances
11404 (package
11405 (name "python-glances")
a4ac25df 11406 (version "3.1.2")
44d10b1f
RW
11407 (source
11408 (origin
11409 (method url-fetch)
11410 (uri (pypi-uri "Glances" version))
11411 (sha256
a4ac25df 11412 (base32 "15384pbvw9wj4sb8zgvd9v1812vrypbyjg0acicjf1hdb3p30fkk"))
15b4c911
TGR
11413 (modules '((guix build utils)))
11414 (snippet
11415 '(begin
11416 ;; Glances phones PyPI for weekly update checks by default.
11417 ;; Disable these. The user can re-enable them if desired.
11418 (substitute* "glances/outdated.py"
11419 (("^(.*)self\\.load_config\\(config\\)\n" line indentation)
11420 (string-append indentation
11421 "self.args.disable_check_update = True\n"
11422 line)))
11423 #t))))
44d10b1f
RW
11424 (build-system python-build-system)
11425 (propagated-inputs
9898a2d3
TGR
11426 `(("python-future" ,python-future)
11427 ("python-psutil" ,python-psutil)))
a4ac25df 11428 (home-page "https://github.com/nicolargo/glances")
bab94ffa 11429 (synopsis "Cross-platform curses-based monitoring tool")
44d10b1f
RW
11430 (description
11431 "Glances is a curses-based monitoring tool for a wide variety of platforms.
bab94ffa
TGR
11432Glances uses the PsUtil library to get information from your system. It
11433monitors CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
44d10b1f
RW
11434 (license license:lgpl3+)))
11435
11436(define-public python2-glances
11437 (package-with-python2 python-glances))
11438
11439(define-public python-graphql-core
11440 (package
11441 (name "python-graphql-core")
11442 (version "0.5.3")
11443 (source
11444 (origin
11445 (method url-fetch)
11446 (uri (pypi-uri "graphql-core" version))
11447 (sha256
11448 (base32
11449 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
11450 (build-system python-build-system)
11451 (arguments
11452 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
11453 #:phases
11454 (modify-phases %standard-phases
11455 (add-after 'unpack 'patch-hardcoded-version
11456 (lambda _ (substitute*
11457 "setup.py"
11458 (("'gevent==1.1rc1'") "'gevent'"))
11459 #t)))))
11460 (native-inputs
11461 `(("python-gevent" ,python-gevent)
11462 ("python-mock" ,python-mock)
11463 ("python-pytest-mock" ,python-pytest-mock)))
11464 (propagated-inputs
11465 `(("python-promise" ,python-promise)
11466 ("python-six" ,python-six)))
11467 (home-page "https://github.com/graphql-python/graphql-core")
11468 (synopsis "GraphQL implementation for Python")
11469 (description
11470 "GraphQL implementation for Python. GraphQL is a data query language and
11471runtime designed and used to request and deliver data to mobile and web apps.
11472This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
11473to Python.")
11474 (license license:expat)))
11475
11476(define-public python2-graphql-core
11477 (package-with-python2 python-graphql-core))
11478
11479(define-public python-graphql-relay
11480 (package
11481 (name "python-graphql-relay")
11482 (version "0.4.5")
11483 (source
11484 (origin
11485 (method url-fetch)
11486 (uri (pypi-uri "graphql-relay" version))
11487 (sha256
11488 (base32
11489 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
11490 (build-system python-build-system)
11491 (arguments
11492 '(#:tests? #f)) ; The tests are not distributed
11493 (propagated-inputs
11494 `(("python-graphql-core" ,python-graphql-core)
11495 ("python-promise" ,python-promise)
11496 ("python-six" ,python-six)))
11497 (home-page "https://github.com/graphql-python/graphql-relay-py")
11498 (synopsis "Relay implementation for Python")
11499 (description
11500 "This is a library to allow the easy creation of Relay-compliant servers
11501using the GraphQL Python reference implementation of a GraphQL server. It
11502should be noted that the code is a exact port of the original
11503@url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
11504from Facebook.")
11505 (license license:expat)))
11506
11507(define-public python2-graphql-relay
11508 (package-with-python2 python-graphql-relay))
11509
11510(define-public python-graphene
11511 (package
11512 (name "python-graphene")
11513 (version "0.10.2")
11514 (source
11515 (origin
11516 (method url-fetch)
11517 (uri (pypi-uri "graphene" version))
11518 (sha256
11519 (base32
11520 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
11521 (build-system python-build-system)
11522 (propagated-inputs
11523 `(("python-graphql-core" ,python-graphql-core)
11524 ("python-graphql-relay" ,python-graphql-relay)
11525 ("python-iso8601" ,python-iso8601)
11526 ("python-promise" ,python-promise)
11527 ("python-six" ,python-six)))
11528 (arguments
11529 `(#:tests? #f)) ; no tests/ in the PyPI tarball
11530 (home-page "http://graphene-python.org/")
11531 (synopsis "GraphQL Framework for Python")
11532 (description
11533 "Graphene is a Python library for building GraphQL schemas/types.
11534A GraphQL schema describes your data model, and provides a GraphQL server
11535with an associated set of resolve methods that know how to fetch data.")
11536 (properties `((python2-variant . ,(delay python2-graphene))))
11537 (license license:expat)))
11538
11539(define-public python2-graphene
11540 (let ((base (package-with-python2
11541 (strip-python2-variant python-graphene))))
11542 (package (inherit base)
11543 (native-inputs
11544 `(("python2-sqlalchemy" ,python2-sqlalchemy)
11545 ,@(package-native-inputs base))))))
11546
11547(define-public python-nautilus
11548 (package
11549 (name "python-nautilus")
11550 (version "0.4.9")
11551 (source
11552 (origin
11553 (method url-fetch)
11554 (uri (pypi-uri "nautilus" version))
11555 (sha256
11556 (base32
11557 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
11558 (build-system python-build-system)
11559 (arguments `(#:tests? #f)) ; fails to import test modules
11560 (propagated-inputs
11561 `(("python-bcrypt" ,python-bcrypt)
11562 ("python-click" ,python-click)
11563 ("python-consul" ,python-consul)
11564 ("python-graphene" ,python-graphene)
11565 ("python-jinja2" ,python-jinja2)
11566 ("python-peewee" ,python-peewee)
11567 ("python-pika" ,python-pika)
11568 ("python-tornado" ,python-tornado)
11569 ("python-wtforms" ,python-wtforms)))
11570 (native-inputs
11571 `(("python-nose2" ,python-nose2)))
11572 (home-page "https://github.com/AlecAivazis/nautilus")
11573 (synopsis "Library for creating microservice applications")
11574 (description
11575 "Nautilus is a framework for flux based microservices that looks to
11576provide extendible implementations of common aspects of a cloud so that you can
11577focus on building massively scalable web applications.")
11578 (license license:expat)))
11579
11580(define-public python-snowballstemmer
11581 (package
11582 (name "python-snowballstemmer")
9b54d319 11583 (version "2.0.0")
44d10b1f
RW
11584 (source (origin
11585 (method url-fetch)
11586 (uri (pypi-uri "snowballstemmer" version))
11587 (sha256
11588 (base32
9b54d319 11589 "0ligk61idlz8kkgd5hpip5whm172riwglb6xydii7h62yhysqfyz"))))
44d10b1f
RW
11590 (build-system python-build-system)
11591 (arguments
11592 `(;; No tests exist
11593 #:tests? #f))
11594 (home-page "https://github.com/shibukawa/snowball_py")
11595 (synopsis "Snowball stemming library collection for Python")
11596 (description "This package provides 16 word stemmer algorithms generated
11597from Snowball algorithms. It includes the 15 original ones plus the Poerter
11598English stemmer.")
11599 (license license:bsd-3)))
11600
11601(define-public python2-snowballstemmer
11602 (package-with-python2 python-snowballstemmer))
11603
44d10b1f
RW
11604(define-public python-setproctitle
11605(package
11606 (name "python-setproctitle")
11607 (version "1.1.10")
11608 (source
11609 (origin
11610 (method url-fetch)
11611 (uri (pypi-uri "setproctitle" version))
11612 (sha256
11613 (base32
11614 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
11615 (build-system python-build-system)
11616 (arguments
11617 '(#:phases
11618 (modify-phases %standard-phases
11619 (add-before 'check 'patch-Makefile
11620 ;; Stricly this is only required for the python2 variant.
11621 ;; But adding a phase in an inherited package seems to be
11622 ;; cumbersum. So we patch even for python3.
11623 (lambda _
11624 (let ((nose (assoc-ref %build-inputs "python2-nose")))
11625 (when nose
11626 (substitute* "Makefile"
11627 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
11628 (string-append nose "/bin/nosetests "))))
11629 #t)))
11630 (replace 'check
11631 (lambda _
11632 (setenv "PYTHON" (or (which "python3") (which "python")))
11633 (setenv "PYCONFIG" (or (which "python3-config")
11634 (which "python-config")))
11635 (setenv "CC" "gcc")
11636 ;; No need to extend PYTHONPATH to find the built package, since
11637 ;; the Makefile will build anyway
11638 (invoke "make" "check"))))))
11639 (native-inputs
11640 `(("procps" ,procps))) ; required for tests
11641 (home-page
11642 "https://github.com/dvarrazzo/py-setproctitle")
11643 (synopsis
11644 "Setproctitle implementation for Python to customize the process title")
11645 (description "The library allows a process to change its title (as displayed
11646by system tools such as ps and top).
11647
11648Changing the title is mostly useful in multi-process systems, for
11649example when a master process is forked: changing the children's title
11650allows to identify the task each process is busy with. The technique
11651is used by PostgreSQL and the OpenSSH Server for example.")
11652 (license license:bsd-3)
11653 (properties `((python2-variant . ,(delay python2-setproctitle))))))
11654
11655(define-public python2-setproctitle
11656 (let ((base (package-with-python2
11657 (strip-python2-variant python-setproctitle))))
11658 (package
11659 (inherit base)
11660 (native-inputs `(("python2-nose" ,python2-nose)
11661 ,@(package-native-inputs base))))))
11662
11663(define-public python-validictory
11664 (package
11665 (name "python-validictory")
11666 (version "1.0.1")
11667 (source
11668 (origin
11669 (method url-fetch)
11670 (uri (pypi-uri "validictory" version))
11671 (sha256
11672 (base32
11673 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
11674 (build-system python-build-system)
11675 (arguments
11676 '(#:phases
11677 (modify-phases %standard-phases
11678 (add-after 'unpack 'bootstrap
11679 ;; Move the tests out of the package directory to avoid
11680 ;; packaging them.
11681 (lambda* _
11682 (rename-file "validictory/tests" "tests")
11683 (delete-file "tests/__init__.py")))
11684 (replace 'check
11685 (lambda _
11686 ;; Extend PYTHONPATH so the built package will be found.
11687 (setenv "PYTHONPATH"
11688 (string-append (getcwd) "/build/lib:"
11689 (getenv "PYTHONPATH")))
6568bd5d 11690 (invoke "py.test" "-vv" ))))))
44d10b1f
RW
11691 (native-inputs
11692 `(("python-pytest" ,python-pytest)))
11693 (home-page
11694 "https://github.com/jamesturk/validictory")
11695 (synopsis "General purpose Python data validator")
11696 (description "It allows validation of arbitrary Python data structures.
11697
11698The schema format is based on the JSON Schema
11699proposal (http://json-schema.org), so combined with json the library is also
11700useful as a validator for JSON data.")
11701 (license license:expat)))
11702
11703(define-public python2-validictory
11704 (package-with-python2 python-validictory))
11705
11706(define-public python-pyelftools
11707 (package
11708 (name "python-pyelftools")
11709 (version "0.25")
11710 (source
11711 (origin
11712 (method url-fetch)
11713 (uri (pypi-uri "pyelftools" version))
11714 (sha256
11715 (base32
11716 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
11717 (build-system python-build-system)
11718 (arguments
11719 `(#:phases
11720 (modify-phases %standard-phases
11721 (add-before 'check 'set-pythonpath
11722 (lambda _
11723 (setenv "PYTHONPATH"
11724 (string-append
11725 (getcwd) "/test/"
11726 ":" (getenv "PYTHONPATH")))
11727 #t)))))
11728 (home-page
11729 "https://github.com/eliben/pyelftools")
11730 (synopsis
11731 "Analyze binary and library file information")
11732 (description "This Python library provides interfaces for parsing and
11733analyzing two binary and library file formats; the Executable and Linking
11734Format (ELF), and debugging information in the Debugging With Attributed
11735Record Format (DWARF).")
11736 (license license:public-domain)))
11737
11738(define-public python-pyev
11739 (package
11740 (name "python-pyev")
11741 (version "0.9.0")
11742 (source
11743 (origin
11744 (method url-fetch)
11745 (uri (pypi-uri "pyev" version))
11746 (sha256
11747 (base32
11748 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
11749 (build-system python-build-system)
11750 (arguments
11751 `(#:tests? #f ; no test suite
11752 #:phases
11753 (modify-phases %standard-phases
11754 (add-after 'unpack 'patch
11755 (lambda* (#:key inputs #:allow-other-keys)
11756 (let ((libev (string-append (assoc-ref inputs "libev")
11757 "/lib/libev.so.4")))
11758 (substitute* "setup.py"
11759 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
11760 (string-append "libev_dll_name = \"" libev "\"")))))))))
11761 (inputs
11762 `(("libev" ,libev)))
11763 (home-page "http://pythonhosted.org/pyev/")
11764 (synopsis "Python libev interface")
11765 (description "Pyev provides a Python interface to libev.")
11766 (license license:gpl3)))
11767
11768(define-public python2-pyev
11769 (package-with-python2 python-pyev))
11770
11771(define-public python-imagesize
11772 (package
11773 (name "python-imagesize")
11774 (version "1.1.0")
11775 (source
11776 (origin
11777 (method url-fetch)
11778 (uri (pypi-uri "imagesize" version))
11779 (sha256
11780 (base32
11781 "1dg3wn7qpwmhgqc0r9na2ding1wif9q5spz3j9zn2riwphc2k0zk"))))
11782 (build-system python-build-system)
11783 (home-page "https://github.com/shibukawa/imagesize_py")
11784 (synopsis "Gets image size of files in various formats in Python")
11785 (description
11786 "This package allows determination of image size from
11787PNG, JPEG, JPEG2000 and GIF files in pure Python.")
11788 (license license:expat)))
11789
11790(define-public python2-imagesize
11791 (package-with-python2 python-imagesize))
11792
11793(define-public python-termstyle
11794 (package
11795 (name "python-termstyle")
11796 (version "0.1.11")
11797 (source
11798 (origin
11799 (method url-fetch)
11800 (uri (pypi-uri "termstyle" version))
11801 (sha256
11802 (base32
11803 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
11804 (build-system python-build-system)
11805 (arguments
11806 '(#:phases
11807 (modify-phases %standard-phases
11808 (replace 'check
11809 (lambda _
831080a6 11810 (invoke "python" "test3.py"))))))
44d10b1f
RW
11811 (home-page "https://github.com/gfxmonk/termstyle")
11812 (synopsis "Console text coloring for Python")
11813 (description "This package provides console text coloring for Python.")
11814 (license license:bsd-3)))
11815
11816(define-public python-argcomplete
11817 (package
11818 (name "python-argcomplete")
98aecd3a 11819 (version "1.10.3")
44d10b1f 11820 (source
98aecd3a
RW
11821 (origin
11822 (method url-fetch)
11823 (uri (pypi-uri "argcomplete" version))
11824 (sha256
11825 (base32
11826 "02jkc44drb0yjz6x28lvg6rj607n8r2irdpdvyylm8xnycn54zx3"))))
44d10b1f 11827 (build-system python-build-system)
98aecd3a
RW
11828 (arguments
11829 `(#:phases
11830 (modify-phases %standard-phases
11831 (add-after 'unpack 'embed-tool-references
11832 (lambda _
11833 (substitute* "argcomplete/bash_completion.d/python-argcomplete.sh"
11834 ((" grep")
11835 (string-append " " (which "grep")))
11836 ((" egrep")
11837 (string-append " " (which "egrep")))
11838 (("elif which")
11839 (string-append "elif " (which "which")))
11840 (("\\$\\(which")
11841 (string-append "$(" (which "which"))))
11842 #t)))))
11843 (inputs
11844 `(("grep" ,grep)
11845 ("which" ,which)))
44d10b1f 11846 (native-inputs
98aecd3a
RW
11847 `(("python-coverage" ,python-coverage)
11848 ("python-flake8" ,python-flake8)
11849 ("python-pexpect" ,python-pexpect)
11850 ("python-wheel" ,python-wheel)
44d10b1f 11851 ("tcsh" ,tcsh)
98aecd3a
RW
11852 ("fish" ,fish)
11853 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
44d10b1f
RW
11854 (home-page "https://github.com/kislyuk/argcomplete")
11855 (synopsis "Shell tab completion for Python argparse")
11856 (description "argcomplete provides extensible command line tab completion
11857of arguments and options for Python scripts using @code{argparse}. It's
11858particularly useful for programs with many options or sub-parsers that can
11859dynamically suggest completions; for example, when browsing resources over the
11860network.")
11861 (license license:asl2.0)))
11862
11863(define-public python2-argcomplete
11864 (package-with-python2 python-argcomplete))
11865
11866(define-public python-xopen
11867 (package
11868 (name "python-xopen")
24d64989 11869 (version "0.5.0")
44d10b1f
RW
11870 (source
11871 (origin
11872 (method url-fetch)
11873 (uri (pypi-uri "xopen" version))
11874 (sha256
11875 (base32
24d64989 11876 "17xbrgi23l87yg6h0qcknssp2q812miiy33qw6v45v5gx0jwv5xh"))))
44d10b1f 11877 (build-system python-build-system)
24d64989
RW
11878 (propagated-inputs
11879 `(("python-setuptools-scm" ,python-setuptools-scm)))
44d10b1f
RW
11880 (home-page "https://github.com/marcelm/xopen/")
11881 (synopsis "Open compressed files transparently")
11882 (description "This module provides an @code{xopen} function that works like
11883Python's built-in @code{open} function, but can also deal with compressed files.
11884Supported compression formats are gzip, bzip2 and, xz, and are automatically
11885recognized by their file extensions. The focus is on being as efficient as
11886possible on all supported Python versions.")
11887 (license license:expat)))
11888
11889(define-public python2-xopen
11890 (let ((base (package-with-python2
11891 (strip-python2-variant python-xopen))))
11892 (package
11893 (inherit base)
11894 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
11895 ,@(package-propagated-inputs base))))))
11896
11897(define-public python-cheetah
11898 (package
11899 (name "python-cheetah")
11900 (version "3.1.0")
11901 (source
11902 (origin
11903 (method url-fetch)
11904 (uri (pypi-uri "Cheetah3" version))
11905 (sha256
11906 (base32
11907 "1ihag9cxll6b86fc8v5lkhmr3brdbi4yiz16zpgw79yylmv8fgr9"))))
11908 (build-system python-build-system)
11909 (arguments
11910 `(#:modules ((guix build utils)
11911 (guix build python-build-system)
11912 (ice-9 ftw)
11913 (srfi srfi-1)
11914 (srfi srfi-26))
11915 #:phases (modify-phases %standard-phases
11916 (add-after 'unpack 'use-absolute-python
11917 (lambda _
11918 (substitute* "Cheetah/CheetahWrapper.py"
11919 (("#!/usr/bin/env python")
11920 (string-append "#!" (which "python"))))
11921 #t))
11922 (replace 'check
11923 (lambda _
11924 (let ((cwd (getcwd)))
11925 (setenv "PYTHONPATH"
11926 (string-append
11927 cwd "/build/"
11928 (find (cut string-prefix? "lib" <>)
11929 (scandir (string-append cwd "/build")))
11930 ":" (getenv "PYTHONPATH")))
11931 (setenv "PATH"
11932 (string-append (getenv "PATH")
11933 ":" cwd "/bin"))
11934 (setenv "TMPDIR" "/tmp")
11935
11936 (substitute* "Cheetah/Tests/Test.py"
11937 (("unittest.TextTestRunner\\(\\)")
11938 "unittest.TextTestRunner(verbosity=2)"))
11939
11940 (invoke "python" "Cheetah/Tests/Test.py")))))))
11941 (propagated-inputs
11942 `(("python-markdown" ,python-markdown))) ;optional
11943 (home-page "http://cheetahtemplate.org/")
11944 (synopsis "Template engine")
11945 (description "Cheetah is a text-based template engine and Python code
11946generator.
11947
11948Cheetah can be used as a standalone templating utility or referenced as
11949a library from other Python applications. It has many potential uses,
11950but web developers looking for a viable alternative to ASP, JSP, PHP and
11951PSP are expected to be its principle user group.
11952
11953Features:
11954@enumerate
11955@item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
11956 text-based format.
11957@item Cleanly separates content, graphic design, and program code.
11958@item Blends the power and flexibility of Python with a simple template language
11959 that non-programmers can understand.
11960@item Gives template writers full access to any Python data structure, module,
11961 function, object, or method in their templates.
11962@item Makes code reuse easy by providing an object-orientated interface to
11963 templates that is accessible from Python code or other Cheetah templates.
11964 One template can subclass another and selectively reimplement sections of it.
11965@item Provides a simple, yet powerful, caching mechanism that can dramatically
11966 improve the performance of a dynamic website.
11967@item Compiles templates into optimized, yet readable, Python code.
11968@end enumerate")
11969 (license (license:x11-style "file://LICENSE"))))
11970
11971(define-public python2-cheetah
11972 (package-with-python2 python-cheetah))
11973
11974(define-public python-dulwich
11975 (package
11976 (name "python-dulwich")
11977 (version "0.18.6")
11978 (source
11979 (origin
11980 (method url-fetch)
11981 (uri (list (string-append "https://www.dulwich.io/releases/"
11982 "dulwich-" version ".tar.gz")
11983 (pypi-uri "dulwich" version)))
11984 (sha256
11985 (base32
11986 "1aa1xfrxkc3j9s4xi0llhf5gndyi9ryprcxsqfa5fcb8ph34981q"))))
11987 (build-system python-build-system)
11988 (arguments
11989 `(#:phases
11990 (modify-phases %standard-phases
11991 (add-before 'check 'fix-tests
11992 (lambda* (#:key inputs #:allow-other-keys)
11993 ;; The tests use Popen with a custom environment which doesn't
11994 ;; include PATH.
11995 (substitute* "dulwich/tests/compat/utils.py"
11996 (("'git'") (string-append "'"
11997 (which "git")
11998 "'")))
11999 (substitute* '("dulwich/tests/test_repository.py"
12000 "dulwich/tests/test_hooks.py")
12001 (("#!/bin/sh") (string-append "#!" (which "sh"))))
12002 (setenv "TEST_RUNNER" "unittest")
12003 (setenv "PYTHONHASHSEED" "random")
12004 #t)))))
12005 (propagated-inputs
12006 `(("python-fastimport" ,python-fastimport)))
12007 (native-inputs
12008 `(("python-mock" ,python-mock)
12009 ("python-geventhttpclient" ,python-geventhttpclient)
12010 ("git" ,git)))
12011 (home-page "https://www.dulwich.io/")
12012 (synopsis "Git implementation in Python")
12013 (description "Dulwich is an implementation of the Git file formats and
12014protocols written in pure Python.")
12015 ;; Can be used with either license.
12016 (license (list license:asl2.0 license:gpl2+))))
12017
12018(define-public python2-dulwich
12019 (package-with-python2 python-dulwich))
12020
12021(define-public python-pbkdf2
12022 (package
12023 (name "python-pbkdf2")
12024 (version "1.3")
12025 (source
12026 (origin
12027 (method url-fetch)
12028 (uri (pypi-uri "pbkdf2" version))
12029 (sha256
12030 (base32
12031 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
12032 (build-system python-build-system)
12033 (arguments
12034 '(#:phases
12035 (modify-phases %standard-phases
12036 (replace 'check
12037 (lambda _
12038 (setenv "PYTHONPATH"
12039 (string-append (getcwd) "/build/lib:"
12040 (getenv "PYTHONPATH")))
ee2bb944 12041 (invoke "python" "test/test_pbkdf2.py"))))))
44d10b1f
RW
12042 (propagated-inputs
12043 `(("python-pycrypto" ,python-pycrypto))) ; optional
12044 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
12045 (synopsis "Password-based key derivation")
12046 (description "This module implements the password-based key derivation
12047function, PBKDF2, specified in RSA PKCS#5 v2.0.
12048
12049PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
12050is part of the RSA Public Key Cryptography Standards series. The provided
12051implementation takes a password or a passphrase and a salt value (and
12052optionally a iteration count, a digest module, and a MAC module) and provides
12053a file-like object from which an arbitrarly-sized key can be read.")
12054 (license license:expat)))
12055
12056(define-public python2-pbkdf2
12057 (package-with-python2 python-pbkdf2))
12058
12059(define-public python-qrcode
12060 (package
12061 (name "python-qrcode")
217ea1a1 12062 (version "6.1")
44d10b1f
RW
12063 (source
12064 (origin
12065 (method url-fetch)
12066 (uri (pypi-uri "qrcode" version))
12067 (sha256
217ea1a1 12068 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
44d10b1f
RW
12069 (build-system python-build-system)
12070 (arguments
12071 ;; FIXME: Tests require packaging 'pymaging'.
12072 '(#:tests? #f))
12073 (propagated-inputs
12074 `(("python-lxml" ,python-lxml) ; for SVG output
12075 ("python-pillow" ,python-pillow) ; for PNG output
12076 ("python-six" ,python-six)))
44d10b1f
RW
12077 (home-page "https://github.com/lincolnloop/python-qrcode")
12078 (synopsis "QR Code image generator")
12079 (description "This package provides a pure Python QR Code generator
12080module. It uses the Python Imaging Library (PIL) to allow for the generation
12081of QR Codes.
12082
12083In addition this package provides a command line tool to generate QR codes and
12084either write these QR codes to a file or do the output as ascii art at the
12085console.")
12086 (license license:bsd-3)))
12087
12088(define-public python2-qrcode
12089 (package-with-python2 python-qrcode))
12090
12091(define-public python-rst2ansi
12092 (package
12093 (name "python-rst2ansi")
12094 (version "0.1.5")
12095 (source
12096 (origin
12097 (method url-fetch)
12098 (uri (pypi-uri "rst2ansi" version))
12099 (sha256
12100 (base32
12101 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
12102 (build-system python-build-system)
12103 (propagated-inputs
12104 `(("python-docutils" ,python-docutils)))
12105 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
12106 (synopsis "Convert RST to ANSI-decorated console output")
12107 (description
12108 "Python module dedicated to rendering RST (reStructuredText) documents
12109to ansi-escaped strings suitable for display in a terminal.")
12110 (license license:expat)))
12111
12112(define-public python-ansi2html
12113 (package
12114 (name "python-ansi2html")
12115 (version "1.2.0")
12116 (source
12117 (origin
12118 (method url-fetch)
12119 (uri (pypi-uri "ansi2html" version))
12120 (sha256
12121 (base32
12122 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
12123 (build-system python-build-system)
12124 (native-inputs
12125 `(("python-mock" ,python-mock)
12126 ("python-nose" ,python-nose)))
12127 (propagated-inputs
12128 `(("python-six" ,python-six)))
12129 (home-page "https://github.com/ralphbean/ansi2html")
12130 (synopsis "Convert ANSI-decorated console output to HTML")
12131 (description
12132 "@command{ansi2html} is a Python library and command line utility for
12133convering text with ANSI color codes to HTML or LaTeX.")
12134 (license license:gpl3+)))
12135
12136(define-public python2-ansi2html
12137 (package-with-python2 python-ansi2html))
12138
12139(define-public python-ddt
12140 (package
12141 (name "python-ddt")
12142 (version "1.1.3")
12143 (source
12144 (origin
12145 (method url-fetch)
12146 (uri (pypi-uri "ddt" version))
12147 (sha256
12148 (base32
12149 "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk"))))
12150 (build-system python-build-system)
12151 (native-inputs
12152 `(("python-mock" ,python-mock)
12153 ("python-nose" ,python-nose)))
12154 (propagated-inputs
12155 `(("python-six" ,python-six)
12156 ("python-pyyaml" ,python-pyyaml)))
12157 (home-page "https://github.com/txels/ddt")
12158 (synopsis "Data-Driven Tests")
12159 (description
12160 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
12161running it with different test data, and make it appear as multiple test
12162cases.")
12163 (license license:expat)))
12164
12165(define-public python2-ddt
12166 (package-with-python2 python-ddt))
12167
12168(define-public python-pycountry
12169 (package
12170 (name "python-pycountry")
12171 (version "18.5.26")
12172 (source
12173 (origin
12174 (method url-fetch)
12175 (uri (pypi-uri "pycountry" version))
12176 (sha256
12177 (base32
12178 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
12179 (build-system python-build-system)
12180 (home-page "https://bitbucket.org/flyingcircus/pycountry")
12181 (synopsis "ISO databases for languages, countries, currencies, etc.")
12182 (description
12183 "@code{pycountry} provides the ISO databases for the standards:
12184@enumerate
12185@item 639-3 (Languages)
12186@item 3166 (Countries)
12187@item 3166-3 (Deleted Countries)
12188@item 3166-2 (Subdivisions of countries)
12189@item 4217 (Currencies)
12190@item 15924 (Scripts)
12191@end enumerate
12192It includes a copy from Debian’s pkg-isocodes and makes the data accessible
12193through a Python API.")
12194 (license license:lgpl2.1+)))
12195
12196(define-public python2-pycountry
12197 (package-with-python2 python-pycountry))
12198
12199(define-public python-pycosat
12200 (package
12201 (name "python-pycosat")
12202 (version "0.6.1")
12203 (source
12204 (origin
12205 (method url-fetch)
12206 (uri (pypi-uri "pycosat" version))
12207 (sha256
12208 (base32
12209 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
12210 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
12211 (build-system python-build-system)
12212 (home-page "https://github.com/ContinuumIO/pycosat")
12213 (synopsis "Bindings to picosat (a SAT solver)")
12214 (description
12215 "This package provides efficient Python bindings to @code{picosat} on
12216the C level. When importing pycosat, the @code{picosat} solver becomes part
12217of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
12218Problem} (SAT) solver.")
12219 (license license:expat)))
12220
12221(define-public python2-pycosat
12222 (package-with-python2 python-pycosat))
12223
12224(define-public python2-ruamel.ordereddict
12225 (package
12226 (name "python2-ruamel.ordereddict")
12227 (version "0.4.9")
12228 (source
12229 (origin
12230 (method url-fetch)
12231 (uri (pypi-uri "ruamel.ordereddict" version))
12232 (sha256
12233 (base32
12234 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
12235 (build-system python-build-system)
12236 (arguments
12237 `(#:python ,python-2
12238 #:phases
12239 (modify-phases %standard-phases
12240 (delete 'check)
12241 (add-after 'install 'check
12242 (lambda* (#:key inputs outputs #:allow-other-keys)
12243 (add-installed-pythonpath inputs outputs)
f987ac30 12244 (invoke "python" "test/testordereddict.py"))))))
44d10b1f
RW
12245 (home-page "https://bitbucket.org/ruamel/ordereddict")
12246 (synopsis "Version of dict that keeps keys in insertion order")
12247 (description
12248 "This is an implementation of an ordered dictionary with @dfn{Key
12249Insertion Order} (KIO: updates of values do not affect the position of the
12250key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
12251removed and put at the back). The standard library module @code{OrderedDict},
12252implemented later, implements a subset of @code{ordereddict} functionality.
12253Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
12254Order} (KSO, no sorting function can be specified, but a transform can be
12255specified to apply on the key before comparison (e.g. @code{string.lower})).")
12256 (license license:expat)))
12257
12258(define-public python-pypeg2
12259 (package
12260 (name "python-pypeg2")
12261 (version "2.15.2")
12262 (source
12263 (origin
12264 (method url-fetch)
12265 (uri (pypi-uri "pyPEG2" version))
12266 (sha256
12267 (base32
12268 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
12269 (build-system python-build-system)
12270 (propagated-inputs `(("python-lxml" ,python-lxml)))
12271 (arguments
12272 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
12273 '(#:tests? #f))
12274 (home-page "https://fdik.org/pyPEG/")
12275 (synopsis "Parsering Expression Grammars in Python")
12276 (description "PyPEG is an intrinsic parser interpreter framework for
12277Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
12278parse many formal languages.")
12279 (license license:gpl2)))
12280
12281(define-public python-incremental
12282 (package
12283 (name "python-incremental")
12284 (version "17.5.0")
12285 (source
12286 (origin
12287 (method url-fetch)
12288 (uri (pypi-uri "incremental" version))
12289 (sha256
12290 (base32
12291 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
12292 (build-system python-build-system)
12293 (home-page "https://github.com/hawkowl/incremental")
12294 (synopsis "Library for versioning Python projects")
12295 (description "Incremental is a small library that versions your Python
12296projects.")
12297 (license license:expat)))
12298
12299(define-public python2-incremental
12300 (package-with-python2 python-incremental))
12301
12302(define-public python-invoke
12303 (package
12304 (name "python-invoke")
12305 (home-page "http://www.pyinvoke.org/")
a5662319 12306 (version "1.3.0")
44d10b1f
RW
12307 (source (origin
12308 (method url-fetch)
12309 (uri (pypi-uri "invoke" version))
12310 (sha256
12311 (base32
a5662319 12312 "1nn7gad0rvy492acpyhkrp01zsk86acf34qhsvq4xmm6x39788n5"))))
44d10b1f
RW
12313 (build-system python-build-system)
12314 (arguments
12315 ;; XXX: Requires many dependencies that are not yet in Guix.
12316 `(#:tests? #f))
12317 (synopsis "Pythonic task execution")
12318 (description
12319 "Invoke is a Python task execution tool and library, drawing inspiration
12320from various sources to arrive at a powerful and clean feature set. It is
12321evolved from the Fabric project, but focuses on local and abstract concerns
12322instead of servers and network commands.")
12323 (license license:bsd-3)))
12324
12325(define-public python2-invoke
12326 (package-with-python2 python-invoke))
12327
12328(define-public python-automat
12329 (package
12330 (name "python-automat")
919d80a0 12331 (version "0.7.0")
44d10b1f
RW
12332 (source (origin
12333 (method url-fetch)
12334 (uri (pypi-uri "Automat" version))
12335 (sha256
12336 (base32
919d80a0 12337 "03ivg70n3b1cbcd2zvjhk8y4kmqxcvhmili39lmgx09dza1qpmyb"))))
44d10b1f
RW
12338 (build-system python-build-system)
12339 ;; We disable the tests because they require python-twisted, while
12340 ;; python-twisted depends on python-automat. Twisted is optional, but the
12341 ;; tests fail if it is not available. Also see
12342 ;; <https://github.com/glyph/automat/issues/71>.
12343 (arguments '(#:tests? #f))
12344 (native-inputs
12345 `(("python-m2r" ,python-m2r)
12346 ("python-setuptools-scm" ,python-setuptools-scm)
12347 ("python-graphviz" ,python-graphviz)))
12348 (propagated-inputs
12349 `(("python-six" ,python-six)
12350 ("python-attrs" ,python-attrs)))
12351 (home-page "https://github.com/glyph/Automat")
12352 (synopsis "Self-service finite-state machines")
12353 (description "Automat is a library for concise, idiomatic Python
12354expression of finite-state automata (particularly deterministic finite-state
12355transducers).")
12356 (license license:expat)))
12357
12358(define-public python2-automat
12359 (package-with-python2 python-automat))
12360
12361(define-public python-m2r
12362 (package
12363 (name "python-m2r")
bcfb8fac 12364 (version "0.2.1")
44d10b1f
RW
12365 (source (origin
12366 (method url-fetch)
12367 (uri (pypi-uri "m2r" version))
12368 (sha256
12369 (base32
bcfb8fac 12370 "16gdm8i06jjmlpvckpfmlkr4693dh0vs192vgsqn84fsdkbbm45z"))))
44d10b1f
RW
12371 (build-system python-build-system)
12372 (propagated-inputs
12373 `(("python-docutils" ,python-docutils)
12374 ("python-mistune" ,python-mistune)))
12375 (native-inputs
12376 `(("python-pygments" ,python-pygments)
12377 ("python-mock" ,python-mock)))
12378 (home-page "https://github.com/miyakogi/m2r")
12379 (synopsis "Markdown to reStructuredText converter")
12380 (description "M2R converts a markdown file including reST markups to valid
12381reST format.")
12382 (license license:expat)))
12383
12384(define-public python2-m2r
12385 (package-with-python2 python-m2r))
12386
12387(define-public python-constantly
12388 (package
12389 (name "python-constantly")
12390 (version "15.1.0")
12391 (source (origin
12392 (method url-fetch)
12393 (uri (pypi-uri "constantly" version))
12394 (sha256
12395 (base32
12396 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
12397 (build-system python-build-system)
12398 (home-page "https://github.com/twisted/constantly")
12399 (synopsis "Symbolic constants in Python")
12400 (description "Constantly is a Python library that provides symbolic
12401constant support. It includes collections and constants with text, numeric,
12402and bit flag values.")
12403 (license license:expat)))
12404
12405(define-public python2-constantly
12406 (package-with-python2 python-constantly))
12407
12408(define-public python-attrs
12409 (package
12410 (name "python-attrs")
c41d5144 12411 (version "19.1.0")
44d10b1f
RW
12412 (source (origin
12413 (method url-fetch)
12414 (uri (pypi-uri "attrs" version))
12415 (sha256
12416 (base32
c41d5144 12417 "16g33zr5f449lqc5wgvzpknxryfzrfsxcr6kpgxwn7l5fkv71f7h"))))
44d10b1f
RW
12418 (build-system python-build-system)
12419 (arguments
12420 `(#:modules ((guix build utils)
12421 (guix build python-build-system)
12422 (ice-9 ftw)
12423 (srfi srfi-1)
12424 (srfi srfi-26))
12425 #:phases (modify-phases %standard-phases
12426 (replace 'check
12427 (lambda _
12428 (let ((cwd (getcwd)))
12429 (setenv "PYTHONPATH"
12430 (string-append
12431 cwd "/build/"
12432 (find (cut string-prefix? "lib" <>)
12433 (scandir (string-append cwd "/build")))
12434 ":"
12435 (getenv "PYTHONPATH")))
12436 (invoke "python" "-m" "pytest")))))))
12437 (native-inputs
12438 `(("python-coverage" ,python-coverage)
12439 ("python-hypothesis" ,python-hypothesis)
12440 ("python-pympler" ,python-pympler)
12441 ("python-pytest" ,python-pytest)
12442 ("python-six" ,python-six)
12443 ("python-sphinx" ,python-sphinx)
12444 ("python-zope-interface" ,python-zope-interface)))
12445 (home-page "https://github.com/python-attrs/attrs/")
12446 (synopsis "Attributes without boilerplate")
12447 (description "@code{attrs} is a Python package with class decorators that
12448ease the chores of implementing the most common attribute-related object
12449protocols.")
12450 (license license:expat)))
12451
12452(define-public python2-attrs
12453 (package-with-python2 python-attrs))
12454
12455(define-public python-attrs-bootstrap
12456 (package
12457 (inherit python-attrs)
12458 (name "python-attrs-bootstrap")
44d10b1f
RW
12459 (native-inputs `())
12460 (arguments `(#:tests? #f))))
12461
12462(define-public python2-attrs-bootstrap
12463 (package-with-python2 python-attrs-bootstrap))
12464
12465(define-public python2-cliapp
12466 (package
12467 (name "python2-cliapp")
9064b84e 12468 (version "1.20180812.1")
44d10b1f
RW
12469 (source
12470 (origin
12471 (method url-fetch)
12472 (uri (string-append
12473 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
12474 version ".tar.gz"))
12475 (sha256
12476 (base32
9064b84e 12477 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
44d10b1f
RW
12478 (build-system python-build-system)
12479 (arguments
12480 `(#:python ,python-2
12481 #:phases
12482 (modify-phases %standard-phases
12483 ;; check phase needs to be run before the build phase. If not,
12484 ;; coverage-test-runner looks for tests for the built source files,
12485 ;; and fails.
12486 (delete 'check)
12487 (add-before 'build 'check
12488 (lambda _
12489 ;; Disable python3 tests
12490 (substitute* "check"
12491 (("python3") "# python3"))
6c826d32 12492 (invoke "./check"))))))
44d10b1f
RW
12493 (native-inputs
12494 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
12495 ("python2-pep8" ,python2-pep8)))
12496 (propagated-inputs
12497 `(("python2-pyaml" ,python2-pyaml)))
12498 (home-page "https://liw.fi/cliapp/")
12499 (synopsis "Python framework for command line programs")
12500 (description "@code{python2-cliapp} is a python framework for
12501command line programs. It contains the typical stuff such programs
12502need to do, such as parsing the command line for options, and
12503iterating over input files.")
12504 (license license:gpl2+)))
12505
12506(define-public python2-ttystatus
12507 (package
12508 (name "python2-ttystatus")
e516a9c2 12509 (version "0.36")
44d10b1f
RW
12510 (source
12511 (origin
12512 (method url-fetch)
12513 (uri (string-append
12514 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
12515 version ".tar.gz"))
12516 (sha256
12517 (base32
e516a9c2 12518 "06mdk4d19zw2j3is54gndhzl396g3xc8k52m7i86z69s9hcz71by"))))
44d10b1f
RW
12519 (build-system python-build-system)
12520 (native-inputs
12521 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
12522 ("python2-pep8" ,python2-pep8)))
12523 (arguments
12524 `(#:python ,python-2
12525 #:phases
12526 (modify-phases %standard-phases
12527 ;; check phase needs to be run before the build phase. If not,
12528 ;; coverage-test-runner looks for tests for the built source files,
12529 ;; and fails.
12530 (delete 'check)
12531 (add-before 'build 'check
cbeee881 12532 (lambda _ (invoke "make" "check"))))))
44d10b1f
RW
12533 (home-page "https://liw.fi/ttystatus/")
12534 (synopsis "Python library for showing progress reporting and
12535status updates on terminals")
12536 (description "@code{python2-ttystatus} is a python library for
12537showing progress reporting and status updates on terminals, for
12538command line programs. Output is automatically adapted to the width
12539of the terminal: truncated if it does not fit, and resized if the
12540terminal size changes.")
12541 (license license:gpl3+)))
12542
12543(define-public python2-tracing
12544 (package
12545 (name "python2-tracing")
12546 (version "0.10")
12547 (source
12548 (origin
12549 (method url-fetch)
12550 (uri (string-append
12551 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
12552 version ".tar.gz"))
12553 (sha256
12554 (base32
12555 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
12556 (build-system python-build-system)
12557 (arguments
12558 `(#:python ,python-2))
12559 (home-page "https://liw.fi/tracing/")
12560 (synopsis "Python debug logging helper")
12561 (description "@code{python2-tracing} is a python library for
12562logging debug messages. It provides a way to turn debugging messages
12563on and off, based on the filename they occur in. It is much faster
12564than using @code{logging.Filter} to accomplish the same thing, which
12565matters when code is run in production mode. The actual logging still
12566happens using the @code{logging} library.")
12567 (license license:gpl3+)))
12568
12569(define-public python2-larch
12570 (package
12571 (name "python2-larch")
12572 (version "1.20151025")
12573 (source
12574 (origin
12575 (method url-fetch)
12576 (uri (string-append
12577 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
12578 version ".tar.gz"))
12579 (patches (search-patches
12580 "python2-larch-coverage-4.0a6-compatibility.patch"))
12581 (sha256
12582 (base32
12583 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
12584 (build-system python-build-system)
12585 (arguments
12586 `(#:python ,python-2
12587 #:phases
12588 (modify-phases %standard-phases
12589 ;; check phase needs to be run before the build phase. If not,
12590 ;; coverage-test-runner looks for tests for the built source files,
12591 ;; and fails.
12592 (delete 'check)
12593 (add-before 'build 'check
204ad455 12594 (lambda _ (invoke "make" "check"))))))
44d10b1f
RW
12595 (native-inputs
12596 `(("cmdtest" ,cmdtest)
12597 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
12598 (propagated-inputs
12599 `(("python2-tracing" ,python2-tracing)))
12600 (home-page "https://liw.fi/larch/")
12601 (synopsis "Python copy-on-write B-tree library")
12602 (description "@code{python2-larch} is an implementation of
12603particular kind of B-tree, based on research by Ohad Rodeh. See
12604@url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
12605on the data structure.
12606
12607The distinctive feature of this B-tree is that a node is never
12608(conceptually) modified. Instead, all updates are done by
12609copy-on-write. This makes it easy to clone a tree, and modify only the
12610clone, while other processes access the original tree.")
12611 (license license:gpl3+)))
12612
12613(define-public python-astroid
12614 (package
12615 (name "python-astroid")
1c43c698 12616 (version "2.3.3")
44d10b1f
RW
12617 (source
12618 (origin
12619 (method url-fetch)
12620 (uri (pypi-uri "astroid" version))
12621 (sha256
1c43c698 12622 (base32 "0fnibsl2cb5mvzbfm7sycj85smx48f8w8m7ks1sqlmpr9ps0gski"))))
44d10b1f
RW
12623 (build-system python-build-system)
12624 (propagated-inputs
12625 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
12626 ("python-six" ,python-six)
f0935460 12627 ("python-typed-ast" ,python-typed-ast)
44d10b1f
RW
12628 ("python-wrapt" ,python-wrapt)))
12629 (native-inputs
12630 `(("python-dateutil" ,python-dateutil)
12631 ("python-nose" ,python-nose)
12632 ("python-pytest" ,python-pytest)
12633 ("python-pytest-runner" ,python-pytest-runner)))
12634 (arguments
12635 `(#:phases
12636 (modify-phases %standard-phases
12637 (add-after 'unpack 'remove-spurious-test
12638 (lambda _
12639 ;; This can be removed after upgrading from python-3.7
12640 ;; https://github.com/PyCQA/astroid/issues/593
12641 ;; https://bugs.python.org/issue34056
12642 (delete-file "astroid/tests/unittest_modutils.py")
12643 #t))
12644 (replace 'check
12645 (lambda _
12646 (invoke "pytest" "astroid"))))))
12647 (home-page "https://github.com/PyCQA/astroid")
12648 (synopsis "Common base representation of python source code for pylint and
12649other projects")
12650 (description "@code{python-astroid} provides a common base representation
12651of python source code for projects such as pychecker, pyreverse, pylint, etc.
12652
12653It provides a compatible representation which comes from the _ast module. It
12654rebuilds the tree generated by the builtin _ast module by recursively walking
12655down the AST and building an extended ast. The new node classes have
12656additional methods and attributes for different usages. They include some
12657support for static inference and local name scopes. Furthermore, astroid
12658builds partial trees by inspecting living objects.")
12659 (license license:lgpl2.1+)
12660 (properties `((python2-variant . ,(delay python2-astroid))))))
12661
12662(define-public python2-astroid
12663 (let ((base (package-with-python2
12664 (strip-python2-variant python-astroid))))
12665 (package (inherit base)
12666 ;; Version 2.x removes python2 support.
12667 (version "1.6.5")
12668 (source
12669 (origin
12670 (method url-fetch)
12671 (uri (pypi-uri "astroid" version))
12672 (sha256
12673 (base32
12674 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
12675 (arguments
12676 (substitute-keyword-arguments (package-arguments base)
12677 ((#:phases phases)
12678 `(modify-phases ,phases
12679 (add-after 'unpack 'remove-spurious-test
12680 (lambda _
12681 ;; https://github.com/PyCQA/astroid/issues/276
12682 (delete-file "astroid/tests/unittest_brain.py")
12683 #t))
12684 (replace 'check
12685 (lambda _
12686 (invoke"python" "-m" "unittest" "discover"
12687 "-p" "unittest*.py")))))))
12688 (native-inputs `())
12689 (propagated-inputs
12690 `(("python2-backports-functools-lru-cache"
12691 ,python2-backports-functools-lru-cache)
12692 ("python2-enum34" ,python2-enum34)
12693 ("python2-singledispatch" ,python2-singledispatch)
741f98b3
MO
12694 ,@(alist-delete "python-typed-ast"
12695 (package-propagated-inputs base)))))))
44d10b1f
RW
12696
12697(define-public python-isort
12698 (package
12699 (name "python-isort")
e2227b6a 12700 (version "4.3.4")
44d10b1f
RW
12701 (source
12702 (origin
e2227b6a
EF
12703 (method git-fetch)
12704 (uri (git-reference
12705 ;; Tests pass only from the Github sources
12706 (url "https://github.com/timothycrosley/isort")
12707 (commit version)))
12708 (file-name (git-file-name name version))
44d10b1f
RW
12709 (sha256
12710 (base32
e2227b6a 12711 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
44d10b1f
RW
12712 (build-system python-build-system)
12713 (native-inputs
12714 `(("python-mock" ,python-mock)
12715 ("python-pytest" ,python-pytest)))
12716 (home-page "https://github.com/timothycrosley/isort")
12717 (synopsis "Python utility/library to sort python imports")
12718 (description "@code{python-isort} is a python utility/library to sort
12719imports alphabetically, and automatically separated into sections. It
12720provides a command line utility, a python library and plugins for various
12721editors.")
e2227b6a
EF
12722 (license license:expat)
12723 (properties `((python2-variant . ,(delay python2-isort))))))
44d10b1f
RW
12724
12725(define-public python2-isort
e2227b6a
EF
12726 (let ((base (package-with-python2
12727 (strip-python2-variant python-isort))))
12728 (package (inherit base)
12729 (native-inputs
12730 `(("python2-futures" ,python2-futures)
12731 ,@(package-native-inputs base))))))
44d10b1f
RW
12732
12733(define-public python2-backports-functools-lru-cache
12734 (package
12735 (name "python2-backports-functools-lru-cache")
12736 (version "1.5")
12737 (source
12738 (origin
12739 (method url-fetch)
12740 ;; only the pypi tarballs contain the necessary metadata
12741 (uri (pypi-uri "backports.functools_lru_cache" version))
12742 (sha256
12743 (base32
12744 "06jgv8gib4fhky0p5cmxdghvsgjyzcdgk48k8pxb1ccf11znk64x"))))
12745 (build-system python-build-system)
12746 (native-inputs
12747 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
12748 (arguments
12749 `(#:python ,python-2))
12750 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
12751 (synopsis "Backport of functools.lru_cache from Python 3.3")
12752 (description "@code{python2-backports-functools-lru-cache} is a backport
12753of @code{functools.lru_cache} from python 3.3.")
12754 (license license:expat)))
12755
12756(define-public python-configparser
12757 (package
12758 (name "python-configparser")
84127f8c 12759 (version "3.7.1")
44d10b1f
RW
12760 (source
12761 (origin
12762 (method url-fetch)
84127f8c 12763 (uri (pypi-uri "configparser" version))
44d10b1f
RW
12764 (sha256
12765 (base32
84127f8c 12766 "0cnz213il9lhgda6x70fw7mfqr8da43s3wm343lwzhqx94mgmmav"))))
44d10b1f 12767 (build-system python-build-system)
809f003f 12768 (home-page "https://github.com/jaraco/configparser/")
44d10b1f
RW
12769 (synopsis "Backport of configparser from python 3.5")
12770 (description "@code{python-configparser} is a backport of
12771@code{configparser} from Python 3.5 so that it can be used directly
12772in other versions.")
12773 (license license:expat)))
12774
12775(define-public python2-configparser
12776 (package-with-python2 python-configparser))
12777
12778(define-public python-mando
12779 (package
12780 (name "python-mando")
12781 (version "0.6.4")
12782 (source (origin
12783 (method url-fetch)
12784 (uri (pypi-uri "mando" version))
12785 (sha256
12786 (base32
12787 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
12788 (build-system python-build-system)
12789 (propagated-inputs
12790 `(("python-rst2ansi" ,python-rst2ansi)
12791 ("python-six" ,python-six)))
12792 (native-inputs
12793 `(("python-pytest" ,python-pytest)))
12794 (home-page "https://mando.readthedocs.org/")
12795 (synopsis
12796 "Wrapper around argparse, allowing creation of complete CLI applications")
12797 (description
12798 "This package is a wrapper around argparse, allowing you to write complete CLI
12799applications in seconds while maintaining all the flexibility.")
12800 (license license:expat)))
12801
12802(define-public python2-mando
12803 (package-with-python2 python-mando))
12804
70daf82f
RW
12805(define-public python2-argparse
12806 (package
12807 (name "python2-argparse")
12808 (version "1.4.0")
12809 (source
12810 (origin
12811 (method url-fetch)
12812 (uri (pypi-uri "argparse" version))
12813 (sha256
12814 (base32
12815 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
12816 (build-system python-build-system)
12817 (arguments
12818 `(#:python ,python-2))
12819 (home-page "https://github.com/ThomasWaldmann/argparse/")
12820 (synopsis "Python command-line parsing library")
12821 (description
12822 "This package is mostly for people who want to have @code{argparse} on
12823older Pythons because it was not part of the standard library back then.")
12824 (license license:psfl)))
12825
44d10b1f
RW
12826(define-public python-fudge
12827 (package
12828 (name "python-fudge")
12829 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
12830 ;; package, which is currently the only use of this package.
12831 (version "0.9.6")
12832 (source
12833 (origin
12834 (method url-fetch)
12835 (uri (pypi-uri "fudge" version))
12836 (sha256
12837 (base32
12838 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
12839 (build-system python-build-system)
12840 (arguments
12841 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
12842 (home-page "https://github.com/fudge-py/fudge")
12843 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
12844 (description
12845 "Fudge is a Python module for using fake objects (mocks and stubs) to
12846test real ones.
12847
12848In readable Python code, you declare the methods available on your fake object
12849and how they should be called. Then you inject that into your application and
12850start testing. This declarative approach means you don’t have to record and
12851playback actions and you don’t have to inspect your fakes after running code.
12852If the fake object was used incorrectly then you’ll see an informative
12853exception message with a traceback that points to the culprit.")
12854 (license license:expat)))
12855
12856(define-public python2-fudge
12857 (package-with-python2 python-fudge))
12858
12859(define-public python-mwclient
12860 (package
12861 (name "python-mwclient")
957c6833 12862 (version "0.10.0")
44d10b1f
RW
12863 (source
12864 (origin
957c6833 12865 (method git-fetch)
44d10b1f 12866 ;; The PyPI version wouldn't contain tests.
957c6833
EF
12867 (uri (git-reference
12868 (url "https://github.com/mwclient/mwclient")
12869 (commit (string-append "v" version))))
12870 (file-name (git-file-name name version))
44d10b1f
RW
12871 (sha256
12872 (base32
957c6833 12873 "1c3q6lwmb05yqywc4ya98ca7hsl15niili8rccl4n1yqp77c103v"))))
44d10b1f
RW
12874 (build-system python-build-system)
12875 (propagated-inputs
957c6833 12876 `(("python-requests-oauthlib" ,python-requests-oauthlib)
44d10b1f
RW
12877 ("python-six" ,python-six)))
12878 (native-inputs
12879 `(("python-mock" ,python-mock)
12880 ("python-pytest" ,python-pytest)
44d10b1f 12881 ("python-pytest-cov" ,python-pytest-cov)
957c6833 12882 ("python-pytest-runner" ,python-pytest-runner)
44d10b1f
RW
12883 ("python-responses" ,python-responses)))
12884 (home-page "https://github.com/btongminh/mwclient")
12885 (synopsis "MediaWiki API client")
12886 (description "This package provides a MediaWiki API client.")
12887 (license license:expat)))
12888
12889(define-public python2-mwclient
12890 (package-with-python2 python-mwclient))
12891
12892(define-public python-utils
12893 (package
12894 (name "python-utils")
12895 (version "2.1.0")
12896 (source (origin
12897 (method url-fetch)
12898 (uri (pypi-uri "python-utils" version))
12899 (sha256
12900 (base32
12901 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
12902 (build-system python-build-system)
12903 (native-inputs
12904 `(("pytest-runner" ,python-pytest-runner)
12905 ("pytest" ,python-pytest)
12906 ("six" ,python-six)))
12907 (home-page "https://github.com/WoLpH/python-utils")
12908 (synopsis "Convenient utilities not included with the standard Python install")
12909 (description
12910 "Python Utils is a collection of small Python functions and classes which
12911make common patterns shorter and easier.")
12912 (license license:bsd-2)))
12913
12914(define-public python2-utils
12915 (package-with-python2 python-utils))
12916
44d10b1f
RW
12917(define-public python-diff-match-patch
12918 (package
12919 (name "python-diff-match-patch")
12920 (version "20121119")
12921 (source
12922 (origin
12923 (method url-fetch)
12924 (uri (pypi-uri "diff-match-patch" version))
12925 (sha256
12926 (base32
12927 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
12928 (build-system python-build-system)
12929 (home-page "https://code.google.com/p/google-diff-match-patch")
12930 (synopsis "Synchronize plain text")
12931 (description "Diff Match and Patch libraries offer robust algorithms to
12932perform the operations required for synchronizing plain text.")
12933 (license license:asl2.0)))
12934
12935(define-public python2-diff-match-patch
12936 (package-with-python2 python-diff-match-patch))
12937
12938(define-public python-dirsync
12939 (package
12940 (name "python-dirsync")
12941 (version "2.2.3")
12942 (source
12943 (origin
12944 (method url-fetch)
12945 (uri (pypi-uri "dirsync" version))
12946 (sha256
12947 (base32
12948 "1r40fkanksagcszf1ag85mdr8w7rgc7196n6s1qlsk2abw6i7v0z"))))
12949 (build-system python-build-system)
12950 (propagated-inputs
12951 `(("six" ,python-six)))
12952 (home-page "https://bitbucket.org/tkhyn/dirsync")
12953 (synopsis "Advanced directory tree synchronisation tool")
12954 (description "Advanced directory tree synchronisation tool.")
12955 (license license:expat)))
12956
12957(define-public python2-dirsync
12958 (package-with-python2 python-dirsync))
12959
12960(define-public python-levenshtein
12961 (package
12962 (name "python-levenshtein")
12963 (version "0.12.0")
12964 (source
12965 (origin
12966 (method url-fetch)
12967 (uri (pypi-uri "python-Levenshtein" version))
12968 (sha256
12969 (base32
12970 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
12971 (build-system python-build-system)
12972 (home-page "https://github.com/ztane/python-Levenshtein")
12973 (synopsis "Fast computation of Levenshtein distance and string similarity")
12974 (description
12975 "The Levenshtein Python C extension module contains functions for fast computation of
12976@enumerate
12977@item Levenshtein (edit) distance, and edit operations
12978@item string similarity
12979@item approximate median strings, and generally string averaging
12980@item string sequence and set similarity
12981@end enumerate
12982It supports both normal and Unicode strings.")
12983 (license license:gpl2+)))
12984
12985(define-public python2-levenshtein
12986 (package-with-python2 python-levenshtein))
12987
12988(define-public python-scandir
12989 (package
12990 (name "python-scandir")
12991 (version "1.9.0")
12992 (source
12993 (origin
12994 (method url-fetch)
12995 (uri (pypi-uri "scandir" version))
12996 (sha256
12997 (base32 "0r3hvf1a9jm1rkqgx40gxkmccknkaiqjavs8lccgq9s8khh5x5s4"))))
12998 (build-system python-build-system)
12999 (arguments
13000 `(#:phases (modify-phases %standard-phases
13001 (replace 'check
13002 (lambda _
13003 (invoke "python" "test/run_tests.py"))))))
13004 (home-page "https://github.com/benhoyt/scandir")
13005 (synopsis "Directory iteration function")
13006 (description
13007 "Directory iteration function like os.listdir(), except that instead of
13008returning a list of bare filenames, it yields DirEntry objects that include
13009file type and stat information along with the name. Using scandir() increases
13010the speed of os.walk() by 2-20 times (depending on the platform and file
13011system) by avoiding unnecessary calls to os.stat() in most cases.
13012
13013This package is part of the Python standard library since version 3.5.")
13014 (license license:bsd-3)))
13015
13016(define-public python2-scandir
13017 (package-with-python2 python-scandir))
13018
13019(define-public python2-stemming
13020 (package
13021 (name "python2-stemming")
13022 (version "1.0.1")
13023 (source
13024 (origin
13025 (method url-fetch)
13026 (uri (pypi-uri "stemming" version))
13027 (sha256
13028 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
13029 (build-system python-build-system)
13030 (arguments
13031 `(#:python ,python-2))
13032 (home-page "https://bitbucket.org/mchaput/stemming/overview")
13033 (synopsis "Python implementations of various stemming algorithms")
13034 (description
13035 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
13036stemming algorithms for English. These implementations are straightforward and
13037efficient, unlike some Python versions of the same algorithms available on the
13038Web. This package is an extraction of the stemming code included in the Whoosh
13039search engine.")
13040 (license license:public-domain)))
13041
13042(define-public python-factory-boy
13043 (package
13044 (name "python-factory-boy")
13045 (version "2.8.1")
13046 (source
13047 (origin
13048 (method url-fetch)
13049 (uri (pypi-uri "factory_boy" version))
13050 (sha256
13051 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
13052 (build-system python-build-system)
13053 (arguments
13054 ;; Tests are not included in the tarball.
13055 `(#:tests? #f))
13056 (propagated-inputs
13057 `(("faker" ,python-faker)))
13058 (home-page "https://github.com/benhoyt/scandir")
13059 (synopsis "Versatile test fixtures replacement")
13060 (description
13061 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
13062
13063As a fixtures replacement tool, it aims to replace static, hard to maintain
13064fixtures with easy-to-use factories for complex object.
13065
13066Instead of building an exhaustive test setup with every possible combination
13067of corner cases, factory_boy allows you to use objects customized for the
13068current test, while only declaring the test-specific fields")
13069 (license license:expat)))
13070
13071(define-public python2-factory-boy
13072 (package-with-python2 python-factory-boy))
13073
13074(define-public python-translate-toolkit
13075 (package
13076 (name "python-translate-toolkit")
13077 (version "2.1.0")
13078 (source
13079 (origin
13080 (method url-fetch)
13081 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
13082 (sha256
13083 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
13084 (build-system python-build-system)
13085 (native-inputs
13086 `(("python-pytest" ,python-pytest)
13087 ("python-sphinx" ,python-sphinx)))
13088 (propagated-inputs
13089 `(("python-babel" ,python-babel)
13090 ("python-beautifulsoup4" ,python-beautifulsoup4)
13091 ("python-chardet" ,python-chardet)
13092 ("python-diff-match-patch" ,python-diff-match-patch)
13093 ("python-levenshtein" ,python-levenshtein)
13094 ("python-lxml" ,python-lxml)
13095 ("python-six" ,python-six)
13096 ("python-vobject" ,python-vobject)
13097 ("python-pyyaml" ,python-pyyaml)))
13098 (arguments
13099 ;; TODO: tests are not run, because they end with
13100 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
13101 ;; 'parse_funcs'
13102 ;; during test setup.
13103 `(#:tests? #f))
18919cf9 13104 (home-page "https://toolkit.translatehouse.org")
44d10b1f
RW
13105 (synopsis "Tools and API for translation and localization engineering")
13106 (description
13107 "Tools and API for translation and localization engineering. It contains
13108several utilities, as well as an API for building localization tools.")
13109 (license license:gpl2+)))
13110
13111(define-public python2-translate-toolkit
13112 (package-with-python2 python-translate-toolkit))
13113
13114(define-public python-packaging
13115 (package
13116 (name "python-packaging")
a72a1892 13117 (version "20.0")
44d10b1f
RW
13118 (source
13119 (origin
13120 (method url-fetch)
13121 (uri (pypi-uri "packaging" version))
20bf58bf
MB
13122 ;; XXX: The URL in the patch file is wrong, it should be
13123 ;; <https://github.com/pypa/packaging/pull/256>.
fdd0c369 13124 (patches (search-patches "python-packaging-test-arch.patch"))
44d10b1f
RW
13125 (sha256
13126 (base32
a72a1892 13127 "1y2ip3a4ykkpgnwgn85j6hkspcl0cg3mzms97f40mk57vwqq67gy"))))
44d10b1f
RW
13128 (build-system python-build-system)
13129 (arguments
13130 `(#:phases (modify-phases %standard-phases
13131 (replace 'check
13132 (lambda _ (invoke "py.test" "-vv"))))))
13133 (native-inputs
13134 `(("python-pretend" ,python-pretend)
13135 ("python-pytest" ,python-pytest)))
13136 (propagated-inputs
13137 `(("python-pyparsing" ,python-pyparsing)
13138 ("python-six" ,python-six)))
13139 (home-page "https://github.com/pypa/packaging")
13140 (synopsis "Core utilities for Python packages")
13141 (description "Packaging is a Python module for dealing with Python packages.
13142It offers an interface for working with package versions, names, and dependency
13143information.")
13144 ;; From 'LICENSE': This software is made available under the terms of
13145 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
13146 ;; Contributions to this software is made under the terms of *both* these
13147 ;; licenses.
13148 (license (list license:asl2.0 license:bsd-2))))
13149
13150(define-public python2-packaging
13151 (package-with-python2 python-packaging))
13152
13153(define-public python-relatorio
13154 (package
13155 (name "python-relatorio")
13156 (version "0.8.0")
13157 (source
13158 (origin
13159 (method url-fetch)
13160 (uri (pypi-uri "relatorio" version))
13161 (sha256
13162 (base32
13163 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
13164 (build-system python-build-system)
13165 (propagated-inputs
13166 `(("python-lxml" ,python-lxml)
13167 ("python-genshi" ,python-genshi)))
13168 (native-inputs
13169 `(("python-magic" ,python-magic)))
13170 (home-page "https://relatorio.tryton.org/")
13171 (synopsis "Templating library able to output ODT and PDF files")
13172 (description "Relatorio is a templating library which provides a way to
13173easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
13174for more filetypes can be easily added by creating plugins for them.")
13175 (license license:gpl3+)))
13176
13177(define-public python2-relatorio
13178 (package-with-python2 python-relatorio))
13179
13180(define-public python-radon
13181 (package
13182 (name "python-radon")
13183 (version "2.2.0")
13184 (source
13185 (origin
13186 (method url-fetch)
13187 (uri (pypi-uri "radon" version))
13188 (sha256
13189 (base32
13190 "07gq5hq4nrffxnlnksws9hrx7fd001gam63j62i82gyfr23gvdym"))))
13191 (build-system python-build-system)
13192 (arguments
13193 `(#:phases (modify-phases %standard-phases
13194 (replace 'check
13195 (lambda _
13196 (invoke "python" "radon/tests/run.py"))))))
13197 (propagated-inputs
13198 `(("python-colorama" ,python-colorama)
13199 ("python-flake8-polyfill" ,python-flake8-polyfill)
13200 ("python-mando" ,python-mando)))
13201 (native-inputs
13202 `(("python-pytest" ,python-pytest)
13203 ("python-pytest-mock" ,python-pytest-mock)))
13204 (home-page "https://radon.readthedocs.org/")
13205 (synopsis "Code Metrics in Python")
13206 (description "Radon is a Python tool which computes various code metrics.
13207Supported metrics are:
13208@itemize @bullet
13209@item raw metrics: SLOC, comment lines, blank lines, &c.
13210@item Cyclomatic Complexity (i.e. McCabe’s Complexity)
13211@item Halstead metrics (all of them)
13212@item the Maintainability Index (a Visual Studio metric)
13213@end itemize")
13214 (license license:expat)))
13215
13216(define-public python2-radon
13217 (package-with-python2 python-radon))
13218
13219(define-public python-sure
13220 (package
13221 (name "python-sure")
13222 (version "1.4.11")
13223 (source
13224 (origin
13225 (method url-fetch)
13226 (uri (pypi-uri "sure" version))
13227 (sha256
13228 (base32
13229 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
13230 (build-system python-build-system)
13231 (propagated-inputs
13232 `(("python-mock" ,python-mock)
13233 ("python-six" ,python-six)))
13234 (native-inputs
13235 `(("python-nose" ,python-nose)))
13236 (home-page "https://github.com/gabrielfalcao/sure")
13237 (synopsis "Automated testing library in python for python")
13238 (description
13239 "Sure is a python library that leverages a DSL for writing assertions.
13240Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
13241 (license license:gpl3+)))
13242
13243(define-public python2-sure
13244 (package-with-python2 python-sure))
13245
13246(define-public python2-couleur
13247 ;; This package does not seem to support python3 at all, hence,
13248 ;; only the python2 variant definition is provided.
13249 (package
13250 (name "python2-couleur")
13251 (version "0.6.2")
13252 (source
13253 (origin
13254 (method url-fetch)
13255 (uri (pypi-uri "couleur" version))
13256 (sha256
13257 (base32
13258 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
13259 (build-system python-build-system)
13260 (arguments
13261 `(#:python ,python-2))
13262 (home-page "https://github.com/gabrielfalcao/couleur")
13263 (synopsis
13264 "ANSI terminal tool for python, colored shell and other handy fancy features")
13265 (description
13266 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
13267terminal such as coloured output in the shell, overwriting output, indentation, etc.")
13268 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
13269 ;; https://github.com/gabrielfalcao/couleur/issues/11
13270 (license license:lgpl3+)))
13271
13272(define-public python-misaka
13273 (package
13274 (name "python-misaka")
0dcb3412 13275 (version "2.1.1")
44d10b1f
RW
13276 (source
13277 (origin
13278 (method url-fetch)
13279 (uri (pypi-uri "misaka" version))
13280 (sha256
13281 (base32
0dcb3412 13282 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
44d10b1f
RW
13283 (build-system python-build-system)
13284 (arguments
13285 `(;; Line 37 of setup.py calls self.run_command('develop')
13286 ;; in the 'check' phase. This command seems to be trying
13287 ;; to write to
13288 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
13289 ;; for which it does not have the permission to write.
13290 #:tests? #f))
13291 (propagated-inputs
13292 `(("python-cffi" ,python-cffi)))
13293 (home-page "https://github.com/FSX/misaka")
13294 (synopsis "Python binding for Hoedown")
13295 (description
13296 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
13297library written in C. It features a fast HTML renderer and functionality to make custom
13298renderers (e.g. man pages or LaTeX).")
13299 (license license:expat)))
13300
13301(define-public python2-misaka
13302 (package-with-python2 python-misaka))
13303
13304(define-public python2-steadymark
13305 ;; This is forced into being a python2 only variant
13306 ;; due to its dependence on couleur that has no support
13307 ;; for python3
13308 (package
13309 (name "python2-steadymark")
13310 (version "0.7.3")
13311 (source
13312 (origin
13313 (method url-fetch)
13314 (uri (pypi-uri "steadymark" version))
13315 (sha256
13316 (base32
13317 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
13318 (build-system python-build-system)
13319 (native-inputs
13320 `(("python-couleur" ,python2-couleur)
13321 ("python-sure" ,python2-sure)
13322 ("python-misaka" ,python2-misaka)))
13323 (arguments
13324 `(#:python ,python-2
13325 #:phases
13326 (modify-phases %standard-phases
13327 (add-before 'build 'patch-setup-py
13328 (lambda _
13329 ;; Update requirements from dependency==version
13330 ;; to dependency>=version
13331 (substitute* "setup.py"
13332 (("==") ">="))
13333 #t)))))
13334 (home-page "https://github.com/gabrielfalcao/steadymark")
13335 (synopsis "Markdown-based test runner for python")
13336 (description
13337 "@code{Steadymark} allows documentation to be written in github-flavoured
13338markdown. The documentation may contain snippets of code surrounded by python
13339code blocks and @code{Steadymark} will find these snippets and run them, making
13340sure that there are no old malfunctional examples in the documentation examples.")
13341 (license license:expat)))
13342
13343(define-public python-jsonpointer
13344 (package
13345 (name "python-jsonpointer")
13346 (version "1.10")
13347 (source
13348 (origin
13349 (method url-fetch)
13350 (uri (pypi-uri "jsonpointer" version))
13351 (sha256
13352 (base32
13353 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
13354 (build-system python-build-system)
13355 (home-page "https://github.com/stefankoegl/python-json-pointer")
13356 (synopsis "Identify specific nodes in a JSON document")
13357 (description "@code{jsonpointer} allows you to access specific nodes
13358by path in a JSON document (see RFC 6901).")
13359 (license license:bsd-3)))
13360
13361(define-public python2-jsonpointer
13362 (package-with-python2 python-jsonpointer))
13363
13364(define-public python-jsonpatch
13365 (package
13366 (name "python-jsonpatch")
13367 (version "1.16")
13368 (source
13369 (origin
854c5c95 13370 (method git-fetch)
44d10b1f 13371 ;; pypi version lacks tests.js
854c5c95
EF
13372 (uri (git-reference
13373 (url "https://github.com/stefankoegl/python-json-patch")
13374 (commit (string-append "v" version))))
13375 (file-name (git-file-name name version))
44d10b1f
RW
13376 (sha256
13377 (base32
854c5c95 13378 "0k9pff06lxama3nhsc7cdxbp83422bdy8ifs52i6xkas8hpyzfzr"))))
44d10b1f
RW
13379 (build-system python-build-system)
13380 (native-inputs
13381 `(("python-jsonpointer" ,python-jsonpointer)))
13382 (home-page "https://github.com/stefankoegl/python-json-patch")
13383 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
13384 (description "@code{jsonpatch} is a library and program that allows
13385applying JSON Patches according to RFC 6902.")
13386 (license license:bsd-3)))
13387
13388(define-public python2-jsonpatch
13389 (package-with-python2 python-jsonpatch))
13390
13391(define-public python-jsonpatch-0.4
13392 (package (inherit python-jsonpatch)
13393 (name "python-jsonpatch")
13394 (version "0.4")
13395 (source
13396 (origin
a9722d0d
EF
13397 (method git-fetch)
13398 (uri (git-reference
13399 (url "https://github.com/stefankoegl/python-json-patch")
13400 (commit (string-append "v" version))))
13401 (file-name (git-file-name name version))
44d10b1f
RW
13402 (sha256
13403 (base32
a9722d0d 13404 "1fq02y57kinyknxjcav0slcb0k9mwdffqw2hnlhdkpj7palh2mwk"))))))
44d10b1f
RW
13405
13406(define-public python2-jsonpatch-0.4
13407 (package-with-python2 python-jsonpatch-0.4))
13408
13409(define-public python-rfc3986
13410 (package
13411 (name "python-rfc3986")
13412 (version "1.1.0")
13413 (source (origin
13414 (method url-fetch)
13415 (uri (pypi-uri "rfc3986" version))
13416 (sha256
13417 (base32
13418 "06wlmysw83f75ff84zr1yr6n0shvc2xn1n1sb4iwzqap9hf5fn44"))))
13419 (build-system python-build-system)
13420 (arguments
13421 `(#:modules ((guix build utils)
13422 (guix build python-build-system)
13423 (ice-9 ftw)
13424 (srfi srfi-1)
13425 (srfi srfi-26))
13426 #:phases
13427 (modify-phases %standard-phases
13428 (replace 'check
13429 (lambda _
13430 (let ((cwd (getcwd)))
13431 (setenv "PYTHONPATH"
13432 (string-append cwd "/build/"
13433 (find (cut string-prefix? "lib" <>)
13434 (scandir (string-append cwd "/build")))
13435 ":"
13436 (getenv "PYTHONPATH")))
13437 (invoke "pytest" "-v")))))))
13438 (native-inputs
13439 `(("python-pytest" ,python-pytest)))
13440 (home-page "https://rfc3986.readthedocs.io/")
13441 (synopsis "Parse and validate URI references")
13442 (description
13443 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
13444validation and authority parsing. This module also supports RFC@tie{}6874
13445which adds support for zone identifiers to IPv6 addresses.")
13446 (license license:asl2.0)))
13447
13448(define-public python2-rfc3986
13449 (package-with-python2 python-rfc3986))
13450
13451(define-public python-rfc3987
13452 (package
13453 (name "python-rfc3987")
13454 (version "1.3.7")
13455 (source
13456 (origin
13457 (method url-fetch)
13458 (uri (pypi-uri "rfc3987" version))
13459 (sha256
13460 (base32
13461 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
13462 (build-system python-build-system)
13463 (home-page "https://pypi.python.org/pypi/rfc3987")
13464 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
13465 (description "@code{rfc3987} provides routines for parsing and
13466validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
13467 (license license:gpl3+)))
13468
13469(define-public python2-rfc3987
13470 (package-with-python2 python-rfc3987))
13471
13472(define-public python-validate-email
13473 (package
13474 (name "python-validate-email")
13475 (version "1.3")
13476 (source
13477 (origin
13478 (method url-fetch)
13479 (uri (pypi-uri "validate_email" version))
13480 (sha256
13481 (base32
13482 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
13483 (build-system python-build-system)
13484 (home-page "https://github.com/syrusakbary/validate_email")
13485 (synopsis "Verifies if an email address is valid and really exists")
13486 (description "@code{validate_email} can be used to verify if an email
13487address is valid and really exists.")
13488 (license license:lgpl3+)))
13489
13490(define-public python2-validate-email
13491 (package-with-python2 python-validate-email))
13492
13493(define-public python-flex
13494 (package
13495 (name "python-flex")
13496 (version "6.10.0")
13497 (source
13498 (origin
13499 (method url-fetch)
13500 (uri (pypi-uri "flex" version))
13501 (sha256
13502 (base32
13503 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
13504 (build-system python-build-system)
13505 (propagated-inputs
13506 `(("python-click" ,python-click)
13507 ("python-iso8601" ,python-iso8601)
13508 ("python-jsonpointer" ,python-jsonpointer)
13509 ("python-pyyaml" ,python-pyyaml)
13510 ("python-requests" ,python-requests)
13511 ("python-rfc3987" ,python-rfc3987)
13512 ("python-six" ,python-six)
13513 ("python-validate-email" ,python-validate-email)))
13514 (home-page "https://github.com/pipermerriam/flex")
13515 (synopsis "Validates Swagger schemata")
13516 (description "@code{flex} can be used to validate Swagger schemata.")
13517 (license license:bsd-3)))
13518
13519(define-public python2-flex
13520 (package-with-python2 python-flex))
13521
13522(define-public python-marshmallow
13523 (package
13524 (name "python-marshmallow")
13525 (version "3.0.0b14")
13526 (source
13527 (origin
13528 (method url-fetch)
13529 (uri (pypi-uri "marshmallow" version))
13530 (sha256
13531 (base32
13532 "1digk3f5cfk7wmlka65mc7bzsd96pbsgcsvp6pimd5b4ff9zb5p3"))))
13533 (build-system python-build-system)
13534 (propagated-inputs
13535 `(("python-dateutil" ,python-dateutil)
13536 ("python-simplejson" ,python-simplejson)))
13537 (native-inputs
13538 `(("python-pytest" ,python-pytest)
13539 ("python-pytz" ,python-pytz)))
13540 (home-page "https://github.com/marshmallow-code/marshmallow")
13541 (synopsis "Convert complex datatypes to and from native
13542Python datatypes.")
13543 (description "@code{marshmallow} provides a library for converting
13544complex datatypes to and from native Python datatypes.")
13545 (license license:expat)))
13546
13547(define-public python2-marshmallow
13548 (package-with-python2 python-marshmallow))
13549
13550(define-public python-apispec
13551 (package
13552 (name "python-apispec")
13553 (version "0.25.3")
13554 (source
13555 (origin
13556 (method url-fetch)
13557 (uri (pypi-uri "apispec" version))
13558 (sha256
13559 (base32
13560 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
13561 (build-system python-build-system)
13562 (propagated-inputs
13563 `(("python-pyyaml" ,python-pyyaml)))
13564 (native-inputs
13565 `(("python-pytest" ,python-pytest)
13566 ("python-flask" ,python-flask)
13567 ("python-marshmallow" ,python-marshmallow)
13568 ("python-tornado" ,python-tornado)
13569 ("python-bottle" ,python-bottle)
13570 ("python-mock" ,python-mock)))
13571 (home-page "https://github.com/marshmallow-code/apispec")
13572 (synopsis "Swagger 2.0 API specification generator")
13573 (description "@code{python-apispec} is a pluggable API specification
13574generator. Currently supports the OpenAPI specification (f.k.a.
13575Swagger 2.0).")
13576 (license license:expat)))
13577
13578(define-public python2-apispec
13579 (package-with-python2 python-apispec))
13580
13581(define-public python-flasgger
13582 (package
13583 (name "python-flasgger")
13584 (version "0.6.3")
13585 (source
13586 (origin
1a04d421
TGR
13587 (method git-fetch)
13588 (uri (git-reference
13589 (url "https://github.com/rochacbruno/flasgger.git")
13590 (commit version)))
13591 (file-name (git-file-name name version))
44d10b1f 13592 (sha256
1a04d421 13593 (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn"))))
44d10b1f
RW
13594 (build-system python-build-system)
13595 (arguments
13596 `(#:phases
13597 (modify-phases %standard-phases
13598 (replace 'check
13599 (lambda* (#:key inputs outputs #:allow-other-keys)
13600 (substitute* "Makefile"
13601 (("flake8 flasgger --ignore=F403")
13602 "flake8 flasgger --ignore=E731,F403"))
13603 (setenv "PYTHONPATH" (string-append (getcwd)
13604 ":"
13605 (getenv "PYTHONPATH")))
ac599a09 13606 (invoke "py.test"))))))
44d10b1f
RW
13607 (propagated-inputs
13608 `(("python-flask" ,python-flask)
13609 ("python-pyyaml" ,python-pyyaml)
13610 ("python-jsonschema" ,python-jsonschema)
13611 ("python-mistune" ,python-mistune)
13612 ("python-six" ,python-six)))
13613 (native-inputs
13614 `(("python-decorator" ,python-decorator)
13615 ("python-flake8" ,python-flake8)
13616 ("python-flask-restful" ,python-flask-restful)
13617 ("python-flex" ,python-flex)
13618 ("python-pytest" ,python-pytest)
13619 ("python-pytest-cov" ,python-pytest-cov)
13620 ("python-marshmallow" ,python-marshmallow)
13621 ("python-apispec" ,python-apispec)))
13622 (home-page "https://github.com/rochacbruno/flasgger/")
13623 (synopsis "Extract Swagger specs from your Flask project")
13624 (description "@code{python-flasgger} allows extracting Swagger specs
13625from your Flask project. It is a fork of Flask-Swagger.")
13626 (license license:expat)))
13627
13628(define-public python2-flasgger
13629 (package-with-python2 python-flasgger))
13630
13631(define-public python-swagger-spec-validator
13632 (package
13633 (name "python-swagger-spec-validator")
fe9c5b1d 13634 (version "2.4.3")
44d10b1f
RW
13635 (source
13636 (origin
13637 (method url-fetch)
13638 (uri (pypi-uri "swagger-spec-validator" version))
13639 (sha256
13640 (base32
fe9c5b1d 13641 "11g627icrsqwazsncwi0sdvprcj6hwaayw5xk3xsj8d97bmrzqjp"))))
44d10b1f
RW
13642 (build-system python-build-system)
13643 (propagated-inputs
13644 `(("python-jsonschema" ,python-jsonschema)
fe9c5b1d 13645 ("python-pyyaml" ,python-pyyaml)
44d10b1f
RW
13646 ("python-six" ,python-six)))
13647 (home-page
13648 "https://github.com/Yelp/swagger_spec_validator")
13649 (synopsis "Validation of Swagger specifications")
13650 (description "@code{swagger_spec_validator} provides a library for
13651validating Swagger API specifications.")
13652 (license license:asl2.0)))
13653
13654(define-public python2-swagger-spec-validator
13655 (package-with-python2 python-swagger-spec-validator))
13656
13657(define-public python-apache-libcloud
13658 (package
13659 (name "python-apache-libcloud")
13660 (version "2.4.0")
13661 (source
13662 (origin
13663 (method url-fetch)
13664 (uri (pypi-uri "apache-libcloud" version))
13665 (sha256
13666 (base32
13667 "0daj3mkzw79v5zin2r1s2wkrz1hplfc16bwj4ss68i5qjq4l2p0j"))))
13668 (build-system python-build-system)
13669 (arguments
13670 `(#:phases
13671 (modify-phases %standard-phases
13672 (add-after 'unpack 'patch-ssh
13673 (lambda* (#:key inputs #:allow-other-keys)
13674 (substitute* "libcloud/compute/ssh.py"
13675 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
13676 "/bin/ssh" "'")))
13677 #t))
13678 (add-after 'unpack 'patch-tests
13679 (lambda _
13680 (substitute* "./libcloud/test/test_file_fixtures.py"
13681 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
13682 (("def _ascii") "def _raw_data(self, method, url, body, headers):
13683 return (httplib.OK,
13684 \"1234abcd\",
13685 {\"test\": \"value\"},
13686 httplib.responses[httplib.OK])
13687 def _ascii"))
13688 (substitute* "libcloud/test/compute/test_ssh_client.py"
13689 (("class ShellOutSSHClientTests")
13690 "@unittest.skip(\"Guix container doesn't have ssh service\")
13691class ShellOutSSHClientTests")
13692 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
13693 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
13694 (("'.xF0', '.x90', '.x8D', '.x88'")
13695 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
13696 #t))
13697 (add-before 'check 'copy-secret
13698 (lambda _
13699 (copy-file "libcloud/test/secrets.py-dist"
13700 "libcloud/test/secrets.py")
13701 #t)))))
13702 (inputs
13703 `(("openssh" ,openssh)))
13704 (propagated-inputs
13705 `(("python-paramiko" ,python-paramiko)
13706 ("python-requests" ,python-requests)))
13707 (native-inputs
13708 `(("python-lockfile" ,python-lockfile)
13709 ("python-mock" ,python-mock)
13710 ("python-pytest" ,python-pytest)
13711 ("python-pytest-runner" ,python-pytest-runner)
13712 ("python-requests-mock" ,python-requests-mock)))
13713 (home-page "https://libcloud.apache.org/")
13714 (synopsis "Unified Cloud API")
13715 (description "@code{libcloud} is a Python library for interacting with
13716many of the popular cloud service providers using a unified API.")
13717 (license license:asl2.0)))
13718
13719(define-public python2-apache-libcloud
13720 (package-with-python2 python-apache-libcloud))
13721
13722(define-public python-smmap2
13723 (package
13724 (name "python-smmap2")
cd199a45 13725 (version "2.0.5")
44d10b1f
RW
13726 (source
13727 (origin
13728 (method url-fetch)
13729 (uri (pypi-uri "smmap2" version))
13730 (sha256
cd199a45 13731 (base32 "16k03pcnxd3lgzwgbd7nl4jwzm1wmahirvd09kljnzvy96hgza99"))))
44d10b1f
RW
13732 (build-system python-build-system)
13733 (native-inputs
13734 `(("python-nosexcover" ,python-nosexcover)))
13735 (home-page "https://github.com/Byron/smmap")
13736 (synopsis "Python sliding window memory map manager")
13737 (description "@code{smmap2} is a pure Python implementation of a sliding
13738window memory map manager.")
13739 (license license:bsd-3)))
13740
13741(define-public python2-smmap2
13742 (package-with-python2 python-smmap2))
13743
13744(define-public python-regex
13745 (package
13746 (name "python-regex")
c187c9d7 13747 (version "2019.04.14")
44d10b1f
RW
13748 (source (origin
13749 (method url-fetch)
13750 (uri (pypi-uri "regex" version))
13751 (sha256
13752 (base32
c187c9d7
BT
13753 "1a6hhfs6l6snr1z654ay6wzbmwdkmv282fzfkd5hk2d1n73y8v6m"))))
13754 ;; TODO: Fix and enable regex_test.py tests that complain about the
13755 ;; test.support module not existing.
44d10b1f
RW
13756 (build-system python-build-system)
13757 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
13758 (synopsis "Alternative regular expression module")
13759 (description "This regular expression implementation is backwards-
13760compatible with the standard @code{re} module, but offers additional
13761functionality like full case-folding for case-insensitive matches in Unicode.")
13762 (license license:psfl)))
13763
13764(define-public python2-regex
13765 (package-with-python2 python-regex))
13766
13767(define-public python2-pyopengl
13768 (package
13769 (name "python2-pyopengl")
13770 (version "3.1.0")
13771 (source
13772 (origin
13773 (method url-fetch)
13774 (uri (pypi-uri "PyOpenGL" version))
13775 (sha256
13776 (base32
13777 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
13778 (arguments
13779 `(#:python ,python-2))
13780 (build-system python-build-system)
13781 (home-page "http://pyopengl.sourceforge.net")
13782 (synopsis "Standard OpenGL bindings for Python")
13783 (description
13784 "PyOpenGL is the most common cross platform Python binding to OpenGL and
13785related APIs. The binding is created using the standard @code{ctypes}
13786library.")
13787 (license license:bsd-3)))
13788
13789(define-public python2-pyopengl-accelerate
13790 (package
13791 (inherit python2-pyopengl)
13792 (name "python2-pyopengl-accelerate")
13793 (version "3.1.0")
13794 (source
13795 (origin
13796 (method url-fetch)
13797 (uri (pypi-uri "PyOpenGL-accelerate" version))
13798 (sha256
13799 (base32
13800 "0464c1ifzk0k92lyndikmvzjgnx1y25r7bkkc8pnxm4kp1q4czwj"))))
13801 (synopsis "Acceleration code for PyOpenGL")
13802 (description
13803 "This is the Cython-coded accelerator module for PyOpenGL.")))
13804
13805(define-public python-rencode
13806 (package
13807 (name "python-rencode")
13808 (version "1.0.5")
13809 (source
13810 (origin
13811 (method url-fetch)
13812 (uri (pypi-uri "rencode" version))
13813 (sha256
13814 (base32
13815 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
13816 (build-system python-build-system)
13817 (arguments
13818 `(#:phases
13819 (modify-phases %standard-phases
13820 (add-before 'check 'delete-bogus-test
13821 ;; This test requires /home/aresch/Downloads, which is not provided by
13822 ;; the build environment.
13823 (lambda _
13824 (delete-file "rencode/t.py")
13825 #t)))))
13826 (native-inputs `(("pkg-config" ,pkg-config)
13827 ("python-cython" ,python-cython)))
13828 (home-page "https://github.com/aresch/rencode")
13829 (synopsis "Serialization of heterogeneous data structures")
13830 (description
13831 "The @code{rencode} module is a data structure serialization library,
13832similar to @code{bencode} from the BitTorrent project. For complex,
13833heterogeneous data structures with many small elements, r-encoding stake up
13834significantly less space than b-encodings. This version of rencode is a
13835complete rewrite in Cython to attempt to increase the performance over the
13836pure Python module.")
13837 (license license:bsd-3)))
13838
13839(define-public python2-rencode
13840 (package-with-python2 python-rencode))
13841
13842(define-public python-xenon
13843 (package
13844 (name "python-xenon")
13845 (version "0.5.4")
13846 (source
13847 (origin
13848 (method url-fetch)
13849 (uri (pypi-uri "xenon" version))
13850 (sha256
13851 (base32
13852 "029cbhysg2vr5n4jz8gpg2793f8wkwnqpr1qgv6c1dn685vy31mc"))))
13853 (build-system python-build-system)
13854 (native-inputs
13855 `(("python-pyyaml" ,python-pyyaml)
13856 ("python-radon" ,python-radon)
13857 ("python-requests" ,python-requests)
13858 ("python-flake8" ,python-flake8)
13859 ("python-tox" ,python-tox)))
13860 (arguments
13861 `(#:phases
13862 (modify-phases %standard-phases
13863 (add-before 'build 'patch-test-requirements
13864 (lambda _
13865 ;; Remove httpretty dependency for tests.
13866 (substitute* "setup.py"
13867 (("httpretty") ""))
13868 #t)))))
13869 (home-page "https://xenon.readthedocs.org/")
13870 (synopsis "Monitor code metrics for Python on your CI server")
13871 (description
13872 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
13873Ideally, @code{xenon} is run every time code is committed. Through command
13874line options, various thresholds can be set for the complexity of code. It
13875will fail (i.e. it will exit with a non-zero exit code) when any of these
13876requirements is not met.")
13877 (license license:expat)))
13878
13879(define-public python2-xenon
13880 (package-with-python2 python-xenon))
13881
13882(define-public python-pysocks
13883 (package
13884 (name "python-pysocks")
b8725cdf 13885 (version "1.7.0")
44d10b1f
RW
13886 (source
13887 (origin
13888 (method url-fetch)
13889 (uri (pypi-uri "PySocks" version))
13890 (sha256
13891 (base32
b8725cdf 13892 "0z4p31bpqm893cf87qqgb30k7nwd8kqfjwwjm5cvxb6zbyj1w0yr"))))
44d10b1f
RW
13893 (build-system python-build-system)
13894 (arguments `(#:tests? #f))
13895 (home-page "https://github.com/Anorov/PySocks")
13896 (synopsis "SOCKS client module")
13897 (description "@code{pysocks} is an updated and semi-actively maintained
13898version of @code{SocksiPy} with bug fixes and extra features.")
13899 (license license:bsd-3)))
13900
13901(define-public python2-pysocks
13902 (package-with-python2 python-pysocks))
13903
13904(define-public python-pydiff
13905 (package
13906 (name "python-pydiff")
13907 (version "0.2")
13908 (source
13909 (origin
13910 (method url-fetch)
13911 (uri (pypi-uri "pydiff" version))
13912 (sha256
13913 (base32
13914 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
13915 (build-system python-build-system)
13916 (home-page "https://github.com/myint/pydiff")
13917 (synopsis "Library to diff two Python files at the bytecode level")
13918 (description
13919 "@code{pydiff} makes it easy to look for actual code changes while
13920ignoring formatting changes.")
13921 (license license:expat)))
13922
13923(define-public python2-pydiff
13924 (package-with-python2 python-pydiff))
13925
13926(define-public python-tqdm
13927 (package
13928 (name "python-tqdm")
13929 (version "4.19.6")
13930 (source
13931 (origin
13932 (method url-fetch)
13933 (uri (pypi-uri "tqdm" version))
13934 (sha256
13935 (base32
13936 "1pw0ngm0zn9papdmkwipi3yih5c3di6d0w849bdmrraq4d2d9h2y"))))
13937 (build-system python-build-system)
13938 (native-inputs
13939 `(("python-flake8" ,python-flake8)
13940 ("python-nose" ,python-nose)
13941 ("python-coverage" ,python-coverage)))
13942 (home-page "https://github.com/tqdm/tqdm")
13943 (synopsis "Fast, extensible progress meter")
13944 (description
13945 "Make loops show a progress bar on the console by just wrapping any
13946iterable with @code{|tqdm(iterable)|}. Offers many options to define
13947design and layout.")
f875d76f
PL
13948 (license (list license:mpl2.0 license:expat))
13949 (properties `((python2-variant . ,(delay python2-tqdm))))))
44d10b1f
RW
13950
13951(define-public python2-tqdm
f875d76f
PL
13952 (let ((tqdm (package-with-python2
13953 (strip-python2-variant python-tqdm))))
13954 (package (inherit tqdm)
13955 (native-inputs `(("python2-functools32" ,python2-functools32)
13956 ,@(package-native-inputs tqdm))))))
44d10b1f
RW
13957
13958(define-public python-pkginfo
13959 (package
13960 (name "python-pkginfo")
13961 (version "1.4.2")
13962 (source
13963 (origin
13964 (method url-fetch)
13965 (uri (pypi-uri "pkginfo" version))
13966 (sha256
13967 (base32
13968 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
13969 (build-system python-build-system)
13970 (arguments
13971 ;; The tests are broken upstream.
13972 '(#:tests? #f))
13973 (home-page
13974 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
13975 (synopsis
13976 "Query metadatdata from sdists, bdists, and installed packages")
13977 (description
13978 "API to query the distutils metadata written in @file{PKG-INFO} inside a
13979source distriubtion (an sdist) or a binary distribution (e.g., created by
13980running bdist_egg). It can also query the EGG-INFO directory of an installed
13981distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
13982created by running @code{python setup.py develop}).")
13983 (license license:expat)))
13984
13985(define-public python2-pkginfo
13986 (package-with-python2 python-pkginfo))
13987
13988(define-public python-twine
13989 (package
13990 (name "python-twine")
13991 (version "1.9.1")
13992 (source
13993 (origin
13994 (method url-fetch)
13995 (uri (pypi-uri "twine" version))
13996 (sha256
13997 (base32
13998 "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a"))))
13999 (build-system python-build-system)
14000 (propagated-inputs
14001 `(("python-tqdm" ,python-tqdm)
14002 ("python-pkginfo" ,python-pkginfo)
14003 ("python-requests" ,python-requests)
14004 ("python-requests-toolbelt" ,python-requests-toolbelt)))
14005 (home-page "https://github.com/pypa/twine")
14006 (synopsis "Collection of utilities for interacting with PyPI")
14007 (description
14008 "@code{twine} currently supports registering projects and uploading
14009distributions. It authenticates the user over HTTPS, allows them to pre-sign
14010their files and supports any packaging format (including wheels).")
14011 (license license:asl2.0)))
14012
14013(define-public python2-twine
14014 (package-with-python2 python-twine))
14015
14016(define-public python-linecache2
14017 (package
14018 (name "python-linecache2")
14019 (version "1.0.0")
14020 (source
14021 (origin
14022 (method url-fetch)
14023 (uri (pypi-uri "linecache2" version))
14024 (sha256
14025 (base32
14026 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
14027 (build-system python-build-system)
14028 (arguments
14029 `(;; The tests depend on unittest2, and our version is a bit too old.
14030 #:tests? #f))
14031 (native-inputs
14032 `(("python-pbr" ,python-pbr-minimal)))
14033 (home-page
14034 "https://github.com/testing-cabal/linecache2")
14035 (synopsis "Backports of the linecache module")
14036 (description
14037 "The linecache module allows one to get any line from any file, while
14038attempting to optimize internally, using a cache, the common case where many
14039lines are read from a single file.")
14040 (license license:psfl)))
14041
14042(define-public python2-linecache2
14043 (package-with-python2 python-linecache2))
14044
14045(define-public python-traceback2
14046 (package
14047 (name "python-traceback2")
14048 (version "1.4.0")
14049 (source
14050 (origin
14051 (method url-fetch)
14052 (uri (pypi-uri "traceback2" version))
14053 (sha256
14054 (base32
14055 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
14056 (build-system python-build-system)
14057 (arguments
14058 `(;; python-traceback2 and python-unittest2 depend on one another.
14059 #:tests? #f))
14060 (native-inputs
14061 `(("python-pbr" ,python-pbr-minimal)))
14062 (propagated-inputs
14063 `(("python-linecache2" ,python-linecache2)))
14064 (home-page
14065 "https://github.com/testing-cabal/traceback2")
14066 (synopsis "Backports of the traceback module")
14067 (description
14068 "This module provides a standard interface to extract, format and print
14069stack traces of Python programs. It exactly mimics the behavior of the Python
14070interpreter when it prints a stack trace.")
14071 (license license:psfl)))
14072
14073(define-public python2-traceback2
14074 (package-with-python2 python-traceback2))
14075
14076(define-public python-ratelimiter
14077 (package
14078 (name "python-ratelimiter")
14079 (version "1.2.0")
14080 (source
14081 (origin
14082 (method url-fetch)
14083 (uri (pypi-uri "ratelimiter" version))
14084 (sha256
14085 (base32
14086 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
14087 (build-system python-build-system)
14088 (arguments
14089 '(#:tests? #f)) ; There are no tests in the pypi archive.
14090 (home-page "https://github.com/RazerM/ratelimiter")
14091 (synopsis "Simple rate limiting object")
14092 (description
14093 "The @code{ratelimiter} module ensures that an operation will not be
14094executed more than a given number of times during a given period.")
14095 (license license:asl2.0)))
14096
14097(define-public python2-ratelimiter
14098 (package-with-python2 python-ratelimiter))
14099
14100(define-public python-dukpy
14101 (package
14102 (name "python-dukpy")
14103 (version "0.3")
14104 (source
14105 (origin
5b77ebe1
TGR
14106 (method git-fetch)
14107 (uri (git-reference
14108 (url "https://github.com/kovidgoyal/dukpy.git")
14109 (commit (string-append "v" version))))
14110 (file-name (git-file-name name version))
44d10b1f 14111 (sha256
5b77ebe1 14112 (base32 "13h21nqzasv4zj32xs61brmc106pr2cx243672crcmwxxnjgaxls"))))
44d10b1f
RW
14113 (build-system python-build-system)
14114 (home-page "https://github.com/kovidgoyal/dukpy")
14115 (synopsis "Run JavaScript in python")
14116 (description
14117 "dukpy is a JavaScript runtime environment for Python using the duktape
14118embeddable JavaScript engine.")
14119 ;; Dukpy is licensed under MIT like the embedded duktape library,
14120 ;; with 'errors.c' as GPL3.
14121 (license (list license:expat license:gpl3))))
14122
14123(define-public python2-dukpy
14124 (package-with-python2 python-dukpy))
14125
14126(define-public python-jsonrpclib-pelix
14127 (package
14128 (name "python-jsonrpclib-pelix")
14129 (version "0.3.2")
14130 (source
14131 (origin
14132 (method url-fetch)
14133 (uri (pypi-uri "jsonrpclib-pelix" version))
14134 (sha256
14135 (base32
14136 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
14137 (build-system python-build-system)
14138 (arguments
14139 `(#:tests? #f)) ; no tests in PyPI tarball
14140 (home-page "https://github.com/tcalmant/jsonrpclib/")
14141 (synopsis "JSON-RPC 2.0 client library for Python")
14142 (description
14143 "This library implements the JSON-RPC v2.0
14144specification (backwards-compatible) as a client library for Python. This
14145version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
14146services.")
14147 (license license:asl2.0)))
14148
14149(define-public python2-jsonrpclib-pelix
14150 (package-with-python2 python-jsonrpclib-pelix))
14151
14152(define-public python-setuptools-scm-git-archive
14153 (package
14154 (name "python-setuptools-scm-git-archive")
14155 (version "1.0")
14156 (source
14157 (origin
14158 (method url-fetch)
14159 (uri (pypi-uri "setuptools_scm_git_archive" version))
14160 (sha256
14161 (base32
14162 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
14163 (build-system python-build-system)
14164 (native-inputs
14165 `(("python-pytest" ,python-pytest)))
14166 (propagated-inputs
14167 `(("python-setuptools-scm" ,python-setuptools-scm)))
14168 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
14169 (synopsis "Setuptools_scm plugin for git archives")
14170 (description
14171 "The setuptools_scm_git_archive package is a plugin to
14172setuptools_scm, which supports obtaining versions from git archives that
14173belong to tagged versions.")
14174 (license license:expat)))
14175
14176(define-public python2-setuptools-scm-git-archive
14177 (package-with-python2 python-setuptools-scm-git-archive))
14178
724a350c
RW
14179(define-public python-setuptools-git
14180 (package
14181 (name "python-setuptools-git")
14182 (version "1.2")
14183 (source
14184 (origin
14185 (method url-fetch)
14186 (uri (pypi-uri "setuptools-git" version))
14187 (sha256
14188 (base32
14189 "0i84qjwp5m0l9qagdjww2frdh63r37km1c48mrvbmaqsl1ni6r7z"))))
14190 (build-system python-build-system)
14191 (arguments
14192 `(#:phases
14193 (modify-phases %standard-phases
14194 ;; This is needed for tests.
14195 (add-after 'unpack 'configure-git
14196 (lambda _
14197 (setenv "HOME" "/tmp")
14198 (invoke "git" "config" "--global" "user.email" "guix")
14199 (invoke "git" "config" "--global" "user.name" "guix")
14200 #t)))))
14201 (native-inputs
14202 `(("git" ,git-minimal)))
14203 (home-page "https://github.com/msabramo/setuptools-git")
14204 (synopsis "Setuptools revision control system plugin for Git")
14205 (description
14206 "This package provides a plugin for Setuptools for revision control with
14207Git.")
14208 (license license:bsd-3)))
14209
44d10b1f
RW
14210(define-public python-pyclipper
14211 (package
14212 (name "python-pyclipper")
ff3d1b99 14213 (version "1.1.0.post3")
44d10b1f
RW
14214 (source
14215 (origin
14216 (method url-fetch)
14217 (uri (pypi-uri "pyclipper" version ".zip"))
14218 (sha256
ff3d1b99 14219 (base32 "164yksvqwqvwzh8f8lq92asg87hd8rvcy2xb5vm4y4ccvd5xgb7i"))
44d10b1f
RW
14220 (modules '((guix build utils)))
14221 (snippet
14222 '(begin
14223 ;; This file is generated by Cython.
14224 (delete-file "pyclipper/pyclipper.cpp") #t))))
14225 (build-system python-build-system)
14226 (arguments
14227 `(#:phases
14228 (modify-phases %standard-phases
14229 (add-before 'build 'cythonize-sources
14230 (lambda _
14231 (with-directory-excursion "pyclipper"
14232 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
14233 (propagated-inputs
14234 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
14235 (native-inputs
14236 `(("python-cython" ,python-cython)
14237 ("python-pytest" ,python-pytest)
14238 ("python-pytest-runner" ,python-pytest-runner)
14239 ("python-unittest2" ,python-unittest2)
14240 ("unzip" ,unzip)))
14241 (home-page "https://github.com/greginvm/pyclipper")
14242 (synopsis "Wrapper for Angus Johnson's Clipper library")
14243 (description
14244 "Pyclipper is a Cython wrapper for the C++ translation of the
14245Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
14246 (license license:expat)))
14247
14248(define-public python2-pyclipper
14249 (package-with-python2 python-pyclipper))
14250
14251(define-public python2-booleanoperations
14252 (package
14253 (name "python2-booleanoperations")
14254 (version "0.7.1")
14255 (source
14256 (origin
14257 (method url-fetch)
14258 (uri (pypi-uri "booleanOperations" version ".zip"))
14259 (sha256
14260 (base32
14261 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
14262 (build-system python-build-system)
14263 (arguments
14264 `(#:python ,python-2))
14265 (native-inputs
14266 `(("unzip" ,unzip)
14267 ("python2-pytest" ,python2-pytest)
14268 ("python2-pytest-runner" ,python2-pytest-runner)))
14269 (propagated-inputs
14270 `(("python-fonttools" ,python2-fonttools)
14271 ("python-pyclipper" ,python2-pyclipper)
14272 ("python-ufolib" ,python2-ufolib)))
14273 (home-page "https://github.com/typemytype/booleanOperations")
14274 (synopsis "Boolean operations on paths")
14275 (description
14276 "BooleanOperations provides a Python library that enables
14277boolean operations on paths.")
14278 (license license:expat)))
14279
14280(define-public python-tempdir
14281 (package
14282 (name "python-tempdir")
14283 (version "0.7.1")
14284 (source
14285 (origin
14286 (method url-fetch)
14287 (uri (pypi-uri "tempdir" version))
14288 (sha256
14289 (base32
14290 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
14291 (build-system python-build-system)
14292 (home-page "https://pypi.org/project/tempdir/")
14293 (arguments
14294 ;; the package has no tests
14295 '(#:tests? #f))
14296 (synopsis "Python library for managing temporary directories")
14297 (description
14298 "This library manages temporary directories that are automatically
14299deleted with all their contents when they are no longer needed. It is
14300particularly convenient for use in tests.")
14301 (license license:expat)))
14302
14303(define-public python2-tempdir
14304 (package-with-python2 python-tempdir))
14305
14306(define-public python-activepapers
14307 (package
14308 (name "python-activepapers")
14309 (version "0.2.2")
14310 (source
14311 (origin
14312 (method url-fetch)
14313 (uri (pypi-uri "ActivePapers.Py" version))
14314 (sha256
14315 (base32
14316 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
14317 (build-system python-build-system)
14318 (arguments
14319 `(#:modules ((ice-9 ftw)
14320 (srfi srfi-1)
14321 (guix build utils)
14322 (guix build python-build-system))
14323
14324 #:phases
14325 (modify-phases %standard-phases
14326 (add-after 'unpack 'delete-python2-code
14327 (lambda _
14328 (for-each delete-file
14329 '("lib/activepapers/builtins2.py"
14330 "lib/activepapers/standardlib2.py"
14331 "lib/activepapers/utility2.py"))))
14332 (replace 'check
14333 (lambda _
14334 ;; Deactivate the test cases that download files
14335 (setenv "NO_NETWORK_ACCESS" "1")
14336 ;; For some strange reason, some tests fail if nosetests runs all
14337 ;; test modules in a single execution. They pass if each test
14338 ;; module is run individually.
14339 (for-each (lambda (filename)
14340 (invoke "nosetests"
14341 (string-append "tests/" filename)))
14342 (scandir "tests"
14343 (lambda (filename)
14344 (string-suffix? ".py" filename)))))))))
14345 (native-inputs
14346 `(("python-tempdir" ,python-tempdir)
14347 ("python-nose" ,python-nose)))
14348 (propagated-inputs
14349 `(("python-h5py" ,python-h5py)))
14350 (home-page "http://www.activepapers.org/")
14351 (synopsis "Executable papers for scientific computing")
14352 (description
14353 "ActivePapers is a tool for working with executable papers, which
14354combine data, code, and documentation in single-file packages,
14355suitable for publication as supplementary material or on repositories
14356such as figshare or Zenodo.")
14357 (properties `((python2-variant . ,(delay python2-activepapers))))
14358 (license license:bsd-3)))
14359
14360(define-public python2-activepapers
14361 (let ((base (package-with-python2
14362 (strip-python2-variant python-activepapers))))
14363 (package
14364 (inherit base)
14365 (arguments
14366 (substitute-keyword-arguments (package-arguments base)
14367 ((#:phases phases)
14368 `(modify-phases ,phases
14369 (delete 'delete-python2-code)
14370 (add-after 'unpack 'delete-python3-code
14371 (lambda _
14372 (for-each delete-file
14373 '("lib/activepapers/builtins3.py"
14374 "lib/activepapers/standardlib3.py"
14375 "lib/activepapers/utility3.py")))))))))))
14376
14377(define-public python-semver
14378 (package
14379 (name "python-semver")
594280b1 14380 (version "2.9.0")
44d10b1f 14381 (source
2ecbba24
BG
14382 (origin
14383 (method url-fetch)
14384 (uri (pypi-uri "semver" version))
14385 (sha256
14386 (base32
14387 "183kg1rhzz3hqizvphkd8hlbf1zxfx8737zhfkmqzxi71jmdw7pd"))))
44d10b1f 14388 (build-system python-build-system)
44d10b1f
RW
14389 (native-inputs
14390 `(("python-tox" ,python-tox)
14391 ("python-virtualenv" ,python-virtualenv)))
14392 (home-page "https://github.com/k-bx/python-semver")
14393 (synopsis "Python helper for Semantic Versioning")
14394 (description "This package provides a Python library for
14395@url{Semantic Versioning, http://semver.org/}.")
14396 (license license:bsd-3)))
14397
14398(define-public python2-semver
14399 (package-with-python2 python-semver))
14400
14401(define-public python-pyro4
14402 (package
14403 (name "python-pyro4")
3ce91d44 14404 (version "4.77")
44d10b1f
RW
14405 (source
14406 (origin
14407 (method url-fetch)
14408 (uri (pypi-uri "Pyro4" version))
14409 (sha256
3ce91d44 14410 (base32 "0gsjg869y4gpy265s1gj1f2qy6jn5iz8r2bwwnq78r1r5yi15zib"))))
44d10b1f 14411 (build-system python-build-system)
3ce91d44
GL
14412 (arguments
14413 '(#:tests? #f)) ;FIXME: Some tests require network access.
14414 (native-inputs
14415 `(("python-cloudpickle" ,python-cloudpickle)
14416 ("python-dill" ,python-dill)
14417 ("python-msgpack" ,python-msgpack)))
44d10b1f
RW
14418 (propagated-inputs
14419 `(("python-serpent" ,python-serpent)))
14420 (home-page "https://pyro4.readthedocs.io")
14421 (synopsis "Distributed object middleware for Python")
14422 (description
14423 "Pyro enables you to build applications in which objects can talk to each
14424other over the network. You can just use normal Python method calls to call
14425objects on other machines, also known as remote procedure calls (RPC).")
14426 (license license:expat)))
14427
14428(define-public python2-pyro
14429 (package
14430 (name "python2-pyro")
14431 (version "3.16")
14432 (source
14433 (origin
14434 (method url-fetch)
14435 (uri (pypi-uri "Pyro" version))
14436 (file-name (string-append "Pyro-" version ".tar.gz"))
14437 (sha256
14438 (base32
14439 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
14440 (build-system python-build-system)
14441 (arguments
14442 ;; Pyro is not compatible with Python 3
14443 `(#:python ,python-2
14444 ;; Pyro has no test cases for automatic execution
14445 #:tests? #f))
14446 (home-page "http://pythonhosted.org/Pyro/")
14447 (synopsis "Distributed object manager for Python")
14448 (description "Pyro is a Distributed Object Technology system
14449written in Python that is designed to be easy to use. It resembles
14450Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
14451which is a system and language independent Distributed Object Technology
14452and has much more to offer than Pyro or RMI. Pyro 3.x is no
14453longer maintained. New projects should use Pyro4 instead, which
14454is the new Pyro version that is actively developed.")
14455 (license license:expat)))
14456
14457(define-public python2-scientific
14458 (package
14459 (name "python2-scientific")
14460 (version "2.9.4")
14461 (source
14462 (origin
c695f011
KH
14463 (method git-fetch)
14464 (uri (git-reference
14465 (url "https://github.com/khinsen/ScientificPython")
14466 (commit (string-append "rel" version))))
14467 (file-name (git-file-name name version))
44d10b1f
RW
14468 (sha256
14469 (base32
c695f011 14470 "16l48aj9fps9r7jyk8gpxppwrv0fqvlc13sayxskz28r5s6sjwbl"))))
44d10b1f
RW
14471 (build-system python-build-system)
14472 (inputs
14473 `(("netcdf" ,netcdf)))
14474 (propagated-inputs
14475 `(("python-numpy" ,python2-numpy-1.8)
14476 ("python-pyro" ,python2-pyro)))
14477 (arguments
14478 ;; ScientificPython is not compatible with Python 3
14479 `(#:python ,python-2
14480 #:tests? #f ; No test suite
14481 #:phases
14482 (modify-phases %standard-phases
14483 (replace 'build
14484 (lambda* (#:key inputs #:allow-other-keys)
77e61e25
RW
14485 (invoke "python" "setup.py" "build"
14486 (string-append "--netcdf_prefix="
14487 (assoc-ref inputs "netcdf"))))))))
c695f011 14488 (home-page "http://dirac.cnrs-orleans.fr/ScientificPython")
44d10b1f
RW
14489 (synopsis "Python modules for scientific computing")
14490 (description "ScientificPython is a collection of Python modules that are
14491useful for scientific computing. Most modules are rather general (Geometry,
14492physical units, automatic derivatives, ...) whereas others are more
14493domain-specific (e.g. netCDF and PDB support). The library is currently
14494not actively maintained and works only with Python 2 and NumPy < 1.9.")
14495 (license license:cecill-c)))
14496
14497(define-public python2-mmtk
14498 (package
14499 (name "python2-mmtk")
fe9b72c5 14500 (version "2.7.12")
44d10b1f
RW
14501 (source
14502 (origin
fe9b72c5
KH
14503 (method git-fetch)
14504 (uri (git-reference
14505 (url "https://github.com/khinsen/MMTK")
14506 (commit (string-append "rel" version))))
14507 (file-name (git-file-name name version))
44d10b1f
RW
14508 (sha256
14509 (base32
fe9b72c5 14510 "1fqwh3ba9jd42nigvn5shndgwb1zy7kh9520ncvqci7n8ffjr6p1"))))
44d10b1f
RW
14511 (build-system python-build-system)
14512 (native-inputs
14513 `(("netcdf" ,netcdf)))
14514 (propagated-inputs
14515 `(("python-scientific" ,python2-scientific)
14516 ("python-tkinter" ,python-2 "tk")))
14517 (arguments
14518 `(#:python ,python-2
14519 #:tests? #f
14520 #:phases
14521 (modify-phases %standard-phases
14522 (add-before 'build 'includes-from-scientific
14523 (lambda* (#:key inputs #:allow-other-keys)
14524 (mkdir-p "Include/Scientific")
14525 (copy-recursively
14526 (string-append
14527 (assoc-ref inputs "python-scientific")
14528 "/include/python2.7/Scientific")
14529 "Include/Scientific"))))))
14530 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
14531 (synopsis "Python library for molecular simulation")
14532 (description "MMTK is a library for molecular simulations with an emphasis
14533on biomolecules. It provides widely used methods such as Molecular Dynamics
14534and normal mode analysis, but also basic routines for implementing new methods
14535for simulation and analysis. The library is currently not actively maintained
14536and works only with Python 2 and NumPy < 1.9.")
14537 (license license:cecill-c)))
14538
14539(define-public python-phonenumbers
14540 (package
14541 (name "python-phonenumbers")
14542 (version "8.9.1")
14543 (source
14544 (origin
14545 (method url-fetch)
14546 (uri (pypi-uri "phonenumbers" version))
14547 (sha256
14548 (base32
14549 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
14550 (build-system python-build-system)
14551 (home-page
14552 "https://github.com/daviddrysdale/python-phonenumbers")
14553 (synopsis
14554 "Python library for dealing with international phone numbers")
14555 (description
14556 "This package provides a Python port of Google's libphonenumber library.")
14557 (license license:asl2.0)))
14558
14559(define-public python2-phonenumbers
14560 (package-with-python2 python-phonenumbers))
14561
14562(define-public python-send2trash
14563 (package
14564 (name "python-send2trash")
d9b0216b 14565 (version "1.5.0")
44d10b1f 14566 (source
d9b0216b 14567 (origin (method git-fetch)
44d10b1f 14568 ;; Source tarball on PyPI doesn't include tests.
d9b0216b
RW
14569 (uri (git-reference
14570 (url "https://github.com/hsoft/send2trash.git")
14571 (commit version)))
14572 (file-name (git-file-name name version))
44d10b1f
RW
14573 (sha256
14574 (base32
d9b0216b 14575 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
44d10b1f
RW
14576 (build-system python-build-system)
14577 (arguments
14578 '(#:phases
14579 (modify-phases %standard-phases
14580 (add-before 'check 'pre-check
14581 (lambda _
14582 (mkdir-p "/tmp/foo")
14583 (setenv "HOME" "/tmp/foo")
14584 #t)))))
14585 (home-page "https://github.com/hsoft/send2trash")
14586 (synopsis "Send files to the user's @file{~/Trash} directory")
14587 (description "This package provides a Python library to send files to the
14588user's @file{~/Trash} directory.")
20b3fde7 14589 (properties `((python2-variant . ,(delay python2-send2trash))))
44d10b1f
RW
14590 (license license:bsd-3)))
14591
14592(define-public python2-send2trash
14593 (package
f32164ab 14594 (inherit (package-with-python2 (strip-python2-variant python-send2trash)))
44d10b1f
RW
14595 (arguments
14596 (substitute-keyword-arguments (package-arguments python-send2trash)
14597 ((#:phases phases)
14598 `(modify-phases ,phases
14599 (add-before 'check 'setenv
14600 (lambda _
14601 (setenv "PYTHONPATH"
14602 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
4782a06f 14603 #t))))))))
44d10b1f
RW
14604
14605(define-public python-yapf
14606 (package
14607 (name "python-yapf")
19ba75dc 14608 (version "0.29.0")
44d10b1f
RW
14609 (source
14610 (origin
14611 (method url-fetch)
14612 (uri (pypi-uri "yapf" version))
14613 (sha256
14614 (base32
19ba75dc 14615 "1pj3xzblmbssshi889b6n9hwqbjpabw6j0fimlng2sshd3226bki"))))
44d10b1f
RW
14616 (build-system python-build-system)
14617 (home-page "https://github.com/google/yapf")
14618 (synopsis "Formatter for Python code")
14619 (description "YAPF is a formatter for Python code. It's based off of
14620@dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
14621takes the code and reformats it to the best formatting that conforms to the
14622style guide, even if the original code didn't violate the style guide.")
14623 (license license:asl2.0)))
14624
14625(define-public python2-yapf
14626 (package-with-python2 python-yapf))
14627
14628(define-public python-gyp
14629 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
14630 (revision "0"))
14631 (package
14632 (name "python-gyp")
14633 ;; Google does not release versions,
14634 ;; based on second most recent commit date.
14635 (version (git-version "0.0.0" revision commit))
14636 (source
14637 (origin
14638 ;; Google does not release tarballs,
14639 ;; git checkout is needed.
14640 (method git-fetch)
14641 (uri (git-reference
14642 (url "https://chromium.googlesource.com/external/gyp")
14643 (commit commit)))
14644 (file-name (git-file-name name version))
14645 (sha256
14646 (base32
14647 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
14648 (build-system python-build-system)
14649 (home-page "https://gyp.gsrc.io/")
14650 (synopsis "GYP is a Meta-Build system")
14651 (description
14652 "GYP builds build systems for large, cross platform applications.
14653It can be used to generate XCode projects, Visual Studio projects, Ninja build
14654files, and Makefiles.")
14655 (license license:bsd-3))))
14656
14657(define-public python2-gyp
14658 (package-with-python2 python-gyp))
14659
14660(define-public python-whatever
14661 (package
14662 (name "python-whatever")
97610a66 14663 (version "0.6")
44d10b1f
RW
14664 (source
14665 (origin
ac0ea38c
EF
14666 (method git-fetch)
14667 (uri (git-reference
14668 (url "https://github.com/Suor/whatever")
14669 (commit version)))
14670 (file-name (git-file-name name version))
44d10b1f 14671 (sha256
ac0ea38c 14672 (base32 "1q7ajgqjfivxqsqgnhp4lc4p6jxyh4zprcsdbpd6dw54inaf0av5"))))
44d10b1f
RW
14673 (build-system python-build-system)
14674 (arguments
14675 `(#:phases
14676 (modify-phases %standard-phases
14677 (replace 'check
14678 (lambda _
14679 (invoke "py.test"))))))
14680 (native-inputs
14681 `(("python-pytest" ,python-pytest)))
14682 (home-page "http://github.com/Suor/whatever")
14683 (synopsis "Make anonymous functions by partial application of operators")
14684 (description "@code{whatever} provides an easy way to make anonymous
14685functions by partial application of operators.")
14686 (license license:bsd-3)))
14687
14688(define-public python2-whatever
14689 (package-with-python2 python-whatever))
14690
14691(define-public python-funcy
14692 (package
14693 (name "python-funcy")
9e396ab8 14694 (version "1.11")
44d10b1f
RW
14695 (source
14696 (origin
a85c6027
TGR
14697 (method git-fetch)
14698 (uri (git-reference
14699 (url "https://github.com/Suor/funcy.git")
14700 (commit version)))
44d10b1f 14701 (sha256
a85c6027
TGR
14702 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
14703 (file-name (git-file-name name version))))
44d10b1f
RW
14704 (build-system python-build-system)
14705 (arguments
14706 `(#:phases
14707 (modify-phases %standard-phases
14708 (replace 'check
14709 (lambda _
14710 (invoke "py.test"))))))
14711 (native-inputs
14712 `(("python-pytest" ,python-pytest)
14713 ("python-whatever" ,python-whatever)))
14714 (home-page "http://github.com/Suor/funcy")
14715 (synopsis "Functional tools")
14716 (description "@code{funcy} is a library that provides functional tools.
14717Examples are:
14718@enumerate
14719@item merge - Merges collections of the same type
14720@item walk - Type-preserving map
14721@item select - Selects a part of a collection
14722@item take - Takes the first n items of a collection
14723@item first - Takes the first item of a collection
14724@item remove - Predicated-removes items of a collection
14725@item concat - Concatenates two collections
14726@item flatten - Flattens a collection with subcollections
14727@item distinct - Returns only distinct items
14728@item split - Predicated-splits a collection
14729@item split_at - Splits a collection at a given item
14730@item group_by - Groups items by group
14731@item pairwise - Pairs off adjacent items
14732@item partial - Partially-applies a function
14733@item curry - Curries a function
14734@item compose - Composes functions
14735@item complement - Complements a predicate
14736@item all_fn - \"all\" with predicate
14737@end enumerate")
14738 (license license:bsd-3)))
14739
14740(define-public python2-funcy
14741 (package-with-python2 python-funcy))
14742
14743(define-public python-isoweek
14744 (package
14745 (name "python-isoweek")
14746 (version "1.3.3")
14747 (source
14748 (origin
14749 (method url-fetch)
14750 (uri (pypi-uri "isoweek" version))
14751 (sha256
14752 (base32
14753 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
14754 (build-system python-build-system)
14755 (home-page "https://github.com/gisle/isoweek")
14756 (synopsis "Objects representing a week")
14757 (description "The @code{isoweek} module provide the class Week that
14758implements the week definition of ISO 8601. This standard also defines
14759a notation for identifying weeks; yyyyWww (where the W is a literal).
14760Week instances stringify to this form.")
14761 (license license:bsd-3)))
14762
14763(define-public python2-isoweek
14764 (package-with-python2 python-isoweek))
14765
14766(define-public python-tokenize-rt
14767 (package
14768 (name "python-tokenize-rt")
14769 (version "2.0.1")
14770 (source
14771 (origin
14772 (method url-fetch)
14773 (uri (pypi-uri "tokenize-rt" version))
14774 (sha256
14775 (base32
14776 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
14777 (build-system python-build-system)
14778 (home-page "https://github.com/asottile/tokenize-rt")
14779 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
14780 (description
14781 "This Python library is a wrapper around @code{tokenize} from the Python
14782standard library. It provides two additional tokens @code{ESCAPED_NL} and
14783@code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
14784and @code{tokens_to_src} to roundtrip.")
14785 (license license:expat)))
14786
14787(define-public python-future-fstrings
14788 (package
14789 (name "python-future-fstrings")
14790 (version "0.4.1")
14791 (source
14792 (origin
14793 (method url-fetch)
14794 (uri (pypi-uri "future_fstrings" version))
14795 (sha256
14796 (base32
14797 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
14798 (build-system python-build-system)
14799 (propagated-inputs
14800 `(("python-tokenize-rt" ,python-tokenize-rt)))
14801 (home-page "https://github.com/asottile/future-fstrings")
14802 (synopsis "Backport of fstrings to Python < 3.6")
14803 (description
14804 "This package provides a UTF-8 compatible encoding
14805@code{future_fstrings}, which performs source manipulation. It decodes the
14806source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
14807@code{f} strings.")
14808 (license license:expat)))
14809
dae2eb1c
MC
14810(define-public python-typed-ast
14811 (package
14812 (name "python-typed-ast")
bae89583 14813 (version "1.4.0")
dae2eb1c
MC
14814 (source
14815 (origin
bae89583
MO
14816 (method git-fetch)
14817 (uri (git-reference
14818 (url "https://github.com/python/typed_ast.git")
14819 (commit version)))
dae2eb1c 14820 (sha256
bae89583
MO
14821 (base32 "0l0hz809f7i356kmqkvfsaswiidb98j9hs9rrjnfawzqcbffzgyb"))
14822 (file-name (git-file-name name version))))
dae2eb1c
MC
14823 (build-system python-build-system)
14824 (arguments
14825 `(#:modules ((guix build utils)
14826 (guix build python-build-system)
14827 (ice-9 ftw)
14828 (srfi srfi-1)
14829 (srfi srfi-26))
14830 #:phases
14831 (modify-phases %standard-phases
14832 (replace 'check
14833 (lambda _
14834 (let ((cwd (getcwd)))
14835 (setenv "PYTHONPATH"
14836 (string-append cwd "/build/"
14837 (find (cut string-prefix? "lib" <>)
14838 (scandir (string-append cwd "/build")))
14839 ":"
14840 (getenv "PYTHONPATH"))))
14841 (invoke "pytest")
14842 #t)))))
14843 (native-inputs `(("python-pytest" ,python-pytest)))
14844 (home-page "https://github.com/python/typed_ast")
14845 (synopsis "Fork of Python @code{ast} modules with type comment support")
14846 (description "This package provides a parser similar to the standard
14847@code{ast} library. Unlike @code{ast}, the parsers in @code{typed_ast}
14848include PEP 484 type comments and are independent of the version of Python
14849under which they are run. The @code{typed_ast} parsers produce the standard
14850Python AST (plus type comments), and are both fast and correct, as they are
14851based on the CPython 2.7 and 3.7 parsers.")
14852 ;; See the file "LICENSE" for the details.
14853 (license (list license:psfl
14854 license:asl2.0
14855 license:expat)))) ;ast27/Parser/spark.py
14856
44d10b1f
RW
14857(define-public python-typing
14858 (package
14859 (name "python-typing")
14860 (version "3.6.6")
14861 (source
14862 (origin
14863 (method url-fetch)
14864 (uri (pypi-uri "typing" version))
14865 (sha256
14866 (base32
14867 "0ba9acs4awx15bf9v3nrs781msbd2nx826906nj6fqks2bvca9s0"))))
14868 (build-system python-build-system)
14869 (home-page "https://docs.python.org/3/library/typing.html")
14870 (synopsis "Type hints for Python")
14871 (description "This is a backport of the standard library @code{typing}
14872module to Python versions older than 3.5. Typing defines a standard notation
14873for Python function and variable type annotations. The notation can be used
14874for documenting code in a concise, standard format, and it has been designed
14875to also be used by static and runtime type checkers, static analyzers, IDEs
14876and other tools.")
14877 (license license:psfl)))
14878
14879(define-public python2-typing
14880 (package-with-python2 python-typing))
14881
f89d443b
VC
14882(define-public python-typing-extensions
14883 (package
14884 (name "python-typing-extensions")
14885 (version "3.7.2")
14886 (source
14887 (origin
14888 (method url-fetch)
14889 (uri (pypi-uri "typing_extensions" version))
14890 (sha256
14891 (base32
14892 "0wfsv71pvkyf2na938l579jh0v3kzl6g744ijgnahcwd4d9x0b7v"))))
14893 (build-system python-build-system)
14894 (home-page
14895 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
14896 (synopsis "Experimental type hints for Python")
14897 (description
14898 "The typing_extensions module contains additional @code{typing} hints not
14899yet present in the of the @code{typing} standard library.
14900Included are implementations of:
14901@enumerate
14902@item ClassVar
14903@item ContextManager
14904@item Counter
14905@item DefaultDict
14906@item Deque
14907@item NewType
14908@item NoReturn
14909@item overload
14910@item Protocol
14911@item runtime
14912@item Text
14913@item Type
14914@item TYPE_CHECKING
14915@item AsyncGenerator
14916@end enumerate\n")
14917 (license license:psfl)))
14918
44d10b1f
RW
14919(define-public bpython
14920 (package
14921 (name "bpython")
4de93b2f 14922 (version "0.18")
44d10b1f
RW
14923 (source
14924 (origin
14925 (method url-fetch)
14926 (uri (pypi-uri "bpython" version))
14927 (sha256
4de93b2f 14928 (base32 "1hl6frgvr2lqaxqczl8amg9xih32b3gzv429vs0qrjb8wpdj1k2n"))))
44d10b1f
RW
14929 (build-system python-build-system)
14930 (arguments
14931 `(#:phases
14932 (modify-phases %standard-phases
14933 (add-after 'unpack 'remove-failing-test
14934 (lambda _
14935 ;; Remove failing test. FIXME: make it pass
14936 (delete-file "bpython/test/test_args.py")
14937 #t))
14938 (add-after 'wrap 'add-aliases
14939 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
14940 (lambda* (#:key outputs #:allow-other-keys)
14941 (let ((out (assoc-ref outputs "out")))
14942 (for-each
14943 (lambda (old new)
14944 (symlink old (string-append out "/bin/" new)))
14945 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
14946 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
14947 #t)))))
14948 (propagated-inputs
14949 `(("python-pygments" ,python-pygments)
14950 ("python-requests" ,python-requests)
4de93b2f 14951 ("python-babel" ,python-babel) ; optional, for internationalization
44d10b1f
RW
14952 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
14953 ("python-greenlet" ,python-greenlet)
4de93b2f 14954 ("python-urwid" ,python-urwid) ; for bpython-urwid only
44d10b1f
RW
14955 ("python-six" ,python-six)))
14956 (native-inputs
14957 `(("python-sphinx" ,python-sphinx)
14958 ("python-mock" ,python-mock)))
14959 (home-page "https://bpython-interpreter.org/")
14960 (synopsis "Fancy interface to the Python interpreter")
14961 (description "Bpython is a fancy interface to the Python
14962interpreter. bpython's main features are
14963
14964@enumerate
14965@item in-line syntax highlighting,
14966@item readline-like autocomplete with suggestions displayed as you type,
14967@item expected parameter list for any Python function,
14968@item \"rewind\" function to pop the last line of code from memory and
14969 re-evaluate,
14970@item send the code you've entered off to a pastebin,
14971@item save the code you've entered to a file, and
14972@item auto-indentation.
14973@end enumerate")
14974 (license license:expat)))
14975
14976(define-public bpython2
14977 (let ((base (package-with-python2
14978 (strip-python2-variant bpython))))
14979 (package (inherit base)
14980 (name "bpython2")
14981 (arguments
14982 `(#:python ,python-2
14983 #:phases
14984 (modify-phases %standard-phases
14985 (add-after 'unpack 'remove-failing-test
14986 (lambda _
14987 ;; Remove failing test. FIXME: make it pass
14988 (delete-file "bpython/test/test_args.py")
14989 ;; Disable failing test-cases (renaming inhibits they are
14990 ;; discovered)
14991 (substitute* "bpython/test/test_curtsies_repl.py"
14992 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
14993 (string-append a "xxx_off_" b))
14994 (("^(\\s*def )(test_complex\\W)" _ a b)
14995 (string-append a "xxx_off_" b)))
14996 #t))
14997 (add-before 'build 'rename-scripts
14998 ;; rename the scripts to bypthon2, bpdb2, etc.
14999 (lambda _
15000 (substitute* "setup.py"
15001 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
15002 (string-append name "2" rest "\n"))
15003 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
15004 (string-append name "2" (or sub "") rest "\n")))
15005 #t))))))))
15006
15007(define-public python-pyinotify
15008 (package
15009 (name "python-pyinotify")
15010 (version "0.9.6")
15011 (source (origin
15012 (method url-fetch)
15013 (uri (pypi-uri "pyinotify" version))
15014 (sha256
15015 (base32
15016 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
15017 (build-system python-build-system)
15018 (arguments `(#:tests? #f)) ;no tests
15019 (home-page "https://github.com/seb-m/pyinotify")
15020 (synopsis "Python library for monitoring inotify events")
15021 (description
15022 "@code{pyinotify} provides a Python interface for monitoring
15023file system events on Linux.")
15024 (license license:expat)))
15025
15026(define-public python2-pyinotify
15027 (package-with-python2 python-pyinotify))
15028
15029;; Ada parser uses this version.
15030(define-public python2-quex-0.67.3
15031 (package
15032 (name "python2-quex")
15033 (version "0.67.3")
15034 (source
15035 (origin
15036 (method url-fetch)
15037 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
15038 (version-major+minor version)
15039 "/quex-" version ".zip"))
15040 (sha256
15041 (base32
15042 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
15043 (build-system python-build-system)
15044 (native-inputs
15045 `(("unzip" ,unzip)))
15046 (arguments
15047 `(#:python ,python-2
15048 #:tests? #f
15049 #:phases
15050 (modify-phases %standard-phases
15051 (delete 'configure)
15052 (delete 'build)
15053 (replace 'install
15054 (lambda* (#:key outputs #:allow-other-keys)
15055 (let* ((out (assoc-ref outputs "out"))
15056 (share/quex (string-append out "/share/quex"))
15057 (bin (string-append out "/bin")))
15058 (copy-recursively "." share/quex)
15059 (mkdir-p bin)
15060 (symlink (string-append share/quex "/quex-exe.py")
15061 (string-append bin "/quex"))
15062 #t))))))
15063 (native-search-paths
15064 (list (search-path-specification
15065 (variable "QUEX_PATH")
15066 (files '("share/quex")))))
15067 (home-page "http://quex.sourceforge.net/")
15068 (synopsis "Lexical analyzer generator in Python")
15069 (description "@code{quex} is a lexical analyzer generator in Python.")
15070 (license license:lgpl2.1+))) ; Non-military
15071
15072(define-public python2-quex
15073 (package (inherit python2-quex-0.67.3)
15074 (name "python2-quex")
15075 (version "0.68.1")
15076 (source
15077 (origin
15078 (method url-fetch)
15079 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
15080 (sha256
15081 (base32
15082 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
15083 (file-name (string-append name "-" version ".tar.gz"))))))
15084
15085(define-public python-more-itertools
15086 (package
15087 (name "python-more-itertools")
1b066827 15088 (version "7.1.0")
44d10b1f
RW
15089 (source
15090 (origin
15091 (method url-fetch)
15092 (uri (pypi-uri "more-itertools" version))
15093 (sha256
15094 (base32
1b066827 15095 "16phg2f2dvm6ci5wr49ncha5lmc0m2in3bsl33c61vzca4gkvd4b"))))
44d10b1f 15096 (build-system python-build-system)
44d10b1f
RW
15097 (home-page "https://github.com/erikrose/more-itertools")
15098 (synopsis "More routines for operating on iterables, beyond itertools")
15099 (description "Python's built-in @code{itertools} module implements a
15100number of iterator building blocks inspired by constructs from APL, Haskell,
15101and SML. @code{more-itertools} includes additional building blocks for
15102working with iterables.")
47f66348 15103 (properties `((python2-variant . ,(delay python2-more-itertools))))
44d10b1f
RW
15104 (license license:expat)))
15105
47f66348 15106;; The 5.x series are the last versions supporting Python 2.7.
44d10b1f 15107(define-public python2-more-itertools
47f66348
MB
15108 (package
15109 (inherit python-more-itertools)
15110 (name "python2-more-itertools")
15111 (version "5.0.0")
15112 (source (origin
15113 (method url-fetch)
15114 (uri (pypi-uri "more-itertools" version))
15115 (sha256
15116 (base32
15117 "1r12cm6mcdwdzz7d47a6g4l437xsvapdlgyhqay3i2nrlv03da9q"))))
15118 (arguments
15119 `(#:python ,python2-minimal))
15120 (propagated-inputs
15121 `(("python2-six" ,python2-six-bootstrap)))))
44d10b1f
RW
15122
15123(define-public python-latexcodec
15124 (package
15125 (name "python-latexcodec")
f3415ba5 15126 (version "1.0.7")
44d10b1f
RW
15127 (source
15128 (origin
15129 (method url-fetch)
15130 (uri (pypi-uri "latexcodec" version))
15131 (sha256
f3415ba5 15132 (base32 "0wnp3yqcgx0rpy8dz51vh75lbp2qif67da19zi7m3ca98n887hgb"))))
44d10b1f
RW
15133 (build-system python-build-system)
15134 (inputs
15135 `(("python-six" ,python-six)))
15136 (home-page "https://readthedocs.org/projects/latexcodec/")
15137 (synopsis "Work with LaTeX code in Python")
15138 (description "Lexer and codec to work with LaTeX code in Python.")
15139 (license license:expat)))
15140
15141(define-public python-pybtex
15142 (package
15143 (name "python-pybtex")
9441a9c1 15144 (version "0.22.2")
44d10b1f
RW
15145 (source
15146 (origin
15147 (method url-fetch)
15148 (uri (pypi-uri "pybtex" version))
15149 (sha256
9441a9c1 15150 (base32 "070wfcmxrd7xg1si421mi9150gmx2qwx431nwf69sq3hhmgnx080"))))
44d10b1f
RW
15151 (build-system python-build-system)
15152 (native-inputs
15153 `(("python-nose" ,python-nose)))
15154 (inputs
15155 `(("python-latexcodec" ,python-latexcodec)
15156 ("python-pyyaml" ,python-pyyaml)
15157 ("python-six" ,python-six)))
15158 (arguments
15159 `(#:test-target "nosetests"))
15160 (home-page "https://pybtex.org/")
15161 (synopsis "BibTeX-compatible bibliography processor")
15162 (description "Pybtex is a BibTeX-compatible bibliography processor written
15163in Python. You can simply type pybtex instead of bibtex.")
15164 (license license:expat)))
15165
15166(define-public python-onetimepass
15167 (package
15168 (name "python-onetimepass")
15169 (version "1.0.1")
15170 (source
15171 (origin
15172 (method url-fetch)
15173 (uri (pypi-uri "onetimepass" version))
15174 (sha256
15175 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
15176 (build-system python-build-system)
15177 (propagated-inputs `(("python-six" ,python-six)))
15178 (home-page "https://github.com/tadeck/onetimepass/")
15179 (synopsis "One-time password library")
15180 (description "Python one-time password library for HMAC-based (HOTP) and
15181time-based (TOTP) passwords.")
15182 (license license:expat)))
15183
15184(define-public python-parso
15185 (package
15186 (name "python-parso")
170d5844 15187 (version "0.5.2")
44d10b1f
RW
15188 (source
15189 (origin
15190 (method url-fetch)
15191 (uri (pypi-uri "parso" version))
15192 (sha256
15193 (base32
170d5844 15194 "1qgvrkpma7vylrk047mxxvqd66nwqk978n3ig2w8iz9m3bgjbksm"))))
44d10b1f
RW
15195 (native-inputs
15196 `(("python-pytest" ,python-pytest)))
15197 (build-system python-build-system)
4eb97c25
MC
15198 (arguments
15199 `(#:phases (modify-phases %standard-phases
15200 (replace 'check
15201 (lambda _ (invoke "pytest" "-vv"))))))
44d10b1f
RW
15202 (home-page "https://github.com/davidhalter/parso")
15203 (synopsis "Python Parser")
15204 (description "Parso is a Python parser that supports error recovery and
15205round-trip parsing for different Python versions (in multiple Python versions).
15206Parso is also able to list multiple syntax errors in your Python file.")
15207 (license license:expat)))
15208
15209(define-public python2-parso
15210 (package-with-python2 python-parso))
15211
15212(define-public python-async-generator
15213 (package
15214 (name "python-async-generator")
94fcbf8d 15215 (version "1.10")
44d10b1f
RW
15216 (source
15217 (origin
15218 (method url-fetch)
15219 (uri (pypi-uri "async_generator" version))
15220 (sha256
15221 (base32
94fcbf8d 15222 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
44d10b1f
RW
15223 (build-system python-build-system)
15224 (native-inputs
15225 `(("python-pytest" ,python-pytest)))
15226 (home-page "https://github.com/python-trio/async_generator")
15227 (synopsis "Async generators and context managers for Python 3.5+")
15228 (description "@code{async_generator} back-ports Python 3.6's native async
15229generators and Python 3.7's context managers into Python 3.5.")
15230 ;; Dual licensed.
15231 (license (list license:expat license:asl2.0))))
15232
15233(define-public python-async-timeout
15234 (package
15235 (name "python-async-timeout")
15236 (version "3.0.1")
15237 (source
15238 (origin
15239 (method url-fetch)
15240 (uri (pypi-uri "async-timeout" version))
15241 (sha256
15242 (base32
15243 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
15244 (build-system python-build-system)
15245 (home-page "https://github.com/aio-libs/async_timeout/")
15246 (synopsis "Timeout context manager for asyncio programs")
15247 (description "@code{async-timeout} provides a timeout timeout context
15248manager compatible with @code{asyncio}.")
15249 (license license:asl2.0)))
15250
15251(define-public python-glob2
15252 (package
15253 (name "python-glob2")
4df49d19 15254 (version "0.7")
8fa2bcc7
TGR
15255 (source
15256 (origin
15257 (method git-fetch)
15258 (uri (git-reference
15259 (url "https://github.com/miracle2k/python-glob2.git")
4df49d19 15260 (commit (string-append "v" version))))
8fa2bcc7
TGR
15261 (file-name (git-file-name name version))
15262 (sha256
4df49d19 15263 (base32 "160nh2ay9lw2hi0rixpzb2k87r6ql56k0j2cm87lqz8xc8zbw919"))))
44d10b1f
RW
15264 (build-system python-build-system)
15265 (home-page "https://github.com/miracle2k/python-glob2/")
15266 (synopsis "Extended Version of the python buildin glob module")
15267 (description "This is an extended version of the Python
15268@url{http://docs.python.org/library/glob.html, built-in glob module} which
15269adds:
15270
15271@itemize
15272@item The ability to capture the text matched by glob patterns, and return
15273those matches alongside the file names.
15274@item A recursive @code{**} globbing syntax, akin for example to the
15275@code{globstar} option of Bash.
15276@item The ability to replace the file system functions used, in order to glob
15277on virtual file systems.
15278@item Compatible with Python 2 and Python 3 (tested with 3.3).
15279@end itemize
15280
15281Glob2 currently based on the glob code from Python 3.3.1.")
15282 (license license:bsd-2)))
15283
15284(define-public python2-glob2
15285 (package-with-python2 python-glob2))
15286
15287(define-public python-gipc
15288 (package
15289 (name "python-gipc")
15290 (version "0.6.0")
15291 (source
15292 (origin
15293 (method url-fetch)
15294 (uri (pypi-uri "gipc" version ".zip"))
15295 (sha256
15296 (base32
15297 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
15298 (build-system python-build-system)
15299 (native-inputs
15300 `(("unzip" ,unzip)))
15301 (propagated-inputs
15302 `(("python-gevent" ,python-gevent)))
15303 (home-page "http://gehrcke.de/gipc")
15304 (synopsis "Child process management in the context of gevent")
15305 (description "Usage of Python's multiprocessing package in a
15306gevent-powered application may raise problems. With @code{gipc},
15307process-based child processes can safely be created anywhere within a
15308gevent-powered application.")
15309 (license license:expat)))
15310
15311(define-public python2-gipc
15312 (package-with-python2 python-gipc))
15313
15314(define-public python-fusepy
15315 (package
15316 (name "python-fusepy")
15317 (version "2.0.4")
15318 (source
15319 (origin
15320 (method url-fetch)
15321 (uri (pypi-uri "fusepy" version))
15322 (sha256
15323 (base32
15324 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
15325 (build-system python-build-system)
15326 (arguments
15327 `(#:phases
15328 (modify-phases %standard-phases
15329 (add-before 'build 'set-library-file-name
15330 (lambda* (#:key inputs #:allow-other-keys)
15331 (let ((fuse (assoc-ref inputs "fuse")))
15332 (substitute* "fuse.py"
15333 (("find_library\\('fuse'\\)")
15334 (string-append "'" fuse "/lib/libfuse.so'")))
15335 #t))))))
15336 (propagated-inputs
15337 `(("fuse" ,fuse)))
15338 (home-page "https://github.com/fusepy/fusepy")
15339 (synopsis "Simple ctypes bindings for FUSE")
15340 (description "Python module that provides a simple interface to FUSE and
15341MacFUSE. The binding is created using the standard @code{ctypes} library.")
15342 (license license:isc)))
15343
15344(define-public python2-fusepy
15345 (package-with-python2 python-fusepy))
15346
15347(define-public python2-gdrivefs
15348 (package
15349 (name "python2-gdrivefs")
15350 (version "0.14.9")
15351 (source
15352 (origin
15353 (method url-fetch)
15354 (uri (pypi-uri "gdrivefs" version))
15355 (sha256
15356 (base32
15357 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
15358 (build-system python-build-system)
15359 (arguments
15360 `(#:python ,python-2
15361 #:phases
15362 (modify-phases %standard-phases
15363 (add-before 'build 'patch-setup-py
15364 (lambda _
15365 ;; Update requirements from dependency==version
15366 ;; to dependency>=version
15367 (substitute* "gdrivefs/resources/requirements.txt"
15368 (("==") ">="))
15369 #t)))))
15370 (native-inputs
15371 `(("python2-gipc" ,python2-gipc)
15372 ("python2-gevent" ,python2-gevent)
15373 ("python2-greenlet" ,python2-greenlet)
15374 ("python2-httplib2" ,python2-httplib2)
15375 ("python2-uritemplate" ,python2-uritemplate)
15376 ("python2-oauth2client" ,python2-oauth2client)
15377 ("python2-six" ,python2-six)))
15378 (propagated-inputs
15379 `(("python2-dateutil" ,python2-dateutil)
15380 ("python2-fusepy" ,python2-fusepy)
15381 ("python2-google-api-client" ,python2-google-api-client)))
15382 (home-page "https://github.com/dsoprea/GDriveFS")
15383 (synopsis "Mount Google Drive as a local file system")
15384 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
15385under Python 2.7.")
15386 (license license:gpl2)))
15387
15388(define-public pybind11
15389 (package
15390 (name "pybind11")
0690f324 15391 (version "2.4.3")
44d10b1f
RW
15392 (source (origin
15393 (method git-fetch)
15394 (uri (git-reference
15395 (url "https://github.com/pybind/pybind11.git")
15396 (commit (string-append "v" version))))
15397 (sha256
15398 (base32
0690f324 15399 "0k89w4bsfbpzw963ykg1cyszi3h3nk393qd31m6y46pcfxkqh4rd"))
44d10b1f
RW
15400 (file-name (git-file-name name version))))
15401 (build-system cmake-build-system)
15402 (native-inputs
3cf579e9 15403 `(("python" ,python-wrapper)
ae8db9ce
LC
15404
15405 ;; The following dependencies are used for tests.
15406 ("python-pytest" ,python-pytest)
15407 ("catch" ,catch-framework2-1)
15408 ("eigen" ,eigen)))
44d10b1f 15409 (arguments
ae8db9ce
LC
15410 `(#:configure-flags
15411 (list (string-append "-DCATCH_INCLUDE_DIR="
15412 (assoc-ref %build-inputs "catch")
15413 "/include/catch"))
15414
3cf579e9
LC
15415 #:phases (modify-phases %standard-phases
15416 (add-after 'install 'install-python
15417 (lambda* (#:key outputs #:allow-other-keys)
15418 (let ((out (assoc-ref outputs "out")))
15419 (with-directory-excursion "../source"
15420 (setenv "PYBIND11_USE_CMAKE" "yes")
15421 (invoke "python" "setup.py" "install"
15422 "--single-version-externally-managed"
15423 "--root=/"
15424 (string-append "--prefix=" out)))))))
15425
ae8db9ce 15426 #:test-target "check"))
44d10b1f
RW
15427 (home-page "https://github.com/pybind/pybind11/")
15428 (synopsis "Seamless operability between C++11 and Python")
ab17297a
LC
15429 (description
15430 "@code{pybind11} is a lightweight header-only library that exposes C++
15431types in Python and vice versa, mainly to create Python bindings of existing
15432C++ code. Its goals and syntax are similar to the @code{Boost.Python}
15433library: to minimize boilerplate code in traditional extension modules by
15434inferring type information using compile-time introspection.")
65eada58 15435 (license license:bsd-3)))
44d10b1f
RW
15436
15437(define-public python-fasteners
15438 (package
15439 (name "python-fasteners")
15440 (version "0.14.1")
15441 (source
15442 (origin
15443 (method url-fetch)
15444 (uri (pypi-uri "fasteners" version))
15445 (sha256
15446 (base32
15447 "063y20kx01ihbz2mziapmjxi2cd0dq48jzg587xdsdp07xvpcz22"))))
15448 (build-system python-build-system)
15449 (propagated-inputs
15450 `(("python-monotonic" ,python-monotonic)
15451 ("python-six" ,python-six)
15452 ("python-testtools" ,python-testtools)))
15453 (home-page "https://github.com/harlowja/fasteners")
15454 (synopsis "Python package that provides useful locks")
15455 (description
15456 "This package provides a Python program that provides following locks:
15457
15458@itemize
15459@item Locking decorator
15460@item Reader-writer locks
15461@item Inter-process locks
15462@item Generic helpers
15463@end itemize\n")
15464 (properties `((python2-variant . ,(delay python2-fasteners))))
15465 (license license:asl2.0)))
15466
15467(define-public python2-fasteners
15468 (let ((base (package-with-python2 (strip-python2-variant python-fasteners))))
15469 (package
15470 (inherit base)
15471 (propagated-inputs
15472 `(("python2-futures" ,python2-futures)
15473 ,@(package-propagated-inputs base))))))
15474
15475(define-public python-requests-file
15476 (package
15477 (name "python-requests-file")
15478 (version "1.4.3")
15479 (source
15480 (origin
15481 (method url-fetch)
15482 (uri (pypi-uri "requests-file" version))
15483 (sha256
15484 (base32
15485 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
15486 (build-system python-build-system)
15487 (propagated-inputs
15488 `(("python-requests" ,python-requests)
15489 ("python-six" ,python-six)))
15490 (home-page
15491 "https://github.com/dashea/requests-file")
15492 (synopsis "File transport adapter for Requests")
15493 (description
15494 "Requests-File is a transport adapter for use with the Requests Python
52beae7b 15495library to allow local file system access via @code{file://} URLs.")
44d10b1f
RW
15496 (license license:asl2.0)))
15497
15498(define-public python2-requests-file
15499 (package-with-python2 python-requests-file))
15500
15501(define-public python-tldextract
15502 (package
15503 (name "python-tldextract")
15504 (version "2.2.0")
15505 (source
15506 (origin
15507 (method url-fetch)
15508 (uri (pypi-uri "tldextract" version))
15509 (sha256
15510 (base32
15511 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
15512 (build-system python-build-system)
15513 (native-inputs
15514 `(("python-pytest" ,python-pytest)
15515 ("python-responses" ,python-responses)))
15516 (propagated-inputs
15517 `(("python-idna" ,python-idna)
15518 ("python-requests" ,python-requests)
15519 ("python-requests-file" ,python-requests-file)))
15520 (home-page
15521 "https://github.com/john-kurkowski/tldextract")
15522 (synopsis
15523 "Separate the TLD from the registered domain and subdomains of a URL")
15524 (description
15525 "TLDExtract accurately separates the TLD from the registered domain and
15526subdomains of a URL, using the Public Suffix List. By default, this includes
15527the public ICANN TLDs and their exceptions. It can optionally support the
15528Public Suffix List's private domains as well.")
15529 (license license:bsd-3)))
15530
15531(define-public python2-tldextract
15532 (package-with-python2 python-tldextract))
15533
15534(define-public python-pynamecheap
15535 (package
15536 (name "python-pynamecheap")
15537 (version "0.0.3")
15538 (source
15539 (origin
15540 (method url-fetch)
15541 (uri (pypi-uri "PyNamecheap" version))
15542 (sha256
15543 (base32
15544 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
15545 (build-system python-build-system)
15546 (propagated-inputs
15547 `(("python-requests" ,python-requests)))
15548 (home-page
15549 "https://github.com/Bemmu/PyNamecheap")
15550 (synopsis
15551 "Namecheap API client in Python")
15552 (description
15553 "PyNamecheap is a Namecheap API client in Python.")
15554 (license license:expat)))
15555
15556(define-public python2-pynamecheap
15557 (package-with-python2 python-pynamecheap))
15558
15559(define-public python-dns-lexicon
15560 (package
15561 (name "python-dns-lexicon")
15562 (version "2.4.0")
15563 (source
15564 (origin
15565 (method url-fetch)
15566 (uri (pypi-uri "dns-lexicon" version))
15567 (sha256
15568 (base32
15569 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
15570 (build-system python-build-system)
15571 (arguments
15572 `(#:tests? #f)) ;requires internet access
15573 (propagated-inputs
15574 `(("python-future" ,python-future)
15575 ("python-pynamecheap" ,python-pynamecheap)
15576 ("python-requests" ,python-requests)
15577 ("python-tldextract" ,python-tldextract)
15578 ("python-urllib3" ,python-urllib3)))
15579 (home-page "https://github.com/AnalogJ/lexicon")
15580 (synopsis
15581 "Manipulate DNS records on various DNS providers")
15582 (description
15583 "Lexicon provides a way to manipulate DNS records on multiple DNS
15584providers in a standardized way. It has a CLI but it can also be used as a
15585Python library. It was designed to be used in automation, specifically with
15586Let's Encrypt.")
15587 (license license:expat)))
15588
15589(define-public python2-dns-lexicon
15590 (package-with-python2 python-dns-lexicon))
15591
15592(define-public python-commandlines
15593 (package
15594 (name "python-commandlines")
15595 (version "0.4.1")
15596 (source
15597 (origin
15598 (method url-fetch)
15599 (uri (pypi-uri "commandlines" version))
15600 (sha256
15601 (base32
15602 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
15603 (build-system python-build-system)
15604 (home-page "https://github.com/chrissimpkins/commandlines")
15605 (synopsis "Command line argument to object parsing library")
15606 (description
15607 "@code{Commandlines} is a Python library for command line application
15608development that supports command line argument parsing, command string
15609validation testing and application logic.")
15610 (license license:expat)))
15611
15612;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
15613;; python-numba. They have a very unflexible relationship.
15614(define-public python-numba
15615 (package
15616 (name "python-numba")
65f84096 15617 (version "0.46.0")
44d10b1f
RW
15618 (source
15619 (origin
15620 (method url-fetch)
15621 (uri (pypi-uri "numba" version))
15622 (sha256
15623 (base32
65f84096 15624 "1vnfzcq6fcnkmdms6114d49awvvj5181fl7z1wlha27qc2paxjy2"))))
44d10b1f
RW
15625 (build-system python-build-system)
15626 (arguments
15627 `(#:modules ((guix build utils)
15628 (guix build python-build-system)
15629 (ice-9 ftw)
15630 (srfi srfi-1)
15631 (srfi srfi-26))
15632 #:phases
15633 (modify-phases %standard-phases
15634 (add-after 'unpack 'disable-proprietary-features
15635 (lambda _
15636 (setenv "NUMBA_DISABLE_HSA" "1")
15637 (setenv "NUMBA_DISABLE_CUDA" "1")
15638 #t))
15639 (add-after 'unpack 'remove-failing-tests
15640 (lambda _
65f84096 15641 ;; FIXME: These tests fail for unknown reasons:
44d10b1f
RW
15642 ;; test_non_writable_pycache, test_non_creatable_pycache, and
15643 ;; test_frozen (all in numba.tests.test_dispatcher.TestCache).
15644 (substitute* "numba/tests/test_dispatcher.py"
15645 (("def test(_non_writable_pycache)" _ m)
15646 (string-append "def guix_skip" m))
15647 (("def test(_non_creatable_pycache)" _ m)
15648 (string-append "def guix_skip" m))
15649 (("def test(_frozen)" _ m)
15650 (string-append "def guix_skip" m)))
15651
15652 ;; These tests fail because we don't run the tests from the build
15653 ;; directory: test_setup_py_distutils, test_setup_py_setuptools
65f84096 15654 ;; They are in numba.tests.test_pycc.TestDistutilsSupport.
44d10b1f
RW
15655 (substitute* "numba/tests/test_pycc.py"
15656 (("def test(_setup_py_distutils|_setup_py_setuptools)" _ m)
15657 (string-append "def guix_skip" m)))
65f84096
BG
15658
15659 ;; These tests fail because our version of Python does not have
15660 ;; a recognizable front-end for the Numba distribution to use
15661 ;; to check against.
15662 (substitute* "numba/tests/test_entrypoints.py"
15663 (("def test(_init_entrypoint)" _ m)
15664 (string-append "def guix_skip" m)))
15665 (substitute* "numba/tests/test_jitclasses.py"
15666 (("def test(_jitclass_longlabel_not_truncated)" _ m)
15667 (string-append "def guix_skip" m)))
44d10b1f
RW
15668 #t))
15669 (replace 'check
15670 (lambda _
15671 (let ((cwd (getcwd)))
15672 (setenv "PYTHONPATH"
15673 (string-append cwd "/build/"
15674 (find (cut string-prefix? "lib" <>)
15675 (scandir (string-append cwd "/build")))
15676 ":"
15677 (getenv "PYTHONPATH")))
15678 ;; Something is wrong with the PYTHONPATH when running the
15679 ;; tests from the build directory, as it complains about not being
15680 ;; able to import certain modules.
15681 (with-directory-excursion "/tmp"
15682 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))
15683 #t)))))
15684 (propagated-inputs
15685 `(("python-llvmlite" ,python-llvmlite)
15686 ("python-numpy" ,python-numpy)
15687 ("python-singledispatch" ,python-singledispatch)))
15688 ;; Needed for tests.
15689 (inputs
15690 `(("python-jinja2" ,python-jinja2)
15691 ("python-pygments" ,python-pygments)))
15692 (home-page "https://numba.pydata.org")
15693 (synopsis "Compile Python code using LLVM")
15694 (description "Numba gives you the power to speed up your applications with
15695high performance functions written directly in Python. With a few
15696annotations, array-oriented and math-heavy Python code can be just-in-time
15697compiled to native machine instructions, similar in performance to C, C++ and
15698Fortran, without having to switch languages or Python interpreters.
15699
15700Numba works by generating optimized machine code using the LLVM compiler
15701infrastructure at import time, runtime, or statically (using the included pycc
15702tool).")
15703 (license license:bsd-3)))
15704
15705(define-public python-anndata
15706 (package
15707 (name "python-anndata")
8c9372c1 15708 (version "0.6.18")
44d10b1f
RW
15709 (source
15710 (origin
15711 (method url-fetch)
15712 (uri (pypi-uri "anndata" version))
15713 (sha256
15714 (base32
8c9372c1 15715 "03x83yjaccbqszj7x4fwwmpil0ai59yx64d1zmf2691za3j03w73"))))
44d10b1f
RW
15716 (build-system python-build-system)
15717 (propagated-inputs
15718 `(("python-h5py" ,python-h5py)
15719 ("python-natsort" ,python-natsort)
15720 ("python-pandas" ,python-pandas)
15721 ("python-scipy" ,python-scipy)))
15722 (home-page "https://github.com/theislab/anndata")
15723 (synopsis "Annotated data for data analysis pipelines")
15724 (description "Anndata is a package for simple (functional) high-level APIs
15725for data analysis pipelines. In this context, it provides an efficient,
15726scalable way of keeping track of data together with learned annotations and
15727reduces the code overhead typically encountered when using a mostly
15728object-oriented library such as @code{scikit-learn}.")
15729 (license license:bsd-3)))
15730
15731(define-public python-dill
15732 (package
15733 (name "python-dill")
32be3577 15734 (version "0.3.1.1")
44d10b1f
RW
15735 (source
15736 (origin
15737 (method url-fetch)
15738 (uri (pypi-uri "dill" version))
15739 (sha256
32be3577 15740 (base32 "1704g8z70d210ksgbccs2v545v9w0wc6lx15m296alb7jf0yzn22"))))
44d10b1f 15741 (build-system python-build-system)
32be3577
MIP
15742 (arguments
15743 `(#:phases
15744 (modify-phases %standard-phases
15745 (replace 'check
15746 (lambda _
15747 (with-directory-excursion "/tmp"
15748 (invoke "nosetests" "-v"))
15749 #t)))))
15750 (native-inputs
15751 `(("python-nose" ,python-nose)))
15752 (home-page "https://pypi.org/project/dill/")
44d10b1f
RW
15753 (synopsis "Serialize all of Python")
15754 (description "Dill extends Python's @code{pickle} module for serializing
15755and de-serializing Python objects to the majority of the built-in Python
15756types. Dill provides the user the same interface as the @code{pickle} module,
15757and also includes some additional features. In addition to pickling Python
15758objects, @code{dill} provides the ability to save the state of an interpreter
61985d65 15759session in a single command. Hence, it would be feasible to save a
44d10b1f
RW
15760interpreter session, close the interpreter, ship the pickled file to another
15761computer, open a new interpreter, unpickle the session and thus continue from
15762the saved state of the original interpreter session.")
15763 (license license:bsd-3)))
15764
15765(define-public python-multiprocess
15766 (package
15767 (name "python-multiprocess")
fcc4e9e7 15768 (version "0.70.9")
44d10b1f
RW
15769 (source
15770 (origin
15771 (method url-fetch)
15772 (uri (pypi-uri "multiprocess" version))
15773 (sha256
15774 (base32
fcc4e9e7 15775 "1r882nvd44xqwbrclwqx5rhs80l6809rcvpc7pkpgnij06cvvmcz"))))
44d10b1f 15776 (build-system python-build-system)
fcc4e9e7
MIP
15777 (arguments
15778 `(#:phases
15779 (modify-phases %standard-phases
15780 (add-after 'unpack 'disable-broken-tests
15781 (lambda _
15782 ;; This test is broken as there is no keyboard interrupt.
15783 (substitute* "py3.7/multiprocess/tests/__init__.py"
15784 (("^(.*)def test_wait_result"
15785 line indent)
15786 (string-append indent
15787 "@unittest.skip(\"Disabled by Guix\")\n"
15788 line)))
15789 #t))
15790 ;; Tests must be run after installation.
15791 (delete 'check)
15792 (add-after 'install 'check
15793 (lambda* (#:key inputs outputs #:allow-other-keys)
15794 (add-installed-pythonpath inputs outputs)
15795 (invoke "python" "-m" "multiprocess.tests")
15796 #t)))))
44d10b1f
RW
15797 (propagated-inputs
15798 `(("python-dill" ,python-dill)))
fcc4e9e7 15799 (home-page "https://pypi.org/project/multiprocess/")
44d10b1f
RW
15800 (synopsis "Multiprocessing and multithreading in Python")
15801 (description
15802 "This package is a fork of the multiprocessing Python package, a package
15803which supports the spawning of processes using the API of the standard
15804library's @code{threading} module.")
15805 (license license:bsd-3)))
15806
15807(define-public python-toolz
15808 (package
15809 (name "python-toolz")
15810 (version "0.9.0")
15811 (source
15812 (origin
15813 (method url-fetch)
15814 (uri (pypi-uri "toolz" version))
15815 (sha256
15816 (base32
15817 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
15818 (build-system python-build-system)
15819 ;; FIXME: tests cannot be computed: "Can't perform this operation for
15820 ;; unregistered loader type"
15821 (arguments '(#:tests? #f))
15822 (home-page "https://github.com/pytoolz/toolz/")
15823 (synopsis "List processing tools and functional utilities")
15824 (description
15825 "This package provides a set of utility functions for iterators,
15826functions, and dictionaries.")
15827 (license license:bsd-3)))
15828
15829(define-public python2-toolz
15830 (package-with-python2 python-toolz))
15831
15832(define-public python-cytoolz
15833 (package
15834 (name "python-cytoolz")
15835 (version "0.9.0.1")
15836 (source
15837 (origin
15838 (method url-fetch)
15839 (uri (pypi-uri "cytoolz" version))
15840 (sha256
15841 (base32
15842 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
15843 (build-system python-build-system)
15844 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
15845 ;; 'exceptions'"
15846 (arguments '(#:tests? #f))
15847 (propagated-inputs
15848 `(("python-toolz" ,python-toolz)))
15849 (native-inputs
15850 `(("python-cython" ,python-cython)))
15851 (home-page "https://github.com/pytoolz/cytoolz")
15852 (synopsis "High performance functional utilities")
15853 (description
15854 "The cytoolz package implements the same API as provided by toolz. The
15855main differences are that @code{cytoolz} is faster and cytoolz offers a C API
15856that is accessible to other projects developed in Cython.")
15857 (license license:bsd-3)))
15858
15859(define-public python-sortedcontainers
15860 (package
15861 (name "python-sortedcontainers")
b244f166 15862 (version "2.1.0")
44d10b1f
RW
15863 (source
15864 (origin
15865 (method url-fetch)
15866 (uri (pypi-uri "sortedcontainers" version))
15867 (sha256
15868 (base32
b244f166 15869 "0fm0w5id2yhqld95hg2m636vjgkz377rvgdfqaxc25vbylr9lklp"))))
44d10b1f
RW
15870 (build-system python-build-system)
15871 (native-inputs
15872 `(("python-tox" ,python-tox)))
15873 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
15874 (synopsis "Sorted List, Sorted Dict, Sorted Set")
15875 (description
15876 "This package provides a sorted collections library, written in
15877pure-Python.")
15878 (license license:asl2.0)))
15879
15880(define-public python-cloudpickle
15881 (package
15882 (name "python-cloudpickle")
15883 (version "0.6.1")
15884 (source
15885 (origin
15886 (method url-fetch)
15887 (uri (pypi-uri "cloudpickle" version))
15888 (sha256
15889 (base32
15890 "1wdw89mlm7fqa3fm3ymskx05jrys66n8m1z1a8s0mss0799ahsgi"))))
15891 (build-system python-build-system)
15892 ;; FIXME: there are 5 errors in 122 tests:
15893 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.CloudPickleTest)
15894 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.CloudPickleTest)
15895 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.Protocol2CloudPickleTest)
15896 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.Protocol2CloudPickleTest)
15897 ;; ERROR: test_temp_file (tests.cloudpickle_file_test.CloudPickleFileTests)
15898 ;; TypeError: cannot serialize '_io.BufferedRandom' object
15899 (arguments '(#:tests? #f))
15900 (native-inputs
15901 `(("python-pytest" ,python-pytest)
15902 ("python-mock" ,python-mock)
15903 ("python-tornado" ,python-tornado)))
15904 (home-page "https://github.com/cloudpipe/cloudpickle")
15905 (synopsis "Extended pickling support for Python objects")
15906 (description
15907 "Cloudpickle makes it possible to serialize Python constructs not
15908supported by the default pickle module from the Python standard library. It
15909is especially useful for cluster computing where Python expressions are
15910shipped over the network to execute on remote hosts, possibly close to the
15911data.")
15912 (license license:bsd-3)))
15913
15914(define-public python2-cloudpickle
15915 (package-with-python2 python-cloudpickle))
15916
15917(define-public python-locket
15918 (package
15919 (name "python-locket")
15920 (version "0.2.0")
15921 (source
15922 (origin
15923 (method url-fetch)
15924 (uri (pypi-uri "locket" version))
15925 (sha256
15926 (base32
15927 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
15928 (build-system python-build-system)
15929 (home-page "https://github.com/mwilliamson/locket.py")
15930 (synopsis "File-based locks for Python")
15931 (description
15932 "Locket implements a lock that can be used by multiple processes provided
15933they use the same path.")
15934 (license license:bsd-2)))
15935
15936(define-public python2-locket
15937 (package-with-python2 python-locket))
15938
15939(define-public python-blosc
15940 (package
15941 (name "python-blosc")
15942 (version "1.5.1")
15943 (source
15944 (origin
15945 (method url-fetch)
15946 (uri (pypi-uri "blosc" version))
15947 (sha256
15948 (base32
15949 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
15950 (build-system python-build-system)
15951 ;; FIXME: all tests pass, but then this error is printed:
15952 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
15953 (arguments '(#:tests? #f))
15954 (propagated-inputs
15955 `(("python-numpy" ,python-numpy)))
15956 (home-page "https://github.com/blosc/python-blosc")
15957 (synopsis "Python wrapper for the Blosc data compressor library")
15958 (description "Blosc is a high performance compressor optimized for binary
15959data. It has been designed to transmit data to the processor cache faster
15960than the traditional, non-compressed, direct memory fetch approach via a
15961@code{memcpy()} system call.
15962
15963Blosc works well for compressing numerical arrays that contains data with
15964relatively low entropy, like sparse data, time series, grids with
15965regular-spaced values, etc.
15966
15967This Python package wraps the Blosc library.")
15968 (license license:bsd-3)))
15969
15970(define-public python2-blosc
15971 (package-with-python2 python-blosc))
15972
15973(define-public python-partd
15974 (package
15975 (name "python-partd")
15976 (version "0.3.9")
15977 (source
15978 (origin
15979 (method url-fetch)
15980 (uri (pypi-uri "partd" version))
15981 (sha256
15982 (base32
15983 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
15984 (build-system python-build-system)
15985 (propagated-inputs
15986 `(("python-blosc" ,python-blosc)
15987 ("python-locket" ,python-locket)
15988 ("python-numpy" ,python-numpy)
15989 ("python-pandas" ,python-pandas)
15990 ("python-pyzmq" ,python-pyzmq)
15991 ("python-toolz" ,python-toolz)))
15992 (home-page "https://github.com/dask/partd/")
15993 (synopsis "Appendable key-value storage")
15994 (description "Partd stores key-value pairs. Values are raw bytes. We
15995append on old values. Partd excels at shuffling operations.")
15996 (license license:bsd-3)))
15997
15998(define-public python2-partd
15999 (package-with-python2 python-partd))
16000
c70a0191
RW
16001(define-public python-fsspec
16002 (package
16003 (name "python-fsspec")
16004 (version "0.6.1")
16005 (source
16006 (origin
16007 (method url-fetch)
16008 (uri (pypi-uri "fsspec" version))
16009 (sha256
16010 (base32
16011 "1g9ba8v04s1nrh7pvzfm2md7ivl2mrz3hcq3y9d1a44gd62h17zj"))))
16012 (build-system python-build-system)
16013 (arguments '(#:tests? #f)) ; there are none
16014 (home-page "https://github.com/intake/filesystem_spec")
16015 (synopsis "File-system specification")
16016 (description "The purpose of this package is to produce a template or
16017specification for a file-system interface, that specific implementations
16018should follow, so that applications making use of them can rely on a common
16019behavior and not have to worry about the specific internal implementation
16020decisions with any given backend.")
16021 (license license:bsd-3)))
16022
44d10b1f
RW
16023(define-public python-dask
16024 (package
16025 (name "python-dask")
86c7ca07 16026 (version "2.9.0")
44d10b1f
RW
16027 (source
16028 (origin
16029 (method url-fetch)
16030 (uri (pypi-uri "dask" version))
16031 (sha256
86c7ca07 16032 (base32 "1w1hqr8vyx6ygwflj2737dcy0mmgvrc0s602gnny8pzlcbs9m76b"))))
44d10b1f 16033 (build-system python-build-system)
44d10b1f
RW
16034 (arguments
16035 `(#:phases
16036 (modify-phases %standard-phases
86c7ca07 16037 (add-after 'unpack 'disable-broken-tests
44d10b1f 16038 (lambda _
86c7ca07 16039 ;; This test is marked as xfail when pytest-xdist is used.
44d10b1f
RW
16040 (substitute* "dask/tests/test_threaded.py"
16041 (("def test_interrupt\\(\\)" m)
16042 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
16043 m)))
86c7ca07
RW
16044 ;; This one fails with a type error:
16045 ;; TypeError: Already tz-aware, use tz_convert to convert.
16046 (substitute* "dask/dataframe/tests/test_shuffle.py"
16047 (("def test_set_index_timestamp\\(\\)" m)
16048 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
16049 m)))
44d10b1f
RW
16050 #t))
16051 (replace 'check
16052 (lambda _ (invoke "pytest" "-vv"))))))
16053 (propagated-inputs
16054 `(("python-cloudpickle" ,python-cloudpickle)
86c7ca07 16055 ("python-fsspec" ,python-fsspec)
44d10b1f 16056 ("python-numpy" ,python-numpy)
86c7ca07 16057 ("python-packaging" ,python-packaging)
44d10b1f
RW
16058 ("python-pandas" ,python-pandas)
16059 ("python-partd" ,python-partd)
16060 ("python-toolz" ,python-toolz)
16061 ("python-pyyaml" ,python-pyyaml)))
16062 (native-inputs
16063 `(("python-pytest" ,python-pytest)
16064 ("python-pytest-runner" ,python-pytest-runner)))
16065 (home-page "https://github.com/dask/dask/")
16066 (synopsis "Parallel computing with task scheduling")
16067 (description
16068 "Dask is a flexible parallel computing library for analytics. It
16069consists of two components: dynamic task scheduling optimized for computation,
16070and large data collections like parallel arrays, dataframes, and lists that
16071extend common interfaces like NumPy, Pandas, or Python iterators to
16072larger-than-memory or distributed environments. These parallel collections
16073run on top of the dynamic task schedulers. ")
16074 (license license:bsd-3)))
16075
44d10b1f
RW
16076(define-public python-ilinkedlist
16077 (package
16078 (name "python-ilinkedlist")
16079 (version "0.4.0")
16080 (source
16081 (origin
16082 (method url-fetch)
16083 (uri (pypi-uri "ilinkedlist" version))
16084 (sha256
16085 (base32
16086 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
16087 (build-system python-build-system)
16088 (native-inputs `(("python-pytest" ,python-pytest)))
16089 (inputs `(("python" ,python)))
16090 (home-page "https://github.com/luther9/ilinkedlist-py")
16091 (synopsis "Immutable linked list library")
16092 (description
16093 "This is a implementation of immutable linked lists for Python. It
16094contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
16095Since a linked list is treated as immutable, it is hashable, and its length
16096can be retrieved in constant time. Some of the terminology is inspired by
16097LISP. It is possible to create an improper list by creating a @code{Pair}
16098with a non-list @code{cdr}.")
16099 (license license:gpl3+)))
16100
16101(define-public python-readlike
16102 (package
16103 (name "python-readlike")
16104 (version "0.1.3")
16105 (source
16106 (origin
16107 (method url-fetch)
16108 (uri (pypi-uri "readlike" version))
16109 (sha256
16110 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
16111 (build-system python-build-system)
16112 (home-page "https://github.com/jangler/readlike")
16113 (synopsis "GNU Readline-like line editing module")
16114 (description
16115 "This Python module provides line editing functions similar to the default
16116Emacs-style ones of GNU Readline. Unlike the Python standard library's
16117@code{readline} package, this one allows access to those capabilties in settings
16118outside of a standard command-line interface. It is especially well-suited to
16119interfacing with Urwid, due to a shared syntax for describing key inputs.
16120
16121Currently, all stateless Readline commands are implemented. Yanking and history
16122are not supported.")
16123 (license license:expat)))
16124
16125(define-public python2-readlike
16126 (package-with-python2 python-readlike))
16127
16128(define-public python-reparser
16129 (package
16130 (name "python-reparser")
16131 (version "1.4.3")
16132 (source
16133 (origin
16134 (method url-fetch)
16135 (uri (pypi-uri "ReParser" version))
16136 (sha256
16137 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
16138 (build-system python-build-system)
16139 (home-page "https://github.com/xmikos/reparser")
16140 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
16141 (description
16142 "This Python library provides a simple lexer/parser for inline markup based
16143on regular expressions.")
16144 (license license:expat)))
16145
16146(define-public python2-reparser
16147 (let ((reparser (package-with-python2
16148 (strip-python2-variant python-reparser))))
16149 (package (inherit reparser)
16150 (propagated-inputs
16151 `(("python2-enum34" ,python2-enum34)
16152 ,@(package-propagated-inputs reparser))))))
16153
16154(define-public python-precis-i18n
16155 (package
16156 (name "python-precis-i18n")
16157 (version "1.0.0")
16158 (source
16159 (origin
16160 (method url-fetch)
16161 (uri (pypi-uri "precis_i18n" version))
16162 (sha256
16163 (base32
16164 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
16165 (build-system python-build-system)
16166 (home-page "https://github.com/byllyfish/precis_i18n")
16167 (synopsis "Implementation of the PRECIS framework")
16168 (description
16169 "This module implements the PRECIS Framework as described in RFC 8264,
16170RFC 8265 and RFC 8266.")
16171 (license license:expat)))
16172
d0446c4b
RW
16173(define-public python-absl-py
16174 (package
16175 (name "python-absl-py")
16176 (version "0.6.1")
16177 (source
16178 (origin
16179 (method url-fetch)
16180 (uri (pypi-uri "absl-py" version))
16181 (sha256
16182 (base32
16183 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
16184 (build-system python-build-system)
16185 (propagated-inputs
16186 `(("python-six" ,python-six)))
16187 (home-page "https://github.com/abseil/abseil-py")
16188 (synopsis "Abseil Python common libraries")
16189 (description
16190 "This package provides the Abseil Python Common Libraries, a collection
16191of Python libraries for building Python applications.")
16192 (license license:asl2.0)))
16193
81bed4e9
RW
16194(define-public python-astor
16195 (package
16196 (name "python-astor")
16197 (version "0.7.1")
16198 (source
16199 (origin
16200 (method url-fetch)
16201 (uri (pypi-uri "astor" version))
16202 (sha256
16203 (base32
16204 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
16205 (build-system python-build-system)
16206 ;; FIXME: There are two errors and two test failures.
16207 (arguments `(#:tests? #f))
16208 (home-page "https://github.com/berkerpeksag/astor")
39ee82ff 16209 (synopsis "Read and write Python ASTs")
81bed4e9 16210 (description "Astor is designed to allow easy manipulation of Python
39ee82ff 16211source via the Abstract Syntax Tree.")
81bed4e9
RW
16212 (license license:bsd-3)))
16213
39ee82ff
RW
16214(define-public python2-astor
16215 (package-with-python2 python-astor))
16216
22e623ae
RW
16217(define-public python-grpcio
16218 (package
16219 (name "python-grpcio")
16220 (version "1.17.1")
16221 (source
16222 (origin
16223 (method url-fetch)
16224 (uri (pypi-uri "grpcio" version))
16225 (sha256
16226 (base32
16227 "0qb9y6j83nxa6d4kc60i8yfgdm7a8ms7b54kncjzf5y7nsxp8rzx"))))
16228 (build-system python-build-system)
16229 (propagated-inputs
16230 `(("python-six" ,python-six)))
16231 (home-page "https://grpc.io")
16232 (synopsis "HTTP/2-based RPC framework")
16233 (description "This package provides a Python library for communicating
16234with the HTTP/2-based RPC framework gRPC.")
16235 (license license:asl2.0)))
16236
79869f80
RW
16237(define-public python-astunparse
16238 (package
16239 (name "python-astunparse")
47d79541 16240 (version "1.6.2")
79869f80
RW
16241 (source
16242 (origin
16243 (method url-fetch)
16244 (uri (pypi-uri "astunparse" version))
16245 (sha256
47d79541 16246 (base32 "0rzbc44xcvzjhhiy7wac96mgal5mcjz1mfq8rmvgswskf4kf9cys"))))
79869f80 16247 (build-system python-build-system)
47d79541 16248 (arguments '(#:tests? #f)) ; there are none
79869f80
RW
16249 (propagated-inputs
16250 `(("python-six" ,python-six)
16251 ("python-wheel" ,python-wheel)))
16252 (home-page "https://github.com/simonpercivall/astunparse")
16253 (synopsis "AST unparser for Python")
16254 (description "This package provides an AST unparser for Python. It is a
16255factored out version of @code{unparse} found in the Python source
16256distribution.")
16257 (license license:bsd-3)))
16258
2884aac0
RW
16259(define-public python-gast
16260 (package
16261 (name "python-gast")
bd300261 16262 (version "0.2.2")
2884aac0
RW
16263 (source
16264 (origin
16265 (method url-fetch)
16266 (uri (pypi-uri "gast" version))
16267 (sha256
bd300261 16268 (base32 "1w5dzdb3gpcfmd2s0b93d8gff40a1s41rv31458z14inb3s9v4zy"))))
2884aac0
RW
16269 (build-system python-build-system)
16270 (propagated-inputs
16271 `(("python-astunparse" ,python-astunparse)))
16272 (home-page "https://pypi.org/project/gast/")
16273 (synopsis "Generic Python AST that abstracts the underlying Python version")
16274 (description
16275 "GAST provides a compatibility layer between the AST of various Python
16276versions, as produced by @code{ast.parse} from the standard @code{ast}
16277module.")
16278 (license license:bsd-3)))
16279
44d10b1f
RW
16280(define-public python-wikidata
16281 (package
16282 (name "python-wikidata")
16283 (version "0.6.1")
16284 (source
16285 (origin
16286 (method url-fetch)
16287 (uri (pypi-uri "Wikidata" version))
16288 (sha256
16289 (base32
16290 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
16291 (build-system python-build-system)
16292 (propagated-inputs
16293 `(("python-babel" ,python-babel)))
16294 (home-page "https://github.com/dahlia/wikidata")
16295 (synopsis "Wikidata client library")
16296 (description
16297 "This package provides a Python interface to
16298@url{https://www.wikidata.org/, Wikidata}.")
16299 (properties '((upstream-name . "Wikidata")))
16300 (license license:gpl3+)))
16301
16302(define-public python-doctest-ignore-unicode
16303 (package
16304 (name "python-doctest-ignore-unicode")
16305 (version "0.1.2")
16306 (source
16307 (origin
16308 (method url-fetch)
16309 (uri (pypi-uri "doctest-ignore-unicode" version))
16310 (sha256
16311 (base32
16312 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
16313 (build-system python-build-system)
16314 (native-inputs
16315 `(("python-nose" ,python-nose)))
16316 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
16317 (synopsis "Ignore Unicode literal prefixes in doctests")
16318 (description
16319 "This package adds support for a flag to ignore Unicode literal prefixes
16320in doctests.")
16321 (license license:asl2.0)))
16322
16323(define-public python-attr
16324 (package
16325 (name "python-attr")
16326 (version "0.3.1")
16327 (source
16328 (origin
16329 (method url-fetch)
16330 (uri (pypi-uri "attr" version))
16331 (sha256
16332 (base32
16333 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
16334 (build-system python-build-system)
16335 (home-page "https://github.com/denis-ryzhkov/attr")
16336 (synopsis "Decorator for attributes of target function or class")
16337 (description "Simple decorator to set attributes of target function or
16338class in a @acronym{DRY, Don't Repeat Yourself} way.")
16339 (license license:expat)))
f98232a3
VC
16340
16341(define-public python-construct
16342 (package
16343 (name "python-construct")
16344 (version "2.9.45")
16345 (source
16346 (origin
16347 (method url-fetch)
16348 (uri (pypi-uri "construct" version))
16349 (sha256
16350 (base32
16351 "130iy05awzigm2xah2yvlmb08mac5bi4gzr5m3g7k1krs3ps0w92"))))
16352 (build-system python-build-system)
16353 (arguments
16354 `(#:tests? #f)) ; No tests exist.
16355 (propagated-inputs
16356 `(("python-extras" ,python-extras)
16357 ("python-arrow" ,python-arrow)
16358 ("python-numpy" ,python-numpy)
16359 ("python-ruamel.yaml" ,python-ruamel.yaml)))
16360 (home-page "http://construct.readthedocs.io")
16361 (synopsis "Declarative and symmetrical parser and builder for binary data")
16362 (description
16363 "This package provides both simple, atomic constructs (such as
16364integers of various sizes), as well as composite ones which allow you
16365form hierarchical and sequential structures of increasing complexity.
16366It features bit and byte granularity, easy debugging and testing, an
16367easy-to-extend subclass system, and lots of primitive constructs to
16368make your work easier.")
16369 (license license:expat)))
b742c006
LF
16370
16371(define-public python-humanize
16372 (package
16373 (name "python-humanize")
16374 (version "0.5.1")
16375 (source
16376 (origin
16377 (method url-fetch)
16378 (uri (pypi-uri "humanize" version))
16379 (sha256
16380 (base32
16381 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
16382 (arguments
16383 '(#:tests? #f)) ; tests not in pypi archive
16384 (build-system python-build-system)
16385 (home-page "https://github.com/jmoiron/humanize")
16386 (synopsis "Print numerical information in a human-readable form")
16387 (description "This package provides a Python module that displays numbers
16388and dates in \"human readable\" forms. For example, it would display
16389\"12345591313\" as \"12.3 billion\".")
16390 (license license:expat)))
d5bbf66d
LF
16391
16392(define-public python-txaio
16393 (package
16394 (name "python-txaio")
16395 (version "18.8.1")
16396 (source
16397 (origin
16398 (method url-fetch)
16399 (uri (pypi-uri "txaio" version))
16400 (sha256
16401 (base32
16402 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
16403 (build-system python-build-system)
16404 (propagated-inputs
16405 `(("python-twisted" ,python-twisted)
16406 ("python-six" ,python-six)))
16407 (home-page "https://github.com/crossbario/txaio")
16408 (synopsis "Compatibility layer between Python asyncio and Twisted")
16409 (description "Txaio provides a compatibility layer between the Python
16410@code{asyncio} module and @code{Twisted}.")
16411 (license license:expat)))
963dfd3a
RW
16412
16413(define-public python-toolshed
16414 (package
16415 (name "python-toolshed")
16416 (version "0.4.6")
16417 (source
16418 (origin
16419 (method url-fetch)
16420 (uri (pypi-uri "toolshed" version))
16421 (sha256
16422 (base32
16423 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
16424 (build-system python-build-system)
16425 (native-inputs
16426 `(("python-nose" ,python-nose)))
16427 (home-page "https://github.com/brentp/toolshed/")
16428 (synopsis "Collection of modules and functions for working with data")
16429 (description "This is a collection of well-tested, simple modules and
16430functions that aim to reduce boilerplate when working with data.")
16431 (license license:bsd-2)))
c91ecf2d
RW
16432
16433(define-public python-annoy
16434 (package
16435 (name "python-annoy")
16436 (version "1.15.1")
16437 (source
16438 (origin
16439 (method url-fetch)
16440 (uri (pypi-uri "annoy" version))
16441 (sha256
16442 (base32
16443 "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp"))))
16444 (build-system python-build-system)
16445 (native-inputs
16446 `(("python-nose" ,python-nose)))
16447 (home-page "https://github.com/spotify/annoy/")
16448 (synopsis "Approximate nearest neighbors library")
16449 (description
16450 "Annoy is a C++ library with Python bindings to search for points in
16451space that are close to a given query point. It also creates large read-only
16452file-based data structures that are @code{mmap}ped into memory so that many
16453processes may share the same data.")
16454 (license license:asl2.0)))
412342d1 16455
79bfa422 16456(define-public python-pylzma
412342d1 16457 (package
79bfa422
DM
16458 (name "python-pylzma")
16459 (version "0.5.0")
16460 (source
16461 (origin
16462 (method url-fetch)
16463 (uri (pypi-uri "pylzma" version))
16464 (sha256
16465 (base32
16466 "074anvhyjgsv2iby2ql1ixfvjgmhnvcwjbdz8gk70xzkzcm1fx5q"))))
412342d1 16467 (build-system python-build-system)
79bfa422
DM
16468 (home-page "http://www.joachim-bauch.de/projects/pylzma/")
16469 (synopsis "Python bindings for the LZMA library by Igor Pavlov.")
16470 (description "This package provides Python bindings for the LZMA library
16471by Igor Pavlov.")
16472 (license license:lgpl2.1+)))
16473
16474(define-public python2-pylzma
16475 (package-with-python2 python-pylzma))
f825e605 16476
6609ebe7
AG
16477(define-public python2-zeroconf
16478 (package
16479 (name "python2-zeroconf")
16480
16481 ;; This is the last version that supports Python 2.x.
16482 (version "0.19.1")
16483 (source
16484 (origin
16485 (method url-fetch)
16486 (uri (pypi-uri "zeroconf" version))
16487 (sha256
16488 (base32
16489 "0ykzg730n915qbrq9bn5pn06bv6rb5zawal4sqjyfnjjm66snkj3"))))
16490 (build-system python-build-system)
16491 (arguments
16492 `(#:python ,python-2
16493 #:phases
16494 (modify-phases %standard-phases
16495 (add-after 'unpack 'patch-requires
16496 (lambda* (#:key inputs #:allow-other-keys)
16497 (substitute* "setup.py"
16498 (("enum-compat")
16499 "enum34"))
16500 #t)))))
16501 (native-inputs
16502 `(("python2-six" ,python2-six)
16503 ("python2-enum32" ,python2-enum34)
16504 ("python2-netifaces" ,python2-netifaces)
16505 ("python2-typing" ,python2-typing)))
16506 (home-page "https://github.com/jstasiak/python-zeroconf")
16507 (synopsis "Pure Python mDNS service discovery")
16508 (description
16509 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
16510compatible).")
16511 (license license:lgpl2.1+)))
16512
f825e605
GLV
16513(define-public python-bsddb3
16514 (package
16515 (name "python-bsddb3")
16516 (version "6.2.6")
16517 (source
16518 (origin
16519 (method url-fetch)
16520 (uri (pypi-uri "bsddb3" version))
16521 (sha256
16522 (base32
16523 "019db2y6bfmiqbrgg9x9f6h72qjmqh05czdn2v5sy9bl0gs23mj2"))))
16524 (build-system python-build-system)
16525 (inputs
16526 `(("bdb" ,bdb)))
16527 (arguments
16528 '(#:phases
16529 (modify-phases %standard-phases
16530 (add-after 'unpack 'configure-locations
16531 (lambda* (#:key inputs #:allow-other-keys)
16532 (setenv "BERKELEYDB_DIR" (assoc-ref inputs "bdb"))
16533 (setenv "YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION" "1")
16534 #t))
16535 (replace 'check
16536 (lambda _
16537 (invoke "python3" "test3.py" "-v"))))))
16538 (home-page "https://www.jcea.es/programacion/pybsddb.htm")
16539 (synopsis "Python bindings for Oracle Berkeley DB")
16540 (description
16541 "This module provides a nearly complete wrapping of the Oracle/Sleepycat
16542C API for the Database Environment, Database, Cursor, Log Cursor, Sequence and
16543Transaction objects, and each of these is exposed as a Python type in the
16544bsddb3.db module. The database objects can use various access methods: btree,
16545hash, recno, and queue. Complete support of Berkeley DB distributed
16546transactions. Complete support for Berkeley DB Replication Manager.
16547Complete support for Berkeley DB Base Replication. Support for RPC.")
16548 (license license:bsd-3)))
edeb04bf
PL
16549
16550(define-public python-dbfread
16551 (package
16552 (name "python-dbfread")
16553 (version "2.0.7")
16554 (source (origin
16555 (method url-fetch)
16556 (uri (pypi-uri "dbfread" version))
16557 (sha256
16558 (base32
16559 "0gdpwdzf1fngsi6jrdyj4qdf6cr7gnnr3zp80dpkzbgz0spskj07"))))
16560 (build-system python-build-system)
16561 (native-inputs
16562 `(("python-pytest" ,python-pytest)))
16563 (home-page "https://dbfread.readthedocs.io")
16564 (synopsis "Read DBF Files with Python")
16565 (description
16566 "This library reads DBF files and returns the data as native Python data
16567types for further processing. It is primarily intended for batch jobs and
16568one-off scripts.")
16569 (license license:expat)))
e308b4f0
JM
16570
16571(define-public python-cached-property
16572 (package
16573 (name "python-cached-property")
16574 (version "1.5.1")
16575 (source
16576 (origin
16577 (method url-fetch)
16578 (uri (pypi-uri "cached-property" version))
16579 (sha256
16580 (base32
16581 "010m1bl380l2r3vwq24r5v14l6gwvgm9v0mqqjkjss552jgsa5wj"))))
16582 (build-system python-build-system)
16583 (arguments
16584 `(#:phases
16585 (modify-phases %standard-phases
16586 ;; https://github.com/pydanny/cached-property/issues/131
16587 ;; recent versions of freezegun break one test
16588 (add-after 'unpack 'disable-broken-test
16589 (lambda _
16590 (substitute* "tests/test_cached_property.py"
16591 (("def test_threads_ttl_expiry\\(self\\)" m)
16592 (string-append "@unittest.skip(\"Disabled by Guix\")\n"
16593 " " m)))
16594 #t)))))
16595 (native-inputs
16596 `(("python-freezegun" ,python-freezegun)))
16597 (home-page
16598 "https://github.com/pydanny/cached-property")
16599 (synopsis
16600 "Decorator for caching properties in classes")
16601 (description
16602 "This package provides a decorator which makes caching
16603time-or-computationally-expensive properties quick and easy and works in Python
166042 or 3.")
16605 (license license:bsd-3)))
dfe8a704
NG
16606
16607(define-public python-folium
16608 (package
16609 (name "python-folium")
d3bc1ea9 16610 (version "0.10.1")
dfe8a704
NG
16611 (source
16612 (origin
16613 (method url-fetch)
16614 (uri (pypi-uri "folium" version))
16615 (sha256
16616 (base32
d3bc1ea9 16617 "0gcc267wxwxr57ry86pqpbiyfvl0g48hfvgy0f2mz9s58g87kgzd"))))
dfe8a704
NG
16618 (build-system python-build-system)
16619 (propagated-inputs
16620 `(("python-branca" ,python-branca)
16621 ("python-jinja2" ,python-jinja2)
16622 ("python-numpy" ,python-numpy)
16623 ("python-requests" ,python-requests)))
16624 (native-inputs
16625 `(("python-pytest" ,python-pytest)))
16626 (home-page "https://github.com/python-visualization/folium")
16627 (synopsis "Make beautiful maps with Leaflet.js & Python")
16628 (description "@code{folium} makes it easy to visualize data that’s been
16629manipulated in Python on an interactive leaflet map. It enables both the
16630binding of data to a map for @code{choropleth} visualizations as well as
16631passing rich vector/raster/HTML visualizations as markers on the map.
16632
16633The library has a number of built-in tilesets from OpenStreetMap, Mapbox, and
16634Stamen, and supports custom tilesets with Mapbox or Cloudmade API keys. It
16635supports Image, Video, GeoJSON and TopoJSON overlays.")
16636 (license license:expat)))
9dd5f475
LC
16637
16638(define-public jube
16639 (package
16640 ;; This is a command-line tool, so no "python-" prefix.
16641 (name "jube")
16642 (version "2.2.2")
16643 (source (origin
16644 (method url-fetch)
16645 (uri (string-append
16646 "http://apps.fz-juelich.de/jsc/jube/jube2/download.php?version="
16647 version))
16648 (sha256
16649 (base32
16650 "0xq4k1q63s1p6swgyp61vahlrd1fqmgbm0gm5kpj8ikwy0yc0nqk"))
16651 (file-name (string-append "jube-" version ".tar.gz"))))
16652 (build-system python-build-system)
16653 (home-page "https://apps.fz-juelich.de/jsc/jube/jube2/docu/index.html")
16654 (synopsis "Benchmarking environment")
16655 (description
16656 "JUBE helps perform and analyze benchmarks in a systematic way. For each
16657benchmarked application, benchmark data is stored in a format that allows JUBE
16658to deduct the desired information. This data can be parsed by automatic pre-
16659and post-processing scripts that draw information and store it more densely
16660for manual interpretation.")
a9f33960 16661 (license license:gpl3+)))
66436424
NG
16662
16663(define-public python-pyroutelib3
16664 (package
16665 (name "python-pyroutelib3")
16666 (version "1.3.post1")
16667 (source
16668 (origin
16669 (method url-fetch)
16670 (uri (pypi-uri "pyroutelib3" version))
16671 (sha256
16672 (base32
16673 "1hpbydpn2alyswiajfbvhzq4c7f36vdmvxy91hgv8l1lb2g2vfrj"))))
16674 (build-system python-build-system)
16675 (propagated-inputs
16676 `(("python-dateutil" ,python-dateutil)))
16677 (home-page "https://github.com/MKuranowski/pyroutelib3")
16678 (synopsis "Library for simple routing on OSM data")
16679 (description "Library for simple routing on OSM data")
16680 (license license:gpl3+)))
30e7c03a 16681
c1bbef69
16682(define-public python-bibtexparser
16683 (package
16684 (name "python-bibtexparser")
16685 (version "1.1.0")
16686 (source
16687 (origin
16688 (method url-fetch)
16689 (uri (pypi-uri "bibtexparser" version))
16690 (sha256
16691 (base32
16692 "0zwhfkrzf3n5847dbnfng92k7ak199l9v6x6ax3dgdidfpm6d2fz"))))
16693 (build-system python-build-system)
16694 (propagated-inputs
16695 `(("python-pyparsing" ,python-pyparsing)))
16696 (native-inputs
16697 `(("python-future" ,python-future)))
16698 (home-page "https://github.com/sciunto-org/python-bibtexparser")
16699 (synopsis "Python library to parse BibTeX files")
16700 (description "BibtexParser is a Python library to parse BibTeX files.")
16701 (license (list license:bsd-3 license:lgpl3))))
8581b40d
HG
16702
16703(define-public python-distro
16704 (package
16705 (name "python-distro")
16706 (version "1.4.0")
16707 (source
16708 (origin
16709 (method url-fetch)
16710 (uri (pypi-uri "distro" version))
16711 (sha256
16712 (base32
16713 "0mrg75w4ap7mdzyga75yaid9n8bgb345ih5mwjp3plj6v1jxwb9n"))))
16714 (build-system python-build-system)
16715 (native-inputs
16716 `(("python-pytest" ,python-pytest)))
16717 (home-page "https://github.com/nir0s/distro")
16718 (synopsis
16719 "OS platform information API")
16720 (description
16721 "@code{distro} provides information about the OS distribution it runs on,
16722such as a reliable machine-readable ID, or version information.
16723
16724It is the recommended replacement for Python's original
16725`platform.linux_distribution` function (which will be removed in Python 3.8).
16726@code{distro} also provides a command-line interface to output the platform
16727information in various formats.")
16728 (license license:asl2.0)))
f2f41e1a
HG
16729
16730(define-public python-cairosvg
16731 (package
16732 (name "python-cairosvg")
16733 (version "2.4.2")
16734 (source
16735 (origin
16736 (method url-fetch)
16737 (uri (pypi-uri "CairoSVG" version))
16738 (sha256
16739 (base32 "1bb7irxbaxxb9ahm3z5wsx1q96mm5gzskc7b6q07h9ikcnb8yrjf"))))
16740 (build-system python-build-system)
16741 (arguments
16742 `(#:phases
16743 (modify-phases %standard-phases
16744 (replace 'check
16745 (lambda _ (invoke "pytest"))))))
16746 (propagated-inputs
16747 `(("python-cairocffi" ,python-cairocffi)
16748 ("python-cssselect2" ,python-cssselect2)
16749 ("python-defusedxml" ,python-defusedxml)
16750 ("python-pillow" ,python-pillow)
16751 ("python-tinycss2" ,python-tinycss2)))
16752 (native-inputs
16753 `(("python-pytest-flake8" ,python-pytest-flake8)
16754 ("python-pytest-isort" ,python-pytest-isort)
16755 ("python-pytest-runner" ,python-pytest-runner)))
16756 (home-page "https://cairosvg.org/")
16757 (synopsis "SVG to PDF/PS/PNG converter based on Cairo")
16758 (description "CairoSVG is a SVG converter based on Cairo. It can export
16759SVG files to PDF, PostScript and PNG files. The main part of CairoSVG is a
16760SVG parser, trying to follow the SVG 1.1 recommendation from the W3C. Once
16761parsed, the result is drawn to a Cairo surface that can be exported to
16762qvarious formats: PDF, PostScript, PNG and even SVG.")
16763 (license license:lgpl3+)))
ea1801e0
HG
16764
16765(define-public python-pyphen
16766 (package
16767 (name "python-pyphen")
16768 (version "0.9.5")
16769 (source
16770 (origin
16771 (method url-fetch)
16772 (uri (pypi-uri "Pyphen" version))
16773 (sha256
16774 (base32 "08c9y69ry9d6m4zalhnalg86lsp9v2j5n1ziw5vxfmiihx83lqrv"))))
16775 (build-system python-build-system)
16776 ;; TODO: Use the Guix system hyphenation packages hyphen-* rather than the
16777 ;; embedded set provided by upstream - like Debian does.
16778 (home-page "https://github.com/Kozea/Pyphen")
16779 (synopsis "Pure Python module to hyphenate text")
16780 (description "Pyphen is a pure Python module to hyphenate text using
16781existing Hunspell hyphenation dictionaries.")
16782 (license (list license:gpl2 license:lgpl2.1 license:mpl1.1))))
85cfb0e9
CL
16783
16784(define-public python-intelhex
16785 (package
16786 (name "python-intelhex")
16787 (version "2.2.1")
16788 (source
16789 (origin
16790 (method url-fetch)
16791 (uri (pypi-uri "intelhex" version))
16792 (sha256
16793 (base32
16794 "0ckqjbxd8gwcg98gfzpn4vq1qxzfvq3rdbrr1hikj1nmw08qb780"))))
16795 (build-system python-build-system)
16796 (arguments '(#:tests? #f)) ;issue with version
16797 (home-page "https://pypi.org/project/IntelHex/")
16798 (synopsis "Python library for Intel HEX files manipulations")
16799 (description "The Intel HEX file format is widely used in microprocessors
16800and microcontrollers area (embedded systems etc.) as the de facto standard for
16801representation of code to be programmed into microelectronic devices. This
16802package provides an intelhex Python library to read, write, create from
16803scratch and manipulate data from Intel HEX file format. It also includes
16804several convenience Python scripts, including \"classic\" hex2bin and bin2hex
16805converters and more, those based on the library itself.")
16806 (license license:bsd-3)))
34bf6869
CL
16807
16808(define-public python-pykwalify
16809 (package
16810 (name "python-pykwalify")
16811 (version "1.7.0")
16812 (source
16813 (origin
16814 (method url-fetch)
16815 (uri (pypi-uri "pykwalify" version))
16816 (sha256
16817 (base32
16818 "1cnfzkg1b01f825ikpw2fhjclf9c8akxjfrbd1vc22x1lg2kk2vy"))))
16819 (build-system python-build-system)
16820 (arguments '(#:tests? #f)) ;missing dependencies
16821 (propagated-inputs
16822 `(("python-dateutil" ,python-dateutil)
16823 ("python-docopt" ,python-docopt)
16824 ("python-pyyaml" ,python-pyyaml)))
16825 (home-page "https://github.com/grokzen/pykwalify")
16826 (synopsis
16827 "Python lib/cli for JSON/YAML schema validation")
16828 (description
16829 "This package provides a parser, schema validator, and data binding tool
16830for YAML and JSON.")
16831 (license license:expat)))
e2ebbbcc
KK
16832
16833(define-public python-dbusmock
16834 (package
022b0d5f
BG
16835 (name "python-dbusmock")
16836 (version "0.18.3")
16837 (source
16838 (origin
16839 (method url-fetch)
16840 (uri (pypi-uri "python-dbusmock" version))
16841 (sha256
e2ebbbcc 16842 (base32
022b0d5f
BG
16843 "0hp2kyac88nh9iv6l8hlmv7s1sa1s5f1a3wc2pmlmmxnd211fjlr"))))
16844 (build-system python-build-system)
16845 (arguments
16846 '(#:phases
16847 (modify-phases %standard-phases
16848 (add-after 'unpack 'patch-shell-path
16849 (lambda _
16850 (substitute* "tests/test_code.py"
16851 (("/bin/bash") (which "bash")))
16852 #t)))))
16853 (native-inputs
16854 `(;; For tests.
16855 ("dbus" ,dbus) ; for dbus-daemon
16856 ("python-nose" ,python-nose)
16857 ("which" ,which)))
16858 (propagated-inputs
16859 `(("python-dbus" ,python-dbus)
16860 ("python-pygobject" ,python-pygobject)))
16861 (home-page "https://github.com/martinpitt/python-dbusmock")
16862 (synopsis "Python library for mock D-Bus objects")
16863 (description "python-dbusmock allows for the easy creation of mock objects on
e2ebbbcc
KK
16864D-Bus. This is useful for writing tests for software which talks to D-Bus
16865services such as upower, systemd, logind, gnome-session or others, and it is
16866hard (or impossible without root privileges) to set the state of the real
16867services to what you expect in your tests.")
022b0d5f 16868 (license license:lgpl3+)))
b657b23f
BG
16869
16870(define-public python-ujson
16871 (package
16872 (name "python-ujson")
16873 (version "1.35")
16874 (source
16875 (origin
16876 (method url-fetch)
16877 (uri (pypi-uri "ujson" version))
16878 (sha256
16879 (base32
16880 "11jz5wi7mbgqcsz52iqhpyykiaasila4lq8cmc2d54bfa3jp6q7n"))))
16881 (build-system python-build-system)
16882 (home-page "http://www.esn.me")
16883 (synopsis
16884 "Ultra fast JSON encoder and decoder for Python")
16885 (description
16886 "UltraJSON is an ultra fast JSON encoder and decoder written in pure C with
16887 bindings for Python 2.5+ and 3.")
16888 (license license:bsd-3)))
16889
16890(define-public python2-ujson
16891 (package-with-python2 python-ujson))
dbcef44a
MIP
16892
16893(define-public python-iocapture
16894 ;; The latest release is more than a year older than this commit.
16895 (let ((commit "fdc021c431d0840303908dfc3ca8769db383595c")
16896 (revision "1"))
16897 (package
16898 (name "python-iocapture")
16899 (version "0.1.2")
16900 (source
16901 (origin
16902 (method git-fetch)
16903 (uri (git-reference
16904 (url "https://github.com/oinume/iocapture.git")
16905 (commit commit)))
16906 (file-name (git-file-name name version))
16907 (sha256
16908 (base32
16909 "1mkbhqibxvgwg0p7slr8dfraa3g2s6bsayladhax2jccwj4kcndz"))))
16910 (build-system python-build-system)
16911 (arguments
16912 `(#:phases
16913 (modify-phases %standard-phases
16914 (delete 'check)
16915 (add-after 'install 'check
16916 (lambda* (#:key inputs outputs #:allow-other-keys)
16917 (add-installed-pythonpath inputs outputs)
16918 (invoke "py.test" "-v" "tests")
16919 #t)))))
16920 (propagated-inputs
16921 `(("python-flexmock" ,python-flexmock)
16922 ("python-pytest" ,python-pytest)
16923 ("python-pytest-cov" ,python-pytest-cov)
16924 ("python-six" ,python-six)))
16925 (home-page "https://github.com/oinume/iocapture")
16926 (synopsis "Python capturing tool for stdout and stderr")
16927 (description
16928 "This package helps you to capture the standard out (stdout) and the
16929standard error channel (stderr) in your program.")
16930 (license license:expat))))
db6bd842
MIP
16931
16932(define-public python-argh
16933 ;; There are 21 commits since the latest release containing important
16934 ;; improvements.
16935 (let ((commit "dcd3253f2994400a6a58a700c118c53765bc50a4")
16936 (revision "1"))
16937 (package
16938 (name "python-argh")
16939 (version (git-version "0.26.2" revision commit))
16940 (source
16941 (origin
16942 (method git-fetch)
16943 (uri (git-reference
16944 (url "https://github.com/neithere/argh.git")
16945 (commit commit)))
16946 (file-name (git-file-name name version))
16947 (sha256
16948 (base32
16949 "1p5h3dnpbsjmqrvil96s71asc6i3gpinmbrabqmwnrsxprz7r3ns"))))
16950 (build-system python-build-system)
16951 (propagated-inputs
16952 `(("python-iocapture" ,python-iocapture)
16953 ("python-mock" ,python-mock)
16954 ("python-pytest" ,python-pytest)
16955 ("python-pytest-cov" ,python-pytest-cov)
16956 ("python-pytest-xdist" ,python-pytest-xdist)
16957 ("python-tox" ,python-tox)))
16958 (home-page "https://github.com/neithere/argh/")
16959 (synopsis "Argparse wrapper with natural syntax")
16960 (description
16961 "python-argh is a small library that provides several layers of
16962abstraction on top of @code{python-argparse}. The layers can be mixed. It is
16963always possible to declare a command with the highest possible (and least
16964flexible) layer and then tune the behaviour with any of the lower layers
16965including the native API of @code{python-argparse}.")
16966 (license license:lgpl3+))))
073723fa
MIP
16967
16968(define-public python-ppft
16969 (package
16970 (name "python-ppft")
16971 (version "1.6.6.1")
16972 (source
16973 (origin
16974 (method url-fetch)
16975 (uri (pypi-uri "ppft" version))
16976 (sha256
16977 (base32
16978 "1z1invkhszc5d2mvgr221v7cszzifcc77mz0pv3wjp6x5q2768cy"))))
16979 (build-system python-build-system)
16980 (arguments '(#:tests? #f)) ; there are none
16981 (propagated-inputs
16982 `(("python-six" ,python-six)))
16983 (home-page "https://pypi.org/project/ppft/")
16984 (synopsis "Fork of Parallel Python")
16985 (description
16986 "This package is a fork of Parallel Python. The Parallel Python
16987module (@code{pp}) provides an easy and efficient way to create
16988parallel-enabled applications for @dfn{symmetric multiprocessing} (SMP)
16989computers and clusters. It features cross-platform portability and dynamic
16990load balancing.")
16991 (license license:bsd-3)))
8451ea19
MIP
16992
16993(define-public python-pox
16994 (package
16995 (name "python-pox")
16996 (version "0.2.7")
16997 (source
16998 (origin
16999 (method url-fetch)
17000 (uri (pypi-uri "pox" version))
17001 (sha256
17002 (base32
17003 "0y17ckc2p6i6709s279sjdj4q459mpcc38ymg9zv9y6vl6jf3bq6"))))
17004 (build-system python-build-system)
17005 (arguments
17006 `(#:phases
17007 (modify-phases %standard-phases
17008 (replace 'check
17009 (lambda _
17010 (mkdir-p "/tmp/guix")
17011 (setenv "SHELL" "bash")
17012 (setenv "USERNAME" "guix")
17013 (setenv "HOME" "/tmp/guix") ; must end on USERNAME...
17014 (invoke "py.test" "-vv")
17015 #t)))))
17016 (native-inputs
17017 `(("python-pytest" ,python-pytest)
17018 ("which" ,which)))
17019 (home-page "https://pypi.org/project/pox/")
17020 (synopsis "Python utilities for filesystem exploration and automated builds")
17021 (description
17022 "Pox provides a collection of utilities for navigating and manipulating
17023filesystems. This module is designed to facilitate some of the low level
17024operating system interactions that are useful when exploring a filesystem on a
17025remote host. Pox provides Python equivalents of several shell commands such
17026as @command{which} and @command{find}. These commands allow automated
17027discovery of what has been installed on an operating system, and where the
17028essential tools are located.")
17029 (license license:bsd-3)))
7e476ae8
MIP
17030
17031(define-public python-pathos
17032 (package
17033 (name "python-pathos")
17034 (version "0.2.5")
17035 (source
17036 (origin
17037 (method url-fetch)
17038 (uri (pypi-uri "pathos" version))
17039 (sha256
17040 (base32
17041 "0in8hxdz7k081ijn6q94gr39ycy7363sx4zysmbwyvd7snqjrbi1"))))
17042 (build-system python-build-system)
8f82e7e3
EF
17043 (arguments
17044 '(#:phases
17045 (modify-phases %standard-phases
17046 (replace 'check
17047 (lambda _
17048 (setenv "PYTHONPATH"
17049 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
17050 (invoke "python" "./tests/__main__.py"))))))
7e476ae8
MIP
17051 (propagated-inputs
17052 `(("python-dill" ,python-dill)
17053 ("python-multiprocess" ,python-multiprocess)
17054 ("python-pox" ,python-pox)
17055 ("python-ppft" ,python-ppft)))
8f82e7e3
EF
17056 (native-inputs
17057 `(("python-pytest" ,python-pytest)))
7e476ae8
MIP
17058 (home-page "https://pypi.org/project/pathos/")
17059 (synopsis
17060 "Parallel graph management and execution in heterogeneous computing")
17061 (description
17062 "Python-pathos is a framework for heterogenous computing. It provides a
17063consistent high-level interface for configuring and launching parallel
17064computations across heterogenous resources. Python-pathos provides configurable
17065launchers for parallel and distributed computing, where each launcher contains
17066the syntactic logic to configure and launch jobs in an execution environment.")
17067 (license license:bsd-3)))
54e5ee5a
BG
17068
17069(define-public python-flit
17070 (package
17071 (name "python-flit")
17072 (version "2.1.0")
17073 (source
17074 (origin
17075 (method url-fetch)
17076 (uri (pypi-uri "flit" version))
17077 (sha256
17078 (base32
17079 "0h5vvmqinqzn97mr3ix7zx53af9ad4fimjjwqpx88yp8qhz4r5bc"))))
17080 (build-system python-build-system)
17081 (arguments
17082 `(#:tests? #f)) ; XXX: Check requires network access.
17083 (home-page "https://flit.readthedocs.io/")
17084 (synopsis
17085 "Simple packaging tool for simple packages")
17086 (description
17087 "Flit is a simple way to put Python packages and modules on PyPI. Flit
17088packages a single importable module or package at a time, using the import
17089name as the name on PyPI. All subpackages and data files within a package
17090are included automatically.")
17091 (license license:bsd-3)))
02139b42
BG
17092
17093(define-public python-pathtools
17094 (package
17095 (name "python-pathtools")
17096 (version "0.1.2")
17097 (source
17098 (origin
17099 (method url-fetch)
17100 (uri (pypi-uri "pathtools" version))
17101 (sha256
17102 (base32
17103 "1h7iam33vwxk8bvslfj4qlsdprdnwf8bvzhqh3jq5frr391cadbw"))))
17104 (build-system python-build-system)
17105 (home-page
17106 "https://github.com/gorakhargosh/pathtools")
17107 (synopsis "Path utilities for Python")
17108 (description "Pattern matching and various utilities for file systems
17109paths.")
17110 (license license:expat)))
6b520177
JG
17111
17112(define-public python-fastentrypoints
17113 (package
17114 (name "python-fastentrypoints")
17115 (version "0.12")
17116 (source
17117 (origin
17118 (method url-fetch)
17119 (uri (pypi-uri "fastentrypoints" version))
17120 (sha256
17121 (base32
17122 "02s1j8i2dzbpbwgq2a3fiqwm3cnmhii2qzc0k42l0rdxd4a4ya7z"))))
17123 (build-system python-build-system)
17124 (home-page
17125 "https://github.com/ninjaaron/fast-entry_points")
17126 (synopsis
17127 "Makes entry_points specified in setup.py load more quickly")
17128 (description
17129 "Using entry_points in your setup.py makes scripts that start really
17130slowly because it imports pkg_resources. This package allows such setup
17131scripts to load entry points more quickly.")
17132 (license license:bsd-3)))
c5eb8cf8
JG
17133
17134(define-public python-funcparserlib
17135 (package
17136 (name "python-funcparserlib")
17137 (version "0.3.6")
17138 (source
17139 (origin
17140 (method url-fetch)
17141 (uri (pypi-uri "funcparserlib" version))
17142 (sha256
17143 (base32
17144 "07f9cgjr3h4j2m67fhwapn8fja87vazl58zsj4yppf9y3an2x6dp"))))
17145 (native-inputs
17146 `(("python-tox" ,python-tox)))
17147 (arguments
17148 `(#:phases
17149 (modify-phases %standard-phases
17150 (replace 'check
17151 (lambda _
17152 (invoke "tox"))))))
17153 (build-system python-build-system)
17154 (home-page
17155 "https://github.com/vlasovskikh/funcparserlib")
17156 (synopsis
17157 "Recursive descent parsing library based on functional combinators")
17158 (description
11140cf1 17159 "This package is a recursive descent parsing library for Python based on
c5eb8cf8
JG
17160functional combinators. Parser combinators are just higher-order functions
17161that take parsers as their arguments and return them as result values.")
17162 (license license:expat)))
602f3b67
NG
17163
17164(define-public python-speg
17165 (package
17166 (name "python-speg")
17167 (version "0.3")
17168 (source
17169 (origin
17170 (method url-fetch)
17171 (uri (pypi-uri "speg" version ".zip"))
17172 (sha256
17173 (base32 "0w9y4jf4787dzhy6rvhwi0mpl0r8qkqmqmyv2hpwdpv8w53yzjqh"))))
17174 (arguments
17175 `(#:tests? #f)) ;FIXME: tests fail, not sure why
17176 (native-inputs
17177 `(("unzip" ,unzip)))
17178 (build-system python-build-system)
17179 (home-page "https://github.com/avakar/speg")
17180 (synopsis "PEG-based parser interpreter with memoization")
17181 (description "This package is a PEG-based parser and interpreter with
17182memoization.")
17183 (license license:expat)))
07c8177b
NG
17184
17185(define-public python-cson
17186 (package
17187 (name "python-cson")
17188 (version "0.8")
17189 (source
17190 (origin
17191 (method url-fetch)
17192 (uri (pypi-uri "cson" version))
17193 (sha256
17194 (base32 "00cyvigg4npbph39ghkg77xbxisa6plf75vii24igxfizik0337f"))))
17195 (build-system python-build-system)
17196 (propagated-inputs
17197 `(("python-speg" ,python-speg)))
17198 (home-page "https://github.com/avakar/pycson")
17199 (synopsis "Parser for Coffeescript Object Notation (CSON)")
17200 (description "This package is a parser for Coffeescript Object
17201Notation (CSON).")
17202 (license license:expat)))
e24c672e
LDB
17203
17204(define-public python-asynctest
17205 (package
17206 (name "python-asynctest")
17207 (version "0.13.0")
17208 (source
17209 (origin
17210 (method url-fetch)
17211 (uri (pypi-uri "asynctest" version))
17212 (sha256
17213 (base32
17214 "1b3zsy7p84gag6q8ai2ylyrhx213qdk2h2zb6im3xn0m5n264y62"))))
17215 (build-system python-build-system)
17216 (arguments
17217 '(#:phases
17218 (modify-phases %standard-phases
17219 (replace 'check
17220 (lambda _
17221 (invoke "python" "-X" "dev" "-m" "unittest" "-v" "test")))
17222 (add-after 'unpack 'disable-tests
17223 (lambda* _
17224 (substitute* "test/test_selector.py"
17225 ;; XXX: This test fails for unknown reason inside the build
17226 ;; environment.
17227 (("def test_events_watched_outside_test_are_ignored")
17228 "@unittest.skip('disabled by guix')
17229 def test_events_watched_outside_test_are_ignored")))))))
17230 (home-page "https://github.com/Martiusweb/asynctest")
17231 (synopsis "Extension of unittest for testing asyncio libraries")
17232 (description
17233 "The package asynctest is built on top of the standard unittest module
17234and cuts down boilerplate code when testing libraries for asyncio.")
17235 (license license:asl2.0)))
1cc9c38e
LDB
17236
17237(define-public python-aionotify
17238 (package
17239 (name "python-aionotify")
17240 (version "0.2.0")
17241 (source
17242 (origin
17243 ;; Source tarball on PyPi lacks tests
17244 (method git-fetch)
17245 (uri (git-reference
17246 (url "https://github.com/rbarrois/aionotify")
17247 (commit (string-append "v" version))))
17248 (file-name (git-file-name name version))
17249 (sha256
17250 (base32 "1sk9i8czxgsbrswsf1nlb4c82vgnlzi8zrvrxdip92w2z8hqh43y"))))
17251 (build-system python-build-system)
17252 (native-inputs `(("python-asynctest" ,python-asynctest)))
17253 (home-page "https://github.com/rbarrois/aionotify")
17254 (synopsis "Asyncio-powered inotify library")
17255 (description
17256 "@code{aionotify} is a simple, asyncio-based inotify library.")
17257 (license license:bsd-3)))
84efaa3b
LDB
17258
17259(define-public python-forbiddenfruit
17260 (package
17261 (name "python-forbiddenfruit")
17262 (version "0.1.3")
17263 (source
17264 (origin
17265 ;; Source tarball on PyPi lacks Makefile that builds and runs tests
17266 (method git-fetch)
17267 (uri (git-reference
17268 (url "https://github.com/clarete/forbiddenfruit")
17269 (commit version)))
17270 (file-name (git-file-name name version))
17271 (sha256
17272 (base32 "1fp2xvdqpi910j9r3q68x38phpxbm700gjdi2m2j5gs91xdnyyh2"))))
17273 (build-system python-build-system)
17274 (arguments
17275 '(#:phases
17276 (modify-phases %standard-phases
17277 (replace 'check
17278 (lambda _
17279 (invoke "make" "SKIP_DEPS=1"))))))
17280 (native-inputs
17281 `(("python-nose" ,python-nose)
17282 ("python-coverage" ,python-coverage)))
17283 (home-page "https://github.com/clarete/forbiddenfruit")
17284 (synopsis "Patch python built-in objects")
17285 (description "This project allows Python code to extend built-in types.")
17286 (license (list license:gpl3+ license:expat))))
9786258b
LDB
17287
17288(define-public python-shouldbe
17289 (package
17290 (name "python-shouldbe")
17291 (version "0.1.2")
17292 (source
17293 (origin
17294 (method url-fetch)
17295 (uri (pypi-uri "shouldbe" version))
17296 (sha256
17297 (base32
17298 "16zbvjxf71dl4yfbgcr6idyim3mdrfvix1dv8b95p0s9z07372pj"))))
17299 (build-system python-build-system)
17300 (propagated-inputs
17301 `(("python-forbiddenfruit" ,python-forbiddenfruit)))
17302 (native-inputs
17303 `(("python-nose" ,python-nose)))
17304 (home-page "https://github.com/directxman12/should_be")
17305 (synopsis "Python Assertion Helpers inspired by Shouldly")
17306 (description
17307 "Python Assertion Helpers inspired by Shouldly.")
17308 (license license:isc)))
72c2478a
LDB
17309
17310(define-public python-k5test
17311 (package
17312 (name "python-k5test")
17313 (version "0.9.2")
17314 (source
17315 (origin
17316 (method url-fetch)
17317 (uri (pypi-uri "k5test" version))
17318 (sha256
17319 (base32
17320 "1lqp3jgfngyhaxjgj3n230hn90wsylwilh120yjf62h7b1s02mh8"))))
17321 (build-system python-build-system)
17322 (propagated-inputs
17323 `(("python-six" ,python-six)
17324 ;; `which`, `kadmin.local` binaries called inside library
17325 ("which" ,which)
17326 ("mit-krb5" ,mit-krb5)))
17327 (native-inputs `(("mit-krb5" ,mit-krb5)))
17328 (arguments
17329 '(#:phases
17330 (modify-phases %standard-phases
17331 (add-after 'unpack 'patch-paths
17332 (lambda* _
17333 (substitute* "k5test/realm.py"
17334 (("'kadmin_local'") "'kadmin.local'")))))))
17335 (home-page "https://github.com/pythongssapi/k5test")
17336 (synopsis "Library for setting up self-contained Kerberos 5 environments")
17337 (description
17338 "@code{k5test} is a library for setting up self-contained Kerberos 5
17339environments, and running Python unit tests inside those environments. It is
17340based on the file of the same name found alongside the MIT Kerberos 5 unit
17341tests.")
17342 (license license:isc)))
a8ef4978
LDB
17343
17344(define-public python-gssapi
17345 (package
17346 (name "python-gssapi")
17347 (version "1.6.1")
17348 (source
17349 (origin
17350 (method url-fetch)
17351 (uri (pypi-uri "gssapi" version))
17352 (sha256
17353 (base32
17354 "1gymg4asvwrz7y13qpwp2s5g8qwq179d72gkj09q6bfcgs82l5wr"))))
17355 (build-system python-build-system)
17356 (propagated-inputs
17357 `(("python-decorator" ,python-decorator)
17358 ("python-six" ,python-six)))
17359 (inputs
17360 `(("mit-krb5" ,mit-krb5)))
17361 ;; for tests
17362 (native-inputs
17363 `(("python-shouldbe" ,python-shouldbe)
17364 ("python-parameterized" ,python-parameterized)
17365 ("python-k5test" ,python-k5test)
17366 ("python-nose" ,python-nose)))
17367 (home-page "https://github.com/pythongssapi/python-gssapi")
17368 (synopsis "Python GSSAPI Wrapper")
17369 (description
17370 "Python-GSSAPI provides both low-level and high level wrappers around the
17371GSSAPI C libraries. While it focuses on the Kerberos mechanism, it should
17372also be useable with other GSSAPI mechanisms.")
17373 (license license:isc)))
7261bdca
JL
17374
17375(define-public python-check-manifest
17376 (package
17377 (name "python-check-manifest")
17378 (version "0.37")
17379 (source
17380 (origin
17381 (method url-fetch)
17382 (uri (pypi-uri "check-manifest" version))
17383 (sha256
17384 (base32
17385 "0lk45ifdv2cpkl6ayfyix7jwmnxa1rha7xvb0ih5999k115wzqs4"))))
17386 (build-system python-build-system)
17387 (native-inputs
17388 `(("python-mock" ,python-mock)
17389 ("git" ,git)))
17390 (home-page "https://github.com/mgedmin/check-manifest")
17391 (synopsis "Check MANIFEST.in in a Python source package for completeness")
17392 (description "Python package can include a MANIFEST.in file to help with
17393sending package files to the Python Package Index. This package checks that
17394file to ensure it completely and accurately describes your project.")
17395 (license license:expat)))
b487b7b5
JL
17396
17397(define-public python-android-stringslib
17398 (package
17399 (name "python-android-stringslib")
17400 (version "0.1.2")
17401 (source
17402 (origin
17403 (method git-fetch)
17404 (uri (git-reference
17405 (url "https://framagit.org/tyreunom/python-android-strings-lib")
17406 (commit (string-append "v" version))))
17407 (file-name (git-file-name name version))
17408 (sha256
17409 (base32
17410 "0gij55qzzq1h83kfpvhai1vf78kkhyvxa6l17m2nl24454lhfin4"))))
17411 (build-system python-build-system)
17412 (arguments
17413 `(#:tests? #f))
17414 (home-page "https://framagit.org/tyreunom/python-android-strings-lib")
17415 (synopsis "Android strings.xml support")
17416 (description "Android Strings Lib provides support for android's strings.xml
17417files. These files are used to translate strings in android apps.")
17418 (license license:expat)))
87435943 17419
7dec888f
JL
17420(define-public python-watchdog
17421 (package
17422 (name "python-watchdog")
17423 (version "0.9.0")
17424 (source
17425 (origin
17426 (method url-fetch)
17427 (uri (pypi-uri "watchdog" version))
17428 (sha256
17429 (base32
17430 "07cnvvlpif7a6cg4rav39zq8fxa5pfqawchr46433pij0y6napwn"))))
17431 (build-system python-build-system)
17432 (arguments
17433 `(#:phases
17434 (modify-phases %standard-phases
17435 (add-before 'check 'remove-failing
17436 (lambda _
17437 (delete-file "tests/test_inotify_buffer.py")
17438 (delete-file "tests/test_snapshot_diff.py")
17439 #t)))))
17440 (propagated-inputs
17441 `(("python-argh" ,python-argh)
17442 ("python-pathtools" ,python-pathtools)
17443 ("python-pyyaml" ,python-pyyaml)))
17444 (native-inputs
17445 `(("python-pytest-cov" ,python-pytest-cov)
17446 ("python-pytest-timeout" ,python-pytest-timeout)))
17447 (home-page "https://github.com/gorakhargosh/watchdog")
17448 (synopsis "Filesystem events monitoring")
17449 (description "This package provides a way to monitor filesystem events
17450such as a file modification and trigger an action. This is similar to inotify,
17451but portable.")
17452 (license license:asl2.0)))
2cbede59
JL
17453
17454(define-public offlate
17455 (package
17456 (name "offlate")
17457 (version "0.5")
17458 (source
17459 (origin
17460 (method git-fetch)
17461 (uri (git-reference
17462 (url "https://framagit.org/tyreunom/offlate")
17463 (commit version)))
17464 (file-name (git-file-name name version))
17465 (sha256
17466 (base32
17467 "13pqnbl05wcyldfvl75fp89vjgwsvxyc69vhnb17kkha2rc2k1h7"))))
17468 (build-system python-build-system)
17469 (arguments
17470 ;; No tests
17471 `(#:tests? #f))
17472 (propagated-inputs
17473 `(("python-android-stringslib" ,python-android-stringslib)
17474 ("python-dateutil" ,python-dateutil)
17475 ("python-gitlab" ,python-gitlab)
17476 ("python-lxml" ,python-lxml)
17477 ("python-polib" ,python-polib)
17478 ("python-pyenchant" ,python-pyenchant)
17479 ("python-pygit2" ,python-pygit2)
17480 ("python-pygithub" ,python-pygithub)
17481 ("python-pyqt" ,python-pyqt)
17482 ("python-requests" ,python-requests)
17483 ("python-ruamel.yaml" ,python-ruamel.yaml)
17484 ("python-translation-finder" ,python-translation-finder)
17485 ("python-watchdog" ,python-watchdog)))
17486 (native-inputs
17487 `(("qttools" ,qttools)))
17488 (home-page "https://framagit.org/tyreunom/offlate")
17489 (synopsis "Offline translation interface for online translation tools")
17490 (description "Offlate offers a unified interface for different translation
17491file formats, as well as many different online translation platforms. You can
17492use it to get work from online platforms, specialized such as the Translation
17493Project, or not such a gitlab instance when your upstream doesn't use any
17494dedicated platform. The tool proposes a unified interface for any format and
17495an upload option to send your work back to the platform.")
17496 (license license:gpl3+)))
479f4013
JK
17497
17498(define-public python-pypng
17499 (package
17500 (name "python-pypng")
17501 (version "0.0.20")
17502 (source
17503 (origin
17504 (method url-fetch)
17505 (uri (pypi-uri "pypng" version))
17506 (sha256
17507 (base32 "02qpa22ls41vwsrzw9r9qhj1nhq05p03hb5473pay6y980s86chh"))))
17508 (build-system python-build-system)
17509 (home-page "https://github.com/drj11/pypng")
17510 (synopsis "Pure Python PNG image encoder/decoder")
17511 (description
17512 "The PyPNG module implements support for PNG images. It reads and writes
17513PNG files with all allowable bit depths (1/2/4/8/16/24/32/48/64 bits per
17514pixel) and colour combinations: greyscale (1/2/4/8/16 bit); RGB, RGBA,
17515LA (greyscale with alpha) with 8/16 bits per channel; colour mapped
17516images (1/2/4/8 bit). Adam7 interlacing is supported for reading and writing.
17517A number of optional chunks can be specified (when writing) and
17518understood (when reading): tRNS, bKGD, gAMA.
17519
17520PyPNG is not a high level toolkit for image processing (like PIL) and does not
17521aim at being a replacement or competitor. Its strength lies in fine-grained
17522extensive support of PNG features. It can also read and write Netpbm PAM
17523files, with a focus on its use as an intermediate format for implementing
17524custom PNG processing.")
17525 (license license:expat)))