gnu: python-virtualenv: Update to 20.0.10.
[jackhill/guix/guix.git] / gnu / packages / python-xyz.scm
CommitLineData
44d10b1f
RW
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
ae8db9ce 3;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
fa8ffaa0 4;;; Copyright © 2013, 2014, 2015, 2016, 2019 Andreas Enge <andreas@enge.fr>
44d10b1f
RW
5;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
6;;; Copyright © 2014, 2017 Eric Bavier <bavier@member.fsf.org>
7;;; Copyright © 2014, 2015 Federico Beffa <beffa@fbengineering.ch>
8;;; Copyright © 2015 Omar Radwan <toxemicsquire4@gmail.com>
9;;; Copyright © 2015 Pierre-Antoine Rault <par@rigelk.eu>
02422b3b 10;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 Ricardo Wurmus <rekado@elephly.net>
44d10b1f
RW
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>
bd137055 57;;; Copyright © 2018, 2019, 2020 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>
da8ca4c3 72;;; Copyright © 2020 sirgazil <sirgazil@zoho.com>
44d10b1f
RW
73;;;
74;;; This file is part of GNU Guix.
75;;;
76;;; GNU Guix is free software; you can redistribute it and/or modify it
77;;; under the terms of the GNU General Public License as published by
78;;; the Free Software Foundation; either version 3 of the License, or (at
79;;; your option) any later version.
80;;;
81;;; GNU Guix is distributed in the hope that it will be useful, but
82;;; WITHOUT ANY WARRANTY; without even the implied warranty of
83;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
84;;; GNU General Public License for more details.
85;;;
86;;; You should have received a copy of the GNU General Public License
87;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
88
89(define-module (gnu packages python-xyz)
90 #:use-module ((guix licenses) #:prefix license:)
91 #:use-module (gnu packages)
92 #:use-module (gnu packages algebra)
93 #:use-module (gnu packages adns)
94 #:use-module (gnu packages attr)
95 #:use-module (gnu packages backup)
96 #:use-module (gnu packages bash)
97 #:use-module (gnu packages check)
98 #:use-module (gnu packages compression)
99 #:use-module (gnu packages crypto)
100 #:use-module (gnu packages databases)
f825e605 101 #:use-module (gnu packages dbm)
2cbede59 102 #:use-module (gnu packages enchant)
44d10b1f
RW
103 #:use-module (gnu packages file)
104 #:use-module (gnu packages fontutils)
105 #:use-module (gnu packages gcc)
106 #:use-module (gnu packages geo)
107 #:use-module (gnu packages ghostscript)
108 #:use-module (gnu packages gl)
109 #:use-module (gnu packages glib)
e2ebbbcc 110 #:use-module (gnu packages gnome)
44d10b1f
RW
111 #:use-module (gnu packages graphviz)
112 #:use-module (gnu packages graphics)
113 #:use-module (gnu packages gstreamer)
114 #:use-module (gnu packages gtk)
115 #:use-module (gnu packages icu4c)
116 #:use-module (gnu packages image)
117 #:use-module (gnu packages imagemagick)
72c2478a 118 #:use-module (gnu packages kerberos)
44d10b1f
RW
119 #:use-module (gnu packages libevent)
120 #:use-module (gnu packages libffi)
121 #:use-module (gnu packages linux)
122 #:use-module (gnu packages llvm)
123 #:use-module (gnu packages man)
124 #:use-module (gnu packages maths)
42f0b0c2 125 #:use-module (gnu packages monitoring)
44d10b1f
RW
126 #:use-module (gnu packages multiprecision)
127 #:use-module (gnu packages networking)
128 #:use-module (gnu packages ncurses)
129 #:use-module (gnu packages openstack)
130 #:use-module (gnu packages pcre)
131 #:use-module (gnu packages perl)
132 #:use-module (gnu packages pkg-config)
133 #:use-module (gnu packages python)
d362b11d 134 #:use-module (gnu packages python-check)
15b65617 135 #:use-module (gnu packages python-compression)
44d10b1f 136 #:use-module (gnu packages python-crypto)
ca7c3653 137 #:use-module (gnu packages python-science)
44d10b1f
RW
138 #:use-module (gnu packages python-web)
139 #:use-module (gnu packages qt)
140 #:use-module (gnu packages readline)
141 #:use-module (gnu packages sdl)
142 #:use-module (gnu packages search)
143 #:use-module (gnu packages shells)
9d0c291e 144 #:use-module (gnu packages sphinx)
44d10b1f
RW
145 #:use-module (gnu packages ssh)
146 #:use-module (gnu packages terminals)
147 #:use-module (gnu packages tex)
148 #:use-module (gnu packages texinfo)
149 #:use-module (gnu packages time)
150 #:use-module (gnu packages tls)
151 #:use-module (gnu packages version-control)
152 #:use-module (gnu packages video)
153 #:use-module (gnu packages web)
154 #:use-module (gnu packages base)
155 #:use-module (gnu packages xml)
156 #:use-module (gnu packages xorg)
157 #:use-module (gnu packages xdisorg)
158 #:use-module (gnu packages tcl)
159 #:use-module (gnu packages bdw-gc)
f98232a3 160 #:use-module (gnu packages serialization)
44d10b1f
RW
161 #:use-module (guix packages)
162 #:use-module (guix download)
163 #:use-module (guix git-download)
a042d348 164 #:use-module (guix hg-download)
44d10b1f
RW
165 #:use-module (guix utils)
166 #:use-module (guix build-system gnu)
167 #:use-module (guix build-system cmake)
168 #:use-module (guix build-system python)
169 #:use-module (guix build-system trivial)
170 #:use-module (srfi srfi-1)
171 #:use-module (srfi srfi-26))
172
173(define-public python-psutil
174 (package
175 (name "python-psutil")
e9119ac1 176 (version "5.6.5")
44d10b1f
RW
177 (source
178 (origin
179 (method url-fetch)
180 (uri (pypi-uri "psutil" version))
181 (sha256
e9119ac1 182 (base32 "0isil5jxwwd8awz54qk28rpgjg43i5l6yl70g40vxwa4r4m56lfh"))))
44d10b1f
RW
183 (build-system python-build-system)
184 (arguments
185 ;; FIXME: some tests does not return and times out.
186 '(#:tests? #f))
187 (home-page "https://www.github.com/giampaolo/psutil")
188 (synopsis "Library for retrieving information on running processes")
189 (description
190 "psutil (Python system and process utilities) is a library for retrieving
191information on running processes and system utilization (CPU, memory, disks,
192network) in Python. It is useful mainly for system monitoring, profiling and
193limiting process resources and management of running processes. It implements
194many functionalities offered by command line tools such as: ps, top, lsof,
195netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
196pidof, tty, taskset, pmap.")
197 (properties `((python2-variant . ,(delay python2-psutil))))
198 (license license:bsd-3)))
199
200(define-public python2-psutil
201 (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
202 (package
203 (inherit base)
204 (propagated-inputs
205 `(("python2-enum34" ,python2-enum34) ;optional
206 ,@(package-propagated-inputs base))))))
207
208(define-public python-shapely
209 (package
210 (name "python-shapely")
6d94465b 211 (version "1.6.4.post2")
44d10b1f
RW
212 (source
213 (origin
214 (method url-fetch)
215 (uri (pypi-uri "Shapely" version))
216 (sha256
217 (base32
6d94465b 218 "03r42fmd9alp6r3q95ad6rldq2f7n1wimrw53zy5kpn33yv7pf64"))))
44d10b1f
RW
219 (build-system python-build-system)
220 (native-inputs
221 `(("python-cython" ,python-cython)
222 ("python-matplotlib" ,python-matplotlib)
223 ("python-pytest" ,python-pytest)
224 ("python-pytest-cov" ,python-pytest-cov)))
225 (inputs
226 `(("geos" ,geos)))
227 (propagated-inputs
228 `(("python-numpy" ,python-numpy)))
229 (arguments
230 `(#:phases
231 (modify-phases %standard-phases
232 (add-after 'unpack 'patch-geos-path
233 (lambda* (#:key inputs #:allow-other-keys)
234 (let ((geos (assoc-ref inputs "geos"))
235 (glibc (assoc-ref inputs ,(if (%current-target-system)
236 "cross-libc" "libc"))))
237 (substitute* "shapely/geos.py"
238 (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)")
239 (string-append "_lgeos = load_dll('geos_c', fallbacks=['"
240 geos "/lib/libgeos_c.so'])"))
241 (("free = load_dll\\('c'\\)\\.free")
242 (string-append "free = load_dll('c', fallbacks=['"
243 glibc "/lib/libc.so.6']).free"))))
244 #t)))))
245 (home-page "https://github.com/Toblerity/Shapely")
246 (synopsis "Library for the manipulation and analysis of geometric objects")
247 (description "Shapely is a Python package for manipulation and analysis of
248planar geometric objects. It is based on the @code{GEOS} library.")
249 (license license:bsd-3)))
250
a91f4eba
S
251(define-public python-shortuuid
252 (package
253 (name "python-shortuuid")
254 (version "0.5.0")
255 (source
256 (origin
257 (method url-fetch)
258 (uri (pypi-uri "shortuuid" version))
259 (sha256
260 (base32
261 "1f8i4zwj5vmpzbz6b17bljy4399gx5aq7vsyw63sz2qgyjcd73yh"))))
262 (build-system python-build-system)
263 (native-inputs
264 `(("python-pep8" ,python-pep8)))
265 (home-page "https://github.com/skorokithakis/shortuuid")
266 (synopsis "Generator library for concise, unambiguous and URL-safe UUIDs")
267 (description
268 "@code{shortuuid} is a Python library for generating concise, unambiguous
269and URL-safe UUIDs. UUIDs are generated using the built-in Python @code{uuid}
270module and then similar looking characters are removed.")
271 (license license:bsd-3)))
272
44d10b1f
RW
273(define-public python-logwrap
274 (package
275 (name "python-logwrap")
276 (version "3.2.1")
277 (source
278 (origin
279 (method url-fetch)
280 (uri (pypi-uri "logwrap" version ".zip"))
281 (sha256
282 (base32
283 "1d2k0hvpbi51vl410y8fbs5m0nxnlh2k7gr2nrh3k81ibhzscsra"))))
284 (build-system python-build-system)
285 (propagated-inputs
286 `(("python-six" ,python-six)
287 ("python-typing" ,python-typing)))
288 (native-inputs
289 `(("unzip" ,unzip)
290 ("python-cython" ,python-cython)
291 ("python-pytest" ,python-pytest)
292 ("python-pytest-cov" ,python-pytest-cov)
293 ("python-pytest-runner" ,python-pytest-runner)))
294 (home-page "https://github.com/penguinolog/logwrap")
295 (synopsis "Decorator for logging function arguments")
296 (description "This package provides a decorator to log function arguments
297and function call return values in a human-readable way.")
298 (license license:asl2.0)))
299
300(define-public python2-shapely
301 (package-with-python2 python-shapely))
302
303(define-public python-clyent
304 (package
305 (name "python-clyent")
306 (version "1.2.1")
307 (source
308 (origin
309 (method url-fetch)
310 (uri (pypi-uri "clyent" version))
311 (sha256
312 (base32
313 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
314 (build-system python-build-system)
315 (native-inputs
316 `(("python-mock" ,python-mock)))
317 (home-page "https://github.com/binstar/clyent")
318 (synopsis "Command line client library")
319 (description "Clyent is a Python command line utiliy library. It is used
320by @code{binstar}, @code{binstar-build} and @code{chalmers}.")
321 (license license:bsd-3)))
322
323(define-public python2-clyent
324 (package-with-python2 python-clyent))
325
326(define-public python-babel
327 (package
328 (name "python-babel")
93253411 329 (version "2.7.0")
44d10b1f
RW
330 (source
331 (origin
332 (method url-fetch)
333 (uri (pypi-uri "Babel" version))
334 (sha256
335 (base32
93253411 336 "0a7wawx8vsg7igvz6p3x909fskhg4b2y1910xk4f4c8y22p3aqg8"))))
44d10b1f
RW
337 (build-system python-build-system)
338 (native-inputs
339 `(("python-freezegun" ,python-freezegun)
340 ("python-pytest" ,python-pytest)))
341 (propagated-inputs
342 `(("python-pytz" ,python-pytz)))
343 (arguments
344 `(#:phases (modify-phases %standard-phases
345 (replace 'check
8acd1e90
MB
346 (lambda _
347 (invoke "pytest" "-vv" "-k"
348 (string-append
349 ;; XXX: These tests fail when using Pytest 4.x and
350 ;; Babel 2.6.0. Try removing this for later versions.
351 "not test_no_inherit_metazone_marker_never_in_output"
352 " and not test_smoke_dates"
353 " and not test_smoke_numbers")))))))
44d10b1f
RW
354 (home-page "http://babel.pocoo.org/")
355 (synopsis
356 "Tools for internationalizing Python applications")
357 (description
358 "Babel is composed of two major parts:
359- tools to build and work with gettext message catalogs
360- a Python interface to the CLDR (Common Locale Data Repository), providing
361access to various locale display names, localized number and date formatting,
362etc. ")
363 (license license:bsd-3)))
364
365(define-public python2-babel
366 (package-with-python2 python-babel))
367
93253411
MB
368;; Sphinx < 2.0 requires this version. Remove once no longer needed.
369(define-public python2-babel-2.6
370 (package
371 (inherit python2-babel)
372 (version "2.6.0")
373 (source (origin
374 (method url-fetch)
375 (uri (pypi-uri "Babel" version))
376 (sha256
377 (base32
378 "08rxmbx2s4irp0w0gmn498vns5xy0fagm0fg33xa772jiks51flc"))))))
379
44d10b1f
RW
380(define-public python2-backport-ssl-match-hostname
381 (package
382 (name "python2-backport-ssl-match-hostname")
383 (version "3.5.0.1")
384 (source
385 (origin
386 (method url-fetch)
2c1f0d09 387 (uri (pypi-uri "backports.ssl_match_hostname" version))
44d10b1f
RW
388 (sha256
389 (base32
390 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
391 (build-system python-build-system)
392 (arguments
393 `(#:python ,python-2
394 #:tests? #f)) ; no test target
395 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
396 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
397 (description
398 "This backport brings the ssl.match_hostname() function to users of
399earlier versions of Python. The function checks the hostname in the
400certificate returned by the server to which a connection has been established,
401and verifies that it matches the intended target hostname.")
402 (license license:psfl)))
403
dc827867
TGR
404(define-public python-boolean.py
405 (package
406 (name "python-boolean.py")
407 (version "3.6")
408 (source
409 (origin
410 ;; There's no source tarball on PyPI.
411 (method git-fetch)
412 (uri (git-reference
413 (url "https://github.com/bastikr/boolean.py")
414 (commit (string-append "v" version))))
415 (file-name (git-file-name name version))
416 (sha256
417 (base32 "1wc89y73va58cj7dsx6c199zpxsy9q53dsffsdj6zmc90inqz6qs"))))
418 (build-system python-build-system)
419 (home-page "https://github.com/bastikr/boolean.py")
420 (synopsis "Boolean algebra in one Python module")
421 (description
422 "This is a small Python library that implements boolean algebra.
423It defines two base elements, @code{TRUE} and @code{FALSE}, and a
424@code{Symbol} class that can take on one of these two values. Calculations
425are done only in terms of @code{AND}, @code{OR}, and @code{NOT}---other
426compositions like @code{XOR} and @code{NAND} are emulated on top of them.
427Expressions are constructed from parsed strings or directly in Python.")
428 (license license:bsd-2)))
429
44d10b1f
RW
430(define-public python-hdf4
431 (package
432 (name "python-hdf4")
433 (version "0.9")
434 (source
435 (origin
436 (method url-fetch)
437 (uri (pypi-uri name version))
438 (sha256
439 (base32
440 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
441 (build-system python-build-system)
442 (native-inputs `(("nose" ,python-nose)))
443 (propagated-inputs `(("numpy" ,python-numpy)))
444 (inputs
445 `(("hdf4" ,hdf4)
446 ("libjpeg" ,libjpeg)
447 ("zlib" ,zlib)))
448 (arguments
449 `(#:phases
450 (modify-phases %standard-phases
451 (replace 'check
452 (lambda _
453 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
454 ;; on to import numpy. Somehow this works on their CI system.
455 ;; Let's just manage PYTHONPATH here instead.
456 (substitute* "runexamples.sh"
457 (("export PYTHONPATH=.*") ""))
458 (setenv "PYTHONPATH"
459 (string-append (getcwd) ":"
460 (getenv "PYTHONPATH")))
461 (invoke "./runexamples.sh")
462 (invoke "nosetests" "-v"))))))
463 (home-page "https://github.com/fhs/python-hdf4")
464 (synopsis "Python interface to the NCSA HDF4 library")
465 (description
466 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
467which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
468NetCDF files can also be read and modified. Python-HDF4 is a fork of
469@url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
470 (license license:expat)))
471
472(define-public python2-hdf4
473 (package-with-python2 python-hdf4))
474
475(define-public python-h5py
476 (package
477 (name "python-h5py")
24ce6421 478 (version "2.10.0")
44d10b1f
RW
479 (source
480 (origin
481 (method url-fetch)
482 (uri (pypi-uri "h5py" version))
483 (sha256
484 (base32
24ce6421 485 "0baipzv8n93m0dq0riyi8rfhzrjrfrfh8zqhszzp1j2xjac2fhc4"))))
44d10b1f
RW
486 (build-system python-build-system)
487 (arguments
488 `(#:tests? #f ; no test target
489 #:phases
490 (modify-phases %standard-phases
491 (add-after 'unpack 'fix-hdf5-paths
492 (lambda* (#:key inputs #:allow-other-keys)
493 (let ((prefix (assoc-ref inputs "hdf5")))
494 (substitute* "setup_build.py"
495 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
496 (string-append "['" prefix "/lib" "']"))
497 (("'/opt/local/include', '/usr/local/include'")
498 (string-append "'" prefix "/include" "'")))
499 (substitute* "setup_configure.py"
500 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
501 (string-append "['" prefix "/lib" "']")))
502 #t))))))
503 (propagated-inputs
504 `(("python-six" ,python-six)
505 ("python-numpy" ,python-numpy)))
506 (inputs
24ce6421 507 `(("hdf5" ,hdf5-1.10)))
44d10b1f
RW
508 (native-inputs
509 `(("python-cython" ,python-cython)
24ce6421
RW
510 ("python-pkgconfig" ,python-pkgconfig)
511 ("pkg-config" ,pkg-config)))
efc0a587 512 (home-page "https://www.h5py.org/")
44d10b1f
RW
513 (synopsis "Read and write HDF5 files from Python")
514 (description
515 "The h5py package provides both a high- and low-level interface to the
516HDF5 library from Python. The low-level interface is intended to be a
517complete wrapping of the HDF5 API, while the high-level component supports
518access to HDF5 files, datasets and groups using established Python and NumPy
519concepts.")
520 (license license:bsd-3)))
521
522(define-public python2-h5py
523 (package-with-python2 python-h5py))
524
8b89dedc
RW
525(define-public python-sh
526 (package
527 (name "python-sh")
528 (version "1.12.14")
529 (source
530 (origin
531 (method url-fetch)
532 (uri (pypi-uri "sh" version))
533 (sha256
534 (base32
535 "1z2hx357xp3v4cv44xmqp7lli3frndqpyfmpbxf7n76h7s1zaaxm"))))
536 (build-system python-build-system)
fd3638d8
EF
537 (arguments
538 '(#:phases
539 (modify-phases %standard-phases
540 (replace 'check
541 (lambda _
ca983a2f
NG
542 ;; XXX: A Python 2 test fails when HOME=/homeless-shelter.
543 (setenv "HOME" "/tmp")
fd3638d8
EF
544 (invoke "python" "sh.py" "test"))))))
545 (native-inputs
546 `(("python-coverage" ,python-coverage)))
8b89dedc
RW
547 (home-page "https://github.com/amoffat/sh")
548 (synopsis "Python subprocess replacement")
549 (description "This package provides a replacement for Python's
550@code{subprocess} feature.")
551 (license license:expat)))
552
3869effd
RW
553(define-public python2-sh
554 (package-with-python2 python-sh))
555
d362b11d
RW
556(define-public python-cftime
557 (package
558 (name "python-cftime")
da107cf5 559 (version "1.0.4.2")
d362b11d
RW
560 (source
561 (origin
562 (method url-fetch)
563 (uri (pypi-uri "cftime" version))
564 (sha256
da107cf5 565 (base32 "0w0gi6jnch38hiygl62j4xkcirv4y3dcwrvxl9p7bsk6j27lzihs"))))
d362b11d
RW
566 (build-system python-build-system)
567 (propagated-inputs
568 `(("python-numpy" ,python-numpy)))
569 (native-inputs
570 `(("python-coveralls" ,python-coveralls)
571 ("python-cython" ,python-cython)
572 ("python-pytest-cov" ,python-pytest-cov)))
573 (home-page "https://github.com/Unidata/cftime")
574 (synopsis "Library for time handling")
575 (description
576 "This package provides time-handling functionality that used to be part
577of the netcdf4 package before.")
578 ;; This package claims to include code under the GPLv3 but is released
579 ;; under ISC.
580 (license (list license:isc license:gpl3+))))
581
44d10b1f
RW
582(define-public python-netcdf4
583 (package
584 (name "python-netcdf4")
93e7b209 585 (version "1.4.2")
44d10b1f
RW
586 (source
587 (origin
588 (method url-fetch)
589 (uri (pypi-uri "netCDF4" version))
590 (sha256
591 (base32
93e7b209 592 "0c0sklgrmv15ygliin8qq0hp7vanmbi74m6zpi0r1ksr0hssyd5r"))))
44d10b1f 593 (build-system python-build-system)
93e7b209
RW
594 (arguments
595 '(#:phases
596 (modify-phases %standard-phases
597 (add-after 'unpack 'configure-locations
598 (lambda* (#:key inputs #:allow-other-keys)
599 (setenv "HDF5_DIR" (assoc-ref inputs "hdf5"))
600 #t)))))
44d10b1f
RW
601 (native-inputs
602 `(("python-cython" ,python-cython)))
603 (propagated-inputs
93e7b209
RW
604 `(("python-numpy" ,python-numpy)
605 ("python-cftime" ,python-cftime)))
44d10b1f
RW
606 (inputs
607 `(("netcdf" ,netcdf)
608 ("hdf4" ,hdf4)
609 ("hdf5" ,hdf5)))
93e7b209 610 (home-page "https://github.com/Unidata/netcdf4-python")
44d10b1f
RW
611 (synopsis "Python/numpy interface to the netCDF library")
612 (description "Netcdf4-python is a Python interface to the netCDF C
613library. netCDF version 4 has many features not found in earlier
614versions of the library and is implemented on top of HDF5. This module
615can read and write files in both the new netCDF 4 and the old netCDF 3
616format, and can create files that are readable by HDF5 clients. The
617API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
618to users of that module.")
619 ;; The software is mainly ISC, but includes some files covered
620 ;; by the Expat license.
621 (license (list license:isc license:expat))))
622
623(define-public python2-netcdf4
624 (package-with-python2 python-netcdf4))
625
d6803445
TGR
626(define-public python-license-expression
627 (package
628 (name "python-license-expression")
629 (version "0.999")
630 (source
631 (origin
632 (method url-fetch)
633 (uri (pypi-uri "license-expression" version))
634 (sha256
635 (base32 "08ppb0bxbrsxazy88sgpl9yffvdsabw6dkk1nc332wcz2mphwwyf"))))
636 (build-system python-build-system)
637 (propagated-inputs
638 `(("python-boolean.py" ,python-boolean.py)))
639 (home-page "https://github.com/nexB/license-expression")
640 (synopsis "Apply boolean logic to license expressions")
641 (description
642 "This Python module defines a tiny language to evaluate and compare
643license expressions using boolean logic. Logical combinations of licenses can
644be tested for equality, containment, and equivalence. They can be normalised
645and simplified. It supports SPDX license expressions as well as other naming
646conventions and aliases in the same expression.")
647 (license license:gpl2+)))
648
44d10b1f
RW
649(define-public python-lockfile
650 (package
651 (name "python-lockfile")
652 (version "0.12.2")
653 (source
654 (origin
655 (method url-fetch)
8318bf07 656 (uri (pypi-uri "lockfile" version))
44d10b1f
RW
657 (sha256
658 (base32
659 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
660 (build-system python-build-system)
661 (arguments '(#:test-target "check"))
662 (native-inputs
663 `(("python-pbr" ,python-pbr)))
664 (home-page "https://launchpad.net/pylockfile")
665 (synopsis "Platform-independent file locking module")
666 (description
667 "The lockfile package exports a LockFile class which provides a simple
668API for locking files.")
669 (license license:expat)))
670
671(define-public python2-lockfile
672 (package-with-python2 python-lockfile))
673
6e792089
JK
674(define-public python-filelock
675 (package
676 (name "python-filelock")
677 (version "3.0.12")
678 (source
679 (origin
680 (method url-fetch)
681 (uri (pypi-uri "filelock" version))
682 (sha256
683 (base32
684 "0ngzlvb5j8gqs2nxlp2b0jhzii792h66wsn694qm8kqixr225n0q"))))
685 (build-system python-build-system)
686 (home-page
687 "https://github.com/benediktschmitt/py-filelock")
688 (synopsis "Platform independent file lock")
689 (description "@code{filelock} contains a single module implementing
690a platform independent file lock in Python, which provides a simple way of
691inter-process communication.")
692 (license license:unlicense)))
693
44d10b1f
RW
694(define-public python-semantic-version
695 (package
696 (name "python-semantic-version")
697 (version "2.6.0")
698 (source
699 (origin
700 (method url-fetch)
701 (uri (pypi-uri "semantic_version" version))
702 (sha256
703 (base32
704 "1h2l9xyg1zzsda6kjcmfcgycbvrafwci283vcr1v5sbk01l2hhra"))))
705 (build-system python-build-system)
706 (arguments
707 `(#:tests? #f)) ; PyPI tarball lacks tests
708 (home-page "https://github.com/rbarrois/python-semanticversion")
709 (synopsis "Semantic versioning module for Python")
710 (description
711 "The @code{semantic_version} class is a small library for handling
712@uref{https://semver.org/, semantic versioning} (@dfn{SemVer}) in Python.
713
714It can compare versions, generate a new version that represents a bump in one of
715the version levels, and check whether any given string is a proper semantic
716version identifier.")
717 (license license:bsd-3)))
718
719(define-public python2-semantic-version
720 (package-with-python2 python-semantic-version))
721
722(define-public python-serpent
723 (package
724 (name "python-serpent")
fa9d14ac 725 (version "1.28")
44d10b1f
RW
726 (source
727 (origin
728 (method url-fetch)
729 (uri (pypi-uri "serpent" version))
730 (sha256
fa9d14ac 731 (base32 "1arnckykpkvv2qrp49l1k7q5mr5pisswl0rvdx98x8wsl1n361pk"))))
44d10b1f 732 (build-system python-build-system)
fa9d14ac
TGR
733 (native-inputs
734 `(("python-attrs" ,python-attrs)
735 ("python-pytz" ,python-pytz)))
44d10b1f
RW
736 (home-page "https://github.com/irmen/Serpent")
737 (synopsis "Serializer for literal Python expressions")
738 (description
1d3c7803
TGR
739 "Serpent provides @code{ast.literal_eval()}-compatible object tree
740serialization. It serializes an object tree into bytes (an utf-8 encoded
741string) that can be decoded and then passed as-is to @code{ast.literal_eval()}
742to rebuild the original object tree.
743
744Because only safe literals are encoded, it is safe to send serpent data to
745other machines, such as over the network.")
44d10b1f
RW
746 (license license:expat)))
747
748(define-public python-setuptools
749 (package
750 (name "python-setuptools")
e39d4933 751 (version "41.0.1")
44d10b1f
RW
752 (source
753 (origin
754 (method url-fetch)
755 (uri (pypi-uri "setuptools" version ".zip"))
756 (sha256
757 (base32
e39d4933 758 "04sns22y2hhsrwfy1mha2lgslvpjsjsz8xws7h2rh5a7ylkd28m2"))
44d10b1f
RW
759 (modules '((guix build utils)))
760 (snippet
761 '(begin
762 ;; Remove included binaries which are used to build self-extracting
763 ;; installers for Windows.
764 ;; TODO: Find some way to build them ourself so we can include them.
765 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
766 #t))))
767 (build-system python-build-system)
768 ;; FIXME: Tests require pytest, which itself relies on setuptools.
769 ;; One could bootstrap with an internal untested setuptools.
770 (arguments
771 `(#:tests? #f))
e85af137 772 (home-page "https://pypi.org/project/setuptools/")
44d10b1f
RW
773 (synopsis
774 "Library designed to facilitate packaging Python projects")
775 (description
776 "Setuptools is a fully-featured, stable library designed to facilitate
777packaging Python projects, where packaging includes:
778Python package and module definitions,
779distribution package metadata,
780test hooks,
781project installation,
782platform-specific details,
783Python 3 support.")
784 ;; TODO: setuptools now bundles the following libraries:
785 ;; packaging, pyparsing, six and appdirs. How to unbundle?
786 (license (list license:psfl ; setuptools itself
787 license:expat ; six, appdirs, pyparsing
788 license:asl2.0 ; packaging is dual ASL2/BSD-2
789 license:bsd-2))))
790
791(define-public python2-setuptools
792 (package-with-python2 python-setuptools))
793
0fdec2a3
MB
794;; The setuptools provided by Python 3.7.4 is too new for Tensorflow.
795(define-public python-setuptools-for-tensorflow
796 (hidden-package
797 (package
798 (inherit python-setuptools)
799 (version "39.1.0")
800 (source (origin
801 (inherit (package-source python-setuptools))
802 (uri (pypi-uri "setuptools" version ".zip"))
803 (sha256
804 (base32
805 "1mzdhvfhnv4lggxa8rjl0dzqxvfx377gg5sqs57v89wrp09lwj65")))))))
806
44d10b1f
RW
807(define-public python-uniseg
808 (package
809 (name "python-uniseg")
810 (version "0.7.1")
811 (source
812 (origin
813 (method url-fetch)
814 (uri (pypi-uri "uniseg" version ".zip"))
815 (sha256
816 (base32
817 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
818 (build-system python-build-system)
819 (arguments
820 '(#:tests? #f)) ; The test suite requires network access.
821 (native-inputs
822 `(("unzip" ,unzip)))
823 (home-page
824 "https://bitbucket.org/emptypage/uniseg-python")
825 (synopsis
826 "Python library to determine Unicode text segmentations")
827 (description
828 "Uniseg is a Python package used to determine Unicode text segmentations.
829Supported segmentations include:
830@enumerate
831@item @dfn{Code point} (any value in the Unicode codespace)
832@item @dfn{Grapheme cluster} (user-perceived character made of a single or
833multiple Unicode code points, e.g. \"G\" + acute-accent)
834@item Word break
835@item Sentence break
836@item Line break
837@end enumerate")
838 (license license:expat)))
839
840(define-public python2-uniseg
841 (package-with-python2 python-uniseg))
842
843(define-public python-humanfriendly
844 (package
845 (name "python-humanfriendly")
846 (version "4.4.1")
847 (source
848 (origin
849 (method url-fetch)
850 (uri (pypi-uri "humanfriendly" version))
851 (sha256
852 (base32
853 "0pisgizjql86785jchfjv217g0lsgk114g2lja5j4y3lsc3b9szi"))))
854 (build-system python-build-system)
855 (arguments
856 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
857 #:tests? #f))
858 (propagated-inputs
859 `(("python-monotonic" ,python-monotonic)))
860 (home-page "https://humanfriendly.readthedocs.io")
861 (synopsis "Human-friendly input and output in Python")
862 (description
863 "The functions and classes in @code{humanfriendly} can be used to make
864text interfaces more user-friendly. It includes tools to parse and format
865numbers, file sizes, and timespans, timers for long-running operations, menus
866to allow the user to choose from a list of options, and terminal interaction
867helpers.")
868 (license license:expat)))
869
870(define-public python2-humanfriendly
871 (package-with-python2 python-humanfriendly))
872
873(define-public python-capturer
874 (package
875 (name "python-capturer")
876 (version "2.4")
877 (source
878 (origin
879 (method url-fetch)
880 (uri (pypi-uri "capturer" version))
881 (sha256
882 (base32
883 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
884 (build-system python-build-system)
885 (arguments
886 `(#:tests? #f))
887 (propagated-inputs
888 `(("python-humanfriendly" ,python-humanfriendly)))
889 (home-page "https://capturer.readthedocs.io")
890 (synopsis "Capture stdout and stderr streams of the current process")
891 (description
892 "The capturer package makes it easy to capture the stdout and stderr
893streams of the current process and subprocesses. Output can be relayed
894to the terminal in real time but is also available to the Python program
895for additional processing.")
896 (license license:expat)))
897
898(define-public python2-capturer
899 (package-with-python2 python-capturer))
900
901(define-public python-case
902 (package
903 (name "python-case")
904 (version "1.5.3")
905 (source
906 (origin
907 (method url-fetch)
908 (uri (pypi-uri "case" version))
909 (sha256
910 (base32
911 "1cagg06vfph864s6l5jb0zqliwxh647bki8j6lf4a4qrv40jnhs8"))))
912 (build-system python-build-system)
913 (propagated-inputs
914 `(("python-mock" ,python-mock)
915 ("python-nose" ,python-nose)
916 ("python-six" ,python-six)
917 ("python-unittest2" ,python-unittest2)))
918 (native-inputs
919 `(("python-coverage" ,python-coverage)))
920 (home-page "https://github.com/celery/case")
921 (synopsis "Unittest utilities and convenience methods")
922 (description
923 "The @code{case} package provides utilities on top of unittest, including
924some helpful Python 2 compatibility convenience methods.")
925 (license license:bsd-3)))
926
927(define-public python-verboselogs
928 (package
929 (name "python-verboselogs")
930 (version "1.7")
931 (source
932 (origin
933 (method url-fetch)
934 (uri (pypi-uri "verboselogs" version))
935 (sha256
936 (base32
937 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
938 (build-system python-build-system)
1760c970
MO
939 (arguments
940 `(#:phases
941 (modify-phases %standard-phases
942 (replace 'check
943 (lambda _
944 ;; Do not run pylint plugin test, as astroid is an old
945 ;; unsupported version.
946 (invoke "pytest" "-v" "-k" "not test_pylint_plugin"
947 "verboselogs/tests.py"))))))
44d10b1f
RW
948 (native-inputs
949 `(("python-mock" ,python-mock)
1760c970 950 ("python-pytest" ,python-pytest)))
44d10b1f
RW
951 (home-page "https://verboselogs.readthedocs.io")
952 (synopsis "Verbose logging level for Python's logging module")
953 (description
954 "The @code{verboselogs} package extends Python's @code{logging} module to
955add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
956 (license license:expat)))
957
958(define-public python2-verboselogs
959 (package-with-python2 python-verboselogs))
960
961(define-public python-coloredlogs
962 (package
963 (name "python-coloredlogs")
b2b8a39c 964 (version "10.0")
44d10b1f
RW
965 (source
966 (origin
967 (method url-fetch)
968 (uri (pypi-uri "coloredlogs" version))
969 (sha256
970 (base32
b2b8a39c 971 "0dkw6xp0r1dwgz4s2f58npx5nxfq51wf4l6qkm5ib27slgfs4sdq"))))
44d10b1f
RW
972 (build-system python-build-system)
973 (arguments
974 `(;Tests require some updated modules
975 #:tests? #f))
976 (propagated-inputs
977 `(("python-capturer" ,python-capturer)))
978 (home-page "https://coloredlogs.readthedocs.io")
979 (synopsis "Colored stream handler for Python's logging module")
980 (description
981 "The @code{coloredlogs} package enables colored terminal output for
982Python's logging module. The @code{ColoredFormatter} class inherits from
983@code{logging.Formatter} and uses ANSI escape sequences to render your logging
984messages in color.")
985 (license license:expat)))
986
987(define-public python2-coloredlogs
988 (package-with-python2 python-coloredlogs))
989
af760990
VC
990(define-public python-editorconfig
991 (package
992 (name "python-editorconfig")
993 (version "0.12.2")
994 (source
995 (origin
996 (method url-fetch)
997 (uri (pypi-uri "EditorConfig" version))
998 (sha256
999 (base32
1000 "0v55z351p9qkyp3bbspwywwn28sbcknhirngjbj779n3z52z63hv"))))
1001 (build-system python-build-system)
1002 (home-page "https://editorconfig.org/")
1003 (synopsis "EditorConfig bindings for python")
1004 (description "The EditorConfig project consists of a file format for
1005defining coding styles and a collection of text editor plugins that enable
1006editors to read the file format and adhere to defined styles. EditorConfig
1007files are easily readable and they work nicely with version control systems.")
1008 ;; "fnmatch.py" and "ini.py" are licensed under psfl, the rest is bsd-2.
1009 (license (list license:bsd-2 license:psfl))))
1010
4caf37b0
MC
1011(define-public python-et-xmlfile
1012 (package
1013 (name "python-et-xmlfile")
1014 (version "1.0.1")
1015 (source
1016 (origin
1017 (method url-fetch)
1018 (uri (pypi-uri "et_xmlfile" version))
1019 (sha256
1020 (base32
1021 "0nrkhcb6jdrlb6pwkvd4rycw34y3s931hjf409ij9xkjsli9fkb1"))))
1022 (build-system python-build-system)
1023 (arguments
1024 `(#:phases (modify-phases %standard-phases
1025 (replace 'check
1026 (lambda _
1027 (invoke "pytest"))))))
1028 (native-inputs
1029 `(("python-pytest" ,python-pytest)
1030 ("python-lxml" ,python-lxml))) ;used for the tests
1031 (home-page "https://bitbucket.org/openpyxl/et_xmlfile")
1032 (synopsis "Low memory implementation of @code{lxml.xmlfile}")
1033 (description "This Python library is based upon the @code{xmlfile} module
1034from @code{lxml}. It aims to provide a low memory, compatible implementation
1035of @code{xmlfile}.")
1036 (license license:expat)))
1037
1038(define-public python2-et-xmlfile
1039 (package-with-python2 python-et-xmlfile))
1040
a042d348
MC
1041(define-public python-openpyxl
1042 (package
1043 (name "python-openpyxl")
441e6d93 1044 (version "2.6.2")
a042d348
MC
1045 (source
1046 (origin
1047 ;; We use the upstream repository, as the tests are not included in the
1048 ;; PyPI releases.
1049 (method hg-fetch)
1050 (uri (hg-reference
1051 (url "https://bitbucket.org/openpyxl/openpyxl")
1052 (changeset version)))
1053 (file-name (string-append name "-" version "-checkout"))
1054 (sha256
441e6d93 1055 (base32 "1qhij6kcvdxqjy4g6193nsv4q7fy8n4fwyd3c2z047idlm6s3j4w"))))
a042d348
MC
1056 (build-system python-build-system)
1057 (arguments
1058 `(#:phases (modify-phases %standard-phases
1059 (replace 'check
1060 (lambda _
1061 (invoke "pytest"))))))
1062 (native-inputs
1063 ;; For the test suite.
1064 `(("python-lxml" ,python-lxml)
1065 ("python-pillow" ,python-pillow)
1066 ("python-pytest" ,python-pytest)))
1067 (propagated-inputs
1068 `(("python-et-xmlfile" ,python-et-xmlfile)
1069 ("python-jdcal" ,python-jdcal)))
1070 (home-page "https://openpyxl.readthedocs.io")
1071 (synopsis "Python library to read/write Excel 2010 XLSX/XLSM files")
1072 (description "This Python library allows reading and writing to the Excel XLSX, XLSM,
1073XLTX and XLTM file formats that are defined by the Office Open XML (OOXML)
1074standard.")
1075 (license license:expat)))
1076
44d10b1f
RW
1077(define-public python-eventlet
1078 (package
1079 (name "python-eventlet")
c9876c9b 1080 (version "0.25.1")
44d10b1f
RW
1081 (source
1082 (origin
1083 (method url-fetch)
1084 (uri (pypi-uri "eventlet" version))
1085 (sha256
1086 (base32
c9876c9b 1087 "1hgz8jq19wlz8vwqj900ry8cjv578nz4scc91mlc8944yid6573c"))))
44d10b1f
RW
1088 (build-system python-build-system)
1089 (propagated-inputs
1090 `(("python-greenlet" ,python-greenlet)))
1091 (arguments
1092 ;; TODO: Requires unpackaged 'enum-compat'.
1093 '(#:tests? #f))
bff36617 1094 (home-page "https://eventlet.net")
44d10b1f
RW
1095 (synopsis "Concurrent networking library for Python")
1096 (description
1097 "Eventlet is a concurrent networking library for Python that
1098allows you to change how you run your code, not how you write it.
1099It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
1100Coroutines ensure that the developer uses a blocking style of programming
1101that is similar to threading, but provide the benefits of non-blocking I/O.
1102The event dispatch is implicit, which means you can easily use @code{Eventlet}
1103from the Python interpreter, or as a small part of a larger application.")
1104 (license license:expat)))
1105
1106(define-public python2-eventlet
1107 (let ((base (package-with-python2
1108 (strip-python2-variant python-eventlet))))
1109 (package (inherit base)
1110 (propagated-inputs
1111 `(("python2-enum34" ,python2-enum34)
1112 ,@(package-propagated-inputs base))))))
1113
1114(define-public python-six
1115 (package
1116 (name "python-six")
6c58a06e 1117 (version "1.12.0")
44d10b1f
RW
1118 (source
1119 (origin
1120 (method url-fetch)
1121 (uri (pypi-uri "six" version))
1122 (sha256
1123 (base32
6c58a06e 1124 "0wxs1q74v07ssjywbbm7x6h5v9qx209ld2yfsif4060sxi0h2sni"))))
44d10b1f
RW
1125 (build-system python-build-system)
1126 (arguments
1127 `(#:phases
1128 (modify-phases %standard-phases
1129 (replace 'check
1130 (lambda _
1131 (invoke "py.test" "-v"))))))
1132 (native-inputs
1133 `(("python-py" ,python-py)
1134 ("python-pytest" ,python-pytest-bootstrap)))
e85af137 1135 (home-page "https://pypi.org/project/six/")
44d10b1f
RW
1136 (synopsis "Python 2 and 3 compatibility utilities")
1137 (description
1138 "Six is a Python 2 and 3 compatibility library. It provides utility
1139functions for smoothing over the differences between the Python versions with
1140the goal of writing Python code that is compatible on both Python versions.
1141Six supports every Python version since 2.5. It is contained in only one
1142Python file, so it can be easily copied into your project.")
1143 (license license:x11)))
1144
1145(define-public python2-six
1146 (package-with-python2 python-six))
1147
1148(define-public python-six-bootstrap
1149 (package
1150 (inherit python-six)
1151 (name "python-six-bootstrap")
1152 (native-inputs `())
1153 (arguments `(#:tests? #f))))
1154
1155(define-public python2-six-bootstrap
1156 (package-with-python2 python-six-bootstrap))
1157
1158(define-public python-schedule
1159 (package
1160 (name "python-schedule")
1161 (version "0.4.3")
1162 (source
1163 (origin
1164 (method url-fetch)
1165 (uri (pypi-uri "schedule" version))
1166 (sha256
1167 (base32
1168 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
1169 (build-system python-build-system)
1170 (native-inputs
1171 `(("python-pytest" ,python-pytest)
1172 ("python-mock" ,python-mock)))
1173 (home-page "https://github.com/dbader/schedule")
1174 (synopsis "Schedule periodic function calls in Python")
1175 (description
1176 "Schedule is an in-process scheduler for periodic jobs that uses the
1177builder pattern for configuration. Schedule lets you run Python functions (or
1178any other callable) periodically at pre-determined intervals using a simple,
1179human-friendly syntax.")
1180 (license license:expat)))
1181
1182(define-public python2-schedule
1183 (package-with-python2 python-schedule))
1184
44d10b1f
RW
1185(define-public python2-mechanize
1186 (package
1187 (name "python2-mechanize")
1188 (version "0.2.5")
1189 (source
1190 (origin
1191 (method url-fetch)
1cc184e6 1192 (uri (pypi-uri "mechanize" version))
44d10b1f
RW
1193 (sha256
1194 (base32
1195 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1196 (build-system python-build-system)
1197 (arguments
1198 `(#:python ,python-2 ; apparently incompatible with Python 3
1199 #:tests? #f))
1200 ;; test fails with message
1201 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1202 ;; (python-3.3.2) or
1203 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1204 ;; (python-2.7.5).
1205 ;; The source code is from March 2011 and probably not up-to-date
1206 ;; with respect to python unit tests.
1207 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1208 (synopsis
1209 "Stateful programmatic web browsing in Python")
1210 (description
1211 "Mechanize implements stateful programmatic web browsing in Python,
1212after Andy Lester’s Perl module WWW::Mechanize.")
1213 (license (license:non-copyleft
1214 "file://COPYING"
1215 "See COPYING in the distribution."))))
1216
1217
1218(define-public python-simplejson
1219 (package
1220 (name "python-simplejson")
1221 (version "3.14.0")
1222 (source
1223 (origin
1224 (method url-fetch)
1225 (uri (pypi-uri "simplejson" version))
1226 (sha256
1227 (base32
1228 "1lkv3xlf7ryzi69zqfdbkvpxdfy1rg1rq2yzcnxgf4km5m6difqy"))))
1229 (build-system python-build-system)
1230 (home-page "http://simplejson.readthedocs.org/en/latest/")
1231 (synopsis
1232 "Json library for Python")
1233 (description
1234 "JSON (JavaScript Object Notation) is a subset of JavaScript
1235syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1236format.
1237
1238Simplejson exposes an API familiar to users of the standard library marshal
1239and pickle modules. It is the externally maintained version of the json
1240library contained in Python 2.6, but maintains compatibility with Python 2.5
1241and (currently) has significant performance advantages, even without using
1242the optional C extension for speedups. Simplejson is also supported on
1243Python 3.3+.")
1244 (license license:x11)))
1245
1246(define-public python2-simplejson
1247 (package-with-python2 python-simplejson))
1248
1249
1250(define-public python-pyicu
1251 (package
1252 (name "python-pyicu")
dc23bb45 1253 (version "2.3.1")
44d10b1f
RW
1254 (source
1255 (origin
1256 (method url-fetch)
1257 (uri (pypi-uri "PyICU" version))
1258 (sha256
1259 (base32
dc23bb45 1260 "1x4w8m7ifki9z2a187pgjr33z6z0rp2fii9b73djak1vhm9v9cnx"))))
44d10b1f
RW
1261 (build-system python-build-system)
1262 (inputs
1263 `(("icu4c" ,icu4c)))
1264 (native-inputs
1265 `(("python-pytest" ,python-pytest)
1266 ("python-six" ,python-six)))
1267 (home-page "https://github.com/ovalhub/pyicu")
1268 (synopsis "Python extension wrapping the ICU C++ API")
1269 (description
1270 "PyICU is a python extension wrapping the ICU C++ API.")
1271 (properties `((python2-variant . ,(delay python2-pyicu))))
1272 (license license:x11)))
1273
1274(define-public python2-pyicu
1275 (let ((base (package-with-python2
1276 (strip-python2-variant python-pyicu))))
1277 (package
1278 (inherit base)
1279 (arguments
1280 `(,@(package-arguments base)
1281 #:phases
1282 (modify-phases %standard-phases
1283 (add-before 'check 'delete-failing-test
1284 (λ _
1285 ;; XXX: This fails due to Unicode issues unique to Python 2,
1286 ;; it seems: <https://github.com/ovalhub/pyicu/issues/61>.
1287 (delete-file "test/test_Script.py")
1288 #t))))))))
1289
1290(define-public python2-dogtail
1291 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1292 ;; spaces in indentation" with Python 3.
1293 (package
1294 (name "python2-dogtail")
1295 (version "0.9.9")
1296 (source (origin
1297 (method url-fetch)
1298 (uri (pypi-uri "dogtail" version))
1299 (sha256
1300 (base32
1301 "0p5wfssvzr9w0bvhllzbbd8fnp4cca2qxcpcsc33dchrmh5n552x"))))
1302 (build-system python-build-system)
1303 (arguments `(#:python ,python-2
1304 #:tests? #f)) ; invalid command "test"
1305 ;; Currently no offical homepage.
e85af137 1306 (home-page "https://pypi.org/project/dogtail/")
44d10b1f
RW
1307 (synopsis "GUI test tool and automation framework written in Python")
1308 (description
1309 "Dogtail is a GUI test tool and automation framework written in Python.
1310It uses Accessibility (a11y) technologies to communicate with desktop
1311applications. dogtail scripts are written in Python and executed like any
1312other Python program.")
1313 (license license:gpl2+)))
1314
1315(define-public python-empy
1316 (package
1317 (name "python-empy")
0f6d5115 1318 (version "3.3.3")
44d10b1f
RW
1319 (source (origin
1320 (method url-fetch)
1321 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1322 version ".tar.gz"))
1323 (sha256
1324 (base32
0f6d5115 1325 "1mxfy5mgp473ga1pgz2nvm8ds6z4g3hdky8523z6jzvcs9ny6hcq"))))
44d10b1f
RW
1326 (build-system python-build-system)
1327 (arguments
0f6d5115 1328 `(#:tests? #f)) ; python2 only
44d10b1f
RW
1329 (home-page "http://www.alcyone.com/software/empy/")
1330 (synopsis "Templating system for Python")
1331 (description
1332 "EmPy is a system for embedding Python expressions and statements in
1333template text; it takes an EmPy source file, processes it, and produces
1334output. This is accomplished via expansions, which are special signals to the
1335EmPy system and are set off by a special prefix (by default the at sign, @@).
1336EmPy can expand arbitrary Python expressions and statements in this way, as
1337well as a variety of special forms. Textual data not explicitly delimited in
1338this way is sent unaffected to the output, allowing Python to be used in
1339effect as a markup language. Also supported are callbacks via hooks,
1340recording and playback via diversions, and dynamic, chainable filters. The
1341system is highly configurable via command line options and embedded
1342commands.")
1343 (license license:lgpl2.1+)))
1344
1345(define-public python2-empy
0f064242
TGR
1346 (let ((base (package-with-python2 (strip-python2-variant python-empy))))
1347 (package
1348 (inherit base)
1349 (arguments `(,@(package-arguments base)
1350 #:tests? #t)))))
44d10b1f
RW
1351
1352(define-public python2-element-tree
1353 (package
1354 (name "python2-element-tree")
1355 (version "1.2.6")
1356 (source (origin
1357 (method url-fetch)
1358 (uri (string-append
1359 "http://effbot.org/media/downloads/elementtree-"
1360 version "-20050316.tar.gz"))
1361 (sha256
1362 (base32
1363 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1364 (build-system python-build-system)
1365 (arguments
1366 `(#:python ,python-2 ; seems to be part of Python 3
1367 #:tests? #f)) ; no 'test' sub-command
1368 (synopsis "Toolkit for XML processing in Python")
1369 (description
1370 "ElementTree is a Python library supporting lightweight XML processing.")
1371 (home-page "http://effbot.org/zone/element-index.htm")
1372 (license (license:x11-style
1373 "http://docs.python.org/2/license.html"
1374 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1375
1376(define-public python2-pybugz
1377 (package
1378 (name "python2-pybugz")
1379 (version "0.6.11")
1380 (source (origin
1381 (method url-fetch)
1382 (uri (string-append
1383 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1384 version ".tar.gz"))
1385 (sha256
1386 (base32
1387 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1388 (patches (search-patches "pybugz-stty.patch"
1389 "pybugz-encode-error.patch"))))
1390 (build-system python-build-system)
1391 (arguments
1392 `(#:python ,python-2 ; SyntaxError with Python 3
1393 #:tests? #f)) ; no 'test' sub-command
1394 (propagated-inputs
1395 `(("element-tree" ,python2-element-tree)))
1396 (synopsis "Python and command-line interface to Bugzilla")
1397 (description
1398 "PyBugz is a Python library and command-line tool to query the Bugzilla
1399bug tracking system. It is meant as an aid to speed up interaction with the
1400bug tracker.")
1401 (home-page "http://www.liquidx.net/pybugz/")
1402 (license license:gpl2)))
1403
1404(define-public python2-enum
1405 (package
1406 (name "python2-enum")
1407 (version "0.4.6")
1408 (source (origin
1409 (method url-fetch)
1410 (uri (pypi-uri "enum" version))
1411 (sha256
1412 (base32
1413 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
1414 (build-system python-build-system)
1415 (arguments
1416 `(#:python ,python-2))
e85af137 1417 (home-page "https://pypi.org/project/enum/")
44d10b1f
RW
1418 (synopsis "Robust enumerated type support in Python")
1419 (description
1420 "This provides a module for robust enumerations in Python. It has
1421been superseded by the Python standard library and is provided only for
1422compatibility.")
1423 ;; Choice of either license.
1424 (license (list license:gpl3+ license:psfl))))
1425
1426(define-public python-enum34
1427 (package
1428 (name "python-enum34")
1429 (version "1.1.6")
1430 (source
1431 (origin
1432 (method url-fetch)
1433 (uri (pypi-uri "enum34" version))
1434 (sha256
1435 (base32
1436 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
1437 (build-system python-build-system)
e85af137 1438 (home-page "https://pypi.org/project/enum34/")
44d10b1f
RW
1439 (synopsis "Backported Python 3.4 Enum")
1440 (description
1441 "Enum34 is the new Python stdlib enum module available in Python 3.4
1442backported for previous versions of Python from 2.4 to 3.3.")
1443 (license license:bsd-3)))
1444
1445(define-public python2-enum34
1446 (package-with-python2 python-enum34))
1447
1448(define-public python-parse-type
1449 (package
1450 (name "python-parse-type")
1451 (version "0.4.2")
1452 (source
1453 (origin
1454 (method url-fetch)
1455 (uri (pypi-uri "parse_type" version))
1456 (sha256
1457 (base32
1458 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
1459 (build-system python-build-system)
1460 (propagated-inputs
1461 `(("python-six" ,python-six)
1462 ("python-parse" ,python-parse)))
1463 (native-inputs
1464 `(("python-pytest" ,python-pytest)
1465 ("python-pytest-runner" ,python-pytest-runner)))
1466 (home-page "https://github.com/jenisys/parse_type")
1467 (synopsis "Extended parse module")
1468 (description
1469 "Parse_type extends the python parse module.")
1470 (properties
1471 `((python2-variant . ,(delay python2-parse-type))))
1472 (license license:bsd-3)))
1473
1474(define-public python2-parse-type
1475 (let ((base (package-with-python2
1476 (strip-python2-variant python-parse-type))))
1477 (package (inherit base)
1478 (propagated-inputs
1479 `(("python2-enum34" ,python2-enum34)
1480 ,@(package-propagated-inputs base))))))
1481
1482(define-public python-parse
1483 (package
1484 (name "python-parse")
1485 (version "1.8.4")
1486 (source
1487 (origin
1488 (method url-fetch)
1489 (uri (pypi-uri "parse" version))
1490 (sha256
1491 (base32
1492 "0f8997xr8nq2nq35iiviq8ningd1zvy59fg503xfpbi2dwhgdkf3"))))
1493 (build-system python-build-system)
1494 (arguments
1495 `(#:phases
1496 (modify-phases %standard-phases
1497 (replace 'check
1498 (lambda _ (invoke "python" "test_parse.py"))))))
1499 (home-page "https://github.com/r1chardj0n3s/parse")
1500 (synopsis "Parse strings")
1501 (description
1502 "Parse strings using a specification based on the Python @code{format()}
1503syntax.")
1504 (license license:x11)))
1505
1506(define-public python-polib
1507 (package
1508 (name "python-polib")
1509 (version "1.0.8")
1510 (source (origin
1511 (method url-fetch)
1512 (uri (pypi-uri "polib" version))
1513 (sha256
1514 (base32
1515 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1516 (build-system python-build-system)
1517 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1518 (synopsis "Manipulate, create and modify gettext files")
1519 (description "Polib can manipulate any gettext format (po, pot and mo)
1520files. It can be used to create po files from scratch or to modify
1521existing ones.")
1522 (license license:expat)))
1523
1524(define-public python2-polib
1525 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1526 (package
1527 (inherit base)
1528 (arguments `(,@(package-arguments base)
1529 ;; Tests don't work with python2.
1530 #:tests? #f)))))
1531
6830120e
TLC
1532(define-public python-poyo
1533 (package
1534 (name "python-poyo")
1535 (version "0.5.0")
1536 (source
1537 (origin
1538 (method url-fetch)
1539 (uri (pypi-uri "poyo" version))
1540 (sha256
1541 (base32
1542 "1pflivs6j22frz0v3dqxnvc8yb8fb52g11lqr88z0i8cg2m5csg2"))))
1543 (build-system python-build-system)
1544 (home-page "https://github.com/hackebrot/poyo")
1545 (synopsis "Lightweight YAML Parser for Python")
1546 (description
1547 "This package provides a lightweight YAML Parser for Python. It supports
1548only a chosen subset of the YAML format that is required to parse cookiecutter
1549user configuration files. It does not have support for serializing into YAML
1550and is not compatible with JSON.")
1551 (license license:expat)))
1552
44d10b1f
RW
1553(define-public scons
1554 (package
1555 (name "scons")
05487ed8 1556 (version "3.0.4")
44d10b1f 1557 (source (origin
ad34338d
RW
1558 (method git-fetch)
1559 (uri (git-reference
1560 (url "https://github.com/SCons/scons.git")
1561 (commit version)))
1562 (file-name (git-file-name name version))
44d10b1f
RW
1563 (sha256
1564 (base32
05487ed8 1565 "1xy8jrwz87y589ihcld4hv7wn122sjbz914xn8h50ww77wbhk8hn"))))
44d10b1f
RW
1566 (build-system python-build-system)
1567 (arguments
1568 `(#:use-setuptools? #f ; still relies on distutils
ad34338d
RW
1569 #:tests? #f ; no 'python setup.py test' command
1570 #:phases
1571 (modify-phases %standard-phases
1572 (add-before 'build 'bootstrap
1573 (lambda _
1574 (substitute* "src/engine/SCons/compat/__init__.py"
1575 (("sys.modules\\[new\\] = imp.load_module\\(old, \\*imp.find_module\\(old\\)\\)")
1576 "sys.modules[new] = __import__(old)"))
05487ed8
RW
1577 (substitute* "src/engine/SCons/Platform/__init__.py"
1578 (("mod = imp.load_module\\(full_name, file, path, desc\\)")
1579 "mod = __import__(full_name)"))
ad34338d
RW
1580 (invoke "python" "bootstrap.py" "build/scons" "DEVELOPER=guix")
1581 (chdir "build/scons")
1582 #t)))))
3602de33 1583 (home-page "https://scons.org/")
44d10b1f
RW
1584 (synopsis "Software construction tool written in Python")
1585 (description
1586 "SCons is a software construction tool. Think of SCons as an improved,
1587cross-platform substitute for the classic Make utility with integrated
1588functionality similar to autoconf/automake and compiler caches such as ccache.
1589In short, SCons is an easier, more reliable and faster way to build
1590software.")
1591 (license license:x11)))
1592
1593(define-public scons-python2
1594 (package
1595 (inherit (package-with-python2 scons))
1596 (name "scons-python2")))
1597
1598(define-public python-extras
1599 (package
1600 (name "python-extras")
1601 (version "1.0.0")
1602 (source
1603 (origin
1604 (method url-fetch)
1605 (uri (pypi-uri "extras" version))
1606 (sha256
1607 (base32
1608 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
1609 (build-system python-build-system)
1610 (arguments
1611 ;; FIXME: Circular dependency on testtools.
1612 '(#:tests? #f))
1613 (home-page "https://github.com/testing-cabal/extras")
1614 (synopsis "Useful extensions to the Python standard library")
1615 (description
1616 "Extras is a set of extensions to the Python standard library.")
1617 (license license:expat)))
1618
1619(define-public python2-extras
1620 (package-with-python2 python-extras))
1621
1622(define-public python-mimeparse
1623 (package
1624 (name "python-mimeparse")
1625 (version "1.6.0")
1626 (source
1627 (origin
1628 (method url-fetch)
89bf667c 1629 (uri (pypi-uri "python-mimeparse" version))
44d10b1f
RW
1630 (sha256
1631 (base32
1632 "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n"))))
1633 (build-system python-build-system)
1634 (arguments
1635 '(#:phases
1636 (modify-phases %standard-phases
1637 (replace 'check
1638 (lambda _
1639 (invoke "./mimeparse_test.py"))))))
1640 (home-page
1641 "https://github.com/dbtsai/python-mimeparse")
1642 (synopsis "Python library for parsing MIME types")
1643 (description
1644 "Mimeparse provides basic functions for parsing MIME type names and
1645matching them against a list of media-ranges.")
1646 (license license:expat)))
1647
1648(define-public python2-mimeparse
1649 (package-with-python2 python-mimeparse))
1650
1651(define-public python-miniboa
1652 (package
1653 (name "python-miniboa")
1654 (version "1.0.7")
1655 (source
1656 (origin
1657 (method url-fetch)
1658 (uri (pypi-uri "miniboa" version))
1659 (sha256
1660 (base32
1661 "09jh3pn4rh7kh7jayanf8jzy6gp03791b5a193w6148cf3i6k9m3"))))
1662 (build-system python-build-system)
1663 (home-page "https://github.com/shmup/miniboa")
1664 (synopsis "Simple, single-threaded Telnet server")
1665 (description
1666 "Miniboa is a simple, asynchronous, single-threaded, poll-based Telnet
1667server.")
1668 (license license:asl2.0)))
1669
1670(define-public python2-miniboa
1671 (package-with-python2 python-miniboa))
1672
1673(define-public python-pafy
1674 (package
1675 (name "python-pafy")
1676 (version "0.5.3.1")
1677 (source
1678 (origin
1679 (method url-fetch)
1680 (uri (pypi-uri "pafy" version))
1681 (sha256
1682 (base32
1683 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
1684 (build-system python-build-system)
1685 (arguments
1686 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
1687 (propagated-inputs
1688 ;; Youtube-dl is a python package which is imported in the file
1689 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1690 `(("youtube-dl" ,youtube-dl)))
1691 (home-page "https://np1.github.io/pafy/")
1692 (synopsis "Retrieve YouTube content and metadata")
1693 (description
1694 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1695 (license license:lgpl3+)))
1696
1697(define-public python2-funcsigs
1698 (package
1699 (name "python2-funcsigs")
1700 (version "1.0.2")
1701 (source (origin
1702 (method url-fetch)
1703 (uri (pypi-uri "funcsigs" version))
1704 (sha256
1705 (base32
1706 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
1707 (build-system python-build-system)
1708 (arguments
1709 `(#:python ,python-2))
1710 (native-inputs
1711 `(("python2-unittest2" ,python2-unittest2)))
1712 (home-page "http://funcsigs.readthedocs.org")
1713 (synopsis "Python function signatures from PEP362")
1714 (description
1715 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
1716 (license license:asl2.0)))
1717
1718(define-public python2-funcsigs-bootstrap
1719 (package
1720 (inherit python2-funcsigs)
1721 (name "python2-funcsigs-bootstrap")
1722 (native-inputs `())
1723 (arguments
1724 `(#:tests? #f
1725 ,@(package-arguments python2-funcsigs)))))
1726
1727(define-public python-py
1728 (package
1729 (name "python-py")
08eba545 1730 (version "1.8.0")
44d10b1f
RW
1731 (source
1732 (origin
1733 (method url-fetch)
1734 (uri (pypi-uri "py" version))
1735 (sha256
1736 (base32
08eba545 1737 "0lsy1gajva083pzc7csj1cvbmminb7b4l6a0prdzyb3fd829nqyw"))))
44d10b1f
RW
1738 (build-system python-build-system)
1739 (arguments
1740 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1741 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1742 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1743 ;; Is this module globally installed?"
1744 '(#:tests? #f))
1745 (native-inputs
1746 `(("python-setuptools-scm" ,python-setuptools-scm)))
1747 (home-page "https://github.com/pytest-dev/py")
1748 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1749 (description
1750 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1751code introspection, and logging.")
1752 (license license:expat)))
1753
1754(define-public python2-py
1755 (package-with-python2 python-py))
1756
1757;; Recent versions of python-fixtures and python-testrepository need
1758;; python-pbr for packaging, which itself needs these two packages for
1759;; testing.
1760;; To fix this circular dependency, we use a build of python-pbr, based on the
1761;; same source, just without any test dependencies and with tests disabled.
1762;; python-pbr-minmal is then used to package python-fixtures and
1763;; python-testrepository.
1764;; Strictly speaking we currently could remove the test-requirements from the
1765;; normal python-pbr package (and save this package) since test are disabled
1766;; there anyway. But this may change in future.
1767(define-public python-pbr-minimal
1768 (package
1769 (name "python-pbr-minimal")
1770 (version "3.0.1")
1771 (source
1772 (origin
1773 (method url-fetch)
1774 (uri (pypi-uri "pbr" version))
1775 (sha256
1776 (base32
1777 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
1778 (build-system python-build-system)
1779 (arguments
1780 `(#:tests? #f))
58d4e949 1781 (home-page "https://docs.openstack.org/pbr/latest/")
44d10b1f
RW
1782 (synopsis "Minimal build of python-pbr used for bootstrapping")
1783 (description
1784 "Used only for bootstrapping python2-pbr, you should not need this.")
1785 (license license:asl2.0)))
1786
1787(define-public python2-pbr-minimal
1788 (package-with-python2 python-pbr-minimal))
1789
1790(define-public python-pbr
1791 (package
1792 (inherit python-pbr-minimal)
1793 (name "python-pbr")
1794 (arguments
1795 `(#:tests? #f)) ;; Most tests seem to use the Internet.
1796 (propagated-inputs
1797 `(("git" ,git))) ;; pbr actually uses the "git" binary.
1798 (native-inputs
1799 `(("python-fixtures" ,python-fixtures-bootstrap)
1800 ;; discover, coverage, hacking, subunit
1801 ("python-mock" ,python-mock)
1802 ("python-six" ,python-six)
1803 ("python-sphinx" ,python-sphinx)
1804 ("python-testrepository" ,python-testrepository-bootstrap)
1805 ("python-testresources" ,python-testresources-bootstrap)
1806 ("python-testscenarios" ,python-testscenarios-bootstrap)
1807 ("python-testtools" ,python-testtools-bootstrap)
1808 ("python-virtualenv" ,python-virtualenv)))
1809 (synopsis "Enhance the default behavior of Python’s setuptools")
1810 (description
1811 "Python Build Reasonableness (PBR) is a library that injects some useful
1812and sensible default behaviors into your setuptools run. It will set
1813versions, process requirements files and generate AUTHORS and ChangeLog file
1814from git information.
1815")))
1816
1817(define-public python2-pbr
1818 (package-with-python2 python-pbr))
1819
ea43f0d5
MB
1820(define-public python-pyrsistent
1821 (package
1822 (name "python-pyrsistent")
1823 (version "0.14.11")
1824 (home-page "https://github.com/tobgu/pyrsistent")
1825 (source (origin
1826 (method url-fetch)
1827 (uri (pypi-uri "pyrsistent" version))
1828 (sha256
1829 (base32
1830 "1qkh74bm296mp5g3r11lgsksr6bh4w1bf8pji4nmxdlfj542ga1w"))))
1831 (build-system python-build-system)
1832 (native-inputs
1833 `(("python-hypothesis" ,python-hypothesis)
1834 ("python-pytest" ,python-pytest)
1835 ("python-pytest-runner" ,python-pytest-runner)))
1836 (propagated-inputs
1837 `(("python-six" ,python-six)))
1838 (synopsis "Persistent data structures for Python")
1839 (description
1840 "Pyrsistent is a number of persistent collections (by some referred to as
1841functional data structures). Persistent in the sense that they are immutable.
1842
1843All methods on a data structure that would normally mutate it instead return a
1844new copy of the structure containing the requested updates. The original
1845structure is left untouched.")
1846 (license license:expat)))
1847
1848(define-public python2-pyrsistent
1849 (package-with-python2 python-pyrsistent))
1850
44d10b1f
RW
1851(define-public python-exif-read
1852 (package
1853 (name "python-exif-read")
1854 (version "2.1.2")
1855 (source (origin
1856 (method url-fetch)
1857 (uri (pypi-uri "ExifRead" version))
1858 (sha256
1859 (base32
1860 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
1861 (build-system python-build-system)
1862 (arguments `(#:tests? #f)) ; no tests
1863 (home-page "https://github.com/ianare/exif-py")
1864 (synopsis "Python library to extract EXIF data from image files")
1865 (description
1866 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
1867files.")
1868 (license license:bsd-3)))
1869
1870(define-public python2-exif-read
1871 (package-with-python2 python-exif-read))
1872
1873(define-public python-pyld
1874 (package
1875 (name "python-pyld")
6d4ed78d 1876 (version "1.0.5")
44d10b1f
RW
1877 (source (origin
1878 (method url-fetch)
1879 (uri (pypi-uri "PyLD" version))
1880 (sha256
1881 (base32
6d4ed78d 1882 "1ywbdbsrkg533qh8xn9ifjh2mvam6v5msrjyqq73jfpvcp89qvff"))))
44d10b1f
RW
1883 (build-system python-build-system)
1884 (home-page "https://github.com/digitalbazaar/pyld")
1885 (synopsis "Python implementation of the JSON-LD specification")
1886 (description
1887 "PyLD is an implementation of the JSON-LD specification.")
1888 (license license:bsd-3)))
1889
1890(define-public python2-pyld
1891 (package-with-python2 python-pyld))
1892
1893(define-public python-click
1894 (package
1895 (name "python-click")
61984855 1896 (version "7.0")
44d10b1f
RW
1897 (source
1898 (origin
1899 (method url-fetch)
1900 (uri (pypi-uri "click" version))
1901 (sha256
1902 (base32
61984855 1903 "1mzjixd4vjbjvzb6vylki9w1556a9qmdh35kzmq6cign46av952v"))))
44d10b1f
RW
1904 (build-system python-build-system)
1905 (arguments
8d7e7ca6 1906 `(#:phases
44d10b1f
RW
1907 (modify-phases %standard-phases
1908 (add-after 'unpack 'fix-paths
1909 (lambda* (#:key inputs #:allow-other-keys)
1910 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
1911 "cross-libc" "libc"))))
1912 (substitute* "click/_unicodefun.py"
1913 (("'locale'")
1914 (string-append "'" glibc "/bin/locale'"))))
8d7e7ca6
EF
1915 #t))
1916 (replace 'check
1917 (lambda _
1918 (invoke "python" "-m" "pytest"))))))
44d10b1f
RW
1919 (native-inputs
1920 `(("python-pytest" ,python-pytest)))
61984855 1921 (home-page "https://palletsprojects.com/p/click/")
44d10b1f
RW
1922 (synopsis "Command line library for Python")
1923 (description
1924 "Click is a Python package for creating command line interfaces in a
1925composable way with as little code as necessary. Its name stands for
1926\"Command Line Interface Creation Kit\". It's highly configurable but comes
1927with sensible defaults out of the box.")
1928 (license license:bsd-3)))
1929
1930(define-public python2-click
1931 (package-with-python2 python-click))
1932
1933(define-public python-wheel
1934 (package
1935 (name "python-wheel")
8f137daf 1936 (version "0.33.6")
44d10b1f
RW
1937 (source
1938 (origin
1939 (method url-fetch)
1940 (uri (pypi-uri "wheel" version))
1941 (sha256
1942 (base32
8f137daf 1943 "0ii6f34rvpjg3nmw4bc2h7fhdsy38y1h93hghncfs5akfrldmj8h"))))
44d10b1f 1944 (build-system python-build-system)
8f137daf
MB
1945 (arguments
1946 ;; FIXME: The test suite runs "python setup.py bdist_wheel", which in turn
1947 ;; fails to find the newly-built bdist_wheel library, even though it is
1948 ;; available on PYTHONPATH. What search path is consulted by setup.py?
1949 '(#:tests? #f))
44d10b1f
RW
1950 (home-page "https://bitbucket.org/pypa/wheel/")
1951 (synopsis "Format for built Python packages")
1952 (description
1953 "A wheel is a ZIP-format archive with a specially formatted filename and
1954the @code{.whl} extension. It is designed to contain all the files for a PEP
1955376 compatible install in a way that is very close to the on-disk format. Many
1956packages will be properly installed with only the @code{Unpack} step and the
1957unpacked archive preserves enough information to @code{Spread} (copy data and
1958scripts to their final locations) at any later time. Wheel files can be
1959installed with a newer @code{pip} or with wheel's own command line utility.")
8f137daf 1960 (license license:expat)))
44d10b1f
RW
1961
1962(define-public python2-wheel
8f137daf 1963 (package-with-python2 python-wheel))
44d10b1f
RW
1964
1965(define-public python-vcversioner
1966 (package
1967 (name "python-vcversioner")
1968 (version "2.16.0.0")
1969 (source
1970 (origin
1971 (method url-fetch)
1972 (uri (pypi-uri "vcversioner" version))
1973 (sha256
1974 (base32
1975 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
1976 (build-system python-build-system)
1977 (synopsis "Python library for version number discovery")
1978 (description "Vcversioner is a Python library that inspects tagging
1979information in a variety of version control systems in order to discover
1980version numbers.")
1981 (home-page "https://github.com/habnabit/vcversioner")
1982 (license license:isc)))
1983
1984(define-public python2-vcversioner
1985 (package-with-python2 python-vcversioner))
1986
5591fc4f
MC
1987(define-public python-jdcal
1988 (package
1989 (name "python-jdcal")
1990 (version "1.4")
1991 (source
1992 (origin
1993 (method url-fetch)
1994 (uri (pypi-uri "jdcal" version))
1995 (sha256
1996 (base32
1997 "1ja6j2xq97bsl6rv09mhdx7n0xnrsfx0mj5xqza0mxghqmkm02pa"))))
1998 (build-system python-build-system)
1999 (arguments
2000 `(#:phases (modify-phases %standard-phases
2001 (replace 'check
2002 (lambda _
2003 (invoke "pytest"))))))
2004 (native-inputs
2005 `(("python-pytest" ,python-pytest)))
2006 (home-page "https://github.com/phn/jdcal")
2007 (synopsis "Functions to convert between Julian dates Gregorian dates")
2008 (description "This Python library provides functions for converting
2009between Julian dates and Gregorian dates.")
2010 (license license:bsd-2)))
2011
2012(define-public python2-jdcal
2013 (package-with-python2 python-jdcal))
2014
06d41d8d
VC
2015(define-public python-jsondiff
2016 (package
2017 (name "python-jsondiff")
2018 (version "1.2.0")
2019 (source
2020 (origin
2021 (method url-fetch)
2022 (uri (pypi-uri "jsondiff" version))
2023 (sha256
2024 (base32
2025 "00v3689175aqzdscrxpffm712ylp8jvcpqdg51ca22ni6721p51l"))))
2026 (build-system python-build-system)
2027 (native-inputs
2028 `(("python-nose" ,python-nose)
2029 ("python-nose-random" ,python-nose-random)))
2030 (home-page
2031 "https://github.com/fzumstein/jsondiff")
2032 (synopsis "Compare JSON and JSON-like structures in Python")
2033 (description "@code{jsondiff} is a Python library which lets you
2034compare, diff, and patch JSON and JSON-like structures in Python.")
2035 (license license:expat)))
2036
44d10b1f
RW
2037(define-public python-jsonschema
2038 (package
2039 (name "python-jsonschema")
1adde06e 2040 (version "3.0.1")
44d10b1f
RW
2041 (source (origin
2042 (method url-fetch)
786ccb87 2043 (uri (pypi-uri "jsonschema" version))
44d10b1f
RW
2044 (sha256
2045 (base32
1adde06e 2046 "03g20i1xfg4qdlk4475pl4pp7y0h37g1fbgs5qhy678q9xb822hc"))))
44d10b1f
RW
2047 (build-system python-build-system)
2048 (arguments
2049 '(#:phases
2050 (modify-phases %standard-phases
1adde06e
MB
2051 (replace 'check
2052 (lambda _
2053 (setenv "PYTHONPATH" (string-append ".:" (getenv "PYTHONPATH")))
2054 (invoke "trial" "jsonschema"))))))
44d10b1f 2055 (native-inputs
1adde06e
MB
2056 `(("python-setuptools_scm" ,python-setuptools-scm)
2057 ("python-twisted" ,python-twisted)))
2058 (propagated-inputs
2059 `(("python-attrs" ,python-attrs)
2060 ("python-pyrsistent" ,python-pyrsistent)
2061 ("python-six" ,python-six)))
44d10b1f
RW
2062 (home-page "https://github.com/Julian/jsonschema")
2063 (synopsis "Implementation of JSON Schema for Python")
2064 (description
2065 "Jsonschema is an implementation of JSON Schema for Python.")
2066 (license license:expat)
2067 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2068
2069(define-public python2-jsonschema
2070 (let ((jsonschema (package-with-python2
2071 (strip-python2-variant python-jsonschema))))
2072 (package (inherit jsonschema)
44d10b1f 2073 (propagated-inputs
1adde06e
MB
2074 `(("python2-functools32" ,python2-functools32)
2075 ,@(package-propagated-inputs jsonschema))))))
44d10b1f 2076
914bba28
TGR
2077;; This old version is still required by docker-compose as of 1.24.0.
2078(define-public python-jsonschema-2.6
2079 (package
2080 (name "python-jsonschema")
2081 (version "2.6.0")
2082 (source (origin
2083 (method url-fetch)
2084 (uri (pypi-uri "jsonschema" version))
2085 (sha256
2086 (base32
2087 "00kf3zmpp9ya4sydffpifn0j0mzm342a2vzh82p6r0vh10cg7xbg"))))
2088 (build-system python-build-system)
2089 (arguments
2090 '(#:phases
2091 (modify-phases %standard-phases
2092 (replace 'check (lambda _ (invoke "nosetests"))))))
2093 (native-inputs
2094 `(("python-nose" ,python-nose)
2095 ("python-vcversioner" ,python-vcversioner)))
2096 (home-page "https://github.com/Julian/jsonschema")
2097 (synopsis "Implementation of JSON Schema for Python")
2098 (description
2099 "Jsonschema is an implementation of JSON Schema for Python.")
2100 (license license:expat)
2101 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2102
44d10b1f
RW
2103(define-public python-schema
2104 (package
2105 (name "python-schema")
2106 (version "0.6.6")
2107 (source
2108 (origin
2109 (method url-fetch)
2110 (uri (pypi-uri "schema" version))
2111 (sha256
2112 (base32
2113 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
2114 (build-system python-build-system)
2115 (native-inputs
2116 `(("python-pytest" ,python-pytest)))
2117 (home-page "https://github.com/keleshev/schema")
2118 (synopsis "Simple data validation library")
2119 (description
2120 "@code{python-schema} is a library for validating Python data
2121structures, such as those obtained from config-files, forms, external
2122services or command-line parsing, converted from JSON/YAML (or
2123something else) to Python data-types.")
2124 (license license:psfl)))
2125
2126(define-public python2-schema
2127 (package-with-python2 python-schema))
2128
2129(define-public python-schema-0.5
2130 (package (inherit python-schema)
2131 (version "0.5.0")
2132 (source
2133 (origin
2134 (method url-fetch)
2135 (uri (pypi-uri "schema" version))
2136 (sha256
2137 (base32
2138 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
2139
2140(define-public python2-schema-0.5
2141 (package-with-python2 python-schema-0.5))
2142
2143(define-public python-kitchen
2144 (package
2145 (name "python-kitchen")
2146 (version "1.2.5")
2147 (source
2148 (origin
2149 (method url-fetch)
2150 (uri (pypi-uri "kitchen" version))
2151 (sha256
2152 (base32
2153 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
2154 (build-system python-build-system)
2155 (propagated-inputs
2156 `(("python-chardet" ,python-chardet)))
2157 (home-page "https://github.com/fedora-infra/kitchen")
2158 (synopsis "Python API for snippets")
2159 (description "@code{kitchen} module provides a python API for all sorts of
2160little useful snippets of code that everybody ends up writing for their projects
2161but never seem big enough to build an independent release. Use kitchen and stop
2162cutting and pasting that code over and over.")
2163 (license (list license:lgpl2.1+
2164 ;; subprocess.py, test_subprocess.py,
2165 ;; kitchen/pycompat25/defaultdict.py:
2166 license:psfl))))
2167
2168(define-public python2-kitchen
2169 (package-with-python2 python-kitchen))
2170
2171(define-public python-unidecode
2172 (package
2173 (name "python-unidecode")
eb80a300 2174 (version "1.1.1")
44d10b1f
RW
2175 (source (origin
2176 (method url-fetch)
2177 (uri (pypi-uri "Unidecode" version))
2178 (sha256
2179 (base32
eb80a300 2180 "1s6cp2lv4m0f00hjckjz8p6m7d3n3v16jvg353llf5ia1iqsnsib"))))
44d10b1f 2181 (build-system python-build-system)
e85af137 2182 (home-page "https://pypi.org/project/Unidecode/")
44d10b1f
RW
2183 (synopsis "ASCII transliterations of Unicode text")
2184 (description
2185 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2186useful when integrating with legacy code that doesn't support Unicode, or for
2187ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2188machine identifiers from human-readable Unicode strings that should still be
2189somewhat intelligible.")
2190 (license license:gpl2+)))
2191
2192(define-public python2-unidecode
2193 (package-with-python2 python-unidecode))
2194
2195(define-public python-pyjwt
2196 (package
2197 (name "python-pyjwt")
be6f2f56 2198 (version "1.7.1")
44d10b1f
RW
2199 (source
2200 (origin
2201 (method url-fetch)
2202 (uri (pypi-uri "PyJWT" version))
2203 (sha256
2204 (base32
be6f2f56 2205 "15hflax5qkw1v6nssk1r0wkj83jgghskcmn875m3wgvpzdvajncd"))
44d10b1f
RW
2206 (modules '((guix build utils)))
2207 (snippet
2208 '(begin
2209 (for-each delete-file-recursively
2210 (find-files "." "\\.pyc$"))
2211 #t))))
2212 (build-system python-build-system)
2213 (native-inputs
2214 `(("python-pytest" ,python-pytest)
2215 ("python-pytest-cov" ,python-pytest-cov)
2216 ("python-pytest-runner" ,python-pytest-runner)))
2217 (home-page "https://github.com/progrium/pyjwt")
2218 (synopsis "JSON Web Token implementation in Python")
2219 (description
2220 "PyJWT is a JSON Web Token implementation written in Python.")
2221 (license license:expat)))
2222
2223(define-public python2-pyjwt
2224 (package-with-python2 python-pyjwt))
2225
2226(define-public python-pykka
2227 (package
2228 (name "python-pykka")
2229 (version "1.2.1")
2230 (source
2231 (origin
2232 (method url-fetch)
2233 (uri (pypi-uri "Pykka" version))
2234 (sha256
2235 (base32
2236 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
2237 (build-system python-build-system)
2238 (native-inputs
2239 `(("python-mock" ,python-mock)
2240 ("python-nose" ,python-nose)
2241 ("python-gevent" ,python-gevent)
2242 ("python-eventlet" ,python-eventlet)))
2243 (home-page "https://www.pykka.org/")
2244 (synopsis "Pykka is a Python implementation of the actor model")
2245 (description
2246 "Pykka is a Python implementation of the actor model.
2247The actor model introduces some simple rules to control the sharing
2248of state and cooperation between execution units, which makes it
2249easier to build concurrent applications.")
2250 (license license:asl2.0)))
2251
2252(define-public python2-pykka
2253 (package-with-python2 python-pykka))
2254
8d22f7e3
VC
2255(define-public python-pymsgbox
2256 (package
2257 (name "python-pymsgbox")
2258 (version "1.0.6")
2259 (source
2260 (origin
2261 (method git-fetch)
2262 (uri (git-reference
2263 ;; LICENSE.txt is not present on pypi
2264 (url "https://github.com/asweigart/PyMsgBox")
2265 (commit "55926b55f46caa969c5ddb87990ebea2737bd66f")))
2266 (file-name (git-file-name name version))
2267 (sha256
2268 (base32
2269 "0zy7rjfpwlrd8b64j7jk2lb8m2npc21rnpwakpfvwgl4nxdy80rg"))))
2270 (arguments
2271 ;; Circular dependency to run tests:
2272 ;; Tests need pyautogui, which depends on pymsgbox.
2273 '(#:tests? #f))
2274 (build-system python-build-system)
2275 (home-page "https://github.com/asweigart/PyMsgBox")
2276 (synopsis "Python module for JavaScript-like message boxes")
2277 (description
2278 "PyMsgBox is a simple, cross-platform, pure Python module for
2279JavaScript-like message boxes. Types of dialog boxes include:
2280@enumerate
2281@item alert
2282@item confirm
2283@item prompt
2284@item password
2285@end enumerate
2286")
2287 (license license:bsd-3)))
2288
44d10b1f
RW
2289(define-public python-pympler
2290 (package
2291 (name "python-pympler")
2292 (home-page "https://pythonhosted.org/Pympler/")
6469af6f 2293 (version "0.8")
44d10b1f
RW
2294 (source (origin
2295 (method url-fetch)
2296 (uri (pypi-uri "Pympler" version))
2297 (sha256
2298 (base32
6469af6f 2299 "08mrpnb6cv2nvfncvr8a9a8bpwhnasa924anapnjvnaw5jcd4k7p"))))
44d10b1f
RW
2300 (build-system python-build-system)
2301 (arguments
2302 `(#:phases (modify-phases %standard-phases
2303 (delete 'check)
2304 (add-after 'install 'check
2305 (lambda* (#:key inputs outputs #:allow-other-keys)
2306 (add-installed-pythonpath inputs outputs)
2307 (invoke "python" "setup.py" "test"))))))
2308 (synopsis "Measure, monitor and analyze memory behavior")
2309 (description
2310 "Pympler is a development tool to measure, monitor and analyze
2311the memory behavior of Python objects in a running Python application.
2312
2313By pympling a Python application, detailed insight in the size and the
2314lifetime of Python objects can be obtained. Undesirable or unexpected
2315runtime behavior like memory bloat and other @samp{pymples} can easily
2316be identified.
2317
2318A web profiling frontend exposes process statistics, garbage
2319visualisation and class tracker statistics.")
2320 (license license:asl2.0)))
2321
2322(define-public python2-pympler
2323 (package-with-python2 python-pympler))
2324
2325(define-public python-itsdangerous
2326 (package
2327 (name "python-itsdangerous")
acfcf2ed 2328 (version "1.1.0")
44d10b1f
RW
2329 (source
2330 (origin
2331 (method url-fetch)
acfcf2ed 2332 (uri (pypi-uri "itsdangerous" version))
44d10b1f
RW
2333 (sha256
2334 (base32
acfcf2ed 2335 "068zpbksq5q2z4dckh2k1zbcq43ay74ylqn77rni797j0wyh66rj"))))
44d10b1f 2336 (build-system python-build-system)
acfcf2ed 2337 (home-page "https://palletsprojects.com/p/itsdangerous/")
44d10b1f
RW
2338 (synopsis "Python library for passing data to/from untrusted environments")
2339 (description
2340 "Itsdangerous provides various helpers to pass trusted data to untrusted
2341environments and back.")
2342 (license license:bsd-3)))
2343
2344(define-public python2-itsdangerous
2345 (package-with-python2 python-itsdangerous))
2346
2347(define-public python-pyyaml
2348 (package
2349 (name "python-pyyaml")
357af7f2 2350 (version "5.3")
44d10b1f
RW
2351 (source
2352 (origin
2353 (method url-fetch)
2354 (uri (pypi-uri "PyYAML" version))
2355 (sha256
2356 (base32
357af7f2 2357 "058nd4p8f25wwzy2aiwh18wcrdm6663cqbfdkgjp8y9cp7ampx79"))))
44d10b1f
RW
2358 (build-system python-build-system)
2359 (inputs
2360 `(("libyaml" ,libyaml)))
7509f34f 2361 (home-page "https://pyyaml.org")
44d10b1f
RW
2362 (synopsis "YAML parser and emitter for Python")
2363 (description
2364 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2365complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2366API, and sensible error messages. PyYAML supports standard YAML tags and
2367provides Python-specific tags that allow to represent an arbitrary Python
2368object.")
2369 (license license:expat)))
2370
2371(define-public python2-pyyaml
2372 (package-with-python2 python-pyyaml))
2373
2374(define-public python-vine
2375 (package
2376 (name "python-vine")
2377 (version "1.1.4")
2378 (source
2379 (origin
2380 (method url-fetch)
2381 (uri (pypi-uri "vine" version))
2382 (sha256
2383 (base32
2384 "0wkskb2hb494v9gixqnf4bl972p4ibcmxdykzpwjlfa5picns4aj"))))
2385 (build-system python-build-system)
2386 (native-inputs
2387 `(("python-pytest" ,python-pytest)
2388 ("python-case" ,python-case)))
2389 (home-page "https://github.com/celery/vine")
2390 (synopsis "Promises for Python")
2391 (description
2392 "@code{vine} provides a special implementation of promises in that it can
2393be used both for \"promise of a value\" and lazy evaluation. The biggest
2394upside for this is that everything in a promise can also be a promise,
2395e.g. filters, callbacks and errbacks can all be promises.")
2396 (license license:bsd-3)))
2397
2398(define-public python-virtualenv
2399 (package
2400 (name "python-virtualenv")
60067279 2401 (version "20.0.10")
44d10b1f
RW
2402 (source
2403 (origin
2404 (method url-fetch)
2405 (uri (pypi-uri "virtualenv" version))
2406 (sha256
2407 (base32
60067279 2408 "0y6x41l3ja891993i4adylbbyly0r4m52n2d0a0y9y4h3lzyh4l5"))))
44d10b1f 2409 (build-system python-build-system)
44d10b1f
RW
2410 (native-inputs
2411 `(("python-mock" ,python-mock)
94d57ba3
JK
2412 ("python-pytest" ,python-pytest)
2413 ;; NOTE: guix lint remarks that "python-setuptools should probably not
2414 ;; be an input at all". However, removing the input makes the build error:
2415 ;; File "setup.py", line 4, in <module>
2416 ;; raise RuntimeError("setuptools >= 41 required to build")
2417 ("python-setuptools" ,python-setuptools)
2418 ("python-setuptools-scm" ,python-setuptools-scm)))
828996bb 2419 (propagated-inputs
94d57ba3
JK
2420 `(("python-appdirs" ,python-appdirs)
2421 ("python-distlib" ,python-distlib)
2422 ("python-filelock" ,python-filelock)
2423 ("python-six" ,python-six)
2424 ("python-importlib-metadata" ,python-importlib-metadata)))
44d10b1f
RW
2425 (home-page "https://virtualenv.pypa.io/")
2426 (synopsis "Virtual Python environment builder")
2427 (description
2428 "Virtualenv is a tool to create isolated Python environments.")
7815afc9 2429 (properties `((python2-variant . ,(delay python2-virtualenv))))
44d10b1f
RW
2430 (license license:expat)))
2431
2432(define-public python2-virtualenv
7815afc9
MB
2433 (let ((base (package-with-python2 (strip-python2-variant python-virtualenv))))
2434 (package
2435 (inherit base)
2436 (arguments
2437 `(#:python ,python-2
2438 #:phases
2439 (modify-phases %standard-phases
2440 (add-after 'set-paths 'adjust-PYTHONPATH
2441 (lambda* (#:key inputs #:allow-other-keys)
2442 (let* ((python (assoc-ref inputs "python"))
2443 (python-sitedir (string-append python "/lib/python2.7"
2444 "/site-packages")))
2445 ;; XXX: 'python2' always comes first on PYTHONPATH
2446 ;; and shadows the 'setuptools' input. Move python2
2447 ;; last: this should be fixed in python-build-system
2448 ;; in a future rebuild cycle.
2449 (setenv "PYTHONPATH"
2450 (string-append (string-join (delete python-sitedir
2451 (string-split
2452 (getenv "PYTHONPATH")
2453 #\:))
2454 ":")
2455 ":" python-sitedir))
2456 (format #t "environment variable `PYTHONPATH' changed to `~a'~%"
2457 (getenv "PYTHONPATH"))
2458 #t))))))
2459 (propagated-inputs
2460 `(("python-contextlib2" ,python2-contextlib2)
2461 ,@(package-propagated-inputs base))))))
44d10b1f
RW
2462
2463(define-public python-markupsafe
2464 (package
2465 (name "python-markupsafe")
753eb411 2466 (version "1.1.1")
44d10b1f
RW
2467 (source
2468 (origin
2469 (method url-fetch)
5182927c 2470 (uri (pypi-uri "MarkupSafe" version))
44d10b1f
RW
2471 (sha256
2472 (base32
753eb411 2473 "0sqipg4fk7xbixqd8kq6rlkxj664d157bdwbh93farcphf92x1r9"))))
44d10b1f 2474 (build-system python-build-system)
753eb411
MB
2475 (arguments
2476 `(#:modules ((ice-9 ftw)
2477 (srfi srfi-1)
2478 (srfi srfi-26)
2479 (guix build utils)
2480 (guix build python-build-system))
2481 #:phases (modify-phases %standard-phases
2482 (replace 'check
2483 (lambda _
2484 (let ((cwd (getcwd))
2485 (libdir (find (cut string-prefix? "lib." <>)
2486 (scandir "build"))))
2487 (setenv "PYTHONPATH"
2488 (string-append cwd "/build/" libdir ":"
2489 (getenv "PYTHONPATH")))
2490 (invoke "pytest" "-vv")))))))
2491 (native-inputs
2492 `(("python-pytest" ,python-pytest)))
44d10b1f
RW
2493 (home-page "https://github.com/mitsuhiko/markupsafe")
2494 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2495 (description
2496 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2497for Python.")
2498 (license license:bsd-3)))
2499
2500(define-public python2-markupsafe
2501 (package-with-python2 python-markupsafe))
2502
2503(define-public python-jinja2
2504 (package
2505 (name "python-jinja2")
4a5c7934 2506 (version "2.10.1")
44d10b1f
RW
2507 (source
2508 (origin
2509 (method url-fetch)
2510 (uri (pypi-uri "Jinja2" version))
2511 (sha256
2512 (base32
4a5c7934 2513 "04shqrs56aj04ipyqykj512rw2l0zfammvj9krawzxz7xc14yp06"))))
44d10b1f
RW
2514 (build-system python-build-system)
2515 (propagated-inputs
2516 `(("python-markupsafe" ,python-markupsafe)))
2517 (home-page "http://jinja.pocoo.org/")
2518 (synopsis "Python template engine")
2519 (description
2520 "Jinja2 is a small but fast and easy to use stand-alone template engine
2521written in pure Python.")
2522 (license license:bsd-3)))
2523
2524(define-public python2-jinja2
2525 (package-with-python2 python-jinja2))
2526
ba42a6bf
TLC
2527(define-public python-jinja2-time
2528 (package
2529 (name "python-jinja2-time")
2530 (version "0.2.0")
2531 (source
2532 (origin
2533 (method url-fetch)
2534 (uri (pypi-uri "jinja2-time" version))
2535 (sha256
2536 (base32
2537 "0h0dr7cfpjnjj8bgl2vk9063a53649pn37wnlkd8hxjy656slkni"))))
2538 (build-system python-build-system)
2539 (propagated-inputs
2540 `(("python-arrow" ,python-arrow)
2541 ("python-jinja2" ,python-jinja2)))
2542 (home-page
2543 "https://github.com/hackebrot/jinja2-time")
2544 (synopsis "Jinja2 Extension for Dates and Times")
2545 (description
2546 "This package provides an extension for the template engine Jinja2. It
2547adds a 'now' tag providing a convenient access to the arrow.now() API from
2548templates. A format string can be provided to control the output.")
2549 (license license:expat)))
2550
44d10b1f
RW
2551(define-public python-pystache
2552 (package
2553 (name "python-pystache")
2554 (version "0.5.4")
2555 (source (origin
2556 (method url-fetch)
2557 (uri (pypi-uri "pystache" version))
2558 (sha256
2559 (base32
2560 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2561 (build-system python-build-system)
2562 (arguments
2563 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
2564 (home-page "http://defunkt.io/pystache/")
2565 (synopsis "Python logic-less template engine")
2566 (description
2567 "Pystache is a Python implementation of the framework agnostic,
2568logic-free templating system Mustache.")
2569 (license license:expat)
2570 (properties `((python2-variant . ,(delay python2-pystache))))))
2571
2572(define-public python2-pystache
2573 (package (inherit (package-with-python2
2574 (strip-python2-variant python-pystache)))
2575 (arguments
2576 `(#:python ,python-2
2577 #:phases
2578 (modify-phases %standard-phases
2579 (replace 'check
2580 (lambda _
dfafc29b 2581 (invoke "python" "test_pystache.py"))))))))
44d10b1f
RW
2582
2583(define-public python-joblib
2584 (package
2585 (name "python-joblib")
2586 (version "0.13.0")
2587 (source (origin
2588 (method url-fetch)
2589 (uri (pypi-uri "joblib" version))
2590 (sha256
2591 (base32
2592 "0612nazad8dxmn3xghfrmjax6456l4xy6hn9cngs7vydi14ds7v5"))))
2593 (build-system python-build-system)
2594 (arguments
2595 `(#:phases
2596 (modify-phases %standard-phases
2597 (replace 'check
2598 (lambda _ (invoke "pytest" "-v" "joblib"))))))
2599 (native-inputs
2600 `(("python-pytest" ,python-pytest)))
2601 (home-page "https://joblib.readthedocs.io/")
2602 (synopsis "Using Python functions as pipeline jobs")
2603 (description
2604 "Joblib is a set of tools to provide lightweight pipelining in Python.
2605In particular, joblib offers: transparent disk-caching of the output values
2606and lazy re-evaluation (memoize pattern), easy simple parallel computing
2607logging and tracing of the execution.")
2608 (license license:bsd-3)))
2609
2610(define-public python2-joblib
2611 (package-with-python2 python-joblib))
2612
a3363341
VC
2613(define-public python-daemon
2614 (package
2615 (name "python-daemon")
2616 (version "2.2.3")
2617 (source
2618 (origin
2619 (method url-fetch)
2620 (uri (pypi-uri "python-daemon" version))
2621 (sha256
2622 (base32
2623 "09fcjdjzk9ywmpnrj62iyxqgcygzdafsz41qlrk2dknzbagcmzmg"))))
2624 (build-system python-build-system)
2625 (arguments
2626 `(#:phases
2627 (modify-phases %standard-phases
2628 (add-before 'check 'disable-tests
2629 (lambda _
2630 ;; FIXME: Determine why test fails
2631 (substitute* "test/test_daemon.py"
2632 (("test_detaches_process_context")
2633 "skip_test_detaches_process_context"))
2634 #t)))))
2635 (propagated-inputs
2636 `(("python-lockfile" ,python-lockfile)))
2637 (native-inputs
2638 `(("python-unittest2" ,python-unittest2)
2639 ("python-testtools" ,python-testtools)
2640 ("python-testscenarios" ,python-testscenarios)
2641 ("python-mock" ,python-mock)
2642 ("python-docutils" ,python-docutils)))
2643 (home-page "https://pagure.io/python-daemon/")
2644 (synopsis "Python library for making a Unix daemon process")
2645 (description "Python-daemon is a library that assists a Python program to
2646turn itself into a well-behaved Unix daemon process, as specified in PEP 3143.
2647
2648This library provides a @code{DaemonContext} class that manages the following
2649important tasks for becoming a daemon process:
2650@enumerate
2651@item Detach the process into its own process group.
2652@item Set process environment appropriate for running inside a chroot.
2653@item Renounce suid and sgid privileges.
2654@item Close all open file descriptors.
2655@item Change the working directory, uid, gid, and umask.
2656@item Set appropriate signal handlers.
2657@item Open new file descriptors for stdin, stdout, and stderr.
2658@item Manage a specified PID lock file.
2659@item Register cleanup functions for at-exit processing.
2660@end enumerate")
2661 ;; Only setup.py is gpl3+, everything else is apache 2.0 licensed.
2662 (license (list license:asl2.0 license:gpl3+))))
2663
544ea9c2
MB
2664(define-public python-anytree
2665 (package
2666 (name "python-anytree")
2667 (version "2.8.0")
2668 (source (origin
2669 (method url-fetch)
2670 (uri (pypi-uri "anytree" version))
2671 (sha256
2672 (base32
2673 "1aycpc387wqz7h9w2p53qxn43qsh3m6by6ak4kkc66x9aprr63rz"))))
2674 (build-system python-build-system)
2675 (propagated-inputs
2676 `(("python-six" ,python-six)))
2677 (native-inputs
2678 `(;; For tests.
2679 ("graphviz" ,graphviz) ;for 'dot'
2680 ("python-nose" ,python-nose)))
2681 (home-page "https://github.com/c0fec0de/anytree")
2682 (synopsis "Lightweight tree data library")
2683 (description
2684 "@code{anytree} is a simple, lightweight, and extensible tree data
2685structure for Python.")
2686 (license license:asl2.0)))
2687
44d10b1f
RW
2688(define-public python-docutils
2689 (package
2690 (name "python-docutils")
2691 (version "0.14")
2692 (source
2693 (origin
2694 (method url-fetch)
2695 (uri (pypi-uri "docutils" version))
2696 (sha256
2697 (base32
2698 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))
2699 (build-system python-build-system)
2700 (arguments
2701 '(#:tests? #f)) ; no setup.py test command
2702 (home-page "http://docutils.sourceforge.net/")
2703 (synopsis "Python Documentation Utilities")
2704 (description
2705 "Docutils is a modular system for processing documentation into useful
2706formats, such as HTML, XML, and LaTeX. For input Docutils supports
2707reStructuredText.")
2708 ;; Most of the source code is public domain, but some source files are
2709 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
2710 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
2711
2712(define-public python2-docutils
2713 (package-with-python2 python-docutils))
2714
2715(define-public python-pygments
2716 (package
2717 (name "python-pygments")
69002b21 2718 (version "2.5.2")
44d10b1f
RW
2719 (source
2720 (origin
2721 (method url-fetch)
2722 (uri (pypi-uri "Pygments" version))
2723 (sha256
2724 (base32
69002b21 2725 "1zmhnswy0wxfn0xprs9aqsvx2c3kmzfn2wx14q8cv3vpkxdamj4q"))))
44d10b1f
RW
2726 (build-system python-build-system)
2727 (arguments
2728 ;; FIXME: Tests require sphinx, which depends on this.
2729 '(#:tests? #f))
69002b21 2730 (home-page "https://pygments.org/")
44d10b1f
RW
2731 (synopsis "Syntax highlighting")
2732 (description
2733 "Pygments is a syntax highlighting package written in Python.")
2734 (license license:bsd-2)))
2735
2736(define-public python2-pygments
2737 (package-with-python2 python-pygments))
2738
0f0a5ef9
MC
2739(define-public python-bumpversion
2740 (package
2741 (name "python-bumpversion")
2742 (version "0.5.3")
2743 (source
2744 (origin
2745 (method url-fetch)
2746 (uri (pypi-uri "bumpversion" version))
2747 (sha256
2748 (base32
2749 "0zn7694yfipxg35ikkfh7kvgl2fissha3dnqad2c5bvsvmrwhi37"))))
2750 (build-system python-build-system)
2751 (home-page "https://github.com/peritus/bumpversion")
2752 (synopsis "Tool to bump software version")
2753 (description "This tool provides a command-line interface (CLI) to bump a
2754software version simply.")
2755 (license license:expat)))
2756
b24fd2c2
MC
2757(define-public python-deprecated
2758 (package
2759 (name "python-deprecated")
2760 (version "1.2.5")
2761 (source
2762 (origin
2763 (method git-fetch)
2764 (uri (git-reference
2765 (url "https://github.com/tantale/deprecated.git")
2766 (commit (string-append "v" version))))
2767 (file-name (git-file-name name version))
2768 (sha256
2769 (base32
2770 "14909glxxwwc4b9qpz2b9jdriwzi5n65ichw85xqppap5f79wcwz"))))
2771 (build-system python-build-system)
2772 (arguments
2773 `(#:phases (modify-phases %standard-phases
2774 (replace 'check
2775 (lambda _
2776 (invoke "pytest"))))))
2777 (propagated-inputs
2778 `(("python-wrapt" ,python-wrapt)))
2779 (native-inputs
2780 `(("python-bumpversion" ,python-bumpversion)
2781 ("python-pytest" ,python-pytest)
2782 ("python-pytest-cov" ,python-pytest-cov)
2783 ("python-sphinx" ,python-sphinx)
2784 ("python-tox" ,python-tox)))
2785 (home-page "https://github.com/tantale/deprecated")
2786 (synopsis "Python decorator to deprecate classes, functions or methods")
2787 (description "The @code{deprecated} decorator provides a convenient way to deprecate
2788to deprecate classes, functions or methods.")
2789 (license license:expat)))
2790
d5a998fa
MC
2791(define-public python-pygithub
2792 (package
2793 (name "python-pygithub")
749e38d7 2794 (version "1.43.8")
d5a998fa
MC
2795 (source
2796 ;; We fetch from the Git repo because there are no tests in the PyPI
2797 ;; archive.
2798 (origin
2799 (method git-fetch)
2800 (uri (git-reference
2801 (url "https://github.com/PyGithub/PyGithub.git")
2802 (commit (string-append "v" version))))
2803 (file-name (git-file-name name version))
2804 (sha256
749e38d7 2805 (base32 "1625v558xga5mwhl9jqmibywy5qafmg1vqrirqz6zfq1la1d22mw"))))
d5a998fa
MC
2806 (build-system python-build-system)
2807 (arguments
2808 `(#:phases (modify-phases %standard-phases
2809 ;; Some tests rely on the network.
2810 (add-after 'unpack 'disable-failing-tests
2811 (lambda _
2812 (substitute* "tests/Issue142.py"
2813 (("testDecodeJson") "disabled_testDecodeJson"))
2814 #t))
2815 (add-before 'check 'prepare-for-tests
2816 (lambda _
2817 (for-each (lambda (f)
2818 (chmod f #o666))
2819 (find-files "./tests"))
2820 (system* "python" "-m" "lib2to3" "-w" "-n" "tests")
2821 (setenv "PYTHONPATH"
2822 (string-append "./tests:" (getenv "PYTHONPATH")))
2823 #t)))))
2824 (propagated-inputs
2825 `(("python-deprecated" ,python-deprecated)
2826 ("python-pyjwt" ,python-pyjwt)
2827 ("python-requests" ,python-requests)))
2828 (native-inputs `(("python-httpretty" ,python-httpretty)))
2829 (home-page "https://pygithub.readthedocs.io/en/latest/")
2830 (synopsis "Python library for the GitHub API")
2831 (description "This library allows managing GitHub resources such as
2832repositories, user profiles, and organizations in your Python applications,
2833using version 3 of the GitHub application programming interface (API).")
2834 (license license:lgpl3+)))
2835
c0c0bb38
MC
2836(define-public python-rellu
2837 (package
2838 (name "python-rellu")
2839 (version "0.7")
2840 (source
2841 (origin
2842 (method url-fetch)
2843 (uri (pypi-uri "rellu" version))
2844 (sha256
2845 (base32
2846 "1w0arpj1sm7vh29nrbnca4pnp8sx42l07r17inwqcjjf9bhng66x"))))
2847 (build-system python-build-system)
2848 (propagated-inputs
2849 `(("python-invoke" ,python-invoke)
2850 ("python-pygithub" ,python-pygithub)))
2851 (home-page "https://github.com/robotframework/rellu")
2852 (synopsis "Utilities to create PyPI releases")
2853 (description "This collection of utilities contains tooling and templates
2854to assist in creating releases on GitHub and publishing them on PyPI. It is
2855designed to be used by Robot Framework and tools and libraries in its
2856ecosystem, but can naturally be used also by other projects.")
2857 (license license:asl2.0)))
2858
b9790285
MC
2859(define-public python-robotframework
2860 (package
2861 (name "python-robotframework")
1710b8f8 2862 (version "3.1.2")
b9790285
MC
2863 ;; There are no tests in the PyPI archive.
2864 (source
2865 (origin
2866 (method git-fetch)
2867 (uri (git-reference
2868 (url "https://github.com/robotframework/robotframework.git")
2869 (commit (string-append "v" version))))
2870 (file-name (git-file-name name version))
2871 (sha256
1710b8f8 2872 (base32 "16gnxy0qinh8fhs0qvhff5z2xh49c3cqgm0d7bfjw120df6x7fym"))
b9790285
MC
2873 (patches (search-patches
2874 "python-robotframework-honor-source-date-epoch.patch"))))
2875 (build-system python-build-system)
2876 (arguments
2877 `(#:phases (modify-phases %standard-phases
2878 (add-before 'build 'build-and-install-doc
2879 (lambda* (#:key outputs #:allow-other-keys)
2880 (let* ((doc-output (assoc-ref outputs "doc"))
2881 (doc (string-append doc-output "/share/"
2882 ,name "-" ,version "/")))
2883 (invoke "invoke" "library-docs" "all")
2884 (mkdir-p doc)
2885 (copy-recursively "doc/libraries"
2886 (string-append doc "/libraries"))
2887 #t)))
2888 (replace 'check
2889 (lambda _
2890 (invoke "python" "utest/run.py"))))))
2891 (native-inputs
2892 `(("python-invoke" ,python-invoke)
2893 ("python-rellu" ,python-rellu)
2894 ("python:tk" ,python "tk"))) ;used when building the HTML doc
2895 (outputs '("out" "doc"))
2896 (home-page "https://robotframework.org")
2897 (synopsis "Generic automation framework")
2898 (description "Robot Framework is a generic automation framework for
2899acceptance testing, acceptance test driven development (ATDD), and robotic
2900process automation (RPA).")
2901 (license license:asl2.0)))
2902
5b84c120
MC
2903(define-public python-robotframework-lint
2904 ;; There is no properly tagged release; the commit below seems to correspond
2905 ;; to the 0.9 stable release available from PyPI. The tests are not
2906 ;; included in the PyPI archive, so we fetch the sources from the upstream
2907 ;; Git repo.
2908 (let ((commit "e851879bab1f63e4e53b34a4dc8a67ed95102830")
2909 (revision "1"))
2910 (package
2911 (name "python-robotframework-lint")
2912 (version (git-version "0.9.0" revision commit))
2913 (source
2914 (origin
2915 (method git-fetch)
2916 (uri (git-reference
2917 (url "https://github.com/boakley/robotframework-lint.git")
2918 (commit commit)))
2919 (file-name (git-file-name name version))
2920 (sha256
2921 (base32
2922 "1p6fknqg5sb9qz5857ji4a877657vgfjm5v3zn45994parx6ml1m"))))
2923 (build-system python-build-system)
2924 (arguments
2925 `(#:phases
2926 (modify-phases %standard-phases
2927 (replace 'check
2928 (lambda _
2929 (invoke "python" "-m" "robot" "-A"
2930 "tests/conf/default.args" "tests"))))))
2931 (propagated-inputs
2932 `(("python-robotframework" ,python-robotframework)))
2933 (home-page "https://github.com/boakley/robotframework-lint/")
2934 (synopsis "Static analysis tool (linter) for Robot Framework")
2935 (description "This package provides the @code{rflint} command-line
2936utility, a static analysis tool (linter) for Robot Framework source files.")
2937 (license license:asl2.0))))
2938
c0c64f17
MC
2939(define-public python-robotframework-sshlibrary
2940 (package
2941 (name "python-robotframework-sshlibrary")
2942 (version "3.3.0")
2943 ;; There are no tests in the PyPI archive.
2944 (source
2945 (origin
2946 (method git-fetch)
2947 (uri (git-reference
2948 (url "https://github.com/robotframework/SSHLibrary.git")
2949 (commit (string-append "v" version))))
2950 (file-name (git-file-name name version))
2951 (sha256
2952 (base32
2953 "1mk6dz2jqqndbx4yji09012q6rmadnqdywi7czvj62b0s07dr3r2"))))
2954 (build-system python-build-system)
2955 (arguments
2956 `(#:phases
2957 (modify-phases %standard-phases
2958 (add-before 'build 'build-and-install-doc
2959 (lambda* (#:key outputs #:allow-other-keys)
2960 (let* ((doc-output (assoc-ref outputs "doc"))
2961 (doc (string-append doc-output "/share/"
2962 ,name "-" ,version "/")))
2963 (invoke "chmod" "-R" "+w" "docs")
2964 (invoke "invoke" "kw-docs" "project-docs")
2965 (mkdir-p doc)
2966 (for-each delete-file (find-files "docs" "\\.rst"))
2967 (copy-recursively "docs" doc)
2968 #t)))
2969 (replace 'check
2970 (lambda _
2971 ;; Some tests require an SSH server; we remove them.
2972 (delete-file "utest/test_client_api.py")
2973 (delete-file "utest/test_scp.py")
2974 (invoke "python" "utest/run.py"))))))
2975 (propagated-inputs
2976 `(("python-robotframework" ,python-robotframework)
2977 ("python-paramiko" ,python-paramiko)
2978 ("python-scp" ,python-scp)))
2979 (native-inputs
2980 `(("openssh" ,openssh)
2981 ("which" ,which)
2982 ;; To generate the documentation
2983 ("python-docutils" ,python-docutils)
2984 ("python-invoke" ,python-invoke)
2985 ("python-pygments" ,python-pygments)
2986 ("python-rellu" ,python-rellu)))
2987 (outputs '("out" "doc"))
2988 (home-page "https://github.com/robotframework/SSHLibrary")
2989 (synopsis "Robot Framework library for SSH and SFTP")
2990 (description "SSHLibrary is a Robot Framework library providing support
2991for SSH and SFTP. It has the following main usages:
2992@itemize @bullet
2993@item Executing commands on the remote machine, either blocking or non-blocking.
2994@item Writing and reading in an interactive shell.
2995@item Transferring files and directories over SFTP.
2996@item Ensuring that files and directories exist on the remote machine.
2997@end itemize")
2998 (license license:asl2.0)))
2999
b1daba94
VC
3000(define-public python-rstr
3001 (package
3002 (name "python-rstr")
3003 (version "2.2.6")
3004 (source
3005 (origin
3006 (method url-fetch)
3007 (uri (pypi-uri "rstr" version))
3008 (sha256
3009 (base32
3010 "197dw8mbq0pjjz1l6h1ksi62vgn7x55d373ch74y06744qiq5sjx"))))
3011 (build-system python-build-system)
3012 (home-page
3013 "http://bitbucket.org/leapfrogdevelopment/rstr/overview")
3014 (synopsis "Generate random strings in Python")
3015 (description "This package provides a python module for generating
3016random strings of various types. It could be useful for fuzz testing,
3017generating dummy data, or other applications. It has no dependencies
3018outside the standard library.")
3019 (license license:bsd-3)))
3020
13d825fc
MC
3021(define-public python-scp
3022 (package
3023 (name "python-scp")
3024 (version "0.13.2")
3025 (source
3026 (origin
3027 (method url-fetch)
3028 (uri (pypi-uri "scp" version))
3029 (sha256
3030 (base32
3031 "1crlpw9lnn58fs1c1rmh7s7s9y5gkgpgjsqlvg9qa51kq1knx7gg"))))
3032 (build-system python-build-system)
3033 (arguments
3034 '(#:tests? #f)) ;tests require an SSH server
3035 (propagated-inputs
3036 `(("python-paramiko" ,python-paramiko)))
3037 (home-page "https://github.com/jbardin/scp.py")
3038 (synopsis "SCP protocol module for Python and Paramiko")
3039 (description "The scp module extends the Paramiko library to send and
3040receive files via the SCP1 protocol, as implemented by the OpenSSH
3041@command{scp} program.")
3042 (license license:gpl2+)))
3043
44d10b1f
RW
3044(define-public python-rst.linker
3045 (package
3046 (name "python-rst.linker")
d37e8e53 3047 (version "1.11")
44d10b1f
RW
3048 (source
3049 (origin
3050 (method url-fetch)
3051 (uri (pypi-uri "rst.linker" version))
3052 (sha256
d37e8e53 3053 (base32 "0pqsfqqx8h0pq21k8l3k62kznrgaj2ala93c64s4d9rpbr4mgkd2"))))
44d10b1f
RW
3054 (build-system python-build-system)
3055 (propagated-inputs
3056 `(("python-dateutil" ,python-dateutil)
3057 ("python-six" ,python-six)))
3058 (native-inputs
3059 `(("python-setuptools-scm" ,python-setuptools-scm)))
3060 ;; Test would require path.py, which would introduce a cyclic dependence.
3061 (arguments `(#:tests? #f))
3062 ;; Note: As of version 1.7 the documentation is not worth building.
3063 (home-page "https://github.com/jaraco/rst.linker")
3064 (synopsis "Sphinx plugin to add links and timestamps")
3065 (description "rst.linker allows to automatically replace text by a
3066reStructuredText external reference or timestamps. It's primary purpose is to
3067augment the changelog, but it can be used for other documents, too.")
3068 (license license:expat)))
3069
3070(define-public python2-rst.linker
3071 (package-with-python2 python-rst.linker))
3072
3073(define-public python-feedgenerator
3074 (package
3075 (name "python-feedgenerator")
3076 (version "1.9")
3077 (source
3078 (origin
3079 (method url-fetch)
3080 (uri (pypi-uri "feedgenerator" version))
3081 (sha256
3082 (base32
3083 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
3084 (modules '((guix build utils)))
3085 (snippet
3086 '(begin
3087 ;; Remove pre-compiled .pyc files from source.
3088 (for-each delete-file-recursively
3089 (find-files "." "__pycache__" #:directories? #t))
3090 (for-each delete-file (find-files "." "\\.pyc$"))
3091 #t))))
3092 (build-system python-build-system)
3093 (propagated-inputs
3094 `(("python-pytz" ,python-pytz)
3095 ("python-six" ,python-six)))
3096 (home-page "https://github.com/getpelican/feedgenerator")
3097 (synopsis
3098 "Standalone version of Django's Atom/RSS feed generator")
3099 (description
3100 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
3101which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
3102 (license license:bsd-3)))
3103
3104(define-public python2-feedgenerator
3105 (package-with-python2 python-feedgenerator))
3106
3107(define-public python-toml
3108 (package
3109 (name "python-toml")
3110 (version "0.9.4")
3111 (source
3112 (origin
3113 (method url-fetch)
3114 (uri (pypi-uri "toml" version))
3115 (sha256
3116 (base32
3117 "0bdbpbip67wdm6c7xwc6mmbmskyradj4cdxn1iibj4fcx1nbv1lf"))))
3118 (build-system python-build-system)
3119 (arguments
3120 `(#:tests? #f)) ;no tests suite in release
3121 (home-page "https://github.com/uiri/toml")
3122 (synopsis "Library for TOML")
3123 (description
3124 "@code{toml} is a library for parsing and creating Tom's Obvious, Minimal
3125Language (TOML) configuration files.")
3126 (license license:expat)))
3127
346c8752
BG
3128(define-public python-jsonrpc-server
3129 (package
3130 (name "python-jsonrpc-server")
d6cf4c6e 3131 (version "0.3.2")
346c8752
BG
3132 (source
3133 (origin
3134 (method url-fetch)
3135 (uri (pypi-uri "python-jsonrpc-server" version))
3136 (sha256
3137 (base32
d6cf4c6e 3138 "0ddgdp26dfxaz6isjbb12974b3rxavgsqrn2zrmck62cmipg5g05"))))
346c8752
BG
3139 (build-system python-build-system)
3140 (propagated-inputs
3141 `(("python-future" ,python-future)
3142 ("python-mock" ,python-mock)
d6cf4c6e
BG
3143 ("python-pytest" ,python-pytest)
3144 ("python-ujson" ,python-ujson)))
346c8752
BG
3145 (home-page
3146 "https://github.com/palantir/python-jsonrpc-server")
3147 (synopsis "JSON RPC 2.0 server library")
3148 (description
1df5407c 3149 "This package provides a JSON RPC 2.0 server library for Python.")
346c8752
BG
3150 (license license:expat)))
3151
56f4ad47
BG
3152(define-public python-pydocstyle
3153 (package
3154 (name "python-pydocstyle")
3155 (version "3.0.0")
3156 (source
3157 (origin
3158 (method url-fetch)
3159 (uri (pypi-uri "pydocstyle" version))
3160 (sha256
3161 (base32
3162 "1m1xv9clkg9lgzyza6dnj359z04vh5g0h49nhzghv7lg81gchhap"))))
3163 (build-system python-build-system)
3164 (propagated-inputs
3165 `(("python-six" ,python-six)
3166 ("python-snowballstemmer" ,python-snowballstemmer)))
3167 (home-page
3168 "https://github.com/PyCQA/pydocstyle/")
3169 (synopsis "Python docstring style checker")
3170 (description
3171 "This package provides a style checker for the Python Language
3172Server (PLS).")
3173 (license license:expat)))
3174
be4d840c 3175(define-public python-language-server
808dd2d0
BL
3176 (package
3177 (name "python-language-server")
a42f1420 3178 (version "0.31.7")
808dd2d0
BL
3179 (source
3180 (origin
3181 (method url-fetch)
3182 (uri (pypi-uri "python-language-server" version))
3183 (sha256
3184 (base32
a42f1420 3185 "0f8rljff4h2ay9m2n9ang7axai37nzd39zd7m6c90rci5wh8cmxh"))))
808dd2d0
BL
3186 (build-system python-build-system)
3187 (propagated-inputs
3188 `(("python-pluggy" ,python-pluggy)
3189 ("python-jsonrpc-server" ,python-jsonrpc-server)
3190 ("python-jedi" ,python-jedi)
3191 ("python-yapf" ,python-yapf)
3192 ("python-pyflakes" ,python-pyflakes)
3193 ("python-pydocstyle" ,python-pydocstyle)
3194 ("python-pycodestyle" ,python-pycodestyle)
3195 ("python-mccabe" ,python-mccabe)
3196 ("python-rope" ,python-rope)
3197 ("python-autopep8" ,python-autopep8)
3198 ("python-flake8" ,python-flake8)
3199 ("python-pylint" ,python-pylint)))
3200 (home-page "https://github.com/palantir/python-language-server")
3201 (synopsis "Python implementation of the Language Server Protocol")
3202 (description
3203 "The Python Language Server (pyls) is an implementation of the Python 3
be4d840c
BG
3204language specification for the Language Server Protocol (LSP). This tool is
3205used in text editing environments to provide a complete and integrated
3206feature-set for programming Python effectively.")
808dd2d0 3207 (license license:expat)))
be4d840c 3208
c777ecb3
RW
3209(define-public python-pathspec
3210 (package
3211 (name "python-pathspec")
3212 (version "0.7.0")
3213 (source
3214 (origin
3215 (method url-fetch)
3216 (uri (pypi-uri "pathspec" version))
3217 (sha256
3218 (base32
3219 "15lvs4awlg8xzl0l4gk9y53xx4yqmqvsv44pglv39m70y85afajn"))))
3220 (build-system python-build-system)
3221 (home-page "https://github.com/cpburnz/python-path-specification")
3222 (synopsis "Utility library for gitignore style pattern matching of file paths")
3223 (description
3224 "This package provides a utility library for gitignore style pattern
3225matching of file paths.")
3226 (license license:mpl2.0)))
3227
44d10b1f
RW
3228(define-public python-black
3229 (package
3230 (name "python-black")
5f603fab 3231 (version "19.10b0")
44d10b1f
RW
3232 (source
3233 (origin
3234 (method url-fetch)
3235 (uri (pypi-uri "black" version))
3236 (sha256
3237 (base32
5f603fab 3238 "0f8mr0yzj78q1dx7v6ggbgfir2wv0n5z2shfbbvfdq7910xbgvf2"))))
44d10b1f
RW
3239 (build-system python-build-system)
3240 (arguments
3241 `(#:phases
3242 (modify-phases %standard-phases
3243 (add-after 'patch-source-shebangs 'patch-extra-shebangs
3244 (lambda _
3245 (let ((python3 (which "python3")))
3246 (substitute* '("tests/data/fmtonoff.py"
3247 "tests/data/string_prefixes.py"
5f603fab
RW
3248 "tests/data/function.py"
3249 "tests/data/python37.py")
44d10b1f
RW
3250 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
3251 (string-append "#!" python3 (if (string? minor-version)
3252 minor-version
5f603fab
RW
3253 "")))))
3254 #t))
3255 (add-after 'unpack 'disable-broken-tests
3256 (lambda _
3257 ;; These tests are supposed to be skipped when the blackd
3258 ;; dependencies are missing, but this doesn't quite work.
3259 (substitute* "tests/test_black.py"
3260 (("( *)class BlackDTestCase.*" match indent)
3261 (string-append indent "@unittest.skip(\"no blackd deps\")\n"
3262 indent "class BlackDTestCase(unittest.TestCase):\n"))
3263 (("web.Application") "False")
3264 (("@unittest_run_loop") ""))
3265
3266 ;; Patching the above file breaks the self test
3267 (substitute* "tests/test_black.py"
3268 (("( *)def test_self" match indent)
3269 (string-append indent "@unittest.skip(\"guix\")\n" match)))
3270 #t)))))
44d10b1f
RW
3271 (propagated-inputs
3272 `(("python-click" ,python-click)
3273 ("python-attrs" ,python-attrs)
3274 ("python-appdirs" ,python-appdirs)
5f603fab
RW
3275 ("python-pathspec" ,python-pathspec)
3276 ("python-regex" ,python-regex)
3277 ("python-toml" ,python-toml)
3278 ("python-typed-ast" ,python-typed-ast)))
3279 (native-inputs
3280 `(("python-setuptools-scm" ,python-setuptools-scm)))
44d10b1f
RW
3281 (home-page "https://github.com/ambv/black")
3282 (synopsis "The uncompromising code formatter")
3283 (description "Black is the uncompromising Python code formatter.")
3284 (license license:expat)))
3285
3286(define-public python-blinker
3287 (package
3288 (name "python-blinker")
3289 (version "1.4")
3290 (source
3291 (origin
3292 (method url-fetch)
3293 (uri (pypi-uri "blinker" version))
3294 (sha256
3295 (base32
3296 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
3297 (build-system python-build-system)
d46646d9 3298 (home-page "https://pythonhosted.org/blinker/")
44d10b1f
RW
3299 (synopsis "Fast, simple object-to-object and broadcast signaling")
3300 (description
3301 "Blinker provides a fast dispatching system that allows any number of
3302interested parties to subscribe to events, or \"signals\".")
3303 (license license:expat)))
3304
3305(define-public python2-blinker
3306 (package-with-python2 python-blinker))
3307
3308(define-public pelican
3309 (package
3310 (name "pelican")
fa9e3b5e 3311 (version "4.2.0")
44d10b1f
RW
3312 (source
3313 (origin
3314 (method url-fetch)
3315 (uri (pypi-uri "pelican" version))
3316 (sha256
3317 (base32
fa9e3b5e 3318 "0mp7hjyhs38ag1hyfcy882g400z0babqi72pnli46dqijfhajzmy"))))
44d10b1f
RW
3319 (build-system python-build-system)
3320 (propagated-inputs
fa9e3b5e
VC
3321 `(("python-blinker" ,python-blinker)
3322 ("python-dateutil" ,python-dateutil)
3323 ("python-docutils" ,python-docutils)
3324 ("python-feedgenerator" ,python-feedgenerator)
44d10b1f 3325 ("python-jinja2" ,python-jinja2)
fa9e3b5e 3326 ("python-markdown" ,python-markdown)
44d10b1f 3327 ("python-pygments" ,python-pygments)
44d10b1f 3328 ("python-pytz" ,python-pytz)
44d10b1f 3329 ("python-six" ,python-six)
fa9e3b5e 3330 ("python-unidecode" ,python-unidecode)))
44d10b1f
RW
3331 (home-page "https://getpelican.com/")
3332 (arguments
3333 `(;; XXX Requires a lot more packages to do unit tests :P
fa9e3b5e 3334 #:tests? #f))
44d10b1f
RW
3335 (synopsis "Python-based static site publishing system")
3336 (description
3337 "Pelican is a tool to generate a static blog from reStructuredText,
3338Markdown input files, and more. Pelican uses Jinja2 for templating
3339and is very extensible.")
3340 (license license:agpl3+)))
3341
8c141421
JH
3342(define-public mallard-ducktype
3343 (package
3344 (name "mallard-ducktype")
12cc3da5 3345 (version "1.0.2")
8c141421
JH
3346 (source
3347 (origin
3348 (method git-fetch)
12cc3da5
JH
3349 ;; git-reference because tests are not included in pypi source tarball
3350 ;; https://issues.guix.gnu.org/issue/36755#2
8c141421
JH
3351 (uri (git-reference
3352 (url "https://github.com/projectmallard/mallard-ducktype.git")
3353 (commit version)))
3354 (file-name (git-file-name name version))
3355 (sha256
3356 (base32
12cc3da5 3357 "1jk9bfz7g04ip78s03b0xak6d54rj4h9zpgadkziy1ji216g6y4c"))))
8c141421 3358 (build-system python-build-system)
5246655f
EF
3359 (arguments
3360 '(#:phases
3361 (modify-phases %standard-phases
3362 (replace 'check
3363 (lambda _
3364 (with-directory-excursion "tests"
3365 (invoke "sh" "runtests")))))))
8c141421
JH
3366 (home-page "http://projectmallard.org")
3367 (synopsis "Convert Ducktype to Mallard documentation markup")
3368 (description
3369 "Ducktype is a lightweight syntax that can represent all the semantics
3370of the Mallard XML documentation system. Ducktype files can be converted to
3371Mallard using the @command{ducktype} tool. The yelp-tools package
3372provides additional functionality on the produced Mallard documents.")
3373 (license license:expat)))
3374
44d10b1f
RW
3375(define-public python-cython
3376 (package
3377 (name "python-cython")
6fd27a71 3378 (version "0.29.13")
44d10b1f
RW
3379 (source
3380 (origin
3381 (method url-fetch)
3382 (uri (pypi-uri "Cython" version))
3383 (sha256
6fd27a71
TGR
3384 (base32
3385 "13k37lrcgagwwnzr5bzririsscb793vndj234d475x1h9ad0d7f2"))))
44d10b1f
RW
3386 (build-system python-build-system)
3387 ;; we need the full python package and not just the python-wrapper
3388 ;; because we need libpython3.3m.so
3389 (inputs
3390 `(("python" ,python)))
3391 (arguments
3392 `(#:phases
3393 (modify-phases %standard-phases
3394 (add-before 'check 'set-HOME
3395 ;; some tests require access to "$HOME/.cython"
3396 (lambda _ (setenv "HOME" "/tmp") #t))
3397
3398 ;; FIXME: These tests started failing on armhf after the 0.28 update
3399 ;; (commit c69d11c5930), both with an error such as this:
3400 ;; compiling (cpp) and running dictcomp ...
3401 ;; === C/C++ compiler error output: ===
3402 ;; ‘
3403 ;; dictcomp.cpp:5221: confused by earlier errors, bailing out
3404 ;; See <https://hydra.gnu.org/build/2948724> for logs.
3405 ,@(if (target-arm32?)
3406 `((add-before 'check 'disable-failing-tests
3407 (lambda _
3408 (let ((disabled-tests (open-file "tests/bugs.txt" "a")))
3409 (for-each (lambda (test)
3410 (format disabled-tests "~a\n" test))
3411 '("memslice" "dictcomp"))
3412 (close-port disabled-tests)))))
3413 '())
3414
3415 (replace 'check
3416 (lambda _
e9194eb0
MB
3417 ;; Disable compiler optimizations to greatly reduce the running
3418 ;; time of the test suite.
3419 (setenv "CFLAGS" "-O0")
3420
3421 (invoke "python" "runtests.py" "-vv"
3422 "-j" (number->string (parallel-job-count))))))))
f319409b 3423 (home-page "https://cython.org/")
44d10b1f
RW
3424 (synopsis "C extensions for Python")
3425 (description "Cython is an optimising static compiler for both the Python
3426programming language and the extended Cython programming language. It makes
3427writing C extensions for Python as easy as Python itself.")
3428 (license license:asl2.0)
3429 (properties `((python2-variant . ,(delay python2-cython))))))
3430
3431(define-public python2-cython
da460865
MB
3432 (let ((base (package-with-python2 (strip-python2-variant python-cython))))
3433 (package
3434 (inherit base)
3435 (name "python2-cython")
3436 (inputs
3437 `(("python-2" ,python-2))) ;this is not automatically changed
3438 (arguments
3439 (substitute-keyword-arguments (package-arguments base)
3440 ((#:phases phases)
3441 `(modify-phases ,phases
3442 (add-before 'check 'adjust-test_embed
3443 (lambda _
3444 (substitute* "runtests.py"
3445 ;; test_embed goes great lengths to find the static libpythonX.Y.a
3446 ;; so it can give the right -L flag to GCC when embedding static
3447 ;; builds of Python. It is unaware that the Python "config"
3448 ;; directory (where the static library lives) was renamed in
3449 ;; Python 3, and falls back to sysconfig.get_config_var('LIBDIR'),
3450 ;; which works fine, because that is where the shared library is.
3451 ;;
3452 ;; It also appears to be unaware that the Makefile in Demos/embed
3453 ;; already unconditionally pass the static library location to GCC,
3454 ;; after checking sysconfig.get_config_var('LIBPL).
3455 ;;
3456 ;; The effect is that the linker is unable to resolve libexpat
3457 ;; symbols when building for Python 2, because neither the Python 2
3458 ;; shared library nor Expat is available. To fix it, we can either
3459 ;; add Expat as an input and make it visible to the linker, or just
3460 ;; prevent it from overriding the Python shared library location.
3461 ;; The end result is identical, so we take the easy route.
3462 ((" or libname not in os\\.listdir\\(libdir\\)")
3463 ""))
3464 #t)))))))))
44d10b1f
RW
3465
3466;; The RPython toolchain currently does not support Python 3.
3467(define-public python2-rpython
3468 (package
3469 (name "python2-rpython")
3470 (version "0.2.1")
3471 (source
3472 (origin
3473 (method url-fetch)
3474 (uri (pypi-uri "rpython" version))
3475 (sha256
3476 (base32
3477 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
3478 (build-system python-build-system)
3479 (arguments `(#:python ,python-2))
3480 (native-inputs
3481 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
3482 (home-page "https://rpython.readthedocs.org")
3483 (synopsis "Framework for implementing interpreters and virtual machines")
3484 (description "RPython is a translation and support framework for
3485producing implementations of dynamic languages, emphasizing a clean separation
3486between language specification and implementation aspects.")
3487 (license license:expat)))
3488
3489;; NOTE: when upgrading numpy please make sure that python-pandas and
3490;; python-scipy still build, as these three packages are often used together.
3491(define-public python-numpy
3492 (package
3493 (name "python-numpy")
8e5fbd5d 3494 (version "1.17.3")
44d10b1f
RW
3495 (source
3496 (origin
3497 (method url-fetch)
3498 (uri (string-append
3499 "https://github.com/numpy/numpy/releases/download/v"
3500 version "/numpy-" version ".tar.gz"))
3501 (sha256
3502 (base32
8e5fbd5d 3503 "1ak9dmjja0q90a7fsxli51ypcwssh8c4pb6f8wkrsnf2xgdk6dy9"))))
44d10b1f
RW
3504 (build-system python-build-system)
3505 (inputs
3506 `(("openblas" ,openblas)
3507 ("lapack" ,lapack)))
3508 (native-inputs
3509 `(("python-cython" ,python-cython)
3510 ("python-pytest" ,python-pytest)
3511 ("gfortran" ,gfortran)))
3512 (arguments
3513 `(#:phases
3514 (modify-phases %standard-phases
3515 (add-before 'build 'configure-blas-lapack
3516 (lambda* (#:key inputs #:allow-other-keys)
3517 (call-with-output-file "site.cfg"
3518 (lambda (port)
3519 (format port
3520 "[openblas]
3521libraries = openblas
3522library_dirs = ~a/lib
3523include_dirs = ~a/include
3524
3525# backslash-n to make emacs happy
3526\n[lapack]
3527lapack_libs = lapack
3528library_dirs = ~a/lib
3529include_dirs = ~a/include
3530"
3531 (assoc-ref inputs "openblas")
3532 (assoc-ref inputs "openblas")
3533 (assoc-ref inputs "lapack")
3534 (assoc-ref inputs "lapack"))))
3535 #t))
3536 (add-before 'build 'fix-executable-paths
3537 (lambda* (#:key inputs #:allow-other-keys)
3538 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
3539 ;; instead of /bin/sh.
3540 (substitute* "numpy/distutils/exec_command.py"
3541 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
3542 (string-append match-start (assoc-ref inputs "bash") match-end)))
3543 ;; Use "gcc" executable, not "cc".
3544 (substitute* "numpy/distutils/system_info.py"
3545 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3546 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
3547 #t))
3548 ;; Tests can only be run after the library has been installed and not
3549 ;; within the source directory.
3550 (delete 'check)
3551 (add-after 'install 'check
3552 (lambda* (#:key outputs inputs #:allow-other-keys)
3553 ;; Make installed package available for running the tests
3554 (add-installed-pythonpath inputs outputs)
3555 ;; Make sure "f2py" etc is found.
3556 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
3557 ":" (getenv "PATH")))
3558 (with-directory-excursion "/tmp"
3559 (invoke "python" "-c"
3560 "import numpy; numpy.test(verbose=2)")))))))
28191bdc 3561 (home-page "https://numpy.org")
44d10b1f
RW
3562 (synopsis "Fundamental package for scientific computing with Python")
3563 (description "NumPy is the fundamental package for scientific computing
3564with Python. It contains among other things: a powerful N-dimensional array
3565object, sophisticated (broadcasting) functions, tools for integrating C/C++
3566and Fortran code, useful linear algebra, Fourier transform, and random number
3567capabilities.")
adb396ea 3568 (properties `((python2-variant . ,(delay python2-numpy))))
44d10b1f
RW
3569 (license license:bsd-3)))
3570
adb396ea 3571;; Numpy 1.16.x are the last versions that support Python 2.
44d10b1f 3572(define-public python2-numpy
adb396ea
MB
3573 (let ((numpy (package-with-python2
3574 (strip-python2-variant python-numpy))))
3575 (package/inherit
3576 numpy
3577 (version "1.16.5")
3578 (source (origin
3579 (method url-fetch)
3580 (uri (string-append
3581 "https://github.com/numpy/numpy/releases/download/v"
3582 version "/numpy-" version ".tar.gz"))
3583 (sha256
3584 (base32
3585 "0lg1cycxzi4rvvrd5zxinpdz0ni792fpx6xjd75z1923zcac8qrb")))))))
44d10b1f
RW
3586
3587;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
3588;; interest only for legacy code going back to NumPy's predecessor
3589;; Numeric.
3590(define-public python2-numpy-1.8
3591 (package (inherit python2-numpy)
3592 (version "1.8.2")
3593 (source
3594 (origin
6b61fc47
EF
3595 (method git-fetch)
3596 (uri (git-reference
3597 (url "https://github.com/numpy/numpy")
3598 (commit (string-append "v" version))))
3599 (file-name (git-file-name "numpy" version))
44d10b1f
RW
3600 (sha256
3601 (base32
6b61fc47 3602 "0ikgi15rsqwbkfsjjxrwh40lqyal2wvyp3923y6w6ch3dcr82sfk"))))
44d10b1f
RW
3603 (arguments
3604 (substitute-keyword-arguments (package-arguments python2-numpy)
3605 ((#:phases phases)
3606 `(modify-phases ,phases
3607 (replace 'configure-blas-lapack
3608 (lambda* (#:key inputs #:allow-other-keys)
3609 (call-with-output-file "site.cfg"
3610 (lambda (port)
3611 (format port
3612 "[openblas]
3613libraries = openblas,lapack
3614library_dirs = ~a/lib:~a/lib
3615include_dirs = ~a/include:~a/include
3616"
3617 (assoc-ref inputs "openblas")
3618 (assoc-ref inputs "lapack")
3619 (assoc-ref inputs "openblas")
3620 (assoc-ref inputs "lapack"))))
3621 #t))))))
3622 (native-inputs
3623 `(("python2-nose" ,python2-nose)))
3624 (description "NumPy is the fundamental package for scientific computing
3625with Python. It contains among other things: a powerful N-dimensional array
3626object, sophisticated (broadcasting) functions, tools for integrating C/C++
3627and Fortran code, useful linear algebra, Fourier transform, and random number
3628capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
3629that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
3630Numeric.")
3631 (license license:bsd-3)))
3632
3633(define-public python-munch
3634 (package
3635 (name "python-munch")
3636 (version "2.0.4")
3637 (source
3638 (origin
3639 (method url-fetch)
3640 (uri (pypi-uri "munch" version))
3641 (sha256
3642 (base32
3643 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3644 (build-system python-build-system)
3645 (home-page "https://github.com/Infinidat/munch")
3646 (synopsis "Dot-accessible dictionary")
3647 (description "Munch is a dot-accessible dictionary similar to JavaScript
3648objects.")
3649 (license license:expat)))
3650
3651(define-public python2-munch
3652 (package-with-python2 python-munch))
3653
3654(define-public python-colormath
3655 (package
3656 (name "python-colormath")
3657 (version "3.0.0")
3658 (source
3659 (origin
3660 (method url-fetch)
3661 (uri (pypi-uri "colormath" version))
3662 (sha256
3663 (base32
3664 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
3665 (build-system python-build-system)
3666 (propagated-inputs
3667 `(("python-networkx" ,python-networkx)
3668 ("python-numpy" ,python-numpy)))
3669 (home-page "https://github.com/gtaylor/python-colormath")
3670 (synopsis "Color math and conversion library")
3671 (description
3672 "This is a Python library for color math and conversions.")
3673 (license license:bsd-3)))
3674
3675(define-public python2-colormath
3676 (package-with-python2 python-colormath))
3677
3678(define-public python-spectra
3679 (package
3680 (name "python-spectra")
3681 (version "0.0.11")
3682 (source
3683 (origin
3684 (method url-fetch)
3685 (uri (pypi-uri "spectra" version))
3686 (sha256
3687 (base32
3688 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
3689 (build-system python-build-system)
3690 (arguments
3691 `(#:phases
3692 (modify-phases %standard-phases
3693 (replace 'check
38ec0f6a 3694 (lambda _ (invoke "nosetests" "-v"))))))
44d10b1f
RW
3695 (propagated-inputs
3696 `(("python-colormath" ,python-colormath)))
3697 (native-inputs
3698 `(("python-nose" ,python-nose)))
3699 (home-page "https://github.com/jsvine/spectra")
3700 (synopsis "Color scales and color conversion")
3701 (description
3702 "This package provides a Python library intended to make color math,
3703color scales, and color space conversion easy. It has support for:
3704
3705@enumerate
3706@item Color scales
3707@item Color ranges
3708@item Color blending
3709@item Brightening/darkening colors
3710@item Saturating/desaturating colors
3711@item Conversion to/from multiple color spaces.
3712@end enumerate\n")
3713 (license license:expat)))
3714
3715(define-public python2-spectra
3716 (package-with-python2 python-spectra))
3717
3718(define-public python-numpy-documentation
3719 (package
3720 (name "python-numpy-documentation")
3721 (version (package-version python-numpy))
3722 (source (package-source python-numpy))
3723 (build-system python-build-system)
3724 (native-inputs
3725 `(("python-matplotlib" ,python-matplotlib)
3726 ("python-numpy" ,python-numpy)
3727 ("pkg-config" ,pkg-config)
3728 ("python-sphinx" ,python-sphinx)
3729 ("python-numpydoc" ,python-numpydoc)
f75aa97f 3730 ("texlive" ,(texlive-union (list texlive-fonts-cm-super
44d10b1f
RW
3731 texlive-fonts-ec
3732 texlive-generic-ifxetex
3733 texlive-generic-pdftex
f75aa97f 3734 texlive-amsfonts
44d10b1f
RW
3735 texlive-latex-capt-of
3736 texlive-latex-cmap
3737 texlive-latex-environ
3738 texlive-latex-eqparbox
3739 texlive-latex-etoolbox
3740 texlive-latex-expdlist
3741 texlive-latex-fancyhdr
3742 texlive-latex-fancyvrb
3743 texlive-latex-fncychap
3744 texlive-latex-float
3745 texlive-latex-framed
3746 texlive-latex-geometry
3747 texlive-latex-graphics
3748 texlive-latex-hyperref
3749 texlive-latex-mdwtools
3750 texlive-latex-multirow
3751 texlive-latex-needspace
3752 texlive-latex-oberdiek
3753 texlive-latex-parskip
3754 texlive-latex-preview
3755 texlive-latex-tabulary
3756 texlive-latex-threeparttable
3757 texlive-latex-titlesec
3758 texlive-latex-trimspaces
3759 texlive-latex-ucs
3760 texlive-latex-upquote
3761 texlive-latex-url
3762 texlive-latex-varwidth
3763 texlive-latex-wrapfig)))
3764 ("texinfo" ,texinfo)
3765 ("perl" ,perl)
3766 ("scipy-sphinx-theme"
3767 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
3768 (method git-fetch)
3769 (uri (git-reference
3770 (url "https://github.com/scipy/scipy-sphinx-theme.git")
3771 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
3772 (sha256
3773 (base32
3774 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
3775 ,@(package-native-inputs python-numpy)))
3776 (arguments
3777 `(#:tests? #f ; we're only generating the documentation
3778 #:phases
3779 (modify-phases %standard-phases
3780 (delete 'build)
3781 (replace 'install
3782 (lambda* (#:key inputs outputs #:allow-other-keys)
3783 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3784 (doc (string-append
3785 data "/doc/" ,name "-"
3786 ,(package-version python-numpy)))
3787 (info-reader (string-append data "/info"))
3788 (html (string-append doc "/html"))
3789 (scipy-sphinx-theme "scipy-sphinx-theme")
3790 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
3791 (pyver ,(string-append "PYVER=")))
3792
3793 ;; FIXME: this is needed to for texlive-union to generate
3794 ;; fonts, which are not found.
3795 (setenv "HOME" "/tmp")
3796
3797 (with-directory-excursion "doc"
3798 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
3799 (mkdir-p html)
4fc898da
RW
3800 (invoke "make" "html" pyver)
3801 (invoke "make" "latex" "PAPER=a4" pyver)
3802 (invoke "make" "-C" "build/latex"
44d10b1f
RW
3803 "all-pdf" "PAPER=a4" pyver)
3804 ;; FIXME: Generation of the info file fails.
4fc898da 3805 ;; (invoke "make" "info" pyver)
44d10b1f
RW
3806 ;; (mkdir-p info)
3807 ;; (copy-file "build/texinfo/numpy.info"
3808 ;; (string-append info "/numpy.info"))
3809 (for-each (lambda (file)
3810 (copy-file (string-append "build/latex" file)
3811 (string-append doc file)))
3812 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3813 (with-directory-excursion "build/html"
3814 (for-each (lambda (file)
3815 (let* ((dir (dirname file))
3816 (tgt-dir (string-append html "/" dir)))
3817 (unless (equal? "." dir)
3818 (mkdir-p tgt-dir))
3819 (install-file file html)))
3820 (find-files "." ".*")))))
3821 #t)))))
3822 (home-page (package-home-page python-numpy))
3823 (synopsis "Documentation for the python-numpy package")
3824 (description (package-description python-numpy))
3825 (license (package-license python-numpy))))
3826
3827(define-public python2-numpy-documentation
3828 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
3829 (package
3830 (inherit numpy-documentation)
3831 (native-inputs `(("python2-functools32" ,python2-functools32)
3832 ,@(package-native-inputs numpy-documentation))))))
3833
3834(define-public python-pygit2
3835 (package
3836 (name "python-pygit2")
7154f5ef 3837 (version "1.1.0")
44d10b1f
RW
3838 (source
3839 (origin
3840 (method url-fetch)
3841 (uri (pypi-uri "pygit2" version))
3842 (sha256
7154f5ef 3843 (base32 "1hs0pqqzn1yjxqk86nq7p0lvsklwnlyi5xwyzr7d5nrs19dmsjbg"))))
44d10b1f
RW
3844 (build-system python-build-system)
3845 (arguments
c3ecab0d 3846 '(#:tests? #f)) ; tests don't run correctly in our environment
44d10b1f 3847 (propagated-inputs
7154f5ef 3848 `(("python-cached-property" ,python-cached-property)
44d10b1f 3849 ("python-cffi" ,python-cffi)
7154f5ef 3850 ("libgit2" ,libgit2)))
44d10b1f
RW
3851 (native-inputs
3852 `(("python-pytest" ,python-pytest)))
3853 (home-page "https://github.com/libgit2/pygit2")
3854 (synopsis "Python bindings for libgit2")
3855 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3856library, libgit2 implements Git plumbing.")
3857 ;; GPL2.0 only, with linking exception.
3858 (license license:gpl2)))
3859
44d10b1f
RW
3860(define-public python-pyparsing
3861 (package
3862 (name "python-pyparsing")
6d3cff5a 3863 (version "2.3.1")
44d10b1f
RW
3864 (source
3865 (origin
3866 (method url-fetch)
3867 (uri (pypi-uri "pyparsing" version))
3868 (sha256
6d3cff5a 3869 (base32 "0yk6xl885b91dmlhlsap7x78hk2rdr879fln9anbq6k4ca42djb6"))))
44d10b1f
RW
3870 (build-system python-build-system)
3871 (outputs '("out" "doc"))
3872 (arguments
3873 `(#:tests? #f ; no test target
3874 #:phases
3875 (modify-phases %standard-phases
3876 (add-after 'install 'install-doc
3877 (lambda* (#:key outputs #:allow-other-keys)
3878 (let* ((doc (string-append (assoc-ref outputs "doc")
3879 "/share/doc/" ,name "-" ,version))
3880 (html-doc (string-append doc "/html"))
3881 (examples (string-append doc "/examples")))
3882 (mkdir-p html-doc)
3883 (mkdir-p examples)
3884 (for-each
3885 (lambda (dir tgt)
3886 (map (lambda (file)
3887 (install-file file tgt))
3888 (find-files dir ".*")))
3889 (list "docs" "htmldoc" "examples")
3890 (list doc html-doc examples))
3891 #t))))))
3892 (home-page "https://github.com/pyparsing/pyparsing")
3893 (synopsis "Python parsing class library")
3894 (description
3895 "The pyparsing module is an alternative approach to creating and
3896executing simple grammars, vs. the traditional lex/yacc approach, or the use
3897of regular expressions. The pyparsing module provides a library of classes
3898that client code uses to construct the grammar directly in Python code.")
3899 (license license:expat)))
3900
3901(define-public python2-pyparsing
3902 (package-with-python2 python-pyparsing))
3903
3904(define-public python-numpydoc
3905 (package
3906 (name "python-numpydoc")
3907 (version "0.8.0")
3908 (source
3909 (origin
3910 (method url-fetch)
3911 (uri (pypi-uri "numpydoc" version))
3912 (sha256
3913 (base32
3914 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
3915 (build-system python-build-system)
3916 (propagated-inputs
3917 `(("python-sphinx" ,python-sphinx)))
3918 (native-inputs
3919 `(("python-nose" ,python-nose)))
e85af137 3920 (home-page "https://pypi.org/project/numpydoc/")
44d10b1f
RW
3921 (synopsis
3922 "Numpy's Sphinx extensions")
3923 (description
3924 "Sphinx extension to support docstrings in Numpy format.")
3925 (license license:bsd-2)))
3926
3927(define-public python2-numpydoc
3928 (package-with-python2 python-numpydoc))
3929
3930(define-public python-numexpr
3931 (package
3932 (name "python-numexpr")
3933 (version "2.6.5")
3934 (source
3935 (origin
3936 (method url-fetch)
3937 (uri (pypi-uri "numexpr" version))
3938 (sha256
3939 (base32
3940 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
3941 (build-system python-build-system)
3942 (arguments `(#:tests? #f)) ; no tests included
3943 (propagated-inputs
3944 `(("python-numpy" ,python-numpy)))
3945 (home-page "https://github.com/pydata/numexpr")
3946 (synopsis "Fast numerical expression evaluator for NumPy")
3947 (description
3948 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3949expressions that operate on arrays are accelerated and use less memory than
3950doing the same calculation in Python. In addition, its multi-threaded
3951capabilities can make use of all your cores, which may accelerate
3952computations, most specially if they are not memory-bounded (e.g. those using
3953transcendental functions).")
3954 (license license:expat)))
3955
3956(define-public python2-numexpr
3957 (package-with-python2 python-numexpr))
3958
3959(define-public python-cycler
3960 (package
3961 (name "python-cycler")
3962 (version "0.10.0")
3963 (source (origin
3964 (method url-fetch)
3965 (uri (pypi-uri "cycler" version))
3966 (sha256
3967 (base32
3968 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
3969 (build-system python-build-system)
3970 (arguments
3971 ;; XXX: The current version requires 'coveralls' which we don't have.
3972 ;; Enable this for the next release which uses 'python-pytest'.
3973 '(#:tests? #f))
3974 (propagated-inputs
3975 `(("python-six" ,python-six)))
3976 (home-page "http://matplotlib.org/cycler/")
3977 (synopsis "Composable keyword argument iterator")
3978 (description
3979 "When using @code{matplotlib} and plotting more than one line, it is
3980common to want to be able to want to be able to cycle over one or more artist
3981styles; but the plotting logic can quickly become involved.
3982To address this and enable easy cycling over arbitrary @code{kwargs}, the
3983@code{Cycler} class was developed.")
3984 (license license:bsd-3)))
3985
3986(define-public python2-cycler
3987 (package-with-python2 python-cycler))
3988
3989(define-public python-colorspacious
3990 (package
3991 (name "python-colorspacious")
53a3ebed 3992 (version "1.1.2")
44d10b1f 3993 (source
dee92e65
TGR
3994 (origin
3995 (method git-fetch)
3996 (uri (git-reference
3997 (url "https://github.com/njsmith/colorspacious.git")
3998 (commit (string-append "v" version))))
3999 (file-name (git-file-name name version))
4000 (sha256
53a3ebed 4001 (base32 "0x7nkphr6g5ql5fvgss8l56rgiyjgh6fm8zzs73i94ci9wzlm63w"))))
44d10b1f
RW
4002 (build-system python-build-system)
4003 (propagated-inputs
4004 `(("python-numpy" ,python-numpy)))
4005 (native-inputs
4006 `(("python-nose" ,python-nose)))
4007 (arguments
4008 `(#:phases
4009 (modify-phases %standard-phases
4010 (replace 'check
4011 (lambda _
c988afda 4012 (invoke "nosetests" "--all-modules" "-v" "colorspacious"))))))
44d10b1f
RW
4013 (home-page "https://github.com/njsmith/colorspacious")
4014 (synopsis "Python library for colorspace conversions")
4015 (description "@code{colorspacious} is a Python library that lets you
4016convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
4017 (license license:expat)))
4018
4019(define-public python2-colorspacious
4020 (package-with-python2 python-colorspacious))
4021
4022(define-public python-matplotlib
4023 (package
4024 (name "python-matplotlib")
9e7cb2f1 4025 (version "3.1.2")
44d10b1f
RW
4026 (source
4027 (origin
4028 (method url-fetch)
4029 (uri (pypi-uri "matplotlib" version))
4030 (sha256
4031 (base32
9e7cb2f1 4032 "1nmshfqh7wyg15i16hx1yiylcvzkws29ivn66n3i0wyqwcpjr3lf"))))
44d10b1f
RW
4033 (build-system python-build-system)
4034 (propagated-inputs ; the following packages are all needed at run time
4035 `(("python-cycler" ,python-cycler)
4036 ("python-kiwisolver" ,python-kiwisolver)
4037 ("python-pyparsing" ,python-pyparsing)
4038 ("python-pygobject" ,python-pygobject)
4039 ("gobject-introspection" ,gobject-introspection)
4040 ("python-tkinter" ,python "tk")
4041 ("python-dateutil" ,python-dateutil)
4042 ("python-numpy" ,python-numpy)
4043 ("python-pillow" ,python-pillow)
4044 ("python-pytz" ,python-pytz)
4045 ("python-six" ,python-six)
44d10b1f
RW
4046 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
4047 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
4048 ;; object. For this reason we need to import both libraries.
5ea654cf 4049 ;; https://cairocffi.readthedocs.io/en/stable/cffi_api.html#converting-pycairo-wrappers-to-cairocffi
44d10b1f 4050 ("python-pycairo" ,python-pycairo)
44d10b1f
RW
4051 ("python-cairocffi" ,python-cairocffi)))
4052 (inputs
4053 `(("libpng" ,libpng)
4054 ("imagemagick" ,imagemagick)
4055 ("freetype" ,freetype)
4056 ("cairo" ,cairo)
4057 ("glib" ,glib)
4058 ;; FIXME: Add backends when available.
4059 ;("python-wxpython" ,python-wxpython)
4060 ("tcl" ,tcl)
4061 ("tk" ,tk)))
4062 (native-inputs
4063 `(("pkg-config" ,pkg-config)
5ea654cf
RW
4064 ("python-pytest" ,python-pytest)
4065 ("python-mock" ,python-mock)
4066 ("unzip" ,unzip)
4067 ("jquery-ui"
4068 ,(origin
4069 (method url-fetch)
4070 (uri "https://jqueryui.com/resources/download/jquery-ui-1.12.1.zip")
4071 (sha256
4072 (base32
4073 "0kb21xf38diqgxcdi1z3s9ssq36pldvyqxy56hn6pcva6rs3c8zq"))))))
44d10b1f
RW
4074 (arguments
4075 `(#:phases
4076 (modify-phases %standard-phases
5ea654cf
RW
4077 ;; XXX We disable all image comparison tests because we're using a
4078 ;; newer version of FreeType than matplotlib expects. This leads to
4079 ;; minor differences throughout the tests.
4080 (add-after 'unpack 'fix-and-disable-failing-tests
4081 (lambda _
4082 (substitute* (append (find-files "lib/matplotlib/tests/"
4083 "test_.*\\.py$")
4084 (find-files "lib/mpl_toolkits/tests"
4085 "test_.*\\.py$"))
4086 (("^from matplotlib" match)
4087 (string-append "import pytest\n" match))
4088 (("( *)@image_comparison" match indent)
4089 (string-append indent
4090 "@pytest.mark.skip(reason=\"unknown minor image differences\")\n"
4091 match)))
4092 (substitute* "lib/matplotlib/tests/test_animation.py"
4093 (("/bin/sh") (which "sh")))
4094 (for-each delete-file
4095 ;; test_normal_axes, test_get_tightbbox_polar
4096 '("lib/matplotlib/tests/test_axes.py"
9e7cb2f1
RW
4097 ;; We don't use the webagg backend and this test forces it.
4098 "lib/matplotlib/tests/test_backend_webagg.py"
5ea654cf
RW
4099 ;; test_outward_ticks
4100 "lib/matplotlib/tests/test_tightlayout.py"
9e7cb2f1
RW
4101 ;; test_hidden_axes fails with minor extent
4102 ;; differences, possibly due to the use of a
4103 ;; different version of FreeType.
4104 "lib/matplotlib/tests/test_constrainedlayout.py"
5ea654cf
RW
4105 ;; Fontconfig returns no fonts.
4106 "lib/matplotlib/tests/test_font_manager.py"))
4107 #t))
4108 (add-before 'install 'install-jquery-ui
4109 (lambda* (#:key outputs inputs #:allow-other-keys)
4110 (let ((dir (string-append (assoc-ref outputs "out")
4111 "/lib/python3.7/site-packages/matplotlib/backends/web_backend/")))
4112 (mkdir-p dir)
4113 (invoke "unzip"
4114 (assoc-ref inputs "jquery-ui")
4115 "-d" dir))
4116 #t))
c09f598d 4117 (replace 'check
5ea654cf
RW
4118 (lambda* (#:key outputs inputs #:allow-other-keys)
4119 (add-installed-pythonpath inputs outputs)
4120 (invoke "python" "tests.py" "-v"
9e7cb2f1 4121 "-m" "not network and not webagg")))
44d10b1f
RW
4122 (add-before 'build 'configure-environment
4123 (lambda* (#:key outputs inputs #:allow-other-keys)
34c2a16b
RW
4124 (let ((cairo (assoc-ref inputs "cairo")))
4125 ;; Setting this directory in the 'basedirlist' of 'setup.cfg'
44d10b1f 4126 ;; has not effect.
34c2a16b 4127 (setenv "LD_LIBRARY_PATH" (string-append cairo "/lib"))
44d10b1f
RW
4128 (setenv "HOME" (getcwd))
4129 (call-with-output-file "setup.cfg"
4130 (lambda (port)
4131 (format port "[directories]~%
4132basedirlist = ~a,~a~%
5ea654cf
RW
4133[packages]~%
4134tests = True~%"
44d10b1f
RW
4135 (assoc-ref inputs "tcl")
4136 (assoc-ref inputs "tk")))))
4137 #t)))))
339b5828 4138 (home-page "https://matplotlib.org/")
44d10b1f
RW
4139 (synopsis "2D plotting library for Python")
4140 (description
4141 "Matplotlib is a Python 2D plotting library which produces publication
4142quality figures in a variety of hardcopy formats and interactive environments
4143across platforms. Matplotlib can be used in Python scripts, the python and
4144ipython shell, web application servers, and six graphical user interface
4145toolkits.")
4146 (license license:psfl)
4147 (properties `((python2-variant . ,(delay python2-matplotlib))))))
4148
4149(define-public python2-matplotlib
4150 (let ((matplotlib (package-with-python2
4151 (strip-python2-variant python-matplotlib))))
4152 (package (inherit matplotlib)
7380df73 4153 (version "2.2.4")
5ea654cf
RW
4154 (source
4155 (origin
4156 (method url-fetch)
4157 (uri (pypi-uri "matplotlib" version))
4158 (sha256
4159 (base32
7380df73 4160 "09i1gnrra1590brc1f8d5rh2zvnknmfgzp613ab0462qkrwj15h2"))))
5d484f42
EF
4161 (arguments
4162 (substitute-keyword-arguments (package-arguments matplotlib)
4163 ((#:phases phases)
4164 `(modify-phases ,phases
66a3c2db
EF
4165 (replace 'install-jquery-ui
4166 (lambda* (#:key outputs inputs #:allow-other-keys)
4167 (let ((dir (string-append (assoc-ref outputs "out")
4168 "/lib/python2.7/site-packages/"
4169 "matplotlib/backends/web_backend/")))
4170 (mkdir-p dir)
4171 (invoke "unzip"
4172 (assoc-ref inputs "jquery-ui")
4173 "-d" dir))
4174 #t))
38a404d5 4175 (delete 'fix-and-disable-failing-tests)
5d484f42 4176 (delete 'check))))) ; These tests weren't run the the past.
44d10b1f
RW
4177 ;; Make sure to use special packages for Python 2 instead
4178 ;; of those automatically rewritten by package-with-python2.
4179 (propagated-inputs
4180 `(("python2-pycairo" ,python2-pycairo)
4181 ("python2-backports-functools-lru-cache"
4182 ,python2-backports-functools-lru-cache)
4183 ("python2-functools32" ,python2-functools32)
4184 ("python2-pygobject-2" ,python2-pygobject-2)
4185 ("python2-subprocess32" ,python2-subprocess32)
4186 ("python2-tkinter" ,python-2 "tk")
4187 ,@(fold alist-delete (package-propagated-inputs matplotlib)
4188 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
4189
4190(define-public python-matplotlib-documentation
4191 (package
4192 (name "python-matplotlib-documentation")
4193 (version (package-version python-matplotlib))
4194 (source (package-source python-matplotlib))
4195 (build-system python-build-system)
4196 (native-inputs
4197 `(("python-matplotlib" ,python-matplotlib)
4198 ("python-colorspacious" ,python-colorspacious)
4199 ("python-sphinx" ,python-sphinx)
5ad0a452 4200 ("python-sphinx-copybutton" ,python-sphinx-copybutton)
44d10b1f
RW
4201 ("python-sphinx-gallery" ,python-sphinx-gallery)
4202 ("python-numpydoc" ,python-numpydoc)
4203 ("python-ipython" ,python-ipython)
e7a53914 4204 ("python-ipykernel" ,python-ipykernel)
44d10b1f
RW
4205 ("python-mock" ,python-mock)
4206 ("graphviz" ,graphviz)
f75aa97f 4207 ("texlive" ,(texlive-union (list texlive-amsfonts
e7a53914
RW
4208 texlive-latex-amsmath
4209 texlive-latex-enumitem
4210 texlive-latex-expdlist
4211 texlive-latex-geometry
4212 texlive-latex-preview
4213 texlive-latex-type1cm
4214 texlive-latex-ucs
4215
4216 texlive-generic-pdftex
4217
e7a53914
RW
4218 texlive-fonts-ec
4219 texlive-fonts-adobe-times
4220 texlive-fonts-txfonts)))
44d10b1f
RW
4221 ("texinfo" ,texinfo)
4222 ,@(package-native-inputs python-matplotlib)))
4223 (arguments
4224 `(#:tests? #f ; we're only generating documentation
4225 #:phases
4226 (modify-phases %standard-phases
5ea654cf
RW
4227 ;; The tests in python-matplotlib are run after the install phase, so
4228 ;; we need to delete the extra phase here.
4229 (delete 'check)
44d10b1f
RW
4230 (replace 'build
4231 (lambda _
4232 (chdir "doc")
e7a53914
RW
4233 (setenv "PYTHONPATH"
4234 (string-append (getenv "PYTHONPATH")
4235 ":" (getcwd) "/../examples/units"))
44d10b1f 4236 (substitute* "conf.py"
e7a53914
RW
4237 ;; Don't use git.
4238 (("^SHA = check_output.*")
4239 (string-append "SHA = \"" ,version "\"\n"))
4240 ;; Don't fetch intersphinx files from the Internet
4241 (("^explicit_order_folders" m)
4242 (string-append "intersphinx_mapping = {}\n" m))
4243 (("'sphinx.ext.intersphinx',") "")
4244 ;; Disable URL embedding which requires internet access.
4245 (("'https://docs.scipy.org/doc/numpy'") "None")
4246 (("'https://docs.scipy.org/doc/scipy/reference'") "None"))
4247 (invoke "make"
4248 "SPHINXBUILD=sphinx-build"
4249 "SPHINXOPTS=" ; don't abort on warnings
4250 "html" "texinfo")))
44d10b1f
RW
4251 (replace 'install
4252 (lambda* (#:key inputs outputs #:allow-other-keys)
4253 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
4254 (doc (string-append data "/doc/python-matplotlib-" ,version))
4255 (info (string-append data "/info"))
4256 (html (string-append doc "/html")))
4257 (mkdir-p html)
4258 (mkdir-p info)
4259 (copy-recursively "build/html" html)
4260 (symlink (string-append html "/_images")
4261 (string-append info "/matplotlib-figures"))
4262 (with-directory-excursion "build/texinfo"
4263 (substitute* "matplotlib.texi"
4264 (("@image\\{([^,]*)" all file)
4265 (string-append "@image{matplotlib-figures/" file)))
4266 (symlink (string-append html "/_images")
4267 "./matplotlib-figures")
e7a53914
RW
4268 (invoke "makeinfo" "--no-split"
4269 "-o" "matplotlib.info" "matplotlib.texi"))
4270 (install-file "build/texinfo/matplotlib.info" info))
44d10b1f
RW
4271 #t)))))
4272 (home-page (package-home-page python-matplotlib))
4273 (synopsis "Documentation for the python-matplotlib package")
4274 (description (package-description python-matplotlib))
4275 (license (package-license python-matplotlib))))
4276
4277(define-public python2-matplotlib-documentation
5ad0a452
RW
4278 (let ((parent (package-with-python2 python-matplotlib-documentation)))
4279 (package
4280 (inherit parent)
4281 (native-inputs
4282 (alist-delete "python-sphinx-copybutton"
4283 (package-native-inputs parent))))))
44d10b1f 4284
55dae98f
RW
4285(define-public python-matplotlib-venn
4286 (package
4287 (name "python-matplotlib-venn")
4288 (version "0.11.5")
4289 (source
4290 (origin
4291 (method url-fetch)
4292 (uri (pypi-uri "matplotlib-venn" version ".zip"))
4293 (sha256
4294 (base32
4295 "13w3i1wih0mij08hrgppzg0g9z50y54rc28l6gdi1r5w45l7l0dy"))))
4296 (build-system python-build-system)
4297 (arguments '(#:tests? #f)) ; tests are not included
4298 (propagated-inputs
4299 `(("python-matplotlib" ,python-matplotlib)
4300 ("python-numpy" ,python-numpy)
4301 ("python-scipy" ,python-scipy)))
4302 (native-inputs
4303 `(("unzip" ,unzip)))
4304 (home-page "https://github.com/konstantint/matplotlib-venn")
4305 (synopsis "Plot area-proportional Venn diagrams")
4306 (description
4307 "This package provides tools for plotting area-proportional two- and
4308three-way Venn diagrams in @code{matplotlib}.")
4309 (license license:expat)))
4310
44d10b1f
RW
4311(define-public python2-pysnptools
4312 (package
4313 (name "python2-pysnptools")
5d1ade85 4314 (version "0.3.13")
44d10b1f
RW
4315 (source
4316 (origin
4317 (method url-fetch)
5d1ade85 4318 (uri (pypi-uri "pysnptools" version))
44d10b1f
RW
4319 (sha256
4320 (base32
5d1ade85 4321 "0lnis5xsl7bi0hz4f7gbicahzi5zlxkc21nk3g374xv8fb5hb3qm"))))
44d10b1f
RW
4322 (build-system python-build-system)
4323 (arguments
5d1ade85
RW
4324 `(#:python ,python-2 ; only Python 2.7 is supported
4325 #:tests? #f)) ; test files (e.g. examples/toydata.bim) not included
44d10b1f
RW
4326 (propagated-inputs
4327 `(("python2-numpy" ,python2-numpy)
4328 ("python2-scipy" ,python2-scipy)
4329 ("python2-pandas" ,python2-pandas)))
44d10b1f 4330 (native-inputs
5d1ade85 4331 `(("python2-cython" ,python2-cython)))
1b66989b 4332 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
44d10b1f
RW
4333 (synopsis "Library for reading and manipulating genetic data")
4334 (description
4335 "PySnpTools is a library for reading and manipulating genetic data. It
4336can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
4337those files. It can also efficiently manipulate ranges of integers using set
4338operators such as union, intersection, and difference.")
4339 (license license:asl2.0)))
4340
44d10b1f
RW
4341(define-public python-socksipy-branch
4342 (package
4343 (name "python-socksipy-branch")
4344 (version "1.01")
4345 (source
4346 (origin
4347 (method url-fetch)
4348 (uri (pypi-uri "SocksiPy-branch" version))
4349 (sha256
4350 (base32
4351 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
4352 (build-system python-build-system)
4353 (arguments
4354 `(#:tests? #f)) ; There are no tests
4355 (home-page "https://code.google.com/archive/p/socksipy-branch/")
4356 (synopsis "Python SOCKS module")
4357 (description
4358 "SocksiPy - A Python SOCKS client module. It provides a
4359socket-like interface that supports connections to any TCP
4360service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
4361The original version was developed by Dan Haim, this is a
4362branch created by Mario Vilas to address some open issues,
4363as the original project seems to have been abandoned circa 2007.")
4364 (license license:bsd-3)))
4365
4366(define-public python2-socksipy-branch
4367 (package-with-python2 python-socksipy-branch))
4368
6fcceb23
AG
4369(define-public python-socksipychain
4370 (package
4371 (name "python-socksipychain")
d97cdff1 4372 (version "2.1.0")
6fcceb23
AG
4373 (source
4374 (origin
4375 (method git-fetch)
4376 (uri (git-reference
4377 (url "https://github.com/pagekite/PySocksipyChain.git")
4378 (commit (string-append "v" version))))
4379 (file-name (git-file-name name version))
4380 (sha256
4381 (base32
d97cdff1 4382 "0idm9a050rd2kbgbz2sk9ib9589kj4xh1xdnggs6xbq2v2y8f6zn"))))
6fcceb23
AG
4383 (build-system python-build-system)
4384 (arguments
4385 `(#:tests? #f)) ; Tests try to access the network.
4386 (home-page "http://pagekite.net/wiki/Floss/PySocksipyChain/")
4387 (synopsis "Python SOCKS module with chained proxies support")
4388 (description
4389 "SocksiPyChain is a modified version of the SocksiPy SOCKS module, which
4390adds support for arbitrary chaining of proxy servers and various modes of
4391TLS/SSL encryption. It was developed for use in PageKite, and also includes
4392a simple netcat replacement with chaining support.")
4393 (license license:bsd-3)))
4394
44d10b1f
RW
4395(define-public python-pycodestyle
4396 (package
4397 (name "python-pycodestyle")
d16ef28b 4398 (version "2.5.0")
44d10b1f 4399 (source
ba88eea2
RW
4400 (origin
4401 (method url-fetch)
4402 (uri (pypi-uri "pycodestyle" version))
4403 (sha256
4404 (base32
d16ef28b 4405 "0v4prb05n21bm8650v0a01k1nyqjdmkrsm3zycfxh2j5k9n962p4"))))
44d10b1f
RW
4406 (build-system python-build-system)
4407 (home-page "https://pycodestyle.readthedocs.io/")
4408 (synopsis "Python style guide checker")
4409 (description "@code{pycodestyle} (formerly pep8) is a tool to check
4410Python code against some of the style conventions in
4411@url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
4412 (license license:expat)))
4413
4414(define-public python2-pycodestyle
4415 (package-with-python2 python-pycodestyle))
4416
4417(define-public python-multidict
4418 (package
4419 (name "python-multidict")
1ed3b845 4420 (version "4.7.5")
44d10b1f
RW
4421 (source
4422 (origin
4423 (method url-fetch)
4424 (uri (pypi-uri "multidict" version))
4425 (sha256
4426 (base32
1ed3b845 4427 "07ikq2c72kd263hpldw55y0px2l3g34hjk66ml9lryh1jv287qmf"))))
44d10b1f 4428 (build-system python-build-system)
1ed3b845
MB
4429 (arguments
4430 '(#:modules ((ice-9 ftw)
4431 (srfi srfi-1)
4432 (srfi srfi-26)
4433 (guix build utils)
4434 (guix build python-build-system))
4435 #:phases (modify-phases %standard-phases
4436 (replace 'check
4437 (lambda* (#:key tests? #:allow-other-keys)
4438 (if tests?
4439 (begin
4440 (let ((libdir (find (cut string-prefix? "lib." <>)
4441 (scandir "build"))))
4442 (setenv "PYTHONPATH"
4443 (string-append "./build/" libdir ":"
4444 (getenv "PYTHONPATH")))
4445 (invoke "pytest" "-vv")))
4446 (format #t "test suite not run~%"))
4447 #t)))))
44d10b1f
RW
4448 (native-inputs
4449 `(("python-pytest" ,python-pytest)
1ed3b845 4450 ("python-pytest-cov" ,python-pytest-cov)))
44d10b1f
RW
4451 (home-page "https://github.com/aio-libs/multidict/")
4452 (synopsis "Multidict implementation")
4453 (description "Multidict is dict-like collection of key-value pairs
4454where key might be occurred more than once in the container.")
4455 (license license:asl2.0)))
4456
4457(define-public python-orderedmultidict
4458 (package
4459 (name "python-orderedmultidict")
4460 (version "0.7.11")
4461 (source
4462 (origin
4463 (method url-fetch)
4464 (uri (pypi-uri "orderedmultidict" version))
4465 (sha256
4466 (base32
4467 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
4468 (build-system python-build-system)
4469 (arguments
4470 `(#:phases
4471 (modify-phases %standard-phases
4472 (add-after 'unpack 'fix-tests
4473 (lambda _
4474 ;; The package uses nosetest for running the tests.
4475 ;; Adding this initfile allows to run the test suite
4476 ;; without requiring nosetest.
d1c4f329
RW
4477 (with-output-to-file "tests/__init__.py" newline)
4478 #t)))))
44d10b1f
RW
4479 (propagated-inputs
4480 `(("python-six" ,python-six)))
4481 (native-inputs
4482 `(("python-pycodestyle" ,python-pycodestyle)))
4483 (home-page "https://github.com/gruns/orderedmultidict")
4484 (synopsis "Python Ordered Multivalue Dictionary - omdict")
4485 (description "This package contains a library for ordered multivalue
4486dictionaries. A multivalue dictionary is a dictionary that can store
4487multiple values for the same key. An ordered multivalue dictionary is a
4488multivalue dictionary that retains the order of insertions and deletions.")
4489 (license license:unlicense)))
4490
4491(define-public python2-orderedmultidict
4492 (package-with-python2 python-orderedmultidict))
4493
4494(define-public python-autopep8
4495 (package
4496 (name "python-autopep8")
4497 (version "1.3.5")
4498 (source
4499 (origin
4500 (method url-fetch)
4501 (uri (pypi-uri "autopep8" version))
4502 (sha256
4503 (base32
4504 "192bvhzi4d0claqxgzymvv7k3qnj627742bc8sgxpzjj42pd9112"))))
4505 (build-system python-build-system)
4506 (propagated-inputs
4507 `(("python-pycodestyle" ,python-pycodestyle)))
4508 (home-page "https://github.com/hhatto/autopep8")
4509 (synopsis "Format Python code according to the PEP 8 style guide")
4510 (description
4511 "@code{autopep8} automatically formats Python code to conform to
4512the PEP 8 style guide. It uses the pycodestyle utility to determine
4513what parts of the code needs to be formatted. @code{autopep8} is
4514capable of fixing most of the formatting issues that can be reported
4515by pycodestyle.")
4516 (license (license:non-copyleft
4517 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
4518
4519(define-public python2-autopep8
4520 (package-with-python2 python-autopep8))
4521
f2a64830
JK
4522(define-public python-distlib
4523 (package
4524 (name "python-distlib")
4525 (version "0.3.0")
4526 (source
4527 (origin
4528 (method url-fetch)
4529 (uri (pypi-uri "distlib" version ".zip"))
4530 (sha256
4531 (base32
4532 "08fyi2r246733vharl2yckw20rilci28r91mzrnnvcr638inw5if"))))
4533 (build-system python-build-system)
4534 (arguments
4535 `(#:phases
4536 (modify-phases %standard-phases
4537 (add-before 'build 'no-/bin/sh
4538 (lambda _
4539 (substitute* '("distlib/scripts.py" "tests/test_scripts.py")
4540 (("/bin/sh") (which "sh")))
4541 #t))
4542 (add-before 'check 'prepare-test-env
4543 (lambda _
4544 (setenv "HOME" "/tmp")
4545 ;; NOTE: Any value works, the variable just has to be present.
4546 (setenv "SKIP_ONLINE" "1")
4547 #t)))))
4548 (native-inputs `(("unzip" ,unzip)))
4549 (home-page "https://bitbucket.org/pypa/distlib")
4550 (synopsis "Distribution utilities")
4551 (description "Distlib is a library which implements low-level functions that
4552relate to packaging and distribution of Python software. It is intended to be
4553used as the basis for third-party packaging tools.")
4554 (license license:psfl)))
4555
44d10b1f
RW
4556(define-public python-distutils-extra
4557 (package
4558 (name "python-distutils-extra")
4559 (version "2.38")
4560 (source
4561 (origin
4562 (method url-fetch)
4563 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4564 version "/+download/python-distutils-extra-"
4565 version ".tar.gz"))
4566 (sha256
4567 (base32
4568 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4569 (build-system python-build-system)
4570 (home-page "https://launchpad.net/python-distutils-extra/")
4571 (synopsis "Enhancements to Python's distutils")
4572 (description
4573 "The python-distutils-extra module enables you to easily integrate
4574gettext support, themed icons, and scrollkeeper-based documentation into
4575Python's distutils.")
4576 (license license:gpl2)))
4577
4578(define-public python2-distutils-extra
4579 (package-with-python2 python-distutils-extra))
4580
4581(define-public python2-elib.intl
4582 (package
4583 (name "python2-elib.intl")
4584 (version "0.0.3")
4585 (source
4586 (origin
4587 ;; This project doesn't tag releases or publish tarballs, so we take
4588 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4589 (method git-fetch)
4590 (uri (git-reference
4591 (url "https://github.com/dieterv/elib.intl.git")
4592 (commit "d09997cfef")))
4593 (file-name (string-append name "-" version "-checkout"))
4594 (sha256
4595 (base32
4596 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4597 (build-system python-build-system)
4598 (arguments
4599 ;; incompatible with Python 3 (exception syntax)
4600 `(#:python ,python-2
4601 #:tests? #f))
4602 (home-page "https://github.com/dieterv/elib.intl")
4603 (synopsis "Enhanced internationalization for Python")
4604 (description
4605 "The elib.intl module provides enhanced internationalization (I18N)
4606services for your Python modules and applications.")
4607 (license license:lgpl3+)))
4608
4609(define-public python-olefile
4610 (package
4611 (name "python-olefile")
5bef0f10 4612 (version "0.46")
44d10b1f
RW
4613 (source
4614 (origin
4615 (method url-fetch)
5bef0f10
MB
4616 (uri (string-append "https://github.com/decalage2/olefile/releases/"
4617 "download/v" version "/olefile-" version ".tar.gz"))
44d10b1f
RW
4618 (file-name (string-append name "-" version ".tar.gz"))
4619 (sha256
4620 (base32
5bef0f10 4621 "1kjxh4gr651hpqkjfv89cfzr40hyvf3vjlda7mifiail83j7j07m"))))
44d10b1f 4622 (build-system python-build-system)
5bef0f10 4623 (home-page "https://www.decalage.info/python/olefileio")
44d10b1f
RW
4624 (synopsis "Read and write Microsoft OLE2 files.")
4625 (description
4626 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
4627Storage or Compound Document, Microsoft Office). It is an improved version of
4628the OleFileIO module from PIL, the Python Image Library.")
4629 (license license:bsd-3)))
4630
4631(define-public python2-olefile
4632 (package-with-python2 python-olefile))
4633
4634(define-public python-pillow
4635 (package
4636 (name "python-pillow")
5fbdd917 4637 (version "6.2.1")
44d10b1f
RW
4638 (source
4639 (origin
4640 (method url-fetch)
4641 (uri (pypi-uri "Pillow" version))
4642 (sha256
4643 (base32
5fbdd917 4644 "1c8wkzc58f5wdh006jvmwdk3wxld1xgagcbdvj7iv17qi0m9fkmz"))))
44d10b1f
RW
4645 (build-system python-build-system)
4646 (native-inputs
4647 `(("python-pytest" ,python-pytest)))
4648 (inputs
4649 `(("freetype" ,freetype)
4650 ("lcms" ,lcms)
44d10b1f 4651 ("libjpeg" ,libjpeg)
44d10b1f 4652 ("libtiff" ,libtiff)
0c4e1c5f
EF
4653 ("libwebp" ,libwebp)
4654 ("openjpeg" ,openjpeg)
4655 ("zlib" ,zlib)))
44d10b1f
RW
4656 (propagated-inputs
4657 `(("python-olefile" ,python-olefile)))
4658 (arguments
4659 `(#:phases
4660 (modify-phases %standard-phases
4661 (add-after 'unpack 'patch-ldconfig
4662 (lambda _
4663 (substitute* "setup.py"
4664 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
61b77ff3 4665 (replace 'check
979d8464
EF
4666 (lambda* (#:key outputs inputs tests? #:allow-other-keys)
4667 (if tests?
4668 (begin
4669 (setenv "HOME" (getcwd))
4670 ;; Make installed package available for running the tests.
4671 (add-installed-pythonpath inputs outputs)
4672 (invoke "python" "selftest.py" "--installed")
4673 (invoke "python" "-m" "pytest" "-vv"))
4674 #t))))))
44d10b1f
RW
4675 (home-page "https://python-pillow.org")
4676 (synopsis "Fork of the Python Imaging Library")
4677 (description
4678 "The Python Imaging Library adds image processing capabilities to your
4679Python interpreter. This library provides extensive file format support, an
4680efficient internal representation, and fairly powerful image processing
4681capabilities. The core image library is designed for fast access to data
4682stored in a few basic pixel formats. It should provide a solid foundation for
4683a general image processing tool.")
4684 (license (license:x11-style
4685 "http://www.pythonware.com/products/pil/license.htm"
4686 "The PIL Software License"))))
4687
4688(define-public python2-pillow
4689 (package-with-python2 python-pillow))
4690
4691(define-public python-pycparser
4692 (package
4693 (name "python-pycparser")
c6c0940e 4694 (version "2.19")
44d10b1f
RW
4695 (source
4696 (origin
4697 (method url-fetch)
4698 (uri (pypi-uri "pycparser" version))
4699 (sha256
4700 (base32
c6c0940e 4701 "1cr5dcj9628lkz1qlwq3fv97c25363qppkmcayqvd05dpy573259"))))
44d10b1f
RW
4702 (outputs '("out" "doc"))
4703 (build-system python-build-system)
4704 (native-inputs
4705 `(("pkg-config" ,pkg-config)))
4706 (arguments
4707 `(#:phases
4708 (modify-phases %standard-phases
4709 (replace 'check
4710 (lambda _
4711 (with-directory-excursion "tests"
acb75c03
RW
4712 (invoke "python" "all_tests.py"))
4713 #t))
44d10b1f
RW
4714 (add-after 'install 'install-doc
4715 (lambda* (#:key outputs #:allow-other-keys)
4716 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4717 (doc (string-append data "/doc/" ,name "-" ,version))
4718 (examples (string-append doc "/examples")))
4719 (mkdir-p examples)
4720 (for-each (lambda (file)
4721 (copy-file (string-append "." file)
4722 (string-append doc file)))
4723 '("/README.rst" "/CHANGES" "/LICENSE"))
c6c0940e
MB
4724 (copy-recursively "examples" examples)
4725 #t))))))
44d10b1f
RW
4726 (home-page "https://github.com/eliben/pycparser")
4727 (synopsis "C parser in Python")
4728 (description
4729 "Pycparser is a complete parser of the C language, written in pure Python
4730using the PLY parsing library. It parses C code into an AST and can serve as
4731a front-end for C compilers or analysis tools.")
4732 (license license:bsd-3)))
4733
4734(define-public python2-pycparser
4735 (package-with-python2 python-pycparser))
4736
4737(define-public python-pywavelets
4738 (package
4739 (name "python-pywavelets")
4740 (version "1.0.1")
4741 (home-page "https://github.com/PyWavelets/pywt")
4742 (source (origin
4743 (method url-fetch)
4744 (uri (pypi-uri "PyWavelets" version))
4745 (sha256
4746 (base32
4747 "1p3qv2v66ghnqrb1f98wyyhp9dz71jwcd6kfpsax65sfdpiyqp1w"))))
4748 (build-system python-build-system)
4749 (arguments
4750 '(#:modules ((ice-9 ftw)
4751 (srfi srfi-1)
4752 (srfi srfi-26)
4753 (guix build utils)
4754 (guix build python-build-system))
4755 #:phases (modify-phases %standard-phases
4756 (replace 'check
4757 (lambda _
4758 (let ((cwd (getcwd))
4759 (libdir (find (cut string-prefix? "lib." <>)
4760 (scandir "build"))))
4761 (with-directory-excursion (string-append cwd "/build/" libdir)
4762 (invoke "nosetests" "-v" "."))))))))
4763 (native-inputs
4764 `(("python-matplotlib" ,python-matplotlib) ;for tests
4765 ("python-nose" ,python-nose)))
4766 (propagated-inputs
4767 `(("python-numpy" ,python-numpy)))
4768 (synopsis "Wavelet transforms in Python")
4769 (description
4770 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
4771mathematical basis functions that are localized in both time and frequency.
4772Wavelet transforms are time-frequency transforms employing wavelets. They are
4773similar to Fourier transforms, the difference being that Fourier transforms are
4774localized only in frequency instead of in time and frequency.")
4775 (license license:expat)))
4776
4777(define-public python2-pywavelets
4778 (package-with-python2 python-pywavelets))
4779
4780(define-public python-xcffib
4781 (package
4782 (name "python-xcffib")
4783 (version "0.6.0")
4784 (source
4785 (origin
4786 (method url-fetch)
4787 (uri (pypi-uri "xcffib" version))
4788 (sha256
4789 (base32
4790 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
4791 (build-system python-build-system)
4792 (inputs
4793 `(("libxcb" ,libxcb)))
4794 (propagated-inputs
4795 `(("python-cffi" ,python-cffi) ; used at run time
4796 ("python-six" ,python-six)))
4797 (arguments
4798 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
4799 #:tests? #f
4800 #:phases
4801 (modify-phases %standard-phases
4802 (add-after 'unpack 'fix-libxcb-path
4803 (lambda* (#:key inputs #:allow-other-keys)
4804 (let ((libxcb (assoc-ref inputs "libxcb")))
4805 (substitute* '("xcffib/__init__.py")
4806 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
4807 #t)))
4808 (add-after 'install 'install-doc
4809 (lambda* (#:key outputs #:allow-other-keys)
4810 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4811 "/doc/" ,name "-" ,version)))
4812 (mkdir-p doc)
4813 (copy-file "README.md"
4814 (string-append doc "/README.md"))
4815 #t))))))
4816 (home-page "https://github.com/tych0/xcffib")
4817 (synopsis "XCB Python bindings")
4818 (description
4819 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4820support for Python 3 and PyPy. It is based on cffi.")
4821 (license license:expat)))
4822
4823(define-public python2-xcffib
4824 (package-with-python2 python-xcffib))
4825
4826(define-public python-cairocffi
4827 (package
4828 (name "python-cairocffi")
4829 (version "0.9.0")
4830 (source
4831 (origin
4832 (method url-fetch)
4833 (uri (pypi-uri "cairocffi" version))
4834 (sha256
4835 (base32
4836 "0dq3k4zhqd8cwsf3nyjqvjqm8wkvrjn1wjf44rl3v0h8kqx6qf0m"))
4837 (patches (search-patches "python-cairocffi-dlopen-path.patch"))))
4838 (build-system python-build-system)
4839 (outputs '("out" "doc"))
4840 (inputs
4841 `(("glib" ,glib)
4842 ("gtk+" ,gtk+)
4843 ("gdk-pixbuf" ,gdk-pixbuf)
4844 ("cairo" ,cairo)
4845 ("pango" ,pango)))
4846 (native-inputs
4847 `(("pkg-config" ,pkg-config)
4848 ("python-pytest" ,python-pytest)
4849 ("python-pytest-cov" ,python-pytest-cov)
4850 ("python-pytest-runner" ,python-pytest-runner)
4851 ("python-sphinx" ,python-sphinx)
4852 ("python-docutils" ,python-docutils)))
4853 (propagated-inputs
4854 `(("python-xcffib" ,python-xcffib))) ; used at run time
4855 (arguments
4856 `(#:phases
4857 (modify-phases %standard-phases
4858 (add-after 'unpack 'patch-paths
4859 (lambda* (#:key inputs outputs #:allow-other-keys)
4860 (substitute* (find-files "." "\\.py$")
4861 (("dlopen\\(ffi, 'cairo'")
4862 (string-append "dlopen(ffi, '" (assoc-ref inputs "cairo")
4863 "/lib/libcairo.so.2'"))
4864 (("dlopen\\(ffi, 'gdk-3'")
4865 (string-append "dlopen(ffi, '" (assoc-ref inputs "gtk+")
4866 "/lib/libgtk-3.so.0'"))
4867 (("dlopen\\(ffi, 'gdk_pixbuf-2.0'")
4868 (string-append "dlopen(ffi, '" (assoc-ref inputs "gdk-pixbuf")
4869 "/lib/libgdk_pixbuf-2.0.so.0'"))
4870 (("dlopen\\(ffi, 'glib-2.0'")
4871 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4872 "/lib/libglib-2.0.so.0'"))
4873 (("dlopen\\(ffi, 'gobject-2.0'")
4874 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4875 "/lib/libgobject-2.0.so.0'"))
4876 (("dlopen\\(ffi, 'pangocairo-1.0'")
4877 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4878 "/lib/libpangocairo-1.0.so.0'"))
4879 (("dlopen\\(ffi, 'pango-1.0'")
4880 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4881 "/lib/libpango-1.0.so.0'")))
4882 #t))
4883 (add-after 'install 'install-doc
4884 (lambda* (#:key inputs outputs #:allow-other-keys)
4885 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4886 (doc (string-append data "/doc/" ,name "-" ,version))
4887 (html (string-append doc "/html")))
4888 (setenv "LD_LIBRARY_PATH"
4889 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4890 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4891 (setenv "LANG" "en_US.UTF-8")
4892 (mkdir-p html)
4893 (for-each (lambda (file)
4894 (copy-file (string-append "." file)
4895 (string-append doc file)))
4896 '("/README.rst" "/CHANGES" "/LICENSE"))
4897 (system* "python" "setup.py" "build_sphinx")
4898 (copy-recursively "docs/_build/html" html)
4899 #t))))))
4900 (home-page "https://github.com/Kozea/cairocffi")
4901 (synopsis "Python bindings and object-oriented API for Cairo")
4902 (description
4903 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4904Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4905graphics library with support for multiple backends including image buffers,
4906PNG, PostScript, PDF, and SVG file output.")
4907 (license license:bsd-3)))
4908
4909(define-public python2-cairocffi
4910 (package-with-python2 python-cairocffi))
4911
4912(define-public python-decorator
4913 (package
4914 (name "python-decorator")
4915 (version "4.3.0")
4916 (source
4917 (origin
4918 (method url-fetch)
4919 (uri (pypi-uri "decorator" version))
4920 (sha256
4921 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
4922 (build-system python-build-system)
e85af137 4923 (home-page "https://pypi.org/project/decorator/")
44d10b1f
RW
4924 (synopsis "Python module to simplify usage of decorators")
4925 (description
4926 "The aim of the decorator module is to simplify the usage of decorators
4927for the average programmer, and to popularize decorators usage giving examples
4928of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4929etc. The core of this module is a decorator factory.")
4930 (license license:expat)))
4931
4932(define-public python2-decorator
4933 (package-with-python2 python-decorator))
4934
4935(define-public python-drmaa
4936 (package
4937 (name "python-drmaa")
4938 (version "0.7.7")
4939 (source
4940 (origin
4941 (method url-fetch)
4942 (uri (pypi-uri "drmaa" version))
4943 (sha256
4944 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
4945 (build-system python-build-system)
4946 ;; The test suite requires libdrmaa which is provided by the cluster
4947 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4948 ;; should be set to the path of the libdrmaa library.
4949 (arguments '(#:tests? #f))
4950 (native-inputs
4951 `(("python-nose" ,python-nose)))
e85af137 4952 (home-page "https://pypi.org/project/drmaa/")
44d10b1f
RW
4953 (synopsis "Python bindings for the DRMAA library")
4954 (description
4955 "A Python package for Distributed Resource Management (DRM) job
4956submission and control. This package is an implementation of the DRMAA 1.0
4957Python language binding specification.")
4958 (license license:bsd-3)))
4959
4960(define-public python2-drmaa
4961 (package-with-python2 python-drmaa))
4962
4963(define-public python-grako
4964 (package
4965 (name "python-grako")
4966 (version "3.99.9")
4967 (source
4968 (origin
4969 (method url-fetch)
4970 (uri
4971 (pypi-uri "grako" version ".zip"))
4972 (sha256
4973 (base32
4974 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
4975 (build-system python-build-system)
4976 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
4977 (native-inputs
4978 `(("unzip" ,unzip)
4979 ("python-pytest" ,python-pytest)
4980 ("python-pytest-runner" ,python-pytest-runner)))
4981 (home-page "https://bitbucket.org/neogeny/grako")
4982 (synopsis "EBNF parser generator")
4983 (description
4984 "Grako takes a grammar in a variation of EBNF as input, and outputs a
4985memoizing PEG/Packrat parser in Python.")
4986 (license license:bsd-3)))
4987
4988(define-public python2-grako
4989 (package-with-python2 python-grako))
4990
4991(define-public python-gridmap
4992 (package
4993 (name "python-gridmap")
4994 (version "0.13.0")
4995 (source
4996 (origin
768fea0f
TGR
4997 (method git-fetch)
4998 (uri (git-reference
4999 (url "https://github.com/pygridtools/gridmap.git")
5000 (commit (string-append "v" version))))
5001 (file-name (git-file-name name version))
44d10b1f 5002 (sha256
768fea0f 5003 (base32 "1478lbwsr1w24cii2x01m2910fvh8r43ghnb78nc972a96hqiknm"))))
44d10b1f
RW
5004 (build-system python-build-system)
5005 (arguments
5006 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
5007 (propagated-inputs
5008 `(("python-psutil" ,python-psutil)
5009 ("python-drmaa" ,python-drmaa)
5010 ("python-pyzmq" ,python-pyzmq)))
5011 (home-page "https://github.com/pygridtools/gridmap")
5012 (synopsis "Create jobs on a cluster directly from Python")
5013 (description
5014 "Gridmap is a Python package to allow you to easily create jobs on the
5015cluster directly from Python. You can directly map Python functions onto the
5016cluster without needing to write any wrapper code yourself.")
5017 (license license:gpl3+)))
5018
5019(define-public python2-gridmap
5020 (package-with-python2 python-gridmap))
5021
5022(define-public python-honcho
5023 (package
5024 (name "python-honcho")
5025 (version "1.0.1")
5026 (source
5027 (origin
8524d130
TGR
5028 (method git-fetch)
5029 (uri (git-reference
5030 (url "https://github.com/nickstenning/honcho.git")
5031 (commit (string-append "v" version))))
5032 (file-name (git-file-name name version))
44d10b1f 5033 (sha256
8524d130 5034 (base32 "11bd87474qpif20xdcn0ra1idj5k16ka51i658wfpxwc6nzsn92b"))))
44d10b1f
RW
5035 (build-system python-build-system)
5036 (native-inputs
5037 `(("python-pytest" ,python-pytest)
5038 ("python-mock" ,python-mock)
5039 ("python-tox" ,python-tox)
5040 ("which" ,which))) ;for tests
5041 (propagated-inputs
5042 `(("python-jinja2" ,python-jinja2)))
5043 (arguments
5044 `(#:phases
5045 (modify-phases %standard-phases
5046 (delete 'check)
5047 (add-after 'install 'check
5048 (lambda* (#:key outputs inputs #:allow-other-keys)
5049 ;; fix honcho path in testsuite
5050 (substitute* "tests/conftest.py"
5051 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
5052 "/bin/honcho" "'")))
5053 ;; It's easier to run tests after install.
5054 ;; Make installed package available for running the tests
5055 (add-installed-pythonpath inputs outputs)
95b707fb 5056 (invoke "py.test" "-v"))))))
44d10b1f
RW
5057 (home-page "https://github.com/nickstenning/honcho")
5058 (synopsis "Manage Procfile-based applications")
5059 (description
5060 "A Procfile is a file which describes how to run an application
50fceab0 5061consisting of several processes. honcho starts all listed processes.
44d10b1f
RW
5062The output of all running processes is collected by honcho and
5063displayed.")
5064 (license license:expat)))
5065
5066(define-public python2-honcho
5067 (package-with-python2 python-honcho))
5068
5069(define-public python-pexpect
5070 (package
5071 (name "python-pexpect")
5072 (version "4.6.0")
5073 (source
5074 (origin
5075 (method url-fetch)
5076 (uri (pypi-uri "pexpect" version))
5077 (sha256
5078 (base32 "1fla85g47iaxxpjhp9vkxdnv4pgc7rplfy6ja491smrrk0jqi3ia"))))
5079 (build-system python-build-system)
5080 (arguments
5081 `(#:phases
5082 (modify-phases %standard-phases
5083 (add-before 'check 'prepare-tests
5084 (lambda _
5085 (substitute* (find-files "tests")
5086 (("/bin/ls") (which "ls"))
5087 (("/bin/echo") (which "echo"))
5088 (("/bin/which") (which "which"))
5089 ;; Many tests try to use the /bin directory which
5090 ;; is not present in the build environment.
5091 ;; Use one that's non-empty and unlikely to change.
5092 (("/bin'") "/dev'"))
5093 ;; XXX: Socket connection test gets "Connection reset by peer".
5094 ;; Why does it not work? Delete for now.
5095 (delete-file "tests/test_socket.py")
5096 #t))
5097 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
5098 (native-inputs
5099 `(("python-nose" ,python-nose)
5100 ("python-pytest" ,python-pytest)
5101 ("man-db" ,man-db)
5102 ("which" ,which)
5103 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
5104 (propagated-inputs
5105 `(("python-ptyprocess" ,python-ptyprocess)))
5106 (home-page "http://pexpect.readthedocs.org/")
5107 (synopsis "Controlling interactive console applications")
5108 (description
5109 "Pexpect is a pure Python module for spawning child applications;
5110controlling them; and responding to expected patterns in their output.
5111Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
5112child application and control it as if a human were typing commands.")
5113 (license license:isc)))
5114
5115(define-public python2-pexpect
5116 (package-with-python2 python-pexpect))
5117
5118(define-public python-setuptools-scm
5119 (package
5120 (name "python-setuptools-scm")
85092643 5121 (version "3.2.0")
44d10b1f
RW
5122 (source (origin
5123 (method url-fetch)
5124 (uri (pypi-uri "setuptools_scm" version))
5125 (sha256
5126 (base32
85092643 5127 "0n3knn3p1sqlx31k2lahn7z9bacvlv8nhlfidj77vz50bxqlgasj"))))
44d10b1f
RW
5128 (build-system python-build-system)
5129 (home-page "https://github.com/pypa/setuptools_scm/")
5130 (synopsis "Manage Python package versions in SCM metadata")
5131 (description
5132 "Setuptools_scm handles managing your Python package versions in
5133@dfn{software configuration management} (SCM) metadata instead of declaring
5134them as the version argument or in a SCM managed file.")
5135 (license license:expat)))
5136
a0b2accf
MO
5137;; Needed by python-lazy-object-proxy, remove on next update cycle.
5138(define-public python-setuptools-scm-3.3
5139 (package
5140 (inherit python-setuptools-scm)
5141 (version "3.3.3")
5142 (source (origin
5143 (method url-fetch)
5144 (uri (pypi-uri "setuptools_scm" version))
5145 (sha256
5146 (base32
5147 "19cyndx23xmpbhz4qrwmfwsmnnaczd0dw7qg977ksq2dbvxy29dx"))))))
5148
44d10b1f
RW
5149(define-public python2-setuptools-scm
5150 (package-with-python2 python-setuptools-scm))
5151
bb74ea09
RW
5152(define-public python-pathlib2
5153 (package
5154 (name "python-pathlib2")
5155 (version "2.3.3")
5156 (source
5157 (origin
5158 (method url-fetch)
5159 (uri (pypi-uri "pathlib2" version))
5160 (sha256
5161 (base32
5162 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
5163 (build-system python-build-system)
5164 (propagated-inputs
5165 `(("python-scandir" ,python-scandir)
5166 ("python-six" ,python-six)))
e85af137 5167 (home-page "https://pypi.org/project/pathlib2/")
746d3384 5168 (synopsis "Object-oriented file system paths")
bb74ea09
RW
5169 (description "The goal of pathlib2 is to provide a backport of the
5170standard @code{pathlib} module which tracks the standard library module, so
5171all the newest features of the standard @code{pathlib} can be used also on
5172older Python versions.")
5173 (license license:expat)))
5174
fd5c264a
MB
5175(define-public python2-importlib-resources
5176 (package
5177 (name "python2-importlib-resources")
5178 (version "1.0.2")
5179 (source (origin
5180 (method url-fetch)
5181 (uri (pypi-uri "importlib_resources" version))
5182 (sha256
5183 (base32
5184 "0y3hg12iby1qyaspnbisz4s4vxax7syikk3skznwqizqyv89y9yk"))))
5185 (build-system python-build-system)
5186 (arguments
5187 `(#:python ,python-2))
5188 (native-inputs
5189 `(("python-wheel" ,python2-wheel)))
5190 (propagated-inputs
5191 `(("python-pathlib2" ,python2-pathlib2)
5192 ("python-typing" ,python2-typing)))
5193 (home-page "https://gitlab.com/python-devs/importlib_resources")
5194 (synopsis "Backport of @code{importlib.resources} from Python 3.7")
5195 (description
5196 "This package provides an implementation of @code{importlib.resources}
5197for older versions of Python.")
5198 (license license:asl2.0)))
5199
15b65617
RW
5200(define-public python-importlib-metadata
5201 (package
5202 (name "python-importlib-metadata")
4dc04d11 5203 (version "1.4.0")
15b65617
RW
5204 (source
5205 (origin
5206 (method url-fetch)
5207 (uri (pypi-uri "importlib_metadata" version))
5208 (sha256
4dc04d11 5209 (base32 "1n76444v7zn910xrhh8954jdn4byxbn9f1jck6b85a716mbh2z7i"))))
15b65617
RW
5210 (build-system python-build-system)
5211 (propagated-inputs
4dc04d11 5212 `(("python-zipp" ,python-zipp)))
15b65617
RW
5213 (native-inputs
5214 `(("python-setuptools-scm" ,python-setuptools-scm)
4dc04d11 5215 ("python-packaging" ,python-packaging)))
15b65617
RW
5216 (home-page "https://importlib-metadata.readthedocs.io/")
5217 (synopsis "Read metadata from Python packages")
5218 (description
5219 "@code{importlib_metadata} is a library which provides an API for
5220accessing an installed Python package's metadata, such as its entry points or
5221its top-level name. This functionality intends to replace most uses of
5222@code{pkg_resources} entry point API and metadata API. Along with
5223@code{importlib.resources} in Python 3.7 and newer, this can eliminate the
5224need to use the older and less efficient @code{pkg_resources} package.")
3dfb3d44 5225 (properties `((python2-variant . ,(delay python2-importlib-metadata))))
15b65617
RW
5226 (license license:asl2.0)))
5227
5efa04dd
MB
5228(define-public python2-importlib-metadata
5229 (let ((base (package-with-python2 (strip-python2-variant
5230 python-importlib-metadata))))
5231 (package/inherit
5232 base
5233 (name "python2-importlib-metadata")
5234 (propagated-inputs
5235 `(("python-configparser" ,python2-configparser)
5236 ("python-contextlib2" ,python2-contextlib2)
5237 ("python-importlib-resources" ,python2-importlib-resources)
5238 ("python-pathlib2" ,python2-pathlib2)
5239 ,@(package-propagated-inputs base))))))
5240
37c173d1
RW
5241(define-public python-jaraco-packaging
5242 (package
5243 (name "python-jaraco-packaging")
5244 (version "6.1")
5245 (source
5246 (origin
5247 (method url-fetch)
5248 (uri (pypi-uri "jaraco.packaging" version))
5249 (sha256
5250 (base32
5251 "0zimrnkh33b9g8ffw11mjh6kvs54cy5gcjw1h5cl1r7dc833dmkm"))))
5252 (build-system python-build-system)
5253 (propagated-inputs
5254 `(("python-pytest" ,python-pytest)
5255 ("python-pytest-checkdocs" ,python-pytest-checkdocs)
5256 ("python-pytest-flake8" ,python-pytest-flake8)
5257 ("python-rst.linker" ,python-rst.linker)
5258 ("python-setuptools" ,python-setuptools)
5259 ("python-setuptools-scm" ,python-setuptools-scm)
5260 ("python-six" ,python-six)
5261 ("python-sphinx" ,python-sphinx)))
5262 (home-page "https://github.com/jaraco/jaraco.packaging")
5263 (synopsis "Tools to supplement packaging Python releases")
5264 (description
5265 "This package provides various tools to supplement packaging Python
5266releases.")
5267 (license license:expat)))
5268
44d10b1f
RW
5269(define-public python-pathpy
5270 (package
5271 (name "python-pathpy")
a3dd8871 5272 (version "11.5.1")
44d10b1f
RW
5273 (source
5274 (origin
5275 (method url-fetch)
5276 (uri (pypi-uri "path.py" version))
5277 (sha256
a3dd8871 5278 (base32 "0ir9j1haq2jbi7aip6k2fa9l7q1l03k4hp1awxhjhcwzsnwp3ll8"))))
49ad11e9 5279 (outputs '("out" "doc"))
44d10b1f
RW
5280 (build-system python-build-system)
5281 (propagated-inputs
01a53e0b
MC
5282 `(("python-appdirs" ,python-appdirs)
5283 ("python-importlib-metadata" ,python-importlib-metadata)))
44d10b1f
RW
5284 (native-inputs
5285 `(("python-setuptools-scm" ,python-setuptools-scm)
5286 ("python-sphinx" ,python-sphinx)
5287 ("python-rst.linker" ,python-rst.linker)
5288 ("python-pytest" ,python-pytest)
49ad11e9
RW
5289 ("python-pytest-runner" ,python-pytest-runner)
5290 ("python-jaraco-packaging" ,python-jaraco-packaging)))
44d10b1f 5291 (arguments
49ad11e9
RW
5292 `(#:phases
5293 (modify-phases %standard-phases
5294 (add-after 'build 'build-doc
5295 (lambda _
5296 (setenv "LANG" "en_US.UTF-8")
5297 (invoke "python" "setup.py" "build_sphinx")))
5298 (add-after 'install 'install-doc
5299 (lambda* (#:key outputs #:allow-other-keys)
5300 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5301 (doc (string-append data "/doc/" ,name "-" ,version))
5302 (html (string-append doc "/html")))
5303 (mkdir-p html)
5304 (for-each (lambda (file)
5305 (copy-file file (string-append doc "/" file)))
5306 '("README.rst" "CHANGES.rst"))
5307 (copy-recursively "build/sphinx/html" html)
5308 #t)))
5309 (replace 'check
5310 (lambda _
5311 ;; The import time test aborts if an import takes longer than
5312 ;; 100ms. It may very well take a little longer than that.
5313 (invoke "pytest" "-v" "-k" "not test_import_time"))))))
44d10b1f
RW
5314 (home-page "https://github.com/jaraco/path.py")
5315 (synopsis "Python module wrapper for built-in os.path")
5316 (description
5317 "@code{path.py} implements path objects as first-class entities, allowing
5318common operations on files to be invoked on those path objects directly.")
5319 (license license:expat)))
5320
5321(define-public python2-pathpy
5322 (package-with-python2 python-pathpy))
5323
5324(define-public python-simplegeneric
5325 (package
5326 (name "python-simplegeneric")
5327 (version "0.8.1")
5328 (source
5329 (origin
5330 (method url-fetch)
6c8c3980 5331 (uri (pypi-uri "simplegeneric" version ".zip"))
44d10b1f
RW
5332 (sha256
5333 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
5334 (build-system python-build-system)
5335 (native-inputs
5336 `(("unzip" ,unzip)))
5337 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
5338 (synopsis "Python module for simple generic functions")
5339 (description
5340 "The simplegeneric module lets you define simple single-dispatch generic
5341functions, akin to Python’s built-in generic functions like @code{len()},
5342@code{iter()} and so on. However, instead of using specially-named methods,
5343these generic functions use simple lookup tables, akin to those used by
5344e.g. @code{pickle.dump()} and other generic functions found in the Python
5345standard library.")
5346 (license license:zpl2.1)))
5347
5348(define-public python2-simplegeneric
5349 (package-with-python2 python-simplegeneric))
5350
5351(define-public python-ipython-genutils
5352 ;; TODO: This package is retired, check if can be removed, see description.
5353 (package
5354 (name "python-ipython-genutils")
5355 (version "0.1.0")
5356 (source
5357 (origin
5358 (method url-fetch)
c9671d4b 5359 (uri (pypi-uri "ipython_genutils" version))
44d10b1f
RW
5360 (sha256
5361 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
5362 (build-system python-build-system)
5363 (arguments `(#:tests? #f)) ; no tests
5364 (home-page "https://ipython.org")
5365 (synopsis "Vestigial utilities from IPython")
5366 (description
5367 "This package provides retired utilities from IPython. No packages
5368outside IPython/Jupyter should depend on it.
5369
5370This package shouldn't exist. It contains some common utilities shared by
5371Jupyter and IPython projects during The Big Split. As soon as possible, those
5372packages will remove their dependency on this, and this package will go
5373away.")
5374 (license license:bsd-3)))
5375
5376(define-public python2-ipython-genutils
5377 (package-with-python2 python-ipython-genutils))
5378
5379(define-public python-traitlets
5380 (package
5381 (name "python-traitlets")
ac5e205a 5382 (version "4.3.3")
44d10b1f
RW
5383 (source
5384 (origin
5385 (method url-fetch)
5386 (uri (pypi-uri "traitlets" version))
5387 (sha256
5388 (base32
ac5e205a 5389 "1xsrwgivpkxlbr4dfndfsi098s29yqgswgjc1qqn69yxklvfw8yh"))))
44d10b1f
RW
5390 (build-system python-build-system)
5391 (arguments
5392 `(#:phases
5393 (modify-phases %standard-phases
5394 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
5395 (propagated-inputs
5396 `(("python-ipython-genutils" ,python-ipython-genutils)
ac5e205a 5397 ("python-decorator" ,python-decorator)))
44d10b1f
RW
5398 (native-inputs
5399 `(("python-pytest" ,python-pytest)))
5400 (properties `((python2-variant . ,(delay python2-traitlets))))
5401 (home-page "https://ipython.org")
5402 (synopsis "Configuration system for Python applications")
5403 (description
5404 "Traitlets is a framework that lets Python classes have attributes with
5405type checking, dynamically calculated default values, and ‘on change’
5406callbacks. The package also includes a mechanism to use traitlets for
5407configuration, loading values from files or from command line arguments. This
5408is a distinct layer on top of traitlets, so you can use traitlets in your code
5409without using the configuration machinery.")
5410 (license license:bsd-3)))
5411
5412(define-public python2-traitlets
5413 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
5414 (package
5415 (inherit traitlets)
5416 (propagated-inputs
5417 `(("python2-enum34" ,python2-enum34)
5418 ,@(package-propagated-inputs traitlets))))))
5419
5420(define-public python-jupyter-core
5421 (package
5422 (name "python-jupyter-core")
5423 (version "4.4.0")
5424 (source
5425 (origin
5426 (method url-fetch)
5427 (uri (string-append (pypi-uri "jupyter_core" version)))
5428 (sha256
5429 (base32
5430 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
5431 (build-system python-build-system)
5432 ;; FIXME: not sure how to run the tests
5433 (arguments `(#:tests? #f))
5434 (propagated-inputs
5435 `(("python-traitlets" ,python-traitlets)))
5436 (home-page "http://jupyter.org/")
5437 (synopsis "Jupyter base package")
5438 (description
5439 "Jupyter core is the base package on which Jupyter projects rely.")
5440 (license license:bsd-3)))
5441
5442(define-public python2-jupyter-core
5443 (package-with-python2 python-jupyter-core))
5444
5445(define-public python-jupyter-client
5446 (package
5447 (name "python-jupyter-client")
5448 (version "5.2.4")
5449 (source
5450 (origin
5451 (method url-fetch)
5452 (uri (pypi-uri "jupyter_client" version))
5453 (sha256
5454 (base32
5455 "0l9mh7ccrpl3lppym3dnky8n1nk7xarzzdcxf4q2s7aw203cpydm"))))
5456 (build-system python-build-system)
5457 ;; Tests fail because of missing native python kernel which I assume is
5458 ;; provided by the ipython package, which we cannot use because it would
5459 ;; cause a dependency cycle.
ddc586ea
LC
5460 (arguments
5461 `(#:tests? #f
5462
5463 #:phases (modify-phases %standard-phases
5464 (add-after 'unpack 'set-tool-file-names
5465 (lambda* (#:key inputs #:allow-other-keys)
5466 (let ((iproute (assoc-ref inputs "iproute")))
5467 (substitute* "jupyter_client/localinterfaces.py"
5468 (("'ip'")
5469 (string-append "'" iproute "/sbin/ip'")))
5470 #t))))))
5471 (inputs
5472 `(("iproute" ,iproute)))
44d10b1f
RW
5473 (propagated-inputs
5474 `(("python-pyzmq" ,python-pyzmq)
5475 ("python-traitlets" ,python-traitlets)
5476 ("python-jupyter-core" ,python-jupyter-core)))
5477 (home-page "http://jupyter.org/")
5478 (synopsis "Jupyter protocol implementation and client libraries")
5479 (description
5480 "The @code{jupyter_client} package contains the reference implementation
5481of the Jupyter protocol. It also provides client and kernel management APIs
5482for working with kernels, and the @code{jupyter kernelspec} entrypoint for
5483installing @code{kernelspec}s for use with Jupyter frontends.")
5484 (license license:bsd-3)))
5485
5486(define-public python2-jupyter-client
5487 (package-with-python2 python-jupyter-client))
5488
5489(define-public python-ipykernel
5490 (package
5491 (name "python-ipykernel")
08d0a355 5492 (version "5.1.3")
44d10b1f
RW
5493 (source
5494 (origin
5495 (method url-fetch)
5496 (uri (pypi-uri "ipykernel" version))
5497 (sha256
08d0a355 5498 (base32 "1a08y677lpn80qzvv7z0smgggmr5m5ayf0bs6vds47xpxl9sss5k"))))
44d10b1f
RW
5499 (build-system python-build-system)
5500 (arguments
5501 `(#:phases
5502 (modify-phases %standard-phases
5503 (replace 'check
5504 (lambda _
5505 (setenv "HOME" "/tmp")
5506 (invoke "pytest" "-v")
aa856d02
LC
5507 #t))
5508 (add-after 'install 'set-python-file-name
5509 (lambda* (#:key outputs #:allow-other-keys)
5510 ;; Record the absolute file name of the 'python' executable in
5511 ;; 'kernel.json'.
5512 (let ((out (assoc-ref outputs "out")))
5513 (substitute* (string-append out "/share/jupyter"
5514 "/kernels/python3/kernel.json")
5515 (("\"python\"")
5516 (string-append "\"" (which "python") "\"")))
5517 #t))))))
44d10b1f
RW
5518 (propagated-inputs
5519 `(("python-ipython" ,python-ipython)
5520 ;; imported at runtime during connect
5521 ("python-jupyter-client" ,python-jupyter-client)))
5522 (native-inputs
08d0a355
TGR
5523 `(("python-flaky" ,python-flaky)
5524 ("python-nose" ,python-nose)
5525 ("python-pytest" ,python-pytest)))
44d10b1f
RW
5526 (home-page "https://ipython.org")
5527 (synopsis "IPython Kernel for Jupyter")
5528 (description
5529 "This package provides the IPython kernel for Jupyter.")
578e4cf4 5530 (properties `((python2-variant . ,(delay python2-ipykernel))))
44d10b1f
RW
5531 (license license:bsd-3)))
5532
578e4cf4 5533;; Version 5.x and above no longer support Python 2.
44d10b1f 5534(define-public python2-ipykernel
0f378947
RW
5535 (package
5536 (name "python2-ipykernel")
578e4cf4 5537 (version "4.10.1")
0f378947
RW
5538 (source
5539 (origin
5540 (method url-fetch)
5541 (uri (pypi-uri "ipykernel" version))
5542 (sha256
578e4cf4 5543 (base32 "1yzmdiy1djsszqp54jzd8ym8h4hpl67zjq83j2kxbkp0rwmlpdzf"))))
0f378947
RW
5544 (build-system python-build-system)
5545 (arguments
578e4cf4 5546 `(#:python ,python-2))
0f378947
RW
5547 (propagated-inputs
5548 `(("python2-ipython" ,python2-ipython)
5549 ;; imported at runtime during connect
578e4cf4
EF
5550 ("python2-jupyter-client" ,python2-jupyter-client)
5551 ("python2-tornado" ,python2-tornado)
5552 ("python2-traitlets" ,python2-traitlets)))
0f378947 5553 (native-inputs
578e4cf4
EF
5554 `(("python2-mock" ,python2-mock)
5555 ("python2-nose" ,python2-nose)
5556 ("python2-pytest" ,python2-pytest)
5557 ("python2-pytest-cov" ,python2-pytest-cov)))
0f378947
RW
5558 (home-page "https://ipython.org")
5559 (synopsis "IPython Kernel for Jupyter")
5560 (description
5561 "This package provides the IPython kernel for Jupyter.")
5562 (license license:bsd-3)))
44d10b1f 5563
966aa714
AE
5564(define-public python-pari-jupyter
5565 (package
5566 (name "python-pari-jupyter")
5567 (version "1.3.2")
5568 (source
5569 (origin
5570 (method url-fetch)
5571 (uri (pypi-uri "pari_jupyter" version))
5572 (sha256
5573 (base32
5574 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
5575 (build-system python-build-system)
5576 (propagated-inputs
5577 `(("python-ipykernel" ,python-ipykernel)))
5578 (inputs
5579 `(("pari-gp" ,pari-gp)
5580 ("readline" ,readline)))
5581 (arguments
5582 `(#:tests? #f)) ; no test suite
5583 (home-page
5584 "https://github.com/jdemeyer/pari_jupyter")
5585 (synopsis "A Jupyter kernel for PARI/GP")
5586 (description "The package provides a PARI/GP kernel for Jupyter.")
5587 (license license:gpl3+)))
5588
dede052a
RW
5589(define-public python-backcall
5590 (package
5591 (name "python-backcall")
5592 (version "0.1.0")
5593 (source
5594 (origin
5595 (method url-fetch)
5596 (uri (pypi-uri "backcall" version))
5597 (sha256
5598 (base32
5599 "1r01dqch3f8fdj3n6fviw8hxqrs6w5v0qw4izmvqzry1w9dxiv1q"))))
5600 (build-system python-build-system)
5601 (home-page "https://github.com/takluyver/backcall/")
5602 (synopsis "Specifications for callback functions passed in to an API")
5603 (description
5604 "If your code lets other people supply callback functions, it's important
5605to specify the function signature you expect, and check that functions support
5606that. Adding extra parameters later would break other peoples code unless
5607you're careful. The @code{backcall} package provides a way of specifying the
5608callback signature using a prototype function.")
5609 (license license:bsd-3)))
5610
8b5f756c
RW
5611(define-public python-ipython
5612 (package
5613 (name "python-ipython")
ee515773 5614 (version "7.9.0")
8b5f756c
RW
5615 (source
5616 (origin
5617 (method url-fetch)
5618 (uri (pypi-uri "ipython" version ".tar.gz"))
5619 (sha256
ee515773 5620 (base32 "103jkw18z7fnwdal1mdbijjxi1fndzn31g887lmj7ddpf2r07lyz"))))
8b5f756c
RW
5621 (build-system python-build-system)
5622 (propagated-inputs
5623 `(("python-backcall" ,python-backcall)
5624 ("python-pyzmq" ,python-pyzmq)
5625 ("python-prompt-toolkit" ,python-prompt-toolkit)
44d10b1f
RW
5626 ("python-terminado" ,python-terminado)
5627 ("python-matplotlib" ,python-matplotlib)
5628 ("python-numpy" ,python-numpy)
5629 ("python-numpydoc" ,python-numpydoc)
8b5f756c 5630 ("python-jedi" ,python-jedi)
44d10b1f
RW
5631 ("python-jinja2" ,python-jinja2)
5632 ("python-mistune" ,python-mistune)
5633 ("python-pexpect" ,python-pexpect)
5634 ("python-pickleshare" ,python-pickleshare)
5635 ("python-simplegeneric" ,python-simplegeneric)
5636 ("python-jsonschema" ,python-jsonschema)
5637 ("python-traitlets" ,python-traitlets)
5638 ("python-nbformat" ,python-nbformat)
5639 ("python-pygments" ,python-pygments)))
5640 (inputs
5641 `(("readline" ,readline)
5642 ("which" ,which)))
5643 (native-inputs
5644 `(("graphviz" ,graphviz)
5645 ("pkg-config" ,pkg-config)
5646 ("python-requests" ,python-requests) ;; for tests
5647 ("python-testpath" ,python-testpath)
8b5f756c 5648 ("python-nose" ,python-nose)))
44d10b1f
RW
5649 (arguments
5650 `(#:phases
5651 (modify-phases %standard-phases
0f272518
RW
5652 (add-after 'unpack 'make-docs-reproducible
5653 (lambda _
5654 (substitute* "IPython/sphinxext/ipython_directive.py"
5655 ((".*import datetime") "")
5656 ((".*datetime.datetime.now\\(\\)") "")
5657 (("%timeit") "# %timeit"))
5658 #t))
44d10b1f
RW
5659 ;; Tests can only be run after the library has been installed and not
5660 ;; within the source directory.
5661 (delete 'check)
5662 (add-after 'install 'check
5663 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5664 (if tests?
5665 (begin
5666 ;; Make installed package available for running the tests
5667 (add-installed-pythonpath inputs outputs)
5668 (setenv "HOME" "/tmp/") ;; required by a test
5669 ;; We only test the core because one of the other tests
5670 ;; tries to import ipykernel.
5671 (invoke "python" "IPython/testing/iptest.py"
5672 "-v" "IPython/core/tests"))
5673 #t)))
5674 (add-before 'check 'fix-tests
5675 (lambda* (#:key inputs #:allow-other-keys)
5676 (substitute* "./IPython/utils/_process_posix.py"
5677 (("/usr/bin/env', 'which") (which "which")))
5678 (substitute* "./IPython/core/tests/test_inputtransformer.py"
5679 (("#!/usr/bin/env python")
5680 (string-append "#!" (which "python"))))
44d10b1f
RW
5681 ;; This test introduces a circular dependency on ipykernel
5682 ;; (which depends on ipython).
5683 (delete-file "IPython/core/tests/test_display.py")
8b5f756c 5684 ;; AttributeError: module 'IPython.core' has no attribute 'formatters'
44d10b1f 5685 (delete-file "IPython/core/tests/test_interactiveshell.py")
44d10b1f
RW
5686 #t)))))
5687 (home-page "https://ipython.org")
5688 (synopsis "IPython is a tool for interactive computing in Python")
5689 (description
5690 "IPython provides a rich architecture for interactive computing with:
5691Powerful interactive shells, a browser-based notebook, support for interactive
5692data visualization, embeddable interpreters and tools for parallel
2bc5d5d5
EF
5693computing.")
5694 (properties `((python2-variant . ,(delay python2-ipython))))
5695 (license license:bsd-3)))
5696
5697;; This is the latest release of the LTS version of ipython with support for
5698;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
5699;; dropped support for Python 2.7.
5700(define-public python2-ipython
5701 (package
5702 (name "python2-ipython")
5703 (version "5.8.0")
5704 (source
5705 (origin
5706 (method url-fetch)
5707 (uri (pypi-uri "ipython" version ".tar.gz"))
5708 (sha256
5709 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
5710 (build-system python-build-system)
5711 (propagated-inputs
5712 `(("python2-backports-shutil-get-terminal-size"
5713 ,python2-backports-shutil-get-terminal-size)
5714 ("python2-pathlib2" ,python2-pathlib2)
5715 ("python2-pyzmq" ,python2-pyzmq)
5716 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
5717 ("python2-terminado" ,python2-terminado)
5718 ("python2-matplotlib" ,python2-matplotlib)
5719 ("python2-numpy" ,python2-numpy)
5720 ("python2-numpydoc" ,python2-numpydoc)
5721 ("python2-jinja2" ,python2-jinja2)
5722 ("python2-mistune" ,python2-mistune)
5723 ("python2-pexpect" ,python2-pexpect)
5724 ("python2-pickleshare" ,python2-pickleshare)
5725 ("python2-simplegeneric" ,python2-simplegeneric)
5726 ("python2-jsonschema" ,python2-jsonschema)
5727 ("python2-traitlets" ,python2-traitlets)
5728 ("python2-nbformat" ,python2-nbformat)
5729 ("python2-pygments" ,python2-pygments)))
5730 (inputs
5731 `(("readline" ,readline)
5732 ("which" ,which)))
5733 (native-inputs
5734 `(("graphviz" ,graphviz)
5735 ("pkg-config" ,pkg-config)
5736 ("python2-requests" ,python2-requests) ;; for tests
5737 ("python2-testpath" ,python2-testpath)
5738 ("python2-mock" ,python2-mock)
5739 ("python2-nose" ,python2-nose)))
5740 (arguments
5741 `(#:python ,python-2
5742 #:phases
5743 (modify-phases %standard-phases
5744 (add-before 'check 'delete-broken-tests
5745 (lambda* (#:key inputs #:allow-other-keys)
5746 ;; These tests throw errors for unknown reasons.
5747 (delete-file "IPython/core/tests/test_profile.py")
5748 (delete-file "IPython/core/tests/test_interactiveshell.py")
5749 (delete-file "IPython/core/tests/test_magic.py")
5750 #t)))))
5751 (home-page "https://ipython.org")
5752 (synopsis "IPython is a tool for interactive computing in Python")
5753 (description
5754 "IPython provides a rich architecture for interactive computing with:
5755Powerful interactive shells, a browser-based notebook, support for interactive
5756data visualization, embeddable interpreters and tools for parallel
44d10b1f 5757computing.")
8b5f756c 5758 (license license:bsd-3)))
44d10b1f 5759
8b5f756c
RW
5760(define-public python-ipython-documentation
5761 (package
5762 (inherit python-ipython)
5763 (name "python-ipython-documentation")
5764 (version (package-version python-ipython))
5765 (arguments
5766 `(#:phases
5767 (modify-phases %standard-phases
5768 (delete 'build)
5769 (delete 'check)
5770 (replace 'install
5771 (lambda* (#:key outputs #:allow-other-keys)
5772 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
5773 (doc (string-append data "/doc/" ,name "-" ,version))
5774 (html (string-append doc "/html"))
5775 (man1 (string-append data "/man/man1"))
5776 (info (string-append data "/info"))
5777 (examples (string-append doc "/examples"))
5778 (python-arg (string-append "PYTHON=" (which "python"))))
5779 (setenv "LANG" "en_US.utf8")
5780 (with-directory-excursion "docs"
5781 ;; FIXME: pdf fails to build
5782 ;;(system* "make" "pdf" "PAPER=a4")
5783 (system* "make" python-arg "html")
5784 ;; FIXME: the generated texi file contains ^@^@, which trips
5785 ;; up the parser.
5786 ;; (system* "make" python-arg "info")
5787 )
5788 (copy-recursively "docs/man" man1)
5789 (copy-recursively "examples" examples)
5790 (copy-recursively "docs/build/html" html)
5791 ;; (copy-file "docs/build/latex/ipython.pdf"
5792 ;; (string-append doc "/ipython.pdf"))
5793 (mkdir-p info)
5794 ;; (copy-file "docs/build/texinfo/ipython.info"
5795 ;; (string-append info "/ipython.info"))
5796 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
5797 #t)))))
5798 (inputs
5799 `(("python-ipython" ,python-ipython)
5800 ("python-ipykernel" ,python-ipykernel)))
5801 (native-inputs
5802 `(("python-sphinx" ,python-sphinx)
5803 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
5804 ;; FIXME: It's possible that a smaller union would work just as well.
f75aa97f 5805 ("texlive" ,(texlive-union (list texlive-amsfonts
8b5f756c
RW
5806 texlive-fonts-ec
5807 texlive-generic-ifxetex
5808 texlive-generic-pdftex
8b5f756c
RW
5809 texlive-latex-capt-of
5810 texlive-latex-cmap
5811 texlive-latex-environ
5812 texlive-latex-eqparbox
5813 texlive-latex-etoolbox
5814 texlive-latex-expdlist
5815 texlive-latex-fancyhdr
5816 texlive-latex-fancyvrb
5817 texlive-latex-fncychap
5818 texlive-latex-float
5819 texlive-latex-framed
5820 texlive-latex-geometry
5821 texlive-latex-graphics
5822 texlive-latex-hyperref
5823 texlive-latex-mdwtools
5824 texlive-latex-multirow
5825 texlive-latex-needspace
5826 texlive-latex-oberdiek
5827 texlive-latex-parskip
5828 texlive-latex-preview
5829 texlive-latex-tabulary
5830 texlive-latex-threeparttable
5831 texlive-latex-titlesec
5832 texlive-latex-trimspaces
5833 texlive-latex-ucs
5834 texlive-latex-upquote
5835 texlive-latex-url
5836 texlive-latex-varwidth
5837 texlive-latex-wrapfig)))
5838 ("texinfo" ,texinfo)))))
44d10b1f
RW
5839
5840(define-public python-urwid
5841 (package
5842 (name "python-urwid")
5843 (version "2.0.1")
5844 (source
5845 (origin
5846 (method url-fetch)
5847 (uri (pypi-uri "urwid" version))
5848 (sha256
5849 (base32
5850 "1g6cpicybvbananpjikmjk8npmjk4xvak1wjzji62wc600wkwkb4"))))
5851 (build-system python-build-system)
5852 (home-page "http://urwid.org")
5853 (synopsis "Console user interface library for Python")
5854 (description
5855 "Urwid is a curses-based UI/widget library for Python. It includes many
5856features useful for text console applications.")
5857 (license license:lgpl2.1+)))
5858
5859(define-public python2-urwid
5860 (package-with-python2 python-urwid))
5861
5862(define-public python-urwidtrees
5863 (package
5864 (name "python-urwidtrees")
5865 (version "1.0.2")
5866 (source
5867 (origin
c8364072 5868 (method git-fetch)
44d10b1f
RW
5869 ;; package author intends on distributing via github rather than pypi:
5870 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
c8364072
EF
5871 (uri (git-reference
5872 (url "https://github.com/pazz/urwidtrees")
5873 (commit version)))
5874 (file-name (git-file-name name version))
44d10b1f
RW
5875 (sha256
5876 (base32
c8364072 5877 "1n1kpidvkdnsqyb82vlvk78gmly96kh8351lqxn2pzgwwns6fml2"))))
44d10b1f
RW
5878 (build-system python-build-system)
5879 (arguments
26bb7fc6
EF
5880 '(#:use-setuptools? #f
5881 #:tests? #f)) ; no tests
44d10b1f
RW
5882 (propagated-inputs `(("python-urwid" ,python-urwid)))
5883 (home-page "https://github.com/pazz/urwidtrees")
5884 (synopsis "Tree widgets for urwid")
5885 (description "Urwidtrees is a Widget Container API for the @code{urwid}
5886toolkit. Use it to build trees of widgets.")
5887 (license license:gpl3+)))
5888
5889(define-public python2-urwidtrees
5890 (package-with-python2 python-urwidtrees))
5891
5892(define-public python-ua-parser
5893 (package
5894 (name "python-ua-parser")
5895 (version "0.8.0")
5896 (source
5897 (origin
5898 (method url-fetch)
5899 (uri (pypi-uri "ua-parser" version))
5900 (sha256
5901 (base32
5902 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
5903 (build-system python-build-system)
5904 (arguments
5905 `(#:tests? #f)) ;no test suite in release
5906 (native-inputs
5907 `(("python-pyyaml" ,python-pyyaml)))
5908 (home-page "https://github.com/ua-parser/uap-python")
5909 (synopsis "User agent parser")
5910 (description
5911 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
5912 (license license:asl2.0)))
5913
5914(define-public python2-ua-parser
5915 (package-with-python2 python-ua-parser))
5916
5917(define-public python-user-agents
5918 (package
5919 (name "python-user-agents")
5920 (version "1.1.0")
5921 (source
5922 (origin
5923 (method url-fetch)
5924 (uri (pypi-uri "user-agents" version))
5925 (sha256
5926 (base32
5927 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
5928 (build-system python-build-system)
5929 (arguments
5930 `(#:tests? #f)) ;missing devices.json test file in release
5931 (propagated-inputs
5932 `(("python-ua-parser" ,python-ua-parser)))
5933 (home-page "https://github.com/selwin/python-user-agents")
5934 (synopsis "User Agent strings parsing library")
5935 (description
5936 "A library to identify devices (phones, tablets) and their capabilities by
5937parsing (browser/HTTP) user agent strings.")
5938 (license license:expat)))
5939
5940(define-public python2-user-agents
5941 (package-with-python2 python-user-agents))
5942
5943(define-public python-dbus
5944 (package
5945 (name "python-dbus")
ba5ef999 5946 (version "1.2.14")
44d10b1f
RW
5947 (source
5948 (origin
5949 (method url-fetch)
5950 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
5951 "dbus-python-" version ".tar.gz"))
5952 (sha256
ba5ef999 5953 (base32 "0cdchkgnivlka4lf8q4qfk0yxq483i3r3aqickjf8hfn7nx0c0mi"))))
44d10b1f 5954 (build-system gnu-build-system)
44d10b1f
RW
5955 (native-inputs
5956 `(("pkg-config" ,pkg-config)))
5957 (inputs
5958 `(("python" ,python-wrapper)
5959 ("dbus-glib" ,dbus-glib)))
5960 (synopsis "Python bindings for D-bus")
5961 (description "python-dbus provides bindings for libdbus, the reference
5962implementation of D-Bus.")
5963 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
5964 (license license:expat)))
5965
5966(define-public python2-dbus
5967 (package (inherit python-dbus)
5968 (name "python2-dbus")
5969 (inputs `(("python" ,python-2)
5970 ,@(alist-delete "python"
5971 (package-inputs python-dbus)
ba5ef999 5972 equal?)))))
44d10b1f 5973
fb236fdd
AG
5974(define-public python-notify2
5975 (package
5976 (name "python-notify2")
5977 (version "0.3.1")
5978 (source
5979 (origin
5980 (method url-fetch)
5981 (uri (pypi-uri "notify2" version))
5982 (sha256
5983 (base32
5984 "0z8rrv9rsg1r2qgh2dxj3dfj5xnki98kgi3w839kqby4a26i1yik"))))
5985 (build-system python-build-system)
5986 (arguments `(#:tests? #f)) ; tests depend on system state
5987 (native-inputs
5988 `(("python-dbus" ,python-dbus)))
5989 (home-page "https://bitbucket.org/takluyver/pynotify2")
5990 (synopsis "Python interface to D-Bus notifications")
5991 (description
5992 "Pynotify2 provides a Python interface for sending D-Bus notifications.
5993It is a reimplementation of pynotify in pure Python, and an alternative to
5994the GObject Introspection bindings to libnotify for non-GTK applications.")
5995 (license (list license:bsd-2
5996 license:lgpl2.1+))))
5997
5998(define-public python2-notify2
5999 (package-with-python2 python-notify2))
6000
44d10b1f
RW
6001;; beautifulsoup4 has a totally different namespace than 3.x,
6002;; and pypi seems to put it under its own name, so I guess we should too
6003(define-public python-beautifulsoup4
6004 (package
6005 (name "python-beautifulsoup4")
abb53e6f 6006 (version "4.7.1")
44d10b1f
RW
6007 (source
6008 (origin
6009 (method url-fetch)
6010 (uri (pypi-uri "beautifulsoup4" version))
6011 (sha256
6012 (base32
abb53e6f 6013 "0j2kycz2dxgx68xzjm7rxg5xn6v61gq5ifvxyg99slmqkybnal4l"))))
44d10b1f
RW
6014 (build-system python-build-system)
6015 (arguments
6016 `(#:phases
6017 (modify-phases %standard-phases
6018 ;; The Python 2 source is the definitive source of beautifulsoup4. We
6019 ;; must use this conversion script when building with Python 3. The
6020 ;; conversion script also runs the tests.
6021 ;; For more information, see the file 'convert-py3k' in the source
6022 ;; distribution.
6023 (replace 'check
dff0197e 6024 (lambda _ (invoke "./convert-py3k"))))))
f83e10e4 6025 (propagated-inputs
abb53e6f 6026 `(("python-soupsieve" ,python-soupsieve)))
44d10b1f
RW
6027 (home-page
6028 "https://www.crummy.com/software/BeautifulSoup/bs4/")
6029 (synopsis
6030 "Python screen-scraping library")
6031 (description
6032 "Beautiful Soup is a Python library designed for rapidly setting up
6033screen-scraping projects. It offers Pythonic idioms for navigating,
6034searching, and modifying a parse tree, providing a toolkit for
6035dissecting a document and extracting what you need. It automatically
6036converts incoming documents to Unicode and outgoing documents to UTF-8.")
6037 (license license:expat)
6038 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
6039
6040(define-public python2-beautifulsoup4
6041 (package
6042 (inherit (package-with-python2
6043 (strip-python2-variant python-beautifulsoup4)))
6044 (arguments `(#:python ,python-2))))
6045
ad74978a
BT
6046(define-public python-soupsieve
6047 (package
6048 (name "python-soupsieve")
3367df31 6049 (version "1.9.5")
ad74978a
BT
6050 (source
6051 (origin
6052 (method url-fetch)
6053 (uri (pypi-uri "soupsieve" version))
6054 (sha256
6055 (base32
3367df31 6056 "1nhd0q0ifwva9wn645s6pn74p1rd97asn3qfg75nphx1wkgcbhg2"))))
ad74978a
BT
6057 (build-system python-build-system)
6058 (arguments `(#:tests? #f))
6059 ;;XXX: 2 tests fail currently despite claming they were to be
6060 ;;skipped. Also, beautifulsoup4 may depend on this in the future, so we
6061 ;;don't want to create a circular dependency.
6062 (home-page "https://github.com/facelessuser/soupsieve")
6063 (synopsis "CSS selector library")
6064 (description
6065 "Soup Sieve is a CSS selector library designed to be used with Beautiful
6066Soup 4. It aims to provide selecting, matching, and filtering using modern
6067CSS selectors. Soup Sieve currently provides selectors from the CSS level 1
6068specifications up through the latest CSS level 4 drafts and beyond (though
6069some are not yet implemented).")
d00b83fb 6070 (properties `((python2-variant . ,(delay python2-soupsieve))))
ad74978a
BT
6071 (license license:expat)))
6072
6073(define-public python2-soupsieve
d00b83fb 6074 (let ((base (package-with-python2 (strip-python2-variant python-soupsieve))))
ad74978a
BT
6075 (package
6076 (inherit base)
6077 (propagated-inputs
d00b83fb
MB
6078 `(("python2-backports-functools-lru-cache"
6079 ,python2-backports-functools-lru-cache)
6080 ,@(package-propagated-inputs base))))))
ad74978a 6081
44d10b1f
RW
6082(define-public python-netifaces
6083 (package
6084 (name "python-netifaces")
6085 (version "0.10.7")
6086 (source
6087 (origin
6088 (method url-fetch)
6089 (uri (pypi-uri "netifaces" version))
6090 (sha256
6091 (base32
6092 "1gccklrcplbbqh81g1mdgpa5y8na7kkf29cq2ka3f5a2fp5hyndx"))))
6093 (build-system python-build-system)
6094 (home-page "https://github.com/al45tair/netifaces")
6095 (synopsis
6096 "Python module for portable network interface information")
6097 (description
6098 "Netifaces is a Python module providing information on network
6099interfaces in an easy and portable manner.")
6100 (license license:expat)))
6101
6102(define-public python2-netifaces
6103 (package-with-python2 python-netifaces))
6104
6105(define-public python-networkx
6106 (package
6107 (name "python-networkx")
6108 (version "2.2")
6109 (source
6110 (origin
6111 (method url-fetch)
6112 (uri (pypi-uri "networkx" version ".zip"))
6113 (sha256
6114 (base32 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
6115 (build-system python-build-system)
6116 ;; python-decorator is needed at runtime.
6117 (propagated-inputs
6118 `(("python-decorator" ,python-decorator)))
6119 (native-inputs
6120 `(("python-nose" ,python-nose)
6121 ("unzip" ,unzip)))
6122 (home-page "https://networkx.github.io/")
6123 (synopsis "Python module for creating and manipulating graphs and networks")
6124 (description
6125 "NetworkX is a Python package for the creation, manipulation, and study
6126of the structure, dynamics, and functions of complex networks.")
6127 (license license:bsd-3)))
6128
6129(define-public python2-networkx
6130 (package-with-python2 python-networkx))
6131
6132(define-public python-datrie
6133 (package
6134 (name "python-datrie")
0b58cb42 6135 (version "0.8")
44d10b1f
RW
6136 (source
6137 (origin
6138 (method url-fetch)
6139 (uri (pypi-uri "datrie" version))
6140 (sha256
6141 (base32
0b58cb42 6142 "0338r8xgmpy78556jhms0h6qkvyjr10p8bpgdvcpqzm9lrmxmmdx"))))
44d10b1f 6143 (build-system python-build-system)
44d10b1f
RW
6144 (native-inputs
6145 `(("python-cython" ,python-cython)
6146 ("python-hypothesis" ,python-hypothesis)
6147 ("python-pytest" ,python-pytest)
6148 ("python-pytest-runner" ,python-pytest-runner)))
6149 (home-page "https://github.com/kmike/datrie")
6150 (synopsis "Fast, efficiently stored trie for Python")
6151 (description
6152 "This package provides a fast, efficiently stored trie implementation for
6153Python.")
6154 (license license:lgpl2.1+)))
6155
6156(define-public snakemake
6157 (package
6158 (name "snakemake")
93803c6b 6159 (version "5.7.1")
44d10b1f
RW
6160 (source
6161 (origin
6162 (method url-fetch)
6163 (uri (pypi-uri "snakemake" version))
6164 (sha256
93803c6b 6165 (base32 "1pnpvvn8n2a78cg360wz3ldmpqrsm2wzi0c0dmvki9fnsw6fxdas"))))
44d10b1f
RW
6166 (build-system python-build-system)
6167 (arguments
6168 ;; TODO: Package missing test dependencies.
6169 '(#:tests? #f
6170 #:phases
6171 (modify-phases %standard-phases
6172 ;; For cluster execution Snakemake will call Python. Since there is
6173 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
6174 ;; this by calling the snakemake wrapper instead.
6175 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
6176 (lambda* (#:key outputs #:allow-other-keys)
6177 (substitute* "snakemake/executors.py"
6178 (("\\{sys.executable\\} -m snakemake")
6179 (string-append (assoc-ref outputs "out")
6180 "/bin/snakemake")))
6181 #t)))))
6182 (propagated-inputs
8994ae34 6183 `(("python-appdirs" ,python-appdirs)
44d10b1f
RW
6184 ("python-configargparse" ,python-configargparse)
6185 ("python-datrie" ,python-datrie)
6186 ("python-docutils" ,python-docutils)
8994ae34 6187 ("python-gitpython" ,python-gitpython)
44d10b1f
RW
6188 ("python-jinja2" ,python-jinja2)
6189 ("python-jsonschema" ,python-jsonschema)
6190 ("python-networkx" ,python-networkx)
93803c6b 6191 ("python-psutil" ,python-psutil)
44d10b1f 6192 ("python-pyyaml" ,python-pyyaml)
8994ae34
TGR
6193 ("python-ratelimiter" ,python-ratelimiter)
6194 ("python-requests" ,python-requests)
6195 ("python-wrapt" ,python-wrapt)))
44d10b1f
RW
6196 (home-page "https://snakemake.readthedocs.io")
6197 (synopsis "Python-based execution environment for make-like workflows")
6198 (description
6199 "Snakemake aims to reduce the complexity of creating workflows by
6200providing a clean and modern domain specific specification language (DSL) in
6201Python style, together with a fast and comfortable execution environment.")
6202 (license license:expat)))
6203
44d10b1f
RW
6204(define-public python-pyqrcode
6205 (package
6206 (name "python-pyqrcode")
6207 (version "1.2.1")
6208 (source
6209 (origin
6210 (method url-fetch)
6211 (uri (pypi-uri "PyQRCode" version))
6212 (sha256
6213 (base32
6214 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
6215 (build-system python-build-system)
6216 (home-page
6217 "https://github.com/mnooner256/pyqrcode")
6218 (synopsis "QR code generator")
6219 (description
6220 "Pyqrcode is a QR code generator written purely in Python with
6221SVG, EPS, PNG and terminal output.")
6222 (license license:bsd-3)))
6223
6224(define-public python-seaborn
6225 (package
6226 (name "python-seaborn")
6227 (version "0.9.0")
6228 (source
6229 (origin
6230 (method url-fetch)
6231 (uri (pypi-uri "seaborn" version))
6232 (sha256
f9bd82e7
RW
6233 (base32 "0bqysi3fxfjl1866m5jq8z7mynhqbqnikim74dmzn8539iwkzj3n"))
6234 (patches
6235 (list (origin
6236 (method url-fetch)
6237 ;; This has already been merged, but there is no new
6238 ;; release including this patch. It fixes problems
6239 ;; with axis rotation that would lead to test
6240 ;; failures.
6241 (uri "https://patch-diff.githubusercontent.com/raw/mwaskom/seaborn/pull/1716.diff")
6242 (sha256
6243 (base32
6244 "1lm870z316n9ivsyr86hpk1gxaraw0mrjvq42lqsm0znhjdp9q9w"))
6245 (file-name "seaborn-0.9.0-axis-rotation.patch"))))))
44d10b1f
RW
6246 (build-system python-build-system)
6247 (arguments
6248 `(#:phases
6249 (modify-phases %standard-phases
6250 (add-before 'check 'start-xserver
6251 (lambda* (#:key inputs #:allow-other-keys)
6252 (let ((xorg-server (assoc-ref inputs "xorg-server")))
6253 ;; There must be a running X server and make check doesn't
6254 ;; start one. Therefore we must do it.
6255 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
6256 (setenv "DISPLAY" ":1")
6257 #t)))
a1322765
RW
6258 (add-after 'unpack 'fix-tests
6259 (lambda _
6260 ;; test_cbar_ticks fails probably because of matplotlib's
6261 ;; expectation of using an older version of FreeType.
6262 (delete-file "seaborn/tests/test_matrix.py")
6263 #t))
44d10b1f
RW
6264 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
6265 (propagated-inputs
6266 `(("python-pandas" ,python-pandas)
6267 ("python-matplotlib" ,python-matplotlib)
6268 ("python-numpy" ,python-numpy)
6269 ("python-scipy" ,python-scipy)))
6270 (native-inputs
6271 `(("python-pytest" ,python-pytest)
ff337525 6272 ("xorg-server" ,xorg-server-for-tests)))
d3d73bd6 6273 (home-page "https://seaborn.pydata.org/")
44d10b1f
RW
6274 (synopsis "Statistical data visualization")
6275 (description
6276 "Seaborn is a library for making attractive and informative statistical
6277graphics in Python. It is built on top of matplotlib and tightly integrated
6278with the PyData stack, including support for numpy and pandas data structures
6279and statistical routines from scipy and statsmodels.")
6280 (license license:bsd-3)))
6281
6282(define-public python2-seaborn
6283 (package-with-python2 python-seaborn))
6284
6285(define-public python-mpmath
6286 (package
6287 (name "python-mpmath")
6288 (version "0.19")
6289 (source (origin
6290 (method url-fetch)
6291 (uri (string-append "http://mpmath.org/files/mpmath-"
6292 version ".tar.gz"))
6293 (sha256
6294 (base32
6295 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
6296 (build-system python-build-system)
6297 (arguments
6298 '(#:phases
6299 (modify-phases %standard-phases
6300 (replace 'check
6301 (lambda _
5d7a6f1c 6302 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
44d10b1f
RW
6303 (home-page "http://mpmath.org")
6304 (synopsis "Arbitrary-precision floating-point arithmetic in python")
6305 (description
6306 "@code{mpmath} can be used as an arbitrary-precision substitute for
6307Python's float/complex types and math/cmath modules, but also does much
6308more advanced mathematics.")
6309 (license license:bsd-3)))
6310
6311(define-public python2-mpmath
6312 (package-with-python2 python-mpmath))
6313
6314(define-public python-bigfloat
6315 (package
6316 (name "python-bigfloat")
6317 (version "0.3.0")
6318 (source
6319 (origin
6320 (method url-fetch)
6321 (uri (pypi-uri "bigfloat" version))
6322 (sha256
6323 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
6324 (build-system python-build-system)
6325 (inputs
6326 `(("mpfr" ,mpfr)))
6327 (home-page "https://github.com/mdickinson/bigfloat")
6328 (synopsis "Arbitrary precision floating-point arithmetic for Python")
6329 (description
e36de31b 6330 "This package provides a Python interface to the MPFR library for
44d10b1f
RW
6331multiprecision arithmetic.")
6332 (license license:lgpl3+)))
6333
6334(define-public python2-bigfloat
6335 (package-with-python2 python-bigfloat))
6336
6337(define-public python-sympy
6338 (package
6339 (name "python-sympy")
6340 (version "1.1.1")
6341 (source
6342 (origin
6343 (method url-fetch)
6344 (uri (string-append
6345 "https://github.com/sympy/sympy/releases/download/sympy-"
6346 version "/sympy-" version ".tar.gz"))
6347 (sha256
6348 (base32 "190n29sppw7g8ihilc5451y7jlfcaw56crqiqbf1jff43dlmfnxc"))))
6349 (build-system python-build-system)
6350 (arguments
6351 `(#:phases
6352 (modify-phases %standard-phases
6353 ;; Run the core tests after installation. By default it would run
6354 ;; *all* tests, which take a very long time to complete and are known
6355 ;; to be flaky.
6356 (delete 'check)
6357 (add-after 'install 'check
6358 (lambda* (#:key outputs #:allow-other-keys)
6359 (invoke "python3" "-c" "import sympy; sympy.test(\"/core\")")
6360 #t)))))
6361 (propagated-inputs
6362 `(("python-mpmath" ,python-mpmath)))
2f35985c 6363 (home-page "https://www.sympy.org/")
44d10b1f
RW
6364 (synopsis "Python library for symbolic mathematics")
6365 (description
6366 "SymPy is a Python library for symbolic mathematics. It aims to become a
6367full-featured computer algebra system (CAS) while keeping the code as simple
6368as possible in order to be comprehensible and easily extensible.")
6369 (license license:bsd-3)))
6370
6371(define-public python2-sympy
6372 (package
6373 (inherit (package-with-python2 python-sympy))
6374 (arguments
6375 `(#:phases
6376 (modify-phases %standard-phases
6377 ;; Run the core tests after installation. By default it would run
6378 ;; *all* tests, which take a very long time to complete and are known
6379 ;; to be flaky.
6380 (delete 'check)
6381 (add-after 'install 'check
6382 (lambda* (#:key outputs #:allow-other-keys)
6383 (invoke "python" "-c" "import sympy; sympy.test(\"/core\")")
6384 #t)))))))
6385
6386(define-public python-q
6387 (package
6388 (name "python-q")
6389 (version "2.6")
6390 (source
6391 (origin
6392 (method url-fetch)
6393 (uri (pypi-uri "q" version))
6394 (sha256
6395 (base32
6396 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
6397 (build-system python-build-system)
6398 (home-page "https://github.com/zestyping/q")
6399 (synopsis "Quick-and-dirty debugging output for tired programmers")
6400 (description
6401 "q is a Python module for \"print\" style of debugging Python code. It
6402provides convenient short API for print out of values, tracebacks, and
6403falling into the Python interpreter.")
6404 (license license:asl2.0)))
6405
6406(define-public python2-q
6407 (package-with-python2 python-q))
6408
6409(define-public python2-xlib
6410 (package
6411 (name "python2-xlib")
6412 (version "0.14")
6413 (source (origin
6414 (method url-fetch)
6415 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
6416 "/" version "/"
6417 "python-xlib-" version ".tar.gz"))
6418 (sha256
6419 (base32
6420 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
6421 (build-system python-build-system)
6422 (arguments
6423 `(#:python ,python-2 ;Python 2 only
6424 #:tests? #f)) ;no tests
6425 (home-page "http://python-xlib.sourceforge.net/")
6426 (synopsis "Python X11 client library")
6427 (description
6428 "The Python X Library is intended to be a fully functional X client
6429library for Python programs. It is useful to implement low-level X clients.
6430It is written entirely in Python.")
6431 (license license:gpl2+)))
6432
6433(define-public python-singledispatch
6434 (package
6435 (name "python-singledispatch")
6436 (version "3.4.0.3")
6437 (source
6438 (origin
6439 (method url-fetch)
6440 (uri (pypi-uri "singledispatch" version))
6441 (sha256
6442 (base32
6443 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
6444 (build-system python-build-system)
6445 (native-inputs
6446 `(("python-six" ,python-six))) ; required for conversion, not at run-time
6447 (home-page
8680eff3 6448 "https://docs.python.org/3/library/functools.html#functools.singledispatch")
44d10b1f
RW
6449 (synopsis "Backport of singledispatch feature from Python 3.4")
6450 (description
6451 "This library brings functools.singledispatch from Python 3.4 to Python
64522.6-3.3.")
6453 (license license:expat)))
6454
6455(define-public python2-singledispatch
6456 (package-with-python2 python-singledispatch))
6457
6458;; the python- version can be removed with python-3.5
6459(define-public python-backports-abc
6460 (package
6461 (name "python-backports-abc")
6462 (version "0.5")
6463 (source
6464 (origin
6465 (method url-fetch)
6466 (uri (pypi-uri "backports_abc" version))
6467 (sha256
6468 (base32
6469 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
6470 (build-system python-build-system)
6471 (home-page "https://github.com/cython/backports_abc")
6472 (synopsis "Backport of additions to the 'collections.abc' module")
6473 (description
6474 "Python-backports-abc provides a backport of additions to the
36a4366d 6475@code{collections.abc} module in Python-3.5.")
44d10b1f
RW
6476 (license license:psfl)))
6477
6478(define-public python2-backports-abc
6479 (package-with-python2 python-backports-abc))
6480
6481(define-public python-backports-csv
6482 (package
6483 (name "python-backports-csv")
6484 (version "1.0.5")
6485 (source
6486 (origin
6487 (method url-fetch)
6488 (uri (pypi-uri "backports.csv" version))
6489 (sha256
6490 (base32
6491 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
6492 (build-system python-build-system)
6493 (home-page "https://github.com/ryanhiebert/backports.csv")
6494 (synopsis "Backport of Python 3's csv module for Python 2")
6495 (description
6496 "Provides a backport of Python 3's @code{csv} module for parsing
6497comma separated values. The API of the @code{csv} module in Python 2
6498is drastically different from the @code{csv} module in Python 3.
6499This is due, for the most part, to the difference between str in
6500Python 2 and Python 3.")
6501 (license license:psfl)))
6502
6503(define-public python2-backports-csv
6504 (package-with-python2 python-backports-csv))
6505
6506(define-public python2-backports-shutil-get-terminal-size
6507 (package
6508 (name "python2-backports-shutil-get-terminal-size")
6509 (version "1.0.0")
6510 (source
6511 (origin
6512 (method url-fetch)
6513 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
6514 (sha256
6515 (base32
6516 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
6517 (build-system python-build-system)
6518 (arguments
6519 `(#:python ,python-2
6520 #:phases
6521 (modify-phases %standard-phases
6522 (replace 'check
6523 (lambda _
4a4a7d9a 6524 (invoke "py.test" "-v"))))))
44d10b1f
RW
6525 (native-inputs
6526 `(("python2-pytest" ,python2-pytest)))
6527 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
6528 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
6529 (description
6530 "This package provides a backport of the @code{get_terminal_size
6531function} from Python 3.3's @code{shutil}.
6532Unlike the original version it is written in pure Python rather than C,
6533so it might be a tiny bit slower.")
6534 (license license:expat)))
6535
6536(define-public python-waf
6537 (package
6538 (name "python-waf")
6c2c11fa 6539 (version "2.0.19")
44d10b1f
RW
6540 (source (origin
6541 (method url-fetch)
6542 (uri (string-append "https://waf.io/"
6543 "waf-" version ".tar.bz2"))
6544 (sha256
6545 (base32
6c2c11fa 6546 "19dvqbsvxz7ch03dh1v0znklrwxlz6yzddc3k9smzrrgny4jch6q"))))
44d10b1f
RW
6547 (build-system python-build-system)
6548 (arguments
6549 '(#:phases
6550 (modify-phases %standard-phases
6551 (replace 'build
6552 (lambda _
633c8b71
MO
6553 ;; XXX: Find a way to add all extra tools.
6554 (let ((tools '("gccdeps"
6555 "clang_compilation_database")))
6556 (invoke "python" "waf-light" "configure" "build"
6557 (string-append "--tools="
6558 (string-join tools ","))))))
44d10b1f
RW
6559 (replace 'check
6560 (lambda _
6561 (invoke "python" "waf" "--version")))
6562 (replace 'install
6563 (lambda* (#:key outputs #:allow-other-keys)
6564 (let ((out (assoc-ref outputs "out")))
6565 (install-file "waf" (string-append out "/bin")))
6566 #t))
6567 ;; waf breaks when it is wrapped.
6568 (delete 'wrap))))
6569 (home-page "https://waf.io/")
6570 (synopsis "Python-based build system")
6571 (description
6572 "Waf is a Python-based framework for configuring, compiling and installing
6573applications.")
6574 (license license:bsd-3)))
6575
6576(define-public python2-waf
6577 (package-with-python2 python-waf))
6578
6579(define-public python-pyzmq
6580 (package
6581 (name "python-pyzmq")
6582 (version "17.1.2")
6583 (source
6584 (origin
6585 (method url-fetch)
6586 (uri (pypi-uri "pyzmq" version))
6587 (sha256
6588 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
6589 (build-system python-build-system)
6590 (arguments
6591 `(#:configure-flags
6592 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
6593 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
6594 ;; --inplace' for 'python setup.py test' to work.
6595 #:tests? #f))
6596 (inputs
6597 `(("zeromq" ,zeromq)))
6598 (native-inputs
6599 `(("pkg-config" ,pkg-config)
6600 ("python-nose" ,python-nose)))
6601 (home-page "https://github.com/zeromq/pyzmq")
6602 (synopsis "Python bindings for 0MQ")
6603 (description
6604 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
6605 (license license:bsd-4)))
6606
6607(define-public python2-pyzmq
6608 (package-with-python2 python-pyzmq))
6609
6610(define-public python-pep8
6611 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
6612 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
6613 ;; some dependents' test suites, and nothing more.
6614 (package
6615 (name "python-pep8")
6616 (version "1.7.0")
6617 (source
6618 (origin
6619 (method url-fetch)
6620 (uri (pypi-uri "pep8" version))
6621 (sha256
6622 (base32
2be878d8
CB
6623 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))
6624 (patches (search-patches "python-pep8-stdlib-tokenize-compat.patch"))))
44d10b1f
RW
6625 (build-system python-build-system)
6626 (home-page "https://pep8.readthedocs.org/")
6627 (synopsis "Python style guide checker")
6628 (description
6629 "This tools checks Python code against some of the style conventions in
6630PEP 8.")
6631 (license license:expat)))
6632
6633(define-public python2-pep8
6634 (package-with-python2 python-pep8))
6635
6636(define-public python-pyflakes
6637 (package
6638 (name "python-pyflakes")
d0cba11b 6639 (version "2.1.1")
44d10b1f
RW
6640 (source
6641 (origin
6642 (method url-fetch)
6643 (uri (pypi-uri "pyflakes" version))
6644 (sha256
6645 (base32
d0cba11b 6646 "18pq95a1xj2dgdd0m85gyfsn40jajj4xc3lp8wfv7igqhrc86xnr"))))
44d10b1f
RW
6647 (build-system python-build-system)
6648 (home-page
6649 "https://github.com/pyflakes/pyflakes")
6650 (synopsis "Passive checker of Python programs")
6651 (description
6652 "Pyflakes statically checks Python source code for common errors.")
6653 (license license:expat)))
6654
6655(define-public python2-pyflakes
6656 (package-with-python2 python-pyflakes))
6657
6658(define-public python-mccabe
6659 (package
6660 (name "python-mccabe")
6661 (version "0.6.1")
6662 (source
6663 (origin
6664 (method url-fetch)
6665 (uri (pypi-uri "mccabe" version))
6666 (sha256
6667 (base32
6668 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
6669 (build-system python-build-system)
6670 (native-inputs
6671 `(("python-pytest" ,python-pytest-bootstrap)
6672 ("python-pytest-runner" ,python-pytest-runner)))
6673 (home-page "https://github.com/flintwork/mccabe")
6674 (synopsis "McCabe checker, plugin for flake8")
6675 (description
6676 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
6677complexity of Python source code.")
6678 (license license:expat)))
6679
6680(define-public python2-mccabe
6681 (package-with-python2 python-mccabe))
6682
6683(define-public python-mccabe-0.2.1
6684 (package (inherit python-mccabe)
6685 (version "0.2.1")
6686 (source
6687 (origin
6688 (method url-fetch)
6689 (uri (pypi-uri "mccabe" version))
6690 (sha256
6691 (base32
6692 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
6693
6694(define-public python2-mccabe-0.2.1
6695 (package-with-python2 python-mccabe-0.2.1))
6696
6697;; Flake8 2.4.1 requires an older version of pep8.
6698;; This should be removed ASAP.
6699(define-public python-pep8-1.5.7
6700 (package (inherit python-pep8)
6701 (version "1.5.7")
6702 (source
f3576970
RW
6703 (origin
6704 (method url-fetch)
6705 (uri (pypi-uri "pep8" version))
6706 (sha256
6707 (base32
6708 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
44d10b1f
RW
6709 (arguments
6710 ;; XXX Tests not compatible with Python 3.5.
6711 '(#:tests? #f))))
6712
6713(define-public python2-pep8-1.5.7
6714 (package-with-python2 python-pep8-1.5.7))
6715
6716;; Flake8 2.4.1 requires an older version of pyflakes.
6717;; This should be removed ASAP.
6718(define-public python-pyflakes-0.8.1
6719 (package (inherit python-pyflakes)
6720 (version "0.8.1")
6721 (source
8c4dffb5
RW
6722 (origin
6723 (method url-fetch)
6724 (uri (pypi-uri "pyflakes" version))
6725 (sha256
6726 (base32
6727 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
44d10b1f
RW
6728 (arguments
6729 ;; XXX Tests not compatible with Python 3.5.
6730 '(#:tests? #f))))
6731
6732(define-public python2-pyflakes-0.8.1
6733 (package-with-python2 python-pyflakes-0.8.1))
6734
ac63cf0a 6735(define-public python-flake8
44d10b1f
RW
6736 (package
6737 (name "python-flake8")
beaff4a8 6738 (version "3.7.7")
ac63cf0a
MB
6739 (source (origin
6740 (method url-fetch)
6741 (uri (pypi-uri "flake8" version))
6742 (sha256
6743 (base32
beaff4a8 6744 "0qg6zggqigrd4k3gv88shd1a27d0cwgfql8vfiq2c7rl7w3rd6c5"))))
44d10b1f
RW
6745 (build-system python-build-system)
6746 (arguments
6747 `(#:phases
6748 (modify-phases %standard-phases
44d10b1f
RW
6749 (delete 'check)
6750 (add-after 'install 'check
6751 (lambda* (#:key inputs outputs #:allow-other-keys)
6752 (add-installed-pythonpath inputs outputs)
6753 (invoke "pytest" "-v")
6754 #t)))))
6755 (propagated-inputs
6756 `(("python-pycodestyle" ,python-pycodestyle)
beaff4a8 6757 ("python-entrypoints" ,python-entrypoints)
44d10b1f
RW
6758 ("python-pyflakes" ,python-pyflakes)
6759 ("python-mccabe" ,python-mccabe)))
6760 (native-inputs
6761 `(("python-mock" ,python-mock)
6762 ("python-pytest" ,python-pytest-bootstrap)
6763 ("python-pytest-runner" ,python-pytest-runner)))
6764 (home-page "https://gitlab.com/pycqa/flake8")
6765 (synopsis
6766 "The modular source code checker: pep8, pyflakes and co")
6767 (description
6768 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
ac63cf0a 6769 (properties `((python2-variant . ,(delay python2-flake8))))
44d10b1f
RW
6770 (license license:expat)))
6771
ac63cf0a
MB
6772(define-public python2-flake8
6773 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
44d10b1f
RW
6774 (package (inherit base)
6775 (propagated-inputs
6776 `(("python2-configparser" ,python2-configparser)
6777 ("python2-enum34" ,python2-enum34)
beaff4a8 6778 ("python2-typing" ,python2-typing)
44d10b1f
RW
6779 ,@(package-propagated-inputs base))))))
6780
44d10b1f
RW
6781;; python-hacking requires flake8 <2.6.0.
6782(define-public python-flake8-2.5
6783 (package
6784 (inherit python-flake8)
6785 (version "2.5.5")
6786 (source (origin
6787 (method url-fetch)
6788 (uri (pypi-uri "flake8" version))
6789 (sha256
6790 (base32
6791 "1snylqwbmrylbx3r1wpz8ggk98f6bcag4441ag8mm2l7wyn58sij"))))
6792 (propagated-inputs
6793 `(("python-pep8" ,python-pep8)
6794 ,@(package-propagated-inputs python-flake8)))
6795 (properties `((python2-variant . ,(delay python2-flake8-2.5))))))
6796
6797(define-public python2-flake8-2.5
6798 (package
6799 (inherit python2-flake8)
6800 (version (package-version python-flake8-2.5))
6801 (source (origin
6802 (inherit (package-source python-flake8-2.5))))
6803 (propagated-inputs
6804 `(("python2-pep8" ,python2-pep8)
6805 ,@(package-propagated-inputs python2-flake8)))))
6806
6807(define-public python-flake8-polyfill
6808 (package
6809 (name "python-flake8-polyfill")
6810 (version "1.0.2")
6811 (source
6812 (origin
6813 (method url-fetch)
6814 (uri (pypi-uri "flake8-polyfill" version))
6815 (sha256
6816 (base32
6817 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
6818 (build-system python-build-system)
6819 (arguments
6820 '(#:phases
6821 (modify-phases %standard-phases
6822 (replace 'check
6823 (lambda _
40a7153d
MB
6824 ;; Be compatible with Pytest 4:
6825 ;; https://gitlab.com/pycqa/flake8-polyfill/merge_requests/7
6826 (substitute* "setup.cfg"
6827 (("\\[pytest\\]")
6828 "[tool:pytest]"))
6829
44d10b1f
RW
6830 (setenv "PYTHONPATH"
6831 (string-append (getcwd) "/build/lib:"
6832 (getenv "PYTHONPATH")))
4f0a0894 6833 (invoke "py.test" "-v"))))))
44d10b1f
RW
6834 (native-inputs
6835 `(("python-flake8" ,python-flake8)
6836 ("python-mock" ,python-mock)
6837 ("python-pep8" ,python-pep8)
6838 ("python-pycodestyle" ,python-pycodestyle)
6839 ("python-pytest" ,python-pytest)))
6840 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
6841 (synopsis "Polyfill package for Flake8 plugins")
6842 (description
6843 "This package that provides some compatibility helpers for Flake8
6844plugins that intend to support Flake8 2.x and 3.x simultaneously.")
6845 (license license:expat)))
6846
6847(define-public python2-flake8-polyfill
6848 (package-with-python2 python-flake8-polyfill))
6849
6850(define-public python-mistune
6851 (package
6852 (name "python-mistune")
6853 (version "0.8.4")
6854 (source
6855 (origin
6856 (method url-fetch)
6857 (uri (pypi-uri "mistune" version))
6858 (sha256
6859 (base32
6860 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
6861 (build-system python-build-system)
6862 (native-inputs
6863 `(("python-nose" ,python-nose)
6864 ("python-cython" ,python-cython)))
6865 (home-page "https://github.com/lepture/mistune")
6866 (synopsis "Markdown parser in pure Python")
6867 (description "This package provides a fast markdown parser in pure
6868Python.")
6869 (license license:bsd-3)))
6870
6871(define-public python2-mistune
6872 (package-with-python2 python-mistune))
6873
6874(define-public python-markdown
6875 (package
6876 (name "python-markdown")
0d1d0a6e 6877 (version "3.2.1")
44d10b1f
RW
6878 (source
6879 (origin
6880 (method url-fetch)
6881 (uri (pypi-uri "Markdown" version))
6882 (sha256
6883 (base32
0d1d0a6e 6884 "00k91gwhxnm8jdnm2v5xjz9irj6dbi7afywz2hpakqdbxs1ydzlh"))))
44d10b1f
RW
6885 (build-system python-build-system)
6886 (native-inputs
6887 `(("python-nose" ,python-nose)
6888 ("python-pyyaml" ,python-pyyaml)))
6889 (home-page "https://python-markdown.github.io/")
6890 (synopsis "Python implementation of Markdown")
6891 (description
6892 "This package provides a Python implementation of John Gruber's
6893Markdown. The library features international input, various Markdown
6894extensions, and several HTML output formats. A command line wrapper
6895markdown_py is also provided to convert Markdown files to HTML.")
2537ce68 6896 (properties `((python2-variant . ,(delay python2-markdown))))
44d10b1f
RW
6897 (license license:bsd-3)))
6898
2537ce68 6899;; Markdown 3.2 dropped support for Python 2.
44d10b1f 6900(define-public python2-markdown
2537ce68
MB
6901 (let ((base (package-with-python2 (strip-python2-variant python-markdown))))
6902 (package/inherit
6903 base
6904 (version "3.1.1")
6905 (source (origin
6906 (method url-fetch)
6907 (uri (pypi-uri "Markdown" version))
6908 (sha256
6909 (base32
6910 "0yhylk4ffqqs7x086fav4pnfsl1021v7lghznzkififprmmqfl1f")))))))
44d10b1f
RW
6911
6912(define-public python-ptyprocess
6913 (package
6914 (name "python-ptyprocess")
6915 (version "0.5.2")
6916 (source
6917 (origin
6918 (method url-fetch)
6919 (uri (pypi-uri "ptyprocess" version))
6920 (sha256
6921 (base32
6922 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
6923 (build-system python-build-system)
6924 (native-inputs
6925 `(("python-nose" ,python-nose)))
6926 (arguments
6927 `(#:phases
6928 (modify-phases %standard-phases
6929 (replace 'check
7904d6fa 6930 (lambda _ (invoke "nosetests"))))))
44d10b1f
RW
6931 (home-page "https://github.com/pexpect/ptyprocess")
6932 (synopsis "Run a subprocess in a pseudo terminal")
6933 (description
6934 "This package provides a Python library used to launch a subprocess in a
6935pseudo terminal (pty), and interact with both the process and its pty.")
6936 (license license:isc)))
6937
6938(define-public python2-ptyprocess
6939 (package-with-python2 python-ptyprocess))
6940
6941(define-public python-cram
6942 (package
6943 (name "python-cram")
6944 (version "0.7")
6945 (home-page "https://bitheap.org/cram/")
6946 (source (origin
6947 (method url-fetch)
6948 (uri (list (string-append home-page "cram-"
6949 version ".tar.gz")
6950 (pypi-uri "cram" version)))
6951 (sha256
6952 (base32
6953 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
6954 (arguments
6955 '(#:phases
6956 (modify-phases %standard-phases
6957 (add-after 'unpack 'patch-source
6958 (lambda _
6959 (substitute* (find-files "cram" ".*\\.py$")
6960 ;; Replace default shell path.
6961 (("/bin/sh") (which "sh")))
6962 (substitute* (find-files "tests" ".*\\.t$")
6963 (("md5") "md5sum")
6964 (("/bin/bash") (which "bash"))
6965 (("/bin/sh") (which "sh")))
6966 (substitute* "cram/_test.py"
6967 ;; This hack works around a bug triggered by substituting
6968 ;; the /bin/sh paths. "tests/usage.t" compares the output of
6969 ;; "cram -h", which breaks the output at 80 characters. This
6970 ;; causes the line showing the default shell to break into two
6971 ;; lines, but the test expects a single line...
6972 (("env\\['COLUMNS'\\] = '80'")
6973 "env['COLUMNS'] = '160'"))
ff1e80d7
MB
6974
6975 (substitute* "Makefile"
6976 ;; Recent versions of python-coverage have caused the test
6977 ;; coverage to decrease (as of version 0.7). Allow that.
6978 (("--fail-under=100")
6979 "--fail-under=90"))
6980
44d10b1f 6981 #t))
ff1e80d7 6982 (replace 'check
44d10b1f 6983 ;; The test phase uses the built library and executable.
44d10b1f
RW
6984 (lambda* (#:key inputs outputs #:allow-other-keys)
6985 (add-installed-pythonpath inputs outputs)
6986 (setenv "PATH" (string-append (getenv "PATH") ":"
6987 (assoc-ref outputs "out") "/bin"))
2d7db192 6988 (invoke "make" "test"))))))
44d10b1f
RW
6989 (build-system python-build-system)
6990 (native-inputs
6991 `(("python-coverage" ,python-coverage)
6992 ("which" ,which)))
6993 (synopsis "Simple testing framework for command line applications")
6994 (description
6995 "Cram is a functional testing framework for command line applications.
6996Cram tests look like snippets of interactive shell sessions. Cram runs each
6997command and compares the command output in the test with the command’s actual
6998output.")
6999 (license license:gpl2+)))
7000
7001(define-public python2-cram
7002 (package-with-python2 python-cram))
7003
7004(define-public python-straight-plugin
7005 (package
7006 (name "python-straight-plugin")
7007 (version "1.4.1")
7008 (source
7009 (origin
7010 (method url-fetch)
7011 (uri (pypi-uri "straight.plugin" version))
7012 (sha256
7013 (base32
7014 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
7015 (build-system python-build-system)
7016 (home-page "https://github.com/ironfroggy/straight.plugin")
7017 (synopsis "Simple namespaced plugin facility")
7018 (description "Straight Plugin provides a type of plugin you can create from
7019almost any existing Python modules, and an easy way for outside developers to
7020add functionality and customization to your projects with their own plugins.")
7021 (license license:expat)))
7022
7023(define-public python2-straight-plugin
7024 (package-with-python2 python-straight-plugin))
7025
7026(define-public python-fonttools
7027 (package
7028 (name "python-fonttools")
1a4bb420 7029 (version "3.38.0")
44d10b1f
RW
7030 (source (origin
7031 (method url-fetch)
7032 (uri (pypi-uri "fonttools" version ".zip"))
7033 (sha256
7034 (base32
1a4bb420 7035 "12ripk3s7skgxr1bs9r8n13r94ym3s8iir7ivfixls9fa4dabmlh"))))
44d10b1f
RW
7036 (build-system python-build-system)
7037 (native-inputs
7038 `(("unzip" ,unzip)
7039 ("python-pytest" ,python-pytest)
7040 ("python-pytest-runner" ,python-pytest-runner)))
9d25a454 7041 (home-page "https://github.com/fonttools/fonttools")
44d10b1f
RW
7042 (synopsis "Tools to manipulate font files")
7043 (description
7044 "FontTools/TTX is a library to manipulate font files from Python. It
7045supports reading and writing of TrueType/OpenType fonts, reading and writing
7046of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
7047also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
7048from an XML-based format.")
7049 (license license:expat)))
7050
7051(define-public python2-fonttools
7052 (package-with-python2 python-fonttools))
7053
7054(define-public python-ly
7055 (package
7056 (name "python-ly")
7057 (version "0.9.5")
7058 (source
7059 (origin
7060 (method url-fetch)
7061 (uri (pypi-uri name version))
7062 (sha256
7063 (base32
7064 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
7065 (build-system python-build-system)
7066 (arguments
7067 ;; FIXME: Some tests need network access.
7068 '(#:tests? #f))
7069 (synopsis "Tool and library for manipulating LilyPond files")
7070 (description "This package provides a Python library to parse, manipulate
7071or create documents in LilyPond format. A command line program ly is also
7072provided that can be used to do various manipulations with LilyPond files.")
e85af137 7073 (home-page "https://pypi.org/project/python-ly/")
44d10b1f
RW
7074 (license license:gpl2+)))
7075
7076(define-public python-appdirs
7077 (package
7078 (name "python-appdirs")
7079 (version "1.4.3")
7080 (source
7081 (origin
7082 (method url-fetch)
7083 (uri (pypi-uri "appdirs" version))
7084 (sha256
7085 (base32
7086 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
7087 (build-system python-build-system)
7088 (home-page "https://github.com/ActiveState/appdirs")
7089 (synopsis
7090 "Determine platform-specific dirs, e.g. a \"user data dir\"")
7091 (description
7092 "This module provides a portable way of finding out where user data
7093should be stored on various operating systems.")
7094 (license license:expat)))
7095
7096(define-public python2-appdirs
7097 (package-with-python2 python-appdirs))
7098
7099(define-public python-llfuse
7100 (package
7101 (name "python-llfuse")
7102 (version "1.3.5")
7103 (source (origin
7104 (method url-fetch)
7105 (uri (pypi-uri "llfuse" version ".tar.bz2"))
7106 (sha256
7107 (base32
7108 "1n7a90jww3ly49fm7x27m3xw3la3qfrnykcakga654g6kcyjlhbf"))))
7109 (build-system python-build-system)
7110 (inputs
7111 `(("fuse" ,fuse)
7112 ("attr" ,attr)))
7113 (native-inputs
7114 `(("pkg-config" ,pkg-config)))
7115 (synopsis "Python bindings for FUSE")
7116 (description
7117 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
7118 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
7119 (license license:lgpl2.0+)
7120 (properties `((python2-variant . ,(delay python2-llfuse))))))
7121
7122(define-public python2-llfuse
7123 (package (inherit (package-with-python2
7124 (strip-python2-variant python-llfuse)))
7125 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
7126
7127;; For attic-0.16
7128(define-public python-llfuse-0.41
7129 (package (inherit python-llfuse)
7130 (version "0.41.1")
7131 (source (origin
7132 (method url-fetch)
7133 (uri (string-append
7134 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
7135 "llfuse-" version ".tar.bz2"))
7136 (sha256
7137 (base32
7138 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
7139 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
7140 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
7141 (license (list license:expat license:lgpl2.0+))))
7142
7143(define-public python-msgpack
7144 (package
7145 (name "python-msgpack")
7146 (version "0.5.6")
7147 (source (origin
7148 (method url-fetch)
7149 (uri (pypi-uri "msgpack" version))
7150 (sha256
7151 (base32
7152 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
7153 (build-system python-build-system)
7154 (arguments
7155 `(#:modules ((guix build utils)
7156 (guix build python-build-system)
7157 (ice-9 ftw)
7158 (srfi srfi-1)
7159 (srfi srfi-26))
7160 #:phases
7161 (modify-phases %standard-phases
7162 (replace 'check
7163 (lambda _
7164 (let ((cwd (getcwd)))
7165 (setenv "PYTHONPATH"
7166 (string-append cwd "/build/"
7167 (find (cut string-prefix? "lib" <>)
7168 (scandir (string-append cwd "/build")))
7169 ":"
7170 (getenv "PYTHONPATH")))
7171 (invoke "pytest" "-v" "test")))))))
7172 (native-inputs
7173 `(("python-pytest" ,python-pytest)))
7174 (synopsis "MessagePack (de)serializer")
7175 (description "MessagePack is a fast, compact binary serialization format,
7176suitable for similar data to JSON. This package provides CPython bindings for
7177reading and writing MessagePack data.")
e85af137 7178 (home-page "https://pypi.org/project/msgpack/")
44d10b1f
RW
7179 (license license:asl2.0)))
7180
7181;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
7182;; release 0.5. Some packages like borg still call it by the old name for now.
7183;; <https://bugs.gnu.org/30662>
7184(define-public python-msgpack-transitional
7185 (package
7186 (inherit python-msgpack)
7187 (name "python-msgpack-transitional")
7188 (arguments
7189 (substitute-keyword-arguments (package-arguments python-msgpack)
7190 ((#:phases phases)
7191 `(modify-phases ,phases
7192 (add-after 'unpack 'configure-transitional
7193 (lambda _
7194 ;; Keep using the old name.
7195 (substitute* "setup.py"
7196 (("TRANSITIONAL = False")
7197 "TRANSITIONAL = 1"))
7198 #t))))))))
7199
7200(define-public python2-msgpack
7201 (package-with-python2 python-msgpack))
7202
7203(define-public python-netaddr
7204 (package
7205 (name "python-netaddr")
7206 (version "0.7.19")
7207 (source
7208 (origin
7209 (method url-fetch)
7210 (uri (pypi-uri "netaddr" version))
7211 (sha256
7212 (base32
7213 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
7214 (build-system python-build-system)
7215 (arguments `(#:tests? #f)) ;; No tests.
7216 (home-page "https://github.com/drkjam/netaddr/")
7217 (synopsis "Pythonic manipulation of network addresses")
7218 (description
7219 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
7220and MAC network addresses.")
7221 (license license:bsd-3)))
7222
7223(define-public python2-netaddr
7224 (package-with-python2 python-netaddr))
7225
dd85eca0
AG
7226(define-public python2-pyroute2
7227 (package
7228 (name "python2-pyroute2")
7229 (version "0.5.6")
7230 (source
7231 (origin
7232 (method url-fetch)
7233 (uri (pypi-uri "pyroute2" version))
7234 (sha256
7235 (base32
7236 "1gmz4r1w0yzj6fjjypnalmfyy0lnfznydyn62gi3wk50j5hhxbny"))))
7237 (build-system python-build-system)
7238 (arguments
7239 `(#:python ,python-2)) ;Python 3.x is not supported
7240 (home-page "https://github.com/svinota/pyroute2")
7241 (synopsis "Python netlink library")
7242 (description
7243 "Pyroute2 is a pure Python netlink library with minimal dependencies.
7244Supported netlink families and protocols include:
7245@itemize
7246@item rtnl, network settings - addresses, routes, traffic controls
7247@item nfnetlink - netfilter API: ipset, nftables, ...
7248@item ipq - simplest userspace packet filtering, iptables QUEUE target
7249@item devlink - manage and monitor devlink-enabled hardware
7250@item generic - generic netlink families
7251 @itemize
7252 @item nl80211 - wireless functions API (basic support)
7253 @item taskstats - extended process statistics
7254 @item acpi_events - ACPI events monitoring
7255 @item thermal_events - thermal events monitoring
7256 @item VFS_DQUOT - disk quota events monitoring
7257 @end itemize
7258@end itemize")
7259 (license license:gpl2+)))
7260
44d10b1f
RW
7261(define-public python-wrapt
7262 (package
7263 (name "python-wrapt")
2271a1dc 7264 (version "1.11.2")
44d10b1f 7265 (source
2271a1dc
MB
7266 (origin
7267 (method url-fetch)
7268 (uri (pypi-uri "wrapt" version))
7269 (sha256
7270 (base32
7271 "1q81762dgsgrd12f8qc39zk8s5wll3m5xc32jdmlf6cls4gh4njn"))))
44d10b1f
RW
7272 (build-system python-build-system)
7273 (arguments
7274 ;; Tests are not included in the tarball, they are only available in the
7275 ;; git repository.
7276 `(#:tests? #f))
7277 (home-page "https://github.com/GrahamDumpleton/wrapt")
7278 (synopsis "Module for decorators, wrappers and monkey patching")
7279 (description
2271a1dc 7280 "The aim of the wrapt module is to provide a transparent object proxy for
44d10b1f
RW
7281 Python, which can be used as the basis for the construction of function
7282 wrappers and decorator functions.")
7283 (license license:bsd-2)))
7284
7285(define-public python2-wrapt
7286 (package-with-python2 python-wrapt))
7287
7288(define-public python-xlrd
7289 (package
7290 (name "python-xlrd")
3a2b1a3c 7291 (version "1.2.0")
44d10b1f
RW
7292 (source (origin
7293 (method url-fetch)
7294 (uri (pypi-uri "xlrd" version))
7295 (sha256
7296 (base32
3a2b1a3c 7297 "1ci93fda4n67qhdvfl16zasyxrpygzk53hs6m8z0rd4dxrnb6vjl"))))
44d10b1f
RW
7298 (build-system python-build-system)
7299 (arguments
7300 `(#:phases
7301 (modify-phases %standard-phases
3ccdd3a5
MO
7302 ;; Some tests depend on writing a temporary file to the user's home
7303 ;; directory.
3a2b1a3c
GL
7304 (add-after 'unpack 'fix-tests
7305 (lambda _
7306 (delete-file "tests/test_open_workbook.py")
7307 #t)))))
44d10b1f
RW
7308 (home-page "http://www.python-excel.org/")
7309 (synopsis "Library for extracting data from Excel files")
a0909286 7310 (description "This package provides a library to extract data from
44d10b1f
RW
7311spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
7312@samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
7313Unicode-aware. It is not intended as an end-user tool.")
7314 (license license:bsd-3)))
7315
7316(define-public python2-xlrd
7317 (package-with-python2 python-xlrd))
7318
7319(define-public python-prettytable
7320 (package
7321 (name "python-prettytable")
7322 (version "0.7.2")
7323 (source
7324 (origin
7325 (method url-fetch)
337c3a1e 7326 (uri (pypi-uri "prettytable" version ".tar.bz2"))
44d10b1f
RW
7327 (sha256
7328 (base32
7329 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
7330 (build-system python-build-system)
8be58b48 7331 (home-page "https://code.google.com/archive/p/prettytable/")
44d10b1f
RW
7332 (synopsis "Display tabular data in an ASCII table format")
7333 (description
7334 "A library designed to represent tabular data in visually appealing ASCII
7335tables. PrettyTable allows for selection of which columns are to be printed,
7336independent alignment of columns (left or right justified or centred) and
7337printing of sub-tables by specifying a row range.")
7338 (license license:bsd-3)))
7339
7340(define-public python2-prettytable
7341 (package-with-python2 python-prettytable))
7342
7343(define-public python-tables
7344 (package
7345 (name "python-tables")
7346 (version "3.4.4")
7347 (source
7348 (origin
7349 (method url-fetch)
7350 (uri (pypi-uri "tables" version))
7351 (sha256
7352 (base32
7353 "0affz7k8babh8wdmsgrz5jxrd569by2w8ffimcxs9wiaf5rw1idx"))
7354 (modules '((guix build utils)))
7355 (snippet
7356 '(begin
7357 ;; Remove pre-compiled .pyc files from source.
7358 (for-each delete-file-recursively
7359 (find-files "." "__pycache__" #:directories? #t))
7360 (for-each delete-file (find-files "." "\\.pyc$"))
7361 #t))))
7362 (build-system python-build-system)
7363 (arguments
7364 `(;; FIXME: python-build-system does not pass configure-flags to "build"
7365 ;; or "check", so we must override the build and check phases.
7366 #:phases
7367 (modify-phases %standard-phases
7368 (add-after 'unpack 'use-gcc
7369 (lambda _
7370 (substitute* "setup.py"
7371 (("compiler = new_compiler\\(\\)" line)
7372 (string-append line
7373 "\ncompiler.set_executables(compiler='gcc',"
7374 "compiler_so='gcc',"
7375 "linker_exe='gcc',"
7376 "linker_so='gcc -shared')")))
7377 #t))
70b74663
RW
7378 (add-after 'unpack 'disable-tuning
7379 (lambda _
7380 (substitute* "setup.py"
7381 (("cpu_flags = .*")
7382 "cpu_flags = ['sse2']\n"))
7383 #t))
44d10b1f
RW
7384 (replace 'build
7385 (lambda* (#:key inputs #:allow-other-keys)
35d79d61
RW
7386 (invoke "python" "setup.py" "build"
7387 (string-append "--hdf5="
7388 (assoc-ref inputs "hdf5")))))
44d10b1f
RW
7389 (replace 'check
7390 (lambda* (#:key inputs #:allow-other-keys)
35d79d61
RW
7391 (invoke "python" "setup.py" "check"
7392 (string-append "--hdf5="
7393 (assoc-ref inputs "hdf5"))))))))
44d10b1f
RW
7394 (propagated-inputs
7395 `(("python-numexpr" ,python-numexpr)
7396 ("python-numpy" ,python-numpy)))
7397 (native-inputs
7398 `(("python-cython" ,python-cython)
7399 ("pkg-config" ,pkg-config)))
7400 (inputs
538c1a02 7401 `(("hdf5" ,hdf5-1.10)
44d10b1f
RW
7402 ("bzip2" ,bzip2)
7403 ("zlib" ,zlib)))
7404 (home-page "http://www.pytables.org/")
7405 (synopsis "Hierarchical datasets for Python")
7406 (description "PyTables is a package for managing hierarchical datasets and
7407designed to efficiently cope with extremely large amounts of data.")
7408 (license license:bsd-3)))
7409
7410(define-public python2-tables
7411 (package-with-python2 python-tables))
7412
cc2c2850
RW
7413(define-public python-pytest-black
7414 (package
7415 (name "python-pytest-black")
7416 (version "0.3.8")
7417 (source
7418 (origin
7419 (method url-fetch)
7420 (uri (pypi-uri "pytest-black" version))
7421 (sha256
7422 (base32
7423 "04lppqydxm0f3f3x0l8hj7v0j6d8syj34jc37yzqwqcyqsnaga81"))))
7424 (build-system python-build-system)
7425 (propagated-inputs
7426 `(("python-pytest" ,python-pytest)
7427 ("python-black" ,python-black)
7428 ("python-toml" ,python-toml)))
7429 (native-inputs
7430 `(("python-setuptools-scm" ,python-setuptools-scm)))
7431 (home-page "https://github.com/shopkeep/pytest-black")
7432 (synopsis "Pytest plugin to enable format checking with black")
7433 (description
7434 "This package provides a pytest plugin to enable format checking with the
7435Python code formatter \"black\".")
7436 (license license:expat)))
7437
2ceff35f
RW
7438(define-public python-get-version
7439 (package
7440 (name "python-get-version")
7441 (version "2.1")
7442 (source
7443 (origin
7444 (method url-fetch)
7445 (uri (pypi-uri "get_version" version))
7446 (sha256
7447 (base32
7448 "1g15jyx33vkxavv9hwv275cs4g9bp2i1y942raw3fxamq8kbaml1"))))
7449 (build-system python-build-system)
7450 (propagated-inputs
7451 `(("python-pygments" ,python-pygments)
7452 ("python-pytest" ,python-pytest)
7453 ("python-pytest-black" ,python-pytest-black)
7454 ("python-pytest-cov" ,python-pytest-cov)
7455 ("python-setuptools" ,python-setuptools)
7456 ("python-testpath" ,python-testpath)))
7457 (home-page "https://github.com/flying-sheep/get_version")
7458 (synopsis "Version helper in the spirit of versioneer")
7459 (description
7460 "This package provides a version helper that lets you automatically use
7461the latest @code{vX.X.X} Git tag as the version in your Python package. It
7462also supports getting the version from Python source distributions or, once
7463your package is installed, via @code{pkg_resources} (part of
7464@code{setuptools}).")
7465 (license license:gpl3+)))
7466
053ab825
RW
7467(define-public python-legacy-api-wrap
7468 (package
7469 (name "python-legacy-api-wrap")
7470 (version "1.2")
7471 (source
7472 (origin
7473 (method url-fetch)
7474 (uri (pypi-uri "legacy-api-wrap" version))
7475 (sha256
7476 (base32
7477 "06qhp0g543dy98vpa41hwdalvdbsjfc3ldk474yr9sd75mhl8jh3"))))
7478 (build-system python-build-system)
7479 (propagated-inputs
7480 `(("python-get-version" ,python-get-version)
7481 ("python-pytest" ,python-pytest)
7482 ("python-pytest-black" ,python-pytest-black)
7483 ("python-pytest-cov" ,python-pytest-cov)
7484 ("python-setuptools" ,python-setuptools)))
7485 (home-page "https://github.com/flying-sheep/legacy-api-wrap")
7486 (synopsis "Legacy API wrapper")
7487 (description "This module defines a decorator to wrap legacy APIs. The
7488primary use case is APIs defined before keyword-only parameters existed.")
7489 (license license:gpl3+)))
7490
44d10b1f
RW
7491(define-public python-pyasn1
7492 (package
7493 (name "python-pyasn1")
7494 (version "0.4.3")
7495 (source
7496 (origin
7497 (method url-fetch)
7498 (uri (pypi-uri "pyasn1" version))
7499 (sha256
7500 (base32
7501 "1z5h38anjzzrxpraa9iq9llffyx2zs8gx0q6dc1g029miwnn50gv"))))
7502 (build-system python-build-system)
7503 (home-page "http://pyasn1.sourceforge.net/")
7504 (synopsis "ASN.1 types and codecs")
7505 (description
7506 "This is an implementation of ASN.1 types and codecs in Python. It is
7507suitable for a wide range of protocols based on the ASN.1 specification.")
7508 (license license:bsd-2)))
7509
7510(define-public python2-pyasn1
7511 (package-with-python2 python-pyasn1))
7512
7513(define-public python-pyasn1-modules
7514 (package
7515 (name "python-pyasn1-modules")
7516 (version "0.2.2")
7517 (source
7518 (origin
7519 (method url-fetch)
7520 (uri (pypi-uri "pyasn1-modules" version))
7521 (sha256
7522 (base32
7523 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
7524 (build-system python-build-system)
7525 (propagated-inputs
7526 `(("python-pyasn1" ,python-pyasn1)))
7527 (home-page "https://sourceforge.net/projects/pyasn1/")
7528 (synopsis "ASN.1 codec implementations")
7529 (description
7530 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
7531implementations of ASN.1-based codecs and protocols.")
7532 (license license:bsd-3)))
7533
7534(define-public python2-pyasn1-modules
7535 (package-with-python2 python-pyasn1-modules))
7536
7537(define-public python-ipaddress
7538 (package
7539 (name "python-ipaddress")
7540 (version "1.0.22")
7541 (source (origin
7542 (method url-fetch)
7543 (uri (pypi-uri "ipaddress" version))
7544 (sha256
7545 (base32
7546 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
7547 (build-system python-build-system)
7548 (home-page "https://github.com/phihag/ipaddress")
7549 (synopsis "IP address manipulation library")
7550 (description
7551 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
7552 in Python. This library is used to create, poke at, and manipulate IPv4 and
7553 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
7554 module to older versions of Python.")
7555 (license license:psfl)))
7556
7557(define-public python2-ipaddress
7558 (package-with-python2 python-ipaddress))
7559
7560(define-public python2-ipaddr
7561 (package
7562 (name "python2-ipaddr")
7563 (version "2.1.11")
7564 (source
7565 (origin
7566 (method url-fetch)
7567 (uri (pypi-uri "ipaddr" version))
7568 (sha256
7569 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
7570 (build-system python-build-system)
7571 (arguments
7572 `(#:python ,python-2 ;version 2 only
7573 #:phases
7574 (modify-phases %standard-phases
7575 (replace 'check
40b8c4e3 7576 (lambda _ (invoke "python" "ipaddr_test.py"))))))
44d10b1f
RW
7577 (home-page "https://github.com/google/ipaddr-py")
7578 (synopsis "IP address manipulation library")
7579 (description
7580 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
7581IPv6 addresses and networks.
7582
7583For new implementations you may prefer to use the standard module
7584@code{ipaddress}, which was introduced in Python 3.3 and backported to older
7585versions of Python.")
7586 (license license:asl2.0)))
7587
7588(define-public python-idna
7589 (package
7590 (name "python-idna")
e95c9837 7591 (version "2.8")
44d10b1f
RW
7592 (source
7593 (origin
7594 (method url-fetch)
7595 (uri (pypi-uri "idna" version))
7596 (sha256
7597 (base32
e95c9837 7598 "01rlkigdxg17sf9yar1jl8n18ls59367wqh59hnawlyg53vb6my3"))))
44d10b1f
RW
7599 (build-system python-build-system)
7600 (home-page "https://github.com/kjd/idna")
7601 (synopsis "Internationalized domain names in applications")
7602 (description
7603 "This is a library to support the Internationalised Domain Names in
7604Applications (IDNA) protocol as specified in RFC 5891. This version of the
7605protocol is often referred to as “IDNA2008” and can produce different results
7606from the earlier standard from 2003. The library is also intended to act as a
7607suitable drop-in replacement for the “encodings.idna” module that comes with
7608the Python standard library but currently only supports the older 2003
7609specification.")
7610 (license license:bsd-4)))
7611
a76e6a69
JM
7612(define-public python-idna-2.7
7613 (package (inherit python-idna)
7614 (version "2.7")
7615 (source (origin
7616 (method url-fetch)
7617 (uri (pypi-uri "idna" version))
7618 (sha256
7619 (base32
7620 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))))
7621
7622
44d10b1f
RW
7623(define-public python2-idna
7624 (package-with-python2 python-idna))
7625
7626(define-public python-idna-ssl
7627 (package
7628 (name "python-idna-ssl")
7629 (version "1.0.1")
7630 (source
7631 (origin
7632 (method url-fetch)
7633 (uri (pypi-uri "idna-ssl" version))
7634 (sha256
7635 (base32
7636 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
7637 (build-system python-build-system)
7638 (arguments
7639 `(#:tests? #f)) ;circular dependency with python-aiohttp
7640 (home-page "https://github.com/aio-libs/idna-ssl")
7641 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
7642 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
7643domains support.")
7644 (license license:expat)))
7645
7646(define-public python-pretend
7647 (package
7648 (name "python-pretend")
7649 (version "1.0.9")
7650 (source
7651 (origin
7652 (method url-fetch)
9f1f22ee 7653 (uri (pypi-uri "pretend" version))
44d10b1f
RW
7654 (sha256
7655 (base32
7656 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
7657 (build-system python-build-system)
7658 (home-page "https://github.com/alex/pretend")
7659 (synopsis "Library for stubbing in Python")
7660 (description
7661 "Pretend is a library to make stubbing with Python easier. Stubbing is a
7662technique for writing tests. You may hear the term mixed up with mocks,
7663fakes, or doubles. Basically, a stub is an object that returns pre-canned
7664responses, rather than doing any computation.")
7665 (license license:bsd-3)))
7666
7667(define-public python2-pretend
7668 (package-with-python2 python-pretend))
7669
7670(define-public python-pip
7671 (package
7672 (name "python-pip")
0a193d32 7673 (version "20.0.2")
44d10b1f
RW
7674 (source
7675 (origin
7676 (method url-fetch)
7677 (uri (pypi-uri "pip" version))
7678 (sha256
7679 (base32
0a193d32 7680 "0zwnlsjn6mb742cr995zfbk9v56ygxp8w3k49601r9by9kmcic3x"))))
44d10b1f
RW
7681 (build-system python-build-system)
7682 (arguments
7683 '(#:tests? #f)) ; there are no tests in the pypi archive.
7684 (home-page "https://pip.pypa.io/")
7685 (synopsis "Package manager for Python software")
7686 (description
7687 "Pip is a package manager for Python software, that finds packages on the
7688Python Package Index (PyPI).")
7689 (license license:expat)))
7690
7691(define-public python2-pip
7692 (package-with-python2 python-pip))
7693
7694(define-public python-tlsh
7695 (package
7696 (name "python-tlsh")
7697 (version "3.4.5")
7698 (home-page "https://github.com/trendmicro/tlsh")
3e3ff8ad
TGR
7699 (source
7700 (origin
7701 (method git-fetch)
7702 (uri (git-reference
7703 (url "https://github.com/trendmicro/tlsh.git")
7704 (commit (string-append "v" version))))
7705 (file-name (git-file-name name version))
7706 (sha256
7707 (base32 "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll"))))
44d10b1f
RW
7708 (build-system cmake-build-system)
7709 (arguments
7710 '(#:out-of-source? #f
7711 #:phases (modify-phases %standard-phases
7712 (replace
7713 'install
7714 (lambda* (#:key outputs #:allow-other-keys)
7715 ;; Build and install the Python bindings. The underlying
7716 ;; C++ library is apparently not meant to be installed.
7717 (let ((out (assoc-ref outputs "out")))
7718 (with-directory-excursion "py_ext"
7719 (and (system* "python" "setup.py" "build")
7720 (system* "python" "setup.py" "install"
7721 (string-append "--prefix=" out))))))))))
7722 (inputs `(("python" ,python-wrapper))) ;for the bindings
7723 (synopsis "Fuzzy matching library for Python")
7724 (description
7725 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
7726Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
7727value which can be used for similarity comparisons. Similar objects have
7728similar hash values, which allows for the detection of similar objects by
7729comparing their hash values. The byte stream should have a sufficient amount
7730of complexity; for example, a byte stream of identical bytes will not generate
7731a hash value.")
7732 (license license:asl2.0)))
7733
7734(define-public python2-tlsh
7735 (package
7736 (inherit python-tlsh)
7737 (name "python2-tlsh")
7738 (inputs `(("python" ,python-2)))))
7739
7740(define-public python-termcolor
7741 (package
7742 (name "python-termcolor")
7743 (version "1.1.0")
7744 (source
7745 (origin
7746 (method url-fetch)
7747 (uri (pypi-uri "termcolor" version))
7748 (sha256
7749 (base32
7750 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
7751 (build-system python-build-system)
7752 (arguments
7753 ;; There are no tests.
7754 `(#:tests? #f))
e85af137 7755 (home-page "https://pypi.org/project/termcolor/")
44d10b1f
RW
7756 (synopsis "ANSII Color formatting for terminal output")
7757 (description
7758 "This package provides ANSII Color formatting for output in terminals.")
7759 (license license:expat)))
7760
7761(define-public python2-termcolor
7762 (package-with-python2 python-termcolor))
7763
7764(define-public python-libarchive-c
7765 (package
7766 (name "python-libarchive-c")
f2774824 7767 (version "2.9")
44d10b1f
RW
7768 (source (origin
7769 (method url-fetch)
7770 (uri (pypi-uri "libarchive-c" version))
7771 (sha256
7772 (base32
f2774824 7773 "0q7g6a97110bk0j5x81555kajyxh4sybaabab6v5sgr0xi6386cr"))))
44d10b1f
RW
7774 (build-system python-build-system)
7775 (arguments
7776 '(#:phases (modify-phases %standard-phases
7777 (add-before
7778 'build 'reference-libarchive
7779 (lambda* (#:key inputs #:allow-other-keys)
7780 ;; Retain the absolute file name of libarchive.so.
7781 (let ((libarchive (assoc-ref inputs "libarchive")))
7782 (substitute* "libarchive/ffi.py"
7783 (("find_library\\('archive'\\)")
7784 (string-append "'" libarchive
7785 "/lib/libarchive.so'"))))))
7786 (replace 'check
7787 (lambda _ (invoke "pytest" "-vv"))))))
7788 (native-inputs
7789 `(("python-mock" ,python-mock)
7790 ("python-pytest" ,python-pytest)))
7791 (inputs
7792 `(("libarchive" ,libarchive)))
7793 (home-page "https://github.com/Changaco/python-libarchive-c")
7794 (synopsis "Python interface to libarchive")
7795 (description
7796 "This package provides Python bindings to libarchive, a C library to
7797access possibly compressed archives in many different formats. It uses
7798Python's @code{ctypes} foreign function interface (FFI).")
7799 (license license:lgpl2.0+)))
7800
7801(define-public python2-libarchive-c
7802 (package-with-python2 python-libarchive-c))
7803
7804(define-public python-file
7805 (package
7806 (inherit file)
7807 (name "python-file")
7808 (build-system python-build-system)
7809 (arguments
7810 '(#:tests? #f ;no tests
7811 #:configure-flags '("--single-version-externally-managed" "--root=/")
7812 #:phases (modify-phases %standard-phases
7813 (add-before 'build 'change-directory
7814 (lambda _
7815 (chdir "python")
7816 #t))
7817 (add-before 'build 'set-library-file-name
7818 (lambda* (#:key inputs #:allow-other-keys)
7819 (let ((file (assoc-ref inputs "file")))
7820 (substitute* "magic.py"
7821 (("find_library\\('magic'\\)")
7822 (string-append "'" file "/lib/libmagic.so'")))
7823 #t))))))
7824 (inputs `(("file" ,file)))
528ea990
LC
7825 (native-inputs (if (%current-target-system)
7826 `(("self" ,this-package))
7827 '()))
44d10b1f
RW
7828 (synopsis "Python bindings to the libmagic file type guesser. Note that
7829this module and the python-magic module both provide a \"magic.py\" file;
7830these two modules, which are different and were developed separately, both
7831serve the same purpose: provide Python bindings for libmagic.")))
7832
7833(define-public python2-file
7834 (package-with-python2 python-file))
7835
7836(define-public python-debian
7837 (package
7838 (name "python-debian")
7839 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
9f74bd31 7840 (version "0.1.36")
44d10b1f
RW
7841 (source
7842 (origin
9f74bd31
VC
7843 ;; Use git-fetch, as pypi doesn't include test suite.
7844 (method git-fetch)
7845 (uri (git-reference
7846 (url home-page)
7847 (commit version)))
7848 (file-name (git-file-name name version))
44d10b1f
RW
7849 (sha256
7850 (base32
9f74bd31 7851 "0qy6x28bj6yfikhjww932v5xq4mf5bm1iczl7acy4c7zm6mwhqfa"))))
44d10b1f 7852 (build-system python-build-system)
9f74bd31
VC
7853 (arguments
7854 `(#:phases (modify-phases %standard-phases
7855 (add-after 'unpack 'remove-debian-specific-tests
7856 ;; python-apt, apt and dpkg are not yet available in guix,
7857 ;; and these tests heavily depend on them.
7858 (lambda _
7859 (delete-file "lib/debian/tests/test_deb822.py")
7860 (delete-file "lib/debian/tests/test_debfile.py")
7861 #t)))))
44d10b1f 7862 (propagated-inputs
9f74bd31
VC
7863 `(("python-six" ,python-six)
7864 ("python-chardet" ,python-chardet)))
44d10b1f
RW
7865 (synopsis "Debian package related modules")
7866 (description
7867 ;; XXX: Use @enumerate instead of @itemize to work around
7868 ;; <http://bugs.gnu.org/21772>.
7869 "This package provides Python modules that abstract many formats of
7870Debian-related files, such as:
7871
7872@enumerate
7873@item Debtags information;
7874@item @file{debian/changelog} files;
7875@item packages files, pdiffs;
7876@item control files of single or multiple RFC822-style paragraphs---e.g.
7877 @file{debian/control}, @file{.changes}, @file{.dsc};
7878@item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
7879 contained files and meta-information.
7880@end enumerate\n")
7881
7882 ;; Modules are either GPLv2+ or GPLv3+.
7883 (license license:gpl3+)))
7884
44d10b1f
RW
7885(define-public python-nbformat
7886 (package
7887 (name "python-nbformat")
7888 (version "4.4.0")
7889 (source
7890 (origin
7891 (method url-fetch)
7892 (uri (pypi-uri "nbformat" version))
7893 (sha256
7894 (base32
7895 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
7896 (build-system python-build-system)
7897 (arguments `(#:tests? #f)) ; no test target
7898 (propagated-inputs
7899 `(("python-ipython-genutils" ,python-ipython-genutils)
7900 ("python-jsonschema" ,python-jsonschema)
7901 ("python-jupyter-core" ,python-jupyter-core)
7902 ("python-traitlets" ,python-traitlets)))
7903 (home-page "http://jupyter.org")
7904 (synopsis "Jupyter Notebook format")
7905 (description "This package provides the reference implementation of the
7906Jupyter Notebook format and Python APIs for working with notebooks.")
7907 (license license:bsd-3)))
7908
7909(define-public python2-nbformat
7910 (package-with-python2 python-nbformat))
7911
7912(define-public python-bleach
7913 (package
7914 (name "python-bleach")
e6daf515 7915 (version "3.1.1")
44d10b1f
RW
7916 (source
7917 (origin
7918 (method url-fetch)
7919 (uri (pypi-uri "bleach" version))
7920 (sha256
7921 (base32
e6daf515 7922 "0j4xlnw99m1xy0s7wxz9fk5f3c1n8r296fh75jn5p5j61w6qg2xa"))))
44d10b1f
RW
7923 (build-system python-build-system)
7924 (propagated-inputs
ff0efc8f 7925 `(("python-webencodings" ,python-webencodings)
44d10b1f
RW
7926 ("python-six" ,python-six)))
7927 (native-inputs
ff0efc8f
MB
7928 `(("python-pytest" ,python-pytest)
7929 ("python-pytest-runner" ,python-pytest-runner-2)))
44d10b1f
RW
7930 (home-page "https://github.com/jsocol/bleach")
7931 (synopsis "Whitelist-based HTML-sanitizing tool")
7932 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
7933 (license license:asl2.0)))
7934
7935(define-public python2-bleach
7936 (package-with-python2 python-bleach))
7937
7938(define-public python-entrypoints
7939 (package
7940 (name "python-entrypoints")
a7f1b718 7941 (version "0.3")
44d10b1f
RW
7942 (source
7943 (origin
7944 (method url-fetch)
a7f1b718 7945 (uri (pypi-uri "entrypoints" version))
44d10b1f
RW
7946 (sha256
7947 (base32
a7f1b718 7948 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
44d10b1f
RW
7949 (build-system python-build-system)
7950 ;; The package does not come with a setup.py file, so we have to generate
7951 ;; one ourselves.
7952 (arguments
7953 `(#:tests? #f
7954 #:phases
7955 (modify-phases %standard-phases
7956 (add-after 'unpack 'create-setup.py
7957 (lambda _
7958 (call-with-output-file "setup.py"
7959 (lambda (port)
7960 (format port "\
7961from setuptools import setup
7962setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
7963" ,version))))))))
7964 (home-page "https://github.com/takluyver/entrypoints")
7965 (synopsis "Discover and load entry points from installed Python packages")
7966 (description "Entry points are a way for Python packages to advertise
7967objects with some common interface. The most common examples are
7968@code{console_scripts} entry points, which define shell commands by
7969identifying a Python function to run. The @code{entrypoints} module contains
7970functions to find and load entry points.")
7971 (license license:expat)))
7972
7973(define-public python2-entrypoints
7974 (package-with-python2 python-entrypoints))
7975
7976(define-public python-nbconvert
7977 (package
7978 (name "python-nbconvert")
7979 (version "5.0.0b1")
7980 (source
7981 (origin
7982 (method url-fetch)
7983 (uri (pypi-uri "nbconvert" version))
7984 (sha256
7985 (base32
7986 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
7987 (build-system python-build-system)
7988 (arguments
7989 `(;; The "bdist_egg" target is disabled by default, causing the installation
7990 ;; to fail.
7991 #:configure-flags (list "bdist_egg")
7992 ;; FIXME: 5 failures, 40 errors.
7993 #:tests? #f))
7994 ;; #:phases
7995 ;; (modify-phases %standard-phases
7996 ;; (replace 'check
7997 ;; (lambda _
7998 ;; (zero? (system* "py.test" "-v")))))
7999 (native-inputs
8000 `(("python-pytest" ,python-pytest)))
8001 (propagated-inputs
8002 `(("python-bleach" ,python-bleach)
8003 ("python-entrypoints" ,python-entrypoints)
8004 ("python-jinja2" ,python-jinja2)
8005 ("python-jupyter-core" ,python-jupyter-core)
8006 ("python-mistune" ,python-mistune)
8007 ("python-nbformat" ,python-nbformat)
8008 ("python-pygments" ,python-pygments)
8009 ("python-traitlets" ,python-traitlets)))
8010 (home-page "http://jupyter.org")
8011 (synopsis "Converting Jupyter Notebooks")
8012 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
8013notebooks to various other formats via Jinja templates. It allows you to
8014convert an @code{.ipynb} notebook file into various static formats including:
8015
8016@enumerate
8017@item HTML
8018@item LaTeX
8019@item PDF
8020@item Reveal JS
8021@item Markdown (md)
8022@item ReStructured Text (rst)
8023@item executable script
8024@end enumerate\n")
8025 (license license:bsd-3)))
8026
8027(define-public python2-nbconvert
8028 (package-with-python2 python-nbconvert))
8029
44d10b1f
RW
8030(define-public python-notebook
8031 (package
8032 (name "python-notebook")
8033 (version "5.7.4")
8034 (source (origin
8035 (method url-fetch)
8036 (uri (pypi-uri "notebook" version))
8037 (sha256
8038 (base32
8039 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
8040 (build-system python-build-system)
8041 (arguments
8042 `(#:phases
8043 (modify-phases %standard-phases
8044 (replace 'check
8045 (lambda _
8046 ;; These tests require a browser
8047 (delete-file-recursively "notebook/tests/selenium")
8048 ;; Some tests need HOME
8049 (setenv "HOME" "/tmp")
8050 ;; This file contains "warningfilters", which are not supported
8051 ;; by this version of nose.
8052 (delete-file "setup.cfg")
8053 (with-directory-excursion "/tmp"
8054 (invoke "nosetests" "-v"))
8055 #t)))))
8056 (propagated-inputs
8057 `(("python-jupyter-core" ,python-jupyter-core)
8058 ("python-nbformat" ,python-nbformat)
8059 ("python-nbconvert" ,python-nbconvert)
8060 ("python-prometheus-client" ,python-prometheus-client)
8061 ("python-send2trash" ,python-send2trash)
8062 ("python-terminado" ,python-terminado)))
8063 (native-inputs
8064 `(("python-nose" ,python-nose)
8065 ("python-sphinx" ,python-sphinx)
8066 ("python-requests" ,python-requests)))
8067 (home-page "http://jupyter.org/")
8068 (synopsis "Web-based notebook environment for interactive computing")
8069 (description
8070 "The Jupyter HTML notebook is a web-based notebook environment for
8071interactive computing.")
8072 (properties `((python2-variant . ,(delay python2-notebook))))
8073 (license license:bsd-3)))
8074
8075(define-public python2-notebook
8076 (let ((base (package-with-python2
8077 (strip-python2-variant python-notebook))))
8078 (package (inherit base)
8079 (native-inputs
8080 `(("python2-mock" ,python2-mock)
8081 ,@(package-native-inputs base)))
8082 (arguments
8083 (substitute-keyword-arguments (package-arguments base)
8084 ((#:phases phases)
8085 `(modify-phases ,phases
8086 (add-before 'check 'disable-test-case
8087 ;; The test requires network access to localhost. Curiously it
8088 ;; fails with Python 2 only. Simply make the test-case return
8089 ;; immediately.
8090 (lambda _
8091 (substitute*
8092 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
8093 (("formats = self.nbconvert_api") "return #")))))))))))
8094
8095(define-public python-widgetsnbextension
8096 (package
8097 (name "python-widgetsnbextension")
8098 (version "3.4.2")
8099 (source
8100 (origin
8101 (method url-fetch)
8102 (uri (pypi-uri "widgetsnbextension" version))
8103 (sha256
8104 (base32
8105 "0rc2nivdy7k4m3vljx7wdh2jh11djapcgwhvzlbs0isl8gl8nqgs"))))
8106 (build-system python-build-system)
8107 (propagated-inputs
8108 `(("python-ipykernel" ,python-ipykernel)
8109 ("python-notebook" ,python-notebook)))
8110 (native-inputs
8111 `(("python-certifi" ,python-certifi)
8112 ("python-nose" ,python-nose)))
8113 (home-page "https://ipython.org")
8114 (synopsis "IPython HTML widgets for Jupyter")
8115 (description "This package provides interactive HTML widgets for Jupyter
8116notebooks.")
8117 (license license:bsd-3)))
8118
8119(define-public python2-widgetsnbextension
8120 (package-with-python2 python-widgetsnbextension))
8121
8122(define-public python-ipywidgets
8123 (package
8124 (name "python-ipywidgets")
8125 (version "5.2.2")
8126 (source
8127 (origin
8128 (method url-fetch)
8129 (uri (pypi-uri "ipywidgets" version))
8130 (sha256
8131 (base32
8132 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
8133 (build-system python-build-system)
8134 (propagated-inputs
8135 `(("python-ipython" ,python-ipython)
8136 ("python-traitlets" ,python-traitlets)
8137 ("python-widgetsnbextension" ,python-widgetsnbextension)))
8138 (native-inputs
8139 `(("python-nose" ,python-nose)
8140 ("python-pytest" ,python-pytest)))
8141 (home-page "https://ipython.org")
8142 (synopsis "IPython HTML widgets for Jupyter")
8143 (description "Ipywidgets are interactive HTML widgets for Jupyter
8144notebooks and the IPython kernel. Notebooks come alive when interactive
8145widgets are used. Users gain control of their data and can visualize changes
8146in the data.")
8147 (license license:bsd-3)))
8148
8149(define-public python2-ipywidgets
8150 (package-with-python2 python-ipywidgets))
8151
8152(define-public python-jupyter-console
8153 (package
8154 (name "python-jupyter-console")
becb9cbf 8155 (version "6.0.0")
44d10b1f
RW
8156 (source
8157 (origin
8158 (method url-fetch)
8159 (uri (pypi-uri "jupyter_console" version))
8160 (sha256
8161 (base32
becb9cbf 8162 "1xdjw11cppf1fxvwkw2bk13ckkwas3bdah8baingn9296mvfi31h"))))
44d10b1f 8163 (build-system python-build-system)
44d10b1f
RW
8164 (propagated-inputs
8165 `(("python-ipykernel" ,python-ipykernel)
8166 ("python-jupyter-client" ,python-jupyter-client)
becb9cbf 8167 ("python-prompt-toolkit" ,python-prompt-toolkit)
44d10b1f
RW
8168 ("python-pygments" ,python-pygments)))
8169 (native-inputs
8170 `(("python-nose" ,python-nose)))
8171 (home-page "https://jupyter.org")
8172 (synopsis "Jupyter terminal console")
8173 (description "This package provides a terminal-based console frontend for
8174Jupyter kernels. It also allows for console-based interaction with non-Python
8175Jupyter kernels such as IJulia and IRKernel.")
8176 (license license:bsd-3)))
8177
8178(define-public python2-jupyter-console
8e590c81
RW
8179 (package
8180 (name "python2-jupyter-console")
8181 (version "5.2.0")
8182 (source
8183 (origin
8184 (method url-fetch)
8185 (uri (pypi-uri "jupyter_console" version))
8186 (sha256
8187 (base32
8188 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
8189 (build-system python-build-system)
8190 ;; Tests only run in an TTY.
8191 (arguments `(#:tests? #f))
8192 (propagated-inputs
8193 `(("python2-ipykernel" ,python2-ipykernel)
8194 ("python2-jupyter-client" ,python2-jupyter-client)
8195 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
8196 ("python2-pygments" ,python2-pygments)))
8197 (native-inputs
8198 `(("python2-nose" ,python2-nose)))
8199 (home-page "https://jupyter.org")
8200 (synopsis "Jupyter terminal console")
8201 (description "This package provides a terminal-based console frontend for
8202Jupyter kernels. It also allows for console-based interaction with non-Python
8203Jupyter kernels such as IJulia and IRKernel.")
8204 (license license:bsd-3)))
44d10b1f
RW
8205
8206;; The python-ipython and python-jupyter-console require each other. To get
8207;; the functionality in both packages working, strip down the
8208;; python-jupyter-console package when using it as an input to python-ipython.
8209(define python-jupyter-console-minimal
8210 (package
8211 (inherit python-jupyter-console)
8212 (name "python-jupyter-console-minimal")
8213 (arguments
8214 (substitute-keyword-arguments
8215 (package-arguments python-jupyter-console)
8216 ((#:phases phases)
8217 `(modify-phases ,phases
8218 (add-after 'install 'delete-bin
8219 (lambda* (#:key outputs #:allow-other-keys)
8220 ;; Delete the bin files, to avoid conflicts in profiles
8221 ;; where python-ipython and python-jupyter-console are
8222 ;; both present.
8223 (delete-file-recursively
8224 (string-append
8225 (assoc-ref outputs "out") "/bin"))))))))
8226 ;; Remove the python-ipython propagated input, to avoid the cycle
8227 (propagated-inputs
8228 (alist-delete
8229 "python-ipython"
8230 (package-propagated-inputs python-jupyter-console)))))
8231
8232(define-public python-qtconsole
8233 (package
8234 (name "python-qtconsole")
8235 (version "4.4.3")
8236 (source
8237 (origin
8238 (method url-fetch)
8239 (uri (pypi-uri "qtconsole" version))
8240 (sha256
8241 (base32
8242 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
8243 (build-system python-build-system)
8244 (arguments
8245 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
8246 ;; but we only have the LTS version 5.x. This means that there might be
8247 ;; runtime errors, but since this is a dependency of the Jupyter package,
8248 ;; and Jupyter can be used without the qtconsole we can overlook this for
8249 ;; now.
8250 `(#:tests? #f
8251 #:phases
8252 (modify-phases %standard-phases
8253 (add-before 'check 'pre-check
8254 (lambda _
8255 (setenv "QT_QPA_PLATFORM" "offscreen")
8256 #t)))))
8257 (propagated-inputs
8258 `(("python-ipykernel" ,python-ipykernel)
8259 ("python-ipython" ,python-ipython)))
8260 (native-inputs
8261 `(("python-pytest" ,python-pytest)))
8262 (home-page "http://jupyter.org")
8263 (synopsis "Jupyter Qt console")
8264 (description "This package provides a Qt-based console for Jupyter with
8265support for rich media output.")
8266 (license license:bsd-3)))
8267
6ec87223
VC
8268(define-public python-jsbeautifier
8269 (package
8270 (name "python-jsbeautifier")
8271 (version "1.10.2")
8272 (home-page "https://github.com/beautify-web/js-beautify")
8273 (source (origin
8274 (method git-fetch)
8275 (uri (git-reference
8276 (url home-page)
8277 (commit (string-append "v" version))))
8278 (file-name (git-file-name name version))
8279 (sha256
8280 (base32
8281 "0wawb070ki1axb3jc9xvsrgpji52vcfif3zmjzc3z4g98m5xw4kg"))))
8282 (build-system python-build-system)
8283 (arguments
8284 `(#:phases (modify-phases %standard-phases
8285 (add-after 'unpack 'chdir
8286 (lambda _
8287 ;; The upstream Git repository contains all the code,
8288 ;; but this package only builds the python code.
8289 (chdir "python")
8290 #t))
8291 (add-after 'unpack 'patch-python-six-requirements
8292 (lambda _
8293 (substitute* "python/setup.py"
8294 (("six>=1.12.0")
8295 "six>=1.11.0"))
8296 #t)))))
8297 (propagated-inputs
8298 `(("python-editorconfig" ,python-editorconfig)
8299 ("python-six" ,python-six)))
8300 (native-inputs
8301 `(("python-pytest" ,python-pytest)))
8302 (synopsis "JavaScript unobfuscator and beautifier")
8303 (description "Beautify, unpack or deobfuscate JavaScript, leveraging
8304popular online obfuscators.")
8305 (license license:expat)))
8306
44d10b1f
RW
8307(define-public jupyter
8308 (package
8309 (name "jupyter")
8310 (version "1.0.0")
8311 (source
8312 (origin
8313 (method url-fetch)
8314 (uri (pypi-uri "jupyter" version))
8315 (sha256
8316 (base32
8317 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
8318 (build-system python-build-system)
8319 (arguments '(#:tests? #f)) ; there are none.
8320 (propagated-inputs
8321 `(("python-ipykernel" ,python-ipykernel)
8322 ("python-ipywidgets" ,python-ipywidgets)
8323 ("python-jupyter-console" ,python-jupyter-console)
8324 ("python-nbconvert" ,python-nbconvert)
8325 ("python-notebook" ,python-notebook)
8326 ("python-qtconsole" ,python-qtconsole)))
8327 (native-search-paths
8328 (list (search-path-specification
8329 (variable "JUPYTER_PATH")
8330 (files '("share/jupyter")))))
8331 (home-page "https://jupyter.org")
8332 (synopsis "Web application for interactive documents")
8333 (description
8334 "The Jupyter Notebook is a web application that allows you to create and
8335share documents that contain live code, equations, visualizations and
8336explanatory text. Uses include: data cleaning and transformation, numerical
8337simulation, statistical modeling, machine learning and much more.")
8338 (license license:bsd-3)))
8339
8340(define-public python-chardet
8341 (package
8342 (name "python-chardet")
8343 (version "3.0.4")
8344 (source
8345 (origin
8346 (method url-fetch)
8347 (uri (pypi-uri "chardet" version))
8348 (sha256
8349 (base32
8350 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
8351 (native-inputs
8352 `(("python-hypothesis" ,python-hypothesis)
8353 ("python-pytest" ,python-pytest)
8354 ("python-pytest-runner" ,python-pytest-runner)))
8355 (build-system python-build-system)
3d369407
MB
8356 ;; XXX: Incompatible with Pytest 4: <https://github.com/chardet/chardet/issues/173>.
8357 (arguments `(#:tests? #f))
44d10b1f
RW
8358 (home-page "https://github.com/chardet/chardet")
8359 (synopsis "Universal encoding detector for Python 2 and 3")
8360 (description
8361 "This package provides @code{chardet}, a Python module that can
8362automatically detect a wide range of file encodings.")
8363 (license license:lgpl2.1+)))
8364
8365(define-public python2-chardet
8366 (package-with-python2 python-chardet))
8367
8368(define-public python-docopt
8369 (package
8370 (name "python-docopt")
8371 (version "0.6.2")
8372 (source
8373 (origin
11e46326 8374 (method git-fetch)
44d10b1f 8375 ;; The release on PyPI does not include tests.
11e46326
EF
8376 (uri (git-reference
8377 (url "https://github.com/docopt/docopt")
8378 (commit version)))
8379 (file-name (git-file-name name version))
44d10b1f
RW
8380 (sha256
8381 (base32
11e46326 8382 "0aad9gbswnnhssin2q0m5lmpm0ahyf80ahs2zjigbn5y7fvljnd0"))))
44d10b1f
RW
8383 (build-system python-build-system)
8384 (native-inputs
8385 `(("python-pytest" ,python-pytest)))
8386 (arguments
8387 `(#:phases
8388 (modify-phases %standard-phases
8389 (replace 'check
8390 (lambda _ (invoke "py.test"))))))
8391 (home-page "http://docopt.org")
8392 (synopsis "Command-line interface description language for Python")
8393 (description "This library allows the user to define a command-line
8394interface from a program's help message rather than specifying it
4ca7207b 8395programmatically with command-line parsers like @code{getopt} and
44d10b1f
RW
8396@code{argparse}.")
8397 (license license:expat)))
8398
8399(define-public python2-docopt
8400 (package-with-python2 python-docopt))
8401
8402(define-public python-pythondialog
8403 (package
8404 (name "python-pythondialog")
8405 (version "3.4.0")
8406 (source
8407 (origin
8408 (method url-fetch)
8409 (uri (pypi-uri "pythondialog" version))
8410 (sha256
8411 (base32
8412 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
8413 (build-system python-build-system)
8414 (arguments
8415 `(#:phases
8416 (modify-phases %standard-phases
8417 (add-after 'unpack 'patch-path
8418 (lambda* (#:key inputs #:allow-other-keys)
8419 (let* ((dialog (assoc-ref inputs "dialog")))
8420 ;; Since this library really wants to grovel the search path, we
8421 ;; must hardcode dialog's store path into it.
8422 (substitute* "dialog.py"
8423 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
8424 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
8425 #t))))
8426 #:tests? #f)) ; no test suite
8427 (propagated-inputs
8428 `(("dialog" ,dialog)))
8429 (home-page "http://pythondialog.sourceforge.net/")
8430 (synopsis "Python interface to the UNIX dialog utility")
8431 (description "A Python wrapper for the dialog utility. Its purpose is to
8432provide an easy to use, pythonic and comprehensive Python interface to dialog.
8433This allows one to make simple text-mode user interfaces on Unix-like systems")
8434 (license license:lgpl2.1)
8435 (properties `((python2-variant . ,(delay python2-pythondialog))))))
8436
8437(define-public python2-pythondialog
8438 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
8439 (package
8440 (inherit base)
8441 (version (package-version python-pythondialog))
8442 (source (origin
8443 (method url-fetch)
8444 (uri (pypi-uri "python2-pythondialog" version))
8445 (sha256
8446 (base32
8447 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
8448
8449(define-public python-configobj
8450 (package
8451 (name "python-configobj")
8452 (version "5.0.6")
8453 (source (origin
8454 (method url-fetch)
b0758fbb 8455 (uri (pypi-uri "configobj" version))
44d10b1f
RW
8456 (sha256
8457 (base32
8458 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
8459 ;; Patch setup.py so it looks for python-setuptools, which is
8460 ;; required to parse the keyword 'install_requires' in setup.py.
8461 (patches (search-patches "python-configobj-setuptools.patch"))))
8462 (build-system python-build-system)
8463 (propagated-inputs
8464 `(("python-six" ,python-six)))
8465 (synopsis "Config file reading, writing and validation")
8466 (description "ConfigObj is a simple but powerful config file reader and
8467writer: an ini file round tripper. Its main feature is that it is very easy to
8468use, with a straightforward programmer’s interface and a simple syntax for
8469config files.")
8470 (home-page "https://github.com/DiffSK/configobj")
8471 (license license:bsd-3)))
8472
8473(define-public python2-configobj
8474 (package-with-python2 python-configobj))
8475
8476(define-public python-configargparse
8477 (package
8478 (name "python-configargparse")
86ae491f 8479 (version "0.14.0")
44d10b1f
RW
8480 (source (origin
8481 (method url-fetch)
8482 (uri (pypi-uri "ConfigArgParse" version))
8483 (sha256
8484 (base32
86ae491f 8485 "149fy4zya0rsnlkvxbbq43cyr8lscb5k4pj1m6n7f1grwcmzwbif"))))
44d10b1f
RW
8486 (build-system python-build-system)
8487 (native-inputs
8488 `(("python-pyyaml" ,python-pyyaml)))
8489 (arguments
8490 `(#:phases
8491 (modify-phases %standard-phases
8492 (replace 'check
8493 (lambda _
8494 ;; Bypass setuptools-shim because one test relies on "setup.py"
8495 ;; being the first argument passed to the python call.
8496 ;;
8497 ;; NOTE: Many tests do not run because they rely on Python's
8498 ;; built-in test.test_argparse, but we remove the unit tests from
8499 ;; our Python installation.
8500 (invoke "python" "setup.py" "test"))))))
8501 (synopsis "Replacement for argparse")
8502 (description "A drop-in replacement for argparse that allows options to also
8503be set via config files and/or environment variables.")
8504 (home-page "https://github.com/bw2/ConfigArgParse")
8505 (license license:expat)))
8506
8507(define-public python2-configargparse
8508 (package-with-python2 python-configargparse))
8509
8510(define-public python-argparse-manpage
8511 (package
8512 (name "python-argparse-manpage")
8513 (version "1.1")
8514 (source
8515 (origin
8516 (method url-fetch)
8517 (uri (pypi-uri "argparse-manpage" version))
8518 (sha256
8519 (base32
8520 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
8521 (build-system python-build-system)
8522 (home-page "https://github.com/praiskup/argparse-manpage")
8523 (synopsis "Build manual page from Python's ArgumentParser object")
8524 (description
8525 "This package provides tools to build manual pages from Python's
8526@code{ArgumentParser} object.")
8527 (license license:asl2.0)))
8528
3e8f76d8
RW
8529(define-public python-contextlib2
8530 (package
8531 (name "python-contextlib2")
ebd4c251 8532 (version "0.6.0.post1")
3e8f76d8
RW
8533 (source
8534 (origin
8535 (method url-fetch)
8536 (uri (pypi-uri "contextlib2" version))
8537 (sha256
8538 (base32
ebd4c251 8539 "0bhnr2ac7wy5l85ji909gyljyk85n92w8pdvslmrvc8qih4r1x01"))))
3e8f76d8 8540 (build-system python-build-system)
a0fdade2 8541 (home-page "https://contextlib2.readthedocs.org/")
3e8f76d8
RW
8542 (synopsis "Tools for decorators and context managers")
8543 (description "This module is primarily a backport of the Python
85443.2 contextlib to earlier Python versions. Like contextlib, it
8545provides utilities for common tasks involving decorators and context
8546managers. It also contains additional features that are not part of
8547the standard library.")
1e158ba1 8548 (properties `((python2-variant . ,(delay python2-contextlib2))))
3e8f76d8
RW
8549 (license license:psfl)))
8550
44d10b1f 8551(define-public python2-contextlib2
1e158ba1
EF
8552 (let ((base (package-with-python2
8553 (strip-python2-variant python-contextlib2))))
8554 (package
8555 (inherit base)
8556 (arguments
8557 (substitute-keyword-arguments (package-arguments base)
8558 ((#:phases phases)
8559 `(modify-phases ,phases
8560 (replace 'check
8561 (lambda _ (invoke "python" "test_contextlib2.py" "-v")))))))
8562 (native-inputs
8563 `(("python2-unittest2" ,python2-unittest2))))))
44d10b1f
RW
8564
8565(define-public python-texttable
8566 (package
8567 (name "python-texttable")
02422b3b 8568 (version "1.6.2")
44d10b1f
RW
8569 (source
8570 (origin
8571 (method url-fetch)
8572 (uri (pypi-uri "texttable" version))
8573 (sha256
8574 (base32
02422b3b 8575 "1x5l77akfc20x52jma9573qp8l8r07q103pm4l0pbizvh4vp1wzg"))))
44d10b1f 8576 (build-system python-build-system)
02422b3b
RW
8577 (arguments
8578 `(#:phases
8579 (modify-phases %standard-phases
8580 (replace 'check
8581 (lambda _ (invoke "pytest" "tests.py"))))))
8582 (native-inputs
8583 `(("python-pytest" ,python-pytest)))
44d10b1f
RW
8584 (home-page "https://github.com/foutaise/texttable/")
8585 (synopsis "Python module for creating simple ASCII tables")
8586 (description "Texttable is a Python module for creating simple ASCII
8587tables.")
02422b3b 8588 (license license:expat)))
44d10b1f
RW
8589
8590(define-public python2-texttable
8591 (package-with-python2 python-texttable))
8592
8593(define-public python-atomicwrites
8594 (package
8595 (name "python-atomicwrites")
14f10479 8596 (version "1.3.0")
44d10b1f
RW
8597 (source (origin
8598 (method url-fetch)
8599 (uri (pypi-uri "atomicwrites" version))
8600 (sha256
8601 (base32
14f10479 8602 "19ngcscdf3jsqmpcxn6zl5b6anmsajb6izp1smcd1n02midl9abm"))))
44d10b1f
RW
8603 (build-system python-build-system)
8604 (synopsis "Atomic file writes in Python")
8605 (description "Library for atomic file writes using platform dependent tools
8606for atomic file system operations.")
8607 (home-page "https://github.com/untitaker/python-atomicwrites")
8608 (license license:expat)))
8609
8610(define-public python2-atomicwrites
8611 (package-with-python2 python-atomicwrites))
8612
8613(define-public python-click-threading
8614 (package
8615 (name "python-click-threading")
8616 (version "0.4.4")
8617 (source (origin
8618 (method url-fetch)
8619 (uri (pypi-uri "click-threading" version))
8620 (sha256
8621 (base32
8622 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
8623 (build-system python-build-system)
8624 (propagated-inputs
8625 `(("python-click" ,python-click)))
8626 (synopsis "Utilities for multithreading in Click")
8627 (description "This package provides utilities for multithreading in Click
8628applications.")
8629 (home-page "https://github.com/click-contrib/click-threading")
8630 (license license:expat)))
8631
8632(define-public python-click-log
8633 (package
8634 (name "python-click-log")
8635 (version "0.3.2")
8636 (source (origin
8637 (method url-fetch)
8638 (uri (pypi-uri "click-log" version))
8639 (sha256
8640 (base32
8641 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
8642 (build-system python-build-system)
8643 (propagated-inputs
8644 `(("python-click" ,python-click)))
8645 (synopsis "Logging for click applications")
8646 (description "This package provides a Python library for logging Click
8647applications.")
8648 (home-page "https://github.com/click-contrib/click-log")
8649 (license license:expat)))
8650
8651(define-public python-apipkg
8652 (package
8653 (name "python-apipkg")
8654 (version "1.4")
8655 (source (origin
8656 (method url-fetch)
8657 (uri (pypi-uri "apipkg" version))
8658 (sha256
8659 (base32
8660 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
8661 (build-system python-build-system)
8662 (native-inputs
8663 `(("python-pytest" ,python-pytest)))
8664 (synopsis "Namespace control and lazy-import mechanism")
8665 (description "With apipkg you can control the exported namespace of a Python
8666package and greatly reduce the number of imports for your users. It is a small
8667pure Python module that works on virtually all Python versions.")
8668 (home-page "https://github.com/pytest-dev/apipkg")
8669 (license license:expat)))
8670
8671(define-public python2-apipkg
8672 (package-with-python2 python-apipkg))
8673
8674(define-public python-execnet
8675 (package
8676 (name "python-execnet")
8677 (version "1.4.1")
8678 (source (origin
8679 (method url-fetch)
8680 (uri (pypi-uri "execnet" version))
8681 (sha256
8682 (base32
8683 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
8684 (build-system python-build-system)
8685 (arguments
8686 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
8687 ;; The two test failures are caused by the lack of an `ssh` executable.
8688 ;; The test suite can be run with pytest after the 'install' phase.
8689 #:tests? #f))
8690 (native-inputs
8691 `(("python-pytest" ,python-pytest)
8692 ("python-setuptools-scm" ,python-setuptools-scm)))
8693 (propagated-inputs
8694 `(("python-apipkg" ,python-apipkg)))
8695 (synopsis "Rapid multi-Python deployment")
8696 (description "Execnet provides a share-nothing model with
8697channel-send/receive communication for distributing execution across many
8698Python interpreters across version, platform and network barriers. It has a
8699minimal and fast API targeting the following uses:
8700@enumerate
8701@item distribute tasks to (many) local or remote CPUs
8702@item write and deploy hybrid multi-process applications
8703@item write scripts to administer multiple environments
8704@end enumerate")
14a5146f 8705 (home-page "https://codespeak.net/execnet/")
44d10b1f
RW
8706 (license license:expat)))
8707
8708(define-public python2-execnet
8709 (package-with-python2 python-execnet))
8710
8711(define-public python-icalendar
8712 (package
8713 (name "python-icalendar")
43ae8f79 8714 (version "4.0.4")
44d10b1f
RW
8715 (source (origin
8716 (method url-fetch)
8717 (uri (pypi-uri "icalendar" version))
8718 (sha256
8719 (base32
43ae8f79 8720 "16gjvqv0n05jrb9g228pdjgzd3amz2pdhvcgsn1jypszjg5m2w9l"))))
44d10b1f
RW
8721 (build-system python-build-system)
8722 (propagated-inputs
8723 `(("python-dateutil" ,python-dateutil)
8724 ("python-pytz" ,python-pytz)))
8725 (synopsis "Python library for parsing iCalendar files")
8726 (description "The icalendar package is a parser/generator of iCalendar
8727files for use with Python.")
8728 (home-page "https://github.com/collective/icalendar")
8729 (license license:bsd-2)))
8730
44d10b1f
RW
8731(define-public python-args
8732 (package
8733 (name "python-args")
8734 (version "0.1.0")
8735 (source (origin
8736 (method url-fetch)
8737 (uri (pypi-uri "args" version))
8738 (sha256
8739 (base32
8740 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
8741 (build-system python-build-system)
8742 (home-page "https://github.com/kennethreitz/args")
8743 (synopsis "Command-line argument parser")
8744 (description
8745 "This library provides a Python module to parse command-line arguments.")
8746 (license license:bsd-3)))
8747
8748(define-public python2-args
8749 (package-with-python2 python-args))
8750
8751(define-public python-clint
8752 (package
8753 (name "python-clint")
8754 (version "0.5.1")
8755 (source (origin
8756 (method url-fetch)
8757 (uri (pypi-uri "clint" version))
8758 (sha256
8759 (base32
8760 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
8761 (build-system python-build-system)
8762 (arguments
8763 '(#:phases
8764 (modify-phases %standard-phases
8765 (replace 'check
8766 (lambda _ (invoke "py.test" "-v"))))))
8767 (native-inputs
8768 `(("python-pytest" ,python-pytest)))
8769 (propagated-inputs
8770 `(("python-args" ,python-args)))
8771 (home-page "https://github.com/kennethreitz/clint")
8772 (synopsis "Command-line interface tools")
8773 (description
8774 "Clint is a Python module filled with a set of tools for developing
8775command-line applications, including tools for colored and indented
8776output, progress bar display, and pipes.")
8777 (license license:isc)))
8778
8779(define-public python2-clint
8780 (package-with-python2 python-clint))
8781
44d10b1f
RW
8782(define-public python-rply
8783 (package
8784 (name "python-rply")
8785 (version "0.7.5")
8786 (source (origin
8787 (method url-fetch)
8788 (uri (pypi-uri "rply" version))
8789 (sha256
8790 (base32
8791 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
8792 (build-system python-build-system)
8793 (propagated-inputs
8794 `(("python-appdirs" ,python-appdirs)))
8795 (home-page "https://github.com/alex/rply")
8796 (synopsis "Parser generator for Python")
8797 (description
8798 "This package provides a pure Python based parser generator, that also
8799works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
8800with a new public API, and RPython support.")
8801 (license license:bsd-3)))
8802
8803(define-public python2-rply
8804 (package-with-python2 python-rply))
8805
8806(define-public python-hy
8807 (package
8808 (name "python-hy")
c215051d 8809 (version "0.17.0")
44d10b1f
RW
8810 (source (origin
8811 (method url-fetch)
8812 (uri (pypi-uri "hy" version))
8813 (sha256
8814 (base32
c215051d 8815 "1gdbqsirsdxj320wnp7my5awzs1kfs6m4fqmkzbd1zd47qzj0zfi"))))
44d10b1f
RW
8816 (build-system python-build-system)
8817 (arguments
8818 '(#:phases
8819 (modify-phases %standard-phases
6ba6a1c1
JG
8820 (add-before 'install 'set-HOME
8821 (lambda _
8822 (setenv "HOME" "/tmp")))
44d10b1f
RW
8823 (replace 'check
8824 (lambda _
8825 ;; Tests require write access to HOME.
8826 (setenv "HOME" "/tmp")
8827 (invoke "nosetests"))))))
8828 (native-inputs
8829 `(("python-coverage" ,python-coverage)
8830 ("python-nose" ,python-nose)))
8831 (propagated-inputs
8832 `(("python-astor" ,python-astor)
8833 ("python-clint" ,python-clint)
c215051d
JG
8834 ("python-rply" ,python-rply)
8835 ("python-fastentrypoints"
8836 ,python-fastentrypoints)
8837 ("python-funcparserlib"
8838 ,python-funcparserlib)))
44d10b1f
RW
8839 (home-page "http://hylang.org/")
8840 (synopsis "Lisp frontend to Python")
8841 (description
8842 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
8843its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
8844Python at your fingertips, in Lisp form.")
8845 (license license:expat)))
8846
8847(define-public python2-hy
8848 (package-with-python2 python-hy))
8849
8850(define-public python2-functools32
8851 (package
8852 (name "python2-functools32")
8853 (version "3.2.3-2")
8854 (source
8855 (origin
8856 (method url-fetch)
8857 (uri (pypi-uri "functools32" version))
8858 (sha256
8859 (base32
8860 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
8861 (build-system python-build-system)
8862 (arguments
8863 `(#:python ,python-2
8864 #:tests? #f)) ; no test target
8865 (home-page "https://github.com/MiCHiLU/python-functools32")
8866 (synopsis
8867 "Backport of the functools module from Python 3.2.3")
8868 (description
8869 "This package is a backport of the @code{functools} module from Python
88703.2.3 for use with older versions of Python and PyPy.")
8871 (license license:expat)))
8872
8873(define-public python2-subprocess32
8874 (package
8875 (name "python2-subprocess32")
8876 (version "3.2.7")
8877 (source (origin
8878 (method url-fetch)
8879 (uri (pypi-uri "subprocess32" version))
8880 (sha256
8881 (base32
8882 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
8883 (patches
8884 (search-patches "python2-subprocess32-disable-input-test.patch"))))
8885 (build-system python-build-system)
8886 (arguments
8887 `(#:python ,python-2
8888 ;; The test suite fails with Python > 2.7.13:
8889 ;; import test.support
8890 ;; ImportError: No module named support
8891 #:tests? #f
8892 #:phases
8893 (modify-phases %standard-phases
8894 (add-after 'unpack 'patch-/bin/sh
8895 (lambda _
8896 (substitute* '("subprocess32.py"
8897 "test_subprocess32.py")
8898 (("/bin/sh") (which "sh")))
8899 #t)))))
8900 (home-page "https://github.com/google/python-subprocess32")
8901 (synopsis "Backport of the subprocess module from Python 3.2")
8902 (description
8903 "This is a backport of the @code{subprocess} standard library module
8904from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
8905new features. On POSIX systems it is guaranteed to be reliable when used
8906in threaded applications. It includes timeout support from Python 3.3 but
8907otherwise matches 3.2’s API.")
8908 (license license:psfl)))
8909
8910(define-public python2-futures
8911 (package
8912 (name "python2-futures")
8913 (version "3.2.0")
8914 (source
8915 (origin
8916 (method url-fetch)
8917 (uri (pypi-uri "futures" version))
8918 (sha256
8919 (base32
8920 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
8921 (build-system python-build-system)
ba88eea2
RW
8922 (arguments
8923 `(#:python ,python-2
8924 #:phases
8925 (modify-phases %standard-phases
8926 (replace 'check
8927 (lambda _
8928 (invoke "python" "test_futures.py")
8929 #t)))))
44d10b1f
RW
8930 (home-page "https://github.com/agronholm/pythonfutures")
8931 (synopsis
8932 "Backport of the concurrent.futures package from Python 3.2")
8933 (description
8934 "The concurrent.futures module provides a high-level interface for
8935asynchronously executing callables. This package backports the
8936concurrent.futures package from Python 3.2")
8937 (license license:bsd-3)))
8938
8939(define-public python-promise
8940 (package
8941 (name "python-promise")
8942 (version "0.4.2")
8943 (source
8944 (origin
8945 (method url-fetch)
8946 (uri (pypi-uri "promise" version))
8947 (sha256
8948 (base32
8949 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
8950 (build-system python-build-system)
8951 ;; Tests wants python-futures, which is a python2 only program, and
8952 ;; can't be found by python-promise at test time.
8953 (arguments `(#:tests? #f))
8954 (home-page "https://github.com/syrusakbary/promise")
8955 (synopsis "Promises/A+ implementation for Python")
8956 (description
8957 "Promises/A+ implementation for Python")
8958 (properties `((python2-variant . ,(delay python2-promise))))
8959 (license license:expat)))
8960
8961(define-public python2-promise
8962 (let ((promise (package-with-python2
8963 (strip-python2-variant python-promise))))
8964 (package (inherit promise)
8965 (arguments (substitute-keyword-arguments (package-arguments promise)
8966 ((#:tests? _) #t)))
8967 (native-inputs
8968 `(("python2-futures" ,python2-futures)
8969 ("python2-pytest" ,python2-pytest)
8970 ,@(package-native-inputs promise))))))
8971
d71d85cd
RW
8972(define-public python-progressbar33
8973 (package
8974 (name "python-progressbar33")
8975 (version "2.4")
8976 (source
8977 (origin
8978 (method url-fetch)
8979 (uri (pypi-uri "progressbar33" version))
8980 (sha256
8981 (base32
8982 "1zvf6zs5hzrc03p9nfs4p16vhilqikycvv1yk0pxn8s07fdhvzji"))))
8983 (build-system python-build-system)
8984 (home-page "http://github.com/germangh/python-progressbar")
8985 (synopsis "Text progress bar library for Python")
8986 (description
8987 "This package provides a text progress bar library for Python. This
8988version only differs from the original @code{progressbar} package in that it
8989uses relative package imports instead of absolute imports, which is necessary
8990for the module to work under Python 3.3.")
8991 ;; Either or both of these licenses may be selected.
8992 (license (list license:lgpl2.1+ license:bsd-3))))
8993
44d10b1f
RW
8994(define-public python-colorama
8995 (package
8996 (name "python-colorama")
bd137055 8997 (version "0.4.3")
44d10b1f
RW
8998 (source
8999 (origin
9000 (method url-fetch)
9001 (uri (pypi-uri "colorama" version))
9002 (sha256
9003 (base32
bd137055 9004 "189n8hpijy14jfan4ha9f5n06mnl33cxz7ay92wjqgkr639s0vg9"))))
44d10b1f
RW
9005 (build-system python-build-system)
9006 (synopsis "Colored terminal text rendering for Python")
9007 (description "Colorama is a Python library for rendering colored terminal
9008text.")
e85af137 9009 (home-page "https://pypi.org/project/colorama/")
44d10b1f
RW
9010 (license license:bsd-3)))
9011
9012(define-public python2-colorama
9013 (package-with-python2 python-colorama))
9014
9015(define-public python-rsa
9016 (package
9017 (name "python-rsa")
9018 (version "3.4.2")
9019 (source
9020 (origin
9021 (method url-fetch)
9022 (uri (pypi-uri "rsa" version))
9023 (sha256
9024 (base32
9025 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
9026 (build-system python-build-system)
9027 (propagated-inputs
9028 `(("python-pyasn1" ,python-pyasn1)))
9029 (synopsis "Pure-Python RSA implementation")
9030 (description "Python-RSA is a pure-Python RSA implementation. It supports
9031encryption and decryption, signing and verifying signatures, and key
9032generation according to PKCS#1 version 1.5. It can be used as a Python
9033library as well as on the command line.")
9034 (home-page "https://stuvel.eu/rsa")
9035 (license license:asl2.0)))
9036
9037(define-public python2-rsa
9038 (package-with-python2 python-rsa))
9039
9040(define-public python-pluggy
9041 (package
9042 (name "python-pluggy")
e5731c03 9043 (version "0.11.0")
44d10b1f
RW
9044 (source
9045 (origin
9046 (method url-fetch)
9047 (uri (pypi-uri "pluggy" version))
9048 (sha256
9049 (base32
e5731c03 9050 "10511a54dvafw1jrk75mrhml53c7b7w4yaw7241696lc2hfvr895"))))
44d10b1f
RW
9051 (build-system python-build-system)
9052 (native-inputs
9053 `(("python-setuptools-scm" ,python-setuptools-scm)))
9054 (synopsis "Plugin and hook calling mechanism for Python")
9055 (description "Pluggy is an extraction of the plugin manager as used by
9056Pytest but stripped of Pytest specific details.")
e85af137 9057 (home-page "https://pypi.org/project/pluggy/")
44d10b1f
RW
9058 (license license:expat)))
9059
9060(define-public python2-pluggy
9061 (package-with-python2 python-pluggy))
9062
9063(define-public python-tox
9064 (package
9065 (name "python-tox")
9066 (version "2.8.1")
9067 (source
9068 (origin
9069 (method url-fetch)
9070 (uri (pypi-uri "tox" version))
9071 (sha256
9072 (base32
9073 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
9074 (build-system python-build-system)
9075 (arguments
9076 ;; FIXME: Tests require pytest-timeout, which itself requires
9077 ;; pytest>=2.8.0 for installation.
9078 '(#:tests? #f))
9079 (propagated-inputs
9080 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
9081 ("python-py" ,python-py)
9082 ("python-virtualenv" ,python-virtualenv)))
9083 (native-inputs
9084 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
9085 ("python-pytest" ,python-pytest) ; >= 2.3.5
9086 ("python-setuptools-scm" ,python-setuptools-scm)))
d81fb2ae 9087 (home-page "https://tox.readthedocs.io")
44d10b1f
RW
9088 (synopsis "Virtualenv-based automation of test activities")
9089 (description "Tox is a generic virtualenv management and test command line
9090tool. It can be used to check that a package installs correctly with
9091different Python versions and interpreters, or run tests in each type of
9092supported environment, or act as a frontend to continuous integration
9093servers.")
9094 (license license:expat)))
9095
9096(define-public python2-tox
9097 (package-with-python2 python-tox))
9098
9099(define-public python-jmespath
9100 (package
9101 (name "python-jmespath")
27fb781f 9102 (version "0.9.4")
44d10b1f
RW
9103 (source
9104 (origin
9105 (method url-fetch)
9106 (uri (pypi-uri "jmespath" version))
9107 (sha256
9108 (base32
27fb781f 9109 "0k0765x1mybcrzajh3hiqkl8sy9hs0bmn4900frxy0j3ykvaxqmx"))))
44d10b1f
RW
9110 (build-system python-build-system)
9111 (native-inputs
9112 `(("python-nose" ,python-nose)))
9113 (synopsis "JSON Matching Expressions")
9114 (description "JMESPath (pronounced “james path”) is a Python library that
9115allows one to declaratively specify how to extract elements from a JSON
9116document.")
9117 (home-page "https://github.com/jmespath/jmespath.py")
9118 (license license:expat)))
9119
9120(define-public python2-jmespath
9121 (package-with-python2 python-jmespath))
9122
9123(define-public python-botocore
9124 (package
7bcf827c
RW
9125 (name "python-botocore")
9126 (version "1.12.149")
9127 (source
9128 (origin
9129 (method url-fetch)
9130 (uri (pypi-uri "botocore" version))
9131 (sha256
9132 (base32
9133 "12597f74khp3ngwr282cb949w0gcqj20rkfc3x275dijavyy5cmf"))))
9134 (build-system python-build-system)
9135 (arguments
9136 ;; FIXME: Many tests are failing.
9137 '(#:tests? #f))
9138 (propagated-inputs
9139 `(("python-dateutil" ,python-dateutil)
9140 ("python-docutils" ,python-docutils)
9141 ("python-jmespath" ,python-jmespath)))
9142 (native-inputs
9143 `(("python-mock" ,python-mock)
9144 ("python-nose" ,python-nose)
9145 ("behave" ,behave)
9146 ("python-tox" ,python-tox)
9147 ("python-urllib3" ,python-urllib3)
9148 ("python-wheel" ,python-wheel)))
9149 (home-page "https://github.com/boto/botocore")
9150 (synopsis "Low-level interface to AWS")
9151 (description "Botocore is a Python library that provides a low-level
44d10b1f 9152interface to the Amazon Web Services (AWS) API.")
7bcf827c 9153 (license license:asl2.0)))
44d10b1f
RW
9154
9155(define-public python2-botocore
9156 (package-with-python2 python-botocore))
9157
9158(define-public python-xdo
9159 (package
9160 (name "python-xdo")
9161 (version "0.3")
9162 (source (origin
9163 (method url-fetch)
9164 (uri (string-append
9165 "http://http.debian.net/debian/pool/main/p/python-xdo/"
9166 "python-xdo_" version ".orig.tar.gz"))
9167 (sha256
9168 (base32
9169 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
9170 (build-system python-build-system)
9171 (arguments
9172 '(#:phases
9173 (modify-phases %standard-phases
9174 (add-before 'install 'patch-libxdo-path
9175 ;; Hardcode the path of dynamically loaded libxdo library.
9176 (lambda* (#:key inputs #:allow-other-keys)
9177 (let ((libxdo (string-append
9178 (assoc-ref inputs "xdotool")
9179 "/lib/libxdo.so")))
9180 (substitute* "xdo/_xdo.py"
9181 (("find_library\\(\"xdo\"\\)")
9182 (simple-format #f "\"~a\"" libxdo)))
9183 #t))))
9184 #:tests? #f)) ; no tests provided
9185 (propagated-inputs
9186 `(("python-six" ,python-six)))
9187 (inputs
9188 `(("xdotool" ,xdotool)
9189 ("libX11" ,libx11)))
9190 (home-page "https://tracker.debian.org/pkg/python-xdo")
9191 (synopsis "Python library for simulating X11 keyboard/mouse input")
9192 (description "Provides bindings to libxdo for manipulating X11 via simulated
9193input. (Note that this is mostly a legacy library; you may wish to look at
9194python-xdo for newer bindings.)")
9195 (license license:bsd-3)))
9196
9197(define-public python2-xdo
9198 (package-with-python2 python-xdo))
9199
9200(define-public python-mako
9201 (package
9202 (name "python-mako")
6bf53ad5 9203 (version "1.1.0")
44d10b1f
RW
9204 (source
9205 (origin
9206 (method url-fetch)
9207 (uri (pypi-uri "Mako" version))
9208 (sha256
9209 (base32
6bf53ad5 9210 "0jqa3qfpykyn4fmkn0kh6043sfls7br8i2bsdbccazcvk9cijsd3"))))
44d10b1f 9211 (build-system python-build-system)
6bf53ad5
MB
9212 (arguments
9213 `(#:phases (modify-phases %standard-phases
9214 (replace 'check
9215 (lambda _
9216 (invoke "pytest" "-vv"))))))
44d10b1f
RW
9217 (propagated-inputs
9218 `(("python-markupsafe" ,python-markupsafe)))
9219 (native-inputs
9220 `(("python-mock" ,python-mock)
44d10b1f 9221 ("python-pytest" ,python-pytest)))
7016e620 9222 (home-page "https://www.makotemplates.org/")
44d10b1f
RW
9223 (synopsis "Templating language for Python")
9224 (description "Mako is a templating language for Python that compiles
9225templates into Python modules.")
9226 (license license:expat)))
9227
9228(define-public python2-mako
9229 (package-with-python2 python-mako))
9230
9231(define-public python-waitress
9232 (package
9233 (name "python-waitress")
9234 (version "1.1.0")
9235 (source
9236 (origin
9237 (method url-fetch)
9238 (uri (pypi-uri "waitress" version))
9239 (patches (search-patches "python-waitress-fix-tests.patch"))
9240 (sha256
9241 (base32
9242 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
9243 (build-system python-build-system)
9244 (home-page "https://github.com/Pylons/waitress")
9245 (synopsis "Waitress WSGI server")
9246 (description "Waitress is meant to be a production-quality pure-Python WSGI
9247server with very acceptable performance.")
9248 (license license:zpl2.1)))
9249
9250(define-public python2-waitress
9251 (package-with-python2 python-waitress))
9252
b2b23d12
TLC
9253(define-public python-whichcraft
9254 (package
9255 (name "python-whichcraft")
9256 (version "0.6.1")
9257 (source
9258 (origin
9259 (method url-fetch)
9260 (uri (pypi-uri "whichcraft" version))
9261 (sha256
9262 (base32
9263 "11yfkzyplizdgndy34vyd5qlmr1n5mxis3a3svxmx8fnccdvknxc"))))
9264 (build-system python-build-system)
9265 (native-inputs
9266 `(("python-pytest" ,python-pytest)))
9267 (home-page "https://github.com/pydanny/whichcraft")
9268 (synopsis "Cross-platform cross-python shutil.which functionality")
9269 (description
9270 "This package provides a shim of the shutil.which function that's
9271designed to work across multiple versions of Python.")
9272 (license license:bsd-3)))
9273
1133ca44
TLC
9274(define-public python-cookiecutter
9275 (package
9276 (name "python-cookiecutter")
9277 (version "1.6.0")
9278 (source
9279 (origin
9280 (method url-fetch)
9281 (uri (pypi-uri "cookiecutter" version))
9282 (sha256
9283 (base32
9284 "0glsvaz8igi2wy1hsnhm9fkn6560vdvdixzvkq6dn20z3hpaa5hk"))))
9285 (build-system python-build-system)
9286 (native-inputs
9287 `(("python-freezegun" ,python-freezegun)
9288 ("python-pytest" ,python-pytest)
9289 ("python-pytest-catchlog" ,python-pytest-catchlog)
9290 ("python-pytest-cov" ,python-pytest-cov)
9291 ("python-pytest-mock" ,python-pytest-mock)))
9292 (propagated-inputs
9293 `(("python-binaryornot" ,python-binaryornot)
9294 ("python-click" ,python-click)
9295 ("python-future" ,python-future)
9296 ("python-jinja2" ,python-jinja2)
9297 ("python-jinja2-time" ,python-jinja2-time)
9298 ("python-poyo" ,python-poyo)
9299 ("python-requests" ,python-requests)
9300 ("python-whichcraft" ,python-whichcraft)))
9301 (home-page "https://github.com/audreyr/cookiecutter")
9302 (synopsis
9303 "Command-line utility that creates projects from project templates")
9304 (description
9305 "This package provides a command-line utility that creates projects from
9306project templates, e.g. creating a Python package project from a Python package
9307project template.")
9308 (license license:bsd-3)))
9309
44d10b1f
RW
9310(define-public python-pyquery
9311 (package
9312 (name "python-pyquery")
9313 (version "1.2.17")
9314 (source
9315 (origin
9316 (method url-fetch)
9317 (uri (pypi-uri "pyquery" version))
9318 (sha256
9319 (base32
9320 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
9321 (build-system python-build-system)
9322 (native-inputs
9323 `(("python-webob" ,python-webob)
9324 ("python-webtest" ,python-webtest)))
9325 (propagated-inputs
9326 `(("python-lxml" ,python-lxml)
9327 ("python-cssselect" ,python-cssselect)))
9328 (home-page "https://github.com/gawel/pyquery")
9329 (synopsis "Make jQuery-like queries on xml documents")
9330 (description "pyquery allows you to make jQuery queries on xml documents.
9331The API is as much as possible the similar to jQuery. pyquery uses lxml for
9332fast xml and html manipulation.")
9333 (license license:bsd-3)))
9334
44d10b1f
RW
9335(define-public python-anyjson
9336 (package
9337 (name "python-anyjson")
9338 (version "0.3.3")
9339 (source
9340 (origin
9341 (method url-fetch)
9342 (uri (pypi-uri "anyjson" version))
9343 (sha256
9344 (base32
9345 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
9346 (build-system python-build-system)
9347 (arguments
9348 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
9349 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
9350 ;; whatever) so this transformation needs to be done before the tests
9351 ;; can be run. Maybe we could add a build step to transform beforehand
9352 ;; but it could be annoying/difficult.
9353 ;; We can enable tests for the Python 2 version, though, and do below.
9354 #:tests? #f))
9355 (home-page "https://bitbucket.org/runeh/anyjson/")
9356 (synopsis
9357 "Wraps best available JSON implementation in a common interface")
9358 (description
9359 "Anyjson loads whichever is the fastest JSON module installed
9360and provides a uniform API regardless of which JSON implementation is used.")
9361 (license license:bsd-3)
9362 (properties `((python2-variant . ,(delay python2-anyjson))))))
9363
9364(define-public python2-anyjson
9365 (let ((anyjson (package-with-python2
9366 (strip-python2-variant python-anyjson))))
9367 (package
9368 (inherit anyjson)
9369 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
9370 #:tests? #t
9371 ,@(package-arguments anyjson)))
9372 (native-inputs `(("python2-nose" ,python2-nose))))))
9373
9374(define-public python-amqp
9375 (package
9376 (name "python-amqp")
9377 (version "2.3.2")
9378 (source
9379 (origin
9380 (method url-fetch)
9381 (uri (pypi-uri "amqp" version))
9382 (sha256
9383 (base32
9384 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
9385 (build-system python-build-system)
9386 (native-inputs
9387 `(("python-case" ,python-case)
9388 ("python-pytest-sugar" ,python-pytest-sugar)
9389 ("python-mock" ,python-mock)))
9390 (propagated-inputs
9391 `(("python-vine" ,python-vine)))
9392 (home-page "https://github.com/celery/py-amqp")
9393 (synopsis
9394 "Low-level AMQP client for Python (fork of amqplib)")
9395 (description
9396 "This is a fork of amqplib which was originally written by Barry Pederson.
9397It is maintained by the Celery project, and used by kombu as a pure python
9398alternative when librabbitmq is not available.")
9399 (license license:lgpl2.1+)
9400 (properties `((python2-variant . ,(delay python2-amqp))))))
9401
9402(define-public python2-amqp
9403 (let ((amqp (package-with-python2
9404 (strip-python2-variant python-amqp))))
9405 (package
9406 (inherit amqp)
9407 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
9408 ;; unmaintained. Weirdly, does not do this on the python 3
9409 ;; version?
9410 #:tests? #f
9411 ,@(package-arguments amqp))))))
9412
9413(define-public python-txamqp
9414 (package
9415 (name "python-txamqp")
9416 (version "0.8.2")
9417 (source
9418 (origin
9419 (method url-fetch)
9420 (uri (pypi-uri "txAMQP" version))
9421 (sha256
9422 (base32
9423 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
9424 (build-system python-build-system)
9425 (propagated-inputs
9426 `(("python-six" ,python-six)
9427 ("python-twisted" ,python-twisted)))
9428 (home-page "https://github.com/txamqp/txamqp")
9429 (synopsis "Communicate with AMQP peers and brokers using Twisted")
9430 (description
9431 "This package provides a Python library for communicating with AMQP peers
9432and brokers using the asynchronous networking framework Twisted. It contains
9433all the necessary code to connect, send and receive messages to/from an
9434AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
9435also includes support for using Thrift RPC over AMQP in Twisted
9436applications.")
9437 (license license:asl2.0)))
9438
9439(define-public python2-txamqp
9440 (package-with-python2 python-txamqp))
9441
9442(define-public python-kombu
9443 (package
9444 (name "python-kombu")
9445 (version "4.2.2")
9446 (source
9447 (origin
9448 (method url-fetch)
9449 (uri (pypi-uri "kombu" version))
9450 (sha256
9451 (base32
9452 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
9453 (build-system python-build-system)
9454 (native-inputs
9455 `(("python-mock" ,python-mock)
9456 ("python-case" ,python-case)
9457 ("python-pyro4" ,python-pyro4)
9458 ("python-pytest-sugar" ,python-pytest-sugar)
9459 ("python-pytz" ,python-pytz)))
9460 (propagated-inputs
9461 `(("python-anyjson" ,python-anyjson)
9462 ("python-amqp" ,python-amqp)
9463 ("python-redis" ,python-redis)))
9464 (home-page "https://kombu.readthedocs.io")
9465 (synopsis "Message passing library for Python")
9466 (description "The aim of Kombu is to make messaging in Python as easy as
9467possible by providing an idiomatic high-level interface for the AMQ protocol,
9468and also provide proven and tested solutions to common messaging problems.
9469AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
9470message orientation, queuing, routing, reliability and security, for which the
9471RabbitMQ messaging server is the most popular implementation.")
9472 (license license:bsd-3)
9473 (properties `((python2-variant . ,(delay python2-kombu))))))
9474
9475(define-public python2-kombu
9476 (let ((kombu (package-with-python2
9477 (strip-python2-variant python-kombu))))
9478 (package
9479 (inherit kombu)
9480 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
9481 ;; It works fine on the python3 variant.
9482 #:tests? #f
9483 ,@(package-arguments kombu)))
9484 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9485 ,@(package-native-inputs kombu))))))
9486
9487(define-public python-billiard
9488 (package
9489 (name "python-billiard")
9490 (version "3.5.0.5")
9491 (source
9492 (origin
9493 (method url-fetch)
9494 (uri (pypi-uri "billiard" version))
9495 (sha256
9496 (base32
9497 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
9498 (build-system python-build-system)
9499 (native-inputs
9500 `(("python-case" ,python-case)
9501 ("python-pytest" ,python-pytest)))
9502 (home-page "https://github.com/celery/billiard")
9503 (synopsis
9504 "Python multiprocessing fork with improvements and bugfixes")
9505 (description
9506 "Billiard is a fork of the Python 2.7 multiprocessing package. The
9507multiprocessing package itself is a renamed and updated version of R Oudkerk's
9508pyprocessing package. This standalone variant is intended to be compatible with
9509Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
9510 (license license:bsd-3)
9511 (properties `((python2-variant . ,(delay python2-billiard))))))
9512
9513(define-public python2-billiard
9514 (let ((billiard (package-with-python2
9515 (strip-python2-variant python-billiard))))
9516 (package
9517 (inherit billiard)
9518 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9519 ("python2-mock" ,python2-mock)
9520 ,@(package-native-inputs billiard))))))
9521
9522(define-public python-celery
9523 (package
9524 (name "python-celery")
9525 (version "4.2.1")
9526 (source
9527 (origin
9528 (method url-fetch)
9529 (uri (pypi-uri "celery" version))
9530 (sha256
9531 (base32
9532 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
9533 (build-system python-build-system)
9534 (arguments
9535 '(;; TODO The tests fail with Python 3.7
9536 ;; https://github.com/celery/celery/issues/4849
9537 #:tests? #f
9538 #:phases
9539 (modify-phases %standard-phases
9540 (add-after 'unpack 'patch-requirements
9541 (lambda _
9542 (substitute* "requirements/test.txt"
9543 (("pytest>=3\\.0,<3\\.3")
9544 "pytest>=3.0"))
9545 #t)))))
9546 (native-inputs
9547 `(("python-case" ,python-case)
9548 ("python-pytest" ,python-pytest)))
9549 (propagated-inputs
9550 `(("python-pytz" ,python-pytz)
9551 ("python-billiard" ,python-billiard)
9552 ("python-kombu" ,python-kombu)))
9553 (home-page "https://celeryproject.org")
9554 (synopsis "Distributed Task Queue")
9555 (description "Celery is an asynchronous task queue/job queue based on
9556distributed message passing. It is focused on real-time operation, but
9557supports scheduling as well. The execution units, called tasks, are executed
9558concurrently on a single or more worker servers using multiprocessing,
9559Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
9560synchronously (wait until ready).")
9561 (license license:bsd-3)
9562 (properties `((python2-variant . ,(delay python2-celery))))))
9563
9564(define-public python2-celery
9565 (let ((celery (package-with-python2
9566 (strip-python2-variant python-celery))))
9567 (package
9568 (inherit celery)
9569 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9570 ("python2-mock" ,python2-mock)
9571 ,@(package-native-inputs celery))))))
9572
9573(define-public python-translitcodec
9574 (package
9575 (name "python-translitcodec")
9576 (version "0.4.0")
9577 (source
9578 (origin
9579 (method url-fetch)
9580 (uri (pypi-uri "translitcodec" version))
9581 (sha256
9582 (base32
9583 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
9584 (build-system python-build-system)
9585 (arguments
9586 `(#:tests? #f)) ; no tests provided
9587 (home-page
9588 "https://github.com/claudep/translitcodec")
9589 (synopsis
9590 "Unicode to 8-bit charset transliteration codec")
9591 (description
9592 "This package contains codecs for transliterating ISO 10646 texts into
9593best-effort representations using smaller coded character sets (ASCII,
9594ISO 8859, etc.).")
9595 (license license:expat)))
9596
9597(define-public python2-translitcodec
9598 (package-with-python2 python-translitcodec))
9599
9600(define-public python-editor
9601 (package
9602 (name "python-editor")
9603 (version "0.5")
9604 (source
9605 (origin
9606 (method url-fetch)
9607 (uri (pypi-uri "python-editor" version))
9608 (sha256
9609 (base32
9610 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
9611 (build-system python-build-system)
9612 (home-page
9613 "https://github.com/fmoo/python-editor")
9614 (synopsis
9615 "Programmatically open an editor, capture the result")
9616 (description
9617 "python-editor is a library that provides the editor module for
9618programmatically interfacing with your system's $EDITOR.")
9619 (license license:asl2.0)))
9620
9621(define-public python2-editor
9622 (package-with-python2 python-editor))
9623
44d10b1f
RW
9624(define-public python-vobject
9625 (package
9626 (name "python-vobject")
9627 (version "0.9.5")
9628 (source (origin
9629 (method url-fetch)
9630 (uri (pypi-uri "vobject" version))
9631 (sha256
9632 (base32
9633 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
9634 (build-system python-build-system)
9635 (arguments
9636 '(;; The test suite relies on some non-portable Windows interfaces.
9637 #:tests? #f))
9638 (propagated-inputs
9639 `(("python-dateutil" ,python-dateutil)
9640 ("python-pyicu" ,python-pyicu)))
9641 (synopsis "Parse and generate vCard and vCalendar files")
9642 (description "Vobject is intended to be a full featured Python package for
9643parsing and generating vCard and vCalendar files. Currently, iCalendar files
9644are supported and well tested. vCard 3.0 files are supported, and all data
9645should be imported, but only a few components are understood in a sophisticated
9646way.")
5d6e7106 9647 (home-page "https://eventable.github.io/vobject/")
44d10b1f
RW
9648 (license license:asl2.0)))
9649
9650(define-public python2-vobject
9651 (package-with-python2 python-vobject))
9652
9653(define-public python-munkres
9654 (package
9655 (name "python-munkres")
9656 (version "1.0.8")
9657 (source (origin
9658 (method url-fetch)
9659 (uri (pypi-uri "munkres" version))
9660 (sha256
9661 (base32
9662 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
9663 (build-system python-build-system)
9664 (arguments
9665 '(#:tests? #f)) ; no test suite
78f8780e 9666 (home-page "https://software.clapper.org/munkres/")
44d10b1f
RW
9667 (synopsis "Implementation of the Munkres algorithm")
9668 (description "The Munkres module provides an implementation of the Munkres
9669algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
9670useful for solving the Assignment Problem.")
9671 (license license:bsd-3)))
9672
9673(define-public python2-munkres
9674 (package-with-python2 python-munkres))
9675
9676(define-public python-whoosh
9677 (package
9678 (name "python-whoosh")
9679 (version "2.7.4")
9680 (source
9681 (origin
9682 (method url-fetch)
9683 (uri (pypi-uri "Whoosh" version))
9684 (sha256
9685 (base32
9686 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
9687 (build-system python-build-system)
2679d9a4 9688 (arguments '(#:tests? #f)) ; Test invocation is no longer supported by Python.
44d10b1f
RW
9689 (native-inputs
9690 `(("python-pytest" ,python-pytest)))
9691 (home-page "https://bitbucket.org/mchaput/whoosh")
9692 (synopsis "Full text indexing, search, and spell checking library")
9693 (description
9694 "Whoosh is a fast, pure-Python full text indexing, search, and spell
9695checking library.")
9696 (license license:bsd-2)))
9697
9698(define-public python2-whoosh
9699 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
9700 (package (inherit whoosh)
9701 (propagated-inputs
9702 `(("python2-backport-ssl-match-hostname"
9703 ,python2-backport-ssl-match-hostname)
9704 ,@(package-propagated-inputs whoosh))))))
9705
9706(define-public python-pathlib
9707 (package
9708 (name "python-pathlib")
9709 (version "1.0.1")
9710 (source (origin
9711 (method url-fetch)
9712 (uri (pypi-uri "pathlib" version))
9713 (sha256
9714 (base32
9715 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
9716 (build-system python-build-system)
9717 ;; The tests depend on the internal "test" module, which does not provide
9718 ;; a stable interface.
9719 (arguments `(#:tests? #f))
9720 (home-page "https://pathlib.readthedocs.org/")
9721 (synopsis "Object-oriented file system paths")
9722 (description "Pathlib offers a set of classes to handle file system paths.
9723It offers the following advantages over using string objects:
9724
9725@enumerate
9726@item No more cumbersome use of os and os.path functions. Everything can
9727be done easily through operators, attribute accesses, and method calls.
9728@item Embodies the semantics of different path types. For example,
9729comparing Windows paths ignores casing.
9730@item Well-defined semantics, eliminating any inconsistencies or
9731ambiguities (forward vs. backward slashes, etc.).
9732@end enumerate
9733
9734Note: In Python 3.4, pathlib is now part of the standard library. For other
9735Python versions please consider python-pathlib2 instead, which tracks the
9736standard library module. This module (python-pathlib) isn't maintained
9737anymore.")
9738 (license license:expat)))
9739
9740(define-public python2-pathlib
9741 (package-with-python2 python-pathlib))
9742
9743(define-public python2-pathlib2
9744 (package
9745 (name "python2-pathlib2")
54da6f9f 9746 (version "2.3.3")
44d10b1f
RW
9747 (source (origin
9748 (method url-fetch)
9749 (uri (pypi-uri "pathlib2" version))
9750 (sha256
9751 (base32
54da6f9f 9752 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
44d10b1f
RW
9753 (build-system python-build-system)
9754 ;; We only need the the Python 2 variant, since for Python 3 our minimum
9755 ;; version is 3.4 which already includes this package as part of the
9756 ;; standard library.
9757 (arguments
9758 `(#:python ,python-2))
9759 (propagated-inputs
9760 `(("python2-scandir" ,python2-scandir)
9761 ("python2-six" ,python2-six)))
e85af137 9762 (home-page "https://pypi.org/project/pathlib2/")
44d10b1f
RW
9763 (synopsis "Object-oriented file system paths - backport of standard
9764pathlib module")
9765 (description "The goal of pathlib2 is to provide a backport of standard
9766pathlib module which tracks the standard library module, so all the newest
9767features of the standard pathlib can be used also on older Python versions.
9768
9769Pathlib offers a set of classes to handle file system paths. It offers the
9770following advantages over using string objects:
9771
9772@enumerate
9773@item No more cumbersome use of os and os.path functions. Everything can
9774be done easily through operators, attribute accesses, and method calls.
9775@item Embodies the semantics of different path types. For example,
9776comparing Windows paths ignores casing.
9777@item Well-defined semantics, eliminating any inconsistencies or
9778ambiguities (forward vs. backward slashes, etc.).
9779@end enumerate")
9780 (license license:expat)))
9781
9782(define-public python2-pathlib2-bootstrap
9783 (hidden-package
9784 (package
9785 (inherit python2-pathlib2)
9786 (name "python2-pathlib2-bootstrap")
9787 (propagated-inputs
9788 `(("python2-scandir" ,python2-scandir)
9789 ("python2-six" ,python2-six-bootstrap))))))
9790
9791(define-public python-jellyfish
9792 (package
9793 (name "python-jellyfish")
9794 (version "0.5.6")
9795 (source (origin
9796 (method url-fetch)
9797 (uri (pypi-uri "jellyfish" version))
9798 (sha256
9799 (base32
9800 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
9801 (build-system python-build-system)
9802 (native-inputs
9803 `(("python-pytest" ,python-pytest)))
9804 (home-page "https://github.com/jamesturk/jellyfish")
9805 (synopsis "Approximate and phonetic matching of strings")
9806 (description "Jellyfish uses a variety of string comparison and phonetic
9807encoding algorithms to do fuzzy string matching.")
9808 (license license:bsd-2)
9809 (properties `((python2-variant . ,(delay python2-jellyfish))))))
9810
9811(define-public python2-jellyfish
9812 (let ((jellyfish (package-with-python2
9813 (strip-python2-variant python-jellyfish))))
9814 (package (inherit jellyfish)
9815 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
9816 ,@(package-native-inputs jellyfish))))))
9817
9818(define-public python2-unicodecsv
9819 (package
9820 (name "python2-unicodecsv")
9821 (version "0.14.1")
9822 (source (origin
f711b71b 9823 (method git-fetch)
44d10b1f
RW
9824 ;; The test suite is not included in the PyPi release.
9825 ;; https://github.com/jdunck/python-unicodecsv/issues/19
f711b71b
EF
9826 (uri (git-reference
9827 (url "https://github.com/jdunck/python-unicodecsv")
9828 (commit version)))
9829 (file-name (git-file-name name version))
44d10b1f
RW
9830 (sha256
9831 (base32
f711b71b 9832 "15hx2k41a2lpv4hcml9zp4cvlx1171mnb5s4s13xc1pxkq3vgdjy"))))
44d10b1f
RW
9833 (build-system python-build-system)
9834 (arguments
9835 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
9836 #:python ,python-2))
9837 (native-inputs
9838 `(("python2-unittest2" ,python2-unittest2)))
9839 (home-page "https://github.com/jdunck/python-unicodecsv")
9840 (synopsis "Unicode CSV module for Python 2")
9841 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
9842module, adding support for Unicode strings.")
9843 (license license:bsd-2)))
9844
9845(define-public python-rarfile
9846 (package
9847 (name "python-rarfile")
9848 (version "2.8")
9849 (source (origin
9850 (method url-fetch)
9851 (uri (pypi-uri "rarfile" version))
9852 (sha256
9853 (base32
9854 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
9855 (build-system python-build-system)
9856 (arguments
9857 '(#:phases
9858 (modify-phases %standard-phases
9859 (replace 'check
9860 ;; Many tests fail, but the installation proceeds.
e59dd341 9861 (lambda _ (invoke "make" "-C" "test" "test"))))))
44d10b1f
RW
9862 (native-inputs
9863 `(("which" ,which))) ; required for tests
9864 (propagated-inputs
9865 `(("libarchive" ,libarchive)))
9866 (home-page "https://github.com/markokr/rarfile")
9867 (synopsis "RAR archive reader for Python")
9868 (description "This is Python module for RAR archive reading. The interface
9869is made as zipfile like as possible.")
9870 (license license:isc)))
9871
9872(define-public python2-rarfile
9873 (package-with-python2 python-rarfile))
9874
9875(define-public python-magic
9876 (package
9877 (name "python-magic")
9878 (version "0.4.15")
9879 (source
9880 (origin
9881 (method url-fetch)
9882 (uri (pypi-uri "python-magic" version))
9883 (sha256
9884 (base32
9885 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
9886 (file-name (string-append name "-" version "-checkout"))))
9887 (build-system python-build-system)
9888 (arguments
9889 ;; The tests are unreliable, so don't run them. The tests fail
9890 ;; under Python3 because they were written for Python2 and
9891 ;; contain import statements that do not work in Python3. One of
9892 ;; the tests fails under Python2 because its assertions are
9893 ;; overly stringent; it relies on comparing output strings which
9894 ;; are brittle and can change depending on the version of
9895 ;; libmagic being used and the system on which the test is
9896 ;; running. In my case, under GuixSD 0.10.0, only one test
9897 ;; failed, and it seems to have failed only because the version
9898 ;; of libmagic that is packaged in Guix outputs a slightly
9899 ;; different (but not wrong) string than the one that the test
9900 ;; expected.
9901 '(#:tests? #f
9902 #:phases (modify-phases %standard-phases
9903 ;; Replace a specific method call with a hard-coded
9904 ;; path to the necessary libmagic.so file in the
9905 ;; store. If we don't do this, then the method call
9906 ;; will fail to find the libmagic.so file, which in
9907 ;; turn will cause any application using
9908 ;; python-magic to fail.
9909 (add-before 'build 'hard-code-path-to-libmagic
9910 (lambda* (#:key inputs #:allow-other-keys)
9911 (let ((file (assoc-ref inputs "file")))
9912 (substitute* "magic.py"
9913 (("ctypes.util.find_library\\('magic'\\)")
9914 (string-append "'" file "/lib/libmagic.so'")))
9915 #t)))
9916 (add-before 'install 'disable-egg-compression
9917 (lambda _
9918 (let ((port (open-file "setup.cfg" "a")))
9919 (display "\n[easy_install]\nzip_ok = 0\n"
9920 port)
9921 (close-port port)
9922 #t))))))
9923 (inputs
9924 ;; python-magic needs to be able to find libmagic.so.
9925 `(("file" ,file)))
9926 (home-page
9927 "https://github.com/ahupp/python-magic")
9928 (synopsis
9929 "File type identification using libmagic")
9930 (description
9931 "This module uses ctypes to access the libmagic file type
9932identification library. It makes use of the local magic database and
9933supports both textual and MIME-type output. Note that this module and
9934the python-file module both provide a \"magic.py\" file; these two
9935modules, which are different and were developed separately, both serve
9936the same purpose: to provide Python bindings for libmagic.")
9937 (license license:expat)))
9938
9939(define-public python2-magic
9940 (package-with-python2 python-magic))
9941
9942(define-public python2-s3cmd
9943 (package
9944 (name "python2-s3cmd")
9945 (version "1.6.1")
9946 (source
9947 (origin
9948 (method url-fetch)
9949 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
9950 "s3cmd-" version ".tar.gz"))
9951 (sha256
9952 (base32
9953 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
9954 (build-system python-build-system)
9955 (arguments
9956 ;; s3cmd is written for python2 only and contains no tests.
9957 `(#:python ,python-2
9958 #:tests? #f))
9959 (propagated-inputs
9960 `(("python2-dateutil" ,python2-dateutil)
9961 ;; The python-file package also provides a magic.py module.
9962 ;; This is an unfortunate state of affairs; however, s3cmd
9963 ;; fails to install if it cannot find specifically the
9964 ;; python-magic package. Thus we include it, instead of using
9965 ;; python-file. Ironically, s3cmd sometimes works better
9966 ;; without libmagic bindings at all:
9967 ;; https://github.com/s3tools/s3cmd/issues/198
9968 ("python2-magic" ,python2-magic)))
9969 (home-page "http://s3tools.org/s3cmd")
9970 (synopsis "Command line tool for S3-compatible storage services")
9971 (description
9972 "S3cmd is a command line tool for uploading, retrieving and managing data
9973in storage services that are compatible with the Amazon Simple Storage
9974Service (S3) protocol, including S3 itself. It supports rsync-like backup,
9975GnuPG encryption, and more. It also supports management of Amazon's
9976CloudFront content delivery network.")
9977 (license license:gpl2+)))
9978
9979(define-public python-pkgconfig
9980 (package
9981 (name "python-pkgconfig")
9982 (version "1.3.1")
9983 (source
9984 (origin
9985 (method url-fetch)
9986 (uri (pypi-uri "pkgconfig" version))
9987 (sha256
9988 (base32
9989 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
9990 (build-system python-build-system)
9991 (native-inputs
9992 `(("python-nose" ,python-nose)))
9993 (inputs
9994 `(("pkg-config" ,pkg-config)))
9995 (arguments
9996 `(#:phases
9997 (modify-phases %standard-phases
9998 (add-before 'build 'patch
9999 ;; Hard-code the path to pkg-config.
10000 (lambda _
10001 (substitute* "pkgconfig/pkgconfig.py"
10002 (("cmd = 'pkg-config")
10003 (string-append "cmd = '" (which "pkg-config"))))
10004 #t))
10005 (replace 'check
10006 (lambda _
10007 (invoke "nosetests" "test.py"))))))
10008 (home-page "https://github.com/matze/pkgconfig")
10009 (synopsis "Python interface for pkg-config")
10010 (description "This module provides a Python interface to pkg-config. It
10011can be used to find all pkg-config packages, check if a package exists,
10012check if a package meets certain version requirements, query CFLAGS and
10013LDFLAGS and parse the output to build extensions with setup.py.")
10014 (license license:expat)))
10015
10016(define-public python2-pkgconfig
10017 (package-with-python2 python-pkgconfig))
10018
10019(define-public python-bz2file
10020 (package
10021 (name "python-bz2file")
10022 (version "0.98")
10023 (source
10024 (origin
10025 (method url-fetch)
10026 (uri (pypi-uri "bz2file" version))
10027 (sha256
10028 (base32
10029 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
10030 (build-system python-build-system)
10031 (arguments
10032 `(#:tests? #f)) ; Tests use deprecated python modules.
10033 (home-page "https://github.com/nvawda/bz2file")
10034 (synopsis "Read and write bzip2-compressed files")
10035 (description
10036 "Bz2file is a Python library for reading and writing bzip2-compressed
10037files. It contains a drop-in replacement for the I/O interface in the
10038standard library's @code{bz2} module, including features from the latest
10039development version of CPython that are not available in older releases.")
10040 (license license:asl2.0)))
10041
10042(define-public python2-bz2file
10043 (package-with-python2 python-bz2file))
10044
10045(define-public python-future
10046 (package
10047 (name "python-future")
d5d54030 10048 (version "0.17.1")
44d10b1f
RW
10049 (source
10050 (origin
10051 (method url-fetch)
10052 (uri (pypi-uri "future" version))
10053 (sha256
10054 (base32
d5d54030 10055 "1f2rlqn9rh7adgir52dlbqz69gsab44x0mlm8gf1cs7xvhv54137"))))
44d10b1f
RW
10056 (build-system python-build-system)
10057 ;; Many tests connect to the network or are otherwise flawed.
10058 ;; https://github.com/PythonCharmers/python-future/issues/210
10059 (arguments
10060 `(#:tests? #f))
10061 (home-page "http://python-future.org")
10062 (synopsis "Single-source support for Python 3 and 2")
10063 (description
10064 "@code{python-future} is the missing compatibility layer between Python 2 and
10065Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
10066to support both Python 2 and Python 3 with minimal overhead.")
10067 (license license:expat)))
10068
10069(define-public python2-future
10070 (package-with-python2 python-future))
10071
10072(define-public python-cysignals
10073 (package
10074 (name "python-cysignals")
8e3e51df 10075 (version "1.9.0")
44d10b1f
RW
10076 (source
10077 (origin
10078 (method url-fetch)
8e3e51df 10079 (uri (pypi-uri "cysignals" version))
44d10b1f
RW
10080 (sha256
10081 (base32
8e3e51df 10082 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
44d10b1f
RW
10083 (build-system python-build-system)
10084 (native-inputs
10085 `(("python-cython" ,python-cython)
10086 ("python-sphinx" ,python-sphinx)))
10087 (inputs
10088 `(("pari-gp" ,pari-gp)))
10089 (arguments
10090 `(#:modules ((guix build python-build-system)
10091 ((guix build gnu-build-system) #:prefix gnu:)
10092 (guix build utils))
10093 ;; FIXME: Tests are executed after installation and currently fail
10094 ;; when not installing into standard locations; the author is working
10095 ;; on a fix.
10096 #:tests? #f
10097 #:phases
10098 (modify-phases %standard-phases
10099 (add-before
10100 'build 'configure
10101 (assoc-ref gnu:%standard-phases 'configure)))))
10102 (home-page
10103 "https://github.com/sagemath/cysignals")
10104 (synopsis
10105 "Handling of interrupts and signals for Cython")
10106 (description
10107 "The cysignals package provides mechanisms to handle interrupts (and
10108other signals and errors) in Cython code, using two related approaches,
10109for mixed Cython/Python code or external C libraries and pure Cython code,
10110respectively.")
10111 (license license:lgpl3+)))
10112
10113(define-public python2-cysignals
10114 (package-with-python2 python-cysignals))
10115
10116(define-public python2-shedskin
10117 (package
10118 (name "python2-shedskin")
10119 (version "0.9.4")
10120 (source
10121 (origin
10122 (method url-fetch)
10123 (uri (string-append "https://github.com/shedskin/shedskin/"
10124 "releases/download/v" version
10125 "/shedskin-" version ".tgz"))
10126 (sha256
10127 (base32
10128 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
10129 (build-system python-build-system)
10130 (arguments
10131 `(#:python ,python-2
10132 #:phases (modify-phases %standard-phases
10133 (add-after 'unpack 'fix-resulting-include-libs
10134 (lambda* (#:key inputs #:allow-other-keys)
10135 (let ((libgc (assoc-ref inputs "libgc"))
10136 (pcre (assoc-ref inputs "pcre")))
10137 (substitute* "shedskin/makefile.py"
10138 (("variable == 'CCFLAGS':[ ]*")
10139 (string-append "variable == 'CCFLAGS':\n"
10140 " line += ' -I " pcre "/include"
10141 " -I " libgc "/include'"))
10142 (("variable == 'LFLAGS':[ ]*")
10143 (string-append "variable == 'LFLAGS':\n"
10144 " line += ' -L" pcre "/lib"
10145 " -L " libgc "/lib'")))
10146 #t))))))
10147 (inputs `(("pcre" ,pcre)
10148 ("libgc" ,libgc)))
10149 (home-page "https://shedskin.github.io/")
10150 (synopsis "Experimental Python-2 to C++ Compiler")
10151 (description (string-append "This is an experimental compiler for a subset of
10152Python. It generates C++ code and a Makefile."))
10153 (license (list license:gpl3 license:bsd-3 license:expat))))
10154
10155(define-public python2-rope
10156 (package
10157 (name "python2-rope")
a9ba0a31 10158 (version "0.11.0")
44d10b1f
RW
10159 (source
10160 (origin
10161 (method url-fetch)
10162 (uri (pypi-uri "rope" version))
10163 (sha256
10164 (base32
a9ba0a31 10165 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
44d10b1f 10166 (arguments
afb29715 10167 ;; Rope has only partial python3 support, see `python-rope'
44d10b1f
RW
10168 `(#:python ,python-2))
10169 (build-system python-build-system)
10170 (native-inputs
10171 `(("python2-unittest2" ,python2-unittest2)))
10172 (home-page "https://github.com/python-rope/rope")
10173 (synopsis "Refactoring library for Python")
10174 (description "Rope is a refactoring library for Python. It facilitates
10175the renaming, moving and extracting of attributes, functions, modules, fields
10176and parameters in Python 2 source code. These refactorings can also be applied
10177to occurrences in strings and comments.")
10178 (license license:gpl2)))
10179
2c880ef4
LC
10180(define-public python-rope
10181 (package
10182 (inherit python2-rope)
10183 (name "python-rope")
10184 (arguments `(#:python ,python-wrapper
10185 ;; XXX: Only partial python3 support, results in some failing
10186 ;; tests: <https://github.com/python-rope/rope/issues/247>.
10187 #:tests? #f))
10188 (properties `((python2-variant . ,(delay python2-rope))))))
10189
44d10b1f
RW
10190(define-public python-py3status
10191 (package
10192 (name "python-py3status")
ef68b35d 10193 (version "3.21")
44d10b1f
RW
10194 (source
10195 (origin
10196 (method url-fetch)
10197 (uri (pypi-uri "py3status" version))
10198 (sha256
ef68b35d 10199 (base32 "16z8zq83hxy48g6hh4xczbdz50qvxv9k1aahr4fqq7jis60cc262"))))
44d10b1f
RW
10200 (build-system python-build-system)
10201 (inputs
10202 `(("file" ,file)))
10203 (arguments
10204 '(#:phases
10205 (modify-phases %standard-phases
10206 ;; 'file' is used for detection of configuration file encoding
10207 ;; let's make link the dependency to particular input
10208 (add-before 'build 'patch-file-path
10209 (lambda* (#:key inputs #:allow-other-keys)
10210 (let ((file-path (assoc-ref inputs "file")))
10211 (substitute* "py3status/parse_config.py"
6a6b8a3f 10212 (("\\[\"file\", \"-b\"")
44d10b1f
RW
10213 (string-append "['" file-path "/bin/file', '-b'")))
10214 #t))))
10215 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
10216 (home-page "https://github.com/ultrabug/py3status")
10217 (synopsis "Extensible i3status wrapper written in Python")
10218 (description "py3status is an i3status wrapper which extends i3status
10219functionality in a modular way, allowing you to extend your panel with your
10220own code, responding to click events and updating clock every second.")
10221 (license license:bsd-3)))
10222
10223(define-public python-tblib
10224 (package
10225 (name "python-tblib")
10226 (version "1.3.2")
10227 (source (origin
10228 (method url-fetch)
10229 (uri (pypi-uri "tblib" version))
10230 (sha256 (base32
10231 "1rsg8h069kqgncyv8fgzyj6qflk6j10cb78pa5jk34ixwq044vj3"))))
10232 (build-system python-build-system)
10233 (arguments
10234 `(#:phases
10235 (modify-phases %standard-phases
10236 (add-before 'check 'adjust-tests
10237 (lambda _
10238 (when (which "python3")
10239 ;; Adjust the example output to match that of Python 3.7:
10240 ;; <https://github.com/ionelmc/python-tblib/issues/36>.
10241 (substitute* "README.rst"
10242 (("Exception\\('fail',") "Exception('fail'"))
10243 #t)))
10244 (replace 'check
10245 (lambda _
10246 ;; Upstream runs tests after installation and the package itself
10247 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
10248 ;; found.
10249 (setenv "PYTHONPATH"
10250 (string-append (getcwd) "/build/lib:"
10251 (getenv "PYTHONPATH")))
10252 (invoke "py.test" "-vv" "tests" "README.rst"))))))
10253 (native-inputs
10254 `(("python-pytest" ,python-pytest)
10255 ("python-six" ,python-six)))
10256 (home-page "https://github.com/ionelmc/python-tblib")
10257 (synopsis "Traceback serialization library")
10258 (description
10259 "Traceback serialization allows you to:
10260
10261@enumerate
10262@item Pickle tracebacks and raise exceptions with pickled tracebacks in
10263different processes. This allows better error handling when running code over
10264multiple processes (imagine multiprocessing, billiard, futures, celery etc).
10265
10266@item Parse traceback strings and raise with the parsed tracebacks.
10267@end enumerate\n")
10268 (license license:bsd-3)))
10269
10270(define-public python2-tblib
10271 (package-with-python2 python-tblib))
10272
10273(define-public python-greenlet
10274 (package
10275 (name "python-greenlet")
10276 (version "0.4.15")
10277 (source (origin
10278 (method url-fetch)
10279 (uri (pypi-uri "greenlet" version))
10280 (sha256
10281 (base32
10282 "1g4g1wwc472ds89zmqlpyan3fbnzpa8qm48z3z1y6mlk44z485ll"))))
10283 (build-system python-build-system)
10284 (home-page "https://greenlet.readthedocs.io/")
10285 (synopsis "Lightweight in-process concurrent programming")
10286 (description
10287 "Greenlet package is a spin-off of Stackless, a version of CPython
10288that supports micro-threads called \"tasklets\". Tasklets run
10289pseudo-concurrently (typically in a single or a few OS-level threads) and
10290are synchronized with data exchanges on \"channels\".")
10291 (license (list license:psfl license:expat))))
10292
10293(define-public python2-greenlet
10294 (package-with-python2 python-greenlet))
10295
10296(define-public python-objgraph
10297 (package
10298 (name "python-objgraph")
eebc03bb 10299 (version "3.4.1")
44d10b1f
RW
10300 (source
10301 (origin
10302 (method url-fetch)
10303 (uri (pypi-uri "objgraph" version))
10304 (sha256
10305 (base32
eebc03bb 10306 "19qmqsh984zq1rzzjy4vqnmviaqnymcyl8h7z99pnicbgwnm2adz"))))
44d10b1f
RW
10307 (build-system python-build-system)
10308 (propagated-inputs
10309 `(("python-graphviz" ,python-graphviz)))
10310 (native-inputs
10311 `(("python-mock" ,python-mock)
10312 ("graphviz" ,graphviz)))
10313 (home-page "https://mg.pov.lt/objgraph/")
10314 (synopsis "Draw Python object reference graphs with graphviz")
10315 (description
10316 "This package provides tools to draw Python object reference graphs with
10317graphviz.")
10318 (license license:expat)))
10319
ffe58d1d
MB
10320(define-public python2-objgraph
10321 (package-with-python2 python-objgraph))
10322
44d10b1f
RW
10323(define-public python-gevent
10324 (package
10325 (name "python-gevent")
10326 (version "1.3.7")
10327 (source (origin
10328 (method url-fetch)
10329 (uri (pypi-uri "gevent" version))
10330 (sha256
10331 (base32
10332 "0b0fr04qdk1p4sniv87fh8z5psac60x01pv054kpgi94520g81iz"))
10333 (modules '((guix build utils)))
10334 (snippet
10335 '(begin
10336 ;; unbunding libev and c-ares
10337 (delete-file-recursively "deps")
10338 #t))))
10339 (build-system python-build-system)
10340 (arguments
10341 `(#:modules ((ice-9 ftw)
10342 (ice-9 match)
10343 (srfi srfi-26)
10344 (guix build utils)
10345 (guix build python-build-system))
10346 #:phases (modify-phases %standard-phases
44d10b1f
RW
10347 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
10348 (lambda _
10349 (substitute* "src/gevent/subprocess.py"
10350 (("/bin/sh") (which "sh")))
10351 (for-each (lambda (file)
10352 (substitute* file
10353 (("/bin/sh") (which "sh"))
10354 (("/bin/true") (which "true"))))
10355 (find-files "src/greentest" "\\.py$"))
10356 #t))
10357 (add-before 'build 'do-not-use-bundled-sources
10358 (lambda* (#:key inputs #:allow-other-keys)
10359 (setenv "CONFIG_SHELL" (which "bash"))
10360 (setenv "LIBEV_EMBED" "false")
10361 (setenv "CARES_EMBED" "false")
10362 (setenv "EMBED" "false")
10363
b5b56b7f
MB
10364 ;; Prevent building bundled libev.
10365 (substitute* "setup.py"
10366 (("run_make=_BUILDING")
10367 "run_make=False"))
10368
44d10b1f
RW
10369 (let ((greenlet (string-append
10370 (assoc-ref inputs "python-greenlet")
10371 "/include")))
10372 (match (scandir greenlet
10373 (lambda (item)
10374 (string-prefix? "python" item)))
10375 ((python)
b5b56b7f 10376 (setenv "C_INCLUDE_PATH"
44d10b1f
RW
10377 (string-append greenlet "/" python)))))
10378 #t))
10379 (add-before 'check 'skip-timer-test
10380 (lambda _
10381 ;; XXX: Skip 'TestTimerResolution', which appears to be
10382 ;; unreliable.
10383 (substitute* "src/greentest/test__core_timer.py"
10384 (("not greentest.RUNNING_ON_CI") "False"))
10385 #t))
10386 (replace 'check
10387 (lambda _
10388 ;; Make sure the build directory is on PYTHONPATH.
10389 (setenv "PYTHONPATH"
10390 (string-append
10391 (getenv "PYTHONPATH") ":"
10392 (getcwd) "/build/"
10393 (car (scandir "build" (cut string-prefix? "lib." <>)))))
10394 (with-directory-excursion "src/greentest"
10395 ;; XXX: Many tests require network access. Instead we only
10396 ;; run known-good tests. Unfortunately we cannot use
10397 ;; recursion here since this directory also contains
10398 ;; Python-version-specific subfolders.
10399 (apply invoke "python" "testrunner.py" "--config"
10400 "known_failures.py"
10401 (scandir "." (cut regexp-exec
10402 (make-regexp "test_+(subprocess|core)")
10403 <>)))))))))
10404 (propagated-inputs
10405 `(("python-greenlet" ,python-greenlet)
10406 ("python-objgraph" ,python-objgraph)))
10407 (native-inputs
b5b56b7f 10408 `(("python-six" ,python-six)))
44d10b1f
RW
10409 (inputs
10410 `(("c-ares" ,c-ares)
10411 ("libev" ,libev)))
10412 (home-page "http://www.gevent.org/")
10413 (synopsis "Coroutine-based network library")
10414 (description
10415 "gevent is a coroutine-based Python networking library that uses greenlet
10416to provide a high-level synchronous API on top of the libev event loop.")
10417 (license license:expat)
10418 (properties `((python2-variant . ,(delay python2-gevent))))))
10419
10420(define-public python2-gevent
10421 (let ((base (package-with-python2
10422 (strip-python2-variant python-gevent))))
10423 (package
10424 (inherit base)
10425 (native-inputs `(,@(package-native-inputs python-gevent)
10426 ("python-mock" ,python2-mock))))))
10427
10428(define-public python-fastimport
10429 (package
10430 (name "python-fastimport")
10431 (version "0.9.6")
10432 (source
10433 (origin
10434 (method url-fetch)
10435 (uri (pypi-uri "fastimport" version))
10436 (sha256
10437 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
10438 (build-system python-build-system)
10439 (home-page "https://github.com/jelmer/python-fastimport")
10440 (synopsis "VCS fastimport parser and generator in Python")
10441 (description "This package provides a parser for and generator of the Git
10442@url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
10443format.")
10444 (license license:gpl2+)))
10445
10446(define-public python2-fastimport
10447 (package-with-python2 python-fastimport))
10448
10449(define-public python-twisted
10450 (package
10451 (name "python-twisted")
fdfad2fc 10452 (version "19.7.0")
44d10b1f
RW
10453 (source (origin
10454 (method url-fetch)
10455 (uri (pypi-uri "Twisted" version ".tar.bz2"))
10456 (sha256
10457 (base32
fdfad2fc 10458 "17d3hnxv9qndagzz63mdpyk99xj63p9gq586vjn0rxk8cl197nym"))))
44d10b1f
RW
10459 (build-system python-build-system)
10460 (arguments
0107c9b8 10461 '(#:tests? #f)) ; FIXME: some tests fail
44d10b1f
RW
10462 (propagated-inputs
10463 `(("python-zope-interface" ,python-zope-interface)
52ca1c4a 10464 ("python-pyhamcrest" ,python-pyhamcrest)
44d10b1f 10465 ("python-incremental" ,python-incremental)
e5ba2fe3 10466 ("python-hyperlink" ,python-hyperlink)
44d10b1f
RW
10467 ("python-constantly" ,python-constantly)
10468 ("python-automat" ,python-automat)))
10469 (home-page "https://twistedmatrix.com/")
10470 (synopsis "Asynchronous networking framework written in Python")
10471 (description
10472 "Twisted is an extensible framework for Python programming, with special
10473focus on event-based network programming and multiprotocol integration.")
10474 (license license:expat)))
10475
10476(define-public python2-twisted
10477 (package-with-python2 python-twisted))
10478
10479(define-public python-pika
10480 (package
10481 (name "python-pika")
10482 (version "0.12.0")
10483 (source
10484 (origin
10485 (method url-fetch)
10486 (uri (pypi-uri "pika" version))
10487 (sha256
10488 (base32
10489 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
10490 (build-system python-build-system)
10491 (native-inputs
10492 `(("python-pyev" ,python-pyev)
10493 ("python-tornado" ,python-tornado)
10494 ("python-twisted" ,python-twisted)))
10495 (home-page "https://pika.readthedocs.org")
10496 (synopsis "Pure Python AMQP Client Library")
10497 (description
10498 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
10499Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
10500network support library.")
10501 (license license:bsd-3)))
10502
10503(define-public python2-pika
10504 (package-with-python2 python-pika))
10505
10506(define-public python-ply
10507 (package
10508 (name "python-ply")
10509 (version "3.10")
10510 (source
10511 (origin
10512 (method url-fetch)
10513 (uri (pypi-uri "ply" version))
10514 (sha256
10515 (base32
10516 "1jxsr1d2f732r6ljhvm827113dckwl6qwakfvpbdhcbhvpvlmscn"))))
10517 (build-system python-build-system)
10518 (home-page "http://www.dabeaz.com/ply/")
10519 (synopsis "Python Lex & Yacc")
10520 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
10521It uses LR parsing and does extensive error checking.")
10522 (license license:bsd-3)))
10523
10524(define-public python2-ply
10525 (package-with-python2 python-ply))
10526
10527(define-public python-tabulate
10528 (package
10529 (name "python-tabulate")
10530 (version "0.7.7")
10531 (source (origin
10532 (method url-fetch)
10533 (uri (pypi-uri "tabulate" version))
10534 (sha256
10535 (base32
10536 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
10537 (build-system python-build-system)
10538 (arguments
10539 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
10540 ;; and the latest release is not tagged in the upstream repository.
10541 '(#:tests? #f))
10542 (home-page "https://bitbucket.org/astanin/python-tabulate")
10543 (synopsis "Pretty-print tabular data")
10544 (description
10545 "Tabulate is a library and command-line utility to pretty-print tabular
10546data in Python.")
10547 (license license:expat)))
10548
10549(define-public python2-tabulate
10550 (package-with-python2 python-tabulate))
10551
10552(define-public python-kazoo
10553 (package
10554 (name "python-kazoo")
10555 (version "2.4.0")
10556 (source
10557 (origin
10558 (method url-fetch)
10559 (uri (pypi-uri "kazoo" version))
10560 (sha256
10561 (base32
10562 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
10563 (build-system python-build-system)
10564 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
10565 (propagated-inputs
10566 `(("python-six" ,python-six)))
10567 (home-page "https://kazoo.readthedocs.org")
10568 (synopsis "High-level Zookeeper client library")
10569 (description
10570 "Kazoo is a Python client library for the Apache Zookeeper distributed
10571application service. It is designed to be easy to use and to avoid common
10572programming errors.")
10573 (license license:asl2.0)))
10574
10575(define-public python2-kazoo
10576 (package-with-python2 python-kazoo))
10577
10578(define-public python-pykafka
10579 (package
10580 (name "python-pykafka")
10581 (version "2.4.0")
10582 (source (origin
10583 (method url-fetch)
0ca1d040 10584 (uri (pypi-uri "pykafka" version))
44d10b1f
RW
10585 (sha256
10586 (base32
10587 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
10588 (build-system python-build-system)
10589 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
10590 (propagated-inputs
10591 `(("python-gevent" ,python-gevent)
10592 ("python-kazoo" ,python-kazoo)
10593 ("python-tabulate" ,python-tabulate)))
10594 (inputs
10595 `(("librdkafka" ,librdkafka)))
10596 (home-page "https://pykafka.readthedocs.io/")
10597 (synopsis "Apache Kafka client for Python")
10598 (description
10599 "PyKafka is a client for the Apache Kafka distributed messaging system.
10600It includes Python implementations of Kafka producers and consumers, which
10601are optionally backed by a C extension built on librdkafka.")
10602 (license license:asl2.0)))
10603
10604(define-public python2-pykafka
10605 (package-with-python2 python-pykafka))
10606
10607(define-public python-wcwidth
28ac442b
MB
10608 (package
10609 (name "python-wcwidth")
574a71a7 10610 (version "0.1.8")
28ac442b
MB
10611 (source (origin
10612 (method url-fetch)
10613 (uri (pypi-uri "wcwidth" version))
10614 (sha256
10615 (base32
574a71a7 10616 "1a1pzds3xzfylm5mnc5f6c1p8kiig0daqjc9gygd9rc3cj53x2zj"))))
28ac442b
MB
10617 (build-system python-build-system)
10618 (home-page "https://github.com/jquast/wcwidth")
10619 (synopsis "Measure number of terminal column cells of wide-character codes")
10620 (description "Wcwidth measures the number of terminal column cells of
44d10b1f
RW
10621wide-character codes. It is useful for those implementing a terminal emulator,
10622or programs that carefully produce output to be interpreted by one. It is a
10623Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
10624specified in POSIX.1-2001 and POSIX.1-2008.")
28ac442b 10625 (license license:expat)))
44d10b1f
RW
10626
10627(define-public python2-wcwidth
10628 (package-with-python2 python-wcwidth))
10629
10630(define-public python2-jsonrpclib
10631 (package
10632 (name "python2-jsonrpclib")
10633 (version "0.1.7")
10634 (source (origin
10635 (method url-fetch)
6571bba0 10636 (uri (pypi-uri "jsonrpclib" version))
44d10b1f
RW
10637 (sha256
10638 (base32
10639 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
10640 (build-system python-build-system)
10641 (arguments
10642 `(#:tests? #f
10643 #:python ,python-2))
10644 (home-page "https://github.com/joshmarshall/jsonrpclib/")
10645 (synopsis "Implementation of JSON-RPC specification for Python")
10646 (description
10647 "This library is an implementation of the JSON-RPC specification.
10648It supports both the original 1.0 specification, as well as the
10649new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
10650etc.")
10651 (license license:asl2.0)))
10652
10653(define-public python-chai
10654 (package
10655 (name "python-chai")
10656 (version "1.1.2")
10657 (source (origin
10658 (method url-fetch)
10659 (uri (pypi-uri "chai" version))
10660 (sha256
10661 (base32
10662 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
10663 (build-system python-build-system)
10664 (home-page "https://github.com/agoragames/chai")
10665 (synopsis "Mocking framework for Python")
10666 (description
10667 "Chai provides an api for mocking, stubbing and spying your python
10668objects, patterned after the Mocha library for Ruby.")
10669 (license license:bsd-3)))
10670
10671(define-public python2-chai
10672 (package-with-python2 python-chai))
10673
10674(define-public python-inflection
10675 (package
10676 (name "python-inflection")
10677 (version "0.3.1")
10678 (source
10679 (origin (method url-fetch)
10680 (uri (pypi-uri "inflection" version))
10681 (sha256
10682 (base32
10683 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
10684 (build-system python-build-system)
10685 (native-inputs
10686 `(("python-pytest" ,python-pytest)))
10687 (home-page "https://github.com/jpvanhal/inflection")
10688 (synopsis "Python string transformation library")
10689 (description
10690 "Inflection is a string transformation library. It singularizes
10691and pluralizes English words, and transforms strings from CamelCase to
10692underscored string.")
10693 (license license:expat)))
10694
10695(define-public python2-inflection
10696 (package-with-python2 python-inflection))
10697
10698(define-public python-pylev
10699 (package
10700 (name "python-pylev")
10701 (version "1.3.0")
10702 (source (origin
10703 (method url-fetch)
10704 (uri (pypi-uri "pylev" version))
10705 (sha256
10706 (base32
10707 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
10708 (build-system python-build-system)
10709 (home-page "https://github.com/toastdriven/pylev")
10710 (synopsis "Levenshtein distance implementation in Python")
10711 (description "Pure Python Levenshtein implementation, based off the
10712Wikipedia code samples at
10713@url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
10714 (license license:bsd-3)))
10715
10716(define-public python2-pylev
10717 (package-with-python2 python-pylev))
10718
10719(define-public python-cleo
10720 (package
10721 (name "python-cleo")
0c101a04 10722 (version "0.7.6")
44d10b1f
RW
10723 (source (origin
10724 (method url-fetch)
10725 (uri (pypi-uri "cleo" version))
10726 (sha256
10727 (base32
0c101a04 10728 "02dlc0rn43zgvw0s5v4j80bca9n1jfpwy3r78gn9qjgk0qj39kwr"))))
44d10b1f
RW
10729 (build-system python-build-system)
10730 (native-inputs
af2d3713 10731 `( ;; For testing
44d10b1f
RW
10732 ("python-mock" ,python-mock)
10733 ("python-pytest-mock" ,python-pytest-mock)
10734 ("python-pytest" ,python-pytest)))
10735 (propagated-inputs
10736 `(("python-backpack" ,python-backpack)
0c101a04 10737 ("python-clikit" ,python-clikit)
44d10b1f
RW
10738 ("python-pastel" ,python-pastel)
10739 ("python-pylev" ,python-pylev)))
10740 (home-page "https://github.com/sdispater/cleo")
10741 (synopsis "Command-line arguments library for Python")
10742 (description
10743 "Cleo allows you to create command-line commands with signature in
10744docstring and colored output.")
10745 (license license:expat)))
10746
10747(define-public python2-cleo
10748 (package-with-python2 python-cleo))
10749
2be85c45
TLC
10750(define-public python-tomlkit
10751 (package
10752 (name "python-tomlkit")
f4b6ce21 10753 (version "0.5.11")
2be85c45
TLC
10754 (source
10755 (origin
10756 (method url-fetch)
10757 (uri (pypi-uri "tomlkit" version))
10758 (sha256
f4b6ce21 10759 (base32 "1kq1663iqxgwrmb883n55ypi5axnixla2hrby9g2x227asifsi7h"))))
2be85c45
TLC
10760 (build-system python-build-system)
10761 (native-inputs
10762 `(("python-pytest" ,python-pytest)))
2d3da186
TGR
10763 (home-page "https://github.com/sdispater/tomlkit")
10764 (synopsis "Style-preserving TOML library")
2be85c45
TLC
10765 (description
10766 "TOML Kit is a 0.5.0-compliant TOML library. It includes a parser that
10767preserves all comments, indentations, whitespace and internal element ordering,
10768and makes them accessible and editable via an intuitive API. It can also
10769create new TOML documents from scratch using the provided helpers. Part of the
2d3da186 10770implementation has been adapted, improved, and fixed from Molten.")
2be85c45
TLC
10771 (license license:expat)))
10772
0bb32201
TLC
10773(define-public python-shellingham
10774 (package
10775 (name "python-shellingham")
10776 (version "1.3.1")
10777 (source
10778 (origin
10779 (method url-fetch)
10780 (uri (pypi-uri "shellingham" version))
10781 (sha256
10782 (base32
10783 "1q7kws7w4x2hji3g7y0ni9ddk4sd676ylrb3db54gbpys6xj6nwq"))))
10784 (build-system python-build-system)
10785 (home-page
10786 "https://github.com/sarugaku/shellingham")
10787 (synopsis "Tool to detect surrounding shell")
10788 (description
10789 "Shellingham detects what shell the current Python executable is
10790running in.")
10791 (license license:isc)))
10792
aee92957
TLC
10793(define-public python-memcached
10794 (package
10795 (name "python-memcached")
10796 (version "1.59")
10797 (source
10798 (origin
10799 (method url-fetch)
10800 (uri (pypi-uri "python-memcached" version))
10801 (sha256
10802 (base32
10803 "0kvyapavbirk2x3n1jx4yb9nyigrj1s3x15nm3qhpvhkpqvqdqm2"))))
10804 (build-system python-build-system)
10805 (propagated-inputs `(("python-six" ,python-six)))
10806 (home-page
10807 "https://github.com/linsomniac/python-memcached")
10808 (synopsis "Pure python memcached client")
10809 (description
10810 "This software is a pure Python interface to the memcached memory cache
10811daemon. It is the client side software which allows storing values in one or
10812more, possibly remote, memcached servers.")
10813 (license license:psfl)))
10814
b2ac2508
TLC
10815(define-public python-clikit
10816 (package
10817 (name "python-clikit")
4573b94d 10818 (version "0.4.1")
b2ac2508
TLC
10819 (source
10820 (origin
10821 (method url-fetch)
10822 (uri (pypi-uri "clikit" version))
10823 (sha256
10824 (base32
4573b94d 10825 "10gab65pq0jdf589n33sj2513pxal2lisl4xwf1ijysdjxmpdr4a"))))
b2ac2508
TLC
10826 (build-system python-build-system)
10827 (propagated-inputs
10828 `(("python-pastel" ,python-pastel)
10829 ("python-pylev" ,python-pylev)))
10830 (home-page "https://github.com/sdispater/clikit")
10831 (synopsis "Group of utilities to build command line interfaces")
10832 (description
10833 "CliKit is a group of utilities to build testable command line
10834interfaces.")
10835 (license license:expat)))
10836
c6f008d6
TLC
10837(define-public python-msgpack-python
10838 (package
10839 (name "python-msgpack-python")
10840 (version "0.5.6")
10841 (source
10842 (origin
10843 (method url-fetch)
10844 (uri (pypi-uri "msgpack-python" version))
10845 (sha256
10846 (base32
10847 "16wh8qgybmfh4pjp8vfv78mdlkxfmcasg78lzlnm6nslsfkci31p"))))
10848 (build-system python-build-system)
10849 (home-page "http://msgpack.org/")
10850 (synopsis "Package to deserialize messages in MessagePack binary format")
10851 (description
10852 "MessagePack is an efficient binary serialization format. It lets you
10853exchange data among multiple languages like JSON. But it's faster and
10854smaller. Small integers are encoded into a single byte, and typical short
10855strings require only one extra byte in addition to the strings themselves.")
10856 (license license:asl2.0)))
10857
badc1c63
TLC
10858(define-public python-cachy
10859 (package
10860 (name "python-cachy")
10861 (version "0.2.0")
10862 (source
10863 (origin
10864 (method url-fetch)
10865 (uri (pypi-uri "cachy" version))
10866 (sha256
10867 (base32
10868 "0v6mjyhgx6j7ya20bk69cr3gdzdkdf6psay0h090rscclgji65dp"))))
10869 (build-system python-build-system)
10870 (native-inputs
10871 `(("python-fakeredis" ,python-fakeredis)
10872 ("python-flexmock" ,python-flexmock)
10873 ("python-pytest" ,python-pytest)))
10874 (propagated-inputs
10875 `(("python-memcached" ,python-memcached)
10876 ("python-msgpack-python" ,python-msgpack-python)
10877 ("python-redis" ,python-redis)))
10878 (home-page "https://github.com/sdispater/cachy")
10879 (synopsis "Simple yet effective caching library")
10880 (description
10881 "Cachy provides a simple yet effective caching library. A simple but
10882powerful API: thread-safety; decorator syntax; support for memcached, redis,
10883database, file, dict stores. Cachy supports python versions 2.7+ and 3.2+.")
10884 (license license:expat)))
10885
617bb67b
TLC
10886(define-public poetry
10887 (package
10888 (name "poetry")
10889 (version "0.12.17")
10890 ;; Poetry can only be built from source with poetry.
10891 (source
10892 (origin
10893 (method url-fetch)
10894 (uri (pypi-uri "poetry" version))
10895 (sha256
10896 (base32
10897 "0gxwcd65qjmzqzppf53x51sic1rbcd9py6cdzx3aprppipimslvf"))))
10898 (build-system python-build-system)
10899 (arguments
10900 `(#:tests? #f ;; Pypi does not have tests.
10901 #:phases
10902 (modify-phases %standard-phases
10903 (replace 'build
10904 (lambda _
10905 ;; Bug in poetry https://github.com/sdispater/poetry/issues/866.
10906 (invoke "sed" "-i" "-e" "s/from distutils.core/from setuptools/"
10907 "setup.py")
10908 #t)))))
10909 (propagated-inputs
10910 `(("python-cachecontrol" ,python-cachecontrol)
10911 ("python-cachy" ,python-cachy)
10912 ("python-cleo" ,python-cleo)
10913 ("python-glob2" ,python-glob2)
10914 ("python-html5lib" ,python-html5lib)
10915 ("python-jsonschema" ,python-jsonschema)
10916 ("python-msgpack" ,python-msgpack)
617bb67b
TLC
10917 ("python-pkginfo" ,python-pkginfo)
10918 ("python-pyparsing" ,python-pyparsing)
10919 ("python-pyrsistent" ,python-pyrsistent)
10920 ("python-requests" ,python-requests)
10921 ("python-requests-toolbelt" ,python-requests-toolbelt)
10922 ("python-shellingham" ,python-shellingham)
10923 ("python-tomlkit" ,python-tomlkit)
10924 ("python-virtualenv" ,python-virtualenv)))
10925 (home-page "https://poetry.eustace.io/")
10926 (synopsis "Python dependency management and packaging made easy")
10927 (description "Poetry is a tool for dependency management and packaging
10928in Python. It allows you to declare the libraries your project depends on and
10929it will manage (install/update) them for you.")
10930 (license license:expat)))
10931
44d10b1f
RW
10932(define-public python-lazy-object-proxy
10933 (package
10934 (name "python-lazy-object-proxy")
7454078a 10935 (version "1.4.3")
44d10b1f
RW
10936 (source (origin
10937 (method url-fetch)
10938 (uri (pypi-uri "lazy-object-proxy" version))
10939 (sha256
10940 (base32
7454078a 10941 "1w1aaay424ciz8fz3fkzxb0pxzfxn184f2whpyn4fx72bn50x47k"))))
63d4873b
MO
10942 (native-inputs
10943 `(("python-setuptools-scm" ,python-setuptools-scm-3.3)))
44d10b1f
RW
10944 (build-system python-build-system)
10945 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
10946 (synopsis "Lazy object proxy for python")
10947 (description
10948 "Lazy object proxy is an object that wraps a callable but defers the call
10949until the object is actually required, and caches the result of said call.")
10950 (license license:bsd-2)))
10951
10952(define-public python2-lazy-object-proxy
10953 (package-with-python2 python-lazy-object-proxy))
10954
10955(define-public python-dnspython
10956 (package
10957 (name "python-dnspython")
10958 (version "1.15.0")
10959 (source (origin
10960 (method url-fetch)
10961 (uri (string-append "http://www.dnspython.org/kits/"
10962 version "/dnspython-" version ".tar.gz"))
10963 (sha256
10964 (base32
10965 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
10966 (build-system python-build-system)
10967 (arguments '(#:tests? #f)) ; XXX: requires internet access
10968 (home-page "http://www.dnspython.org")
10969 (synopsis "DNS toolkit for Python")
10970 (description
10971 "dnspython is a DNS toolkit for Python. It supports almost all record
10972types. It can be used for queries, zone transfers, and dynamic updates.
10973It supports TSIG authenticated messages and EDNS0.")
10974 (license license:expat)))
10975
10976(define-public python2-dnspython
10977 (package-with-python2 python-dnspython))
10978
10979(define-public python-email-validator
10980 (package
10981 (name "python-email-validator")
10982 (version "1.0.2")
10983 (source
10984 (origin (method url-fetch)
10985 (uri (pypi-uri "email_validator" version))
10986 (sha256
10987 (base32
10988 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
10989 (build-system python-build-system)
10990 (arguments
10991 '(#:phases
10992 (modify-phases %standard-phases
10993 (add-before 'build 'use-dnspython
10994 (lambda _
10995 (substitute* "setup.py"
10996 (("dnspython3") "dnspython"))
10997 #t)))))
10998 (propagated-inputs
10999 `(("python-dnspython" ,python-dnspython)
11000 ("python-idna" ,python-idna)))
11001 (home-page "https://github.com/JoshData/python-email-validator")
11002 (synopsis "Email address validation library for Python")
11003 (description
11004 "This library validates email address syntax and deliverability.")
11005 (license license:cc0)))
11006
11007(define-public python2-email-validator
11008 (package-with-python2 python-email-validator))
11009
11010(define-public python-ukpostcodeparser
11011 (package
11012 (name "python-ukpostcodeparser")
11013 (version "1.0.3")
11014 (source (origin
11015 (method url-fetch)
11016 (uri (pypi-uri "UkPostcodeParser" version))
11017 (sha256
11018 (base32
11019 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
11020 (build-system python-build-system)
11021 (home-page "https://github.com/hamstah/ukpostcodeparser")
11022 (synopsis "UK Postcode parser for Python")
11023 (description
11024 "This library provides the @code{parse_uk_postcode} function for
11025parsing UK postcodes.")
11026 (license license:expat)))
11027
11028(define-public python2-ukpostcodeparser
11029 (package-with-python2 python-ukpostcodeparser))
11030
11031(define-public python-faker
11032 (package
11033 (name "python-faker")
11034 (version "0.7.9")
11035 (source (origin
11036 (method url-fetch)
11037 (uri (pypi-uri "Faker" version))
11038 (sha256
11039 (base32
11040 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
11041 (patches
11042 (search-patches "python-faker-fix-build-32bit.patch"))
11043 (modules '((guix build utils)))
11044 (snippet
11045 '(begin
11046 (for-each delete-file (find-files "." "\\.pyc$"))
11047 #t))))
11048 (build-system python-build-system)
11049 (arguments
11050 '(#:phases
11051 (modify-phases %standard-phases
11052 (replace 'check
49ff8827 11053 (lambda _ (invoke "python" "-m" "unittest" "-v" "tests"))))))
44d10b1f
RW
11054 (native-inputs
11055 `(;; For testing
11056 ("python-email-validator" ,python-email-validator)
11057 ("python-mock" ,python-mock)
11058 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
11059 (propagated-inputs
11060 `(("python-dateutil" ,python-dateutil)
11061 ("python-six" ,python-six)))
11062 (home-page "https://github.com/joke2k/faker")
11063 (synopsis "Python package that generates fake data")
11064 (description
11065 "Faker is a Python package that generates fake data such as names,
11066addresses, and phone numbers.")
11067 (license license:expat)
11068 (properties `((python2-variant . ,(delay python2-faker))))))
11069
11070(define-public python2-faker
11071 (let ((base (package-with-python2 (strip-python2-variant
11072 python-faker))))
11073 (package
11074 (inherit base)
11075 (propagated-inputs
11076 `(("python2-ipaddress" ,python2-ipaddress)
11077 ,@(package-propagated-inputs base))))))
11078
11079(define-public python-pyaml
11080 (package
11081 (name "python-pyaml")
11082 (version "18.11.0")
11083 (source (origin
11084 (method url-fetch)
11085 (uri (pypi-uri "pyaml" version))
11086 (sha256
11087 (base32
11088 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
11089 (build-system python-build-system)
11090 (native-inputs
11091 `(("python-unidecode" ,python-unidecode)))
11092 (propagated-inputs
11093 `(("python-pyyaml" ,python-pyyaml)))
11094 (home-page "https://github.com/mk-fg/pretty-yaml")
11095 (synopsis "YAML pretty-print library for Python")
11096 (description
11097 "pyaml is a PyYAML based python module to produce pretty and readable
11098YAML-serialized data.")
492e3a7a 11099 (license license:wtfpl2)))
44d10b1f
RW
11100
11101(define-public python2-pyaml
11102 (package-with-python2 python-pyaml))
11103
11104(define-public python-backpack
11105 (package
11106 (name "python-backpack")
11107 (version "0.1")
11108 (source
11109 (origin
11110 (method url-fetch)
11111 (uri (pypi-uri "backpack" version))
11112 (sha256
11113 (base32
11114 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
11115 (build-system python-build-system)
11116 (native-inputs
11117 `(("python-pytest" ,python-pytest)
11118 ("python-nose" ,python-nose)))
11119 (propagated-inputs
11120 `(("python-simplejson" ,python-simplejson)))
11121 (home-page "https://github.com/sdispater/backpack")
11122 (synopsis "Utilities for working with Python collections")
11123 (description "Backpack provides some useful utilities for working with
11124collections of data.")
11125 (license license:expat)))
11126
11127(define-public python2-backpack
11128 (package-with-python2 python-backpack))
11129
11130(define-public python-prompt-toolkit
11131 (package
11132 (name "python-prompt-toolkit")
11133 (version "2.0.7")
11134 (source
11135 (origin
11136 (method url-fetch)
11137 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
11138 (sha256
11139 (base32
11140 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
11141 (build-system python-build-system)
11142 (arguments
11143 `(#:phases
11144 (modify-phases %standard-phases
11145 (delete 'check)
11146 (add-after 'install 'post-install-check
11147 (lambda* (#:key inputs outputs #:allow-other-keys)
11148 ;; HOME is needed for the test
11149 ;; "test_pathcompleter_can_expanduser".
11150 (setenv "HOME" "/tmp")
11151 (add-installed-pythonpath inputs outputs)
11152 (invoke "py.test"))))))
11153 (propagated-inputs
11154 `(("python-wcwidth" ,python-wcwidth)
11155 ("python-six" ,python-six)
11156 ("python-pygments" ,python-pygments)))
11157 (native-inputs
11158 `(("python-pytest" ,python-pytest)))
11159 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
11160 (synopsis "Library for building command line interfaces in Python")
11161 (description
11162 "Prompt-Toolkit is a library for building interactive command line
11163interfaces in Python. It's like GNU Readline but it also features syntax
11164highlighting while typing, out-of-the-box multi-line input editing, advanced
11165code completion, incremental search, support for Chinese double-width
11166characters, mouse support, and auto suggestions.")
11167 (license license:bsd-3)))
11168
11169(define-public python2-prompt-toolkit
11170 (package-with-python2 python-prompt-toolkit))
11171
11172(define-public python-prompt-toolkit-1
11173 (package (inherit python-prompt-toolkit)
11174 (version "1.0.15")
11175 (source
11176 (origin
11177 (method url-fetch)
11178 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
11179 (sha256
11180 (base32
11181 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
11182
11183(define-public python2-prompt-toolkit-1
11184 (package-with-python2 python-prompt-toolkit-1))
11185
11186(define-public python-jedi
11187 (package
11188 (name "python-jedi")
296e1aea 11189 (version "0.15.1")
44d10b1f
RW
11190 (source
11191 (origin
11192 (method url-fetch)
11193 (uri (pypi-uri "jedi" version))
11194 (sha256
11195 (base32
296e1aea 11196 "0bp4pxhsynaarbvzblsn5x32lzp29svy3sxfy8i6m5iwz9s9r1ds"))))
44d10b1f
RW
11197 (build-system python-build-system)
11198 (arguments
296e1aea 11199 `(#:phases
44d10b1f 11200 (modify-phases %standard-phases
296e1aea
MC
11201 (add-after 'unpack 'disable-file-completion-test
11202 ;; A single parameterized test currently fail (see:
11203 ;; https://github.com/davidhalter/jedi/issues/1395). Remove it.
11204 (lambda _
11205 (substitute* "test/test_api/test_completion.py"
11206 ((".*'example.py', 'rb\"' \\+ join\\('\\.\\.'.*") ""))
11207 #t))
44d10b1f 11208 (replace 'check
296e1aea
MC
11209 (lambda _
11210 (setenv "HOME" "/tmp")
11211 (invoke "python" "-m" "pytest"))))))
44d10b1f
RW
11212 (native-inputs
11213 `(("python-pytest" ,python-pytest)
11214 ("python-docopt" ,python-docopt)))
11215 (propagated-inputs
11216 `(("python-parso" ,python-parso)))
11217 (home-page "https://github.com/davidhalter/jedi")
11218 (synopsis "Autocompletion and static analysis library for Python")
11219 (description
11220 "Jedi is a static analysis tool for Python that can be used in Integrated
11221Development Environments (@dfn{IDE}s) and text editors. It understands Python
11222on a deeper level than many other static analysis frameworks for Python.
11223
11224Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
11225well.")
11226 (license license:expat)))
11227
11228(define-public python2-jedi
296e1aea 11229 (package-with-python2 python-jedi))
44d10b1f
RW
11230
11231(define-public ptpython
11232 (package
11233 (name "ptpython")
11234 (version "0.34")
11235 (source (origin
11236 (method url-fetch)
11237 (uri (pypi-uri "ptpython" version))
11238 (sha256
11239 (base32
11240 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
11241 (build-system python-build-system)
11242 (arguments
11243 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
11244 (propagated-inputs
11245 `(("python-docopt" ,python-docopt)
11246 ("python-jedi" ,python-jedi)
11247 ("python-prompt-toolkit" ,python-prompt-toolkit)
11248 ("python-pygments" ,python-pygments)))
11249 (home-page "https://github.com/jonathanslenders/ptpython")
11250 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
11251 (description
11252 "ptpython is a Python read-eval-print loop with IDE-like features.
11253It supports syntax highlighting, multiline editing, autocompletion, mouse,
11254color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
11255etc.")
11256 (license license:bsd-3)
11257 (properties `((python2-variant . ,(delay ptpython-2))))))
11258
11259(define-public ptpython-2
11260 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
11261 (package
11262 (inherit base)
11263 (name "ptpython2"))))
11264
11265(define-public python-stem
11266 (package
11267 (name "python-stem")
e746d1c3 11268 (version "1.7.1")
44d10b1f
RW
11269 (source
11270 (origin
11271 (method url-fetch)
11272 (uri (pypi-uri "stem" version))
11273 (sha256
11274 (base32
e746d1c3 11275 "18lc95pmc7i089nlsb06dsxyjl5wbhxfqgdxbjcia35ndh8z7sn9"))))
44d10b1f
RW
11276 (build-system python-build-system)
11277 (arguments
11278 `(#:phases
11279 (modify-phases %standard-phases
11280 (replace 'check
11281 (lambda _
11282 (invoke "./run_tests.py" "--unit")
11283 #t)))))
11284 (native-inputs
11285 `(("python-mock" ,python-mock)
11286 ("python-pycodestyle" ,python-pycodestyle)
11287 ("python-pyflakes" ,python-pyflakes)))
11288 (home-page "https://stem.torproject.org/")
11289 (synopsis
11290 "Python controller library that allows applications to interact with Tor")
11291 (description
11292 "Stem is a Python controller library for Tor. With it you can use Tor's
11293control protocol to script against the Tor process and read descriptor data
11294relays publish about themselves.")
11295 (license license:lgpl3)))
11296
11297(define-public python2-stem
11298 (package-with-python2 python-stem))
11299
11300(define-public python-pyserial
11301 (package
11302 (name "python-pyserial")
00d81f98 11303 (version "3.4")
44d10b1f
RW
11304 (source
11305 (origin
11306 (method url-fetch)
11307 (uri (pypi-uri "pyserial" version))
11308 (sha256
11309 (base32
00d81f98 11310 "09y68bczw324a4jb9a1cfwrbjhq179vnfkkkrybbksp0vqgl0bbf"))))
44d10b1f
RW
11311 (build-system python-build-system)
11312 (arguments
11313 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
11314 ;; #:phases
11315 ;; (modify-phases %standard-phases
11316 ;; (replace 'check
11317 ;; (lambda _
11318 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
11319 (home-page
11320 "https://github.com/pyserial/pyserial")
11321 (synopsis "Python Serial Port Bindings")
11322 (description "@code{pyserial} provide serial port bindings for Python. It
11323supports different byte sizes, stop bits, parity and flow control with RTS/CTS
11324and/or Xon/Xoff. The port is accessed in RAW mode.")
11325 (license license:bsd-3)))
11326
11327(define-public python2-pyserial
11328 (package-with-python2 python-pyserial))
11329
11330(define-public python-kivy
11331 (package
11332 (name "python-kivy")
11333 (version "1.10.1")
11334 (source
11335 (origin
11336 (method url-fetch)
11337 (uri (pypi-uri "Kivy" version))
11338 (file-name (string-append name "-" version ".tar.gz"))
11339 (sha256
11340 (base32
11341 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
11342 (build-system python-build-system)
11343 (arguments
11344 `(#:tests? #f ; Tests require many optional packages
11345 #:phases
11346 (modify-phases %standard-phases
11347 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
11348 (lambda* (#:key inputs #:allow-other-keys)
11349 (setenv "KIVY_SDL2_PATH"
11350 (string-append (assoc-ref inputs "sdl-union")
11351 "/include/SDL2"))
11352 #t)))))
11353 (native-inputs
11354 `(("git" ,git)
11355 ("pkg-config" ,pkg-config)
11356 ("python-cython" ,python-cython)))
11357 (inputs
11358 `(("gstreamer" ,gstreamer)
11359 ("mesa" ,mesa)
11360 ("sdl-union"
11361 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
11362 (home-page "http://kivy.org")
11363 (synopsis
11364 "Multitouch application framework")
11365 (description
11366 "A software library for rapid development of
11367hardware-accelerated multitouch applications.")
11368 (license license:expat)))
11369
11370(define-public python2-kivy
11371 (package-with-python2 python-kivy))
11372
11373(define-public python-kivy-next
11374 (deprecated-package "python-kivy-next" python-kivy))
11375
11376(define-public python2-kivy-next
11377 (deprecated-package "python2-kivy-next" python2-kivy))
11378
11379(define-public python-binaryornot
11380 (package
11381 (name "python-binaryornot")
11382 (version "0.4.4")
11383 (source (origin
11384 (method url-fetch)
11385 (uri (pypi-uri "binaryornot" version))
11386 (sha256
11387 (base32
11388 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
11389 (build-system python-build-system)
86723f98
DM
11390 (arguments
11391 `(#:phases
11392 (modify-phases %standard-phases
ee623903 11393 (add-after 'unpack 'patch-tests
86723f98
DM
11394 (lambda _
11395 ;; TypeError: binary() got an unexpected keyword argument
11396 ;; 'average_size'.
11397 (substitute* "tests/test_check.py"
11398 (("average_size=512") ""))
11399 #t)))))
44d10b1f
RW
11400 (propagated-inputs
11401 `(("python-chardet" ,python-chardet)
11402 ("python-hypothesis" ,python-hypothesis)))
11403 (home-page "https://github.com/audreyr/binaryornot")
11404 (synopsis "Package to check if a file is binary or text")
11405 (description "Ultra-lightweight pure Python package to check if a file is
11406binary or text.")
11407 (license license:bsd-3)
11408 (properties `((python2-variant . ,(delay python2-binaryornot))))))
11409
11410(define-public python2-binaryornot
11411 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
11412 (package (inherit base)
11413 (propagated-inputs
11414 `(("python2-enum34" ,python2-enum34)
11415 ,@(package-propagated-inputs base))))))
11416
f315673d 11417(define-public python-binwalk
9b9ab657
JK
11418 (package
11419 (name "python-binwalk")
11420 (version "2.2.0")
11421 (source
11422 (origin
11423 (method git-fetch)
11424 (uri (git-reference
11425 (url "https://github.com/ReFirmLabs/binwalk")
11426 (commit (string-append "v" version))))
11427 (file-name (git-file-name name version))
11428 (sha256
11429 (base32
11430 "1bxgj569fzwv6jhcbl864nmlsi9x1k1r20aywjxc8b9b1zgqrlvc"))))
11431 (build-system python-build-system)
11432 (arguments
11433 `(#:phases
11434 (modify-phases %standard-phases
11435 (add-before 'check 'set-pythonpath
11436 (lambda _
11437 (setenv "PYTHONPATH"
11438 (string-append
11439 (getcwd) "/src/"
11440 ":" (getenv "PYTHONPATH")))
11441 (setenv "HOME" "")
11442 #t)))))
11443 (native-inputs
11444 `(("python-coverage" ,python-coverage)
11445 ("python-nose" ,python-nose)))
11446 (home-page "https://github.com/ReFirmLabs/binwalk")
11447 (synopsis "Firmware analysis tool")
11448 (description "Binwalk is a tool for analyzing, reverse engineering, and
11449extracting firmware images")
11450 (license license:expat)))
f315673d 11451
44d10b1f
RW
11452(define-public python-nltk
11453 (package
11454 (name "python-nltk")
11455 (version "3.2.1")
11456 (source (origin
11457 (method url-fetch)
11458 (uri (pypi-uri "nltk" version))
11459 (sha256
11460 (base32
11461 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
11462 (build-system python-build-system)
11463 (arguments
11464 '(;; The tests require some extra resources to be downloaded.
11465 ;; TODO Try packaging these resources.
11466 #:tests? #f))
11467 (home-page "http://nltk.org/")
11468 (synopsis "Natural Language Toolkit")
11469 (description "It provides interfaces to over 50 corpora and lexical
11470resources such as WordNet, along with a suite of text processing libraries
11471for classification, tokenization, stemming, tagging, parsing, and semantic
11472reasoning, wrappers for natural language processing libraries.")
11473 (license license:asl2.0)))
11474
11475(define-public python2-nltk
11476 (package-with-python2 python-nltk))
11477
11478(define-public python-pymongo
11479 (package
11480 (name "python-pymongo")
11481 (version "3.7.2")
11482 (source (origin
11483 (method url-fetch)
11484 (uri (pypi-uri "pymongo" version))
11485 (sha256
11486 (base32
11487 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
11488 (build-system python-build-system)
11489 (propagated-inputs
11490 `(("python-certifi" ,python-certifi)))
11491 (home-page "https://github.com/mongodb/mongo-python-driver")
11492 (synopsis "Python driver for MongoDB")
11493 (description "Python driver for MongoDB.")
11494 (license license:asl2.0)))
11495
11496(define-public python2-pymongo
11497 (package-with-python2 python-pymongo))
11498
44d10b1f
RW
11499(define-public python-consul
11500 (package
11501 (name "python-consul")
11502 (version "0.6.1")
11503 (source
11504 (origin
11505 (method url-fetch)
11506 (uri (pypi-uri "python-consul" version))
11507 (sha256
11508 (base32
11509 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
11510 (build-system python-build-system)
11511 (arguments
11512 '(#:tests? #f)) ; The tests are not distributed
11513 (propagated-inputs
11514 `(("python-requests" ,python-requests)
11515 ("python-six" ,python-six)))
11516 (home-page "https://github.com/cablehead/python-consul")
11517 (synopsis "Python client for Consul")
11518 (description
11519 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
11520discovery, monitoring and configuration.")
11521 (license license:expat)))
11522
11523(define-public python2-consul
11524 (package-with-python2 python-consul))
11525
11526(define-public python-schematics
11527 (package
11528 (name "python-schematics")
11529 (version "1.1.1")
11530 (source
1961d187
TGR
11531 (origin
11532 (method git-fetch)
11533 (uri (git-reference
11534 (url "https://github.com/schematics/schematics.git")
11535 (commit (string-append "v" version))))
11536 (file-name (git-file-name name version))
11537 (sha256
11538 (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd"))))
44d10b1f
RW
11539 (build-system python-build-system)
11540 (propagated-inputs
11541 `(("python-six" ,python-six)))
11542 (arguments
1961d187
TGR
11543 ;; The tests require a bunch of not very nice packages with fixed
11544 ;; version requirements (e.g. python-coveralls).
11545 `(#:tests? #f))
44d10b1f
RW
11546 (home-page "https://github.com/schematics/schematics")
11547 (synopsis "Python Data Structures for Humans")
11548 (description "Python Data Structures for Humans.")
11549 (license license:bsd-3)))
11550
11551(define-public python2-schematics
11552 (package-with-python2 python-schematics))
11553
11554(define-public python-odfpy
11555 (package
11556 (name "python-odfpy")
11557 (version "1.3.3")
11558 (source (origin
11559 (method url-fetch)
11560 (uri (pypi-uri "odfpy" version))
11561 (sha256
11562 (base32
11563 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
11564 (arguments
11565 `(#:modules ((srfi srfi-1)
11566 (guix build python-build-system)
11567 (guix build utils))
11568 #:phases
11569 (modify-phases %standard-phases
11570 (replace 'check
11571 ;; The test runner invokes python2 and python3 for test*.py.
11572 ;; To avoid having both in inputs, we replicate it here.
11573 (lambda _
21ccc01d
RW
11574 (for-each (lambda (test-file) (invoke "python" test-file))
11575 (find-files "tests" "^test.*\\.py$"))
11576 #t)))))
44d10b1f
RW
11577 (build-system python-build-system)
11578 (home-page "https://github.com/eea/odfpy")
11579 (synopsis "Python API and tools to manipulate OpenDocument files")
11580 (description "Collection of libraries and utility programs written in
11581Python to manipulate OpenDocument 1.2 files.")
11582 (license
11583 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
11584 ;; number of files with other licenses.
11585 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
11586
11587(define-public python2-odfpy
11588 (package-with-python2 python-odfpy))
11589
11590(define-public python-natsort
11591 (package
11592 (name "python-natsort")
11593 (version "5.4.1")
11594 (source (origin
11595 (method url-fetch)
11596 (uri (pypi-uri "natsort" version))
11597 (sha256
11598 (base32
11599 "0i732amg6yzkx4g4c9j09jmqq39q377x9cl2nbkm5hax2c2v0wxf"))))
11600 (build-system python-build-system)
11601 (arguments
11602 `(#:modules ((guix build utils)
11603 (guix build python-build-system)
11604 (srfi srfi-1)
11605 (srfi srfi-26)
11606 (ice-9 ftw))
11607 #:phases
11608 (modify-phases %standard-phases
11609 (add-before 'check 'set-cachedir
11610 ;; Tests require write access to $HOME by default
11611 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
11612 (replace 'check
11613 (lambda _
11614 (let ((cwd (getcwd)))
11615 (setenv "PYTHONPATH"
11616 (string-append
11617 cwd "/build/"
11618 (find (cut string-prefix? "lib" <>)
11619 (scandir (string-append cwd "/build")))
11620 ":"
11621 (getenv "PYTHONPATH")))
11622 (invoke "pytest" "-v")))))))
11623 (native-inputs
11624 `(("python-hypothesis" ,python-hypothesis)
11625 ("python-pytest-cov" ,python-pytest-cov)
11626 ("python-pytest-mock" ,python-pytest-mock)
11627 ("python-pytest" ,python-pytest)))
11628 (propagated-inputs ; TODO: Add python-fastnumbers.
11629 `(("python-pyicu" ,python-pyicu)))
11630 (home-page "https://github.com/SethMMorton/natsort")
11631 (synopsis "Natural sorting for python and shell")
11632 (description
11633 "Natsort lets you apply natural sorting on lists instead of
11634lexicographical. If you use the built-in @code{sorted} method in python
36a4366d
EF
11635on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4},
11636@code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20},
11637@code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that
11638identifies numbers and sorts them separately from strings. It can also sort
11639version numbers, real numbers, mixed types and more, and comes with a shell
11640command @command{natsort} that exposes this functionality in the command line.")
44d10b1f
RW
11641 (license license:expat)
11642 (properties `((python2-variant . ,(delay python2-natsort))))))
11643
11644(define-public python2-natsort
11645 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
11646 (package (inherit base)
11647 (native-inputs
11648 `(("python2-pathlib" ,python2-pathlib)
11649 ,@(package-native-inputs base))))))
11650
11651(define-public python-glances
11652 (package
11653 (name "python-glances")
a4ac25df 11654 (version "3.1.2")
44d10b1f
RW
11655 (source
11656 (origin
11657 (method url-fetch)
11658 (uri (pypi-uri "Glances" version))
11659 (sha256
a4ac25df 11660 (base32 "15384pbvw9wj4sb8zgvd9v1812vrypbyjg0acicjf1hdb3p30fkk"))
15b4c911
TGR
11661 (modules '((guix build utils)))
11662 (snippet
11663 '(begin
11664 ;; Glances phones PyPI for weekly update checks by default.
11665 ;; Disable these. The user can re-enable them if desired.
11666 (substitute* "glances/outdated.py"
11667 (("^(.*)self\\.load_config\\(config\\)\n" line indentation)
11668 (string-append indentation
11669 "self.args.disable_check_update = True\n"
11670 line)))
11671 #t))))
44d10b1f
RW
11672 (build-system python-build-system)
11673 (propagated-inputs
9898a2d3
TGR
11674 `(("python-future" ,python-future)
11675 ("python-psutil" ,python-psutil)))
a4ac25df 11676 (home-page "https://github.com/nicolargo/glances")
bab94ffa 11677 (synopsis "Cross-platform curses-based monitoring tool")
44d10b1f
RW
11678 (description
11679 "Glances is a curses-based monitoring tool for a wide variety of platforms.
bab94ffa
TGR
11680Glances uses the PsUtil library to get information from your system. It
11681monitors CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
44d10b1f
RW
11682 (license license:lgpl3+)))
11683
11684(define-public python2-glances
11685 (package-with-python2 python-glances))
11686
11687(define-public python-graphql-core
11688 (package
11689 (name "python-graphql-core")
11690 (version "0.5.3")
11691 (source
11692 (origin
11693 (method url-fetch)
11694 (uri (pypi-uri "graphql-core" version))
11695 (sha256
11696 (base32
11697 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
11698 (build-system python-build-system)
11699 (arguments
11700 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
11701 #:phases
11702 (modify-phases %standard-phases
11703 (add-after 'unpack 'patch-hardcoded-version
11704 (lambda _ (substitute*
11705 "setup.py"
11706 (("'gevent==1.1rc1'") "'gevent'"))
11707 #t)))))
11708 (native-inputs
11709 `(("python-gevent" ,python-gevent)
11710 ("python-mock" ,python-mock)
11711 ("python-pytest-mock" ,python-pytest-mock)))
11712 (propagated-inputs
11713 `(("python-promise" ,python-promise)
11714 ("python-six" ,python-six)))
11715 (home-page "https://github.com/graphql-python/graphql-core")
11716 (synopsis "GraphQL implementation for Python")
11717 (description
11718 "GraphQL implementation for Python. GraphQL is a data query language and
11719runtime designed and used to request and deliver data to mobile and web apps.
11720This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
11721to Python.")
11722 (license license:expat)))
11723
11724(define-public python2-graphql-core
11725 (package-with-python2 python-graphql-core))
11726
11727(define-public python-graphql-relay
11728 (package
11729 (name "python-graphql-relay")
11730 (version "0.4.5")
11731 (source
11732 (origin
11733 (method url-fetch)
11734 (uri (pypi-uri "graphql-relay" version))
11735 (sha256
11736 (base32
11737 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
11738 (build-system python-build-system)
11739 (arguments
11740 '(#:tests? #f)) ; The tests are not distributed
11741 (propagated-inputs
11742 `(("python-graphql-core" ,python-graphql-core)
11743 ("python-promise" ,python-promise)
11744 ("python-six" ,python-six)))
11745 (home-page "https://github.com/graphql-python/graphql-relay-py")
11746 (synopsis "Relay implementation for Python")
11747 (description
11748 "This is a library to allow the easy creation of Relay-compliant servers
11749using the GraphQL Python reference implementation of a GraphQL server. It
11750should be noted that the code is a exact port of the original
11751@url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
11752from Facebook.")
11753 (license license:expat)))
11754
11755(define-public python2-graphql-relay
11756 (package-with-python2 python-graphql-relay))
11757
11758(define-public python-graphene
11759 (package
11760 (name "python-graphene")
11761 (version "0.10.2")
11762 (source
11763 (origin
11764 (method url-fetch)
11765 (uri (pypi-uri "graphene" version))
11766 (sha256
11767 (base32
11768 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
11769 (build-system python-build-system)
11770 (propagated-inputs
11771 `(("python-graphql-core" ,python-graphql-core)
11772 ("python-graphql-relay" ,python-graphql-relay)
11773 ("python-iso8601" ,python-iso8601)
11774 ("python-promise" ,python-promise)
11775 ("python-six" ,python-six)))
11776 (arguments
11777 `(#:tests? #f)) ; no tests/ in the PyPI tarball
3dd74c8d 11778 (home-page "https://graphene-python.org/")
44d10b1f
RW
11779 (synopsis "GraphQL Framework for Python")
11780 (description
11781 "Graphene is a Python library for building GraphQL schemas/types.
11782A GraphQL schema describes your data model, and provides a GraphQL server
11783with an associated set of resolve methods that know how to fetch data.")
11784 (properties `((python2-variant . ,(delay python2-graphene))))
11785 (license license:expat)))
11786
11787(define-public python2-graphene
11788 (let ((base (package-with-python2
11789 (strip-python2-variant python-graphene))))
11790 (package (inherit base)
11791 (native-inputs
11792 `(("python2-sqlalchemy" ,python2-sqlalchemy)
11793 ,@(package-native-inputs base))))))
11794
11795(define-public python-nautilus
11796 (package
11797 (name "python-nautilus")
11798 (version "0.4.9")
11799 (source
11800 (origin
11801 (method url-fetch)
11802 (uri (pypi-uri "nautilus" version))
11803 (sha256
11804 (base32
11805 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
11806 (build-system python-build-system)
11807 (arguments `(#:tests? #f)) ; fails to import test modules
11808 (propagated-inputs
11809 `(("python-bcrypt" ,python-bcrypt)
11810 ("python-click" ,python-click)
11811 ("python-consul" ,python-consul)
11812 ("python-graphene" ,python-graphene)
11813 ("python-jinja2" ,python-jinja2)
11814 ("python-peewee" ,python-peewee)
11815 ("python-pika" ,python-pika)
11816 ("python-tornado" ,python-tornado)
11817 ("python-wtforms" ,python-wtforms)))
11818 (native-inputs
11819 `(("python-nose2" ,python-nose2)))
11820 (home-page "https://github.com/AlecAivazis/nautilus")
11821 (synopsis "Library for creating microservice applications")
11822 (description
11823 "Nautilus is a framework for flux based microservices that looks to
11824provide extendible implementations of common aspects of a cloud so that you can
11825focus on building massively scalable web applications.")
11826 (license license:expat)))
11827
11828(define-public python-snowballstemmer
11829 (package
11830 (name "python-snowballstemmer")
11831 (version "1.2.1")
11832 (source (origin
11833 (method url-fetch)
11834 (uri (pypi-uri "snowballstemmer" version))
11835 (sha256
11836 (base32
11837 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
11838 (build-system python-build-system)
11839 (arguments
11840 `(;; No tests exist
11841 #:tests? #f))
11842 (home-page "https://github.com/shibukawa/snowball_py")
11843 (synopsis "Snowball stemming library collection for Python")
11844 (description "This package provides 16 word stemmer algorithms generated
11845from Snowball algorithms. It includes the 15 original ones plus the Poerter
11846English stemmer.")
11847 (license license:bsd-3)))
11848
11849(define-public python2-snowballstemmer
11850 (package-with-python2 python-snowballstemmer))
11851
44d10b1f
RW
11852(define-public python-setproctitle
11853(package
11854 (name "python-setproctitle")
11855 (version "1.1.10")
11856 (source
11857 (origin
11858 (method url-fetch)
11859 (uri (pypi-uri "setproctitle" version))
11860 (sha256
11861 (base32
11862 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
11863 (build-system python-build-system)
11864 (arguments
11865 '(#:phases
11866 (modify-phases %standard-phases
11867 (add-before 'check 'patch-Makefile
11868 ;; Stricly this is only required for the python2 variant.
11869 ;; But adding a phase in an inherited package seems to be
11870 ;; cumbersum. So we patch even for python3.
11871 (lambda _
11872 (let ((nose (assoc-ref %build-inputs "python2-nose")))
11873 (when nose
11874 (substitute* "Makefile"
11875 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
11876 (string-append nose "/bin/nosetests "))))
11877 #t)))
11878 (replace 'check
11879 (lambda _
11880 (setenv "PYTHON" (or (which "python3") (which "python")))
11881 (setenv "PYCONFIG" (or (which "python3-config")
11882 (which "python-config")))
11883 (setenv "CC" "gcc")
11884 ;; No need to extend PYTHONPATH to find the built package, since
11885 ;; the Makefile will build anyway
11886 (invoke "make" "check"))))))
11887 (native-inputs
11888 `(("procps" ,procps))) ; required for tests
11889 (home-page
11890 "https://github.com/dvarrazzo/py-setproctitle")
11891 (synopsis
11892 "Setproctitle implementation for Python to customize the process title")
11893 (description "The library allows a process to change its title (as displayed
11894by system tools such as ps and top).
11895
11896Changing the title is mostly useful in multi-process systems, for
11897example when a master process is forked: changing the children's title
11898allows to identify the task each process is busy with. The technique
11899is used by PostgreSQL and the OpenSSH Server for example.")
11900 (license license:bsd-3)
11901 (properties `((python2-variant . ,(delay python2-setproctitle))))))
11902
11903(define-public python2-setproctitle
11904 (let ((base (package-with-python2
11905 (strip-python2-variant python-setproctitle))))
11906 (package
11907 (inherit base)
11908 (native-inputs `(("python2-nose" ,python2-nose)
11909 ,@(package-native-inputs base))))))
11910
11911(define-public python-validictory
11912 (package
11913 (name "python-validictory")
11914 (version "1.0.1")
11915 (source
11916 (origin
11917 (method url-fetch)
11918 (uri (pypi-uri "validictory" version))
11919 (sha256
11920 (base32
11921 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
11922 (build-system python-build-system)
11923 (arguments
11924 '(#:phases
11925 (modify-phases %standard-phases
11926 (add-after 'unpack 'bootstrap
11927 ;; Move the tests out of the package directory to avoid
11928 ;; packaging them.
11929 (lambda* _
11930 (rename-file "validictory/tests" "tests")
11931 (delete-file "tests/__init__.py")))
11932 (replace 'check
11933 (lambda _
11934 ;; Extend PYTHONPATH so the built package will be found.
11935 (setenv "PYTHONPATH"
11936 (string-append (getcwd) "/build/lib:"
11937 (getenv "PYTHONPATH")))
6568bd5d 11938 (invoke "py.test" "-vv" ))))))
44d10b1f
RW
11939 (native-inputs
11940 `(("python-pytest" ,python-pytest)))
11941 (home-page
11942 "https://github.com/jamesturk/validictory")
11943 (synopsis "General purpose Python data validator")
11944 (description "It allows validation of arbitrary Python data structures.
11945
11946The schema format is based on the JSON Schema
11947proposal (http://json-schema.org), so combined with json the library is also
11948useful as a validator for JSON data.")
11949 (license license:expat)))
11950
11951(define-public python2-validictory
11952 (package-with-python2 python-validictory))
11953
11954(define-public python-pyelftools
11955 (package
11956 (name "python-pyelftools")
11957 (version "0.25")
11958 (source
11959 (origin
11960 (method url-fetch)
11961 (uri (pypi-uri "pyelftools" version))
11962 (sha256
11963 (base32
11964 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
11965 (build-system python-build-system)
11966 (arguments
11967 `(#:phases
11968 (modify-phases %standard-phases
11969 (add-before 'check 'set-pythonpath
11970 (lambda _
11971 (setenv "PYTHONPATH"
11972 (string-append
11973 (getcwd) "/test/"
11974 ":" (getenv "PYTHONPATH")))
11975 #t)))))
11976 (home-page
11977 "https://github.com/eliben/pyelftools")
11978 (synopsis
11979 "Analyze binary and library file information")
11980 (description "This Python library provides interfaces for parsing and
11981analyzing two binary and library file formats; the Executable and Linking
11982Format (ELF), and debugging information in the Debugging With Attributed
11983Record Format (DWARF).")
11984 (license license:public-domain)))
11985
11986(define-public python-pyev
11987 (package
11988 (name "python-pyev")
11989 (version "0.9.0")
11990 (source
11991 (origin
11992 (method url-fetch)
11993 (uri (pypi-uri "pyev" version))
11994 (sha256
11995 (base32
11996 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
11997 (build-system python-build-system)
11998 (arguments
11999 `(#:tests? #f ; no test suite
12000 #:phases
12001 (modify-phases %standard-phases
12002 (add-after 'unpack 'patch
12003 (lambda* (#:key inputs #:allow-other-keys)
12004 (let ((libev (string-append (assoc-ref inputs "libev")
12005 "/lib/libev.so.4")))
12006 (substitute* "setup.py"
12007 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
12008 (string-append "libev_dll_name = \"" libev "\"")))))))))
12009 (inputs
12010 `(("libev" ,libev)))
12011 (home-page "http://pythonhosted.org/pyev/")
12012 (synopsis "Python libev interface")
12013 (description "Pyev provides a Python interface to libev.")
12014 (license license:gpl3)))
12015
12016(define-public python2-pyev
12017 (package-with-python2 python-pyev))
12018
12019(define-public python-imagesize
12020 (package
12021 (name "python-imagesize")
12022 (version "1.1.0")
12023 (source
12024 (origin
12025 (method url-fetch)
12026 (uri (pypi-uri "imagesize" version))
12027 (sha256
12028 (base32
12029 "1dg3wn7qpwmhgqc0r9na2ding1wif9q5spz3j9zn2riwphc2k0zk"))))
12030 (build-system python-build-system)
12031 (home-page "https://github.com/shibukawa/imagesize_py")
12032 (synopsis "Gets image size of files in various formats in Python")
12033 (description
12034 "This package allows determination of image size from
12035PNG, JPEG, JPEG2000 and GIF files in pure Python.")
12036 (license license:expat)))
12037
12038(define-public python2-imagesize
12039 (package-with-python2 python-imagesize))
12040
12041(define-public python-termstyle
12042 (package
12043 (name "python-termstyle")
12044 (version "0.1.11")
12045 (source
12046 (origin
12047 (method url-fetch)
12048 (uri (pypi-uri "termstyle" version))
12049 (sha256
12050 (base32
12051 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
12052 (build-system python-build-system)
12053 (arguments
12054 '(#:phases
12055 (modify-phases %standard-phases
12056 (replace 'check
12057 (lambda _
831080a6 12058 (invoke "python" "test3.py"))))))
44d10b1f
RW
12059 (home-page "https://github.com/gfxmonk/termstyle")
12060 (synopsis "Console text coloring for Python")
12061 (description "This package provides console text coloring for Python.")
12062 (license license:bsd-3)))
12063
12064(define-public python-argcomplete
12065 (package
12066 (name "python-argcomplete")
98aecd3a 12067 (version "1.10.3")
44d10b1f 12068 (source
98aecd3a
RW
12069 (origin
12070 (method url-fetch)
12071 (uri (pypi-uri "argcomplete" version))
12072 (sha256
12073 (base32
12074 "02jkc44drb0yjz6x28lvg6rj607n8r2irdpdvyylm8xnycn54zx3"))))
44d10b1f 12075 (build-system python-build-system)
98aecd3a
RW
12076 (arguments
12077 `(#:phases
12078 (modify-phases %standard-phases
12079 (add-after 'unpack 'embed-tool-references
12080 (lambda _
12081 (substitute* "argcomplete/bash_completion.d/python-argcomplete.sh"
12082 ((" grep")
12083 (string-append " " (which "grep")))
12084 ((" egrep")
12085 (string-append " " (which "egrep")))
12086 (("elif which")
12087 (string-append "elif " (which "which")))
12088 (("\\$\\(which")
12089 (string-append "$(" (which "which"))))
12090 #t)))))
12091 (inputs
12092 `(("grep" ,grep)
12093 ("which" ,which)))
44d10b1f 12094 (native-inputs
98aecd3a
RW
12095 `(("python-coverage" ,python-coverage)
12096 ("python-flake8" ,python-flake8)
12097 ("python-pexpect" ,python-pexpect)
12098 ("python-wheel" ,python-wheel)
44d10b1f 12099 ("tcsh" ,tcsh)
98aecd3a
RW
12100 ("fish" ,fish)
12101 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
44d10b1f
RW
12102 (home-page "https://github.com/kislyuk/argcomplete")
12103 (synopsis "Shell tab completion for Python argparse")
12104 (description "argcomplete provides extensible command line tab completion
12105of arguments and options for Python scripts using @code{argparse}. It's
12106particularly useful for programs with many options or sub-parsers that can
12107dynamically suggest completions; for example, when browsing resources over the
12108network.")
12109 (license license:asl2.0)))
12110
12111(define-public python2-argcomplete
12112 (package-with-python2 python-argcomplete))
12113
12114(define-public python-xopen
12115 (package
12116 (name "python-xopen")
24d64989 12117 (version "0.5.0")
44d10b1f
RW
12118 (source
12119 (origin
12120 (method url-fetch)
12121 (uri (pypi-uri "xopen" version))
12122 (sha256
12123 (base32
24d64989 12124 "17xbrgi23l87yg6h0qcknssp2q812miiy33qw6v45v5gx0jwv5xh"))))
44d10b1f 12125 (build-system python-build-system)
24d64989
RW
12126 (propagated-inputs
12127 `(("python-setuptools-scm" ,python-setuptools-scm)))
44d10b1f
RW
12128 (home-page "https://github.com/marcelm/xopen/")
12129 (synopsis "Open compressed files transparently")
12130 (description "This module provides an @code{xopen} function that works like
12131Python's built-in @code{open} function, but can also deal with compressed files.
12132Supported compression formats are gzip, bzip2 and, xz, and are automatically
12133recognized by their file extensions. The focus is on being as efficient as
12134possible on all supported Python versions.")
12135 (license license:expat)))
12136
12137(define-public python2-xopen
12138 (let ((base (package-with-python2
12139 (strip-python2-variant python-xopen))))
12140 (package
12141 (inherit base)
12142 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
12143 ,@(package-propagated-inputs base))))))
12144
12145(define-public python-cheetah
12146 (package
12147 (name "python-cheetah")
12148 (version "3.1.0")
12149 (source
12150 (origin
12151 (method url-fetch)
12152 (uri (pypi-uri "Cheetah3" version))
12153 (sha256
12154 (base32
12155 "1ihag9cxll6b86fc8v5lkhmr3brdbi4yiz16zpgw79yylmv8fgr9"))))
12156 (build-system python-build-system)
12157 (arguments
12158 `(#:modules ((guix build utils)
12159 (guix build python-build-system)
12160 (ice-9 ftw)
12161 (srfi srfi-1)
12162 (srfi srfi-26))
12163 #:phases (modify-phases %standard-phases
12164 (add-after 'unpack 'use-absolute-python
12165 (lambda _
12166 (substitute* "Cheetah/CheetahWrapper.py"
12167 (("#!/usr/bin/env python")
12168 (string-append "#!" (which "python"))))
12169 #t))
12170 (replace 'check
12171 (lambda _
12172 (let ((cwd (getcwd)))
12173 (setenv "PYTHONPATH"
12174 (string-append
12175 cwd "/build/"
12176 (find (cut string-prefix? "lib" <>)
12177 (scandir (string-append cwd "/build")))
12178 ":" (getenv "PYTHONPATH")))
12179 (setenv "PATH"
12180 (string-append (getenv "PATH")
12181 ":" cwd "/bin"))
12182 (setenv "TMPDIR" "/tmp")
12183
12184 (substitute* "Cheetah/Tests/Test.py"
12185 (("unittest.TextTestRunner\\(\\)")
12186 "unittest.TextTestRunner(verbosity=2)"))
12187
12188 (invoke "python" "Cheetah/Tests/Test.py")))))))
12189 (propagated-inputs
12190 `(("python-markdown" ,python-markdown))) ;optional
12191 (home-page "http://cheetahtemplate.org/")
12192 (synopsis "Template engine")
12193 (description "Cheetah is a text-based template engine and Python code
12194generator.
12195
12196Cheetah can be used as a standalone templating utility or referenced as
12197a library from other Python applications. It has many potential uses,
12198but web developers looking for a viable alternative to ASP, JSP, PHP and
12199PSP are expected to be its principle user group.
12200
12201Features:
12202@enumerate
12203@item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
12204 text-based format.
12205@item Cleanly separates content, graphic design, and program code.
12206@item Blends the power and flexibility of Python with a simple template language
12207 that non-programmers can understand.
12208@item Gives template writers full access to any Python data structure, module,
12209 function, object, or method in their templates.
12210@item Makes code reuse easy by providing an object-orientated interface to
12211 templates that is accessible from Python code or other Cheetah templates.
12212 One template can subclass another and selectively reimplement sections of it.
12213@item Provides a simple, yet powerful, caching mechanism that can dramatically
12214 improve the performance of a dynamic website.
12215@item Compiles templates into optimized, yet readable, Python code.
12216@end enumerate")
12217 (license (license:x11-style "file://LICENSE"))))
12218
12219(define-public python2-cheetah
12220 (package-with-python2 python-cheetah))
12221
12222(define-public python-dulwich
12223 (package
12224 (name "python-dulwich")
12225 (version "0.18.6")
12226 (source
12227 (origin
12228 (method url-fetch)
12229 (uri (list (string-append "https://www.dulwich.io/releases/"
12230 "dulwich-" version ".tar.gz")
12231 (pypi-uri "dulwich" version)))
12232 (sha256
12233 (base32
12234 "1aa1xfrxkc3j9s4xi0llhf5gndyi9ryprcxsqfa5fcb8ph34981q"))))
12235 (build-system python-build-system)
12236 (arguments
12237 `(#:phases
12238 (modify-phases %standard-phases
12239 (add-before 'check 'fix-tests
12240 (lambda* (#:key inputs #:allow-other-keys)
12241 ;; The tests use Popen with a custom environment which doesn't
12242 ;; include PATH.
12243 (substitute* "dulwich/tests/compat/utils.py"
12244 (("'git'") (string-append "'"
12245 (which "git")
12246 "'")))
12247 (substitute* '("dulwich/tests/test_repository.py"
12248 "dulwich/tests/test_hooks.py")
12249 (("#!/bin/sh") (string-append "#!" (which "sh"))))
12250 (setenv "TEST_RUNNER" "unittest")
12251 (setenv "PYTHONHASHSEED" "random")
12252 #t)))))
12253 (propagated-inputs
12254 `(("python-fastimport" ,python-fastimport)))
12255 (native-inputs
12256 `(("python-mock" ,python-mock)
12257 ("python-geventhttpclient" ,python-geventhttpclient)
12258 ("git" ,git)))
12259 (home-page "https://www.dulwich.io/")
12260 (synopsis "Git implementation in Python")
12261 (description "Dulwich is an implementation of the Git file formats and
12262protocols written in pure Python.")
12263 ;; Can be used with either license.
12264 (license (list license:asl2.0 license:gpl2+))))
12265
12266(define-public python2-dulwich
12267 (package-with-python2 python-dulwich))
12268
12269(define-public python-pbkdf2
12270 (package
12271 (name "python-pbkdf2")
12272 (version "1.3")
12273 (source
12274 (origin
12275 (method url-fetch)
12276 (uri (pypi-uri "pbkdf2" version))
12277 (sha256
12278 (base32
12279 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
12280 (build-system python-build-system)
12281 (arguments
12282 '(#:phases
12283 (modify-phases %standard-phases
12284 (replace 'check
12285 (lambda _
12286 (setenv "PYTHONPATH"
12287 (string-append (getcwd) "/build/lib:"
12288 (getenv "PYTHONPATH")))
ee2bb944 12289 (invoke "python" "test/test_pbkdf2.py"))))))
44d10b1f
RW
12290 (propagated-inputs
12291 `(("python-pycrypto" ,python-pycrypto))) ; optional
12292 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
12293 (synopsis "Password-based key derivation")
12294 (description "This module implements the password-based key derivation
12295function, PBKDF2, specified in RSA PKCS#5 v2.0.
12296
12297PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
12298is part of the RSA Public Key Cryptography Standards series. The provided
12299implementation takes a password or a passphrase and a salt value (and
12300optionally a iteration count, a digest module, and a MAC module) and provides
12301a file-like object from which an arbitrarly-sized key can be read.")
12302 (license license:expat)))
12303
12304(define-public python2-pbkdf2
12305 (package-with-python2 python-pbkdf2))
12306
12307(define-public python-qrcode
12308 (package
12309 (name "python-qrcode")
217ea1a1 12310 (version "6.1")
44d10b1f
RW
12311 (source
12312 (origin
12313 (method url-fetch)
12314 (uri (pypi-uri "qrcode" version))
12315 (sha256
217ea1a1 12316 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
44d10b1f
RW
12317 (build-system python-build-system)
12318 (arguments
12319 ;; FIXME: Tests require packaging 'pymaging'.
12320 '(#:tests? #f))
12321 (propagated-inputs
12322 `(("python-lxml" ,python-lxml) ; for SVG output
12323 ("python-pillow" ,python-pillow) ; for PNG output
12324 ("python-six" ,python-six)))
44d10b1f
RW
12325 (home-page "https://github.com/lincolnloop/python-qrcode")
12326 (synopsis "QR Code image generator")
12327 (description "This package provides a pure Python QR Code generator
12328module. It uses the Python Imaging Library (PIL) to allow for the generation
12329of QR Codes.
12330
12331In addition this package provides a command line tool to generate QR codes and
12332either write these QR codes to a file or do the output as ascii art at the
12333console.")
12334 (license license:bsd-3)))
12335
12336(define-public python2-qrcode
12337 (package-with-python2 python-qrcode))
12338
12339(define-public python-rst2ansi
12340 (package
12341 (name "python-rst2ansi")
12342 (version "0.1.5")
12343 (source
12344 (origin
12345 (method url-fetch)
12346 (uri (pypi-uri "rst2ansi" version))
12347 (sha256
12348 (base32
12349 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
12350 (build-system python-build-system)
12351 (propagated-inputs
12352 `(("python-docutils" ,python-docutils)))
12353 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
12354 (synopsis "Convert RST to ANSI-decorated console output")
12355 (description
12356 "Python module dedicated to rendering RST (reStructuredText) documents
12357to ansi-escaped strings suitable for display in a terminal.")
12358 (license license:expat)))
12359
12360(define-public python-ansi2html
12361 (package
12362 (name "python-ansi2html")
12363 (version "1.2.0")
12364 (source
12365 (origin
12366 (method url-fetch)
12367 (uri (pypi-uri "ansi2html" version))
12368 (sha256
12369 (base32
12370 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
12371 (build-system python-build-system)
12372 (native-inputs
12373 `(("python-mock" ,python-mock)
12374 ("python-nose" ,python-nose)))
12375 (propagated-inputs
12376 `(("python-six" ,python-six)))
12377 (home-page "https://github.com/ralphbean/ansi2html")
12378 (synopsis "Convert ANSI-decorated console output to HTML")
12379 (description
12380 "@command{ansi2html} is a Python library and command line utility for
12381convering text with ANSI color codes to HTML or LaTeX.")
12382 (license license:gpl3+)))
12383
12384(define-public python2-ansi2html
12385 (package-with-python2 python-ansi2html))
12386
12387(define-public python-ddt
12388 (package
12389 (name "python-ddt")
12390 (version "1.1.3")
12391 (source
12392 (origin
12393 (method url-fetch)
12394 (uri (pypi-uri "ddt" version))
12395 (sha256
12396 (base32
12397 "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk"))))
12398 (build-system python-build-system)
12399 (native-inputs
12400 `(("python-mock" ,python-mock)
12401 ("python-nose" ,python-nose)))
12402 (propagated-inputs
12403 `(("python-six" ,python-six)
12404 ("python-pyyaml" ,python-pyyaml)))
12405 (home-page "https://github.com/txels/ddt")
12406 (synopsis "Data-Driven Tests")
12407 (description
12408 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
12409running it with different test data, and make it appear as multiple test
12410cases.")
12411 (license license:expat)))
12412
12413(define-public python2-ddt
12414 (package-with-python2 python-ddt))
12415
12416(define-public python-pycountry
12417 (package
12418 (name "python-pycountry")
12419 (version "18.5.26")
12420 (source
12421 (origin
12422 (method url-fetch)
12423 (uri (pypi-uri "pycountry" version))
12424 (sha256
12425 (base32
12426 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
12427 (build-system python-build-system)
12428 (home-page "https://bitbucket.org/flyingcircus/pycountry")
12429 (synopsis "ISO databases for languages, countries, currencies, etc.")
12430 (description
12431 "@code{pycountry} provides the ISO databases for the standards:
12432@enumerate
12433@item 639-3 (Languages)
12434@item 3166 (Countries)
12435@item 3166-3 (Deleted Countries)
12436@item 3166-2 (Subdivisions of countries)
12437@item 4217 (Currencies)
12438@item 15924 (Scripts)
12439@end enumerate
12440It includes a copy from Debian’s pkg-isocodes and makes the data accessible
12441through a Python API.")
12442 (license license:lgpl2.1+)))
12443
12444(define-public python2-pycountry
12445 (package-with-python2 python-pycountry))
12446
12447(define-public python-pycosat
12448 (package
12449 (name "python-pycosat")
12450 (version "0.6.1")
12451 (source
12452 (origin
12453 (method url-fetch)
12454 (uri (pypi-uri "pycosat" version))
12455 (sha256
12456 (base32
12457 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
12458 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
12459 (build-system python-build-system)
12460 (home-page "https://github.com/ContinuumIO/pycosat")
12461 (synopsis "Bindings to picosat (a SAT solver)")
12462 (description
12463 "This package provides efficient Python bindings to @code{picosat} on
12464the C level. When importing pycosat, the @code{picosat} solver becomes part
12465of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
12466Problem} (SAT) solver.")
12467 (license license:expat)))
12468
12469(define-public python2-pycosat
12470 (package-with-python2 python-pycosat))
12471
12472(define-public python2-ruamel.ordereddict
12473 (package
12474 (name "python2-ruamel.ordereddict")
12475 (version "0.4.9")
12476 (source
12477 (origin
12478 (method url-fetch)
12479 (uri (pypi-uri "ruamel.ordereddict" version))
12480 (sha256
12481 (base32
12482 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
12483 (build-system python-build-system)
12484 (arguments
12485 `(#:python ,python-2
12486 #:phases
12487 (modify-phases %standard-phases
12488 (delete 'check)
12489 (add-after 'install 'check
12490 (lambda* (#:key inputs outputs #:allow-other-keys)
12491 (add-installed-pythonpath inputs outputs)
f987ac30 12492 (invoke "python" "test/testordereddict.py"))))))
44d10b1f
RW
12493 (home-page "https://bitbucket.org/ruamel/ordereddict")
12494 (synopsis "Version of dict that keeps keys in insertion order")
12495 (description
12496 "This is an implementation of an ordered dictionary with @dfn{Key
12497Insertion Order} (KIO: updates of values do not affect the position of the
12498key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
12499removed and put at the back). The standard library module @code{OrderedDict},
12500implemented later, implements a subset of @code{ordereddict} functionality.
12501Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
12502Order} (KSO, no sorting function can be specified, but a transform can be
12503specified to apply on the key before comparison (e.g. @code{string.lower})).")
12504 (license license:expat)))
12505
12506(define-public python-pypeg2
12507 (package
12508 (name "python-pypeg2")
12509 (version "2.15.2")
12510 (source
12511 (origin
12512 (method url-fetch)
12513 (uri (pypi-uri "pyPEG2" version))
12514 (sha256
12515 (base32
12516 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
12517 (build-system python-build-system)
12518 (propagated-inputs `(("python-lxml" ,python-lxml)))
12519 (arguments
12520 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
12521 '(#:tests? #f))
12522 (home-page "https://fdik.org/pyPEG/")
12523 (synopsis "Parsering Expression Grammars in Python")
12524 (description "PyPEG is an intrinsic parser interpreter framework for
12525Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
12526parse many formal languages.")
12527 (license license:gpl2)))
12528
12529(define-public python-incremental
12530 (package
12531 (name "python-incremental")
12532 (version "17.5.0")
12533 (source
12534 (origin
12535 (method url-fetch)
12536 (uri (pypi-uri "incremental" version))
12537 (sha256
12538 (base32
12539 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
12540 (build-system python-build-system)
12541 (home-page "https://github.com/hawkowl/incremental")
12542 (synopsis "Library for versioning Python projects")
12543 (description "Incremental is a small library that versions your Python
12544projects.")
12545 (license license:expat)))
12546
12547(define-public python2-incremental
12548 (package-with-python2 python-incremental))
12549
12550(define-public python-invoke
12551 (package
12552 (name "python-invoke")
b5544cb4 12553 (home-page "https://www.pyinvoke.org/")
a5662319 12554 (version "1.3.0")
44d10b1f
RW
12555 (source (origin
12556 (method url-fetch)
12557 (uri (pypi-uri "invoke" version))
12558 (sha256
12559 (base32
a5662319 12560 "1nn7gad0rvy492acpyhkrp01zsk86acf34qhsvq4xmm6x39788n5"))))
44d10b1f
RW
12561 (build-system python-build-system)
12562 (arguments
12563 ;; XXX: Requires many dependencies that are not yet in Guix.
12564 `(#:tests? #f))
12565 (synopsis "Pythonic task execution")
12566 (description
12567 "Invoke is a Python task execution tool and library, drawing inspiration
12568from various sources to arrive at a powerful and clean feature set. It is
12569evolved from the Fabric project, but focuses on local and abstract concerns
12570instead of servers and network commands.")
12571 (license license:bsd-3)))
12572
12573(define-public python2-invoke
12574 (package-with-python2 python-invoke))
12575
12576(define-public python-automat
12577 (package
12578 (name "python-automat")
919d80a0 12579 (version "0.7.0")
44d10b1f
RW
12580 (source (origin
12581 (method url-fetch)
12582 (uri (pypi-uri "Automat" version))
12583 (sha256
12584 (base32
919d80a0 12585 "03ivg70n3b1cbcd2zvjhk8y4kmqxcvhmili39lmgx09dza1qpmyb"))))
44d10b1f
RW
12586 (build-system python-build-system)
12587 ;; We disable the tests because they require python-twisted, while
12588 ;; python-twisted depends on python-automat. Twisted is optional, but the
12589 ;; tests fail if it is not available. Also see
12590 ;; <https://github.com/glyph/automat/issues/71>.
12591 (arguments '(#:tests? #f))
12592 (native-inputs
12593 `(("python-m2r" ,python-m2r)
12594 ("python-setuptools-scm" ,python-setuptools-scm)
12595 ("python-graphviz" ,python-graphviz)))
12596 (propagated-inputs
12597 `(("python-six" ,python-six)
12598 ("python-attrs" ,python-attrs)))
12599 (home-page "https://github.com/glyph/Automat")
12600 (synopsis "Self-service finite-state machines")
12601 (description "Automat is a library for concise, idiomatic Python
12602expression of finite-state automata (particularly deterministic finite-state
12603transducers).")
12604 (license license:expat)))
12605
12606(define-public python2-automat
12607 (package-with-python2 python-automat))
12608
12609(define-public python-m2r
12610 (package
12611 (name "python-m2r")
bcfb8fac 12612 (version "0.2.1")
44d10b1f
RW
12613 (source (origin
12614 (method url-fetch)
12615 (uri (pypi-uri "m2r" version))
12616 (sha256
12617 (base32
bcfb8fac 12618 "16gdm8i06jjmlpvckpfmlkr4693dh0vs192vgsqn84fsdkbbm45z"))))
44d10b1f
RW
12619 (build-system python-build-system)
12620 (propagated-inputs
12621 `(("python-docutils" ,python-docutils)
12622 ("python-mistune" ,python-mistune)))
12623 (native-inputs
12624 `(("python-pygments" ,python-pygments)
12625 ("python-mock" ,python-mock)))
12626 (home-page "https://github.com/miyakogi/m2r")
12627 (synopsis "Markdown to reStructuredText converter")
12628 (description "M2R converts a markdown file including reST markups to valid
12629reST format.")
12630 (license license:expat)))
12631
12632(define-public python2-m2r
12633 (package-with-python2 python-m2r))
12634
12635(define-public python-constantly
12636 (package
12637 (name "python-constantly")
12638 (version "15.1.0")
12639 (source (origin
12640 (method url-fetch)
12641 (uri (pypi-uri "constantly" version))
12642 (sha256
12643 (base32
12644 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
12645 (build-system python-build-system)
12646 (home-page "https://github.com/twisted/constantly")
12647 (synopsis "Symbolic constants in Python")
12648 (description "Constantly is a Python library that provides symbolic
12649constant support. It includes collections and constants with text, numeric,
12650and bit flag values.")
12651 (license license:expat)))
12652
12653(define-public python2-constantly
12654 (package-with-python2 python-constantly))
12655
12656(define-public python-attrs
12657 (package
12658 (name "python-attrs")
c41d5144 12659 (version "19.1.0")
44d10b1f
RW
12660 (source (origin
12661 (method url-fetch)
12662 (uri (pypi-uri "attrs" version))
12663 (sha256
12664 (base32
c41d5144 12665 "16g33zr5f449lqc5wgvzpknxryfzrfsxcr6kpgxwn7l5fkv71f7h"))))
44d10b1f
RW
12666 (build-system python-build-system)
12667 (arguments
12668 `(#:modules ((guix build utils)
12669 (guix build python-build-system)
12670 (ice-9 ftw)
12671 (srfi srfi-1)
12672 (srfi srfi-26))
12673 #:phases (modify-phases %standard-phases
12674 (replace 'check
12675 (lambda _
12676 (let ((cwd (getcwd)))
12677 (setenv "PYTHONPATH"
12678 (string-append
12679 cwd "/build/"
12680 (find (cut string-prefix? "lib" <>)
12681 (scandir (string-append cwd "/build")))
12682 ":"
12683 (getenv "PYTHONPATH")))
12684 (invoke "python" "-m" "pytest")))))))
12685 (native-inputs
12686 `(("python-coverage" ,python-coverage)
12687 ("python-hypothesis" ,python-hypothesis)
12688 ("python-pympler" ,python-pympler)
12689 ("python-pytest" ,python-pytest)
12690 ("python-six" ,python-six)
12691 ("python-sphinx" ,python-sphinx)
12692 ("python-zope-interface" ,python-zope-interface)))
12693 (home-page "https://github.com/python-attrs/attrs/")
12694 (synopsis "Attributes without boilerplate")
12695 (description "@code{attrs} is a Python package with class decorators that
12696ease the chores of implementing the most common attribute-related object
12697protocols.")
12698 (license license:expat)))
12699
12700(define-public python2-attrs
12701 (package-with-python2 python-attrs))
12702
12703(define-public python-attrs-bootstrap
12704 (package
12705 (inherit python-attrs)
12706 (name "python-attrs-bootstrap")
44d10b1f
RW
12707 (native-inputs `())
12708 (arguments `(#:tests? #f))))
12709
12710(define-public python2-attrs-bootstrap
12711 (package-with-python2 python-attrs-bootstrap))
12712
12713(define-public python2-cliapp
12714 (package
12715 (name "python2-cliapp")
9064b84e 12716 (version "1.20180812.1")
44d10b1f
RW
12717 (source
12718 (origin
12719 (method url-fetch)
12720 (uri (string-append
12721 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
12722 version ".tar.gz"))
12723 (sha256
12724 (base32
9064b84e 12725 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
44d10b1f
RW
12726 (build-system python-build-system)
12727 (arguments
12728 `(#:python ,python-2
12729 #:phases
12730 (modify-phases %standard-phases
12731 ;; check phase needs to be run before the build phase. If not,
12732 ;; coverage-test-runner looks for tests for the built source files,
12733 ;; and fails.
12734 (delete 'check)
12735 (add-before 'build 'check
12736 (lambda _
12737 ;; Disable python3 tests
12738 (substitute* "check"
12739 (("python3") "# python3"))
6c826d32 12740 (invoke "./check"))))))
44d10b1f
RW
12741 (native-inputs
12742 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
12743 ("python2-pep8" ,python2-pep8)))
12744 (propagated-inputs
12745 `(("python2-pyaml" ,python2-pyaml)))
12746 (home-page "https://liw.fi/cliapp/")
12747 (synopsis "Python framework for command line programs")
12748 (description "@code{python2-cliapp} is a python framework for
12749command line programs. It contains the typical stuff such programs
12750need to do, such as parsing the command line for options, and
12751iterating over input files.")
12752 (license license:gpl2+)))
12753
12754(define-public python2-ttystatus
12755 (package
12756 (name "python2-ttystatus")
e516a9c2 12757 (version "0.36")
44d10b1f
RW
12758 (source
12759 (origin
12760 (method url-fetch)
12761 (uri (string-append
12762 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
12763 version ".tar.gz"))
12764 (sha256
12765 (base32
e516a9c2 12766 "06mdk4d19zw2j3is54gndhzl396g3xc8k52m7i86z69s9hcz71by"))))
44d10b1f
RW
12767 (build-system python-build-system)
12768 (native-inputs
12769 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
12770 ("python2-pep8" ,python2-pep8)))
12771 (arguments
12772 `(#:python ,python-2
12773 #:phases
12774 (modify-phases %standard-phases
12775 ;; check phase needs to be run before the build phase. If not,
12776 ;; coverage-test-runner looks for tests for the built source files,
12777 ;; and fails.
12778 (delete 'check)
12779 (add-before 'build 'check
cbeee881 12780 (lambda _ (invoke "make" "check"))))))
44d10b1f
RW
12781 (home-page "https://liw.fi/ttystatus/")
12782 (synopsis "Python library for showing progress reporting and
12783status updates on terminals")
12784 (description "@code{python2-ttystatus} is a python library for
12785showing progress reporting and status updates on terminals, for
12786command line programs. Output is automatically adapted to the width
12787of the terminal: truncated if it does not fit, and resized if the
12788terminal size changes.")
12789 (license license:gpl3+)))
12790
12791(define-public python2-tracing
12792 (package
12793 (name "python2-tracing")
12794 (version "0.10")
12795 (source
12796 (origin
12797 (method url-fetch)
12798 (uri (string-append
12799 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
12800 version ".tar.gz"))
12801 (sha256
12802 (base32
12803 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
12804 (build-system python-build-system)
12805 (arguments
12806 `(#:python ,python-2))
12807 (home-page "https://liw.fi/tracing/")
12808 (synopsis "Python debug logging helper")
12809 (description "@code{python2-tracing} is a python library for
12810logging debug messages. It provides a way to turn debugging messages
12811on and off, based on the filename they occur in. It is much faster
12812than using @code{logging.Filter} to accomplish the same thing, which
12813matters when code is run in production mode. The actual logging still
12814happens using the @code{logging} library.")
12815 (license license:gpl3+)))
12816
12817(define-public python2-larch
12818 (package
12819 (name "python2-larch")
12820 (version "1.20151025")
12821 (source
12822 (origin
12823 (method url-fetch)
12824 (uri (string-append
12825 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
12826 version ".tar.gz"))
12827 (patches (search-patches
12828 "python2-larch-coverage-4.0a6-compatibility.patch"))
12829 (sha256
12830 (base32
12831 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
12832 (build-system python-build-system)
12833 (arguments
12834 `(#:python ,python-2
12835 #:phases
12836 (modify-phases %standard-phases
12837 ;; check phase needs to be run before the build phase. If not,
12838 ;; coverage-test-runner looks for tests for the built source files,
12839 ;; and fails.
12840 (delete 'check)
12841 (add-before 'build 'check
204ad455 12842 (lambda _ (invoke "make" "check"))))))
44d10b1f
RW
12843 (native-inputs
12844 `(("cmdtest" ,cmdtest)
12845 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
12846 (propagated-inputs
12847 `(("python2-tracing" ,python2-tracing)))
12848 (home-page "https://liw.fi/larch/")
12849 (synopsis "Python copy-on-write B-tree library")
12850 (description "@code{python2-larch} is an implementation of
12851particular kind of B-tree, based on research by Ohad Rodeh. See
12852@url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
12853on the data structure.
12854
12855The distinctive feature of this B-tree is that a node is never
12856(conceptually) modified. Instead, all updates are done by
12857copy-on-write. This makes it easy to clone a tree, and modify only the
12858clone, while other processes access the original tree.")
12859 (license license:gpl3+)))
12860
12861(define-public python-astroid
12862 (package
12863 (name "python-astroid")
1c43c698 12864 (version "2.3.3")
44d10b1f
RW
12865 (source
12866 (origin
12867 (method url-fetch)
12868 (uri (pypi-uri "astroid" version))
12869 (sha256
1c43c698 12870 (base32 "0fnibsl2cb5mvzbfm7sycj85smx48f8w8m7ks1sqlmpr9ps0gski"))))
44d10b1f
RW
12871 (build-system python-build-system)
12872 (propagated-inputs
12873 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
12874 ("python-six" ,python-six)
f0935460 12875 ("python-typed-ast" ,python-typed-ast)
44d10b1f
RW
12876 ("python-wrapt" ,python-wrapt)))
12877 (native-inputs
12878 `(("python-dateutil" ,python-dateutil)
12879 ("python-nose" ,python-nose)
12880 ("python-pytest" ,python-pytest)
12881 ("python-pytest-runner" ,python-pytest-runner)))
12882 (arguments
12883 `(#:phases
12884 (modify-phases %standard-phases
12885 (add-after 'unpack 'remove-spurious-test
12886 (lambda _
12887 ;; This can be removed after upgrading from python-3.7
12888 ;; https://github.com/PyCQA/astroid/issues/593
12889 ;; https://bugs.python.org/issue34056
12890 (delete-file "astroid/tests/unittest_modutils.py")
12891 #t))
12892 (replace 'check
12893 (lambda _
12894 (invoke "pytest" "astroid"))))))
12895 (home-page "https://github.com/PyCQA/astroid")
12896 (synopsis "Common base representation of python source code for pylint and
12897other projects")
12898 (description "@code{python-astroid} provides a common base representation
12899of python source code for projects such as pychecker, pyreverse, pylint, etc.
12900
12901It provides a compatible representation which comes from the _ast module. It
12902rebuilds the tree generated by the builtin _ast module by recursively walking
12903down the AST and building an extended ast. The new node classes have
12904additional methods and attributes for different usages. They include some
12905support for static inference and local name scopes. Furthermore, astroid
12906builds partial trees by inspecting living objects.")
12907 (license license:lgpl2.1+)
12908 (properties `((python2-variant . ,(delay python2-astroid))))))
12909
12910(define-public python2-astroid
12911 (let ((base (package-with-python2
12912 (strip-python2-variant python-astroid))))
12913 (package (inherit base)
12914 ;; Version 2.x removes python2 support.
12915 (version "1.6.5")
12916 (source
12917 (origin
12918 (method url-fetch)
12919 (uri (pypi-uri "astroid" version))
12920 (sha256
12921 (base32
12922 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
12923 (arguments
12924 (substitute-keyword-arguments (package-arguments base)
12925 ((#:phases phases)
12926 `(modify-phases ,phases
12927 (add-after 'unpack 'remove-spurious-test
12928 (lambda _
12929 ;; https://github.com/PyCQA/astroid/issues/276
12930 (delete-file "astroid/tests/unittest_brain.py")
12931 #t))
12932 (replace 'check
12933 (lambda _
12934 (invoke"python" "-m" "unittest" "discover"
12935 "-p" "unittest*.py")))))))
12936 (native-inputs `())
12937 (propagated-inputs
12938 `(("python2-backports-functools-lru-cache"
12939 ,python2-backports-functools-lru-cache)
12940 ("python2-enum34" ,python2-enum34)
12941 ("python2-singledispatch" ,python2-singledispatch)
741f98b3
MO
12942 ,@(alist-delete "python-typed-ast"
12943 (package-propagated-inputs base)))))))
44d10b1f
RW
12944
12945(define-public python-isort
12946 (package
12947 (name "python-isort")
e2227b6a 12948 (version "4.3.4")
44d10b1f
RW
12949 (source
12950 (origin
e2227b6a
EF
12951 (method git-fetch)
12952 (uri (git-reference
12953 ;; Tests pass only from the Github sources
12954 (url "https://github.com/timothycrosley/isort")
12955 (commit version)))
12956 (file-name (git-file-name name version))
44d10b1f
RW
12957 (sha256
12958 (base32
e2227b6a 12959 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
44d10b1f
RW
12960 (build-system python-build-system)
12961 (native-inputs
12962 `(("python-mock" ,python-mock)
12963 ("python-pytest" ,python-pytest)))
12964 (home-page "https://github.com/timothycrosley/isort")
12965 (synopsis "Python utility/library to sort python imports")
12966 (description "@code{python-isort} is a python utility/library to sort
12967imports alphabetically, and automatically separated into sections. It
12968provides a command line utility, a python library and plugins for various
12969editors.")
e2227b6a
EF
12970 (license license:expat)
12971 (properties `((python2-variant . ,(delay python2-isort))))))
44d10b1f
RW
12972
12973(define-public python2-isort
e2227b6a
EF
12974 (let ((base (package-with-python2
12975 (strip-python2-variant python-isort))))
12976 (package (inherit base)
12977 (native-inputs
12978 `(("python2-futures" ,python2-futures)
12979 ,@(package-native-inputs base))))))
44d10b1f
RW
12980
12981(define-public python2-backports-functools-lru-cache
12982 (package
12983 (name "python2-backports-functools-lru-cache")
12984 (version "1.5")
12985 (source
12986 (origin
12987 (method url-fetch)
12988 ;; only the pypi tarballs contain the necessary metadata
12989 (uri (pypi-uri "backports.functools_lru_cache" version))
12990 (sha256
12991 (base32
12992 "06jgv8gib4fhky0p5cmxdghvsgjyzcdgk48k8pxb1ccf11znk64x"))))
12993 (build-system python-build-system)
12994 (native-inputs
12995 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
12996 (arguments
12997 `(#:python ,python-2))
12998 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
12999 (synopsis "Backport of functools.lru_cache from Python 3.3")
13000 (description "@code{python2-backports-functools-lru-cache} is a backport
13001of @code{functools.lru_cache} from python 3.3.")
13002 (license license:expat)))
13003
13004(define-public python-configparser
13005 (package
13006 (name "python-configparser")
84127f8c 13007 (version "3.7.1")
44d10b1f
RW
13008 (source
13009 (origin
13010 (method url-fetch)
84127f8c 13011 (uri (pypi-uri "configparser" version))
44d10b1f
RW
13012 (sha256
13013 (base32
84127f8c 13014 "0cnz213il9lhgda6x70fw7mfqr8da43s3wm343lwzhqx94mgmmav"))))
44d10b1f 13015 (build-system python-build-system)
809f003f 13016 (home-page "https://github.com/jaraco/configparser/")
44d10b1f
RW
13017 (synopsis "Backport of configparser from python 3.5")
13018 (description "@code{python-configparser} is a backport of
13019@code{configparser} from Python 3.5 so that it can be used directly
13020in other versions.")
13021 (license license:expat)))
13022
13023(define-public python2-configparser
13024 (package-with-python2 python-configparser))
13025
13026(define-public python-mando
13027 (package
13028 (name "python-mando")
13029 (version "0.6.4")
13030 (source (origin
13031 (method url-fetch)
13032 (uri (pypi-uri "mando" version))
13033 (sha256
13034 (base32
13035 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
13036 (build-system python-build-system)
13037 (propagated-inputs
13038 `(("python-rst2ansi" ,python-rst2ansi)
13039 ("python-six" ,python-six)))
13040 (native-inputs
13041 `(("python-pytest" ,python-pytest)))
13042 (home-page "https://mando.readthedocs.org/")
13043 (synopsis
13044 "Wrapper around argparse, allowing creation of complete CLI applications")
13045 (description
13046 "This package is a wrapper around argparse, allowing you to write complete CLI
13047applications in seconds while maintaining all the flexibility.")
13048 (license license:expat)))
13049
13050(define-public python2-mando
13051 (package-with-python2 python-mando))
13052
70daf82f
RW
13053(define-public python2-argparse
13054 (package
13055 (name "python2-argparse")
13056 (version "1.4.0")
13057 (source
13058 (origin
13059 (method url-fetch)
13060 (uri (pypi-uri "argparse" version))
13061 (sha256
13062 (base32
13063 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
13064 (build-system python-build-system)
13065 (arguments
13066 `(#:python ,python-2))
13067 (home-page "https://github.com/ThomasWaldmann/argparse/")
13068 (synopsis "Python command-line parsing library")
13069 (description
13070 "This package is mostly for people who want to have @code{argparse} on
13071older Pythons because it was not part of the standard library back then.")
13072 (license license:psfl)))
13073
44d10b1f
RW
13074(define-public python-fudge
13075 (package
13076 (name "python-fudge")
13077 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
13078 ;; package, which is currently the only use of this package.
13079 (version "0.9.6")
13080 (source
13081 (origin
13082 (method url-fetch)
13083 (uri (pypi-uri "fudge" version))
13084 (sha256
13085 (base32
13086 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
13087 (build-system python-build-system)
13088 (arguments
13089 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
13090 (home-page "https://github.com/fudge-py/fudge")
13091 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
13092 (description
13093 "Fudge is a Python module for using fake objects (mocks and stubs) to
13094test real ones.
13095
13096In readable Python code, you declare the methods available on your fake object
13097and how they should be called. Then you inject that into your application and
13098start testing. This declarative approach means you don’t have to record and
13099playback actions and you don’t have to inspect your fakes after running code.
13100If the fake object was used incorrectly then you’ll see an informative
13101exception message with a traceback that points to the culprit.")
13102 (license license:expat)))
13103
13104(define-public python2-fudge
13105 (package-with-python2 python-fudge))
13106
13107(define-public python-mwclient
13108 (package
13109 (name "python-mwclient")
957c6833 13110 (version "0.10.0")
44d10b1f
RW
13111 (source
13112 (origin
957c6833 13113 (method git-fetch)
44d10b1f 13114 ;; The PyPI version wouldn't contain tests.
957c6833
EF
13115 (uri (git-reference
13116 (url "https://github.com/mwclient/mwclient")
13117 (commit (string-append "v" version))))
13118 (file-name (git-file-name name version))
44d10b1f
RW
13119 (sha256
13120 (base32
957c6833 13121 "1c3q6lwmb05yqywc4ya98ca7hsl15niili8rccl4n1yqp77c103v"))))
44d10b1f
RW
13122 (build-system python-build-system)
13123 (propagated-inputs
957c6833 13124 `(("python-requests-oauthlib" ,python-requests-oauthlib)
44d10b1f
RW
13125 ("python-six" ,python-six)))
13126 (native-inputs
13127 `(("python-mock" ,python-mock)
13128 ("python-pytest" ,python-pytest)
44d10b1f 13129 ("python-pytest-cov" ,python-pytest-cov)
957c6833 13130 ("python-pytest-runner" ,python-pytest-runner)
44d10b1f
RW
13131 ("python-responses" ,python-responses)))
13132 (home-page "https://github.com/btongminh/mwclient")
13133 (synopsis "MediaWiki API client")
13134 (description "This package provides a MediaWiki API client.")
13135 (license license:expat)))
13136
13137(define-public python2-mwclient
13138 (package-with-python2 python-mwclient))
13139
13140(define-public python-utils
13141 (package
13142 (name "python-utils")
13143 (version "2.1.0")
13144 (source (origin
13145 (method url-fetch)
13146 (uri (pypi-uri "python-utils" version))
13147 (sha256
13148 (base32
13149 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
13150 (build-system python-build-system)
13151 (native-inputs
13152 `(("pytest-runner" ,python-pytest-runner)
13153 ("pytest" ,python-pytest)
13154 ("six" ,python-six)))
13155 (home-page "https://github.com/WoLpH/python-utils")
13156 (synopsis "Convenient utilities not included with the standard Python install")
13157 (description
13158 "Python Utils is a collection of small Python functions and classes which
13159make common patterns shorter and easier.")
13160 (license license:bsd-2)))
13161
13162(define-public python2-utils
13163 (package-with-python2 python-utils))
13164
44d10b1f
RW
13165(define-public python-diff-match-patch
13166 (package
13167 (name "python-diff-match-patch")
13168 (version "20121119")
13169 (source
13170 (origin
13171 (method url-fetch)
13172 (uri (pypi-uri "diff-match-patch" version))
13173 (sha256
13174 (base32
13175 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
13176 (build-system python-build-system)
13177 (home-page "https://code.google.com/p/google-diff-match-patch")
13178 (synopsis "Synchronize plain text")
13179 (description "Diff Match and Patch libraries offer robust algorithms to
13180perform the operations required for synchronizing plain text.")
13181 (license license:asl2.0)))
13182
13183(define-public python2-diff-match-patch
13184 (package-with-python2 python-diff-match-patch))
13185
13186(define-public python-dirsync
13187 (package
13188 (name "python-dirsync")
13189 (version "2.2.3")
13190 (source
13191 (origin
13192 (method url-fetch)
13193 (uri (pypi-uri "dirsync" version))
13194 (sha256
13195 (base32
13196 "1r40fkanksagcszf1ag85mdr8w7rgc7196n6s1qlsk2abw6i7v0z"))))
13197 (build-system python-build-system)
13198 (propagated-inputs
13199 `(("six" ,python-six)))
13200 (home-page "https://bitbucket.org/tkhyn/dirsync")
13201 (synopsis "Advanced directory tree synchronisation tool")
13202 (description "Advanced directory tree synchronisation tool.")
13203 (license license:expat)))
13204
13205(define-public python2-dirsync
13206 (package-with-python2 python-dirsync))
13207
13208(define-public python-levenshtein
13209 (package
13210 (name "python-levenshtein")
13211 (version "0.12.0")
13212 (source
13213 (origin
13214 (method url-fetch)
13215 (uri (pypi-uri "python-Levenshtein" version))
13216 (sha256
13217 (base32
13218 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
13219 (build-system python-build-system)
13220 (home-page "https://github.com/ztane/python-Levenshtein")
13221 (synopsis "Fast computation of Levenshtein distance and string similarity")
13222 (description
13223 "The Levenshtein Python C extension module contains functions for fast computation of
13224@enumerate
13225@item Levenshtein (edit) distance, and edit operations
13226@item string similarity
13227@item approximate median strings, and generally string averaging
13228@item string sequence and set similarity
13229@end enumerate
13230It supports both normal and Unicode strings.")
13231 (license license:gpl2+)))
13232
13233(define-public python2-levenshtein
13234 (package-with-python2 python-levenshtein))
13235
13236(define-public python-scandir
13237 (package
13238 (name "python-scandir")
13239 (version "1.9.0")
13240 (source
13241 (origin
13242 (method url-fetch)
13243 (uri (pypi-uri "scandir" version))
13244 (sha256
13245 (base32 "0r3hvf1a9jm1rkqgx40gxkmccknkaiqjavs8lccgq9s8khh5x5s4"))))
13246 (build-system python-build-system)
13247 (arguments
13248 `(#:phases (modify-phases %standard-phases
13249 (replace 'check
13250 (lambda _
13251 (invoke "python" "test/run_tests.py"))))))
13252 (home-page "https://github.com/benhoyt/scandir")
13253 (synopsis "Directory iteration function")
13254 (description
13255 "Directory iteration function like os.listdir(), except that instead of
13256returning a list of bare filenames, it yields DirEntry objects that include
13257file type and stat information along with the name. Using scandir() increases
13258the speed of os.walk() by 2-20 times (depending on the platform and file
13259system) by avoiding unnecessary calls to os.stat() in most cases.
13260
13261This package is part of the Python standard library since version 3.5.")
13262 (license license:bsd-3)))
13263
13264(define-public python2-scandir
13265 (package-with-python2 python-scandir))
13266
13267(define-public python2-stemming
13268 (package
13269 (name "python2-stemming")
13270 (version "1.0.1")
13271 (source
13272 (origin
13273 (method url-fetch)
13274 (uri (pypi-uri "stemming" version))
13275 (sha256
13276 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
13277 (build-system python-build-system)
13278 (arguments
13279 `(#:python ,python-2))
13280 (home-page "https://bitbucket.org/mchaput/stemming/overview")
13281 (synopsis "Python implementations of various stemming algorithms")
13282 (description
13283 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
13284stemming algorithms for English. These implementations are straightforward and
13285efficient, unlike some Python versions of the same algorithms available on the
13286Web. This package is an extraction of the stemming code included in the Whoosh
13287search engine.")
13288 (license license:public-domain)))
13289
13290(define-public python-factory-boy
13291 (package
13292 (name "python-factory-boy")
13293 (version "2.8.1")
13294 (source
13295 (origin
13296 (method url-fetch)
13297 (uri (pypi-uri "factory_boy" version))
13298 (sha256
13299 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
13300 (build-system python-build-system)
13301 (arguments
13302 ;; Tests are not included in the tarball.
13303 `(#:tests? #f))
13304 (propagated-inputs
13305 `(("faker" ,python-faker)))
13306 (home-page "https://github.com/benhoyt/scandir")
13307 (synopsis "Versatile test fixtures replacement")
13308 (description
13309 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
13310
13311As a fixtures replacement tool, it aims to replace static, hard to maintain
13312fixtures with easy-to-use factories for complex object.
13313
13314Instead of building an exhaustive test setup with every possible combination
13315of corner cases, factory_boy allows you to use objects customized for the
13316current test, while only declaring the test-specific fields")
13317 (license license:expat)))
13318
13319(define-public python2-factory-boy
13320 (package-with-python2 python-factory-boy))
13321
13322(define-public python-translate-toolkit
13323 (package
13324 (name "python-translate-toolkit")
13325 (version "2.1.0")
13326 (source
13327 (origin
13328 (method url-fetch)
13329 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
13330 (sha256
13331 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
13332 (build-system python-build-system)
13333 (native-inputs
13334 `(("python-pytest" ,python-pytest)
13335 ("python-sphinx" ,python-sphinx)))
13336 (propagated-inputs
13337 `(("python-babel" ,python-babel)
13338 ("python-beautifulsoup4" ,python-beautifulsoup4)
13339 ("python-chardet" ,python-chardet)
13340 ("python-diff-match-patch" ,python-diff-match-patch)
13341 ("python-levenshtein" ,python-levenshtein)
13342 ("python-lxml" ,python-lxml)
13343 ("python-six" ,python-six)
13344 ("python-vobject" ,python-vobject)
13345 ("python-pyyaml" ,python-pyyaml)))
13346 (arguments
13347 ;; TODO: tests are not run, because they end with
13348 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
13349 ;; 'parse_funcs'
13350 ;; during test setup.
13351 `(#:tests? #f))
18919cf9 13352 (home-page "https://toolkit.translatehouse.org")
44d10b1f
RW
13353 (synopsis "Tools and API for translation and localization engineering")
13354 (description
13355 "Tools and API for translation and localization engineering. It contains
13356several utilities, as well as an API for building localization tools.")
13357 (license license:gpl2+)))
13358
13359(define-public python2-translate-toolkit
13360 (package-with-python2 python-translate-toolkit))
13361
13362(define-public python-packaging
13363 (package
13364 (name "python-packaging")
a72a1892 13365 (version "20.0")
44d10b1f
RW
13366 (source
13367 (origin
13368 (method url-fetch)
13369 (uri (pypi-uri "packaging" version))
20bf58bf
MB
13370 ;; XXX: The URL in the patch file is wrong, it should be
13371 ;; <https://github.com/pypa/packaging/pull/256>.
fdd0c369 13372 (patches (search-patches "python-packaging-test-arch.patch"))
44d10b1f
RW
13373 (sha256
13374 (base32
a72a1892 13375 "1y2ip3a4ykkpgnwgn85j6hkspcl0cg3mzms97f40mk57vwqq67gy"))))
44d10b1f
RW
13376 (build-system python-build-system)
13377 (arguments
13378 `(#:phases (modify-phases %standard-phases
13379 (replace 'check
13380 (lambda _ (invoke "py.test" "-vv"))))))
13381 (native-inputs
13382 `(("python-pretend" ,python-pretend)
13383 ("python-pytest" ,python-pytest)))
13384 (propagated-inputs
13385 `(("python-pyparsing" ,python-pyparsing)
13386 ("python-six" ,python-six)))
13387 (home-page "https://github.com/pypa/packaging")
13388 (synopsis "Core utilities for Python packages")
13389 (description "Packaging is a Python module for dealing with Python packages.
13390It offers an interface for working with package versions, names, and dependency
13391information.")
13392 ;; From 'LICENSE': This software is made available under the terms of
13393 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
13394 ;; Contributions to this software is made under the terms of *both* these
13395 ;; licenses.
13396 (license (list license:asl2.0 license:bsd-2))))
13397
13398(define-public python2-packaging
13399 (package-with-python2 python-packaging))
13400
13401(define-public python-relatorio
13402 (package
13403 (name "python-relatorio")
13404 (version "0.8.0")
13405 (source
13406 (origin
13407 (method url-fetch)
13408 (uri (pypi-uri "relatorio" version))
13409 (sha256
13410 (base32
13411 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
13412 (build-system python-build-system)
13413 (propagated-inputs
13414 `(("python-lxml" ,python-lxml)
13415 ("python-genshi" ,python-genshi)))
13416 (native-inputs
13417 `(("python-magic" ,python-magic)))
13418 (home-page "https://relatorio.tryton.org/")
13419 (synopsis "Templating library able to output ODT and PDF files")
13420 (description "Relatorio is a templating library which provides a way to
13421easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
13422for more filetypes can be easily added by creating plugins for them.")
13423 (license license:gpl3+)))
13424
13425(define-public python2-relatorio
13426 (package-with-python2 python-relatorio))
13427
13428(define-public python-radon
13429 (package
13430 (name "python-radon")
f675ab4f 13431 (version "4.1.0")
44d10b1f
RW
13432 (source
13433 (origin
13434 (method url-fetch)
13435 (uri (pypi-uri "radon" version))
13436 (sha256
13437 (base32
f675ab4f 13438 "0vfxxzbnz5lxfvp0yxp35g6c8qqnnbhi4dm7shkm1d3d4192q22n"))))
44d10b1f
RW
13439 (build-system python-build-system)
13440 (arguments
13441 `(#:phases (modify-phases %standard-phases
13442 (replace 'check
13443 (lambda _
13444 (invoke "python" "radon/tests/run.py"))))))
13445 (propagated-inputs
13446 `(("python-colorama" ,python-colorama)
13447 ("python-flake8-polyfill" ,python-flake8-polyfill)
13448 ("python-mando" ,python-mando)))
13449 (native-inputs
13450 `(("python-pytest" ,python-pytest)
13451 ("python-pytest-mock" ,python-pytest-mock)))
13452 (home-page "https://radon.readthedocs.org/")
13453 (synopsis "Code Metrics in Python")
13454 (description "Radon is a Python tool which computes various code metrics.
13455Supported metrics are:
13456@itemize @bullet
13457@item raw metrics: SLOC, comment lines, blank lines, &c.
13458@item Cyclomatic Complexity (i.e. McCabe’s Complexity)
13459@item Halstead metrics (all of them)
13460@item the Maintainability Index (a Visual Studio metric)
13461@end itemize")
13462 (license license:expat)))
13463
13464(define-public python2-radon
13465 (package-with-python2 python-radon))
13466
13467(define-public python-sure
13468 (package
13469 (name "python-sure")
13470 (version "1.4.11")
13471 (source
13472 (origin
13473 (method url-fetch)
13474 (uri (pypi-uri "sure" version))
13475 (sha256
13476 (base32
13477 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
13478 (build-system python-build-system)
13479 (propagated-inputs
13480 `(("python-mock" ,python-mock)
13481 ("python-six" ,python-six)))
13482 (native-inputs
13483 `(("python-nose" ,python-nose)))
13484 (home-page "https://github.com/gabrielfalcao/sure")
13485 (synopsis "Automated testing library in python for python")
13486 (description
13487 "Sure is a python library that leverages a DSL for writing assertions.
13488Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
13489 (license license:gpl3+)))
13490
13491(define-public python2-sure
13492 (package-with-python2 python-sure))
13493
13494(define-public python2-couleur
13495 ;; This package does not seem to support python3 at all, hence,
13496 ;; only the python2 variant definition is provided.
13497 (package
13498 (name "python2-couleur")
13499 (version "0.6.2")
13500 (source
13501 (origin
13502 (method url-fetch)
13503 (uri (pypi-uri "couleur" version))
13504 (sha256
13505 (base32
13506 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
13507 (build-system python-build-system)
13508 (arguments
13509 `(#:python ,python-2))
13510 (home-page "https://github.com/gabrielfalcao/couleur")
13511 (synopsis
13512 "ANSI terminal tool for python, colored shell and other handy fancy features")
13513 (description
13514 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
13515terminal such as coloured output in the shell, overwriting output, indentation, etc.")
13516 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
13517 ;; https://github.com/gabrielfalcao/couleur/issues/11
13518 (license license:lgpl3+)))
13519
13520(define-public python-misaka
13521 (package
13522 (name "python-misaka")
0dcb3412 13523 (version "2.1.1")
44d10b1f
RW
13524 (source
13525 (origin
13526 (method url-fetch)
13527 (uri (pypi-uri "misaka" version))
13528 (sha256
13529 (base32
0dcb3412 13530 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
44d10b1f
RW
13531 (build-system python-build-system)
13532 (arguments
13533 `(;; Line 37 of setup.py calls self.run_command('develop')
13534 ;; in the 'check' phase. This command seems to be trying
13535 ;; to write to
13536 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
13537 ;; for which it does not have the permission to write.
13538 #:tests? #f))
13539 (propagated-inputs
13540 `(("python-cffi" ,python-cffi)))
13541 (home-page "https://github.com/FSX/misaka")
13542 (synopsis "Python binding for Hoedown")
13543 (description
13544 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
13545library written in C. It features a fast HTML renderer and functionality to make custom
13546renderers (e.g. man pages or LaTeX).")
13547 (license license:expat)))
13548
13549(define-public python2-misaka
13550 (package-with-python2 python-misaka))
13551
13552(define-public python2-steadymark
13553 ;; This is forced into being a python2 only variant
13554 ;; due to its dependence on couleur that has no support
13555 ;; for python3
13556 (package
13557 (name "python2-steadymark")
13558 (version "0.7.3")
13559 (source
13560 (origin
13561 (method url-fetch)
13562 (uri (pypi-uri "steadymark" version))
13563 (sha256
13564 (base32
13565 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
13566 (build-system python-build-system)
13567 (native-inputs
13568 `(("python-couleur" ,python2-couleur)
13569 ("python-sure" ,python2-sure)
13570 ("python-misaka" ,python2-misaka)))
13571 (arguments
13572 `(#:python ,python-2
13573 #:phases
13574 (modify-phases %standard-phases
13575 (add-before 'build 'patch-setup-py
13576 (lambda _
13577 ;; Update requirements from dependency==version
13578 ;; to dependency>=version
13579 (substitute* "setup.py"
13580 (("==") ">="))
13581 #t)))))
13582 (home-page "https://github.com/gabrielfalcao/steadymark")
13583 (synopsis "Markdown-based test runner for python")
13584 (description
13585 "@code{Steadymark} allows documentation to be written in github-flavoured
13586markdown. The documentation may contain snippets of code surrounded by python
13587code blocks and @code{Steadymark} will find these snippets and run them, making
13588sure that there are no old malfunctional examples in the documentation examples.")
13589 (license license:expat)))
13590
13591(define-public python-jsonpointer
13592 (package
13593 (name "python-jsonpointer")
13594 (version "1.10")
13595 (source
13596 (origin
13597 (method url-fetch)
13598 (uri (pypi-uri "jsonpointer" version))
13599 (sha256
13600 (base32
13601 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
13602 (build-system python-build-system)
13603 (home-page "https://github.com/stefankoegl/python-json-pointer")
13604 (synopsis "Identify specific nodes in a JSON document")
13605 (description "@code{jsonpointer} allows you to access specific nodes
13606by path in a JSON document (see RFC 6901).")
13607 (license license:bsd-3)))
13608
13609(define-public python2-jsonpointer
13610 (package-with-python2 python-jsonpointer))
13611
13612(define-public python-jsonpatch
13613 (package
13614 (name "python-jsonpatch")
13615 (version "1.16")
13616 (source
13617 (origin
854c5c95 13618 (method git-fetch)
44d10b1f 13619 ;; pypi version lacks tests.js
854c5c95
EF
13620 (uri (git-reference
13621 (url "https://github.com/stefankoegl/python-json-patch")
13622 (commit (string-append "v" version))))
13623 (file-name (git-file-name name version))
44d10b1f
RW
13624 (sha256
13625 (base32
854c5c95 13626 "0k9pff06lxama3nhsc7cdxbp83422bdy8ifs52i6xkas8hpyzfzr"))))
44d10b1f
RW
13627 (build-system python-build-system)
13628 (native-inputs
13629 `(("python-jsonpointer" ,python-jsonpointer)))
13630 (home-page "https://github.com/stefankoegl/python-json-patch")
13631 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
13632 (description "@code{jsonpatch} is a library and program that allows
13633applying JSON Patches according to RFC 6902.")
13634 (license license:bsd-3)))
13635
13636(define-public python2-jsonpatch
13637 (package-with-python2 python-jsonpatch))
13638
13639(define-public python-jsonpatch-0.4
13640 (package (inherit python-jsonpatch)
13641 (name "python-jsonpatch")
13642 (version "0.4")
13643 (source
13644 (origin
a9722d0d
EF
13645 (method git-fetch)
13646 (uri (git-reference
13647 (url "https://github.com/stefankoegl/python-json-patch")
13648 (commit (string-append "v" version))))
13649 (file-name (git-file-name name version))
44d10b1f
RW
13650 (sha256
13651 (base32
a9722d0d 13652 "1fq02y57kinyknxjcav0slcb0k9mwdffqw2hnlhdkpj7palh2mwk"))))))
44d10b1f
RW
13653
13654(define-public python2-jsonpatch-0.4
13655 (package-with-python2 python-jsonpatch-0.4))
13656
13657(define-public python-rfc3986
13658 (package
13659 (name "python-rfc3986")
13660 (version "1.1.0")
13661 (source (origin
13662 (method url-fetch)
13663 (uri (pypi-uri "rfc3986" version))
13664 (sha256
13665 (base32
13666 "06wlmysw83f75ff84zr1yr6n0shvc2xn1n1sb4iwzqap9hf5fn44"))))
13667 (build-system python-build-system)
13668 (arguments
13669 `(#:modules ((guix build utils)
13670 (guix build python-build-system)
13671 (ice-9 ftw)
13672 (srfi srfi-1)
13673 (srfi srfi-26))
13674 #:phases
13675 (modify-phases %standard-phases
13676 (replace 'check
13677 (lambda _
13678 (let ((cwd (getcwd)))
13679 (setenv "PYTHONPATH"
13680 (string-append cwd "/build/"
13681 (find (cut string-prefix? "lib" <>)
13682 (scandir (string-append cwd "/build")))
13683 ":"
13684 (getenv "PYTHONPATH")))
13685 (invoke "pytest" "-v")))))))
13686 (native-inputs
13687 `(("python-pytest" ,python-pytest)))
13688 (home-page "https://rfc3986.readthedocs.io/")
13689 (synopsis "Parse and validate URI references")
13690 (description
13691 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
13692validation and authority parsing. This module also supports RFC@tie{}6874
13693which adds support for zone identifiers to IPv6 addresses.")
13694 (license license:asl2.0)))
13695
13696(define-public python2-rfc3986
13697 (package-with-python2 python-rfc3986))
13698
13699(define-public python-rfc3987
13700 (package
13701 (name "python-rfc3987")
13702 (version "1.3.7")
13703 (source
13704 (origin
13705 (method url-fetch)
13706 (uri (pypi-uri "rfc3987" version))
13707 (sha256
13708 (base32
13709 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
13710 (build-system python-build-system)
e85af137 13711 (home-page "https://pypi.org/project/rfc3987/")
44d10b1f
RW
13712 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
13713 (description "@code{rfc3987} provides routines for parsing and
13714validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
13715 (license license:gpl3+)))
13716
13717(define-public python2-rfc3987
13718 (package-with-python2 python-rfc3987))
13719
13720(define-public python-validate-email
13721 (package
13722 (name "python-validate-email")
13723 (version "1.3")
13724 (source
13725 (origin
13726 (method url-fetch)
13727 (uri (pypi-uri "validate_email" version))
13728 (sha256
13729 (base32
13730 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
13731 (build-system python-build-system)
13732 (home-page "https://github.com/syrusakbary/validate_email")
13733 (synopsis "Verifies if an email address is valid and really exists")
13734 (description "@code{validate_email} can be used to verify if an email
13735address is valid and really exists.")
13736 (license license:lgpl3+)))
13737
13738(define-public python2-validate-email
13739 (package-with-python2 python-validate-email))
13740
13741(define-public python-flex
13742 (package
13743 (name "python-flex")
13744 (version "6.10.0")
13745 (source
13746 (origin
13747 (method url-fetch)
13748 (uri (pypi-uri "flex" version))
13749 (sha256
13750 (base32
13751 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
13752 (build-system python-build-system)
13753 (propagated-inputs
13754 `(("python-click" ,python-click)
13755 ("python-iso8601" ,python-iso8601)
13756 ("python-jsonpointer" ,python-jsonpointer)
13757 ("python-pyyaml" ,python-pyyaml)
13758 ("python-requests" ,python-requests)
13759 ("python-rfc3987" ,python-rfc3987)
13760 ("python-six" ,python-six)
13761 ("python-validate-email" ,python-validate-email)))
13762 (home-page "https://github.com/pipermerriam/flex")
13763 (synopsis "Validates Swagger schemata")
13764 (description "@code{flex} can be used to validate Swagger schemata.")
13765 (license license:bsd-3)))
13766
13767(define-public python2-flex
13768 (package-with-python2 python-flex))
13769
13770(define-public python-marshmallow
13771 (package
13772 (name "python-marshmallow")
13773 (version "3.0.0b14")
13774 (source
13775 (origin
13776 (method url-fetch)
13777 (uri (pypi-uri "marshmallow" version))
13778 (sha256
13779 (base32
13780 "1digk3f5cfk7wmlka65mc7bzsd96pbsgcsvp6pimd5b4ff9zb5p3"))))
13781 (build-system python-build-system)
13782 (propagated-inputs
13783 `(("python-dateutil" ,python-dateutil)
13784 ("python-simplejson" ,python-simplejson)))
13785 (native-inputs
13786 `(("python-pytest" ,python-pytest)
13787 ("python-pytz" ,python-pytz)))
13788 (home-page "https://github.com/marshmallow-code/marshmallow")
13789 (synopsis "Convert complex datatypes to and from native
13790Python datatypes.")
13791 (description "@code{marshmallow} provides a library for converting
13792complex datatypes to and from native Python datatypes.")
13793 (license license:expat)))
13794
13795(define-public python2-marshmallow
13796 (package-with-python2 python-marshmallow))
13797
13798(define-public python-apispec
13799 (package
13800 (name "python-apispec")
13801 (version "0.25.3")
13802 (source
13803 (origin
13804 (method url-fetch)
13805 (uri (pypi-uri "apispec" version))
13806 (sha256
13807 (base32
13808 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
13809 (build-system python-build-system)
13810 (propagated-inputs
13811 `(("python-pyyaml" ,python-pyyaml)))
13812 (native-inputs
13813 `(("python-pytest" ,python-pytest)
13814 ("python-flask" ,python-flask)
13815 ("python-marshmallow" ,python-marshmallow)
13816 ("python-tornado" ,python-tornado)
13817 ("python-bottle" ,python-bottle)
13818 ("python-mock" ,python-mock)))
13819 (home-page "https://github.com/marshmallow-code/apispec")
13820 (synopsis "Swagger 2.0 API specification generator")
13821 (description "@code{python-apispec} is a pluggable API specification
13822generator. Currently supports the OpenAPI specification (f.k.a.
13823Swagger 2.0).")
13824 (license license:expat)))
13825
13826(define-public python2-apispec
13827 (package-with-python2 python-apispec))
13828
13829(define-public python-flasgger
13830 (package
13831 (name "python-flasgger")
13832 (version "0.6.3")
13833 (source
13834 (origin
1a04d421
TGR
13835 (method git-fetch)
13836 (uri (git-reference
13837 (url "https://github.com/rochacbruno/flasgger.git")
13838 (commit version)))
13839 (file-name (git-file-name name version))
44d10b1f 13840 (sha256
1a04d421 13841 (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn"))))
44d10b1f
RW
13842 (build-system python-build-system)
13843 (arguments
13844 `(#:phases
13845 (modify-phases %standard-phases
13846 (replace 'check
13847 (lambda* (#:key inputs outputs #:allow-other-keys)
13848 (substitute* "Makefile"
13849 (("flake8 flasgger --ignore=F403")
13850 "flake8 flasgger --ignore=E731,F403"))
13851 (setenv "PYTHONPATH" (string-append (getcwd)
13852 ":"
13853 (getenv "PYTHONPATH")))
ac599a09 13854 (invoke "py.test"))))))
44d10b1f
RW
13855 (propagated-inputs
13856 `(("python-flask" ,python-flask)
13857 ("python-pyyaml" ,python-pyyaml)
13858 ("python-jsonschema" ,python-jsonschema)
13859 ("python-mistune" ,python-mistune)
13860 ("python-six" ,python-six)))
13861 (native-inputs
13862 `(("python-decorator" ,python-decorator)
13863 ("python-flake8" ,python-flake8)
13864 ("python-flask-restful" ,python-flask-restful)
13865 ("python-flex" ,python-flex)
13866 ("python-pytest" ,python-pytest)
13867 ("python-pytest-cov" ,python-pytest-cov)
13868 ("python-marshmallow" ,python-marshmallow)
13869 ("python-apispec" ,python-apispec)))
13870 (home-page "https://github.com/rochacbruno/flasgger/")
13871 (synopsis "Extract Swagger specs from your Flask project")
13872 (description "@code{python-flasgger} allows extracting Swagger specs
13873from your Flask project. It is a fork of Flask-Swagger.")
13874 (license license:expat)))
13875
13876(define-public python2-flasgger
13877 (package-with-python2 python-flasgger))
13878
13879(define-public python-swagger-spec-validator
13880 (package
13881 (name "python-swagger-spec-validator")
fe9c5b1d 13882 (version "2.4.3")
44d10b1f
RW
13883 (source
13884 (origin
13885 (method url-fetch)
13886 (uri (pypi-uri "swagger-spec-validator" version))
13887 (sha256
13888 (base32
fe9c5b1d 13889 "11g627icrsqwazsncwi0sdvprcj6hwaayw5xk3xsj8d97bmrzqjp"))))
44d10b1f
RW
13890 (build-system python-build-system)
13891 (propagated-inputs
13892 `(("python-jsonschema" ,python-jsonschema)
fe9c5b1d 13893 ("python-pyyaml" ,python-pyyaml)
44d10b1f
RW
13894 ("python-six" ,python-six)))
13895 (home-page
13896 "https://github.com/Yelp/swagger_spec_validator")
13897 (synopsis "Validation of Swagger specifications")
13898 (description "@code{swagger_spec_validator} provides a library for
13899validating Swagger API specifications.")
13900 (license license:asl2.0)))
13901
13902(define-public python2-swagger-spec-validator
13903 (package-with-python2 python-swagger-spec-validator))
13904
13905(define-public python-apache-libcloud
13906 (package
13907 (name "python-apache-libcloud")
13908 (version "2.4.0")
13909 (source
13910 (origin
13911 (method url-fetch)
13912 (uri (pypi-uri "apache-libcloud" version))
13913 (sha256
13914 (base32
13915 "0daj3mkzw79v5zin2r1s2wkrz1hplfc16bwj4ss68i5qjq4l2p0j"))))
13916 (build-system python-build-system)
13917 (arguments
13918 `(#:phases
13919 (modify-phases %standard-phases
13920 (add-after 'unpack 'patch-ssh
13921 (lambda* (#:key inputs #:allow-other-keys)
13922 (substitute* "libcloud/compute/ssh.py"
13923 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
13924 "/bin/ssh" "'")))
13925 #t))
13926 (add-after 'unpack 'patch-tests
13927 (lambda _
13928 (substitute* "./libcloud/test/test_file_fixtures.py"
13929 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
13930 (("def _ascii") "def _raw_data(self, method, url, body, headers):
13931 return (httplib.OK,
13932 \"1234abcd\",
13933 {\"test\": \"value\"},
13934 httplib.responses[httplib.OK])
13935 def _ascii"))
13936 (substitute* "libcloud/test/compute/test_ssh_client.py"
13937 (("class ShellOutSSHClientTests")
13938 "@unittest.skip(\"Guix container doesn't have ssh service\")
13939class ShellOutSSHClientTests")
13940 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
13941 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
13942 (("'.xF0', '.x90', '.x8D', '.x88'")
13943 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
13944 #t))
13945 (add-before 'check 'copy-secret
13946 (lambda _
13947 (copy-file "libcloud/test/secrets.py-dist"
13948 "libcloud/test/secrets.py")
13949 #t)))))
13950 (inputs
13951 `(("openssh" ,openssh)))
13952 (propagated-inputs
13953 `(("python-paramiko" ,python-paramiko)
13954 ("python-requests" ,python-requests)))
13955 (native-inputs
13956 `(("python-lockfile" ,python-lockfile)
13957 ("python-mock" ,python-mock)
13958 ("python-pytest" ,python-pytest)
13959 ("python-pytest-runner" ,python-pytest-runner)
13960 ("python-requests-mock" ,python-requests-mock)))
13961 (home-page "https://libcloud.apache.org/")
13962 (synopsis "Unified Cloud API")
13963 (description "@code{libcloud} is a Python library for interacting with
13964many of the popular cloud service providers using a unified API.")
13965 (license license:asl2.0)))
13966
13967(define-public python2-apache-libcloud
13968 (package-with-python2 python-apache-libcloud))
13969
1639e0b7 13970(define-public python-smmap
44d10b1f 13971 (package
1639e0b7
MC
13972 (name "python-smmap")
13973 (version "3.0.1")
44d10b1f
RW
13974 (source
13975 (origin
13976 (method url-fetch)
1639e0b7 13977 (uri (pypi-uri "smmap" version))
44d10b1f 13978 (sha256
1639e0b7 13979 (base32 "0ijlnv60y8f41py1wnn5n1a1i81cxd9dfpdhr0k3cgkrcbz8850p"))))
44d10b1f
RW
13980 (build-system python-build-system)
13981 (native-inputs
13982 `(("python-nosexcover" ,python-nosexcover)))
13983 (home-page "https://github.com/Byron/smmap")
13984 (synopsis "Python sliding window memory map manager")
1639e0b7 13985 (description "@code{smmap} is a pure Python implementation of a sliding
44d10b1f
RW
13986window memory map manager.")
13987 (license license:bsd-3)))
13988
1639e0b7
MC
13989(define-public python-smmap2
13990 (deprecated-package "python-smmap2" python-smmap))
13991
13992(define-public python2-smmap
13993 (package-with-python2 python-smmap))
13994
44d10b1f 13995(define-public python2-smmap2
1639e0b7 13996 (deprecated-package "python2-smmap2" python2-smmap))
44d10b1f
RW
13997
13998(define-public python-regex
13999 (package
14000 (name "python-regex")
c187c9d7 14001 (version "2019.04.14")
44d10b1f
RW
14002 (source (origin
14003 (method url-fetch)
14004 (uri (pypi-uri "regex" version))
14005 (sha256
14006 (base32
c187c9d7
BT
14007 "1a6hhfs6l6snr1z654ay6wzbmwdkmv282fzfkd5hk2d1n73y8v6m"))))
14008 ;; TODO: Fix and enable regex_test.py tests that complain about the
14009 ;; test.support module not existing.
44d10b1f
RW
14010 (build-system python-build-system)
14011 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
14012 (synopsis "Alternative regular expression module")
14013 (description "This regular expression implementation is backwards-
14014compatible with the standard @code{re} module, but offers additional
14015functionality like full case-folding for case-insensitive matches in Unicode.")
14016 (license license:psfl)))
14017
14018(define-public python2-regex
14019 (package-with-python2 python-regex))
14020
14021(define-public python2-pyopengl
14022 (package
14023 (name "python2-pyopengl")
14024 (version "3.1.0")
14025 (source
14026 (origin
14027 (method url-fetch)
14028 (uri (pypi-uri "PyOpenGL" version))
14029 (sha256
14030 (base32
14031 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
14032 (arguments
14033 `(#:python ,python-2))
14034 (build-system python-build-system)
14035 (home-page "http://pyopengl.sourceforge.net")
14036 (synopsis "Standard OpenGL bindings for Python")
14037 (description
14038 "PyOpenGL is the most common cross platform Python binding to OpenGL and
14039related APIs. The binding is created using the standard @code{ctypes}
14040library.")
14041 (license license:bsd-3)))
14042
14043(define-public python2-pyopengl-accelerate
14044 (package
14045 (inherit python2-pyopengl)
14046 (name "python2-pyopengl-accelerate")
14047 (version "3.1.0")
14048 (source
14049 (origin
14050 (method url-fetch)
14051 (uri (pypi-uri "PyOpenGL-accelerate" version))
14052 (sha256
14053 (base32
14054 "0464c1ifzk0k92lyndikmvzjgnx1y25r7bkkc8pnxm4kp1q4czwj"))))
14055 (synopsis "Acceleration code for PyOpenGL")
14056 (description
14057 "This is the Cython-coded accelerator module for PyOpenGL.")))
14058
14059(define-public python-rencode
14060 (package
14061 (name "python-rencode")
14062 (version "1.0.5")
14063 (source
14064 (origin
14065 (method url-fetch)
14066 (uri (pypi-uri "rencode" version))
14067 (sha256
14068 (base32
14069 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
14070 (build-system python-build-system)
14071 (arguments
14072 `(#:phases
14073 (modify-phases %standard-phases
14074 (add-before 'check 'delete-bogus-test
14075 ;; This test requires /home/aresch/Downloads, which is not provided by
14076 ;; the build environment.
14077 (lambda _
14078 (delete-file "rencode/t.py")
14079 #t)))))
14080 (native-inputs `(("pkg-config" ,pkg-config)
14081 ("python-cython" ,python-cython)))
14082 (home-page "https://github.com/aresch/rencode")
14083 (synopsis "Serialization of heterogeneous data structures")
14084 (description
14085 "The @code{rencode} module is a data structure serialization library,
14086similar to @code{bencode} from the BitTorrent project. For complex,
14087heterogeneous data structures with many small elements, r-encoding stake up
14088significantly less space than b-encodings. This version of rencode is a
14089complete rewrite in Cython to attempt to increase the performance over the
14090pure Python module.")
14091 (license license:bsd-3)))
14092
14093(define-public python2-rencode
14094 (package-with-python2 python-rencode))
14095
14096(define-public python-xenon
14097 (package
14098 (name "python-xenon")
8c06d6d8 14099 (version "0.7.0")
44d10b1f
RW
14100 (source
14101 (origin
14102 (method url-fetch)
14103 (uri (pypi-uri "xenon" version))
14104 (sha256
14105 (base32
8c06d6d8 14106 "0nv207ql2wmh9q62503np056c4vf1c1hlsi5cvv5p5kx574k6r2y"))))
44d10b1f
RW
14107 (build-system python-build-system)
14108 (native-inputs
14109 `(("python-pyyaml" ,python-pyyaml)
14110 ("python-radon" ,python-radon)
14111 ("python-requests" ,python-requests)
14112 ("python-flake8" ,python-flake8)
14113 ("python-tox" ,python-tox)))
14114 (arguments
8c06d6d8
MC
14115 `(#:tests? #f ;test suite not shipped with the PyPI archive
14116 #:phases
44d10b1f
RW
14117 (modify-phases %standard-phases
14118 (add-before 'build 'patch-test-requirements
14119 (lambda _
14120 ;; Remove httpretty dependency for tests.
14121 (substitute* "setup.py"
14122 (("httpretty") ""))
14123 #t)))))
14124 (home-page "https://xenon.readthedocs.org/")
14125 (synopsis "Monitor code metrics for Python on your CI server")
14126 (description
14127 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
14128Ideally, @code{xenon} is run every time code is committed. Through command
14129line options, various thresholds can be set for the complexity of code. It
14130will fail (i.e. it will exit with a non-zero exit code) when any of these
14131requirements is not met.")
14132 (license license:expat)))
14133
14134(define-public python2-xenon
14135 (package-with-python2 python-xenon))
14136
14137(define-public python-pysocks
14138 (package
14139 (name "python-pysocks")
b8725cdf 14140 (version "1.7.0")
44d10b1f
RW
14141 (source
14142 (origin
14143 (method url-fetch)
14144 (uri (pypi-uri "PySocks" version))
14145 (sha256
14146 (base32
b8725cdf 14147 "0z4p31bpqm893cf87qqgb30k7nwd8kqfjwwjm5cvxb6zbyj1w0yr"))))
44d10b1f
RW
14148 (build-system python-build-system)
14149 (arguments `(#:tests? #f))
14150 (home-page "https://github.com/Anorov/PySocks")
14151 (synopsis "SOCKS client module")
14152 (description "@code{pysocks} is an updated and semi-actively maintained
14153version of @code{SocksiPy} with bug fixes and extra features.")
14154 (license license:bsd-3)))
14155
14156(define-public python2-pysocks
14157 (package-with-python2 python-pysocks))
14158
14159(define-public python-pydiff
14160 (package
14161 (name "python-pydiff")
14162 (version "0.2")
14163 (source
14164 (origin
14165 (method url-fetch)
14166 (uri (pypi-uri "pydiff" version))
14167 (sha256
14168 (base32
14169 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
14170 (build-system python-build-system)
14171 (home-page "https://github.com/myint/pydiff")
14172 (synopsis "Library to diff two Python files at the bytecode level")
14173 (description
14174 "@code{pydiff} makes it easy to look for actual code changes while
14175ignoring formatting changes.")
14176 (license license:expat)))
14177
14178(define-public python2-pydiff
14179 (package-with-python2 python-pydiff))
14180
14181(define-public python-tqdm
14182 (package
14183 (name "python-tqdm")
14184 (version "4.19.6")
14185 (source
14186 (origin
14187 (method url-fetch)
14188 (uri (pypi-uri "tqdm" version))
14189 (sha256
14190 (base32
14191 "1pw0ngm0zn9papdmkwipi3yih5c3di6d0w849bdmrraq4d2d9h2y"))))
14192 (build-system python-build-system)
14193 (native-inputs
14194 `(("python-flake8" ,python-flake8)
14195 ("python-nose" ,python-nose)
14196 ("python-coverage" ,python-coverage)))
14197 (home-page "https://github.com/tqdm/tqdm")
14198 (synopsis "Fast, extensible progress meter")
14199 (description
14200 "Make loops show a progress bar on the console by just wrapping any
14201iterable with @code{|tqdm(iterable)|}. Offers many options to define
14202design and layout.")
f875d76f
PL
14203 (license (list license:mpl2.0 license:expat))
14204 (properties `((python2-variant . ,(delay python2-tqdm))))))
44d10b1f
RW
14205
14206(define-public python2-tqdm
f875d76f
PL
14207 (let ((tqdm (package-with-python2
14208 (strip-python2-variant python-tqdm))))
14209 (package (inherit tqdm)
14210 (native-inputs `(("python2-functools32" ,python2-functools32)
14211 ,@(package-native-inputs tqdm))))))
44d10b1f
RW
14212
14213(define-public python-pkginfo
14214 (package
14215 (name "python-pkginfo")
14216 (version "1.4.2")
14217 (source
14218 (origin
14219 (method url-fetch)
14220 (uri (pypi-uri "pkginfo" version))
14221 (sha256
14222 (base32
14223 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
14224 (build-system python-build-system)
14225 (arguments
14226 ;; The tests are broken upstream.
14227 '(#:tests? #f))
14228 (home-page
14229 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
14230 (synopsis
14231 "Query metadatdata from sdists, bdists, and installed packages")
14232 (description
14233 "API to query the distutils metadata written in @file{PKG-INFO} inside a
14234source distriubtion (an sdist) or a binary distribution (e.g., created by
14235running bdist_egg). It can also query the EGG-INFO directory of an installed
14236distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
14237created by running @code{python setup.py develop}).")
14238 (license license:expat)))
14239
14240(define-public python2-pkginfo
14241 (package-with-python2 python-pkginfo))
14242
14243(define-public python-twine
14244 (package
14245 (name "python-twine")
14246 (version "1.9.1")
14247 (source
14248 (origin
14249 (method url-fetch)
14250 (uri (pypi-uri "twine" version))
14251 (sha256
14252 (base32
14253 "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a"))))
14254 (build-system python-build-system)
14255 (propagated-inputs
14256 `(("python-tqdm" ,python-tqdm)
14257 ("python-pkginfo" ,python-pkginfo)
14258 ("python-requests" ,python-requests)
14259 ("python-requests-toolbelt" ,python-requests-toolbelt)))
14260 (home-page "https://github.com/pypa/twine")
14261 (synopsis "Collection of utilities for interacting with PyPI")
14262 (description
14263 "@code{twine} currently supports registering projects and uploading
14264distributions. It authenticates the user over HTTPS, allows them to pre-sign
14265their files and supports any packaging format (including wheels).")
14266 (license license:asl2.0)))
14267
14268(define-public python2-twine
14269 (package-with-python2 python-twine))
14270
14271(define-public python-linecache2
14272 (package
14273 (name "python-linecache2")
14274 (version "1.0.0")
14275 (source
14276 (origin
14277 (method url-fetch)
14278 (uri (pypi-uri "linecache2" version))
14279 (sha256
14280 (base32
14281 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
14282 (build-system python-build-system)
14283 (arguments
14284 `(;; The tests depend on unittest2, and our version is a bit too old.
14285 #:tests? #f))
14286 (native-inputs
14287 `(("python-pbr" ,python-pbr-minimal)))
14288 (home-page
14289 "https://github.com/testing-cabal/linecache2")
14290 (synopsis "Backports of the linecache module")
14291 (description
14292 "The linecache module allows one to get any line from any file, while
14293attempting to optimize internally, using a cache, the common case where many
14294lines are read from a single file.")
14295 (license license:psfl)))
14296
14297(define-public python2-linecache2
14298 (package-with-python2 python-linecache2))
14299
14300(define-public python-traceback2
14301 (package
14302 (name "python-traceback2")
14303 (version "1.4.0")
14304 (source
14305 (origin
14306 (method url-fetch)
14307 (uri (pypi-uri "traceback2" version))
14308 (sha256
14309 (base32
14310 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
14311 (build-system python-build-system)
14312 (arguments
14313 `(;; python-traceback2 and python-unittest2 depend on one another.
14314 #:tests? #f))
14315 (native-inputs
14316 `(("python-pbr" ,python-pbr-minimal)))
14317 (propagated-inputs
14318 `(("python-linecache2" ,python-linecache2)))
14319 (home-page
14320 "https://github.com/testing-cabal/traceback2")
14321 (synopsis "Backports of the traceback module")
14322 (description
14323 "This module provides a standard interface to extract, format and print
14324stack traces of Python programs. It exactly mimics the behavior of the Python
14325interpreter when it prints a stack trace.")
14326 (license license:psfl)))
14327
14328(define-public python2-traceback2
14329 (package-with-python2 python-traceback2))
14330
14331(define-public python-ratelimiter
14332 (package
14333 (name "python-ratelimiter")
14334 (version "1.2.0")
14335 (source
14336 (origin
14337 (method url-fetch)
14338 (uri (pypi-uri "ratelimiter" version))
14339 (sha256
14340 (base32
14341 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
14342 (build-system python-build-system)
14343 (arguments
14344 '(#:tests? #f)) ; There are no tests in the pypi archive.
14345 (home-page "https://github.com/RazerM/ratelimiter")
14346 (synopsis "Simple rate limiting object")
14347 (description
14348 "The @code{ratelimiter} module ensures that an operation will not be
14349executed more than a given number of times during a given period.")
14350 (license license:asl2.0)))
14351
14352(define-public python2-ratelimiter
14353 (package-with-python2 python-ratelimiter))
14354
14355(define-public python-dukpy
14356 (package
14357 (name "python-dukpy")
14358 (version "0.3")
14359 (source
14360 (origin
5b77ebe1
TGR
14361 (method git-fetch)
14362 (uri (git-reference
14363 (url "https://github.com/kovidgoyal/dukpy.git")
14364 (commit (string-append "v" version))))
14365 (file-name (git-file-name name version))
44d10b1f 14366 (sha256
5b77ebe1 14367 (base32 "13h21nqzasv4zj32xs61brmc106pr2cx243672crcmwxxnjgaxls"))))
44d10b1f
RW
14368 (build-system python-build-system)
14369 (home-page "https://github.com/kovidgoyal/dukpy")
14370 (synopsis "Run JavaScript in python")
14371 (description
14372 "dukpy is a JavaScript runtime environment for Python using the duktape
14373embeddable JavaScript engine.")
14374 ;; Dukpy is licensed under MIT like the embedded duktape library,
14375 ;; with 'errors.c' as GPL3.
14376 (license (list license:expat license:gpl3))))
14377
14378(define-public python2-dukpy
14379 (package-with-python2 python-dukpy))
14380
14381(define-public python-jsonrpclib-pelix
14382 (package
14383 (name "python-jsonrpclib-pelix")
14384 (version "0.3.2")
14385 (source
14386 (origin
14387 (method url-fetch)
14388 (uri (pypi-uri "jsonrpclib-pelix" version))
14389 (sha256
14390 (base32
14391 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
14392 (build-system python-build-system)
14393 (arguments
14394 `(#:tests? #f)) ; no tests in PyPI tarball
14395 (home-page "https://github.com/tcalmant/jsonrpclib/")
14396 (synopsis "JSON-RPC 2.0 client library for Python")
14397 (description
14398 "This library implements the JSON-RPC v2.0
14399specification (backwards-compatible) as a client library for Python. This
14400version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
14401services.")
14402 (license license:asl2.0)))
14403
14404(define-public python2-jsonrpclib-pelix
14405 (package-with-python2 python-jsonrpclib-pelix))
14406
14407(define-public python-setuptools-scm-git-archive
14408 (package
14409 (name "python-setuptools-scm-git-archive")
14410 (version "1.0")
14411 (source
14412 (origin
14413 (method url-fetch)
14414 (uri (pypi-uri "setuptools_scm_git_archive" version))
14415 (sha256
14416 (base32
14417 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
14418 (build-system python-build-system)
14419 (native-inputs
14420 `(("python-pytest" ,python-pytest)))
14421 (propagated-inputs
14422 `(("python-setuptools-scm" ,python-setuptools-scm)))
14423 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
14424 (synopsis "Setuptools_scm plugin for git archives")
14425 (description
14426 "The setuptools_scm_git_archive package is a plugin to
14427setuptools_scm, which supports obtaining versions from git archives that
14428belong to tagged versions.")
14429 (license license:expat)))
14430
14431(define-public python2-setuptools-scm-git-archive
14432 (package-with-python2 python-setuptools-scm-git-archive))
14433
724a350c
RW
14434(define-public python-setuptools-git
14435 (package
14436 (name "python-setuptools-git")
14437 (version "1.2")
14438 (source
14439 (origin
14440 (method url-fetch)
14441 (uri (pypi-uri "setuptools-git" version))
14442 (sha256
14443 (base32
14444 "0i84qjwp5m0l9qagdjww2frdh63r37km1c48mrvbmaqsl1ni6r7z"))))
14445 (build-system python-build-system)
14446 (arguments
14447 `(#:phases
14448 (modify-phases %standard-phases
14449 ;; This is needed for tests.
14450 (add-after 'unpack 'configure-git
14451 (lambda _
14452 (setenv "HOME" "/tmp")
14453 (invoke "git" "config" "--global" "user.email" "guix")
14454 (invoke "git" "config" "--global" "user.name" "guix")
14455 #t)))))
14456 (native-inputs
14457 `(("git" ,git-minimal)))
14458 (home-page "https://github.com/msabramo/setuptools-git")
14459 (synopsis "Setuptools revision control system plugin for Git")
14460 (description
14461 "This package provides a plugin for Setuptools for revision control with
14462Git.")
14463 (license license:bsd-3)))
14464
44d10b1f
RW
14465(define-public python-pyclipper
14466 (package
14467 (name "python-pyclipper")
ff3d1b99 14468 (version "1.1.0.post3")
44d10b1f
RW
14469 (source
14470 (origin
14471 (method url-fetch)
14472 (uri (pypi-uri "pyclipper" version ".zip"))
14473 (sha256
ff3d1b99 14474 (base32 "164yksvqwqvwzh8f8lq92asg87hd8rvcy2xb5vm4y4ccvd5xgb7i"))
44d10b1f
RW
14475 (modules '((guix build utils)))
14476 (snippet
14477 '(begin
14478 ;; This file is generated by Cython.
14479 (delete-file "pyclipper/pyclipper.cpp") #t))))
14480 (build-system python-build-system)
14481 (arguments
14482 `(#:phases
14483 (modify-phases %standard-phases
14484 (add-before 'build 'cythonize-sources
14485 (lambda _
14486 (with-directory-excursion "pyclipper"
14487 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
14488 (propagated-inputs
14489 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
14490 (native-inputs
14491 `(("python-cython" ,python-cython)
14492 ("python-pytest" ,python-pytest)
14493 ("python-pytest-runner" ,python-pytest-runner)
14494 ("python-unittest2" ,python-unittest2)
14495 ("unzip" ,unzip)))
14496 (home-page "https://github.com/greginvm/pyclipper")
14497 (synopsis "Wrapper for Angus Johnson's Clipper library")
14498 (description
14499 "Pyclipper is a Cython wrapper for the C++ translation of the
14500Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
14501 (license license:expat)))
14502
14503(define-public python2-pyclipper
14504 (package-with-python2 python-pyclipper))
14505
14506(define-public python2-booleanoperations
14507 (package
14508 (name "python2-booleanoperations")
14509 (version "0.7.1")
14510 (source
14511 (origin
14512 (method url-fetch)
14513 (uri (pypi-uri "booleanOperations" version ".zip"))
14514 (sha256
14515 (base32
14516 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
14517 (build-system python-build-system)
14518 (arguments
14519 `(#:python ,python-2))
14520 (native-inputs
14521 `(("unzip" ,unzip)
14522 ("python2-pytest" ,python2-pytest)
14523 ("python2-pytest-runner" ,python2-pytest-runner)))
14524 (propagated-inputs
14525 `(("python-fonttools" ,python2-fonttools)
14526 ("python-pyclipper" ,python2-pyclipper)
14527 ("python-ufolib" ,python2-ufolib)))
14528 (home-page "https://github.com/typemytype/booleanOperations")
14529 (synopsis "Boolean operations on paths")
14530 (description
14531 "BooleanOperations provides a Python library that enables
14532boolean operations on paths.")
14533 (license license:expat)))
14534
14535(define-public python-tempdir
14536 (package
14537 (name "python-tempdir")
14538 (version "0.7.1")
14539 (source
14540 (origin
14541 (method url-fetch)
14542 (uri (pypi-uri "tempdir" version))
14543 (sha256
14544 (base32
14545 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
14546 (build-system python-build-system)
14547 (home-page "https://pypi.org/project/tempdir/")
14548 (arguments
14549 ;; the package has no tests
14550 '(#:tests? #f))
14551 (synopsis "Python library for managing temporary directories")
14552 (description
14553 "This library manages temporary directories that are automatically
14554deleted with all their contents when they are no longer needed. It is
14555particularly convenient for use in tests.")
14556 (license license:expat)))
14557
14558(define-public python2-tempdir
14559 (package-with-python2 python-tempdir))
14560
14561(define-public python-activepapers
14562 (package
14563 (name "python-activepapers")
14564 (version "0.2.2")
14565 (source
14566 (origin
14567 (method url-fetch)
14568 (uri (pypi-uri "ActivePapers.Py" version))
14569 (sha256
14570 (base32
14571 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
14572 (build-system python-build-system)
14573 (arguments
14574 `(#:modules ((ice-9 ftw)
14575 (srfi srfi-1)
14576 (guix build utils)
14577 (guix build python-build-system))
14578
14579 #:phases
14580 (modify-phases %standard-phases
14581 (add-after 'unpack 'delete-python2-code
14582 (lambda _
14583 (for-each delete-file
14584 '("lib/activepapers/builtins2.py"
14585 "lib/activepapers/standardlib2.py"
14586 "lib/activepapers/utility2.py"))))
14587 (replace 'check
14588 (lambda _
14589 ;; Deactivate the test cases that download files
14590 (setenv "NO_NETWORK_ACCESS" "1")
14591 ;; For some strange reason, some tests fail if nosetests runs all
14592 ;; test modules in a single execution. They pass if each test
14593 ;; module is run individually.
14594 (for-each (lambda (filename)
14595 (invoke "nosetests"
14596 (string-append "tests/" filename)))
14597 (scandir "tests"
14598 (lambda (filename)
14599 (string-suffix? ".py" filename)))))))))
14600 (native-inputs
14601 `(("python-tempdir" ,python-tempdir)
14602 ("python-nose" ,python-nose)))
14603 (propagated-inputs
14604 `(("python-h5py" ,python-h5py)))
26827dfe 14605 (home-page "https://www.activepapers.org/")
44d10b1f
RW
14606 (synopsis "Executable papers for scientific computing")
14607 (description
14608 "ActivePapers is a tool for working with executable papers, which
14609combine data, code, and documentation in single-file packages,
14610suitable for publication as supplementary material or on repositories
14611such as figshare or Zenodo.")
14612 (properties `((python2-variant . ,(delay python2-activepapers))))
14613 (license license:bsd-3)))
14614
14615(define-public python2-activepapers
14616 (let ((base (package-with-python2
14617 (strip-python2-variant python-activepapers))))
14618 (package
14619 (inherit base)
14620 (arguments
14621 (substitute-keyword-arguments (package-arguments base)
14622 ((#:phases phases)
14623 `(modify-phases ,phases
14624 (delete 'delete-python2-code)
14625 (add-after 'unpack 'delete-python3-code
14626 (lambda _
14627 (for-each delete-file
14628 '("lib/activepapers/builtins3.py"
14629 "lib/activepapers/standardlib3.py"
14630 "lib/activepapers/utility3.py")))))))))))
14631
14632(define-public python-semver
14633 (package
14634 (name "python-semver")
594280b1 14635 (version "2.9.0")
44d10b1f 14636 (source
2ecbba24
BG
14637 (origin
14638 (method url-fetch)
14639 (uri (pypi-uri "semver" version))
14640 (sha256
14641 (base32
14642 "183kg1rhzz3hqizvphkd8hlbf1zxfx8737zhfkmqzxi71jmdw7pd"))))
44d10b1f 14643 (build-system python-build-system)
44d10b1f 14644 (native-inputs
b4e1ca06
RJ
14645 `(("python-appdirs" ,python-appdirs)
14646 ("python-distlib" ,python-distlib)
14647 ("python-importlib-metadata" ,python-importlib-metadata)
14648 ("python-filelock" ,python-filelock)
14649 ("python-six" ,python-six)
14650 ("python-tox" ,python-tox)
44d10b1f
RW
14651 ("python-virtualenv" ,python-virtualenv)))
14652 (home-page "https://github.com/k-bx/python-semver")
14653 (synopsis "Python helper for Semantic Versioning")
14654 (description "This package provides a Python library for
14655@url{Semantic Versioning, http://semver.org/}.")
14656 (license license:bsd-3)))
14657
14658(define-public python2-semver
14659 (package-with-python2 python-semver))
14660
14661(define-public python-pyro4
14662 (package
14663 (name "python-pyro4")
3ce91d44 14664 (version "4.77")
44d10b1f
RW
14665 (source
14666 (origin
14667 (method url-fetch)
14668 (uri (pypi-uri "Pyro4" version))
14669 (sha256
3ce91d44 14670 (base32 "0gsjg869y4gpy265s1gj1f2qy6jn5iz8r2bwwnq78r1r5yi15zib"))))
44d10b1f 14671 (build-system python-build-system)
3ce91d44
GL
14672 (arguments
14673 '(#:tests? #f)) ;FIXME: Some tests require network access.
14674 (native-inputs
14675 `(("python-cloudpickle" ,python-cloudpickle)
14676 ("python-dill" ,python-dill)
14677 ("python-msgpack" ,python-msgpack)))
44d10b1f
RW
14678 (propagated-inputs
14679 `(("python-serpent" ,python-serpent)))
14680 (home-page "https://pyro4.readthedocs.io")
14681 (synopsis "Distributed object middleware for Python")
14682 (description
14683 "Pyro enables you to build applications in which objects can talk to each
14684other over the network. You can just use normal Python method calls to call
14685objects on other machines, also known as remote procedure calls (RPC).")
14686 (license license:expat)))
14687
14688(define-public python2-pyro
14689 (package
14690 (name "python2-pyro")
14691 (version "3.16")
14692 (source
14693 (origin
14694 (method url-fetch)
14695 (uri (pypi-uri "Pyro" version))
14696 (file-name (string-append "Pyro-" version ".tar.gz"))
14697 (sha256
14698 (base32
14699 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
14700 (build-system python-build-system)
14701 (arguments
14702 ;; Pyro is not compatible with Python 3
14703 `(#:python ,python-2
14704 ;; Pyro has no test cases for automatic execution
14705 #:tests? #f))
14706 (home-page "http://pythonhosted.org/Pyro/")
14707 (synopsis "Distributed object manager for Python")
14708 (description "Pyro is a Distributed Object Technology system
14709written in Python that is designed to be easy to use. It resembles
14710Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
14711which is a system and language independent Distributed Object Technology
14712and has much more to offer than Pyro or RMI. Pyro 3.x is no
14713longer maintained. New projects should use Pyro4 instead, which
14714is the new Pyro version that is actively developed.")
14715 (license license:expat)))
14716
14717(define-public python2-scientific
14718 (package
14719 (name "python2-scientific")
14720 (version "2.9.4")
14721 (source
14722 (origin
c695f011
KH
14723 (method git-fetch)
14724 (uri (git-reference
14725 (url "https://github.com/khinsen/ScientificPython")
14726 (commit (string-append "rel" version))))
14727 (file-name (git-file-name name version))
44d10b1f
RW
14728 (sha256
14729 (base32
c695f011 14730 "16l48aj9fps9r7jyk8gpxppwrv0fqvlc13sayxskz28r5s6sjwbl"))))
44d10b1f
RW
14731 (build-system python-build-system)
14732 (inputs
14733 `(("netcdf" ,netcdf)))
14734 (propagated-inputs
14735 `(("python-numpy" ,python2-numpy-1.8)
14736 ("python-pyro" ,python2-pyro)))
14737 (arguments
14738 ;; ScientificPython is not compatible with Python 3
14739 `(#:python ,python-2
14740 #:tests? #f ; No test suite
14741 #:phases
14742 (modify-phases %standard-phases
14743 (replace 'build
14744 (lambda* (#:key inputs #:allow-other-keys)
77e61e25
RW
14745 (invoke "python" "setup.py" "build"
14746 (string-append "--netcdf_prefix="
14747 (assoc-ref inputs "netcdf"))))))))
c695f011 14748 (home-page "http://dirac.cnrs-orleans.fr/ScientificPython")
44d10b1f
RW
14749 (synopsis "Python modules for scientific computing")
14750 (description "ScientificPython is a collection of Python modules that are
14751useful for scientific computing. Most modules are rather general (Geometry,
14752physical units, automatic derivatives, ...) whereas others are more
14753domain-specific (e.g. netCDF and PDB support). The library is currently
14754not actively maintained and works only with Python 2 and NumPy < 1.9.")
14755 (license license:cecill-c)))
14756
14757(define-public python2-mmtk
14758 (package
14759 (name "python2-mmtk")
fe9b72c5 14760 (version "2.7.12")
44d10b1f
RW
14761 (source
14762 (origin
fe9b72c5
KH
14763 (method git-fetch)
14764 (uri (git-reference
14765 (url "https://github.com/khinsen/MMTK")
14766 (commit (string-append "rel" version))))
14767 (file-name (git-file-name name version))
44d10b1f
RW
14768 (sha256
14769 (base32
fe9b72c5 14770 "1fqwh3ba9jd42nigvn5shndgwb1zy7kh9520ncvqci7n8ffjr6p1"))))
44d10b1f
RW
14771 (build-system python-build-system)
14772 (native-inputs
14773 `(("netcdf" ,netcdf)))
14774 (propagated-inputs
14775 `(("python-scientific" ,python2-scientific)
14776 ("python-tkinter" ,python-2 "tk")))
14777 (arguments
14778 `(#:python ,python-2
14779 #:tests? #f
14780 #:phases
14781 (modify-phases %standard-phases
14782 (add-before 'build 'includes-from-scientific
14783 (lambda* (#:key inputs #:allow-other-keys)
14784 (mkdir-p "Include/Scientific")
14785 (copy-recursively
14786 (string-append
14787 (assoc-ref inputs "python-scientific")
14788 "/include/python2.7/Scientific")
14789 "Include/Scientific"))))))
14790 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
14791 (synopsis "Python library for molecular simulation")
14792 (description "MMTK is a library for molecular simulations with an emphasis
14793on biomolecules. It provides widely used methods such as Molecular Dynamics
14794and normal mode analysis, but also basic routines for implementing new methods
14795for simulation and analysis. The library is currently not actively maintained
14796and works only with Python 2 and NumPy < 1.9.")
14797 (license license:cecill-c)))
14798
14799(define-public python-phonenumbers
14800 (package
14801 (name "python-phonenumbers")
14802 (version "8.9.1")
14803 (source
14804 (origin
14805 (method url-fetch)
14806 (uri (pypi-uri "phonenumbers" version))
14807 (sha256
14808 (base32
14809 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
14810 (build-system python-build-system)
14811 (home-page
14812 "https://github.com/daviddrysdale/python-phonenumbers")
14813 (synopsis
14814 "Python library for dealing with international phone numbers")
14815 (description
14816 "This package provides a Python port of Google's libphonenumber library.")
14817 (license license:asl2.0)))
14818
14819(define-public python2-phonenumbers
14820 (package-with-python2 python-phonenumbers))
14821
14822(define-public python-send2trash
14823 (package
14824 (name "python-send2trash")
d9b0216b 14825 (version "1.5.0")
44d10b1f 14826 (source
d9b0216b 14827 (origin (method git-fetch)
44d10b1f 14828 ;; Source tarball on PyPI doesn't include tests.
d9b0216b
RW
14829 (uri (git-reference
14830 (url "https://github.com/hsoft/send2trash.git")
14831 (commit version)))
14832 (file-name (git-file-name name version))
44d10b1f
RW
14833 (sha256
14834 (base32
d9b0216b 14835 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
44d10b1f
RW
14836 (build-system python-build-system)
14837 (arguments
14838 '(#:phases
14839 (modify-phases %standard-phases
14840 (add-before 'check 'pre-check
14841 (lambda _
14842 (mkdir-p "/tmp/foo")
14843 (setenv "HOME" "/tmp/foo")
14844 #t)))))
14845 (home-page "https://github.com/hsoft/send2trash")
14846 (synopsis "Send files to the user's @file{~/Trash} directory")
14847 (description "This package provides a Python library to send files to the
14848user's @file{~/Trash} directory.")
20b3fde7 14849 (properties `((python2-variant . ,(delay python2-send2trash))))
44d10b1f
RW
14850 (license license:bsd-3)))
14851
14852(define-public python2-send2trash
14853 (package
f32164ab 14854 (inherit (package-with-python2 (strip-python2-variant python-send2trash)))
44d10b1f
RW
14855 (arguments
14856 (substitute-keyword-arguments (package-arguments python-send2trash)
14857 ((#:phases phases)
14858 `(modify-phases ,phases
14859 (add-before 'check 'setenv
14860 (lambda _
14861 (setenv "PYTHONPATH"
14862 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
4782a06f 14863 #t))))))))
44d10b1f
RW
14864
14865(define-public python-yapf
14866 (package
14867 (name "python-yapf")
19ba75dc 14868 (version "0.29.0")
44d10b1f
RW
14869 (source
14870 (origin
14871 (method url-fetch)
14872 (uri (pypi-uri "yapf" version))
14873 (sha256
14874 (base32
19ba75dc 14875 "1pj3xzblmbssshi889b6n9hwqbjpabw6j0fimlng2sshd3226bki"))))
44d10b1f
RW
14876 (build-system python-build-system)
14877 (home-page "https://github.com/google/yapf")
14878 (synopsis "Formatter for Python code")
14879 (description "YAPF is a formatter for Python code. It's based off of
14880@dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
14881takes the code and reformats it to the best formatting that conforms to the
14882style guide, even if the original code didn't violate the style guide.")
14883 (license license:asl2.0)))
14884
14885(define-public python2-yapf
14886 (package-with-python2 python-yapf))
14887
14888(define-public python-gyp
14889 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
14890 (revision "0"))
14891 (package
14892 (name "python-gyp")
14893 ;; Google does not release versions,
14894 ;; based on second most recent commit date.
14895 (version (git-version "0.0.0" revision commit))
14896 (source
14897 (origin
14898 ;; Google does not release tarballs,
14899 ;; git checkout is needed.
14900 (method git-fetch)
14901 (uri (git-reference
14902 (url "https://chromium.googlesource.com/external/gyp")
14903 (commit commit)))
14904 (file-name (git-file-name name version))
14905 (sha256
14906 (base32
14907 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
14908 (build-system python-build-system)
14909 (home-page "https://gyp.gsrc.io/")
14910 (synopsis "GYP is a Meta-Build system")
14911 (description
14912 "GYP builds build systems for large, cross platform applications.
14913It can be used to generate XCode projects, Visual Studio projects, Ninja build
14914files, and Makefiles.")
14915 (license license:bsd-3))))
14916
14917(define-public python2-gyp
14918 (package-with-python2 python-gyp))
14919
14920(define-public python-whatever
14921 (package
14922 (name "python-whatever")
97610a66 14923 (version "0.6")
44d10b1f
RW
14924 (source
14925 (origin
ac0ea38c
EF
14926 (method git-fetch)
14927 (uri (git-reference
14928 (url "https://github.com/Suor/whatever")
14929 (commit version)))
14930 (file-name (git-file-name name version))
44d10b1f 14931 (sha256
ac0ea38c 14932 (base32 "1q7ajgqjfivxqsqgnhp4lc4p6jxyh4zprcsdbpd6dw54inaf0av5"))))
44d10b1f
RW
14933 (build-system python-build-system)
14934 (arguments
14935 `(#:phases
14936 (modify-phases %standard-phases
14937 (replace 'check
14938 (lambda _
14939 (invoke "py.test"))))))
14940 (native-inputs
14941 `(("python-pytest" ,python-pytest)))
14942 (home-page "http://github.com/Suor/whatever")
14943 (synopsis "Make anonymous functions by partial application of operators")
14944 (description "@code{whatever} provides an easy way to make anonymous
14945functions by partial application of operators.")
14946 (license license:bsd-3)))
14947
14948(define-public python2-whatever
14949 (package-with-python2 python-whatever))
14950
14951(define-public python-funcy
14952 (package
14953 (name "python-funcy")
9e396ab8 14954 (version "1.11")
44d10b1f
RW
14955 (source
14956 (origin
a85c6027
TGR
14957 (method git-fetch)
14958 (uri (git-reference
14959 (url "https://github.com/Suor/funcy.git")
14960 (commit version)))
44d10b1f 14961 (sha256
a85c6027
TGR
14962 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
14963 (file-name (git-file-name name version))))
44d10b1f
RW
14964 (build-system python-build-system)
14965 (arguments
14966 `(#:phases
14967 (modify-phases %standard-phases
14968 (replace 'check
14969 (lambda _
14970 (invoke "py.test"))))))
14971 (native-inputs
14972 `(("python-pytest" ,python-pytest)
14973 ("python-whatever" ,python-whatever)))
14974 (home-page "http://github.com/Suor/funcy")
14975 (synopsis "Functional tools")
14976 (description "@code{funcy} is a library that provides functional tools.
14977Examples are:
14978@enumerate
14979@item merge - Merges collections of the same type
14980@item walk - Type-preserving map
14981@item select - Selects a part of a collection
14982@item take - Takes the first n items of a collection
14983@item first - Takes the first item of a collection
14984@item remove - Predicated-removes items of a collection
14985@item concat - Concatenates two collections
14986@item flatten - Flattens a collection with subcollections
14987@item distinct - Returns only distinct items
14988@item split - Predicated-splits a collection
14989@item split_at - Splits a collection at a given item
14990@item group_by - Groups items by group
14991@item pairwise - Pairs off adjacent items
14992@item partial - Partially-applies a function
14993@item curry - Curries a function
14994@item compose - Composes functions
14995@item complement - Complements a predicate
14996@item all_fn - \"all\" with predicate
14997@end enumerate")
14998 (license license:bsd-3)))
14999
15000(define-public python2-funcy
15001 (package-with-python2 python-funcy))
15002
15003(define-public python-isoweek
15004 (package
15005 (name "python-isoweek")
15006 (version "1.3.3")
15007 (source
15008 (origin
15009 (method url-fetch)
15010 (uri (pypi-uri "isoweek" version))
15011 (sha256
15012 (base32
15013 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
15014 (build-system python-build-system)
15015 (home-page "https://github.com/gisle/isoweek")
15016 (synopsis "Objects representing a week")
15017 (description "The @code{isoweek} module provide the class Week that
15018implements the week definition of ISO 8601. This standard also defines
15019a notation for identifying weeks; yyyyWww (where the W is a literal).
15020Week instances stringify to this form.")
15021 (license license:bsd-3)))
15022
15023(define-public python2-isoweek
15024 (package-with-python2 python-isoweek))
15025
15026(define-public python-tokenize-rt
15027 (package
15028 (name "python-tokenize-rt")
15029 (version "2.0.1")
15030 (source
15031 (origin
15032 (method url-fetch)
15033 (uri (pypi-uri "tokenize-rt" version))
15034 (sha256
15035 (base32
15036 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
15037 (build-system python-build-system)
15038 (home-page "https://github.com/asottile/tokenize-rt")
15039 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
15040 (description
15041 "This Python library is a wrapper around @code{tokenize} from the Python
15042standard library. It provides two additional tokens @code{ESCAPED_NL} and
15043@code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
15044and @code{tokens_to_src} to roundtrip.")
15045 (license license:expat)))
15046
15047(define-public python-future-fstrings
15048 (package
15049 (name "python-future-fstrings")
15050 (version "0.4.1")
15051 (source
15052 (origin
15053 (method url-fetch)
15054 (uri (pypi-uri "future_fstrings" version))
15055 (sha256
15056 (base32
15057 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
15058 (build-system python-build-system)
15059 (propagated-inputs
15060 `(("python-tokenize-rt" ,python-tokenize-rt)))
15061 (home-page "https://github.com/asottile/future-fstrings")
15062 (synopsis "Backport of fstrings to Python < 3.6")
15063 (description
15064 "This package provides a UTF-8 compatible encoding
15065@code{future_fstrings}, which performs source manipulation. It decodes the
15066source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
15067@code{f} strings.")
15068 (license license:expat)))
15069
dae2eb1c
MC
15070(define-public python-typed-ast
15071 (package
15072 (name "python-typed-ast")
bae89583 15073 (version "1.4.0")
dae2eb1c
MC
15074 (source
15075 (origin
bae89583
MO
15076 (method git-fetch)
15077 (uri (git-reference
15078 (url "https://github.com/python/typed_ast.git")
15079 (commit version)))
dae2eb1c 15080 (sha256
bae89583
MO
15081 (base32 "0l0hz809f7i356kmqkvfsaswiidb98j9hs9rrjnfawzqcbffzgyb"))
15082 (file-name (git-file-name name version))))
dae2eb1c
MC
15083 (build-system python-build-system)
15084 (arguments
15085 `(#:modules ((guix build utils)
15086 (guix build python-build-system)
15087 (ice-9 ftw)
15088 (srfi srfi-1)
15089 (srfi srfi-26))
15090 #:phases
15091 (modify-phases %standard-phases
15092 (replace 'check
15093 (lambda _
15094 (let ((cwd (getcwd)))
15095 (setenv "PYTHONPATH"
15096 (string-append cwd "/build/"
15097 (find (cut string-prefix? "lib" <>)
15098 (scandir (string-append cwd "/build")))
15099 ":"
15100 (getenv "PYTHONPATH"))))
15101 (invoke "pytest")
15102 #t)))))
15103 (native-inputs `(("python-pytest" ,python-pytest)))
15104 (home-page "https://github.com/python/typed_ast")
15105 (synopsis "Fork of Python @code{ast} modules with type comment support")
15106 (description "This package provides a parser similar to the standard
15107@code{ast} library. Unlike @code{ast}, the parsers in @code{typed_ast}
15108include PEP 484 type comments and are independent of the version of Python
15109under which they are run. The @code{typed_ast} parsers produce the standard
15110Python AST (plus type comments), and are both fast and correct, as they are
15111based on the CPython 2.7 and 3.7 parsers.")
15112 ;; See the file "LICENSE" for the details.
15113 (license (list license:psfl
15114 license:asl2.0
15115 license:expat)))) ;ast27/Parser/spark.py
15116
44d10b1f
RW
15117(define-public python-typing
15118 (package
15119 (name "python-typing")
15120 (version "3.6.6")
15121 (source
15122 (origin
15123 (method url-fetch)
15124 (uri (pypi-uri "typing" version))
15125 (sha256
15126 (base32
15127 "0ba9acs4awx15bf9v3nrs781msbd2nx826906nj6fqks2bvca9s0"))))
15128 (build-system python-build-system)
15129 (home-page "https://docs.python.org/3/library/typing.html")
15130 (synopsis "Type hints for Python")
15131 (description "This is a backport of the standard library @code{typing}
15132module to Python versions older than 3.5. Typing defines a standard notation
15133for Python function and variable type annotations. The notation can be used
15134for documenting code in a concise, standard format, and it has been designed
15135to also be used by static and runtime type checkers, static analyzers, IDEs
15136and other tools.")
15137 (license license:psfl)))
15138
15139(define-public python2-typing
15140 (package-with-python2 python-typing))
15141
f89d443b
VC
15142(define-public python-typing-extensions
15143 (package
15144 (name "python-typing-extensions")
15145 (version "3.7.2")
15146 (source
15147 (origin
15148 (method url-fetch)
15149 (uri (pypi-uri "typing_extensions" version))
15150 (sha256
15151 (base32
15152 "0wfsv71pvkyf2na938l579jh0v3kzl6g744ijgnahcwd4d9x0b7v"))))
15153 (build-system python-build-system)
15154 (home-page
15155 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
15156 (synopsis "Experimental type hints for Python")
15157 (description
15158 "The typing_extensions module contains additional @code{typing} hints not
15159yet present in the of the @code{typing} standard library.
15160Included are implementations of:
15161@enumerate
15162@item ClassVar
15163@item ContextManager
15164@item Counter
15165@item DefaultDict
15166@item Deque
15167@item NewType
15168@item NoReturn
15169@item overload
15170@item Protocol
15171@item runtime
15172@item Text
15173@item Type
15174@item TYPE_CHECKING
15175@item AsyncGenerator
15176@end enumerate\n")
15177 (license license:psfl)))
15178
44d10b1f
RW
15179(define-public bpython
15180 (package
15181 (name "bpython")
4de93b2f 15182 (version "0.18")
44d10b1f
RW
15183 (source
15184 (origin
15185 (method url-fetch)
15186 (uri (pypi-uri "bpython" version))
15187 (sha256
4de93b2f 15188 (base32 "1hl6frgvr2lqaxqczl8amg9xih32b3gzv429vs0qrjb8wpdj1k2n"))))
44d10b1f
RW
15189 (build-system python-build-system)
15190 (arguments
15191 `(#:phases
15192 (modify-phases %standard-phases
15193 (add-after 'unpack 'remove-failing-test
15194 (lambda _
15195 ;; Remove failing test. FIXME: make it pass
15196 (delete-file "bpython/test/test_args.py")
15197 #t))
15198 (add-after 'wrap 'add-aliases
15199 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
15200 (lambda* (#:key outputs #:allow-other-keys)
15201 (let ((out (assoc-ref outputs "out")))
15202 (for-each
15203 (lambda (old new)
15204 (symlink old (string-append out "/bin/" new)))
15205 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
15206 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
15207 #t)))))
15208 (propagated-inputs
15209 `(("python-pygments" ,python-pygments)
15210 ("python-requests" ,python-requests)
4de93b2f 15211 ("python-babel" ,python-babel) ; optional, for internationalization
44d10b1f
RW
15212 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
15213 ("python-greenlet" ,python-greenlet)
4de93b2f 15214 ("python-urwid" ,python-urwid) ; for bpython-urwid only
44d10b1f
RW
15215 ("python-six" ,python-six)))
15216 (native-inputs
15217 `(("python-sphinx" ,python-sphinx)
15218 ("python-mock" ,python-mock)))
15219 (home-page "https://bpython-interpreter.org/")
15220 (synopsis "Fancy interface to the Python interpreter")
15221 (description "Bpython is a fancy interface to the Python
15222interpreter. bpython's main features are
15223
15224@enumerate
15225@item in-line syntax highlighting,
15226@item readline-like autocomplete with suggestions displayed as you type,
15227@item expected parameter list for any Python function,
15228@item \"rewind\" function to pop the last line of code from memory and
15229 re-evaluate,
15230@item send the code you've entered off to a pastebin,
15231@item save the code you've entered to a file, and
15232@item auto-indentation.
15233@end enumerate")
15234 (license license:expat)))
15235
15236(define-public bpython2
15237 (let ((base (package-with-python2
15238 (strip-python2-variant bpython))))
15239 (package (inherit base)
15240 (name "bpython2")
15241 (arguments
15242 `(#:python ,python-2
15243 #:phases
15244 (modify-phases %standard-phases
15245 (add-after 'unpack 'remove-failing-test
15246 (lambda _
15247 ;; Remove failing test. FIXME: make it pass
15248 (delete-file "bpython/test/test_args.py")
15249 ;; Disable failing test-cases (renaming inhibits they are
15250 ;; discovered)
15251 (substitute* "bpython/test/test_curtsies_repl.py"
15252 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
15253 (string-append a "xxx_off_" b))
15254 (("^(\\s*def )(test_complex\\W)" _ a b)
15255 (string-append a "xxx_off_" b)))
15256 #t))
15257 (add-before 'build 'rename-scripts
15258 ;; rename the scripts to bypthon2, bpdb2, etc.
15259 (lambda _
15260 (substitute* "setup.py"
15261 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
15262 (string-append name "2" rest "\n"))
15263 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
15264 (string-append name "2" (or sub "") rest "\n")))
15265 #t))))))))
15266
15267(define-public python-pyinotify
15268 (package
15269 (name "python-pyinotify")
15270 (version "0.9.6")
15271 (source (origin
15272 (method url-fetch)
15273 (uri (pypi-uri "pyinotify" version))
15274 (sha256
15275 (base32
15276 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
15277 (build-system python-build-system)
15278 (arguments `(#:tests? #f)) ;no tests
15279 (home-page "https://github.com/seb-m/pyinotify")
15280 (synopsis "Python library for monitoring inotify events")
15281 (description
15282 "@code{pyinotify} provides a Python interface for monitoring
15283file system events on Linux.")
15284 (license license:expat)))
15285
15286(define-public python2-pyinotify
15287 (package-with-python2 python-pyinotify))
15288
15289;; Ada parser uses this version.
15290(define-public python2-quex-0.67.3
15291 (package
15292 (name "python2-quex")
15293 (version "0.67.3")
15294 (source
15295 (origin
15296 (method url-fetch)
15297 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
15298 (version-major+minor version)
15299 "/quex-" version ".zip"))
15300 (sha256
15301 (base32
15302 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
15303 (build-system python-build-system)
15304 (native-inputs
15305 `(("unzip" ,unzip)))
15306 (arguments
15307 `(#:python ,python-2
15308 #:tests? #f
15309 #:phases
15310 (modify-phases %standard-phases
15311 (delete 'configure)
15312 (delete 'build)
15313 (replace 'install
15314 (lambda* (#:key outputs #:allow-other-keys)
15315 (let* ((out (assoc-ref outputs "out"))
15316 (share/quex (string-append out "/share/quex"))
15317 (bin (string-append out "/bin")))
15318 (copy-recursively "." share/quex)
15319 (mkdir-p bin)
15320 (symlink (string-append share/quex "/quex-exe.py")
15321 (string-append bin "/quex"))
15322 #t))))))
15323 (native-search-paths
15324 (list (search-path-specification
15325 (variable "QUEX_PATH")
15326 (files '("share/quex")))))
15327 (home-page "http://quex.sourceforge.net/")
15328 (synopsis "Lexical analyzer generator in Python")
15329 (description "@code{quex} is a lexical analyzer generator in Python.")
15330 (license license:lgpl2.1+))) ; Non-military
15331
15332(define-public python2-quex
15333 (package (inherit python2-quex-0.67.3)
15334 (name "python2-quex")
15335 (version "0.68.1")
15336 (source
15337 (origin
15338 (method url-fetch)
15339 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
15340 (sha256
15341 (base32
15342 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
15343 (file-name (string-append name "-" version ".tar.gz"))))))
15344
15345(define-public python-more-itertools
15346 (package
15347 (name "python-more-itertools")
1b066827 15348 (version "7.1.0")
44d10b1f
RW
15349 (source
15350 (origin
15351 (method url-fetch)
15352 (uri (pypi-uri "more-itertools" version))
15353 (sha256
15354 (base32
1b066827 15355 "16phg2f2dvm6ci5wr49ncha5lmc0m2in3bsl33c61vzca4gkvd4b"))))
44d10b1f 15356 (build-system python-build-system)
44d10b1f
RW
15357 (home-page "https://github.com/erikrose/more-itertools")
15358 (synopsis "More routines for operating on iterables, beyond itertools")
15359 (description "Python's built-in @code{itertools} module implements a
15360number of iterator building blocks inspired by constructs from APL, Haskell,
15361and SML. @code{more-itertools} includes additional building blocks for
15362working with iterables.")
47f66348 15363 (properties `((python2-variant . ,(delay python2-more-itertools))))
44d10b1f
RW
15364 (license license:expat)))
15365
47f66348 15366;; The 5.x series are the last versions supporting Python 2.7.
44d10b1f 15367(define-public python2-more-itertools
47f66348
MB
15368 (package
15369 (inherit python-more-itertools)
15370 (name "python2-more-itertools")
15371 (version "5.0.0")
15372 (source (origin
15373 (method url-fetch)
15374 (uri (pypi-uri "more-itertools" version))
15375 (sha256
15376 (base32
15377 "1r12cm6mcdwdzz7d47a6g4l437xsvapdlgyhqay3i2nrlv03da9q"))))
15378 (arguments
15379 `(#:python ,python2-minimal))
15380 (propagated-inputs
15381 `(("python2-six" ,python2-six-bootstrap)))))
44d10b1f
RW
15382
15383(define-public python-latexcodec
15384 (package
15385 (name "python-latexcodec")
f3415ba5 15386 (version "1.0.7")
44d10b1f
RW
15387 (source
15388 (origin
15389 (method url-fetch)
15390 (uri (pypi-uri "latexcodec" version))
15391 (sha256
f3415ba5 15392 (base32 "0wnp3yqcgx0rpy8dz51vh75lbp2qif67da19zi7m3ca98n887hgb"))))
44d10b1f
RW
15393 (build-system python-build-system)
15394 (inputs
15395 `(("python-six" ,python-six)))
15396 (home-page "https://readthedocs.org/projects/latexcodec/")
15397 (synopsis "Work with LaTeX code in Python")
15398 (description "Lexer and codec to work with LaTeX code in Python.")
15399 (license license:expat)))
15400
15401(define-public python-pybtex
15402 (package
15403 (name "python-pybtex")
9441a9c1 15404 (version "0.22.2")
44d10b1f
RW
15405 (source
15406 (origin
15407 (method url-fetch)
15408 (uri (pypi-uri "pybtex" version))
15409 (sha256
9441a9c1 15410 (base32 "070wfcmxrd7xg1si421mi9150gmx2qwx431nwf69sq3hhmgnx080"))))
44d10b1f
RW
15411 (build-system python-build-system)
15412 (native-inputs
15413 `(("python-nose" ,python-nose)))
15414 (inputs
15415 `(("python-latexcodec" ,python-latexcodec)
15416 ("python-pyyaml" ,python-pyyaml)
15417 ("python-six" ,python-six)))
15418 (arguments
15419 `(#:test-target "nosetests"))
15420 (home-page "https://pybtex.org/")
15421 (synopsis "BibTeX-compatible bibliography processor")
15422 (description "Pybtex is a BibTeX-compatible bibliography processor written
15423in Python. You can simply type pybtex instead of bibtex.")
15424 (license license:expat)))
15425
15426(define-public python-onetimepass
15427 (package
15428 (name "python-onetimepass")
15429 (version "1.0.1")
15430 (source
15431 (origin
15432 (method url-fetch)
15433 (uri (pypi-uri "onetimepass" version))
15434 (sha256
15435 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
15436 (build-system python-build-system)
15437 (propagated-inputs `(("python-six" ,python-six)))
15438 (home-page "https://github.com/tadeck/onetimepass/")
15439 (synopsis "One-time password library")
15440 (description "Python one-time password library for HMAC-based (HOTP) and
15441time-based (TOTP) passwords.")
15442 (license license:expat)))
15443
15444(define-public python-parso
15445 (package
15446 (name "python-parso")
170d5844 15447 (version "0.5.2")
44d10b1f
RW
15448 (source
15449 (origin
15450 (method url-fetch)
15451 (uri (pypi-uri "parso" version))
15452 (sha256
15453 (base32
170d5844 15454 "1qgvrkpma7vylrk047mxxvqd66nwqk978n3ig2w8iz9m3bgjbksm"))))
44d10b1f
RW
15455 (native-inputs
15456 `(("python-pytest" ,python-pytest)))
15457 (build-system python-build-system)
4eb97c25
MC
15458 (arguments
15459 `(#:phases (modify-phases %standard-phases
15460 (replace 'check
15461 (lambda _ (invoke "pytest" "-vv"))))))
44d10b1f
RW
15462 (home-page "https://github.com/davidhalter/parso")
15463 (synopsis "Python Parser")
15464 (description "Parso is a Python parser that supports error recovery and
15465round-trip parsing for different Python versions (in multiple Python versions).
15466Parso is also able to list multiple syntax errors in your Python file.")
15467 (license license:expat)))
15468
15469(define-public python2-parso
15470 (package-with-python2 python-parso))
15471
15472(define-public python-async-generator
15473 (package
15474 (name "python-async-generator")
94fcbf8d 15475 (version "1.10")
44d10b1f
RW
15476 (source
15477 (origin
15478 (method url-fetch)
15479 (uri (pypi-uri "async_generator" version))
15480 (sha256
15481 (base32
94fcbf8d 15482 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
44d10b1f
RW
15483 (build-system python-build-system)
15484 (native-inputs
15485 `(("python-pytest" ,python-pytest)))
15486 (home-page "https://github.com/python-trio/async_generator")
15487 (synopsis "Async generators and context managers for Python 3.5+")
15488 (description "@code{async_generator} back-ports Python 3.6's native async
15489generators and Python 3.7's context managers into Python 3.5.")
15490 ;; Dual licensed.
15491 (license (list license:expat license:asl2.0))))
15492
15493(define-public python-async-timeout
15494 (package
15495 (name "python-async-timeout")
15496 (version "3.0.1")
15497 (source
15498 (origin
15499 (method url-fetch)
15500 (uri (pypi-uri "async-timeout" version))
15501 (sha256
15502 (base32
15503 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
15504 (build-system python-build-system)
15505 (home-page "https://github.com/aio-libs/async_timeout/")
15506 (synopsis "Timeout context manager for asyncio programs")
15507 (description "@code{async-timeout} provides a timeout timeout context
15508manager compatible with @code{asyncio}.")
15509 (license license:asl2.0)))
15510
15511(define-public python-glob2
15512 (package
15513 (name "python-glob2")
4df49d19 15514 (version "0.7")
8fa2bcc7
TGR
15515 (source
15516 (origin
15517 (method git-fetch)
15518 (uri (git-reference
15519 (url "https://github.com/miracle2k/python-glob2.git")
4df49d19 15520 (commit (string-append "v" version))))
8fa2bcc7
TGR
15521 (file-name (git-file-name name version))
15522 (sha256
4df49d19 15523 (base32 "160nh2ay9lw2hi0rixpzb2k87r6ql56k0j2cm87lqz8xc8zbw919"))))
44d10b1f
RW
15524 (build-system python-build-system)
15525 (home-page "https://github.com/miracle2k/python-glob2/")
15526 (synopsis "Extended Version of the python buildin glob module")
15527 (description "This is an extended version of the Python
15528@url{http://docs.python.org/library/glob.html, built-in glob module} which
15529adds:
15530
15531@itemize
15532@item The ability to capture the text matched by glob patterns, and return
15533those matches alongside the file names.
15534@item A recursive @code{**} globbing syntax, akin for example to the
15535@code{globstar} option of Bash.
15536@item The ability to replace the file system functions used, in order to glob
15537on virtual file systems.
15538@item Compatible with Python 2 and Python 3 (tested with 3.3).
15539@end itemize
15540
15541Glob2 currently based on the glob code from Python 3.3.1.")
15542 (license license:bsd-2)))
15543
15544(define-public python2-glob2
15545 (package-with-python2 python-glob2))
15546
15547(define-public python-gipc
15548 (package
15549 (name "python-gipc")
15550 (version "0.6.0")
15551 (source
15552 (origin
15553 (method url-fetch)
15554 (uri (pypi-uri "gipc" version ".zip"))
15555 (sha256
15556 (base32
15557 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
15558 (build-system python-build-system)
15559 (native-inputs
15560 `(("unzip" ,unzip)))
15561 (propagated-inputs
15562 `(("python-gevent" ,python-gevent)))
fd3ae040 15563 (home-page "https://gehrcke.de/gipc/")
44d10b1f
RW
15564 (synopsis "Child process management in the context of gevent")
15565 (description "Usage of Python's multiprocessing package in a
15566gevent-powered application may raise problems. With @code{gipc},
15567process-based child processes can safely be created anywhere within a
15568gevent-powered application.")
15569 (license license:expat)))
15570
15571(define-public python2-gipc
15572 (package-with-python2 python-gipc))
15573
15574(define-public python-fusepy
15575 (package
15576 (name "python-fusepy")
15577 (version "2.0.4")
15578 (source
15579 (origin
15580 (method url-fetch)
15581 (uri (pypi-uri "fusepy" version))
15582 (sha256
15583 (base32
15584 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
15585 (build-system python-build-system)
15586 (arguments
15587 `(#:phases
15588 (modify-phases %standard-phases
15589 (add-before 'build 'set-library-file-name
15590 (lambda* (#:key inputs #:allow-other-keys)
15591 (let ((fuse (assoc-ref inputs "fuse")))
15592 (substitute* "fuse.py"
15593 (("find_library\\('fuse'\\)")
15594 (string-append "'" fuse "/lib/libfuse.so'")))
15595 #t))))))
15596 (propagated-inputs
15597 `(("fuse" ,fuse)))
15598 (home-page "https://github.com/fusepy/fusepy")
15599 (synopsis "Simple ctypes bindings for FUSE")
15600 (description "Python module that provides a simple interface to FUSE and
15601MacFUSE. The binding is created using the standard @code{ctypes} library.")
15602 (license license:isc)))
15603
15604(define-public python2-fusepy
15605 (package-with-python2 python-fusepy))
15606
15607(define-public python2-gdrivefs
15608 (package
15609 (name "python2-gdrivefs")
15610 (version "0.14.9")
15611 (source
15612 (origin
15613 (method url-fetch)
15614 (uri (pypi-uri "gdrivefs" version))
15615 (sha256
15616 (base32
15617 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
15618 (build-system python-build-system)
15619 (arguments
15620 `(#:python ,python-2
15621 #:phases
15622 (modify-phases %standard-phases
15623 (add-before 'build 'patch-setup-py
15624 (lambda _
15625 ;; Update requirements from dependency==version
15626 ;; to dependency>=version
15627 (substitute* "gdrivefs/resources/requirements.txt"
15628 (("==") ">="))
15629 #t)))))
15630 (native-inputs
15631 `(("python2-gipc" ,python2-gipc)
15632 ("python2-gevent" ,python2-gevent)
15633 ("python2-greenlet" ,python2-greenlet)
15634 ("python2-httplib2" ,python2-httplib2)
15635 ("python2-uritemplate" ,python2-uritemplate)
15636 ("python2-oauth2client" ,python2-oauth2client)
15637 ("python2-six" ,python2-six)))
15638 (propagated-inputs
15639 `(("python2-dateutil" ,python2-dateutil)
15640 ("python2-fusepy" ,python2-fusepy)
15641 ("python2-google-api-client" ,python2-google-api-client)))
15642 (home-page "https://github.com/dsoprea/GDriveFS")
15643 (synopsis "Mount Google Drive as a local file system")
15644 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
15645under Python 2.7.")
15646 (license license:gpl2)))
15647
15648(define-public pybind11
15649 (package
15650 (name "pybind11")
0690f324 15651 (version "2.4.3")
44d10b1f
RW
15652 (source (origin
15653 (method git-fetch)
15654 (uri (git-reference
15655 (url "https://github.com/pybind/pybind11.git")
15656 (commit (string-append "v" version))))
15657 (sha256
15658 (base32
0690f324 15659 "0k89w4bsfbpzw963ykg1cyszi3h3nk393qd31m6y46pcfxkqh4rd"))
44d10b1f
RW
15660 (file-name (git-file-name name version))))
15661 (build-system cmake-build-system)
15662 (native-inputs
3cf579e9 15663 `(("python" ,python-wrapper)
ae8db9ce
LC
15664
15665 ;; The following dependencies are used for tests.
15666 ("python-pytest" ,python-pytest)
15667 ("catch" ,catch-framework2-1)
15668 ("eigen" ,eigen)))
44d10b1f 15669 (arguments
ae8db9ce
LC
15670 `(#:configure-flags
15671 (list (string-append "-DCATCH_INCLUDE_DIR="
15672 (assoc-ref %build-inputs "catch")
15673 "/include/catch"))
15674
3cf579e9
LC
15675 #:phases (modify-phases %standard-phases
15676 (add-after 'install 'install-python
15677 (lambda* (#:key outputs #:allow-other-keys)
15678 (let ((out (assoc-ref outputs "out")))
15679 (with-directory-excursion "../source"
15680 (setenv "PYBIND11_USE_CMAKE" "yes")
15681 (invoke "python" "setup.py" "install"
15682 "--single-version-externally-managed"
15683 "--root=/"
15684 (string-append "--prefix=" out)))))))
15685
ae8db9ce 15686 #:test-target "check"))
44d10b1f
RW
15687 (home-page "https://github.com/pybind/pybind11/")
15688 (synopsis "Seamless operability between C++11 and Python")
ab17297a
LC
15689 (description
15690 "@code{pybind11} is a lightweight header-only library that exposes C++
15691types in Python and vice versa, mainly to create Python bindings of existing
15692C++ code. Its goals and syntax are similar to the @code{Boost.Python}
15693library: to minimize boilerplate code in traditional extension modules by
15694inferring type information using compile-time introspection.")
65eada58 15695 (license license:bsd-3)))
44d10b1f
RW
15696
15697(define-public python-fasteners
15698 (package
15699 (name "python-fasteners")
15700 (version "0.14.1")
15701 (source
15702 (origin
15703 (method url-fetch)
15704 (uri (pypi-uri "fasteners" version))
15705 (sha256
15706 (base32
15707 "063y20kx01ihbz2mziapmjxi2cd0dq48jzg587xdsdp07xvpcz22"))))
15708 (build-system python-build-system)
15709 (propagated-inputs
15710 `(("python-monotonic" ,python-monotonic)
15711 ("python-six" ,python-six)
15712 ("python-testtools" ,python-testtools)))
15713 (home-page "https://github.com/harlowja/fasteners")
15714 (synopsis "Python package that provides useful locks")
15715 (description
15716 "This package provides a Python program that provides following locks:
15717
15718@itemize
15719@item Locking decorator
15720@item Reader-writer locks
15721@item Inter-process locks
15722@item Generic helpers
15723@end itemize\n")
15724 (properties `((python2-variant . ,(delay python2-fasteners))))
15725 (license license:asl2.0)))
15726
15727(define-public python2-fasteners
15728 (let ((base (package-with-python2 (strip-python2-variant python-fasteners))))
15729 (package
15730 (inherit base)
15731 (propagated-inputs
15732 `(("python2-futures" ,python2-futures)
15733 ,@(package-propagated-inputs base))))))
15734
15735(define-public python-requests-file
15736 (package
15737 (name "python-requests-file")
15738 (version "1.4.3")
15739 (source
15740 (origin
15741 (method url-fetch)
15742 (uri (pypi-uri "requests-file" version))
15743 (sha256
15744 (base32
15745 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
15746 (build-system python-build-system)
15747 (propagated-inputs
15748 `(("python-requests" ,python-requests)
15749 ("python-six" ,python-six)))
15750 (home-page
15751 "https://github.com/dashea/requests-file")
15752 (synopsis "File transport adapter for Requests")
15753 (description
15754 "Requests-File is a transport adapter for use with the Requests Python
52beae7b 15755library to allow local file system access via @code{file://} URLs.")
44d10b1f
RW
15756 (license license:asl2.0)))
15757
15758(define-public python2-requests-file
15759 (package-with-python2 python-requests-file))
15760
15761(define-public python-tldextract
15762 (package
15763 (name "python-tldextract")
15764 (version "2.2.0")
15765 (source
15766 (origin
15767 (method url-fetch)
15768 (uri (pypi-uri "tldextract" version))
15769 (sha256
15770 (base32
15771 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
15772 (build-system python-build-system)
15773 (native-inputs
15774 `(("python-pytest" ,python-pytest)
15775 ("python-responses" ,python-responses)))
15776 (propagated-inputs
15777 `(("python-idna" ,python-idna)
15778 ("python-requests" ,python-requests)
15779 ("python-requests-file" ,python-requests-file)))
15780 (home-page
15781 "https://github.com/john-kurkowski/tldextract")
15782 (synopsis
15783 "Separate the TLD from the registered domain and subdomains of a URL")
15784 (description
15785 "TLDExtract accurately separates the TLD from the registered domain and
15786subdomains of a URL, using the Public Suffix List. By default, this includes
15787the public ICANN TLDs and their exceptions. It can optionally support the
15788Public Suffix List's private domains as well.")
15789 (license license:bsd-3)))
15790
15791(define-public python2-tldextract
15792 (package-with-python2 python-tldextract))
15793
15794(define-public python-pynamecheap
15795 (package
15796 (name "python-pynamecheap")
15797 (version "0.0.3")
15798 (source
15799 (origin
15800 (method url-fetch)
15801 (uri (pypi-uri "PyNamecheap" version))
15802 (sha256
15803 (base32
15804 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
15805 (build-system python-build-system)
15806 (propagated-inputs
15807 `(("python-requests" ,python-requests)))
15808 (home-page
15809 "https://github.com/Bemmu/PyNamecheap")
15810 (synopsis
15811 "Namecheap API client in Python")
15812 (description
15813 "PyNamecheap is a Namecheap API client in Python.")
15814 (license license:expat)))
15815
15816(define-public python2-pynamecheap
15817 (package-with-python2 python-pynamecheap))
15818
15819(define-public python-dns-lexicon
15820 (package
15821 (name "python-dns-lexicon")
15822 (version "2.4.0")
15823 (source
15824 (origin
15825 (method url-fetch)
15826 (uri (pypi-uri "dns-lexicon" version))
15827 (sha256
15828 (base32
15829 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
15830 (build-system python-build-system)
15831 (arguments
15832 `(#:tests? #f)) ;requires internet access
15833 (propagated-inputs
15834 `(("python-future" ,python-future)
15835 ("python-pynamecheap" ,python-pynamecheap)
15836 ("python-requests" ,python-requests)
15837 ("python-tldextract" ,python-tldextract)
15838 ("python-urllib3" ,python-urllib3)))
15839 (home-page "https://github.com/AnalogJ/lexicon")
15840 (synopsis
15841 "Manipulate DNS records on various DNS providers")
15842 (description
15843 "Lexicon provides a way to manipulate DNS records on multiple DNS
15844providers in a standardized way. It has a CLI but it can also be used as a
15845Python library. It was designed to be used in automation, specifically with
15846Let's Encrypt.")
15847 (license license:expat)))
15848
15849(define-public python2-dns-lexicon
15850 (package-with-python2 python-dns-lexicon))
15851
15852(define-public python-commandlines
15853 (package
15854 (name "python-commandlines")
15855 (version "0.4.1")
15856 (source
15857 (origin
15858 (method url-fetch)
15859 (uri (pypi-uri "commandlines" version))
15860 (sha256
15861 (base32
15862 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
15863 (build-system python-build-system)
15864 (home-page "https://github.com/chrissimpkins/commandlines")
15865 (synopsis "Command line argument to object parsing library")
15866 (description
15867 "@code{Commandlines} is a Python library for command line application
15868development that supports command line argument parsing, command string
15869validation testing and application logic.")
15870 (license license:expat)))
15871
15872;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
15873;; python-numba. They have a very unflexible relationship.
15874(define-public python-numba
15875 (package
15876 (name "python-numba")
65f84096 15877 (version "0.46.0")
44d10b1f
RW
15878 (source
15879 (origin
15880 (method url-fetch)
15881 (uri (pypi-uri "numba" version))
15882 (sha256
15883 (base32
65f84096 15884 "1vnfzcq6fcnkmdms6114d49awvvj5181fl7z1wlha27qc2paxjy2"))))
44d10b1f
RW
15885 (build-system python-build-system)
15886 (arguments
15887 `(#:modules ((guix build utils)
15888 (guix build python-build-system)
15889 (ice-9 ftw)
15890 (srfi srfi-1)
15891 (srfi srfi-26))
15892 #:phases
15893 (modify-phases %standard-phases
15894 (add-after 'unpack 'disable-proprietary-features
15895 (lambda _
15896 (setenv "NUMBA_DISABLE_HSA" "1")
15897 (setenv "NUMBA_DISABLE_CUDA" "1")
15898 #t))
15899 (add-after 'unpack 'remove-failing-tests
15900 (lambda _
65f84096 15901 ;; FIXME: These tests fail for unknown reasons:
44d10b1f
RW
15902 ;; test_non_writable_pycache, test_non_creatable_pycache, and
15903 ;; test_frozen (all in numba.tests.test_dispatcher.TestCache).
15904 (substitute* "numba/tests/test_dispatcher.py"
15905 (("def test(_non_writable_pycache)" _ m)
15906 (string-append "def guix_skip" m))
15907 (("def test(_non_creatable_pycache)" _ m)
15908 (string-append "def guix_skip" m))
15909 (("def test(_frozen)" _ m)
15910 (string-append "def guix_skip" m)))
15911
15912 ;; These tests fail because we don't run the tests from the build
15913 ;; directory: test_setup_py_distutils, test_setup_py_setuptools
65f84096 15914 ;; They are in numba.tests.test_pycc.TestDistutilsSupport.
44d10b1f
RW
15915 (substitute* "numba/tests/test_pycc.py"
15916 (("def test(_setup_py_distutils|_setup_py_setuptools)" _ m)
15917 (string-append "def guix_skip" m)))
65f84096
BG
15918
15919 ;; These tests fail because our version of Python does not have
15920 ;; a recognizable front-end for the Numba distribution to use
15921 ;; to check against.
15922 (substitute* "numba/tests/test_entrypoints.py"
15923 (("def test(_init_entrypoint)" _ m)
15924 (string-append "def guix_skip" m)))
15925 (substitute* "numba/tests/test_jitclasses.py"
15926 (("def test(_jitclass_longlabel_not_truncated)" _ m)
15927 (string-append "def guix_skip" m)))
44d10b1f
RW
15928 #t))
15929 (replace 'check
15930 (lambda _
15931 (let ((cwd (getcwd)))
15932 (setenv "PYTHONPATH"
15933 (string-append cwd "/build/"
15934 (find (cut string-prefix? "lib" <>)
15935 (scandir (string-append cwd "/build")))
15936 ":"
15937 (getenv "PYTHONPATH")))
15938 ;; Something is wrong with the PYTHONPATH when running the
15939 ;; tests from the build directory, as it complains about not being
15940 ;; able to import certain modules.
15941 (with-directory-excursion "/tmp"
15942 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))
15943 #t)))))
15944 (propagated-inputs
15945 `(("python-llvmlite" ,python-llvmlite)
15946 ("python-numpy" ,python-numpy)
15947 ("python-singledispatch" ,python-singledispatch)))
15948 ;; Needed for tests.
15949 (inputs
15950 `(("python-jinja2" ,python-jinja2)
15951 ("python-pygments" ,python-pygments)))
15952 (home-page "https://numba.pydata.org")
15953 (synopsis "Compile Python code using LLVM")
15954 (description "Numba gives you the power to speed up your applications with
15955high performance functions written directly in Python. With a few
15956annotations, array-oriented and math-heavy Python code can be just-in-time
15957compiled to native machine instructions, similar in performance to C, C++ and
15958Fortran, without having to switch languages or Python interpreters.
15959
15960Numba works by generating optimized machine code using the LLVM compiler
15961infrastructure at import time, runtime, or statically (using the included pycc
15962tool).")
15963 (license license:bsd-3)))
15964
241409cd
RW
15965(define-public python-numcodecs
15966 (package
15967 (name "python-numcodecs")
15968 (version "0.6.4")
15969 (source
15970 (origin
15971 (method url-fetch)
15972 (uri (pypi-uri "numcodecs" version))
15973 (sha256
15974 (base32
15975 "0kbfr8pl3x9glsypbq8hzim003f16ml1b1cvgrh4w1sdvgal6j7g"))))
15976 (build-system python-build-system)
15977 (propagated-inputs
15978 `(("python-numpy" ,python-numpy)
15979 ("python-msgpack" ,python-msgpack)))
15980 (native-inputs
15981 `(("python-pytest" ,python-pytest)
15982 ("python-setuptools-scm" ,python-setuptools-scm)))
15983 (home-page "https://github.com/zarr-developers/numcodecs")
15984 (synopsis "Buffer compression and transformation codecs")
15985 (description
15986 "This Python package provides buffer compression and transformation
15987codecs for use in data storage and communication applications.")
15988 (license license:expat)))
15989
8e04b233
RW
15990(define-public python-asciitree
15991 (package
15992 (name "python-asciitree")
15993 (version "0.3.3")
15994 (source
15995 (origin
15996 (method url-fetch)
15997 (uri (pypi-uri "asciitree" version))
15998 (sha256
15999 (base32
16000 "0vhgri2m2xlnibhz4xwn4hpbc7xacisxjqrk6k5kyppq96vbk92a"))))
16001 (build-system python-build-system)
16002 (home-page "https://github.com/mbr/asciitree")
16003 (synopsis "Draws ASCII trees")
16004 (description "This package draws tree structures using characters.")
16005 (license license:expat)))
16006
7032c1cc
RW
16007(define-public python-zarr
16008 (package
16009 (name "python-zarr")
16010 (version "2.4.0")
16011 (source
16012 (origin
16013 (method url-fetch)
16014 (uri (pypi-uri "zarr" version))
16015 (sha256
16016 (base32
16017 "026n3sjzjv2gmwx6y72b8ij0hk42bc8zdbvfj5gdqzd4i6wj3ajk"))))
16018 (build-system python-build-system)
16019 (arguments
16020 `(#:phases
16021 (modify-phases %standard-phases
16022 (add-after 'unpack 'disable-service-tests
16023 (lambda _
16024 (setenv "ZARR_TEST_ABS" "0")
16025 (setenv "ZARR_TEST_MONGO" "0")
16026 (setenv "ZARR_TEST_REDIS" "0")
16027 #t))
16028 (replace 'check
16029 (lambda _
16030 (invoke "pytest" "-vv" "-k" "not lmdb")
16031 #t)))))
16032 (propagated-inputs
16033 `(("python-asciitree" ,python-asciitree)
16034 ("python-fasteners" ,python-fasteners)
16035 ("python-numcodecs" ,python-numcodecs)
16036 ("python-numpy" ,python-numpy)))
16037 (native-inputs
16038 `(("python-pytest" ,python-pytest)
16039 ("python-setuptools-scm" ,python-setuptools-scm)))
16040 (home-page "https://github.com/zarr-developers/zarr-python")
16041 (synopsis "Chunked, compressed, N-dimensional arrays for Python")
16042 (description
16043 "This package provides an implementation of chunked, compressed,
16044N-dimensional arrays for Python.")
16045 (license license:expat)))
16046
44d10b1f
RW
16047(define-public python-anndata
16048 (package
16049 (name "python-anndata")
a098b349 16050 (version "0.7.1")
44d10b1f
RW
16051 (source
16052 (origin
16053 (method url-fetch)
16054 (uri (pypi-uri "anndata" version))
16055 (sha256
16056 (base32
a098b349 16057 "0rnfbpr55j1a1bi2kd4mz444741hrn74kz90h5rnjr59jmpfnh09"))))
44d10b1f 16058 (build-system python-build-system)
a098b349
RW
16059 (arguments
16060 `(#:phases
16061 (modify-phases %standard-phases
16062 (add-after 'unpack 'delete-inconvenient-tests
16063 (lambda _
16064 ;; This test depends on python-scikit-learn.
16065 (delete-file "anndata/tests/test_inplace_subset.py")
16066 #t))
16067 (delete 'check)
16068 (add-after 'install 'check
16069 (lambda* (#:key inputs outputs #:allow-other-keys)
16070 (add-installed-pythonpath inputs outputs)
16071 (invoke "pytest" "-vv"))))))
44d10b1f
RW
16072 (propagated-inputs
16073 `(("python-h5py" ,python-h5py)
a098b349 16074 ("python-importlib-metadata" ,python-importlib-metadata)
44d10b1f 16075 ("python-natsort" ,python-natsort)
a098b349
RW
16076 ("python-numcodecs" ,python-numcodecs)
16077 ("python-packaging" ,python-packaging)
44d10b1f 16078 ("python-pandas" ,python-pandas)
a098b349
RW
16079 ("python-scipy" ,python-scipy)
16080 ("python-zarr" ,python-zarr)))
16081 (native-inputs
16082 `(("python-joblib" ,python-joblib)
16083 ("python-pytest" ,python-pytest)
16084 ("python-setuptools-scm" ,python-setuptools-scm)))
44d10b1f
RW
16085 (home-page "https://github.com/theislab/anndata")
16086 (synopsis "Annotated data for data analysis pipelines")
16087 (description "Anndata is a package for simple (functional) high-level APIs
16088for data analysis pipelines. In this context, it provides an efficient,
16089scalable way of keeping track of data together with learned annotations and
16090reduces the code overhead typically encountered when using a mostly
16091object-oriented library such as @code{scikit-learn}.")
16092 (license license:bsd-3)))
16093
16094(define-public python-dill
16095 (package
16096 (name "python-dill")
32be3577 16097 (version "0.3.1.1")
44d10b1f
RW
16098 (source
16099 (origin
16100 (method url-fetch)
16101 (uri (pypi-uri "dill" version))
16102 (sha256
32be3577 16103 (base32 "1704g8z70d210ksgbccs2v545v9w0wc6lx15m296alb7jf0yzn22"))))
44d10b1f 16104 (build-system python-build-system)
32be3577
MIP
16105 (arguments
16106 `(#:phases
16107 (modify-phases %standard-phases
16108 (replace 'check
16109 (lambda _
16110 (with-directory-excursion "/tmp"
16111 (invoke "nosetests" "-v"))
16112 #t)))))
16113 (native-inputs
16114 `(("python-nose" ,python-nose)))
16115 (home-page "https://pypi.org/project/dill/")
44d10b1f
RW
16116 (synopsis "Serialize all of Python")
16117 (description "Dill extends Python's @code{pickle} module for serializing
16118and de-serializing Python objects to the majority of the built-in Python
16119types. Dill provides the user the same interface as the @code{pickle} module,
16120and also includes some additional features. In addition to pickling Python
16121objects, @code{dill} provides the ability to save the state of an interpreter
61985d65 16122session in a single command. Hence, it would be feasible to save a
44d10b1f
RW
16123interpreter session, close the interpreter, ship the pickled file to another
16124computer, open a new interpreter, unpickle the session and thus continue from
16125the saved state of the original interpreter session.")
16126 (license license:bsd-3)))
16127
16128(define-public python-multiprocess
16129 (package
16130 (name "python-multiprocess")
fcc4e9e7 16131 (version "0.70.9")
44d10b1f
RW
16132 (source
16133 (origin
16134 (method url-fetch)
16135 (uri (pypi-uri "multiprocess" version))
16136 (sha256
16137 (base32
fcc4e9e7 16138 "1r882nvd44xqwbrclwqx5rhs80l6809rcvpc7pkpgnij06cvvmcz"))))
44d10b1f 16139 (build-system python-build-system)
fcc4e9e7
MIP
16140 (arguments
16141 `(#:phases
16142 (modify-phases %standard-phases
16143 (add-after 'unpack 'disable-broken-tests
16144 (lambda _
16145 ;; This test is broken as there is no keyboard interrupt.
16146 (substitute* "py3.7/multiprocess/tests/__init__.py"
16147 (("^(.*)def test_wait_result"
16148 line indent)
16149 (string-append indent
16150 "@unittest.skip(\"Disabled by Guix\")\n"
16151 line)))
16152 #t))
16153 ;; Tests must be run after installation.
16154 (delete 'check)
16155 (add-after 'install 'check
16156 (lambda* (#:key inputs outputs #:allow-other-keys)
16157 (add-installed-pythonpath inputs outputs)
16158 (invoke "python" "-m" "multiprocess.tests")
16159 #t)))))
44d10b1f
RW
16160 (propagated-inputs
16161 `(("python-dill" ,python-dill)))
fcc4e9e7 16162 (home-page "https://pypi.org/project/multiprocess/")
44d10b1f
RW
16163 (synopsis "Multiprocessing and multithreading in Python")
16164 (description
16165 "This package is a fork of the multiprocessing Python package, a package
16166which supports the spawning of processes using the API of the standard
16167library's @code{threading} module.")
16168 (license license:bsd-3)))
16169
16170(define-public python-toolz
16171 (package
16172 (name "python-toolz")
16173 (version "0.9.0")
16174 (source
16175 (origin
16176 (method url-fetch)
16177 (uri (pypi-uri "toolz" version))
16178 (sha256
16179 (base32
16180 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
16181 (build-system python-build-system)
16182 ;; FIXME: tests cannot be computed: "Can't perform this operation for
16183 ;; unregistered loader type"
16184 (arguments '(#:tests? #f))
16185 (home-page "https://github.com/pytoolz/toolz/")
16186 (synopsis "List processing tools and functional utilities")
16187 (description
16188 "This package provides a set of utility functions for iterators,
16189functions, and dictionaries.")
16190 (license license:bsd-3)))
16191
16192(define-public python2-toolz
16193 (package-with-python2 python-toolz))
16194
16195(define-public python-cytoolz
16196 (package
16197 (name "python-cytoolz")
16198 (version "0.9.0.1")
16199 (source
16200 (origin
16201 (method url-fetch)
16202 (uri (pypi-uri "cytoolz" version))
16203 (sha256
16204 (base32
16205 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
16206 (build-system python-build-system)
16207 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
16208 ;; 'exceptions'"
16209 (arguments '(#:tests? #f))
16210 (propagated-inputs
16211 `(("python-toolz" ,python-toolz)))
16212 (native-inputs
16213 `(("python-cython" ,python-cython)))
16214 (home-page "https://github.com/pytoolz/cytoolz")
16215 (synopsis "High performance functional utilities")
16216 (description
16217 "The cytoolz package implements the same API as provided by toolz. The
16218main differences are that @code{cytoolz} is faster and cytoolz offers a C API
16219that is accessible to other projects developed in Cython.")
16220 (license license:bsd-3)))
16221
16222(define-public python-sortedcontainers
16223 (package
16224 (name "python-sortedcontainers")
b244f166 16225 (version "2.1.0")
44d10b1f
RW
16226 (source
16227 (origin
16228 (method url-fetch)
16229 (uri (pypi-uri "sortedcontainers" version))
16230 (sha256
16231 (base32
b244f166 16232 "0fm0w5id2yhqld95hg2m636vjgkz377rvgdfqaxc25vbylr9lklp"))))
44d10b1f
RW
16233 (build-system python-build-system)
16234 (native-inputs
16235 `(("python-tox" ,python-tox)))
16236 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
16237 (synopsis "Sorted List, Sorted Dict, Sorted Set")
16238 (description
16239 "This package provides a sorted collections library, written in
16240pure-Python.")
16241 (license license:asl2.0)))
16242
16243(define-public python-cloudpickle
16244 (package
16245 (name "python-cloudpickle")
16246 (version "0.6.1")
16247 (source
16248 (origin
16249 (method url-fetch)
16250 (uri (pypi-uri "cloudpickle" version))
16251 (sha256
16252 (base32
16253 "1wdw89mlm7fqa3fm3ymskx05jrys66n8m1z1a8s0mss0799ahsgi"))))
16254 (build-system python-build-system)
16255 ;; FIXME: there are 5 errors in 122 tests:
16256 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.CloudPickleTest)
16257 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.CloudPickleTest)
16258 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.Protocol2CloudPickleTest)
16259 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.Protocol2CloudPickleTest)
16260 ;; ERROR: test_temp_file (tests.cloudpickle_file_test.CloudPickleFileTests)
16261 ;; TypeError: cannot serialize '_io.BufferedRandom' object
16262 (arguments '(#:tests? #f))
16263 (native-inputs
16264 `(("python-pytest" ,python-pytest)
16265 ("python-mock" ,python-mock)
16266 ("python-tornado" ,python-tornado)))
16267 (home-page "https://github.com/cloudpipe/cloudpickle")
16268 (synopsis "Extended pickling support for Python objects")
16269 (description
16270 "Cloudpickle makes it possible to serialize Python constructs not
16271supported by the default pickle module from the Python standard library. It
16272is especially useful for cluster computing where Python expressions are
16273shipped over the network to execute on remote hosts, possibly close to the
16274data.")
16275 (license license:bsd-3)))
16276
16277(define-public python2-cloudpickle
16278 (package-with-python2 python-cloudpickle))
16279
16280(define-public python-locket
16281 (package
16282 (name "python-locket")
16283 (version "0.2.0")
16284 (source
16285 (origin
16286 (method url-fetch)
16287 (uri (pypi-uri "locket" version))
16288 (sha256
16289 (base32
16290 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
16291 (build-system python-build-system)
16292 (home-page "https://github.com/mwilliamson/locket.py")
16293 (synopsis "File-based locks for Python")
16294 (description
16295 "Locket implements a lock that can be used by multiple processes provided
16296they use the same path.")
16297 (license license:bsd-2)))
16298
16299(define-public python2-locket
16300 (package-with-python2 python-locket))
16301
16302(define-public python-blosc
16303 (package
16304 (name "python-blosc")
16305 (version "1.5.1")
16306 (source
16307 (origin
16308 (method url-fetch)
16309 (uri (pypi-uri "blosc" version))
16310 (sha256
16311 (base32
16312 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
16313 (build-system python-build-system)
16314 ;; FIXME: all tests pass, but then this error is printed:
16315 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
16316 (arguments '(#:tests? #f))
16317 (propagated-inputs
16318 `(("python-numpy" ,python-numpy)))
16319 (home-page "https://github.com/blosc/python-blosc")
16320 (synopsis "Python wrapper for the Blosc data compressor library")
16321 (description "Blosc is a high performance compressor optimized for binary
16322data. It has been designed to transmit data to the processor cache faster
16323than the traditional, non-compressed, direct memory fetch approach via a
16324@code{memcpy()} system call.
16325
16326Blosc works well for compressing numerical arrays that contains data with
16327relatively low entropy, like sparse data, time series, grids with
16328regular-spaced values, etc.
16329
16330This Python package wraps the Blosc library.")
16331 (license license:bsd-3)))
16332
16333(define-public python2-blosc
16334 (package-with-python2 python-blosc))
16335
16336(define-public python-partd
16337 (package
16338 (name "python-partd")
16339 (version "0.3.9")
16340 (source
16341 (origin
16342 (method url-fetch)
16343 (uri (pypi-uri "partd" version))
16344 (sha256
16345 (base32
16346 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
16347 (build-system python-build-system)
16348 (propagated-inputs
16349 `(("python-blosc" ,python-blosc)
16350 ("python-locket" ,python-locket)
16351 ("python-numpy" ,python-numpy)
16352 ("python-pandas" ,python-pandas)
16353 ("python-pyzmq" ,python-pyzmq)
16354 ("python-toolz" ,python-toolz)))
16355 (home-page "https://github.com/dask/partd/")
16356 (synopsis "Appendable key-value storage")
16357 (description "Partd stores key-value pairs. Values are raw bytes. We
16358append on old values. Partd excels at shuffling operations.")
16359 (license license:bsd-3)))
16360
16361(define-public python2-partd
16362 (package-with-python2 python-partd))
16363
c70a0191
RW
16364(define-public python-fsspec
16365 (package
16366 (name "python-fsspec")
16367 (version "0.6.1")
16368 (source
16369 (origin
16370 (method url-fetch)
16371 (uri (pypi-uri "fsspec" version))
16372 (sha256
16373 (base32
16374 "1g9ba8v04s1nrh7pvzfm2md7ivl2mrz3hcq3y9d1a44gd62h17zj"))))
16375 (build-system python-build-system)
16376 (arguments '(#:tests? #f)) ; there are none
16377 (home-page "https://github.com/intake/filesystem_spec")
16378 (synopsis "File-system specification")
16379 (description "The purpose of this package is to produce a template or
16380specification for a file-system interface, that specific implementations
16381should follow, so that applications making use of them can rely on a common
16382behavior and not have to worry about the specific internal implementation
16383decisions with any given backend.")
16384 (license license:bsd-3)))
16385
44d10b1f
RW
16386(define-public python-dask
16387 (package
16388 (name "python-dask")
86c7ca07 16389 (version "2.9.0")
44d10b1f
RW
16390 (source
16391 (origin
16392 (method url-fetch)
16393 (uri (pypi-uri "dask" version))
16394 (sha256
86c7ca07 16395 (base32 "1w1hqr8vyx6ygwflj2737dcy0mmgvrc0s602gnny8pzlcbs9m76b"))))
44d10b1f 16396 (build-system python-build-system)
44d10b1f
RW
16397 (arguments
16398 `(#:phases
16399 (modify-phases %standard-phases
86c7ca07 16400 (add-after 'unpack 'disable-broken-tests
44d10b1f 16401 (lambda _
86c7ca07 16402 ;; This test is marked as xfail when pytest-xdist is used.
44d10b1f
RW
16403 (substitute* "dask/tests/test_threaded.py"
16404 (("def test_interrupt\\(\\)" m)
16405 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
16406 m)))
86c7ca07
RW
16407 ;; This one fails with a type error:
16408 ;; TypeError: Already tz-aware, use tz_convert to convert.
16409 (substitute* "dask/dataframe/tests/test_shuffle.py"
16410 (("def test_set_index_timestamp\\(\\)" m)
16411 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
16412 m)))
44d10b1f
RW
16413 #t))
16414 (replace 'check
16415 (lambda _ (invoke "pytest" "-vv"))))))
16416 (propagated-inputs
16417 `(("python-cloudpickle" ,python-cloudpickle)
86c7ca07 16418 ("python-fsspec" ,python-fsspec)
44d10b1f 16419 ("python-numpy" ,python-numpy)
86c7ca07 16420 ("python-packaging" ,python-packaging)
44d10b1f
RW
16421 ("python-pandas" ,python-pandas)
16422 ("python-partd" ,python-partd)
16423 ("python-toolz" ,python-toolz)
16424 ("python-pyyaml" ,python-pyyaml)))
16425 (native-inputs
16426 `(("python-pytest" ,python-pytest)
16427 ("python-pytest-runner" ,python-pytest-runner)))
16428 (home-page "https://github.com/dask/dask/")
16429 (synopsis "Parallel computing with task scheduling")
16430 (description
16431 "Dask is a flexible parallel computing library for analytics. It
16432consists of two components: dynamic task scheduling optimized for computation,
16433and large data collections like parallel arrays, dataframes, and lists that
16434extend common interfaces like NumPy, Pandas, or Python iterators to
16435larger-than-memory or distributed environments. These parallel collections
16436run on top of the dynamic task schedulers. ")
16437 (license license:bsd-3)))
16438
44d10b1f
RW
16439(define-public python-ilinkedlist
16440 (package
16441 (name "python-ilinkedlist")
16442 (version "0.4.0")
16443 (source
16444 (origin
16445 (method url-fetch)
16446 (uri (pypi-uri "ilinkedlist" version))
16447 (sha256
16448 (base32
16449 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
16450 (build-system python-build-system)
16451 (native-inputs `(("python-pytest" ,python-pytest)))
16452 (inputs `(("python" ,python)))
16453 (home-page "https://github.com/luther9/ilinkedlist-py")
16454 (synopsis "Immutable linked list library")
16455 (description
16456 "This is a implementation of immutable linked lists for Python. It
16457contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
16458Since a linked list is treated as immutable, it is hashable, and its length
16459can be retrieved in constant time. Some of the terminology is inspired by
16460LISP. It is possible to create an improper list by creating a @code{Pair}
16461with a non-list @code{cdr}.")
16462 (license license:gpl3+)))
16463
16464(define-public python-readlike
16465 (package
16466 (name "python-readlike")
16467 (version "0.1.3")
16468 (source
16469 (origin
16470 (method url-fetch)
16471 (uri (pypi-uri "readlike" version))
16472 (sha256
16473 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
16474 (build-system python-build-system)
16475 (home-page "https://github.com/jangler/readlike")
16476 (synopsis "GNU Readline-like line editing module")
16477 (description
16478 "This Python module provides line editing functions similar to the default
16479Emacs-style ones of GNU Readline. Unlike the Python standard library's
16480@code{readline} package, this one allows access to those capabilties in settings
16481outside of a standard command-line interface. It is especially well-suited to
16482interfacing with Urwid, due to a shared syntax for describing key inputs.
16483
16484Currently, all stateless Readline commands are implemented. Yanking and history
16485are not supported.")
16486 (license license:expat)))
16487
16488(define-public python2-readlike
16489 (package-with-python2 python-readlike))
16490
16491(define-public python-reparser
16492 (package
16493 (name "python-reparser")
16494 (version "1.4.3")
16495 (source
16496 (origin
16497 (method url-fetch)
16498 (uri (pypi-uri "ReParser" version))
16499 (sha256
16500 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
16501 (build-system python-build-system)
16502 (home-page "https://github.com/xmikos/reparser")
16503 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
16504 (description
16505 "This Python library provides a simple lexer/parser for inline markup based
16506on regular expressions.")
16507 (license license:expat)))
16508
16509(define-public python2-reparser
16510 (let ((reparser (package-with-python2
16511 (strip-python2-variant python-reparser))))
16512 (package (inherit reparser)
16513 (propagated-inputs
16514 `(("python2-enum34" ,python2-enum34)
16515 ,@(package-propagated-inputs reparser))))))
16516
16517(define-public python-precis-i18n
16518 (package
16519 (name "python-precis-i18n")
16520 (version "1.0.0")
16521 (source
16522 (origin
16523 (method url-fetch)
16524 (uri (pypi-uri "precis_i18n" version))
16525 (sha256
16526 (base32
16527 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
16528 (build-system python-build-system)
16529 (home-page "https://github.com/byllyfish/precis_i18n")
16530 (synopsis "Implementation of the PRECIS framework")
16531 (description
16532 "This module implements the PRECIS Framework as described in RFC 8264,
16533RFC 8265 and RFC 8266.")
16534 (license license:expat)))
16535
d0446c4b
RW
16536(define-public python-absl-py
16537 (package
16538 (name "python-absl-py")
16539 (version "0.6.1")
16540 (source
16541 (origin
16542 (method url-fetch)
16543 (uri (pypi-uri "absl-py" version))
16544 (sha256
16545 (base32
16546 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
16547 (build-system python-build-system)
16548 (propagated-inputs
16549 `(("python-six" ,python-six)))
16550 (home-page "https://github.com/abseil/abseil-py")
16551 (synopsis "Abseil Python common libraries")
16552 (description
16553 "This package provides the Abseil Python Common Libraries, a collection
16554of Python libraries for building Python applications.")
16555 (license license:asl2.0)))
16556
81bed4e9
RW
16557(define-public python-astor
16558 (package
16559 (name "python-astor")
16560 (version "0.7.1")
16561 (source
16562 (origin
16563 (method url-fetch)
16564 (uri (pypi-uri "astor" version))
16565 (sha256
16566 (base32
16567 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
16568 (build-system python-build-system)
16569 ;; FIXME: There are two errors and two test failures.
16570 (arguments `(#:tests? #f))
16571 (home-page "https://github.com/berkerpeksag/astor")
39ee82ff 16572 (synopsis "Read and write Python ASTs")
81bed4e9 16573 (description "Astor is designed to allow easy manipulation of Python
39ee82ff 16574source via the Abstract Syntax Tree.")
81bed4e9
RW
16575 (license license:bsd-3)))
16576
39ee82ff
RW
16577(define-public python2-astor
16578 (package-with-python2 python-astor))
16579
22e623ae
RW
16580(define-public python-grpcio
16581 (package
16582 (name "python-grpcio")
16583 (version "1.17.1")
16584 (source
16585 (origin
16586 (method url-fetch)
16587 (uri (pypi-uri "grpcio" version))
16588 (sha256
16589 (base32
16590 "0qb9y6j83nxa6d4kc60i8yfgdm7a8ms7b54kncjzf5y7nsxp8rzx"))))
16591 (build-system python-build-system)
16592 (propagated-inputs
16593 `(("python-six" ,python-six)))
16594 (home-page "https://grpc.io")
16595 (synopsis "HTTP/2-based RPC framework")
16596 (description "This package provides a Python library for communicating
16597with the HTTP/2-based RPC framework gRPC.")
16598 (license license:asl2.0)))
16599
79869f80
RW
16600(define-public python-astunparse
16601 (package
16602 (name "python-astunparse")
47d79541 16603 (version "1.6.2")
79869f80
RW
16604 (source
16605 (origin
16606 (method url-fetch)
16607 (uri (pypi-uri "astunparse" version))
16608 (sha256
47d79541 16609 (base32 "0rzbc44xcvzjhhiy7wac96mgal5mcjz1mfq8rmvgswskf4kf9cys"))))
79869f80 16610 (build-system python-build-system)
47d79541 16611 (arguments '(#:tests? #f)) ; there are none
79869f80
RW
16612 (propagated-inputs
16613 `(("python-six" ,python-six)
16614 ("python-wheel" ,python-wheel)))
16615 (home-page "https://github.com/simonpercivall/astunparse")
16616 (synopsis "AST unparser for Python")
16617 (description "This package provides an AST unparser for Python. It is a
16618factored out version of @code{unparse} found in the Python source
16619distribution.")
16620 (license license:bsd-3)))
16621
2884aac0
RW
16622(define-public python-gast
16623 (package
16624 (name "python-gast")
bd300261 16625 (version "0.2.2")
2884aac0
RW
16626 (source
16627 (origin
16628 (method url-fetch)
16629 (uri (pypi-uri "gast" version))
16630 (sha256
bd300261 16631 (base32 "1w5dzdb3gpcfmd2s0b93d8gff40a1s41rv31458z14inb3s9v4zy"))))
2884aac0
RW
16632 (build-system python-build-system)
16633 (propagated-inputs
16634 `(("python-astunparse" ,python-astunparse)))
16635 (home-page "https://pypi.org/project/gast/")
16636 (synopsis "Generic Python AST that abstracts the underlying Python version")
16637 (description
16638 "GAST provides a compatibility layer between the AST of various Python
16639versions, as produced by @code{ast.parse} from the standard @code{ast}
16640module.")
16641 (license license:bsd-3)))
16642
44d10b1f
RW
16643(define-public python-wikidata
16644 (package
16645 (name "python-wikidata")
16646 (version "0.6.1")
16647 (source
16648 (origin
16649 (method url-fetch)
16650 (uri (pypi-uri "Wikidata" version))
16651 (sha256
16652 (base32
16653 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
16654 (build-system python-build-system)
16655 (propagated-inputs
16656 `(("python-babel" ,python-babel)))
16657 (home-page "https://github.com/dahlia/wikidata")
16658 (synopsis "Wikidata client library")
16659 (description
16660 "This package provides a Python interface to
16661@url{https://www.wikidata.org/, Wikidata}.")
16662 (properties '((upstream-name . "Wikidata")))
16663 (license license:gpl3+)))
16664
16665(define-public python-doctest-ignore-unicode
16666 (package
16667 (name "python-doctest-ignore-unicode")
16668 (version "0.1.2")
16669 (source
16670 (origin
16671 (method url-fetch)
16672 (uri (pypi-uri "doctest-ignore-unicode" version))
16673 (sha256
16674 (base32
16675 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
16676 (build-system python-build-system)
16677 (native-inputs
16678 `(("python-nose" ,python-nose)))
16679 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
16680 (synopsis "Ignore Unicode literal prefixes in doctests")
16681 (description
16682 "This package adds support for a flag to ignore Unicode literal prefixes
16683in doctests.")
16684 (license license:asl2.0)))
16685
16686(define-public python-attr
16687 (package
16688 (name "python-attr")
16689 (version "0.3.1")
16690 (source
16691 (origin
16692 (method url-fetch)
16693 (uri (pypi-uri "attr" version))
16694 (sha256
16695 (base32
16696 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
16697 (build-system python-build-system)
16698 (home-page "https://github.com/denis-ryzhkov/attr")
16699 (synopsis "Decorator for attributes of target function or class")
16700 (description "Simple decorator to set attributes of target function or
16701class in a @acronym{DRY, Don't Repeat Yourself} way.")
16702 (license license:expat)))
f98232a3
VC
16703
16704(define-public python-construct
16705 (package
16706 (name "python-construct")
d854ab15 16707 (version "2.10.56")
f98232a3
VC
16708 (source
16709 (origin
16710 (method url-fetch)
16711 (uri (pypi-uri "construct" version))
16712 (sha256
16713 (base32
d854ab15 16714 "0q86jjzsvy835h3c8pjj4619vbp7ihfg8njmyw86ym4qrpni7flp"))))
f98232a3
VC
16715 (build-system python-build-system)
16716 (arguments
16717 `(#:tests? #f)) ; No tests exist.
16718 (propagated-inputs
16719 `(("python-extras" ,python-extras)
16720 ("python-arrow" ,python-arrow)
16721 ("python-numpy" ,python-numpy)
16722 ("python-ruamel.yaml" ,python-ruamel.yaml)))
aabc8954 16723 (home-page "https://construct.readthedocs.io")
f98232a3
VC
16724 (synopsis "Declarative and symmetrical parser and builder for binary data")
16725 (description
16726 "This package provides both simple, atomic constructs (such as
16727integers of various sizes), as well as composite ones which allow you
16728form hierarchical and sequential structures of increasing complexity.
16729It features bit and byte granularity, easy debugging and testing, an
16730easy-to-extend subclass system, and lots of primitive constructs to
16731make your work easier.")
16732 (license license:expat)))
b742c006
LF
16733
16734(define-public python-humanize
16735 (package
16736 (name "python-humanize")
16737 (version "0.5.1")
16738 (source
16739 (origin
16740 (method url-fetch)
16741 (uri (pypi-uri "humanize" version))
16742 (sha256
16743 (base32
16744 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
16745 (arguments
16746 '(#:tests? #f)) ; tests not in pypi archive
16747 (build-system python-build-system)
16748 (home-page "https://github.com/jmoiron/humanize")
16749 (synopsis "Print numerical information in a human-readable form")
16750 (description "This package provides a Python module that displays numbers
16751and dates in \"human readable\" forms. For example, it would display
16752\"12345591313\" as \"12.3 billion\".")
16753 (license license:expat)))
d5bbf66d
LF
16754
16755(define-public python-txaio
16756 (package
16757 (name "python-txaio")
16758 (version "18.8.1")
16759 (source
16760 (origin
16761 (method url-fetch)
16762 (uri (pypi-uri "txaio" version))
16763 (sha256
16764 (base32
16765 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
16766 (build-system python-build-system)
16767 (propagated-inputs
16768 `(("python-twisted" ,python-twisted)
16769 ("python-six" ,python-six)))
16770 (home-page "https://github.com/crossbario/txaio")
16771 (synopsis "Compatibility layer between Python asyncio and Twisted")
16772 (description "Txaio provides a compatibility layer between the Python
16773@code{asyncio} module and @code{Twisted}.")
16774 (license license:expat)))
963dfd3a
RW
16775
16776(define-public python-toolshed
16777 (package
16778 (name "python-toolshed")
16779 (version "0.4.6")
16780 (source
16781 (origin
16782 (method url-fetch)
16783 (uri (pypi-uri "toolshed" version))
16784 (sha256
16785 (base32
16786 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
16787 (build-system python-build-system)
16788 (native-inputs
16789 `(("python-nose" ,python-nose)))
16790 (home-page "https://github.com/brentp/toolshed/")
16791 (synopsis "Collection of modules and functions for working with data")
16792 (description "This is a collection of well-tested, simple modules and
16793functions that aim to reduce boilerplate when working with data.")
16794 (license license:bsd-2)))
c91ecf2d
RW
16795
16796(define-public python-annoy
16797 (package
16798 (name "python-annoy")
16799 (version "1.15.1")
16800 (source
16801 (origin
16802 (method url-fetch)
16803 (uri (pypi-uri "annoy" version))
16804 (sha256
16805 (base32
16806 "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp"))))
16807 (build-system python-build-system)
16808 (native-inputs
16809 `(("python-nose" ,python-nose)))
16810 (home-page "https://github.com/spotify/annoy/")
16811 (synopsis "Approximate nearest neighbors library")
16812 (description
16813 "Annoy is a C++ library with Python bindings to search for points in
16814space that are close to a given query point. It also creates large read-only
16815file-based data structures that are @code{mmap}ped into memory so that many
16816processes may share the same data.")
16817 (license license:asl2.0)))
412342d1 16818
79bfa422 16819(define-public python-pylzma
412342d1 16820 (package
79bfa422
DM
16821 (name "python-pylzma")
16822 (version "0.5.0")
16823 (source
16824 (origin
16825 (method url-fetch)
16826 (uri (pypi-uri "pylzma" version))
16827 (sha256
16828 (base32
16829 "074anvhyjgsv2iby2ql1ixfvjgmhnvcwjbdz8gk70xzkzcm1fx5q"))))
412342d1 16830 (build-system python-build-system)
79bfa422
DM
16831 (home-page "http://www.joachim-bauch.de/projects/pylzma/")
16832 (synopsis "Python bindings for the LZMA library by Igor Pavlov.")
16833 (description "This package provides Python bindings for the LZMA library
16834by Igor Pavlov.")
16835 (license license:lgpl2.1+)))
16836
16837(define-public python2-pylzma
16838 (package-with-python2 python-pylzma))
f825e605 16839
6609ebe7
AG
16840(define-public python2-zeroconf
16841 (package
16842 (name "python2-zeroconf")
16843
16844 ;; This is the last version that supports Python 2.x.
16845 (version "0.19.1")
16846 (source
16847 (origin
16848 (method url-fetch)
16849 (uri (pypi-uri "zeroconf" version))
16850 (sha256
16851 (base32
16852 "0ykzg730n915qbrq9bn5pn06bv6rb5zawal4sqjyfnjjm66snkj3"))))
16853 (build-system python-build-system)
16854 (arguments
16855 `(#:python ,python-2
16856 #:phases
16857 (modify-phases %standard-phases
16858 (add-after 'unpack 'patch-requires
16859 (lambda* (#:key inputs #:allow-other-keys)
16860 (substitute* "setup.py"
16861 (("enum-compat")
16862 "enum34"))
16863 #t)))))
16864 (native-inputs
16865 `(("python2-six" ,python2-six)
16866 ("python2-enum32" ,python2-enum34)
16867 ("python2-netifaces" ,python2-netifaces)
16868 ("python2-typing" ,python2-typing)))
16869 (home-page "https://github.com/jstasiak/python-zeroconf")
16870 (synopsis "Pure Python mDNS service discovery")
16871 (description
16872 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
16873compatible).")
16874 (license license:lgpl2.1+)))
16875
f825e605
GLV
16876(define-public python-bsddb3
16877 (package
16878 (name "python-bsddb3")
16879 (version "6.2.6")
16880 (source
16881 (origin
16882 (method url-fetch)
16883 (uri (pypi-uri "bsddb3" version))
16884 (sha256
16885 (base32
16886 "019db2y6bfmiqbrgg9x9f6h72qjmqh05czdn2v5sy9bl0gs23mj2"))))
16887 (build-system python-build-system)
16888 (inputs
16889 `(("bdb" ,bdb)))
16890 (arguments
16891 '(#:phases
16892 (modify-phases %standard-phases
16893 (add-after 'unpack 'configure-locations
16894 (lambda* (#:key inputs #:allow-other-keys)
16895 (setenv "BERKELEYDB_DIR" (assoc-ref inputs "bdb"))
16896 (setenv "YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION" "1")
16897 #t))
16898 (replace 'check
16899 (lambda _
16900 (invoke "python3" "test3.py" "-v"))))))
16901 (home-page "https://www.jcea.es/programacion/pybsddb.htm")
16902 (synopsis "Python bindings for Oracle Berkeley DB")
16903 (description
16904 "This module provides a nearly complete wrapping of the Oracle/Sleepycat
16905C API for the Database Environment, Database, Cursor, Log Cursor, Sequence and
16906Transaction objects, and each of these is exposed as a Python type in the
16907bsddb3.db module. The database objects can use various access methods: btree,
16908hash, recno, and queue. Complete support of Berkeley DB distributed
16909transactions. Complete support for Berkeley DB Replication Manager.
16910Complete support for Berkeley DB Base Replication. Support for RPC.")
16911 (license license:bsd-3)))
edeb04bf
PL
16912
16913(define-public python-dbfread
16914 (package
16915 (name "python-dbfread")
16916 (version "2.0.7")
16917 (source (origin
16918 (method url-fetch)
16919 (uri (pypi-uri "dbfread" version))
16920 (sha256
16921 (base32
16922 "0gdpwdzf1fngsi6jrdyj4qdf6cr7gnnr3zp80dpkzbgz0spskj07"))))
16923 (build-system python-build-system)
16924 (native-inputs
16925 `(("python-pytest" ,python-pytest)))
16926 (home-page "https://dbfread.readthedocs.io")
16927 (synopsis "Read DBF Files with Python")
16928 (description
16929 "This library reads DBF files and returns the data as native Python data
16930types for further processing. It is primarily intended for batch jobs and
16931one-off scripts.")
16932 (license license:expat)))
e308b4f0
JM
16933
16934(define-public python-cached-property
16935 (package
16936 (name "python-cached-property")
16937 (version "1.5.1")
16938 (source
16939 (origin
16940 (method url-fetch)
16941 (uri (pypi-uri "cached-property" version))
16942 (sha256
16943 (base32
16944 "010m1bl380l2r3vwq24r5v14l6gwvgm9v0mqqjkjss552jgsa5wj"))))
16945 (build-system python-build-system)
16946 (arguments
16947 `(#:phases
16948 (modify-phases %standard-phases
16949 ;; https://github.com/pydanny/cached-property/issues/131
16950 ;; recent versions of freezegun break one test
16951 (add-after 'unpack 'disable-broken-test
16952 (lambda _
16953 (substitute* "tests/test_cached_property.py"
16954 (("def test_threads_ttl_expiry\\(self\\)" m)
16955 (string-append "@unittest.skip(\"Disabled by Guix\")\n"
16956 " " m)))
16957 #t)))))
16958 (native-inputs
16959 `(("python-freezegun" ,python-freezegun)))
16960 (home-page
16961 "https://github.com/pydanny/cached-property")
16962 (synopsis
16963 "Decorator for caching properties in classes")
16964 (description
16965 "This package provides a decorator which makes caching
16966time-or-computationally-expensive properties quick and easy and works in Python
169672 or 3.")
16968 (license license:bsd-3)))
dfe8a704
NG
16969
16970(define-public python-folium
16971 (package
16972 (name "python-folium")
d3bc1ea9 16973 (version "0.10.1")
dfe8a704
NG
16974 (source
16975 (origin
16976 (method url-fetch)
16977 (uri (pypi-uri "folium" version))
16978 (sha256
16979 (base32
d3bc1ea9 16980 "0gcc267wxwxr57ry86pqpbiyfvl0g48hfvgy0f2mz9s58g87kgzd"))))
dfe8a704
NG
16981 (build-system python-build-system)
16982 (propagated-inputs
16983 `(("python-branca" ,python-branca)
16984 ("python-jinja2" ,python-jinja2)
16985 ("python-numpy" ,python-numpy)
16986 ("python-requests" ,python-requests)))
16987 (native-inputs
16988 `(("python-pytest" ,python-pytest)))
16989 (home-page "https://github.com/python-visualization/folium")
16990 (synopsis "Make beautiful maps with Leaflet.js & Python")
16991 (description "@code{folium} makes it easy to visualize data that’s been
16992manipulated in Python on an interactive leaflet map. It enables both the
16993binding of data to a map for @code{choropleth} visualizations as well as
16994passing rich vector/raster/HTML visualizations as markers on the map.
16995
16996The library has a number of built-in tilesets from OpenStreetMap, Mapbox, and
16997Stamen, and supports custom tilesets with Mapbox or Cloudmade API keys. It
16998supports Image, Video, GeoJSON and TopoJSON overlays.")
16999 (license license:expat)))
9dd5f475
LC
17000
17001(define-public jube
17002 (package
17003 ;; This is a command-line tool, so no "python-" prefix.
17004 (name "jube")
17005 (version "2.2.2")
17006 (source (origin
17007 (method url-fetch)
17008 (uri (string-append
17009 "http://apps.fz-juelich.de/jsc/jube/jube2/download.php?version="
17010 version))
17011 (sha256
17012 (base32
17013 "0xq4k1q63s1p6swgyp61vahlrd1fqmgbm0gm5kpj8ikwy0yc0nqk"))
17014 (file-name (string-append "jube-" version ".tar.gz"))))
17015 (build-system python-build-system)
17016 (home-page "https://apps.fz-juelich.de/jsc/jube/jube2/docu/index.html")
17017 (synopsis "Benchmarking environment")
17018 (description
17019 "JUBE helps perform and analyze benchmarks in a systematic way. For each
17020benchmarked application, benchmark data is stored in a format that allows JUBE
17021to deduct the desired information. This data can be parsed by automatic pre-
17022and post-processing scripts that draw information and store it more densely
17023for manual interpretation.")
a9f33960 17024 (license license:gpl3+)))
66436424
NG
17025
17026(define-public python-pyroutelib3
17027 (package
17028 (name "python-pyroutelib3")
17029 (version "1.3.post1")
17030 (source
17031 (origin
17032 (method url-fetch)
17033 (uri (pypi-uri "pyroutelib3" version))
17034 (sha256
17035 (base32
17036 "1hpbydpn2alyswiajfbvhzq4c7f36vdmvxy91hgv8l1lb2g2vfrj"))))
17037 (build-system python-build-system)
17038 (propagated-inputs
17039 `(("python-dateutil" ,python-dateutil)))
17040 (home-page "https://github.com/MKuranowski/pyroutelib3")
17041 (synopsis "Library for simple routing on OSM data")
17042 (description "Library for simple routing on OSM data")
17043 (license license:gpl3+)))
30e7c03a 17044
c1bbef69
17045(define-public python-bibtexparser
17046 (package
17047 (name "python-bibtexparser")
17048 (version "1.1.0")
17049 (source
17050 (origin
17051 (method url-fetch)
17052 (uri (pypi-uri "bibtexparser" version))
17053 (sha256
17054 (base32
17055 "0zwhfkrzf3n5847dbnfng92k7ak199l9v6x6ax3dgdidfpm6d2fz"))))
17056 (build-system python-build-system)
17057 (propagated-inputs
17058 `(("python-pyparsing" ,python-pyparsing)))
17059 (native-inputs
17060 `(("python-future" ,python-future)))
17061 (home-page "https://github.com/sciunto-org/python-bibtexparser")
17062 (synopsis "Python library to parse BibTeX files")
17063 (description "BibtexParser is a Python library to parse BibTeX files.")
17064 (license (list license:bsd-3 license:lgpl3))))
8581b40d
HG
17065
17066(define-public python-distro
17067 (package
17068 (name "python-distro")
17069 (version "1.4.0")
17070 (source
17071 (origin
17072 (method url-fetch)
17073 (uri (pypi-uri "distro" version))
17074 (sha256
17075 (base32
17076 "0mrg75w4ap7mdzyga75yaid9n8bgb345ih5mwjp3plj6v1jxwb9n"))))
17077 (build-system python-build-system)
17078 (native-inputs
17079 `(("python-pytest" ,python-pytest)))
17080 (home-page "https://github.com/nir0s/distro")
17081 (synopsis
17082 "OS platform information API")
17083 (description
17084 "@code{distro} provides information about the OS distribution it runs on,
17085such as a reliable machine-readable ID, or version information.
17086
17087It is the recommended replacement for Python's original
17088`platform.linux_distribution` function (which will be removed in Python 3.8).
17089@code{distro} also provides a command-line interface to output the platform
17090information in various formats.")
17091 (license license:asl2.0)))
f2f41e1a
HG
17092
17093(define-public python-cairosvg
17094 (package
17095 (name "python-cairosvg")
17096 (version "2.4.2")
17097 (source
17098 (origin
17099 (method url-fetch)
17100 (uri (pypi-uri "CairoSVG" version))
17101 (sha256
17102 (base32 "1bb7irxbaxxb9ahm3z5wsx1q96mm5gzskc7b6q07h9ikcnb8yrjf"))))
17103 (build-system python-build-system)
17104 (arguments
17105 `(#:phases
17106 (modify-phases %standard-phases
17107 (replace 'check
17108 (lambda _ (invoke "pytest"))))))
17109 (propagated-inputs
17110 `(("python-cairocffi" ,python-cairocffi)
17111 ("python-cssselect2" ,python-cssselect2)
17112 ("python-defusedxml" ,python-defusedxml)
17113 ("python-pillow" ,python-pillow)
17114 ("python-tinycss2" ,python-tinycss2)))
17115 (native-inputs
17116 `(("python-pytest-flake8" ,python-pytest-flake8)
17117 ("python-pytest-isort" ,python-pytest-isort)
17118 ("python-pytest-runner" ,python-pytest-runner)))
17119 (home-page "https://cairosvg.org/")
17120 (synopsis "SVG to PDF/PS/PNG converter based on Cairo")
17121 (description "CairoSVG is a SVG converter based on Cairo. It can export
17122SVG files to PDF, PostScript and PNG files. The main part of CairoSVG is a
17123SVG parser, trying to follow the SVG 1.1 recommendation from the W3C. Once
17124parsed, the result is drawn to a Cairo surface that can be exported to
17125qvarious formats: PDF, PostScript, PNG and even SVG.")
17126 (license license:lgpl3+)))
ea1801e0
HG
17127
17128(define-public python-pyphen
17129 (package
17130 (name "python-pyphen")
17131 (version "0.9.5")
17132 (source
17133 (origin
17134 (method url-fetch)
17135 (uri (pypi-uri "Pyphen" version))
17136 (sha256
17137 (base32 "08c9y69ry9d6m4zalhnalg86lsp9v2j5n1ziw5vxfmiihx83lqrv"))))
17138 (build-system python-build-system)
17139 ;; TODO: Use the Guix system hyphenation packages hyphen-* rather than the
17140 ;; embedded set provided by upstream - like Debian does.
17141 (home-page "https://github.com/Kozea/Pyphen")
17142 (synopsis "Pure Python module to hyphenate text")
17143 (description "Pyphen is a pure Python module to hyphenate text using
17144existing Hunspell hyphenation dictionaries.")
17145 (license (list license:gpl2 license:lgpl2.1 license:mpl1.1))))
85cfb0e9
CL
17146
17147(define-public python-intelhex
17148 (package
17149 (name "python-intelhex")
17150 (version "2.2.1")
17151 (source
17152 (origin
17153 (method url-fetch)
17154 (uri (pypi-uri "intelhex" version))
17155 (sha256
17156 (base32
17157 "0ckqjbxd8gwcg98gfzpn4vq1qxzfvq3rdbrr1hikj1nmw08qb780"))))
17158 (build-system python-build-system)
17159 (arguments '(#:tests? #f)) ;issue with version
17160 (home-page "https://pypi.org/project/IntelHex/")
17161 (synopsis "Python library for Intel HEX files manipulations")
17162 (description "The Intel HEX file format is widely used in microprocessors
17163and microcontrollers area (embedded systems etc.) as the de facto standard for
17164representation of code to be programmed into microelectronic devices. This
17165package provides an intelhex Python library to read, write, create from
17166scratch and manipulate data from Intel HEX file format. It also includes
17167several convenience Python scripts, including \"classic\" hex2bin and bin2hex
17168converters and more, those based on the library itself.")
17169 (license license:bsd-3)))
34bf6869
CL
17170
17171(define-public python-pykwalify
17172 (package
17173 (name "python-pykwalify")
17174 (version "1.7.0")
17175 (source
17176 (origin
17177 (method url-fetch)
17178 (uri (pypi-uri "pykwalify" version))
17179 (sha256
17180 (base32
17181 "1cnfzkg1b01f825ikpw2fhjclf9c8akxjfrbd1vc22x1lg2kk2vy"))))
17182 (build-system python-build-system)
17183 (arguments '(#:tests? #f)) ;missing dependencies
17184 (propagated-inputs
17185 `(("python-dateutil" ,python-dateutil)
17186 ("python-docopt" ,python-docopt)
17187 ("python-pyyaml" ,python-pyyaml)))
17188 (home-page "https://github.com/grokzen/pykwalify")
17189 (synopsis
17190 "Python lib/cli for JSON/YAML schema validation")
17191 (description
17192 "This package provides a parser, schema validator, and data binding tool
17193for YAML and JSON.")
17194 (license license:expat)))
e2ebbbcc
KK
17195
17196(define-public python-dbusmock
17197 (package
022b0d5f
BG
17198 (name "python-dbusmock")
17199 (version "0.18.3")
17200 (source
17201 (origin
17202 (method url-fetch)
17203 (uri (pypi-uri "python-dbusmock" version))
17204 (sha256
e2ebbbcc 17205 (base32
022b0d5f
BG
17206 "0hp2kyac88nh9iv6l8hlmv7s1sa1s5f1a3wc2pmlmmxnd211fjlr"))))
17207 (build-system python-build-system)
17208 (arguments
17209 '(#:phases
17210 (modify-phases %standard-phases
17211 (add-after 'unpack 'patch-shell-path
17212 (lambda _
17213 (substitute* "tests/test_code.py"
17214 (("/bin/bash") (which "bash")))
17215 #t)))))
17216 (native-inputs
17217 `(;; For tests.
17218 ("dbus" ,dbus) ; for dbus-daemon
17219 ("python-nose" ,python-nose)
17220 ("which" ,which)))
17221 (propagated-inputs
17222 `(("python-dbus" ,python-dbus)
17223 ("python-pygobject" ,python-pygobject)))
17224 (home-page "https://github.com/martinpitt/python-dbusmock")
17225 (synopsis "Python library for mock D-Bus objects")
17226 (description "python-dbusmock allows for the easy creation of mock objects on
e2ebbbcc
KK
17227D-Bus. This is useful for writing tests for software which talks to D-Bus
17228services such as upower, systemd, logind, gnome-session or others, and it is
17229hard (or impossible without root privileges) to set the state of the real
17230services to what you expect in your tests.")
022b0d5f 17231 (license license:lgpl3+)))
b657b23f
BG
17232
17233(define-public python-ujson
17234 (package
17235 (name "python-ujson")
17236 (version "1.35")
17237 (source
17238 (origin
17239 (method url-fetch)
17240 (uri (pypi-uri "ujson" version))
17241 (sha256
17242 (base32
17243 "11jz5wi7mbgqcsz52iqhpyykiaasila4lq8cmc2d54bfa3jp6q7n"))))
17244 (build-system python-build-system)
17245 (home-page "http://www.esn.me")
17246 (synopsis
17247 "Ultra fast JSON encoder and decoder for Python")
17248 (description
17249 "UltraJSON is an ultra fast JSON encoder and decoder written in pure C with
17250 bindings for Python 2.5+ and 3.")
17251 (license license:bsd-3)))
17252
17253(define-public python2-ujson
17254 (package-with-python2 python-ujson))
dbcef44a
MIP
17255
17256(define-public python-iocapture
17257 ;; The latest release is more than a year older than this commit.
17258 (let ((commit "fdc021c431d0840303908dfc3ca8769db383595c")
17259 (revision "1"))
17260 (package
17261 (name "python-iocapture")
17262 (version "0.1.2")
17263 (source
17264 (origin
17265 (method git-fetch)
17266 (uri (git-reference
17267 (url "https://github.com/oinume/iocapture.git")
17268 (commit commit)))
17269 (file-name (git-file-name name version))
17270 (sha256
17271 (base32
17272 "1mkbhqibxvgwg0p7slr8dfraa3g2s6bsayladhax2jccwj4kcndz"))))
17273 (build-system python-build-system)
17274 (arguments
17275 `(#:phases
17276 (modify-phases %standard-phases
17277 (delete 'check)
17278 (add-after 'install 'check
17279 (lambda* (#:key inputs outputs #:allow-other-keys)
17280 (add-installed-pythonpath inputs outputs)
17281 (invoke "py.test" "-v" "tests")
17282 #t)))))
17283 (propagated-inputs
17284 `(("python-flexmock" ,python-flexmock)
17285 ("python-pytest" ,python-pytest)
17286 ("python-pytest-cov" ,python-pytest-cov)
17287 ("python-six" ,python-six)))
17288 (home-page "https://github.com/oinume/iocapture")
17289 (synopsis "Python capturing tool for stdout and stderr")
17290 (description
17291 "This package helps you to capture the standard out (stdout) and the
17292standard error channel (stderr) in your program.")
17293 (license license:expat))))
db6bd842
MIP
17294
17295(define-public python-argh
17296 ;; There are 21 commits since the latest release containing important
17297 ;; improvements.
17298 (let ((commit "dcd3253f2994400a6a58a700c118c53765bc50a4")
17299 (revision "1"))
17300 (package
17301 (name "python-argh")
17302 (version (git-version "0.26.2" revision commit))
17303 (source
17304 (origin
17305 (method git-fetch)
17306 (uri (git-reference
17307 (url "https://github.com/neithere/argh.git")
17308 (commit commit)))
17309 (file-name (git-file-name name version))
17310 (sha256
17311 (base32
17312 "1p5h3dnpbsjmqrvil96s71asc6i3gpinmbrabqmwnrsxprz7r3ns"))))
17313 (build-system python-build-system)
17314 (propagated-inputs
17315 `(("python-iocapture" ,python-iocapture)
17316 ("python-mock" ,python-mock)
17317 ("python-pytest" ,python-pytest)
17318 ("python-pytest-cov" ,python-pytest-cov)
17319 ("python-pytest-xdist" ,python-pytest-xdist)
17320 ("python-tox" ,python-tox)))
17321 (home-page "https://github.com/neithere/argh/")
17322 (synopsis "Argparse wrapper with natural syntax")
17323 (description
17324 "python-argh is a small library that provides several layers of
17325abstraction on top of @code{python-argparse}. The layers can be mixed. It is
17326always possible to declare a command with the highest possible (and least
17327flexible) layer and then tune the behaviour with any of the lower layers
17328including the native API of @code{python-argparse}.")
17329 (license license:lgpl3+))))
073723fa
MIP
17330
17331(define-public python-ppft
17332 (package
17333 (name "python-ppft")
17334 (version "1.6.6.1")
17335 (source
17336 (origin
17337 (method url-fetch)
17338 (uri (pypi-uri "ppft" version))
17339 (sha256
17340 (base32
17341 "1z1invkhszc5d2mvgr221v7cszzifcc77mz0pv3wjp6x5q2768cy"))))
17342 (build-system python-build-system)
17343 (arguments '(#:tests? #f)) ; there are none
17344 (propagated-inputs
17345 `(("python-six" ,python-six)))
17346 (home-page "https://pypi.org/project/ppft/")
17347 (synopsis "Fork of Parallel Python")
17348 (description
17349 "This package is a fork of Parallel Python. The Parallel Python
17350module (@code{pp}) provides an easy and efficient way to create
17351parallel-enabled applications for @dfn{symmetric multiprocessing} (SMP)
17352computers and clusters. It features cross-platform portability and dynamic
17353load balancing.")
17354 (license license:bsd-3)))
8451ea19
MIP
17355
17356(define-public python-pox
17357 (package
17358 (name "python-pox")
17359 (version "0.2.7")
17360 (source
17361 (origin
17362 (method url-fetch)
17363 (uri (pypi-uri "pox" version))
17364 (sha256
17365 (base32
17366 "0y17ckc2p6i6709s279sjdj4q459mpcc38ymg9zv9y6vl6jf3bq6"))))
17367 (build-system python-build-system)
17368 (arguments
17369 `(#:phases
17370 (modify-phases %standard-phases
17371 (replace 'check
17372 (lambda _
17373 (mkdir-p "/tmp/guix")
17374 (setenv "SHELL" "bash")
17375 (setenv "USERNAME" "guix")
17376 (setenv "HOME" "/tmp/guix") ; must end on USERNAME...
17377 (invoke "py.test" "-vv")
17378 #t)))))
17379 (native-inputs
17380 `(("python-pytest" ,python-pytest)
17381 ("which" ,which)))
17382 (home-page "https://pypi.org/project/pox/")
17383 (synopsis "Python utilities for filesystem exploration and automated builds")
17384 (description
17385 "Pox provides a collection of utilities for navigating and manipulating
17386filesystems. This module is designed to facilitate some of the low level
17387operating system interactions that are useful when exploring a filesystem on a
17388remote host. Pox provides Python equivalents of several shell commands such
17389as @command{which} and @command{find}. These commands allow automated
17390discovery of what has been installed on an operating system, and where the
17391essential tools are located.")
17392 (license license:bsd-3)))
7e476ae8
MIP
17393
17394(define-public python-pathos
17395 (package
17396 (name "python-pathos")
17397 (version "0.2.5")
17398 (source
17399 (origin
17400 (method url-fetch)
17401 (uri (pypi-uri "pathos" version))
17402 (sha256
17403 (base32
17404 "0in8hxdz7k081ijn6q94gr39ycy7363sx4zysmbwyvd7snqjrbi1"))))
17405 (build-system python-build-system)
8f82e7e3
EF
17406 (arguments
17407 '(#:phases
17408 (modify-phases %standard-phases
17409 (replace 'check
17410 (lambda _
17411 (setenv "PYTHONPATH"
17412 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
17413 (invoke "python" "./tests/__main__.py"))))))
7e476ae8
MIP
17414 (propagated-inputs
17415 `(("python-dill" ,python-dill)
17416 ("python-multiprocess" ,python-multiprocess)
17417 ("python-pox" ,python-pox)
17418 ("python-ppft" ,python-ppft)))
8f82e7e3
EF
17419 (native-inputs
17420 `(("python-pytest" ,python-pytest)))
7e476ae8
MIP
17421 (home-page "https://pypi.org/project/pathos/")
17422 (synopsis
17423 "Parallel graph management and execution in heterogeneous computing")
17424 (description
17425 "Python-pathos is a framework for heterogenous computing. It provides a
17426consistent high-level interface for configuring and launching parallel
17427computations across heterogenous resources. Python-pathos provides configurable
17428launchers for parallel and distributed computing, where each launcher contains
17429the syntactic logic to configure and launch jobs in an execution environment.")
17430 (license license:bsd-3)))
54e5ee5a
BG
17431
17432(define-public python-flit
17433 (package
17434 (name "python-flit")
17435 (version "2.1.0")
17436 (source
17437 (origin
17438 (method url-fetch)
17439 (uri (pypi-uri "flit" version))
17440 (sha256
17441 (base32
17442 "0h5vvmqinqzn97mr3ix7zx53af9ad4fimjjwqpx88yp8qhz4r5bc"))))
17443 (build-system python-build-system)
17444 (arguments
17445 `(#:tests? #f)) ; XXX: Check requires network access.
17446 (home-page "https://flit.readthedocs.io/")
17447 (synopsis
17448 "Simple packaging tool for simple packages")
17449 (description
17450 "Flit is a simple way to put Python packages and modules on PyPI. Flit
17451packages a single importable module or package at a time, using the import
17452name as the name on PyPI. All subpackages and data files within a package
17453are included automatically.")
17454 (license license:bsd-3)))
02139b42
BG
17455
17456(define-public python-pathtools
17457 (package
17458 (name "python-pathtools")
17459 (version "0.1.2")
17460 (source
17461 (origin
17462 (method url-fetch)
17463 (uri (pypi-uri "pathtools" version))
17464 (sha256
17465 (base32
17466 "1h7iam33vwxk8bvslfj4qlsdprdnwf8bvzhqh3jq5frr391cadbw"))))
17467 (build-system python-build-system)
17468 (home-page
17469 "https://github.com/gorakhargosh/pathtools")
17470 (synopsis "Path utilities for Python")
17471 (description "Pattern matching and various utilities for file systems
17472paths.")
17473 (license license:expat)))
6b520177
JG
17474
17475(define-public python-fastentrypoints
17476 (package
17477 (name "python-fastentrypoints")
17478 (version "0.12")
17479 (source
17480 (origin
17481 (method url-fetch)
17482 (uri (pypi-uri "fastentrypoints" version))
17483 (sha256
17484 (base32
17485 "02s1j8i2dzbpbwgq2a3fiqwm3cnmhii2qzc0k42l0rdxd4a4ya7z"))))
17486 (build-system python-build-system)
17487 (home-page
17488 "https://github.com/ninjaaron/fast-entry_points")
17489 (synopsis
17490 "Makes entry_points specified in setup.py load more quickly")
17491 (description
17492 "Using entry_points in your setup.py makes scripts that start really
17493slowly because it imports pkg_resources. This package allows such setup
17494scripts to load entry points more quickly.")
17495 (license license:bsd-3)))
c5eb8cf8
JG
17496
17497(define-public python-funcparserlib
17498 (package
17499 (name "python-funcparserlib")
17500 (version "0.3.6")
17501 (source
17502 (origin
17503 (method url-fetch)
17504 (uri (pypi-uri "funcparserlib" version))
17505 (sha256
17506 (base32
17507 "07f9cgjr3h4j2m67fhwapn8fja87vazl58zsj4yppf9y3an2x6dp"))))
17508 (native-inputs
17509 `(("python-tox" ,python-tox)))
17510 (arguments
17511 `(#:phases
17512 (modify-phases %standard-phases
17513 (replace 'check
17514 (lambda _
17515 (invoke "tox"))))))
17516 (build-system python-build-system)
17517 (home-page
17518 "https://github.com/vlasovskikh/funcparserlib")
17519 (synopsis
17520 "Recursive descent parsing library based on functional combinators")
17521 (description
11140cf1 17522 "This package is a recursive descent parsing library for Python based on
c5eb8cf8
JG
17523functional combinators. Parser combinators are just higher-order functions
17524that take parsers as their arguments and return them as result values.")
17525 (license license:expat)))
602f3b67
NG
17526
17527(define-public python-speg
17528 (package
17529 (name "python-speg")
17530 (version "0.3")
17531 (source
17532 (origin
17533 (method url-fetch)
17534 (uri (pypi-uri "speg" version ".zip"))
17535 (sha256
17536 (base32 "0w9y4jf4787dzhy6rvhwi0mpl0r8qkqmqmyv2hpwdpv8w53yzjqh"))))
17537 (arguments
17538 `(#:tests? #f)) ;FIXME: tests fail, not sure why
17539 (native-inputs
17540 `(("unzip" ,unzip)))
17541 (build-system python-build-system)
17542 (home-page "https://github.com/avakar/speg")
17543 (synopsis "PEG-based parser interpreter with memoization")
17544 (description "This package is a PEG-based parser and interpreter with
17545memoization.")
17546 (license license:expat)))
07c8177b
NG
17547
17548(define-public python-cson
17549 (package
17550 (name "python-cson")
17551 (version "0.8")
17552 (source
17553 (origin
17554 (method url-fetch)
17555 (uri (pypi-uri "cson" version))
17556 (sha256
17557 (base32 "00cyvigg4npbph39ghkg77xbxisa6plf75vii24igxfizik0337f"))))
17558 (build-system python-build-system)
17559 (propagated-inputs
17560 `(("python-speg" ,python-speg)))
17561 (home-page "https://github.com/avakar/pycson")
17562 (synopsis "Parser for Coffeescript Object Notation (CSON)")
17563 (description "This package is a parser for Coffeescript Object
17564Notation (CSON).")
17565 (license license:expat)))
e24c672e
LDB
17566
17567(define-public python-asynctest
17568 (package
17569 (name "python-asynctest")
17570 (version "0.13.0")
17571 (source
17572 (origin
17573 (method url-fetch)
17574 (uri (pypi-uri "asynctest" version))
17575 (sha256
17576 (base32
17577 "1b3zsy7p84gag6q8ai2ylyrhx213qdk2h2zb6im3xn0m5n264y62"))))
17578 (build-system python-build-system)
17579 (arguments
17580 '(#:phases
17581 (modify-phases %standard-phases
17582 (replace 'check
17583 (lambda _
17584 (invoke "python" "-X" "dev" "-m" "unittest" "-v" "test")))
17585 (add-after 'unpack 'disable-tests
17586 (lambda* _
17587 (substitute* "test/test_selector.py"
17588 ;; XXX: This test fails for unknown reason inside the build
17589 ;; environment.
17590 (("def test_events_watched_outside_test_are_ignored")
17591 "@unittest.skip('disabled by guix')
17592 def test_events_watched_outside_test_are_ignored")))))))
17593 (home-page "https://github.com/Martiusweb/asynctest")
17594 (synopsis "Extension of unittest for testing asyncio libraries")
17595 (description
17596 "The package asynctest is built on top of the standard unittest module
17597and cuts down boilerplate code when testing libraries for asyncio.")
17598 (license license:asl2.0)))
1cc9c38e
LDB
17599
17600(define-public python-aionotify
17601 (package
17602 (name "python-aionotify")
17603 (version "0.2.0")
17604 (source
17605 (origin
17606 ;; Source tarball on PyPi lacks tests
17607 (method git-fetch)
17608 (uri (git-reference
17609 (url "https://github.com/rbarrois/aionotify")
17610 (commit (string-append "v" version))))
17611 (file-name (git-file-name name version))
17612 (sha256
17613 (base32 "1sk9i8czxgsbrswsf1nlb4c82vgnlzi8zrvrxdip92w2z8hqh43y"))))
17614 (build-system python-build-system)
17615 (native-inputs `(("python-asynctest" ,python-asynctest)))
17616 (home-page "https://github.com/rbarrois/aionotify")
17617 (synopsis "Asyncio-powered inotify library")
17618 (description
17619 "@code{aionotify} is a simple, asyncio-based inotify library.")
17620 (license license:bsd-3)))
84efaa3b
LDB
17621
17622(define-public python-forbiddenfruit
17623 (package
17624 (name "python-forbiddenfruit")
17625 (version "0.1.3")
17626 (source
17627 (origin
17628 ;; Source tarball on PyPi lacks Makefile that builds and runs tests
17629 (method git-fetch)
17630 (uri (git-reference
17631 (url "https://github.com/clarete/forbiddenfruit")
17632 (commit version)))
17633 (file-name (git-file-name name version))
17634 (sha256
17635 (base32 "1fp2xvdqpi910j9r3q68x38phpxbm700gjdi2m2j5gs91xdnyyh2"))))
17636 (build-system python-build-system)
17637 (arguments
17638 '(#:phases
17639 (modify-phases %standard-phases
17640 (replace 'check
17641 (lambda _
17642 (invoke "make" "SKIP_DEPS=1"))))))
17643 (native-inputs
17644 `(("python-nose" ,python-nose)
17645 ("python-coverage" ,python-coverage)))
17646 (home-page "https://github.com/clarete/forbiddenfruit")
17647 (synopsis "Patch python built-in objects")
17648 (description "This project allows Python code to extend built-in types.")
17649 (license (list license:gpl3+ license:expat))))
9786258b
LDB
17650
17651(define-public python-shouldbe
17652 (package
17653 (name "python-shouldbe")
17654 (version "0.1.2")
17655 (source
17656 (origin
17657 (method url-fetch)
17658 (uri (pypi-uri "shouldbe" version))
17659 (sha256
17660 (base32
17661 "16zbvjxf71dl4yfbgcr6idyim3mdrfvix1dv8b95p0s9z07372pj"))))
17662 (build-system python-build-system)
17663 (propagated-inputs
17664 `(("python-forbiddenfruit" ,python-forbiddenfruit)))
17665 (native-inputs
17666 `(("python-nose" ,python-nose)))
17667 (home-page "https://github.com/directxman12/should_be")
17668 (synopsis "Python Assertion Helpers inspired by Shouldly")
17669 (description
17670 "Python Assertion Helpers inspired by Shouldly.")
17671 (license license:isc)))
72c2478a
LDB
17672
17673(define-public python-k5test
17674 (package
17675 (name "python-k5test")
17676 (version "0.9.2")
17677 (source
17678 (origin
17679 (method url-fetch)
17680 (uri (pypi-uri "k5test" version))
17681 (sha256
17682 (base32
17683 "1lqp3jgfngyhaxjgj3n230hn90wsylwilh120yjf62h7b1s02mh8"))))
17684 (build-system python-build-system)
17685 (propagated-inputs
17686 `(("python-six" ,python-six)
17687 ;; `which`, `kadmin.local` binaries called inside library
17688 ("which" ,which)
17689 ("mit-krb5" ,mit-krb5)))
17690 (native-inputs `(("mit-krb5" ,mit-krb5)))
17691 (arguments
17692 '(#:phases
17693 (modify-phases %standard-phases
17694 (add-after 'unpack 'patch-paths
17695 (lambda* _
17696 (substitute* "k5test/realm.py"
17697 (("'kadmin_local'") "'kadmin.local'")))))))
17698 (home-page "https://github.com/pythongssapi/k5test")
17699 (synopsis "Library for setting up self-contained Kerberos 5 environments")
17700 (description
17701 "@code{k5test} is a library for setting up self-contained Kerberos 5
17702environments, and running Python unit tests inside those environments. It is
17703based on the file of the same name found alongside the MIT Kerberos 5 unit
17704tests.")
17705 (license license:isc)))
a8ef4978
LDB
17706
17707(define-public python-gssapi
17708 (package
17709 (name "python-gssapi")
17710 (version "1.6.1")
17711 (source
17712 (origin
17713 (method url-fetch)
17714 (uri (pypi-uri "gssapi" version))
17715 (sha256
17716 (base32
17717 "1gymg4asvwrz7y13qpwp2s5g8qwq179d72gkj09q6bfcgs82l5wr"))))
17718 (build-system python-build-system)
17719 (propagated-inputs
17720 `(("python-decorator" ,python-decorator)
17721 ("python-six" ,python-six)))
17722 (inputs
17723 `(("mit-krb5" ,mit-krb5)))
17724 ;; for tests
17725 (native-inputs
17726 `(("python-shouldbe" ,python-shouldbe)
17727 ("python-parameterized" ,python-parameterized)
17728 ("python-k5test" ,python-k5test)
17729 ("python-nose" ,python-nose)))
17730 (home-page "https://github.com/pythongssapi/python-gssapi")
17731 (synopsis "Python GSSAPI Wrapper")
17732 (description
17733 "Python-GSSAPI provides both low-level and high level wrappers around the
17734GSSAPI C libraries. While it focuses on the Kerberos mechanism, it should
17735also be useable with other GSSAPI mechanisms.")
17736 (license license:isc)))
7261bdca
JL
17737
17738(define-public python-check-manifest
17739 (package
17740 (name "python-check-manifest")
17741 (version "0.37")
17742 (source
17743 (origin
17744 (method url-fetch)
17745 (uri (pypi-uri "check-manifest" version))
17746 (sha256
17747 (base32
17748 "0lk45ifdv2cpkl6ayfyix7jwmnxa1rha7xvb0ih5999k115wzqs4"))))
17749 (build-system python-build-system)
17750 (native-inputs
17751 `(("python-mock" ,python-mock)
17752 ("git" ,git)))
17753 (home-page "https://github.com/mgedmin/check-manifest")
17754 (synopsis "Check MANIFEST.in in a Python source package for completeness")
17755 (description "Python package can include a MANIFEST.in file to help with
17756sending package files to the Python Package Index. This package checks that
17757file to ensure it completely and accurately describes your project.")
17758 (license license:expat)))
b487b7b5
JL
17759
17760(define-public python-android-stringslib
17761 (package
17762 (name "python-android-stringslib")
17763 (version "0.1.2")
17764 (source
17765 (origin
17766 (method git-fetch)
17767 (uri (git-reference
17768 (url "https://framagit.org/tyreunom/python-android-strings-lib")
17769 (commit (string-append "v" version))))
17770 (file-name (git-file-name name version))
17771 (sha256
17772 (base32
17773 "0gij55qzzq1h83kfpvhai1vf78kkhyvxa6l17m2nl24454lhfin4"))))
17774 (build-system python-build-system)
17775 (arguments
17776 `(#:tests? #f))
17777 (home-page "https://framagit.org/tyreunom/python-android-strings-lib")
17778 (synopsis "Android strings.xml support")
17779 (description "Android Strings Lib provides support for android's strings.xml
17780files. These files are used to translate strings in android apps.")
17781 (license license:expat)))
87435943 17782
7dec888f
JL
17783(define-public python-watchdog
17784 (package
17785 (name "python-watchdog")
17786 (version "0.9.0")
17787 (source
17788 (origin
17789 (method url-fetch)
17790 (uri (pypi-uri "watchdog" version))
17791 (sha256
17792 (base32
17793 "07cnvvlpif7a6cg4rav39zq8fxa5pfqawchr46433pij0y6napwn"))))
17794 (build-system python-build-system)
17795 (arguments
17796 `(#:phases
17797 (modify-phases %standard-phases
17798 (add-before 'check 'remove-failing
17799 (lambda _
17800 (delete-file "tests/test_inotify_buffer.py")
17801 (delete-file "tests/test_snapshot_diff.py")
17802 #t)))))
17803 (propagated-inputs
17804 `(("python-argh" ,python-argh)
17805 ("python-pathtools" ,python-pathtools)
17806 ("python-pyyaml" ,python-pyyaml)))
17807 (native-inputs
17808 `(("python-pytest-cov" ,python-pytest-cov)
17809 ("python-pytest-timeout" ,python-pytest-timeout)))
17810 (home-page "https://github.com/gorakhargosh/watchdog")
17811 (synopsis "Filesystem events monitoring")
17812 (description "This package provides a way to monitor filesystem events
17813such as a file modification and trigger an action. This is similar to inotify,
17814but portable.")
17815 (license license:asl2.0)))
2cbede59 17816
9c9704a9
MC
17817(define-public python-wget
17818 (package
17819 (name "python-wget")
17820 (version "3.2")
17821 (source
17822 (origin
17823 (method url-fetch)
17824 (uri (pypi-uri "wget" version ".zip"))
17825 (sha256
17826 (base32
17827 "0qb0y7ipby42m4m7h0ipazpdyc3bn9xi46lvifcwwl5albn31rim"))))
17828 (build-system python-build-system)
17829 (native-inputs `(("unzip" ,unzip)))
17830 (home-page "https://bitbucket.org/techtonik/python-wget/")
17831 (synopsis "Pure Python download utility")
17832 (description "The python-wget library provides an API to download files
17833with features similar to the @command{wget} utility.")
17834 (license license:unlicense)))
17835
2cbede59
JL
17836(define-public offlate
17837 (package
17838 (name "offlate")
17839 (version "0.5")
17840 (source
17841 (origin
17842 (method git-fetch)
17843 (uri (git-reference
17844 (url "https://framagit.org/tyreunom/offlate")
17845 (commit version)))
17846 (file-name (git-file-name name version))
17847 (sha256
17848 (base32
17849 "13pqnbl05wcyldfvl75fp89vjgwsvxyc69vhnb17kkha2rc2k1h7"))))
17850 (build-system python-build-system)
17851 (arguments
17852 ;; No tests
17853 `(#:tests? #f))
17854 (propagated-inputs
17855 `(("python-android-stringslib" ,python-android-stringslib)
17856 ("python-dateutil" ,python-dateutil)
17857 ("python-gitlab" ,python-gitlab)
17858 ("python-lxml" ,python-lxml)
17859 ("python-polib" ,python-polib)
17860 ("python-pyenchant" ,python-pyenchant)
17861 ("python-pygit2" ,python-pygit2)
17862 ("python-pygithub" ,python-pygithub)
17863 ("python-pyqt" ,python-pyqt)
17864 ("python-requests" ,python-requests)
17865 ("python-ruamel.yaml" ,python-ruamel.yaml)
17866 ("python-translation-finder" ,python-translation-finder)
17867 ("python-watchdog" ,python-watchdog)))
17868 (native-inputs
17869 `(("qttools" ,qttools)))
17870 (home-page "https://framagit.org/tyreunom/offlate")
17871 (synopsis "Offline translation interface for online translation tools")
17872 (description "Offlate offers a unified interface for different translation
17873file formats, as well as many different online translation platforms. You can
17874use it to get work from online platforms, specialized such as the Translation
17875Project, or not such a gitlab instance when your upstream doesn't use any
17876dedicated platform. The tool proposes a unified interface for any format and
17877an upload option to send your work back to the platform.")
17878 (license license:gpl3+)))
479f4013
JK
17879
17880(define-public python-pypng
17881 (package
17882 (name "python-pypng")
17883 (version "0.0.20")
17884 (source
17885 (origin
17886 (method url-fetch)
17887 (uri (pypi-uri "pypng" version))
17888 (sha256
17889 (base32 "02qpa22ls41vwsrzw9r9qhj1nhq05p03hb5473pay6y980s86chh"))))
17890 (build-system python-build-system)
17891 (home-page "https://github.com/drj11/pypng")
17892 (synopsis "Pure Python PNG image encoder/decoder")
17893 (description
17894 "The PyPNG module implements support for PNG images. It reads and writes
17895PNG files with all allowable bit depths (1/2/4/8/16/24/32/48/64 bits per
17896pixel) and colour combinations: greyscale (1/2/4/8/16 bit); RGB, RGBA,
17897LA (greyscale with alpha) with 8/16 bits per channel; colour mapped
17898images (1/2/4/8 bit). Adam7 interlacing is supported for reading and writing.
17899A number of optional chunks can be specified (when writing) and
17900understood (when reading): tRNS, bKGD, gAMA.
17901
17902PyPNG is not a high level toolkit for image processing (like PIL) and does not
17903aim at being a replacement or competitor. Its strength lies in fine-grained
17904extensive support of PNG features. It can also read and write Netpbm PAM
17905files, with a focus on its use as an intermediate format for implementing
17906custom PNG processing.")
17907 (license license:expat)))
da8ca4c3 17908
17909(define-public python-fuzzywuzzy
17910 (package
17911 (name "python-fuzzywuzzy")
17912 (version "0.18.0")
17913 (source
17914 (origin
17915 (method url-fetch)
17916 (uri (pypi-uri "fuzzywuzzy" version))
17917 (sha256
17918 (base32
17919 "1s00zn75y2dkxgnbw8kl8dw4p1mc77cv78fwfa4yb0274s96w0a5"))))
17920 (build-system python-build-system)
17921 (native-inputs
17922 `(("python-hypothesis" ,python-hypothesis)
17923 ("python-pycodestyle" ,python-pycodestyle)
17924 ("python-pytest" ,python-pytest)))
17925 (propagated-inputs
17926 `(("python-levenshtein" ,python-levenshtein)))
17927 (home-page "https://github.com/seatgeek/fuzzywuzzy")
7d9f8db2 17928 (synopsis "Fuzzy string matching in Python")
da8ca4c3 17929 (description "Approximate string matching using
17930@emph{Levenshtein Distance} to calculate the differences between
17931sequences.")
17932 (license license:gpl2)))
17933
17934(define-public python2-fuzzywuzzy
17935 (package-with-python2 python-fuzzywuzzy))