gnu: lxqt-config: Fixing keyboard layout.
[jackhill/guix/guix.git] / gnu / packages / python-xyz.scm
CommitLineData
44d10b1f
RW
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
2d040763 3;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
fa8ffaa0 4;;; Copyright © 2013, 2014, 2015, 2016, 2019 Andreas Enge <andreas@enge.fr>
44d10b1f
RW
5;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
6;;; Copyright © 2014, 2017 Eric Bavier <bavier@member.fsf.org>
7;;; Copyright © 2014, 2015 Federico Beffa <beffa@fbengineering.ch>
8;;; Copyright © 2015 Omar Radwan <toxemicsquire4@gmail.com>
9;;; Copyright © 2015 Pierre-Antoine Rault <par@rigelk.eu>
10;;; Copyright © 2015, 2016, 2017, 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
11;;; Copyright © 2015, 2016 Christopher Allan Webber <cwebber@dustycloud.org>
12;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
13;;; Copyright © 2015, 2016 David Thompson <davet@gnu.org>
b742c006 14;;; Copyright © 2015, 2016, 2017, 2019 Leo Famulari <leo@famulari.name>
44d10b1f
RW
15;;; Copyright © 2015, 2017 Ben Woodcroft <donttrustben@gmail.com>
16;;; Copyright © 2015, 2016 Erik Edrosa <erik.edrosa@gmail.com>
11e46326 17;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
44d10b1f
RW
18;;; Copyright © 2015, 2017 Kyle Meyer <kyle@kyleam.com>
19;;; Copyright © 2015, 2016 Chris Marusich <cmmarusich@gmail.com>
20;;; Copyright © 2016 Danny Milosavljevic <dannym+a@scratchpost.org>
21;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
8581b40d 22;;; Copyright © 2016, 2018-2019 Hartmut Goebel <h.goebel@crazy-compilers.com>
44d10b1f
RW
23;;; Copyright © 2016 Daniel Pimentel <d4n1@d4n1.org>
24;;; Copyright © 2016 Sou Bunnbu <iyzsong@gmail.com>
25;;; Copyright © 2016, 2017 Troy Sankey <sankeytms@gmail.com>
47956fa0 26;;; Copyright © 2016, 2017 ng0 <ng0@n0.is>
44d10b1f
RW
27;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
28;;; Copyright © 2016 David Craven <david@craven.ch>
fd5c264a 29;;; Copyright © 2016, 2017, 2018, 2019, 2020 Marius Bakke <mbakke@fastmail.com>
44d10b1f
RW
30;;; Copyright © 2016, 2017 Stefan Reichör <stefan@xsteve.at>
31;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
e746d1c3 32;;; Copyright © 2016, 2017, 2019 Alex Vong <alexvong1995@gmail.com>
44d10b1f 33;;; Copyright © 2016, 2017, 2018 Arun Isaac <arunisaac@systemreboot.net>
7261bdca 34;;; Copyright © 2016, 2017, 2018, 2020 Julien Lepiller <julien@lepiller.eu>
783d1d40 35;;; Copyright © 2016, 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
44d10b1f
RW
36;;; Copyright © 2016, 2017 Thomas Danckaert <post@thomasdanckaert.be>
37;;; Copyright © 2017 Carlo Zancanaro <carlo@zancanaro.id.au>
38;;; Copyright © 2017 Frederick M. Muriithi <fredmanglis@gmail.com>
39;;; Copyright © 2017, 2018 Adriano Peluso <catonano@gmail.com>
40;;; Copyright © 2017 Ben Sturmfels <ben@sturm.com.au>
a0b2accf 41;;; Copyright © 2017, 2018, 2019 Mathieu Othacehe <m.othacehe@gmail.com>
44d10b1f
RW
42;;; Copyright © 2017 José Miguel Sánchez García <jmi2k@openmailbox.org>
43;;; Copyright © 2017 Roel Janssen <roel@gnu.org>
e2ebbbcc 44;;; Copyright © 2017, 2018, 2019 Kei Kebreau <kkebreau@posteo.net>
44d10b1f
RW
45;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
46;;; Copyright © 2017 Muriithi Frederick Muriuki <fredmanglis@gmail.com>
dcfa0acd 47;;; Copyright © 2017, 2019 Brendan Tildesley <mail@brendan.scot>
44d10b1f
RW
48;;; Copyright © 2018 Ethan R. Jones <ethanrjones97@gmail.com
49;;; Copyright © 2018 Fis Trivial <ybbs.daans@hotmail.com>
50;;; Copyright © 2018 Vijayalakshmi Vedantham <vijimay12@gmail.com>
51;;; Copyright © 2018 Mathieu Lirzin <mthl@gnu.org>
52;;; Copyright © 2018 Adam Massmann <massmannak@gmail.com>
53;;; Copyright © 2016, 2018 Tomáš Čech <sleep_walker@gnu.org>
a2548a3b 54;;; Copyright © 2018, 2019, 2020 Nicolas Goaziou <mail@nicolasgoaziou.fr>
44d10b1f 55;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
85cfb0e9 56;;; Copyright © 2018, 2019 Clément Lassieur <clement@lassieur.org>
4caf37b0 57;;; Copyright © 2018, 2019 Maxim Cournoyer <maxim.cournoyer@gmail.com>
44d10b1f
RW
58;;; Copyright © 2018 Luther Thompson <lutheroto@gmail.com>
59;;; Copyright © 2018 Vagrant Cascadian <vagrant@debian.org>
046dd621 60;;; Copyright © 2019, 2020 Brett Gilio <brettg@gnu.org>
a91f4eba 61;;; Copyright © 2019 Sam <smbaines8@gmail.com>
8c141421 62;;; Copyright © 2019 Jack Hill <jackhill@jackhill.us>
f825e605 63;;; Copyright © 2019 Guillaume Le Vaillant <glv@posteo.net>
fb236fdd 64;;; Copyright © 2019 Alex Griffin <a@ajgrf.com>
edeb04bf 65;;; Copyright © 2019 Pierre Langlois <pierre.langlois@gmx.com>
e308b4f0 66;;; Copyright © 2019 Jacob MacDonald <jaccarmac@gmail.com>
30e7c03a 67;;; Copyright © 2019 Giacomo Leidi <goodoldpaul@autistici.org>
c1bbef69 68;;; Copyright © 2019 Wiktor Żelazny <wzelazny@vurv.cz>
ba42a6bf 69;;; Copyright © 2019 Tanguy Le Carrour <tanguy@bioneland.org>
dbcef44a 70;;; Copyright © 2019 Mădălin Ionel Patrașcu <madalinionel.patrascu@mdc-berlin.de>
479f4013 71;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
44d10b1f
RW
72;;;
73;;; This file is part of GNU Guix.
74;;;
75;;; GNU Guix is free software; you can redistribute it and/or modify it
76;;; under the terms of the GNU General Public License as published by
77;;; the Free Software Foundation; either version 3 of the License, or (at
78;;; your option) any later version.
79;;;
80;;; GNU Guix is distributed in the hope that it will be useful, but
81;;; WITHOUT ANY WARRANTY; without even the implied warranty of
82;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
83;;; GNU General Public License for more details.
84;;;
85;;; You should have received a copy of the GNU General Public License
86;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
87
88(define-module (gnu packages python-xyz)
89 #:use-module ((guix licenses) #:prefix license:)
90 #:use-module (gnu packages)
91 #:use-module (gnu packages algebra)
92 #:use-module (gnu packages adns)
93 #:use-module (gnu packages attr)
94 #:use-module (gnu packages backup)
95 #:use-module (gnu packages bash)
96 #:use-module (gnu packages check)
97 #:use-module (gnu packages compression)
98 #:use-module (gnu packages crypto)
99 #:use-module (gnu packages databases)
f825e605 100 #:use-module (gnu packages dbm)
2cbede59 101 #:use-module (gnu packages enchant)
44d10b1f
RW
102 #:use-module (gnu packages file)
103 #:use-module (gnu packages fontutils)
104 #:use-module (gnu packages gcc)
105 #:use-module (gnu packages geo)
106 #:use-module (gnu packages ghostscript)
107 #:use-module (gnu packages gl)
108 #:use-module (gnu packages glib)
e2ebbbcc 109 #:use-module (gnu packages gnome)
44d10b1f
RW
110 #:use-module (gnu packages graphviz)
111 #:use-module (gnu packages graphics)
112 #:use-module (gnu packages gstreamer)
113 #:use-module (gnu packages gtk)
114 #:use-module (gnu packages icu4c)
115 #:use-module (gnu packages image)
116 #:use-module (gnu packages imagemagick)
72c2478a 117 #:use-module (gnu packages kerberos)
44d10b1f
RW
118 #:use-module (gnu packages libevent)
119 #:use-module (gnu packages libffi)
120 #:use-module (gnu packages linux)
121 #:use-module (gnu packages llvm)
122 #:use-module (gnu packages man)
123 #:use-module (gnu packages maths)
42f0b0c2 124 #:use-module (gnu packages monitoring)
44d10b1f
RW
125 #:use-module (gnu packages multiprecision)
126 #:use-module (gnu packages networking)
127 #:use-module (gnu packages ncurses)
128 #:use-module (gnu packages openstack)
129 #:use-module (gnu packages pcre)
130 #:use-module (gnu packages perl)
131 #:use-module (gnu packages pkg-config)
132 #:use-module (gnu packages python)
d362b11d 133 #:use-module (gnu packages python-check)
15b65617 134 #:use-module (gnu packages python-compression)
44d10b1f 135 #:use-module (gnu packages python-crypto)
ca7c3653 136 #:use-module (gnu packages python-science)
44d10b1f
RW
137 #:use-module (gnu packages python-web)
138 #:use-module (gnu packages qt)
139 #:use-module (gnu packages readline)
140 #:use-module (gnu packages sdl)
141 #:use-module (gnu packages search)
142 #:use-module (gnu packages shells)
9d0c291e 143 #:use-module (gnu packages sphinx)
44d10b1f
RW
144 #:use-module (gnu packages ssh)
145 #:use-module (gnu packages terminals)
146 #:use-module (gnu packages tex)
147 #:use-module (gnu packages texinfo)
148 #:use-module (gnu packages time)
149 #:use-module (gnu packages tls)
150 #:use-module (gnu packages version-control)
151 #:use-module (gnu packages video)
152 #:use-module (gnu packages web)
153 #:use-module (gnu packages base)
154 #:use-module (gnu packages xml)
155 #:use-module (gnu packages xorg)
156 #:use-module (gnu packages xdisorg)
157 #:use-module (gnu packages tcl)
158 #:use-module (gnu packages bdw-gc)
f98232a3 159 #:use-module (gnu packages serialization)
44d10b1f
RW
160 #:use-module (guix packages)
161 #:use-module (guix download)
162 #:use-module (guix git-download)
a042d348 163 #:use-module (guix hg-download)
44d10b1f
RW
164 #:use-module (guix utils)
165 #:use-module (guix build-system gnu)
166 #:use-module (guix build-system cmake)
167 #:use-module (guix build-system python)
168 #:use-module (guix build-system trivial)
169 #:use-module (srfi srfi-1)
170 #:use-module (srfi srfi-26))
171
172(define-public python-psutil
173 (package
174 (name "python-psutil")
e9119ac1 175 (version "5.6.5")
44d10b1f
RW
176 (source
177 (origin
178 (method url-fetch)
179 (uri (pypi-uri "psutil" version))
180 (sha256
e9119ac1 181 (base32 "0isil5jxwwd8awz54qk28rpgjg43i5l6yl70g40vxwa4r4m56lfh"))))
44d10b1f
RW
182 (build-system python-build-system)
183 (arguments
184 ;; FIXME: some tests does not return and times out.
185 '(#:tests? #f))
186 (home-page "https://www.github.com/giampaolo/psutil")
187 (synopsis "Library for retrieving information on running processes")
188 (description
189 "psutil (Python system and process utilities) is a library for retrieving
190information on running processes and system utilization (CPU, memory, disks,
191network) in Python. It is useful mainly for system monitoring, profiling and
192limiting process resources and management of running processes. It implements
193many functionalities offered by command line tools such as: ps, top, lsof,
194netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
195pidof, tty, taskset, pmap.")
196 (properties `((python2-variant . ,(delay python2-psutil))))
197 (license license:bsd-3)))
198
199(define-public python2-psutil
200 (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
201 (package
202 (inherit base)
203 (propagated-inputs
204 `(("python2-enum34" ,python2-enum34) ;optional
205 ,@(package-propagated-inputs base))))))
206
207(define-public python-shapely
208 (package
209 (name "python-shapely")
6d94465b 210 (version "1.6.4.post2")
44d10b1f
RW
211 (source
212 (origin
213 (method url-fetch)
214 (uri (pypi-uri "Shapely" version))
215 (sha256
216 (base32
6d94465b 217 "03r42fmd9alp6r3q95ad6rldq2f7n1wimrw53zy5kpn33yv7pf64"))))
44d10b1f
RW
218 (build-system python-build-system)
219 (native-inputs
220 `(("python-cython" ,python-cython)
221 ("python-matplotlib" ,python-matplotlib)
222 ("python-pytest" ,python-pytest)
223 ("python-pytest-cov" ,python-pytest-cov)))
224 (inputs
225 `(("geos" ,geos)))
226 (propagated-inputs
227 `(("python-numpy" ,python-numpy)))
228 (arguments
229 `(#:phases
230 (modify-phases %standard-phases
231 (add-after 'unpack 'patch-geos-path
232 (lambda* (#:key inputs #:allow-other-keys)
233 (let ((geos (assoc-ref inputs "geos"))
234 (glibc (assoc-ref inputs ,(if (%current-target-system)
235 "cross-libc" "libc"))))
236 (substitute* "shapely/geos.py"
237 (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)")
238 (string-append "_lgeos = load_dll('geos_c', fallbacks=['"
239 geos "/lib/libgeos_c.so'])"))
240 (("free = load_dll\\('c'\\)\\.free")
241 (string-append "free = load_dll('c', fallbacks=['"
242 glibc "/lib/libc.so.6']).free"))))
243 #t)))))
244 (home-page "https://github.com/Toblerity/Shapely")
245 (synopsis "Library for the manipulation and analysis of geometric objects")
246 (description "Shapely is a Python package for manipulation and analysis of
247planar geometric objects. It is based on the @code{GEOS} library.")
248 (license license:bsd-3)))
249
a91f4eba
S
250(define-public python-shortuuid
251 (package
252 (name "python-shortuuid")
253 (version "0.5.0")
254 (source
255 (origin
256 (method url-fetch)
257 (uri (pypi-uri "shortuuid" version))
258 (sha256
259 (base32
260 "1f8i4zwj5vmpzbz6b17bljy4399gx5aq7vsyw63sz2qgyjcd73yh"))))
261 (build-system python-build-system)
262 (native-inputs
263 `(("python-pep8" ,python-pep8)))
264 (home-page "https://github.com/skorokithakis/shortuuid")
265 (synopsis "Generator library for concise, unambiguous and URL-safe UUIDs")
266 (description
267 "@code{shortuuid} is a Python library for generating concise, unambiguous
268and URL-safe UUIDs. UUIDs are generated using the built-in Python @code{uuid}
269module and then similar looking characters are removed.")
270 (license license:bsd-3)))
271
44d10b1f
RW
272(define-public python-logwrap
273 (package
274 (name "python-logwrap")
275 (version "3.2.1")
276 (source
277 (origin
278 (method url-fetch)
279 (uri (pypi-uri "logwrap" version ".zip"))
280 (sha256
281 (base32
282 "1d2k0hvpbi51vl410y8fbs5m0nxnlh2k7gr2nrh3k81ibhzscsra"))))
283 (build-system python-build-system)
284 (propagated-inputs
285 `(("python-six" ,python-six)
286 ("python-typing" ,python-typing)))
287 (native-inputs
288 `(("unzip" ,unzip)
289 ("python-cython" ,python-cython)
290 ("python-pytest" ,python-pytest)
291 ("python-pytest-cov" ,python-pytest-cov)
292 ("python-pytest-runner" ,python-pytest-runner)))
293 (home-page "https://github.com/penguinolog/logwrap")
294 (synopsis "Decorator for logging function arguments")
295 (description "This package provides a decorator to log function arguments
296and function call return values in a human-readable way.")
297 (license license:asl2.0)))
298
299(define-public python2-shapely
300 (package-with-python2 python-shapely))
301
302(define-public python-clyent
303 (package
304 (name "python-clyent")
305 (version "1.2.1")
306 (source
307 (origin
308 (method url-fetch)
309 (uri (pypi-uri "clyent" version))
310 (sha256
311 (base32
312 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
313 (build-system python-build-system)
314 (native-inputs
315 `(("python-mock" ,python-mock)))
316 (home-page "https://github.com/binstar/clyent")
317 (synopsis "Command line client library")
318 (description "Clyent is a Python command line utiliy library. It is used
319by @code{binstar}, @code{binstar-build} and @code{chalmers}.")
320 (license license:bsd-3)))
321
322(define-public python2-clyent
323 (package-with-python2 python-clyent))
324
325(define-public python-babel
326 (package
327 (name "python-babel")
93253411 328 (version "2.7.0")
44d10b1f
RW
329 (source
330 (origin
331 (method url-fetch)
332 (uri (pypi-uri "Babel" version))
333 (sha256
334 (base32
93253411 335 "0a7wawx8vsg7igvz6p3x909fskhg4b2y1910xk4f4c8y22p3aqg8"))))
44d10b1f
RW
336 (build-system python-build-system)
337 (native-inputs
338 `(("python-freezegun" ,python-freezegun)
339 ("python-pytest" ,python-pytest)))
340 (propagated-inputs
341 `(("python-pytz" ,python-pytz)))
342 (arguments
343 `(#:phases (modify-phases %standard-phases
344 (replace 'check
8acd1e90
MB
345 (lambda _
346 (invoke "pytest" "-vv" "-k"
347 (string-append
348 ;; XXX: These tests fail when using Pytest 4.x and
349 ;; Babel 2.6.0. Try removing this for later versions.
350 "not test_no_inherit_metazone_marker_never_in_output"
351 " and not test_smoke_dates"
352 " and not test_smoke_numbers")))))))
44d10b1f
RW
353 (home-page "http://babel.pocoo.org/")
354 (synopsis
355 "Tools for internationalizing Python applications")
356 (description
357 "Babel is composed of two major parts:
358- tools to build and work with gettext message catalogs
359- a Python interface to the CLDR (Common Locale Data Repository), providing
360access to various locale display names, localized number and date formatting,
361etc. ")
362 (license license:bsd-3)))
363
364(define-public python2-babel
365 (package-with-python2 python-babel))
366
93253411
MB
367;; Sphinx < 2.0 requires this version. Remove once no longer needed.
368(define-public python2-babel-2.6
369 (package
370 (inherit python2-babel)
371 (version "2.6.0")
372 (source (origin
373 (method url-fetch)
374 (uri (pypi-uri "Babel" version))
375 (sha256
376 (base32
377 "08rxmbx2s4irp0w0gmn498vns5xy0fagm0fg33xa772jiks51flc"))))))
378
44d10b1f
RW
379(define-public python2-backport-ssl-match-hostname
380 (package
381 (name "python2-backport-ssl-match-hostname")
382 (version "3.5.0.1")
383 (source
384 (origin
385 (method url-fetch)
2c1f0d09 386 (uri (pypi-uri "backports.ssl_match_hostname" version))
44d10b1f
RW
387 (sha256
388 (base32
389 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
390 (build-system python-build-system)
391 (arguments
392 `(#:python ,python-2
393 #:tests? #f)) ; no test target
394 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
395 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
396 (description
397 "This backport brings the ssl.match_hostname() function to users of
398earlier versions of Python. The function checks the hostname in the
399certificate returned by the server to which a connection has been established,
400and verifies that it matches the intended target hostname.")
401 (license license:psfl)))
402
dc827867
TGR
403(define-public python-boolean.py
404 (package
405 (name "python-boolean.py")
406 (version "3.6")
407 (source
408 (origin
409 ;; There's no source tarball on PyPI.
410 (method git-fetch)
411 (uri (git-reference
412 (url "https://github.com/bastikr/boolean.py")
413 (commit (string-append "v" version))))
414 (file-name (git-file-name name version))
415 (sha256
416 (base32 "1wc89y73va58cj7dsx6c199zpxsy9q53dsffsdj6zmc90inqz6qs"))))
417 (build-system python-build-system)
418 (home-page "https://github.com/bastikr/boolean.py")
419 (synopsis "Boolean algebra in one Python module")
420 (description
421 "This is a small Python library that implements boolean algebra.
422It defines two base elements, @code{TRUE} and @code{FALSE}, and a
423@code{Symbol} class that can take on one of these two values. Calculations
424are done only in terms of @code{AND}, @code{OR}, and @code{NOT}---other
425compositions like @code{XOR} and @code{NAND} are emulated on top of them.
426Expressions are constructed from parsed strings or directly in Python.")
427 (license license:bsd-2)))
428
44d10b1f
RW
429(define-public python-hdf4
430 (package
431 (name "python-hdf4")
432 (version "0.9")
433 (source
434 (origin
435 (method url-fetch)
436 (uri (pypi-uri name version))
437 (sha256
438 (base32
439 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
440 (build-system python-build-system)
441 (native-inputs `(("nose" ,python-nose)))
442 (propagated-inputs `(("numpy" ,python-numpy)))
443 (inputs
444 `(("hdf4" ,hdf4)
445 ("libjpeg" ,libjpeg)
446 ("zlib" ,zlib)))
447 (arguments
448 `(#:phases
449 (modify-phases %standard-phases
450 (replace 'check
451 (lambda _
452 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
453 ;; on to import numpy. Somehow this works on their CI system.
454 ;; Let's just manage PYTHONPATH here instead.
455 (substitute* "runexamples.sh"
456 (("export PYTHONPATH=.*") ""))
457 (setenv "PYTHONPATH"
458 (string-append (getcwd) ":"
459 (getenv "PYTHONPATH")))
460 (invoke "./runexamples.sh")
461 (invoke "nosetests" "-v"))))))
462 (home-page "https://github.com/fhs/python-hdf4")
463 (synopsis "Python interface to the NCSA HDF4 library")
464 (description
465 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
466which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
467NetCDF files can also be read and modified. Python-HDF4 is a fork of
468@url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
469 (license license:expat)))
470
471(define-public python2-hdf4
472 (package-with-python2 python-hdf4))
473
474(define-public python-h5py
475 (package
476 (name "python-h5py")
477 (version "2.8.0")
478 (source
479 (origin
480 (method url-fetch)
481 (uri (pypi-uri "h5py" version))
482 (sha256
483 (base32
484 "0mdr6wrq02ac93m1aqx9kad0ppfzmm4imlxqgyy1x4l7hmdcc9p6"))))
485 (build-system python-build-system)
486 (arguments
487 `(#:tests? #f ; no test target
488 #:phases
489 (modify-phases %standard-phases
490 (add-after 'unpack 'fix-hdf5-paths
491 (lambda* (#:key inputs #:allow-other-keys)
492 (let ((prefix (assoc-ref inputs "hdf5")))
493 (substitute* "setup_build.py"
494 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
495 (string-append "['" prefix "/lib" "']"))
496 (("'/opt/local/include', '/usr/local/include'")
497 (string-append "'" prefix "/include" "'")))
498 (substitute* "setup_configure.py"
499 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
500 (string-append "['" prefix "/lib" "']")))
501 #t))))))
502 (propagated-inputs
503 `(("python-six" ,python-six)
504 ("python-numpy" ,python-numpy)))
505 (inputs
506 `(("hdf5" ,hdf5)))
507 (native-inputs
508 `(("python-cython" ,python-cython)
509 ("python-pkgconfig" ,python-pkgconfig)))
510 (home-page "http://www.h5py.org/")
511 (synopsis "Read and write HDF5 files from Python")
512 (description
513 "The h5py package provides both a high- and low-level interface to the
514HDF5 library from Python. The low-level interface is intended to be a
515complete wrapping of the HDF5 API, while the high-level component supports
516access to HDF5 files, datasets and groups using established Python and NumPy
517concepts.")
518 (license license:bsd-3)))
519
520(define-public python2-h5py
521 (package-with-python2 python-h5py))
522
8b89dedc
RW
523(define-public python-sh
524 (package
525 (name "python-sh")
526 (version "1.12.14")
527 (source
528 (origin
529 (method url-fetch)
530 (uri (pypi-uri "sh" version))
531 (sha256
532 (base32
533 "1z2hx357xp3v4cv44xmqp7lli3frndqpyfmpbxf7n76h7s1zaaxm"))))
534 (build-system python-build-system)
fd3638d8
EF
535 (arguments
536 '(#:phases
537 (modify-phases %standard-phases
538 (replace 'check
539 (lambda _
ca983a2f
NG
540 ;; XXX: A Python 2 test fails when HOME=/homeless-shelter.
541 (setenv "HOME" "/tmp")
fd3638d8
EF
542 (invoke "python" "sh.py" "test"))))))
543 (native-inputs
544 `(("python-coverage" ,python-coverage)))
8b89dedc
RW
545 (home-page "https://github.com/amoffat/sh")
546 (synopsis "Python subprocess replacement")
547 (description "This package provides a replacement for Python's
548@code{subprocess} feature.")
549 (license license:expat)))
550
3869effd
RW
551(define-public python2-sh
552 (package-with-python2 python-sh))
553
d362b11d
RW
554(define-public python-cftime
555 (package
556 (name "python-cftime")
da107cf5 557 (version "1.0.4.2")
d362b11d
RW
558 (source
559 (origin
560 (method url-fetch)
561 (uri (pypi-uri "cftime" version))
562 (sha256
da107cf5 563 (base32 "0w0gi6jnch38hiygl62j4xkcirv4y3dcwrvxl9p7bsk6j27lzihs"))))
d362b11d
RW
564 (build-system python-build-system)
565 (propagated-inputs
566 `(("python-numpy" ,python-numpy)))
567 (native-inputs
568 `(("python-coveralls" ,python-coveralls)
569 ("python-cython" ,python-cython)
570 ("python-pytest-cov" ,python-pytest-cov)))
571 (home-page "https://github.com/Unidata/cftime")
572 (synopsis "Library for time handling")
573 (description
574 "This package provides time-handling functionality that used to be part
575of the netcdf4 package before.")
576 ;; This package claims to include code under the GPLv3 but is released
577 ;; under ISC.
578 (license (list license:isc license:gpl3+))))
579
44d10b1f
RW
580(define-public python-netcdf4
581 (package
582 (name "python-netcdf4")
93e7b209 583 (version "1.4.2")
44d10b1f
RW
584 (source
585 (origin
586 (method url-fetch)
587 (uri (pypi-uri "netCDF4" version))
588 (sha256
589 (base32
93e7b209 590 "0c0sklgrmv15ygliin8qq0hp7vanmbi74m6zpi0r1ksr0hssyd5r"))))
44d10b1f 591 (build-system python-build-system)
93e7b209
RW
592 (arguments
593 '(#:phases
594 (modify-phases %standard-phases
595 (add-after 'unpack 'configure-locations
596 (lambda* (#:key inputs #:allow-other-keys)
597 (setenv "HDF5_DIR" (assoc-ref inputs "hdf5"))
598 #t)))))
44d10b1f
RW
599 (native-inputs
600 `(("python-cython" ,python-cython)))
601 (propagated-inputs
93e7b209
RW
602 `(("python-numpy" ,python-numpy)
603 ("python-cftime" ,python-cftime)))
44d10b1f
RW
604 (inputs
605 `(("netcdf" ,netcdf)
606 ("hdf4" ,hdf4)
607 ("hdf5" ,hdf5)))
93e7b209 608 (home-page "https://github.com/Unidata/netcdf4-python")
44d10b1f
RW
609 (synopsis "Python/numpy interface to the netCDF library")
610 (description "Netcdf4-python is a Python interface to the netCDF C
611library. netCDF version 4 has many features not found in earlier
612versions of the library and is implemented on top of HDF5. This module
613can read and write files in both the new netCDF 4 and the old netCDF 3
614format, and can create files that are readable by HDF5 clients. The
615API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
616to users of that module.")
617 ;; The software is mainly ISC, but includes some files covered
618 ;; by the Expat license.
619 (license (list license:isc license:expat))))
620
621(define-public python2-netcdf4
622 (package-with-python2 python-netcdf4))
623
d6803445
TGR
624(define-public python-license-expression
625 (package
626 (name "python-license-expression")
627 (version "0.999")
628 (source
629 (origin
630 (method url-fetch)
631 (uri (pypi-uri "license-expression" version))
632 (sha256
633 (base32 "08ppb0bxbrsxazy88sgpl9yffvdsabw6dkk1nc332wcz2mphwwyf"))))
634 (build-system python-build-system)
635 (propagated-inputs
636 `(("python-boolean.py" ,python-boolean.py)))
637 (home-page "https://github.com/nexB/license-expression")
638 (synopsis "Apply boolean logic to license expressions")
639 (description
640 "This Python module defines a tiny language to evaluate and compare
641license expressions using boolean logic. Logical combinations of licenses can
642be tested for equality, containment, and equivalence. They can be normalised
643and simplified. It supports SPDX license expressions as well as other naming
644conventions and aliases in the same expression.")
645 (license license:gpl2+)))
646
44d10b1f
RW
647(define-public python-lockfile
648 (package
649 (name "python-lockfile")
650 (version "0.12.2")
651 (source
652 (origin
653 (method url-fetch)
8318bf07 654 (uri (pypi-uri "lockfile" version))
44d10b1f
RW
655 (sha256
656 (base32
657 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
658 (build-system python-build-system)
659 (arguments '(#:test-target "check"))
660 (native-inputs
661 `(("python-pbr" ,python-pbr)))
662 (home-page "https://launchpad.net/pylockfile")
663 (synopsis "Platform-independent file locking module")
664 (description
665 "The lockfile package exports a LockFile class which provides a simple
666API for locking files.")
667 (license license:expat)))
668
669(define-public python2-lockfile
670 (package-with-python2 python-lockfile))
671
672(define-public python-semantic-version
673 (package
674 (name "python-semantic-version")
675 (version "2.6.0")
676 (source
677 (origin
678 (method url-fetch)
679 (uri (pypi-uri "semantic_version" version))
680 (sha256
681 (base32
682 "1h2l9xyg1zzsda6kjcmfcgycbvrafwci283vcr1v5sbk01l2hhra"))))
683 (build-system python-build-system)
684 (arguments
685 `(#:tests? #f)) ; PyPI tarball lacks tests
686 (home-page "https://github.com/rbarrois/python-semanticversion")
687 (synopsis "Semantic versioning module for Python")
688 (description
689 "The @code{semantic_version} class is a small library for handling
690@uref{https://semver.org/, semantic versioning} (@dfn{SemVer}) in Python.
691
692It can compare versions, generate a new version that represents a bump in one of
693the version levels, and check whether any given string is a proper semantic
694version identifier.")
695 (license license:bsd-3)))
696
697(define-public python2-semantic-version
698 (package-with-python2 python-semantic-version))
699
700(define-public python-serpent
701 (package
702 (name "python-serpent")
fa9d14ac 703 (version "1.28")
44d10b1f
RW
704 (source
705 (origin
706 (method url-fetch)
707 (uri (pypi-uri "serpent" version))
708 (sha256
fa9d14ac 709 (base32 "1arnckykpkvv2qrp49l1k7q5mr5pisswl0rvdx98x8wsl1n361pk"))))
44d10b1f 710 (build-system python-build-system)
fa9d14ac
TGR
711 (native-inputs
712 `(("python-attrs" ,python-attrs)
713 ("python-pytz" ,python-pytz)))
44d10b1f
RW
714 (home-page "https://github.com/irmen/Serpent")
715 (synopsis "Serializer for literal Python expressions")
716 (description
1d3c7803
TGR
717 "Serpent provides @code{ast.literal_eval()}-compatible object tree
718serialization. It serializes an object tree into bytes (an utf-8 encoded
719string) that can be decoded and then passed as-is to @code{ast.literal_eval()}
720to rebuild the original object tree.
721
722Because only safe literals are encoded, it is safe to send serpent data to
723other machines, such as over the network.")
44d10b1f
RW
724 (license license:expat)))
725
726(define-public python-setuptools
727 (package
728 (name "python-setuptools")
e39d4933 729 (version "41.0.1")
44d10b1f
RW
730 (source
731 (origin
732 (method url-fetch)
733 (uri (pypi-uri "setuptools" version ".zip"))
734 (sha256
735 (base32
e39d4933 736 "04sns22y2hhsrwfy1mha2lgslvpjsjsz8xws7h2rh5a7ylkd28m2"))
44d10b1f
RW
737 (modules '((guix build utils)))
738 (snippet
739 '(begin
740 ;; Remove included binaries which are used to build self-extracting
741 ;; installers for Windows.
742 ;; TODO: Find some way to build them ourself so we can include them.
743 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
744 #t))))
745 (build-system python-build-system)
746 ;; FIXME: Tests require pytest, which itself relies on setuptools.
747 ;; One could bootstrap with an internal untested setuptools.
748 (arguments
749 `(#:tests? #f))
750 (home-page "https://pypi.python.org/pypi/setuptools")
751 (synopsis
752 "Library designed to facilitate packaging Python projects")
753 (description
754 "Setuptools is a fully-featured, stable library designed to facilitate
755packaging Python projects, where packaging includes:
756Python package and module definitions,
757distribution package metadata,
758test hooks,
759project installation,
760platform-specific details,
761Python 3 support.")
762 ;; TODO: setuptools now bundles the following libraries:
763 ;; packaging, pyparsing, six and appdirs. How to unbundle?
764 (license (list license:psfl ; setuptools itself
765 license:expat ; six, appdirs, pyparsing
766 license:asl2.0 ; packaging is dual ASL2/BSD-2
767 license:bsd-2))))
768
769(define-public python2-setuptools
770 (package-with-python2 python-setuptools))
771
0fdec2a3
MB
772;; The setuptools provided by Python 3.7.4 is too new for Tensorflow.
773(define-public python-setuptools-for-tensorflow
774 (hidden-package
775 (package
776 (inherit python-setuptools)
777 (version "39.1.0")
778 (source (origin
779 (inherit (package-source python-setuptools))
780 (uri (pypi-uri "setuptools" version ".zip"))
781 (sha256
782 (base32
783 "1mzdhvfhnv4lggxa8rjl0dzqxvfx377gg5sqs57v89wrp09lwj65")))))))
784
44d10b1f
RW
785(define-public python-uniseg
786 (package
787 (name "python-uniseg")
788 (version "0.7.1")
789 (source
790 (origin
791 (method url-fetch)
792 (uri (pypi-uri "uniseg" version ".zip"))
793 (sha256
794 (base32
795 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
796 (build-system python-build-system)
797 (arguments
798 '(#:tests? #f)) ; The test suite requires network access.
799 (native-inputs
800 `(("unzip" ,unzip)))
801 (home-page
802 "https://bitbucket.org/emptypage/uniseg-python")
803 (synopsis
804 "Python library to determine Unicode text segmentations")
805 (description
806 "Uniseg is a Python package used to determine Unicode text segmentations.
807Supported segmentations include:
808@enumerate
809@item @dfn{Code point} (any value in the Unicode codespace)
810@item @dfn{Grapheme cluster} (user-perceived character made of a single or
811multiple Unicode code points, e.g. \"G\" + acute-accent)
812@item Word break
813@item Sentence break
814@item Line break
815@end enumerate")
816 (license license:expat)))
817
818(define-public python2-uniseg
819 (package-with-python2 python-uniseg))
820
821(define-public python-humanfriendly
822 (package
823 (name "python-humanfriendly")
824 (version "4.4.1")
825 (source
826 (origin
827 (method url-fetch)
828 (uri (pypi-uri "humanfriendly" version))
829 (sha256
830 (base32
831 "0pisgizjql86785jchfjv217g0lsgk114g2lja5j4y3lsc3b9szi"))))
832 (build-system python-build-system)
833 (arguments
834 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
835 #:tests? #f))
836 (propagated-inputs
837 `(("python-monotonic" ,python-monotonic)))
838 (home-page "https://humanfriendly.readthedocs.io")
839 (synopsis "Human-friendly input and output in Python")
840 (description
841 "The functions and classes in @code{humanfriendly} can be used to make
842text interfaces more user-friendly. It includes tools to parse and format
843numbers, file sizes, and timespans, timers for long-running operations, menus
844to allow the user to choose from a list of options, and terminal interaction
845helpers.")
846 (license license:expat)))
847
848(define-public python2-humanfriendly
849 (package-with-python2 python-humanfriendly))
850
851(define-public python-capturer
852 (package
853 (name "python-capturer")
854 (version "2.4")
855 (source
856 (origin
857 (method url-fetch)
858 (uri (pypi-uri "capturer" version))
859 (sha256
860 (base32
861 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
862 (build-system python-build-system)
863 (arguments
864 `(#:tests? #f))
865 (propagated-inputs
866 `(("python-humanfriendly" ,python-humanfriendly)))
867 (home-page "https://capturer.readthedocs.io")
868 (synopsis "Capture stdout and stderr streams of the current process")
869 (description
870 "The capturer package makes it easy to capture the stdout and stderr
871streams of the current process and subprocesses. Output can be relayed
872to the terminal in real time but is also available to the Python program
873for additional processing.")
874 (license license:expat)))
875
876(define-public python2-capturer
877 (package-with-python2 python-capturer))
878
879(define-public python-case
880 (package
881 (name "python-case")
882 (version "1.5.3")
883 (source
884 (origin
885 (method url-fetch)
886 (uri (pypi-uri "case" version))
887 (sha256
888 (base32
889 "1cagg06vfph864s6l5jb0zqliwxh647bki8j6lf4a4qrv40jnhs8"))))
890 (build-system python-build-system)
891 (propagated-inputs
892 `(("python-mock" ,python-mock)
893 ("python-nose" ,python-nose)
894 ("python-six" ,python-six)
895 ("python-unittest2" ,python-unittest2)))
896 (native-inputs
897 `(("python-coverage" ,python-coverage)))
898 (home-page "https://github.com/celery/case")
899 (synopsis "Unittest utilities and convenience methods")
900 (description
901 "The @code{case} package provides utilities on top of unittest, including
902some helpful Python 2 compatibility convenience methods.")
903 (license license:bsd-3)))
904
905(define-public python-verboselogs
906 (package
907 (name "python-verboselogs")
908 (version "1.7")
909 (source
910 (origin
911 (method url-fetch)
912 (uri (pypi-uri "verboselogs" version))
913 (sha256
914 (base32
915 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
916 (build-system python-build-system)
1760c970
MO
917 (arguments
918 `(#:phases
919 (modify-phases %standard-phases
920 (replace 'check
921 (lambda _
922 ;; Do not run pylint plugin test, as astroid is an old
923 ;; unsupported version.
924 (invoke "pytest" "-v" "-k" "not test_pylint_plugin"
925 "verboselogs/tests.py"))))))
44d10b1f
RW
926 (native-inputs
927 `(("python-mock" ,python-mock)
1760c970 928 ("python-pytest" ,python-pytest)))
44d10b1f
RW
929 (home-page "https://verboselogs.readthedocs.io")
930 (synopsis "Verbose logging level for Python's logging module")
931 (description
932 "The @code{verboselogs} package extends Python's @code{logging} module to
933add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
934 (license license:expat)))
935
936(define-public python2-verboselogs
937 (package-with-python2 python-verboselogs))
938
939(define-public python-coloredlogs
940 (package
941 (name "python-coloredlogs")
b2b8a39c 942 (version "10.0")
44d10b1f
RW
943 (source
944 (origin
945 (method url-fetch)
946 (uri (pypi-uri "coloredlogs" version))
947 (sha256
948 (base32
b2b8a39c 949 "0dkw6xp0r1dwgz4s2f58npx5nxfq51wf4l6qkm5ib27slgfs4sdq"))))
44d10b1f
RW
950 (build-system python-build-system)
951 (arguments
952 `(;Tests require some updated modules
953 #:tests? #f))
954 (propagated-inputs
955 `(("python-capturer" ,python-capturer)))
956 (home-page "https://coloredlogs.readthedocs.io")
957 (synopsis "Colored stream handler for Python's logging module")
958 (description
959 "The @code{coloredlogs} package enables colored terminal output for
960Python's logging module. The @code{ColoredFormatter} class inherits from
961@code{logging.Formatter} and uses ANSI escape sequences to render your logging
962messages in color.")
963 (license license:expat)))
964
965(define-public python2-coloredlogs
966 (package-with-python2 python-coloredlogs))
967
af760990
VC
968(define-public python-editorconfig
969 (package
970 (name "python-editorconfig")
971 (version "0.12.2")
972 (source
973 (origin
974 (method url-fetch)
975 (uri (pypi-uri "EditorConfig" version))
976 (sha256
977 (base32
978 "0v55z351p9qkyp3bbspwywwn28sbcknhirngjbj779n3z52z63hv"))))
979 (build-system python-build-system)
980 (home-page "https://editorconfig.org/")
981 (synopsis "EditorConfig bindings for python")
982 (description "The EditorConfig project consists of a file format for
983defining coding styles and a collection of text editor plugins that enable
984editors to read the file format and adhere to defined styles. EditorConfig
985files are easily readable and they work nicely with version control systems.")
986 ;; "fnmatch.py" and "ini.py" are licensed under psfl, the rest is bsd-2.
987 (license (list license:bsd-2 license:psfl))))
988
4caf37b0
MC
989(define-public python-et-xmlfile
990 (package
991 (name "python-et-xmlfile")
992 (version "1.0.1")
993 (source
994 (origin
995 (method url-fetch)
996 (uri (pypi-uri "et_xmlfile" version))
997 (sha256
998 (base32
999 "0nrkhcb6jdrlb6pwkvd4rycw34y3s931hjf409ij9xkjsli9fkb1"))))
1000 (build-system python-build-system)
1001 (arguments
1002 `(#:phases (modify-phases %standard-phases
1003 (replace 'check
1004 (lambda _
1005 (invoke "pytest"))))))
1006 (native-inputs
1007 `(("python-pytest" ,python-pytest)
1008 ("python-lxml" ,python-lxml))) ;used for the tests
1009 (home-page "https://bitbucket.org/openpyxl/et_xmlfile")
1010 (synopsis "Low memory implementation of @code{lxml.xmlfile}")
1011 (description "This Python library is based upon the @code{xmlfile} module
1012from @code{lxml}. It aims to provide a low memory, compatible implementation
1013of @code{xmlfile}.")
1014 (license license:expat)))
1015
1016(define-public python2-et-xmlfile
1017 (package-with-python2 python-et-xmlfile))
1018
a042d348
MC
1019(define-public python-openpyxl
1020 (package
1021 (name "python-openpyxl")
441e6d93 1022 (version "2.6.2")
a042d348
MC
1023 (source
1024 (origin
1025 ;; We use the upstream repository, as the tests are not included in the
1026 ;; PyPI releases.
1027 (method hg-fetch)
1028 (uri (hg-reference
1029 (url "https://bitbucket.org/openpyxl/openpyxl")
1030 (changeset version)))
1031 (file-name (string-append name "-" version "-checkout"))
1032 (sha256
441e6d93 1033 (base32 "1qhij6kcvdxqjy4g6193nsv4q7fy8n4fwyd3c2z047idlm6s3j4w"))))
a042d348
MC
1034 (build-system python-build-system)
1035 (arguments
1036 `(#:phases (modify-phases %standard-phases
1037 (replace 'check
1038 (lambda _
1039 (invoke "pytest"))))))
1040 (native-inputs
1041 ;; For the test suite.
1042 `(("python-lxml" ,python-lxml)
1043 ("python-pillow" ,python-pillow)
1044 ("python-pytest" ,python-pytest)))
1045 (propagated-inputs
1046 `(("python-et-xmlfile" ,python-et-xmlfile)
1047 ("python-jdcal" ,python-jdcal)))
1048 (home-page "https://openpyxl.readthedocs.io")
1049 (synopsis "Python library to read/write Excel 2010 XLSX/XLSM files")
1050 (description "This Python library allows reading and writing to the Excel XLSX, XLSM,
1051XLTX and XLTM file formats that are defined by the Office Open XML (OOXML)
1052standard.")
1053 (license license:expat)))
1054
44d10b1f
RW
1055(define-public python-eventlet
1056 (package
1057 (name "python-eventlet")
c9876c9b 1058 (version "0.25.1")
44d10b1f
RW
1059 (source
1060 (origin
1061 (method url-fetch)
1062 (uri (pypi-uri "eventlet" version))
1063 (sha256
1064 (base32
c9876c9b 1065 "1hgz8jq19wlz8vwqj900ry8cjv578nz4scc91mlc8944yid6573c"))))
44d10b1f
RW
1066 (build-system python-build-system)
1067 (propagated-inputs
1068 `(("python-greenlet" ,python-greenlet)))
1069 (arguments
1070 ;; TODO: Requires unpackaged 'enum-compat'.
1071 '(#:tests? #f))
bff36617 1072 (home-page "https://eventlet.net")
44d10b1f
RW
1073 (synopsis "Concurrent networking library for Python")
1074 (description
1075 "Eventlet is a concurrent networking library for Python that
1076allows you to change how you run your code, not how you write it.
1077It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
1078Coroutines ensure that the developer uses a blocking style of programming
1079that is similar to threading, but provide the benefits of non-blocking I/O.
1080The event dispatch is implicit, which means you can easily use @code{Eventlet}
1081from the Python interpreter, or as a small part of a larger application.")
1082 (license license:expat)))
1083
1084(define-public python2-eventlet
1085 (let ((base (package-with-python2
1086 (strip-python2-variant python-eventlet))))
1087 (package (inherit base)
1088 (propagated-inputs
1089 `(("python2-enum34" ,python2-enum34)
1090 ,@(package-propagated-inputs base))))))
1091
1092(define-public python-six
1093 (package
1094 (name "python-six")
6c58a06e 1095 (version "1.12.0")
44d10b1f
RW
1096 (source
1097 (origin
1098 (method url-fetch)
1099 (uri (pypi-uri "six" version))
1100 (sha256
1101 (base32
6c58a06e 1102 "0wxs1q74v07ssjywbbm7x6h5v9qx209ld2yfsif4060sxi0h2sni"))))
44d10b1f
RW
1103 (build-system python-build-system)
1104 (arguments
1105 `(#:phases
1106 (modify-phases %standard-phases
1107 (replace 'check
1108 (lambda _
1109 (invoke "py.test" "-v"))))))
1110 (native-inputs
1111 `(("python-py" ,python-py)
1112 ("python-pytest" ,python-pytest-bootstrap)))
1113 (home-page "https://pypi.python.org/pypi/six/")
1114 (synopsis "Python 2 and 3 compatibility utilities")
1115 (description
1116 "Six is a Python 2 and 3 compatibility library. It provides utility
1117functions for smoothing over the differences between the Python versions with
1118the goal of writing Python code that is compatible on both Python versions.
1119Six supports every Python version since 2.5. It is contained in only one
1120Python file, so it can be easily copied into your project.")
1121 (license license:x11)))
1122
1123(define-public python2-six
1124 (package-with-python2 python-six))
1125
1126(define-public python-six-bootstrap
1127 (package
1128 (inherit python-six)
1129 (name "python-six-bootstrap")
1130 (native-inputs `())
1131 (arguments `(#:tests? #f))))
1132
1133(define-public python2-six-bootstrap
1134 (package-with-python2 python-six-bootstrap))
1135
1136(define-public python-schedule
1137 (package
1138 (name "python-schedule")
1139 (version "0.4.3")
1140 (source
1141 (origin
1142 (method url-fetch)
1143 (uri (pypi-uri "schedule" version))
1144 (sha256
1145 (base32
1146 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
1147 (build-system python-build-system)
1148 (native-inputs
1149 `(("python-pytest" ,python-pytest)
1150 ("python-mock" ,python-mock)))
1151 (home-page "https://github.com/dbader/schedule")
1152 (synopsis "Schedule periodic function calls in Python")
1153 (description
1154 "Schedule is an in-process scheduler for periodic jobs that uses the
1155builder pattern for configuration. Schedule lets you run Python functions (or
1156any other callable) periodically at pre-determined intervals using a simple,
1157human-friendly syntax.")
1158 (license license:expat)))
1159
1160(define-public python2-schedule
1161 (package-with-python2 python-schedule))
1162
44d10b1f
RW
1163(define-public python2-mechanize
1164 (package
1165 (name "python2-mechanize")
1166 (version "0.2.5")
1167 (source
1168 (origin
1169 (method url-fetch)
1cc184e6 1170 (uri (pypi-uri "mechanize" version))
44d10b1f
RW
1171 (sha256
1172 (base32
1173 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1174 (build-system python-build-system)
1175 (arguments
1176 `(#:python ,python-2 ; apparently incompatible with Python 3
1177 #:tests? #f))
1178 ;; test fails with message
1179 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1180 ;; (python-3.3.2) or
1181 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1182 ;; (python-2.7.5).
1183 ;; The source code is from March 2011 and probably not up-to-date
1184 ;; with respect to python unit tests.
1185 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1186 (synopsis
1187 "Stateful programmatic web browsing in Python")
1188 (description
1189 "Mechanize implements stateful programmatic web browsing in Python,
1190after Andy Lester’s Perl module WWW::Mechanize.")
1191 (license (license:non-copyleft
1192 "file://COPYING"
1193 "See COPYING in the distribution."))))
1194
1195
1196(define-public python-simplejson
1197 (package
1198 (name "python-simplejson")
1199 (version "3.14.0")
1200 (source
1201 (origin
1202 (method url-fetch)
1203 (uri (pypi-uri "simplejson" version))
1204 (sha256
1205 (base32
1206 "1lkv3xlf7ryzi69zqfdbkvpxdfy1rg1rq2yzcnxgf4km5m6difqy"))))
1207 (build-system python-build-system)
1208 (home-page "http://simplejson.readthedocs.org/en/latest/")
1209 (synopsis
1210 "Json library for Python")
1211 (description
1212 "JSON (JavaScript Object Notation) is a subset of JavaScript
1213syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1214format.
1215
1216Simplejson exposes an API familiar to users of the standard library marshal
1217and pickle modules. It is the externally maintained version of the json
1218library contained in Python 2.6, but maintains compatibility with Python 2.5
1219and (currently) has significant performance advantages, even without using
1220the optional C extension for speedups. Simplejson is also supported on
1221Python 3.3+.")
1222 (license license:x11)))
1223
1224(define-public python2-simplejson
1225 (package-with-python2 python-simplejson))
1226
1227
1228(define-public python-pyicu
1229 (package
1230 (name "python-pyicu")
dc23bb45 1231 (version "2.3.1")
44d10b1f
RW
1232 (source
1233 (origin
1234 (method url-fetch)
1235 (uri (pypi-uri "PyICU" version))
1236 (sha256
1237 (base32
dc23bb45 1238 "1x4w8m7ifki9z2a187pgjr33z6z0rp2fii9b73djak1vhm9v9cnx"))))
44d10b1f
RW
1239 (build-system python-build-system)
1240 (inputs
1241 `(("icu4c" ,icu4c)))
1242 (native-inputs
1243 `(("python-pytest" ,python-pytest)
1244 ("python-six" ,python-six)))
1245 (home-page "https://github.com/ovalhub/pyicu")
1246 (synopsis "Python extension wrapping the ICU C++ API")
1247 (description
1248 "PyICU is a python extension wrapping the ICU C++ API.")
1249 (properties `((python2-variant . ,(delay python2-pyicu))))
1250 (license license:x11)))
1251
1252(define-public python2-pyicu
1253 (let ((base (package-with-python2
1254 (strip-python2-variant python-pyicu))))
1255 (package
1256 (inherit base)
1257 (arguments
1258 `(,@(package-arguments base)
1259 #:phases
1260 (modify-phases %standard-phases
1261 (add-before 'check 'delete-failing-test
1262 (λ _
1263 ;; XXX: This fails due to Unicode issues unique to Python 2,
1264 ;; it seems: <https://github.com/ovalhub/pyicu/issues/61>.
1265 (delete-file "test/test_Script.py")
1266 #t))))))))
1267
1268(define-public python2-dogtail
1269 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1270 ;; spaces in indentation" with Python 3.
1271 (package
1272 (name "python2-dogtail")
1273 (version "0.9.9")
1274 (source (origin
1275 (method url-fetch)
1276 (uri (pypi-uri "dogtail" version))
1277 (sha256
1278 (base32
1279 "0p5wfssvzr9w0bvhllzbbd8fnp4cca2qxcpcsc33dchrmh5n552x"))))
1280 (build-system python-build-system)
1281 (arguments `(#:python ,python-2
1282 #:tests? #f)) ; invalid command "test"
1283 ;; Currently no offical homepage.
1284 (home-page "https://pypi.python.org/pypi/dogtail/")
1285 (synopsis "GUI test tool and automation framework written in Python")
1286 (description
1287 "Dogtail is a GUI test tool and automation framework written in Python.
1288It uses Accessibility (a11y) technologies to communicate with desktop
1289applications. dogtail scripts are written in Python and executed like any
1290other Python program.")
1291 (license license:gpl2+)))
1292
1293(define-public python-empy
1294 (package
1295 (name "python-empy")
0f6d5115 1296 (version "3.3.3")
44d10b1f
RW
1297 (source (origin
1298 (method url-fetch)
1299 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1300 version ".tar.gz"))
1301 (sha256
1302 (base32
0f6d5115 1303 "1mxfy5mgp473ga1pgz2nvm8ds6z4g3hdky8523z6jzvcs9ny6hcq"))))
44d10b1f
RW
1304 (build-system python-build-system)
1305 (arguments
0f6d5115 1306 `(#:tests? #f)) ; python2 only
44d10b1f
RW
1307 (home-page "http://www.alcyone.com/software/empy/")
1308 (synopsis "Templating system for Python")
1309 (description
1310 "EmPy is a system for embedding Python expressions and statements in
1311template text; it takes an EmPy source file, processes it, and produces
1312output. This is accomplished via expansions, which are special signals to the
1313EmPy system and are set off by a special prefix (by default the at sign, @@).
1314EmPy can expand arbitrary Python expressions and statements in this way, as
1315well as a variety of special forms. Textual data not explicitly delimited in
1316this way is sent unaffected to the output, allowing Python to be used in
1317effect as a markup language. Also supported are callbacks via hooks,
1318recording and playback via diversions, and dynamic, chainable filters. The
1319system is highly configurable via command line options and embedded
1320commands.")
1321 (license license:lgpl2.1+)))
1322
1323(define-public python2-empy
0f064242
TGR
1324 (let ((base (package-with-python2 (strip-python2-variant python-empy))))
1325 (package
1326 (inherit base)
1327 (arguments `(,@(package-arguments base)
1328 #:tests? #t)))))
44d10b1f
RW
1329
1330(define-public python2-element-tree
1331 (package
1332 (name "python2-element-tree")
1333 (version "1.2.6")
1334 (source (origin
1335 (method url-fetch)
1336 (uri (string-append
1337 "http://effbot.org/media/downloads/elementtree-"
1338 version "-20050316.tar.gz"))
1339 (sha256
1340 (base32
1341 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1342 (build-system python-build-system)
1343 (arguments
1344 `(#:python ,python-2 ; seems to be part of Python 3
1345 #:tests? #f)) ; no 'test' sub-command
1346 (synopsis "Toolkit for XML processing in Python")
1347 (description
1348 "ElementTree is a Python library supporting lightweight XML processing.")
1349 (home-page "http://effbot.org/zone/element-index.htm")
1350 (license (license:x11-style
1351 "http://docs.python.org/2/license.html"
1352 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1353
1354(define-public python2-pybugz
1355 (package
1356 (name "python2-pybugz")
1357 (version "0.6.11")
1358 (source (origin
1359 (method url-fetch)
1360 (uri (string-append
1361 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1362 version ".tar.gz"))
1363 (sha256
1364 (base32
1365 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1366 (patches (search-patches "pybugz-stty.patch"
1367 "pybugz-encode-error.patch"))))
1368 (build-system python-build-system)
1369 (arguments
1370 `(#:python ,python-2 ; SyntaxError with Python 3
1371 #:tests? #f)) ; no 'test' sub-command
1372 (propagated-inputs
1373 `(("element-tree" ,python2-element-tree)))
1374 (synopsis "Python and command-line interface to Bugzilla")
1375 (description
1376 "PyBugz is a Python library and command-line tool to query the Bugzilla
1377bug tracking system. It is meant as an aid to speed up interaction with the
1378bug tracker.")
1379 (home-page "http://www.liquidx.net/pybugz/")
1380 (license license:gpl2)))
1381
1382(define-public python2-enum
1383 (package
1384 (name "python2-enum")
1385 (version "0.4.6")
1386 (source (origin
1387 (method url-fetch)
1388 (uri (pypi-uri "enum" version))
1389 (sha256
1390 (base32
1391 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
1392 (build-system python-build-system)
1393 (arguments
1394 `(#:python ,python-2))
1395 (home-page "http://pypi.python.org/pypi/enum/")
1396 (synopsis "Robust enumerated type support in Python")
1397 (description
1398 "This provides a module for robust enumerations in Python. It has
1399been superseded by the Python standard library and is provided only for
1400compatibility.")
1401 ;; Choice of either license.
1402 (license (list license:gpl3+ license:psfl))))
1403
1404(define-public python-enum34
1405 (package
1406 (name "python-enum34")
1407 (version "1.1.6")
1408 (source
1409 (origin
1410 (method url-fetch)
1411 (uri (pypi-uri "enum34" version))
1412 (sha256
1413 (base32
1414 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
1415 (build-system python-build-system)
1416 (home-page "https://pypi.python.org/pypi/enum34")
1417 (synopsis "Backported Python 3.4 Enum")
1418 (description
1419 "Enum34 is the new Python stdlib enum module available in Python 3.4
1420backported for previous versions of Python from 2.4 to 3.3.")
1421 (license license:bsd-3)))
1422
1423(define-public python2-enum34
1424 (package-with-python2 python-enum34))
1425
1426(define-public python-parse-type
1427 (package
1428 (name "python-parse-type")
1429 (version "0.4.2")
1430 (source
1431 (origin
1432 (method url-fetch)
1433 (uri (pypi-uri "parse_type" version))
1434 (sha256
1435 (base32
1436 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
1437 (build-system python-build-system)
1438 (propagated-inputs
1439 `(("python-six" ,python-six)
1440 ("python-parse" ,python-parse)))
1441 (native-inputs
1442 `(("python-pytest" ,python-pytest)
1443 ("python-pytest-runner" ,python-pytest-runner)))
1444 (home-page "https://github.com/jenisys/parse_type")
1445 (synopsis "Extended parse module")
1446 (description
1447 "Parse_type extends the python parse module.")
1448 (properties
1449 `((python2-variant . ,(delay python2-parse-type))))
1450 (license license:bsd-3)))
1451
1452(define-public python2-parse-type
1453 (let ((base (package-with-python2
1454 (strip-python2-variant python-parse-type))))
1455 (package (inherit base)
1456 (propagated-inputs
1457 `(("python2-enum34" ,python2-enum34)
1458 ,@(package-propagated-inputs base))))))
1459
1460(define-public python-parse
1461 (package
1462 (name "python-parse")
1463 (version "1.8.4")
1464 (source
1465 (origin
1466 (method url-fetch)
1467 (uri (pypi-uri "parse" version))
1468 (sha256
1469 (base32
1470 "0f8997xr8nq2nq35iiviq8ningd1zvy59fg503xfpbi2dwhgdkf3"))))
1471 (build-system python-build-system)
1472 (arguments
1473 `(#:phases
1474 (modify-phases %standard-phases
1475 (replace 'check
1476 (lambda _ (invoke "python" "test_parse.py"))))))
1477 (home-page "https://github.com/r1chardj0n3s/parse")
1478 (synopsis "Parse strings")
1479 (description
1480 "Parse strings using a specification based on the Python @code{format()}
1481syntax.")
1482 (license license:x11)))
1483
1484(define-public python-polib
1485 (package
1486 (name "python-polib")
1487 (version "1.0.8")
1488 (source (origin
1489 (method url-fetch)
1490 (uri (pypi-uri "polib" version))
1491 (sha256
1492 (base32
1493 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1494 (build-system python-build-system)
1495 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1496 (synopsis "Manipulate, create and modify gettext files")
1497 (description "Polib can manipulate any gettext format (po, pot and mo)
1498files. It can be used to create po files from scratch or to modify
1499existing ones.")
1500 (license license:expat)))
1501
1502(define-public python2-polib
1503 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1504 (package
1505 (inherit base)
1506 (arguments `(,@(package-arguments base)
1507 ;; Tests don't work with python2.
1508 #:tests? #f)))))
1509
6830120e
TLC
1510(define-public python-poyo
1511 (package
1512 (name "python-poyo")
1513 (version "0.5.0")
1514 (source
1515 (origin
1516 (method url-fetch)
1517 (uri (pypi-uri "poyo" version))
1518 (sha256
1519 (base32
1520 "1pflivs6j22frz0v3dqxnvc8yb8fb52g11lqr88z0i8cg2m5csg2"))))
1521 (build-system python-build-system)
1522 (home-page "https://github.com/hackebrot/poyo")
1523 (synopsis "Lightweight YAML Parser for Python")
1524 (description
1525 "This package provides a lightweight YAML Parser for Python. It supports
1526only a chosen subset of the YAML format that is required to parse cookiecutter
1527user configuration files. It does not have support for serializing into YAML
1528and is not compatible with JSON.")
1529 (license license:expat)))
1530
44d10b1f
RW
1531(define-public scons
1532 (package
1533 (name "scons")
05487ed8 1534 (version "3.0.4")
44d10b1f 1535 (source (origin
ad34338d
RW
1536 (method git-fetch)
1537 (uri (git-reference
1538 (url "https://github.com/SCons/scons.git")
1539 (commit version)))
1540 (file-name (git-file-name name version))
44d10b1f
RW
1541 (sha256
1542 (base32
05487ed8 1543 "1xy8jrwz87y589ihcld4hv7wn122sjbz914xn8h50ww77wbhk8hn"))))
44d10b1f
RW
1544 (build-system python-build-system)
1545 (arguments
1546 `(#:use-setuptools? #f ; still relies on distutils
ad34338d
RW
1547 #:tests? #f ; no 'python setup.py test' command
1548 #:phases
1549 (modify-phases %standard-phases
1550 (add-before 'build 'bootstrap
1551 (lambda _
1552 (substitute* "src/engine/SCons/compat/__init__.py"
1553 (("sys.modules\\[new\\] = imp.load_module\\(old, \\*imp.find_module\\(old\\)\\)")
1554 "sys.modules[new] = __import__(old)"))
05487ed8
RW
1555 (substitute* "src/engine/SCons/Platform/__init__.py"
1556 (("mod = imp.load_module\\(full_name, file, path, desc\\)")
1557 "mod = __import__(full_name)"))
ad34338d
RW
1558 (invoke "python" "bootstrap.py" "build/scons" "DEVELOPER=guix")
1559 (chdir "build/scons")
1560 #t)))))
44d10b1f
RW
1561 (home-page "http://scons.org/")
1562 (synopsis "Software construction tool written in Python")
1563 (description
1564 "SCons is a software construction tool. Think of SCons as an improved,
1565cross-platform substitute for the classic Make utility with integrated
1566functionality similar to autoconf/automake and compiler caches such as ccache.
1567In short, SCons is an easier, more reliable and faster way to build
1568software.")
1569 (license license:x11)))
1570
1571(define-public scons-python2
1572 (package
1573 (inherit (package-with-python2 scons))
1574 (name "scons-python2")))
1575
1576(define-public python-extras
1577 (package
1578 (name "python-extras")
1579 (version "1.0.0")
1580 (source
1581 (origin
1582 (method url-fetch)
1583 (uri (pypi-uri "extras" version))
1584 (sha256
1585 (base32
1586 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
1587 (build-system python-build-system)
1588 (arguments
1589 ;; FIXME: Circular dependency on testtools.
1590 '(#:tests? #f))
1591 (home-page "https://github.com/testing-cabal/extras")
1592 (synopsis "Useful extensions to the Python standard library")
1593 (description
1594 "Extras is a set of extensions to the Python standard library.")
1595 (license license:expat)))
1596
1597(define-public python2-extras
1598 (package-with-python2 python-extras))
1599
1600(define-public python-mimeparse
1601 (package
1602 (name "python-mimeparse")
1603 (version "1.6.0")
1604 (source
1605 (origin
1606 (method url-fetch)
89bf667c 1607 (uri (pypi-uri "python-mimeparse" version))
44d10b1f
RW
1608 (sha256
1609 (base32
1610 "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n"))))
1611 (build-system python-build-system)
1612 (arguments
1613 '(#:phases
1614 (modify-phases %standard-phases
1615 (replace 'check
1616 (lambda _
1617 (invoke "./mimeparse_test.py"))))))
1618 (home-page
1619 "https://github.com/dbtsai/python-mimeparse")
1620 (synopsis "Python library for parsing MIME types")
1621 (description
1622 "Mimeparse provides basic functions for parsing MIME type names and
1623matching them against a list of media-ranges.")
1624 (license license:expat)))
1625
1626(define-public python2-mimeparse
1627 (package-with-python2 python-mimeparse))
1628
1629(define-public python-miniboa
1630 (package
1631 (name "python-miniboa")
1632 (version "1.0.7")
1633 (source
1634 (origin
1635 (method url-fetch)
1636 (uri (pypi-uri "miniboa" version))
1637 (sha256
1638 (base32
1639 "09jh3pn4rh7kh7jayanf8jzy6gp03791b5a193w6148cf3i6k9m3"))))
1640 (build-system python-build-system)
1641 (home-page "https://github.com/shmup/miniboa")
1642 (synopsis "Simple, single-threaded Telnet server")
1643 (description
1644 "Miniboa is a simple, asynchronous, single-threaded, poll-based Telnet
1645server.")
1646 (license license:asl2.0)))
1647
1648(define-public python2-miniboa
1649 (package-with-python2 python-miniboa))
1650
1651(define-public python-pafy
1652 (package
1653 (name "python-pafy")
1654 (version "0.5.3.1")
1655 (source
1656 (origin
1657 (method url-fetch)
1658 (uri (pypi-uri "pafy" version))
1659 (sha256
1660 (base32
1661 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
1662 (build-system python-build-system)
1663 (arguments
1664 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
1665 (propagated-inputs
1666 ;; Youtube-dl is a python package which is imported in the file
1667 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1668 `(("youtube-dl" ,youtube-dl)))
1669 (home-page "https://np1.github.io/pafy/")
1670 (synopsis "Retrieve YouTube content and metadata")
1671 (description
1672 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1673 (license license:lgpl3+)))
1674
1675(define-public python2-funcsigs
1676 (package
1677 (name "python2-funcsigs")
1678 (version "1.0.2")
1679 (source (origin
1680 (method url-fetch)
1681 (uri (pypi-uri "funcsigs" version))
1682 (sha256
1683 (base32
1684 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
1685 (build-system python-build-system)
1686 (arguments
1687 `(#:python ,python-2))
1688 (native-inputs
1689 `(("python2-unittest2" ,python2-unittest2)))
1690 (home-page "http://funcsigs.readthedocs.org")
1691 (synopsis "Python function signatures from PEP362")
1692 (description
1693 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
1694 (license license:asl2.0)))
1695
1696(define-public python2-funcsigs-bootstrap
1697 (package
1698 (inherit python2-funcsigs)
1699 (name "python2-funcsigs-bootstrap")
1700 (native-inputs `())
1701 (arguments
1702 `(#:tests? #f
1703 ,@(package-arguments python2-funcsigs)))))
1704
1705(define-public python-py
1706 (package
1707 (name "python-py")
08eba545 1708 (version "1.8.0")
44d10b1f
RW
1709 (source
1710 (origin
1711 (method url-fetch)
1712 (uri (pypi-uri "py" version))
1713 (sha256
1714 (base32
08eba545 1715 "0lsy1gajva083pzc7csj1cvbmminb7b4l6a0prdzyb3fd829nqyw"))))
44d10b1f
RW
1716 (build-system python-build-system)
1717 (arguments
1718 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1719 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1720 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1721 ;; Is this module globally installed?"
1722 '(#:tests? #f))
1723 (native-inputs
1724 `(("python-setuptools-scm" ,python-setuptools-scm)))
1725 (home-page "https://github.com/pytest-dev/py")
1726 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1727 (description
1728 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1729code introspection, and logging.")
1730 (license license:expat)))
1731
1732(define-public python2-py
1733 (package-with-python2 python-py))
1734
1735;; Recent versions of python-fixtures and python-testrepository need
1736;; python-pbr for packaging, which itself needs these two packages for
1737;; testing.
1738;; To fix this circular dependency, we use a build of python-pbr, based on the
1739;; same source, just without any test dependencies and with tests disabled.
1740;; python-pbr-minmal is then used to package python-fixtures and
1741;; python-testrepository.
1742;; Strictly speaking we currently could remove the test-requirements from the
1743;; normal python-pbr package (and save this package) since test are disabled
1744;; there anyway. But this may change in future.
1745(define-public python-pbr-minimal
1746 (package
1747 (name "python-pbr-minimal")
1748 (version "3.0.1")
1749 (source
1750 (origin
1751 (method url-fetch)
1752 (uri (pypi-uri "pbr" version))
1753 (sha256
1754 (base32
1755 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
1756 (build-system python-build-system)
1757 (arguments
1758 `(#:tests? #f))
1759 (home-page "http://docs.openstack.org/developer/pbr/")
1760 (synopsis "Minimal build of python-pbr used for bootstrapping")
1761 (description
1762 "Used only for bootstrapping python2-pbr, you should not need this.")
1763 (license license:asl2.0)))
1764
1765(define-public python2-pbr-minimal
1766 (package-with-python2 python-pbr-minimal))
1767
1768(define-public python-pbr
1769 (package
1770 (inherit python-pbr-minimal)
1771 (name "python-pbr")
1772 (arguments
1773 `(#:tests? #f)) ;; Most tests seem to use the Internet.
1774 (propagated-inputs
1775 `(("git" ,git))) ;; pbr actually uses the "git" binary.
1776 (native-inputs
1777 `(("python-fixtures" ,python-fixtures-bootstrap)
1778 ;; discover, coverage, hacking, subunit
1779 ("python-mock" ,python-mock)
1780 ("python-six" ,python-six)
1781 ("python-sphinx" ,python-sphinx)
1782 ("python-testrepository" ,python-testrepository-bootstrap)
1783 ("python-testresources" ,python-testresources-bootstrap)
1784 ("python-testscenarios" ,python-testscenarios-bootstrap)
1785 ("python-testtools" ,python-testtools-bootstrap)
1786 ("python-virtualenv" ,python-virtualenv)))
1787 (synopsis "Enhance the default behavior of Python’s setuptools")
1788 (description
1789 "Python Build Reasonableness (PBR) is a library that injects some useful
1790and sensible default behaviors into your setuptools run. It will set
1791versions, process requirements files and generate AUTHORS and ChangeLog file
1792from git information.
1793")))
1794
1795(define-public python2-pbr
1796 (package-with-python2 python-pbr))
1797
ea43f0d5
MB
1798(define-public python-pyrsistent
1799 (package
1800 (name "python-pyrsistent")
1801 (version "0.14.11")
1802 (home-page "https://github.com/tobgu/pyrsistent")
1803 (source (origin
1804 (method url-fetch)
1805 (uri (pypi-uri "pyrsistent" version))
1806 (sha256
1807 (base32
1808 "1qkh74bm296mp5g3r11lgsksr6bh4w1bf8pji4nmxdlfj542ga1w"))))
1809 (build-system python-build-system)
1810 (native-inputs
1811 `(("python-hypothesis" ,python-hypothesis)
1812 ("python-pytest" ,python-pytest)
1813 ("python-pytest-runner" ,python-pytest-runner)))
1814 (propagated-inputs
1815 `(("python-six" ,python-six)))
1816 (synopsis "Persistent data structures for Python")
1817 (description
1818 "Pyrsistent is a number of persistent collections (by some referred to as
1819functional data structures). Persistent in the sense that they are immutable.
1820
1821All methods on a data structure that would normally mutate it instead return a
1822new copy of the structure containing the requested updates. The original
1823structure is left untouched.")
1824 (license license:expat)))
1825
1826(define-public python2-pyrsistent
1827 (package-with-python2 python-pyrsistent))
1828
44d10b1f
RW
1829(define-public python-exif-read
1830 (package
1831 (name "python-exif-read")
1832 (version "2.1.2")
1833 (source (origin
1834 (method url-fetch)
1835 (uri (pypi-uri "ExifRead" version))
1836 (sha256
1837 (base32
1838 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
1839 (build-system python-build-system)
1840 (arguments `(#:tests? #f)) ; no tests
1841 (home-page "https://github.com/ianare/exif-py")
1842 (synopsis "Python library to extract EXIF data from image files")
1843 (description
1844 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
1845files.")
1846 (license license:bsd-3)))
1847
1848(define-public python2-exif-read
1849 (package-with-python2 python-exif-read))
1850
1851(define-public python-pyld
1852 (package
1853 (name "python-pyld")
6d4ed78d 1854 (version "1.0.5")
44d10b1f
RW
1855 (source (origin
1856 (method url-fetch)
1857 (uri (pypi-uri "PyLD" version))
1858 (sha256
1859 (base32
6d4ed78d 1860 "1ywbdbsrkg533qh8xn9ifjh2mvam6v5msrjyqq73jfpvcp89qvff"))))
44d10b1f
RW
1861 (build-system python-build-system)
1862 (home-page "https://github.com/digitalbazaar/pyld")
1863 (synopsis "Python implementation of the JSON-LD specification")
1864 (description
1865 "PyLD is an implementation of the JSON-LD specification.")
1866 (license license:bsd-3)))
1867
1868(define-public python2-pyld
1869 (package-with-python2 python-pyld))
1870
1871(define-public python-click
1872 (package
1873 (name "python-click")
61984855 1874 (version "7.0")
44d10b1f
RW
1875 (source
1876 (origin
1877 (method url-fetch)
1878 (uri (pypi-uri "click" version))
1879 (sha256
1880 (base32
61984855 1881 "1mzjixd4vjbjvzb6vylki9w1556a9qmdh35kzmq6cign46av952v"))))
44d10b1f
RW
1882 (build-system python-build-system)
1883 (arguments
8d7e7ca6 1884 `(#:phases
44d10b1f
RW
1885 (modify-phases %standard-phases
1886 (add-after 'unpack 'fix-paths
1887 (lambda* (#:key inputs #:allow-other-keys)
1888 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
1889 "cross-libc" "libc"))))
1890 (substitute* "click/_unicodefun.py"
1891 (("'locale'")
1892 (string-append "'" glibc "/bin/locale'"))))
8d7e7ca6
EF
1893 #t))
1894 (replace 'check
1895 (lambda _
1896 (invoke "python" "-m" "pytest"))))))
44d10b1f
RW
1897 (native-inputs
1898 `(("python-pytest" ,python-pytest)))
61984855 1899 (home-page "https://palletsprojects.com/p/click/")
44d10b1f
RW
1900 (synopsis "Command line library for Python")
1901 (description
1902 "Click is a Python package for creating command line interfaces in a
1903composable way with as little code as necessary. Its name stands for
1904\"Command Line Interface Creation Kit\". It's highly configurable but comes
1905with sensible defaults out of the box.")
1906 (license license:bsd-3)))
1907
1908(define-public python2-click
1909 (package-with-python2 python-click))
1910
1911(define-public python-wheel
1912 (package
1913 (name "python-wheel")
8f137daf 1914 (version "0.33.6")
44d10b1f
RW
1915 (source
1916 (origin
1917 (method url-fetch)
1918 (uri (pypi-uri "wheel" version))
1919 (sha256
1920 (base32
8f137daf 1921 "0ii6f34rvpjg3nmw4bc2h7fhdsy38y1h93hghncfs5akfrldmj8h"))))
44d10b1f 1922 (build-system python-build-system)
8f137daf
MB
1923 (arguments
1924 ;; FIXME: The test suite runs "python setup.py bdist_wheel", which in turn
1925 ;; fails to find the newly-built bdist_wheel library, even though it is
1926 ;; available on PYTHONPATH. What search path is consulted by setup.py?
1927 '(#:tests? #f))
44d10b1f
RW
1928 (home-page "https://bitbucket.org/pypa/wheel/")
1929 (synopsis "Format for built Python packages")
1930 (description
1931 "A wheel is a ZIP-format archive with a specially formatted filename and
1932the @code{.whl} extension. It is designed to contain all the files for a PEP
1933376 compatible install in a way that is very close to the on-disk format. Many
1934packages will be properly installed with only the @code{Unpack} step and the
1935unpacked archive preserves enough information to @code{Spread} (copy data and
1936scripts to their final locations) at any later time. Wheel files can be
1937installed with a newer @code{pip} or with wheel's own command line utility.")
8f137daf 1938 (license license:expat)))
44d10b1f
RW
1939
1940(define-public python2-wheel
8f137daf 1941 (package-with-python2 python-wheel))
44d10b1f
RW
1942
1943(define-public python-vcversioner
1944 (package
1945 (name "python-vcversioner")
1946 (version "2.16.0.0")
1947 (source
1948 (origin
1949 (method url-fetch)
1950 (uri (pypi-uri "vcversioner" version))
1951 (sha256
1952 (base32
1953 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
1954 (build-system python-build-system)
1955 (synopsis "Python library for version number discovery")
1956 (description "Vcversioner is a Python library that inspects tagging
1957information in a variety of version control systems in order to discover
1958version numbers.")
1959 (home-page "https://github.com/habnabit/vcversioner")
1960 (license license:isc)))
1961
1962(define-public python2-vcversioner
1963 (package-with-python2 python-vcversioner))
1964
5591fc4f
MC
1965(define-public python-jdcal
1966 (package
1967 (name "python-jdcal")
1968 (version "1.4")
1969 (source
1970 (origin
1971 (method url-fetch)
1972 (uri (pypi-uri "jdcal" version))
1973 (sha256
1974 (base32
1975 "1ja6j2xq97bsl6rv09mhdx7n0xnrsfx0mj5xqza0mxghqmkm02pa"))))
1976 (build-system python-build-system)
1977 (arguments
1978 `(#:phases (modify-phases %standard-phases
1979 (replace 'check
1980 (lambda _
1981 (invoke "pytest"))))))
1982 (native-inputs
1983 `(("python-pytest" ,python-pytest)))
1984 (home-page "https://github.com/phn/jdcal")
1985 (synopsis "Functions to convert between Julian dates Gregorian dates")
1986 (description "This Python library provides functions for converting
1987between Julian dates and Gregorian dates.")
1988 (license license:bsd-2)))
1989
1990(define-public python2-jdcal
1991 (package-with-python2 python-jdcal))
1992
44d10b1f
RW
1993(define-public python-jsonschema
1994 (package
1995 (name "python-jsonschema")
1adde06e 1996 (version "3.0.1")
44d10b1f
RW
1997 (source (origin
1998 (method url-fetch)
786ccb87 1999 (uri (pypi-uri "jsonschema" version))
44d10b1f
RW
2000 (sha256
2001 (base32
1adde06e 2002 "03g20i1xfg4qdlk4475pl4pp7y0h37g1fbgs5qhy678q9xb822hc"))))
44d10b1f
RW
2003 (build-system python-build-system)
2004 (arguments
2005 '(#:phases
2006 (modify-phases %standard-phases
1adde06e
MB
2007 (replace 'check
2008 (lambda _
2009 (setenv "PYTHONPATH" (string-append ".:" (getenv "PYTHONPATH")))
2010 (invoke "trial" "jsonschema"))))))
44d10b1f 2011 (native-inputs
1adde06e
MB
2012 `(("python-setuptools_scm" ,python-setuptools-scm)
2013 ("python-twisted" ,python-twisted)))
2014 (propagated-inputs
2015 `(("python-attrs" ,python-attrs)
2016 ("python-pyrsistent" ,python-pyrsistent)
2017 ("python-six" ,python-six)))
44d10b1f
RW
2018 (home-page "https://github.com/Julian/jsonschema")
2019 (synopsis "Implementation of JSON Schema for Python")
2020 (description
2021 "Jsonschema is an implementation of JSON Schema for Python.")
2022 (license license:expat)
2023 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2024
2025(define-public python2-jsonschema
2026 (let ((jsonschema (package-with-python2
2027 (strip-python2-variant python-jsonschema))))
2028 (package (inherit jsonschema)
44d10b1f 2029 (propagated-inputs
1adde06e
MB
2030 `(("python2-functools32" ,python2-functools32)
2031 ,@(package-propagated-inputs jsonschema))))))
44d10b1f 2032
914bba28
TGR
2033;; This old version is still required by docker-compose as of 1.24.0.
2034(define-public python-jsonschema-2.6
2035 (package
2036 (name "python-jsonschema")
2037 (version "2.6.0")
2038 (source (origin
2039 (method url-fetch)
2040 (uri (pypi-uri "jsonschema" version))
2041 (sha256
2042 (base32
2043 "00kf3zmpp9ya4sydffpifn0j0mzm342a2vzh82p6r0vh10cg7xbg"))))
2044 (build-system python-build-system)
2045 (arguments
2046 '(#:phases
2047 (modify-phases %standard-phases
2048 (replace 'check (lambda _ (invoke "nosetests"))))))
2049 (native-inputs
2050 `(("python-nose" ,python-nose)
2051 ("python-vcversioner" ,python-vcversioner)))
2052 (home-page "https://github.com/Julian/jsonschema")
2053 (synopsis "Implementation of JSON Schema for Python")
2054 (description
2055 "Jsonschema is an implementation of JSON Schema for Python.")
2056 (license license:expat)
2057 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2058
44d10b1f
RW
2059(define-public python-schema
2060 (package
2061 (name "python-schema")
2062 (version "0.6.6")
2063 (source
2064 (origin
2065 (method url-fetch)
2066 (uri (pypi-uri "schema" version))
2067 (sha256
2068 (base32
2069 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
2070 (build-system python-build-system)
2071 (native-inputs
2072 `(("python-pytest" ,python-pytest)))
2073 (home-page "https://github.com/keleshev/schema")
2074 (synopsis "Simple data validation library")
2075 (description
2076 "@code{python-schema} is a library for validating Python data
2077structures, such as those obtained from config-files, forms, external
2078services or command-line parsing, converted from JSON/YAML (or
2079something else) to Python data-types.")
2080 (license license:psfl)))
2081
2082(define-public python2-schema
2083 (package-with-python2 python-schema))
2084
2085(define-public python-schema-0.5
2086 (package (inherit python-schema)
2087 (version "0.5.0")
2088 (source
2089 (origin
2090 (method url-fetch)
2091 (uri (pypi-uri "schema" version))
2092 (sha256
2093 (base32
2094 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
2095
2096(define-public python2-schema-0.5
2097 (package-with-python2 python-schema-0.5))
2098
2099(define-public python-kitchen
2100 (package
2101 (name "python-kitchen")
2102 (version "1.2.5")
2103 (source
2104 (origin
2105 (method url-fetch)
2106 (uri (pypi-uri "kitchen" version))
2107 (sha256
2108 (base32
2109 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
2110 (build-system python-build-system)
2111 (propagated-inputs
2112 `(("python-chardet" ,python-chardet)))
2113 (home-page "https://github.com/fedora-infra/kitchen")
2114 (synopsis "Python API for snippets")
2115 (description "@code{kitchen} module provides a python API for all sorts of
2116little useful snippets of code that everybody ends up writing for their projects
2117but never seem big enough to build an independent release. Use kitchen and stop
2118cutting and pasting that code over and over.")
2119 (license (list license:lgpl2.1+
2120 ;; subprocess.py, test_subprocess.py,
2121 ;; kitchen/pycompat25/defaultdict.py:
2122 license:psfl))))
2123
2124(define-public python2-kitchen
2125 (package-with-python2 python-kitchen))
2126
2127(define-public python-unidecode
2128 (package
2129 (name "python-unidecode")
eb80a300 2130 (version "1.1.1")
44d10b1f
RW
2131 (source (origin
2132 (method url-fetch)
2133 (uri (pypi-uri "Unidecode" version))
2134 (sha256
2135 (base32
eb80a300 2136 "1s6cp2lv4m0f00hjckjz8p6m7d3n3v16jvg353llf5ia1iqsnsib"))))
44d10b1f
RW
2137 (build-system python-build-system)
2138 (home-page "https://pypi.python.org/pypi/Unidecode")
2139 (synopsis "ASCII transliterations of Unicode text")
2140 (description
2141 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2142useful when integrating with legacy code that doesn't support Unicode, or for
2143ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2144machine identifiers from human-readable Unicode strings that should still be
2145somewhat intelligible.")
2146 (license license:gpl2+)))
2147
2148(define-public python2-unidecode
2149 (package-with-python2 python-unidecode))
2150
2151(define-public python-pyjwt
2152 (package
2153 (name "python-pyjwt")
be6f2f56 2154 (version "1.7.1")
44d10b1f
RW
2155 (source
2156 (origin
2157 (method url-fetch)
2158 (uri (pypi-uri "PyJWT" version))
2159 (sha256
2160 (base32
be6f2f56 2161 "15hflax5qkw1v6nssk1r0wkj83jgghskcmn875m3wgvpzdvajncd"))
44d10b1f
RW
2162 (modules '((guix build utils)))
2163 (snippet
2164 '(begin
2165 (for-each delete-file-recursively
2166 (find-files "." "\\.pyc$"))
2167 #t))))
2168 (build-system python-build-system)
2169 (native-inputs
2170 `(("python-pytest" ,python-pytest)
2171 ("python-pytest-cov" ,python-pytest-cov)
2172 ("python-pytest-runner" ,python-pytest-runner)))
2173 (home-page "https://github.com/progrium/pyjwt")
2174 (synopsis "JSON Web Token implementation in Python")
2175 (description
2176 "PyJWT is a JSON Web Token implementation written in Python.")
2177 (license license:expat)))
2178
2179(define-public python2-pyjwt
2180 (package-with-python2 python-pyjwt))
2181
2182(define-public python-pykka
2183 (package
2184 (name "python-pykka")
2185 (version "1.2.1")
2186 (source
2187 (origin
2188 (method url-fetch)
2189 (uri (pypi-uri "Pykka" version))
2190 (sha256
2191 (base32
2192 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
2193 (build-system python-build-system)
2194 (native-inputs
2195 `(("python-mock" ,python-mock)
2196 ("python-nose" ,python-nose)
2197 ("python-gevent" ,python-gevent)
2198 ("python-eventlet" ,python-eventlet)))
2199 (home-page "https://www.pykka.org/")
2200 (synopsis "Pykka is a Python implementation of the actor model")
2201 (description
2202 "Pykka is a Python implementation of the actor model.
2203The actor model introduces some simple rules to control the sharing
2204of state and cooperation between execution units, which makes it
2205easier to build concurrent applications.")
2206 (license license:asl2.0)))
2207
2208(define-public python2-pykka
2209 (package-with-python2 python-pykka))
2210
8d22f7e3
VC
2211(define-public python-pymsgbox
2212 (package
2213 (name "python-pymsgbox")
2214 (version "1.0.6")
2215 (source
2216 (origin
2217 (method git-fetch)
2218 (uri (git-reference
2219 ;; LICENSE.txt is not present on pypi
2220 (url "https://github.com/asweigart/PyMsgBox")
2221 (commit "55926b55f46caa969c5ddb87990ebea2737bd66f")))
2222 (file-name (git-file-name name version))
2223 (sha256
2224 (base32
2225 "0zy7rjfpwlrd8b64j7jk2lb8m2npc21rnpwakpfvwgl4nxdy80rg"))))
2226 (arguments
2227 ;; Circular dependency to run tests:
2228 ;; Tests need pyautogui, which depends on pymsgbox.
2229 '(#:tests? #f))
2230 (build-system python-build-system)
2231 (home-page "https://github.com/asweigart/PyMsgBox")
2232 (synopsis "Python module for JavaScript-like message boxes")
2233 (description
2234 "PyMsgBox is a simple, cross-platform, pure Python module for
2235JavaScript-like message boxes. Types of dialog boxes include:
2236@enumerate
2237@item alert
2238@item confirm
2239@item prompt
2240@item password
2241@end enumerate
2242")
2243 (license license:bsd-3)))
2244
44d10b1f
RW
2245(define-public python-pympler
2246 (package
2247 (name "python-pympler")
2248 (home-page "https://pythonhosted.org/Pympler/")
6469af6f 2249 (version "0.8")
44d10b1f
RW
2250 (source (origin
2251 (method url-fetch)
2252 (uri (pypi-uri "Pympler" version))
2253 (sha256
2254 (base32
6469af6f 2255 "08mrpnb6cv2nvfncvr8a9a8bpwhnasa924anapnjvnaw5jcd4k7p"))))
44d10b1f
RW
2256 (build-system python-build-system)
2257 (arguments
2258 `(#:phases (modify-phases %standard-phases
2259 (delete 'check)
2260 (add-after 'install 'check
2261 (lambda* (#:key inputs outputs #:allow-other-keys)
2262 (add-installed-pythonpath inputs outputs)
2263 (invoke "python" "setup.py" "test"))))))
2264 (synopsis "Measure, monitor and analyze memory behavior")
2265 (description
2266 "Pympler is a development tool to measure, monitor and analyze
2267the memory behavior of Python objects in a running Python application.
2268
2269By pympling a Python application, detailed insight in the size and the
2270lifetime of Python objects can be obtained. Undesirable or unexpected
2271runtime behavior like memory bloat and other @samp{pymples} can easily
2272be identified.
2273
2274A web profiling frontend exposes process statistics, garbage
2275visualisation and class tracker statistics.")
2276 (license license:asl2.0)))
2277
2278(define-public python2-pympler
2279 (package-with-python2 python-pympler))
2280
2281(define-public python-itsdangerous
2282 (package
2283 (name "python-itsdangerous")
acfcf2ed 2284 (version "1.1.0")
44d10b1f
RW
2285 (source
2286 (origin
2287 (method url-fetch)
acfcf2ed 2288 (uri (pypi-uri "itsdangerous" version))
44d10b1f
RW
2289 (sha256
2290 (base32
acfcf2ed 2291 "068zpbksq5q2z4dckh2k1zbcq43ay74ylqn77rni797j0wyh66rj"))))
44d10b1f 2292 (build-system python-build-system)
acfcf2ed 2293 (home-page "https://palletsprojects.com/p/itsdangerous/")
44d10b1f
RW
2294 (synopsis "Python library for passing data to/from untrusted environments")
2295 (description
2296 "Itsdangerous provides various helpers to pass trusted data to untrusted
2297environments and back.")
2298 (license license:bsd-3)))
2299
2300(define-public python2-itsdangerous
2301 (package-with-python2 python-itsdangerous))
2302
2303(define-public python-pyyaml
2304 (package
2305 (name "python-pyyaml")
2306 (version "3.13")
2307 (source
2308 (origin
2309 (method url-fetch)
2310 (uri (pypi-uri "PyYAML" version))
2311 (sha256
2312 (base32
2313 "1gx603g484z46cb74j9rzr6sjlh2vndxayicvlyhxdz98lhhkwry"))))
2314 (build-system python-build-system)
2315 (inputs
2316 `(("libyaml" ,libyaml)))
2317 (home-page "http://pyyaml.org/wiki/PyYAML")
2318 (synopsis "YAML parser and emitter for Python")
2319 (description
2320 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2321complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2322API, and sensible error messages. PyYAML supports standard YAML tags and
2323provides Python-specific tags that allow to represent an arbitrary Python
2324object.")
2325 (license license:expat)))
2326
2327(define-public python2-pyyaml
2328 (package-with-python2 python-pyyaml))
2329
2330(define-public python-vine
2331 (package
2332 (name "python-vine")
2333 (version "1.1.4")
2334 (source
2335 (origin
2336 (method url-fetch)
2337 (uri (pypi-uri "vine" version))
2338 (sha256
2339 (base32
2340 "0wkskb2hb494v9gixqnf4bl972p4ibcmxdykzpwjlfa5picns4aj"))))
2341 (build-system python-build-system)
2342 (native-inputs
2343 `(("python-pytest" ,python-pytest)
2344 ("python-case" ,python-case)))
2345 (home-page "https://github.com/celery/vine")
2346 (synopsis "Promises for Python")
2347 (description
2348 "@code{vine} provides a special implementation of promises in that it can
2349be used both for \"promise of a value\" and lazy evaluation. The biggest
2350upside for this is that everything in a promise can also be a promise,
2351e.g. filters, callbacks and errbacks can all be promises.")
2352 (license license:bsd-3)))
2353
2354(define-public python-virtualenv
2355 (package
2356 (name "python-virtualenv")
2782bd51 2357 (version "16.1.0")
44d10b1f
RW
2358 (source
2359 (origin
2360 (method url-fetch)
2361 (uri (pypi-uri "virtualenv" version))
2362 (sha256
2363 (base32
2782bd51 2364 "0242cg3hdq3qdvx5flyrki8lpwlgwf5k45c21ks5049fv7ygm6gq"))))
44d10b1f
RW
2365 (build-system python-build-system)
2366 (arguments
2367 `(#:phases
2368 (modify-phases %standard-phases
2782bd51 2369 (add-before 'check 'disable-failing-test
44d10b1f
RW
2370 (lambda _
2371 ;; Disable failing test. See upstream bug report
2372 ;; https://github.com/pypa/virtualenv/issues/957
2373 (substitute* "tests/test_virtualenv.py"
2374 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2782bd51 2375 #t)))))
44d10b1f
RW
2376 (native-inputs
2377 `(("python-mock" ,python-mock)
2378 ("python-pytest" ,python-pytest)))
2379 (home-page "https://virtualenv.pypa.io/")
2380 (synopsis "Virtual Python environment builder")
2381 (description
2382 "Virtualenv is a tool to create isolated Python environments.")
2383 (license license:expat)))
2384
2385(define-public python2-virtualenv
2386 (package-with-python2 python-virtualenv))
2387
2388(define-public python-markupsafe
2389 (package
2390 (name "python-markupsafe")
753eb411 2391 (version "1.1.1")
44d10b1f
RW
2392 (source
2393 (origin
2394 (method url-fetch)
5182927c 2395 (uri (pypi-uri "MarkupSafe" version))
44d10b1f
RW
2396 (sha256
2397 (base32
753eb411 2398 "0sqipg4fk7xbixqd8kq6rlkxj664d157bdwbh93farcphf92x1r9"))))
44d10b1f 2399 (build-system python-build-system)
753eb411
MB
2400 (arguments
2401 `(#:modules ((ice-9 ftw)
2402 (srfi srfi-1)
2403 (srfi srfi-26)
2404 (guix build utils)
2405 (guix build python-build-system))
2406 #:phases (modify-phases %standard-phases
2407 (replace 'check
2408 (lambda _
2409 (let ((cwd (getcwd))
2410 (libdir (find (cut string-prefix? "lib." <>)
2411 (scandir "build"))))
2412 (setenv "PYTHONPATH"
2413 (string-append cwd "/build/" libdir ":"
2414 (getenv "PYTHONPATH")))
2415 (invoke "pytest" "-vv")))))))
2416 (native-inputs
2417 `(("python-pytest" ,python-pytest)))
44d10b1f
RW
2418 (home-page "https://github.com/mitsuhiko/markupsafe")
2419 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2420 (description
2421 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2422for Python.")
2423 (license license:bsd-3)))
2424
2425(define-public python2-markupsafe
2426 (package-with-python2 python-markupsafe))
2427
2428(define-public python-jinja2
2429 (package
2430 (name "python-jinja2")
4a5c7934 2431 (version "2.10.1")
44d10b1f
RW
2432 (source
2433 (origin
2434 (method url-fetch)
2435 (uri (pypi-uri "Jinja2" version))
2436 (sha256
2437 (base32
4a5c7934 2438 "04shqrs56aj04ipyqykj512rw2l0zfammvj9krawzxz7xc14yp06"))))
44d10b1f
RW
2439 (build-system python-build-system)
2440 (propagated-inputs
2441 `(("python-markupsafe" ,python-markupsafe)))
2442 (home-page "http://jinja.pocoo.org/")
2443 (synopsis "Python template engine")
2444 (description
2445 "Jinja2 is a small but fast and easy to use stand-alone template engine
2446written in pure Python.")
2447 (license license:bsd-3)))
2448
2449(define-public python2-jinja2
2450 (package-with-python2 python-jinja2))
2451
ba42a6bf
TLC
2452(define-public python-jinja2-time
2453 (package
2454 (name "python-jinja2-time")
2455 (version "0.2.0")
2456 (source
2457 (origin
2458 (method url-fetch)
2459 (uri (pypi-uri "jinja2-time" version))
2460 (sha256
2461 (base32
2462 "0h0dr7cfpjnjj8bgl2vk9063a53649pn37wnlkd8hxjy656slkni"))))
2463 (build-system python-build-system)
2464 (propagated-inputs
2465 `(("python-arrow" ,python-arrow)
2466 ("python-jinja2" ,python-jinja2)))
2467 (home-page
2468 "https://github.com/hackebrot/jinja2-time")
2469 (synopsis "Jinja2 Extension for Dates and Times")
2470 (description
2471 "This package provides an extension for the template engine Jinja2. It
2472adds a 'now' tag providing a convenient access to the arrow.now() API from
2473templates. A format string can be provided to control the output.")
2474 (license license:expat)))
2475
44d10b1f
RW
2476(define-public python-pystache
2477 (package
2478 (name "python-pystache")
2479 (version "0.5.4")
2480 (source (origin
2481 (method url-fetch)
2482 (uri (pypi-uri "pystache" version))
2483 (sha256
2484 (base32
2485 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2486 (build-system python-build-system)
2487 (arguments
2488 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
2489 (home-page "http://defunkt.io/pystache/")
2490 (synopsis "Python logic-less template engine")
2491 (description
2492 "Pystache is a Python implementation of the framework agnostic,
2493logic-free templating system Mustache.")
2494 (license license:expat)
2495 (properties `((python2-variant . ,(delay python2-pystache))))))
2496
2497(define-public python2-pystache
2498 (package (inherit (package-with-python2
2499 (strip-python2-variant python-pystache)))
2500 (arguments
2501 `(#:python ,python-2
2502 #:phases
2503 (modify-phases %standard-phases
2504 (replace 'check
2505 (lambda _
dfafc29b 2506 (invoke "python" "test_pystache.py"))))))))
44d10b1f
RW
2507
2508(define-public python-joblib
2509 (package
2510 (name "python-joblib")
2511 (version "0.13.0")
2512 (source (origin
2513 (method url-fetch)
2514 (uri (pypi-uri "joblib" version))
2515 (sha256
2516 (base32
2517 "0612nazad8dxmn3xghfrmjax6456l4xy6hn9cngs7vydi14ds7v5"))))
2518 (build-system python-build-system)
2519 (arguments
2520 `(#:phases
2521 (modify-phases %standard-phases
2522 (replace 'check
2523 (lambda _ (invoke "pytest" "-v" "joblib"))))))
2524 (native-inputs
2525 `(("python-pytest" ,python-pytest)))
2526 (home-page "https://joblib.readthedocs.io/")
2527 (synopsis "Using Python functions as pipeline jobs")
2528 (description
2529 "Joblib is a set of tools to provide lightweight pipelining in Python.
2530In particular, joblib offers: transparent disk-caching of the output values
2531and lazy re-evaluation (memoize pattern), easy simple parallel computing
2532logging and tracing of the execution.")
2533 (license license:bsd-3)))
2534
2535(define-public python2-joblib
2536 (package-with-python2 python-joblib))
2537
a3363341
VC
2538(define-public python-daemon
2539 (package
2540 (name "python-daemon")
2541 (version "2.2.3")
2542 (source
2543 (origin
2544 (method url-fetch)
2545 (uri (pypi-uri "python-daemon" version))
2546 (sha256
2547 (base32
2548 "09fcjdjzk9ywmpnrj62iyxqgcygzdafsz41qlrk2dknzbagcmzmg"))))
2549 (build-system python-build-system)
2550 (arguments
2551 `(#:phases
2552 (modify-phases %standard-phases
2553 (add-before 'check 'disable-tests
2554 (lambda _
2555 ;; FIXME: Determine why test fails
2556 (substitute* "test/test_daemon.py"
2557 (("test_detaches_process_context")
2558 "skip_test_detaches_process_context"))
2559 #t)))))
2560 (propagated-inputs
2561 `(("python-lockfile" ,python-lockfile)))
2562 (native-inputs
2563 `(("python-unittest2" ,python-unittest2)
2564 ("python-testtools" ,python-testtools)
2565 ("python-testscenarios" ,python-testscenarios)
2566 ("python-mock" ,python-mock)
2567 ("python-docutils" ,python-docutils)))
2568 (home-page "https://pagure.io/python-daemon/")
2569 (synopsis "Python library for making a Unix daemon process")
2570 (description "Python-daemon is a library that assists a Python program to
2571turn itself into a well-behaved Unix daemon process, as specified in PEP 3143.
2572
2573This library provides a @code{DaemonContext} class that manages the following
2574important tasks for becoming a daemon process:
2575@enumerate
2576@item Detach the process into its own process group.
2577@item Set process environment appropriate for running inside a chroot.
2578@item Renounce suid and sgid privileges.
2579@item Close all open file descriptors.
2580@item Change the working directory, uid, gid, and umask.
2581@item Set appropriate signal handlers.
2582@item Open new file descriptors for stdin, stdout, and stderr.
2583@item Manage a specified PID lock file.
2584@item Register cleanup functions for at-exit processing.
2585@end enumerate")
2586 ;; Only setup.py is gpl3+, everything else is apache 2.0 licensed.
2587 (license (list license:asl2.0 license:gpl3+))))
2588
544ea9c2
MB
2589(define-public python-anytree
2590 (package
2591 (name "python-anytree")
2592 (version "2.8.0")
2593 (source (origin
2594 (method url-fetch)
2595 (uri (pypi-uri "anytree" version))
2596 (sha256
2597 (base32
2598 "1aycpc387wqz7h9w2p53qxn43qsh3m6by6ak4kkc66x9aprr63rz"))))
2599 (build-system python-build-system)
2600 (propagated-inputs
2601 `(("python-six" ,python-six)))
2602 (native-inputs
2603 `(;; For tests.
2604 ("graphviz" ,graphviz) ;for 'dot'
2605 ("python-nose" ,python-nose)))
2606 (home-page "https://github.com/c0fec0de/anytree")
2607 (synopsis "Lightweight tree data library")
2608 (description
2609 "@code{anytree} is a simple, lightweight, and extensible tree data
2610structure for Python.")
2611 (license license:asl2.0)))
2612
44d10b1f
RW
2613(define-public python-docutils
2614 (package
2615 (name "python-docutils")
2616 (version "0.14")
2617 (source
2618 (origin
2619 (method url-fetch)
2620 (uri (pypi-uri "docutils" version))
2621 (sha256
2622 (base32
2623 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))
2624 (build-system python-build-system)
2625 (arguments
2626 '(#:tests? #f)) ; no setup.py test command
2627 (home-page "http://docutils.sourceforge.net/")
2628 (synopsis "Python Documentation Utilities")
2629 (description
2630 "Docutils is a modular system for processing documentation into useful
2631formats, such as HTML, XML, and LaTeX. For input Docutils supports
2632reStructuredText.")
2633 ;; Most of the source code is public domain, but some source files are
2634 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
2635 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
2636
2637(define-public python2-docutils
2638 (package-with-python2 python-docutils))
2639
2640(define-public python-pygments
2641 (package
2642 (name "python-pygments")
69002b21 2643 (version "2.5.2")
44d10b1f
RW
2644 (source
2645 (origin
2646 (method url-fetch)
2647 (uri (pypi-uri "Pygments" version))
2648 (sha256
2649 (base32
69002b21 2650 "1zmhnswy0wxfn0xprs9aqsvx2c3kmzfn2wx14q8cv3vpkxdamj4q"))))
44d10b1f
RW
2651 (build-system python-build-system)
2652 (arguments
2653 ;; FIXME: Tests require sphinx, which depends on this.
2654 '(#:tests? #f))
69002b21 2655 (home-page "https://pygments.org/")
44d10b1f
RW
2656 (synopsis "Syntax highlighting")
2657 (description
2658 "Pygments is a syntax highlighting package written in Python.")
2659 (license license:bsd-2)))
2660
2661(define-public python2-pygments
2662 (package-with-python2 python-pygments))
2663
0f0a5ef9
MC
2664(define-public python-bumpversion
2665 (package
2666 (name "python-bumpversion")
2667 (version "0.5.3")
2668 (source
2669 (origin
2670 (method url-fetch)
2671 (uri (pypi-uri "bumpversion" version))
2672 (sha256
2673 (base32
2674 "0zn7694yfipxg35ikkfh7kvgl2fissha3dnqad2c5bvsvmrwhi37"))))
2675 (build-system python-build-system)
2676 (home-page "https://github.com/peritus/bumpversion")
2677 (synopsis "Tool to bump software version")
2678 (description "This tool provides a command-line interface (CLI) to bump a
2679software version simply.")
2680 (license license:expat)))
2681
b24fd2c2
MC
2682(define-public python-deprecated
2683 (package
2684 (name "python-deprecated")
2685 (version "1.2.5")
2686 (source
2687 (origin
2688 (method git-fetch)
2689 (uri (git-reference
2690 (url "https://github.com/tantale/deprecated.git")
2691 (commit (string-append "v" version))))
2692 (file-name (git-file-name name version))
2693 (sha256
2694 (base32
2695 "14909glxxwwc4b9qpz2b9jdriwzi5n65ichw85xqppap5f79wcwz"))))
2696 (build-system python-build-system)
2697 (arguments
2698 `(#:phases (modify-phases %standard-phases
2699 (replace 'check
2700 (lambda _
2701 (invoke "pytest"))))))
2702 (propagated-inputs
2703 `(("python-wrapt" ,python-wrapt)))
2704 (native-inputs
2705 `(("python-bumpversion" ,python-bumpversion)
2706 ("python-pytest" ,python-pytest)
2707 ("python-pytest-cov" ,python-pytest-cov)
2708 ("python-sphinx" ,python-sphinx)
2709 ("python-tox" ,python-tox)))
2710 (home-page "https://github.com/tantale/deprecated")
2711 (synopsis "Python decorator to deprecate classes, functions or methods")
2712 (description "The @code{deprecated} decorator provides a convenient way to deprecate
2713to deprecate classes, functions or methods.")
2714 (license license:expat)))
2715
d5a998fa
MC
2716(define-public python-pygithub
2717 (package
2718 (name "python-pygithub")
749e38d7 2719 (version "1.43.8")
d5a998fa
MC
2720 (source
2721 ;; We fetch from the Git repo because there are no tests in the PyPI
2722 ;; archive.
2723 (origin
2724 (method git-fetch)
2725 (uri (git-reference
2726 (url "https://github.com/PyGithub/PyGithub.git")
2727 (commit (string-append "v" version))))
2728 (file-name (git-file-name name version))
2729 (sha256
749e38d7 2730 (base32 "1625v558xga5mwhl9jqmibywy5qafmg1vqrirqz6zfq1la1d22mw"))))
d5a998fa
MC
2731 (build-system python-build-system)
2732 (arguments
2733 `(#:phases (modify-phases %standard-phases
2734 ;; Some tests rely on the network.
2735 (add-after 'unpack 'disable-failing-tests
2736 (lambda _
2737 (substitute* "tests/Issue142.py"
2738 (("testDecodeJson") "disabled_testDecodeJson"))
2739 #t))
2740 (add-before 'check 'prepare-for-tests
2741 (lambda _
2742 (for-each (lambda (f)
2743 (chmod f #o666))
2744 (find-files "./tests"))
2745 (system* "python" "-m" "lib2to3" "-w" "-n" "tests")
2746 (setenv "PYTHONPATH"
2747 (string-append "./tests:" (getenv "PYTHONPATH")))
2748 #t)))))
2749 (propagated-inputs
2750 `(("python-deprecated" ,python-deprecated)
2751 ("python-pyjwt" ,python-pyjwt)
2752 ("python-requests" ,python-requests)))
2753 (native-inputs `(("python-httpretty" ,python-httpretty)))
2754 (home-page "https://pygithub.readthedocs.io/en/latest/")
2755 (synopsis "Python library for the GitHub API")
2756 (description "This library allows managing GitHub resources such as
2757repositories, user profiles, and organizations in your Python applications,
2758using version 3 of the GitHub application programming interface (API).")
2759 (license license:lgpl3+)))
2760
c0c0bb38
MC
2761(define-public python-rellu
2762 (package
2763 (name "python-rellu")
2764 (version "0.7")
2765 (source
2766 (origin
2767 (method url-fetch)
2768 (uri (pypi-uri "rellu" version))
2769 (sha256
2770 (base32
2771 "1w0arpj1sm7vh29nrbnca4pnp8sx42l07r17inwqcjjf9bhng66x"))))
2772 (build-system python-build-system)
2773 (propagated-inputs
2774 `(("python-invoke" ,python-invoke)
2775 ("python-pygithub" ,python-pygithub)))
2776 (home-page "https://github.com/robotframework/rellu")
2777 (synopsis "Utilities to create PyPI releases")
2778 (description "This collection of utilities contains tooling and templates
2779to assist in creating releases on GitHub and publishing them on PyPI. It is
2780designed to be used by Robot Framework and tools and libraries in its
2781ecosystem, but can naturally be used also by other projects.")
2782 (license license:asl2.0)))
2783
b9790285
MC
2784(define-public python-robotframework
2785 (package
2786 (name "python-robotframework")
1710b8f8 2787 (version "3.1.2")
b9790285
MC
2788 ;; There are no tests in the PyPI archive.
2789 (source
2790 (origin
2791 (method git-fetch)
2792 (uri (git-reference
2793 (url "https://github.com/robotframework/robotframework.git")
2794 (commit (string-append "v" version))))
2795 (file-name (git-file-name name version))
2796 (sha256
1710b8f8 2797 (base32 "16gnxy0qinh8fhs0qvhff5z2xh49c3cqgm0d7bfjw120df6x7fym"))
b9790285
MC
2798 (patches (search-patches
2799 "python-robotframework-honor-source-date-epoch.patch"))))
2800 (build-system python-build-system)
2801 (arguments
2802 `(#:phases (modify-phases %standard-phases
2803 (add-before 'build 'build-and-install-doc
2804 (lambda* (#:key outputs #:allow-other-keys)
2805 (let* ((doc-output (assoc-ref outputs "doc"))
2806 (doc (string-append doc-output "/share/"
2807 ,name "-" ,version "/")))
2808 (invoke "invoke" "library-docs" "all")
2809 (mkdir-p doc)
2810 (copy-recursively "doc/libraries"
2811 (string-append doc "/libraries"))
2812 #t)))
2813 (replace 'check
2814 (lambda _
2815 (invoke "python" "utest/run.py"))))))
2816 (native-inputs
2817 `(("python-invoke" ,python-invoke)
2818 ("python-rellu" ,python-rellu)
2819 ("python:tk" ,python "tk"))) ;used when building the HTML doc
2820 (outputs '("out" "doc"))
2821 (home-page "https://robotframework.org")
2822 (synopsis "Generic automation framework")
2823 (description "Robot Framework is a generic automation framework for
2824acceptance testing, acceptance test driven development (ATDD), and robotic
2825process automation (RPA).")
2826 (license license:asl2.0)))
2827
5b84c120
MC
2828(define-public python-robotframework-lint
2829 ;; There is no properly tagged release; the commit below seems to correspond
2830 ;; to the 0.9 stable release available from PyPI. The tests are not
2831 ;; included in the PyPI archive, so we fetch the sources from the upstream
2832 ;; Git repo.
2833 (let ((commit "e851879bab1f63e4e53b34a4dc8a67ed95102830")
2834 (revision "1"))
2835 (package
2836 (name "python-robotframework-lint")
2837 (version (git-version "0.9.0" revision commit))
2838 (source
2839 (origin
2840 (method git-fetch)
2841 (uri (git-reference
2842 (url "https://github.com/boakley/robotframework-lint.git")
2843 (commit commit)))
2844 (file-name (git-file-name name version))
2845 (sha256
2846 (base32
2847 "1p6fknqg5sb9qz5857ji4a877657vgfjm5v3zn45994parx6ml1m"))))
2848 (build-system python-build-system)
2849 (arguments
2850 `(#:phases
2851 (modify-phases %standard-phases
2852 (replace 'check
2853 (lambda _
2854 (invoke "python" "-m" "robot" "-A"
2855 "tests/conf/default.args" "tests"))))))
2856 (propagated-inputs
2857 `(("python-robotframework" ,python-robotframework)))
2858 (home-page "https://github.com/boakley/robotframework-lint/")
2859 (synopsis "Static analysis tool (linter) for Robot Framework")
2860 (description "This package provides the @code{rflint} command-line
2861utility, a static analysis tool (linter) for Robot Framework source files.")
2862 (license license:asl2.0))))
2863
c0c64f17
MC
2864(define-public python-robotframework-sshlibrary
2865 (package
2866 (name "python-robotframework-sshlibrary")
2867 (version "3.3.0")
2868 ;; There are no tests in the PyPI archive.
2869 (source
2870 (origin
2871 (method git-fetch)
2872 (uri (git-reference
2873 (url "https://github.com/robotframework/SSHLibrary.git")
2874 (commit (string-append "v" version))))
2875 (file-name (git-file-name name version))
2876 (sha256
2877 (base32
2878 "1mk6dz2jqqndbx4yji09012q6rmadnqdywi7czvj62b0s07dr3r2"))))
2879 (build-system python-build-system)
2880 (arguments
2881 `(#:phases
2882 (modify-phases %standard-phases
2883 (add-before 'build 'build-and-install-doc
2884 (lambda* (#:key outputs #:allow-other-keys)
2885 (let* ((doc-output (assoc-ref outputs "doc"))
2886 (doc (string-append doc-output "/share/"
2887 ,name "-" ,version "/")))
2888 (invoke "chmod" "-R" "+w" "docs")
2889 (invoke "invoke" "kw-docs" "project-docs")
2890 (mkdir-p doc)
2891 (for-each delete-file (find-files "docs" "\\.rst"))
2892 (copy-recursively "docs" doc)
2893 #t)))
2894 (replace 'check
2895 (lambda _
2896 ;; Some tests require an SSH server; we remove them.
2897 (delete-file "utest/test_client_api.py")
2898 (delete-file "utest/test_scp.py")
2899 (invoke "python" "utest/run.py"))))))
2900 (propagated-inputs
2901 `(("python-robotframework" ,python-robotframework)
2902 ("python-paramiko" ,python-paramiko)
2903 ("python-scp" ,python-scp)))
2904 (native-inputs
2905 `(("openssh" ,openssh)
2906 ("which" ,which)
2907 ;; To generate the documentation
2908 ("python-docutils" ,python-docutils)
2909 ("python-invoke" ,python-invoke)
2910 ("python-pygments" ,python-pygments)
2911 ("python-rellu" ,python-rellu)))
2912 (outputs '("out" "doc"))
2913 (home-page "https://github.com/robotframework/SSHLibrary")
2914 (synopsis "Robot Framework library for SSH and SFTP")
2915 (description "SSHLibrary is a Robot Framework library providing support
2916for SSH and SFTP. It has the following main usages:
2917@itemize @bullet
2918@item Executing commands on the remote machine, either blocking or non-blocking.
2919@item Writing and reading in an interactive shell.
2920@item Transferring files and directories over SFTP.
2921@item Ensuring that files and directories exist on the remote machine.
2922@end itemize")
2923 (license license:asl2.0)))
2924
13d825fc
MC
2925(define-public python-scp
2926 (package
2927 (name "python-scp")
2928 (version "0.13.2")
2929 (source
2930 (origin
2931 (method url-fetch)
2932 (uri (pypi-uri "scp" version))
2933 (sha256
2934 (base32
2935 "1crlpw9lnn58fs1c1rmh7s7s9y5gkgpgjsqlvg9qa51kq1knx7gg"))))
2936 (build-system python-build-system)
2937 (arguments
2938 '(#:tests? #f)) ;tests require an SSH server
2939 (propagated-inputs
2940 `(("python-paramiko" ,python-paramiko)))
2941 (home-page "https://github.com/jbardin/scp.py")
2942 (synopsis "SCP protocol module for Python and Paramiko")
2943 (description "The scp module extends the Paramiko library to send and
2944receive files via the SCP1 protocol, as implemented by the OpenSSH
2945@command{scp} program.")
2946 (license license:gpl2+)))
2947
44d10b1f
RW
2948(define-public python-rst.linker
2949 (package
2950 (name "python-rst.linker")
d37e8e53 2951 (version "1.11")
44d10b1f
RW
2952 (source
2953 (origin
2954 (method url-fetch)
2955 (uri (pypi-uri "rst.linker" version))
2956 (sha256
d37e8e53 2957 (base32 "0pqsfqqx8h0pq21k8l3k62kznrgaj2ala93c64s4d9rpbr4mgkd2"))))
44d10b1f
RW
2958 (build-system python-build-system)
2959 (propagated-inputs
2960 `(("python-dateutil" ,python-dateutil)
2961 ("python-six" ,python-six)))
2962 (native-inputs
2963 `(("python-setuptools-scm" ,python-setuptools-scm)))
2964 ;; Test would require path.py, which would introduce a cyclic dependence.
2965 (arguments `(#:tests? #f))
2966 ;; Note: As of version 1.7 the documentation is not worth building.
2967 (home-page "https://github.com/jaraco/rst.linker")
2968 (synopsis "Sphinx plugin to add links and timestamps")
2969 (description "rst.linker allows to automatically replace text by a
2970reStructuredText external reference or timestamps. It's primary purpose is to
2971augment the changelog, but it can be used for other documents, too.")
2972 (license license:expat)))
2973
2974(define-public python2-rst.linker
2975 (package-with-python2 python-rst.linker))
2976
2977(define-public python-feedgenerator
2978 (package
2979 (name "python-feedgenerator")
2980 (version "1.9")
2981 (source
2982 (origin
2983 (method url-fetch)
2984 (uri (pypi-uri "feedgenerator" version))
2985 (sha256
2986 (base32
2987 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
2988 (modules '((guix build utils)))
2989 (snippet
2990 '(begin
2991 ;; Remove pre-compiled .pyc files from source.
2992 (for-each delete-file-recursively
2993 (find-files "." "__pycache__" #:directories? #t))
2994 (for-each delete-file (find-files "." "\\.pyc$"))
2995 #t))))
2996 (build-system python-build-system)
2997 (propagated-inputs
2998 `(("python-pytz" ,python-pytz)
2999 ("python-six" ,python-six)))
3000 (home-page "https://github.com/getpelican/feedgenerator")
3001 (synopsis
3002 "Standalone version of Django's Atom/RSS feed generator")
3003 (description
3004 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
3005which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
3006 (license license:bsd-3)))
3007
3008(define-public python2-feedgenerator
3009 (package-with-python2 python-feedgenerator))
3010
3011(define-public python-toml
3012 (package
3013 (name "python-toml")
3014 (version "0.9.4")
3015 (source
3016 (origin
3017 (method url-fetch)
3018 (uri (pypi-uri "toml" version))
3019 (sha256
3020 (base32
3021 "0bdbpbip67wdm6c7xwc6mmbmskyradj4cdxn1iibj4fcx1nbv1lf"))))
3022 (build-system python-build-system)
3023 (arguments
3024 `(#:tests? #f)) ;no tests suite in release
3025 (home-page "https://github.com/uiri/toml")
3026 (synopsis "Library for TOML")
3027 (description
3028 "@code{toml} is a library for parsing and creating Tom's Obvious, Minimal
3029Language (TOML) configuration files.")
3030 (license license:expat)))
3031
346c8752
BG
3032(define-public python-jsonrpc-server
3033 (package
3034 (name "python-jsonrpc-server")
d6cf4c6e 3035 (version "0.3.2")
346c8752
BG
3036 (source
3037 (origin
3038 (method url-fetch)
3039 (uri (pypi-uri "python-jsonrpc-server" version))
3040 (sha256
3041 (base32
d6cf4c6e 3042 "0ddgdp26dfxaz6isjbb12974b3rxavgsqrn2zrmck62cmipg5g05"))))
346c8752
BG
3043 (build-system python-build-system)
3044 (propagated-inputs
3045 `(("python-future" ,python-future)
3046 ("python-mock" ,python-mock)
d6cf4c6e
BG
3047 ("python-pytest" ,python-pytest)
3048 ("python-ujson" ,python-ujson)))
346c8752
BG
3049 (home-page
3050 "https://github.com/palantir/python-jsonrpc-server")
3051 (synopsis "JSON RPC 2.0 server library")
3052 (description
1df5407c 3053 "This package provides a JSON RPC 2.0 server library for Python.")
346c8752
BG
3054 (license license:expat)))
3055
56f4ad47
BG
3056(define-public python-pydocstyle
3057 (package
3058 (name "python-pydocstyle")
3059 (version "3.0.0")
3060 (source
3061 (origin
3062 (method url-fetch)
3063 (uri (pypi-uri "pydocstyle" version))
3064 (sha256
3065 (base32
3066 "1m1xv9clkg9lgzyza6dnj359z04vh5g0h49nhzghv7lg81gchhap"))))
3067 (build-system python-build-system)
3068 (propagated-inputs
3069 `(("python-six" ,python-six)
3070 ("python-snowballstemmer" ,python-snowballstemmer)))
3071 (home-page
3072 "https://github.com/PyCQA/pydocstyle/")
3073 (synopsis "Python docstring style checker")
3074 (description
3075 "This package provides a style checker for the Python Language
3076Server (PLS).")
3077 (license license:expat)))
3078
be4d840c 3079(define-public python-language-server
808dd2d0
BL
3080 (package
3081 (name "python-language-server")
a42f1420 3082 (version "0.31.7")
808dd2d0
BL
3083 (source
3084 (origin
3085 (method url-fetch)
3086 (uri (pypi-uri "python-language-server" version))
3087 (sha256
3088 (base32
a42f1420 3089 "0f8rljff4h2ay9m2n9ang7axai37nzd39zd7m6c90rci5wh8cmxh"))))
808dd2d0
BL
3090 (build-system python-build-system)
3091 (propagated-inputs
3092 `(("python-pluggy" ,python-pluggy)
3093 ("python-jsonrpc-server" ,python-jsonrpc-server)
3094 ("python-jedi" ,python-jedi)
3095 ("python-yapf" ,python-yapf)
3096 ("python-pyflakes" ,python-pyflakes)
3097 ("python-pydocstyle" ,python-pydocstyle)
3098 ("python-pycodestyle" ,python-pycodestyle)
3099 ("python-mccabe" ,python-mccabe)
3100 ("python-rope" ,python-rope)
3101 ("python-autopep8" ,python-autopep8)
3102 ("python-flake8" ,python-flake8)
3103 ("python-pylint" ,python-pylint)))
3104 (home-page "https://github.com/palantir/python-language-server")
3105 (synopsis "Python implementation of the Language Server Protocol")
3106 (description
3107 "The Python Language Server (pyls) is an implementation of the Python 3
be4d840c
BG
3108language specification for the Language Server Protocol (LSP). This tool is
3109used in text editing environments to provide a complete and integrated
3110feature-set for programming Python effectively.")
808dd2d0 3111 (license license:expat)))
be4d840c 3112
44d10b1f
RW
3113(define-public python-black
3114 (package
3115 (name "python-black")
3116 (version "18.6b4")
3117 (source
3118 (origin
3119 (method url-fetch)
3120 (uri (pypi-uri "black" version))
3121 (sha256
3122 (base32
3123 "0i4sfqgz6w15vd50kbhi7g7rifgqlf8yfr8y78rypd56q64qn592"))))
3124 (build-system python-build-system)
3125 (arguments
3126 `(#:phases
3127 (modify-phases %standard-phases
3128 (add-after 'patch-source-shebangs 'patch-extra-shebangs
3129 (lambda _
3130 (let ((python3 (which "python3")))
3131 (substitute* '("tests/data/fmtonoff.py"
3132 "tests/data/string_prefixes.py"
3133 "tests/data/function.py")
3134 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
3135 (string-append "#!" python3 (if (string? minor-version)
3136 minor-version
3137 ""))))))))))
3138 (propagated-inputs
3139 `(("python-click" ,python-click)
3140 ("python-attrs" ,python-attrs)
3141 ("python-appdirs" ,python-appdirs)
3142 ("python-toml" ,python-toml)))
3143 (home-page "https://github.com/ambv/black")
3144 (synopsis "The uncompromising code formatter")
3145 (description "Black is the uncompromising Python code formatter.")
3146 (license license:expat)))
3147
3148(define-public python-blinker
3149 (package
3150 (name "python-blinker")
3151 (version "1.4")
3152 (source
3153 (origin
3154 (method url-fetch)
3155 (uri (pypi-uri "blinker" version))
3156 (sha256
3157 (base32
3158 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
3159 (build-system python-build-system)
3160 (home-page "http://pythonhosted.org/blinker/")
3161 (synopsis "Fast, simple object-to-object and broadcast signaling")
3162 (description
3163 "Blinker provides a fast dispatching system that allows any number of
3164interested parties to subscribe to events, or \"signals\".")
3165 (license license:expat)))
3166
3167(define-public python2-blinker
3168 (package-with-python2 python-blinker))
3169
3170(define-public pelican
3171 (package
3172 (name "pelican")
fa9e3b5e 3173 (version "4.2.0")
44d10b1f
RW
3174 (source
3175 (origin
3176 (method url-fetch)
3177 (uri (pypi-uri "pelican" version))
3178 (sha256
3179 (base32
fa9e3b5e 3180 "0mp7hjyhs38ag1hyfcy882g400z0babqi72pnli46dqijfhajzmy"))))
44d10b1f
RW
3181 (build-system python-build-system)
3182 (propagated-inputs
fa9e3b5e
VC
3183 `(("python-blinker" ,python-blinker)
3184 ("python-dateutil" ,python-dateutil)
3185 ("python-docutils" ,python-docutils)
3186 ("python-feedgenerator" ,python-feedgenerator)
44d10b1f 3187 ("python-jinja2" ,python-jinja2)
fa9e3b5e 3188 ("python-markdown" ,python-markdown)
44d10b1f 3189 ("python-pygments" ,python-pygments)
44d10b1f 3190 ("python-pytz" ,python-pytz)
44d10b1f 3191 ("python-six" ,python-six)
fa9e3b5e 3192 ("python-unidecode" ,python-unidecode)))
44d10b1f
RW
3193 (home-page "https://getpelican.com/")
3194 (arguments
3195 `(;; XXX Requires a lot more packages to do unit tests :P
fa9e3b5e 3196 #:tests? #f))
44d10b1f
RW
3197 (synopsis "Python-based static site publishing system")
3198 (description
3199 "Pelican is a tool to generate a static blog from reStructuredText,
3200Markdown input files, and more. Pelican uses Jinja2 for templating
3201and is very extensible.")
3202 (license license:agpl3+)))
3203
8c141421
JH
3204(define-public mallard-ducktype
3205 (package
3206 (name "mallard-ducktype")
12cc3da5 3207 (version "1.0.2")
8c141421
JH
3208 (source
3209 (origin
3210 (method git-fetch)
12cc3da5
JH
3211 ;; git-reference because tests are not included in pypi source tarball
3212 ;; https://issues.guix.gnu.org/issue/36755#2
8c141421
JH
3213 (uri (git-reference
3214 (url "https://github.com/projectmallard/mallard-ducktype.git")
3215 (commit version)))
3216 (file-name (git-file-name name version))
3217 (sha256
3218 (base32
12cc3da5 3219 "1jk9bfz7g04ip78s03b0xak6d54rj4h9zpgadkziy1ji216g6y4c"))))
8c141421 3220 (build-system python-build-system)
5246655f
EF
3221 (arguments
3222 '(#:phases
3223 (modify-phases %standard-phases
3224 (replace 'check
3225 (lambda _
3226 (with-directory-excursion "tests"
3227 (invoke "sh" "runtests")))))))
8c141421
JH
3228 (home-page "http://projectmallard.org")
3229 (synopsis "Convert Ducktype to Mallard documentation markup")
3230 (description
3231 "Ducktype is a lightweight syntax that can represent all the semantics
3232of the Mallard XML documentation system. Ducktype files can be converted to
3233Mallard using the @command{ducktype} tool. The yelp-tools package
3234provides additional functionality on the produced Mallard documents.")
3235 (license license:expat)))
3236
44d10b1f
RW
3237(define-public python-cython
3238 (package
3239 (name "python-cython")
6fd27a71 3240 (version "0.29.13")
44d10b1f
RW
3241 (source
3242 (origin
3243 (method url-fetch)
3244 (uri (pypi-uri "Cython" version))
3245 (sha256
6fd27a71
TGR
3246 (base32
3247 "13k37lrcgagwwnzr5bzririsscb793vndj234d475x1h9ad0d7f2"))))
44d10b1f
RW
3248 (build-system python-build-system)
3249 ;; we need the full python package and not just the python-wrapper
3250 ;; because we need libpython3.3m.so
3251 (inputs
3252 `(("python" ,python)))
3253 (arguments
3254 `(#:phases
3255 (modify-phases %standard-phases
3256 (add-before 'check 'set-HOME
3257 ;; some tests require access to "$HOME/.cython"
3258 (lambda _ (setenv "HOME" "/tmp") #t))
3259
3260 ;; FIXME: These tests started failing on armhf after the 0.28 update
3261 ;; (commit c69d11c5930), both with an error such as this:
3262 ;; compiling (cpp) and running dictcomp ...
3263 ;; === C/C++ compiler error output: ===
3264 ;; ‘
3265 ;; dictcomp.cpp:5221: confused by earlier errors, bailing out
3266 ;; See <https://hydra.gnu.org/build/2948724> for logs.
3267 ,@(if (target-arm32?)
3268 `((add-before 'check 'disable-failing-tests
3269 (lambda _
3270 (let ((disabled-tests (open-file "tests/bugs.txt" "a")))
3271 (for-each (lambda (test)
3272 (format disabled-tests "~a\n" test))
3273 '("memslice" "dictcomp"))
3274 (close-port disabled-tests)))))
3275 '())
3276
3277 (replace 'check
3278 (lambda _
e9194eb0
MB
3279 ;; Disable compiler optimizations to greatly reduce the running
3280 ;; time of the test suite.
3281 (setenv "CFLAGS" "-O0")
3282
3283 (invoke "python" "runtests.py" "-vv"
3284 "-j" (number->string (parallel-job-count))))))))
f319409b 3285 (home-page "https://cython.org/")
44d10b1f
RW
3286 (synopsis "C extensions for Python")
3287 (description "Cython is an optimising static compiler for both the Python
3288programming language and the extended Cython programming language. It makes
3289writing C extensions for Python as easy as Python itself.")
3290 (license license:asl2.0)
3291 (properties `((python2-variant . ,(delay python2-cython))))))
3292
3293(define-public python2-cython
da460865
MB
3294 (let ((base (package-with-python2 (strip-python2-variant python-cython))))
3295 (package
3296 (inherit base)
3297 (name "python2-cython")
3298 (inputs
3299 `(("python-2" ,python-2))) ;this is not automatically changed
3300 (arguments
3301 (substitute-keyword-arguments (package-arguments base)
3302 ((#:phases phases)
3303 `(modify-phases ,phases
3304 (add-before 'check 'adjust-test_embed
3305 (lambda _
3306 (substitute* "runtests.py"
3307 ;; test_embed goes great lengths to find the static libpythonX.Y.a
3308 ;; so it can give the right -L flag to GCC when embedding static
3309 ;; builds of Python. It is unaware that the Python "config"
3310 ;; directory (where the static library lives) was renamed in
3311 ;; Python 3, and falls back to sysconfig.get_config_var('LIBDIR'),
3312 ;; which works fine, because that is where the shared library is.
3313 ;;
3314 ;; It also appears to be unaware that the Makefile in Demos/embed
3315 ;; already unconditionally pass the static library location to GCC,
3316 ;; after checking sysconfig.get_config_var('LIBPL).
3317 ;;
3318 ;; The effect is that the linker is unable to resolve libexpat
3319 ;; symbols when building for Python 2, because neither the Python 2
3320 ;; shared library nor Expat is available. To fix it, we can either
3321 ;; add Expat as an input and make it visible to the linker, or just
3322 ;; prevent it from overriding the Python shared library location.
3323 ;; The end result is identical, so we take the easy route.
3324 ((" or libname not in os\\.listdir\\(libdir\\)")
3325 ""))
3326 #t)))))))))
44d10b1f
RW
3327
3328;; The RPython toolchain currently does not support Python 3.
3329(define-public python2-rpython
3330 (package
3331 (name "python2-rpython")
3332 (version "0.2.1")
3333 (source
3334 (origin
3335 (method url-fetch)
3336 (uri (pypi-uri "rpython" version))
3337 (sha256
3338 (base32
3339 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
3340 (build-system python-build-system)
3341 (arguments `(#:python ,python-2))
3342 (native-inputs
3343 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
3344 (home-page "https://rpython.readthedocs.org")
3345 (synopsis "Framework for implementing interpreters and virtual machines")
3346 (description "RPython is a translation and support framework for
3347producing implementations of dynamic languages, emphasizing a clean separation
3348between language specification and implementation aspects.")
3349 (license license:expat)))
3350
3351;; NOTE: when upgrading numpy please make sure that python-pandas and
3352;; python-scipy still build, as these three packages are often used together.
3353(define-public python-numpy
3354 (package
3355 (name "python-numpy")
8e5fbd5d 3356 (version "1.17.3")
44d10b1f
RW
3357 (source
3358 (origin
3359 (method url-fetch)
3360 (uri (string-append
3361 "https://github.com/numpy/numpy/releases/download/v"
3362 version "/numpy-" version ".tar.gz"))
3363 (sha256
3364 (base32
8e5fbd5d 3365 "1ak9dmjja0q90a7fsxli51ypcwssh8c4pb6f8wkrsnf2xgdk6dy9"))))
44d10b1f
RW
3366 (build-system python-build-system)
3367 (inputs
3368 `(("openblas" ,openblas)
3369 ("lapack" ,lapack)))
3370 (native-inputs
3371 `(("python-cython" ,python-cython)
3372 ("python-pytest" ,python-pytest)
3373 ("gfortran" ,gfortran)))
3374 (arguments
3375 `(#:phases
3376 (modify-phases %standard-phases
3377 (add-before 'build 'configure-blas-lapack
3378 (lambda* (#:key inputs #:allow-other-keys)
3379 (call-with-output-file "site.cfg"
3380 (lambda (port)
3381 (format port
3382 "[openblas]
3383libraries = openblas
3384library_dirs = ~a/lib
3385include_dirs = ~a/include
3386
3387# backslash-n to make emacs happy
3388\n[lapack]
3389lapack_libs = lapack
3390library_dirs = ~a/lib
3391include_dirs = ~a/include
3392"
3393 (assoc-ref inputs "openblas")
3394 (assoc-ref inputs "openblas")
3395 (assoc-ref inputs "lapack")
3396 (assoc-ref inputs "lapack"))))
3397 #t))
3398 (add-before 'build 'fix-executable-paths
3399 (lambda* (#:key inputs #:allow-other-keys)
3400 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
3401 ;; instead of /bin/sh.
3402 (substitute* "numpy/distutils/exec_command.py"
3403 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
3404 (string-append match-start (assoc-ref inputs "bash") match-end)))
3405 ;; Use "gcc" executable, not "cc".
3406 (substitute* "numpy/distutils/system_info.py"
3407 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3408 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
3409 #t))
3410 ;; Tests can only be run after the library has been installed and not
3411 ;; within the source directory.
3412 (delete 'check)
3413 (add-after 'install 'check
3414 (lambda* (#:key outputs inputs #:allow-other-keys)
3415 ;; Make installed package available for running the tests
3416 (add-installed-pythonpath inputs outputs)
3417 ;; Make sure "f2py" etc is found.
3418 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
3419 ":" (getenv "PATH")))
3420 (with-directory-excursion "/tmp"
3421 (invoke "python" "-c"
3422 "import numpy; numpy.test(verbose=2)")))))))
3423 (home-page "http://www.numpy.org/")
3424 (synopsis "Fundamental package for scientific computing with Python")
3425 (description "NumPy is the fundamental package for scientific computing
3426with Python. It contains among other things: a powerful N-dimensional array
3427object, sophisticated (broadcasting) functions, tools for integrating C/C++
3428and Fortran code, useful linear algebra, Fourier transform, and random number
3429capabilities.")
adb396ea 3430 (properties `((python2-variant . ,(delay python2-numpy))))
44d10b1f
RW
3431 (license license:bsd-3)))
3432
adb396ea 3433;; Numpy 1.16.x are the last versions that support Python 2.
44d10b1f 3434(define-public python2-numpy
adb396ea
MB
3435 (let ((numpy (package-with-python2
3436 (strip-python2-variant python-numpy))))
3437 (package/inherit
3438 numpy
3439 (version "1.16.5")
3440 (source (origin
3441 (method url-fetch)
3442 (uri (string-append
3443 "https://github.com/numpy/numpy/releases/download/v"
3444 version "/numpy-" version ".tar.gz"))
3445 (sha256
3446 (base32
3447 "0lg1cycxzi4rvvrd5zxinpdz0ni792fpx6xjd75z1923zcac8qrb")))))))
44d10b1f
RW
3448
3449;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
3450;; interest only for legacy code going back to NumPy's predecessor
3451;; Numeric.
3452(define-public python2-numpy-1.8
3453 (package (inherit python2-numpy)
3454 (version "1.8.2")
3455 (source
3456 (origin
6b61fc47
EF
3457 (method git-fetch)
3458 (uri (git-reference
3459 (url "https://github.com/numpy/numpy")
3460 (commit (string-append "v" version))))
3461 (file-name (git-file-name "numpy" version))
44d10b1f
RW
3462 (sha256
3463 (base32
6b61fc47 3464 "0ikgi15rsqwbkfsjjxrwh40lqyal2wvyp3923y6w6ch3dcr82sfk"))))
44d10b1f
RW
3465 (arguments
3466 (substitute-keyword-arguments (package-arguments python2-numpy)
3467 ((#:phases phases)
3468 `(modify-phases ,phases
3469 (replace 'configure-blas-lapack
3470 (lambda* (#:key inputs #:allow-other-keys)
3471 (call-with-output-file "site.cfg"
3472 (lambda (port)
3473 (format port
3474 "[openblas]
3475libraries = openblas,lapack
3476library_dirs = ~a/lib:~a/lib
3477include_dirs = ~a/include:~a/include
3478"
3479 (assoc-ref inputs "openblas")
3480 (assoc-ref inputs "lapack")
3481 (assoc-ref inputs "openblas")
3482 (assoc-ref inputs "lapack"))))
3483 #t))))))
3484 (native-inputs
3485 `(("python2-nose" ,python2-nose)))
3486 (description "NumPy is the fundamental package for scientific computing
3487with Python. It contains among other things: a powerful N-dimensional array
3488object, sophisticated (broadcasting) functions, tools for integrating C/C++
3489and Fortran code, useful linear algebra, Fourier transform, and random number
3490capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
3491that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
3492Numeric.")
3493 (license license:bsd-3)))
3494
3495(define-public python-munch
3496 (package
3497 (name "python-munch")
3498 (version "2.0.4")
3499 (source
3500 (origin
3501 (method url-fetch)
3502 (uri (pypi-uri "munch" version))
3503 (sha256
3504 (base32
3505 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3506 (build-system python-build-system)
3507 (home-page "https://github.com/Infinidat/munch")
3508 (synopsis "Dot-accessible dictionary")
3509 (description "Munch is a dot-accessible dictionary similar to JavaScript
3510objects.")
3511 (license license:expat)))
3512
3513(define-public python2-munch
3514 (package-with-python2 python-munch))
3515
3516(define-public python-colormath
3517 (package
3518 (name "python-colormath")
3519 (version "3.0.0")
3520 (source
3521 (origin
3522 (method url-fetch)
3523 (uri (pypi-uri "colormath" version))
3524 (sha256
3525 (base32
3526 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
3527 (build-system python-build-system)
3528 (propagated-inputs
3529 `(("python-networkx" ,python-networkx)
3530 ("python-numpy" ,python-numpy)))
3531 (home-page "https://github.com/gtaylor/python-colormath")
3532 (synopsis "Color math and conversion library")
3533 (description
3534 "This is a Python library for color math and conversions.")
3535 (license license:bsd-3)))
3536
3537(define-public python2-colormath
3538 (package-with-python2 python-colormath))
3539
3540(define-public python-spectra
3541 (package
3542 (name "python-spectra")
3543 (version "0.0.11")
3544 (source
3545 (origin
3546 (method url-fetch)
3547 (uri (pypi-uri "spectra" version))
3548 (sha256
3549 (base32
3550 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
3551 (build-system python-build-system)
3552 (arguments
3553 `(#:phases
3554 (modify-phases %standard-phases
3555 (replace 'check
38ec0f6a 3556 (lambda _ (invoke "nosetests" "-v"))))))
44d10b1f
RW
3557 (propagated-inputs
3558 `(("python-colormath" ,python-colormath)))
3559 (native-inputs
3560 `(("python-nose" ,python-nose)))
3561 (home-page "https://github.com/jsvine/spectra")
3562 (synopsis "Color scales and color conversion")
3563 (description
3564 "This package provides a Python library intended to make color math,
3565color scales, and color space conversion easy. It has support for:
3566
3567@enumerate
3568@item Color scales
3569@item Color ranges
3570@item Color blending
3571@item Brightening/darkening colors
3572@item Saturating/desaturating colors
3573@item Conversion to/from multiple color spaces.
3574@end enumerate\n")
3575 (license license:expat)))
3576
3577(define-public python2-spectra
3578 (package-with-python2 python-spectra))
3579
3580(define-public python-numpy-documentation
3581 (package
3582 (name "python-numpy-documentation")
3583 (version (package-version python-numpy))
3584 (source (package-source python-numpy))
3585 (build-system python-build-system)
3586 (native-inputs
3587 `(("python-matplotlib" ,python-matplotlib)
3588 ("python-numpy" ,python-numpy)
3589 ("pkg-config" ,pkg-config)
3590 ("python-sphinx" ,python-sphinx)
3591 ("python-numpydoc" ,python-numpydoc)
f75aa97f 3592 ("texlive" ,(texlive-union (list texlive-fonts-cm-super
44d10b1f
RW
3593 texlive-fonts-ec
3594 texlive-generic-ifxetex
3595 texlive-generic-pdftex
f75aa97f 3596 texlive-amsfonts
44d10b1f
RW
3597 texlive-latex-capt-of
3598 texlive-latex-cmap
3599 texlive-latex-environ
3600 texlive-latex-eqparbox
3601 texlive-latex-etoolbox
3602 texlive-latex-expdlist
3603 texlive-latex-fancyhdr
3604 texlive-latex-fancyvrb
3605 texlive-latex-fncychap
3606 texlive-latex-float
3607 texlive-latex-framed
3608 texlive-latex-geometry
3609 texlive-latex-graphics
3610 texlive-latex-hyperref
3611 texlive-latex-mdwtools
3612 texlive-latex-multirow
3613 texlive-latex-needspace
3614 texlive-latex-oberdiek
3615 texlive-latex-parskip
3616 texlive-latex-preview
3617 texlive-latex-tabulary
3618 texlive-latex-threeparttable
3619 texlive-latex-titlesec
3620 texlive-latex-trimspaces
3621 texlive-latex-ucs
3622 texlive-latex-upquote
3623 texlive-latex-url
3624 texlive-latex-varwidth
3625 texlive-latex-wrapfig)))
3626 ("texinfo" ,texinfo)
3627 ("perl" ,perl)
3628 ("scipy-sphinx-theme"
3629 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
3630 (method git-fetch)
3631 (uri (git-reference
3632 (url "https://github.com/scipy/scipy-sphinx-theme.git")
3633 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
3634 (sha256
3635 (base32
3636 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
3637 ,@(package-native-inputs python-numpy)))
3638 (arguments
3639 `(#:tests? #f ; we're only generating the documentation
3640 #:phases
3641 (modify-phases %standard-phases
3642 (delete 'build)
3643 (replace 'install
3644 (lambda* (#:key inputs outputs #:allow-other-keys)
3645 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3646 (doc (string-append
3647 data "/doc/" ,name "-"
3648 ,(package-version python-numpy)))
3649 (info-reader (string-append data "/info"))
3650 (html (string-append doc "/html"))
3651 (scipy-sphinx-theme "scipy-sphinx-theme")
3652 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
3653 (pyver ,(string-append "PYVER=")))
3654
3655 ;; FIXME: this is needed to for texlive-union to generate
3656 ;; fonts, which are not found.
3657 (setenv "HOME" "/tmp")
3658
3659 (with-directory-excursion "doc"
3660 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
3661 (mkdir-p html)
4fc898da
RW
3662 (invoke "make" "html" pyver)
3663 (invoke "make" "latex" "PAPER=a4" pyver)
3664 (invoke "make" "-C" "build/latex"
44d10b1f
RW
3665 "all-pdf" "PAPER=a4" pyver)
3666 ;; FIXME: Generation of the info file fails.
4fc898da 3667 ;; (invoke "make" "info" pyver)
44d10b1f
RW
3668 ;; (mkdir-p info)
3669 ;; (copy-file "build/texinfo/numpy.info"
3670 ;; (string-append info "/numpy.info"))
3671 (for-each (lambda (file)
3672 (copy-file (string-append "build/latex" file)
3673 (string-append doc file)))
3674 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3675 (with-directory-excursion "build/html"
3676 (for-each (lambda (file)
3677 (let* ((dir (dirname file))
3678 (tgt-dir (string-append html "/" dir)))
3679 (unless (equal? "." dir)
3680 (mkdir-p tgt-dir))
3681 (install-file file html)))
3682 (find-files "." ".*")))))
3683 #t)))))
3684 (home-page (package-home-page python-numpy))
3685 (synopsis "Documentation for the python-numpy package")
3686 (description (package-description python-numpy))
3687 (license (package-license python-numpy))))
3688
3689(define-public python2-numpy-documentation
3690 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
3691 (package
3692 (inherit numpy-documentation)
3693 (native-inputs `(("python2-functools32" ,python2-functools32)
3694 ,@(package-native-inputs numpy-documentation))))))
3695
3696(define-public python-pygit2
3697 (package
3698 (name "python-pygit2")
dac8b275 3699 (version "0.28.2")
44d10b1f
RW
3700 (source
3701 (origin
3702 (method url-fetch)
3703 (uri (pypi-uri "pygit2" version))
3704 (sha256
dac8b275 3705 (base32 "11kzj5mjkspvplnpdb6bj8dcj6rgmkk986k8hjcklyg5yaxkz32d"))))
44d10b1f
RW
3706 (build-system python-build-system)
3707 (arguments
c3ecab0d 3708 '(#:tests? #f)) ; tests don't run correctly in our environment
44d10b1f
RW
3709 (propagated-inputs
3710 `(("python-six" ,python-six)
3711 ("python-cffi" ,python-cffi)
3712 ("libgit2" ,libgit2)
3713 ("python-tox" ,python-tox)))
3714 (native-inputs
3715 `(("python-pytest" ,python-pytest)))
3716 (home-page "https://github.com/libgit2/pygit2")
3717 (synopsis "Python bindings for libgit2")
3718 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3719library, libgit2 implements Git plumbing.")
3720 ;; GPL2.0 only, with linking exception.
3721 (license license:gpl2)))
3722
3723(define-public python2-pygit2
3724 (package-with-python2 python-pygit2))
3725
3726(define-public python-pyparsing
3727 (package
3728 (name "python-pyparsing")
6d3cff5a 3729 (version "2.3.1")
44d10b1f
RW
3730 (source
3731 (origin
3732 (method url-fetch)
3733 (uri (pypi-uri "pyparsing" version))
3734 (sha256
6d3cff5a 3735 (base32 "0yk6xl885b91dmlhlsap7x78hk2rdr879fln9anbq6k4ca42djb6"))))
44d10b1f
RW
3736 (build-system python-build-system)
3737 (outputs '("out" "doc"))
3738 (arguments
3739 `(#:tests? #f ; no test target
3740 #:phases
3741 (modify-phases %standard-phases
3742 (add-after 'install 'install-doc
3743 (lambda* (#:key outputs #:allow-other-keys)
3744 (let* ((doc (string-append (assoc-ref outputs "doc")
3745 "/share/doc/" ,name "-" ,version))
3746 (html-doc (string-append doc "/html"))
3747 (examples (string-append doc "/examples")))
3748 (mkdir-p html-doc)
3749 (mkdir-p examples)
3750 (for-each
3751 (lambda (dir tgt)
3752 (map (lambda (file)
3753 (install-file file tgt))
3754 (find-files dir ".*")))
3755 (list "docs" "htmldoc" "examples")
3756 (list doc html-doc examples))
3757 #t))))))
3758 (home-page "https://github.com/pyparsing/pyparsing")
3759 (synopsis "Python parsing class library")
3760 (description
3761 "The pyparsing module is an alternative approach to creating and
3762executing simple grammars, vs. the traditional lex/yacc approach, or the use
3763of regular expressions. The pyparsing module provides a library of classes
3764that client code uses to construct the grammar directly in Python code.")
3765 (license license:expat)))
3766
3767(define-public python2-pyparsing
3768 (package-with-python2 python-pyparsing))
3769
3770(define-public python-numpydoc
3771 (package
3772 (name "python-numpydoc")
3773 (version "0.8.0")
3774 (source
3775 (origin
3776 (method url-fetch)
3777 (uri (pypi-uri "numpydoc" version))
3778 (sha256
3779 (base32
3780 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
3781 (build-system python-build-system)
3782 (propagated-inputs
3783 `(("python-sphinx" ,python-sphinx)))
3784 (native-inputs
3785 `(("python-nose" ,python-nose)))
3786 (home-page "https://pypi.python.org/pypi/numpydoc")
3787 (synopsis
3788 "Numpy's Sphinx extensions")
3789 (description
3790 "Sphinx extension to support docstrings in Numpy format.")
3791 (license license:bsd-2)))
3792
3793(define-public python2-numpydoc
3794 (package-with-python2 python-numpydoc))
3795
3796(define-public python-numexpr
3797 (package
3798 (name "python-numexpr")
3799 (version "2.6.5")
3800 (source
3801 (origin
3802 (method url-fetch)
3803 (uri (pypi-uri "numexpr" version))
3804 (sha256
3805 (base32
3806 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
3807 (build-system python-build-system)
3808 (arguments `(#:tests? #f)) ; no tests included
3809 (propagated-inputs
3810 `(("python-numpy" ,python-numpy)))
3811 (home-page "https://github.com/pydata/numexpr")
3812 (synopsis "Fast numerical expression evaluator for NumPy")
3813 (description
3814 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3815expressions that operate on arrays are accelerated and use less memory than
3816doing the same calculation in Python. In addition, its multi-threaded
3817capabilities can make use of all your cores, which may accelerate
3818computations, most specially if they are not memory-bounded (e.g. those using
3819transcendental functions).")
3820 (license license:expat)))
3821
3822(define-public python2-numexpr
3823 (package-with-python2 python-numexpr))
3824
3825(define-public python-cycler
3826 (package
3827 (name "python-cycler")
3828 (version "0.10.0")
3829 (source (origin
3830 (method url-fetch)
3831 (uri (pypi-uri "cycler" version))
3832 (sha256
3833 (base32
3834 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
3835 (build-system python-build-system)
3836 (arguments
3837 ;; XXX: The current version requires 'coveralls' which we don't have.
3838 ;; Enable this for the next release which uses 'python-pytest'.
3839 '(#:tests? #f))
3840 (propagated-inputs
3841 `(("python-six" ,python-six)))
3842 (home-page "http://matplotlib.org/cycler/")
3843 (synopsis "Composable keyword argument iterator")
3844 (description
3845 "When using @code{matplotlib} and plotting more than one line, it is
3846common to want to be able to want to be able to cycle over one or more artist
3847styles; but the plotting logic can quickly become involved.
3848To address this and enable easy cycling over arbitrary @code{kwargs}, the
3849@code{Cycler} class was developed.")
3850 (license license:bsd-3)))
3851
3852(define-public python2-cycler
3853 (package-with-python2 python-cycler))
3854
3855(define-public python-colorspacious
3856 (package
3857 (name "python-colorspacious")
53a3ebed 3858 (version "1.1.2")
44d10b1f 3859 (source
dee92e65
TGR
3860 (origin
3861 (method git-fetch)
3862 (uri (git-reference
3863 (url "https://github.com/njsmith/colorspacious.git")
3864 (commit (string-append "v" version))))
3865 (file-name (git-file-name name version))
3866 (sha256
53a3ebed 3867 (base32 "0x7nkphr6g5ql5fvgss8l56rgiyjgh6fm8zzs73i94ci9wzlm63w"))))
44d10b1f
RW
3868 (build-system python-build-system)
3869 (propagated-inputs
3870 `(("python-numpy" ,python-numpy)))
3871 (native-inputs
3872 `(("python-nose" ,python-nose)))
3873 (arguments
3874 `(#:phases
3875 (modify-phases %standard-phases
3876 (replace 'check
3877 (lambda _
c988afda 3878 (invoke "nosetests" "--all-modules" "-v" "colorspacious"))))))
44d10b1f
RW
3879 (home-page "https://github.com/njsmith/colorspacious")
3880 (synopsis "Python library for colorspace conversions")
3881 (description "@code{colorspacious} is a Python library that lets you
3882convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
3883 (license license:expat)))
3884
3885(define-public python2-colorspacious
3886 (package-with-python2 python-colorspacious))
3887
3888(define-public python-matplotlib
3889 (package
3890 (name "python-matplotlib")
9e7cb2f1 3891 (version "3.1.2")
44d10b1f
RW
3892 (source
3893 (origin
3894 (method url-fetch)
3895 (uri (pypi-uri "matplotlib" version))
3896 (sha256
3897 (base32
9e7cb2f1 3898 "1nmshfqh7wyg15i16hx1yiylcvzkws29ivn66n3i0wyqwcpjr3lf"))))
44d10b1f
RW
3899 (build-system python-build-system)
3900 (propagated-inputs ; the following packages are all needed at run time
3901 `(("python-cycler" ,python-cycler)
3902 ("python-kiwisolver" ,python-kiwisolver)
3903 ("python-pyparsing" ,python-pyparsing)
3904 ("python-pygobject" ,python-pygobject)
3905 ("gobject-introspection" ,gobject-introspection)
3906 ("python-tkinter" ,python "tk")
3907 ("python-dateutil" ,python-dateutil)
3908 ("python-numpy" ,python-numpy)
3909 ("python-pillow" ,python-pillow)
3910 ("python-pytz" ,python-pytz)
3911 ("python-six" ,python-six)
44d10b1f
RW
3912 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3913 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3914 ;; object. For this reason we need to import both libraries.
5ea654cf 3915 ;; https://cairocffi.readthedocs.io/en/stable/cffi_api.html#converting-pycairo-wrappers-to-cairocffi
44d10b1f 3916 ("python-pycairo" ,python-pycairo)
44d10b1f
RW
3917 ("python-cairocffi" ,python-cairocffi)))
3918 (inputs
3919 `(("libpng" ,libpng)
3920 ("imagemagick" ,imagemagick)
3921 ("freetype" ,freetype)
3922 ("cairo" ,cairo)
3923 ("glib" ,glib)
3924 ;; FIXME: Add backends when available.
3925 ;("python-wxpython" ,python-wxpython)
3926 ("tcl" ,tcl)
3927 ("tk" ,tk)))
3928 (native-inputs
3929 `(("pkg-config" ,pkg-config)
5ea654cf
RW
3930 ("python-pytest" ,python-pytest)
3931 ("python-mock" ,python-mock)
3932 ("unzip" ,unzip)
3933 ("jquery-ui"
3934 ,(origin
3935 (method url-fetch)
3936 (uri "https://jqueryui.com/resources/download/jquery-ui-1.12.1.zip")
3937 (sha256
3938 (base32
3939 "0kb21xf38diqgxcdi1z3s9ssq36pldvyqxy56hn6pcva6rs3c8zq"))))))
44d10b1f
RW
3940 (arguments
3941 `(#:phases
3942 (modify-phases %standard-phases
5ea654cf
RW
3943 ;; XXX We disable all image comparison tests because we're using a
3944 ;; newer version of FreeType than matplotlib expects. This leads to
3945 ;; minor differences throughout the tests.
3946 (add-after 'unpack 'fix-and-disable-failing-tests
3947 (lambda _
3948 (substitute* (append (find-files "lib/matplotlib/tests/"
3949 "test_.*\\.py$")
3950 (find-files "lib/mpl_toolkits/tests"
3951 "test_.*\\.py$"))
3952 (("^from matplotlib" match)
3953 (string-append "import pytest\n" match))
3954 (("( *)@image_comparison" match indent)
3955 (string-append indent
3956 "@pytest.mark.skip(reason=\"unknown minor image differences\")\n"
3957 match)))
3958 (substitute* "lib/matplotlib/tests/test_animation.py"
3959 (("/bin/sh") (which "sh")))
3960 (for-each delete-file
3961 ;; test_normal_axes, test_get_tightbbox_polar
3962 '("lib/matplotlib/tests/test_axes.py"
9e7cb2f1
RW
3963 ;; We don't use the webagg backend and this test forces it.
3964 "lib/matplotlib/tests/test_backend_webagg.py"
5ea654cf
RW
3965 ;; test_outward_ticks
3966 "lib/matplotlib/tests/test_tightlayout.py"
9e7cb2f1
RW
3967 ;; test_hidden_axes fails with minor extent
3968 ;; differences, possibly due to the use of a
3969 ;; different version of FreeType.
3970 "lib/matplotlib/tests/test_constrainedlayout.py"
5ea654cf
RW
3971 ;; Fontconfig returns no fonts.
3972 "lib/matplotlib/tests/test_font_manager.py"))
3973 #t))
3974 (add-before 'install 'install-jquery-ui
3975 (lambda* (#:key outputs inputs #:allow-other-keys)
3976 (let ((dir (string-append (assoc-ref outputs "out")
3977 "/lib/python3.7/site-packages/matplotlib/backends/web_backend/")))
3978 (mkdir-p dir)
3979 (invoke "unzip"
3980 (assoc-ref inputs "jquery-ui")
3981 "-d" dir))
3982 #t))
c09f598d 3983 (replace 'check
5ea654cf
RW
3984 (lambda* (#:key outputs inputs #:allow-other-keys)
3985 (add-installed-pythonpath inputs outputs)
3986 (invoke "python" "tests.py" "-v"
9e7cb2f1 3987 "-m" "not network and not webagg")))
44d10b1f
RW
3988 (add-before 'build 'configure-environment
3989 (lambda* (#:key outputs inputs #:allow-other-keys)
34c2a16b
RW
3990 (let ((cairo (assoc-ref inputs "cairo")))
3991 ;; Setting this directory in the 'basedirlist' of 'setup.cfg'
44d10b1f 3992 ;; has not effect.
34c2a16b 3993 (setenv "LD_LIBRARY_PATH" (string-append cairo "/lib"))
44d10b1f
RW
3994 (setenv "HOME" (getcwd))
3995 (call-with-output-file "setup.cfg"
3996 (lambda (port)
3997 (format port "[directories]~%
3998basedirlist = ~a,~a~%
5ea654cf
RW
3999[packages]~%
4000tests = True~%"
44d10b1f
RW
4001 (assoc-ref inputs "tcl")
4002 (assoc-ref inputs "tk")))))
4003 #t)))))
339b5828 4004 (home-page "https://matplotlib.org/")
44d10b1f
RW
4005 (synopsis "2D plotting library for Python")
4006 (description
4007 "Matplotlib is a Python 2D plotting library which produces publication
4008quality figures in a variety of hardcopy formats and interactive environments
4009across platforms. Matplotlib can be used in Python scripts, the python and
4010ipython shell, web application servers, and six graphical user interface
4011toolkits.")
4012 (license license:psfl)
4013 (properties `((python2-variant . ,(delay python2-matplotlib))))))
4014
4015(define-public python2-matplotlib
4016 (let ((matplotlib (package-with-python2
4017 (strip-python2-variant python-matplotlib))))
4018 (package (inherit matplotlib)
7380df73 4019 (version "2.2.4")
5ea654cf
RW
4020 (source
4021 (origin
4022 (method url-fetch)
4023 (uri (pypi-uri "matplotlib" version))
4024 (sha256
4025 (base32
7380df73 4026 "09i1gnrra1590brc1f8d5rh2zvnknmfgzp613ab0462qkrwj15h2"))))
5d484f42
EF
4027 (arguments
4028 (substitute-keyword-arguments (package-arguments matplotlib)
4029 ((#:phases phases)
4030 `(modify-phases ,phases
66a3c2db
EF
4031 (replace 'install-jquery-ui
4032 (lambda* (#:key outputs inputs #:allow-other-keys)
4033 (let ((dir (string-append (assoc-ref outputs "out")
4034 "/lib/python2.7/site-packages/"
4035 "matplotlib/backends/web_backend/")))
4036 (mkdir-p dir)
4037 (invoke "unzip"
4038 (assoc-ref inputs "jquery-ui")
4039 "-d" dir))
4040 #t))
38a404d5 4041 (delete 'fix-and-disable-failing-tests)
5d484f42 4042 (delete 'check))))) ; These tests weren't run the the past.
44d10b1f
RW
4043 ;; Make sure to use special packages for Python 2 instead
4044 ;; of those automatically rewritten by package-with-python2.
4045 (propagated-inputs
4046 `(("python2-pycairo" ,python2-pycairo)
4047 ("python2-backports-functools-lru-cache"
4048 ,python2-backports-functools-lru-cache)
4049 ("python2-functools32" ,python2-functools32)
4050 ("python2-pygobject-2" ,python2-pygobject-2)
4051 ("python2-subprocess32" ,python2-subprocess32)
4052 ("python2-tkinter" ,python-2 "tk")
4053 ,@(fold alist-delete (package-propagated-inputs matplotlib)
4054 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
4055
4056(define-public python-matplotlib-documentation
4057 (package
4058 (name "python-matplotlib-documentation")
4059 (version (package-version python-matplotlib))
4060 (source (package-source python-matplotlib))
4061 (build-system python-build-system)
4062 (native-inputs
4063 `(("python-matplotlib" ,python-matplotlib)
4064 ("python-colorspacious" ,python-colorspacious)
4065 ("python-sphinx" ,python-sphinx)
5ad0a452 4066 ("python-sphinx-copybutton" ,python-sphinx-copybutton)
44d10b1f
RW
4067 ("python-sphinx-gallery" ,python-sphinx-gallery)
4068 ("python-numpydoc" ,python-numpydoc)
4069 ("python-ipython" ,python-ipython)
e7a53914 4070 ("python-ipykernel" ,python-ipykernel)
44d10b1f
RW
4071 ("python-mock" ,python-mock)
4072 ("graphviz" ,graphviz)
f75aa97f 4073 ("texlive" ,(texlive-union (list texlive-amsfonts
e7a53914
RW
4074 texlive-latex-amsmath
4075 texlive-latex-enumitem
4076 texlive-latex-expdlist
4077 texlive-latex-geometry
4078 texlive-latex-preview
4079 texlive-latex-type1cm
4080 texlive-latex-ucs
4081
4082 texlive-generic-pdftex
4083
e7a53914
RW
4084 texlive-fonts-ec
4085 texlive-fonts-adobe-times
4086 texlive-fonts-txfonts)))
44d10b1f
RW
4087 ("texinfo" ,texinfo)
4088 ,@(package-native-inputs python-matplotlib)))
4089 (arguments
4090 `(#:tests? #f ; we're only generating documentation
4091 #:phases
4092 (modify-phases %standard-phases
5ea654cf
RW
4093 ;; The tests in python-matplotlib are run after the install phase, so
4094 ;; we need to delete the extra phase here.
4095 (delete 'check)
44d10b1f
RW
4096 (replace 'build
4097 (lambda _
4098 (chdir "doc")
e7a53914
RW
4099 (setenv "PYTHONPATH"
4100 (string-append (getenv "PYTHONPATH")
4101 ":" (getcwd) "/../examples/units"))
44d10b1f 4102 (substitute* "conf.py"
e7a53914
RW
4103 ;; Don't use git.
4104 (("^SHA = check_output.*")
4105 (string-append "SHA = \"" ,version "\"\n"))
4106 ;; Don't fetch intersphinx files from the Internet
4107 (("^explicit_order_folders" m)
4108 (string-append "intersphinx_mapping = {}\n" m))
4109 (("'sphinx.ext.intersphinx',") "")
4110 ;; Disable URL embedding which requires internet access.
4111 (("'https://docs.scipy.org/doc/numpy'") "None")
4112 (("'https://docs.scipy.org/doc/scipy/reference'") "None"))
4113 (invoke "make"
4114 "SPHINXBUILD=sphinx-build"
4115 "SPHINXOPTS=" ; don't abort on warnings
4116 "html" "texinfo")))
44d10b1f
RW
4117 (replace 'install
4118 (lambda* (#:key inputs outputs #:allow-other-keys)
4119 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
4120 (doc (string-append data "/doc/python-matplotlib-" ,version))
4121 (info (string-append data "/info"))
4122 (html (string-append doc "/html")))
4123 (mkdir-p html)
4124 (mkdir-p info)
4125 (copy-recursively "build/html" html)
4126 (symlink (string-append html "/_images")
4127 (string-append info "/matplotlib-figures"))
4128 (with-directory-excursion "build/texinfo"
4129 (substitute* "matplotlib.texi"
4130 (("@image\\{([^,]*)" all file)
4131 (string-append "@image{matplotlib-figures/" file)))
4132 (symlink (string-append html "/_images")
4133 "./matplotlib-figures")
e7a53914
RW
4134 (invoke "makeinfo" "--no-split"
4135 "-o" "matplotlib.info" "matplotlib.texi"))
4136 (install-file "build/texinfo/matplotlib.info" info))
44d10b1f
RW
4137 #t)))))
4138 (home-page (package-home-page python-matplotlib))
4139 (synopsis "Documentation for the python-matplotlib package")
4140 (description (package-description python-matplotlib))
4141 (license (package-license python-matplotlib))))
4142
4143(define-public python2-matplotlib-documentation
5ad0a452
RW
4144 (let ((parent (package-with-python2 python-matplotlib-documentation)))
4145 (package
4146 (inherit parent)
4147 (native-inputs
4148 (alist-delete "python-sphinx-copybutton"
4149 (package-native-inputs parent))))))
44d10b1f 4150
55dae98f
RW
4151(define-public python-matplotlib-venn
4152 (package
4153 (name "python-matplotlib-venn")
4154 (version "0.11.5")
4155 (source
4156 (origin
4157 (method url-fetch)
4158 (uri (pypi-uri "matplotlib-venn" version ".zip"))
4159 (sha256
4160 (base32
4161 "13w3i1wih0mij08hrgppzg0g9z50y54rc28l6gdi1r5w45l7l0dy"))))
4162 (build-system python-build-system)
4163 (arguments '(#:tests? #f)) ; tests are not included
4164 (propagated-inputs
4165 `(("python-matplotlib" ,python-matplotlib)
4166 ("python-numpy" ,python-numpy)
4167 ("python-scipy" ,python-scipy)))
4168 (native-inputs
4169 `(("unzip" ,unzip)))
4170 (home-page "https://github.com/konstantint/matplotlib-venn")
4171 (synopsis "Plot area-proportional Venn diagrams")
4172 (description
4173 "This package provides tools for plotting area-proportional two- and
4174three-way Venn diagrams in @code{matplotlib}.")
4175 (license license:expat)))
4176
44d10b1f
RW
4177(define-public python2-pysnptools
4178 (package
4179 (name "python2-pysnptools")
5d1ade85 4180 (version "0.3.13")
44d10b1f
RW
4181 (source
4182 (origin
4183 (method url-fetch)
5d1ade85 4184 (uri (pypi-uri "pysnptools" version))
44d10b1f
RW
4185 (sha256
4186 (base32
5d1ade85 4187 "0lnis5xsl7bi0hz4f7gbicahzi5zlxkc21nk3g374xv8fb5hb3qm"))))
44d10b1f
RW
4188 (build-system python-build-system)
4189 (arguments
5d1ade85
RW
4190 `(#:python ,python-2 ; only Python 2.7 is supported
4191 #:tests? #f)) ; test files (e.g. examples/toydata.bim) not included
44d10b1f
RW
4192 (propagated-inputs
4193 `(("python2-numpy" ,python2-numpy)
4194 ("python2-scipy" ,python2-scipy)
4195 ("python2-pandas" ,python2-pandas)))
44d10b1f 4196 (native-inputs
5d1ade85 4197 `(("python2-cython" ,python2-cython)))
1b66989b 4198 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
44d10b1f
RW
4199 (synopsis "Library for reading and manipulating genetic data")
4200 (description
4201 "PySnpTools is a library for reading and manipulating genetic data. It
4202can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
4203those files. It can also efficiently manipulate ranges of integers using set
4204operators such as union, intersection, and difference.")
4205 (license license:asl2.0)))
4206
44d10b1f
RW
4207(define-public python-socksipy-branch
4208 (package
4209 (name "python-socksipy-branch")
4210 (version "1.01")
4211 (source
4212 (origin
4213 (method url-fetch)
4214 (uri (pypi-uri "SocksiPy-branch" version))
4215 (sha256
4216 (base32
4217 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
4218 (build-system python-build-system)
4219 (arguments
4220 `(#:tests? #f)) ; There are no tests
4221 (home-page "https://code.google.com/archive/p/socksipy-branch/")
4222 (synopsis "Python SOCKS module")
4223 (description
4224 "SocksiPy - A Python SOCKS client module. It provides a
4225socket-like interface that supports connections to any TCP
4226service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
4227The original version was developed by Dan Haim, this is a
4228branch created by Mario Vilas to address some open issues,
4229as the original project seems to have been abandoned circa 2007.")
4230 (license license:bsd-3)))
4231
4232(define-public python2-socksipy-branch
4233 (package-with-python2 python-socksipy-branch))
4234
6fcceb23
AG
4235(define-public python-socksipychain
4236 (package
4237 (name "python-socksipychain")
d97cdff1 4238 (version "2.1.0")
6fcceb23
AG
4239 (source
4240 (origin
4241 (method git-fetch)
4242 (uri (git-reference
4243 (url "https://github.com/pagekite/PySocksipyChain.git")
4244 (commit (string-append "v" version))))
4245 (file-name (git-file-name name version))
4246 (sha256
4247 (base32
d97cdff1 4248 "0idm9a050rd2kbgbz2sk9ib9589kj4xh1xdnggs6xbq2v2y8f6zn"))))
6fcceb23
AG
4249 (build-system python-build-system)
4250 (arguments
4251 `(#:tests? #f)) ; Tests try to access the network.
4252 (home-page "http://pagekite.net/wiki/Floss/PySocksipyChain/")
4253 (synopsis "Python SOCKS module with chained proxies support")
4254 (description
4255 "SocksiPyChain is a modified version of the SocksiPy SOCKS module, which
4256adds support for arbitrary chaining of proxy servers and various modes of
4257TLS/SSL encryption. It was developed for use in PageKite, and also includes
4258a simple netcat replacement with chaining support.")
4259 (license license:bsd-3)))
4260
44d10b1f
RW
4261(define-public python-pycodestyle
4262 (package
4263 (name "python-pycodestyle")
d16ef28b 4264 (version "2.5.0")
44d10b1f 4265 (source
ba88eea2
RW
4266 (origin
4267 (method url-fetch)
4268 (uri (pypi-uri "pycodestyle" version))
4269 (sha256
4270 (base32
d16ef28b 4271 "0v4prb05n21bm8650v0a01k1nyqjdmkrsm3zycfxh2j5k9n962p4"))))
44d10b1f
RW
4272 (build-system python-build-system)
4273 (home-page "https://pycodestyle.readthedocs.io/")
4274 (synopsis "Python style guide checker")
4275 (description "@code{pycodestyle} (formerly pep8) is a tool to check
4276Python code against some of the style conventions in
4277@url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
4278 (license license:expat)))
4279
4280(define-public python2-pycodestyle
4281 (package-with-python2 python-pycodestyle))
4282
4283(define-public python-multidict
4284 (package
4285 (name "python-multidict")
4286 (version "4.2.0")
4287 (source
4288 (origin
4289 (method url-fetch)
4290 (uri (pypi-uri "multidict" version))
4291 (sha256
4292 (base32
4293 "1vf5bq8hn5a9rvhr5v4fwbmarfsp35hhr8gs74kqfijy34j2f194"))))
4294 (build-system python-build-system)
4295 (native-inputs
4296 `(("python-pytest" ,python-pytest)
4297 ("python-pytest-runner" ,python-pytest-runner)))
4298 (home-page "https://github.com/aio-libs/multidict/")
4299 (synopsis "Multidict implementation")
4300 (description "Multidict is dict-like collection of key-value pairs
4301where key might be occurred more than once in the container.")
4302 (license license:asl2.0)))
4303
4304(define-public python-orderedmultidict
4305 (package
4306 (name "python-orderedmultidict")
4307 (version "0.7.11")
4308 (source
4309 (origin
4310 (method url-fetch)
4311 (uri (pypi-uri "orderedmultidict" version))
4312 (sha256
4313 (base32
4314 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
4315 (build-system python-build-system)
4316 (arguments
4317 `(#:phases
4318 (modify-phases %standard-phases
4319 (add-after 'unpack 'fix-tests
4320 (lambda _
4321 ;; The package uses nosetest for running the tests.
4322 ;; Adding this initfile allows to run the test suite
4323 ;; without requiring nosetest.
d1c4f329
RW
4324 (with-output-to-file "tests/__init__.py" newline)
4325 #t)))))
44d10b1f
RW
4326 (propagated-inputs
4327 `(("python-six" ,python-six)))
4328 (native-inputs
4329 `(("python-pycodestyle" ,python-pycodestyle)))
4330 (home-page "https://github.com/gruns/orderedmultidict")
4331 (synopsis "Python Ordered Multivalue Dictionary - omdict")
4332 (description "This package contains a library for ordered multivalue
4333dictionaries. A multivalue dictionary is a dictionary that can store
4334multiple values for the same key. An ordered multivalue dictionary is a
4335multivalue dictionary that retains the order of insertions and deletions.")
4336 (license license:unlicense)))
4337
4338(define-public python2-orderedmultidict
4339 (package-with-python2 python-orderedmultidict))
4340
4341(define-public python-autopep8
4342 (package
4343 (name "python-autopep8")
4344 (version "1.3.5")
4345 (source
4346 (origin
4347 (method url-fetch)
4348 (uri (pypi-uri "autopep8" version))
4349 (sha256
4350 (base32
4351 "192bvhzi4d0claqxgzymvv7k3qnj627742bc8sgxpzjj42pd9112"))))
4352 (build-system python-build-system)
4353 (propagated-inputs
4354 `(("python-pycodestyle" ,python-pycodestyle)))
4355 (home-page "https://github.com/hhatto/autopep8")
4356 (synopsis "Format Python code according to the PEP 8 style guide")
4357 (description
4358 "@code{autopep8} automatically formats Python code to conform to
4359the PEP 8 style guide. It uses the pycodestyle utility to determine
4360what parts of the code needs to be formatted. @code{autopep8} is
4361capable of fixing most of the formatting issues that can be reported
4362by pycodestyle.")
4363 (license (license:non-copyleft
4364 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
4365
4366(define-public python2-autopep8
4367 (package-with-python2 python-autopep8))
4368
4369(define-public python-distutils-extra
4370 (package
4371 (name "python-distutils-extra")
4372 (version "2.38")
4373 (source
4374 (origin
4375 (method url-fetch)
4376 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4377 version "/+download/python-distutils-extra-"
4378 version ".tar.gz"))
4379 (sha256
4380 (base32
4381 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4382 (build-system python-build-system)
4383 (home-page "https://launchpad.net/python-distutils-extra/")
4384 (synopsis "Enhancements to Python's distutils")
4385 (description
4386 "The python-distutils-extra module enables you to easily integrate
4387gettext support, themed icons, and scrollkeeper-based documentation into
4388Python's distutils.")
4389 (license license:gpl2)))
4390
4391(define-public python2-distutils-extra
4392 (package-with-python2 python-distutils-extra))
4393
4394(define-public python2-elib.intl
4395 (package
4396 (name "python2-elib.intl")
4397 (version "0.0.3")
4398 (source
4399 (origin
4400 ;; This project doesn't tag releases or publish tarballs, so we take
4401 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4402 (method git-fetch)
4403 (uri (git-reference
4404 (url "https://github.com/dieterv/elib.intl.git")
4405 (commit "d09997cfef")))
4406 (file-name (string-append name "-" version "-checkout"))
4407 (sha256
4408 (base32
4409 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4410 (build-system python-build-system)
4411 (arguments
4412 ;; incompatible with Python 3 (exception syntax)
4413 `(#:python ,python-2
4414 #:tests? #f))
4415 (home-page "https://github.com/dieterv/elib.intl")
4416 (synopsis "Enhanced internationalization for Python")
4417 (description
4418 "The elib.intl module provides enhanced internationalization (I18N)
4419services for your Python modules and applications.")
4420 (license license:lgpl3+)))
4421
4422(define-public python-olefile
4423 (package
4424 (name "python-olefile")
5bef0f10 4425 (version "0.46")
44d10b1f
RW
4426 (source
4427 (origin
4428 (method url-fetch)
5bef0f10
MB
4429 (uri (string-append "https://github.com/decalage2/olefile/releases/"
4430 "download/v" version "/olefile-" version ".tar.gz"))
44d10b1f
RW
4431 (file-name (string-append name "-" version ".tar.gz"))
4432 (sha256
4433 (base32
5bef0f10 4434 "1kjxh4gr651hpqkjfv89cfzr40hyvf3vjlda7mifiail83j7j07m"))))
44d10b1f 4435 (build-system python-build-system)
5bef0f10 4436 (home-page "https://www.decalage.info/python/olefileio")
44d10b1f
RW
4437 (synopsis "Read and write Microsoft OLE2 files.")
4438 (description
4439 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
4440Storage or Compound Document, Microsoft Office). It is an improved version of
4441the OleFileIO module from PIL, the Python Image Library.")
4442 (license license:bsd-3)))
4443
4444(define-public python2-olefile
4445 (package-with-python2 python-olefile))
4446
4447(define-public python-pillow
4448 (package
4449 (name "python-pillow")
5fbdd917 4450 (version "6.2.1")
44d10b1f
RW
4451 (source
4452 (origin
4453 (method url-fetch)
4454 (uri (pypi-uri "Pillow" version))
4455 (sha256
4456 (base32
5fbdd917 4457 "1c8wkzc58f5wdh006jvmwdk3wxld1xgagcbdvj7iv17qi0m9fkmz"))))
44d10b1f
RW
4458 (build-system python-build-system)
4459 (native-inputs
4460 `(("python-pytest" ,python-pytest)))
4461 (inputs
4462 `(("freetype" ,freetype)
4463 ("lcms" ,lcms)
44d10b1f 4464 ("libjpeg" ,libjpeg)
44d10b1f 4465 ("libtiff" ,libtiff)
0c4e1c5f
EF
4466 ("libwebp" ,libwebp)
4467 ("openjpeg" ,openjpeg)
4468 ("zlib" ,zlib)))
44d10b1f
RW
4469 (propagated-inputs
4470 `(("python-olefile" ,python-olefile)))
4471 (arguments
4472 `(#:phases
4473 (modify-phases %standard-phases
4474 (add-after 'unpack 'patch-ldconfig
4475 (lambda _
4476 (substitute* "setup.py"
4477 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
61b77ff3 4478 (replace 'check
979d8464
EF
4479 (lambda* (#:key outputs inputs tests? #:allow-other-keys)
4480 (if tests?
4481 (begin
4482 (setenv "HOME" (getcwd))
4483 ;; Make installed package available for running the tests.
4484 (add-installed-pythonpath inputs outputs)
4485 (invoke "python" "selftest.py" "--installed")
4486 (invoke "python" "-m" "pytest" "-vv"))
4487 #t))))))
44d10b1f
RW
4488 (home-page "https://python-pillow.org")
4489 (synopsis "Fork of the Python Imaging Library")
4490 (description
4491 "The Python Imaging Library adds image processing capabilities to your
4492Python interpreter. This library provides extensive file format support, an
4493efficient internal representation, and fairly powerful image processing
4494capabilities. The core image library is designed for fast access to data
4495stored in a few basic pixel formats. It should provide a solid foundation for
4496a general image processing tool.")
4497 (license (license:x11-style
4498 "http://www.pythonware.com/products/pil/license.htm"
4499 "The PIL Software License"))))
4500
4501(define-public python2-pillow
4502 (package-with-python2 python-pillow))
4503
4504(define-public python-pycparser
4505 (package
4506 (name "python-pycparser")
c6c0940e 4507 (version "2.19")
44d10b1f
RW
4508 (source
4509 (origin
4510 (method url-fetch)
4511 (uri (pypi-uri "pycparser" version))
4512 (sha256
4513 (base32
c6c0940e 4514 "1cr5dcj9628lkz1qlwq3fv97c25363qppkmcayqvd05dpy573259"))))
44d10b1f
RW
4515 (outputs '("out" "doc"))
4516 (build-system python-build-system)
4517 (native-inputs
4518 `(("pkg-config" ,pkg-config)))
4519 (arguments
4520 `(#:phases
4521 (modify-phases %standard-phases
4522 (replace 'check
4523 (lambda _
4524 (with-directory-excursion "tests"
acb75c03
RW
4525 (invoke "python" "all_tests.py"))
4526 #t))
44d10b1f
RW
4527 (add-after 'install 'install-doc
4528 (lambda* (#:key outputs #:allow-other-keys)
4529 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4530 (doc (string-append data "/doc/" ,name "-" ,version))
4531 (examples (string-append doc "/examples")))
4532 (mkdir-p examples)
4533 (for-each (lambda (file)
4534 (copy-file (string-append "." file)
4535 (string-append doc file)))
4536 '("/README.rst" "/CHANGES" "/LICENSE"))
c6c0940e
MB
4537 (copy-recursively "examples" examples)
4538 #t))))))
44d10b1f
RW
4539 (home-page "https://github.com/eliben/pycparser")
4540 (synopsis "C parser in Python")
4541 (description
4542 "Pycparser is a complete parser of the C language, written in pure Python
4543using the PLY parsing library. It parses C code into an AST and can serve as
4544a front-end for C compilers or analysis tools.")
4545 (license license:bsd-3)))
4546
4547(define-public python2-pycparser
4548 (package-with-python2 python-pycparser))
4549
4550(define-public python-pywavelets
4551 (package
4552 (name "python-pywavelets")
4553 (version "1.0.1")
4554 (home-page "https://github.com/PyWavelets/pywt")
4555 (source (origin
4556 (method url-fetch)
4557 (uri (pypi-uri "PyWavelets" version))
4558 (sha256
4559 (base32
4560 "1p3qv2v66ghnqrb1f98wyyhp9dz71jwcd6kfpsax65sfdpiyqp1w"))))
4561 (build-system python-build-system)
4562 (arguments
4563 '(#:modules ((ice-9 ftw)
4564 (srfi srfi-1)
4565 (srfi srfi-26)
4566 (guix build utils)
4567 (guix build python-build-system))
4568 #:phases (modify-phases %standard-phases
4569 (replace 'check
4570 (lambda _
4571 (let ((cwd (getcwd))
4572 (libdir (find (cut string-prefix? "lib." <>)
4573 (scandir "build"))))
4574 (with-directory-excursion (string-append cwd "/build/" libdir)
4575 (invoke "nosetests" "-v" "."))))))))
4576 (native-inputs
4577 `(("python-matplotlib" ,python-matplotlib) ;for tests
4578 ("python-nose" ,python-nose)))
4579 (propagated-inputs
4580 `(("python-numpy" ,python-numpy)))
4581 (synopsis "Wavelet transforms in Python")
4582 (description
4583 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
4584mathematical basis functions that are localized in both time and frequency.
4585Wavelet transforms are time-frequency transforms employing wavelets. They are
4586similar to Fourier transforms, the difference being that Fourier transforms are
4587localized only in frequency instead of in time and frequency.")
4588 (license license:expat)))
4589
4590(define-public python2-pywavelets
4591 (package-with-python2 python-pywavelets))
4592
4593(define-public python-xcffib
4594 (package
4595 (name "python-xcffib")
4596 (version "0.6.0")
4597 (source
4598 (origin
4599 (method url-fetch)
4600 (uri (pypi-uri "xcffib" version))
4601 (sha256
4602 (base32
4603 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
4604 (build-system python-build-system)
4605 (inputs
4606 `(("libxcb" ,libxcb)))
4607 (propagated-inputs
4608 `(("python-cffi" ,python-cffi) ; used at run time
4609 ("python-six" ,python-six)))
4610 (arguments
4611 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
4612 #:tests? #f
4613 #:phases
4614 (modify-phases %standard-phases
4615 (add-after 'unpack 'fix-libxcb-path
4616 (lambda* (#:key inputs #:allow-other-keys)
4617 (let ((libxcb (assoc-ref inputs "libxcb")))
4618 (substitute* '("xcffib/__init__.py")
4619 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
4620 #t)))
4621 (add-after 'install 'install-doc
4622 (lambda* (#:key outputs #:allow-other-keys)
4623 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4624 "/doc/" ,name "-" ,version)))
4625 (mkdir-p doc)
4626 (copy-file "README.md"
4627 (string-append doc "/README.md"))
4628 #t))))))
4629 (home-page "https://github.com/tych0/xcffib")
4630 (synopsis "XCB Python bindings")
4631 (description
4632 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4633support for Python 3 and PyPy. It is based on cffi.")
4634 (license license:expat)))
4635
4636(define-public python2-xcffib
4637 (package-with-python2 python-xcffib))
4638
4639(define-public python-cairocffi
4640 (package
4641 (name "python-cairocffi")
4642 (version "0.9.0")
4643 (source
4644 (origin
4645 (method url-fetch)
4646 (uri (pypi-uri "cairocffi" version))
4647 (sha256
4648 (base32
4649 "0dq3k4zhqd8cwsf3nyjqvjqm8wkvrjn1wjf44rl3v0h8kqx6qf0m"))
4650 (patches (search-patches "python-cairocffi-dlopen-path.patch"))))
4651 (build-system python-build-system)
4652 (outputs '("out" "doc"))
4653 (inputs
4654 `(("glib" ,glib)
4655 ("gtk+" ,gtk+)
4656 ("gdk-pixbuf" ,gdk-pixbuf)
4657 ("cairo" ,cairo)
4658 ("pango" ,pango)))
4659 (native-inputs
4660 `(("pkg-config" ,pkg-config)
4661 ("python-pytest" ,python-pytest)
4662 ("python-pytest-cov" ,python-pytest-cov)
4663 ("python-pytest-runner" ,python-pytest-runner)
4664 ("python-sphinx" ,python-sphinx)
4665 ("python-docutils" ,python-docutils)))
4666 (propagated-inputs
4667 `(("python-xcffib" ,python-xcffib))) ; used at run time
4668 (arguments
4669 `(#:phases
4670 (modify-phases %standard-phases
4671 (add-after 'unpack 'patch-paths
4672 (lambda* (#:key inputs outputs #:allow-other-keys)
4673 (substitute* (find-files "." "\\.py$")
4674 (("dlopen\\(ffi, 'cairo'")
4675 (string-append "dlopen(ffi, '" (assoc-ref inputs "cairo")
4676 "/lib/libcairo.so.2'"))
4677 (("dlopen\\(ffi, 'gdk-3'")
4678 (string-append "dlopen(ffi, '" (assoc-ref inputs "gtk+")
4679 "/lib/libgtk-3.so.0'"))
4680 (("dlopen\\(ffi, 'gdk_pixbuf-2.0'")
4681 (string-append "dlopen(ffi, '" (assoc-ref inputs "gdk-pixbuf")
4682 "/lib/libgdk_pixbuf-2.0.so.0'"))
4683 (("dlopen\\(ffi, 'glib-2.0'")
4684 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4685 "/lib/libglib-2.0.so.0'"))
4686 (("dlopen\\(ffi, 'gobject-2.0'")
4687 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4688 "/lib/libgobject-2.0.so.0'"))
4689 (("dlopen\\(ffi, 'pangocairo-1.0'")
4690 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4691 "/lib/libpangocairo-1.0.so.0'"))
4692 (("dlopen\\(ffi, 'pango-1.0'")
4693 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4694 "/lib/libpango-1.0.so.0'")))
4695 #t))
4696 (add-after 'install 'install-doc
4697 (lambda* (#:key inputs outputs #:allow-other-keys)
4698 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4699 (doc (string-append data "/doc/" ,name "-" ,version))
4700 (html (string-append doc "/html")))
4701 (setenv "LD_LIBRARY_PATH"
4702 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4703 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4704 (setenv "LANG" "en_US.UTF-8")
4705 (mkdir-p html)
4706 (for-each (lambda (file)
4707 (copy-file (string-append "." file)
4708 (string-append doc file)))
4709 '("/README.rst" "/CHANGES" "/LICENSE"))
4710 (system* "python" "setup.py" "build_sphinx")
4711 (copy-recursively "docs/_build/html" html)
4712 #t))))))
4713 (home-page "https://github.com/Kozea/cairocffi")
4714 (synopsis "Python bindings and object-oriented API for Cairo")
4715 (description
4716 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4717Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4718graphics library with support for multiple backends including image buffers,
4719PNG, PostScript, PDF, and SVG file output.")
4720 (license license:bsd-3)))
4721
4722(define-public python2-cairocffi
4723 (package-with-python2 python-cairocffi))
4724
4725(define-public python-decorator
4726 (package
4727 (name "python-decorator")
4728 (version "4.3.0")
4729 (source
4730 (origin
4731 (method url-fetch)
4732 (uri (pypi-uri "decorator" version))
4733 (sha256
4734 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
4735 (build-system python-build-system)
4736 (home-page "https://pypi.python.org/pypi/decorator/")
4737 (synopsis "Python module to simplify usage of decorators")
4738 (description
4739 "The aim of the decorator module is to simplify the usage of decorators
4740for the average programmer, and to popularize decorators usage giving examples
4741of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4742etc. The core of this module is a decorator factory.")
4743 (license license:expat)))
4744
4745(define-public python2-decorator
4746 (package-with-python2 python-decorator))
4747
4748(define-public python-drmaa
4749 (package
4750 (name "python-drmaa")
4751 (version "0.7.7")
4752 (source
4753 (origin
4754 (method url-fetch)
4755 (uri (pypi-uri "drmaa" version))
4756 (sha256
4757 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
4758 (build-system python-build-system)
4759 ;; The test suite requires libdrmaa which is provided by the cluster
4760 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4761 ;; should be set to the path of the libdrmaa library.
4762 (arguments '(#:tests? #f))
4763 (native-inputs
4764 `(("python-nose" ,python-nose)))
4765 (home-page "https://pypi.python.org/pypi/drmaa")
4766 (synopsis "Python bindings for the DRMAA library")
4767 (description
4768 "A Python package for Distributed Resource Management (DRM) job
4769submission and control. This package is an implementation of the DRMAA 1.0
4770Python language binding specification.")
4771 (license license:bsd-3)))
4772
4773(define-public python2-drmaa
4774 (package-with-python2 python-drmaa))
4775
4776(define-public python-grako
4777 (package
4778 (name "python-grako")
4779 (version "3.99.9")
4780 (source
4781 (origin
4782 (method url-fetch)
4783 (uri
4784 (pypi-uri "grako" version ".zip"))
4785 (sha256
4786 (base32
4787 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
4788 (build-system python-build-system)
4789 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
4790 (native-inputs
4791 `(("unzip" ,unzip)
4792 ("python-pytest" ,python-pytest)
4793 ("python-pytest-runner" ,python-pytest-runner)))
4794 (home-page "https://bitbucket.org/neogeny/grako")
4795 (synopsis "EBNF parser generator")
4796 (description
4797 "Grako takes a grammar in a variation of EBNF as input, and outputs a
4798memoizing PEG/Packrat parser in Python.")
4799 (license license:bsd-3)))
4800
4801(define-public python2-grako
4802 (package-with-python2 python-grako))
4803
4804(define-public python-gridmap
4805 (package
4806 (name "python-gridmap")
4807 (version "0.13.0")
4808 (source
4809 (origin
768fea0f
TGR
4810 (method git-fetch)
4811 (uri (git-reference
4812 (url "https://github.com/pygridtools/gridmap.git")
4813 (commit (string-append "v" version))))
4814 (file-name (git-file-name name version))
44d10b1f 4815 (sha256
768fea0f 4816 (base32 "1478lbwsr1w24cii2x01m2910fvh8r43ghnb78nc972a96hqiknm"))))
44d10b1f
RW
4817 (build-system python-build-system)
4818 (arguments
4819 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
4820 (propagated-inputs
4821 `(("python-psutil" ,python-psutil)
4822 ("python-drmaa" ,python-drmaa)
4823 ("python-pyzmq" ,python-pyzmq)))
4824 (home-page "https://github.com/pygridtools/gridmap")
4825 (synopsis "Create jobs on a cluster directly from Python")
4826 (description
4827 "Gridmap is a Python package to allow you to easily create jobs on the
4828cluster directly from Python. You can directly map Python functions onto the
4829cluster without needing to write any wrapper code yourself.")
4830 (license license:gpl3+)))
4831
4832(define-public python2-gridmap
4833 (package-with-python2 python-gridmap))
4834
4835(define-public python-honcho
4836 (package
4837 (name "python-honcho")
4838 (version "1.0.1")
4839 (source
4840 (origin
8524d130
TGR
4841 (method git-fetch)
4842 (uri (git-reference
4843 (url "https://github.com/nickstenning/honcho.git")
4844 (commit (string-append "v" version))))
4845 (file-name (git-file-name name version))
44d10b1f 4846 (sha256
8524d130 4847 (base32 "11bd87474qpif20xdcn0ra1idj5k16ka51i658wfpxwc6nzsn92b"))))
44d10b1f
RW
4848 (build-system python-build-system)
4849 (native-inputs
4850 `(("python-pytest" ,python-pytest)
4851 ("python-mock" ,python-mock)
4852 ("python-tox" ,python-tox)
4853 ("which" ,which))) ;for tests
4854 (propagated-inputs
4855 `(("python-jinja2" ,python-jinja2)))
4856 (arguments
4857 `(#:phases
4858 (modify-phases %standard-phases
4859 (delete 'check)
4860 (add-after 'install 'check
4861 (lambda* (#:key outputs inputs #:allow-other-keys)
4862 ;; fix honcho path in testsuite
4863 (substitute* "tests/conftest.py"
4864 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
4865 "/bin/honcho" "'")))
4866 ;; It's easier to run tests after install.
4867 ;; Make installed package available for running the tests
4868 (add-installed-pythonpath inputs outputs)
95b707fb 4869 (invoke "py.test" "-v"))))))
44d10b1f
RW
4870 (home-page "https://github.com/nickstenning/honcho")
4871 (synopsis "Manage Procfile-based applications")
4872 (description
4873 "A Procfile is a file which describes how to run an application
50fceab0 4874consisting of several processes. honcho starts all listed processes.
44d10b1f
RW
4875The output of all running processes is collected by honcho and
4876displayed.")
4877 (license license:expat)))
4878
4879(define-public python2-honcho
4880 (package-with-python2 python-honcho))
4881
4882(define-public python-pexpect
4883 (package
4884 (name "python-pexpect")
4885 (version "4.6.0")
4886 (source
4887 (origin
4888 (method url-fetch)
4889 (uri (pypi-uri "pexpect" version))
4890 (sha256
4891 (base32 "1fla85g47iaxxpjhp9vkxdnv4pgc7rplfy6ja491smrrk0jqi3ia"))))
4892 (build-system python-build-system)
4893 (arguments
4894 `(#:phases
4895 (modify-phases %standard-phases
4896 (add-before 'check 'prepare-tests
4897 (lambda _
4898 (substitute* (find-files "tests")
4899 (("/bin/ls") (which "ls"))
4900 (("/bin/echo") (which "echo"))
4901 (("/bin/which") (which "which"))
4902 ;; Many tests try to use the /bin directory which
4903 ;; is not present in the build environment.
4904 ;; Use one that's non-empty and unlikely to change.
4905 (("/bin'") "/dev'"))
4906 ;; XXX: Socket connection test gets "Connection reset by peer".
4907 ;; Why does it not work? Delete for now.
4908 (delete-file "tests/test_socket.py")
4909 #t))
4910 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
4911 (native-inputs
4912 `(("python-nose" ,python-nose)
4913 ("python-pytest" ,python-pytest)
4914 ("man-db" ,man-db)
4915 ("which" ,which)
4916 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
4917 (propagated-inputs
4918 `(("python-ptyprocess" ,python-ptyprocess)))
4919 (home-page "http://pexpect.readthedocs.org/")
4920 (synopsis "Controlling interactive console applications")
4921 (description
4922 "Pexpect is a pure Python module for spawning child applications;
4923controlling them; and responding to expected patterns in their output.
4924Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4925child application and control it as if a human were typing commands.")
4926 (license license:isc)))
4927
4928(define-public python2-pexpect
4929 (package-with-python2 python-pexpect))
4930
4931(define-public python-setuptools-scm
4932 (package
4933 (name "python-setuptools-scm")
85092643 4934 (version "3.2.0")
44d10b1f
RW
4935 (source (origin
4936 (method url-fetch)
4937 (uri (pypi-uri "setuptools_scm" version))
4938 (sha256
4939 (base32
85092643 4940 "0n3knn3p1sqlx31k2lahn7z9bacvlv8nhlfidj77vz50bxqlgasj"))))
44d10b1f
RW
4941 (build-system python-build-system)
4942 (home-page "https://github.com/pypa/setuptools_scm/")
4943 (synopsis "Manage Python package versions in SCM metadata")
4944 (description
4945 "Setuptools_scm handles managing your Python package versions in
4946@dfn{software configuration management} (SCM) metadata instead of declaring
4947them as the version argument or in a SCM managed file.")
4948 (license license:expat)))
4949
a0b2accf
MO
4950;; Needed by python-lazy-object-proxy, remove on next update cycle.
4951(define-public python-setuptools-scm-3.3
4952 (package
4953 (inherit python-setuptools-scm)
4954 (version "3.3.3")
4955 (source (origin
4956 (method url-fetch)
4957 (uri (pypi-uri "setuptools_scm" version))
4958 (sha256
4959 (base32
4960 "19cyndx23xmpbhz4qrwmfwsmnnaczd0dw7qg977ksq2dbvxy29dx"))))))
4961
44d10b1f
RW
4962(define-public python2-setuptools-scm
4963 (package-with-python2 python-setuptools-scm))
4964
bb74ea09
RW
4965(define-public python-pathlib2
4966 (package
4967 (name "python-pathlib2")
4968 (version "2.3.3")
4969 (source
4970 (origin
4971 (method url-fetch)
4972 (uri (pypi-uri "pathlib2" version))
4973 (sha256
4974 (base32
4975 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
4976 (build-system python-build-system)
4977 (propagated-inputs
4978 `(("python-scandir" ,python-scandir)
4979 ("python-six" ,python-six)))
4980 (home-page "https://pypi.python.org/pypi/pathlib2/")
746d3384 4981 (synopsis "Object-oriented file system paths")
bb74ea09
RW
4982 (description "The goal of pathlib2 is to provide a backport of the
4983standard @code{pathlib} module which tracks the standard library module, so
4984all the newest features of the standard @code{pathlib} can be used also on
4985older Python versions.")
4986 (license license:expat)))
4987
fd5c264a
MB
4988(define-public python2-importlib-resources
4989 (package
4990 (name "python2-importlib-resources")
4991 (version "1.0.2")
4992 (source (origin
4993 (method url-fetch)
4994 (uri (pypi-uri "importlib_resources" version))
4995 (sha256
4996 (base32
4997 "0y3hg12iby1qyaspnbisz4s4vxax7syikk3skznwqizqyv89y9yk"))))
4998 (build-system python-build-system)
4999 (arguments
5000 `(#:python ,python-2))
5001 (native-inputs
5002 `(("python-wheel" ,python2-wheel)))
5003 (propagated-inputs
5004 `(("python-pathlib2" ,python2-pathlib2)
5005 ("python-typing" ,python2-typing)))
5006 (home-page "https://gitlab.com/python-devs/importlib_resources")
5007 (synopsis "Backport of @code{importlib.resources} from Python 3.7")
5008 (description
5009 "This package provides an implementation of @code{importlib.resources}
5010for older versions of Python.")
5011 (license license:asl2.0)))
5012
15b65617
RW
5013(define-public python-importlib-metadata
5014 (package
5015 (name "python-importlib-metadata")
4dc04d11 5016 (version "1.4.0")
15b65617
RW
5017 (source
5018 (origin
5019 (method url-fetch)
5020 (uri (pypi-uri "importlib_metadata" version))
5021 (sha256
4dc04d11 5022 (base32 "1n76444v7zn910xrhh8954jdn4byxbn9f1jck6b85a716mbh2z7i"))))
15b65617
RW
5023 (build-system python-build-system)
5024 (propagated-inputs
4dc04d11 5025 `(("python-zipp" ,python-zipp)))
15b65617
RW
5026 (native-inputs
5027 `(("python-setuptools-scm" ,python-setuptools-scm)
4dc04d11 5028 ("python-packaging" ,python-packaging)))
15b65617
RW
5029 (home-page "https://importlib-metadata.readthedocs.io/")
5030 (synopsis "Read metadata from Python packages")
5031 (description
5032 "@code{importlib_metadata} is a library which provides an API for
5033accessing an installed Python package's metadata, such as its entry points or
5034its top-level name. This functionality intends to replace most uses of
5035@code{pkg_resources} entry point API and metadata API. Along with
5036@code{importlib.resources} in Python 3.7 and newer, this can eliminate the
5037need to use the older and less efficient @code{pkg_resources} package.")
3dfb3d44 5038 (properties `((python2-variant . ,(delay python2-importlib-metadata))))
15b65617
RW
5039 (license license:asl2.0)))
5040
5efa04dd
MB
5041(define-public python2-importlib-metadata
5042 (let ((base (package-with-python2 (strip-python2-variant
5043 python-importlib-metadata))))
5044 (package/inherit
5045 base
5046 (name "python2-importlib-metadata")
5047 (propagated-inputs
5048 `(("python-configparser" ,python2-configparser)
5049 ("python-contextlib2" ,python2-contextlib2)
5050 ("python-importlib-resources" ,python2-importlib-resources)
5051 ("python-pathlib2" ,python2-pathlib2)
5052 ,@(package-propagated-inputs base))))))
5053
37c173d1
RW
5054(define-public python-jaraco-packaging
5055 (package
5056 (name "python-jaraco-packaging")
5057 (version "6.1")
5058 (source
5059 (origin
5060 (method url-fetch)
5061 (uri (pypi-uri "jaraco.packaging" version))
5062 (sha256
5063 (base32
5064 "0zimrnkh33b9g8ffw11mjh6kvs54cy5gcjw1h5cl1r7dc833dmkm"))))
5065 (build-system python-build-system)
5066 (propagated-inputs
5067 `(("python-pytest" ,python-pytest)
5068 ("python-pytest-checkdocs" ,python-pytest-checkdocs)
5069 ("python-pytest-flake8" ,python-pytest-flake8)
5070 ("python-rst.linker" ,python-rst.linker)
5071 ("python-setuptools" ,python-setuptools)
5072 ("python-setuptools-scm" ,python-setuptools-scm)
5073 ("python-six" ,python-six)
5074 ("python-sphinx" ,python-sphinx)))
5075 (home-page "https://github.com/jaraco/jaraco.packaging")
5076 (synopsis "Tools to supplement packaging Python releases")
5077 (description
5078 "This package provides various tools to supplement packaging Python
5079releases.")
5080 (license license:expat)))
5081
44d10b1f
RW
5082(define-public python-pathpy
5083 (package
5084 (name "python-pathpy")
a3dd8871 5085 (version "11.5.1")
44d10b1f
RW
5086 (source
5087 (origin
5088 (method url-fetch)
5089 (uri (pypi-uri "path.py" version))
5090 (sha256
a3dd8871 5091 (base32 "0ir9j1haq2jbi7aip6k2fa9l7q1l03k4hp1awxhjhcwzsnwp3ll8"))))
49ad11e9 5092 (outputs '("out" "doc"))
44d10b1f
RW
5093 (build-system python-build-system)
5094 (propagated-inputs
01a53e0b
MC
5095 `(("python-appdirs" ,python-appdirs)
5096 ("python-importlib-metadata" ,python-importlib-metadata)))
44d10b1f
RW
5097 (native-inputs
5098 `(("python-setuptools-scm" ,python-setuptools-scm)
5099 ("python-sphinx" ,python-sphinx)
5100 ("python-rst.linker" ,python-rst.linker)
5101 ("python-pytest" ,python-pytest)
49ad11e9
RW
5102 ("python-pytest-runner" ,python-pytest-runner)
5103 ("python-jaraco-packaging" ,python-jaraco-packaging)))
44d10b1f 5104 (arguments
49ad11e9
RW
5105 `(#:phases
5106 (modify-phases %standard-phases
5107 (add-after 'build 'build-doc
5108 (lambda _
5109 (setenv "LANG" "en_US.UTF-8")
5110 (invoke "python" "setup.py" "build_sphinx")))
5111 (add-after 'install 'install-doc
5112 (lambda* (#:key outputs #:allow-other-keys)
5113 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5114 (doc (string-append data "/doc/" ,name "-" ,version))
5115 (html (string-append doc "/html")))
5116 (mkdir-p html)
5117 (for-each (lambda (file)
5118 (copy-file file (string-append doc "/" file)))
5119 '("README.rst" "CHANGES.rst"))
5120 (copy-recursively "build/sphinx/html" html)
5121 #t)))
5122 (replace 'check
5123 (lambda _
5124 ;; The import time test aborts if an import takes longer than
5125 ;; 100ms. It may very well take a little longer than that.
5126 (invoke "pytest" "-v" "-k" "not test_import_time"))))))
44d10b1f
RW
5127 (home-page "https://github.com/jaraco/path.py")
5128 (synopsis "Python module wrapper for built-in os.path")
5129 (description
5130 "@code{path.py} implements path objects as first-class entities, allowing
5131common operations on files to be invoked on those path objects directly.")
5132 (license license:expat)))
5133
5134(define-public python2-pathpy
5135 (package-with-python2 python-pathpy))
5136
5137(define-public python-simplegeneric
5138 (package
5139 (name "python-simplegeneric")
5140 (version "0.8.1")
5141 (source
5142 (origin
5143 (method url-fetch)
6c8c3980 5144 (uri (pypi-uri "simplegeneric" version ".zip"))
44d10b1f
RW
5145 (sha256
5146 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
5147 (build-system python-build-system)
5148 (native-inputs
5149 `(("unzip" ,unzip)))
5150 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
5151 (synopsis "Python module for simple generic functions")
5152 (description
5153 "The simplegeneric module lets you define simple single-dispatch generic
5154functions, akin to Python’s built-in generic functions like @code{len()},
5155@code{iter()} and so on. However, instead of using specially-named methods,
5156these generic functions use simple lookup tables, akin to those used by
5157e.g. @code{pickle.dump()} and other generic functions found in the Python
5158standard library.")
5159 (license license:zpl2.1)))
5160
5161(define-public python2-simplegeneric
5162 (package-with-python2 python-simplegeneric))
5163
5164(define-public python-ipython-genutils
5165 ;; TODO: This package is retired, check if can be removed, see description.
5166 (package
5167 (name "python-ipython-genutils")
5168 (version "0.1.0")
5169 (source
5170 (origin
5171 (method url-fetch)
c9671d4b 5172 (uri (pypi-uri "ipython_genutils" version))
44d10b1f
RW
5173 (sha256
5174 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
5175 (build-system python-build-system)
5176 (arguments `(#:tests? #f)) ; no tests
5177 (home-page "https://ipython.org")
5178 (synopsis "Vestigial utilities from IPython")
5179 (description
5180 "This package provides retired utilities from IPython. No packages
5181outside IPython/Jupyter should depend on it.
5182
5183This package shouldn't exist. It contains some common utilities shared by
5184Jupyter and IPython projects during The Big Split. As soon as possible, those
5185packages will remove their dependency on this, and this package will go
5186away.")
5187 (license license:bsd-3)))
5188
5189(define-public python2-ipython-genutils
5190 (package-with-python2 python-ipython-genutils))
5191
5192(define-public python-traitlets
5193 (package
5194 (name "python-traitlets")
ac5e205a 5195 (version "4.3.3")
44d10b1f
RW
5196 (source
5197 (origin
5198 (method url-fetch)
5199 (uri (pypi-uri "traitlets" version))
5200 (sha256
5201 (base32
ac5e205a 5202 "1xsrwgivpkxlbr4dfndfsi098s29yqgswgjc1qqn69yxklvfw8yh"))))
44d10b1f
RW
5203 (build-system python-build-system)
5204 (arguments
5205 `(#:phases
5206 (modify-phases %standard-phases
5207 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
5208 (propagated-inputs
5209 `(("python-ipython-genutils" ,python-ipython-genutils)
ac5e205a 5210 ("python-decorator" ,python-decorator)))
44d10b1f
RW
5211 (native-inputs
5212 `(("python-pytest" ,python-pytest)))
5213 (properties `((python2-variant . ,(delay python2-traitlets))))
5214 (home-page "https://ipython.org")
5215 (synopsis "Configuration system for Python applications")
5216 (description
5217 "Traitlets is a framework that lets Python classes have attributes with
5218type checking, dynamically calculated default values, and ‘on change’
5219callbacks. The package also includes a mechanism to use traitlets for
5220configuration, loading values from files or from command line arguments. This
5221is a distinct layer on top of traitlets, so you can use traitlets in your code
5222without using the configuration machinery.")
5223 (license license:bsd-3)))
5224
5225(define-public python2-traitlets
5226 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
5227 (package
5228 (inherit traitlets)
5229 (propagated-inputs
5230 `(("python2-enum34" ,python2-enum34)
5231 ,@(package-propagated-inputs traitlets))))))
5232
5233(define-public python-jupyter-core
5234 (package
5235 (name "python-jupyter-core")
5236 (version "4.4.0")
5237 (source
5238 (origin
5239 (method url-fetch)
5240 (uri (string-append (pypi-uri "jupyter_core" version)))
5241 (sha256
5242 (base32
5243 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
5244 (build-system python-build-system)
5245 ;; FIXME: not sure how to run the tests
5246 (arguments `(#:tests? #f))
5247 (propagated-inputs
5248 `(("python-traitlets" ,python-traitlets)))
5249 (home-page "http://jupyter.org/")
5250 (synopsis "Jupyter base package")
5251 (description
5252 "Jupyter core is the base package on which Jupyter projects rely.")
5253 (license license:bsd-3)))
5254
5255(define-public python2-jupyter-core
5256 (package-with-python2 python-jupyter-core))
5257
5258(define-public python-jupyter-client
5259 (package
5260 (name "python-jupyter-client")
5261 (version "5.2.4")
5262 (source
5263 (origin
5264 (method url-fetch)
5265 (uri (pypi-uri "jupyter_client" version))
5266 (sha256
5267 (base32
5268 "0l9mh7ccrpl3lppym3dnky8n1nk7xarzzdcxf4q2s7aw203cpydm"))))
5269 (build-system python-build-system)
5270 ;; Tests fail because of missing native python kernel which I assume is
5271 ;; provided by the ipython package, which we cannot use because it would
5272 ;; cause a dependency cycle.
ddc586ea
LC
5273 (arguments
5274 `(#:tests? #f
5275
5276 #:phases (modify-phases %standard-phases
5277 (add-after 'unpack 'set-tool-file-names
5278 (lambda* (#:key inputs #:allow-other-keys)
5279 (let ((iproute (assoc-ref inputs "iproute")))
5280 (substitute* "jupyter_client/localinterfaces.py"
5281 (("'ip'")
5282 (string-append "'" iproute "/sbin/ip'")))
5283 #t))))))
5284 (inputs
5285 `(("iproute" ,iproute)))
44d10b1f
RW
5286 (propagated-inputs
5287 `(("python-pyzmq" ,python-pyzmq)
5288 ("python-traitlets" ,python-traitlets)
5289 ("python-jupyter-core" ,python-jupyter-core)))
5290 (home-page "http://jupyter.org/")
5291 (synopsis "Jupyter protocol implementation and client libraries")
5292 (description
5293 "The @code{jupyter_client} package contains the reference implementation
5294of the Jupyter protocol. It also provides client and kernel management APIs
5295for working with kernels, and the @code{jupyter kernelspec} entrypoint for
5296installing @code{kernelspec}s for use with Jupyter frontends.")
5297 (license license:bsd-3)))
5298
5299(define-public python2-jupyter-client
5300 (package-with-python2 python-jupyter-client))
5301
5302(define-public python-ipykernel
5303 (package
5304 (name "python-ipykernel")
08d0a355 5305 (version "5.1.3")
44d10b1f
RW
5306 (source
5307 (origin
5308 (method url-fetch)
5309 (uri (pypi-uri "ipykernel" version))
5310 (sha256
08d0a355 5311 (base32 "1a08y677lpn80qzvv7z0smgggmr5m5ayf0bs6vds47xpxl9sss5k"))))
44d10b1f
RW
5312 (build-system python-build-system)
5313 (arguments
5314 `(#:phases
5315 (modify-phases %standard-phases
5316 (replace 'check
5317 (lambda _
5318 (setenv "HOME" "/tmp")
5319 (invoke "pytest" "-v")
aa856d02
LC
5320 #t))
5321 (add-after 'install 'set-python-file-name
5322 (lambda* (#:key outputs #:allow-other-keys)
5323 ;; Record the absolute file name of the 'python' executable in
5324 ;; 'kernel.json'.
5325 (let ((out (assoc-ref outputs "out")))
5326 (substitute* (string-append out "/share/jupyter"
5327 "/kernels/python3/kernel.json")
5328 (("\"python\"")
5329 (string-append "\"" (which "python") "\"")))
5330 #t))))))
44d10b1f
RW
5331 (propagated-inputs
5332 `(("python-ipython" ,python-ipython)
5333 ;; imported at runtime during connect
5334 ("python-jupyter-client" ,python-jupyter-client)))
5335 (native-inputs
08d0a355
TGR
5336 `(("python-flaky" ,python-flaky)
5337 ("python-nose" ,python-nose)
5338 ("python-pytest" ,python-pytest)))
44d10b1f
RW
5339 (home-page "https://ipython.org")
5340 (synopsis "IPython Kernel for Jupyter")
5341 (description
5342 "This package provides the IPython kernel for Jupyter.")
5343 (license license:bsd-3)))
5344
0f378947 5345;; Version 5.1.1 and above no longer support Python 2.
44d10b1f 5346(define-public python2-ipykernel
0f378947
RW
5347 (package
5348 (name "python2-ipykernel")
5349 (version "5.1.0")
5350 (source
5351 (origin
5352 (method url-fetch)
5353 (uri (pypi-uri "ipykernel" version))
5354 (sha256
5355 (base32 "0br95qhrd5k65g10djngiy27hs0642301hlf2q142i8djabvzh0g"))))
5356 (build-system python-build-system)
5357 (arguments
5358 `(#:python ,python-2
5359 #:phases
5360 (modify-phases %standard-phases
5361 (replace 'check
5362 (lambda _
5363 (setenv "HOME" "/tmp")
5364 (invoke "pytest" "-v")
5365 #t)))))
5366 (propagated-inputs
5367 `(("python2-ipython" ,python2-ipython)
5368 ;; imported at runtime during connect
5369 ("python2-jupyter-client" ,python2-jupyter-client)))
5370 (native-inputs
5371 `(("python2-pytest" ,python2-pytest)
5372 ("python2-nose" ,python2-nose)))
5373 (home-page "https://ipython.org")
5374 (synopsis "IPython Kernel for Jupyter")
5375 (description
5376 "This package provides the IPython kernel for Jupyter.")
5377 (license license:bsd-3)))
44d10b1f 5378
966aa714
AE
5379(define-public python-pari-jupyter
5380 (package
5381 (name "python-pari-jupyter")
5382 (version "1.3.2")
5383 (source
5384 (origin
5385 (method url-fetch)
5386 (uri (pypi-uri "pari_jupyter" version))
5387 (sha256
5388 (base32
5389 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
5390 (build-system python-build-system)
5391 (propagated-inputs
5392 `(("python-ipykernel" ,python-ipykernel)))
5393 (inputs
5394 `(("pari-gp" ,pari-gp)
5395 ("readline" ,readline)))
5396 (arguments
5397 `(#:tests? #f)) ; no test suite
5398 (home-page
5399 "https://github.com/jdemeyer/pari_jupyter")
5400 (synopsis "A Jupyter kernel for PARI/GP")
5401 (description "The package provides a PARI/GP kernel for Jupyter.")
5402 (license license:gpl3+)))
5403
dede052a
RW
5404(define-public python-backcall
5405 (package
5406 (name "python-backcall")
5407 (version "0.1.0")
5408 (source
5409 (origin
5410 (method url-fetch)
5411 (uri (pypi-uri "backcall" version))
5412 (sha256
5413 (base32
5414 "1r01dqch3f8fdj3n6fviw8hxqrs6w5v0qw4izmvqzry1w9dxiv1q"))))
5415 (build-system python-build-system)
5416 (home-page "https://github.com/takluyver/backcall/")
5417 (synopsis "Specifications for callback functions passed in to an API")
5418 (description
5419 "If your code lets other people supply callback functions, it's important
5420to specify the function signature you expect, and check that functions support
5421that. Adding extra parameters later would break other peoples code unless
5422you're careful. The @code{backcall} package provides a way of specifying the
5423callback signature using a prototype function.")
5424 (license license:bsd-3)))
5425
44d10b1f
RW
5426;; This is the latest release of the LTS version of ipython with support for
5427;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
8b5f756c
RW
5428;; dropped support for Python 2.7.
5429(define-public python2-ipython
44d10b1f 5430 (package
8b5f756c 5431 (name "python2-ipython")
44d10b1f
RW
5432 (version "5.8.0")
5433 (source
5434 (origin
5435 (method url-fetch)
5436 (uri (pypi-uri "ipython" version ".tar.gz"))
5437 (sha256
5438 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
5439 (build-system python-build-system)
44d10b1f 5440 (propagated-inputs
8b5f756c
RW
5441 `(("python2-backports-shutil-get-terminal-size"
5442 ,python2-backports-shutil-get-terminal-size)
5443 ("python2-pathlib2" ,python2-pathlib2)
5444 ("python2-pyzmq" ,python2-pyzmq)
5445 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
5446 ("python2-terminado" ,python2-terminado)
5447 ("python2-matplotlib" ,python2-matplotlib)
5448 ("python2-numpy" ,python2-numpy)
5449 ("python2-numpydoc" ,python2-numpydoc)
5450 ("python2-jinja2" ,python2-jinja2)
5451 ("python2-mistune" ,python2-mistune)
5452 ("python2-pexpect" ,python2-pexpect)
5453 ("python2-pickleshare" ,python2-pickleshare)
5454 ("python2-simplegeneric" ,python2-simplegeneric)
5455 ("python2-jsonschema" ,python2-jsonschema)
5456 ("python2-traitlets" ,python2-traitlets)
5457 ("python2-nbformat" ,python2-nbformat)
5458 ("python2-pygments" ,python2-pygments)))
5459 (inputs
5460 `(("readline" ,readline)
5461 ("which" ,which)))
5462 (native-inputs
5463 `(("graphviz" ,graphviz)
5464 ("pkg-config" ,pkg-config)
5465 ("python2-requests" ,python2-requests) ;; for tests
5466 ("python2-testpath" ,python2-testpath)
5467 ("python2-mock" ,python2-mock)
5468 ("python2-nose" ,python2-nose)))
5469 (arguments
5470 `(#:python ,python-2
5471 #:phases
5472 (modify-phases %standard-phases
5473 (add-before 'check 'delete-broken-tests
5474 (lambda* (#:key inputs #:allow-other-keys)
5475 ;; These tests throw errors for unknown reasons.
5476 (delete-file "IPython/core/tests/test_profile.py")
5477 (delete-file "IPython/core/tests/test_interactiveshell.py")
5478 (delete-file "IPython/core/tests/test_magic.py")
5479 #t)))))
5480 (home-page "https://ipython.org")
5481 (synopsis "IPython is a tool for interactive computing in Python")
5482 (description
5483 "IPython provides a rich architecture for interactive computing with:
5484Powerful interactive shells, a browser-based notebook, support for interactive
5485data visualization, embeddable interpreters and tools for parallel
5486computing.")
5487 (license license:bsd-3)))
5488
5489(define-public python-ipython
5490 (package
5491 (name "python-ipython")
ee515773 5492 (version "7.9.0")
8b5f756c
RW
5493 (source
5494 (origin
5495 (method url-fetch)
5496 (uri (pypi-uri "ipython" version ".tar.gz"))
5497 (sha256
ee515773 5498 (base32 "103jkw18z7fnwdal1mdbijjxi1fndzn31g887lmj7ddpf2r07lyz"))))
8b5f756c
RW
5499 (build-system python-build-system)
5500 (propagated-inputs
5501 `(("python-backcall" ,python-backcall)
5502 ("python-pyzmq" ,python-pyzmq)
5503 ("python-prompt-toolkit" ,python-prompt-toolkit)
44d10b1f
RW
5504 ("python-terminado" ,python-terminado)
5505 ("python-matplotlib" ,python-matplotlib)
5506 ("python-numpy" ,python-numpy)
5507 ("python-numpydoc" ,python-numpydoc)
8b5f756c 5508 ("python-jedi" ,python-jedi)
44d10b1f
RW
5509 ("python-jinja2" ,python-jinja2)
5510 ("python-mistune" ,python-mistune)
5511 ("python-pexpect" ,python-pexpect)
5512 ("python-pickleshare" ,python-pickleshare)
5513 ("python-simplegeneric" ,python-simplegeneric)
5514 ("python-jsonschema" ,python-jsonschema)
5515 ("python-traitlets" ,python-traitlets)
5516 ("python-nbformat" ,python-nbformat)
5517 ("python-pygments" ,python-pygments)))
5518 (inputs
5519 `(("readline" ,readline)
5520 ("which" ,which)))
5521 (native-inputs
5522 `(("graphviz" ,graphviz)
5523 ("pkg-config" ,pkg-config)
5524 ("python-requests" ,python-requests) ;; for tests
5525 ("python-testpath" ,python-testpath)
8b5f756c 5526 ("python-nose" ,python-nose)))
44d10b1f
RW
5527 (arguments
5528 `(#:phases
5529 (modify-phases %standard-phases
0f272518
RW
5530 (add-after 'unpack 'make-docs-reproducible
5531 (lambda _
5532 (substitute* "IPython/sphinxext/ipython_directive.py"
5533 ((".*import datetime") "")
5534 ((".*datetime.datetime.now\\(\\)") "")
5535 (("%timeit") "# %timeit"))
5536 #t))
44d10b1f
RW
5537 ;; Tests can only be run after the library has been installed and not
5538 ;; within the source directory.
5539 (delete 'check)
5540 (add-after 'install 'check
5541 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5542 (if tests?
5543 (begin
5544 ;; Make installed package available for running the tests
5545 (add-installed-pythonpath inputs outputs)
5546 (setenv "HOME" "/tmp/") ;; required by a test
5547 ;; We only test the core because one of the other tests
5548 ;; tries to import ipykernel.
5549 (invoke "python" "IPython/testing/iptest.py"
5550 "-v" "IPython/core/tests"))
5551 #t)))
5552 (add-before 'check 'fix-tests
5553 (lambda* (#:key inputs #:allow-other-keys)
5554 (substitute* "./IPython/utils/_process_posix.py"
5555 (("/usr/bin/env', 'which") (which "which")))
5556 (substitute* "./IPython/core/tests/test_inputtransformer.py"
5557 (("#!/usr/bin/env python")
5558 (string-append "#!" (which "python"))))
44d10b1f
RW
5559 ;; This test introduces a circular dependency on ipykernel
5560 ;; (which depends on ipython).
5561 (delete-file "IPython/core/tests/test_display.py")
8b5f756c 5562 ;; AttributeError: module 'IPython.core' has no attribute 'formatters'
44d10b1f 5563 (delete-file "IPython/core/tests/test_interactiveshell.py")
44d10b1f
RW
5564 #t)))))
5565 (home-page "https://ipython.org")
5566 (synopsis "IPython is a tool for interactive computing in Python")
5567 (description
5568 "IPython provides a rich architecture for interactive computing with:
5569Powerful interactive shells, a browser-based notebook, support for interactive
5570data visualization, embeddable interpreters and tools for parallel
5571computing.")
8b5f756c 5572 (license license:bsd-3)))
44d10b1f 5573
8b5f756c
RW
5574(define-public python-ipython-documentation
5575 (package
5576 (inherit python-ipython)
5577 (name "python-ipython-documentation")
5578 (version (package-version python-ipython))
5579 (arguments
5580 `(#:phases
5581 (modify-phases %standard-phases
5582 (delete 'build)
5583 (delete 'check)
5584 (replace 'install
5585 (lambda* (#:key outputs #:allow-other-keys)
5586 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
5587 (doc (string-append data "/doc/" ,name "-" ,version))
5588 (html (string-append doc "/html"))
5589 (man1 (string-append data "/man/man1"))
5590 (info (string-append data "/info"))
5591 (examples (string-append doc "/examples"))
5592 (python-arg (string-append "PYTHON=" (which "python"))))
5593 (setenv "LANG" "en_US.utf8")
5594 (with-directory-excursion "docs"
5595 ;; FIXME: pdf fails to build
5596 ;;(system* "make" "pdf" "PAPER=a4")
5597 (system* "make" python-arg "html")
5598 ;; FIXME: the generated texi file contains ^@^@, which trips
5599 ;; up the parser.
5600 ;; (system* "make" python-arg "info")
5601 )
5602 (copy-recursively "docs/man" man1)
5603 (copy-recursively "examples" examples)
5604 (copy-recursively "docs/build/html" html)
5605 ;; (copy-file "docs/build/latex/ipython.pdf"
5606 ;; (string-append doc "/ipython.pdf"))
5607 (mkdir-p info)
5608 ;; (copy-file "docs/build/texinfo/ipython.info"
5609 ;; (string-append info "/ipython.info"))
5610 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
5611 #t)))))
5612 (inputs
5613 `(("python-ipython" ,python-ipython)
5614 ("python-ipykernel" ,python-ipykernel)))
5615 (native-inputs
5616 `(("python-sphinx" ,python-sphinx)
5617 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
5618 ;; FIXME: It's possible that a smaller union would work just as well.
f75aa97f 5619 ("texlive" ,(texlive-union (list texlive-amsfonts
8b5f756c
RW
5620 texlive-fonts-ec
5621 texlive-generic-ifxetex
5622 texlive-generic-pdftex
8b5f756c
RW
5623 texlive-latex-capt-of
5624 texlive-latex-cmap
5625 texlive-latex-environ
5626 texlive-latex-eqparbox
5627 texlive-latex-etoolbox
5628 texlive-latex-expdlist
5629 texlive-latex-fancyhdr
5630 texlive-latex-fancyvrb
5631 texlive-latex-fncychap
5632 texlive-latex-float
5633 texlive-latex-framed
5634 texlive-latex-geometry
5635 texlive-latex-graphics
5636 texlive-latex-hyperref
5637 texlive-latex-mdwtools
5638 texlive-latex-multirow
5639 texlive-latex-needspace
5640 texlive-latex-oberdiek
5641 texlive-latex-parskip
5642 texlive-latex-preview
5643 texlive-latex-tabulary
5644 texlive-latex-threeparttable
5645 texlive-latex-titlesec
5646 texlive-latex-trimspaces
5647 texlive-latex-ucs
5648 texlive-latex-upquote
5649 texlive-latex-url
5650 texlive-latex-varwidth
5651 texlive-latex-wrapfig)))
5652 ("texinfo" ,texinfo)))))
44d10b1f
RW
5653
5654(define-public python-urwid
5655 (package
5656 (name "python-urwid")
5657 (version "2.0.1")
5658 (source
5659 (origin
5660 (method url-fetch)
5661 (uri (pypi-uri "urwid" version))
5662 (sha256
5663 (base32
5664 "1g6cpicybvbananpjikmjk8npmjk4xvak1wjzji62wc600wkwkb4"))))
5665 (build-system python-build-system)
5666 (home-page "http://urwid.org")
5667 (synopsis "Console user interface library for Python")
5668 (description
5669 "Urwid is a curses-based UI/widget library for Python. It includes many
5670features useful for text console applications.")
5671 (license license:lgpl2.1+)))
5672
5673(define-public python2-urwid
5674 (package-with-python2 python-urwid))
5675
5676(define-public python-urwidtrees
5677 (package
5678 (name "python-urwidtrees")
5679 (version "1.0.2")
5680 (source
5681 (origin
c8364072 5682 (method git-fetch)
44d10b1f
RW
5683 ;; package author intends on distributing via github rather than pypi:
5684 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
c8364072
EF
5685 (uri (git-reference
5686 (url "https://github.com/pazz/urwidtrees")
5687 (commit version)))
5688 (file-name (git-file-name name version))
44d10b1f
RW
5689 (sha256
5690 (base32
c8364072 5691 "1n1kpidvkdnsqyb82vlvk78gmly96kh8351lqxn2pzgwwns6fml2"))))
44d10b1f
RW
5692 (build-system python-build-system)
5693 (arguments
26bb7fc6
EF
5694 '(#:use-setuptools? #f
5695 #:tests? #f)) ; no tests
44d10b1f
RW
5696 (propagated-inputs `(("python-urwid" ,python-urwid)))
5697 (home-page "https://github.com/pazz/urwidtrees")
5698 (synopsis "Tree widgets for urwid")
5699 (description "Urwidtrees is a Widget Container API for the @code{urwid}
5700toolkit. Use it to build trees of widgets.")
5701 (license license:gpl3+)))
5702
5703(define-public python2-urwidtrees
5704 (package-with-python2 python-urwidtrees))
5705
5706(define-public python-ua-parser
5707 (package
5708 (name "python-ua-parser")
5709 (version "0.8.0")
5710 (source
5711 (origin
5712 (method url-fetch)
5713 (uri (pypi-uri "ua-parser" version))
5714 (sha256
5715 (base32
5716 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
5717 (build-system python-build-system)
5718 (arguments
5719 `(#:tests? #f)) ;no test suite in release
5720 (native-inputs
5721 `(("python-pyyaml" ,python-pyyaml)))
5722 (home-page "https://github.com/ua-parser/uap-python")
5723 (synopsis "User agent parser")
5724 (description
5725 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
5726 (license license:asl2.0)))
5727
5728(define-public python2-ua-parser
5729 (package-with-python2 python-ua-parser))
5730
5731(define-public python-user-agents
5732 (package
5733 (name "python-user-agents")
5734 (version "1.1.0")
5735 (source
5736 (origin
5737 (method url-fetch)
5738 (uri (pypi-uri "user-agents" version))
5739 (sha256
5740 (base32
5741 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
5742 (build-system python-build-system)
5743 (arguments
5744 `(#:tests? #f)) ;missing devices.json test file in release
5745 (propagated-inputs
5746 `(("python-ua-parser" ,python-ua-parser)))
5747 (home-page "https://github.com/selwin/python-user-agents")
5748 (synopsis "User Agent strings parsing library")
5749 (description
5750 "A library to identify devices (phones, tablets) and their capabilities by
5751parsing (browser/HTTP) user agent strings.")
5752 (license license:expat)))
5753
5754(define-public python2-user-agents
5755 (package-with-python2 python-user-agents))
5756
5757(define-public python-dbus
5758 (package
5759 (name "python-dbus")
ba5ef999 5760 (version "1.2.14")
44d10b1f
RW
5761 (source
5762 (origin
5763 (method url-fetch)
5764 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
5765 "dbus-python-" version ".tar.gz"))
5766 (sha256
ba5ef999 5767 (base32 "0cdchkgnivlka4lf8q4qfk0yxq483i3r3aqickjf8hfn7nx0c0mi"))))
44d10b1f 5768 (build-system gnu-build-system)
44d10b1f
RW
5769 (native-inputs
5770 `(("pkg-config" ,pkg-config)))
5771 (inputs
5772 `(("python" ,python-wrapper)
5773 ("dbus-glib" ,dbus-glib)))
5774 (synopsis "Python bindings for D-bus")
5775 (description "python-dbus provides bindings for libdbus, the reference
5776implementation of D-Bus.")
5777 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
5778 (license license:expat)))
5779
5780(define-public python2-dbus
5781 (package (inherit python-dbus)
5782 (name "python2-dbus")
5783 (inputs `(("python" ,python-2)
5784 ,@(alist-delete "python"
5785 (package-inputs python-dbus)
ba5ef999 5786 equal?)))))
44d10b1f 5787
fb236fdd
AG
5788(define-public python-notify2
5789 (package
5790 (name "python-notify2")
5791 (version "0.3.1")
5792 (source
5793 (origin
5794 (method url-fetch)
5795 (uri (pypi-uri "notify2" version))
5796 (sha256
5797 (base32
5798 "0z8rrv9rsg1r2qgh2dxj3dfj5xnki98kgi3w839kqby4a26i1yik"))))
5799 (build-system python-build-system)
5800 (arguments `(#:tests? #f)) ; tests depend on system state
5801 (native-inputs
5802 `(("python-dbus" ,python-dbus)))
5803 (home-page "https://bitbucket.org/takluyver/pynotify2")
5804 (synopsis "Python interface to D-Bus notifications")
5805 (description
5806 "Pynotify2 provides a Python interface for sending D-Bus notifications.
5807It is a reimplementation of pynotify in pure Python, and an alternative to
5808the GObject Introspection bindings to libnotify for non-GTK applications.")
5809 (license (list license:bsd-2
5810 license:lgpl2.1+))))
5811
5812(define-public python2-notify2
5813 (package-with-python2 python-notify2))
5814
44d10b1f
RW
5815;; beautifulsoup4 has a totally different namespace than 3.x,
5816;; and pypi seems to put it under its own name, so I guess we should too
5817(define-public python-beautifulsoup4
5818 (package
5819 (name "python-beautifulsoup4")
abb53e6f 5820 (version "4.7.1")
44d10b1f
RW
5821 (source
5822 (origin
5823 (method url-fetch)
5824 (uri (pypi-uri "beautifulsoup4" version))
5825 (sha256
5826 (base32
abb53e6f 5827 "0j2kycz2dxgx68xzjm7rxg5xn6v61gq5ifvxyg99slmqkybnal4l"))))
44d10b1f
RW
5828 (build-system python-build-system)
5829 (arguments
5830 `(#:phases
5831 (modify-phases %standard-phases
5832 ;; The Python 2 source is the definitive source of beautifulsoup4. We
5833 ;; must use this conversion script when building with Python 3. The
5834 ;; conversion script also runs the tests.
5835 ;; For more information, see the file 'convert-py3k' in the source
5836 ;; distribution.
5837 (replace 'check
dff0197e 5838 (lambda _ (invoke "./convert-py3k"))))))
f83e10e4 5839 (propagated-inputs
abb53e6f 5840 `(("python-soupsieve" ,python-soupsieve)))
44d10b1f
RW
5841 (home-page
5842 "https://www.crummy.com/software/BeautifulSoup/bs4/")
5843 (synopsis
5844 "Python screen-scraping library")
5845 (description
5846 "Beautiful Soup is a Python library designed for rapidly setting up
5847screen-scraping projects. It offers Pythonic idioms for navigating,
5848searching, and modifying a parse tree, providing a toolkit for
5849dissecting a document and extracting what you need. It automatically
5850converts incoming documents to Unicode and outgoing documents to UTF-8.")
5851 (license license:expat)
5852 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
5853
5854(define-public python2-beautifulsoup4
5855 (package
5856 (inherit (package-with-python2
5857 (strip-python2-variant python-beautifulsoup4)))
5858 (arguments `(#:python ,python-2))))
5859
ad74978a
BT
5860(define-public python-soupsieve
5861 (package
5862 (name "python-soupsieve")
3367df31 5863 (version "1.9.5")
ad74978a
BT
5864 (source
5865 (origin
5866 (method url-fetch)
5867 (uri (pypi-uri "soupsieve" version))
5868 (sha256
5869 (base32
3367df31 5870 "1nhd0q0ifwva9wn645s6pn74p1rd97asn3qfg75nphx1wkgcbhg2"))))
ad74978a
BT
5871 (build-system python-build-system)
5872 (arguments `(#:tests? #f))
5873 ;;XXX: 2 tests fail currently despite claming they were to be
5874 ;;skipped. Also, beautifulsoup4 may depend on this in the future, so we
5875 ;;don't want to create a circular dependency.
5876 (home-page "https://github.com/facelessuser/soupsieve")
5877 (synopsis "CSS selector library")
5878 (description
5879 "Soup Sieve is a CSS selector library designed to be used with Beautiful
5880Soup 4. It aims to provide selecting, matching, and filtering using modern
5881CSS selectors. Soup Sieve currently provides selectors from the CSS level 1
5882specifications up through the latest CSS level 4 drafts and beyond (though
5883some are not yet implemented).")
d00b83fb 5884 (properties `((python2-variant . ,(delay python2-soupsieve))))
ad74978a
BT
5885 (license license:expat)))
5886
5887(define-public python2-soupsieve
d00b83fb 5888 (let ((base (package-with-python2 (strip-python2-variant python-soupsieve))))
ad74978a
BT
5889 (package
5890 (inherit base)
5891 (propagated-inputs
d00b83fb
MB
5892 `(("python2-backports-functools-lru-cache"
5893 ,python2-backports-functools-lru-cache)
5894 ,@(package-propagated-inputs base))))))
ad74978a 5895
44d10b1f
RW
5896(define-public python-netifaces
5897 (package
5898 (name "python-netifaces")
5899 (version "0.10.7")
5900 (source
5901 (origin
5902 (method url-fetch)
5903 (uri (pypi-uri "netifaces" version))
5904 (sha256
5905 (base32
5906 "1gccklrcplbbqh81g1mdgpa5y8na7kkf29cq2ka3f5a2fp5hyndx"))))
5907 (build-system python-build-system)
5908 (home-page "https://github.com/al45tair/netifaces")
5909 (synopsis
5910 "Python module for portable network interface information")
5911 (description
5912 "Netifaces is a Python module providing information on network
5913interfaces in an easy and portable manner.")
5914 (license license:expat)))
5915
5916(define-public python2-netifaces
5917 (package-with-python2 python-netifaces))
5918
5919(define-public python-networkx
5920 (package
5921 (name "python-networkx")
5922 (version "2.2")
5923 (source
5924 (origin
5925 (method url-fetch)
5926 (uri (pypi-uri "networkx" version ".zip"))
5927 (sha256
5928 (base32 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
5929 (build-system python-build-system)
5930 ;; python-decorator is needed at runtime.
5931 (propagated-inputs
5932 `(("python-decorator" ,python-decorator)))
5933 (native-inputs
5934 `(("python-nose" ,python-nose)
5935 ("unzip" ,unzip)))
5936 (home-page "https://networkx.github.io/")
5937 (synopsis "Python module for creating and manipulating graphs and networks")
5938 (description
5939 "NetworkX is a Python package for the creation, manipulation, and study
5940of the structure, dynamics, and functions of complex networks.")
5941 (license license:bsd-3)))
5942
5943(define-public python2-networkx
5944 (package-with-python2 python-networkx))
5945
5946(define-public python-datrie
5947 (package
5948 (name "python-datrie")
0b58cb42 5949 (version "0.8")
44d10b1f
RW
5950 (source
5951 (origin
5952 (method url-fetch)
5953 (uri (pypi-uri "datrie" version))
5954 (sha256
5955 (base32
0b58cb42 5956 "0338r8xgmpy78556jhms0h6qkvyjr10p8bpgdvcpqzm9lrmxmmdx"))))
44d10b1f 5957 (build-system python-build-system)
44d10b1f
RW
5958 (native-inputs
5959 `(("python-cython" ,python-cython)
5960 ("python-hypothesis" ,python-hypothesis)
5961 ("python-pytest" ,python-pytest)
5962 ("python-pytest-runner" ,python-pytest-runner)))
5963 (home-page "https://github.com/kmike/datrie")
5964 (synopsis "Fast, efficiently stored trie for Python")
5965 (description
5966 "This package provides a fast, efficiently stored trie implementation for
5967Python.")
5968 (license license:lgpl2.1+)))
5969
5970(define-public snakemake
5971 (package
5972 (name "snakemake")
93803c6b 5973 (version "5.7.1")
44d10b1f
RW
5974 (source
5975 (origin
5976 (method url-fetch)
5977 (uri (pypi-uri "snakemake" version))
5978 (sha256
93803c6b 5979 (base32 "1pnpvvn8n2a78cg360wz3ldmpqrsm2wzi0c0dmvki9fnsw6fxdas"))))
44d10b1f
RW
5980 (build-system python-build-system)
5981 (arguments
5982 ;; TODO: Package missing test dependencies.
5983 '(#:tests? #f
5984 #:phases
5985 (modify-phases %standard-phases
5986 ;; For cluster execution Snakemake will call Python. Since there is
5987 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
5988 ;; this by calling the snakemake wrapper instead.
5989 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
5990 (lambda* (#:key outputs #:allow-other-keys)
5991 (substitute* "snakemake/executors.py"
5992 (("\\{sys.executable\\} -m snakemake")
5993 (string-append (assoc-ref outputs "out")
5994 "/bin/snakemake")))
5995 #t)))))
5996 (propagated-inputs
8994ae34 5997 `(("python-appdirs" ,python-appdirs)
44d10b1f
RW
5998 ("python-configargparse" ,python-configargparse)
5999 ("python-datrie" ,python-datrie)
6000 ("python-docutils" ,python-docutils)
8994ae34 6001 ("python-gitpython" ,python-gitpython)
44d10b1f
RW
6002 ("python-jinja2" ,python-jinja2)
6003 ("python-jsonschema" ,python-jsonschema)
6004 ("python-networkx" ,python-networkx)
93803c6b 6005 ("python-psutil" ,python-psutil)
44d10b1f 6006 ("python-pyyaml" ,python-pyyaml)
8994ae34
TGR
6007 ("python-ratelimiter" ,python-ratelimiter)
6008 ("python-requests" ,python-requests)
6009 ("python-wrapt" ,python-wrapt)))
44d10b1f
RW
6010 (home-page "https://snakemake.readthedocs.io")
6011 (synopsis "Python-based execution environment for make-like workflows")
6012 (description
6013 "Snakemake aims to reduce the complexity of creating workflows by
6014providing a clean and modern domain specific specification language (DSL) in
6015Python style, together with a fast and comfortable execution environment.")
6016 (license license:expat)))
6017
44d10b1f
RW
6018(define-public python-pyqrcode
6019 (package
6020 (name "python-pyqrcode")
6021 (version "1.2.1")
6022 (source
6023 (origin
6024 (method url-fetch)
6025 (uri (pypi-uri "PyQRCode" version))
6026 (sha256
6027 (base32
6028 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
6029 (build-system python-build-system)
6030 (home-page
6031 "https://github.com/mnooner256/pyqrcode")
6032 (synopsis "QR code generator")
6033 (description
6034 "Pyqrcode is a QR code generator written purely in Python with
6035SVG, EPS, PNG and terminal output.")
6036 (license license:bsd-3)))
6037
6038(define-public python-seaborn
6039 (package
6040 (name "python-seaborn")
6041 (version "0.9.0")
6042 (source
6043 (origin
6044 (method url-fetch)
6045 (uri (pypi-uri "seaborn" version))
6046 (sha256
f9bd82e7
RW
6047 (base32 "0bqysi3fxfjl1866m5jq8z7mynhqbqnikim74dmzn8539iwkzj3n"))
6048 (patches
6049 (list (origin
6050 (method url-fetch)
6051 ;; This has already been merged, but there is no new
6052 ;; release including this patch. It fixes problems
6053 ;; with axis rotation that would lead to test
6054 ;; failures.
6055 (uri "https://patch-diff.githubusercontent.com/raw/mwaskom/seaborn/pull/1716.diff")
6056 (sha256
6057 (base32
6058 "1lm870z316n9ivsyr86hpk1gxaraw0mrjvq42lqsm0znhjdp9q9w"))
6059 (file-name "seaborn-0.9.0-axis-rotation.patch"))))))
44d10b1f
RW
6060 (build-system python-build-system)
6061 (arguments
6062 `(#:phases
6063 (modify-phases %standard-phases
6064 (add-before 'check 'start-xserver
6065 (lambda* (#:key inputs #:allow-other-keys)
6066 (let ((xorg-server (assoc-ref inputs "xorg-server")))
6067 ;; There must be a running X server and make check doesn't
6068 ;; start one. Therefore we must do it.
6069 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
6070 (setenv "DISPLAY" ":1")
6071 #t)))
a1322765
RW
6072 (add-after 'unpack 'fix-tests
6073 (lambda _
6074 ;; test_cbar_ticks fails probably because of matplotlib's
6075 ;; expectation of using an older version of FreeType.
6076 (delete-file "seaborn/tests/test_matrix.py")
6077 #t))
44d10b1f
RW
6078 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
6079 (propagated-inputs
6080 `(("python-pandas" ,python-pandas)
6081 ("python-matplotlib" ,python-matplotlib)
6082 ("python-numpy" ,python-numpy)
6083 ("python-scipy" ,python-scipy)))
6084 (native-inputs
6085 `(("python-pytest" ,python-pytest)
ff337525 6086 ("xorg-server" ,xorg-server-for-tests)))
44d10b1f
RW
6087 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
6088 (synopsis "Statistical data visualization")
6089 (description
6090 "Seaborn is a library for making attractive and informative statistical
6091graphics in Python. It is built on top of matplotlib and tightly integrated
6092with the PyData stack, including support for numpy and pandas data structures
6093and statistical routines from scipy and statsmodels.")
6094 (license license:bsd-3)))
6095
6096(define-public python2-seaborn
6097 (package-with-python2 python-seaborn))
6098
6099(define-public python-mpmath
6100 (package
6101 (name "python-mpmath")
6102 (version "0.19")
6103 (source (origin
6104 (method url-fetch)
6105 (uri (string-append "http://mpmath.org/files/mpmath-"
6106 version ".tar.gz"))
6107 (sha256
6108 (base32
6109 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
6110 (build-system python-build-system)
6111 (arguments
6112 '(#:phases
6113 (modify-phases %standard-phases
6114 (replace 'check
6115 (lambda _
5d7a6f1c 6116 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
44d10b1f
RW
6117 (home-page "http://mpmath.org")
6118 (synopsis "Arbitrary-precision floating-point arithmetic in python")
6119 (description
6120 "@code{mpmath} can be used as an arbitrary-precision substitute for
6121Python's float/complex types and math/cmath modules, but also does much
6122more advanced mathematics.")
6123 (license license:bsd-3)))
6124
6125(define-public python2-mpmath
6126 (package-with-python2 python-mpmath))
6127
6128(define-public python-bigfloat
6129 (package
6130 (name "python-bigfloat")
6131 (version "0.3.0")
6132 (source
6133 (origin
6134 (method url-fetch)
6135 (uri (pypi-uri "bigfloat" version))
6136 (sha256
6137 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
6138 (build-system python-build-system)
6139 (inputs
6140 `(("mpfr" ,mpfr)))
6141 (home-page "https://github.com/mdickinson/bigfloat")
6142 (synopsis "Arbitrary precision floating-point arithmetic for Python")
6143 (description
e36de31b 6144 "This package provides a Python interface to the MPFR library for
44d10b1f
RW
6145multiprecision arithmetic.")
6146 (license license:lgpl3+)))
6147
6148(define-public python2-bigfloat
6149 (package-with-python2 python-bigfloat))
6150
6151(define-public python-sympy
6152 (package
6153 (name "python-sympy")
6154 (version "1.1.1")
6155 (source
6156 (origin
6157 (method url-fetch)
6158 (uri (string-append
6159 "https://github.com/sympy/sympy/releases/download/sympy-"
6160 version "/sympy-" version ".tar.gz"))
6161 (sha256
6162 (base32 "190n29sppw7g8ihilc5451y7jlfcaw56crqiqbf1jff43dlmfnxc"))))
6163 (build-system python-build-system)
6164 (arguments
6165 `(#:phases
6166 (modify-phases %standard-phases
6167 ;; Run the core tests after installation. By default it would run
6168 ;; *all* tests, which take a very long time to complete and are known
6169 ;; to be flaky.
6170 (delete 'check)
6171 (add-after 'install 'check
6172 (lambda* (#:key outputs #:allow-other-keys)
6173 (invoke "python3" "-c" "import sympy; sympy.test(\"/core\")")
6174 #t)))))
6175 (propagated-inputs
6176 `(("python-mpmath" ,python-mpmath)))
6177 (home-page "http://www.sympy.org/")
6178 (synopsis "Python library for symbolic mathematics")
6179 (description
6180 "SymPy is a Python library for symbolic mathematics. It aims to become a
6181full-featured computer algebra system (CAS) while keeping the code as simple
6182as possible in order to be comprehensible and easily extensible.")
6183 (license license:bsd-3)))
6184
6185(define-public python2-sympy
6186 (package
6187 (inherit (package-with-python2 python-sympy))
6188 (arguments
6189 `(#:phases
6190 (modify-phases %standard-phases
6191 ;; Run the core tests after installation. By default it would run
6192 ;; *all* tests, which take a very long time to complete and are known
6193 ;; to be flaky.
6194 (delete 'check)
6195 (add-after 'install 'check
6196 (lambda* (#:key outputs #:allow-other-keys)
6197 (invoke "python" "-c" "import sympy; sympy.test(\"/core\")")
6198 #t)))))))
6199
6200(define-public python-q
6201 (package
6202 (name "python-q")
6203 (version "2.6")
6204 (source
6205 (origin
6206 (method url-fetch)
6207 (uri (pypi-uri "q" version))
6208 (sha256
6209 (base32
6210 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
6211 (build-system python-build-system)
6212 (home-page "https://github.com/zestyping/q")
6213 (synopsis "Quick-and-dirty debugging output for tired programmers")
6214 (description
6215 "q is a Python module for \"print\" style of debugging Python code. It
6216provides convenient short API for print out of values, tracebacks, and
6217falling into the Python interpreter.")
6218 (license license:asl2.0)))
6219
6220(define-public python2-q
6221 (package-with-python2 python-q))
6222
6223(define-public python2-xlib
6224 (package
6225 (name "python2-xlib")
6226 (version "0.14")
6227 (source (origin
6228 (method url-fetch)
6229 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
6230 "/" version "/"
6231 "python-xlib-" version ".tar.gz"))
6232 (sha256
6233 (base32
6234 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
6235 (build-system python-build-system)
6236 (arguments
6237 `(#:python ,python-2 ;Python 2 only
6238 #:tests? #f)) ;no tests
6239 (home-page "http://python-xlib.sourceforge.net/")
6240 (synopsis "Python X11 client library")
6241 (description
6242 "The Python X Library is intended to be a fully functional X client
6243library for Python programs. It is useful to implement low-level X clients.
6244It is written entirely in Python.")
6245 (license license:gpl2+)))
6246
6247(define-public python-singledispatch
6248 (package
6249 (name "python-singledispatch")
6250 (version "3.4.0.3")
6251 (source
6252 (origin
6253 (method url-fetch)
6254 (uri (pypi-uri "singledispatch" version))
6255 (sha256
6256 (base32
6257 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
6258 (build-system python-build-system)
6259 (native-inputs
6260 `(("python-six" ,python-six))) ; required for conversion, not at run-time
6261 (home-page
6262 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
6263 (synopsis "Backport of singledispatch feature from Python 3.4")
6264 (description
6265 "This library brings functools.singledispatch from Python 3.4 to Python
62662.6-3.3.")
6267 (license license:expat)))
6268
6269(define-public python2-singledispatch
6270 (package-with-python2 python-singledispatch))
6271
6272;; the python- version can be removed with python-3.5
6273(define-public python-backports-abc
6274 (package
6275 (name "python-backports-abc")
6276 (version "0.5")
6277 (source
6278 (origin
6279 (method url-fetch)
6280 (uri (pypi-uri "backports_abc" version))
6281 (sha256
6282 (base32
6283 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
6284 (build-system python-build-system)
6285 (home-page "https://github.com/cython/backports_abc")
6286 (synopsis "Backport of additions to the 'collections.abc' module")
6287 (description
6288 "Python-backports-abc provides a backport of additions to the
36a4366d 6289@code{collections.abc} module in Python-3.5.")
44d10b1f
RW
6290 (license license:psfl)))
6291
6292(define-public python2-backports-abc
6293 (package-with-python2 python-backports-abc))
6294
6295(define-public python-backports-csv
6296 (package
6297 (name "python-backports-csv")
6298 (version "1.0.5")
6299 (source
6300 (origin
6301 (method url-fetch)
6302 (uri (pypi-uri "backports.csv" version))
6303 (sha256
6304 (base32
6305 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
6306 (build-system python-build-system)
6307 (home-page "https://github.com/ryanhiebert/backports.csv")
6308 (synopsis "Backport of Python 3's csv module for Python 2")
6309 (description
6310 "Provides a backport of Python 3's @code{csv} module for parsing
6311comma separated values. The API of the @code{csv} module in Python 2
6312is drastically different from the @code{csv} module in Python 3.
6313This is due, for the most part, to the difference between str in
6314Python 2 and Python 3.")
6315 (license license:psfl)))
6316
6317(define-public python2-backports-csv
6318 (package-with-python2 python-backports-csv))
6319
6320(define-public python2-backports-shutil-get-terminal-size
6321 (package
6322 (name "python2-backports-shutil-get-terminal-size")
6323 (version "1.0.0")
6324 (source
6325 (origin
6326 (method url-fetch)
6327 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
6328 (sha256
6329 (base32
6330 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
6331 (build-system python-build-system)
6332 (arguments
6333 `(#:python ,python-2
6334 #:phases
6335 (modify-phases %standard-phases
6336 (replace 'check
6337 (lambda _
4a4a7d9a 6338 (invoke "py.test" "-v"))))))
44d10b1f
RW
6339 (native-inputs
6340 `(("python2-pytest" ,python2-pytest)))
6341 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
6342 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
6343 (description
6344 "This package provides a backport of the @code{get_terminal_size
6345function} from Python 3.3's @code{shutil}.
6346Unlike the original version it is written in pure Python rather than C,
6347so it might be a tiny bit slower.")
6348 (license license:expat)))
6349
6350(define-public python-waf
6351 (package
6352 (name "python-waf")
6c2c11fa 6353 (version "2.0.19")
44d10b1f
RW
6354 (source (origin
6355 (method url-fetch)
6356 (uri (string-append "https://waf.io/"
6357 "waf-" version ".tar.bz2"))
6358 (sha256
6359 (base32
6c2c11fa 6360 "19dvqbsvxz7ch03dh1v0znklrwxlz6yzddc3k9smzrrgny4jch6q"))))
44d10b1f
RW
6361 (build-system python-build-system)
6362 (arguments
6363 '(#:phases
6364 (modify-phases %standard-phases
6365 (replace 'build
6366 (lambda _
633c8b71
MO
6367 ;; XXX: Find a way to add all extra tools.
6368 (let ((tools '("gccdeps"
6369 "clang_compilation_database")))
6370 (invoke "python" "waf-light" "configure" "build"
6371 (string-append "--tools="
6372 (string-join tools ","))))))
44d10b1f
RW
6373 (replace 'check
6374 (lambda _
6375 (invoke "python" "waf" "--version")))
6376 (replace 'install
6377 (lambda* (#:key outputs #:allow-other-keys)
6378 (let ((out (assoc-ref outputs "out")))
6379 (install-file "waf" (string-append out "/bin")))
6380 #t))
6381 ;; waf breaks when it is wrapped.
6382 (delete 'wrap))))
6383 (home-page "https://waf.io/")
6384 (synopsis "Python-based build system")
6385 (description
6386 "Waf is a Python-based framework for configuring, compiling and installing
6387applications.")
6388 (license license:bsd-3)))
6389
6390(define-public python2-waf
6391 (package-with-python2 python-waf))
6392
6393(define-public python-pyzmq
6394 (package
6395 (name "python-pyzmq")
6396 (version "17.1.2")
6397 (source
6398 (origin
6399 (method url-fetch)
6400 (uri (pypi-uri "pyzmq" version))
6401 (sha256
6402 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
6403 (build-system python-build-system)
6404 (arguments
6405 `(#:configure-flags
6406 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
6407 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
6408 ;; --inplace' for 'python setup.py test' to work.
6409 #:tests? #f))
6410 (inputs
6411 `(("zeromq" ,zeromq)))
6412 (native-inputs
6413 `(("pkg-config" ,pkg-config)
6414 ("python-nose" ,python-nose)))
6415 (home-page "https://github.com/zeromq/pyzmq")
6416 (synopsis "Python bindings for 0MQ")
6417 (description
6418 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
6419 (license license:bsd-4)))
6420
6421(define-public python2-pyzmq
6422 (package-with-python2 python-pyzmq))
6423
6424(define-public python-pep8
6425 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
6426 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
6427 ;; some dependents' test suites, and nothing more.
6428 (package
6429 (name "python-pep8")
6430 (version "1.7.0")
6431 (source
6432 (origin
6433 (method url-fetch)
6434 (uri (pypi-uri "pep8" version))
6435 (sha256
6436 (base32
2be878d8
CB
6437 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))
6438 (patches (search-patches "python-pep8-stdlib-tokenize-compat.patch"))))
44d10b1f
RW
6439 (build-system python-build-system)
6440 (home-page "https://pep8.readthedocs.org/")
6441 (synopsis "Python style guide checker")
6442 (description
6443 "This tools checks Python code against some of the style conventions in
6444PEP 8.")
6445 (license license:expat)))
6446
6447(define-public python2-pep8
6448 (package-with-python2 python-pep8))
6449
6450(define-public python-pyflakes
6451 (package
6452 (name "python-pyflakes")
d0cba11b 6453 (version "2.1.1")
44d10b1f
RW
6454 (source
6455 (origin
6456 (method url-fetch)
6457 (uri (pypi-uri "pyflakes" version))
6458 (sha256
6459 (base32
d0cba11b 6460 "18pq95a1xj2dgdd0m85gyfsn40jajj4xc3lp8wfv7igqhrc86xnr"))))
44d10b1f
RW
6461 (build-system python-build-system)
6462 (home-page
6463 "https://github.com/pyflakes/pyflakes")
6464 (synopsis "Passive checker of Python programs")
6465 (description
6466 "Pyflakes statically checks Python source code for common errors.")
6467 (license license:expat)))
6468
6469(define-public python2-pyflakes
6470 (package-with-python2 python-pyflakes))
6471
6472(define-public python-mccabe
6473 (package
6474 (name "python-mccabe")
6475 (version "0.6.1")
6476 (source
6477 (origin
6478 (method url-fetch)
6479 (uri (pypi-uri "mccabe" version))
6480 (sha256
6481 (base32
6482 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
6483 (build-system python-build-system)
6484 (native-inputs
6485 `(("python-pytest" ,python-pytest-bootstrap)
6486 ("python-pytest-runner" ,python-pytest-runner)))
6487 (home-page "https://github.com/flintwork/mccabe")
6488 (synopsis "McCabe checker, plugin for flake8")
6489 (description
6490 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
6491complexity of Python source code.")
6492 (license license:expat)))
6493
6494(define-public python2-mccabe
6495 (package-with-python2 python-mccabe))
6496
6497(define-public python-mccabe-0.2.1
6498 (package (inherit python-mccabe)
6499 (version "0.2.1")
6500 (source
6501 (origin
6502 (method url-fetch)
6503 (uri (pypi-uri "mccabe" version))
6504 (sha256
6505 (base32
6506 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
6507
6508(define-public python2-mccabe-0.2.1
6509 (package-with-python2 python-mccabe-0.2.1))
6510
6511;; Flake8 2.4.1 requires an older version of pep8.
6512;; This should be removed ASAP.
6513(define-public python-pep8-1.5.7
6514 (package (inherit python-pep8)
6515 (version "1.5.7")
6516 (source
f3576970
RW
6517 (origin
6518 (method url-fetch)
6519 (uri (pypi-uri "pep8" version))
6520 (sha256
6521 (base32
6522 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
44d10b1f
RW
6523 (arguments
6524 ;; XXX Tests not compatible with Python 3.5.
6525 '(#:tests? #f))))
6526
6527(define-public python2-pep8-1.5.7
6528 (package-with-python2 python-pep8-1.5.7))
6529
6530;; Flake8 2.4.1 requires an older version of pyflakes.
6531;; This should be removed ASAP.
6532(define-public python-pyflakes-0.8.1
6533 (package (inherit python-pyflakes)
6534 (version "0.8.1")
6535 (source
8c4dffb5
RW
6536 (origin
6537 (method url-fetch)
6538 (uri (pypi-uri "pyflakes" version))
6539 (sha256
6540 (base32
6541 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
44d10b1f
RW
6542 (arguments
6543 ;; XXX Tests not compatible with Python 3.5.
6544 '(#:tests? #f))))
6545
6546(define-public python2-pyflakes-0.8.1
6547 (package-with-python2 python-pyflakes-0.8.1))
6548
ac63cf0a 6549(define-public python-flake8
44d10b1f
RW
6550 (package
6551 (name "python-flake8")
beaff4a8 6552 (version "3.7.7")
ac63cf0a
MB
6553 (source (origin
6554 (method url-fetch)
6555 (uri (pypi-uri "flake8" version))
6556 (sha256
6557 (base32
beaff4a8 6558 "0qg6zggqigrd4k3gv88shd1a27d0cwgfql8vfiq2c7rl7w3rd6c5"))))
44d10b1f
RW
6559 (build-system python-build-system)
6560 (arguments
6561 `(#:phases
6562 (modify-phases %standard-phases
44d10b1f
RW
6563 (delete 'check)
6564 (add-after 'install 'check
6565 (lambda* (#:key inputs outputs #:allow-other-keys)
6566 (add-installed-pythonpath inputs outputs)
6567 (invoke "pytest" "-v")
6568 #t)))))
6569 (propagated-inputs
6570 `(("python-pycodestyle" ,python-pycodestyle)
beaff4a8 6571 ("python-entrypoints" ,python-entrypoints)
44d10b1f
RW
6572 ("python-pyflakes" ,python-pyflakes)
6573 ("python-mccabe" ,python-mccabe)))
6574 (native-inputs
6575 `(("python-mock" ,python-mock)
6576 ("python-pytest" ,python-pytest-bootstrap)
6577 ("python-pytest-runner" ,python-pytest-runner)))
6578 (home-page "https://gitlab.com/pycqa/flake8")
6579 (synopsis
6580 "The modular source code checker: pep8, pyflakes and co")
6581 (description
6582 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
ac63cf0a 6583 (properties `((python2-variant . ,(delay python2-flake8))))
44d10b1f
RW
6584 (license license:expat)))
6585
ac63cf0a
MB
6586(define-public python2-flake8
6587 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
44d10b1f
RW
6588 (package (inherit base)
6589 (propagated-inputs
6590 `(("python2-configparser" ,python2-configparser)
6591 ("python2-enum34" ,python2-enum34)
beaff4a8 6592 ("python2-typing" ,python2-typing)
44d10b1f
RW
6593 ,@(package-propagated-inputs base))))))
6594
44d10b1f
RW
6595;; python-hacking requires flake8 <2.6.0.
6596(define-public python-flake8-2.5
6597 (package
6598 (inherit python-flake8)
6599 (version "2.5.5")
6600 (source (origin
6601 (method url-fetch)
6602 (uri (pypi-uri "flake8" version))
6603 (sha256
6604 (base32
6605 "1snylqwbmrylbx3r1wpz8ggk98f6bcag4441ag8mm2l7wyn58sij"))))
6606 (propagated-inputs
6607 `(("python-pep8" ,python-pep8)
6608 ,@(package-propagated-inputs python-flake8)))
6609 (properties `((python2-variant . ,(delay python2-flake8-2.5))))))
6610
6611(define-public python2-flake8-2.5
6612 (package
6613 (inherit python2-flake8)
6614 (version (package-version python-flake8-2.5))
6615 (source (origin
6616 (inherit (package-source python-flake8-2.5))))
6617 (propagated-inputs
6618 `(("python2-pep8" ,python2-pep8)
6619 ,@(package-propagated-inputs python2-flake8)))))
6620
6621(define-public python-flake8-polyfill
6622 (package
6623 (name "python-flake8-polyfill")
6624 (version "1.0.2")
6625 (source
6626 (origin
6627 (method url-fetch)
6628 (uri (pypi-uri "flake8-polyfill" version))
6629 (sha256
6630 (base32
6631 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
6632 (build-system python-build-system)
6633 (arguments
6634 '(#:phases
6635 (modify-phases %standard-phases
6636 (replace 'check
6637 (lambda _
40a7153d
MB
6638 ;; Be compatible with Pytest 4:
6639 ;; https://gitlab.com/pycqa/flake8-polyfill/merge_requests/7
6640 (substitute* "setup.cfg"
6641 (("\\[pytest\\]")
6642 "[tool:pytest]"))
6643
44d10b1f
RW
6644 (setenv "PYTHONPATH"
6645 (string-append (getcwd) "/build/lib:"
6646 (getenv "PYTHONPATH")))
4f0a0894 6647 (invoke "py.test" "-v"))))))
44d10b1f
RW
6648 (native-inputs
6649 `(("python-flake8" ,python-flake8)
6650 ("python-mock" ,python-mock)
6651 ("python-pep8" ,python-pep8)
6652 ("python-pycodestyle" ,python-pycodestyle)
6653 ("python-pytest" ,python-pytest)))
6654 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
6655 (synopsis "Polyfill package for Flake8 plugins")
6656 (description
6657 "This package that provides some compatibility helpers for Flake8
6658plugins that intend to support Flake8 2.x and 3.x simultaneously.")
6659 (license license:expat)))
6660
6661(define-public python2-flake8-polyfill
6662 (package-with-python2 python-flake8-polyfill))
6663
6664(define-public python-mistune
6665 (package
6666 (name "python-mistune")
6667 (version "0.8.4")
6668 (source
6669 (origin
6670 (method url-fetch)
6671 (uri (pypi-uri "mistune" version))
6672 (sha256
6673 (base32
6674 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
6675 (build-system python-build-system)
6676 (native-inputs
6677 `(("python-nose" ,python-nose)
6678 ("python-cython" ,python-cython)))
6679 (home-page "https://github.com/lepture/mistune")
6680 (synopsis "Markdown parser in pure Python")
6681 (description "This package provides a fast markdown parser in pure
6682Python.")
6683 (license license:bsd-3)))
6684
6685(define-public python2-mistune
6686 (package-with-python2 python-mistune))
6687
6688(define-public python-markdown
6689 (package
6690 (name "python-markdown")
ceb1936a 6691 (version "3.1.1")
44d10b1f
RW
6692 (source
6693 (origin
6694 (method url-fetch)
6695 (uri (pypi-uri "Markdown" version))
6696 (sha256
6697 (base32
ceb1936a 6698 "0yhylk4ffqqs7x086fav4pnfsl1021v7lghznzkififprmmqfl1f"))))
44d10b1f
RW
6699 (build-system python-build-system)
6700 (native-inputs
6701 `(("python-nose" ,python-nose)
6702 ("python-pyyaml" ,python-pyyaml)))
6703 (home-page "https://python-markdown.github.io/")
6704 (synopsis "Python implementation of Markdown")
6705 (description
6706 "This package provides a Python implementation of John Gruber's
6707Markdown. The library features international input, various Markdown
6708extensions, and several HTML output formats. A command line wrapper
6709markdown_py is also provided to convert Markdown files to HTML.")
6710 (license license:bsd-3)))
6711
6712(define-public python2-markdown
6713 (package-with-python2 python-markdown))
6714
6715(define-public python-ptyprocess
6716 (package
6717 (name "python-ptyprocess")
6718 (version "0.5.2")
6719 (source
6720 (origin
6721 (method url-fetch)
6722 (uri (pypi-uri "ptyprocess" version))
6723 (sha256
6724 (base32
6725 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
6726 (build-system python-build-system)
6727 (native-inputs
6728 `(("python-nose" ,python-nose)))
6729 (arguments
6730 `(#:phases
6731 (modify-phases %standard-phases
6732 (replace 'check
7904d6fa 6733 (lambda _ (invoke "nosetests"))))))
44d10b1f
RW
6734 (home-page "https://github.com/pexpect/ptyprocess")
6735 (synopsis "Run a subprocess in a pseudo terminal")
6736 (description
6737 "This package provides a Python library used to launch a subprocess in a
6738pseudo terminal (pty), and interact with both the process and its pty.")
6739 (license license:isc)))
6740
6741(define-public python2-ptyprocess
6742 (package-with-python2 python-ptyprocess))
6743
6744(define-public python-cram
6745 (package
6746 (name "python-cram")
6747 (version "0.7")
6748 (home-page "https://bitheap.org/cram/")
6749 (source (origin
6750 (method url-fetch)
6751 (uri (list (string-append home-page "cram-"
6752 version ".tar.gz")
6753 (pypi-uri "cram" version)))
6754 (sha256
6755 (base32
6756 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
6757 (arguments
6758 '(#:phases
6759 (modify-phases %standard-phases
6760 (add-after 'unpack 'patch-source
6761 (lambda _
6762 (substitute* (find-files "cram" ".*\\.py$")
6763 ;; Replace default shell path.
6764 (("/bin/sh") (which "sh")))
6765 (substitute* (find-files "tests" ".*\\.t$")
6766 (("md5") "md5sum")
6767 (("/bin/bash") (which "bash"))
6768 (("/bin/sh") (which "sh")))
6769 (substitute* "cram/_test.py"
6770 ;; This hack works around a bug triggered by substituting
6771 ;; the /bin/sh paths. "tests/usage.t" compares the output of
6772 ;; "cram -h", which breaks the output at 80 characters. This
6773 ;; causes the line showing the default shell to break into two
6774 ;; lines, but the test expects a single line...
6775 (("env\\['COLUMNS'\\] = '80'")
6776 "env['COLUMNS'] = '160'"))
ff1e80d7
MB
6777
6778 (substitute* "Makefile"
6779 ;; Recent versions of python-coverage have caused the test
6780 ;; coverage to decrease (as of version 0.7). Allow that.
6781 (("--fail-under=100")
6782 "--fail-under=90"))
6783
44d10b1f 6784 #t))
ff1e80d7 6785 (replace 'check
44d10b1f 6786 ;; The test phase uses the built library and executable.
44d10b1f
RW
6787 (lambda* (#:key inputs outputs #:allow-other-keys)
6788 (add-installed-pythonpath inputs outputs)
6789 (setenv "PATH" (string-append (getenv "PATH") ":"
6790 (assoc-ref outputs "out") "/bin"))
2d7db192 6791 (invoke "make" "test"))))))
44d10b1f
RW
6792 (build-system python-build-system)
6793 (native-inputs
6794 `(("python-coverage" ,python-coverage)
6795 ("which" ,which)))
6796 (synopsis "Simple testing framework for command line applications")
6797 (description
6798 "Cram is a functional testing framework for command line applications.
6799Cram tests look like snippets of interactive shell sessions. Cram runs each
6800command and compares the command output in the test with the command’s actual
6801output.")
6802 (license license:gpl2+)))
6803
6804(define-public python2-cram
6805 (package-with-python2 python-cram))
6806
6807(define-public python-straight-plugin
6808 (package
6809 (name "python-straight-plugin")
6810 (version "1.4.1")
6811 (source
6812 (origin
6813 (method url-fetch)
6814 (uri (pypi-uri "straight.plugin" version))
6815 (sha256
6816 (base32
6817 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
6818 (build-system python-build-system)
6819 (home-page "https://github.com/ironfroggy/straight.plugin")
6820 (synopsis "Simple namespaced plugin facility")
6821 (description "Straight Plugin provides a type of plugin you can create from
6822almost any existing Python modules, and an easy way for outside developers to
6823add functionality and customization to your projects with their own plugins.")
6824 (license license:expat)))
6825
6826(define-public python2-straight-plugin
6827 (package-with-python2 python-straight-plugin))
6828
6829(define-public python-fonttools
6830 (package
6831 (name "python-fonttools")
1a4bb420 6832 (version "3.38.0")
44d10b1f
RW
6833 (source (origin
6834 (method url-fetch)
6835 (uri (pypi-uri "fonttools" version ".zip"))
6836 (sha256
6837 (base32
1a4bb420 6838 "12ripk3s7skgxr1bs9r8n13r94ym3s8iir7ivfixls9fa4dabmlh"))))
44d10b1f
RW
6839 (build-system python-build-system)
6840 (native-inputs
6841 `(("unzip" ,unzip)
6842 ("python-pytest" ,python-pytest)
6843 ("python-pytest-runner" ,python-pytest-runner)))
9d25a454 6844 (home-page "https://github.com/fonttools/fonttools")
44d10b1f
RW
6845 (synopsis "Tools to manipulate font files")
6846 (description
6847 "FontTools/TTX is a library to manipulate font files from Python. It
6848supports reading and writing of TrueType/OpenType fonts, reading and writing
6849of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
6850also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
6851from an XML-based format.")
6852 (license license:expat)))
6853
6854(define-public python2-fonttools
6855 (package-with-python2 python-fonttools))
6856
6857(define-public python-ly
6858 (package
6859 (name "python-ly")
6860 (version "0.9.5")
6861 (source
6862 (origin
6863 (method url-fetch)
6864 (uri (pypi-uri name version))
6865 (sha256
6866 (base32
6867 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
6868 (build-system python-build-system)
6869 (arguments
6870 ;; FIXME: Some tests need network access.
6871 '(#:tests? #f))
6872 (synopsis "Tool and library for manipulating LilyPond files")
6873 (description "This package provides a Python library to parse, manipulate
6874or create documents in LilyPond format. A command line program ly is also
6875provided that can be used to do various manipulations with LilyPond files.")
6876 (home-page "https://pypi.python.org/pypi/python-ly")
6877 (license license:gpl2+)))
6878
6879(define-public python-appdirs
6880 (package
6881 (name "python-appdirs")
6882 (version "1.4.3")
6883 (source
6884 (origin
6885 (method url-fetch)
6886 (uri (pypi-uri "appdirs" version))
6887 (sha256
6888 (base32
6889 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
6890 (build-system python-build-system)
6891 (home-page "https://github.com/ActiveState/appdirs")
6892 (synopsis
6893 "Determine platform-specific dirs, e.g. a \"user data dir\"")
6894 (description
6895 "This module provides a portable way of finding out where user data
6896should be stored on various operating systems.")
6897 (license license:expat)))
6898
6899(define-public python2-appdirs
6900 (package-with-python2 python-appdirs))
6901
6902(define-public python-llfuse
6903 (package
6904 (name "python-llfuse")
6905 (version "1.3.5")
6906 (source (origin
6907 (method url-fetch)
6908 (uri (pypi-uri "llfuse" version ".tar.bz2"))
6909 (sha256
6910 (base32
6911 "1n7a90jww3ly49fm7x27m3xw3la3qfrnykcakga654g6kcyjlhbf"))))
6912 (build-system python-build-system)
6913 (inputs
6914 `(("fuse" ,fuse)
6915 ("attr" ,attr)))
6916 (native-inputs
6917 `(("pkg-config" ,pkg-config)))
6918 (synopsis "Python bindings for FUSE")
6919 (description
6920 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
6921 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
6922 (license license:lgpl2.0+)
6923 (properties `((python2-variant . ,(delay python2-llfuse))))))
6924
6925(define-public python2-llfuse
6926 (package (inherit (package-with-python2
6927 (strip-python2-variant python-llfuse)))
6928 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
6929
6930;; For attic-0.16
6931(define-public python-llfuse-0.41
6932 (package (inherit python-llfuse)
6933 (version "0.41.1")
6934 (source (origin
6935 (method url-fetch)
6936 (uri (string-append
6937 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6938 "llfuse-" version ".tar.bz2"))
6939 (sha256
6940 (base32
6941 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
6942 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
6943 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
6944 (license (list license:expat license:lgpl2.0+))))
6945
6946(define-public python-msgpack
6947 (package
6948 (name "python-msgpack")
6949 (version "0.5.6")
6950 (source (origin
6951 (method url-fetch)
6952 (uri (pypi-uri "msgpack" version))
6953 (sha256
6954 (base32
6955 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
6956 (build-system python-build-system)
6957 (arguments
6958 `(#:modules ((guix build utils)
6959 (guix build python-build-system)
6960 (ice-9 ftw)
6961 (srfi srfi-1)
6962 (srfi srfi-26))
6963 #:phases
6964 (modify-phases %standard-phases
6965 (replace 'check
6966 (lambda _
6967 (let ((cwd (getcwd)))
6968 (setenv "PYTHONPATH"
6969 (string-append cwd "/build/"
6970 (find (cut string-prefix? "lib" <>)
6971 (scandir (string-append cwd "/build")))
6972 ":"
6973 (getenv "PYTHONPATH")))
6974 (invoke "pytest" "-v" "test")))))))
6975 (native-inputs
6976 `(("python-pytest" ,python-pytest)))
6977 (synopsis "MessagePack (de)serializer")
6978 (description "MessagePack is a fast, compact binary serialization format,
6979suitable for similar data to JSON. This package provides CPython bindings for
6980reading and writing MessagePack data.")
6981 (home-page "https://pypi.python.org/pypi/msgpack/")
6982 (license license:asl2.0)))
6983
6984;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
6985;; release 0.5. Some packages like borg still call it by the old name for now.
6986;; <https://bugs.gnu.org/30662>
6987(define-public python-msgpack-transitional
6988 (package
6989 (inherit python-msgpack)
6990 (name "python-msgpack-transitional")
6991 (arguments
6992 (substitute-keyword-arguments (package-arguments python-msgpack)
6993 ((#:phases phases)
6994 `(modify-phases ,phases
6995 (add-after 'unpack 'configure-transitional
6996 (lambda _
6997 ;; Keep using the old name.
6998 (substitute* "setup.py"
6999 (("TRANSITIONAL = False")
7000 "TRANSITIONAL = 1"))
7001 #t))))))))
7002
7003(define-public python2-msgpack
7004 (package-with-python2 python-msgpack))
7005
7006(define-public python-netaddr
7007 (package
7008 (name "python-netaddr")
7009 (version "0.7.19")
7010 (source
7011 (origin
7012 (method url-fetch)
7013 (uri (pypi-uri "netaddr" version))
7014 (sha256
7015 (base32
7016 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
7017 (build-system python-build-system)
7018 (arguments `(#:tests? #f)) ;; No tests.
7019 (home-page "https://github.com/drkjam/netaddr/")
7020 (synopsis "Pythonic manipulation of network addresses")
7021 (description
7022 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
7023and MAC network addresses.")
7024 (license license:bsd-3)))
7025
7026(define-public python2-netaddr
7027 (package-with-python2 python-netaddr))
7028
dd85eca0
AG
7029(define-public python2-pyroute2
7030 (package
7031 (name "python2-pyroute2")
7032 (version "0.5.6")
7033 (source
7034 (origin
7035 (method url-fetch)
7036 (uri (pypi-uri "pyroute2" version))
7037 (sha256
7038 (base32
7039 "1gmz4r1w0yzj6fjjypnalmfyy0lnfznydyn62gi3wk50j5hhxbny"))))
7040 (build-system python-build-system)
7041 (arguments
7042 `(#:python ,python-2)) ;Python 3.x is not supported
7043 (home-page "https://github.com/svinota/pyroute2")
7044 (synopsis "Python netlink library")
7045 (description
7046 "Pyroute2 is a pure Python netlink library with minimal dependencies.
7047Supported netlink families and protocols include:
7048@itemize
7049@item rtnl, network settings - addresses, routes, traffic controls
7050@item nfnetlink - netfilter API: ipset, nftables, ...
7051@item ipq - simplest userspace packet filtering, iptables QUEUE target
7052@item devlink - manage and monitor devlink-enabled hardware
7053@item generic - generic netlink families
7054 @itemize
7055 @item nl80211 - wireless functions API (basic support)
7056 @item taskstats - extended process statistics
7057 @item acpi_events - ACPI events monitoring
7058 @item thermal_events - thermal events monitoring
7059 @item VFS_DQUOT - disk quota events monitoring
7060 @end itemize
7061@end itemize")
7062 (license license:gpl2+)))
7063
44d10b1f
RW
7064(define-public python-wrapt
7065 (package
7066 (name "python-wrapt")
2271a1dc 7067 (version "1.11.2")
44d10b1f 7068 (source
2271a1dc
MB
7069 (origin
7070 (method url-fetch)
7071 (uri (pypi-uri "wrapt" version))
7072 (sha256
7073 (base32
7074 "1q81762dgsgrd12f8qc39zk8s5wll3m5xc32jdmlf6cls4gh4njn"))))
44d10b1f
RW
7075 (build-system python-build-system)
7076 (arguments
7077 ;; Tests are not included in the tarball, they are only available in the
7078 ;; git repository.
7079 `(#:tests? #f))
7080 (home-page "https://github.com/GrahamDumpleton/wrapt")
7081 (synopsis "Module for decorators, wrappers and monkey patching")
7082 (description
2271a1dc 7083 "The aim of the wrapt module is to provide a transparent object proxy for
44d10b1f
RW
7084 Python, which can be used as the basis for the construction of function
7085 wrappers and decorator functions.")
7086 (license license:bsd-2)))
7087
7088(define-public python2-wrapt
7089 (package-with-python2 python-wrapt))
7090
7091(define-public python-xlrd
7092 (package
7093 (name "python-xlrd")
3a2b1a3c 7094 (version "1.2.0")
44d10b1f
RW
7095 (source (origin
7096 (method url-fetch)
7097 (uri (pypi-uri "xlrd" version))
7098 (sha256
7099 (base32
3a2b1a3c 7100 "1ci93fda4n67qhdvfl16zasyxrpygzk53hs6m8z0rd4dxrnb6vjl"))))
44d10b1f
RW
7101 (build-system python-build-system)
7102 (arguments
7103 `(#:phases
7104 (modify-phases %standard-phases
3ccdd3a5
MO
7105 ;; Some tests depend on writing a temporary file to the user's home
7106 ;; directory.
3a2b1a3c
GL
7107 (add-after 'unpack 'fix-tests
7108 (lambda _
7109 (delete-file "tests/test_open_workbook.py")
7110 #t)))))
44d10b1f
RW
7111 (home-page "http://www.python-excel.org/")
7112 (synopsis "Library for extracting data from Excel files")
a0909286 7113 (description "This package provides a library to extract data from
44d10b1f
RW
7114spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
7115@samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
7116Unicode-aware. It is not intended as an end-user tool.")
7117 (license license:bsd-3)))
7118
7119(define-public python2-xlrd
7120 (package-with-python2 python-xlrd))
7121
7122(define-public python-prettytable
7123 (package
7124 (name "python-prettytable")
7125 (version "0.7.2")
7126 (source
7127 (origin
7128 (method url-fetch)
337c3a1e 7129 (uri (pypi-uri "prettytable" version ".tar.bz2"))
44d10b1f
RW
7130 (sha256
7131 (base32
7132 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
7133 (build-system python-build-system)
7134 (home-page "http://code.google.com/p/prettytable/")
7135 (synopsis "Display tabular data in an ASCII table format")
7136 (description
7137 "A library designed to represent tabular data in visually appealing ASCII
7138tables. PrettyTable allows for selection of which columns are to be printed,
7139independent alignment of columns (left or right justified or centred) and
7140printing of sub-tables by specifying a row range.")
7141 (license license:bsd-3)))
7142
7143(define-public python2-prettytable
7144 (package-with-python2 python-prettytable))
7145
7146(define-public python-tables
7147 (package
7148 (name "python-tables")
7149 (version "3.4.4")
7150 (source
7151 (origin
7152 (method url-fetch)
7153 (uri (pypi-uri "tables" version))
7154 (sha256
7155 (base32
7156 "0affz7k8babh8wdmsgrz5jxrd569by2w8ffimcxs9wiaf5rw1idx"))
7157 (modules '((guix build utils)))
7158 (snippet
7159 '(begin
7160 ;; Remove pre-compiled .pyc files from source.
7161 (for-each delete-file-recursively
7162 (find-files "." "__pycache__" #:directories? #t))
7163 (for-each delete-file (find-files "." "\\.pyc$"))
7164 #t))))
7165 (build-system python-build-system)
7166 (arguments
7167 `(;; FIXME: python-build-system does not pass configure-flags to "build"
7168 ;; or "check", so we must override the build and check phases.
7169 #:phases
7170 (modify-phases %standard-phases
7171 (add-after 'unpack 'use-gcc
7172 (lambda _
7173 (substitute* "setup.py"
7174 (("compiler = new_compiler\\(\\)" line)
7175 (string-append line
7176 "\ncompiler.set_executables(compiler='gcc',"
7177 "compiler_so='gcc',"
7178 "linker_exe='gcc',"
7179 "linker_so='gcc -shared')")))
7180 #t))
7181 (replace 'build
7182 (lambda* (#:key inputs #:allow-other-keys)
35d79d61
RW
7183 (invoke "python" "setup.py" "build"
7184 (string-append "--hdf5="
7185 (assoc-ref inputs "hdf5")))))
44d10b1f
RW
7186 (replace 'check
7187 (lambda* (#:key inputs #:allow-other-keys)
35d79d61
RW
7188 (invoke "python" "setup.py" "check"
7189 (string-append "--hdf5="
7190 (assoc-ref inputs "hdf5"))))))))
44d10b1f
RW
7191 (propagated-inputs
7192 `(("python-numexpr" ,python-numexpr)
7193 ("python-numpy" ,python-numpy)))
7194 (native-inputs
7195 `(("python-cython" ,python-cython)
7196 ("pkg-config" ,pkg-config)))
7197 (inputs
7198 `(("hdf5" ,hdf5)
7199 ("bzip2" ,bzip2)
7200 ("zlib" ,zlib)))
7201 (home-page "http://www.pytables.org/")
7202 (synopsis "Hierarchical datasets for Python")
7203 (description "PyTables is a package for managing hierarchical datasets and
7204designed to efficiently cope with extremely large amounts of data.")
7205 (license license:bsd-3)))
7206
7207(define-public python2-tables
7208 (package-with-python2 python-tables))
7209
7210(define-public python-pyasn1
7211 (package
7212 (name "python-pyasn1")
7213 (version "0.4.3")
7214 (source
7215 (origin
7216 (method url-fetch)
7217 (uri (pypi-uri "pyasn1" version))
7218 (sha256
7219 (base32
7220 "1z5h38anjzzrxpraa9iq9llffyx2zs8gx0q6dc1g029miwnn50gv"))))
7221 (build-system python-build-system)
7222 (home-page "http://pyasn1.sourceforge.net/")
7223 (synopsis "ASN.1 types and codecs")
7224 (description
7225 "This is an implementation of ASN.1 types and codecs in Python. It is
7226suitable for a wide range of protocols based on the ASN.1 specification.")
7227 (license license:bsd-2)))
7228
7229(define-public python2-pyasn1
7230 (package-with-python2 python-pyasn1))
7231
7232(define-public python-pyasn1-modules
7233 (package
7234 (name "python-pyasn1-modules")
7235 (version "0.2.2")
7236 (source
7237 (origin
7238 (method url-fetch)
7239 (uri (pypi-uri "pyasn1-modules" version))
7240 (sha256
7241 (base32
7242 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
7243 (build-system python-build-system)
7244 (propagated-inputs
7245 `(("python-pyasn1" ,python-pyasn1)))
7246 (home-page "https://sourceforge.net/projects/pyasn1/")
7247 (synopsis "ASN.1 codec implementations")
7248 (description
7249 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
7250implementations of ASN.1-based codecs and protocols.")
7251 (license license:bsd-3)))
7252
7253(define-public python2-pyasn1-modules
7254 (package-with-python2 python-pyasn1-modules))
7255
7256(define-public python-ipaddress
7257 (package
7258 (name "python-ipaddress")
7259 (version "1.0.22")
7260 (source (origin
7261 (method url-fetch)
7262 (uri (pypi-uri "ipaddress" version))
7263 (sha256
7264 (base32
7265 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
7266 (build-system python-build-system)
7267 (home-page "https://github.com/phihag/ipaddress")
7268 (synopsis "IP address manipulation library")
7269 (description
7270 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
7271 in Python. This library is used to create, poke at, and manipulate IPv4 and
7272 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
7273 module to older versions of Python.")
7274 (license license:psfl)))
7275
7276(define-public python2-ipaddress
7277 (package-with-python2 python-ipaddress))
7278
7279(define-public python2-ipaddr
7280 (package
7281 (name "python2-ipaddr")
7282 (version "2.1.11")
7283 (source
7284 (origin
7285 (method url-fetch)
7286 (uri (pypi-uri "ipaddr" version))
7287 (sha256
7288 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
7289 (build-system python-build-system)
7290 (arguments
7291 `(#:python ,python-2 ;version 2 only
7292 #:phases
7293 (modify-phases %standard-phases
7294 (replace 'check
40b8c4e3 7295 (lambda _ (invoke "python" "ipaddr_test.py"))))))
44d10b1f
RW
7296 (home-page "https://github.com/google/ipaddr-py")
7297 (synopsis "IP address manipulation library")
7298 (description
7299 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
7300IPv6 addresses and networks.
7301
7302For new implementations you may prefer to use the standard module
7303@code{ipaddress}, which was introduced in Python 3.3 and backported to older
7304versions of Python.")
7305 (license license:asl2.0)))
7306
7307(define-public python-idna
7308 (package
7309 (name "python-idna")
e95c9837 7310 (version "2.8")
44d10b1f
RW
7311 (source
7312 (origin
7313 (method url-fetch)
7314 (uri (pypi-uri "idna" version))
7315 (sha256
7316 (base32
e95c9837 7317 "01rlkigdxg17sf9yar1jl8n18ls59367wqh59hnawlyg53vb6my3"))))
44d10b1f
RW
7318 (build-system python-build-system)
7319 (home-page "https://github.com/kjd/idna")
7320 (synopsis "Internationalized domain names in applications")
7321 (description
7322 "This is a library to support the Internationalised Domain Names in
7323Applications (IDNA) protocol as specified in RFC 5891. This version of the
7324protocol is often referred to as “IDNA2008” and can produce different results
7325from the earlier standard from 2003. The library is also intended to act as a
7326suitable drop-in replacement for the “encodings.idna” module that comes with
7327the Python standard library but currently only supports the older 2003
7328specification.")
7329 (license license:bsd-4)))
7330
a76e6a69
JM
7331(define-public python-idna-2.7
7332 (package (inherit python-idna)
7333 (version "2.7")
7334 (source (origin
7335 (method url-fetch)
7336 (uri (pypi-uri "idna" version))
7337 (sha256
7338 (base32
7339 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))))
7340
7341
44d10b1f
RW
7342(define-public python2-idna
7343 (package-with-python2 python-idna))
7344
7345(define-public python-idna-ssl
7346 (package
7347 (name "python-idna-ssl")
7348 (version "1.0.1")
7349 (source
7350 (origin
7351 (method url-fetch)
7352 (uri (pypi-uri "idna-ssl" version))
7353 (sha256
7354 (base32
7355 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
7356 (build-system python-build-system)
7357 (arguments
7358 `(#:tests? #f)) ;circular dependency with python-aiohttp
7359 (home-page "https://github.com/aio-libs/idna-ssl")
7360 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
7361 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
7362domains support.")
7363 (license license:expat)))
7364
7365(define-public python-pretend
7366 (package
7367 (name "python-pretend")
7368 (version "1.0.9")
7369 (source
7370 (origin
7371 (method url-fetch)
9f1f22ee 7372 (uri (pypi-uri "pretend" version))
44d10b1f
RW
7373 (sha256
7374 (base32
7375 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
7376 (build-system python-build-system)
7377 (home-page "https://github.com/alex/pretend")
7378 (synopsis "Library for stubbing in Python")
7379 (description
7380 "Pretend is a library to make stubbing with Python easier. Stubbing is a
7381technique for writing tests. You may hear the term mixed up with mocks,
7382fakes, or doubles. Basically, a stub is an object that returns pre-canned
7383responses, rather than doing any computation.")
7384 (license license:bsd-3)))
7385
7386(define-public python2-pretend
7387 (package-with-python2 python-pretend))
7388
7389(define-public python-pip
7390 (package
7391 (name "python-pip")
523ba4b1 7392 (version "19.2.1")
44d10b1f
RW
7393 (source
7394 (origin
7395 (method url-fetch)
7396 (uri (pypi-uri "pip" version))
7397 (sha256
7398 (base32
523ba4b1 7399 "100sd12ss4mbdj5lf3wawad29cm573b27765mq098x6xhcj71395"))))
44d10b1f
RW
7400 (build-system python-build-system)
7401 (arguments
7402 '(#:tests? #f)) ; there are no tests in the pypi archive.
7403 (home-page "https://pip.pypa.io/")
7404 (synopsis "Package manager for Python software")
7405 (description
7406 "Pip is a package manager for Python software, that finds packages on the
7407Python Package Index (PyPI).")
7408 (license license:expat)))
7409
7410(define-public python2-pip
7411 (package-with-python2 python-pip))
7412
7413(define-public python-tlsh
7414 (package
7415 (name "python-tlsh")
7416 (version "3.4.5")
7417 (home-page "https://github.com/trendmicro/tlsh")
3e3ff8ad
TGR
7418 (source
7419 (origin
7420 (method git-fetch)
7421 (uri (git-reference
7422 (url "https://github.com/trendmicro/tlsh.git")
7423 (commit (string-append "v" version))))
7424 (file-name (git-file-name name version))
7425 (sha256
7426 (base32 "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll"))))
44d10b1f
RW
7427 (build-system cmake-build-system)
7428 (arguments
7429 '(#:out-of-source? #f
7430 #:phases (modify-phases %standard-phases
7431 (replace
7432 'install
7433 (lambda* (#:key outputs #:allow-other-keys)
7434 ;; Build and install the Python bindings. The underlying
7435 ;; C++ library is apparently not meant to be installed.
7436 (let ((out (assoc-ref outputs "out")))
7437 (with-directory-excursion "py_ext"
7438 (and (system* "python" "setup.py" "build")
7439 (system* "python" "setup.py" "install"
7440 (string-append "--prefix=" out))))))))))
7441 (inputs `(("python" ,python-wrapper))) ;for the bindings
7442 (synopsis "Fuzzy matching library for Python")
7443 (description
7444 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
7445Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
7446value which can be used for similarity comparisons. Similar objects have
7447similar hash values, which allows for the detection of similar objects by
7448comparing their hash values. The byte stream should have a sufficient amount
7449of complexity; for example, a byte stream of identical bytes will not generate
7450a hash value.")
7451 (license license:asl2.0)))
7452
7453(define-public python2-tlsh
7454 (package
7455 (inherit python-tlsh)
7456 (name "python2-tlsh")
7457 (inputs `(("python" ,python-2)))))
7458
7459(define-public python-termcolor
7460 (package
7461 (name "python-termcolor")
7462 (version "1.1.0")
7463 (source
7464 (origin
7465 (method url-fetch)
7466 (uri (pypi-uri "termcolor" version))
7467 (sha256
7468 (base32
7469 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
7470 (build-system python-build-system)
7471 (arguments
7472 ;; There are no tests.
7473 `(#:tests? #f))
7474 (home-page "https://pypi.python.org/pypi/termcolor")
7475 (synopsis "ANSII Color formatting for terminal output")
7476 (description
7477 "This package provides ANSII Color formatting for output in terminals.")
7478 (license license:expat)))
7479
7480(define-public python2-termcolor
7481 (package-with-python2 python-termcolor))
7482
7483(define-public python-libarchive-c
7484 (package
7485 (name "python-libarchive-c")
7486 (version "2.8")
7487 (source (origin
7488 (method url-fetch)
7489 (uri (pypi-uri "libarchive-c" version))
7490 (sha256
7491 (base32
7492 "0qg0v1s9c1xdk9philhnv8k6c6nicvnvfwlc0j9srg90jmdlvm06"))))
7493 (build-system python-build-system)
7494 (arguments
7495 '(#:phases (modify-phases %standard-phases
7496 (add-before
7497 'build 'reference-libarchive
7498 (lambda* (#:key inputs #:allow-other-keys)
7499 ;; Retain the absolute file name of libarchive.so.
7500 (let ((libarchive (assoc-ref inputs "libarchive")))
7501 (substitute* "libarchive/ffi.py"
7502 (("find_library\\('archive'\\)")
7503 (string-append "'" libarchive
7504 "/lib/libarchive.so'"))))))
7505 (replace 'check
7506 (lambda _ (invoke "pytest" "-vv"))))))
7507 (native-inputs
7508 `(("python-mock" ,python-mock)
7509 ("python-pytest" ,python-pytest)))
7510 (inputs
7511 `(("libarchive" ,libarchive)))
7512 (home-page "https://github.com/Changaco/python-libarchive-c")
7513 (synopsis "Python interface to libarchive")
7514 (description
7515 "This package provides Python bindings to libarchive, a C library to
7516access possibly compressed archives in many different formats. It uses
7517Python's @code{ctypes} foreign function interface (FFI).")
7518 (license license:lgpl2.0+)))
7519
7520(define-public python2-libarchive-c
7521 (package-with-python2 python-libarchive-c))
7522
7523(define-public python-file
7524 (package
7525 (inherit file)
7526 (name "python-file")
7527 (build-system python-build-system)
7528 (arguments
7529 '(#:tests? #f ;no tests
7530 #:configure-flags '("--single-version-externally-managed" "--root=/")
7531 #:phases (modify-phases %standard-phases
7532 (add-before 'build 'change-directory
7533 (lambda _
7534 (chdir "python")
7535 #t))
7536 (add-before 'build 'set-library-file-name
7537 (lambda* (#:key inputs #:allow-other-keys)
7538 (let ((file (assoc-ref inputs "file")))
7539 (substitute* "magic.py"
7540 (("find_library\\('magic'\\)")
7541 (string-append "'" file "/lib/libmagic.so'")))
7542 #t))))))
7543 (inputs `(("file" ,file)))
528ea990
LC
7544 (native-inputs (if (%current-target-system)
7545 `(("self" ,this-package))
7546 '()))
44d10b1f
RW
7547 (synopsis "Python bindings to the libmagic file type guesser. Note that
7548this module and the python-magic module both provide a \"magic.py\" file;
7549these two modules, which are different and were developed separately, both
7550serve the same purpose: provide Python bindings for libmagic.")))
7551
7552(define-public python2-file
7553 (package-with-python2 python-file))
7554
7555(define-public python-debian
7556 (package
7557 (name "python-debian")
7558 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
9f74bd31 7559 (version "0.1.36")
44d10b1f
RW
7560 (source
7561 (origin
9f74bd31
VC
7562 ;; Use git-fetch, as pypi doesn't include test suite.
7563 (method git-fetch)
7564 (uri (git-reference
7565 (url home-page)
7566 (commit version)))
7567 (file-name (git-file-name name version))
44d10b1f
RW
7568 (sha256
7569 (base32
9f74bd31 7570 "0qy6x28bj6yfikhjww932v5xq4mf5bm1iczl7acy4c7zm6mwhqfa"))))
44d10b1f 7571 (build-system python-build-system)
9f74bd31
VC
7572 (arguments
7573 `(#:phases (modify-phases %standard-phases
7574 (add-after 'unpack 'remove-debian-specific-tests
7575 ;; python-apt, apt and dpkg are not yet available in guix,
7576 ;; and these tests heavily depend on them.
7577 (lambda _
7578 (delete-file "lib/debian/tests/test_deb822.py")
7579 (delete-file "lib/debian/tests/test_debfile.py")
7580 #t)))))
44d10b1f 7581 (propagated-inputs
9f74bd31
VC
7582 `(("python-six" ,python-six)
7583 ("python-chardet" ,python-chardet)))
44d10b1f
RW
7584 (synopsis "Debian package related modules")
7585 (description
7586 ;; XXX: Use @enumerate instead of @itemize to work around
7587 ;; <http://bugs.gnu.org/21772>.
7588 "This package provides Python modules that abstract many formats of
7589Debian-related files, such as:
7590
7591@enumerate
7592@item Debtags information;
7593@item @file{debian/changelog} files;
7594@item packages files, pdiffs;
7595@item control files of single or multiple RFC822-style paragraphs---e.g.
7596 @file{debian/control}, @file{.changes}, @file{.dsc};
7597@item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
7598 contained files and meta-information.
7599@end enumerate\n")
7600
7601 ;; Modules are either GPLv2+ or GPLv3+.
7602 (license license:gpl3+)))
7603
44d10b1f
RW
7604(define-public python-nbformat
7605 (package
7606 (name "python-nbformat")
7607 (version "4.4.0")
7608 (source
7609 (origin
7610 (method url-fetch)
7611 (uri (pypi-uri "nbformat" version))
7612 (sha256
7613 (base32
7614 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
7615 (build-system python-build-system)
7616 (arguments `(#:tests? #f)) ; no test target
7617 (propagated-inputs
7618 `(("python-ipython-genutils" ,python-ipython-genutils)
7619 ("python-jsonschema" ,python-jsonschema)
7620 ("python-jupyter-core" ,python-jupyter-core)
7621 ("python-traitlets" ,python-traitlets)))
7622 (home-page "http://jupyter.org")
7623 (synopsis "Jupyter Notebook format")
7624 (description "This package provides the reference implementation of the
7625Jupyter Notebook format and Python APIs for working with notebooks.")
7626 (license license:bsd-3)))
7627
7628(define-public python2-nbformat
7629 (package-with-python2 python-nbformat))
7630
7631(define-public python-bleach
7632 (package
7633 (name "python-bleach")
ff0efc8f 7634 (version "3.1.0")
44d10b1f
RW
7635 (source
7636 (origin
7637 (method url-fetch)
7638 (uri (pypi-uri "bleach" version))
7639 (sha256
7640 (base32
ff0efc8f 7641 "1yhrgrhkln8bd6gn3imj69g1h4xqah9gaz9q26crqr6gmmvpzprz"))))
44d10b1f
RW
7642 (build-system python-build-system)
7643 (propagated-inputs
ff0efc8f 7644 `(("python-webencodings" ,python-webencodings)
44d10b1f
RW
7645 ("python-six" ,python-six)))
7646 (native-inputs
ff0efc8f
MB
7647 `(("python-pytest" ,python-pytest)
7648 ("python-pytest-runner" ,python-pytest-runner-2)))
44d10b1f
RW
7649 (home-page "https://github.com/jsocol/bleach")
7650 (synopsis "Whitelist-based HTML-sanitizing tool")
7651 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
7652 (license license:asl2.0)))
7653
7654(define-public python2-bleach
7655 (package-with-python2 python-bleach))
7656
7657(define-public python-entrypoints
7658 (package
7659 (name "python-entrypoints")
a7f1b718 7660 (version "0.3")
44d10b1f
RW
7661 (source
7662 (origin
7663 (method url-fetch)
a7f1b718 7664 (uri (pypi-uri "entrypoints" version))
44d10b1f
RW
7665 (sha256
7666 (base32
a7f1b718 7667 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
44d10b1f
RW
7668 (build-system python-build-system)
7669 ;; The package does not come with a setup.py file, so we have to generate
7670 ;; one ourselves.
7671 (arguments
7672 `(#:tests? #f
7673 #:phases
7674 (modify-phases %standard-phases
7675 (add-after 'unpack 'create-setup.py
7676 (lambda _
7677 (call-with-output-file "setup.py"
7678 (lambda (port)
7679 (format port "\
7680from setuptools import setup
7681setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
7682" ,version))))))))
7683 (home-page "https://github.com/takluyver/entrypoints")
7684 (synopsis "Discover and load entry points from installed Python packages")
7685 (description "Entry points are a way for Python packages to advertise
7686objects with some common interface. The most common examples are
7687@code{console_scripts} entry points, which define shell commands by
7688identifying a Python function to run. The @code{entrypoints} module contains
7689functions to find and load entry points.")
7690 (license license:expat)))
7691
7692(define-public python2-entrypoints
7693 (package-with-python2 python-entrypoints))
7694
7695(define-public python-nbconvert
7696 (package
7697 (name "python-nbconvert")
7698 (version "5.0.0b1")
7699 (source
7700 (origin
7701 (method url-fetch)
7702 (uri (pypi-uri "nbconvert" version))
7703 (sha256
7704 (base32
7705 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
7706 (build-system python-build-system)
7707 (arguments
7708 `(;; The "bdist_egg" target is disabled by default, causing the installation
7709 ;; to fail.
7710 #:configure-flags (list "bdist_egg")
7711 ;; FIXME: 5 failures, 40 errors.
7712 #:tests? #f))
7713 ;; #:phases
7714 ;; (modify-phases %standard-phases
7715 ;; (replace 'check
7716 ;; (lambda _
7717 ;; (zero? (system* "py.test" "-v")))))
7718 (native-inputs
7719 `(("python-pytest" ,python-pytest)))
7720 (propagated-inputs
7721 `(("python-bleach" ,python-bleach)
7722 ("python-entrypoints" ,python-entrypoints)
7723 ("python-jinja2" ,python-jinja2)
7724 ("python-jupyter-core" ,python-jupyter-core)
7725 ("python-mistune" ,python-mistune)
7726 ("python-nbformat" ,python-nbformat)
7727 ("python-pygments" ,python-pygments)
7728 ("python-traitlets" ,python-traitlets)))
7729 (home-page "http://jupyter.org")
7730 (synopsis "Converting Jupyter Notebooks")
7731 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
7732notebooks to various other formats via Jinja templates. It allows you to
7733convert an @code{.ipynb} notebook file into various static formats including:
7734
7735@enumerate
7736@item HTML
7737@item LaTeX
7738@item PDF
7739@item Reveal JS
7740@item Markdown (md)
7741@item ReStructured Text (rst)
7742@item executable script
7743@end enumerate\n")
7744 (license license:bsd-3)))
7745
7746(define-public python2-nbconvert
7747 (package-with-python2 python-nbconvert))
7748
44d10b1f
RW
7749(define-public python-notebook
7750 (package
7751 (name "python-notebook")
7752 (version "5.7.4")
7753 (source (origin
7754 (method url-fetch)
7755 (uri (pypi-uri "notebook" version))
7756 (sha256
7757 (base32
7758 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
7759 (build-system python-build-system)
7760 (arguments
7761 `(#:phases
7762 (modify-phases %standard-phases
7763 (replace 'check
7764 (lambda _
7765 ;; These tests require a browser
7766 (delete-file-recursively "notebook/tests/selenium")
7767 ;; Some tests need HOME
7768 (setenv "HOME" "/tmp")
7769 ;; This file contains "warningfilters", which are not supported
7770 ;; by this version of nose.
7771 (delete-file "setup.cfg")
7772 (with-directory-excursion "/tmp"
7773 (invoke "nosetests" "-v"))
7774 #t)))))
7775 (propagated-inputs
7776 `(("python-jupyter-core" ,python-jupyter-core)
7777 ("python-nbformat" ,python-nbformat)
7778 ("python-nbconvert" ,python-nbconvert)
7779 ("python-prometheus-client" ,python-prometheus-client)
7780 ("python-send2trash" ,python-send2trash)
7781 ("python-terminado" ,python-terminado)))
7782 (native-inputs
7783 `(("python-nose" ,python-nose)
7784 ("python-sphinx" ,python-sphinx)
7785 ("python-requests" ,python-requests)))
7786 (home-page "http://jupyter.org/")
7787 (synopsis "Web-based notebook environment for interactive computing")
7788 (description
7789 "The Jupyter HTML notebook is a web-based notebook environment for
7790interactive computing.")
7791 (properties `((python2-variant . ,(delay python2-notebook))))
7792 (license license:bsd-3)))
7793
7794(define-public python2-notebook
7795 (let ((base (package-with-python2
7796 (strip-python2-variant python-notebook))))
7797 (package (inherit base)
7798 (native-inputs
7799 `(("python2-mock" ,python2-mock)
7800 ,@(package-native-inputs base)))
7801 (arguments
7802 (substitute-keyword-arguments (package-arguments base)
7803 ((#:phases phases)
7804 `(modify-phases ,phases
7805 (add-before 'check 'disable-test-case
7806 ;; The test requires network access to localhost. Curiously it
7807 ;; fails with Python 2 only. Simply make the test-case return
7808 ;; immediately.
7809 (lambda _
7810 (substitute*
7811 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
7812 (("formats = self.nbconvert_api") "return #")))))))))))
7813
7814(define-public python-widgetsnbextension
7815 (package
7816 (name "python-widgetsnbextension")
7817 (version "3.4.2")
7818 (source
7819 (origin
7820 (method url-fetch)
7821 (uri (pypi-uri "widgetsnbextension" version))
7822 (sha256
7823 (base32
7824 "0rc2nivdy7k4m3vljx7wdh2jh11djapcgwhvzlbs0isl8gl8nqgs"))))
7825 (build-system python-build-system)
7826 (propagated-inputs
7827 `(("python-ipykernel" ,python-ipykernel)
7828 ("python-notebook" ,python-notebook)))
7829 (native-inputs
7830 `(("python-certifi" ,python-certifi)
7831 ("python-nose" ,python-nose)))
7832 (home-page "https://ipython.org")
7833 (synopsis "IPython HTML widgets for Jupyter")
7834 (description "This package provides interactive HTML widgets for Jupyter
7835notebooks.")
7836 (license license:bsd-3)))
7837
7838(define-public python2-widgetsnbextension
7839 (package-with-python2 python-widgetsnbextension))
7840
7841(define-public python-ipywidgets
7842 (package
7843 (name "python-ipywidgets")
7844 (version "5.2.2")
7845 (source
7846 (origin
7847 (method url-fetch)
7848 (uri (pypi-uri "ipywidgets" version))
7849 (sha256
7850 (base32
7851 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
7852 (build-system python-build-system)
7853 (propagated-inputs
7854 `(("python-ipython" ,python-ipython)
7855 ("python-traitlets" ,python-traitlets)
7856 ("python-widgetsnbextension" ,python-widgetsnbextension)))
7857 (native-inputs
7858 `(("python-nose" ,python-nose)
7859 ("python-pytest" ,python-pytest)))
7860 (home-page "https://ipython.org")
7861 (synopsis "IPython HTML widgets for Jupyter")
7862 (description "Ipywidgets are interactive HTML widgets for Jupyter
7863notebooks and the IPython kernel. Notebooks come alive when interactive
7864widgets are used. Users gain control of their data and can visualize changes
7865in the data.")
7866 (license license:bsd-3)))
7867
7868(define-public python2-ipywidgets
7869 (package-with-python2 python-ipywidgets))
7870
7871(define-public python-jupyter-console
7872 (package
7873 (name "python-jupyter-console")
becb9cbf 7874 (version "6.0.0")
44d10b1f
RW
7875 (source
7876 (origin
7877 (method url-fetch)
7878 (uri (pypi-uri "jupyter_console" version))
7879 (sha256
7880 (base32
becb9cbf 7881 "1xdjw11cppf1fxvwkw2bk13ckkwas3bdah8baingn9296mvfi31h"))))
44d10b1f 7882 (build-system python-build-system)
44d10b1f
RW
7883 (propagated-inputs
7884 `(("python-ipykernel" ,python-ipykernel)
7885 ("python-jupyter-client" ,python-jupyter-client)
becb9cbf 7886 ("python-prompt-toolkit" ,python-prompt-toolkit)
44d10b1f
RW
7887 ("python-pygments" ,python-pygments)))
7888 (native-inputs
7889 `(("python-nose" ,python-nose)))
7890 (home-page "https://jupyter.org")
7891 (synopsis "Jupyter terminal console")
7892 (description "This package provides a terminal-based console frontend for
7893Jupyter kernels. It also allows for console-based interaction with non-Python
7894Jupyter kernels such as IJulia and IRKernel.")
7895 (license license:bsd-3)))
7896
7897(define-public python2-jupyter-console
8e590c81
RW
7898 (package
7899 (name "python2-jupyter-console")
7900 (version "5.2.0")
7901 (source
7902 (origin
7903 (method url-fetch)
7904 (uri (pypi-uri "jupyter_console" version))
7905 (sha256
7906 (base32
7907 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
7908 (build-system python-build-system)
7909 ;; Tests only run in an TTY.
7910 (arguments `(#:tests? #f))
7911 (propagated-inputs
7912 `(("python2-ipykernel" ,python2-ipykernel)
7913 ("python2-jupyter-client" ,python2-jupyter-client)
7914 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
7915 ("python2-pygments" ,python2-pygments)))
7916 (native-inputs
7917 `(("python2-nose" ,python2-nose)))
7918 (home-page "https://jupyter.org")
7919 (synopsis "Jupyter terminal console")
7920 (description "This package provides a terminal-based console frontend for
7921Jupyter kernels. It also allows for console-based interaction with non-Python
7922Jupyter kernels such as IJulia and IRKernel.")
7923 (license license:bsd-3)))
44d10b1f
RW
7924
7925;; The python-ipython and python-jupyter-console require each other. To get
7926;; the functionality in both packages working, strip down the
7927;; python-jupyter-console package when using it as an input to python-ipython.
7928(define python-jupyter-console-minimal
7929 (package
7930 (inherit python-jupyter-console)
7931 (name "python-jupyter-console-minimal")
7932 (arguments
7933 (substitute-keyword-arguments
7934 (package-arguments python-jupyter-console)
7935 ((#:phases phases)
7936 `(modify-phases ,phases
7937 (add-after 'install 'delete-bin
7938 (lambda* (#:key outputs #:allow-other-keys)
7939 ;; Delete the bin files, to avoid conflicts in profiles
7940 ;; where python-ipython and python-jupyter-console are
7941 ;; both present.
7942 (delete-file-recursively
7943 (string-append
7944 (assoc-ref outputs "out") "/bin"))))))))
7945 ;; Remove the python-ipython propagated input, to avoid the cycle
7946 (propagated-inputs
7947 (alist-delete
7948 "python-ipython"
7949 (package-propagated-inputs python-jupyter-console)))))
7950
7951(define-public python-qtconsole
7952 (package
7953 (name "python-qtconsole")
7954 (version "4.4.3")
7955 (source
7956 (origin
7957 (method url-fetch)
7958 (uri (pypi-uri "qtconsole" version))
7959 (sha256
7960 (base32
7961 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
7962 (build-system python-build-system)
7963 (arguments
7964 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
7965 ;; but we only have the LTS version 5.x. This means that there might be
7966 ;; runtime errors, but since this is a dependency of the Jupyter package,
7967 ;; and Jupyter can be used without the qtconsole we can overlook this for
7968 ;; now.
7969 `(#:tests? #f
7970 #:phases
7971 (modify-phases %standard-phases
7972 (add-before 'check 'pre-check
7973 (lambda _
7974 (setenv "QT_QPA_PLATFORM" "offscreen")
7975 #t)))))
7976 (propagated-inputs
7977 `(("python-ipykernel" ,python-ipykernel)
7978 ("python-ipython" ,python-ipython)))
7979 (native-inputs
7980 `(("python-pytest" ,python-pytest)))
7981 (home-page "http://jupyter.org")
7982 (synopsis "Jupyter Qt console")
7983 (description "This package provides a Qt-based console for Jupyter with
7984support for rich media output.")
7985 (license license:bsd-3)))
7986
6ec87223
VC
7987(define-public python-jsbeautifier
7988 (package
7989 (name "python-jsbeautifier")
7990 (version "1.10.2")
7991 (home-page "https://github.com/beautify-web/js-beautify")
7992 (source (origin
7993 (method git-fetch)
7994 (uri (git-reference
7995 (url home-page)
7996 (commit (string-append "v" version))))
7997 (file-name (git-file-name name version))
7998 (sha256
7999 (base32
8000 "0wawb070ki1axb3jc9xvsrgpji52vcfif3zmjzc3z4g98m5xw4kg"))))
8001 (build-system python-build-system)
8002 (arguments
8003 `(#:phases (modify-phases %standard-phases
8004 (add-after 'unpack 'chdir
8005 (lambda _
8006 ;; The upstream Git repository contains all the code,
8007 ;; but this package only builds the python code.
8008 (chdir "python")
8009 #t))
8010 (add-after 'unpack 'patch-python-six-requirements
8011 (lambda _
8012 (substitute* "python/setup.py"
8013 (("six>=1.12.0")
8014 "six>=1.11.0"))
8015 #t)))))
8016 (propagated-inputs
8017 `(("python-editorconfig" ,python-editorconfig)
8018 ("python-six" ,python-six)))
8019 (native-inputs
8020 `(("python-pytest" ,python-pytest)))
8021 (synopsis "JavaScript unobfuscator and beautifier")
8022 (description "Beautify, unpack or deobfuscate JavaScript, leveraging
8023popular online obfuscators.")
8024 (license license:expat)))
8025
44d10b1f
RW
8026(define-public jupyter
8027 (package
8028 (name "jupyter")
8029 (version "1.0.0")
8030 (source
8031 (origin
8032 (method url-fetch)
8033 (uri (pypi-uri "jupyter" version))
8034 (sha256
8035 (base32
8036 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
8037 (build-system python-build-system)
8038 (arguments '(#:tests? #f)) ; there are none.
8039 (propagated-inputs
8040 `(("python-ipykernel" ,python-ipykernel)
8041 ("python-ipywidgets" ,python-ipywidgets)
8042 ("python-jupyter-console" ,python-jupyter-console)
8043 ("python-nbconvert" ,python-nbconvert)
8044 ("python-notebook" ,python-notebook)
8045 ("python-qtconsole" ,python-qtconsole)))
8046 (native-search-paths
8047 (list (search-path-specification
8048 (variable "JUPYTER_PATH")
8049 (files '("share/jupyter")))))
8050 (home-page "https://jupyter.org")
8051 (synopsis "Web application for interactive documents")
8052 (description
8053 "The Jupyter Notebook is a web application that allows you to create and
8054share documents that contain live code, equations, visualizations and
8055explanatory text. Uses include: data cleaning and transformation, numerical
8056simulation, statistical modeling, machine learning and much more.")
8057 (license license:bsd-3)))
8058
8059(define-public python-chardet
8060 (package
8061 (name "python-chardet")
8062 (version "3.0.4")
8063 (source
8064 (origin
8065 (method url-fetch)
8066 (uri (pypi-uri "chardet" version))
8067 (sha256
8068 (base32
8069 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
8070 (native-inputs
8071 `(("python-hypothesis" ,python-hypothesis)
8072 ("python-pytest" ,python-pytest)
8073 ("python-pytest-runner" ,python-pytest-runner)))
8074 (build-system python-build-system)
3d369407
MB
8075 ;; XXX: Incompatible with Pytest 4: <https://github.com/chardet/chardet/issues/173>.
8076 (arguments `(#:tests? #f))
44d10b1f
RW
8077 (home-page "https://github.com/chardet/chardet")
8078 (synopsis "Universal encoding detector for Python 2 and 3")
8079 (description
8080 "This package provides @code{chardet}, a Python module that can
8081automatically detect a wide range of file encodings.")
8082 (license license:lgpl2.1+)))
8083
8084(define-public python2-chardet
8085 (package-with-python2 python-chardet))
8086
8087(define-public python-docopt
8088 (package
8089 (name "python-docopt")
8090 (version "0.6.2")
8091 (source
8092 (origin
11e46326 8093 (method git-fetch)
44d10b1f 8094 ;; The release on PyPI does not include tests.
11e46326
EF
8095 (uri (git-reference
8096 (url "https://github.com/docopt/docopt")
8097 (commit version)))
8098 (file-name (git-file-name name version))
44d10b1f
RW
8099 (sha256
8100 (base32
11e46326 8101 "0aad9gbswnnhssin2q0m5lmpm0ahyf80ahs2zjigbn5y7fvljnd0"))))
44d10b1f
RW
8102 (build-system python-build-system)
8103 (native-inputs
8104 `(("python-pytest" ,python-pytest)))
8105 (arguments
8106 `(#:phases
8107 (modify-phases %standard-phases
8108 (replace 'check
8109 (lambda _ (invoke "py.test"))))))
8110 (home-page "http://docopt.org")
8111 (synopsis "Command-line interface description language for Python")
8112 (description "This library allows the user to define a command-line
8113interface from a program's help message rather than specifying it
4ca7207b 8114programmatically with command-line parsers like @code{getopt} and
44d10b1f
RW
8115@code{argparse}.")
8116 (license license:expat)))
8117
8118(define-public python2-docopt
8119 (package-with-python2 python-docopt))
8120
8121(define-public python-pythondialog
8122 (package
8123 (name "python-pythondialog")
8124 (version "3.4.0")
8125 (source
8126 (origin
8127 (method url-fetch)
8128 (uri (pypi-uri "pythondialog" version))
8129 (sha256
8130 (base32
8131 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
8132 (build-system python-build-system)
8133 (arguments
8134 `(#:phases
8135 (modify-phases %standard-phases
8136 (add-after 'unpack 'patch-path
8137 (lambda* (#:key inputs #:allow-other-keys)
8138 (let* ((dialog (assoc-ref inputs "dialog")))
8139 ;; Since this library really wants to grovel the search path, we
8140 ;; must hardcode dialog's store path into it.
8141 (substitute* "dialog.py"
8142 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
8143 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
8144 #t))))
8145 #:tests? #f)) ; no test suite
8146 (propagated-inputs
8147 `(("dialog" ,dialog)))
8148 (home-page "http://pythondialog.sourceforge.net/")
8149 (synopsis "Python interface to the UNIX dialog utility")
8150 (description "A Python wrapper for the dialog utility. Its purpose is to
8151provide an easy to use, pythonic and comprehensive Python interface to dialog.
8152This allows one to make simple text-mode user interfaces on Unix-like systems")
8153 (license license:lgpl2.1)
8154 (properties `((python2-variant . ,(delay python2-pythondialog))))))
8155
8156(define-public python2-pythondialog
8157 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
8158 (package
8159 (inherit base)
8160 (version (package-version python-pythondialog))
8161 (source (origin
8162 (method url-fetch)
8163 (uri (pypi-uri "python2-pythondialog" version))
8164 (sha256
8165 (base32
8166 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
8167
8168(define-public python-configobj
8169 (package
8170 (name "python-configobj")
8171 (version "5.0.6")
8172 (source (origin
8173 (method url-fetch)
b0758fbb 8174 (uri (pypi-uri "configobj" version))
44d10b1f
RW
8175 (sha256
8176 (base32
8177 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
8178 ;; Patch setup.py so it looks for python-setuptools, which is
8179 ;; required to parse the keyword 'install_requires' in setup.py.
8180 (patches (search-patches "python-configobj-setuptools.patch"))))
8181 (build-system python-build-system)
8182 (propagated-inputs
8183 `(("python-six" ,python-six)))
8184 (synopsis "Config file reading, writing and validation")
8185 (description "ConfigObj is a simple but powerful config file reader and
8186writer: an ini file round tripper. Its main feature is that it is very easy to
8187use, with a straightforward programmer’s interface and a simple syntax for
8188config files.")
8189 (home-page "https://github.com/DiffSK/configobj")
8190 (license license:bsd-3)))
8191
8192(define-public python2-configobj
8193 (package-with-python2 python-configobj))
8194
8195(define-public python-configargparse
8196 (package
8197 (name "python-configargparse")
86ae491f 8198 (version "0.14.0")
44d10b1f
RW
8199 (source (origin
8200 (method url-fetch)
8201 (uri (pypi-uri "ConfigArgParse" version))
8202 (sha256
8203 (base32
86ae491f 8204 "149fy4zya0rsnlkvxbbq43cyr8lscb5k4pj1m6n7f1grwcmzwbif"))))
44d10b1f
RW
8205 (build-system python-build-system)
8206 (native-inputs
8207 `(("python-pyyaml" ,python-pyyaml)))
8208 (arguments
8209 `(#:phases
8210 (modify-phases %standard-phases
8211 (replace 'check
8212 (lambda _
8213 ;; Bypass setuptools-shim because one test relies on "setup.py"
8214 ;; being the first argument passed to the python call.
8215 ;;
8216 ;; NOTE: Many tests do not run because they rely on Python's
8217 ;; built-in test.test_argparse, but we remove the unit tests from
8218 ;; our Python installation.
8219 (invoke "python" "setup.py" "test"))))))
8220 (synopsis "Replacement for argparse")
8221 (description "A drop-in replacement for argparse that allows options to also
8222be set via config files and/or environment variables.")
8223 (home-page "https://github.com/bw2/ConfigArgParse")
8224 (license license:expat)))
8225
8226(define-public python2-configargparse
8227 (package-with-python2 python-configargparse))
8228
8229(define-public python-argparse-manpage
8230 (package
8231 (name "python-argparse-manpage")
8232 (version "1.1")
8233 (source
8234 (origin
8235 (method url-fetch)
8236 (uri (pypi-uri "argparse-manpage" version))
8237 (sha256
8238 (base32
8239 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
8240 (build-system python-build-system)
8241 (home-page "https://github.com/praiskup/argparse-manpage")
8242 (synopsis "Build manual page from Python's ArgumentParser object")
8243 (description
8244 "This package provides tools to build manual pages from Python's
8245@code{ArgumentParser} object.")
8246 (license license:asl2.0)))
8247
3e8f76d8
RW
8248(define-public python-contextlib2
8249 (package
8250 (name "python-contextlib2")
8251 (version "0.5.5")
8252 (source
8253 (origin
8254 (method url-fetch)
8255 (uri (pypi-uri "contextlib2" version))
8256 (sha256
8257 (base32
8258 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
8259 (build-system python-build-system)
8260 (home-page "http://contextlib2.readthedocs.org/")
8261 (synopsis "Tools for decorators and context managers")
8262 (description "This module is primarily a backport of the Python
82633.2 contextlib to earlier Python versions. Like contextlib, it
8264provides utilities for common tasks involving decorators and context
8265managers. It also contains additional features that are not part of
8266the standard library.")
1e158ba1 8267 (properties `((python2-variant . ,(delay python2-contextlib2))))
3e8f76d8
RW
8268 (license license:psfl)))
8269
44d10b1f 8270(define-public python2-contextlib2
1e158ba1
EF
8271 (let ((base (package-with-python2
8272 (strip-python2-variant python-contextlib2))))
8273 (package
8274 (inherit base)
8275 (arguments
8276 (substitute-keyword-arguments (package-arguments base)
8277 ((#:phases phases)
8278 `(modify-phases ,phases
8279 (replace 'check
8280 (lambda _ (invoke "python" "test_contextlib2.py" "-v")))))))
8281 (native-inputs
8282 `(("python2-unittest2" ,python2-unittest2))))))
44d10b1f
RW
8283
8284(define-public python-texttable
8285 (package
8286 (name "python-texttable")
52cc4892 8287 (version "0.9.1")
44d10b1f
RW
8288 (source
8289 (origin
8290 (method url-fetch)
8291 (uri (pypi-uri "texttable" version))
8292 (sha256
8293 (base32
52cc4892 8294 "0yawv64c0zbawwv6zz84whb32fnb2n9jylwjcfsrcdgh7xvl340i"))))
44d10b1f
RW
8295 (build-system python-build-system)
8296 (arguments '(#:tests? #f)) ; no tests
8297 (home-page "https://github.com/foutaise/texttable/")
8298 (synopsis "Python module for creating simple ASCII tables")
8299 (description "Texttable is a Python module for creating simple ASCII
8300tables.")
8301 (license license:lgpl2.1+)))
8302
8303(define-public python2-texttable
8304 (package-with-python2 python-texttable))
8305
8306(define-public python-atomicwrites
8307 (package
8308 (name "python-atomicwrites")
14f10479 8309 (version "1.3.0")
44d10b1f
RW
8310 (source (origin
8311 (method url-fetch)
8312 (uri (pypi-uri "atomicwrites" version))
8313 (sha256
8314 (base32
14f10479 8315 "19ngcscdf3jsqmpcxn6zl5b6anmsajb6izp1smcd1n02midl9abm"))))
44d10b1f
RW
8316 (build-system python-build-system)
8317 (synopsis "Atomic file writes in Python")
8318 (description "Library for atomic file writes using platform dependent tools
8319for atomic file system operations.")
8320 (home-page "https://github.com/untitaker/python-atomicwrites")
8321 (license license:expat)))
8322
8323(define-public python2-atomicwrites
8324 (package-with-python2 python-atomicwrites))
8325
8326(define-public python-click-threading
8327 (package
8328 (name "python-click-threading")
8329 (version "0.4.4")
8330 (source (origin
8331 (method url-fetch)
8332 (uri (pypi-uri "click-threading" version))
8333 (sha256
8334 (base32
8335 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
8336 (build-system python-build-system)
8337 (propagated-inputs
8338 `(("python-click" ,python-click)))
8339 (synopsis "Utilities for multithreading in Click")
8340 (description "This package provides utilities for multithreading in Click
8341applications.")
8342 (home-page "https://github.com/click-contrib/click-threading")
8343 (license license:expat)))
8344
8345(define-public python-click-log
8346 (package
8347 (name "python-click-log")
8348 (version "0.3.2")
8349 (source (origin
8350 (method url-fetch)
8351 (uri (pypi-uri "click-log" version))
8352 (sha256
8353 (base32
8354 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
8355 (build-system python-build-system)
8356 (propagated-inputs
8357 `(("python-click" ,python-click)))
8358 (synopsis "Logging for click applications")
8359 (description "This package provides a Python library for logging Click
8360applications.")
8361 (home-page "https://github.com/click-contrib/click-log")
8362 (license license:expat)))
8363
8364(define-public python-apipkg
8365 (package
8366 (name "python-apipkg")
8367 (version "1.4")
8368 (source (origin
8369 (method url-fetch)
8370 (uri (pypi-uri "apipkg" version))
8371 (sha256
8372 (base32
8373 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
8374 (build-system python-build-system)
8375 (native-inputs
8376 `(("python-pytest" ,python-pytest)))
8377 (synopsis "Namespace control and lazy-import mechanism")
8378 (description "With apipkg you can control the exported namespace of a Python
8379package and greatly reduce the number of imports for your users. It is a small
8380pure Python module that works on virtually all Python versions.")
8381 (home-page "https://github.com/pytest-dev/apipkg")
8382 (license license:expat)))
8383
8384(define-public python2-apipkg
8385 (package-with-python2 python-apipkg))
8386
8387(define-public python-execnet
8388 (package
8389 (name "python-execnet")
8390 (version "1.4.1")
8391 (source (origin
8392 (method url-fetch)
8393 (uri (pypi-uri "execnet" version))
8394 (sha256
8395 (base32
8396 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
8397 (build-system python-build-system)
8398 (arguments
8399 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
8400 ;; The two test failures are caused by the lack of an `ssh` executable.
8401 ;; The test suite can be run with pytest after the 'install' phase.
8402 #:tests? #f))
8403 (native-inputs
8404 `(("python-pytest" ,python-pytest)
8405 ("python-setuptools-scm" ,python-setuptools-scm)))
8406 (propagated-inputs
8407 `(("python-apipkg" ,python-apipkg)))
8408 (synopsis "Rapid multi-Python deployment")
8409 (description "Execnet provides a share-nothing model with
8410channel-send/receive communication for distributing execution across many
8411Python interpreters across version, platform and network barriers. It has a
8412minimal and fast API targeting the following uses:
8413@enumerate
8414@item distribute tasks to (many) local or remote CPUs
8415@item write and deploy hybrid multi-process applications
8416@item write scripts to administer multiple environments
8417@end enumerate")
8418 (home-page "http://codespeak.net/execnet/")
8419 (license license:expat)))
8420
8421(define-public python2-execnet
8422 (package-with-python2 python-execnet))
8423
8424(define-public python-icalendar
8425 (package
8426 (name "python-icalendar")
43ae8f79 8427 (version "4.0.4")
44d10b1f
RW
8428 (source (origin
8429 (method url-fetch)
8430 (uri (pypi-uri "icalendar" version))
8431 (sha256
8432 (base32
43ae8f79 8433 "16gjvqv0n05jrb9g228pdjgzd3amz2pdhvcgsn1jypszjg5m2w9l"))))
44d10b1f
RW
8434 (build-system python-build-system)
8435 (propagated-inputs
8436 `(("python-dateutil" ,python-dateutil)
8437 ("python-pytz" ,python-pytz)))
8438 (synopsis "Python library for parsing iCalendar files")
8439 (description "The icalendar package is a parser/generator of iCalendar
8440files for use with Python.")
8441 (home-page "https://github.com/collective/icalendar")
8442 (license license:bsd-2)))
8443
44d10b1f
RW
8444(define-public python-args
8445 (package
8446 (name "python-args")
8447 (version "0.1.0")
8448 (source (origin
8449 (method url-fetch)
8450 (uri (pypi-uri "args" version))
8451 (sha256
8452 (base32
8453 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
8454 (build-system python-build-system)
8455 (home-page "https://github.com/kennethreitz/args")
8456 (synopsis "Command-line argument parser")
8457 (description
8458 "This library provides a Python module to parse command-line arguments.")
8459 (license license:bsd-3)))
8460
8461(define-public python2-args
8462 (package-with-python2 python-args))
8463
8464(define-public python-clint
8465 (package
8466 (name "python-clint")
8467 (version "0.5.1")
8468 (source (origin
8469 (method url-fetch)
8470 (uri (pypi-uri "clint" version))
8471 (sha256
8472 (base32
8473 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
8474 (build-system python-build-system)
8475 (arguments
8476 '(#:phases
8477 (modify-phases %standard-phases
8478 (replace 'check
8479 (lambda _ (invoke "py.test" "-v"))))))
8480 (native-inputs
8481 `(("python-pytest" ,python-pytest)))
8482 (propagated-inputs
8483 `(("python-args" ,python-args)))
8484 (home-page "https://github.com/kennethreitz/clint")
8485 (synopsis "Command-line interface tools")
8486 (description
8487 "Clint is a Python module filled with a set of tools for developing
8488command-line applications, including tools for colored and indented
8489output, progress bar display, and pipes.")
8490 (license license:isc)))
8491
8492(define-public python2-clint
8493 (package-with-python2 python-clint))
8494
44d10b1f
RW
8495(define-public python-rply
8496 (package
8497 (name "python-rply")
8498 (version "0.7.5")
8499 (source (origin
8500 (method url-fetch)
8501 (uri (pypi-uri "rply" version))
8502 (sha256
8503 (base32
8504 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
8505 (build-system python-build-system)
8506 (propagated-inputs
8507 `(("python-appdirs" ,python-appdirs)))
8508 (home-page "https://github.com/alex/rply")
8509 (synopsis "Parser generator for Python")
8510 (description
8511 "This package provides a pure Python based parser generator, that also
8512works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
8513with a new public API, and RPython support.")
8514 (license license:bsd-3)))
8515
8516(define-public python2-rply
8517 (package-with-python2 python-rply))
8518
8519(define-public python-hy
8520 (package
8521 (name "python-hy")
c215051d 8522 (version "0.17.0")
44d10b1f
RW
8523 (source (origin
8524 (method url-fetch)
8525 (uri (pypi-uri "hy" version))
8526 (sha256
8527 (base32
c215051d 8528 "1gdbqsirsdxj320wnp7my5awzs1kfs6m4fqmkzbd1zd47qzj0zfi"))))
44d10b1f
RW
8529 (build-system python-build-system)
8530 (arguments
8531 '(#:phases
8532 (modify-phases %standard-phases
6ba6a1c1
JG
8533 (add-before 'install 'set-HOME
8534 (lambda _
8535 (setenv "HOME" "/tmp")))
44d10b1f
RW
8536 (replace 'check
8537 (lambda _
8538 ;; Tests require write access to HOME.
8539 (setenv "HOME" "/tmp")
8540 (invoke "nosetests"))))))
8541 (native-inputs
8542 `(("python-coverage" ,python-coverage)
8543 ("python-nose" ,python-nose)))
8544 (propagated-inputs
8545 `(("python-astor" ,python-astor)
8546 ("python-clint" ,python-clint)
c215051d
JG
8547 ("python-rply" ,python-rply)
8548 ("python-fastentrypoints"
8549 ,python-fastentrypoints)
8550 ("python-funcparserlib"
8551 ,python-funcparserlib)))
44d10b1f
RW
8552 (home-page "http://hylang.org/")
8553 (synopsis "Lisp frontend to Python")
8554 (description
8555 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
8556its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
8557Python at your fingertips, in Lisp form.")
8558 (license license:expat)))
8559
8560(define-public python2-hy
8561 (package-with-python2 python-hy))
8562
8563(define-public python2-functools32
8564 (package
8565 (name "python2-functools32")
8566 (version "3.2.3-2")
8567 (source
8568 (origin
8569 (method url-fetch)
8570 (uri (pypi-uri "functools32" version))
8571 (sha256
8572 (base32
8573 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
8574 (build-system python-build-system)
8575 (arguments
8576 `(#:python ,python-2
8577 #:tests? #f)) ; no test target
8578 (home-page "https://github.com/MiCHiLU/python-functools32")
8579 (synopsis
8580 "Backport of the functools module from Python 3.2.3")
8581 (description
8582 "This package is a backport of the @code{functools} module from Python
85833.2.3 for use with older versions of Python and PyPy.")
8584 (license license:expat)))
8585
8586(define-public python2-subprocess32
8587 (package
8588 (name "python2-subprocess32")
8589 (version "3.2.7")
8590 (source (origin
8591 (method url-fetch)
8592 (uri (pypi-uri "subprocess32" version))
8593 (sha256
8594 (base32
8595 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
8596 (patches
8597 (search-patches "python2-subprocess32-disable-input-test.patch"))))
8598 (build-system python-build-system)
8599 (arguments
8600 `(#:python ,python-2
8601 ;; The test suite fails with Python > 2.7.13:
8602 ;; import test.support
8603 ;; ImportError: No module named support
8604 #:tests? #f
8605 #:phases
8606 (modify-phases %standard-phases
8607 (add-after 'unpack 'patch-/bin/sh
8608 (lambda _
8609 (substitute* '("subprocess32.py"
8610 "test_subprocess32.py")
8611 (("/bin/sh") (which "sh")))
8612 #t)))))
8613 (home-page "https://github.com/google/python-subprocess32")
8614 (synopsis "Backport of the subprocess module from Python 3.2")
8615 (description
8616 "This is a backport of the @code{subprocess} standard library module
8617from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
8618new features. On POSIX systems it is guaranteed to be reliable when used
8619in threaded applications. It includes timeout support from Python 3.3 but
8620otherwise matches 3.2’s API.")
8621 (license license:psfl)))
8622
8623(define-public python2-futures
8624 (package
8625 (name "python2-futures")
8626 (version "3.2.0")
8627 (source
8628 (origin
8629 (method url-fetch)
8630 (uri (pypi-uri "futures" version))
8631 (sha256
8632 (base32
8633 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
8634 (build-system python-build-system)
ba88eea2
RW
8635 (arguments
8636 `(#:python ,python-2
8637 #:phases
8638 (modify-phases %standard-phases
8639 (replace 'check
8640 (lambda _
8641 (invoke "python" "test_futures.py")
8642 #t)))))
44d10b1f
RW
8643 (home-page "https://github.com/agronholm/pythonfutures")
8644 (synopsis
8645 "Backport of the concurrent.futures package from Python 3.2")
8646 (description
8647 "The concurrent.futures module provides a high-level interface for
8648asynchronously executing callables. This package backports the
8649concurrent.futures package from Python 3.2")
8650 (license license:bsd-3)))
8651
8652(define-public python-promise
8653 (package
8654 (name "python-promise")
8655 (version "0.4.2")
8656 (source
8657 (origin
8658 (method url-fetch)
8659 (uri (pypi-uri "promise" version))
8660 (sha256
8661 (base32
8662 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
8663 (build-system python-build-system)
8664 ;; Tests wants python-futures, which is a python2 only program, and
8665 ;; can't be found by python-promise at test time.
8666 (arguments `(#:tests? #f))
8667 (home-page "https://github.com/syrusakbary/promise")
8668 (synopsis "Promises/A+ implementation for Python")
8669 (description
8670 "Promises/A+ implementation for Python")
8671 (properties `((python2-variant . ,(delay python2-promise))))
8672 (license license:expat)))
8673
8674(define-public python2-promise
8675 (let ((promise (package-with-python2
8676 (strip-python2-variant python-promise))))
8677 (package (inherit promise)
8678 (arguments (substitute-keyword-arguments (package-arguments promise)
8679 ((#:tests? _) #t)))
8680 (native-inputs
8681 `(("python2-futures" ,python2-futures)
8682 ("python2-pytest" ,python2-pytest)
8683 ,@(package-native-inputs promise))))))
8684
d71d85cd
RW
8685(define-public python-progressbar33
8686 (package
8687 (name "python-progressbar33")
8688 (version "2.4")
8689 (source
8690 (origin
8691 (method url-fetch)
8692 (uri (pypi-uri "progressbar33" version))
8693 (sha256
8694 (base32
8695 "1zvf6zs5hzrc03p9nfs4p16vhilqikycvv1yk0pxn8s07fdhvzji"))))
8696 (build-system python-build-system)
8697 (home-page "http://github.com/germangh/python-progressbar")
8698 (synopsis "Text progress bar library for Python")
8699 (description
8700 "This package provides a text progress bar library for Python. This
8701version only differs from the original @code{progressbar} package in that it
8702uses relative package imports instead of absolute imports, which is necessary
8703for the module to work under Python 3.3.")
8704 ;; Either or both of these licenses may be selected.
8705 (license (list license:lgpl2.1+ license:bsd-3))))
8706
44d10b1f
RW
8707(define-public python-colorama
8708 (package
8709 (name "python-colorama")
8710 (version "0.3.9")
8711 (source
8712 (origin
8713 (method url-fetch)
8714 (uri (pypi-uri "colorama" version))
8715 (sha256
8716 (base32
8717 "1wd1szk0z3073ghx26ynw43gnc140ibln1safgsis6s6z3s25ss8"))))
8718 (build-system python-build-system)
8719 (synopsis "Colored terminal text rendering for Python")
8720 (description "Colorama is a Python library for rendering colored terminal
8721text.")
8722 (home-page "https://pypi.python.org/pypi/colorama")
8723 (license license:bsd-3)))
8724
8725(define-public python2-colorama
8726 (package-with-python2 python-colorama))
8727
8728(define-public python-rsa
8729 (package
8730 (name "python-rsa")
8731 (version "3.4.2")
8732 (source
8733 (origin
8734 (method url-fetch)
8735 (uri (pypi-uri "rsa" version))
8736 (sha256
8737 (base32
8738 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
8739 (build-system python-build-system)
8740 (propagated-inputs
8741 `(("python-pyasn1" ,python-pyasn1)))
8742 (synopsis "Pure-Python RSA implementation")
8743 (description "Python-RSA is a pure-Python RSA implementation. It supports
8744encryption and decryption, signing and verifying signatures, and key
8745generation according to PKCS#1 version 1.5. It can be used as a Python
8746library as well as on the command line.")
8747 (home-page "https://stuvel.eu/rsa")
8748 (license license:asl2.0)))
8749
8750(define-public python2-rsa
8751 (package-with-python2 python-rsa))
8752
8753(define-public python-pluggy
8754 (package
8755 (name "python-pluggy")
e5731c03 8756 (version "0.11.0")
44d10b1f
RW
8757 (source
8758 (origin
8759 (method url-fetch)
8760 (uri (pypi-uri "pluggy" version))
8761 (sha256
8762 (base32
e5731c03 8763 "10511a54dvafw1jrk75mrhml53c7b7w4yaw7241696lc2hfvr895"))))
44d10b1f
RW
8764 (build-system python-build-system)
8765 (native-inputs
8766 `(("python-setuptools-scm" ,python-setuptools-scm)))
8767 (synopsis "Plugin and hook calling mechanism for Python")
8768 (description "Pluggy is an extraction of the plugin manager as used by
8769Pytest but stripped of Pytest specific details.")
8770 (home-page "https://pypi.python.org/pypi/pluggy")
8771 (license license:expat)))
8772
8773(define-public python2-pluggy
8774 (package-with-python2 python-pluggy))
8775
8776(define-public python-tox
8777 (package
8778 (name "python-tox")
8779 (version "2.8.1")
8780 (source
8781 (origin
8782 (method url-fetch)
8783 (uri (pypi-uri "tox" version))
8784 (sha256
8785 (base32
8786 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
8787 (build-system python-build-system)
8788 (arguments
8789 ;; FIXME: Tests require pytest-timeout, which itself requires
8790 ;; pytest>=2.8.0 for installation.
8791 '(#:tests? #f))
8792 (propagated-inputs
8793 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
8794 ("python-py" ,python-py)
8795 ("python-virtualenv" ,python-virtualenv)))
8796 (native-inputs
8797 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
8798 ("python-pytest" ,python-pytest) ; >= 2.3.5
8799 ("python-setuptools-scm" ,python-setuptools-scm)))
8800 (home-page "http://tox.testrun.org/")
8801 (synopsis "Virtualenv-based automation of test activities")
8802 (description "Tox is a generic virtualenv management and test command line
8803tool. It can be used to check that a package installs correctly with
8804different Python versions and interpreters, or run tests in each type of
8805supported environment, or act as a frontend to continuous integration
8806servers.")
8807 (license license:expat)))
8808
8809(define-public python2-tox
8810 (package-with-python2 python-tox))
8811
8812(define-public python-jmespath
8813 (package
8814 (name "python-jmespath")
27fb781f 8815 (version "0.9.4")
44d10b1f
RW
8816 (source
8817 (origin
8818 (method url-fetch)
8819 (uri (pypi-uri "jmespath" version))
8820 (sha256
8821 (base32
27fb781f 8822 "0k0765x1mybcrzajh3hiqkl8sy9hs0bmn4900frxy0j3ykvaxqmx"))))
44d10b1f
RW
8823 (build-system python-build-system)
8824 (native-inputs
8825 `(("python-nose" ,python-nose)))
8826 (synopsis "JSON Matching Expressions")
8827 (description "JMESPath (pronounced “james path”) is a Python library that
8828allows one to declaratively specify how to extract elements from a JSON
8829document.")
8830 (home-page "https://github.com/jmespath/jmespath.py")
8831 (license license:expat)))
8832
8833(define-public python2-jmespath
8834 (package-with-python2 python-jmespath))
8835
8836(define-public python-botocore
8837 (package
7bcf827c
RW
8838 (name "python-botocore")
8839 (version "1.12.149")
8840 (source
8841 (origin
8842 (method url-fetch)
8843 (uri (pypi-uri "botocore" version))
8844 (sha256
8845 (base32
8846 "12597f74khp3ngwr282cb949w0gcqj20rkfc3x275dijavyy5cmf"))))
8847 (build-system python-build-system)
8848 (arguments
8849 ;; FIXME: Many tests are failing.
8850 '(#:tests? #f))
8851 (propagated-inputs
8852 `(("python-dateutil" ,python-dateutil)
8853 ("python-docutils" ,python-docutils)
8854 ("python-jmespath" ,python-jmespath)))
8855 (native-inputs
8856 `(("python-mock" ,python-mock)
8857 ("python-nose" ,python-nose)
8858 ("behave" ,behave)
8859 ("python-tox" ,python-tox)
8860 ("python-urllib3" ,python-urllib3)
8861 ("python-wheel" ,python-wheel)))
8862 (home-page "https://github.com/boto/botocore")
8863 (synopsis "Low-level interface to AWS")
8864 (description "Botocore is a Python library that provides a low-level
44d10b1f 8865interface to the Amazon Web Services (AWS) API.")
7bcf827c 8866 (license license:asl2.0)))
44d10b1f
RW
8867
8868(define-public python2-botocore
8869 (package-with-python2 python-botocore))
8870
8871(define-public python-xdo
8872 (package
8873 (name "python-xdo")
8874 (version "0.3")
8875 (source (origin
8876 (method url-fetch)
8877 (uri (string-append
8878 "http://http.debian.net/debian/pool/main/p/python-xdo/"
8879 "python-xdo_" version ".orig.tar.gz"))
8880 (sha256
8881 (base32
8882 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
8883 (build-system python-build-system)
8884 (arguments
8885 '(#:phases
8886 (modify-phases %standard-phases
8887 (add-before 'install 'patch-libxdo-path
8888 ;; Hardcode the path of dynamically loaded libxdo library.
8889 (lambda* (#:key inputs #:allow-other-keys)
8890 (let ((libxdo (string-append
8891 (assoc-ref inputs "xdotool")
8892 "/lib/libxdo.so")))
8893 (substitute* "xdo/_xdo.py"
8894 (("find_library\\(\"xdo\"\\)")
8895 (simple-format #f "\"~a\"" libxdo)))
8896 #t))))
8897 #:tests? #f)) ; no tests provided
8898 (propagated-inputs
8899 `(("python-six" ,python-six)))
8900 (inputs
8901 `(("xdotool" ,xdotool)
8902 ("libX11" ,libx11)))
8903 (home-page "https://tracker.debian.org/pkg/python-xdo")
8904 (synopsis "Python library for simulating X11 keyboard/mouse input")
8905 (description "Provides bindings to libxdo for manipulating X11 via simulated
8906input. (Note that this is mostly a legacy library; you may wish to look at
8907python-xdo for newer bindings.)")
8908 (license license:bsd-3)))
8909
8910(define-public python2-xdo
8911 (package-with-python2 python-xdo))
8912
8913(define-public python-mako
8914 (package
8915 (name "python-mako")
6bf53ad5 8916 (version "1.1.0")
44d10b1f
RW
8917 (source
8918 (origin
8919 (method url-fetch)
8920 (uri (pypi-uri "Mako" version))
8921 (sha256
8922 (base32
6bf53ad5 8923 "0jqa3qfpykyn4fmkn0kh6043sfls7br8i2bsdbccazcvk9cijsd3"))))
44d10b1f 8924 (build-system python-build-system)
6bf53ad5
MB
8925 (arguments
8926 `(#:phases (modify-phases %standard-phases
8927 (replace 'check
8928 (lambda _
8929 (invoke "pytest" "-vv"))))))
44d10b1f
RW
8930 (propagated-inputs
8931 `(("python-markupsafe" ,python-markupsafe)))
8932 (native-inputs
8933 `(("python-mock" ,python-mock)
44d10b1f 8934 ("python-pytest" ,python-pytest)))
7016e620 8935 (home-page "https://www.makotemplates.org/")
44d10b1f
RW
8936 (synopsis "Templating language for Python")
8937 (description "Mako is a templating language for Python that compiles
8938templates into Python modules.")
8939 (license license:expat)))
8940
8941(define-public python2-mako
8942 (package-with-python2 python-mako))
8943
8944(define-public python-waitress
8945 (package
8946 (name "python-waitress")
8947 (version "1.1.0")
8948 (source
8949 (origin
8950 (method url-fetch)
8951 (uri (pypi-uri "waitress" version))
8952 (patches (search-patches "python-waitress-fix-tests.patch"))
8953 (sha256
8954 (base32
8955 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
8956 (build-system python-build-system)
8957 (home-page "https://github.com/Pylons/waitress")
8958 (synopsis "Waitress WSGI server")
8959 (description "Waitress is meant to be a production-quality pure-Python WSGI
8960server with very acceptable performance.")
8961 (license license:zpl2.1)))
8962
8963(define-public python2-waitress
8964 (package-with-python2 python-waitress))
8965
b2b23d12
TLC
8966(define-public python-whichcraft
8967 (package
8968 (name "python-whichcraft")
8969 (version "0.6.1")
8970 (source
8971 (origin
8972 (method url-fetch)
8973 (uri (pypi-uri "whichcraft" version))
8974 (sha256
8975 (base32
8976 "11yfkzyplizdgndy34vyd5qlmr1n5mxis3a3svxmx8fnccdvknxc"))))
8977 (build-system python-build-system)
8978 (native-inputs
8979 `(("python-pytest" ,python-pytest)))
8980 (home-page "https://github.com/pydanny/whichcraft")
8981 (synopsis "Cross-platform cross-python shutil.which functionality")
8982 (description
8983 "This package provides a shim of the shutil.which function that's
8984designed to work across multiple versions of Python.")
8985 (license license:bsd-3)))
8986
1133ca44
TLC
8987(define-public python-cookiecutter
8988 (package
8989 (name "python-cookiecutter")
8990 (version "1.6.0")
8991 (source
8992 (origin
8993 (method url-fetch)
8994 (uri (pypi-uri "cookiecutter" version))
8995 (sha256
8996 (base32
8997 "0glsvaz8igi2wy1hsnhm9fkn6560vdvdixzvkq6dn20z3hpaa5hk"))))
8998 (build-system python-build-system)
8999 (native-inputs
9000 `(("python-freezegun" ,python-freezegun)
9001 ("python-pytest" ,python-pytest)
9002 ("python-pytest-catchlog" ,python-pytest-catchlog)
9003 ("python-pytest-cov" ,python-pytest-cov)
9004 ("python-pytest-mock" ,python-pytest-mock)))
9005 (propagated-inputs
9006 `(("python-binaryornot" ,python-binaryornot)
9007 ("python-click" ,python-click)
9008 ("python-future" ,python-future)
9009 ("python-jinja2" ,python-jinja2)
9010 ("python-jinja2-time" ,python-jinja2-time)
9011 ("python-poyo" ,python-poyo)
9012 ("python-requests" ,python-requests)
9013 ("python-whichcraft" ,python-whichcraft)))
9014 (home-page "https://github.com/audreyr/cookiecutter")
9015 (synopsis
9016 "Command-line utility that creates projects from project templates")
9017 (description
9018 "This package provides a command-line utility that creates projects from
9019project templates, e.g. creating a Python package project from a Python package
9020project template.")
9021 (license license:bsd-3)))
9022
44d10b1f
RW
9023(define-public python-pyquery
9024 (package
9025 (name "python-pyquery")
9026 (version "1.2.17")
9027 (source
9028 (origin
9029 (method url-fetch)
9030 (uri (pypi-uri "pyquery" version))
9031 (sha256
9032 (base32
9033 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
9034 (build-system python-build-system)
9035 (native-inputs
9036 `(("python-webob" ,python-webob)
9037 ("python-webtest" ,python-webtest)))
9038 (propagated-inputs
9039 `(("python-lxml" ,python-lxml)
9040 ("python-cssselect" ,python-cssselect)))
9041 (home-page "https://github.com/gawel/pyquery")
9042 (synopsis "Make jQuery-like queries on xml documents")
9043 (description "pyquery allows you to make jQuery queries on xml documents.
9044The API is as much as possible the similar to jQuery. pyquery uses lxml for
9045fast xml and html manipulation.")
9046 (license license:bsd-3)))
9047
44d10b1f
RW
9048(define-public python-anyjson
9049 (package
9050 (name "python-anyjson")
9051 (version "0.3.3")
9052 (source
9053 (origin
9054 (method url-fetch)
9055 (uri (pypi-uri "anyjson" version))
9056 (sha256
9057 (base32
9058 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
9059 (build-system python-build-system)
9060 (arguments
9061 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
9062 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
9063 ;; whatever) so this transformation needs to be done before the tests
9064 ;; can be run. Maybe we could add a build step to transform beforehand
9065 ;; but it could be annoying/difficult.
9066 ;; We can enable tests for the Python 2 version, though, and do below.
9067 #:tests? #f))
9068 (home-page "https://bitbucket.org/runeh/anyjson/")
9069 (synopsis
9070 "Wraps best available JSON implementation in a common interface")
9071 (description
9072 "Anyjson loads whichever is the fastest JSON module installed
9073and provides a uniform API regardless of which JSON implementation is used.")
9074 (license license:bsd-3)
9075 (properties `((python2-variant . ,(delay python2-anyjson))))))
9076
9077(define-public python2-anyjson
9078 (let ((anyjson (package-with-python2
9079 (strip-python2-variant python-anyjson))))
9080 (package
9081 (inherit anyjson)
9082 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
9083 #:tests? #t
9084 ,@(package-arguments anyjson)))
9085 (native-inputs `(("python2-nose" ,python2-nose))))))
9086
9087(define-public python-amqp
9088 (package
9089 (name "python-amqp")
9090 (version "2.3.2")
9091 (source
9092 (origin
9093 (method url-fetch)
9094 (uri (pypi-uri "amqp" version))
9095 (sha256
9096 (base32
9097 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
9098 (build-system python-build-system)
9099 (native-inputs
9100 `(("python-case" ,python-case)
9101 ("python-pytest-sugar" ,python-pytest-sugar)
9102 ("python-mock" ,python-mock)))
9103 (propagated-inputs
9104 `(("python-vine" ,python-vine)))
9105 (home-page "https://github.com/celery/py-amqp")
9106 (synopsis
9107 "Low-level AMQP client for Python (fork of amqplib)")
9108 (description
9109 "This is a fork of amqplib which was originally written by Barry Pederson.
9110It is maintained by the Celery project, and used by kombu as a pure python
9111alternative when librabbitmq is not available.")
9112 (license license:lgpl2.1+)
9113 (properties `((python2-variant . ,(delay python2-amqp))))))
9114
9115(define-public python2-amqp
9116 (let ((amqp (package-with-python2
9117 (strip-python2-variant python-amqp))))
9118 (package
9119 (inherit amqp)
9120 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
9121 ;; unmaintained. Weirdly, does not do this on the python 3
9122 ;; version?
9123 #:tests? #f
9124 ,@(package-arguments amqp))))))
9125
9126(define-public python-txamqp
9127 (package
9128 (name "python-txamqp")
9129 (version "0.8.2")
9130 (source
9131 (origin
9132 (method url-fetch)
9133 (uri (pypi-uri "txAMQP" version))
9134 (sha256
9135 (base32
9136 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
9137 (build-system python-build-system)
9138 (propagated-inputs
9139 `(("python-six" ,python-six)
9140 ("python-twisted" ,python-twisted)))
9141 (home-page "https://github.com/txamqp/txamqp")
9142 (synopsis "Communicate with AMQP peers and brokers using Twisted")
9143 (description
9144 "This package provides a Python library for communicating with AMQP peers
9145and brokers using the asynchronous networking framework Twisted. It contains
9146all the necessary code to connect, send and receive messages to/from an
9147AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
9148also includes support for using Thrift RPC over AMQP in Twisted
9149applications.")
9150 (license license:asl2.0)))
9151
9152(define-public python2-txamqp
9153 (package-with-python2 python-txamqp))
9154
9155(define-public python-kombu
9156 (package
9157 (name "python-kombu")
9158 (version "4.2.2")
9159 (source
9160 (origin
9161 (method url-fetch)
9162 (uri (pypi-uri "kombu" version))
9163 (sha256
9164 (base32
9165 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
9166 (build-system python-build-system)
9167 (native-inputs
9168 `(("python-mock" ,python-mock)
9169 ("python-case" ,python-case)
9170 ("python-pyro4" ,python-pyro4)
9171 ("python-pytest-sugar" ,python-pytest-sugar)
9172 ("python-pytz" ,python-pytz)))
9173 (propagated-inputs
9174 `(("python-anyjson" ,python-anyjson)
9175 ("python-amqp" ,python-amqp)
9176 ("python-redis" ,python-redis)))
9177 (home-page "https://kombu.readthedocs.io")
9178 (synopsis "Message passing library for Python")
9179 (description "The aim of Kombu is to make messaging in Python as easy as
9180possible by providing an idiomatic high-level interface for the AMQ protocol,
9181and also provide proven and tested solutions to common messaging problems.
9182AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
9183message orientation, queuing, routing, reliability and security, for which the
9184RabbitMQ messaging server is the most popular implementation.")
9185 (license license:bsd-3)
9186 (properties `((python2-variant . ,(delay python2-kombu))))))
9187
9188(define-public python2-kombu
9189 (let ((kombu (package-with-python2
9190 (strip-python2-variant python-kombu))))
9191 (package
9192 (inherit kombu)
9193 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
9194 ;; It works fine on the python3 variant.
9195 #:tests? #f
9196 ,@(package-arguments kombu)))
9197 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9198 ,@(package-native-inputs kombu))))))
9199
9200(define-public python-billiard
9201 (package
9202 (name "python-billiard")
9203 (version "3.5.0.5")
9204 (source
9205 (origin
9206 (method url-fetch)
9207 (uri (pypi-uri "billiard" version))
9208 (sha256
9209 (base32
9210 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
9211 (build-system python-build-system)
9212 (native-inputs
9213 `(("python-case" ,python-case)
9214 ("python-pytest" ,python-pytest)))
9215 (home-page "https://github.com/celery/billiard")
9216 (synopsis
9217 "Python multiprocessing fork with improvements and bugfixes")
9218 (description
9219 "Billiard is a fork of the Python 2.7 multiprocessing package. The
9220multiprocessing package itself is a renamed and updated version of R Oudkerk's
9221pyprocessing package. This standalone variant is intended to be compatible with
9222Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
9223 (license license:bsd-3)
9224 (properties `((python2-variant . ,(delay python2-billiard))))))
9225
9226(define-public python2-billiard
9227 (let ((billiard (package-with-python2
9228 (strip-python2-variant python-billiard))))
9229 (package
9230 (inherit billiard)
9231 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9232 ("python2-mock" ,python2-mock)
9233 ,@(package-native-inputs billiard))))))
9234
9235(define-public python-celery
9236 (package
9237 (name "python-celery")
9238 (version "4.2.1")
9239 (source
9240 (origin
9241 (method url-fetch)
9242 (uri (pypi-uri "celery" version))
9243 (sha256
9244 (base32
9245 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
9246 (build-system python-build-system)
9247 (arguments
9248 '(;; TODO The tests fail with Python 3.7
9249 ;; https://github.com/celery/celery/issues/4849
9250 #:tests? #f
9251 #:phases
9252 (modify-phases %standard-phases
9253 (add-after 'unpack 'patch-requirements
9254 (lambda _
9255 (substitute* "requirements/test.txt"
9256 (("pytest>=3\\.0,<3\\.3")
9257 "pytest>=3.0"))
9258 #t)))))
9259 (native-inputs
9260 `(("python-case" ,python-case)
9261 ("python-pytest" ,python-pytest)))
9262 (propagated-inputs
9263 `(("python-pytz" ,python-pytz)
9264 ("python-billiard" ,python-billiard)
9265 ("python-kombu" ,python-kombu)))
9266 (home-page "https://celeryproject.org")
9267 (synopsis "Distributed Task Queue")
9268 (description "Celery is an asynchronous task queue/job queue based on
9269distributed message passing. It is focused on real-time operation, but
9270supports scheduling as well. The execution units, called tasks, are executed
9271concurrently on a single or more worker servers using multiprocessing,
9272Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
9273synchronously (wait until ready).")
9274 (license license:bsd-3)
9275 (properties `((python2-variant . ,(delay python2-celery))))))
9276
9277(define-public python2-celery
9278 (let ((celery (package-with-python2
9279 (strip-python2-variant python-celery))))
9280 (package
9281 (inherit celery)
9282 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9283 ("python2-mock" ,python2-mock)
9284 ,@(package-native-inputs celery))))))
9285
9286(define-public python-translitcodec
9287 (package
9288 (name "python-translitcodec")
9289 (version "0.4.0")
9290 (source
9291 (origin
9292 (method url-fetch)
9293 (uri (pypi-uri "translitcodec" version))
9294 (sha256
9295 (base32
9296 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
9297 (build-system python-build-system)
9298 (arguments
9299 `(#:tests? #f)) ; no tests provided
9300 (home-page
9301 "https://github.com/claudep/translitcodec")
9302 (synopsis
9303 "Unicode to 8-bit charset transliteration codec")
9304 (description
9305 "This package contains codecs for transliterating ISO 10646 texts into
9306best-effort representations using smaller coded character sets (ASCII,
9307ISO 8859, etc.).")
9308 (license license:expat)))
9309
9310(define-public python2-translitcodec
9311 (package-with-python2 python-translitcodec))
9312
9313(define-public python-editor
9314 (package
9315 (name "python-editor")
9316 (version "0.5")
9317 (source
9318 (origin
9319 (method url-fetch)
9320 (uri (pypi-uri "python-editor" version))
9321 (sha256
9322 (base32
9323 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
9324 (build-system python-build-system)
9325 (home-page
9326 "https://github.com/fmoo/python-editor")
9327 (synopsis
9328 "Programmatically open an editor, capture the result")
9329 (description
9330 "python-editor is a library that provides the editor module for
9331programmatically interfacing with your system's $EDITOR.")
9332 (license license:asl2.0)))
9333
9334(define-public python2-editor
9335 (package-with-python2 python-editor))
9336
44d10b1f
RW
9337(define-public python-vobject
9338 (package
9339 (name "python-vobject")
9340 (version "0.9.5")
9341 (source (origin
9342 (method url-fetch)
9343 (uri (pypi-uri "vobject" version))
9344 (sha256
9345 (base32
9346 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
9347 (build-system python-build-system)
9348 (arguments
9349 '(;; The test suite relies on some non-portable Windows interfaces.
9350 #:tests? #f))
9351 (propagated-inputs
9352 `(("python-dateutil" ,python-dateutil)
9353 ("python-pyicu" ,python-pyicu)))
9354 (synopsis "Parse and generate vCard and vCalendar files")
9355 (description "Vobject is intended to be a full featured Python package for
9356parsing and generating vCard and vCalendar files. Currently, iCalendar files
9357are supported and well tested. vCard 3.0 files are supported, and all data
9358should be imported, but only a few components are understood in a sophisticated
9359way.")
9360 (home-page "http://eventable.github.io/vobject/")
9361 (license license:asl2.0)))
9362
9363(define-public python2-vobject
9364 (package-with-python2 python-vobject))
9365
9366(define-public python-munkres
9367 (package
9368 (name "python-munkres")
9369 (version "1.0.8")
9370 (source (origin
9371 (method url-fetch)
9372 (uri (pypi-uri "munkres" version))
9373 (sha256
9374 (base32
9375 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
9376 (build-system python-build-system)
9377 (arguments
9378 '(#:tests? #f)) ; no test suite
9379 (home-page "http://software.clapper.org/munkres/")
9380 (synopsis "Implementation of the Munkres algorithm")
9381 (description "The Munkres module provides an implementation of the Munkres
9382algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
9383useful for solving the Assignment Problem.")
9384 (license license:bsd-3)))
9385
9386(define-public python2-munkres
9387 (package-with-python2 python-munkres))
9388
9389(define-public python-whoosh
9390 (package
9391 (name "python-whoosh")
9392 (version "2.7.4")
9393 (source
9394 (origin
9395 (method url-fetch)
9396 (uri (pypi-uri "Whoosh" version))
9397 (sha256
9398 (base32
9399 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
9400 (build-system python-build-system)
2679d9a4 9401 (arguments '(#:tests? #f)) ; Test invocation is no longer supported by Python.
44d10b1f
RW
9402 (native-inputs
9403 `(("python-pytest" ,python-pytest)))
9404 (home-page "https://bitbucket.org/mchaput/whoosh")
9405 (synopsis "Full text indexing, search, and spell checking library")
9406 (description
9407 "Whoosh is a fast, pure-Python full text indexing, search, and spell
9408checking library.")
9409 (license license:bsd-2)))
9410
9411(define-public python2-whoosh
9412 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
9413 (package (inherit whoosh)
9414 (propagated-inputs
9415 `(("python2-backport-ssl-match-hostname"
9416 ,python2-backport-ssl-match-hostname)
9417 ,@(package-propagated-inputs whoosh))))))
9418
9419(define-public python-pathlib
9420 (package
9421 (name "python-pathlib")
9422 (version "1.0.1")
9423 (source (origin
9424 (method url-fetch)
9425 (uri (pypi-uri "pathlib" version))
9426 (sha256
9427 (base32
9428 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
9429 (build-system python-build-system)
9430 ;; The tests depend on the internal "test" module, which does not provide
9431 ;; a stable interface.
9432 (arguments `(#:tests? #f))
9433 (home-page "https://pathlib.readthedocs.org/")
9434 (synopsis "Object-oriented file system paths")
9435 (description "Pathlib offers a set of classes to handle file system paths.
9436It offers the following advantages over using string objects:
9437
9438@enumerate
9439@item No more cumbersome use of os and os.path functions. Everything can
9440be done easily through operators, attribute accesses, and method calls.
9441@item Embodies the semantics of different path types. For example,
9442comparing Windows paths ignores casing.
9443@item Well-defined semantics, eliminating any inconsistencies or
9444ambiguities (forward vs. backward slashes, etc.).
9445@end enumerate
9446
9447Note: In Python 3.4, pathlib is now part of the standard library. For other
9448Python versions please consider python-pathlib2 instead, which tracks the
9449standard library module. This module (python-pathlib) isn't maintained
9450anymore.")
9451 (license license:expat)))
9452
9453(define-public python2-pathlib
9454 (package-with-python2 python-pathlib))
9455
9456(define-public python2-pathlib2
9457 (package
9458 (name "python2-pathlib2")
54da6f9f 9459 (version "2.3.3")
44d10b1f
RW
9460 (source (origin
9461 (method url-fetch)
9462 (uri (pypi-uri "pathlib2" version))
9463 (sha256
9464 (base32
54da6f9f 9465 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
44d10b1f
RW
9466 (build-system python-build-system)
9467 ;; We only need the the Python 2 variant, since for Python 3 our minimum
9468 ;; version is 3.4 which already includes this package as part of the
9469 ;; standard library.
9470 (arguments
9471 `(#:python ,python-2))
9472 (propagated-inputs
9473 `(("python2-scandir" ,python2-scandir)
9474 ("python2-six" ,python2-six)))
9475 (home-page "https://pypi.python.org/pypi/pathlib2/")
9476 (synopsis "Object-oriented file system paths - backport of standard
9477pathlib module")
9478 (description "The goal of pathlib2 is to provide a backport of standard
9479pathlib module which tracks the standard library module, so all the newest
9480features of the standard pathlib can be used also on older Python versions.
9481
9482Pathlib offers a set of classes to handle file system paths. It offers the
9483following advantages over using string objects:
9484
9485@enumerate
9486@item No more cumbersome use of os and os.path functions. Everything can
9487be done easily through operators, attribute accesses, and method calls.
9488@item Embodies the semantics of different path types. For example,
9489comparing Windows paths ignores casing.
9490@item Well-defined semantics, eliminating any inconsistencies or
9491ambiguities (forward vs. backward slashes, etc.).
9492@end enumerate")
9493 (license license:expat)))
9494
9495(define-public python2-pathlib2-bootstrap
9496 (hidden-package
9497 (package
9498 (inherit python2-pathlib2)
9499 (name "python2-pathlib2-bootstrap")
9500 (propagated-inputs
9501 `(("python2-scandir" ,python2-scandir)
9502 ("python2-six" ,python2-six-bootstrap))))))
9503
9504(define-public python-jellyfish
9505 (package
9506 (name "python-jellyfish")
9507 (version "0.5.6")
9508 (source (origin
9509 (method url-fetch)
9510 (uri (pypi-uri "jellyfish" version))
9511 (sha256
9512 (base32
9513 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
9514 (build-system python-build-system)
9515 (native-inputs
9516 `(("python-pytest" ,python-pytest)))
9517 (home-page "https://github.com/jamesturk/jellyfish")
9518 (synopsis "Approximate and phonetic matching of strings")
9519 (description "Jellyfish uses a variety of string comparison and phonetic
9520encoding algorithms to do fuzzy string matching.")
9521 (license license:bsd-2)
9522 (properties `((python2-variant . ,(delay python2-jellyfish))))))
9523
9524(define-public python2-jellyfish
9525 (let ((jellyfish (package-with-python2
9526 (strip-python2-variant python-jellyfish))))
9527 (package (inherit jellyfish)
9528 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
9529 ,@(package-native-inputs jellyfish))))))
9530
9531(define-public python2-unicodecsv
9532 (package
9533 (name "python2-unicodecsv")
9534 (version "0.14.1")
9535 (source (origin
f711b71b 9536 (method git-fetch)
44d10b1f
RW
9537 ;; The test suite is not included in the PyPi release.
9538 ;; https://github.com/jdunck/python-unicodecsv/issues/19
f711b71b
EF
9539 (uri (git-reference
9540 (url "https://github.com/jdunck/python-unicodecsv")
9541 (commit version)))
9542 (file-name (git-file-name name version))
44d10b1f
RW
9543 (sha256
9544 (base32
f711b71b 9545 "15hx2k41a2lpv4hcml9zp4cvlx1171mnb5s4s13xc1pxkq3vgdjy"))))
44d10b1f
RW
9546 (build-system python-build-system)
9547 (arguments
9548 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
9549 #:python ,python-2))
9550 (native-inputs
9551 `(("python2-unittest2" ,python2-unittest2)))
9552 (home-page "https://github.com/jdunck/python-unicodecsv")
9553 (synopsis "Unicode CSV module for Python 2")
9554 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
9555module, adding support for Unicode strings.")
9556 (license license:bsd-2)))
9557
9558(define-public python-rarfile
9559 (package
9560 (name "python-rarfile")
9561 (version "2.8")
9562 (source (origin
9563 (method url-fetch)
9564 (uri (pypi-uri "rarfile" version))
9565 (sha256
9566 (base32
9567 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
9568 (build-system python-build-system)
9569 (arguments
9570 '(#:phases
9571 (modify-phases %standard-phases
9572 (replace 'check
9573 ;; Many tests fail, but the installation proceeds.
e59dd341 9574 (lambda _ (invoke "make" "-C" "test" "test"))))))
44d10b1f
RW
9575 (native-inputs
9576 `(("which" ,which))) ; required for tests
9577 (propagated-inputs
9578 `(("libarchive" ,libarchive)))
9579 (home-page "https://github.com/markokr/rarfile")
9580 (synopsis "RAR archive reader for Python")
9581 (description "This is Python module for RAR archive reading. The interface
9582is made as zipfile like as possible.")
9583 (license license:isc)))
9584
9585(define-public python2-rarfile
9586 (package-with-python2 python-rarfile))
9587
9588(define-public python-magic
9589 (package
9590 (name "python-magic")
9591 (version "0.4.15")
9592 (source
9593 (origin
9594 (method url-fetch)
9595 (uri (pypi-uri "python-magic" version))
9596 (sha256
9597 (base32
9598 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
9599 (file-name (string-append name "-" version "-checkout"))))
9600 (build-system python-build-system)
9601 (arguments
9602 ;; The tests are unreliable, so don't run them. The tests fail
9603 ;; under Python3 because they were written for Python2 and
9604 ;; contain import statements that do not work in Python3. One of
9605 ;; the tests fails under Python2 because its assertions are
9606 ;; overly stringent; it relies on comparing output strings which
9607 ;; are brittle and can change depending on the version of
9608 ;; libmagic being used and the system on which the test is
9609 ;; running. In my case, under GuixSD 0.10.0, only one test
9610 ;; failed, and it seems to have failed only because the version
9611 ;; of libmagic that is packaged in Guix outputs a slightly
9612 ;; different (but not wrong) string than the one that the test
9613 ;; expected.
9614 '(#:tests? #f
9615 #:phases (modify-phases %standard-phases
9616 ;; Replace a specific method call with a hard-coded
9617 ;; path to the necessary libmagic.so file in the
9618 ;; store. If we don't do this, then the method call
9619 ;; will fail to find the libmagic.so file, which in
9620 ;; turn will cause any application using
9621 ;; python-magic to fail.
9622 (add-before 'build 'hard-code-path-to-libmagic
9623 (lambda* (#:key inputs #:allow-other-keys)
9624 (let ((file (assoc-ref inputs "file")))
9625 (substitute* "magic.py"
9626 (("ctypes.util.find_library\\('magic'\\)")
9627 (string-append "'" file "/lib/libmagic.so'")))
9628 #t)))
9629 (add-before 'install 'disable-egg-compression
9630 (lambda _
9631 (let ((port (open-file "setup.cfg" "a")))
9632 (display "\n[easy_install]\nzip_ok = 0\n"
9633 port)
9634 (close-port port)
9635 #t))))))
9636 (inputs
9637 ;; python-magic needs to be able to find libmagic.so.
9638 `(("file" ,file)))
9639 (home-page
9640 "https://github.com/ahupp/python-magic")
9641 (synopsis
9642 "File type identification using libmagic")
9643 (description
9644 "This module uses ctypes to access the libmagic file type
9645identification library. It makes use of the local magic database and
9646supports both textual and MIME-type output. Note that this module and
9647the python-file module both provide a \"magic.py\" file; these two
9648modules, which are different and were developed separately, both serve
9649the same purpose: to provide Python bindings for libmagic.")
9650 (license license:expat)))
9651
9652(define-public python2-magic
9653 (package-with-python2 python-magic))
9654
9655(define-public python2-s3cmd
9656 (package
9657 (name "python2-s3cmd")
9658 (version "1.6.1")
9659 (source
9660 (origin
9661 (method url-fetch)
9662 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
9663 "s3cmd-" version ".tar.gz"))
9664 (sha256
9665 (base32
9666 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
9667 (build-system python-build-system)
9668 (arguments
9669 ;; s3cmd is written for python2 only and contains no tests.
9670 `(#:python ,python-2
9671 #:tests? #f))
9672 (propagated-inputs
9673 `(("python2-dateutil" ,python2-dateutil)
9674 ;; The python-file package also provides a magic.py module.
9675 ;; This is an unfortunate state of affairs; however, s3cmd
9676 ;; fails to install if it cannot find specifically the
9677 ;; python-magic package. Thus we include it, instead of using
9678 ;; python-file. Ironically, s3cmd sometimes works better
9679 ;; without libmagic bindings at all:
9680 ;; https://github.com/s3tools/s3cmd/issues/198
9681 ("python2-magic" ,python2-magic)))
9682 (home-page "http://s3tools.org/s3cmd")
9683 (synopsis "Command line tool for S3-compatible storage services")
9684 (description
9685 "S3cmd is a command line tool for uploading, retrieving and managing data
9686in storage services that are compatible with the Amazon Simple Storage
9687Service (S3) protocol, including S3 itself. It supports rsync-like backup,
9688GnuPG encryption, and more. It also supports management of Amazon's
9689CloudFront content delivery network.")
9690 (license license:gpl2+)))
9691
9692(define-public python-pkgconfig
9693 (package
9694 (name "python-pkgconfig")
9695 (version "1.3.1")
9696 (source
9697 (origin
9698 (method url-fetch)
9699 (uri (pypi-uri "pkgconfig" version))
9700 (sha256
9701 (base32
9702 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
9703 (build-system python-build-system)
9704 (native-inputs
9705 `(("python-nose" ,python-nose)))
9706 (inputs
9707 `(("pkg-config" ,pkg-config)))
9708 (arguments
9709 `(#:phases
9710 (modify-phases %standard-phases
9711 (add-before 'build 'patch
9712 ;; Hard-code the path to pkg-config.
9713 (lambda _
9714 (substitute* "pkgconfig/pkgconfig.py"
9715 (("cmd = 'pkg-config")
9716 (string-append "cmd = '" (which "pkg-config"))))
9717 #t))
9718 (replace 'check
9719 (lambda _
9720 (invoke "nosetests" "test.py"))))))
9721 (home-page "https://github.com/matze/pkgconfig")
9722 (synopsis "Python interface for pkg-config")
9723 (description "This module provides a Python interface to pkg-config. It
9724can be used to find all pkg-config packages, check if a package exists,
9725check if a package meets certain version requirements, query CFLAGS and
9726LDFLAGS and parse the output to build extensions with setup.py.")
9727 (license license:expat)))
9728
9729(define-public python2-pkgconfig
9730 (package-with-python2 python-pkgconfig))
9731
9732(define-public python-bz2file
9733 (package
9734 (name "python-bz2file")
9735 (version "0.98")
9736 (source
9737 (origin
9738 (method url-fetch)
9739 (uri (pypi-uri "bz2file" version))
9740 (sha256
9741 (base32
9742 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
9743 (build-system python-build-system)
9744 (arguments
9745 `(#:tests? #f)) ; Tests use deprecated python modules.
9746 (home-page "https://github.com/nvawda/bz2file")
9747 (synopsis "Read and write bzip2-compressed files")
9748 (description
9749 "Bz2file is a Python library for reading and writing bzip2-compressed
9750files. It contains a drop-in replacement for the I/O interface in the
9751standard library's @code{bz2} module, including features from the latest
9752development version of CPython that are not available in older releases.")
9753 (license license:asl2.0)))
9754
9755(define-public python2-bz2file
9756 (package-with-python2 python-bz2file))
9757
9758(define-public python-future
9759 (package
9760 (name "python-future")
d5d54030 9761 (version "0.17.1")
44d10b1f
RW
9762 (source
9763 (origin
9764 (method url-fetch)
9765 (uri (pypi-uri "future" version))
9766 (sha256
9767 (base32
d5d54030 9768 "1f2rlqn9rh7adgir52dlbqz69gsab44x0mlm8gf1cs7xvhv54137"))))
44d10b1f
RW
9769 (build-system python-build-system)
9770 ;; Many tests connect to the network or are otherwise flawed.
9771 ;; https://github.com/PythonCharmers/python-future/issues/210
9772 (arguments
9773 `(#:tests? #f))
9774 (home-page "http://python-future.org")
9775 (synopsis "Single-source support for Python 3 and 2")
9776 (description
9777 "@code{python-future} is the missing compatibility layer between Python 2 and
9778Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
9779to support both Python 2 and Python 3 with minimal overhead.")
9780 (license license:expat)))
9781
9782(define-public python2-future
9783 (package-with-python2 python-future))
9784
9785(define-public python-cysignals
9786 (package
9787 (name "python-cysignals")
8e3e51df 9788 (version "1.9.0")
44d10b1f
RW
9789 (source
9790 (origin
9791 (method url-fetch)
8e3e51df 9792 (uri (pypi-uri "cysignals" version))
44d10b1f
RW
9793 (sha256
9794 (base32
8e3e51df 9795 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
44d10b1f
RW
9796 (build-system python-build-system)
9797 (native-inputs
9798 `(("python-cython" ,python-cython)
9799 ("python-sphinx" ,python-sphinx)))
9800 (inputs
9801 `(("pari-gp" ,pari-gp)))
9802 (arguments
9803 `(#:modules ((guix build python-build-system)
9804 ((guix build gnu-build-system) #:prefix gnu:)
9805 (guix build utils))
9806 ;; FIXME: Tests are executed after installation and currently fail
9807 ;; when not installing into standard locations; the author is working
9808 ;; on a fix.
9809 #:tests? #f
9810 #:phases
9811 (modify-phases %standard-phases
9812 (add-before
9813 'build 'configure
9814 (assoc-ref gnu:%standard-phases 'configure)))))
9815 (home-page
9816 "https://github.com/sagemath/cysignals")
9817 (synopsis
9818 "Handling of interrupts and signals for Cython")
9819 (description
9820 "The cysignals package provides mechanisms to handle interrupts (and
9821other signals and errors) in Cython code, using two related approaches,
9822for mixed Cython/Python code or external C libraries and pure Cython code,
9823respectively.")
9824 (license license:lgpl3+)))
9825
9826(define-public python2-cysignals
9827 (package-with-python2 python-cysignals))
9828
9829(define-public python2-shedskin
9830 (package
9831 (name "python2-shedskin")
9832 (version "0.9.4")
9833 (source
9834 (origin
9835 (method url-fetch)
9836 (uri (string-append "https://github.com/shedskin/shedskin/"
9837 "releases/download/v" version
9838 "/shedskin-" version ".tgz"))
9839 (sha256
9840 (base32
9841 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
9842 (build-system python-build-system)
9843 (arguments
9844 `(#:python ,python-2
9845 #:phases (modify-phases %standard-phases
9846 (add-after 'unpack 'fix-resulting-include-libs
9847 (lambda* (#:key inputs #:allow-other-keys)
9848 (let ((libgc (assoc-ref inputs "libgc"))
9849 (pcre (assoc-ref inputs "pcre")))
9850 (substitute* "shedskin/makefile.py"
9851 (("variable == 'CCFLAGS':[ ]*")
9852 (string-append "variable == 'CCFLAGS':\n"
9853 " line += ' -I " pcre "/include"
9854 " -I " libgc "/include'"))
9855 (("variable == 'LFLAGS':[ ]*")
9856 (string-append "variable == 'LFLAGS':\n"
9857 " line += ' -L" pcre "/lib"
9858 " -L " libgc "/lib'")))
9859 #t))))))
9860 (inputs `(("pcre" ,pcre)
9861 ("libgc" ,libgc)))
9862 (home-page "https://shedskin.github.io/")
9863 (synopsis "Experimental Python-2 to C++ Compiler")
9864 (description (string-append "This is an experimental compiler for a subset of
9865Python. It generates C++ code and a Makefile."))
9866 (license (list license:gpl3 license:bsd-3 license:expat))))
9867
9868(define-public python2-rope
9869 (package
9870 (name "python2-rope")
a9ba0a31 9871 (version "0.11.0")
44d10b1f
RW
9872 (source
9873 (origin
9874 (method url-fetch)
9875 (uri (pypi-uri "rope" version))
9876 (sha256
9877 (base32
a9ba0a31 9878 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
44d10b1f 9879 (arguments
afb29715 9880 ;; Rope has only partial python3 support, see `python-rope'
44d10b1f
RW
9881 `(#:python ,python-2))
9882 (build-system python-build-system)
9883 (native-inputs
9884 `(("python2-unittest2" ,python2-unittest2)))
9885 (home-page "https://github.com/python-rope/rope")
9886 (synopsis "Refactoring library for Python")
9887 (description "Rope is a refactoring library for Python. It facilitates
9888the renaming, moving and extracting of attributes, functions, modules, fields
9889and parameters in Python 2 source code. These refactorings can also be applied
9890to occurrences in strings and comments.")
9891 (license license:gpl2)))
9892
2c880ef4
LC
9893(define-public python-rope
9894 (package
9895 (inherit python2-rope)
9896 (name "python-rope")
9897 (arguments `(#:python ,python-wrapper
9898 ;; XXX: Only partial python3 support, results in some failing
9899 ;; tests: <https://github.com/python-rope/rope/issues/247>.
9900 #:tests? #f))
9901 (properties `((python2-variant . ,(delay python2-rope))))))
9902
44d10b1f
RW
9903(define-public python-py3status
9904 (package
9905 (name "python-py3status")
ef68b35d 9906 (version "3.21")
44d10b1f
RW
9907 (source
9908 (origin
9909 (method url-fetch)
9910 (uri (pypi-uri "py3status" version))
9911 (sha256
ef68b35d 9912 (base32 "16z8zq83hxy48g6hh4xczbdz50qvxv9k1aahr4fqq7jis60cc262"))))
44d10b1f
RW
9913 (build-system python-build-system)
9914 (inputs
9915 `(("file" ,file)))
9916 (arguments
9917 '(#:phases
9918 (modify-phases %standard-phases
9919 ;; 'file' is used for detection of configuration file encoding
9920 ;; let's make link the dependency to particular input
9921 (add-before 'build 'patch-file-path
9922 (lambda* (#:key inputs #:allow-other-keys)
9923 (let ((file-path (assoc-ref inputs "file")))
9924 (substitute* "py3status/parse_config.py"
6a6b8a3f 9925 (("\\[\"file\", \"-b\"")
44d10b1f
RW
9926 (string-append "['" file-path "/bin/file', '-b'")))
9927 #t))))
9928 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
9929 (home-page "https://github.com/ultrabug/py3status")
9930 (synopsis "Extensible i3status wrapper written in Python")
9931 (description "py3status is an i3status wrapper which extends i3status
9932functionality in a modular way, allowing you to extend your panel with your
9933own code, responding to click events and updating clock every second.")
9934 (license license:bsd-3)))
9935
9936(define-public python-tblib
9937 (package
9938 (name "python-tblib")
9939 (version "1.3.2")
9940 (source (origin
9941 (method url-fetch)
9942 (uri (pypi-uri "tblib" version))
9943 (sha256 (base32
9944 "1rsg8h069kqgncyv8fgzyj6qflk6j10cb78pa5jk34ixwq044vj3"))))
9945 (build-system python-build-system)
9946 (arguments
9947 `(#:phases
9948 (modify-phases %standard-phases
9949 (add-before 'check 'adjust-tests
9950 (lambda _
9951 (when (which "python3")
9952 ;; Adjust the example output to match that of Python 3.7:
9953 ;; <https://github.com/ionelmc/python-tblib/issues/36>.
9954 (substitute* "README.rst"
9955 (("Exception\\('fail',") "Exception('fail'"))
9956 #t)))
9957 (replace 'check
9958 (lambda _
9959 ;; Upstream runs tests after installation and the package itself
9960 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
9961 ;; found.
9962 (setenv "PYTHONPATH"
9963 (string-append (getcwd) "/build/lib:"
9964 (getenv "PYTHONPATH")))
9965 (invoke "py.test" "-vv" "tests" "README.rst"))))))
9966 (native-inputs
9967 `(("python-pytest" ,python-pytest)
9968 ("python-six" ,python-six)))
9969 (home-page "https://github.com/ionelmc/python-tblib")
9970 (synopsis "Traceback serialization library")
9971 (description
9972 "Traceback serialization allows you to:
9973
9974@enumerate
9975@item Pickle tracebacks and raise exceptions with pickled tracebacks in
9976different processes. This allows better error handling when running code over
9977multiple processes (imagine multiprocessing, billiard, futures, celery etc).
9978
9979@item Parse traceback strings and raise with the parsed tracebacks.
9980@end enumerate\n")
9981 (license license:bsd-3)))
9982
9983(define-public python2-tblib
9984 (package-with-python2 python-tblib))
9985
9986(define-public python-greenlet
9987 (package
9988 (name "python-greenlet")
9989 (version "0.4.15")
9990 (source (origin
9991 (method url-fetch)
9992 (uri (pypi-uri "greenlet" version))
9993 (sha256
9994 (base32
9995 "1g4g1wwc472ds89zmqlpyan3fbnzpa8qm48z3z1y6mlk44z485ll"))))
9996 (build-system python-build-system)
9997 (home-page "https://greenlet.readthedocs.io/")
9998 (synopsis "Lightweight in-process concurrent programming")
9999 (description
10000 "Greenlet package is a spin-off of Stackless, a version of CPython
10001that supports micro-threads called \"tasklets\". Tasklets run
10002pseudo-concurrently (typically in a single or a few OS-level threads) and
10003are synchronized with data exchanges on \"channels\".")
10004 (license (list license:psfl license:expat))))
10005
10006(define-public python2-greenlet
10007 (package-with-python2 python-greenlet))
10008
10009(define-public python-objgraph
10010 (package
10011 (name "python-objgraph")
eebc03bb 10012 (version "3.4.1")
44d10b1f
RW
10013 (source
10014 (origin
10015 (method url-fetch)
10016 (uri (pypi-uri "objgraph" version))
10017 (sha256
10018 (base32
eebc03bb 10019 "19qmqsh984zq1rzzjy4vqnmviaqnymcyl8h7z99pnicbgwnm2adz"))))
44d10b1f
RW
10020 (build-system python-build-system)
10021 (propagated-inputs
10022 `(("python-graphviz" ,python-graphviz)))
10023 (native-inputs
10024 `(("python-mock" ,python-mock)
10025 ("graphviz" ,graphviz)))
10026 (home-page "https://mg.pov.lt/objgraph/")
10027 (synopsis "Draw Python object reference graphs with graphviz")
10028 (description
10029 "This package provides tools to draw Python object reference graphs with
10030graphviz.")
10031 (license license:expat)))
10032
ffe58d1d
MB
10033(define-public python2-objgraph
10034 (package-with-python2 python-objgraph))
10035
44d10b1f
RW
10036(define-public python-gevent
10037 (package
10038 (name "python-gevent")
10039 (version "1.3.7")
10040 (source (origin
10041 (method url-fetch)
10042 (uri (pypi-uri "gevent" version))
10043 (sha256
10044 (base32
10045 "0b0fr04qdk1p4sniv87fh8z5psac60x01pv054kpgi94520g81iz"))
10046 (modules '((guix build utils)))
10047 (snippet
10048 '(begin
10049 ;; unbunding libev and c-ares
10050 (delete-file-recursively "deps")
10051 #t))))
10052 (build-system python-build-system)
10053 (arguments
10054 `(#:modules ((ice-9 ftw)
10055 (ice-9 match)
10056 (srfi srfi-26)
10057 (guix build utils)
10058 (guix build python-build-system))
10059 #:phases (modify-phases %standard-phases
44d10b1f
RW
10060 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
10061 (lambda _
10062 (substitute* "src/gevent/subprocess.py"
10063 (("/bin/sh") (which "sh")))
10064 (for-each (lambda (file)
10065 (substitute* file
10066 (("/bin/sh") (which "sh"))
10067 (("/bin/true") (which "true"))))
10068 (find-files "src/greentest" "\\.py$"))
10069 #t))
10070 (add-before 'build 'do-not-use-bundled-sources
10071 (lambda* (#:key inputs #:allow-other-keys)
10072 (setenv "CONFIG_SHELL" (which "bash"))
10073 (setenv "LIBEV_EMBED" "false")
10074 (setenv "CARES_EMBED" "false")
10075 (setenv "EMBED" "false")
10076
b5b56b7f
MB
10077 ;; Prevent building bundled libev.
10078 (substitute* "setup.py"
10079 (("run_make=_BUILDING")
10080 "run_make=False"))
10081
44d10b1f
RW
10082 (let ((greenlet (string-append
10083 (assoc-ref inputs "python-greenlet")
10084 "/include")))
10085 (match (scandir greenlet
10086 (lambda (item)
10087 (string-prefix? "python" item)))
10088 ((python)
b5b56b7f 10089 (setenv "C_INCLUDE_PATH"
44d10b1f
RW
10090 (string-append greenlet "/" python)))))
10091 #t))
10092 (add-before 'check 'skip-timer-test
10093 (lambda _
10094 ;; XXX: Skip 'TestTimerResolution', which appears to be
10095 ;; unreliable.
10096 (substitute* "src/greentest/test__core_timer.py"
10097 (("not greentest.RUNNING_ON_CI") "False"))
10098 #t))
10099 (replace 'check
10100 (lambda _
10101 ;; Make sure the build directory is on PYTHONPATH.
10102 (setenv "PYTHONPATH"
10103 (string-append
10104 (getenv "PYTHONPATH") ":"
10105 (getcwd) "/build/"
10106 (car (scandir "build" (cut string-prefix? "lib." <>)))))
10107 (with-directory-excursion "src/greentest"
10108 ;; XXX: Many tests require network access. Instead we only
10109 ;; run known-good tests. Unfortunately we cannot use
10110 ;; recursion here since this directory also contains
10111 ;; Python-version-specific subfolders.
10112 (apply invoke "python" "testrunner.py" "--config"
10113 "known_failures.py"
10114 (scandir "." (cut regexp-exec
10115 (make-regexp "test_+(subprocess|core)")
10116 <>)))))))))
10117 (propagated-inputs
10118 `(("python-greenlet" ,python-greenlet)
10119 ("python-objgraph" ,python-objgraph)))
10120 (native-inputs
b5b56b7f 10121 `(("python-six" ,python-six)))
44d10b1f
RW
10122 (inputs
10123 `(("c-ares" ,c-ares)
10124 ("libev" ,libev)))
10125 (home-page "http://www.gevent.org/")
10126 (synopsis "Coroutine-based network library")
10127 (description
10128 "gevent is a coroutine-based Python networking library that uses greenlet
10129to provide a high-level synchronous API on top of the libev event loop.")
10130 (license license:expat)
10131 (properties `((python2-variant . ,(delay python2-gevent))))))
10132
10133(define-public python2-gevent
10134 (let ((base (package-with-python2
10135 (strip-python2-variant python-gevent))))
10136 (package
10137 (inherit base)
10138 (native-inputs `(,@(package-native-inputs python-gevent)
10139 ("python-mock" ,python2-mock))))))
10140
10141(define-public python-fastimport
10142 (package
10143 (name "python-fastimport")
10144 (version "0.9.6")
10145 (source
10146 (origin
10147 (method url-fetch)
10148 (uri (pypi-uri "fastimport" version))
10149 (sha256
10150 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
10151 (build-system python-build-system)
10152 (home-page "https://github.com/jelmer/python-fastimport")
10153 (synopsis "VCS fastimport parser and generator in Python")
10154 (description "This package provides a parser for and generator of the Git
10155@url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
10156format.")
10157 (license license:gpl2+)))
10158
10159(define-public python2-fastimport
10160 (package-with-python2 python-fastimport))
10161
10162(define-public python-twisted
10163 (package
10164 (name "python-twisted")
fdfad2fc 10165 (version "19.7.0")
44d10b1f
RW
10166 (source (origin
10167 (method url-fetch)
10168 (uri (pypi-uri "Twisted" version ".tar.bz2"))
10169 (sha256
10170 (base32
fdfad2fc 10171 "17d3hnxv9qndagzz63mdpyk99xj63p9gq586vjn0rxk8cl197nym"))))
44d10b1f
RW
10172 (build-system python-build-system)
10173 (arguments
0107c9b8 10174 '(#:tests? #f)) ; FIXME: some tests fail
44d10b1f
RW
10175 (propagated-inputs
10176 `(("python-zope-interface" ,python-zope-interface)
52ca1c4a 10177 ("python-pyhamcrest" ,python-pyhamcrest)
44d10b1f 10178 ("python-incremental" ,python-incremental)
e5ba2fe3 10179 ("python-hyperlink" ,python-hyperlink)
44d10b1f
RW
10180 ("python-constantly" ,python-constantly)
10181 ("python-automat" ,python-automat)))
10182 (home-page "https://twistedmatrix.com/")
10183 (synopsis "Asynchronous networking framework written in Python")
10184 (description
10185 "Twisted is an extensible framework for Python programming, with special
10186focus on event-based network programming and multiprotocol integration.")
10187 (license license:expat)))
10188
10189(define-public python2-twisted
10190 (package-with-python2 python-twisted))
10191
10192(define-public python-pika
10193 (package
10194 (name "python-pika")
10195 (version "0.12.0")
10196 (source
10197 (origin
10198 (method url-fetch)
10199 (uri (pypi-uri "pika" version))
10200 (sha256
10201 (base32
10202 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
10203 (build-system python-build-system)
10204 (native-inputs
10205 `(("python-pyev" ,python-pyev)
10206 ("python-tornado" ,python-tornado)
10207 ("python-twisted" ,python-twisted)))
10208 (home-page "https://pika.readthedocs.org")
10209 (synopsis "Pure Python AMQP Client Library")
10210 (description
10211 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
10212Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
10213network support library.")
10214 (license license:bsd-3)))
10215
10216(define-public python2-pika
10217 (package-with-python2 python-pika))
10218
10219(define-public python-ply
10220 (package
10221 (name "python-ply")
10222 (version "3.10")
10223 (source
10224 (origin
10225 (method url-fetch)
10226 (uri (pypi-uri "ply" version))
10227 (sha256
10228 (base32
10229 "1jxsr1d2f732r6ljhvm827113dckwl6qwakfvpbdhcbhvpvlmscn"))))
10230 (build-system python-build-system)
10231 (home-page "http://www.dabeaz.com/ply/")
10232 (synopsis "Python Lex & Yacc")
10233 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
10234It uses LR parsing and does extensive error checking.")
10235 (license license:bsd-3)))
10236
10237(define-public python2-ply
10238 (package-with-python2 python-ply))
10239
10240(define-public python-tabulate
10241 (package
10242 (name "python-tabulate")
10243 (version "0.7.7")
10244 (source (origin
10245 (method url-fetch)
10246 (uri (pypi-uri "tabulate" version))
10247 (sha256
10248 (base32
10249 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
10250 (build-system python-build-system)
10251 (arguments
10252 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
10253 ;; and the latest release is not tagged in the upstream repository.
10254 '(#:tests? #f))
10255 (home-page "https://bitbucket.org/astanin/python-tabulate")
10256 (synopsis "Pretty-print tabular data")
10257 (description
10258 "Tabulate is a library and command-line utility to pretty-print tabular
10259data in Python.")
10260 (license license:expat)))
10261
10262(define-public python2-tabulate
10263 (package-with-python2 python-tabulate))
10264
10265(define-public python-kazoo
10266 (package
10267 (name "python-kazoo")
10268 (version "2.4.0")
10269 (source
10270 (origin
10271 (method url-fetch)
10272 (uri (pypi-uri "kazoo" version))
10273 (sha256
10274 (base32
10275 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
10276 (build-system python-build-system)
10277 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
10278 (propagated-inputs
10279 `(("python-six" ,python-six)))
10280 (home-page "https://kazoo.readthedocs.org")
10281 (synopsis "High-level Zookeeper client library")
10282 (description
10283 "Kazoo is a Python client library for the Apache Zookeeper distributed
10284application service. It is designed to be easy to use and to avoid common
10285programming errors.")
10286 (license license:asl2.0)))
10287
10288(define-public python2-kazoo
10289 (package-with-python2 python-kazoo))
10290
10291(define-public python-pykafka
10292 (package
10293 (name "python-pykafka")
10294 (version "2.4.0")
10295 (source (origin
10296 (method url-fetch)
0ca1d040 10297 (uri (pypi-uri "pykafka" version))
44d10b1f
RW
10298 (sha256
10299 (base32
10300 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
10301 (build-system python-build-system)
10302 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
10303 (propagated-inputs
10304 `(("python-gevent" ,python-gevent)
10305 ("python-kazoo" ,python-kazoo)
10306 ("python-tabulate" ,python-tabulate)))
10307 (inputs
10308 `(("librdkafka" ,librdkafka)))
10309 (home-page "https://pykafka.readthedocs.io/")
10310 (synopsis "Apache Kafka client for Python")
10311 (description
10312 "PyKafka is a client for the Apache Kafka distributed messaging system.
10313It includes Python implementations of Kafka producers and consumers, which
10314are optionally backed by a C extension built on librdkafka.")
10315 (license license:asl2.0)))
10316
10317(define-public python2-pykafka
10318 (package-with-python2 python-pykafka))
10319
10320(define-public python-wcwidth
28ac442b
MB
10321 (package
10322 (name "python-wcwidth")
574a71a7 10323 (version "0.1.8")
28ac442b
MB
10324 (source (origin
10325 (method url-fetch)
10326 (uri (pypi-uri "wcwidth" version))
10327 (sha256
10328 (base32
574a71a7 10329 "1a1pzds3xzfylm5mnc5f6c1p8kiig0daqjc9gygd9rc3cj53x2zj"))))
28ac442b
MB
10330 (build-system python-build-system)
10331 (home-page "https://github.com/jquast/wcwidth")
10332 (synopsis "Measure number of terminal column cells of wide-character codes")
10333 (description "Wcwidth measures the number of terminal column cells of
44d10b1f
RW
10334wide-character codes. It is useful for those implementing a terminal emulator,
10335or programs that carefully produce output to be interpreted by one. It is a
10336Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
10337specified in POSIX.1-2001 and POSIX.1-2008.")
28ac442b 10338 (license license:expat)))
44d10b1f
RW
10339
10340(define-public python2-wcwidth
10341 (package-with-python2 python-wcwidth))
10342
10343(define-public python2-jsonrpclib
10344 (package
10345 (name "python2-jsonrpclib")
10346 (version "0.1.7")
10347 (source (origin
10348 (method url-fetch)
6571bba0 10349 (uri (pypi-uri "jsonrpclib" version))
44d10b1f
RW
10350 (sha256
10351 (base32
10352 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
10353 (build-system python-build-system)
10354 (arguments
10355 `(#:tests? #f
10356 #:python ,python-2))
10357 (home-page "https://github.com/joshmarshall/jsonrpclib/")
10358 (synopsis "Implementation of JSON-RPC specification for Python")
10359 (description
10360 "This library is an implementation of the JSON-RPC specification.
10361It supports both the original 1.0 specification, as well as the
10362new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
10363etc.")
10364 (license license:asl2.0)))
10365
10366(define-public python-chai
10367 (package
10368 (name "python-chai")
10369 (version "1.1.2")
10370 (source (origin
10371 (method url-fetch)
10372 (uri (pypi-uri "chai" version))
10373 (sha256
10374 (base32
10375 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
10376 (build-system python-build-system)
10377 (home-page "https://github.com/agoragames/chai")
10378 (synopsis "Mocking framework for Python")
10379 (description
10380 "Chai provides an api for mocking, stubbing and spying your python
10381objects, patterned after the Mocha library for Ruby.")
10382 (license license:bsd-3)))
10383
10384(define-public python2-chai
10385 (package-with-python2 python-chai))
10386
10387(define-public python-inflection
10388 (package
10389 (name "python-inflection")
10390 (version "0.3.1")
10391 (source
10392 (origin (method url-fetch)
10393 (uri (pypi-uri "inflection" version))
10394 (sha256
10395 (base32
10396 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
10397 (build-system python-build-system)
10398 (native-inputs
10399 `(("python-pytest" ,python-pytest)))
10400 (home-page "https://github.com/jpvanhal/inflection")
10401 (synopsis "Python string transformation library")
10402 (description
10403 "Inflection is a string transformation library. It singularizes
10404and pluralizes English words, and transforms strings from CamelCase to
10405underscored string.")
10406 (license license:expat)))
10407
10408(define-public python2-inflection
10409 (package-with-python2 python-inflection))
10410
10411(define-public python-pylev
10412 (package
10413 (name "python-pylev")
10414 (version "1.3.0")
10415 (source (origin
10416 (method url-fetch)
10417 (uri (pypi-uri "pylev" version))
10418 (sha256
10419 (base32
10420 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
10421 (build-system python-build-system)
10422 (home-page "https://github.com/toastdriven/pylev")
10423 (synopsis "Levenshtein distance implementation in Python")
10424 (description "Pure Python Levenshtein implementation, based off the
10425Wikipedia code samples at
10426@url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
10427 (license license:bsd-3)))
10428
10429(define-public python2-pylev
10430 (package-with-python2 python-pylev))
10431
10432(define-public python-cleo
10433 (package
10434 (name "python-cleo")
af2d3713 10435 (version "0.6.8")
44d10b1f
RW
10436 (source (origin
10437 (method url-fetch)
10438 (uri (pypi-uri "cleo" version))
10439 (sha256
10440 (base32
af2d3713 10441 "06zp695hq835rkaq6irr1ds1dp2qfzyf32v60vxpd8rcnxv319l5"))))
44d10b1f
RW
10442 (build-system python-build-system)
10443 (native-inputs
af2d3713 10444 `( ;; For testing
44d10b1f
RW
10445 ("python-mock" ,python-mock)
10446 ("python-pytest-mock" ,python-pytest-mock)
10447 ("python-pytest" ,python-pytest)))
10448 (propagated-inputs
10449 `(("python-backpack" ,python-backpack)
10450 ("python-pastel" ,python-pastel)
10451 ("python-pylev" ,python-pylev)))
10452 (home-page "https://github.com/sdispater/cleo")
10453 (synopsis "Command-line arguments library for Python")
10454 (description
10455 "Cleo allows you to create command-line commands with signature in
10456docstring and colored output.")
10457 (license license:expat)))
10458
10459(define-public python2-cleo
10460 (package-with-python2 python-cleo))
10461
2be85c45
TLC
10462(define-public python-tomlkit
10463 (package
10464 (name "python-tomlkit")
10465 (version "0.5.7")
10466 (source
10467 (origin
10468 (method url-fetch)
10469 (uri (pypi-uri "tomlkit" version))
10470 (sha256
10471 (base32
10472 "18820ga5z3if1w8dvykxrfm000akracq01ic402xrbljgbn5grn4"))))
10473 (build-system python-build-system)
10474 (native-inputs
10475 `(("python-pytest" ,python-pytest)))
10476 (home-page
10477 "https://github.com/sdispater/tomlkit")
10478 (synopsis "Style preserving TOML library")
10479 (description
10480 "TOML Kit is a 0.5.0-compliant TOML library. It includes a parser that
10481preserves all comments, indentations, whitespace and internal element ordering,
10482and makes them accessible and editable via an intuitive API. It can also
10483create new TOML documents from scratch using the provided helpers. Part of the
10484implementation as been adapted, improved and fixed from Molten.")
10485 (license license:expat)))
10486
0bb32201
TLC
10487(define-public python-shellingham
10488 (package
10489 (name "python-shellingham")
10490 (version "1.3.1")
10491 (source
10492 (origin
10493 (method url-fetch)
10494 (uri (pypi-uri "shellingham" version))
10495 (sha256
10496 (base32
10497 "1q7kws7w4x2hji3g7y0ni9ddk4sd676ylrb3db54gbpys6xj6nwq"))))
10498 (build-system python-build-system)
10499 (home-page
10500 "https://github.com/sarugaku/shellingham")
10501 (synopsis "Tool to detect surrounding shell")
10502 (description
10503 "Shellingham detects what shell the current Python executable is
10504running in.")
10505 (license license:isc)))
10506
aee92957
TLC
10507(define-public python-memcached
10508 (package
10509 (name "python-memcached")
10510 (version "1.59")
10511 (source
10512 (origin
10513 (method url-fetch)
10514 (uri (pypi-uri "python-memcached" version))
10515 (sha256
10516 (base32
10517 "0kvyapavbirk2x3n1jx4yb9nyigrj1s3x15nm3qhpvhkpqvqdqm2"))))
10518 (build-system python-build-system)
10519 (propagated-inputs `(("python-six" ,python-six)))
10520 (home-page
10521 "https://github.com/linsomniac/python-memcached")
10522 (synopsis "Pure python memcached client")
10523 (description
10524 "This software is a pure Python interface to the memcached memory cache
10525daemon. It is the client side software which allows storing values in one or
10526more, possibly remote, memcached servers.")
10527 (license license:psfl)))
10528
b2ac2508
TLC
10529(define-public python-clikit
10530 (package
10531 (name "python-clikit")
10532 (version "0.2.4")
10533 (source
10534 (origin
10535 (method url-fetch)
10536 (uri (pypi-uri "clikit" version))
10537 (sha256
10538 (base32
10539 "0dc8czib5f4j9px1ivcpqnmivnx2zjpc0xb00ldrhsqylks7r06n"))))
10540 (build-system python-build-system)
10541 (propagated-inputs
10542 `(("python-pastel" ,python-pastel)
10543 ("python-pylev" ,python-pylev)))
10544 (home-page "https://github.com/sdispater/clikit")
10545 (synopsis "Group of utilities to build command line interfaces")
10546 (description
10547 "CliKit is a group of utilities to build testable command line
10548interfaces.")
10549 (license license:expat)))
10550
c6f008d6
TLC
10551(define-public python-msgpack-python
10552 (package
10553 (name "python-msgpack-python")
10554 (version "0.5.6")
10555 (source
10556 (origin
10557 (method url-fetch)
10558 (uri (pypi-uri "msgpack-python" version))
10559 (sha256
10560 (base32
10561 "16wh8qgybmfh4pjp8vfv78mdlkxfmcasg78lzlnm6nslsfkci31p"))))
10562 (build-system python-build-system)
10563 (home-page "http://msgpack.org/")
10564 (synopsis "Package to deserialize messages in MessagePack binary format")
10565 (description
10566 "MessagePack is an efficient binary serialization format. It lets you
10567exchange data among multiple languages like JSON. But it's faster and
10568smaller. Small integers are encoded into a single byte, and typical short
10569strings require only one extra byte in addition to the strings themselves.")
10570 (license license:asl2.0)))
10571
badc1c63
TLC
10572(define-public python-cachy
10573 (package
10574 (name "python-cachy")
10575 (version "0.2.0")
10576 (source
10577 (origin
10578 (method url-fetch)
10579 (uri (pypi-uri "cachy" version))
10580 (sha256
10581 (base32
10582 "0v6mjyhgx6j7ya20bk69cr3gdzdkdf6psay0h090rscclgji65dp"))))
10583 (build-system python-build-system)
10584 (native-inputs
10585 `(("python-fakeredis" ,python-fakeredis)
10586 ("python-flexmock" ,python-flexmock)
10587 ("python-pytest" ,python-pytest)))
10588 (propagated-inputs
10589 `(("python-memcached" ,python-memcached)
10590 ("python-msgpack-python" ,python-msgpack-python)
10591 ("python-redis" ,python-redis)))
10592 (home-page "https://github.com/sdispater/cachy")
10593 (synopsis "Simple yet effective caching library")
10594 (description
10595 "Cachy provides a simple yet effective caching library. A simple but
10596powerful API: thread-safety; decorator syntax; support for memcached, redis,
10597database, file, dict stores. Cachy supports python versions 2.7+ and 3.2+.")
10598 (license license:expat)))
10599
617bb67b
TLC
10600(define-public poetry
10601 (package
10602 (name "poetry")
10603 (version "0.12.17")
10604 ;; Poetry can only be built from source with poetry.
10605 (source
10606 (origin
10607 (method url-fetch)
10608 (uri (pypi-uri "poetry" version))
10609 (sha256
10610 (base32
10611 "0gxwcd65qjmzqzppf53x51sic1rbcd9py6cdzx3aprppipimslvf"))))
10612 (build-system python-build-system)
10613 (arguments
10614 `(#:tests? #f ;; Pypi does not have tests.
10615 #:phases
10616 (modify-phases %standard-phases
10617 (replace 'build
10618 (lambda _
10619 ;; Bug in poetry https://github.com/sdispater/poetry/issues/866.
10620 (invoke "sed" "-i" "-e" "s/from distutils.core/from setuptools/"
10621 "setup.py")
10622 #t)))))
10623 (propagated-inputs
10624 `(("python-cachecontrol" ,python-cachecontrol)
10625 ("python-cachy" ,python-cachy)
10626 ("python-cleo" ,python-cleo)
10627 ("python-glob2" ,python-glob2)
10628 ("python-html5lib" ,python-html5lib)
10629 ("python-jsonschema" ,python-jsonschema)
10630 ("python-msgpack" ,python-msgpack)
617bb67b
TLC
10631 ("python-pkginfo" ,python-pkginfo)
10632 ("python-pyparsing" ,python-pyparsing)
10633 ("python-pyrsistent" ,python-pyrsistent)
10634 ("python-requests" ,python-requests)
10635 ("python-requests-toolbelt" ,python-requests-toolbelt)
10636 ("python-shellingham" ,python-shellingham)
10637 ("python-tomlkit" ,python-tomlkit)
10638 ("python-virtualenv" ,python-virtualenv)))
10639 (home-page "https://poetry.eustace.io/")
10640 (synopsis "Python dependency management and packaging made easy")
10641 (description "Poetry is a tool for dependency management and packaging
10642in Python. It allows you to declare the libraries your project depends on and
10643it will manage (install/update) them for you.")
10644 (license license:expat)))
10645
44d10b1f
RW
10646(define-public python-lazy-object-proxy
10647 (package
10648 (name "python-lazy-object-proxy")
7454078a 10649 (version "1.4.3")
44d10b1f
RW
10650 (source (origin
10651 (method url-fetch)
10652 (uri (pypi-uri "lazy-object-proxy" version))
10653 (sha256
10654 (base32
7454078a 10655 "1w1aaay424ciz8fz3fkzxb0pxzfxn184f2whpyn4fx72bn50x47k"))))
63d4873b
MO
10656 (native-inputs
10657 `(("python-setuptools-scm" ,python-setuptools-scm-3.3)))
44d10b1f
RW
10658 (build-system python-build-system)
10659 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
10660 (synopsis "Lazy object proxy for python")
10661 (description
10662 "Lazy object proxy is an object that wraps a callable but defers the call
10663until the object is actually required, and caches the result of said call.")
10664 (license license:bsd-2)))
10665
10666(define-public python2-lazy-object-proxy
10667 (package-with-python2 python-lazy-object-proxy))
10668
10669(define-public python-dnspython
10670 (package
10671 (name "python-dnspython")
10672 (version "1.15.0")
10673 (source (origin
10674 (method url-fetch)
10675 (uri (string-append "http://www.dnspython.org/kits/"
10676 version "/dnspython-" version ".tar.gz"))
10677 (sha256
10678 (base32
10679 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
10680 (build-system python-build-system)
10681 (arguments '(#:tests? #f)) ; XXX: requires internet access
10682 (home-page "http://www.dnspython.org")
10683 (synopsis "DNS toolkit for Python")
10684 (description
10685 "dnspython is a DNS toolkit for Python. It supports almost all record
10686types. It can be used for queries, zone transfers, and dynamic updates.
10687It supports TSIG authenticated messages and EDNS0.")
10688 (license license:expat)))
10689
10690(define-public python2-dnspython
10691 (package-with-python2 python-dnspython))
10692
10693(define-public python-email-validator
10694 (package
10695 (name "python-email-validator")
10696 (version "1.0.2")
10697 (source
10698 (origin (method url-fetch)
10699 (uri (pypi-uri "email_validator" version))
10700 (sha256
10701 (base32
10702 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
10703 (build-system python-build-system)
10704 (arguments
10705 '(#:phases
10706 (modify-phases %standard-phases
10707 (add-before 'build 'use-dnspython
10708 (lambda _
10709 (substitute* "setup.py"
10710 (("dnspython3") "dnspython"))
10711 #t)))))
10712 (propagated-inputs
10713 `(("python-dnspython" ,python-dnspython)
10714 ("python-idna" ,python-idna)))
10715 (home-page "https://github.com/JoshData/python-email-validator")
10716 (synopsis "Email address validation library for Python")
10717 (description
10718 "This library validates email address syntax and deliverability.")
10719 (license license:cc0)))
10720
10721(define-public python2-email-validator
10722 (package-with-python2 python-email-validator))
10723
10724(define-public python-ukpostcodeparser
10725 (package
10726 (name "python-ukpostcodeparser")
10727 (version "1.0.3")
10728 (source (origin
10729 (method url-fetch)
10730 (uri (pypi-uri "UkPostcodeParser" version))
10731 (sha256
10732 (base32
10733 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
10734 (build-system python-build-system)
10735 (home-page "https://github.com/hamstah/ukpostcodeparser")
10736 (synopsis "UK Postcode parser for Python")
10737 (description
10738 "This library provides the @code{parse_uk_postcode} function for
10739parsing UK postcodes.")
10740 (license license:expat)))
10741
10742(define-public python2-ukpostcodeparser
10743 (package-with-python2 python-ukpostcodeparser))
10744
10745(define-public python-faker
10746 (package
10747 (name "python-faker")
10748 (version "0.7.9")
10749 (source (origin
10750 (method url-fetch)
10751 (uri (pypi-uri "Faker" version))
10752 (sha256
10753 (base32
10754 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
10755 (patches
10756 (search-patches "python-faker-fix-build-32bit.patch"))
10757 (modules '((guix build utils)))
10758 (snippet
10759 '(begin
10760 (for-each delete-file (find-files "." "\\.pyc$"))
10761 #t))))
10762 (build-system python-build-system)
10763 (arguments
10764 '(#:phases
10765 (modify-phases %standard-phases
10766 (replace 'check
49ff8827 10767 (lambda _ (invoke "python" "-m" "unittest" "-v" "tests"))))))
44d10b1f
RW
10768 (native-inputs
10769 `(;; For testing
10770 ("python-email-validator" ,python-email-validator)
10771 ("python-mock" ,python-mock)
10772 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
10773 (propagated-inputs
10774 `(("python-dateutil" ,python-dateutil)
10775 ("python-six" ,python-six)))
10776 (home-page "https://github.com/joke2k/faker")
10777 (synopsis "Python package that generates fake data")
10778 (description
10779 "Faker is a Python package that generates fake data such as names,
10780addresses, and phone numbers.")
10781 (license license:expat)
10782 (properties `((python2-variant . ,(delay python2-faker))))))
10783
10784(define-public python2-faker
10785 (let ((base (package-with-python2 (strip-python2-variant
10786 python-faker))))
10787 (package
10788 (inherit base)
10789 (propagated-inputs
10790 `(("python2-ipaddress" ,python2-ipaddress)
10791 ,@(package-propagated-inputs base))))))
10792
10793(define-public python-pyaml
10794 (package
10795 (name "python-pyaml")
10796 (version "18.11.0")
10797 (source (origin
10798 (method url-fetch)
10799 (uri (pypi-uri "pyaml" version))
10800 (sha256
10801 (base32
10802 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
10803 (build-system python-build-system)
10804 (native-inputs
10805 `(("python-unidecode" ,python-unidecode)))
10806 (propagated-inputs
10807 `(("python-pyyaml" ,python-pyyaml)))
10808 (home-page "https://github.com/mk-fg/pretty-yaml")
10809 (synopsis "YAML pretty-print library for Python")
10810 (description
10811 "pyaml is a PyYAML based python module to produce pretty and readable
10812YAML-serialized data.")
492e3a7a 10813 (license license:wtfpl2)))
44d10b1f
RW
10814
10815(define-public python2-pyaml
10816 (package-with-python2 python-pyaml))
10817
10818(define-public python-backpack
10819 (package
10820 (name "python-backpack")
10821 (version "0.1")
10822 (source
10823 (origin
10824 (method url-fetch)
10825 (uri (pypi-uri "backpack" version))
10826 (sha256
10827 (base32
10828 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
10829 (build-system python-build-system)
10830 (native-inputs
10831 `(("python-pytest" ,python-pytest)
10832 ("python-nose" ,python-nose)))
10833 (propagated-inputs
10834 `(("python-simplejson" ,python-simplejson)))
10835 (home-page "https://github.com/sdispater/backpack")
10836 (synopsis "Utilities for working with Python collections")
10837 (description "Backpack provides some useful utilities for working with
10838collections of data.")
10839 (license license:expat)))
10840
10841(define-public python2-backpack
10842 (package-with-python2 python-backpack))
10843
10844(define-public python-prompt-toolkit
10845 (package
10846 (name "python-prompt-toolkit")
10847 (version "2.0.7")
10848 (source
10849 (origin
10850 (method url-fetch)
10851 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10852 (sha256
10853 (base32
10854 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
10855 (build-system python-build-system)
10856 (arguments
10857 `(#:phases
10858 (modify-phases %standard-phases
10859 (delete 'check)
10860 (add-after 'install 'post-install-check
10861 (lambda* (#:key inputs outputs #:allow-other-keys)
10862 ;; HOME is needed for the test
10863 ;; "test_pathcompleter_can_expanduser".
10864 (setenv "HOME" "/tmp")
10865 (add-installed-pythonpath inputs outputs)
10866 (invoke "py.test"))))))
10867 (propagated-inputs
10868 `(("python-wcwidth" ,python-wcwidth)
10869 ("python-six" ,python-six)
10870 ("python-pygments" ,python-pygments)))
10871 (native-inputs
10872 `(("python-pytest" ,python-pytest)))
10873 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
10874 (synopsis "Library for building command line interfaces in Python")
10875 (description
10876 "Prompt-Toolkit is a library for building interactive command line
10877interfaces in Python. It's like GNU Readline but it also features syntax
10878highlighting while typing, out-of-the-box multi-line input editing, advanced
10879code completion, incremental search, support for Chinese double-width
10880characters, mouse support, and auto suggestions.")
10881 (license license:bsd-3)))
10882
10883(define-public python2-prompt-toolkit
10884 (package-with-python2 python-prompt-toolkit))
10885
10886(define-public python-prompt-toolkit-1
10887 (package (inherit python-prompt-toolkit)
10888 (version "1.0.15")
10889 (source
10890 (origin
10891 (method url-fetch)
10892 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10893 (sha256
10894 (base32
10895 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
10896
10897(define-public python2-prompt-toolkit-1
10898 (package-with-python2 python-prompt-toolkit-1))
10899
10900(define-public python-jedi
10901 (package
10902 (name "python-jedi")
296e1aea 10903 (version "0.15.1")
44d10b1f
RW
10904 (source
10905 (origin
10906 (method url-fetch)
10907 (uri (pypi-uri "jedi" version))
10908 (sha256
10909 (base32
296e1aea 10910 "0bp4pxhsynaarbvzblsn5x32lzp29svy3sxfy8i6m5iwz9s9r1ds"))))
44d10b1f
RW
10911 (build-system python-build-system)
10912 (arguments
296e1aea 10913 `(#:phases
44d10b1f 10914 (modify-phases %standard-phases
296e1aea
MC
10915 (add-after 'unpack 'disable-file-completion-test
10916 ;; A single parameterized test currently fail (see:
10917 ;; https://github.com/davidhalter/jedi/issues/1395). Remove it.
10918 (lambda _
10919 (substitute* "test/test_api/test_completion.py"
10920 ((".*'example.py', 'rb\"' \\+ join\\('\\.\\.'.*") ""))
10921 #t))
44d10b1f 10922 (replace 'check
296e1aea
MC
10923 (lambda _
10924 (setenv "HOME" "/tmp")
10925 (invoke "python" "-m" "pytest"))))))
44d10b1f
RW
10926 (native-inputs
10927 `(("python-pytest" ,python-pytest)
10928 ("python-docopt" ,python-docopt)))
10929 (propagated-inputs
10930 `(("python-parso" ,python-parso)))
10931 (home-page "https://github.com/davidhalter/jedi")
10932 (synopsis "Autocompletion and static analysis library for Python")
10933 (description
10934 "Jedi is a static analysis tool for Python that can be used in Integrated
10935Development Environments (@dfn{IDE}s) and text editors. It understands Python
10936on a deeper level than many other static analysis frameworks for Python.
10937
10938Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
10939well.")
10940 (license license:expat)))
10941
10942(define-public python2-jedi
296e1aea 10943 (package-with-python2 python-jedi))
44d10b1f
RW
10944
10945(define-public ptpython
10946 (package
10947 (name "ptpython")
10948 (version "0.34")
10949 (source (origin
10950 (method url-fetch)
10951 (uri (pypi-uri "ptpython" version))
10952 (sha256
10953 (base32
10954 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
10955 (build-system python-build-system)
10956 (arguments
10957 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
10958 (propagated-inputs
10959 `(("python-docopt" ,python-docopt)
10960 ("python-jedi" ,python-jedi)
10961 ("python-prompt-toolkit" ,python-prompt-toolkit)
10962 ("python-pygments" ,python-pygments)))
10963 (home-page "https://github.com/jonathanslenders/ptpython")
10964 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
10965 (description
10966 "ptpython is a Python read-eval-print loop with IDE-like features.
10967It supports syntax highlighting, multiline editing, autocompletion, mouse,
10968color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
10969etc.")
10970 (license license:bsd-3)
10971 (properties `((python2-variant . ,(delay ptpython-2))))))
10972
10973(define-public ptpython-2
10974 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
10975 (package
10976 (inherit base)
10977 (name "ptpython2"))))
10978
10979(define-public python-stem
10980 (package
10981 (name "python-stem")
e746d1c3 10982 (version "1.7.1")
44d10b1f
RW
10983 (source
10984 (origin
10985 (method url-fetch)
10986 (uri (pypi-uri "stem" version))
10987 (sha256
10988 (base32
e746d1c3 10989 "18lc95pmc7i089nlsb06dsxyjl5wbhxfqgdxbjcia35ndh8z7sn9"))))
44d10b1f
RW
10990 (build-system python-build-system)
10991 (arguments
10992 `(#:phases
10993 (modify-phases %standard-phases
10994 (replace 'check
10995 (lambda _
10996 (invoke "./run_tests.py" "--unit")
10997 #t)))))
10998 (native-inputs
10999 `(("python-mock" ,python-mock)
11000 ("python-pycodestyle" ,python-pycodestyle)
11001 ("python-pyflakes" ,python-pyflakes)))
11002 (home-page "https://stem.torproject.org/")
11003 (synopsis
11004 "Python controller library that allows applications to interact with Tor")
11005 (description
11006 "Stem is a Python controller library for Tor. With it you can use Tor's
11007control protocol to script against the Tor process and read descriptor data
11008relays publish about themselves.")
11009 (license license:lgpl3)))
11010
11011(define-public python2-stem
11012 (package-with-python2 python-stem))
11013
11014(define-public python-pyserial
11015 (package
11016 (name "python-pyserial")
00d81f98 11017 (version "3.4")
44d10b1f
RW
11018 (source
11019 (origin
11020 (method url-fetch)
11021 (uri (pypi-uri "pyserial" version))
11022 (sha256
11023 (base32
00d81f98 11024 "09y68bczw324a4jb9a1cfwrbjhq179vnfkkkrybbksp0vqgl0bbf"))))
44d10b1f
RW
11025 (build-system python-build-system)
11026 (arguments
11027 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
11028 ;; #:phases
11029 ;; (modify-phases %standard-phases
11030 ;; (replace 'check
11031 ;; (lambda _
11032 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
11033 (home-page
11034 "https://github.com/pyserial/pyserial")
11035 (synopsis "Python Serial Port Bindings")
11036 (description "@code{pyserial} provide serial port bindings for Python. It
11037supports different byte sizes, stop bits, parity and flow control with RTS/CTS
11038and/or Xon/Xoff. The port is accessed in RAW mode.")
11039 (license license:bsd-3)))
11040
11041(define-public python2-pyserial
11042 (package-with-python2 python-pyserial))
11043
11044(define-public python-kivy
11045 (package
11046 (name "python-kivy")
11047 (version "1.10.1")
11048 (source
11049 (origin
11050 (method url-fetch)
11051 (uri (pypi-uri "Kivy" version))
11052 (file-name (string-append name "-" version ".tar.gz"))
11053 (sha256
11054 (base32
11055 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
11056 (build-system python-build-system)
11057 (arguments
11058 `(#:tests? #f ; Tests require many optional packages
11059 #:phases
11060 (modify-phases %standard-phases
11061 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
11062 (lambda* (#:key inputs #:allow-other-keys)
11063 (setenv "KIVY_SDL2_PATH"
11064 (string-append (assoc-ref inputs "sdl-union")
11065 "/include/SDL2"))
11066 #t)))))
11067 (native-inputs
11068 `(("git" ,git)
11069 ("pkg-config" ,pkg-config)
11070 ("python-cython" ,python-cython)))
11071 (inputs
11072 `(("gstreamer" ,gstreamer)
11073 ("mesa" ,mesa)
11074 ("sdl-union"
11075 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
11076 (home-page "http://kivy.org")
11077 (synopsis
11078 "Multitouch application framework")
11079 (description
11080 "A software library for rapid development of
11081hardware-accelerated multitouch applications.")
11082 (license license:expat)))
11083
11084(define-public python2-kivy
11085 (package-with-python2 python-kivy))
11086
11087(define-public python-kivy-next
11088 (deprecated-package "python-kivy-next" python-kivy))
11089
11090(define-public python2-kivy-next
11091 (deprecated-package "python2-kivy-next" python2-kivy))
11092
11093(define-public python-binaryornot
11094 (package
11095 (name "python-binaryornot")
11096 (version "0.4.4")
11097 (source (origin
11098 (method url-fetch)
11099 (uri (pypi-uri "binaryornot" version))
11100 (sha256
11101 (base32
11102 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
11103 (build-system python-build-system)
86723f98
DM
11104 (arguments
11105 `(#:phases
11106 (modify-phases %standard-phases
ee623903 11107 (add-after 'unpack 'patch-tests
86723f98
DM
11108 (lambda _
11109 ;; TypeError: binary() got an unexpected keyword argument
11110 ;; 'average_size'.
11111 (substitute* "tests/test_check.py"
11112 (("average_size=512") ""))
11113 #t)))))
44d10b1f
RW
11114 (propagated-inputs
11115 `(("python-chardet" ,python-chardet)
11116 ("python-hypothesis" ,python-hypothesis)))
11117 (home-page "https://github.com/audreyr/binaryornot")
11118 (synopsis "Package to check if a file is binary or text")
11119 (description "Ultra-lightweight pure Python package to check if a file is
11120binary or text.")
11121 (license license:bsd-3)
11122 (properties `((python2-variant . ,(delay python2-binaryornot))))))
11123
11124(define-public python2-binaryornot
11125 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
11126 (package (inherit base)
11127 (propagated-inputs
11128 `(("python2-enum34" ,python2-enum34)
11129 ,@(package-propagated-inputs base))))))
11130
f315673d
VC
11131(define-public python-binwalk
11132 (let ((commit "64201acfb5b0a9cdd9faa58c40a36dcff8612e29")
11133 (revision "0"))
11134 (package
11135 (name "python-binwalk")
11136 (version (git-version "2.1.1" revision commit))
11137 (source
11138 (origin
11139 (method git-fetch)
11140 (uri (git-reference
11141 (url "https://github.com/ReFirmLabs/binwalk")
11142 (commit commit)))
11143 (file-name (git-file-name name version))
11144 (sha256
11145 (base32
11146 "1z7ca6rfp887hw5jc3sb45mm4fa0xid4lsp2z8g4r590dr7k7w15"))))
11147 (build-system python-build-system)
11148 (arguments
11149 `(#:phases
11150 (modify-phases %standard-phases
11151 (add-before 'check 'set-pythonpath
11152 (lambda _
11153 (setenv "PYTHONPATH"
11154 (string-append
11155 (getcwd) "/src/"
11156 ":" (getenv "PYTHONPATH")))
11157 (setenv "HOME" "")
11158 #t)))))
11159 (native-inputs
11160 `(("python-coverage" ,python-coverage)
11161 ("python-nose" ,python-nose)))
11162 (home-page "https://github.com/ReFirmLabs/binwalk")
11163 (synopsis "Firmware analysis tool")
11164 (description "Binwalk is a tool for analyzing, reverse engineering, and extracting firmware images")
11165 (license license:expat))))
11166
44d10b1f
RW
11167(define-public python-nltk
11168 (package
11169 (name "python-nltk")
11170 (version "3.2.1")
11171 (source (origin
11172 (method url-fetch)
11173 (uri (pypi-uri "nltk" version))
11174 (sha256
11175 (base32
11176 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
11177 (build-system python-build-system)
11178 (arguments
11179 '(;; The tests require some extra resources to be downloaded.
11180 ;; TODO Try packaging these resources.
11181 #:tests? #f))
11182 (home-page "http://nltk.org/")
11183 (synopsis "Natural Language Toolkit")
11184 (description "It provides interfaces to over 50 corpora and lexical
11185resources such as WordNet, along with a suite of text processing libraries
11186for classification, tokenization, stemming, tagging, parsing, and semantic
11187reasoning, wrappers for natural language processing libraries.")
11188 (license license:asl2.0)))
11189
11190(define-public python2-nltk
11191 (package-with-python2 python-nltk))
11192
11193(define-public python-pymongo
11194 (package
11195 (name "python-pymongo")
11196 (version "3.7.2")
11197 (source (origin
11198 (method url-fetch)
11199 (uri (pypi-uri "pymongo" version))
11200 (sha256
11201 (base32
11202 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
11203 (build-system python-build-system)
11204 (propagated-inputs
11205 `(("python-certifi" ,python-certifi)))
11206 (home-page "https://github.com/mongodb/mongo-python-driver")
11207 (synopsis "Python driver for MongoDB")
11208 (description "Python driver for MongoDB.")
11209 (license license:asl2.0)))
11210
11211(define-public python2-pymongo
11212 (package-with-python2 python-pymongo))
11213
44d10b1f
RW
11214(define-public python-consul
11215 (package
11216 (name "python-consul")
11217 (version "0.6.1")
11218 (source
11219 (origin
11220 (method url-fetch)
11221 (uri (pypi-uri "python-consul" version))
11222 (sha256
11223 (base32
11224 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
11225 (build-system python-build-system)
11226 (arguments
11227 '(#:tests? #f)) ; The tests are not distributed
11228 (propagated-inputs
11229 `(("python-requests" ,python-requests)
11230 ("python-six" ,python-six)))
11231 (home-page "https://github.com/cablehead/python-consul")
11232 (synopsis "Python client for Consul")
11233 (description
11234 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
11235discovery, monitoring and configuration.")
11236 (license license:expat)))
11237
11238(define-public python2-consul
11239 (package-with-python2 python-consul))
11240
11241(define-public python-schematics
11242 (package
11243 (name "python-schematics")
11244 (version "1.1.1")
11245 (source
1961d187
TGR
11246 (origin
11247 (method git-fetch)
11248 (uri (git-reference
11249 (url "https://github.com/schematics/schematics.git")
11250 (commit (string-append "v" version))))
11251 (file-name (git-file-name name version))
11252 (sha256
11253 (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd"))))
44d10b1f
RW
11254 (build-system python-build-system)
11255 (propagated-inputs
11256 `(("python-six" ,python-six)))
11257 (arguments
1961d187
TGR
11258 ;; The tests require a bunch of not very nice packages with fixed
11259 ;; version requirements (e.g. python-coveralls).
11260 `(#:tests? #f))
44d10b1f
RW
11261 (home-page "https://github.com/schematics/schematics")
11262 (synopsis "Python Data Structures for Humans")
11263 (description "Python Data Structures for Humans.")
11264 (license license:bsd-3)))
11265
11266(define-public python2-schematics
11267 (package-with-python2 python-schematics))
11268
11269(define-public python-odfpy
11270 (package
11271 (name "python-odfpy")
11272 (version "1.3.3")
11273 (source (origin
11274 (method url-fetch)
11275 (uri (pypi-uri "odfpy" version))
11276 (sha256
11277 (base32
11278 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
11279 (arguments
11280 `(#:modules ((srfi srfi-1)
11281 (guix build python-build-system)
11282 (guix build utils))
11283 #:phases
11284 (modify-phases %standard-phases
11285 (replace 'check
11286 ;; The test runner invokes python2 and python3 for test*.py.
11287 ;; To avoid having both in inputs, we replicate it here.
11288 (lambda _
21ccc01d
RW
11289 (for-each (lambda (test-file) (invoke "python" test-file))
11290 (find-files "tests" "^test.*\\.py$"))
11291 #t)))))
44d10b1f
RW
11292 (build-system python-build-system)
11293 (home-page "https://github.com/eea/odfpy")
11294 (synopsis "Python API and tools to manipulate OpenDocument files")
11295 (description "Collection of libraries and utility programs written in
11296Python to manipulate OpenDocument 1.2 files.")
11297 (license
11298 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
11299 ;; number of files with other licenses.
11300 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
11301
11302(define-public python2-odfpy
11303 (package-with-python2 python-odfpy))
11304
11305(define-public python-natsort
11306 (package
11307 (name "python-natsort")
11308 (version "5.4.1")
11309 (source (origin
11310 (method url-fetch)
11311 (uri (pypi-uri "natsort" version))
11312 (sha256
11313 (base32
11314 "0i732amg6yzkx4g4c9j09jmqq39q377x9cl2nbkm5hax2c2v0wxf"))))
11315 (build-system python-build-system)
11316 (arguments
11317 `(#:modules ((guix build utils)
11318 (guix build python-build-system)
11319 (srfi srfi-1)
11320 (srfi srfi-26)
11321 (ice-9 ftw))
11322 #:phases
11323 (modify-phases %standard-phases
11324 (add-before 'check 'set-cachedir
11325 ;; Tests require write access to $HOME by default
11326 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
11327 (replace 'check
11328 (lambda _
11329 (let ((cwd (getcwd)))
11330 (setenv "PYTHONPATH"
11331 (string-append
11332 cwd "/build/"
11333 (find (cut string-prefix? "lib" <>)
11334 (scandir (string-append cwd "/build")))
11335 ":"
11336 (getenv "PYTHONPATH")))
11337 (invoke "pytest" "-v")))))))
11338 (native-inputs
11339 `(("python-hypothesis" ,python-hypothesis)
11340 ("python-pytest-cov" ,python-pytest-cov)
11341 ("python-pytest-mock" ,python-pytest-mock)
11342 ("python-pytest" ,python-pytest)))
11343 (propagated-inputs ; TODO: Add python-fastnumbers.
11344 `(("python-pyicu" ,python-pyicu)))
11345 (home-page "https://github.com/SethMMorton/natsort")
11346 (synopsis "Natural sorting for python and shell")
11347 (description
11348 "Natsort lets you apply natural sorting on lists instead of
11349lexicographical. If you use the built-in @code{sorted} method in python
36a4366d
EF
11350on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4},
11351@code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20},
11352@code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that
11353identifies numbers and sorts them separately from strings. It can also sort
11354version numbers, real numbers, mixed types and more, and comes with a shell
11355command @command{natsort} that exposes this functionality in the command line.")
44d10b1f
RW
11356 (license license:expat)
11357 (properties `((python2-variant . ,(delay python2-natsort))))))
11358
11359(define-public python2-natsort
11360 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
11361 (package (inherit base)
11362 (native-inputs
11363 `(("python2-pathlib" ,python2-pathlib)
11364 ,@(package-native-inputs base))))))
11365
11366(define-public python-glances
11367 (package
11368 (name "python-glances")
a4ac25df 11369 (version "3.1.2")
44d10b1f
RW
11370 (source
11371 (origin
11372 (method url-fetch)
11373 (uri (pypi-uri "Glances" version))
11374 (sha256
a4ac25df 11375 (base32 "15384pbvw9wj4sb8zgvd9v1812vrypbyjg0acicjf1hdb3p30fkk"))
15b4c911
TGR
11376 (modules '((guix build utils)))
11377 (snippet
11378 '(begin
11379 ;; Glances phones PyPI for weekly update checks by default.
11380 ;; Disable these. The user can re-enable them if desired.
11381 (substitute* "glances/outdated.py"
11382 (("^(.*)self\\.load_config\\(config\\)\n" line indentation)
11383 (string-append indentation
11384 "self.args.disable_check_update = True\n"
11385 line)))
11386 #t))))
44d10b1f
RW
11387 (build-system python-build-system)
11388 (propagated-inputs
9898a2d3
TGR
11389 `(("python-future" ,python-future)
11390 ("python-psutil" ,python-psutil)))
a4ac25df 11391 (home-page "https://github.com/nicolargo/glances")
bab94ffa 11392 (synopsis "Cross-platform curses-based monitoring tool")
44d10b1f
RW
11393 (description
11394 "Glances is a curses-based monitoring tool for a wide variety of platforms.
bab94ffa
TGR
11395Glances uses the PsUtil library to get information from your system. It
11396monitors CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
44d10b1f
RW
11397 (license license:lgpl3+)))
11398
11399(define-public python2-glances
11400 (package-with-python2 python-glances))
11401
11402(define-public python-graphql-core
11403 (package
11404 (name "python-graphql-core")
11405 (version "0.5.3")
11406 (source
11407 (origin
11408 (method url-fetch)
11409 (uri (pypi-uri "graphql-core" version))
11410 (sha256
11411 (base32
11412 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
11413 (build-system python-build-system)
11414 (arguments
11415 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
11416 #:phases
11417 (modify-phases %standard-phases
11418 (add-after 'unpack 'patch-hardcoded-version
11419 (lambda _ (substitute*
11420 "setup.py"
11421 (("'gevent==1.1rc1'") "'gevent'"))
11422 #t)))))
11423 (native-inputs
11424 `(("python-gevent" ,python-gevent)
11425 ("python-mock" ,python-mock)
11426 ("python-pytest-mock" ,python-pytest-mock)))
11427 (propagated-inputs
11428 `(("python-promise" ,python-promise)
11429 ("python-six" ,python-six)))
11430 (home-page "https://github.com/graphql-python/graphql-core")
11431 (synopsis "GraphQL implementation for Python")
11432 (description
11433 "GraphQL implementation for Python. GraphQL is a data query language and
11434runtime designed and used to request and deliver data to mobile and web apps.
11435This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
11436to Python.")
11437 (license license:expat)))
11438
11439(define-public python2-graphql-core
11440 (package-with-python2 python-graphql-core))
11441
11442(define-public python-graphql-relay
11443 (package
11444 (name "python-graphql-relay")
11445 (version "0.4.5")
11446 (source
11447 (origin
11448 (method url-fetch)
11449 (uri (pypi-uri "graphql-relay" version))
11450 (sha256
11451 (base32
11452 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
11453 (build-system python-build-system)
11454 (arguments
11455 '(#:tests? #f)) ; The tests are not distributed
11456 (propagated-inputs
11457 `(("python-graphql-core" ,python-graphql-core)
11458 ("python-promise" ,python-promise)
11459 ("python-six" ,python-six)))
11460 (home-page "https://github.com/graphql-python/graphql-relay-py")
11461 (synopsis "Relay implementation for Python")
11462 (description
11463 "This is a library to allow the easy creation of Relay-compliant servers
11464using the GraphQL Python reference implementation of a GraphQL server. It
11465should be noted that the code is a exact port of the original
11466@url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
11467from Facebook.")
11468 (license license:expat)))
11469
11470(define-public python2-graphql-relay
11471 (package-with-python2 python-graphql-relay))
11472
11473(define-public python-graphene
11474 (package
11475 (name "python-graphene")
11476 (version "0.10.2")
11477 (source
11478 (origin
11479 (method url-fetch)
11480 (uri (pypi-uri "graphene" version))
11481 (sha256
11482 (base32
11483 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
11484 (build-system python-build-system)
11485 (propagated-inputs
11486 `(("python-graphql-core" ,python-graphql-core)
11487 ("python-graphql-relay" ,python-graphql-relay)
11488 ("python-iso8601" ,python-iso8601)
11489 ("python-promise" ,python-promise)
11490 ("python-six" ,python-six)))
11491 (arguments
11492 `(#:tests? #f)) ; no tests/ in the PyPI tarball
11493 (home-page "http://graphene-python.org/")
11494 (synopsis "GraphQL Framework for Python")
11495 (description
11496 "Graphene is a Python library for building GraphQL schemas/types.
11497A GraphQL schema describes your data model, and provides a GraphQL server
11498with an associated set of resolve methods that know how to fetch data.")
11499 (properties `((python2-variant . ,(delay python2-graphene))))
11500 (license license:expat)))
11501
11502(define-public python2-graphene
11503 (let ((base (package-with-python2
11504 (strip-python2-variant python-graphene))))
11505 (package (inherit base)
11506 (native-inputs
11507 `(("python2-sqlalchemy" ,python2-sqlalchemy)
11508 ,@(package-native-inputs base))))))
11509
11510(define-public python-nautilus
11511 (package
11512 (name "python-nautilus")
11513 (version "0.4.9")
11514 (source
11515 (origin
11516 (method url-fetch)
11517 (uri (pypi-uri "nautilus" version))
11518 (sha256
11519 (base32
11520 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
11521 (build-system python-build-system)
11522 (arguments `(#:tests? #f)) ; fails to import test modules
11523 (propagated-inputs
11524 `(("python-bcrypt" ,python-bcrypt)
11525 ("python-click" ,python-click)
11526 ("python-consul" ,python-consul)
11527 ("python-graphene" ,python-graphene)
11528 ("python-jinja2" ,python-jinja2)
11529 ("python-peewee" ,python-peewee)
11530 ("python-pika" ,python-pika)
11531 ("python-tornado" ,python-tornado)
11532 ("python-wtforms" ,python-wtforms)))
11533 (native-inputs
11534 `(("python-nose2" ,python-nose2)))
11535 (home-page "https://github.com/AlecAivazis/nautilus")
11536 (synopsis "Library for creating microservice applications")
11537 (description
11538 "Nautilus is a framework for flux based microservices that looks to
11539provide extendible implementations of common aspects of a cloud so that you can
11540focus on building massively scalable web applications.")
11541 (license license:expat)))
11542
11543(define-public python-snowballstemmer
11544 (package
11545 (name "python-snowballstemmer")
11546 (version "1.2.1")
11547 (source (origin
11548 (method url-fetch)
11549 (uri (pypi-uri "snowballstemmer" version))
11550 (sha256
11551 (base32
11552 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
11553 (build-system python-build-system)
11554 (arguments
11555 `(;; No tests exist
11556 #:tests? #f))
11557 (home-page "https://github.com/shibukawa/snowball_py")
11558 (synopsis "Snowball stemming library collection for Python")
11559 (description "This package provides 16 word stemmer algorithms generated
11560from Snowball algorithms. It includes the 15 original ones plus the Poerter
11561English stemmer.")
11562 (license license:bsd-3)))
11563
11564(define-public python2-snowballstemmer
11565 (package-with-python2 python-snowballstemmer))
11566
44d10b1f
RW
11567(define-public python-setproctitle
11568(package
11569 (name "python-setproctitle")
11570 (version "1.1.10")
11571 (source
11572 (origin
11573 (method url-fetch)
11574 (uri (pypi-uri "setproctitle" version))
11575 (sha256
11576 (base32
11577 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
11578 (build-system python-build-system)
11579 (arguments
11580 '(#:phases
11581 (modify-phases %standard-phases
11582 (add-before 'check 'patch-Makefile
11583 ;; Stricly this is only required for the python2 variant.
11584 ;; But adding a phase in an inherited package seems to be
11585 ;; cumbersum. So we patch even for python3.
11586 (lambda _
11587 (let ((nose (assoc-ref %build-inputs "python2-nose")))
11588 (when nose
11589 (substitute* "Makefile"
11590 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
11591 (string-append nose "/bin/nosetests "))))
11592 #t)))
11593 (replace 'check
11594 (lambda _
11595 (setenv "PYTHON" (or (which "python3") (which "python")))
11596 (setenv "PYCONFIG" (or (which "python3-config")
11597 (which "python-config")))
11598 (setenv "CC" "gcc")
11599 ;; No need to extend PYTHONPATH to find the built package, since
11600 ;; the Makefile will build anyway
11601 (invoke "make" "check"))))))
11602 (native-inputs
11603 `(("procps" ,procps))) ; required for tests
11604 (home-page
11605 "https://github.com/dvarrazzo/py-setproctitle")
11606 (synopsis
11607 "Setproctitle implementation for Python to customize the process title")
11608 (description "The library allows a process to change its title (as displayed
11609by system tools such as ps and top).
11610
11611Changing the title is mostly useful in multi-process systems, for
11612example when a master process is forked: changing the children's title
11613allows to identify the task each process is busy with. The technique
11614is used by PostgreSQL and the OpenSSH Server for example.")
11615 (license license:bsd-3)
11616 (properties `((python2-variant . ,(delay python2-setproctitle))))))
11617
11618(define-public python2-setproctitle
11619 (let ((base (package-with-python2
11620 (strip-python2-variant python-setproctitle))))
11621 (package
11622 (inherit base)
11623 (native-inputs `(("python2-nose" ,python2-nose)
11624 ,@(package-native-inputs base))))))
11625
11626(define-public python-validictory
11627 (package
11628 (name "python-validictory")
11629 (version "1.0.1")
11630 (source
11631 (origin
11632 (method url-fetch)
11633 (uri (pypi-uri "validictory" version))
11634 (sha256
11635 (base32
11636 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
11637 (build-system python-build-system)
11638 (arguments
11639 '(#:phases
11640 (modify-phases %standard-phases
11641 (add-after 'unpack 'bootstrap
11642 ;; Move the tests out of the package directory to avoid
11643 ;; packaging them.
11644 (lambda* _
11645 (rename-file "validictory/tests" "tests")
11646 (delete-file "tests/__init__.py")))
11647 (replace 'check
11648 (lambda _
11649 ;; Extend PYTHONPATH so the built package will be found.
11650 (setenv "PYTHONPATH"
11651 (string-append (getcwd) "/build/lib:"
11652 (getenv "PYTHONPATH")))
6568bd5d 11653 (invoke "py.test" "-vv" ))))))
44d10b1f
RW
11654 (native-inputs
11655 `(("python-pytest" ,python-pytest)))
11656 (home-page
11657 "https://github.com/jamesturk/validictory")
11658 (synopsis "General purpose Python data validator")
11659 (description "It allows validation of arbitrary Python data structures.
11660
11661The schema format is based on the JSON Schema
11662proposal (http://json-schema.org), so combined with json the library is also
11663useful as a validator for JSON data.")
11664 (license license:expat)))
11665
11666(define-public python2-validictory
11667 (package-with-python2 python-validictory))
11668
11669(define-public python-pyelftools
11670 (package
11671 (name "python-pyelftools")
11672 (version "0.25")
11673 (source
11674 (origin
11675 (method url-fetch)
11676 (uri (pypi-uri "pyelftools" version))
11677 (sha256
11678 (base32
11679 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
11680 (build-system python-build-system)
11681 (arguments
11682 `(#:phases
11683 (modify-phases %standard-phases
11684 (add-before 'check 'set-pythonpath
11685 (lambda _
11686 (setenv "PYTHONPATH"
11687 (string-append
11688 (getcwd) "/test/"
11689 ":" (getenv "PYTHONPATH")))
11690 #t)))))
11691 (home-page
11692 "https://github.com/eliben/pyelftools")
11693 (synopsis
11694 "Analyze binary and library file information")
11695 (description "This Python library provides interfaces for parsing and
11696analyzing two binary and library file formats; the Executable and Linking
11697Format (ELF), and debugging information in the Debugging With Attributed
11698Record Format (DWARF).")
11699 (license license:public-domain)))
11700
11701(define-public python-pyev
11702 (package
11703 (name "python-pyev")
11704 (version "0.9.0")
11705 (source
11706 (origin
11707 (method url-fetch)
11708 (uri (pypi-uri "pyev" version))
11709 (sha256
11710 (base32
11711 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
11712 (build-system python-build-system)
11713 (arguments
11714 `(#:tests? #f ; no test suite
11715 #:phases
11716 (modify-phases %standard-phases
11717 (add-after 'unpack 'patch
11718 (lambda* (#:key inputs #:allow-other-keys)
11719 (let ((libev (string-append (assoc-ref inputs "libev")
11720 "/lib/libev.so.4")))
11721 (substitute* "setup.py"
11722 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
11723 (string-append "libev_dll_name = \"" libev "\"")))))))))
11724 (inputs
11725 `(("libev" ,libev)))
11726 (home-page "http://pythonhosted.org/pyev/")
11727 (synopsis "Python libev interface")
11728 (description "Pyev provides a Python interface to libev.")
11729 (license license:gpl3)))
11730
11731(define-public python2-pyev
11732 (package-with-python2 python-pyev))
11733
11734(define-public python-imagesize
11735 (package
11736 (name "python-imagesize")
11737 (version "1.1.0")
11738 (source
11739 (origin
11740 (method url-fetch)
11741 (uri (pypi-uri "imagesize" version))
11742 (sha256
11743 (base32
11744 "1dg3wn7qpwmhgqc0r9na2ding1wif9q5spz3j9zn2riwphc2k0zk"))))
11745 (build-system python-build-system)
11746 (home-page "https://github.com/shibukawa/imagesize_py")
11747 (synopsis "Gets image size of files in various formats in Python")
11748 (description
11749 "This package allows determination of image size from
11750PNG, JPEG, JPEG2000 and GIF files in pure Python.")
11751 (license license:expat)))
11752
11753(define-public python2-imagesize
11754 (package-with-python2 python-imagesize))
11755
11756(define-public python-termstyle
11757 (package
11758 (name "python-termstyle")
11759 (version "0.1.11")
11760 (source
11761 (origin
11762 (method url-fetch)
11763 (uri (pypi-uri "termstyle" version))
11764 (sha256
11765 (base32
11766 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
11767 (build-system python-build-system)
11768 (arguments
11769 '(#:phases
11770 (modify-phases %standard-phases
11771 (replace 'check
11772 (lambda _
831080a6 11773 (invoke "python" "test3.py"))))))
44d10b1f
RW
11774 (home-page "https://github.com/gfxmonk/termstyle")
11775 (synopsis "Console text coloring for Python")
11776 (description "This package provides console text coloring for Python.")
11777 (license license:bsd-3)))
11778
11779(define-public python-argcomplete
11780 (package
11781 (name "python-argcomplete")
98aecd3a 11782 (version "1.10.3")
44d10b1f 11783 (source
98aecd3a
RW
11784 (origin
11785 (method url-fetch)
11786 (uri (pypi-uri "argcomplete" version))
11787 (sha256
11788 (base32
11789 "02jkc44drb0yjz6x28lvg6rj607n8r2irdpdvyylm8xnycn54zx3"))))
44d10b1f 11790 (build-system python-build-system)
98aecd3a
RW
11791 (arguments
11792 `(#:phases
11793 (modify-phases %standard-phases
11794 (add-after 'unpack 'embed-tool-references
11795 (lambda _
11796 (substitute* "argcomplete/bash_completion.d/python-argcomplete.sh"
11797 ((" grep")
11798 (string-append " " (which "grep")))
11799 ((" egrep")
11800 (string-append " " (which "egrep")))
11801 (("elif which")
11802 (string-append "elif " (which "which")))
11803 (("\\$\\(which")
11804 (string-append "$(" (which "which"))))
11805 #t)))))
11806 (inputs
11807 `(("grep" ,grep)
11808 ("which" ,which)))
44d10b1f 11809 (native-inputs
98aecd3a
RW
11810 `(("python-coverage" ,python-coverage)
11811 ("python-flake8" ,python-flake8)
11812 ("python-pexpect" ,python-pexpect)
11813 ("python-wheel" ,python-wheel)
44d10b1f 11814 ("tcsh" ,tcsh)
98aecd3a
RW
11815 ("fish" ,fish)
11816 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
44d10b1f
RW
11817 (home-page "https://github.com/kislyuk/argcomplete")
11818 (synopsis "Shell tab completion for Python argparse")
11819 (description "argcomplete provides extensible command line tab completion
11820of arguments and options for Python scripts using @code{argparse}. It's
11821particularly useful for programs with many options or sub-parsers that can
11822dynamically suggest completions; for example, when browsing resources over the
11823network.")
11824 (license license:asl2.0)))
11825
11826(define-public python2-argcomplete
11827 (package-with-python2 python-argcomplete))
11828
11829(define-public python-xopen
11830 (package
11831 (name "python-xopen")
24d64989 11832 (version "0.5.0")
44d10b1f
RW
11833 (source
11834 (origin
11835 (method url-fetch)
11836 (uri (pypi-uri "xopen" version))
11837 (sha256
11838 (base32
24d64989 11839 "17xbrgi23l87yg6h0qcknssp2q812miiy33qw6v45v5gx0jwv5xh"))))
44d10b1f 11840 (build-system python-build-system)
24d64989
RW
11841 (propagated-inputs
11842 `(("python-setuptools-scm" ,python-setuptools-scm)))
44d10b1f
RW
11843 (home-page "https://github.com/marcelm/xopen/")
11844 (synopsis "Open compressed files transparently")
11845 (description "This module provides an @code{xopen} function that works like
11846Python's built-in @code{open} function, but can also deal with compressed files.
11847Supported compression formats are gzip, bzip2 and, xz, and are automatically
11848recognized by their file extensions. The focus is on being as efficient as
11849possible on all supported Python versions.")
11850 (license license:expat)))
11851
11852(define-public python2-xopen
11853 (let ((base (package-with-python2
11854 (strip-python2-variant python-xopen))))
11855 (package
11856 (inherit base)
11857 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
11858 ,@(package-propagated-inputs base))))))
11859
11860(define-public python-cheetah
11861 (package
11862 (name "python-cheetah")
11863 (version "3.1.0")
11864 (source
11865 (origin
11866 (method url-fetch)
11867 (uri (pypi-uri "Cheetah3" version))
11868 (sha256
11869 (base32
11870 "1ihag9cxll6b86fc8v5lkhmr3brdbi4yiz16zpgw79yylmv8fgr9"))))
11871 (build-system python-build-system)
11872 (arguments
11873 `(#:modules ((guix build utils)
11874 (guix build python-build-system)
11875 (ice-9 ftw)
11876 (srfi srfi-1)
11877 (srfi srfi-26))
11878 #:phases (modify-phases %standard-phases
11879 (add-after 'unpack 'use-absolute-python
11880 (lambda _
11881 (substitute* "Cheetah/CheetahWrapper.py"
11882 (("#!/usr/bin/env python")
11883 (string-append "#!" (which "python"))))
11884 #t))
11885 (replace 'check
11886 (lambda _
11887 (let ((cwd (getcwd)))
11888 (setenv "PYTHONPATH"
11889 (string-append
11890 cwd "/build/"
11891 (find (cut string-prefix? "lib" <>)
11892 (scandir (string-append cwd "/build")))
11893 ":" (getenv "PYTHONPATH")))
11894 (setenv "PATH"
11895 (string-append (getenv "PATH")
11896 ":" cwd "/bin"))
11897 (setenv "TMPDIR" "/tmp")
11898
11899 (substitute* "Cheetah/Tests/Test.py"
11900 (("unittest.TextTestRunner\\(\\)")
11901 "unittest.TextTestRunner(verbosity=2)"))
11902
11903 (invoke "python" "Cheetah/Tests/Test.py")))))))
11904 (propagated-inputs
11905 `(("python-markdown" ,python-markdown))) ;optional
11906 (home-page "http://cheetahtemplate.org/")
11907 (synopsis "Template engine")
11908 (description "Cheetah is a text-based template engine and Python code
11909generator.
11910
11911Cheetah can be used as a standalone templating utility or referenced as
11912a library from other Python applications. It has many potential uses,
11913but web developers looking for a viable alternative to ASP, JSP, PHP and
11914PSP are expected to be its principle user group.
11915
11916Features:
11917@enumerate
11918@item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
11919 text-based format.
11920@item Cleanly separates content, graphic design, and program code.
11921@item Blends the power and flexibility of Python with a simple template language
11922 that non-programmers can understand.
11923@item Gives template writers full access to any Python data structure, module,
11924 function, object, or method in their templates.
11925@item Makes code reuse easy by providing an object-orientated interface to
11926 templates that is accessible from Python code or other Cheetah templates.
11927 One template can subclass another and selectively reimplement sections of it.
11928@item Provides a simple, yet powerful, caching mechanism that can dramatically
11929 improve the performance of a dynamic website.
11930@item Compiles templates into optimized, yet readable, Python code.
11931@end enumerate")
11932 (license (license:x11-style "file://LICENSE"))))
11933
11934(define-public python2-cheetah
11935 (package-with-python2 python-cheetah))
11936
11937(define-public python-dulwich
11938 (package
11939 (name "python-dulwich")
11940 (version "0.18.6")
11941 (source
11942 (origin
11943 (method url-fetch)
11944 (uri (list (string-append "https://www.dulwich.io/releases/"
11945 "dulwich-" version ".tar.gz")
11946 (pypi-uri "dulwich" version)))
11947 (sha256
11948 (base32
11949 "1aa1xfrxkc3j9s4xi0llhf5gndyi9ryprcxsqfa5fcb8ph34981q"))))
11950 (build-system python-build-system)
11951 (arguments
11952 `(#:phases
11953 (modify-phases %standard-phases
11954 (add-before 'check 'fix-tests
11955 (lambda* (#:key inputs #:allow-other-keys)
11956 ;; The tests use Popen with a custom environment which doesn't
11957 ;; include PATH.
11958 (substitute* "dulwich/tests/compat/utils.py"
11959 (("'git'") (string-append "'"
11960 (which "git")
11961 "'")))
11962 (substitute* '("dulwich/tests/test_repository.py"
11963 "dulwich/tests/test_hooks.py")
11964 (("#!/bin/sh") (string-append "#!" (which "sh"))))
11965 (setenv "TEST_RUNNER" "unittest")
11966 (setenv "PYTHONHASHSEED" "random")
11967 #t)))))
11968 (propagated-inputs
11969 `(("python-fastimport" ,python-fastimport)))
11970 (native-inputs
11971 `(("python-mock" ,python-mock)
11972 ("python-geventhttpclient" ,python-geventhttpclient)
11973 ("git" ,git)))
11974 (home-page "https://www.dulwich.io/")
11975 (synopsis "Git implementation in Python")
11976 (description "Dulwich is an implementation of the Git file formats and
11977protocols written in pure Python.")
11978 ;; Can be used with either license.
11979 (license (list license:asl2.0 license:gpl2+))))
11980
11981(define-public python2-dulwich
11982 (package-with-python2 python-dulwich))
11983
11984(define-public python-pbkdf2
11985 (package
11986 (name "python-pbkdf2")
11987 (version "1.3")
11988 (source
11989 (origin
11990 (method url-fetch)
11991 (uri (pypi-uri "pbkdf2" version))
11992 (sha256
11993 (base32
11994 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
11995 (build-system python-build-system)
11996 (arguments
11997 '(#:phases
11998 (modify-phases %standard-phases
11999 (replace 'check
12000 (lambda _
12001 (setenv "PYTHONPATH"
12002 (string-append (getcwd) "/build/lib:"
12003 (getenv "PYTHONPATH")))
ee2bb944 12004 (invoke "python" "test/test_pbkdf2.py"))))))
44d10b1f
RW
12005 (propagated-inputs
12006 `(("python-pycrypto" ,python-pycrypto))) ; optional
12007 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
12008 (synopsis "Password-based key derivation")
12009 (description "This module implements the password-based key derivation
12010function, PBKDF2, specified in RSA PKCS#5 v2.0.
12011
12012PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
12013is part of the RSA Public Key Cryptography Standards series. The provided
12014implementation takes a password or a passphrase and a salt value (and
12015optionally a iteration count, a digest module, and a MAC module) and provides
12016a file-like object from which an arbitrarly-sized key can be read.")
12017 (license license:expat)))
12018
12019(define-public python2-pbkdf2
12020 (package-with-python2 python-pbkdf2))
12021
12022(define-public python-qrcode
12023 (package
12024 (name "python-qrcode")
217ea1a1 12025 (version "6.1")
44d10b1f
RW
12026 (source
12027 (origin
12028 (method url-fetch)
12029 (uri (pypi-uri "qrcode" version))
12030 (sha256
217ea1a1 12031 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
44d10b1f
RW
12032 (build-system python-build-system)
12033 (arguments
12034 ;; FIXME: Tests require packaging 'pymaging'.
12035 '(#:tests? #f))
12036 (propagated-inputs
12037 `(("python-lxml" ,python-lxml) ; for SVG output
12038 ("python-pillow" ,python-pillow) ; for PNG output
12039 ("python-six" ,python-six)))
44d10b1f
RW
12040 (home-page "https://github.com/lincolnloop/python-qrcode")
12041 (synopsis "QR Code image generator")
12042 (description "This package provides a pure Python QR Code generator
12043module. It uses the Python Imaging Library (PIL) to allow for the generation
12044of QR Codes.
12045
12046In addition this package provides a command line tool to generate QR codes and
12047either write these QR codes to a file or do the output as ascii art at the
12048console.")
12049 (license license:bsd-3)))
12050
12051(define-public python2-qrcode
12052 (package-with-python2 python-qrcode))
12053
12054(define-public python-rst2ansi
12055 (package
12056 (name "python-rst2ansi")
12057 (version "0.1.5")
12058 (source
12059 (origin
12060 (method url-fetch)
12061 (uri (pypi-uri "rst2ansi" version))
12062 (sha256
12063 (base32
12064 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
12065 (build-system python-build-system)
12066 (propagated-inputs
12067 `(("python-docutils" ,python-docutils)))
12068 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
12069 (synopsis "Convert RST to ANSI-decorated console output")
12070 (description
12071 "Python module dedicated to rendering RST (reStructuredText) documents
12072to ansi-escaped strings suitable for display in a terminal.")
12073 (license license:expat)))
12074
12075(define-public python-ansi2html
12076 (package
12077 (name "python-ansi2html")
12078 (version "1.2.0")
12079 (source
12080 (origin
12081 (method url-fetch)
12082 (uri (pypi-uri "ansi2html" version))
12083 (sha256
12084 (base32
12085 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
12086 (build-system python-build-system)
12087 (native-inputs
12088 `(("python-mock" ,python-mock)
12089 ("python-nose" ,python-nose)))
12090 (propagated-inputs
12091 `(("python-six" ,python-six)))
12092 (home-page "https://github.com/ralphbean/ansi2html")
12093 (synopsis "Convert ANSI-decorated console output to HTML")
12094 (description
12095 "@command{ansi2html} is a Python library and command line utility for
12096convering text with ANSI color codes to HTML or LaTeX.")
12097 (license license:gpl3+)))
12098
12099(define-public python2-ansi2html
12100 (package-with-python2 python-ansi2html))
12101
12102(define-public python-ddt
12103 (package
12104 (name "python-ddt")
12105 (version "1.1.3")
12106 (source
12107 (origin
12108 (method url-fetch)
12109 (uri (pypi-uri "ddt" version))
12110 (sha256
12111 (base32
12112 "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk"))))
12113 (build-system python-build-system)
12114 (native-inputs
12115 `(("python-mock" ,python-mock)
12116 ("python-nose" ,python-nose)))
12117 (propagated-inputs
12118 `(("python-six" ,python-six)
12119 ("python-pyyaml" ,python-pyyaml)))
12120 (home-page "https://github.com/txels/ddt")
12121 (synopsis "Data-Driven Tests")
12122 (description
12123 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
12124running it with different test data, and make it appear as multiple test
12125cases.")
12126 (license license:expat)))
12127
12128(define-public python2-ddt
12129 (package-with-python2 python-ddt))
12130
12131(define-public python-pycountry
12132 (package
12133 (name "python-pycountry")
12134 (version "18.5.26")
12135 (source
12136 (origin
12137 (method url-fetch)
12138 (uri (pypi-uri "pycountry" version))
12139 (sha256
12140 (base32
12141 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
12142 (build-system python-build-system)
12143 (home-page "https://bitbucket.org/flyingcircus/pycountry")
12144 (synopsis "ISO databases for languages, countries, currencies, etc.")
12145 (description
12146 "@code{pycountry} provides the ISO databases for the standards:
12147@enumerate
12148@item 639-3 (Languages)
12149@item 3166 (Countries)
12150@item 3166-3 (Deleted Countries)
12151@item 3166-2 (Subdivisions of countries)
12152@item 4217 (Currencies)
12153@item 15924 (Scripts)
12154@end enumerate
12155It includes a copy from Debian’s pkg-isocodes and makes the data accessible
12156through a Python API.")
12157 (license license:lgpl2.1+)))
12158
12159(define-public python2-pycountry
12160 (package-with-python2 python-pycountry))
12161
12162(define-public python-pycosat
12163 (package
12164 (name "python-pycosat")
12165 (version "0.6.1")
12166 (source
12167 (origin
12168 (method url-fetch)
12169 (uri (pypi-uri "pycosat" version))
12170 (sha256
12171 (base32
12172 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
12173 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
12174 (build-system python-build-system)
12175 (home-page "https://github.com/ContinuumIO/pycosat")
12176 (synopsis "Bindings to picosat (a SAT solver)")
12177 (description
12178 "This package provides efficient Python bindings to @code{picosat} on
12179the C level. When importing pycosat, the @code{picosat} solver becomes part
12180of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
12181Problem} (SAT) solver.")
12182 (license license:expat)))
12183
12184(define-public python2-pycosat
12185 (package-with-python2 python-pycosat))
12186
12187(define-public python2-ruamel.ordereddict
12188 (package
12189 (name "python2-ruamel.ordereddict")
12190 (version "0.4.9")
12191 (source
12192 (origin
12193 (method url-fetch)
12194 (uri (pypi-uri "ruamel.ordereddict" version))
12195 (sha256
12196 (base32
12197 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
12198 (build-system python-build-system)
12199 (arguments
12200 `(#:python ,python-2
12201 #:phases
12202 (modify-phases %standard-phases
12203 (delete 'check)
12204 (add-after 'install 'check
12205 (lambda* (#:key inputs outputs #:allow-other-keys)
12206 (add-installed-pythonpath inputs outputs)
f987ac30 12207 (invoke "python" "test/testordereddict.py"))))))
44d10b1f
RW
12208 (home-page "https://bitbucket.org/ruamel/ordereddict")
12209 (synopsis "Version of dict that keeps keys in insertion order")
12210 (description
12211 "This is an implementation of an ordered dictionary with @dfn{Key
12212Insertion Order} (KIO: updates of values do not affect the position of the
12213key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
12214removed and put at the back). The standard library module @code{OrderedDict},
12215implemented later, implements a subset of @code{ordereddict} functionality.
12216Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
12217Order} (KSO, no sorting function can be specified, but a transform can be
12218specified to apply on the key before comparison (e.g. @code{string.lower})).")
12219 (license license:expat)))
12220
12221(define-public python-pypeg2
12222 (package
12223 (name "python-pypeg2")
12224 (version "2.15.2")
12225 (source
12226 (origin
12227 (method url-fetch)
12228 (uri (pypi-uri "pyPEG2" version))
12229 (sha256
12230 (base32
12231 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
12232 (build-system python-build-system)
12233 (propagated-inputs `(("python-lxml" ,python-lxml)))
12234 (arguments
12235 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
12236 '(#:tests? #f))
12237 (home-page "https://fdik.org/pyPEG/")
12238 (synopsis "Parsering Expression Grammars in Python")
12239 (description "PyPEG is an intrinsic parser interpreter framework for
12240Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
12241parse many formal languages.")
12242 (license license:gpl2)))
12243
12244(define-public python-incremental
12245 (package
12246 (name "python-incremental")
12247 (version "17.5.0")
12248 (source
12249 (origin
12250 (method url-fetch)
12251 (uri (pypi-uri "incremental" version))
12252 (sha256
12253 (base32
12254 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
12255 (build-system python-build-system)
12256 (home-page "https://github.com/hawkowl/incremental")
12257 (synopsis "Library for versioning Python projects")
12258 (description "Incremental is a small library that versions your Python
12259projects.")
12260 (license license:expat)))
12261
12262(define-public python2-incremental
12263 (package-with-python2 python-incremental))
12264
12265(define-public python-invoke
12266 (package
12267 (name "python-invoke")
12268 (home-page "http://www.pyinvoke.org/")
a5662319 12269 (version "1.3.0")
44d10b1f
RW
12270 (source (origin
12271 (method url-fetch)
12272 (uri (pypi-uri "invoke" version))
12273 (sha256
12274 (base32
a5662319 12275 "1nn7gad0rvy492acpyhkrp01zsk86acf34qhsvq4xmm6x39788n5"))))
44d10b1f
RW
12276 (build-system python-build-system)
12277 (arguments
12278 ;; XXX: Requires many dependencies that are not yet in Guix.
12279 `(#:tests? #f))
12280 (synopsis "Pythonic task execution")
12281 (description
12282 "Invoke is a Python task execution tool and library, drawing inspiration
12283from various sources to arrive at a powerful and clean feature set. It is
12284evolved from the Fabric project, but focuses on local and abstract concerns
12285instead of servers and network commands.")
12286 (license license:bsd-3)))
12287
12288(define-public python2-invoke
12289 (package-with-python2 python-invoke))
12290
12291(define-public python-automat
12292 (package
12293 (name "python-automat")
919d80a0 12294 (version "0.7.0")
44d10b1f
RW
12295 (source (origin
12296 (method url-fetch)
12297 (uri (pypi-uri "Automat" version))
12298 (sha256
12299 (base32
919d80a0 12300 "03ivg70n3b1cbcd2zvjhk8y4kmqxcvhmili39lmgx09dza1qpmyb"))))
44d10b1f
RW
12301 (build-system python-build-system)
12302 ;; We disable the tests because they require python-twisted, while
12303 ;; python-twisted depends on python-automat. Twisted is optional, but the
12304 ;; tests fail if it is not available. Also see
12305 ;; <https://github.com/glyph/automat/issues/71>.
12306 (arguments '(#:tests? #f))
12307 (native-inputs
12308 `(("python-m2r" ,python-m2r)
12309 ("python-setuptools-scm" ,python-setuptools-scm)
12310 ("python-graphviz" ,python-graphviz)))
12311 (propagated-inputs
12312 `(("python-six" ,python-six)
12313 ("python-attrs" ,python-attrs)))
12314 (home-page "https://github.com/glyph/Automat")
12315 (synopsis "Self-service finite-state machines")
12316 (description "Automat is a library for concise, idiomatic Python
12317expression of finite-state automata (particularly deterministic finite-state
12318transducers).")
12319 (license license:expat)))
12320
12321(define-public python2-automat
12322 (package-with-python2 python-automat))
12323
12324(define-public python-m2r
12325 (package
12326 (name "python-m2r")
bcfb8fac 12327 (version "0.2.1")
44d10b1f
RW
12328 (source (origin
12329 (method url-fetch)
12330 (uri (pypi-uri "m2r" version))
12331 (sha256
12332 (base32
bcfb8fac 12333 "16gdm8i06jjmlpvckpfmlkr4693dh0vs192vgsqn84fsdkbbm45z"))))
44d10b1f
RW
12334 (build-system python-build-system)
12335 (propagated-inputs
12336 `(("python-docutils" ,python-docutils)
12337 ("python-mistune" ,python-mistune)))
12338 (native-inputs
12339 `(("python-pygments" ,python-pygments)
12340 ("python-mock" ,python-mock)))
12341 (home-page "https://github.com/miyakogi/m2r")
12342 (synopsis "Markdown to reStructuredText converter")
12343 (description "M2R converts a markdown file including reST markups to valid
12344reST format.")
12345 (license license:expat)))
12346
12347(define-public python2-m2r
12348 (package-with-python2 python-m2r))
12349
12350(define-public python-constantly
12351 (package
12352 (name "python-constantly")
12353 (version "15.1.0")
12354 (source (origin
12355 (method url-fetch)
12356 (uri (pypi-uri "constantly" version))
12357 (sha256
12358 (base32
12359 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
12360 (build-system python-build-system)
12361 (home-page "https://github.com/twisted/constantly")
12362 (synopsis "Symbolic constants in Python")
12363 (description "Constantly is a Python library that provides symbolic
12364constant support. It includes collections and constants with text, numeric,
12365and bit flag values.")
12366 (license license:expat)))
12367
12368(define-public python2-constantly
12369 (package-with-python2 python-constantly))
12370
12371(define-public python-attrs
12372 (package
12373 (name "python-attrs")
c41d5144 12374 (version "19.1.0")
44d10b1f
RW
12375 (source (origin
12376 (method url-fetch)
12377 (uri (pypi-uri "attrs" version))
12378 (sha256
12379 (base32
c41d5144 12380 "16g33zr5f449lqc5wgvzpknxryfzrfsxcr6kpgxwn7l5fkv71f7h"))))
44d10b1f
RW
12381 (build-system python-build-system)
12382 (arguments
12383 `(#:modules ((guix build utils)
12384 (guix build python-build-system)
12385 (ice-9 ftw)
12386 (srfi srfi-1)
12387 (srfi srfi-26))
12388 #:phases (modify-phases %standard-phases
12389 (replace 'check
12390 (lambda _
12391 (let ((cwd (getcwd)))
12392 (setenv "PYTHONPATH"
12393 (string-append
12394 cwd "/build/"
12395 (find (cut string-prefix? "lib" <>)
12396 (scandir (string-append cwd "/build")))
12397 ":"
12398 (getenv "PYTHONPATH")))
12399 (invoke "python" "-m" "pytest")))))))
12400 (native-inputs
12401 `(("python-coverage" ,python-coverage)
12402 ("python-hypothesis" ,python-hypothesis)
12403 ("python-pympler" ,python-pympler)
12404 ("python-pytest" ,python-pytest)
12405 ("python-six" ,python-six)
12406 ("python-sphinx" ,python-sphinx)
12407 ("python-zope-interface" ,python-zope-interface)))
12408 (home-page "https://github.com/python-attrs/attrs/")
12409 (synopsis "Attributes without boilerplate")
12410 (description "@code{attrs} is a Python package with class decorators that
12411ease the chores of implementing the most common attribute-related object
12412protocols.")
12413 (license license:expat)))
12414
12415(define-public python2-attrs
12416 (package-with-python2 python-attrs))
12417
12418(define-public python-attrs-bootstrap
12419 (package
12420 (inherit python-attrs)
12421 (name "python-attrs-bootstrap")
44d10b1f
RW
12422 (native-inputs `())
12423 (arguments `(#:tests? #f))))
12424
12425(define-public python2-attrs-bootstrap
12426 (package-with-python2 python-attrs-bootstrap))
12427
12428(define-public python2-cliapp
12429 (package
12430 (name "python2-cliapp")
9064b84e 12431 (version "1.20180812.1")
44d10b1f
RW
12432 (source
12433 (origin
12434 (method url-fetch)
12435 (uri (string-append
12436 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
12437 version ".tar.gz"))
12438 (sha256
12439 (base32
9064b84e 12440 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
44d10b1f
RW
12441 (build-system python-build-system)
12442 (arguments
12443 `(#:python ,python-2
12444 #:phases
12445 (modify-phases %standard-phases
12446 ;; check phase needs to be run before the build phase. If not,
12447 ;; coverage-test-runner looks for tests for the built source files,
12448 ;; and fails.
12449 (delete 'check)
12450 (add-before 'build 'check
12451 (lambda _
12452 ;; Disable python3 tests
12453 (substitute* "check"
12454 (("python3") "# python3"))
6c826d32 12455 (invoke "./check"))))))
44d10b1f
RW
12456 (native-inputs
12457 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
12458 ("python2-pep8" ,python2-pep8)))
12459 (propagated-inputs
12460 `(("python2-pyaml" ,python2-pyaml)))
12461 (home-page "https://liw.fi/cliapp/")
12462 (synopsis "Python framework for command line programs")
12463 (description "@code{python2-cliapp} is a python framework for
12464command line programs. It contains the typical stuff such programs
12465need to do, such as parsing the command line for options, and
12466iterating over input files.")
12467 (license license:gpl2+)))
12468
12469(define-public python2-ttystatus
12470 (package
12471 (name "python2-ttystatus")
e516a9c2 12472 (version "0.36")
44d10b1f
RW
12473 (source
12474 (origin
12475 (method url-fetch)
12476 (uri (string-append
12477 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
12478 version ".tar.gz"))
12479 (sha256
12480 (base32
e516a9c2 12481 "06mdk4d19zw2j3is54gndhzl396g3xc8k52m7i86z69s9hcz71by"))))
44d10b1f
RW
12482 (build-system python-build-system)
12483 (native-inputs
12484 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
12485 ("python2-pep8" ,python2-pep8)))
12486 (arguments
12487 `(#:python ,python-2
12488 #:phases
12489 (modify-phases %standard-phases
12490 ;; check phase needs to be run before the build phase. If not,
12491 ;; coverage-test-runner looks for tests for the built source files,
12492 ;; and fails.
12493 (delete 'check)
12494 (add-before 'build 'check
cbeee881 12495 (lambda _ (invoke "make" "check"))))))
44d10b1f
RW
12496 (home-page "https://liw.fi/ttystatus/")
12497 (synopsis "Python library for showing progress reporting and
12498status updates on terminals")
12499 (description "@code{python2-ttystatus} is a python library for
12500showing progress reporting and status updates on terminals, for
12501command line programs. Output is automatically adapted to the width
12502of the terminal: truncated if it does not fit, and resized if the
12503terminal size changes.")
12504 (license license:gpl3+)))
12505
12506(define-public python2-tracing
12507 (package
12508 (name "python2-tracing")
12509 (version "0.10")
12510 (source
12511 (origin
12512 (method url-fetch)
12513 (uri (string-append
12514 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
12515 version ".tar.gz"))
12516 (sha256
12517 (base32
12518 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
12519 (build-system python-build-system)
12520 (arguments
12521 `(#:python ,python-2))
12522 (home-page "https://liw.fi/tracing/")
12523 (synopsis "Python debug logging helper")
12524 (description "@code{python2-tracing} is a python library for
12525logging debug messages. It provides a way to turn debugging messages
12526on and off, based on the filename they occur in. It is much faster
12527than using @code{logging.Filter} to accomplish the same thing, which
12528matters when code is run in production mode. The actual logging still
12529happens using the @code{logging} library.")
12530 (license license:gpl3+)))
12531
12532(define-public python2-larch
12533 (package
12534 (name "python2-larch")
12535 (version "1.20151025")
12536 (source
12537 (origin
12538 (method url-fetch)
12539 (uri (string-append
12540 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
12541 version ".tar.gz"))
12542 (patches (search-patches
12543 "python2-larch-coverage-4.0a6-compatibility.patch"))
12544 (sha256
12545 (base32
12546 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
12547 (build-system python-build-system)
12548 (arguments
12549 `(#:python ,python-2
12550 #:phases
12551 (modify-phases %standard-phases
12552 ;; check phase needs to be run before the build phase. If not,
12553 ;; coverage-test-runner looks for tests for the built source files,
12554 ;; and fails.
12555 (delete 'check)
12556 (add-before 'build 'check
204ad455 12557 (lambda _ (invoke "make" "check"))))))
44d10b1f
RW
12558 (native-inputs
12559 `(("cmdtest" ,cmdtest)
12560 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
12561 (propagated-inputs
12562 `(("python2-tracing" ,python2-tracing)))
12563 (home-page "https://liw.fi/larch/")
12564 (synopsis "Python copy-on-write B-tree library")
12565 (description "@code{python2-larch} is an implementation of
12566particular kind of B-tree, based on research by Ohad Rodeh. See
12567@url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
12568on the data structure.
12569
12570The distinctive feature of this B-tree is that a node is never
12571(conceptually) modified. Instead, all updates are done by
12572copy-on-write. This makes it easy to clone a tree, and modify only the
12573clone, while other processes access the original tree.")
12574 (license license:gpl3+)))
12575
12576(define-public python-astroid
12577 (package
12578 (name "python-astroid")
1c43c698 12579 (version "2.3.3")
44d10b1f
RW
12580 (source
12581 (origin
12582 (method url-fetch)
12583 (uri (pypi-uri "astroid" version))
12584 (sha256
1c43c698 12585 (base32 "0fnibsl2cb5mvzbfm7sycj85smx48f8w8m7ks1sqlmpr9ps0gski"))))
44d10b1f
RW
12586 (build-system python-build-system)
12587 (propagated-inputs
12588 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
12589 ("python-six" ,python-six)
f0935460 12590 ("python-typed-ast" ,python-typed-ast)
44d10b1f
RW
12591 ("python-wrapt" ,python-wrapt)))
12592 (native-inputs
12593 `(("python-dateutil" ,python-dateutil)
12594 ("python-nose" ,python-nose)
12595 ("python-pytest" ,python-pytest)
12596 ("python-pytest-runner" ,python-pytest-runner)))
12597 (arguments
12598 `(#:phases
12599 (modify-phases %standard-phases
12600 (add-after 'unpack 'remove-spurious-test
12601 (lambda _
12602 ;; This can be removed after upgrading from python-3.7
12603 ;; https://github.com/PyCQA/astroid/issues/593
12604 ;; https://bugs.python.org/issue34056
12605 (delete-file "astroid/tests/unittest_modutils.py")
12606 #t))
12607 (replace 'check
12608 (lambda _
12609 (invoke "pytest" "astroid"))))))
12610 (home-page "https://github.com/PyCQA/astroid")
12611 (synopsis "Common base representation of python source code for pylint and
12612other projects")
12613 (description "@code{python-astroid} provides a common base representation
12614of python source code for projects such as pychecker, pyreverse, pylint, etc.
12615
12616It provides a compatible representation which comes from the _ast module. It
12617rebuilds the tree generated by the builtin _ast module by recursively walking
12618down the AST and building an extended ast. The new node classes have
12619additional methods and attributes for different usages. They include some
12620support for static inference and local name scopes. Furthermore, astroid
12621builds partial trees by inspecting living objects.")
12622 (license license:lgpl2.1+)
12623 (properties `((python2-variant . ,(delay python2-astroid))))))
12624
12625(define-public python2-astroid
12626 (let ((base (package-with-python2
12627 (strip-python2-variant python-astroid))))
12628 (package (inherit base)
12629 ;; Version 2.x removes python2 support.
12630 (version "1.6.5")
12631 (source
12632 (origin
12633 (method url-fetch)
12634 (uri (pypi-uri "astroid" version))
12635 (sha256
12636 (base32
12637 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
12638 (arguments
12639 (substitute-keyword-arguments (package-arguments base)
12640 ((#:phases phases)
12641 `(modify-phases ,phases
12642 (add-after 'unpack 'remove-spurious-test
12643 (lambda _
12644 ;; https://github.com/PyCQA/astroid/issues/276
12645 (delete-file "astroid/tests/unittest_brain.py")
12646 #t))
12647 (replace 'check
12648 (lambda _
12649 (invoke"python" "-m" "unittest" "discover"
12650 "-p" "unittest*.py")))))))
12651 (native-inputs `())
12652 (propagated-inputs
12653 `(("python2-backports-functools-lru-cache"
12654 ,python2-backports-functools-lru-cache)
12655 ("python2-enum34" ,python2-enum34)
12656 ("python2-singledispatch" ,python2-singledispatch)
741f98b3
MO
12657 ,@(alist-delete "python-typed-ast"
12658 (package-propagated-inputs base)))))))
44d10b1f
RW
12659
12660(define-public python-isort
12661 (package
12662 (name "python-isort")
e2227b6a 12663 (version "4.3.4")
44d10b1f
RW
12664 (source
12665 (origin
e2227b6a
EF
12666 (method git-fetch)
12667 (uri (git-reference
12668 ;; Tests pass only from the Github sources
12669 (url "https://github.com/timothycrosley/isort")
12670 (commit version)))
12671 (file-name (git-file-name name version))
44d10b1f
RW
12672 (sha256
12673 (base32
e2227b6a 12674 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
44d10b1f
RW
12675 (build-system python-build-system)
12676 (native-inputs
12677 `(("python-mock" ,python-mock)
12678 ("python-pytest" ,python-pytest)))
12679 (home-page "https://github.com/timothycrosley/isort")
12680 (synopsis "Python utility/library to sort python imports")
12681 (description "@code{python-isort} is a python utility/library to sort
12682imports alphabetically, and automatically separated into sections. It
12683provides a command line utility, a python library and plugins for various
12684editors.")
e2227b6a
EF
12685 (license license:expat)
12686 (properties `((python2-variant . ,(delay python2-isort))))))
44d10b1f
RW
12687
12688(define-public python2-isort
e2227b6a
EF
12689 (let ((base (package-with-python2
12690 (strip-python2-variant python-isort))))
12691 (package (inherit base)
12692 (native-inputs
12693 `(("python2-futures" ,python2-futures)
12694 ,@(package-native-inputs base))))))
44d10b1f
RW
12695
12696(define-public python2-backports-functools-lru-cache
12697 (package
12698 (name "python2-backports-functools-lru-cache")
12699 (version "1.5")
12700 (source
12701 (origin
12702 (method url-fetch)
12703 ;; only the pypi tarballs contain the necessary metadata
12704 (uri (pypi-uri "backports.functools_lru_cache" version))
12705 (sha256
12706 (base32
12707 "06jgv8gib4fhky0p5cmxdghvsgjyzcdgk48k8pxb1ccf11znk64x"))))
12708 (build-system python-build-system)
12709 (native-inputs
12710 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
12711 (arguments
12712 `(#:python ,python-2))
12713 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
12714 (synopsis "Backport of functools.lru_cache from Python 3.3")
12715 (description "@code{python2-backports-functools-lru-cache} is a backport
12716of @code{functools.lru_cache} from python 3.3.")
12717 (license license:expat)))
12718
12719(define-public python-configparser
12720 (package
12721 (name "python-configparser")
84127f8c 12722 (version "3.7.1")
44d10b1f
RW
12723 (source
12724 (origin
12725 (method url-fetch)
84127f8c 12726 (uri (pypi-uri "configparser" version))
44d10b1f
RW
12727 (sha256
12728 (base32
84127f8c 12729 "0cnz213il9lhgda6x70fw7mfqr8da43s3wm343lwzhqx94mgmmav"))))
44d10b1f 12730 (build-system python-build-system)
809f003f 12731 (home-page "https://github.com/jaraco/configparser/")
44d10b1f
RW
12732 (synopsis "Backport of configparser from python 3.5")
12733 (description "@code{python-configparser} is a backport of
12734@code{configparser} from Python 3.5 so that it can be used directly
12735in other versions.")
12736 (license license:expat)))
12737
12738(define-public python2-configparser
12739 (package-with-python2 python-configparser))
12740
12741(define-public python-mando
12742 (package
12743 (name "python-mando")
12744 (version "0.6.4")
12745 (source (origin
12746 (method url-fetch)
12747 (uri (pypi-uri "mando" version))
12748 (sha256
12749 (base32
12750 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
12751 (build-system python-build-system)
12752 (propagated-inputs
12753 `(("python-rst2ansi" ,python-rst2ansi)
12754 ("python-six" ,python-six)))
12755 (native-inputs
12756 `(("python-pytest" ,python-pytest)))
12757 (home-page "https://mando.readthedocs.org/")
12758 (synopsis
12759 "Wrapper around argparse, allowing creation of complete CLI applications")
12760 (description
12761 "This package is a wrapper around argparse, allowing you to write complete CLI
12762applications in seconds while maintaining all the flexibility.")
12763 (license license:expat)))
12764
12765(define-public python2-mando
12766 (package-with-python2 python-mando))
12767
70daf82f
RW
12768(define-public python2-argparse
12769 (package
12770 (name "python2-argparse")
12771 (version "1.4.0")
12772 (source
12773 (origin
12774 (method url-fetch)
12775 (uri (pypi-uri "argparse" version))
12776 (sha256
12777 (base32
12778 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
12779 (build-system python-build-system)
12780 (arguments
12781 `(#:python ,python-2))
12782 (home-page "https://github.com/ThomasWaldmann/argparse/")
12783 (synopsis "Python command-line parsing library")
12784 (description
12785 "This package is mostly for people who want to have @code{argparse} on
12786older Pythons because it was not part of the standard library back then.")
12787 (license license:psfl)))
12788
44d10b1f
RW
12789(define-public python-fudge
12790 (package
12791 (name "python-fudge")
12792 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
12793 ;; package, which is currently the only use of this package.
12794 (version "0.9.6")
12795 (source
12796 (origin
12797 (method url-fetch)
12798 (uri (pypi-uri "fudge" version))
12799 (sha256
12800 (base32
12801 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
12802 (build-system python-build-system)
12803 (arguments
12804 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
12805 (home-page "https://github.com/fudge-py/fudge")
12806 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
12807 (description
12808 "Fudge is a Python module for using fake objects (mocks and stubs) to
12809test real ones.
12810
12811In readable Python code, you declare the methods available on your fake object
12812and how they should be called. Then you inject that into your application and
12813start testing. This declarative approach means you don’t have to record and
12814playback actions and you don’t have to inspect your fakes after running code.
12815If the fake object was used incorrectly then you’ll see an informative
12816exception message with a traceback that points to the culprit.")
12817 (license license:expat)))
12818
12819(define-public python2-fudge
12820 (package-with-python2 python-fudge))
12821
12822(define-public python-mwclient
12823 (package
12824 (name "python-mwclient")
957c6833 12825 (version "0.10.0")
44d10b1f
RW
12826 (source
12827 (origin
957c6833 12828 (method git-fetch)
44d10b1f 12829 ;; The PyPI version wouldn't contain tests.
957c6833
EF
12830 (uri (git-reference
12831 (url "https://github.com/mwclient/mwclient")
12832 (commit (string-append "v" version))))
12833 (file-name (git-file-name name version))
44d10b1f
RW
12834 (sha256
12835 (base32
957c6833 12836 "1c3q6lwmb05yqywc4ya98ca7hsl15niili8rccl4n1yqp77c103v"))))
44d10b1f
RW
12837 (build-system python-build-system)
12838 (propagated-inputs
957c6833 12839 `(("python-requests-oauthlib" ,python-requests-oauthlib)
44d10b1f
RW
12840 ("python-six" ,python-six)))
12841 (native-inputs
12842 `(("python-mock" ,python-mock)
12843 ("python-pytest" ,python-pytest)
44d10b1f 12844 ("python-pytest-cov" ,python-pytest-cov)
957c6833 12845 ("python-pytest-runner" ,python-pytest-runner)
44d10b1f
RW
12846 ("python-responses" ,python-responses)))
12847 (home-page "https://github.com/btongminh/mwclient")
12848 (synopsis "MediaWiki API client")
12849 (description "This package provides a MediaWiki API client.")
12850 (license license:expat)))
12851
12852(define-public python2-mwclient
12853 (package-with-python2 python-mwclient))
12854
12855(define-public python-utils
12856 (package
12857 (name "python-utils")
12858 (version "2.1.0")
12859 (source (origin
12860 (method url-fetch)
12861 (uri (pypi-uri "python-utils" version))
12862 (sha256
12863 (base32
12864 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
12865 (build-system python-build-system)
12866 (native-inputs
12867 `(("pytest-runner" ,python-pytest-runner)
12868 ("pytest" ,python-pytest)
12869 ("six" ,python-six)))
12870 (home-page "https://github.com/WoLpH/python-utils")
12871 (synopsis "Convenient utilities not included with the standard Python install")
12872 (description
12873 "Python Utils is a collection of small Python functions and classes which
12874make common patterns shorter and easier.")
12875 (license license:bsd-2)))
12876
12877(define-public python2-utils
12878 (package-with-python2 python-utils))
12879
44d10b1f
RW
12880(define-public python-diff-match-patch
12881 (package
12882 (name "python-diff-match-patch")
12883 (version "20121119")
12884 (source
12885 (origin
12886 (method url-fetch)
12887 (uri (pypi-uri "diff-match-patch" version))
12888 (sha256
12889 (base32
12890 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
12891 (build-system python-build-system)
12892 (home-page "https://code.google.com/p/google-diff-match-patch")
12893 (synopsis "Synchronize plain text")
12894 (description "Diff Match and Patch libraries offer robust algorithms to
12895perform the operations required for synchronizing plain text.")
12896 (license license:asl2.0)))
12897
12898(define-public python2-diff-match-patch
12899 (package-with-python2 python-diff-match-patch))
12900
12901(define-public python-dirsync
12902 (package
12903 (name "python-dirsync")
12904 (version "2.2.3")
12905 (source
12906 (origin
12907 (method url-fetch)
12908 (uri (pypi-uri "dirsync" version))
12909 (sha256
12910 (base32
12911 "1r40fkanksagcszf1ag85mdr8w7rgc7196n6s1qlsk2abw6i7v0z"))))
12912 (build-system python-build-system)
12913 (propagated-inputs
12914 `(("six" ,python-six)))
12915 (home-page "https://bitbucket.org/tkhyn/dirsync")
12916 (synopsis "Advanced directory tree synchronisation tool")
12917 (description "Advanced directory tree synchronisation tool.")
12918 (license license:expat)))
12919
12920(define-public python2-dirsync
12921 (package-with-python2 python-dirsync))
12922
12923(define-public python-levenshtein
12924 (package
12925 (name "python-levenshtein")
12926 (version "0.12.0")
12927 (source
12928 (origin
12929 (method url-fetch)
12930 (uri (pypi-uri "python-Levenshtein" version))
12931 (sha256
12932 (base32
12933 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
12934 (build-system python-build-system)
12935 (home-page "https://github.com/ztane/python-Levenshtein")
12936 (synopsis "Fast computation of Levenshtein distance and string similarity")
12937 (description
12938 "The Levenshtein Python C extension module contains functions for fast computation of
12939@enumerate
12940@item Levenshtein (edit) distance, and edit operations
12941@item string similarity
12942@item approximate median strings, and generally string averaging
12943@item string sequence and set similarity
12944@end enumerate
12945It supports both normal and Unicode strings.")
12946 (license license:gpl2+)))
12947
12948(define-public python2-levenshtein
12949 (package-with-python2 python-levenshtein))
12950
12951(define-public python-scandir
12952 (package
12953 (name "python-scandir")
12954 (version "1.9.0")
12955 (source
12956 (origin
12957 (method url-fetch)
12958 (uri (pypi-uri "scandir" version))
12959 (sha256
12960 (base32 "0r3hvf1a9jm1rkqgx40gxkmccknkaiqjavs8lccgq9s8khh5x5s4"))))
12961 (build-system python-build-system)
12962 (arguments
12963 `(#:phases (modify-phases %standard-phases
12964 (replace 'check
12965 (lambda _
12966 (invoke "python" "test/run_tests.py"))))))
12967 (home-page "https://github.com/benhoyt/scandir")
12968 (synopsis "Directory iteration function")
12969 (description
12970 "Directory iteration function like os.listdir(), except that instead of
12971returning a list of bare filenames, it yields DirEntry objects that include
12972file type and stat information along with the name. Using scandir() increases
12973the speed of os.walk() by 2-20 times (depending on the platform and file
12974system) by avoiding unnecessary calls to os.stat() in most cases.
12975
12976This package is part of the Python standard library since version 3.5.")
12977 (license license:bsd-3)))
12978
12979(define-public python2-scandir
12980 (package-with-python2 python-scandir))
12981
12982(define-public python2-stemming
12983 (package
12984 (name "python2-stemming")
12985 (version "1.0.1")
12986 (source
12987 (origin
12988 (method url-fetch)
12989 (uri (pypi-uri "stemming" version))
12990 (sha256
12991 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
12992 (build-system python-build-system)
12993 (arguments
12994 `(#:python ,python-2))
12995 (home-page "https://bitbucket.org/mchaput/stemming/overview")
12996 (synopsis "Python implementations of various stemming algorithms")
12997 (description
12998 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
12999stemming algorithms for English. These implementations are straightforward and
13000efficient, unlike some Python versions of the same algorithms available on the
13001Web. This package is an extraction of the stemming code included in the Whoosh
13002search engine.")
13003 (license license:public-domain)))
13004
13005(define-public python-factory-boy
13006 (package
13007 (name "python-factory-boy")
13008 (version "2.8.1")
13009 (source
13010 (origin
13011 (method url-fetch)
13012 (uri (pypi-uri "factory_boy" version))
13013 (sha256
13014 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
13015 (build-system python-build-system)
13016 (arguments
13017 ;; Tests are not included in the tarball.
13018 `(#:tests? #f))
13019 (propagated-inputs
13020 `(("faker" ,python-faker)))
13021 (home-page "https://github.com/benhoyt/scandir")
13022 (synopsis "Versatile test fixtures replacement")
13023 (description
13024 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
13025
13026As a fixtures replacement tool, it aims to replace static, hard to maintain
13027fixtures with easy-to-use factories for complex object.
13028
13029Instead of building an exhaustive test setup with every possible combination
13030of corner cases, factory_boy allows you to use objects customized for the
13031current test, while only declaring the test-specific fields")
13032 (license license:expat)))
13033
13034(define-public python2-factory-boy
13035 (package-with-python2 python-factory-boy))
13036
13037(define-public python-translate-toolkit
13038 (package
13039 (name "python-translate-toolkit")
13040 (version "2.1.0")
13041 (source
13042 (origin
13043 (method url-fetch)
13044 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
13045 (sha256
13046 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
13047 (build-system python-build-system)
13048 (native-inputs
13049 `(("python-pytest" ,python-pytest)
13050 ("python-sphinx" ,python-sphinx)))
13051 (propagated-inputs
13052 `(("python-babel" ,python-babel)
13053 ("python-beautifulsoup4" ,python-beautifulsoup4)
13054 ("python-chardet" ,python-chardet)
13055 ("python-diff-match-patch" ,python-diff-match-patch)
13056 ("python-levenshtein" ,python-levenshtein)
13057 ("python-lxml" ,python-lxml)
13058 ("python-six" ,python-six)
13059 ("python-vobject" ,python-vobject)
13060 ("python-pyyaml" ,python-pyyaml)))
13061 (arguments
13062 ;; TODO: tests are not run, because they end with
13063 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
13064 ;; 'parse_funcs'
13065 ;; during test setup.
13066 `(#:tests? #f))
18919cf9 13067 (home-page "https://toolkit.translatehouse.org")
44d10b1f
RW
13068 (synopsis "Tools and API for translation and localization engineering")
13069 (description
13070 "Tools and API for translation and localization engineering. It contains
13071several utilities, as well as an API for building localization tools.")
13072 (license license:gpl2+)))
13073
13074(define-public python2-translate-toolkit
13075 (package-with-python2 python-translate-toolkit))
13076
13077(define-public python-packaging
13078 (package
13079 (name "python-packaging")
a72a1892 13080 (version "20.0")
44d10b1f
RW
13081 (source
13082 (origin
13083 (method url-fetch)
13084 (uri (pypi-uri "packaging" version))
20bf58bf
MB
13085 ;; XXX: The URL in the patch file is wrong, it should be
13086 ;; <https://github.com/pypa/packaging/pull/256>.
fdd0c369 13087 (patches (search-patches "python-packaging-test-arch.patch"))
44d10b1f
RW
13088 (sha256
13089 (base32
a72a1892 13090 "1y2ip3a4ykkpgnwgn85j6hkspcl0cg3mzms97f40mk57vwqq67gy"))))
44d10b1f
RW
13091 (build-system python-build-system)
13092 (arguments
13093 `(#:phases (modify-phases %standard-phases
13094 (replace 'check
13095 (lambda _ (invoke "py.test" "-vv"))))))
13096 (native-inputs
13097 `(("python-pretend" ,python-pretend)
13098 ("python-pytest" ,python-pytest)))
13099 (propagated-inputs
13100 `(("python-pyparsing" ,python-pyparsing)
13101 ("python-six" ,python-six)))
13102 (home-page "https://github.com/pypa/packaging")
13103 (synopsis "Core utilities for Python packages")
13104 (description "Packaging is a Python module for dealing with Python packages.
13105It offers an interface for working with package versions, names, and dependency
13106information.")
13107 ;; From 'LICENSE': This software is made available under the terms of
13108 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
13109 ;; Contributions to this software is made under the terms of *both* these
13110 ;; licenses.
13111 (license (list license:asl2.0 license:bsd-2))))
13112
13113(define-public python2-packaging
13114 (package-with-python2 python-packaging))
13115
13116(define-public python-relatorio
13117 (package
13118 (name "python-relatorio")
13119 (version "0.8.0")
13120 (source
13121 (origin
13122 (method url-fetch)
13123 (uri (pypi-uri "relatorio" version))
13124 (sha256
13125 (base32
13126 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
13127 (build-system python-build-system)
13128 (propagated-inputs
13129 `(("python-lxml" ,python-lxml)
13130 ("python-genshi" ,python-genshi)))
13131 (native-inputs
13132 `(("python-magic" ,python-magic)))
13133 (home-page "https://relatorio.tryton.org/")
13134 (synopsis "Templating library able to output ODT and PDF files")
13135 (description "Relatorio is a templating library which provides a way to
13136easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
13137for more filetypes can be easily added by creating plugins for them.")
13138 (license license:gpl3+)))
13139
13140(define-public python2-relatorio
13141 (package-with-python2 python-relatorio))
13142
13143(define-public python-radon
13144 (package
13145 (name "python-radon")
13146 (version "2.2.0")
13147 (source
13148 (origin
13149 (method url-fetch)
13150 (uri (pypi-uri "radon" version))
13151 (sha256
13152 (base32
13153 "07gq5hq4nrffxnlnksws9hrx7fd001gam63j62i82gyfr23gvdym"))))
13154 (build-system python-build-system)
13155 (arguments
13156 `(#:phases (modify-phases %standard-phases
13157 (replace 'check
13158 (lambda _
13159 (invoke "python" "radon/tests/run.py"))))))
13160 (propagated-inputs
13161 `(("python-colorama" ,python-colorama)
13162 ("python-flake8-polyfill" ,python-flake8-polyfill)
13163 ("python-mando" ,python-mando)))
13164 (native-inputs
13165 `(("python-pytest" ,python-pytest)
13166 ("python-pytest-mock" ,python-pytest-mock)))
13167 (home-page "https://radon.readthedocs.org/")
13168 (synopsis "Code Metrics in Python")
13169 (description "Radon is a Python tool which computes various code metrics.
13170Supported metrics are:
13171@itemize @bullet
13172@item raw metrics: SLOC, comment lines, blank lines, &c.
13173@item Cyclomatic Complexity (i.e. McCabe’s Complexity)
13174@item Halstead metrics (all of them)
13175@item the Maintainability Index (a Visual Studio metric)
13176@end itemize")
13177 (license license:expat)))
13178
13179(define-public python2-radon
13180 (package-with-python2 python-radon))
13181
13182(define-public python-sure
13183 (package
13184 (name "python-sure")
13185 (version "1.4.11")
13186 (source
13187 (origin
13188 (method url-fetch)
13189 (uri (pypi-uri "sure" version))
13190 (sha256
13191 (base32
13192 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
13193 (build-system python-build-system)
13194 (propagated-inputs
13195 `(("python-mock" ,python-mock)
13196 ("python-six" ,python-six)))
13197 (native-inputs
13198 `(("python-nose" ,python-nose)))
13199 (home-page "https://github.com/gabrielfalcao/sure")
13200 (synopsis "Automated testing library in python for python")
13201 (description
13202 "Sure is a python library that leverages a DSL for writing assertions.
13203Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
13204 (license license:gpl3+)))
13205
13206(define-public python2-sure
13207 (package-with-python2 python-sure))
13208
13209(define-public python2-couleur
13210 ;; This package does not seem to support python3 at all, hence,
13211 ;; only the python2 variant definition is provided.
13212 (package
13213 (name "python2-couleur")
13214 (version "0.6.2")
13215 (source
13216 (origin
13217 (method url-fetch)
13218 (uri (pypi-uri "couleur" version))
13219 (sha256
13220 (base32
13221 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
13222 (build-system python-build-system)
13223 (arguments
13224 `(#:python ,python-2))
13225 (home-page "https://github.com/gabrielfalcao/couleur")
13226 (synopsis
13227 "ANSI terminal tool for python, colored shell and other handy fancy features")
13228 (description
13229 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
13230terminal such as coloured output in the shell, overwriting output, indentation, etc.")
13231 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
13232 ;; https://github.com/gabrielfalcao/couleur/issues/11
13233 (license license:lgpl3+)))
13234
13235(define-public python-misaka
13236 (package
13237 (name "python-misaka")
0dcb3412 13238 (version "2.1.1")
44d10b1f
RW
13239 (source
13240 (origin
13241 (method url-fetch)
13242 (uri (pypi-uri "misaka" version))
13243 (sha256
13244 (base32
0dcb3412 13245 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
44d10b1f
RW
13246 (build-system python-build-system)
13247 (arguments
13248 `(;; Line 37 of setup.py calls self.run_command('develop')
13249 ;; in the 'check' phase. This command seems to be trying
13250 ;; to write to
13251 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
13252 ;; for which it does not have the permission to write.
13253 #:tests? #f))
13254 (propagated-inputs
13255 `(("python-cffi" ,python-cffi)))
13256 (home-page "https://github.com/FSX/misaka")
13257 (synopsis "Python binding for Hoedown")
13258 (description
13259 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
13260library written in C. It features a fast HTML renderer and functionality to make custom
13261renderers (e.g. man pages or LaTeX).")
13262 (license license:expat)))
13263
13264(define-public python2-misaka
13265 (package-with-python2 python-misaka))
13266
13267(define-public python2-steadymark
13268 ;; This is forced into being a python2 only variant
13269 ;; due to its dependence on couleur that has no support
13270 ;; for python3
13271 (package
13272 (name "python2-steadymark")
13273 (version "0.7.3")
13274 (source
13275 (origin
13276 (method url-fetch)
13277 (uri (pypi-uri "steadymark" version))
13278 (sha256
13279 (base32
13280 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
13281 (build-system python-build-system)
13282 (native-inputs
13283 `(("python-couleur" ,python2-couleur)
13284 ("python-sure" ,python2-sure)
13285 ("python-misaka" ,python2-misaka)))
13286 (arguments
13287 `(#:python ,python-2
13288 #:phases
13289 (modify-phases %standard-phases
13290 (add-before 'build 'patch-setup-py
13291 (lambda _
13292 ;; Update requirements from dependency==version
13293 ;; to dependency>=version
13294 (substitute* "setup.py"
13295 (("==") ">="))
13296 #t)))))
13297 (home-page "https://github.com/gabrielfalcao/steadymark")
13298 (synopsis "Markdown-based test runner for python")
13299 (description
13300 "@code{Steadymark} allows documentation to be written in github-flavoured
13301markdown. The documentation may contain snippets of code surrounded by python
13302code blocks and @code{Steadymark} will find these snippets and run them, making
13303sure that there are no old malfunctional examples in the documentation examples.")
13304 (license license:expat)))
13305
13306(define-public python-jsonpointer
13307 (package
13308 (name "python-jsonpointer")
13309 (version "1.10")
13310 (source
13311 (origin
13312 (method url-fetch)
13313 (uri (pypi-uri "jsonpointer" version))
13314 (sha256
13315 (base32
13316 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
13317 (build-system python-build-system)
13318 (home-page "https://github.com/stefankoegl/python-json-pointer")
13319 (synopsis "Identify specific nodes in a JSON document")
13320 (description "@code{jsonpointer} allows you to access specific nodes
13321by path in a JSON document (see RFC 6901).")
13322 (license license:bsd-3)))
13323
13324(define-public python2-jsonpointer
13325 (package-with-python2 python-jsonpointer))
13326
13327(define-public python-jsonpatch
13328 (package
13329 (name "python-jsonpatch")
13330 (version "1.16")
13331 (source
13332 (origin
854c5c95 13333 (method git-fetch)
44d10b1f 13334 ;; pypi version lacks tests.js
854c5c95
EF
13335 (uri (git-reference
13336 (url "https://github.com/stefankoegl/python-json-patch")
13337 (commit (string-append "v" version))))
13338 (file-name (git-file-name name version))
44d10b1f
RW
13339 (sha256
13340 (base32
854c5c95 13341 "0k9pff06lxama3nhsc7cdxbp83422bdy8ifs52i6xkas8hpyzfzr"))))
44d10b1f
RW
13342 (build-system python-build-system)
13343 (native-inputs
13344 `(("python-jsonpointer" ,python-jsonpointer)))
13345 (home-page "https://github.com/stefankoegl/python-json-patch")
13346 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
13347 (description "@code{jsonpatch} is a library and program that allows
13348applying JSON Patches according to RFC 6902.")
13349 (license license:bsd-3)))
13350
13351(define-public python2-jsonpatch
13352 (package-with-python2 python-jsonpatch))
13353
13354(define-public python-jsonpatch-0.4
13355 (package (inherit python-jsonpatch)
13356 (name "python-jsonpatch")
13357 (version "0.4")
13358 (source
13359 (origin
a9722d0d
EF
13360 (method git-fetch)
13361 (uri (git-reference
13362 (url "https://github.com/stefankoegl/python-json-patch")
13363 (commit (string-append "v" version))))
13364 (file-name (git-file-name name version))
44d10b1f
RW
13365 (sha256
13366 (base32
a9722d0d 13367 "1fq02y57kinyknxjcav0slcb0k9mwdffqw2hnlhdkpj7palh2mwk"))))))
44d10b1f
RW
13368
13369(define-public python2-jsonpatch-0.4
13370 (package-with-python2 python-jsonpatch-0.4))
13371
13372(define-public python-rfc3986
13373 (package
13374 (name "python-rfc3986")
13375 (version "1.1.0")
13376 (source (origin
13377 (method url-fetch)
13378 (uri (pypi-uri "rfc3986" version))
13379 (sha256
13380 (base32
13381 "06wlmysw83f75ff84zr1yr6n0shvc2xn1n1sb4iwzqap9hf5fn44"))))
13382 (build-system python-build-system)
13383 (arguments
13384 `(#:modules ((guix build utils)
13385 (guix build python-build-system)
13386 (ice-9 ftw)
13387 (srfi srfi-1)
13388 (srfi srfi-26))
13389 #:phases
13390 (modify-phases %standard-phases
13391 (replace 'check
13392 (lambda _
13393 (let ((cwd (getcwd)))
13394 (setenv "PYTHONPATH"
13395 (string-append cwd "/build/"
13396 (find (cut string-prefix? "lib" <>)
13397 (scandir (string-append cwd "/build")))
13398 ":"
13399 (getenv "PYTHONPATH")))
13400 (invoke "pytest" "-v")))))))
13401 (native-inputs
13402 `(("python-pytest" ,python-pytest)))
13403 (home-page "https://rfc3986.readthedocs.io/")
13404 (synopsis "Parse and validate URI references")
13405 (description
13406 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
13407validation and authority parsing. This module also supports RFC@tie{}6874
13408which adds support for zone identifiers to IPv6 addresses.")
13409 (license license:asl2.0)))
13410
13411(define-public python2-rfc3986
13412 (package-with-python2 python-rfc3986))
13413
13414(define-public python-rfc3987
13415 (package
13416 (name "python-rfc3987")
13417 (version "1.3.7")
13418 (source
13419 (origin
13420 (method url-fetch)
13421 (uri (pypi-uri "rfc3987" version))
13422 (sha256
13423 (base32
13424 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
13425 (build-system python-build-system)
13426 (home-page "https://pypi.python.org/pypi/rfc3987")
13427 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
13428 (description "@code{rfc3987} provides routines for parsing and
13429validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
13430 (license license:gpl3+)))
13431
13432(define-public python2-rfc3987
13433 (package-with-python2 python-rfc3987))
13434
13435(define-public python-validate-email
13436 (package
13437 (name "python-validate-email")
13438 (version "1.3")
13439 (source
13440 (origin
13441 (method url-fetch)
13442 (uri (pypi-uri "validate_email" version))
13443 (sha256
13444 (base32
13445 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
13446 (build-system python-build-system)
13447 (home-page "https://github.com/syrusakbary/validate_email")
13448 (synopsis "Verifies if an email address is valid and really exists")
13449 (description "@code{validate_email} can be used to verify if an email
13450address is valid and really exists.")
13451 (license license:lgpl3+)))
13452
13453(define-public python2-validate-email
13454 (package-with-python2 python-validate-email))
13455
13456(define-public python-flex
13457 (package
13458 (name "python-flex")
13459 (version "6.10.0")
13460 (source
13461 (origin
13462 (method url-fetch)
13463 (uri (pypi-uri "flex" version))
13464 (sha256
13465 (base32
13466 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
13467 (build-system python-build-system)
13468 (propagated-inputs
13469 `(("python-click" ,python-click)
13470 ("python-iso8601" ,python-iso8601)
13471 ("python-jsonpointer" ,python-jsonpointer)
13472 ("python-pyyaml" ,python-pyyaml)
13473 ("python-requests" ,python-requests)
13474 ("python-rfc3987" ,python-rfc3987)
13475 ("python-six" ,python-six)
13476 ("python-validate-email" ,python-validate-email)))
13477 (home-page "https://github.com/pipermerriam/flex")
13478 (synopsis "Validates Swagger schemata")
13479 (description "@code{flex} can be used to validate Swagger schemata.")
13480 (license license:bsd-3)))
13481
13482(define-public python2-flex
13483 (package-with-python2 python-flex))
13484
13485(define-public python-marshmallow
13486 (package
13487 (name "python-marshmallow")
13488 (version "3.0.0b14")
13489 (source
13490 (origin
13491 (method url-fetch)
13492 (uri (pypi-uri "marshmallow" version))
13493 (sha256
13494 (base32
13495 "1digk3f5cfk7wmlka65mc7bzsd96pbsgcsvp6pimd5b4ff9zb5p3"))))
13496 (build-system python-build-system)
13497 (propagated-inputs
13498 `(("python-dateutil" ,python-dateutil)
13499 ("python-simplejson" ,python-simplejson)))
13500 (native-inputs
13501 `(("python-pytest" ,python-pytest)
13502 ("python-pytz" ,python-pytz)))
13503 (home-page "https://github.com/marshmallow-code/marshmallow")
13504 (synopsis "Convert complex datatypes to and from native
13505Python datatypes.")
13506 (description "@code{marshmallow} provides a library for converting
13507complex datatypes to and from native Python datatypes.")
13508 (license license:expat)))
13509
13510(define-public python2-marshmallow
13511 (package-with-python2 python-marshmallow))
13512
13513(define-public python-apispec
13514 (package
13515 (name "python-apispec")
13516 (version "0.25.3")
13517 (source
13518 (origin
13519 (method url-fetch)
13520 (uri (pypi-uri "apispec" version))
13521 (sha256
13522 (base32
13523 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
13524 (build-system python-build-system)
13525 (propagated-inputs
13526 `(("python-pyyaml" ,python-pyyaml)))
13527 (native-inputs
13528 `(("python-pytest" ,python-pytest)
13529 ("python-flask" ,python-flask)
13530 ("python-marshmallow" ,python-marshmallow)
13531 ("python-tornado" ,python-tornado)
13532 ("python-bottle" ,python-bottle)
13533 ("python-mock" ,python-mock)))
13534 (home-page "https://github.com/marshmallow-code/apispec")
13535 (synopsis "Swagger 2.0 API specification generator")
13536 (description "@code{python-apispec} is a pluggable API specification
13537generator. Currently supports the OpenAPI specification (f.k.a.
13538Swagger 2.0).")
13539 (license license:expat)))
13540
13541(define-public python2-apispec
13542 (package-with-python2 python-apispec))
13543
13544(define-public python-flasgger
13545 (package
13546 (name "python-flasgger")
13547 (version "0.6.3")
13548 (source
13549 (origin
1a04d421
TGR
13550 (method git-fetch)
13551 (uri (git-reference
13552 (url "https://github.com/rochacbruno/flasgger.git")
13553 (commit version)))
13554 (file-name (git-file-name name version))
44d10b1f 13555 (sha256
1a04d421 13556 (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn"))))
44d10b1f
RW
13557 (build-system python-build-system)
13558 (arguments
13559 `(#:phases
13560 (modify-phases %standard-phases
13561 (replace 'check
13562 (lambda* (#:key inputs outputs #:allow-other-keys)
13563 (substitute* "Makefile"
13564 (("flake8 flasgger --ignore=F403")
13565 "flake8 flasgger --ignore=E731,F403"))
13566 (setenv "PYTHONPATH" (string-append (getcwd)
13567 ":"
13568 (getenv "PYTHONPATH")))
ac599a09 13569 (invoke "py.test"))))))
44d10b1f
RW
13570 (propagated-inputs
13571 `(("python-flask" ,python-flask)
13572 ("python-pyyaml" ,python-pyyaml)
13573 ("python-jsonschema" ,python-jsonschema)
13574 ("python-mistune" ,python-mistune)
13575 ("python-six" ,python-six)))
13576 (native-inputs
13577 `(("python-decorator" ,python-decorator)
13578 ("python-flake8" ,python-flake8)
13579 ("python-flask-restful" ,python-flask-restful)
13580 ("python-flex" ,python-flex)
13581 ("python-pytest" ,python-pytest)
13582 ("python-pytest-cov" ,python-pytest-cov)
13583 ("python-marshmallow" ,python-marshmallow)
13584 ("python-apispec" ,python-apispec)))
13585 (home-page "https://github.com/rochacbruno/flasgger/")
13586 (synopsis "Extract Swagger specs from your Flask project")
13587 (description "@code{python-flasgger} allows extracting Swagger specs
13588from your Flask project. It is a fork of Flask-Swagger.")
13589 (license license:expat)))
13590
13591(define-public python2-flasgger
13592 (package-with-python2 python-flasgger))
13593
13594(define-public python-swagger-spec-validator
13595 (package
13596 (name "python-swagger-spec-validator")
fe9c5b1d 13597 (version "2.4.3")
44d10b1f
RW
13598 (source
13599 (origin
13600 (method url-fetch)
13601 (uri (pypi-uri "swagger-spec-validator" version))
13602 (sha256
13603 (base32
fe9c5b1d 13604 "11g627icrsqwazsncwi0sdvprcj6hwaayw5xk3xsj8d97bmrzqjp"))))
44d10b1f
RW
13605 (build-system python-build-system)
13606 (propagated-inputs
13607 `(("python-jsonschema" ,python-jsonschema)
fe9c5b1d 13608 ("python-pyyaml" ,python-pyyaml)
44d10b1f
RW
13609 ("python-six" ,python-six)))
13610 (home-page
13611 "https://github.com/Yelp/swagger_spec_validator")
13612 (synopsis "Validation of Swagger specifications")
13613 (description "@code{swagger_spec_validator} provides a library for
13614validating Swagger API specifications.")
13615 (license license:asl2.0)))
13616
13617(define-public python2-swagger-spec-validator
13618 (package-with-python2 python-swagger-spec-validator))
13619
13620(define-public python-apache-libcloud
13621 (package
13622 (name "python-apache-libcloud")
13623 (version "2.4.0")
13624 (source
13625 (origin
13626 (method url-fetch)
13627 (uri (pypi-uri "apache-libcloud" version))
13628 (sha256
13629 (base32
13630 "0daj3mkzw79v5zin2r1s2wkrz1hplfc16bwj4ss68i5qjq4l2p0j"))))
13631 (build-system python-build-system)
13632 (arguments
13633 `(#:phases
13634 (modify-phases %standard-phases
13635 (add-after 'unpack 'patch-ssh
13636 (lambda* (#:key inputs #:allow-other-keys)
13637 (substitute* "libcloud/compute/ssh.py"
13638 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
13639 "/bin/ssh" "'")))
13640 #t))
13641 (add-after 'unpack 'patch-tests
13642 (lambda _
13643 (substitute* "./libcloud/test/test_file_fixtures.py"
13644 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
13645 (("def _ascii") "def _raw_data(self, method, url, body, headers):
13646 return (httplib.OK,
13647 \"1234abcd\",
13648 {\"test\": \"value\"},
13649 httplib.responses[httplib.OK])
13650 def _ascii"))
13651 (substitute* "libcloud/test/compute/test_ssh_client.py"
13652 (("class ShellOutSSHClientTests")
13653 "@unittest.skip(\"Guix container doesn't have ssh service\")
13654class ShellOutSSHClientTests")
13655 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
13656 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
13657 (("'.xF0', '.x90', '.x8D', '.x88'")
13658 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
13659 #t))
13660 (add-before 'check 'copy-secret
13661 (lambda _
13662 (copy-file "libcloud/test/secrets.py-dist"
13663 "libcloud/test/secrets.py")
13664 #t)))))
13665 (inputs
13666 `(("openssh" ,openssh)))
13667 (propagated-inputs
13668 `(("python-paramiko" ,python-paramiko)
13669 ("python-requests" ,python-requests)))
13670 (native-inputs
13671 `(("python-lockfile" ,python-lockfile)
13672 ("python-mock" ,python-mock)
13673 ("python-pytest" ,python-pytest)
13674 ("python-pytest-runner" ,python-pytest-runner)
13675 ("python-requests-mock" ,python-requests-mock)))
13676 (home-page "https://libcloud.apache.org/")
13677 (synopsis "Unified Cloud API")
13678 (description "@code{libcloud} is a Python library for interacting with
13679many of the popular cloud service providers using a unified API.")
13680 (license license:asl2.0)))
13681
13682(define-public python2-apache-libcloud
13683 (package-with-python2 python-apache-libcloud))
13684
13685(define-public python-smmap2
13686 (package
13687 (name "python-smmap2")
cd199a45 13688 (version "2.0.5")
44d10b1f
RW
13689 (source
13690 (origin
13691 (method url-fetch)
13692 (uri (pypi-uri "smmap2" version))
13693 (sha256
cd199a45 13694 (base32 "16k03pcnxd3lgzwgbd7nl4jwzm1wmahirvd09kljnzvy96hgza99"))))
44d10b1f
RW
13695 (build-system python-build-system)
13696 (native-inputs
13697 `(("python-nosexcover" ,python-nosexcover)))
13698 (home-page "https://github.com/Byron/smmap")
13699 (synopsis "Python sliding window memory map manager")
13700 (description "@code{smmap2} is a pure Python implementation of a sliding
13701window memory map manager.")
13702 (license license:bsd-3)))
13703
13704(define-public python2-smmap2
13705 (package-with-python2 python-smmap2))
13706
13707(define-public python-regex
13708 (package
13709 (name "python-regex")
c187c9d7 13710 (version "2019.04.14")
44d10b1f
RW
13711 (source (origin
13712 (method url-fetch)
13713 (uri (pypi-uri "regex" version))
13714 (sha256
13715 (base32
c187c9d7
BT
13716 "1a6hhfs6l6snr1z654ay6wzbmwdkmv282fzfkd5hk2d1n73y8v6m"))))
13717 ;; TODO: Fix and enable regex_test.py tests that complain about the
13718 ;; test.support module not existing.
44d10b1f
RW
13719 (build-system python-build-system)
13720 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
13721 (synopsis "Alternative regular expression module")
13722 (description "This regular expression implementation is backwards-
13723compatible with the standard @code{re} module, but offers additional
13724functionality like full case-folding for case-insensitive matches in Unicode.")
13725 (license license:psfl)))
13726
13727(define-public python2-regex
13728 (package-with-python2 python-regex))
13729
13730(define-public python2-pyopengl
13731 (package
13732 (name "python2-pyopengl")
13733 (version "3.1.0")
13734 (source
13735 (origin
13736 (method url-fetch)
13737 (uri (pypi-uri "PyOpenGL" version))
13738 (sha256
13739 (base32
13740 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
13741 (arguments
13742 `(#:python ,python-2))
13743 (build-system python-build-system)
13744 (home-page "http://pyopengl.sourceforge.net")
13745 (synopsis "Standard OpenGL bindings for Python")
13746 (description
13747 "PyOpenGL is the most common cross platform Python binding to OpenGL and
13748related APIs. The binding is created using the standard @code{ctypes}
13749library.")
13750 (license license:bsd-3)))
13751
13752(define-public python2-pyopengl-accelerate
13753 (package
13754 (inherit python2-pyopengl)
13755 (name "python2-pyopengl-accelerate")
13756 (version "3.1.0")
13757 (source
13758 (origin
13759 (method url-fetch)
13760 (uri (pypi-uri "PyOpenGL-accelerate" version))
13761 (sha256
13762 (base32
13763 "0464c1ifzk0k92lyndikmvzjgnx1y25r7bkkc8pnxm4kp1q4czwj"))))
13764 (synopsis "Acceleration code for PyOpenGL")
13765 (description
13766 "This is the Cython-coded accelerator module for PyOpenGL.")))
13767
13768(define-public python-rencode
13769 (package
13770 (name "python-rencode")
13771 (version "1.0.5")
13772 (source
13773 (origin
13774 (method url-fetch)
13775 (uri (pypi-uri "rencode" version))
13776 (sha256
13777 (base32
13778 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
13779 (build-system python-build-system)
13780 (arguments
13781 `(#:phases
13782 (modify-phases %standard-phases
13783 (add-before 'check 'delete-bogus-test
13784 ;; This test requires /home/aresch/Downloads, which is not provided by
13785 ;; the build environment.
13786 (lambda _
13787 (delete-file "rencode/t.py")
13788 #t)))))
13789 (native-inputs `(("pkg-config" ,pkg-config)
13790 ("python-cython" ,python-cython)))
13791 (home-page "https://github.com/aresch/rencode")
13792 (synopsis "Serialization of heterogeneous data structures")
13793 (description
13794 "The @code{rencode} module is a data structure serialization library,
13795similar to @code{bencode} from the BitTorrent project. For complex,
13796heterogeneous data structures with many small elements, r-encoding stake up
13797significantly less space than b-encodings. This version of rencode is a
13798complete rewrite in Cython to attempt to increase the performance over the
13799pure Python module.")
13800 (license license:bsd-3)))
13801
13802(define-public python2-rencode
13803 (package-with-python2 python-rencode))
13804
13805(define-public python-xenon
13806 (package
13807 (name "python-xenon")
13808 (version "0.5.4")
13809 (source
13810 (origin
13811 (method url-fetch)
13812 (uri (pypi-uri "xenon" version))
13813 (sha256
13814 (base32
13815 "029cbhysg2vr5n4jz8gpg2793f8wkwnqpr1qgv6c1dn685vy31mc"))))
13816 (build-system python-build-system)
13817 (native-inputs
13818 `(("python-pyyaml" ,python-pyyaml)
13819 ("python-radon" ,python-radon)
13820 ("python-requests" ,python-requests)
13821 ("python-flake8" ,python-flake8)
13822 ("python-tox" ,python-tox)))
13823 (arguments
13824 `(#:phases
13825 (modify-phases %standard-phases
13826 (add-before 'build 'patch-test-requirements
13827 (lambda _
13828 ;; Remove httpretty dependency for tests.
13829 (substitute* "setup.py"
13830 (("httpretty") ""))
13831 #t)))))
13832 (home-page "https://xenon.readthedocs.org/")
13833 (synopsis "Monitor code metrics for Python on your CI server")
13834 (description
13835 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
13836Ideally, @code{xenon} is run every time code is committed. Through command
13837line options, various thresholds can be set for the complexity of code. It
13838will fail (i.e. it will exit with a non-zero exit code) when any of these
13839requirements is not met.")
13840 (license license:expat)))
13841
13842(define-public python2-xenon
13843 (package-with-python2 python-xenon))
13844
13845(define-public python-pysocks
13846 (package
13847 (name "python-pysocks")
b8725cdf 13848 (version "1.7.0")
44d10b1f
RW
13849 (source
13850 (origin
13851 (method url-fetch)
13852 (uri (pypi-uri "PySocks" version))
13853 (sha256
13854 (base32
b8725cdf 13855 "0z4p31bpqm893cf87qqgb30k7nwd8kqfjwwjm5cvxb6zbyj1w0yr"))))
44d10b1f
RW
13856 (build-system python-build-system)
13857 (arguments `(#:tests? #f))
13858 (home-page "https://github.com/Anorov/PySocks")
13859 (synopsis "SOCKS client module")
13860 (description "@code{pysocks} is an updated and semi-actively maintained
13861version of @code{SocksiPy} with bug fixes and extra features.")
13862 (license license:bsd-3)))
13863
13864(define-public python2-pysocks
13865 (package-with-python2 python-pysocks))
13866
13867(define-public python-pydiff
13868 (package
13869 (name "python-pydiff")
13870 (version "0.2")
13871 (source
13872 (origin
13873 (method url-fetch)
13874 (uri (pypi-uri "pydiff" version))
13875 (sha256
13876 (base32
13877 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
13878 (build-system python-build-system)
13879 (home-page "https://github.com/myint/pydiff")
13880 (synopsis "Library to diff two Python files at the bytecode level")
13881 (description
13882 "@code{pydiff} makes it easy to look for actual code changes while
13883ignoring formatting changes.")
13884 (license license:expat)))
13885
13886(define-public python2-pydiff
13887 (package-with-python2 python-pydiff))
13888
13889(define-public python-tqdm
13890 (package
13891 (name "python-tqdm")
13892 (version "4.19.6")
13893 (source
13894 (origin
13895 (method url-fetch)
13896 (uri (pypi-uri "tqdm" version))
13897 (sha256
13898 (base32
13899 "1pw0ngm0zn9papdmkwipi3yih5c3di6d0w849bdmrraq4d2d9h2y"))))
13900 (build-system python-build-system)
13901 (native-inputs
13902 `(("python-flake8" ,python-flake8)
13903 ("python-nose" ,python-nose)
13904 ("python-coverage" ,python-coverage)))
13905 (home-page "https://github.com/tqdm/tqdm")
13906 (synopsis "Fast, extensible progress meter")
13907 (description
13908 "Make loops show a progress bar on the console by just wrapping any
13909iterable with @code{|tqdm(iterable)|}. Offers many options to define
13910design and layout.")
f875d76f
PL
13911 (license (list license:mpl2.0 license:expat))
13912 (properties `((python2-variant . ,(delay python2-tqdm))))))
44d10b1f
RW
13913
13914(define-public python2-tqdm
f875d76f
PL
13915 (let ((tqdm (package-with-python2
13916 (strip-python2-variant python-tqdm))))
13917 (package (inherit tqdm)
13918 (native-inputs `(("python2-functools32" ,python2-functools32)
13919 ,@(package-native-inputs tqdm))))))
44d10b1f
RW
13920
13921(define-public python-pkginfo
13922 (package
13923 (name "python-pkginfo")
13924 (version "1.4.2")
13925 (source
13926 (origin
13927 (method url-fetch)
13928 (uri (pypi-uri "pkginfo" version))
13929 (sha256
13930 (base32
13931 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
13932 (build-system python-build-system)
13933 (arguments
13934 ;; The tests are broken upstream.
13935 '(#:tests? #f))
13936 (home-page
13937 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
13938 (synopsis
13939 "Query metadatdata from sdists, bdists, and installed packages")
13940 (description
13941 "API to query the distutils metadata written in @file{PKG-INFO} inside a
13942source distriubtion (an sdist) or a binary distribution (e.g., created by
13943running bdist_egg). It can also query the EGG-INFO directory of an installed
13944distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
13945created by running @code{python setup.py develop}).")
13946 (license license:expat)))
13947
13948(define-public python2-pkginfo
13949 (package-with-python2 python-pkginfo))
13950
13951(define-public python-twine
13952 (package
13953 (name "python-twine")
13954 (version "1.9.1")
13955 (source
13956 (origin
13957 (method url-fetch)
13958 (uri (pypi-uri "twine" version))
13959 (sha256
13960 (base32
13961 "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a"))))
13962 (build-system python-build-system)
13963 (propagated-inputs
13964 `(("python-tqdm" ,python-tqdm)
13965 ("python-pkginfo" ,python-pkginfo)
13966 ("python-requests" ,python-requests)
13967 ("python-requests-toolbelt" ,python-requests-toolbelt)))
13968 (home-page "https://github.com/pypa/twine")
13969 (synopsis "Collection of utilities for interacting with PyPI")
13970 (description
13971 "@code{twine} currently supports registering projects and uploading
13972distributions. It authenticates the user over HTTPS, allows them to pre-sign
13973their files and supports any packaging format (including wheels).")
13974 (license license:asl2.0)))
13975
13976(define-public python2-twine
13977 (package-with-python2 python-twine))
13978
13979(define-public python-linecache2
13980 (package
13981 (name "python-linecache2")
13982 (version "1.0.0")
13983 (source
13984 (origin
13985 (method url-fetch)
13986 (uri (pypi-uri "linecache2" version))
13987 (sha256
13988 (base32
13989 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
13990 (build-system python-build-system)
13991 (arguments
13992 `(;; The tests depend on unittest2, and our version is a bit too old.
13993 #:tests? #f))
13994 (native-inputs
13995 `(("python-pbr" ,python-pbr-minimal)))
13996 (home-page
13997 "https://github.com/testing-cabal/linecache2")
13998 (synopsis "Backports of the linecache module")
13999 (description
14000 "The linecache module allows one to get any line from any file, while
14001attempting to optimize internally, using a cache, the common case where many
14002lines are read from a single file.")
14003 (license license:psfl)))
14004
14005(define-public python2-linecache2
14006 (package-with-python2 python-linecache2))
14007
14008(define-public python-traceback2
14009 (package
14010 (name "python-traceback2")
14011 (version "1.4.0")
14012 (source
14013 (origin
14014 (method url-fetch)
14015 (uri (pypi-uri "traceback2" version))
14016 (sha256
14017 (base32
14018 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
14019 (build-system python-build-system)
14020 (arguments
14021 `(;; python-traceback2 and python-unittest2 depend on one another.
14022 #:tests? #f))
14023 (native-inputs
14024 `(("python-pbr" ,python-pbr-minimal)))
14025 (propagated-inputs
14026 `(("python-linecache2" ,python-linecache2)))
14027 (home-page
14028 "https://github.com/testing-cabal/traceback2")
14029 (synopsis "Backports of the traceback module")
14030 (description
14031 "This module provides a standard interface to extract, format and print
14032stack traces of Python programs. It exactly mimics the behavior of the Python
14033interpreter when it prints a stack trace.")
14034 (license license:psfl)))
14035
14036(define-public python2-traceback2
14037 (package-with-python2 python-traceback2))
14038
14039(define-public python-ratelimiter
14040 (package
14041 (name "python-ratelimiter")
14042 (version "1.2.0")
14043 (source
14044 (origin
14045 (method url-fetch)
14046 (uri (pypi-uri "ratelimiter" version))
14047 (sha256
14048 (base32
14049 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
14050 (build-system python-build-system)
14051 (arguments
14052 '(#:tests? #f)) ; There are no tests in the pypi archive.
14053 (home-page "https://github.com/RazerM/ratelimiter")
14054 (synopsis "Simple rate limiting object")
14055 (description
14056 "The @code{ratelimiter} module ensures that an operation will not be
14057executed more than a given number of times during a given period.")
14058 (license license:asl2.0)))
14059
14060(define-public python2-ratelimiter
14061 (package-with-python2 python-ratelimiter))
14062
14063(define-public python-dukpy
14064 (package
14065 (name "python-dukpy")
14066 (version "0.3")
14067 (source
14068 (origin
5b77ebe1
TGR
14069 (method git-fetch)
14070 (uri (git-reference
14071 (url "https://github.com/kovidgoyal/dukpy.git")
14072 (commit (string-append "v" version))))
14073 (file-name (git-file-name name version))
44d10b1f 14074 (sha256
5b77ebe1 14075 (base32 "13h21nqzasv4zj32xs61brmc106pr2cx243672crcmwxxnjgaxls"))))
44d10b1f
RW
14076 (build-system python-build-system)
14077 (home-page "https://github.com/kovidgoyal/dukpy")
14078 (synopsis "Run JavaScript in python")
14079 (description
14080 "dukpy is a JavaScript runtime environment for Python using the duktape
14081embeddable JavaScript engine.")
14082 ;; Dukpy is licensed under MIT like the embedded duktape library,
14083 ;; with 'errors.c' as GPL3.
14084 (license (list license:expat license:gpl3))))
14085
14086(define-public python2-dukpy
14087 (package-with-python2 python-dukpy))
14088
14089(define-public python-jsonrpclib-pelix
14090 (package
14091 (name "python-jsonrpclib-pelix")
14092 (version "0.3.2")
14093 (source
14094 (origin
14095 (method url-fetch)
14096 (uri (pypi-uri "jsonrpclib-pelix" version))
14097 (sha256
14098 (base32
14099 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
14100 (build-system python-build-system)
14101 (arguments
14102 `(#:tests? #f)) ; no tests in PyPI tarball
14103 (home-page "https://github.com/tcalmant/jsonrpclib/")
14104 (synopsis "JSON-RPC 2.0 client library for Python")
14105 (description
14106 "This library implements the JSON-RPC v2.0
14107specification (backwards-compatible) as a client library for Python. This
14108version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
14109services.")
14110 (license license:asl2.0)))
14111
14112(define-public python2-jsonrpclib-pelix
14113 (package-with-python2 python-jsonrpclib-pelix))
14114
14115(define-public python-setuptools-scm-git-archive
14116 (package
14117 (name "python-setuptools-scm-git-archive")
14118 (version "1.0")
14119 (source
14120 (origin
14121 (method url-fetch)
14122 (uri (pypi-uri "setuptools_scm_git_archive" version))
14123 (sha256
14124 (base32
14125 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
14126 (build-system python-build-system)
14127 (native-inputs
14128 `(("python-pytest" ,python-pytest)))
14129 (propagated-inputs
14130 `(("python-setuptools-scm" ,python-setuptools-scm)))
14131 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
14132 (synopsis "Setuptools_scm plugin for git archives")
14133 (description
14134 "The setuptools_scm_git_archive package is a plugin to
14135setuptools_scm, which supports obtaining versions from git archives that
14136belong to tagged versions.")
14137 (license license:expat)))
14138
14139(define-public python2-setuptools-scm-git-archive
14140 (package-with-python2 python-setuptools-scm-git-archive))
14141
724a350c
RW
14142(define-public python-setuptools-git
14143 (package
14144 (name "python-setuptools-git")
14145 (version "1.2")
14146 (source
14147 (origin
14148 (method url-fetch)
14149 (uri (pypi-uri "setuptools-git" version))
14150 (sha256
14151 (base32
14152 "0i84qjwp5m0l9qagdjww2frdh63r37km1c48mrvbmaqsl1ni6r7z"))))
14153 (build-system python-build-system)
14154 (arguments
14155 `(#:phases
14156 (modify-phases %standard-phases
14157 ;; This is needed for tests.
14158 (add-after 'unpack 'configure-git
14159 (lambda _
14160 (setenv "HOME" "/tmp")
14161 (invoke "git" "config" "--global" "user.email" "guix")
14162 (invoke "git" "config" "--global" "user.name" "guix")
14163 #t)))))
14164 (native-inputs
14165 `(("git" ,git-minimal)))
14166 (home-page "https://github.com/msabramo/setuptools-git")
14167 (synopsis "Setuptools revision control system plugin for Git")
14168 (description
14169 "This package provides a plugin for Setuptools for revision control with
14170Git.")
14171 (license license:bsd-3)))
14172
44d10b1f
RW
14173(define-public python-pyclipper
14174 (package
14175 (name "python-pyclipper")
ff3d1b99 14176 (version "1.1.0.post3")
44d10b1f
RW
14177 (source
14178 (origin
14179 (method url-fetch)
14180 (uri (pypi-uri "pyclipper" version ".zip"))
14181 (sha256
ff3d1b99 14182 (base32 "164yksvqwqvwzh8f8lq92asg87hd8rvcy2xb5vm4y4ccvd5xgb7i"))
44d10b1f
RW
14183 (modules '((guix build utils)))
14184 (snippet
14185 '(begin
14186 ;; This file is generated by Cython.
14187 (delete-file "pyclipper/pyclipper.cpp") #t))))
14188 (build-system python-build-system)
14189 (arguments
14190 `(#:phases
14191 (modify-phases %standard-phases
14192 (add-before 'build 'cythonize-sources
14193 (lambda _
14194 (with-directory-excursion "pyclipper"
14195 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
14196 (propagated-inputs
14197 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
14198 (native-inputs
14199 `(("python-cython" ,python-cython)
14200 ("python-pytest" ,python-pytest)
14201 ("python-pytest-runner" ,python-pytest-runner)
14202 ("python-unittest2" ,python-unittest2)
14203 ("unzip" ,unzip)))
14204 (home-page "https://github.com/greginvm/pyclipper")
14205 (synopsis "Wrapper for Angus Johnson's Clipper library")
14206 (description
14207 "Pyclipper is a Cython wrapper for the C++ translation of the
14208Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
14209 (license license:expat)))
14210
14211(define-public python2-pyclipper
14212 (package-with-python2 python-pyclipper))
14213
14214(define-public python2-booleanoperations
14215 (package
14216 (name "python2-booleanoperations")
14217 (version "0.7.1")
14218 (source
14219 (origin
14220 (method url-fetch)
14221 (uri (pypi-uri "booleanOperations" version ".zip"))
14222 (sha256
14223 (base32
14224 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
14225 (build-system python-build-system)
14226 (arguments
14227 `(#:python ,python-2))
14228 (native-inputs
14229 `(("unzip" ,unzip)
14230 ("python2-pytest" ,python2-pytest)
14231 ("python2-pytest-runner" ,python2-pytest-runner)))
14232 (propagated-inputs
14233 `(("python-fonttools" ,python2-fonttools)
14234 ("python-pyclipper" ,python2-pyclipper)
14235 ("python-ufolib" ,python2-ufolib)))
14236 (home-page "https://github.com/typemytype/booleanOperations")
14237 (synopsis "Boolean operations on paths")
14238 (description
14239 "BooleanOperations provides a Python library that enables
14240boolean operations on paths.")
14241 (license license:expat)))
14242
14243(define-public python-tempdir
14244 (package
14245 (name "python-tempdir")
14246 (version "0.7.1")
14247 (source
14248 (origin
14249 (method url-fetch)
14250 (uri (pypi-uri "tempdir" version))
14251 (sha256
14252 (base32
14253 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
14254 (build-system python-build-system)
14255 (home-page "https://pypi.org/project/tempdir/")
14256 (arguments
14257 ;; the package has no tests
14258 '(#:tests? #f))
14259 (synopsis "Python library for managing temporary directories")
14260 (description
14261 "This library manages temporary directories that are automatically
14262deleted with all their contents when they are no longer needed. It is
14263particularly convenient for use in tests.")
14264 (license license:expat)))
14265
14266(define-public python2-tempdir
14267 (package-with-python2 python-tempdir))
14268
14269(define-public python-activepapers
14270 (package
14271 (name "python-activepapers")
14272 (version "0.2.2")
14273 (source
14274 (origin
14275 (method url-fetch)
14276 (uri (pypi-uri "ActivePapers.Py" version))
14277 (sha256
14278 (base32
14279 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
14280 (build-system python-build-system)
14281 (arguments
14282 `(#:modules ((ice-9 ftw)
14283 (srfi srfi-1)
14284 (guix build utils)
14285 (guix build python-build-system))
14286
14287 #:phases
14288 (modify-phases %standard-phases
14289 (add-after 'unpack 'delete-python2-code
14290 (lambda _
14291 (for-each delete-file
14292 '("lib/activepapers/builtins2.py"
14293 "lib/activepapers/standardlib2.py"
14294 "lib/activepapers/utility2.py"))))
14295 (replace 'check
14296 (lambda _
14297 ;; Deactivate the test cases that download files
14298 (setenv "NO_NETWORK_ACCESS" "1")
14299 ;; For some strange reason, some tests fail if nosetests runs all
14300 ;; test modules in a single execution. They pass if each test
14301 ;; module is run individually.
14302 (for-each (lambda (filename)
14303 (invoke "nosetests"
14304 (string-append "tests/" filename)))
14305 (scandir "tests"
14306 (lambda (filename)
14307 (string-suffix? ".py" filename)))))))))
14308 (native-inputs
14309 `(("python-tempdir" ,python-tempdir)
14310 ("python-nose" ,python-nose)))
14311 (propagated-inputs
14312 `(("python-h5py" ,python-h5py)))
14313 (home-page "http://www.activepapers.org/")
14314 (synopsis "Executable papers for scientific computing")
14315 (description
14316 "ActivePapers is a tool for working with executable papers, which
14317combine data, code, and documentation in single-file packages,
14318suitable for publication as supplementary material or on repositories
14319such as figshare or Zenodo.")
14320 (properties `((python2-variant . ,(delay python2-activepapers))))
14321 (license license:bsd-3)))
14322
14323(define-public python2-activepapers
14324 (let ((base (package-with-python2
14325 (strip-python2-variant python-activepapers))))
14326 (package
14327 (inherit base)
14328 (arguments
14329 (substitute-keyword-arguments (package-arguments base)
14330 ((#:phases phases)
14331 `(modify-phases ,phases
14332 (delete 'delete-python2-code)
14333 (add-after 'unpack 'delete-python3-code
14334 (lambda _
14335 (for-each delete-file
14336 '("lib/activepapers/builtins3.py"
14337 "lib/activepapers/standardlib3.py"
14338 "lib/activepapers/utility3.py")))))))))))
14339
14340(define-public python-semver
14341 (package
14342 (name "python-semver")
594280b1 14343 (version "2.9.0")
44d10b1f 14344 (source
2ecbba24
BG
14345 (origin
14346 (method url-fetch)
14347 (uri (pypi-uri "semver" version))
14348 (sha256
14349 (base32
14350 "183kg1rhzz3hqizvphkd8hlbf1zxfx8737zhfkmqzxi71jmdw7pd"))))
44d10b1f 14351 (build-system python-build-system)
44d10b1f
RW
14352 (native-inputs
14353 `(("python-tox" ,python-tox)
14354 ("python-virtualenv" ,python-virtualenv)))
14355 (home-page "https://github.com/k-bx/python-semver")
14356 (synopsis "Python helper for Semantic Versioning")
14357 (description "This package provides a Python library for
14358@url{Semantic Versioning, http://semver.org/}.")
14359 (license license:bsd-3)))
14360
14361(define-public python2-semver
14362 (package-with-python2 python-semver))
14363
14364(define-public python-pyro4
14365 (package
14366 (name "python-pyro4")
3ce91d44 14367 (version "4.77")
44d10b1f
RW
14368 (source
14369 (origin
14370 (method url-fetch)
14371 (uri (pypi-uri "Pyro4" version))
14372 (sha256
3ce91d44 14373 (base32 "0gsjg869y4gpy265s1gj1f2qy6jn5iz8r2bwwnq78r1r5yi15zib"))))
44d10b1f 14374 (build-system python-build-system)
3ce91d44
GL
14375 (arguments
14376 '(#:tests? #f)) ;FIXME: Some tests require network access.
14377 (native-inputs
14378 `(("python-cloudpickle" ,python-cloudpickle)
14379 ("python-dill" ,python-dill)
14380 ("python-msgpack" ,python-msgpack)))
44d10b1f
RW
14381 (propagated-inputs
14382 `(("python-serpent" ,python-serpent)))
14383 (home-page "https://pyro4.readthedocs.io")
14384 (synopsis "Distributed object middleware for Python")
14385 (description
14386 "Pyro enables you to build applications in which objects can talk to each
14387other over the network. You can just use normal Python method calls to call
14388objects on other machines, also known as remote procedure calls (RPC).")
14389 (license license:expat)))
14390
14391(define-public python2-pyro
14392 (package
14393 (name "python2-pyro")
14394 (version "3.16")
14395 (source
14396 (origin
14397 (method url-fetch)
14398 (uri (pypi-uri "Pyro" version))
14399 (file-name (string-append "Pyro-" version ".tar.gz"))
14400 (sha256
14401 (base32
14402 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
14403 (build-system python-build-system)
14404 (arguments
14405 ;; Pyro is not compatible with Python 3
14406 `(#:python ,python-2
14407 ;; Pyro has no test cases for automatic execution
14408 #:tests? #f))
14409 (home-page "http://pythonhosted.org/Pyro/")
14410 (synopsis "Distributed object manager for Python")
14411 (description "Pyro is a Distributed Object Technology system
14412written in Python that is designed to be easy to use. It resembles
14413Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
14414which is a system and language independent Distributed Object Technology
14415and has much more to offer than Pyro or RMI. Pyro 3.x is no
14416longer maintained. New projects should use Pyro4 instead, which
14417is the new Pyro version that is actively developed.")
14418 (license license:expat)))
14419
14420(define-public python2-scientific
14421 (package
14422 (name "python2-scientific")
14423 (version "2.9.4")
14424 (source
14425 (origin
c695f011
KH
14426 (method git-fetch)
14427 (uri (git-reference
14428 (url "https://github.com/khinsen/ScientificPython")
14429 (commit (string-append "rel" version))))
14430 (file-name (git-file-name name version))
44d10b1f
RW
14431 (sha256
14432 (base32
c695f011 14433 "16l48aj9fps9r7jyk8gpxppwrv0fqvlc13sayxskz28r5s6sjwbl"))))
44d10b1f
RW
14434 (build-system python-build-system)
14435 (inputs
14436 `(("netcdf" ,netcdf)))
14437 (propagated-inputs
14438 `(("python-numpy" ,python2-numpy-1.8)
14439 ("python-pyro" ,python2-pyro)))
14440 (arguments
14441 ;; ScientificPython is not compatible with Python 3
14442 `(#:python ,python-2
14443 #:tests? #f ; No test suite
14444 #:phases
14445 (modify-phases %standard-phases
14446 (replace 'build
14447 (lambda* (#:key inputs #:allow-other-keys)
77e61e25
RW
14448 (invoke "python" "setup.py" "build"
14449 (string-append "--netcdf_prefix="
14450 (assoc-ref inputs "netcdf"))))))))
c695f011 14451 (home-page "http://dirac.cnrs-orleans.fr/ScientificPython")
44d10b1f
RW
14452 (synopsis "Python modules for scientific computing")
14453 (description "ScientificPython is a collection of Python modules that are
14454useful for scientific computing. Most modules are rather general (Geometry,
14455physical units, automatic derivatives, ...) whereas others are more
14456domain-specific (e.g. netCDF and PDB support). The library is currently
14457not actively maintained and works only with Python 2 and NumPy < 1.9.")
14458 (license license:cecill-c)))
14459
14460(define-public python2-mmtk
14461 (package
14462 (name "python2-mmtk")
fe9b72c5 14463 (version "2.7.12")
44d10b1f
RW
14464 (source
14465 (origin
fe9b72c5
KH
14466 (method git-fetch)
14467 (uri (git-reference
14468 (url "https://github.com/khinsen/MMTK")
14469 (commit (string-append "rel" version))))
14470 (file-name (git-file-name name version))
44d10b1f
RW
14471 (sha256
14472 (base32
fe9b72c5 14473 "1fqwh3ba9jd42nigvn5shndgwb1zy7kh9520ncvqci7n8ffjr6p1"))))
44d10b1f
RW
14474 (build-system python-build-system)
14475 (native-inputs
14476 `(("netcdf" ,netcdf)))
14477 (propagated-inputs
14478 `(("python-scientific" ,python2-scientific)
14479 ("python-tkinter" ,python-2 "tk")))
14480 (arguments
14481 `(#:python ,python-2
14482 #:tests? #f
14483 #:phases
14484 (modify-phases %standard-phases
14485 (add-before 'build 'includes-from-scientific
14486 (lambda* (#:key inputs #:allow-other-keys)
14487 (mkdir-p "Include/Scientific")
14488 (copy-recursively
14489 (string-append
14490 (assoc-ref inputs "python-scientific")
14491 "/include/python2.7/Scientific")
14492 "Include/Scientific"))))))
14493 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
14494 (synopsis "Python library for molecular simulation")
14495 (description "MMTK is a library for molecular simulations with an emphasis
14496on biomolecules. It provides widely used methods such as Molecular Dynamics
14497and normal mode analysis, but also basic routines for implementing new methods
14498for simulation and analysis. The library is currently not actively maintained
14499and works only with Python 2 and NumPy < 1.9.")
14500 (license license:cecill-c)))
14501
14502(define-public python-phonenumbers
14503 (package
14504 (name "python-phonenumbers")
14505 (version "8.9.1")
14506 (source
14507 (origin
14508 (method url-fetch)
14509 (uri (pypi-uri "phonenumbers" version))
14510 (sha256
14511 (base32
14512 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
14513 (build-system python-build-system)
14514 (home-page
14515 "https://github.com/daviddrysdale/python-phonenumbers")
14516 (synopsis
14517 "Python library for dealing with international phone numbers")
14518 (description
14519 "This package provides a Python port of Google's libphonenumber library.")
14520 (license license:asl2.0)))
14521
14522(define-public python2-phonenumbers
14523 (package-with-python2 python-phonenumbers))
14524
14525(define-public python-send2trash
14526 (package
14527 (name "python-send2trash")
d9b0216b 14528 (version "1.5.0")
44d10b1f 14529 (source
d9b0216b 14530 (origin (method git-fetch)
44d10b1f 14531 ;; Source tarball on PyPI doesn't include tests.
d9b0216b
RW
14532 (uri (git-reference
14533 (url "https://github.com/hsoft/send2trash.git")
14534 (commit version)))
14535 (file-name (git-file-name name version))
44d10b1f
RW
14536 (sha256
14537 (base32
d9b0216b 14538 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
44d10b1f
RW
14539 (build-system python-build-system)
14540 (arguments
14541 '(#:phases
14542 (modify-phases %standard-phases
14543 (add-before 'check 'pre-check
14544 (lambda _
14545 (mkdir-p "/tmp/foo")
14546 (setenv "HOME" "/tmp/foo")
14547 #t)))))
14548 (home-page "https://github.com/hsoft/send2trash")
14549 (synopsis "Send files to the user's @file{~/Trash} directory")
14550 (description "This package provides a Python library to send files to the
14551user's @file{~/Trash} directory.")
20b3fde7 14552 (properties `((python2-variant . ,(delay python2-send2trash))))
44d10b1f
RW
14553 (license license:bsd-3)))
14554
14555(define-public python2-send2trash
14556 (package
f32164ab 14557 (inherit (package-with-python2 (strip-python2-variant python-send2trash)))
44d10b1f
RW
14558 (arguments
14559 (substitute-keyword-arguments (package-arguments python-send2trash)
14560 ((#:phases phases)
14561 `(modify-phases ,phases
14562 (add-before 'check 'setenv
14563 (lambda _
14564 (setenv "PYTHONPATH"
14565 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
4782a06f 14566 #t))))))))
44d10b1f
RW
14567
14568(define-public python-yapf
14569 (package
14570 (name "python-yapf")
19ba75dc 14571 (version "0.29.0")
44d10b1f
RW
14572 (source
14573 (origin
14574 (method url-fetch)
14575 (uri (pypi-uri "yapf" version))
14576 (sha256
14577 (base32
19ba75dc 14578 "1pj3xzblmbssshi889b6n9hwqbjpabw6j0fimlng2sshd3226bki"))))
44d10b1f
RW
14579 (build-system python-build-system)
14580 (home-page "https://github.com/google/yapf")
14581 (synopsis "Formatter for Python code")
14582 (description "YAPF is a formatter for Python code. It's based off of
14583@dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
14584takes the code and reformats it to the best formatting that conforms to the
14585style guide, even if the original code didn't violate the style guide.")
14586 (license license:asl2.0)))
14587
14588(define-public python2-yapf
14589 (package-with-python2 python-yapf))
14590
14591(define-public python-gyp
14592 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
14593 (revision "0"))
14594 (package
14595 (name "python-gyp")
14596 ;; Google does not release versions,
14597 ;; based on second most recent commit date.
14598 (version (git-version "0.0.0" revision commit))
14599 (source
14600 (origin
14601 ;; Google does not release tarballs,
14602 ;; git checkout is needed.
14603 (method git-fetch)
14604 (uri (git-reference
14605 (url "https://chromium.googlesource.com/external/gyp")
14606 (commit commit)))
14607 (file-name (git-file-name name version))
14608 (sha256
14609 (base32
14610 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
14611 (build-system python-build-system)
14612 (home-page "https://gyp.gsrc.io/")
14613 (synopsis "GYP is a Meta-Build system")
14614 (description
14615 "GYP builds build systems for large, cross platform applications.
14616It can be used to generate XCode projects, Visual Studio projects, Ninja build
14617files, and Makefiles.")
14618 (license license:bsd-3))))
14619
14620(define-public python2-gyp
14621 (package-with-python2 python-gyp))
14622
14623(define-public python-whatever
14624 (package
14625 (name "python-whatever")
97610a66 14626 (version "0.6")
44d10b1f
RW
14627 (source
14628 (origin
ac0ea38c
EF
14629 (method git-fetch)
14630 (uri (git-reference
14631 (url "https://github.com/Suor/whatever")
14632 (commit version)))
14633 (file-name (git-file-name name version))
44d10b1f 14634 (sha256
ac0ea38c 14635 (base32 "1q7ajgqjfivxqsqgnhp4lc4p6jxyh4zprcsdbpd6dw54inaf0av5"))))
44d10b1f
RW
14636 (build-system python-build-system)
14637 (arguments
14638 `(#:phases
14639 (modify-phases %standard-phases
14640 (replace 'check
14641 (lambda _
14642 (invoke "py.test"))))))
14643 (native-inputs
14644 `(("python-pytest" ,python-pytest)))
14645 (home-page "http://github.com/Suor/whatever")
14646 (synopsis "Make anonymous functions by partial application of operators")
14647 (description "@code{whatever} provides an easy way to make anonymous
14648functions by partial application of operators.")
14649 (license license:bsd-3)))
14650
14651(define-public python2-whatever
14652 (package-with-python2 python-whatever))
14653
14654(define-public python-funcy
14655 (package
14656 (name "python-funcy")
9e396ab8 14657 (version "1.11")
44d10b1f
RW
14658 (source
14659 (origin
a85c6027
TGR
14660 (method git-fetch)
14661 (uri (git-reference
14662 (url "https://github.com/Suor/funcy.git")
14663 (commit version)))
44d10b1f 14664 (sha256
a85c6027
TGR
14665 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
14666 (file-name (git-file-name name version))))
44d10b1f
RW
14667 (build-system python-build-system)
14668 (arguments
14669 `(#:phases
14670 (modify-phases %standard-phases
14671 (replace 'check
14672 (lambda _
14673 (invoke "py.test"))))))
14674 (native-inputs
14675 `(("python-pytest" ,python-pytest)
14676 ("python-whatever" ,python-whatever)))
14677 (home-page "http://github.com/Suor/funcy")
14678 (synopsis "Functional tools")
14679 (description "@code{funcy} is a library that provides functional tools.
14680Examples are:
14681@enumerate
14682@item merge - Merges collections of the same type
14683@item walk - Type-preserving map
14684@item select - Selects a part of a collection
14685@item take - Takes the first n items of a collection
14686@item first - Takes the first item of a collection
14687@item remove - Predicated-removes items of a collection
14688@item concat - Concatenates two collections
14689@item flatten - Flattens a collection with subcollections
14690@item distinct - Returns only distinct items
14691@item split - Predicated-splits a collection
14692@item split_at - Splits a collection at a given item
14693@item group_by - Groups items by group
14694@item pairwise - Pairs off adjacent items
14695@item partial - Partially-applies a function
14696@item curry - Curries a function
14697@item compose - Composes functions
14698@item complement - Complements a predicate
14699@item all_fn - \"all\" with predicate
14700@end enumerate")
14701 (license license:bsd-3)))
14702
14703(define-public python2-funcy
14704 (package-with-python2 python-funcy))
14705
14706(define-public python-isoweek
14707 (package
14708 (name "python-isoweek")
14709 (version "1.3.3")
14710 (source
14711 (origin
14712 (method url-fetch)
14713 (uri (pypi-uri "isoweek" version))
14714 (sha256
14715 (base32
14716 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
14717 (build-system python-build-system)
14718 (home-page "https://github.com/gisle/isoweek")
14719 (synopsis "Objects representing a week")
14720 (description "The @code{isoweek} module provide the class Week that
14721implements the week definition of ISO 8601. This standard also defines
14722a notation for identifying weeks; yyyyWww (where the W is a literal).
14723Week instances stringify to this form.")
14724 (license license:bsd-3)))
14725
14726(define-public python2-isoweek
14727 (package-with-python2 python-isoweek))
14728
14729(define-public python-tokenize-rt
14730 (package
14731 (name "python-tokenize-rt")
14732 (version "2.0.1")
14733 (source
14734 (origin
14735 (method url-fetch)
14736 (uri (pypi-uri "tokenize-rt" version))
14737 (sha256
14738 (base32
14739 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
14740 (build-system python-build-system)
14741 (home-page "https://github.com/asottile/tokenize-rt")
14742 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
14743 (description
14744 "This Python library is a wrapper around @code{tokenize} from the Python
14745standard library. It provides two additional tokens @code{ESCAPED_NL} and
14746@code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
14747and @code{tokens_to_src} to roundtrip.")
14748 (license license:expat)))
14749
14750(define-public python-future-fstrings
14751 (package
14752 (name "python-future-fstrings")
14753 (version "0.4.1")
14754 (source
14755 (origin
14756 (method url-fetch)
14757 (uri (pypi-uri "future_fstrings" version))
14758 (sha256
14759 (base32
14760 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
14761 (build-system python-build-system)
14762 (propagated-inputs
14763 `(("python-tokenize-rt" ,python-tokenize-rt)))
14764 (home-page "https://github.com/asottile/future-fstrings")
14765 (synopsis "Backport of fstrings to Python < 3.6")
14766 (description
14767 "This package provides a UTF-8 compatible encoding
14768@code{future_fstrings}, which performs source manipulation. It decodes the
14769source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
14770@code{f} strings.")
14771 (license license:expat)))
14772
dae2eb1c
MC
14773(define-public python-typed-ast
14774 (package
14775 (name "python-typed-ast")
bae89583 14776 (version "1.4.0")
dae2eb1c
MC
14777 (source
14778 (origin
bae89583
MO
14779 (method git-fetch)
14780 (uri (git-reference
14781 (url "https://github.com/python/typed_ast.git")
14782 (commit version)))
dae2eb1c 14783 (sha256
bae89583
MO
14784 (base32 "0l0hz809f7i356kmqkvfsaswiidb98j9hs9rrjnfawzqcbffzgyb"))
14785 (file-name (git-file-name name version))))
dae2eb1c
MC
14786 (build-system python-build-system)
14787 (arguments
14788 `(#:modules ((guix build utils)
14789 (guix build python-build-system)
14790 (ice-9 ftw)
14791 (srfi srfi-1)
14792 (srfi srfi-26))
14793 #:phases
14794 (modify-phases %standard-phases
14795 (replace 'check
14796 (lambda _
14797 (let ((cwd (getcwd)))
14798 (setenv "PYTHONPATH"
14799 (string-append cwd "/build/"
14800 (find (cut string-prefix? "lib" <>)
14801 (scandir (string-append cwd "/build")))
14802 ":"
14803 (getenv "PYTHONPATH"))))
14804 (invoke "pytest")
14805 #t)))))
14806 (native-inputs `(("python-pytest" ,python-pytest)))
14807 (home-page "https://github.com/python/typed_ast")
14808 (synopsis "Fork of Python @code{ast} modules with type comment support")
14809 (description "This package provides a parser similar to the standard
14810@code{ast} library. Unlike @code{ast}, the parsers in @code{typed_ast}
14811include PEP 484 type comments and are independent of the version of Python
14812under which they are run. The @code{typed_ast} parsers produce the standard
14813Python AST (plus type comments), and are both fast and correct, as they are
14814based on the CPython 2.7 and 3.7 parsers.")
14815 ;; See the file "LICENSE" for the details.
14816 (license (list license:psfl
14817 license:asl2.0
14818 license:expat)))) ;ast27/Parser/spark.py
14819
44d10b1f
RW
14820(define-public python-typing
14821 (package
14822 (name "python-typing")
14823 (version "3.6.6")
14824 (source
14825 (origin
14826 (method url-fetch)
14827 (uri (pypi-uri "typing" version))
14828 (sha256
14829 (base32
14830 "0ba9acs4awx15bf9v3nrs781msbd2nx826906nj6fqks2bvca9s0"))))
14831 (build-system python-build-system)
14832 (home-page "https://docs.python.org/3/library/typing.html")
14833 (synopsis "Type hints for Python")
14834 (description "This is a backport of the standard library @code{typing}
14835module to Python versions older than 3.5. Typing defines a standard notation
14836for Python function and variable type annotations. The notation can be used
14837for documenting code in a concise, standard format, and it has been designed
14838to also be used by static and runtime type checkers, static analyzers, IDEs
14839and other tools.")
14840 (license license:psfl)))
14841
14842(define-public python2-typing
14843 (package-with-python2 python-typing))
14844
f89d443b
VC
14845(define-public python-typing-extensions
14846 (package
14847 (name "python-typing-extensions")
14848 (version "3.7.2")
14849 (source
14850 (origin
14851 (method url-fetch)
14852 (uri (pypi-uri "typing_extensions" version))
14853 (sha256
14854 (base32
14855 "0wfsv71pvkyf2na938l579jh0v3kzl6g744ijgnahcwd4d9x0b7v"))))
14856 (build-system python-build-system)
14857 (home-page
14858 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
14859 (synopsis "Experimental type hints for Python")
14860 (description
14861 "The typing_extensions module contains additional @code{typing} hints not
14862yet present in the of the @code{typing} standard library.
14863Included are implementations of:
14864@enumerate
14865@item ClassVar
14866@item ContextManager
14867@item Counter
14868@item DefaultDict
14869@item Deque
14870@item NewType
14871@item NoReturn
14872@item overload
14873@item Protocol
14874@item runtime
14875@item Text
14876@item Type
14877@item TYPE_CHECKING
14878@item AsyncGenerator
14879@end enumerate\n")
14880 (license license:psfl)))
14881
44d10b1f
RW
14882(define-public bpython
14883 (package
14884 (name "bpython")
4de93b2f 14885 (version "0.18")
44d10b1f
RW
14886 (source
14887 (origin
14888 (method url-fetch)
14889 (uri (pypi-uri "bpython" version))
14890 (sha256
4de93b2f 14891 (base32 "1hl6frgvr2lqaxqczl8amg9xih32b3gzv429vs0qrjb8wpdj1k2n"))))
44d10b1f
RW
14892 (build-system python-build-system)
14893 (arguments
14894 `(#:phases
14895 (modify-phases %standard-phases
14896 (add-after 'unpack 'remove-failing-test
14897 (lambda _
14898 ;; Remove failing test. FIXME: make it pass
14899 (delete-file "bpython/test/test_args.py")
14900 #t))
14901 (add-after 'wrap 'add-aliases
14902 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
14903 (lambda* (#:key outputs #:allow-other-keys)
14904 (let ((out (assoc-ref outputs "out")))
14905 (for-each
14906 (lambda (old new)
14907 (symlink old (string-append out "/bin/" new)))
14908 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
14909 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
14910 #t)))))
14911 (propagated-inputs
14912 `(("python-pygments" ,python-pygments)
14913 ("python-requests" ,python-requests)
4de93b2f 14914 ("python-babel" ,python-babel) ; optional, for internationalization
44d10b1f
RW
14915 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
14916 ("python-greenlet" ,python-greenlet)
4de93b2f 14917 ("python-urwid" ,python-urwid) ; for bpython-urwid only
44d10b1f
RW
14918 ("python-six" ,python-six)))
14919 (native-inputs
14920 `(("python-sphinx" ,python-sphinx)
14921 ("python-mock" ,python-mock)))
14922 (home-page "https://bpython-interpreter.org/")
14923 (synopsis "Fancy interface to the Python interpreter")
14924 (description "Bpython is a fancy interface to the Python
14925interpreter. bpython's main features are
14926
14927@enumerate
14928@item in-line syntax highlighting,
14929@item readline-like autocomplete with suggestions displayed as you type,
14930@item expected parameter list for any Python function,
14931@item \"rewind\" function to pop the last line of code from memory and
14932 re-evaluate,
14933@item send the code you've entered off to a pastebin,
14934@item save the code you've entered to a file, and
14935@item auto-indentation.
14936@end enumerate")
14937 (license license:expat)))
14938
14939(define-public bpython2
14940 (let ((base (package-with-python2
14941 (strip-python2-variant bpython))))
14942 (package (inherit base)
14943 (name "bpython2")
14944 (arguments
14945 `(#:python ,python-2
14946 #:phases
14947 (modify-phases %standard-phases
14948 (add-after 'unpack 'remove-failing-test
14949 (lambda _
14950 ;; Remove failing test. FIXME: make it pass
14951 (delete-file "bpython/test/test_args.py")
14952 ;; Disable failing test-cases (renaming inhibits they are
14953 ;; discovered)
14954 (substitute* "bpython/test/test_curtsies_repl.py"
14955 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
14956 (string-append a "xxx_off_" b))
14957 (("^(\\s*def )(test_complex\\W)" _ a b)
14958 (string-append a "xxx_off_" b)))
14959 #t))
14960 (add-before 'build 'rename-scripts
14961 ;; rename the scripts to bypthon2, bpdb2, etc.
14962 (lambda _
14963 (substitute* "setup.py"
14964 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
14965 (string-append name "2" rest "\n"))
14966 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
14967 (string-append name "2" (or sub "") rest "\n")))
14968 #t))))))))
14969
14970(define-public python-pyinotify
14971 (package
14972 (name "python-pyinotify")
14973 (version "0.9.6")
14974 (source (origin
14975 (method url-fetch)
14976 (uri (pypi-uri "pyinotify" version))
14977 (sha256
14978 (base32
14979 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
14980 (build-system python-build-system)
14981 (arguments `(#:tests? #f)) ;no tests
14982 (home-page "https://github.com/seb-m/pyinotify")
14983 (synopsis "Python library for monitoring inotify events")
14984 (description
14985 "@code{pyinotify} provides a Python interface for monitoring
14986file system events on Linux.")
14987 (license license:expat)))
14988
14989(define-public python2-pyinotify
14990 (package-with-python2 python-pyinotify))
14991
14992;; Ada parser uses this version.
14993(define-public python2-quex-0.67.3
14994 (package
14995 (name "python2-quex")
14996 (version "0.67.3")
14997 (source
14998 (origin
14999 (method url-fetch)
15000 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
15001 (version-major+minor version)
15002 "/quex-" version ".zip"))
15003 (sha256
15004 (base32
15005 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
15006 (build-system python-build-system)
15007 (native-inputs
15008 `(("unzip" ,unzip)))
15009 (arguments
15010 `(#:python ,python-2
15011 #:tests? #f
15012 #:phases
15013 (modify-phases %standard-phases
15014 (delete 'configure)
15015 (delete 'build)
15016 (replace 'install
15017 (lambda* (#:key outputs #:allow-other-keys)
15018 (let* ((out (assoc-ref outputs "out"))
15019 (share/quex (string-append out "/share/quex"))
15020 (bin (string-append out "/bin")))
15021 (copy-recursively "." share/quex)
15022 (mkdir-p bin)
15023 (symlink (string-append share/quex "/quex-exe.py")
15024 (string-append bin "/quex"))
15025 #t))))))
15026 (native-search-paths
15027 (list (search-path-specification
15028 (variable "QUEX_PATH")
15029 (files '("share/quex")))))
15030 (home-page "http://quex.sourceforge.net/")
15031 (synopsis "Lexical analyzer generator in Python")
15032 (description "@code{quex} is a lexical analyzer generator in Python.")
15033 (license license:lgpl2.1+))) ; Non-military
15034
15035(define-public python2-quex
15036 (package (inherit python2-quex-0.67.3)
15037 (name "python2-quex")
15038 (version "0.68.1")
15039 (source
15040 (origin
15041 (method url-fetch)
15042 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
15043 (sha256
15044 (base32
15045 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
15046 (file-name (string-append name "-" version ".tar.gz"))))))
15047
15048(define-public python-more-itertools
15049 (package
15050 (name "python-more-itertools")
1b066827 15051 (version "7.1.0")
44d10b1f
RW
15052 (source
15053 (origin
15054 (method url-fetch)
15055 (uri (pypi-uri "more-itertools" version))
15056 (sha256
15057 (base32
1b066827 15058 "16phg2f2dvm6ci5wr49ncha5lmc0m2in3bsl33c61vzca4gkvd4b"))))
44d10b1f 15059 (build-system python-build-system)
44d10b1f
RW
15060 (home-page "https://github.com/erikrose/more-itertools")
15061 (synopsis "More routines for operating on iterables, beyond itertools")
15062 (description "Python's built-in @code{itertools} module implements a
15063number of iterator building blocks inspired by constructs from APL, Haskell,
15064and SML. @code{more-itertools} includes additional building blocks for
15065working with iterables.")
47f66348 15066 (properties `((python2-variant . ,(delay python2-more-itertools))))
44d10b1f
RW
15067 (license license:expat)))
15068
47f66348 15069;; The 5.x series are the last versions supporting Python 2.7.
44d10b1f 15070(define-public python2-more-itertools
47f66348
MB
15071 (package
15072 (inherit python-more-itertools)
15073 (name "python2-more-itertools")
15074 (version "5.0.0")
15075 (source (origin
15076 (method url-fetch)
15077 (uri (pypi-uri "more-itertools" version))
15078 (sha256
15079 (base32
15080 "1r12cm6mcdwdzz7d47a6g4l437xsvapdlgyhqay3i2nrlv03da9q"))))
15081 (arguments
15082 `(#:python ,python2-minimal))
15083 (propagated-inputs
15084 `(("python2-six" ,python2-six-bootstrap)))))
44d10b1f
RW
15085
15086(define-public python-latexcodec
15087 (package
15088 (name "python-latexcodec")
f3415ba5 15089 (version "1.0.7")
44d10b1f
RW
15090 (source
15091 (origin
15092 (method url-fetch)
15093 (uri (pypi-uri "latexcodec" version))
15094 (sha256
f3415ba5 15095 (base32 "0wnp3yqcgx0rpy8dz51vh75lbp2qif67da19zi7m3ca98n887hgb"))))
44d10b1f
RW
15096 (build-system python-build-system)
15097 (inputs
15098 `(("python-six" ,python-six)))
15099 (home-page "https://readthedocs.org/projects/latexcodec/")
15100 (synopsis "Work with LaTeX code in Python")
15101 (description "Lexer and codec to work with LaTeX code in Python.")
15102 (license license:expat)))
15103
15104(define-public python-pybtex
15105 (package
15106 (name "python-pybtex")
9441a9c1 15107 (version "0.22.2")
44d10b1f
RW
15108 (source
15109 (origin
15110 (method url-fetch)
15111 (uri (pypi-uri "pybtex" version))
15112 (sha256
9441a9c1 15113 (base32 "070wfcmxrd7xg1si421mi9150gmx2qwx431nwf69sq3hhmgnx080"))))
44d10b1f
RW
15114 (build-system python-build-system)
15115 (native-inputs
15116 `(("python-nose" ,python-nose)))
15117 (inputs
15118 `(("python-latexcodec" ,python-latexcodec)
15119 ("python-pyyaml" ,python-pyyaml)
15120 ("python-six" ,python-six)))
15121 (arguments
15122 `(#:test-target "nosetests"))
15123 (home-page "https://pybtex.org/")
15124 (synopsis "BibTeX-compatible bibliography processor")
15125 (description "Pybtex is a BibTeX-compatible bibliography processor written
15126in Python. You can simply type pybtex instead of bibtex.")
15127 (license license:expat)))
15128
15129(define-public python-onetimepass
15130 (package
15131 (name "python-onetimepass")
15132 (version "1.0.1")
15133 (source
15134 (origin
15135 (method url-fetch)
15136 (uri (pypi-uri "onetimepass" version))
15137 (sha256
15138 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
15139 (build-system python-build-system)
15140 (propagated-inputs `(("python-six" ,python-six)))
15141 (home-page "https://github.com/tadeck/onetimepass/")
15142 (synopsis "One-time password library")
15143 (description "Python one-time password library for HMAC-based (HOTP) and
15144time-based (TOTP) passwords.")
15145 (license license:expat)))
15146
15147(define-public python-parso
15148 (package
15149 (name "python-parso")
170d5844 15150 (version "0.5.2")
44d10b1f
RW
15151 (source
15152 (origin
15153 (method url-fetch)
15154 (uri (pypi-uri "parso" version))
15155 (sha256
15156 (base32
170d5844 15157 "1qgvrkpma7vylrk047mxxvqd66nwqk978n3ig2w8iz9m3bgjbksm"))))
44d10b1f
RW
15158 (native-inputs
15159 `(("python-pytest" ,python-pytest)))
15160 (build-system python-build-system)
4eb97c25
MC
15161 (arguments
15162 `(#:phases (modify-phases %standard-phases
15163 (replace 'check
15164 (lambda _ (invoke "pytest" "-vv"))))))
44d10b1f
RW
15165 (home-page "https://github.com/davidhalter/parso")
15166 (synopsis "Python Parser")
15167 (description "Parso is a Python parser that supports error recovery and
15168round-trip parsing for different Python versions (in multiple Python versions).
15169Parso is also able to list multiple syntax errors in your Python file.")
15170 (license license:expat)))
15171
15172(define-public python2-parso
15173 (package-with-python2 python-parso))
15174
15175(define-public python-async-generator
15176 (package
15177 (name "python-async-generator")
94fcbf8d 15178 (version "1.10")
44d10b1f
RW
15179 (source
15180 (origin
15181 (method url-fetch)
15182 (uri (pypi-uri "async_generator" version))
15183 (sha256
15184 (base32
94fcbf8d 15185 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
44d10b1f
RW
15186 (build-system python-build-system)
15187 (native-inputs
15188 `(("python-pytest" ,python-pytest)))
15189 (home-page "https://github.com/python-trio/async_generator")
15190 (synopsis "Async generators and context managers for Python 3.5+")
15191 (description "@code{async_generator} back-ports Python 3.6's native async
15192generators and Python 3.7's context managers into Python 3.5.")
15193 ;; Dual licensed.
15194 (license (list license:expat license:asl2.0))))
15195
15196(define-public python-async-timeout
15197 (package
15198 (name "python-async-timeout")
15199 (version "3.0.1")
15200 (source
15201 (origin
15202 (method url-fetch)
15203 (uri (pypi-uri "async-timeout" version))
15204 (sha256
15205 (base32
15206 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
15207 (build-system python-build-system)
15208 (home-page "https://github.com/aio-libs/async_timeout/")
15209 (synopsis "Timeout context manager for asyncio programs")
15210 (description "@code{async-timeout} provides a timeout timeout context
15211manager compatible with @code{asyncio}.")
15212 (license license:asl2.0)))
15213
15214(define-public python-glob2
15215 (package
15216 (name "python-glob2")
4df49d19 15217 (version "0.7")
8fa2bcc7
TGR
15218 (source
15219 (origin
15220 (method git-fetch)
15221 (uri (git-reference
15222 (url "https://github.com/miracle2k/python-glob2.git")
4df49d19 15223 (commit (string-append "v" version))))
8fa2bcc7
TGR
15224 (file-name (git-file-name name version))
15225 (sha256
4df49d19 15226 (base32 "160nh2ay9lw2hi0rixpzb2k87r6ql56k0j2cm87lqz8xc8zbw919"))))
44d10b1f
RW
15227 (build-system python-build-system)
15228 (home-page "https://github.com/miracle2k/python-glob2/")
15229 (synopsis "Extended Version of the python buildin glob module")
15230 (description "This is an extended version of the Python
15231@url{http://docs.python.org/library/glob.html, built-in glob module} which
15232adds:
15233
15234@itemize
15235@item The ability to capture the text matched by glob patterns, and return
15236those matches alongside the file names.
15237@item A recursive @code{**} globbing syntax, akin for example to the
15238@code{globstar} option of Bash.
15239@item The ability to replace the file system functions used, in order to glob
15240on virtual file systems.
15241@item Compatible with Python 2 and Python 3 (tested with 3.3).
15242@end itemize
15243
15244Glob2 currently based on the glob code from Python 3.3.1.")
15245 (license license:bsd-2)))
15246
15247(define-public python2-glob2
15248 (package-with-python2 python-glob2))
15249
15250(define-public python-gipc
15251 (package
15252 (name "python-gipc")
15253 (version "0.6.0")
15254 (source
15255 (origin
15256 (method url-fetch)
15257 (uri (pypi-uri "gipc" version ".zip"))
15258 (sha256
15259 (base32
15260 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
15261 (build-system python-build-system)
15262 (native-inputs
15263 `(("unzip" ,unzip)))
15264 (propagated-inputs
15265 `(("python-gevent" ,python-gevent)))
15266 (home-page "http://gehrcke.de/gipc")
15267 (synopsis "Child process management in the context of gevent")
15268 (description "Usage of Python's multiprocessing package in a
15269gevent-powered application may raise problems. With @code{gipc},
15270process-based child processes can safely be created anywhere within a
15271gevent-powered application.")
15272 (license license:expat)))
15273
15274(define-public python2-gipc
15275 (package-with-python2 python-gipc))
15276
15277(define-public python-fusepy
15278 (package
15279 (name "python-fusepy")
15280 (version "2.0.4")
15281 (source
15282 (origin
15283 (method url-fetch)
15284 (uri (pypi-uri "fusepy" version))
15285 (sha256
15286 (base32
15287 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
15288 (build-system python-build-system)
15289 (arguments
15290 `(#:phases
15291 (modify-phases %standard-phases
15292 (add-before 'build 'set-library-file-name
15293 (lambda* (#:key inputs #:allow-other-keys)
15294 (let ((fuse (assoc-ref inputs "fuse")))
15295 (substitute* "fuse.py"
15296 (("find_library\\('fuse'\\)")
15297 (string-append "'" fuse "/lib/libfuse.so'")))
15298 #t))))))
15299 (propagated-inputs
15300 `(("fuse" ,fuse)))
15301 (home-page "https://github.com/fusepy/fusepy")
15302 (synopsis "Simple ctypes bindings for FUSE")
15303 (description "Python module that provides a simple interface to FUSE and
15304MacFUSE. The binding is created using the standard @code{ctypes} library.")
15305 (license license:isc)))
15306
15307(define-public python2-fusepy
15308 (package-with-python2 python-fusepy))
15309
15310(define-public python2-gdrivefs
15311 (package
15312 (name "python2-gdrivefs")
15313 (version "0.14.9")
15314 (source
15315 (origin
15316 (method url-fetch)
15317 (uri (pypi-uri "gdrivefs" version))
15318 (sha256
15319 (base32
15320 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
15321 (build-system python-build-system)
15322 (arguments
15323 `(#:python ,python-2
15324 #:phases
15325 (modify-phases %standard-phases
15326 (add-before 'build 'patch-setup-py
15327 (lambda _
15328 ;; Update requirements from dependency==version
15329 ;; to dependency>=version
15330 (substitute* "gdrivefs/resources/requirements.txt"
15331 (("==") ">="))
15332 #t)))))
15333 (native-inputs
15334 `(("python2-gipc" ,python2-gipc)
15335 ("python2-gevent" ,python2-gevent)
15336 ("python2-greenlet" ,python2-greenlet)
15337 ("python2-httplib2" ,python2-httplib2)
15338 ("python2-uritemplate" ,python2-uritemplate)
15339 ("python2-oauth2client" ,python2-oauth2client)
15340 ("python2-six" ,python2-six)))
15341 (propagated-inputs
15342 `(("python2-dateutil" ,python2-dateutil)
15343 ("python2-fusepy" ,python2-fusepy)
15344 ("python2-google-api-client" ,python2-google-api-client)))
15345 (home-page "https://github.com/dsoprea/GDriveFS")
15346 (synopsis "Mount Google Drive as a local file system")
15347 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
15348under Python 2.7.")
15349 (license license:gpl2)))
15350
15351(define-public pybind11
15352 (package
15353 (name "pybind11")
d478cc04 15354 (version "2.3.0")
44d10b1f
RW
15355 (source (origin
15356 (method git-fetch)
15357 (uri (git-reference
15358 (url "https://github.com/pybind/pybind11.git")
15359 (commit (string-append "v" version))))
15360 (sha256
15361 (base32
d478cc04 15362 "11b6dniri8m05spfd2a19irz82shf4sdca73566bniggrf3zclnf"))
44d10b1f
RW
15363 (file-name (git-file-name name version))))
15364 (build-system cmake-build-system)
15365 (native-inputs
15366 `(("python" ,python)
15367 ("python-pytest" ,python-pytest)))
15368 (arguments
15369 `(#:test-target "check"))
15370 (home-page "https://github.com/pybind/pybind11/")
15371 (synopsis "Seamless operability between C++11 and Python")
15372 (description "pybind11 is a lightweight header-only library that exposes
15373C++ types in Python and vice versa, mainly to create Python bindings of
15374existing C++ code. Its goals and syntax are similar to the excellent
15375Boost.Python library by David Abrahams: to minimize boilerplate code in
15376traditional extension modules by inferring type information using compile-time
15377introspection.")
15378 (license license:expat)))
15379
15380(define-public python-fasteners
15381 (package
15382 (name "python-fasteners")
15383 (version "0.14.1")
15384 (source
15385 (origin
15386 (method url-fetch)
15387 (uri (pypi-uri "fasteners" version))
15388 (sha256
15389 (base32
15390 "063y20kx01ihbz2mziapmjxi2cd0dq48jzg587xdsdp07xvpcz22"))))
15391 (build-system python-build-system)
15392 (propagated-inputs
15393 `(("python-monotonic" ,python-monotonic)
15394 ("python-six" ,python-six)
15395 ("python-testtools" ,python-testtools)))
15396 (home-page "https://github.com/harlowja/fasteners")
15397 (synopsis "Python package that provides useful locks")
15398 (description
15399 "This package provides a Python program that provides following locks:
15400
15401@itemize
15402@item Locking decorator
15403@item Reader-writer locks
15404@item Inter-process locks
15405@item Generic helpers
15406@end itemize\n")
15407 (properties `((python2-variant . ,(delay python2-fasteners))))
15408 (license license:asl2.0)))
15409
15410(define-public python2-fasteners
15411 (let ((base (package-with-python2 (strip-python2-variant python-fasteners))))
15412 (package
15413 (inherit base)
15414 (propagated-inputs
15415 `(("python2-futures" ,python2-futures)
15416 ,@(package-propagated-inputs base))))))
15417
15418(define-public python-requests-file
15419 (package
15420 (name "python-requests-file")
15421 (version "1.4.3")
15422 (source
15423 (origin
15424 (method url-fetch)
15425 (uri (pypi-uri "requests-file" version))
15426 (sha256
15427 (base32
15428 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
15429 (build-system python-build-system)
15430 (propagated-inputs
15431 `(("python-requests" ,python-requests)
15432 ("python-six" ,python-six)))
15433 (home-page
15434 "https://github.com/dashea/requests-file")
15435 (synopsis "File transport adapter for Requests")
15436 (description
15437 "Requests-File is a transport adapter for use with the Requests Python
52beae7b 15438library to allow local file system access via @code{file://} URLs.")
44d10b1f
RW
15439 (license license:asl2.0)))
15440
15441(define-public python2-requests-file
15442 (package-with-python2 python-requests-file))
15443
15444(define-public python-tldextract
15445 (package
15446 (name "python-tldextract")
15447 (version "2.2.0")
15448 (source
15449 (origin
15450 (method url-fetch)
15451 (uri (pypi-uri "tldextract" version))
15452 (sha256
15453 (base32
15454 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
15455 (build-system python-build-system)
15456 (native-inputs
15457 `(("python-pytest" ,python-pytest)
15458 ("python-responses" ,python-responses)))
15459 (propagated-inputs
15460 `(("python-idna" ,python-idna)
15461 ("python-requests" ,python-requests)
15462 ("python-requests-file" ,python-requests-file)))
15463 (home-page
15464 "https://github.com/john-kurkowski/tldextract")
15465 (synopsis
15466 "Separate the TLD from the registered domain and subdomains of a URL")
15467 (description
15468 "TLDExtract accurately separates the TLD from the registered domain and
15469subdomains of a URL, using the Public Suffix List. By default, this includes
15470the public ICANN TLDs and their exceptions. It can optionally support the
15471Public Suffix List's private domains as well.")
15472 (license license:bsd-3)))
15473
15474(define-public python2-tldextract
15475 (package-with-python2 python-tldextract))
15476
15477(define-public python-pynamecheap
15478 (package
15479 (name "python-pynamecheap")
15480 (version "0.0.3")
15481 (source
15482 (origin
15483 (method url-fetch)
15484 (uri (pypi-uri "PyNamecheap" version))
15485 (sha256
15486 (base32
15487 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
15488 (build-system python-build-system)
15489 (propagated-inputs
15490 `(("python-requests" ,python-requests)))
15491 (home-page
15492 "https://github.com/Bemmu/PyNamecheap")
15493 (synopsis
15494 "Namecheap API client in Python")
15495 (description
15496 "PyNamecheap is a Namecheap API client in Python.")
15497 (license license:expat)))
15498
15499(define-public python2-pynamecheap
15500 (package-with-python2 python-pynamecheap))
15501
15502(define-public python-dns-lexicon
15503 (package
15504 (name "python-dns-lexicon")
15505 (version "2.4.0")
15506 (source
15507 (origin
15508 (method url-fetch)
15509 (uri (pypi-uri "dns-lexicon" version))
15510 (sha256
15511 (base32
15512 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
15513 (build-system python-build-system)
15514 (arguments
15515 `(#:tests? #f)) ;requires internet access
15516 (propagated-inputs
15517 `(("python-future" ,python-future)
15518 ("python-pynamecheap" ,python-pynamecheap)
15519 ("python-requests" ,python-requests)
15520 ("python-tldextract" ,python-tldextract)
15521 ("python-urllib3" ,python-urllib3)))
15522 (home-page "https://github.com/AnalogJ/lexicon")
15523 (synopsis
15524 "Manipulate DNS records on various DNS providers")
15525 (description
15526 "Lexicon provides a way to manipulate DNS records on multiple DNS
15527providers in a standardized way. It has a CLI but it can also be used as a
15528Python library. It was designed to be used in automation, specifically with
15529Let's Encrypt.")
15530 (license license:expat)))
15531
15532(define-public python2-dns-lexicon
15533 (package-with-python2 python-dns-lexicon))
15534
15535(define-public python-commandlines
15536 (package
15537 (name "python-commandlines")
15538 (version "0.4.1")
15539 (source
15540 (origin
15541 (method url-fetch)
15542 (uri (pypi-uri "commandlines" version))
15543 (sha256
15544 (base32
15545 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
15546 (build-system python-build-system)
15547 (home-page "https://github.com/chrissimpkins/commandlines")
15548 (synopsis "Command line argument to object parsing library")
15549 (description
15550 "@code{Commandlines} is a Python library for command line application
15551development that supports command line argument parsing, command string
15552validation testing and application logic.")
15553 (license license:expat)))
15554
15555;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
15556;; python-numba. They have a very unflexible relationship.
15557(define-public python-numba
15558 (package
15559 (name "python-numba")
65f84096 15560 (version "0.46.0")
44d10b1f
RW
15561 (source
15562 (origin
15563 (method url-fetch)
15564 (uri (pypi-uri "numba" version))
15565 (sha256
15566 (base32
65f84096 15567 "1vnfzcq6fcnkmdms6114d49awvvj5181fl7z1wlha27qc2paxjy2"))))
44d10b1f
RW
15568 (build-system python-build-system)
15569 (arguments
15570 `(#:modules ((guix build utils)
15571 (guix build python-build-system)
15572 (ice-9 ftw)
15573 (srfi srfi-1)
15574 (srfi srfi-26))
15575 #:phases
15576 (modify-phases %standard-phases
15577 (add-after 'unpack 'disable-proprietary-features
15578 (lambda _
15579 (setenv "NUMBA_DISABLE_HSA" "1")
15580 (setenv "NUMBA_DISABLE_CUDA" "1")
15581 #t))
15582 (add-after 'unpack 'remove-failing-tests
15583 (lambda _
65f84096 15584 ;; FIXME: These tests fail for unknown reasons:
44d10b1f
RW
15585 ;; test_non_writable_pycache, test_non_creatable_pycache, and
15586 ;; test_frozen (all in numba.tests.test_dispatcher.TestCache).
15587 (substitute* "numba/tests/test_dispatcher.py"
15588 (("def test(_non_writable_pycache)" _ m)
15589 (string-append "def guix_skip" m))
15590 (("def test(_non_creatable_pycache)" _ m)
15591 (string-append "def guix_skip" m))
15592 (("def test(_frozen)" _ m)
15593 (string-append "def guix_skip" m)))
15594
15595 ;; These tests fail because we don't run the tests from the build
15596 ;; directory: test_setup_py_distutils, test_setup_py_setuptools
65f84096 15597 ;; They are in numba.tests.test_pycc.TestDistutilsSupport.
44d10b1f
RW
15598 (substitute* "numba/tests/test_pycc.py"
15599 (("def test(_setup_py_distutils|_setup_py_setuptools)" _ m)
15600 (string-append "def guix_skip" m)))
65f84096
BG
15601
15602 ;; These tests fail because our version of Python does not have
15603 ;; a recognizable front-end for the Numba distribution to use
15604 ;; to check against.
15605 (substitute* "numba/tests/test_entrypoints.py"
15606 (("def test(_init_entrypoint)" _ m)
15607 (string-append "def guix_skip" m)))
15608 (substitute* "numba/tests/test_jitclasses.py"
15609 (("def test(_jitclass_longlabel_not_truncated)" _ m)
15610 (string-append "def guix_skip" m)))
44d10b1f
RW
15611 #t))
15612 (replace 'check
15613 (lambda _
15614 (let ((cwd (getcwd)))
15615 (setenv "PYTHONPATH"
15616 (string-append cwd "/build/"
15617 (find (cut string-prefix? "lib" <>)
15618 (scandir (string-append cwd "/build")))
15619 ":"
15620 (getenv "PYTHONPATH")))
15621 ;; Something is wrong with the PYTHONPATH when running the
15622 ;; tests from the build directory, as it complains about not being
15623 ;; able to import certain modules.
15624 (with-directory-excursion "/tmp"
15625 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))
15626 #t)))))
15627 (propagated-inputs
15628 `(("python-llvmlite" ,python-llvmlite)
15629 ("python-numpy" ,python-numpy)
15630 ("python-singledispatch" ,python-singledispatch)))
15631 ;; Needed for tests.
15632 (inputs
15633 `(("python-jinja2" ,python-jinja2)
15634 ("python-pygments" ,python-pygments)))
15635 (home-page "https://numba.pydata.org")
15636 (synopsis "Compile Python code using LLVM")
15637 (description "Numba gives you the power to speed up your applications with
15638high performance functions written directly in Python. With a few
15639annotations, array-oriented and math-heavy Python code can be just-in-time
15640compiled to native machine instructions, similar in performance to C, C++ and
15641Fortran, without having to switch languages or Python interpreters.
15642
15643Numba works by generating optimized machine code using the LLVM compiler
15644infrastructure at import time, runtime, or statically (using the included pycc
15645tool).")
15646 (license license:bsd-3)))
15647
15648(define-public python-anndata
15649 (package
15650 (name "python-anndata")
8c9372c1 15651 (version "0.6.18")
44d10b1f
RW
15652 (source
15653 (origin
15654 (method url-fetch)
15655 (uri (pypi-uri "anndata" version))
15656 (sha256
15657 (base32
8c9372c1 15658 "03x83yjaccbqszj7x4fwwmpil0ai59yx64d1zmf2691za3j03w73"))))
44d10b1f
RW
15659 (build-system python-build-system)
15660 (propagated-inputs
15661 `(("python-h5py" ,python-h5py)
15662 ("python-natsort" ,python-natsort)
15663 ("python-pandas" ,python-pandas)
15664 ("python-scipy" ,python-scipy)))
15665 (home-page "https://github.com/theislab/anndata")
15666 (synopsis "Annotated data for data analysis pipelines")
15667 (description "Anndata is a package for simple (functional) high-level APIs
15668for data analysis pipelines. In this context, it provides an efficient,
15669scalable way of keeping track of data together with learned annotations and
15670reduces the code overhead typically encountered when using a mostly
15671object-oriented library such as @code{scikit-learn}.")
15672 (license license:bsd-3)))
15673
15674(define-public python-dill
15675 (package
15676 (name "python-dill")
32be3577 15677 (version "0.3.1.1")
44d10b1f
RW
15678 (source
15679 (origin
15680 (method url-fetch)
15681 (uri (pypi-uri "dill" version))
15682 (sha256
32be3577 15683 (base32 "1704g8z70d210ksgbccs2v545v9w0wc6lx15m296alb7jf0yzn22"))))
44d10b1f 15684 (build-system python-build-system)
32be3577
MIP
15685 (arguments
15686 `(#:phases
15687 (modify-phases %standard-phases
15688 (replace 'check
15689 (lambda _
15690 (with-directory-excursion "/tmp"
15691 (invoke "nosetests" "-v"))
15692 #t)))))
15693 (native-inputs
15694 `(("python-nose" ,python-nose)))
15695 (home-page "https://pypi.org/project/dill/")
44d10b1f
RW
15696 (synopsis "Serialize all of Python")
15697 (description "Dill extends Python's @code{pickle} module for serializing
15698and de-serializing Python objects to the majority of the built-in Python
15699types. Dill provides the user the same interface as the @code{pickle} module,
15700and also includes some additional features. In addition to pickling Python
15701objects, @code{dill} provides the ability to save the state of an interpreter
61985d65 15702session in a single command. Hence, it would be feasible to save a
44d10b1f
RW
15703interpreter session, close the interpreter, ship the pickled file to another
15704computer, open a new interpreter, unpickle the session and thus continue from
15705the saved state of the original interpreter session.")
15706 (license license:bsd-3)))
15707
15708(define-public python-multiprocess
15709 (package
15710 (name "python-multiprocess")
fcc4e9e7 15711 (version "0.70.9")
44d10b1f
RW
15712 (source
15713 (origin
15714 (method url-fetch)
15715 (uri (pypi-uri "multiprocess" version))
15716 (sha256
15717 (base32
fcc4e9e7 15718 "1r882nvd44xqwbrclwqx5rhs80l6809rcvpc7pkpgnij06cvvmcz"))))
44d10b1f 15719 (build-system python-build-system)
fcc4e9e7
MIP
15720 (arguments
15721 `(#:phases
15722 (modify-phases %standard-phases
15723 (add-after 'unpack 'disable-broken-tests
15724 (lambda _
15725 ;; This test is broken as there is no keyboard interrupt.
15726 (substitute* "py3.7/multiprocess/tests/__init__.py"
15727 (("^(.*)def test_wait_result"
15728 line indent)
15729 (string-append indent
15730 "@unittest.skip(\"Disabled by Guix\")\n"
15731 line)))
15732 #t))
15733 ;; Tests must be run after installation.
15734 (delete 'check)
15735 (add-after 'install 'check
15736 (lambda* (#:key inputs outputs #:allow-other-keys)
15737 (add-installed-pythonpath inputs outputs)
15738 (invoke "python" "-m" "multiprocess.tests")
15739 #t)))))
44d10b1f
RW
15740 (propagated-inputs
15741 `(("python-dill" ,python-dill)))
fcc4e9e7 15742 (home-page "https://pypi.org/project/multiprocess/")
44d10b1f
RW
15743 (synopsis "Multiprocessing and multithreading in Python")
15744 (description
15745 "This package is a fork of the multiprocessing Python package, a package
15746which supports the spawning of processes using the API of the standard
15747library's @code{threading} module.")
15748 (license license:bsd-3)))
15749
15750(define-public python-toolz
15751 (package
15752 (name "python-toolz")
15753 (version "0.9.0")
15754 (source
15755 (origin
15756 (method url-fetch)
15757 (uri (pypi-uri "toolz" version))
15758 (sha256
15759 (base32
15760 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
15761 (build-system python-build-system)
15762 ;; FIXME: tests cannot be computed: "Can't perform this operation for
15763 ;; unregistered loader type"
15764 (arguments '(#:tests? #f))
15765 (home-page "https://github.com/pytoolz/toolz/")
15766 (synopsis "List processing tools and functional utilities")
15767 (description
15768 "This package provides a set of utility functions for iterators,
15769functions, and dictionaries.")
15770 (license license:bsd-3)))
15771
15772(define-public python2-toolz
15773 (package-with-python2 python-toolz))
15774
15775(define-public python-cytoolz
15776 (package
15777 (name "python-cytoolz")
15778 (version "0.9.0.1")
15779 (source
15780 (origin
15781 (method url-fetch)
15782 (uri (pypi-uri "cytoolz" version))
15783 (sha256
15784 (base32
15785 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
15786 (build-system python-build-system)
15787 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
15788 ;; 'exceptions'"
15789 (arguments '(#:tests? #f))
15790 (propagated-inputs
15791 `(("python-toolz" ,python-toolz)))
15792 (native-inputs
15793 `(("python-cython" ,python-cython)))
15794 (home-page "https://github.com/pytoolz/cytoolz")
15795 (synopsis "High performance functional utilities")
15796 (description
15797 "The cytoolz package implements the same API as provided by toolz. The
15798main differences are that @code{cytoolz} is faster and cytoolz offers a C API
15799that is accessible to other projects developed in Cython.")
15800 (license license:bsd-3)))
15801
15802(define-public python-sortedcontainers
15803 (package
15804 (name "python-sortedcontainers")
b244f166 15805 (version "2.1.0")
44d10b1f
RW
15806 (source
15807 (origin
15808 (method url-fetch)
15809 (uri (pypi-uri "sortedcontainers" version))
15810 (sha256
15811 (base32
b244f166 15812 "0fm0w5id2yhqld95hg2m636vjgkz377rvgdfqaxc25vbylr9lklp"))))
44d10b1f
RW
15813 (build-system python-build-system)
15814 (native-inputs
15815 `(("python-tox" ,python-tox)))
15816 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
15817 (synopsis "Sorted List, Sorted Dict, Sorted Set")
15818 (description
15819 "This package provides a sorted collections library, written in
15820pure-Python.")
15821 (license license:asl2.0)))
15822
15823(define-public python-cloudpickle
15824 (package
15825 (name "python-cloudpickle")
15826 (version "0.6.1")
15827 (source
15828 (origin
15829 (method url-fetch)
15830 (uri (pypi-uri "cloudpickle" version))
15831 (sha256
15832 (base32
15833 "1wdw89mlm7fqa3fm3ymskx05jrys66n8m1z1a8s0mss0799ahsgi"))))
15834 (build-system python-build-system)
15835 ;; FIXME: there are 5 errors in 122 tests:
15836 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.CloudPickleTest)
15837 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.CloudPickleTest)
15838 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.Protocol2CloudPickleTest)
15839 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.Protocol2CloudPickleTest)
15840 ;; ERROR: test_temp_file (tests.cloudpickle_file_test.CloudPickleFileTests)
15841 ;; TypeError: cannot serialize '_io.BufferedRandom' object
15842 (arguments '(#:tests? #f))
15843 (native-inputs
15844 `(("python-pytest" ,python-pytest)
15845 ("python-mock" ,python-mock)
15846 ("python-tornado" ,python-tornado)))
15847 (home-page "https://github.com/cloudpipe/cloudpickle")
15848 (synopsis "Extended pickling support for Python objects")
15849 (description
15850 "Cloudpickle makes it possible to serialize Python constructs not
15851supported by the default pickle module from the Python standard library. It
15852is especially useful for cluster computing where Python expressions are
15853shipped over the network to execute on remote hosts, possibly close to the
15854data.")
15855 (license license:bsd-3)))
15856
15857(define-public python2-cloudpickle
15858 (package-with-python2 python-cloudpickle))
15859
15860(define-public python-locket
15861 (package
15862 (name "python-locket")
15863 (version "0.2.0")
15864 (source
15865 (origin
15866 (method url-fetch)
15867 (uri (pypi-uri "locket" version))
15868 (sha256
15869 (base32
15870 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
15871 (build-system python-build-system)
15872 (home-page "https://github.com/mwilliamson/locket.py")
15873 (synopsis "File-based locks for Python")
15874 (description
15875 "Locket implements a lock that can be used by multiple processes provided
15876they use the same path.")
15877 (license license:bsd-2)))
15878
15879(define-public python2-locket
15880 (package-with-python2 python-locket))
15881
15882(define-public python-blosc
15883 (package
15884 (name "python-blosc")
15885 (version "1.5.1")
15886 (source
15887 (origin
15888 (method url-fetch)
15889 (uri (pypi-uri "blosc" version))
15890 (sha256
15891 (base32
15892 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
15893 (build-system python-build-system)
15894 ;; FIXME: all tests pass, but then this error is printed:
15895 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
15896 (arguments '(#:tests? #f))
15897 (propagated-inputs
15898 `(("python-numpy" ,python-numpy)))
15899 (home-page "https://github.com/blosc/python-blosc")
15900 (synopsis "Python wrapper for the Blosc data compressor library")
15901 (description "Blosc is a high performance compressor optimized for binary
15902data. It has been designed to transmit data to the processor cache faster
15903than the traditional, non-compressed, direct memory fetch approach via a
15904@code{memcpy()} system call.
15905
15906Blosc works well for compressing numerical arrays that contains data with
15907relatively low entropy, like sparse data, time series, grids with
15908regular-spaced values, etc.
15909
15910This Python package wraps the Blosc library.")
15911 (license license:bsd-3)))
15912
15913(define-public python2-blosc
15914 (package-with-python2 python-blosc))
15915
15916(define-public python-partd
15917 (package
15918 (name "python-partd")
15919 (version "0.3.9")
15920 (source
15921 (origin
15922 (method url-fetch)
15923 (uri (pypi-uri "partd" version))
15924 (sha256
15925 (base32
15926 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
15927 (build-system python-build-system)
15928 (propagated-inputs
15929 `(("python-blosc" ,python-blosc)
15930 ("python-locket" ,python-locket)
15931 ("python-numpy" ,python-numpy)
15932 ("python-pandas" ,python-pandas)
15933 ("python-pyzmq" ,python-pyzmq)
15934 ("python-toolz" ,python-toolz)))
15935 (home-page "https://github.com/dask/partd/")
15936 (synopsis "Appendable key-value storage")
15937 (description "Partd stores key-value pairs. Values are raw bytes. We
15938append on old values. Partd excels at shuffling operations.")
15939 (license license:bsd-3)))
15940
15941(define-public python2-partd
15942 (package-with-python2 python-partd))
15943
c70a0191
RW
15944(define-public python-fsspec
15945 (package
15946 (name "python-fsspec")
15947 (version "0.6.1")
15948 (source
15949 (origin
15950 (method url-fetch)
15951 (uri (pypi-uri "fsspec" version))
15952 (sha256
15953 (base32
15954 "1g9ba8v04s1nrh7pvzfm2md7ivl2mrz3hcq3y9d1a44gd62h17zj"))))
15955 (build-system python-build-system)
15956 (arguments '(#:tests? #f)) ; there are none
15957 (home-page "https://github.com/intake/filesystem_spec")
15958 (synopsis "File-system specification")
15959 (description "The purpose of this package is to produce a template or
15960specification for a file-system interface, that specific implementations
15961should follow, so that applications making use of them can rely on a common
15962behavior and not have to worry about the specific internal implementation
15963decisions with any given backend.")
15964 (license license:bsd-3)))
15965
44d10b1f
RW
15966(define-public python-dask
15967 (package
15968 (name "python-dask")
86c7ca07 15969 (version "2.9.0")
44d10b1f
RW
15970 (source
15971 (origin
15972 (method url-fetch)
15973 (uri (pypi-uri "dask" version))
15974 (sha256
86c7ca07 15975 (base32 "1w1hqr8vyx6ygwflj2737dcy0mmgvrc0s602gnny8pzlcbs9m76b"))))
44d10b1f 15976 (build-system python-build-system)
44d10b1f
RW
15977 (arguments
15978 `(#:phases
15979 (modify-phases %standard-phases
86c7ca07 15980 (add-after 'unpack 'disable-broken-tests
44d10b1f 15981 (lambda _
86c7ca07 15982 ;; This test is marked as xfail when pytest-xdist is used.
44d10b1f
RW
15983 (substitute* "dask/tests/test_threaded.py"
15984 (("def test_interrupt\\(\\)" m)
15985 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
15986 m)))
86c7ca07
RW
15987 ;; This one fails with a type error:
15988 ;; TypeError: Already tz-aware, use tz_convert to convert.
15989 (substitute* "dask/dataframe/tests/test_shuffle.py"
15990 (("def test_set_index_timestamp\\(\\)" m)
15991 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
15992 m)))
44d10b1f
RW
15993 #t))
15994 (replace 'check
15995 (lambda _ (invoke "pytest" "-vv"))))))
15996 (propagated-inputs
15997 `(("python-cloudpickle" ,python-cloudpickle)
86c7ca07 15998 ("python-fsspec" ,python-fsspec)
44d10b1f 15999 ("python-numpy" ,python-numpy)
86c7ca07 16000 ("python-packaging" ,python-packaging)
44d10b1f
RW
16001 ("python-pandas" ,python-pandas)
16002 ("python-partd" ,python-partd)
16003 ("python-toolz" ,python-toolz)
16004 ("python-pyyaml" ,python-pyyaml)))
16005 (native-inputs
16006 `(("python-pytest" ,python-pytest)
16007 ("python-pytest-runner" ,python-pytest-runner)))
16008 (home-page "https://github.com/dask/dask/")
16009 (synopsis "Parallel computing with task scheduling")
16010 (description
16011 "Dask is a flexible parallel computing library for analytics. It
16012consists of two components: dynamic task scheduling optimized for computation,
16013and large data collections like parallel arrays, dataframes, and lists that
16014extend common interfaces like NumPy, Pandas, or Python iterators to
16015larger-than-memory or distributed environments. These parallel collections
16016run on top of the dynamic task schedulers. ")
16017 (license license:bsd-3)))
16018
44d10b1f
RW
16019(define-public python-ilinkedlist
16020 (package
16021 (name "python-ilinkedlist")
16022 (version "0.4.0")
16023 (source
16024 (origin
16025 (method url-fetch)
16026 (uri (pypi-uri "ilinkedlist" version))
16027 (sha256
16028 (base32
16029 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
16030 (build-system python-build-system)
16031 (native-inputs `(("python-pytest" ,python-pytest)))
16032 (inputs `(("python" ,python)))
16033 (home-page "https://github.com/luther9/ilinkedlist-py")
16034 (synopsis "Immutable linked list library")
16035 (description
16036 "This is a implementation of immutable linked lists for Python. It
16037contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
16038Since a linked list is treated as immutable, it is hashable, and its length
16039can be retrieved in constant time. Some of the terminology is inspired by
16040LISP. It is possible to create an improper list by creating a @code{Pair}
16041with a non-list @code{cdr}.")
16042 (license license:gpl3+)))
16043
16044(define-public python-readlike
16045 (package
16046 (name "python-readlike")
16047 (version "0.1.3")
16048 (source
16049 (origin
16050 (method url-fetch)
16051 (uri (pypi-uri "readlike" version))
16052 (sha256
16053 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
16054 (build-system python-build-system)
16055 (home-page "https://github.com/jangler/readlike")
16056 (synopsis "GNU Readline-like line editing module")
16057 (description
16058 "This Python module provides line editing functions similar to the default
16059Emacs-style ones of GNU Readline. Unlike the Python standard library's
16060@code{readline} package, this one allows access to those capabilties in settings
16061outside of a standard command-line interface. It is especially well-suited to
16062interfacing with Urwid, due to a shared syntax for describing key inputs.
16063
16064Currently, all stateless Readline commands are implemented. Yanking and history
16065are not supported.")
16066 (license license:expat)))
16067
16068(define-public python2-readlike
16069 (package-with-python2 python-readlike))
16070
16071(define-public python-reparser
16072 (package
16073 (name "python-reparser")
16074 (version "1.4.3")
16075 (source
16076 (origin
16077 (method url-fetch)
16078 (uri (pypi-uri "ReParser" version))
16079 (sha256
16080 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
16081 (build-system python-build-system)
16082 (home-page "https://github.com/xmikos/reparser")
16083 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
16084 (description
16085 "This Python library provides a simple lexer/parser for inline markup based
16086on regular expressions.")
16087 (license license:expat)))
16088
16089(define-public python2-reparser
16090 (let ((reparser (package-with-python2
16091 (strip-python2-variant python-reparser))))
16092 (package (inherit reparser)
16093 (propagated-inputs
16094 `(("python2-enum34" ,python2-enum34)
16095 ,@(package-propagated-inputs reparser))))))
16096
16097(define-public python-precis-i18n
16098 (package
16099 (name "python-precis-i18n")
16100 (version "1.0.0")
16101 (source
16102 (origin
16103 (method url-fetch)
16104 (uri (pypi-uri "precis_i18n" version))
16105 (sha256
16106 (base32
16107 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
16108 (build-system python-build-system)
16109 (home-page "https://github.com/byllyfish/precis_i18n")
16110 (synopsis "Implementation of the PRECIS framework")
16111 (description
16112 "This module implements the PRECIS Framework as described in RFC 8264,
16113RFC 8265 and RFC 8266.")
16114 (license license:expat)))
16115
d0446c4b
RW
16116(define-public python-absl-py
16117 (package
16118 (name "python-absl-py")
16119 (version "0.6.1")
16120 (source
16121 (origin
16122 (method url-fetch)
16123 (uri (pypi-uri "absl-py" version))
16124 (sha256
16125 (base32
16126 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
16127 (build-system python-build-system)
16128 (propagated-inputs
16129 `(("python-six" ,python-six)))
16130 (home-page "https://github.com/abseil/abseil-py")
16131 (synopsis "Abseil Python common libraries")
16132 (description
16133 "This package provides the Abseil Python Common Libraries, a collection
16134of Python libraries for building Python applications.")
16135 (license license:asl2.0)))
16136
81bed4e9
RW
16137(define-public python-astor
16138 (package
16139 (name "python-astor")
16140 (version "0.7.1")
16141 (source
16142 (origin
16143 (method url-fetch)
16144 (uri (pypi-uri "astor" version))
16145 (sha256
16146 (base32
16147 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
16148 (build-system python-build-system)
16149 ;; FIXME: There are two errors and two test failures.
16150 (arguments `(#:tests? #f))
16151 (home-page "https://github.com/berkerpeksag/astor")
39ee82ff 16152 (synopsis "Read and write Python ASTs")
81bed4e9 16153 (description "Astor is designed to allow easy manipulation of Python
39ee82ff 16154source via the Abstract Syntax Tree.")
81bed4e9
RW
16155 (license license:bsd-3)))
16156
39ee82ff
RW
16157(define-public python2-astor
16158 (package-with-python2 python-astor))
16159
22e623ae
RW
16160(define-public python-grpcio
16161 (package
16162 (name "python-grpcio")
16163 (version "1.17.1")
16164 (source
16165 (origin
16166 (method url-fetch)
16167 (uri (pypi-uri "grpcio" version))
16168 (sha256
16169 (base32
16170 "0qb9y6j83nxa6d4kc60i8yfgdm7a8ms7b54kncjzf5y7nsxp8rzx"))))
16171 (build-system python-build-system)
16172 (propagated-inputs
16173 `(("python-six" ,python-six)))
16174 (home-page "https://grpc.io")
16175 (synopsis "HTTP/2-based RPC framework")
16176 (description "This package provides a Python library for communicating
16177with the HTTP/2-based RPC framework gRPC.")
16178 (license license:asl2.0)))
16179
79869f80
RW
16180(define-public python-astunparse
16181 (package
16182 (name "python-astunparse")
47d79541 16183 (version "1.6.2")
79869f80
RW
16184 (source
16185 (origin
16186 (method url-fetch)
16187 (uri (pypi-uri "astunparse" version))
16188 (sha256
47d79541 16189 (base32 "0rzbc44xcvzjhhiy7wac96mgal5mcjz1mfq8rmvgswskf4kf9cys"))))
79869f80 16190 (build-system python-build-system)
47d79541 16191 (arguments '(#:tests? #f)) ; there are none
79869f80
RW
16192 (propagated-inputs
16193 `(("python-six" ,python-six)
16194 ("python-wheel" ,python-wheel)))
16195 (home-page "https://github.com/simonpercivall/astunparse")
16196 (synopsis "AST unparser for Python")
16197 (description "This package provides an AST unparser for Python. It is a
16198factored out version of @code{unparse} found in the Python source
16199distribution.")
16200 (license license:bsd-3)))
16201
2884aac0
RW
16202(define-public python-gast
16203 (package
16204 (name "python-gast")
bd300261 16205 (version "0.2.2")
2884aac0
RW
16206 (source
16207 (origin
16208 (method url-fetch)
16209 (uri (pypi-uri "gast" version))
16210 (sha256
bd300261 16211 (base32 "1w5dzdb3gpcfmd2s0b93d8gff40a1s41rv31458z14inb3s9v4zy"))))
2884aac0
RW
16212 (build-system python-build-system)
16213 (propagated-inputs
16214 `(("python-astunparse" ,python-astunparse)))
16215 (home-page "https://pypi.org/project/gast/")
16216 (synopsis "Generic Python AST that abstracts the underlying Python version")
16217 (description
16218 "GAST provides a compatibility layer between the AST of various Python
16219versions, as produced by @code{ast.parse} from the standard @code{ast}
16220module.")
16221 (license license:bsd-3)))
16222
44d10b1f
RW
16223(define-public python-wikidata
16224 (package
16225 (name "python-wikidata")
16226 (version "0.6.1")
16227 (source
16228 (origin
16229 (method url-fetch)
16230 (uri (pypi-uri "Wikidata" version))
16231 (sha256
16232 (base32
16233 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
16234 (build-system python-build-system)
16235 (propagated-inputs
16236 `(("python-babel" ,python-babel)))
16237 (home-page "https://github.com/dahlia/wikidata")
16238 (synopsis "Wikidata client library")
16239 (description
16240 "This package provides a Python interface to
16241@url{https://www.wikidata.org/, Wikidata}.")
16242 (properties '((upstream-name . "Wikidata")))
16243 (license license:gpl3+)))
16244
16245(define-public python-doctest-ignore-unicode
16246 (package
16247 (name "python-doctest-ignore-unicode")
16248 (version "0.1.2")
16249 (source
16250 (origin
16251 (method url-fetch)
16252 (uri (pypi-uri "doctest-ignore-unicode" version))
16253 (sha256
16254 (base32
16255 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
16256 (build-system python-build-system)
16257 (native-inputs
16258 `(("python-nose" ,python-nose)))
16259 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
16260 (synopsis "Ignore Unicode literal prefixes in doctests")
16261 (description
16262 "This package adds support for a flag to ignore Unicode literal prefixes
16263in doctests.")
16264 (license license:asl2.0)))
16265
16266(define-public python-attr
16267 (package
16268 (name "python-attr")
16269 (version "0.3.1")
16270 (source
16271 (origin
16272 (method url-fetch)
16273 (uri (pypi-uri "attr" version))
16274 (sha256
16275 (base32
16276 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
16277 (build-system python-build-system)
16278 (home-page "https://github.com/denis-ryzhkov/attr")
16279 (synopsis "Decorator for attributes of target function or class")
16280 (description "Simple decorator to set attributes of target function or
16281class in a @acronym{DRY, Don't Repeat Yourself} way.")
16282 (license license:expat)))
f98232a3
VC
16283
16284(define-public python-construct
16285 (package
16286 (name "python-construct")
16287 (version "2.9.45")
16288 (source
16289 (origin
16290 (method url-fetch)
16291 (uri (pypi-uri "construct" version))
16292 (sha256
16293 (base32
16294 "130iy05awzigm2xah2yvlmb08mac5bi4gzr5m3g7k1krs3ps0w92"))))
16295 (build-system python-build-system)
16296 (arguments
16297 `(#:tests? #f)) ; No tests exist.
16298 (propagated-inputs
16299 `(("python-extras" ,python-extras)
16300 ("python-arrow" ,python-arrow)
16301 ("python-numpy" ,python-numpy)
16302 ("python-ruamel.yaml" ,python-ruamel.yaml)))
16303 (home-page "http://construct.readthedocs.io")
16304 (synopsis "Declarative and symmetrical parser and builder for binary data")
16305 (description
16306 "This package provides both simple, atomic constructs (such as
16307integers of various sizes), as well as composite ones which allow you
16308form hierarchical and sequential structures of increasing complexity.
16309It features bit and byte granularity, easy debugging and testing, an
16310easy-to-extend subclass system, and lots of primitive constructs to
16311make your work easier.")
16312 (license license:expat)))
b742c006
LF
16313
16314(define-public python-humanize
16315 (package
16316 (name "python-humanize")
16317 (version "0.5.1")
16318 (source
16319 (origin
16320 (method url-fetch)
16321 (uri (pypi-uri "humanize" version))
16322 (sha256
16323 (base32
16324 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
16325 (arguments
16326 '(#:tests? #f)) ; tests not in pypi archive
16327 (build-system python-build-system)
16328 (home-page "https://github.com/jmoiron/humanize")
16329 (synopsis "Print numerical information in a human-readable form")
16330 (description "This package provides a Python module that displays numbers
16331and dates in \"human readable\" forms. For example, it would display
16332\"12345591313\" as \"12.3 billion\".")
16333 (license license:expat)))
d5bbf66d
LF
16334
16335(define-public python-txaio
16336 (package
16337 (name "python-txaio")
16338 (version "18.8.1")
16339 (source
16340 (origin
16341 (method url-fetch)
16342 (uri (pypi-uri "txaio" version))
16343 (sha256
16344 (base32
16345 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
16346 (build-system python-build-system)
16347 (propagated-inputs
16348 `(("python-twisted" ,python-twisted)
16349 ("python-six" ,python-six)))
16350 (home-page "https://github.com/crossbario/txaio")
16351 (synopsis "Compatibility layer between Python asyncio and Twisted")
16352 (description "Txaio provides a compatibility layer between the Python
16353@code{asyncio} module and @code{Twisted}.")
16354 (license license:expat)))
963dfd3a
RW
16355
16356(define-public python-toolshed
16357 (package
16358 (name "python-toolshed")
16359 (version "0.4.6")
16360 (source
16361 (origin
16362 (method url-fetch)
16363 (uri (pypi-uri "toolshed" version))
16364 (sha256
16365 (base32
16366 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
16367 (build-system python-build-system)
16368 (native-inputs
16369 `(("python-nose" ,python-nose)))
16370 (home-page "https://github.com/brentp/toolshed/")
16371 (synopsis "Collection of modules and functions for working with data")
16372 (description "This is a collection of well-tested, simple modules and
16373functions that aim to reduce boilerplate when working with data.")
16374 (license license:bsd-2)))
c91ecf2d
RW
16375
16376(define-public python-annoy
16377 (package
16378 (name "python-annoy")
16379 (version "1.15.1")
16380 (source
16381 (origin
16382 (method url-fetch)
16383 (uri (pypi-uri "annoy" version))
16384 (sha256
16385 (base32
16386 "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp"))))
16387 (build-system python-build-system)
16388 (native-inputs
16389 `(("python-nose" ,python-nose)))
16390 (home-page "https://github.com/spotify/annoy/")
16391 (synopsis "Approximate nearest neighbors library")
16392 (description
16393 "Annoy is a C++ library with Python bindings to search for points in
16394space that are close to a given query point. It also creates large read-only
16395file-based data structures that are @code{mmap}ped into memory so that many
16396processes may share the same data.")
16397 (license license:asl2.0)))
412342d1 16398
79bfa422 16399(define-public python-pylzma
412342d1 16400 (package
79bfa422
DM
16401 (name "python-pylzma")
16402 (version "0.5.0")
16403 (source
16404 (origin
16405 (method url-fetch)
16406 (uri (pypi-uri "pylzma" version))
16407 (sha256
16408 (base32
16409 "074anvhyjgsv2iby2ql1ixfvjgmhnvcwjbdz8gk70xzkzcm1fx5q"))))
412342d1 16410 (build-system python-build-system)
79bfa422
DM
16411 (home-page "http://www.joachim-bauch.de/projects/pylzma/")
16412 (synopsis "Python bindings for the LZMA library by Igor Pavlov.")
16413 (description "This package provides Python bindings for the LZMA library
16414by Igor Pavlov.")
16415 (license license:lgpl2.1+)))
16416
16417(define-public python2-pylzma
16418 (package-with-python2 python-pylzma))
f825e605 16419
6609ebe7
AG
16420(define-public python2-zeroconf
16421 (package
16422 (name "python2-zeroconf")
16423
16424 ;; This is the last version that supports Python 2.x.
16425 (version "0.19.1")
16426 (source
16427 (origin
16428 (method url-fetch)
16429 (uri (pypi-uri "zeroconf" version))
16430 (sha256
16431 (base32
16432 "0ykzg730n915qbrq9bn5pn06bv6rb5zawal4sqjyfnjjm66snkj3"))))
16433 (build-system python-build-system)
16434 (arguments
16435 `(#:python ,python-2
16436 #:phases
16437 (modify-phases %standard-phases
16438 (add-after 'unpack 'patch-requires
16439 (lambda* (#:key inputs #:allow-other-keys)
16440 (substitute* "setup.py"
16441 (("enum-compat")
16442 "enum34"))
16443 #t)))))
16444 (native-inputs
16445 `(("python2-six" ,python2-six)
16446 ("python2-enum32" ,python2-enum34)
16447 ("python2-netifaces" ,python2-netifaces)
16448 ("python2-typing" ,python2-typing)))
16449 (home-page "https://github.com/jstasiak/python-zeroconf")
16450 (synopsis "Pure Python mDNS service discovery")
16451 (description
16452 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
16453compatible).")
16454 (license license:lgpl2.1+)))
16455
f825e605
GLV
16456(define-public python-bsddb3
16457 (package
16458 (name "python-bsddb3")
16459 (version "6.2.6")
16460 (source
16461 (origin
16462 (method url-fetch)
16463 (uri (pypi-uri "bsddb3" version))
16464 (sha256
16465 (base32
16466 "019db2y6bfmiqbrgg9x9f6h72qjmqh05czdn2v5sy9bl0gs23mj2"))))
16467 (build-system python-build-system)
16468 (inputs
16469 `(("bdb" ,bdb)))
16470 (arguments
16471 '(#:phases
16472 (modify-phases %standard-phases
16473 (add-after 'unpack 'configure-locations
16474 (lambda* (#:key inputs #:allow-other-keys)
16475 (setenv "BERKELEYDB_DIR" (assoc-ref inputs "bdb"))
16476 (setenv "YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION" "1")
16477 #t))
16478 (replace 'check
16479 (lambda _
16480 (invoke "python3" "test3.py" "-v"))))))
16481 (home-page "https://www.jcea.es/programacion/pybsddb.htm")
16482 (synopsis "Python bindings for Oracle Berkeley DB")
16483 (description
16484 "This module provides a nearly complete wrapping of the Oracle/Sleepycat
16485C API for the Database Environment, Database, Cursor, Log Cursor, Sequence and
16486Transaction objects, and each of these is exposed as a Python type in the
16487bsddb3.db module. The database objects can use various access methods: btree,
16488hash, recno, and queue. Complete support of Berkeley DB distributed
16489transactions. Complete support for Berkeley DB Replication Manager.
16490Complete support for Berkeley DB Base Replication. Support for RPC.")
16491 (license license:bsd-3)))
edeb04bf
PL
16492
16493(define-public python-dbfread
16494 (package
16495 (name "python-dbfread")
16496 (version "2.0.7")
16497 (source (origin
16498 (method url-fetch)
16499 (uri (pypi-uri "dbfread" version))
16500 (sha256
16501 (base32
16502 "0gdpwdzf1fngsi6jrdyj4qdf6cr7gnnr3zp80dpkzbgz0spskj07"))))
16503 (build-system python-build-system)
16504 (native-inputs
16505 `(("python-pytest" ,python-pytest)))
16506 (home-page "https://dbfread.readthedocs.io")
16507 (synopsis "Read DBF Files with Python")
16508 (description
16509 "This library reads DBF files and returns the data as native Python data
16510types for further processing. It is primarily intended for batch jobs and
16511one-off scripts.")
16512 (license license:expat)))
e308b4f0
JM
16513
16514(define-public python-cached-property
16515 (package
16516 (name "python-cached-property")
16517 (version "1.5.1")
16518 (source
16519 (origin
16520 (method url-fetch)
16521 (uri (pypi-uri "cached-property" version))
16522 (sha256
16523 (base32
16524 "010m1bl380l2r3vwq24r5v14l6gwvgm9v0mqqjkjss552jgsa5wj"))))
16525 (build-system python-build-system)
16526 (arguments
16527 `(#:phases
16528 (modify-phases %standard-phases
16529 ;; https://github.com/pydanny/cached-property/issues/131
16530 ;; recent versions of freezegun break one test
16531 (add-after 'unpack 'disable-broken-test
16532 (lambda _
16533 (substitute* "tests/test_cached_property.py"
16534 (("def test_threads_ttl_expiry\\(self\\)" m)
16535 (string-append "@unittest.skip(\"Disabled by Guix\")\n"
16536 " " m)))
16537 #t)))))
16538 (native-inputs
16539 `(("python-freezegun" ,python-freezegun)))
16540 (home-page
16541 "https://github.com/pydanny/cached-property")
16542 (synopsis
16543 "Decorator for caching properties in classes")
16544 (description
16545 "This package provides a decorator which makes caching
16546time-or-computationally-expensive properties quick and easy and works in Python
165472 or 3.")
16548 (license license:bsd-3)))
dfe8a704
NG
16549
16550(define-public python-folium
16551 (package
16552 (name "python-folium")
d3bc1ea9 16553 (version "0.10.1")
dfe8a704
NG
16554 (source
16555 (origin
16556 (method url-fetch)
16557 (uri (pypi-uri "folium" version))
16558 (sha256
16559 (base32
d3bc1ea9 16560 "0gcc267wxwxr57ry86pqpbiyfvl0g48hfvgy0f2mz9s58g87kgzd"))))
dfe8a704
NG
16561 (build-system python-build-system)
16562 (propagated-inputs
16563 `(("python-branca" ,python-branca)
16564 ("python-jinja2" ,python-jinja2)
16565 ("python-numpy" ,python-numpy)
16566 ("python-requests" ,python-requests)))
16567 (native-inputs
16568 `(("python-pytest" ,python-pytest)))
16569 (home-page "https://github.com/python-visualization/folium")
16570 (synopsis "Make beautiful maps with Leaflet.js & Python")
16571 (description "@code{folium} makes it easy to visualize data that’s been
16572manipulated in Python on an interactive leaflet map. It enables both the
16573binding of data to a map for @code{choropleth} visualizations as well as
16574passing rich vector/raster/HTML visualizations as markers on the map.
16575
16576The library has a number of built-in tilesets from OpenStreetMap, Mapbox, and
16577Stamen, and supports custom tilesets with Mapbox or Cloudmade API keys. It
16578supports Image, Video, GeoJSON and TopoJSON overlays.")
16579 (license license:expat)))
9dd5f475
LC
16580
16581(define-public jube
16582 (package
16583 ;; This is a command-line tool, so no "python-" prefix.
16584 (name "jube")
16585 (version "2.2.2")
16586 (source (origin
16587 (method url-fetch)
16588 (uri (string-append
16589 "http://apps.fz-juelich.de/jsc/jube/jube2/download.php?version="
16590 version))
16591 (sha256
16592 (base32
16593 "0xq4k1q63s1p6swgyp61vahlrd1fqmgbm0gm5kpj8ikwy0yc0nqk"))
16594 (file-name (string-append "jube-" version ".tar.gz"))))
16595 (build-system python-build-system)
16596 (home-page "https://apps.fz-juelich.de/jsc/jube/jube2/docu/index.html")
16597 (synopsis "Benchmarking environment")
16598 (description
16599 "JUBE helps perform and analyze benchmarks in a systematic way. For each
16600benchmarked application, benchmark data is stored in a format that allows JUBE
16601to deduct the desired information. This data can be parsed by automatic pre-
16602and post-processing scripts that draw information and store it more densely
16603for manual interpretation.")
a9f33960 16604 (license license:gpl3+)))
66436424
NG
16605
16606(define-public python-pyroutelib3
16607 (package
16608 (name "python-pyroutelib3")
16609 (version "1.3.post1")
16610 (source
16611 (origin
16612 (method url-fetch)
16613 (uri (pypi-uri "pyroutelib3" version))
16614 (sha256
16615 (base32
16616 "1hpbydpn2alyswiajfbvhzq4c7f36vdmvxy91hgv8l1lb2g2vfrj"))))
16617 (build-system python-build-system)
16618 (propagated-inputs
16619 `(("python-dateutil" ,python-dateutil)))
16620 (home-page "https://github.com/MKuranowski/pyroutelib3")
16621 (synopsis "Library for simple routing on OSM data")
16622 (description "Library for simple routing on OSM data")
16623 (license license:gpl3+)))
30e7c03a 16624
c1bbef69
16625(define-public python-bibtexparser
16626 (package
16627 (name "python-bibtexparser")
16628 (version "1.1.0")
16629 (source
16630 (origin
16631 (method url-fetch)
16632 (uri (pypi-uri "bibtexparser" version))
16633 (sha256
16634 (base32
16635 "0zwhfkrzf3n5847dbnfng92k7ak199l9v6x6ax3dgdidfpm6d2fz"))))
16636 (build-system python-build-system)
16637 (propagated-inputs
16638 `(("python-pyparsing" ,python-pyparsing)))
16639 (native-inputs
16640 `(("python-future" ,python-future)))
16641 (home-page "https://github.com/sciunto-org/python-bibtexparser")
16642 (synopsis "Python library to parse BibTeX files")
16643 (description "BibtexParser is a Python library to parse BibTeX files.")
16644 (license (list license:bsd-3 license:lgpl3))))
8581b40d
HG
16645
16646(define-public python-distro
16647 (package
16648 (name "python-distro")
16649 (version "1.4.0")
16650 (source
16651 (origin
16652 (method url-fetch)
16653 (uri (pypi-uri "distro" version))
16654 (sha256
16655 (base32
16656 "0mrg75w4ap7mdzyga75yaid9n8bgb345ih5mwjp3plj6v1jxwb9n"))))
16657 (build-system python-build-system)
16658 (native-inputs
16659 `(("python-pytest" ,python-pytest)))
16660 (home-page "https://github.com/nir0s/distro")
16661 (synopsis
16662 "OS platform information API")
16663 (description
16664 "@code{distro} provides information about the OS distribution it runs on,
16665such as a reliable machine-readable ID, or version information.
16666
16667It is the recommended replacement for Python's original
16668`platform.linux_distribution` function (which will be removed in Python 3.8).
16669@code{distro} also provides a command-line interface to output the platform
16670information in various formats.")
16671 (license license:asl2.0)))
f2f41e1a
HG
16672
16673(define-public python-cairosvg
16674 (package
16675 (name "python-cairosvg")
16676 (version "2.4.2")
16677 (source
16678 (origin
16679 (method url-fetch)
16680 (uri (pypi-uri "CairoSVG" version))
16681 (sha256
16682 (base32 "1bb7irxbaxxb9ahm3z5wsx1q96mm5gzskc7b6q07h9ikcnb8yrjf"))))
16683 (build-system python-build-system)
16684 (arguments
16685 `(#:phases
16686 (modify-phases %standard-phases
16687 (replace 'check
16688 (lambda _ (invoke "pytest"))))))
16689 (propagated-inputs
16690 `(("python-cairocffi" ,python-cairocffi)
16691 ("python-cssselect2" ,python-cssselect2)
16692 ("python-defusedxml" ,python-defusedxml)
16693 ("python-pillow" ,python-pillow)
16694 ("python-tinycss2" ,python-tinycss2)))
16695 (native-inputs
16696 `(("python-pytest-flake8" ,python-pytest-flake8)
16697 ("python-pytest-isort" ,python-pytest-isort)
16698 ("python-pytest-runner" ,python-pytest-runner)))
16699 (home-page "https://cairosvg.org/")
16700 (synopsis "SVG to PDF/PS/PNG converter based on Cairo")
16701 (description "CairoSVG is a SVG converter based on Cairo. It can export
16702SVG files to PDF, PostScript and PNG files. The main part of CairoSVG is a
16703SVG parser, trying to follow the SVG 1.1 recommendation from the W3C. Once
16704parsed, the result is drawn to a Cairo surface that can be exported to
16705qvarious formats: PDF, PostScript, PNG and even SVG.")
16706 (license license:lgpl3+)))
ea1801e0
HG
16707
16708(define-public python-pyphen
16709 (package
16710 (name "python-pyphen")
16711 (version "0.9.5")
16712 (source
16713 (origin
16714 (method url-fetch)
16715 (uri (pypi-uri "Pyphen" version))
16716 (sha256
16717 (base32 "08c9y69ry9d6m4zalhnalg86lsp9v2j5n1ziw5vxfmiihx83lqrv"))))
16718 (build-system python-build-system)
16719 ;; TODO: Use the Guix system hyphenation packages hyphen-* rather than the
16720 ;; embedded set provided by upstream - like Debian does.
16721 (home-page "https://github.com/Kozea/Pyphen")
16722 (synopsis "Pure Python module to hyphenate text")
16723 (description "Pyphen is a pure Python module to hyphenate text using
16724existing Hunspell hyphenation dictionaries.")
16725 (license (list license:gpl2 license:lgpl2.1 license:mpl1.1))))
85cfb0e9
CL
16726
16727(define-public python-intelhex
16728 (package
16729 (name "python-intelhex")
16730 (version "2.2.1")
16731 (source
16732 (origin
16733 (method url-fetch)
16734 (uri (pypi-uri "intelhex" version))
16735 (sha256
16736 (base32
16737 "0ckqjbxd8gwcg98gfzpn4vq1qxzfvq3rdbrr1hikj1nmw08qb780"))))
16738 (build-system python-build-system)
16739 (arguments '(#:tests? #f)) ;issue with version
16740 (home-page "https://pypi.org/project/IntelHex/")
16741 (synopsis "Python library for Intel HEX files manipulations")
16742 (description "The Intel HEX file format is widely used in microprocessors
16743and microcontrollers area (embedded systems etc.) as the de facto standard for
16744representation of code to be programmed into microelectronic devices. This
16745package provides an intelhex Python library to read, write, create from
16746scratch and manipulate data from Intel HEX file format. It also includes
16747several convenience Python scripts, including \"classic\" hex2bin and bin2hex
16748converters and more, those based on the library itself.")
16749 (license license:bsd-3)))
34bf6869
CL
16750
16751(define-public python-pykwalify
16752 (package
16753 (name "python-pykwalify")
16754 (version "1.7.0")
16755 (source
16756 (origin
16757 (method url-fetch)
16758 (uri (pypi-uri "pykwalify" version))
16759 (sha256
16760 (base32
16761 "1cnfzkg1b01f825ikpw2fhjclf9c8akxjfrbd1vc22x1lg2kk2vy"))))
16762 (build-system python-build-system)
16763 (arguments '(#:tests? #f)) ;missing dependencies
16764 (propagated-inputs
16765 `(("python-dateutil" ,python-dateutil)
16766 ("python-docopt" ,python-docopt)
16767 ("python-pyyaml" ,python-pyyaml)))
16768 (home-page "https://github.com/grokzen/pykwalify")
16769 (synopsis
16770 "Python lib/cli for JSON/YAML schema validation")
16771 (description
16772 "This package provides a parser, schema validator, and data binding tool
16773for YAML and JSON.")
16774 (license license:expat)))
e2ebbbcc
KK
16775
16776(define-public python-dbusmock
16777 (package
022b0d5f
BG
16778 (name "python-dbusmock")
16779 (version "0.18.3")
16780 (source
16781 (origin
16782 (method url-fetch)
16783 (uri (pypi-uri "python-dbusmock" version))
16784 (sha256
e2ebbbcc 16785 (base32
022b0d5f
BG
16786 "0hp2kyac88nh9iv6l8hlmv7s1sa1s5f1a3wc2pmlmmxnd211fjlr"))))
16787 (build-system python-build-system)
16788 (arguments
16789 '(#:phases
16790 (modify-phases %standard-phases
16791 (add-after 'unpack 'patch-shell-path
16792 (lambda _
16793 (substitute* "tests/test_code.py"
16794 (("/bin/bash") (which "bash")))
16795 #t)))))
16796 (native-inputs
16797 `(;; For tests.
16798 ("dbus" ,dbus) ; for dbus-daemon
16799 ("python-nose" ,python-nose)
16800 ("which" ,which)))
16801 (propagated-inputs
16802 `(("python-dbus" ,python-dbus)
16803 ("python-pygobject" ,python-pygobject)))
16804 (home-page "https://github.com/martinpitt/python-dbusmock")
16805 (synopsis "Python library for mock D-Bus objects")
16806 (description "python-dbusmock allows for the easy creation of mock objects on
e2ebbbcc
KK
16807D-Bus. This is useful for writing tests for software which talks to D-Bus
16808services such as upower, systemd, logind, gnome-session or others, and it is
16809hard (or impossible without root privileges) to set the state of the real
16810services to what you expect in your tests.")
022b0d5f 16811 (license license:lgpl3+)))
b657b23f
BG
16812
16813(define-public python-ujson
16814 (package
16815 (name "python-ujson")
16816 (version "1.35")
16817 (source
16818 (origin
16819 (method url-fetch)
16820 (uri (pypi-uri "ujson" version))
16821 (sha256
16822 (base32
16823 "11jz5wi7mbgqcsz52iqhpyykiaasila4lq8cmc2d54bfa3jp6q7n"))))
16824 (build-system python-build-system)
16825 (home-page "http://www.esn.me")
16826 (synopsis
16827 "Ultra fast JSON encoder and decoder for Python")
16828 (description
16829 "UltraJSON is an ultra fast JSON encoder and decoder written in pure C with
16830 bindings for Python 2.5+ and 3.")
16831 (license license:bsd-3)))
16832
16833(define-public python2-ujson
16834 (package-with-python2 python-ujson))
dbcef44a
MIP
16835
16836(define-public python-iocapture
16837 ;; The latest release is more than a year older than this commit.
16838 (let ((commit "fdc021c431d0840303908dfc3ca8769db383595c")
16839 (revision "1"))
16840 (package
16841 (name "python-iocapture")
16842 (version "0.1.2")
16843 (source
16844 (origin
16845 (method git-fetch)
16846 (uri (git-reference
16847 (url "https://github.com/oinume/iocapture.git")
16848 (commit commit)))
16849 (file-name (git-file-name name version))
16850 (sha256
16851 (base32
16852 "1mkbhqibxvgwg0p7slr8dfraa3g2s6bsayladhax2jccwj4kcndz"))))
16853 (build-system python-build-system)
16854 (arguments
16855 `(#:phases
16856 (modify-phases %standard-phases
16857 (delete 'check)
16858 (add-after 'install 'check
16859 (lambda* (#:key inputs outputs #:allow-other-keys)
16860 (add-installed-pythonpath inputs outputs)
16861 (invoke "py.test" "-v" "tests")
16862 #t)))))
16863 (propagated-inputs
16864 `(("python-flexmock" ,python-flexmock)
16865 ("python-pytest" ,python-pytest)
16866 ("python-pytest-cov" ,python-pytest-cov)
16867 ("python-six" ,python-six)))
16868 (home-page "https://github.com/oinume/iocapture")
16869 (synopsis "Python capturing tool for stdout and stderr")
16870 (description
16871 "This package helps you to capture the standard out (stdout) and the
16872standard error channel (stderr) in your program.")
16873 (license license:expat))))
db6bd842
MIP
16874
16875(define-public python-argh
16876 ;; There are 21 commits since the latest release containing important
16877 ;; improvements.
16878 (let ((commit "dcd3253f2994400a6a58a700c118c53765bc50a4")
16879 (revision "1"))
16880 (package
16881 (name "python-argh")
16882 (version (git-version "0.26.2" revision commit))
16883 (source
16884 (origin
16885 (method git-fetch)
16886 (uri (git-reference
16887 (url "https://github.com/neithere/argh.git")
16888 (commit commit)))
16889 (file-name (git-file-name name version))
16890 (sha256
16891 (base32
16892 "1p5h3dnpbsjmqrvil96s71asc6i3gpinmbrabqmwnrsxprz7r3ns"))))
16893 (build-system python-build-system)
16894 (propagated-inputs
16895 `(("python-iocapture" ,python-iocapture)
16896 ("python-mock" ,python-mock)
16897 ("python-pytest" ,python-pytest)
16898 ("python-pytest-cov" ,python-pytest-cov)
16899 ("python-pytest-xdist" ,python-pytest-xdist)
16900 ("python-tox" ,python-tox)))
16901 (home-page "https://github.com/neithere/argh/")
16902 (synopsis "Argparse wrapper with natural syntax")
16903 (description
16904 "python-argh is a small library that provides several layers of
16905abstraction on top of @code{python-argparse}. The layers can be mixed. It is
16906always possible to declare a command with the highest possible (and least
16907flexible) layer and then tune the behaviour with any of the lower layers
16908including the native API of @code{python-argparse}.")
16909 (license license:lgpl3+))))
073723fa
MIP
16910
16911(define-public python-ppft
16912 (package
16913 (name "python-ppft")
16914 (version "1.6.6.1")
16915 (source
16916 (origin
16917 (method url-fetch)
16918 (uri (pypi-uri "ppft" version))
16919 (sha256
16920 (base32
16921 "1z1invkhszc5d2mvgr221v7cszzifcc77mz0pv3wjp6x5q2768cy"))))
16922 (build-system python-build-system)
16923 (arguments '(#:tests? #f)) ; there are none
16924 (propagated-inputs
16925 `(("python-six" ,python-six)))
16926 (home-page "https://pypi.org/project/ppft/")
16927 (synopsis "Fork of Parallel Python")
16928 (description
16929 "This package is a fork of Parallel Python. The Parallel Python
16930module (@code{pp}) provides an easy and efficient way to create
16931parallel-enabled applications for @dfn{symmetric multiprocessing} (SMP)
16932computers and clusters. It features cross-platform portability and dynamic
16933load balancing.")
16934 (license license:bsd-3)))
8451ea19
MIP
16935
16936(define-public python-pox
16937 (package
16938 (name "python-pox")
16939 (version "0.2.7")
16940 (source
16941 (origin
16942 (method url-fetch)
16943 (uri (pypi-uri "pox" version))
16944 (sha256
16945 (base32
16946 "0y17ckc2p6i6709s279sjdj4q459mpcc38ymg9zv9y6vl6jf3bq6"))))
16947 (build-system python-build-system)
16948 (arguments
16949 `(#:phases
16950 (modify-phases %standard-phases
16951 (replace 'check
16952 (lambda _
16953 (mkdir-p "/tmp/guix")
16954 (setenv "SHELL" "bash")
16955 (setenv "USERNAME" "guix")
16956 (setenv "HOME" "/tmp/guix") ; must end on USERNAME...
16957 (invoke "py.test" "-vv")
16958 #t)))))
16959 (native-inputs
16960 `(("python-pytest" ,python-pytest)
16961 ("which" ,which)))
16962 (home-page "https://pypi.org/project/pox/")
16963 (synopsis "Python utilities for filesystem exploration and automated builds")
16964 (description
16965 "Pox provides a collection of utilities for navigating and manipulating
16966filesystems. This module is designed to facilitate some of the low level
16967operating system interactions that are useful when exploring a filesystem on a
16968remote host. Pox provides Python equivalents of several shell commands such
16969as @command{which} and @command{find}. These commands allow automated
16970discovery of what has been installed on an operating system, and where the
16971essential tools are located.")
16972 (license license:bsd-3)))
7e476ae8
MIP
16973
16974(define-public python-pathos
16975 (package
16976 (name "python-pathos")
16977 (version "0.2.5")
16978 (source
16979 (origin
16980 (method url-fetch)
16981 (uri (pypi-uri "pathos" version))
16982 (sha256
16983 (base32
16984 "0in8hxdz7k081ijn6q94gr39ycy7363sx4zysmbwyvd7snqjrbi1"))))
16985 (build-system python-build-system)
8f82e7e3
EF
16986 (arguments
16987 '(#:phases
16988 (modify-phases %standard-phases
16989 (replace 'check
16990 (lambda _
16991 (setenv "PYTHONPATH"
16992 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
16993 (invoke "python" "./tests/__main__.py"))))))
7e476ae8
MIP
16994 (propagated-inputs
16995 `(("python-dill" ,python-dill)
16996 ("python-multiprocess" ,python-multiprocess)
16997 ("python-pox" ,python-pox)
16998 ("python-ppft" ,python-ppft)))
8f82e7e3
EF
16999 (native-inputs
17000 `(("python-pytest" ,python-pytest)))
7e476ae8
MIP
17001 (home-page "https://pypi.org/project/pathos/")
17002 (synopsis
17003 "Parallel graph management and execution in heterogeneous computing")
17004 (description
17005 "Python-pathos is a framework for heterogenous computing. It provides a
17006consistent high-level interface for configuring and launching parallel
17007computations across heterogenous resources. Python-pathos provides configurable
17008launchers for parallel and distributed computing, where each launcher contains
17009the syntactic logic to configure and launch jobs in an execution environment.")
17010 (license license:bsd-3)))
54e5ee5a
BG
17011
17012(define-public python-flit
17013 (package
17014 (name "python-flit")
17015 (version "2.1.0")
17016 (source
17017 (origin
17018 (method url-fetch)
17019 (uri (pypi-uri "flit" version))
17020 (sha256
17021 (base32
17022 "0h5vvmqinqzn97mr3ix7zx53af9ad4fimjjwqpx88yp8qhz4r5bc"))))
17023 (build-system python-build-system)
17024 (arguments
17025 `(#:tests? #f)) ; XXX: Check requires network access.
17026 (home-page "https://flit.readthedocs.io/")
17027 (synopsis
17028 "Simple packaging tool for simple packages")
17029 (description
17030 "Flit is a simple way to put Python packages and modules on PyPI. Flit
17031packages a single importable module or package at a time, using the import
17032name as the name on PyPI. All subpackages and data files within a package
17033are included automatically.")
17034 (license license:bsd-3)))
02139b42
BG
17035
17036(define-public python-pathtools
17037 (package
17038 (name "python-pathtools")
17039 (version "0.1.2")
17040 (source
17041 (origin
17042 (method url-fetch)
17043 (uri (pypi-uri "pathtools" version))
17044 (sha256
17045 (base32
17046 "1h7iam33vwxk8bvslfj4qlsdprdnwf8bvzhqh3jq5frr391cadbw"))))
17047 (build-system python-build-system)
17048 (home-page
17049 "https://github.com/gorakhargosh/pathtools")
17050 (synopsis "Path utilities for Python")
17051 (description "Pattern matching and various utilities for file systems
17052paths.")
17053 (license license:expat)))
6b520177
JG
17054
17055(define-public python-fastentrypoints
17056 (package
17057 (name "python-fastentrypoints")
17058 (version "0.12")
17059 (source
17060 (origin
17061 (method url-fetch)
17062 (uri (pypi-uri "fastentrypoints" version))
17063 (sha256
17064 (base32
17065 "02s1j8i2dzbpbwgq2a3fiqwm3cnmhii2qzc0k42l0rdxd4a4ya7z"))))
17066 (build-system python-build-system)
17067 (home-page
17068 "https://github.com/ninjaaron/fast-entry_points")
17069 (synopsis
17070 "Makes entry_points specified in setup.py load more quickly")
17071 (description
17072 "Using entry_points in your setup.py makes scripts that start really
17073slowly because it imports pkg_resources. This package allows such setup
17074scripts to load entry points more quickly.")
17075 (license license:bsd-3)))
c5eb8cf8
JG
17076
17077(define-public python-funcparserlib
17078 (package
17079 (name "python-funcparserlib")
17080 (version "0.3.6")
17081 (source
17082 (origin
17083 (method url-fetch)
17084 (uri (pypi-uri "funcparserlib" version))
17085 (sha256
17086 (base32
17087 "07f9cgjr3h4j2m67fhwapn8fja87vazl58zsj4yppf9y3an2x6dp"))))
17088 (native-inputs
17089 `(("python-tox" ,python-tox)))
17090 (arguments
17091 `(#:phases
17092 (modify-phases %standard-phases
17093 (replace 'check
17094 (lambda _
17095 (invoke "tox"))))))
17096 (build-system python-build-system)
17097 (home-page
17098 "https://github.com/vlasovskikh/funcparserlib")
17099 (synopsis
17100 "Recursive descent parsing library based on functional combinators")
17101 (description
11140cf1 17102 "This package is a recursive descent parsing library for Python based on
c5eb8cf8
JG
17103functional combinators. Parser combinators are just higher-order functions
17104that take parsers as their arguments and return them as result values.")
17105 (license license:expat)))
602f3b67
NG
17106
17107(define-public python-speg
17108 (package
17109 (name "python-speg")
17110 (version "0.3")
17111 (source
17112 (origin
17113 (method url-fetch)
17114 (uri (pypi-uri "speg" version ".zip"))
17115 (sha256
17116 (base32 "0w9y4jf4787dzhy6rvhwi0mpl0r8qkqmqmyv2hpwdpv8w53yzjqh"))))
17117 (arguments
17118 `(#:tests? #f)) ;FIXME: tests fail, not sure why
17119 (native-inputs
17120 `(("unzip" ,unzip)))
17121 (build-system python-build-system)
17122 (home-page "https://github.com/avakar/speg")
17123 (synopsis "PEG-based parser interpreter with memoization")
17124 (description "This package is a PEG-based parser and interpreter with
17125memoization.")
17126 (license license:expat)))
07c8177b
NG
17127
17128(define-public python-cson
17129 (package
17130 (name "python-cson")
17131 (version "0.8")
17132 (source
17133 (origin
17134 (method url-fetch)
17135 (uri (pypi-uri "cson" version))
17136 (sha256
17137 (base32 "00cyvigg4npbph39ghkg77xbxisa6plf75vii24igxfizik0337f"))))
17138 (build-system python-build-system)
17139 (propagated-inputs
17140 `(("python-speg" ,python-speg)))
17141 (home-page "https://github.com/avakar/pycson")
17142 (synopsis "Parser for Coffeescript Object Notation (CSON)")
17143 (description "This package is a parser for Coffeescript Object
17144Notation (CSON).")
17145 (license license:expat)))
e24c672e
LDB
17146
17147(define-public python-asynctest
17148 (package
17149 (name "python-asynctest")
17150 (version "0.13.0")
17151 (source
17152 (origin
17153 (method url-fetch)
17154 (uri (pypi-uri "asynctest" version))
17155 (sha256
17156 (base32
17157 "1b3zsy7p84gag6q8ai2ylyrhx213qdk2h2zb6im3xn0m5n264y62"))))
17158 (build-system python-build-system)
17159 (arguments
17160 '(#:phases
17161 (modify-phases %standard-phases
17162 (replace 'check
17163 (lambda _
17164 (invoke "python" "-X" "dev" "-m" "unittest" "-v" "test")))
17165 (add-after 'unpack 'disable-tests
17166 (lambda* _
17167 (substitute* "test/test_selector.py"
17168 ;; XXX: This test fails for unknown reason inside the build
17169 ;; environment.
17170 (("def test_events_watched_outside_test_are_ignored")
17171 "@unittest.skip('disabled by guix')
17172 def test_events_watched_outside_test_are_ignored")))))))
17173 (home-page "https://github.com/Martiusweb/asynctest")
17174 (synopsis "Extension of unittest for testing asyncio libraries")
17175 (description
17176 "The package asynctest is built on top of the standard unittest module
17177and cuts down boilerplate code when testing libraries for asyncio.")
17178 (license license:asl2.0)))
1cc9c38e
LDB
17179
17180(define-public python-aionotify
17181 (package
17182 (name "python-aionotify")
17183 (version "0.2.0")
17184 (source
17185 (origin
17186 ;; Source tarball on PyPi lacks tests
17187 (method git-fetch)
17188 (uri (git-reference
17189 (url "https://github.com/rbarrois/aionotify")
17190 (commit (string-append "v" version))))
17191 (file-name (git-file-name name version))
17192 (sha256
17193 (base32 "1sk9i8czxgsbrswsf1nlb4c82vgnlzi8zrvrxdip92w2z8hqh43y"))))
17194 (build-system python-build-system)
17195 (native-inputs `(("python-asynctest" ,python-asynctest)))
17196 (home-page "https://github.com/rbarrois/aionotify")
17197 (synopsis "Asyncio-powered inotify library")
17198 (description
17199 "@code{aionotify} is a simple, asyncio-based inotify library.")
17200 (license license:bsd-3)))
84efaa3b
LDB
17201
17202(define-public python-forbiddenfruit
17203 (package
17204 (name "python-forbiddenfruit")
17205 (version "0.1.3")
17206 (source
17207 (origin
17208 ;; Source tarball on PyPi lacks Makefile that builds and runs tests
17209 (method git-fetch)
17210 (uri (git-reference
17211 (url "https://github.com/clarete/forbiddenfruit")
17212 (commit version)))
17213 (file-name (git-file-name name version))
17214 (sha256
17215 (base32 "1fp2xvdqpi910j9r3q68x38phpxbm700gjdi2m2j5gs91xdnyyh2"))))
17216 (build-system python-build-system)
17217 (arguments
17218 '(#:phases
17219 (modify-phases %standard-phases
17220 (replace 'check
17221 (lambda _
17222 (invoke "make" "SKIP_DEPS=1"))))))
17223 (native-inputs
17224 `(("python-nose" ,python-nose)
17225 ("python-coverage" ,python-coverage)))
17226 (home-page "https://github.com/clarete/forbiddenfruit")
17227 (synopsis "Patch python built-in objects")
17228 (description "This project allows Python code to extend built-in types.")
17229 (license (list license:gpl3+ license:expat))))
9786258b
LDB
17230
17231(define-public python-shouldbe
17232 (package
17233 (name "python-shouldbe")
17234 (version "0.1.2")
17235 (source
17236 (origin
17237 (method url-fetch)
17238 (uri (pypi-uri "shouldbe" version))
17239 (sha256
17240 (base32
17241 "16zbvjxf71dl4yfbgcr6idyim3mdrfvix1dv8b95p0s9z07372pj"))))
17242 (build-system python-build-system)
17243 (propagated-inputs
17244 `(("python-forbiddenfruit" ,python-forbiddenfruit)))
17245 (native-inputs
17246 `(("python-nose" ,python-nose)))
17247 (home-page "https://github.com/directxman12/should_be")
17248 (synopsis "Python Assertion Helpers inspired by Shouldly")
17249 (description
17250 "Python Assertion Helpers inspired by Shouldly.")
17251 (license license:isc)))
72c2478a
LDB
17252
17253(define-public python-k5test
17254 (package
17255 (name "python-k5test")
17256 (version "0.9.2")
17257 (source
17258 (origin
17259 (method url-fetch)
17260 (uri (pypi-uri "k5test" version))
17261 (sha256
17262 (base32
17263 "1lqp3jgfngyhaxjgj3n230hn90wsylwilh120yjf62h7b1s02mh8"))))
17264 (build-system python-build-system)
17265 (propagated-inputs
17266 `(("python-six" ,python-six)
17267 ;; `which`, `kadmin.local` binaries called inside library
17268 ("which" ,which)
17269 ("mit-krb5" ,mit-krb5)))
17270 (native-inputs `(("mit-krb5" ,mit-krb5)))
17271 (arguments
17272 '(#:phases
17273 (modify-phases %standard-phases
17274 (add-after 'unpack 'patch-paths
17275 (lambda* _
17276 (substitute* "k5test/realm.py"
17277 (("'kadmin_local'") "'kadmin.local'")))))))
17278 (home-page "https://github.com/pythongssapi/k5test")
17279 (synopsis "Library for setting up self-contained Kerberos 5 environments")
17280 (description
17281 "@code{k5test} is a library for setting up self-contained Kerberos 5
17282environments, and running Python unit tests inside those environments. It is
17283based on the file of the same name found alongside the MIT Kerberos 5 unit
17284tests.")
17285 (license license:isc)))
a8ef4978
LDB
17286
17287(define-public python-gssapi
17288 (package
17289 (name "python-gssapi")
17290 (version "1.6.1")
17291 (source
17292 (origin
17293 (method url-fetch)
17294 (uri (pypi-uri "gssapi" version))
17295 (sha256
17296 (base32
17297 "1gymg4asvwrz7y13qpwp2s5g8qwq179d72gkj09q6bfcgs82l5wr"))))
17298 (build-system python-build-system)
17299 (propagated-inputs
17300 `(("python-decorator" ,python-decorator)
17301 ("python-six" ,python-six)))
17302 (inputs
17303 `(("mit-krb5" ,mit-krb5)))
17304 ;; for tests
17305 (native-inputs
17306 `(("python-shouldbe" ,python-shouldbe)
17307 ("python-parameterized" ,python-parameterized)
17308 ("python-k5test" ,python-k5test)
17309 ("python-nose" ,python-nose)))
17310 (home-page "https://github.com/pythongssapi/python-gssapi")
17311 (synopsis "Python GSSAPI Wrapper")
17312 (description
17313 "Python-GSSAPI provides both low-level and high level wrappers around the
17314GSSAPI C libraries. While it focuses on the Kerberos mechanism, it should
17315also be useable with other GSSAPI mechanisms.")
17316 (license license:isc)))
7261bdca
JL
17317
17318(define-public python-check-manifest
17319 (package
17320 (name "python-check-manifest")
17321 (version "0.37")
17322 (source
17323 (origin
17324 (method url-fetch)
17325 (uri (pypi-uri "check-manifest" version))
17326 (sha256
17327 (base32
17328 "0lk45ifdv2cpkl6ayfyix7jwmnxa1rha7xvb0ih5999k115wzqs4"))))
17329 (build-system python-build-system)
17330 (native-inputs
17331 `(("python-mock" ,python-mock)
17332 ("git" ,git)))
17333 (home-page "https://github.com/mgedmin/check-manifest")
17334 (synopsis "Check MANIFEST.in in a Python source package for completeness")
17335 (description "Python package can include a MANIFEST.in file to help with
17336sending package files to the Python Package Index. This package checks that
17337file to ensure it completely and accurately describes your project.")
17338 (license license:expat)))
b487b7b5
JL
17339
17340(define-public python-android-stringslib
17341 (package
17342 (name "python-android-stringslib")
17343 (version "0.1.2")
17344 (source
17345 (origin
17346 (method git-fetch)
17347 (uri (git-reference
17348 (url "https://framagit.org/tyreunom/python-android-strings-lib")
17349 (commit (string-append "v" version))))
17350 (file-name (git-file-name name version))
17351 (sha256
17352 (base32
17353 "0gij55qzzq1h83kfpvhai1vf78kkhyvxa6l17m2nl24454lhfin4"))))
17354 (build-system python-build-system)
17355 (arguments
17356 `(#:tests? #f))
17357 (home-page "https://framagit.org/tyreunom/python-android-strings-lib")
17358 (synopsis "Android strings.xml support")
17359 (description "Android Strings Lib provides support for android's strings.xml
17360files. These files are used to translate strings in android apps.")
17361 (license license:expat)))
87435943 17362
7dec888f
JL
17363(define-public python-watchdog
17364 (package
17365 (name "python-watchdog")
17366 (version "0.9.0")
17367 (source
17368 (origin
17369 (method url-fetch)
17370 (uri (pypi-uri "watchdog" version))
17371 (sha256
17372 (base32
17373 "07cnvvlpif7a6cg4rav39zq8fxa5pfqawchr46433pij0y6napwn"))))
17374 (build-system python-build-system)
17375 (arguments
17376 `(#:phases
17377 (modify-phases %standard-phases
17378 (add-before 'check 'remove-failing
17379 (lambda _
17380 (delete-file "tests/test_inotify_buffer.py")
17381 (delete-file "tests/test_snapshot_diff.py")
17382 #t)))))
17383 (propagated-inputs
17384 `(("python-argh" ,python-argh)
17385 ("python-pathtools" ,python-pathtools)
17386 ("python-pyyaml" ,python-pyyaml)))
17387 (native-inputs
17388 `(("python-pytest-cov" ,python-pytest-cov)
17389 ("python-pytest-timeout" ,python-pytest-timeout)))
17390 (home-page "https://github.com/gorakhargosh/watchdog")
17391 (synopsis "Filesystem events monitoring")
17392 (description "This package provides a way to monitor filesystem events
17393such as a file modification and trigger an action. This is similar to inotify,
17394but portable.")
17395 (license license:asl2.0)))
2cbede59
JL
17396
17397(define-public offlate
17398 (package
17399 (name "offlate")
17400 (version "0.5")
17401 (source
17402 (origin
17403 (method git-fetch)
17404 (uri (git-reference
17405 (url "https://framagit.org/tyreunom/offlate")
17406 (commit version)))
17407 (file-name (git-file-name name version))
17408 (sha256
17409 (base32
17410 "13pqnbl05wcyldfvl75fp89vjgwsvxyc69vhnb17kkha2rc2k1h7"))))
17411 (build-system python-build-system)
17412 (arguments
17413 ;; No tests
17414 `(#:tests? #f))
17415 (propagated-inputs
17416 `(("python-android-stringslib" ,python-android-stringslib)
17417 ("python-dateutil" ,python-dateutil)
17418 ("python-gitlab" ,python-gitlab)
17419 ("python-lxml" ,python-lxml)
17420 ("python-polib" ,python-polib)
17421 ("python-pyenchant" ,python-pyenchant)
17422 ("python-pygit2" ,python-pygit2)
17423 ("python-pygithub" ,python-pygithub)
17424 ("python-pyqt" ,python-pyqt)
17425 ("python-requests" ,python-requests)
17426 ("python-ruamel.yaml" ,python-ruamel.yaml)
17427 ("python-translation-finder" ,python-translation-finder)
17428 ("python-watchdog" ,python-watchdog)))
17429 (native-inputs
17430 `(("qttools" ,qttools)))
17431 (home-page "https://framagit.org/tyreunom/offlate")
17432 (synopsis "Offline translation interface for online translation tools")
17433 (description "Offlate offers a unified interface for different translation
17434file formats, as well as many different online translation platforms. You can
17435use it to get work from online platforms, specialized such as the Translation
17436Project, or not such a gitlab instance when your upstream doesn't use any
17437dedicated platform. The tool proposes a unified interface for any format and
17438an upload option to send your work back to the platform.")
17439 (license license:gpl3+)))
479f4013
JK
17440
17441(define-public python-pypng
17442 (package
17443 (name "python-pypng")
17444 (version "0.0.20")
17445 (source
17446 (origin
17447 (method url-fetch)
17448 (uri (pypi-uri "pypng" version))
17449 (sha256
17450 (base32 "02qpa22ls41vwsrzw9r9qhj1nhq05p03hb5473pay6y980s86chh"))))
17451 (build-system python-build-system)
17452 (home-page "https://github.com/drj11/pypng")
17453 (synopsis "Pure Python PNG image encoder/decoder")
17454 (description
17455 "The PyPNG module implements support for PNG images. It reads and writes
17456PNG files with all allowable bit depths (1/2/4/8/16/24/32/48/64 bits per
17457pixel) and colour combinations: greyscale (1/2/4/8/16 bit); RGB, RGBA,
17458LA (greyscale with alpha) with 8/16 bits per channel; colour mapped
17459images (1/2/4/8 bit). Adam7 interlacing is supported for reading and writing.
17460A number of optional chunks can be specified (when writing) and
17461understood (when reading): tRNS, bKGD, gAMA.
17462
17463PyPNG is not a high level toolkit for image processing (like PIL) and does not
17464aim at being a replacement or competitor. Its strength lies in fine-grained
17465extensive support of PNG features. It can also read and write Netpbm PAM
17466files, with a focus on its use as an intermediate format for implementing
17467custom PNG processing.")
17468 (license license:expat)))