gnu: Fix build of python-velocyto.
[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")
94d57ba3 2401 (version "20.0.8")
44d10b1f
RW
2402 (source
2403 (origin
2404 (method url-fetch)
2405 (uri (pypi-uri "virtualenv" version))
2406 (sha256
2407 (base32
94d57ba3 2408 "096r7g5cv85vxymg9iqbn5z749613snlvd6p3rf1nxnrd386j0qz"))))
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)))
2419 (inputs
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.")
2429 (license license:expat)))
2430
2431(define-public python2-virtualenv
2432 (package-with-python2 python-virtualenv))
2433
2434(define-public python-markupsafe
2435 (package
2436 (name "python-markupsafe")
753eb411 2437 (version "1.1.1")
44d10b1f
RW
2438 (source
2439 (origin
2440 (method url-fetch)
5182927c 2441 (uri (pypi-uri "MarkupSafe" version))
44d10b1f
RW
2442 (sha256
2443 (base32
753eb411 2444 "0sqipg4fk7xbixqd8kq6rlkxj664d157bdwbh93farcphf92x1r9"))))
44d10b1f 2445 (build-system python-build-system)
753eb411
MB
2446 (arguments
2447 `(#:modules ((ice-9 ftw)
2448 (srfi srfi-1)
2449 (srfi srfi-26)
2450 (guix build utils)
2451 (guix build python-build-system))
2452 #:phases (modify-phases %standard-phases
2453 (replace 'check
2454 (lambda _
2455 (let ((cwd (getcwd))
2456 (libdir (find (cut string-prefix? "lib." <>)
2457 (scandir "build"))))
2458 (setenv "PYTHONPATH"
2459 (string-append cwd "/build/" libdir ":"
2460 (getenv "PYTHONPATH")))
2461 (invoke "pytest" "-vv")))))))
2462 (native-inputs
2463 `(("python-pytest" ,python-pytest)))
44d10b1f
RW
2464 (home-page "https://github.com/mitsuhiko/markupsafe")
2465 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2466 (description
2467 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2468for Python.")
2469 (license license:bsd-3)))
2470
2471(define-public python2-markupsafe
2472 (package-with-python2 python-markupsafe))
2473
2474(define-public python-jinja2
2475 (package
2476 (name "python-jinja2")
4a5c7934 2477 (version "2.10.1")
44d10b1f
RW
2478 (source
2479 (origin
2480 (method url-fetch)
2481 (uri (pypi-uri "Jinja2" version))
2482 (sha256
2483 (base32
4a5c7934 2484 "04shqrs56aj04ipyqykj512rw2l0zfammvj9krawzxz7xc14yp06"))))
44d10b1f
RW
2485 (build-system python-build-system)
2486 (propagated-inputs
2487 `(("python-markupsafe" ,python-markupsafe)))
2488 (home-page "http://jinja.pocoo.org/")
2489 (synopsis "Python template engine")
2490 (description
2491 "Jinja2 is a small but fast and easy to use stand-alone template engine
2492written in pure Python.")
2493 (license license:bsd-3)))
2494
2495(define-public python2-jinja2
2496 (package-with-python2 python-jinja2))
2497
ba42a6bf
TLC
2498(define-public python-jinja2-time
2499 (package
2500 (name "python-jinja2-time")
2501 (version "0.2.0")
2502 (source
2503 (origin
2504 (method url-fetch)
2505 (uri (pypi-uri "jinja2-time" version))
2506 (sha256
2507 (base32
2508 "0h0dr7cfpjnjj8bgl2vk9063a53649pn37wnlkd8hxjy656slkni"))))
2509 (build-system python-build-system)
2510 (propagated-inputs
2511 `(("python-arrow" ,python-arrow)
2512 ("python-jinja2" ,python-jinja2)))
2513 (home-page
2514 "https://github.com/hackebrot/jinja2-time")
2515 (synopsis "Jinja2 Extension for Dates and Times")
2516 (description
2517 "This package provides an extension for the template engine Jinja2. It
2518adds a 'now' tag providing a convenient access to the arrow.now() API from
2519templates. A format string can be provided to control the output.")
2520 (license license:expat)))
2521
44d10b1f
RW
2522(define-public python-pystache
2523 (package
2524 (name "python-pystache")
2525 (version "0.5.4")
2526 (source (origin
2527 (method url-fetch)
2528 (uri (pypi-uri "pystache" version))
2529 (sha256
2530 (base32
2531 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2532 (build-system python-build-system)
2533 (arguments
2534 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
2535 (home-page "http://defunkt.io/pystache/")
2536 (synopsis "Python logic-less template engine")
2537 (description
2538 "Pystache is a Python implementation of the framework agnostic,
2539logic-free templating system Mustache.")
2540 (license license:expat)
2541 (properties `((python2-variant . ,(delay python2-pystache))))))
2542
2543(define-public python2-pystache
2544 (package (inherit (package-with-python2
2545 (strip-python2-variant python-pystache)))
2546 (arguments
2547 `(#:python ,python-2
2548 #:phases
2549 (modify-phases %standard-phases
2550 (replace 'check
2551 (lambda _
dfafc29b 2552 (invoke "python" "test_pystache.py"))))))))
44d10b1f
RW
2553
2554(define-public python-joblib
2555 (package
2556 (name "python-joblib")
2557 (version "0.13.0")
2558 (source (origin
2559 (method url-fetch)
2560 (uri (pypi-uri "joblib" version))
2561 (sha256
2562 (base32
2563 "0612nazad8dxmn3xghfrmjax6456l4xy6hn9cngs7vydi14ds7v5"))))
2564 (build-system python-build-system)
2565 (arguments
2566 `(#:phases
2567 (modify-phases %standard-phases
2568 (replace 'check
2569 (lambda _ (invoke "pytest" "-v" "joblib"))))))
2570 (native-inputs
2571 `(("python-pytest" ,python-pytest)))
2572 (home-page "https://joblib.readthedocs.io/")
2573 (synopsis "Using Python functions as pipeline jobs")
2574 (description
2575 "Joblib is a set of tools to provide lightweight pipelining in Python.
2576In particular, joblib offers: transparent disk-caching of the output values
2577and lazy re-evaluation (memoize pattern), easy simple parallel computing
2578logging and tracing of the execution.")
2579 (license license:bsd-3)))
2580
2581(define-public python2-joblib
2582 (package-with-python2 python-joblib))
2583
a3363341
VC
2584(define-public python-daemon
2585 (package
2586 (name "python-daemon")
2587 (version "2.2.3")
2588 (source
2589 (origin
2590 (method url-fetch)
2591 (uri (pypi-uri "python-daemon" version))
2592 (sha256
2593 (base32
2594 "09fcjdjzk9ywmpnrj62iyxqgcygzdafsz41qlrk2dknzbagcmzmg"))))
2595 (build-system python-build-system)
2596 (arguments
2597 `(#:phases
2598 (modify-phases %standard-phases
2599 (add-before 'check 'disable-tests
2600 (lambda _
2601 ;; FIXME: Determine why test fails
2602 (substitute* "test/test_daemon.py"
2603 (("test_detaches_process_context")
2604 "skip_test_detaches_process_context"))
2605 #t)))))
2606 (propagated-inputs
2607 `(("python-lockfile" ,python-lockfile)))
2608 (native-inputs
2609 `(("python-unittest2" ,python-unittest2)
2610 ("python-testtools" ,python-testtools)
2611 ("python-testscenarios" ,python-testscenarios)
2612 ("python-mock" ,python-mock)
2613 ("python-docutils" ,python-docutils)))
2614 (home-page "https://pagure.io/python-daemon/")
2615 (synopsis "Python library for making a Unix daemon process")
2616 (description "Python-daemon is a library that assists a Python program to
2617turn itself into a well-behaved Unix daemon process, as specified in PEP 3143.
2618
2619This library provides a @code{DaemonContext} class that manages the following
2620important tasks for becoming a daemon process:
2621@enumerate
2622@item Detach the process into its own process group.
2623@item Set process environment appropriate for running inside a chroot.
2624@item Renounce suid and sgid privileges.
2625@item Close all open file descriptors.
2626@item Change the working directory, uid, gid, and umask.
2627@item Set appropriate signal handlers.
2628@item Open new file descriptors for stdin, stdout, and stderr.
2629@item Manage a specified PID lock file.
2630@item Register cleanup functions for at-exit processing.
2631@end enumerate")
2632 ;; Only setup.py is gpl3+, everything else is apache 2.0 licensed.
2633 (license (list license:asl2.0 license:gpl3+))))
2634
544ea9c2
MB
2635(define-public python-anytree
2636 (package
2637 (name "python-anytree")
2638 (version "2.8.0")
2639 (source (origin
2640 (method url-fetch)
2641 (uri (pypi-uri "anytree" version))
2642 (sha256
2643 (base32
2644 "1aycpc387wqz7h9w2p53qxn43qsh3m6by6ak4kkc66x9aprr63rz"))))
2645 (build-system python-build-system)
2646 (propagated-inputs
2647 `(("python-six" ,python-six)))
2648 (native-inputs
2649 `(;; For tests.
2650 ("graphviz" ,graphviz) ;for 'dot'
2651 ("python-nose" ,python-nose)))
2652 (home-page "https://github.com/c0fec0de/anytree")
2653 (synopsis "Lightweight tree data library")
2654 (description
2655 "@code{anytree} is a simple, lightweight, and extensible tree data
2656structure for Python.")
2657 (license license:asl2.0)))
2658
44d10b1f
RW
2659(define-public python-docutils
2660 (package
2661 (name "python-docutils")
2662 (version "0.14")
2663 (source
2664 (origin
2665 (method url-fetch)
2666 (uri (pypi-uri "docutils" version))
2667 (sha256
2668 (base32
2669 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))
2670 (build-system python-build-system)
2671 (arguments
2672 '(#:tests? #f)) ; no setup.py test command
2673 (home-page "http://docutils.sourceforge.net/")
2674 (synopsis "Python Documentation Utilities")
2675 (description
2676 "Docutils is a modular system for processing documentation into useful
2677formats, such as HTML, XML, and LaTeX. For input Docutils supports
2678reStructuredText.")
2679 ;; Most of the source code is public domain, but some source files are
2680 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
2681 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
2682
2683(define-public python2-docutils
2684 (package-with-python2 python-docutils))
2685
2686(define-public python-pygments
2687 (package
2688 (name "python-pygments")
69002b21 2689 (version "2.5.2")
44d10b1f
RW
2690 (source
2691 (origin
2692 (method url-fetch)
2693 (uri (pypi-uri "Pygments" version))
2694 (sha256
2695 (base32
69002b21 2696 "1zmhnswy0wxfn0xprs9aqsvx2c3kmzfn2wx14q8cv3vpkxdamj4q"))))
44d10b1f
RW
2697 (build-system python-build-system)
2698 (arguments
2699 ;; FIXME: Tests require sphinx, which depends on this.
2700 '(#:tests? #f))
69002b21 2701 (home-page "https://pygments.org/")
44d10b1f
RW
2702 (synopsis "Syntax highlighting")
2703 (description
2704 "Pygments is a syntax highlighting package written in Python.")
2705 (license license:bsd-2)))
2706
2707(define-public python2-pygments
2708 (package-with-python2 python-pygments))
2709
0f0a5ef9
MC
2710(define-public python-bumpversion
2711 (package
2712 (name "python-bumpversion")
2713 (version "0.5.3")
2714 (source
2715 (origin
2716 (method url-fetch)
2717 (uri (pypi-uri "bumpversion" version))
2718 (sha256
2719 (base32
2720 "0zn7694yfipxg35ikkfh7kvgl2fissha3dnqad2c5bvsvmrwhi37"))))
2721 (build-system python-build-system)
2722 (home-page "https://github.com/peritus/bumpversion")
2723 (synopsis "Tool to bump software version")
2724 (description "This tool provides a command-line interface (CLI) to bump a
2725software version simply.")
2726 (license license:expat)))
2727
b24fd2c2
MC
2728(define-public python-deprecated
2729 (package
2730 (name "python-deprecated")
2731 (version "1.2.5")
2732 (source
2733 (origin
2734 (method git-fetch)
2735 (uri (git-reference
2736 (url "https://github.com/tantale/deprecated.git")
2737 (commit (string-append "v" version))))
2738 (file-name (git-file-name name version))
2739 (sha256
2740 (base32
2741 "14909glxxwwc4b9qpz2b9jdriwzi5n65ichw85xqppap5f79wcwz"))))
2742 (build-system python-build-system)
2743 (arguments
2744 `(#:phases (modify-phases %standard-phases
2745 (replace 'check
2746 (lambda _
2747 (invoke "pytest"))))))
2748 (propagated-inputs
2749 `(("python-wrapt" ,python-wrapt)))
2750 (native-inputs
2751 `(("python-bumpversion" ,python-bumpversion)
2752 ("python-pytest" ,python-pytest)
2753 ("python-pytest-cov" ,python-pytest-cov)
2754 ("python-sphinx" ,python-sphinx)
2755 ("python-tox" ,python-tox)))
2756 (home-page "https://github.com/tantale/deprecated")
2757 (synopsis "Python decorator to deprecate classes, functions or methods")
2758 (description "The @code{deprecated} decorator provides a convenient way to deprecate
2759to deprecate classes, functions or methods.")
2760 (license license:expat)))
2761
d5a998fa
MC
2762(define-public python-pygithub
2763 (package
2764 (name "python-pygithub")
749e38d7 2765 (version "1.43.8")
d5a998fa
MC
2766 (source
2767 ;; We fetch from the Git repo because there are no tests in the PyPI
2768 ;; archive.
2769 (origin
2770 (method git-fetch)
2771 (uri (git-reference
2772 (url "https://github.com/PyGithub/PyGithub.git")
2773 (commit (string-append "v" version))))
2774 (file-name (git-file-name name version))
2775 (sha256
749e38d7 2776 (base32 "1625v558xga5mwhl9jqmibywy5qafmg1vqrirqz6zfq1la1d22mw"))))
d5a998fa
MC
2777 (build-system python-build-system)
2778 (arguments
2779 `(#:phases (modify-phases %standard-phases
2780 ;; Some tests rely on the network.
2781 (add-after 'unpack 'disable-failing-tests
2782 (lambda _
2783 (substitute* "tests/Issue142.py"
2784 (("testDecodeJson") "disabled_testDecodeJson"))
2785 #t))
2786 (add-before 'check 'prepare-for-tests
2787 (lambda _
2788 (for-each (lambda (f)
2789 (chmod f #o666))
2790 (find-files "./tests"))
2791 (system* "python" "-m" "lib2to3" "-w" "-n" "tests")
2792 (setenv "PYTHONPATH"
2793 (string-append "./tests:" (getenv "PYTHONPATH")))
2794 #t)))))
2795 (propagated-inputs
2796 `(("python-deprecated" ,python-deprecated)
2797 ("python-pyjwt" ,python-pyjwt)
2798 ("python-requests" ,python-requests)))
2799 (native-inputs `(("python-httpretty" ,python-httpretty)))
2800 (home-page "https://pygithub.readthedocs.io/en/latest/")
2801 (synopsis "Python library for the GitHub API")
2802 (description "This library allows managing GitHub resources such as
2803repositories, user profiles, and organizations in your Python applications,
2804using version 3 of the GitHub application programming interface (API).")
2805 (license license:lgpl3+)))
2806
c0c0bb38
MC
2807(define-public python-rellu
2808 (package
2809 (name "python-rellu")
2810 (version "0.7")
2811 (source
2812 (origin
2813 (method url-fetch)
2814 (uri (pypi-uri "rellu" version))
2815 (sha256
2816 (base32
2817 "1w0arpj1sm7vh29nrbnca4pnp8sx42l07r17inwqcjjf9bhng66x"))))
2818 (build-system python-build-system)
2819 (propagated-inputs
2820 `(("python-invoke" ,python-invoke)
2821 ("python-pygithub" ,python-pygithub)))
2822 (home-page "https://github.com/robotframework/rellu")
2823 (synopsis "Utilities to create PyPI releases")
2824 (description "This collection of utilities contains tooling and templates
2825to assist in creating releases on GitHub and publishing them on PyPI. It is
2826designed to be used by Robot Framework and tools and libraries in its
2827ecosystem, but can naturally be used also by other projects.")
2828 (license license:asl2.0)))
2829
b9790285
MC
2830(define-public python-robotframework
2831 (package
2832 (name "python-robotframework")
1710b8f8 2833 (version "3.1.2")
b9790285
MC
2834 ;; There are no tests in the PyPI archive.
2835 (source
2836 (origin
2837 (method git-fetch)
2838 (uri (git-reference
2839 (url "https://github.com/robotframework/robotframework.git")
2840 (commit (string-append "v" version))))
2841 (file-name (git-file-name name version))
2842 (sha256
1710b8f8 2843 (base32 "16gnxy0qinh8fhs0qvhff5z2xh49c3cqgm0d7bfjw120df6x7fym"))
b9790285
MC
2844 (patches (search-patches
2845 "python-robotframework-honor-source-date-epoch.patch"))))
2846 (build-system python-build-system)
2847 (arguments
2848 `(#:phases (modify-phases %standard-phases
2849 (add-before 'build 'build-and-install-doc
2850 (lambda* (#:key outputs #:allow-other-keys)
2851 (let* ((doc-output (assoc-ref outputs "doc"))
2852 (doc (string-append doc-output "/share/"
2853 ,name "-" ,version "/")))
2854 (invoke "invoke" "library-docs" "all")
2855 (mkdir-p doc)
2856 (copy-recursively "doc/libraries"
2857 (string-append doc "/libraries"))
2858 #t)))
2859 (replace 'check
2860 (lambda _
2861 (invoke "python" "utest/run.py"))))))
2862 (native-inputs
2863 `(("python-invoke" ,python-invoke)
2864 ("python-rellu" ,python-rellu)
2865 ("python:tk" ,python "tk"))) ;used when building the HTML doc
2866 (outputs '("out" "doc"))
2867 (home-page "https://robotframework.org")
2868 (synopsis "Generic automation framework")
2869 (description "Robot Framework is a generic automation framework for
2870acceptance testing, acceptance test driven development (ATDD), and robotic
2871process automation (RPA).")
2872 (license license:asl2.0)))
2873
5b84c120
MC
2874(define-public python-robotframework-lint
2875 ;; There is no properly tagged release; the commit below seems to correspond
2876 ;; to the 0.9 stable release available from PyPI. The tests are not
2877 ;; included in the PyPI archive, so we fetch the sources from the upstream
2878 ;; Git repo.
2879 (let ((commit "e851879bab1f63e4e53b34a4dc8a67ed95102830")
2880 (revision "1"))
2881 (package
2882 (name "python-robotframework-lint")
2883 (version (git-version "0.9.0" revision commit))
2884 (source
2885 (origin
2886 (method git-fetch)
2887 (uri (git-reference
2888 (url "https://github.com/boakley/robotframework-lint.git")
2889 (commit commit)))
2890 (file-name (git-file-name name version))
2891 (sha256
2892 (base32
2893 "1p6fknqg5sb9qz5857ji4a877657vgfjm5v3zn45994parx6ml1m"))))
2894 (build-system python-build-system)
2895 (arguments
2896 `(#:phases
2897 (modify-phases %standard-phases
2898 (replace 'check
2899 (lambda _
2900 (invoke "python" "-m" "robot" "-A"
2901 "tests/conf/default.args" "tests"))))))
2902 (propagated-inputs
2903 `(("python-robotframework" ,python-robotframework)))
2904 (home-page "https://github.com/boakley/robotframework-lint/")
2905 (synopsis "Static analysis tool (linter) for Robot Framework")
2906 (description "This package provides the @code{rflint} command-line
2907utility, a static analysis tool (linter) for Robot Framework source files.")
2908 (license license:asl2.0))))
2909
c0c64f17
MC
2910(define-public python-robotframework-sshlibrary
2911 (package
2912 (name "python-robotframework-sshlibrary")
2913 (version "3.3.0")
2914 ;; There are no tests in the PyPI archive.
2915 (source
2916 (origin
2917 (method git-fetch)
2918 (uri (git-reference
2919 (url "https://github.com/robotframework/SSHLibrary.git")
2920 (commit (string-append "v" version))))
2921 (file-name (git-file-name name version))
2922 (sha256
2923 (base32
2924 "1mk6dz2jqqndbx4yji09012q6rmadnqdywi7czvj62b0s07dr3r2"))))
2925 (build-system python-build-system)
2926 (arguments
2927 `(#:phases
2928 (modify-phases %standard-phases
2929 (add-before 'build 'build-and-install-doc
2930 (lambda* (#:key outputs #:allow-other-keys)
2931 (let* ((doc-output (assoc-ref outputs "doc"))
2932 (doc (string-append doc-output "/share/"
2933 ,name "-" ,version "/")))
2934 (invoke "chmod" "-R" "+w" "docs")
2935 (invoke "invoke" "kw-docs" "project-docs")
2936 (mkdir-p doc)
2937 (for-each delete-file (find-files "docs" "\\.rst"))
2938 (copy-recursively "docs" doc)
2939 #t)))
2940 (replace 'check
2941 (lambda _
2942 ;; Some tests require an SSH server; we remove them.
2943 (delete-file "utest/test_client_api.py")
2944 (delete-file "utest/test_scp.py")
2945 (invoke "python" "utest/run.py"))))))
2946 (propagated-inputs
2947 `(("python-robotframework" ,python-robotframework)
2948 ("python-paramiko" ,python-paramiko)
2949 ("python-scp" ,python-scp)))
2950 (native-inputs
2951 `(("openssh" ,openssh)
2952 ("which" ,which)
2953 ;; To generate the documentation
2954 ("python-docutils" ,python-docutils)
2955 ("python-invoke" ,python-invoke)
2956 ("python-pygments" ,python-pygments)
2957 ("python-rellu" ,python-rellu)))
2958 (outputs '("out" "doc"))
2959 (home-page "https://github.com/robotframework/SSHLibrary")
2960 (synopsis "Robot Framework library for SSH and SFTP")
2961 (description "SSHLibrary is a Robot Framework library providing support
2962for SSH and SFTP. It has the following main usages:
2963@itemize @bullet
2964@item Executing commands on the remote machine, either blocking or non-blocking.
2965@item Writing and reading in an interactive shell.
2966@item Transferring files and directories over SFTP.
2967@item Ensuring that files and directories exist on the remote machine.
2968@end itemize")
2969 (license license:asl2.0)))
2970
b1daba94
VC
2971(define-public python-rstr
2972 (package
2973 (name "python-rstr")
2974 (version "2.2.6")
2975 (source
2976 (origin
2977 (method url-fetch)
2978 (uri (pypi-uri "rstr" version))
2979 (sha256
2980 (base32
2981 "197dw8mbq0pjjz1l6h1ksi62vgn7x55d373ch74y06744qiq5sjx"))))
2982 (build-system python-build-system)
2983 (home-page
2984 "http://bitbucket.org/leapfrogdevelopment/rstr/overview")
2985 (synopsis "Generate random strings in Python")
2986 (description "This package provides a python module for generating
2987random strings of various types. It could be useful for fuzz testing,
2988generating dummy data, or other applications. It has no dependencies
2989outside the standard library.")
2990 (license license:bsd-3)))
2991
13d825fc
MC
2992(define-public python-scp
2993 (package
2994 (name "python-scp")
2995 (version "0.13.2")
2996 (source
2997 (origin
2998 (method url-fetch)
2999 (uri (pypi-uri "scp" version))
3000 (sha256
3001 (base32
3002 "1crlpw9lnn58fs1c1rmh7s7s9y5gkgpgjsqlvg9qa51kq1knx7gg"))))
3003 (build-system python-build-system)
3004 (arguments
3005 '(#:tests? #f)) ;tests require an SSH server
3006 (propagated-inputs
3007 `(("python-paramiko" ,python-paramiko)))
3008 (home-page "https://github.com/jbardin/scp.py")
3009 (synopsis "SCP protocol module for Python and Paramiko")
3010 (description "The scp module extends the Paramiko library to send and
3011receive files via the SCP1 protocol, as implemented by the OpenSSH
3012@command{scp} program.")
3013 (license license:gpl2+)))
3014
44d10b1f
RW
3015(define-public python-rst.linker
3016 (package
3017 (name "python-rst.linker")
d37e8e53 3018 (version "1.11")
44d10b1f
RW
3019 (source
3020 (origin
3021 (method url-fetch)
3022 (uri (pypi-uri "rst.linker" version))
3023 (sha256
d37e8e53 3024 (base32 "0pqsfqqx8h0pq21k8l3k62kznrgaj2ala93c64s4d9rpbr4mgkd2"))))
44d10b1f
RW
3025 (build-system python-build-system)
3026 (propagated-inputs
3027 `(("python-dateutil" ,python-dateutil)
3028 ("python-six" ,python-six)))
3029 (native-inputs
3030 `(("python-setuptools-scm" ,python-setuptools-scm)))
3031 ;; Test would require path.py, which would introduce a cyclic dependence.
3032 (arguments `(#:tests? #f))
3033 ;; Note: As of version 1.7 the documentation is not worth building.
3034 (home-page "https://github.com/jaraco/rst.linker")
3035 (synopsis "Sphinx plugin to add links and timestamps")
3036 (description "rst.linker allows to automatically replace text by a
3037reStructuredText external reference or timestamps. It's primary purpose is to
3038augment the changelog, but it can be used for other documents, too.")
3039 (license license:expat)))
3040
3041(define-public python2-rst.linker
3042 (package-with-python2 python-rst.linker))
3043
3044(define-public python-feedgenerator
3045 (package
3046 (name "python-feedgenerator")
3047 (version "1.9")
3048 (source
3049 (origin
3050 (method url-fetch)
3051 (uri (pypi-uri "feedgenerator" version))
3052 (sha256
3053 (base32
3054 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
3055 (modules '((guix build utils)))
3056 (snippet
3057 '(begin
3058 ;; Remove pre-compiled .pyc files from source.
3059 (for-each delete-file-recursively
3060 (find-files "." "__pycache__" #:directories? #t))
3061 (for-each delete-file (find-files "." "\\.pyc$"))
3062 #t))))
3063 (build-system python-build-system)
3064 (propagated-inputs
3065 `(("python-pytz" ,python-pytz)
3066 ("python-six" ,python-six)))
3067 (home-page "https://github.com/getpelican/feedgenerator")
3068 (synopsis
3069 "Standalone version of Django's Atom/RSS feed generator")
3070 (description
3071 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
3072which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
3073 (license license:bsd-3)))
3074
3075(define-public python2-feedgenerator
3076 (package-with-python2 python-feedgenerator))
3077
3078(define-public python-toml
3079 (package
3080 (name "python-toml")
3081 (version "0.9.4")
3082 (source
3083 (origin
3084 (method url-fetch)
3085 (uri (pypi-uri "toml" version))
3086 (sha256
3087 (base32
3088 "0bdbpbip67wdm6c7xwc6mmbmskyradj4cdxn1iibj4fcx1nbv1lf"))))
3089 (build-system python-build-system)
3090 (arguments
3091 `(#:tests? #f)) ;no tests suite in release
3092 (home-page "https://github.com/uiri/toml")
3093 (synopsis "Library for TOML")
3094 (description
3095 "@code{toml} is a library for parsing and creating Tom's Obvious, Minimal
3096Language (TOML) configuration files.")
3097 (license license:expat)))
3098
346c8752
BG
3099(define-public python-jsonrpc-server
3100 (package
3101 (name "python-jsonrpc-server")
d6cf4c6e 3102 (version "0.3.2")
346c8752
BG
3103 (source
3104 (origin
3105 (method url-fetch)
3106 (uri (pypi-uri "python-jsonrpc-server" version))
3107 (sha256
3108 (base32
d6cf4c6e 3109 "0ddgdp26dfxaz6isjbb12974b3rxavgsqrn2zrmck62cmipg5g05"))))
346c8752
BG
3110 (build-system python-build-system)
3111 (propagated-inputs
3112 `(("python-future" ,python-future)
3113 ("python-mock" ,python-mock)
d6cf4c6e
BG
3114 ("python-pytest" ,python-pytest)
3115 ("python-ujson" ,python-ujson)))
346c8752
BG
3116 (home-page
3117 "https://github.com/palantir/python-jsonrpc-server")
3118 (synopsis "JSON RPC 2.0 server library")
3119 (description
1df5407c 3120 "This package provides a JSON RPC 2.0 server library for Python.")
346c8752
BG
3121 (license license:expat)))
3122
56f4ad47
BG
3123(define-public python-pydocstyle
3124 (package
3125 (name "python-pydocstyle")
3126 (version "3.0.0")
3127 (source
3128 (origin
3129 (method url-fetch)
3130 (uri (pypi-uri "pydocstyle" version))
3131 (sha256
3132 (base32
3133 "1m1xv9clkg9lgzyza6dnj359z04vh5g0h49nhzghv7lg81gchhap"))))
3134 (build-system python-build-system)
3135 (propagated-inputs
3136 `(("python-six" ,python-six)
3137 ("python-snowballstemmer" ,python-snowballstemmer)))
3138 (home-page
3139 "https://github.com/PyCQA/pydocstyle/")
3140 (synopsis "Python docstring style checker")
3141 (description
3142 "This package provides a style checker for the Python Language
3143Server (PLS).")
3144 (license license:expat)))
3145
be4d840c 3146(define-public python-language-server
808dd2d0
BL
3147 (package
3148 (name "python-language-server")
a42f1420 3149 (version "0.31.7")
808dd2d0
BL
3150 (source
3151 (origin
3152 (method url-fetch)
3153 (uri (pypi-uri "python-language-server" version))
3154 (sha256
3155 (base32
a42f1420 3156 "0f8rljff4h2ay9m2n9ang7axai37nzd39zd7m6c90rci5wh8cmxh"))))
808dd2d0
BL
3157 (build-system python-build-system)
3158 (propagated-inputs
3159 `(("python-pluggy" ,python-pluggy)
3160 ("python-jsonrpc-server" ,python-jsonrpc-server)
3161 ("python-jedi" ,python-jedi)
3162 ("python-yapf" ,python-yapf)
3163 ("python-pyflakes" ,python-pyflakes)
3164 ("python-pydocstyle" ,python-pydocstyle)
3165 ("python-pycodestyle" ,python-pycodestyle)
3166 ("python-mccabe" ,python-mccabe)
3167 ("python-rope" ,python-rope)
3168 ("python-autopep8" ,python-autopep8)
3169 ("python-flake8" ,python-flake8)
3170 ("python-pylint" ,python-pylint)))
3171 (home-page "https://github.com/palantir/python-language-server")
3172 (synopsis "Python implementation of the Language Server Protocol")
3173 (description
3174 "The Python Language Server (pyls) is an implementation of the Python 3
be4d840c
BG
3175language specification for the Language Server Protocol (LSP). This tool is
3176used in text editing environments to provide a complete and integrated
3177feature-set for programming Python effectively.")
808dd2d0 3178 (license license:expat)))
be4d840c 3179
c777ecb3
RW
3180(define-public python-pathspec
3181 (package
3182 (name "python-pathspec")
3183 (version "0.7.0")
3184 (source
3185 (origin
3186 (method url-fetch)
3187 (uri (pypi-uri "pathspec" version))
3188 (sha256
3189 (base32
3190 "15lvs4awlg8xzl0l4gk9y53xx4yqmqvsv44pglv39m70y85afajn"))))
3191 (build-system python-build-system)
3192 (home-page "https://github.com/cpburnz/python-path-specification")
3193 (synopsis "Utility library for gitignore style pattern matching of file paths")
3194 (description
3195 "This package provides a utility library for gitignore style pattern
3196matching of file paths.")
3197 (license license:mpl2.0)))
3198
44d10b1f
RW
3199(define-public python-black
3200 (package
3201 (name "python-black")
5f603fab 3202 (version "19.10b0")
44d10b1f
RW
3203 (source
3204 (origin
3205 (method url-fetch)
3206 (uri (pypi-uri "black" version))
3207 (sha256
3208 (base32
5f603fab 3209 "0f8mr0yzj78q1dx7v6ggbgfir2wv0n5z2shfbbvfdq7910xbgvf2"))))
44d10b1f
RW
3210 (build-system python-build-system)
3211 (arguments
3212 `(#:phases
3213 (modify-phases %standard-phases
3214 (add-after 'patch-source-shebangs 'patch-extra-shebangs
3215 (lambda _
3216 (let ((python3 (which "python3")))
3217 (substitute* '("tests/data/fmtonoff.py"
3218 "tests/data/string_prefixes.py"
5f603fab
RW
3219 "tests/data/function.py"
3220 "tests/data/python37.py")
44d10b1f
RW
3221 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
3222 (string-append "#!" python3 (if (string? minor-version)
3223 minor-version
5f603fab
RW
3224 "")))))
3225 #t))
3226 (add-after 'unpack 'disable-broken-tests
3227 (lambda _
3228 ;; These tests are supposed to be skipped when the blackd
3229 ;; dependencies are missing, but this doesn't quite work.
3230 (substitute* "tests/test_black.py"
3231 (("( *)class BlackDTestCase.*" match indent)
3232 (string-append indent "@unittest.skip(\"no blackd deps\")\n"
3233 indent "class BlackDTestCase(unittest.TestCase):\n"))
3234 (("web.Application") "False")
3235 (("@unittest_run_loop") ""))
3236
3237 ;; Patching the above file breaks the self test
3238 (substitute* "tests/test_black.py"
3239 (("( *)def test_self" match indent)
3240 (string-append indent "@unittest.skip(\"guix\")\n" match)))
3241 #t)))))
44d10b1f
RW
3242 (propagated-inputs
3243 `(("python-click" ,python-click)
3244 ("python-attrs" ,python-attrs)
3245 ("python-appdirs" ,python-appdirs)
5f603fab
RW
3246 ("python-pathspec" ,python-pathspec)
3247 ("python-regex" ,python-regex)
3248 ("python-toml" ,python-toml)
3249 ("python-typed-ast" ,python-typed-ast)))
3250 (native-inputs
3251 `(("python-setuptools-scm" ,python-setuptools-scm)))
44d10b1f
RW
3252 (home-page "https://github.com/ambv/black")
3253 (synopsis "The uncompromising code formatter")
3254 (description "Black is the uncompromising Python code formatter.")
3255 (license license:expat)))
3256
3257(define-public python-blinker
3258 (package
3259 (name "python-blinker")
3260 (version "1.4")
3261 (source
3262 (origin
3263 (method url-fetch)
3264 (uri (pypi-uri "blinker" version))
3265 (sha256
3266 (base32
3267 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
3268 (build-system python-build-system)
d46646d9 3269 (home-page "https://pythonhosted.org/blinker/")
44d10b1f
RW
3270 (synopsis "Fast, simple object-to-object and broadcast signaling")
3271 (description
3272 "Blinker provides a fast dispatching system that allows any number of
3273interested parties to subscribe to events, or \"signals\".")
3274 (license license:expat)))
3275
3276(define-public python2-blinker
3277 (package-with-python2 python-blinker))
3278
3279(define-public pelican
3280 (package
3281 (name "pelican")
fa9e3b5e 3282 (version "4.2.0")
44d10b1f
RW
3283 (source
3284 (origin
3285 (method url-fetch)
3286 (uri (pypi-uri "pelican" version))
3287 (sha256
3288 (base32
fa9e3b5e 3289 "0mp7hjyhs38ag1hyfcy882g400z0babqi72pnli46dqijfhajzmy"))))
44d10b1f
RW
3290 (build-system python-build-system)
3291 (propagated-inputs
fa9e3b5e
VC
3292 `(("python-blinker" ,python-blinker)
3293 ("python-dateutil" ,python-dateutil)
3294 ("python-docutils" ,python-docutils)
3295 ("python-feedgenerator" ,python-feedgenerator)
44d10b1f 3296 ("python-jinja2" ,python-jinja2)
fa9e3b5e 3297 ("python-markdown" ,python-markdown)
44d10b1f 3298 ("python-pygments" ,python-pygments)
44d10b1f 3299 ("python-pytz" ,python-pytz)
44d10b1f 3300 ("python-six" ,python-six)
fa9e3b5e 3301 ("python-unidecode" ,python-unidecode)))
44d10b1f
RW
3302 (home-page "https://getpelican.com/")
3303 (arguments
3304 `(;; XXX Requires a lot more packages to do unit tests :P
fa9e3b5e 3305 #:tests? #f))
44d10b1f
RW
3306 (synopsis "Python-based static site publishing system")
3307 (description
3308 "Pelican is a tool to generate a static blog from reStructuredText,
3309Markdown input files, and more. Pelican uses Jinja2 for templating
3310and is very extensible.")
3311 (license license:agpl3+)))
3312
8c141421
JH
3313(define-public mallard-ducktype
3314 (package
3315 (name "mallard-ducktype")
12cc3da5 3316 (version "1.0.2")
8c141421
JH
3317 (source
3318 (origin
3319 (method git-fetch)
12cc3da5
JH
3320 ;; git-reference because tests are not included in pypi source tarball
3321 ;; https://issues.guix.gnu.org/issue/36755#2
8c141421
JH
3322 (uri (git-reference
3323 (url "https://github.com/projectmallard/mallard-ducktype.git")
3324 (commit version)))
3325 (file-name (git-file-name name version))
3326 (sha256
3327 (base32
12cc3da5 3328 "1jk9bfz7g04ip78s03b0xak6d54rj4h9zpgadkziy1ji216g6y4c"))))
8c141421 3329 (build-system python-build-system)
5246655f
EF
3330 (arguments
3331 '(#:phases
3332 (modify-phases %standard-phases
3333 (replace 'check
3334 (lambda _
3335 (with-directory-excursion "tests"
3336 (invoke "sh" "runtests")))))))
8c141421
JH
3337 (home-page "http://projectmallard.org")
3338 (synopsis "Convert Ducktype to Mallard documentation markup")
3339 (description
3340 "Ducktype is a lightweight syntax that can represent all the semantics
3341of the Mallard XML documentation system. Ducktype files can be converted to
3342Mallard using the @command{ducktype} tool. The yelp-tools package
3343provides additional functionality on the produced Mallard documents.")
3344 (license license:expat)))
3345
44d10b1f
RW
3346(define-public python-cython
3347 (package
3348 (name "python-cython")
6fd27a71 3349 (version "0.29.13")
44d10b1f
RW
3350 (source
3351 (origin
3352 (method url-fetch)
3353 (uri (pypi-uri "Cython" version))
3354 (sha256
6fd27a71
TGR
3355 (base32
3356 "13k37lrcgagwwnzr5bzririsscb793vndj234d475x1h9ad0d7f2"))))
44d10b1f
RW
3357 (build-system python-build-system)
3358 ;; we need the full python package and not just the python-wrapper
3359 ;; because we need libpython3.3m.so
3360 (inputs
3361 `(("python" ,python)))
3362 (arguments
3363 `(#:phases
3364 (modify-phases %standard-phases
3365 (add-before 'check 'set-HOME
3366 ;; some tests require access to "$HOME/.cython"
3367 (lambda _ (setenv "HOME" "/tmp") #t))
3368
3369 ;; FIXME: These tests started failing on armhf after the 0.28 update
3370 ;; (commit c69d11c5930), both with an error such as this:
3371 ;; compiling (cpp) and running dictcomp ...
3372 ;; === C/C++ compiler error output: ===
3373 ;; ‘
3374 ;; dictcomp.cpp:5221: confused by earlier errors, bailing out
3375 ;; See <https://hydra.gnu.org/build/2948724> for logs.
3376 ,@(if (target-arm32?)
3377 `((add-before 'check 'disable-failing-tests
3378 (lambda _
3379 (let ((disabled-tests (open-file "tests/bugs.txt" "a")))
3380 (for-each (lambda (test)
3381 (format disabled-tests "~a\n" test))
3382 '("memslice" "dictcomp"))
3383 (close-port disabled-tests)))))
3384 '())
3385
3386 (replace 'check
3387 (lambda _
e9194eb0
MB
3388 ;; Disable compiler optimizations to greatly reduce the running
3389 ;; time of the test suite.
3390 (setenv "CFLAGS" "-O0")
3391
3392 (invoke "python" "runtests.py" "-vv"
3393 "-j" (number->string (parallel-job-count))))))))
f319409b 3394 (home-page "https://cython.org/")
44d10b1f
RW
3395 (synopsis "C extensions for Python")
3396 (description "Cython is an optimising static compiler for both the Python
3397programming language and the extended Cython programming language. It makes
3398writing C extensions for Python as easy as Python itself.")
3399 (license license:asl2.0)
3400 (properties `((python2-variant . ,(delay python2-cython))))))
3401
3402(define-public python2-cython
da460865
MB
3403 (let ((base (package-with-python2 (strip-python2-variant python-cython))))
3404 (package
3405 (inherit base)
3406 (name "python2-cython")
3407 (inputs
3408 `(("python-2" ,python-2))) ;this is not automatically changed
3409 (arguments
3410 (substitute-keyword-arguments (package-arguments base)
3411 ((#:phases phases)
3412 `(modify-phases ,phases
3413 (add-before 'check 'adjust-test_embed
3414 (lambda _
3415 (substitute* "runtests.py"
3416 ;; test_embed goes great lengths to find the static libpythonX.Y.a
3417 ;; so it can give the right -L flag to GCC when embedding static
3418 ;; builds of Python. It is unaware that the Python "config"
3419 ;; directory (where the static library lives) was renamed in
3420 ;; Python 3, and falls back to sysconfig.get_config_var('LIBDIR'),
3421 ;; which works fine, because that is where the shared library is.
3422 ;;
3423 ;; It also appears to be unaware that the Makefile in Demos/embed
3424 ;; already unconditionally pass the static library location to GCC,
3425 ;; after checking sysconfig.get_config_var('LIBPL).
3426 ;;
3427 ;; The effect is that the linker is unable to resolve libexpat
3428 ;; symbols when building for Python 2, because neither the Python 2
3429 ;; shared library nor Expat is available. To fix it, we can either
3430 ;; add Expat as an input and make it visible to the linker, or just
3431 ;; prevent it from overriding the Python shared library location.
3432 ;; The end result is identical, so we take the easy route.
3433 ((" or libname not in os\\.listdir\\(libdir\\)")
3434 ""))
3435 #t)))))))))
44d10b1f
RW
3436
3437;; The RPython toolchain currently does not support Python 3.
3438(define-public python2-rpython
3439 (package
3440 (name "python2-rpython")
3441 (version "0.2.1")
3442 (source
3443 (origin
3444 (method url-fetch)
3445 (uri (pypi-uri "rpython" version))
3446 (sha256
3447 (base32
3448 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
3449 (build-system python-build-system)
3450 (arguments `(#:python ,python-2))
3451 (native-inputs
3452 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
3453 (home-page "https://rpython.readthedocs.org")
3454 (synopsis "Framework for implementing interpreters and virtual machines")
3455 (description "RPython is a translation and support framework for
3456producing implementations of dynamic languages, emphasizing a clean separation
3457between language specification and implementation aspects.")
3458 (license license:expat)))
3459
3460;; NOTE: when upgrading numpy please make sure that python-pandas and
3461;; python-scipy still build, as these three packages are often used together.
3462(define-public python-numpy
3463 (package
3464 (name "python-numpy")
8e5fbd5d 3465 (version "1.17.3")
44d10b1f
RW
3466 (source
3467 (origin
3468 (method url-fetch)
3469 (uri (string-append
3470 "https://github.com/numpy/numpy/releases/download/v"
3471 version "/numpy-" version ".tar.gz"))
3472 (sha256
3473 (base32
8e5fbd5d 3474 "1ak9dmjja0q90a7fsxli51ypcwssh8c4pb6f8wkrsnf2xgdk6dy9"))))
44d10b1f
RW
3475 (build-system python-build-system)
3476 (inputs
3477 `(("openblas" ,openblas)
3478 ("lapack" ,lapack)))
3479 (native-inputs
3480 `(("python-cython" ,python-cython)
3481 ("python-pytest" ,python-pytest)
3482 ("gfortran" ,gfortran)))
3483 (arguments
3484 `(#:phases
3485 (modify-phases %standard-phases
3486 (add-before 'build 'configure-blas-lapack
3487 (lambda* (#:key inputs #:allow-other-keys)
3488 (call-with-output-file "site.cfg"
3489 (lambda (port)
3490 (format port
3491 "[openblas]
3492libraries = openblas
3493library_dirs = ~a/lib
3494include_dirs = ~a/include
3495
3496# backslash-n to make emacs happy
3497\n[lapack]
3498lapack_libs = lapack
3499library_dirs = ~a/lib
3500include_dirs = ~a/include
3501"
3502 (assoc-ref inputs "openblas")
3503 (assoc-ref inputs "openblas")
3504 (assoc-ref inputs "lapack")
3505 (assoc-ref inputs "lapack"))))
3506 #t))
3507 (add-before 'build 'fix-executable-paths
3508 (lambda* (#:key inputs #:allow-other-keys)
3509 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
3510 ;; instead of /bin/sh.
3511 (substitute* "numpy/distutils/exec_command.py"
3512 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
3513 (string-append match-start (assoc-ref inputs "bash") match-end)))
3514 ;; Use "gcc" executable, not "cc".
3515 (substitute* "numpy/distutils/system_info.py"
3516 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3517 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
3518 #t))
3519 ;; Tests can only be run after the library has been installed and not
3520 ;; within the source directory.
3521 (delete 'check)
3522 (add-after 'install 'check
3523 (lambda* (#:key outputs inputs #:allow-other-keys)
3524 ;; Make installed package available for running the tests
3525 (add-installed-pythonpath inputs outputs)
3526 ;; Make sure "f2py" etc is found.
3527 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
3528 ":" (getenv "PATH")))
3529 (with-directory-excursion "/tmp"
3530 (invoke "python" "-c"
3531 "import numpy; numpy.test(verbose=2)")))))))
28191bdc 3532 (home-page "https://numpy.org")
44d10b1f
RW
3533 (synopsis "Fundamental package for scientific computing with Python")
3534 (description "NumPy is the fundamental package for scientific computing
3535with Python. It contains among other things: a powerful N-dimensional array
3536object, sophisticated (broadcasting) functions, tools for integrating C/C++
3537and Fortran code, useful linear algebra, Fourier transform, and random number
3538capabilities.")
adb396ea 3539 (properties `((python2-variant . ,(delay python2-numpy))))
44d10b1f
RW
3540 (license license:bsd-3)))
3541
adb396ea 3542;; Numpy 1.16.x are the last versions that support Python 2.
44d10b1f 3543(define-public python2-numpy
adb396ea
MB
3544 (let ((numpy (package-with-python2
3545 (strip-python2-variant python-numpy))))
3546 (package/inherit
3547 numpy
3548 (version "1.16.5")
3549 (source (origin
3550 (method url-fetch)
3551 (uri (string-append
3552 "https://github.com/numpy/numpy/releases/download/v"
3553 version "/numpy-" version ".tar.gz"))
3554 (sha256
3555 (base32
3556 "0lg1cycxzi4rvvrd5zxinpdz0ni792fpx6xjd75z1923zcac8qrb")))))))
44d10b1f
RW
3557
3558;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
3559;; interest only for legacy code going back to NumPy's predecessor
3560;; Numeric.
3561(define-public python2-numpy-1.8
3562 (package (inherit python2-numpy)
3563 (version "1.8.2")
3564 (source
3565 (origin
6b61fc47
EF
3566 (method git-fetch)
3567 (uri (git-reference
3568 (url "https://github.com/numpy/numpy")
3569 (commit (string-append "v" version))))
3570 (file-name (git-file-name "numpy" version))
44d10b1f
RW
3571 (sha256
3572 (base32
6b61fc47 3573 "0ikgi15rsqwbkfsjjxrwh40lqyal2wvyp3923y6w6ch3dcr82sfk"))))
44d10b1f
RW
3574 (arguments
3575 (substitute-keyword-arguments (package-arguments python2-numpy)
3576 ((#:phases phases)
3577 `(modify-phases ,phases
3578 (replace 'configure-blas-lapack
3579 (lambda* (#:key inputs #:allow-other-keys)
3580 (call-with-output-file "site.cfg"
3581 (lambda (port)
3582 (format port
3583 "[openblas]
3584libraries = openblas,lapack
3585library_dirs = ~a/lib:~a/lib
3586include_dirs = ~a/include:~a/include
3587"
3588 (assoc-ref inputs "openblas")
3589 (assoc-ref inputs "lapack")
3590 (assoc-ref inputs "openblas")
3591 (assoc-ref inputs "lapack"))))
3592 #t))))))
3593 (native-inputs
3594 `(("python2-nose" ,python2-nose)))
3595 (description "NumPy is the fundamental package for scientific computing
3596with Python. It contains among other things: a powerful N-dimensional array
3597object, sophisticated (broadcasting) functions, tools for integrating C/C++
3598and Fortran code, useful linear algebra, Fourier transform, and random number
3599capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
3600that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
3601Numeric.")
3602 (license license:bsd-3)))
3603
3604(define-public python-munch
3605 (package
3606 (name "python-munch")
3607 (version "2.0.4")
3608 (source
3609 (origin
3610 (method url-fetch)
3611 (uri (pypi-uri "munch" version))
3612 (sha256
3613 (base32
3614 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3615 (build-system python-build-system)
3616 (home-page "https://github.com/Infinidat/munch")
3617 (synopsis "Dot-accessible dictionary")
3618 (description "Munch is a dot-accessible dictionary similar to JavaScript
3619objects.")
3620 (license license:expat)))
3621
3622(define-public python2-munch
3623 (package-with-python2 python-munch))
3624
3625(define-public python-colormath
3626 (package
3627 (name "python-colormath")
3628 (version "3.0.0")
3629 (source
3630 (origin
3631 (method url-fetch)
3632 (uri (pypi-uri "colormath" version))
3633 (sha256
3634 (base32
3635 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
3636 (build-system python-build-system)
3637 (propagated-inputs
3638 `(("python-networkx" ,python-networkx)
3639 ("python-numpy" ,python-numpy)))
3640 (home-page "https://github.com/gtaylor/python-colormath")
3641 (synopsis "Color math and conversion library")
3642 (description
3643 "This is a Python library for color math and conversions.")
3644 (license license:bsd-3)))
3645
3646(define-public python2-colormath
3647 (package-with-python2 python-colormath))
3648
3649(define-public python-spectra
3650 (package
3651 (name "python-spectra")
3652 (version "0.0.11")
3653 (source
3654 (origin
3655 (method url-fetch)
3656 (uri (pypi-uri "spectra" version))
3657 (sha256
3658 (base32
3659 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
3660 (build-system python-build-system)
3661 (arguments
3662 `(#:phases
3663 (modify-phases %standard-phases
3664 (replace 'check
38ec0f6a 3665 (lambda _ (invoke "nosetests" "-v"))))))
44d10b1f
RW
3666 (propagated-inputs
3667 `(("python-colormath" ,python-colormath)))
3668 (native-inputs
3669 `(("python-nose" ,python-nose)))
3670 (home-page "https://github.com/jsvine/spectra")
3671 (synopsis "Color scales and color conversion")
3672 (description
3673 "This package provides a Python library intended to make color math,
3674color scales, and color space conversion easy. It has support for:
3675
3676@enumerate
3677@item Color scales
3678@item Color ranges
3679@item Color blending
3680@item Brightening/darkening colors
3681@item Saturating/desaturating colors
3682@item Conversion to/from multiple color spaces.
3683@end enumerate\n")
3684 (license license:expat)))
3685
3686(define-public python2-spectra
3687 (package-with-python2 python-spectra))
3688
3689(define-public python-numpy-documentation
3690 (package
3691 (name "python-numpy-documentation")
3692 (version (package-version python-numpy))
3693 (source (package-source python-numpy))
3694 (build-system python-build-system)
3695 (native-inputs
3696 `(("python-matplotlib" ,python-matplotlib)
3697 ("python-numpy" ,python-numpy)
3698 ("pkg-config" ,pkg-config)
3699 ("python-sphinx" ,python-sphinx)
3700 ("python-numpydoc" ,python-numpydoc)
f75aa97f 3701 ("texlive" ,(texlive-union (list texlive-fonts-cm-super
44d10b1f
RW
3702 texlive-fonts-ec
3703 texlive-generic-ifxetex
3704 texlive-generic-pdftex
f75aa97f 3705 texlive-amsfonts
44d10b1f
RW
3706 texlive-latex-capt-of
3707 texlive-latex-cmap
3708 texlive-latex-environ
3709 texlive-latex-eqparbox
3710 texlive-latex-etoolbox
3711 texlive-latex-expdlist
3712 texlive-latex-fancyhdr
3713 texlive-latex-fancyvrb
3714 texlive-latex-fncychap
3715 texlive-latex-float
3716 texlive-latex-framed
3717 texlive-latex-geometry
3718 texlive-latex-graphics
3719 texlive-latex-hyperref
3720 texlive-latex-mdwtools
3721 texlive-latex-multirow
3722 texlive-latex-needspace
3723 texlive-latex-oberdiek
3724 texlive-latex-parskip
3725 texlive-latex-preview
3726 texlive-latex-tabulary
3727 texlive-latex-threeparttable
3728 texlive-latex-titlesec
3729 texlive-latex-trimspaces
3730 texlive-latex-ucs
3731 texlive-latex-upquote
3732 texlive-latex-url
3733 texlive-latex-varwidth
3734 texlive-latex-wrapfig)))
3735 ("texinfo" ,texinfo)
3736 ("perl" ,perl)
3737 ("scipy-sphinx-theme"
3738 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
3739 (method git-fetch)
3740 (uri (git-reference
3741 (url "https://github.com/scipy/scipy-sphinx-theme.git")
3742 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
3743 (sha256
3744 (base32
3745 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
3746 ,@(package-native-inputs python-numpy)))
3747 (arguments
3748 `(#:tests? #f ; we're only generating the documentation
3749 #:phases
3750 (modify-phases %standard-phases
3751 (delete 'build)
3752 (replace 'install
3753 (lambda* (#:key inputs outputs #:allow-other-keys)
3754 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3755 (doc (string-append
3756 data "/doc/" ,name "-"
3757 ,(package-version python-numpy)))
3758 (info-reader (string-append data "/info"))
3759 (html (string-append doc "/html"))
3760 (scipy-sphinx-theme "scipy-sphinx-theme")
3761 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
3762 (pyver ,(string-append "PYVER=")))
3763
3764 ;; FIXME: this is needed to for texlive-union to generate
3765 ;; fonts, which are not found.
3766 (setenv "HOME" "/tmp")
3767
3768 (with-directory-excursion "doc"
3769 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
3770 (mkdir-p html)
4fc898da
RW
3771 (invoke "make" "html" pyver)
3772 (invoke "make" "latex" "PAPER=a4" pyver)
3773 (invoke "make" "-C" "build/latex"
44d10b1f
RW
3774 "all-pdf" "PAPER=a4" pyver)
3775 ;; FIXME: Generation of the info file fails.
4fc898da 3776 ;; (invoke "make" "info" pyver)
44d10b1f
RW
3777 ;; (mkdir-p info)
3778 ;; (copy-file "build/texinfo/numpy.info"
3779 ;; (string-append info "/numpy.info"))
3780 (for-each (lambda (file)
3781 (copy-file (string-append "build/latex" file)
3782 (string-append doc file)))
3783 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3784 (with-directory-excursion "build/html"
3785 (for-each (lambda (file)
3786 (let* ((dir (dirname file))
3787 (tgt-dir (string-append html "/" dir)))
3788 (unless (equal? "." dir)
3789 (mkdir-p tgt-dir))
3790 (install-file file html)))
3791 (find-files "." ".*")))))
3792 #t)))))
3793 (home-page (package-home-page python-numpy))
3794 (synopsis "Documentation for the python-numpy package")
3795 (description (package-description python-numpy))
3796 (license (package-license python-numpy))))
3797
3798(define-public python2-numpy-documentation
3799 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
3800 (package
3801 (inherit numpy-documentation)
3802 (native-inputs `(("python2-functools32" ,python2-functools32)
3803 ,@(package-native-inputs numpy-documentation))))))
3804
3805(define-public python-pygit2
3806 (package
3807 (name "python-pygit2")
7154f5ef 3808 (version "1.1.0")
44d10b1f
RW
3809 (source
3810 (origin
3811 (method url-fetch)
3812 (uri (pypi-uri "pygit2" version))
3813 (sha256
7154f5ef 3814 (base32 "1hs0pqqzn1yjxqk86nq7p0lvsklwnlyi5xwyzr7d5nrs19dmsjbg"))))
44d10b1f
RW
3815 (build-system python-build-system)
3816 (arguments
c3ecab0d 3817 '(#:tests? #f)) ; tests don't run correctly in our environment
44d10b1f 3818 (propagated-inputs
7154f5ef 3819 `(("python-cached-property" ,python-cached-property)
44d10b1f 3820 ("python-cffi" ,python-cffi)
7154f5ef 3821 ("libgit2" ,libgit2)))
44d10b1f
RW
3822 (native-inputs
3823 `(("python-pytest" ,python-pytest)))
3824 (home-page "https://github.com/libgit2/pygit2")
3825 (synopsis "Python bindings for libgit2")
3826 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3827library, libgit2 implements Git plumbing.")
3828 ;; GPL2.0 only, with linking exception.
3829 (license license:gpl2)))
3830
44d10b1f
RW
3831(define-public python-pyparsing
3832 (package
3833 (name "python-pyparsing")
6d3cff5a 3834 (version "2.3.1")
44d10b1f
RW
3835 (source
3836 (origin
3837 (method url-fetch)
3838 (uri (pypi-uri "pyparsing" version))
3839 (sha256
6d3cff5a 3840 (base32 "0yk6xl885b91dmlhlsap7x78hk2rdr879fln9anbq6k4ca42djb6"))))
44d10b1f
RW
3841 (build-system python-build-system)
3842 (outputs '("out" "doc"))
3843 (arguments
3844 `(#:tests? #f ; no test target
3845 #:phases
3846 (modify-phases %standard-phases
3847 (add-after 'install 'install-doc
3848 (lambda* (#:key outputs #:allow-other-keys)
3849 (let* ((doc (string-append (assoc-ref outputs "doc")
3850 "/share/doc/" ,name "-" ,version))
3851 (html-doc (string-append doc "/html"))
3852 (examples (string-append doc "/examples")))
3853 (mkdir-p html-doc)
3854 (mkdir-p examples)
3855 (for-each
3856 (lambda (dir tgt)
3857 (map (lambda (file)
3858 (install-file file tgt))
3859 (find-files dir ".*")))
3860 (list "docs" "htmldoc" "examples")
3861 (list doc html-doc examples))
3862 #t))))))
3863 (home-page "https://github.com/pyparsing/pyparsing")
3864 (synopsis "Python parsing class library")
3865 (description
3866 "The pyparsing module is an alternative approach to creating and
3867executing simple grammars, vs. the traditional lex/yacc approach, or the use
3868of regular expressions. The pyparsing module provides a library of classes
3869that client code uses to construct the grammar directly in Python code.")
3870 (license license:expat)))
3871
3872(define-public python2-pyparsing
3873 (package-with-python2 python-pyparsing))
3874
3875(define-public python-numpydoc
3876 (package
3877 (name "python-numpydoc")
3878 (version "0.8.0")
3879 (source
3880 (origin
3881 (method url-fetch)
3882 (uri (pypi-uri "numpydoc" version))
3883 (sha256
3884 (base32
3885 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
3886 (build-system python-build-system)
3887 (propagated-inputs
3888 `(("python-sphinx" ,python-sphinx)))
3889 (native-inputs
3890 `(("python-nose" ,python-nose)))
e85af137 3891 (home-page "https://pypi.org/project/numpydoc/")
44d10b1f
RW
3892 (synopsis
3893 "Numpy's Sphinx extensions")
3894 (description
3895 "Sphinx extension to support docstrings in Numpy format.")
3896 (license license:bsd-2)))
3897
3898(define-public python2-numpydoc
3899 (package-with-python2 python-numpydoc))
3900
3901(define-public python-numexpr
3902 (package
3903 (name "python-numexpr")
3904 (version "2.6.5")
3905 (source
3906 (origin
3907 (method url-fetch)
3908 (uri (pypi-uri "numexpr" version))
3909 (sha256
3910 (base32
3911 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
3912 (build-system python-build-system)
3913 (arguments `(#:tests? #f)) ; no tests included
3914 (propagated-inputs
3915 `(("python-numpy" ,python-numpy)))
3916 (home-page "https://github.com/pydata/numexpr")
3917 (synopsis "Fast numerical expression evaluator for NumPy")
3918 (description
3919 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3920expressions that operate on arrays are accelerated and use less memory than
3921doing the same calculation in Python. In addition, its multi-threaded
3922capabilities can make use of all your cores, which may accelerate
3923computations, most specially if they are not memory-bounded (e.g. those using
3924transcendental functions).")
3925 (license license:expat)))
3926
3927(define-public python2-numexpr
3928 (package-with-python2 python-numexpr))
3929
3930(define-public python-cycler
3931 (package
3932 (name "python-cycler")
3933 (version "0.10.0")
3934 (source (origin
3935 (method url-fetch)
3936 (uri (pypi-uri "cycler" version))
3937 (sha256
3938 (base32
3939 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
3940 (build-system python-build-system)
3941 (arguments
3942 ;; XXX: The current version requires 'coveralls' which we don't have.
3943 ;; Enable this for the next release which uses 'python-pytest'.
3944 '(#:tests? #f))
3945 (propagated-inputs
3946 `(("python-six" ,python-six)))
3947 (home-page "http://matplotlib.org/cycler/")
3948 (synopsis "Composable keyword argument iterator")
3949 (description
3950 "When using @code{matplotlib} and plotting more than one line, it is
3951common to want to be able to want to be able to cycle over one or more artist
3952styles; but the plotting logic can quickly become involved.
3953To address this and enable easy cycling over arbitrary @code{kwargs}, the
3954@code{Cycler} class was developed.")
3955 (license license:bsd-3)))
3956
3957(define-public python2-cycler
3958 (package-with-python2 python-cycler))
3959
3960(define-public python-colorspacious
3961 (package
3962 (name "python-colorspacious")
53a3ebed 3963 (version "1.1.2")
44d10b1f 3964 (source
dee92e65
TGR
3965 (origin
3966 (method git-fetch)
3967 (uri (git-reference
3968 (url "https://github.com/njsmith/colorspacious.git")
3969 (commit (string-append "v" version))))
3970 (file-name (git-file-name name version))
3971 (sha256
53a3ebed 3972 (base32 "0x7nkphr6g5ql5fvgss8l56rgiyjgh6fm8zzs73i94ci9wzlm63w"))))
44d10b1f
RW
3973 (build-system python-build-system)
3974 (propagated-inputs
3975 `(("python-numpy" ,python-numpy)))
3976 (native-inputs
3977 `(("python-nose" ,python-nose)))
3978 (arguments
3979 `(#:phases
3980 (modify-phases %standard-phases
3981 (replace 'check
3982 (lambda _
c988afda 3983 (invoke "nosetests" "--all-modules" "-v" "colorspacious"))))))
44d10b1f
RW
3984 (home-page "https://github.com/njsmith/colorspacious")
3985 (synopsis "Python library for colorspace conversions")
3986 (description "@code{colorspacious} is a Python library that lets you
3987convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
3988 (license license:expat)))
3989
3990(define-public python2-colorspacious
3991 (package-with-python2 python-colorspacious))
3992
3993(define-public python-matplotlib
3994 (package
3995 (name "python-matplotlib")
9e7cb2f1 3996 (version "3.1.2")
44d10b1f
RW
3997 (source
3998 (origin
3999 (method url-fetch)
4000 (uri (pypi-uri "matplotlib" version))
4001 (sha256
4002 (base32
9e7cb2f1 4003 "1nmshfqh7wyg15i16hx1yiylcvzkws29ivn66n3i0wyqwcpjr3lf"))))
44d10b1f
RW
4004 (build-system python-build-system)
4005 (propagated-inputs ; the following packages are all needed at run time
4006 `(("python-cycler" ,python-cycler)
4007 ("python-kiwisolver" ,python-kiwisolver)
4008 ("python-pyparsing" ,python-pyparsing)
4009 ("python-pygobject" ,python-pygobject)
4010 ("gobject-introspection" ,gobject-introspection)
4011 ("python-tkinter" ,python "tk")
4012 ("python-dateutil" ,python-dateutil)
4013 ("python-numpy" ,python-numpy)
4014 ("python-pillow" ,python-pillow)
4015 ("python-pytz" ,python-pytz)
4016 ("python-six" ,python-six)
44d10b1f
RW
4017 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
4018 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
4019 ;; object. For this reason we need to import both libraries.
5ea654cf 4020 ;; https://cairocffi.readthedocs.io/en/stable/cffi_api.html#converting-pycairo-wrappers-to-cairocffi
44d10b1f 4021 ("python-pycairo" ,python-pycairo)
44d10b1f
RW
4022 ("python-cairocffi" ,python-cairocffi)))
4023 (inputs
4024 `(("libpng" ,libpng)
4025 ("imagemagick" ,imagemagick)
4026 ("freetype" ,freetype)
4027 ("cairo" ,cairo)
4028 ("glib" ,glib)
4029 ;; FIXME: Add backends when available.
4030 ;("python-wxpython" ,python-wxpython)
4031 ("tcl" ,tcl)
4032 ("tk" ,tk)))
4033 (native-inputs
4034 `(("pkg-config" ,pkg-config)
5ea654cf
RW
4035 ("python-pytest" ,python-pytest)
4036 ("python-mock" ,python-mock)
4037 ("unzip" ,unzip)
4038 ("jquery-ui"
4039 ,(origin
4040 (method url-fetch)
4041 (uri "https://jqueryui.com/resources/download/jquery-ui-1.12.1.zip")
4042 (sha256
4043 (base32
4044 "0kb21xf38diqgxcdi1z3s9ssq36pldvyqxy56hn6pcva6rs3c8zq"))))))
44d10b1f
RW
4045 (arguments
4046 `(#:phases
4047 (modify-phases %standard-phases
5ea654cf
RW
4048 ;; XXX We disable all image comparison tests because we're using a
4049 ;; newer version of FreeType than matplotlib expects. This leads to
4050 ;; minor differences throughout the tests.
4051 (add-after 'unpack 'fix-and-disable-failing-tests
4052 (lambda _
4053 (substitute* (append (find-files "lib/matplotlib/tests/"
4054 "test_.*\\.py$")
4055 (find-files "lib/mpl_toolkits/tests"
4056 "test_.*\\.py$"))
4057 (("^from matplotlib" match)
4058 (string-append "import pytest\n" match))
4059 (("( *)@image_comparison" match indent)
4060 (string-append indent
4061 "@pytest.mark.skip(reason=\"unknown minor image differences\")\n"
4062 match)))
4063 (substitute* "lib/matplotlib/tests/test_animation.py"
4064 (("/bin/sh") (which "sh")))
4065 (for-each delete-file
4066 ;; test_normal_axes, test_get_tightbbox_polar
4067 '("lib/matplotlib/tests/test_axes.py"
9e7cb2f1
RW
4068 ;; We don't use the webagg backend and this test forces it.
4069 "lib/matplotlib/tests/test_backend_webagg.py"
5ea654cf
RW
4070 ;; test_outward_ticks
4071 "lib/matplotlib/tests/test_tightlayout.py"
9e7cb2f1
RW
4072 ;; test_hidden_axes fails with minor extent
4073 ;; differences, possibly due to the use of a
4074 ;; different version of FreeType.
4075 "lib/matplotlib/tests/test_constrainedlayout.py"
5ea654cf
RW
4076 ;; Fontconfig returns no fonts.
4077 "lib/matplotlib/tests/test_font_manager.py"))
4078 #t))
4079 (add-before 'install 'install-jquery-ui
4080 (lambda* (#:key outputs inputs #:allow-other-keys)
4081 (let ((dir (string-append (assoc-ref outputs "out")
4082 "/lib/python3.7/site-packages/matplotlib/backends/web_backend/")))
4083 (mkdir-p dir)
4084 (invoke "unzip"
4085 (assoc-ref inputs "jquery-ui")
4086 "-d" dir))
4087 #t))
c09f598d 4088 (replace 'check
5ea654cf
RW
4089 (lambda* (#:key outputs inputs #:allow-other-keys)
4090 (add-installed-pythonpath inputs outputs)
4091 (invoke "python" "tests.py" "-v"
9e7cb2f1 4092 "-m" "not network and not webagg")))
44d10b1f
RW
4093 (add-before 'build 'configure-environment
4094 (lambda* (#:key outputs inputs #:allow-other-keys)
34c2a16b
RW
4095 (let ((cairo (assoc-ref inputs "cairo")))
4096 ;; Setting this directory in the 'basedirlist' of 'setup.cfg'
44d10b1f 4097 ;; has not effect.
34c2a16b 4098 (setenv "LD_LIBRARY_PATH" (string-append cairo "/lib"))
44d10b1f
RW
4099 (setenv "HOME" (getcwd))
4100 (call-with-output-file "setup.cfg"
4101 (lambda (port)
4102 (format port "[directories]~%
4103basedirlist = ~a,~a~%
5ea654cf
RW
4104[packages]~%
4105tests = True~%"
44d10b1f
RW
4106 (assoc-ref inputs "tcl")
4107 (assoc-ref inputs "tk")))))
4108 #t)))))
339b5828 4109 (home-page "https://matplotlib.org/")
44d10b1f
RW
4110 (synopsis "2D plotting library for Python")
4111 (description
4112 "Matplotlib is a Python 2D plotting library which produces publication
4113quality figures in a variety of hardcopy formats and interactive environments
4114across platforms. Matplotlib can be used in Python scripts, the python and
4115ipython shell, web application servers, and six graphical user interface
4116toolkits.")
4117 (license license:psfl)
4118 (properties `((python2-variant . ,(delay python2-matplotlib))))))
4119
4120(define-public python2-matplotlib
4121 (let ((matplotlib (package-with-python2
4122 (strip-python2-variant python-matplotlib))))
4123 (package (inherit matplotlib)
7380df73 4124 (version "2.2.4")
5ea654cf
RW
4125 (source
4126 (origin
4127 (method url-fetch)
4128 (uri (pypi-uri "matplotlib" version))
4129 (sha256
4130 (base32
7380df73 4131 "09i1gnrra1590brc1f8d5rh2zvnknmfgzp613ab0462qkrwj15h2"))))
5d484f42
EF
4132 (arguments
4133 (substitute-keyword-arguments (package-arguments matplotlib)
4134 ((#:phases phases)
4135 `(modify-phases ,phases
66a3c2db
EF
4136 (replace 'install-jquery-ui
4137 (lambda* (#:key outputs inputs #:allow-other-keys)
4138 (let ((dir (string-append (assoc-ref outputs "out")
4139 "/lib/python2.7/site-packages/"
4140 "matplotlib/backends/web_backend/")))
4141 (mkdir-p dir)
4142 (invoke "unzip"
4143 (assoc-ref inputs "jquery-ui")
4144 "-d" dir))
4145 #t))
38a404d5 4146 (delete 'fix-and-disable-failing-tests)
5d484f42 4147 (delete 'check))))) ; These tests weren't run the the past.
44d10b1f
RW
4148 ;; Make sure to use special packages for Python 2 instead
4149 ;; of those automatically rewritten by package-with-python2.
4150 (propagated-inputs
4151 `(("python2-pycairo" ,python2-pycairo)
4152 ("python2-backports-functools-lru-cache"
4153 ,python2-backports-functools-lru-cache)
4154 ("python2-functools32" ,python2-functools32)
4155 ("python2-pygobject-2" ,python2-pygobject-2)
4156 ("python2-subprocess32" ,python2-subprocess32)
4157 ("python2-tkinter" ,python-2 "tk")
4158 ,@(fold alist-delete (package-propagated-inputs matplotlib)
4159 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
4160
4161(define-public python-matplotlib-documentation
4162 (package
4163 (name "python-matplotlib-documentation")
4164 (version (package-version python-matplotlib))
4165 (source (package-source python-matplotlib))
4166 (build-system python-build-system)
4167 (native-inputs
4168 `(("python-matplotlib" ,python-matplotlib)
4169 ("python-colorspacious" ,python-colorspacious)
4170 ("python-sphinx" ,python-sphinx)
5ad0a452 4171 ("python-sphinx-copybutton" ,python-sphinx-copybutton)
44d10b1f
RW
4172 ("python-sphinx-gallery" ,python-sphinx-gallery)
4173 ("python-numpydoc" ,python-numpydoc)
4174 ("python-ipython" ,python-ipython)
e7a53914 4175 ("python-ipykernel" ,python-ipykernel)
44d10b1f
RW
4176 ("python-mock" ,python-mock)
4177 ("graphviz" ,graphviz)
f75aa97f 4178 ("texlive" ,(texlive-union (list texlive-amsfonts
e7a53914
RW
4179 texlive-latex-amsmath
4180 texlive-latex-enumitem
4181 texlive-latex-expdlist
4182 texlive-latex-geometry
4183 texlive-latex-preview
4184 texlive-latex-type1cm
4185 texlive-latex-ucs
4186
4187 texlive-generic-pdftex
4188
e7a53914
RW
4189 texlive-fonts-ec
4190 texlive-fonts-adobe-times
4191 texlive-fonts-txfonts)))
44d10b1f
RW
4192 ("texinfo" ,texinfo)
4193 ,@(package-native-inputs python-matplotlib)))
4194 (arguments
4195 `(#:tests? #f ; we're only generating documentation
4196 #:phases
4197 (modify-phases %standard-phases
5ea654cf
RW
4198 ;; The tests in python-matplotlib are run after the install phase, so
4199 ;; we need to delete the extra phase here.
4200 (delete 'check)
44d10b1f
RW
4201 (replace 'build
4202 (lambda _
4203 (chdir "doc")
e7a53914
RW
4204 (setenv "PYTHONPATH"
4205 (string-append (getenv "PYTHONPATH")
4206 ":" (getcwd) "/../examples/units"))
44d10b1f 4207 (substitute* "conf.py"
e7a53914
RW
4208 ;; Don't use git.
4209 (("^SHA = check_output.*")
4210 (string-append "SHA = \"" ,version "\"\n"))
4211 ;; Don't fetch intersphinx files from the Internet
4212 (("^explicit_order_folders" m)
4213 (string-append "intersphinx_mapping = {}\n" m))
4214 (("'sphinx.ext.intersphinx',") "")
4215 ;; Disable URL embedding which requires internet access.
4216 (("'https://docs.scipy.org/doc/numpy'") "None")
4217 (("'https://docs.scipy.org/doc/scipy/reference'") "None"))
4218 (invoke "make"
4219 "SPHINXBUILD=sphinx-build"
4220 "SPHINXOPTS=" ; don't abort on warnings
4221 "html" "texinfo")))
44d10b1f
RW
4222 (replace 'install
4223 (lambda* (#:key inputs outputs #:allow-other-keys)
4224 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
4225 (doc (string-append data "/doc/python-matplotlib-" ,version))
4226 (info (string-append data "/info"))
4227 (html (string-append doc "/html")))
4228 (mkdir-p html)
4229 (mkdir-p info)
4230 (copy-recursively "build/html" html)
4231 (symlink (string-append html "/_images")
4232 (string-append info "/matplotlib-figures"))
4233 (with-directory-excursion "build/texinfo"
4234 (substitute* "matplotlib.texi"
4235 (("@image\\{([^,]*)" all file)
4236 (string-append "@image{matplotlib-figures/" file)))
4237 (symlink (string-append html "/_images")
4238 "./matplotlib-figures")
e7a53914
RW
4239 (invoke "makeinfo" "--no-split"
4240 "-o" "matplotlib.info" "matplotlib.texi"))
4241 (install-file "build/texinfo/matplotlib.info" info))
44d10b1f
RW
4242 #t)))))
4243 (home-page (package-home-page python-matplotlib))
4244 (synopsis "Documentation for the python-matplotlib package")
4245 (description (package-description python-matplotlib))
4246 (license (package-license python-matplotlib))))
4247
4248(define-public python2-matplotlib-documentation
5ad0a452
RW
4249 (let ((parent (package-with-python2 python-matplotlib-documentation)))
4250 (package
4251 (inherit parent)
4252 (native-inputs
4253 (alist-delete "python-sphinx-copybutton"
4254 (package-native-inputs parent))))))
44d10b1f 4255
55dae98f
RW
4256(define-public python-matplotlib-venn
4257 (package
4258 (name "python-matplotlib-venn")
4259 (version "0.11.5")
4260 (source
4261 (origin
4262 (method url-fetch)
4263 (uri (pypi-uri "matplotlib-venn" version ".zip"))
4264 (sha256
4265 (base32
4266 "13w3i1wih0mij08hrgppzg0g9z50y54rc28l6gdi1r5w45l7l0dy"))))
4267 (build-system python-build-system)
4268 (arguments '(#:tests? #f)) ; tests are not included
4269 (propagated-inputs
4270 `(("python-matplotlib" ,python-matplotlib)
4271 ("python-numpy" ,python-numpy)
4272 ("python-scipy" ,python-scipy)))
4273 (native-inputs
4274 `(("unzip" ,unzip)))
4275 (home-page "https://github.com/konstantint/matplotlib-venn")
4276 (synopsis "Plot area-proportional Venn diagrams")
4277 (description
4278 "This package provides tools for plotting area-proportional two- and
4279three-way Venn diagrams in @code{matplotlib}.")
4280 (license license:expat)))
4281
44d10b1f
RW
4282(define-public python2-pysnptools
4283 (package
4284 (name "python2-pysnptools")
5d1ade85 4285 (version "0.3.13")
44d10b1f
RW
4286 (source
4287 (origin
4288 (method url-fetch)
5d1ade85 4289 (uri (pypi-uri "pysnptools" version))
44d10b1f
RW
4290 (sha256
4291 (base32
5d1ade85 4292 "0lnis5xsl7bi0hz4f7gbicahzi5zlxkc21nk3g374xv8fb5hb3qm"))))
44d10b1f
RW
4293 (build-system python-build-system)
4294 (arguments
5d1ade85
RW
4295 `(#:python ,python-2 ; only Python 2.7 is supported
4296 #:tests? #f)) ; test files (e.g. examples/toydata.bim) not included
44d10b1f
RW
4297 (propagated-inputs
4298 `(("python2-numpy" ,python2-numpy)
4299 ("python2-scipy" ,python2-scipy)
4300 ("python2-pandas" ,python2-pandas)))
44d10b1f 4301 (native-inputs
5d1ade85 4302 `(("python2-cython" ,python2-cython)))
1b66989b 4303 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
44d10b1f
RW
4304 (synopsis "Library for reading and manipulating genetic data")
4305 (description
4306 "PySnpTools is a library for reading and manipulating genetic data. It
4307can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
4308those files. It can also efficiently manipulate ranges of integers using set
4309operators such as union, intersection, and difference.")
4310 (license license:asl2.0)))
4311
44d10b1f
RW
4312(define-public python-socksipy-branch
4313 (package
4314 (name "python-socksipy-branch")
4315 (version "1.01")
4316 (source
4317 (origin
4318 (method url-fetch)
4319 (uri (pypi-uri "SocksiPy-branch" version))
4320 (sha256
4321 (base32
4322 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
4323 (build-system python-build-system)
4324 (arguments
4325 `(#:tests? #f)) ; There are no tests
4326 (home-page "https://code.google.com/archive/p/socksipy-branch/")
4327 (synopsis "Python SOCKS module")
4328 (description
4329 "SocksiPy - A Python SOCKS client module. It provides a
4330socket-like interface that supports connections to any TCP
4331service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
4332The original version was developed by Dan Haim, this is a
4333branch created by Mario Vilas to address some open issues,
4334as the original project seems to have been abandoned circa 2007.")
4335 (license license:bsd-3)))
4336
4337(define-public python2-socksipy-branch
4338 (package-with-python2 python-socksipy-branch))
4339
6fcceb23
AG
4340(define-public python-socksipychain
4341 (package
4342 (name "python-socksipychain")
d97cdff1 4343 (version "2.1.0")
6fcceb23
AG
4344 (source
4345 (origin
4346 (method git-fetch)
4347 (uri (git-reference
4348 (url "https://github.com/pagekite/PySocksipyChain.git")
4349 (commit (string-append "v" version))))
4350 (file-name (git-file-name name version))
4351 (sha256
4352 (base32
d97cdff1 4353 "0idm9a050rd2kbgbz2sk9ib9589kj4xh1xdnggs6xbq2v2y8f6zn"))))
6fcceb23
AG
4354 (build-system python-build-system)
4355 (arguments
4356 `(#:tests? #f)) ; Tests try to access the network.
4357 (home-page "http://pagekite.net/wiki/Floss/PySocksipyChain/")
4358 (synopsis "Python SOCKS module with chained proxies support")
4359 (description
4360 "SocksiPyChain is a modified version of the SocksiPy SOCKS module, which
4361adds support for arbitrary chaining of proxy servers and various modes of
4362TLS/SSL encryption. It was developed for use in PageKite, and also includes
4363a simple netcat replacement with chaining support.")
4364 (license license:bsd-3)))
4365
44d10b1f
RW
4366(define-public python-pycodestyle
4367 (package
4368 (name "python-pycodestyle")
d16ef28b 4369 (version "2.5.0")
44d10b1f 4370 (source
ba88eea2
RW
4371 (origin
4372 (method url-fetch)
4373 (uri (pypi-uri "pycodestyle" version))
4374 (sha256
4375 (base32
d16ef28b 4376 "0v4prb05n21bm8650v0a01k1nyqjdmkrsm3zycfxh2j5k9n962p4"))))
44d10b1f
RW
4377 (build-system python-build-system)
4378 (home-page "https://pycodestyle.readthedocs.io/")
4379 (synopsis "Python style guide checker")
4380 (description "@code{pycodestyle} (formerly pep8) is a tool to check
4381Python code against some of the style conventions in
4382@url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
4383 (license license:expat)))
4384
4385(define-public python2-pycodestyle
4386 (package-with-python2 python-pycodestyle))
4387
4388(define-public python-multidict
4389 (package
4390 (name "python-multidict")
4391 (version "4.2.0")
4392 (source
4393 (origin
4394 (method url-fetch)
4395 (uri (pypi-uri "multidict" version))
4396 (sha256
4397 (base32
4398 "1vf5bq8hn5a9rvhr5v4fwbmarfsp35hhr8gs74kqfijy34j2f194"))))
4399 (build-system python-build-system)
4400 (native-inputs
4401 `(("python-pytest" ,python-pytest)
4402 ("python-pytest-runner" ,python-pytest-runner)))
4403 (home-page "https://github.com/aio-libs/multidict/")
4404 (synopsis "Multidict implementation")
4405 (description "Multidict is dict-like collection of key-value pairs
4406where key might be occurred more than once in the container.")
4407 (license license:asl2.0)))
4408
4409(define-public python-orderedmultidict
4410 (package
4411 (name "python-orderedmultidict")
4412 (version "0.7.11")
4413 (source
4414 (origin
4415 (method url-fetch)
4416 (uri (pypi-uri "orderedmultidict" version))
4417 (sha256
4418 (base32
4419 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
4420 (build-system python-build-system)
4421 (arguments
4422 `(#:phases
4423 (modify-phases %standard-phases
4424 (add-after 'unpack 'fix-tests
4425 (lambda _
4426 ;; The package uses nosetest for running the tests.
4427 ;; Adding this initfile allows to run the test suite
4428 ;; without requiring nosetest.
d1c4f329
RW
4429 (with-output-to-file "tests/__init__.py" newline)
4430 #t)))))
44d10b1f
RW
4431 (propagated-inputs
4432 `(("python-six" ,python-six)))
4433 (native-inputs
4434 `(("python-pycodestyle" ,python-pycodestyle)))
4435 (home-page "https://github.com/gruns/orderedmultidict")
4436 (synopsis "Python Ordered Multivalue Dictionary - omdict")
4437 (description "This package contains a library for ordered multivalue
4438dictionaries. A multivalue dictionary is a dictionary that can store
4439multiple values for the same key. An ordered multivalue dictionary is a
4440multivalue dictionary that retains the order of insertions and deletions.")
4441 (license license:unlicense)))
4442
4443(define-public python2-orderedmultidict
4444 (package-with-python2 python-orderedmultidict))
4445
4446(define-public python-autopep8
4447 (package
4448 (name "python-autopep8")
4449 (version "1.3.5")
4450 (source
4451 (origin
4452 (method url-fetch)
4453 (uri (pypi-uri "autopep8" version))
4454 (sha256
4455 (base32
4456 "192bvhzi4d0claqxgzymvv7k3qnj627742bc8sgxpzjj42pd9112"))))
4457 (build-system python-build-system)
4458 (propagated-inputs
4459 `(("python-pycodestyle" ,python-pycodestyle)))
4460 (home-page "https://github.com/hhatto/autopep8")
4461 (synopsis "Format Python code according to the PEP 8 style guide")
4462 (description
4463 "@code{autopep8} automatically formats Python code to conform to
4464the PEP 8 style guide. It uses the pycodestyle utility to determine
4465what parts of the code needs to be formatted. @code{autopep8} is
4466capable of fixing most of the formatting issues that can be reported
4467by pycodestyle.")
4468 (license (license:non-copyleft
4469 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
4470
4471(define-public python2-autopep8
4472 (package-with-python2 python-autopep8))
4473
f2a64830
JK
4474(define-public python-distlib
4475 (package
4476 (name "python-distlib")
4477 (version "0.3.0")
4478 (source
4479 (origin
4480 (method url-fetch)
4481 (uri (pypi-uri "distlib" version ".zip"))
4482 (sha256
4483 (base32
4484 "08fyi2r246733vharl2yckw20rilci28r91mzrnnvcr638inw5if"))))
4485 (build-system python-build-system)
4486 (arguments
4487 `(#:phases
4488 (modify-phases %standard-phases
4489 (add-before 'build 'no-/bin/sh
4490 (lambda _
4491 (substitute* '("distlib/scripts.py" "tests/test_scripts.py")
4492 (("/bin/sh") (which "sh")))
4493 #t))
4494 (add-before 'check 'prepare-test-env
4495 (lambda _
4496 (setenv "HOME" "/tmp")
4497 ;; NOTE: Any value works, the variable just has to be present.
4498 (setenv "SKIP_ONLINE" "1")
4499 #t)))))
4500 (native-inputs `(("unzip" ,unzip)))
4501 (home-page "https://bitbucket.org/pypa/distlib")
4502 (synopsis "Distribution utilities")
4503 (description "Distlib is a library which implements low-level functions that
4504relate to packaging and distribution of Python software. It is intended to be
4505used as the basis for third-party packaging tools.")
4506 (license license:psfl)))
4507
44d10b1f
RW
4508(define-public python-distutils-extra
4509 (package
4510 (name "python-distutils-extra")
4511 (version "2.38")
4512 (source
4513 (origin
4514 (method url-fetch)
4515 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4516 version "/+download/python-distutils-extra-"
4517 version ".tar.gz"))
4518 (sha256
4519 (base32
4520 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4521 (build-system python-build-system)
4522 (home-page "https://launchpad.net/python-distutils-extra/")
4523 (synopsis "Enhancements to Python's distutils")
4524 (description
4525 "The python-distutils-extra module enables you to easily integrate
4526gettext support, themed icons, and scrollkeeper-based documentation into
4527Python's distutils.")
4528 (license license:gpl2)))
4529
4530(define-public python2-distutils-extra
4531 (package-with-python2 python-distutils-extra))
4532
4533(define-public python2-elib.intl
4534 (package
4535 (name "python2-elib.intl")
4536 (version "0.0.3")
4537 (source
4538 (origin
4539 ;; This project doesn't tag releases or publish tarballs, so we take
4540 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4541 (method git-fetch)
4542 (uri (git-reference
4543 (url "https://github.com/dieterv/elib.intl.git")
4544 (commit "d09997cfef")))
4545 (file-name (string-append name "-" version "-checkout"))
4546 (sha256
4547 (base32
4548 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4549 (build-system python-build-system)
4550 (arguments
4551 ;; incompatible with Python 3 (exception syntax)
4552 `(#:python ,python-2
4553 #:tests? #f))
4554 (home-page "https://github.com/dieterv/elib.intl")
4555 (synopsis "Enhanced internationalization for Python")
4556 (description
4557 "The elib.intl module provides enhanced internationalization (I18N)
4558services for your Python modules and applications.")
4559 (license license:lgpl3+)))
4560
4561(define-public python-olefile
4562 (package
4563 (name "python-olefile")
5bef0f10 4564 (version "0.46")
44d10b1f
RW
4565 (source
4566 (origin
4567 (method url-fetch)
5bef0f10
MB
4568 (uri (string-append "https://github.com/decalage2/olefile/releases/"
4569 "download/v" version "/olefile-" version ".tar.gz"))
44d10b1f
RW
4570 (file-name (string-append name "-" version ".tar.gz"))
4571 (sha256
4572 (base32
5bef0f10 4573 "1kjxh4gr651hpqkjfv89cfzr40hyvf3vjlda7mifiail83j7j07m"))))
44d10b1f 4574 (build-system python-build-system)
5bef0f10 4575 (home-page "https://www.decalage.info/python/olefileio")
44d10b1f
RW
4576 (synopsis "Read and write Microsoft OLE2 files.")
4577 (description
4578 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
4579Storage or Compound Document, Microsoft Office). It is an improved version of
4580the OleFileIO module from PIL, the Python Image Library.")
4581 (license license:bsd-3)))
4582
4583(define-public python2-olefile
4584 (package-with-python2 python-olefile))
4585
4586(define-public python-pillow
4587 (package
4588 (name "python-pillow")
5fbdd917 4589 (version "6.2.1")
44d10b1f
RW
4590 (source
4591 (origin
4592 (method url-fetch)
4593 (uri (pypi-uri "Pillow" version))
4594 (sha256
4595 (base32
5fbdd917 4596 "1c8wkzc58f5wdh006jvmwdk3wxld1xgagcbdvj7iv17qi0m9fkmz"))))
44d10b1f
RW
4597 (build-system python-build-system)
4598 (native-inputs
4599 `(("python-pytest" ,python-pytest)))
4600 (inputs
4601 `(("freetype" ,freetype)
4602 ("lcms" ,lcms)
44d10b1f 4603 ("libjpeg" ,libjpeg)
44d10b1f 4604 ("libtiff" ,libtiff)
0c4e1c5f
EF
4605 ("libwebp" ,libwebp)
4606 ("openjpeg" ,openjpeg)
4607 ("zlib" ,zlib)))
44d10b1f
RW
4608 (propagated-inputs
4609 `(("python-olefile" ,python-olefile)))
4610 (arguments
4611 `(#:phases
4612 (modify-phases %standard-phases
4613 (add-after 'unpack 'patch-ldconfig
4614 (lambda _
4615 (substitute* "setup.py"
4616 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
61b77ff3 4617 (replace 'check
979d8464
EF
4618 (lambda* (#:key outputs inputs tests? #:allow-other-keys)
4619 (if tests?
4620 (begin
4621 (setenv "HOME" (getcwd))
4622 ;; Make installed package available for running the tests.
4623 (add-installed-pythonpath inputs outputs)
4624 (invoke "python" "selftest.py" "--installed")
4625 (invoke "python" "-m" "pytest" "-vv"))
4626 #t))))))
44d10b1f
RW
4627 (home-page "https://python-pillow.org")
4628 (synopsis "Fork of the Python Imaging Library")
4629 (description
4630 "The Python Imaging Library adds image processing capabilities to your
4631Python interpreter. This library provides extensive file format support, an
4632efficient internal representation, and fairly powerful image processing
4633capabilities. The core image library is designed for fast access to data
4634stored in a few basic pixel formats. It should provide a solid foundation for
4635a general image processing tool.")
4636 (license (license:x11-style
4637 "http://www.pythonware.com/products/pil/license.htm"
4638 "The PIL Software License"))))
4639
4640(define-public python2-pillow
4641 (package-with-python2 python-pillow))
4642
4643(define-public python-pycparser
4644 (package
4645 (name "python-pycparser")
c6c0940e 4646 (version "2.19")
44d10b1f
RW
4647 (source
4648 (origin
4649 (method url-fetch)
4650 (uri (pypi-uri "pycparser" version))
4651 (sha256
4652 (base32
c6c0940e 4653 "1cr5dcj9628lkz1qlwq3fv97c25363qppkmcayqvd05dpy573259"))))
44d10b1f
RW
4654 (outputs '("out" "doc"))
4655 (build-system python-build-system)
4656 (native-inputs
4657 `(("pkg-config" ,pkg-config)))
4658 (arguments
4659 `(#:phases
4660 (modify-phases %standard-phases
4661 (replace 'check
4662 (lambda _
4663 (with-directory-excursion "tests"
acb75c03
RW
4664 (invoke "python" "all_tests.py"))
4665 #t))
44d10b1f
RW
4666 (add-after 'install 'install-doc
4667 (lambda* (#:key outputs #:allow-other-keys)
4668 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4669 (doc (string-append data "/doc/" ,name "-" ,version))
4670 (examples (string-append doc "/examples")))
4671 (mkdir-p examples)
4672 (for-each (lambda (file)
4673 (copy-file (string-append "." file)
4674 (string-append doc file)))
4675 '("/README.rst" "/CHANGES" "/LICENSE"))
c6c0940e
MB
4676 (copy-recursively "examples" examples)
4677 #t))))))
44d10b1f
RW
4678 (home-page "https://github.com/eliben/pycparser")
4679 (synopsis "C parser in Python")
4680 (description
4681 "Pycparser is a complete parser of the C language, written in pure Python
4682using the PLY parsing library. It parses C code into an AST and can serve as
4683a front-end for C compilers or analysis tools.")
4684 (license license:bsd-3)))
4685
4686(define-public python2-pycparser
4687 (package-with-python2 python-pycparser))
4688
4689(define-public python-pywavelets
4690 (package
4691 (name "python-pywavelets")
4692 (version "1.0.1")
4693 (home-page "https://github.com/PyWavelets/pywt")
4694 (source (origin
4695 (method url-fetch)
4696 (uri (pypi-uri "PyWavelets" version))
4697 (sha256
4698 (base32
4699 "1p3qv2v66ghnqrb1f98wyyhp9dz71jwcd6kfpsax65sfdpiyqp1w"))))
4700 (build-system python-build-system)
4701 (arguments
4702 '(#:modules ((ice-9 ftw)
4703 (srfi srfi-1)
4704 (srfi srfi-26)
4705 (guix build utils)
4706 (guix build python-build-system))
4707 #:phases (modify-phases %standard-phases
4708 (replace 'check
4709 (lambda _
4710 (let ((cwd (getcwd))
4711 (libdir (find (cut string-prefix? "lib." <>)
4712 (scandir "build"))))
4713 (with-directory-excursion (string-append cwd "/build/" libdir)
4714 (invoke "nosetests" "-v" "."))))))))
4715 (native-inputs
4716 `(("python-matplotlib" ,python-matplotlib) ;for tests
4717 ("python-nose" ,python-nose)))
4718 (propagated-inputs
4719 `(("python-numpy" ,python-numpy)))
4720 (synopsis "Wavelet transforms in Python")
4721 (description
4722 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
4723mathematical basis functions that are localized in both time and frequency.
4724Wavelet transforms are time-frequency transforms employing wavelets. They are
4725similar to Fourier transforms, the difference being that Fourier transforms are
4726localized only in frequency instead of in time and frequency.")
4727 (license license:expat)))
4728
4729(define-public python2-pywavelets
4730 (package-with-python2 python-pywavelets))
4731
4732(define-public python-xcffib
4733 (package
4734 (name "python-xcffib")
4735 (version "0.6.0")
4736 (source
4737 (origin
4738 (method url-fetch)
4739 (uri (pypi-uri "xcffib" version))
4740 (sha256
4741 (base32
4742 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
4743 (build-system python-build-system)
4744 (inputs
4745 `(("libxcb" ,libxcb)))
4746 (propagated-inputs
4747 `(("python-cffi" ,python-cffi) ; used at run time
4748 ("python-six" ,python-six)))
4749 (arguments
4750 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
4751 #:tests? #f
4752 #:phases
4753 (modify-phases %standard-phases
4754 (add-after 'unpack 'fix-libxcb-path
4755 (lambda* (#:key inputs #:allow-other-keys)
4756 (let ((libxcb (assoc-ref inputs "libxcb")))
4757 (substitute* '("xcffib/__init__.py")
4758 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
4759 #t)))
4760 (add-after 'install 'install-doc
4761 (lambda* (#:key outputs #:allow-other-keys)
4762 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4763 "/doc/" ,name "-" ,version)))
4764 (mkdir-p doc)
4765 (copy-file "README.md"
4766 (string-append doc "/README.md"))
4767 #t))))))
4768 (home-page "https://github.com/tych0/xcffib")
4769 (synopsis "XCB Python bindings")
4770 (description
4771 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4772support for Python 3 and PyPy. It is based on cffi.")
4773 (license license:expat)))
4774
4775(define-public python2-xcffib
4776 (package-with-python2 python-xcffib))
4777
4778(define-public python-cairocffi
4779 (package
4780 (name "python-cairocffi")
4781 (version "0.9.0")
4782 (source
4783 (origin
4784 (method url-fetch)
4785 (uri (pypi-uri "cairocffi" version))
4786 (sha256
4787 (base32
4788 "0dq3k4zhqd8cwsf3nyjqvjqm8wkvrjn1wjf44rl3v0h8kqx6qf0m"))
4789 (patches (search-patches "python-cairocffi-dlopen-path.patch"))))
4790 (build-system python-build-system)
4791 (outputs '("out" "doc"))
4792 (inputs
4793 `(("glib" ,glib)
4794 ("gtk+" ,gtk+)
4795 ("gdk-pixbuf" ,gdk-pixbuf)
4796 ("cairo" ,cairo)
4797 ("pango" ,pango)))
4798 (native-inputs
4799 `(("pkg-config" ,pkg-config)
4800 ("python-pytest" ,python-pytest)
4801 ("python-pytest-cov" ,python-pytest-cov)
4802 ("python-pytest-runner" ,python-pytest-runner)
4803 ("python-sphinx" ,python-sphinx)
4804 ("python-docutils" ,python-docutils)))
4805 (propagated-inputs
4806 `(("python-xcffib" ,python-xcffib))) ; used at run time
4807 (arguments
4808 `(#:phases
4809 (modify-phases %standard-phases
4810 (add-after 'unpack 'patch-paths
4811 (lambda* (#:key inputs outputs #:allow-other-keys)
4812 (substitute* (find-files "." "\\.py$")
4813 (("dlopen\\(ffi, 'cairo'")
4814 (string-append "dlopen(ffi, '" (assoc-ref inputs "cairo")
4815 "/lib/libcairo.so.2'"))
4816 (("dlopen\\(ffi, 'gdk-3'")
4817 (string-append "dlopen(ffi, '" (assoc-ref inputs "gtk+")
4818 "/lib/libgtk-3.so.0'"))
4819 (("dlopen\\(ffi, 'gdk_pixbuf-2.0'")
4820 (string-append "dlopen(ffi, '" (assoc-ref inputs "gdk-pixbuf")
4821 "/lib/libgdk_pixbuf-2.0.so.0'"))
4822 (("dlopen\\(ffi, 'glib-2.0'")
4823 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4824 "/lib/libglib-2.0.so.0'"))
4825 (("dlopen\\(ffi, 'gobject-2.0'")
4826 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4827 "/lib/libgobject-2.0.so.0'"))
4828 (("dlopen\\(ffi, 'pangocairo-1.0'")
4829 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4830 "/lib/libpangocairo-1.0.so.0'"))
4831 (("dlopen\\(ffi, 'pango-1.0'")
4832 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4833 "/lib/libpango-1.0.so.0'")))
4834 #t))
4835 (add-after 'install 'install-doc
4836 (lambda* (#:key inputs outputs #:allow-other-keys)
4837 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4838 (doc (string-append data "/doc/" ,name "-" ,version))
4839 (html (string-append doc "/html")))
4840 (setenv "LD_LIBRARY_PATH"
4841 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4842 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4843 (setenv "LANG" "en_US.UTF-8")
4844 (mkdir-p html)
4845 (for-each (lambda (file)
4846 (copy-file (string-append "." file)
4847 (string-append doc file)))
4848 '("/README.rst" "/CHANGES" "/LICENSE"))
4849 (system* "python" "setup.py" "build_sphinx")
4850 (copy-recursively "docs/_build/html" html)
4851 #t))))))
4852 (home-page "https://github.com/Kozea/cairocffi")
4853 (synopsis "Python bindings and object-oriented API for Cairo")
4854 (description
4855 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4856Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4857graphics library with support for multiple backends including image buffers,
4858PNG, PostScript, PDF, and SVG file output.")
4859 (license license:bsd-3)))
4860
4861(define-public python2-cairocffi
4862 (package-with-python2 python-cairocffi))
4863
4864(define-public python-decorator
4865 (package
4866 (name "python-decorator")
4867 (version "4.3.0")
4868 (source
4869 (origin
4870 (method url-fetch)
4871 (uri (pypi-uri "decorator" version))
4872 (sha256
4873 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
4874 (build-system python-build-system)
e85af137 4875 (home-page "https://pypi.org/project/decorator/")
44d10b1f
RW
4876 (synopsis "Python module to simplify usage of decorators")
4877 (description
4878 "The aim of the decorator module is to simplify the usage of decorators
4879for the average programmer, and to popularize decorators usage giving examples
4880of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4881etc. The core of this module is a decorator factory.")
4882 (license license:expat)))
4883
4884(define-public python2-decorator
4885 (package-with-python2 python-decorator))
4886
4887(define-public python-drmaa
4888 (package
4889 (name "python-drmaa")
4890 (version "0.7.7")
4891 (source
4892 (origin
4893 (method url-fetch)
4894 (uri (pypi-uri "drmaa" version))
4895 (sha256
4896 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
4897 (build-system python-build-system)
4898 ;; The test suite requires libdrmaa which is provided by the cluster
4899 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4900 ;; should be set to the path of the libdrmaa library.
4901 (arguments '(#:tests? #f))
4902 (native-inputs
4903 `(("python-nose" ,python-nose)))
e85af137 4904 (home-page "https://pypi.org/project/drmaa/")
44d10b1f
RW
4905 (synopsis "Python bindings for the DRMAA library")
4906 (description
4907 "A Python package for Distributed Resource Management (DRM) job
4908submission and control. This package is an implementation of the DRMAA 1.0
4909Python language binding specification.")
4910 (license license:bsd-3)))
4911
4912(define-public python2-drmaa
4913 (package-with-python2 python-drmaa))
4914
4915(define-public python-grako
4916 (package
4917 (name "python-grako")
4918 (version "3.99.9")
4919 (source
4920 (origin
4921 (method url-fetch)
4922 (uri
4923 (pypi-uri "grako" version ".zip"))
4924 (sha256
4925 (base32
4926 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
4927 (build-system python-build-system)
4928 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
4929 (native-inputs
4930 `(("unzip" ,unzip)
4931 ("python-pytest" ,python-pytest)
4932 ("python-pytest-runner" ,python-pytest-runner)))
4933 (home-page "https://bitbucket.org/neogeny/grako")
4934 (synopsis "EBNF parser generator")
4935 (description
4936 "Grako takes a grammar in a variation of EBNF as input, and outputs a
4937memoizing PEG/Packrat parser in Python.")
4938 (license license:bsd-3)))
4939
4940(define-public python2-grako
4941 (package-with-python2 python-grako))
4942
4943(define-public python-gridmap
4944 (package
4945 (name "python-gridmap")
4946 (version "0.13.0")
4947 (source
4948 (origin
768fea0f
TGR
4949 (method git-fetch)
4950 (uri (git-reference
4951 (url "https://github.com/pygridtools/gridmap.git")
4952 (commit (string-append "v" version))))
4953 (file-name (git-file-name name version))
44d10b1f 4954 (sha256
768fea0f 4955 (base32 "1478lbwsr1w24cii2x01m2910fvh8r43ghnb78nc972a96hqiknm"))))
44d10b1f
RW
4956 (build-system python-build-system)
4957 (arguments
4958 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
4959 (propagated-inputs
4960 `(("python-psutil" ,python-psutil)
4961 ("python-drmaa" ,python-drmaa)
4962 ("python-pyzmq" ,python-pyzmq)))
4963 (home-page "https://github.com/pygridtools/gridmap")
4964 (synopsis "Create jobs on a cluster directly from Python")
4965 (description
4966 "Gridmap is a Python package to allow you to easily create jobs on the
4967cluster directly from Python. You can directly map Python functions onto the
4968cluster without needing to write any wrapper code yourself.")
4969 (license license:gpl3+)))
4970
4971(define-public python2-gridmap
4972 (package-with-python2 python-gridmap))
4973
4974(define-public python-honcho
4975 (package
4976 (name "python-honcho")
4977 (version "1.0.1")
4978 (source
4979 (origin
8524d130
TGR
4980 (method git-fetch)
4981 (uri (git-reference
4982 (url "https://github.com/nickstenning/honcho.git")
4983 (commit (string-append "v" version))))
4984 (file-name (git-file-name name version))
44d10b1f 4985 (sha256
8524d130 4986 (base32 "11bd87474qpif20xdcn0ra1idj5k16ka51i658wfpxwc6nzsn92b"))))
44d10b1f
RW
4987 (build-system python-build-system)
4988 (native-inputs
4989 `(("python-pytest" ,python-pytest)
4990 ("python-mock" ,python-mock)
4991 ("python-tox" ,python-tox)
4992 ("which" ,which))) ;for tests
4993 (propagated-inputs
4994 `(("python-jinja2" ,python-jinja2)))
4995 (arguments
4996 `(#:phases
4997 (modify-phases %standard-phases
4998 (delete 'check)
4999 (add-after 'install 'check
5000 (lambda* (#:key outputs inputs #:allow-other-keys)
5001 ;; fix honcho path in testsuite
5002 (substitute* "tests/conftest.py"
5003 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
5004 "/bin/honcho" "'")))
5005 ;; It's easier to run tests after install.
5006 ;; Make installed package available for running the tests
5007 (add-installed-pythonpath inputs outputs)
95b707fb 5008 (invoke "py.test" "-v"))))))
44d10b1f
RW
5009 (home-page "https://github.com/nickstenning/honcho")
5010 (synopsis "Manage Procfile-based applications")
5011 (description
5012 "A Procfile is a file which describes how to run an application
50fceab0 5013consisting of several processes. honcho starts all listed processes.
44d10b1f
RW
5014The output of all running processes is collected by honcho and
5015displayed.")
5016 (license license:expat)))
5017
5018(define-public python2-honcho
5019 (package-with-python2 python-honcho))
5020
5021(define-public python-pexpect
5022 (package
5023 (name "python-pexpect")
5024 (version "4.6.0")
5025 (source
5026 (origin
5027 (method url-fetch)
5028 (uri (pypi-uri "pexpect" version))
5029 (sha256
5030 (base32 "1fla85g47iaxxpjhp9vkxdnv4pgc7rplfy6ja491smrrk0jqi3ia"))))
5031 (build-system python-build-system)
5032 (arguments
5033 `(#:phases
5034 (modify-phases %standard-phases
5035 (add-before 'check 'prepare-tests
5036 (lambda _
5037 (substitute* (find-files "tests")
5038 (("/bin/ls") (which "ls"))
5039 (("/bin/echo") (which "echo"))
5040 (("/bin/which") (which "which"))
5041 ;; Many tests try to use the /bin directory which
5042 ;; is not present in the build environment.
5043 ;; Use one that's non-empty and unlikely to change.
5044 (("/bin'") "/dev'"))
5045 ;; XXX: Socket connection test gets "Connection reset by peer".
5046 ;; Why does it not work? Delete for now.
5047 (delete-file "tests/test_socket.py")
5048 #t))
5049 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
5050 (native-inputs
5051 `(("python-nose" ,python-nose)
5052 ("python-pytest" ,python-pytest)
5053 ("man-db" ,man-db)
5054 ("which" ,which)
5055 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
5056 (propagated-inputs
5057 `(("python-ptyprocess" ,python-ptyprocess)))
5058 (home-page "http://pexpect.readthedocs.org/")
5059 (synopsis "Controlling interactive console applications")
5060 (description
5061 "Pexpect is a pure Python module for spawning child applications;
5062controlling them; and responding to expected patterns in their output.
5063Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
5064child application and control it as if a human were typing commands.")
5065 (license license:isc)))
5066
5067(define-public python2-pexpect
5068 (package-with-python2 python-pexpect))
5069
5070(define-public python-setuptools-scm
5071 (package
5072 (name "python-setuptools-scm")
85092643 5073 (version "3.2.0")
44d10b1f
RW
5074 (source (origin
5075 (method url-fetch)
5076 (uri (pypi-uri "setuptools_scm" version))
5077 (sha256
5078 (base32
85092643 5079 "0n3knn3p1sqlx31k2lahn7z9bacvlv8nhlfidj77vz50bxqlgasj"))))
44d10b1f
RW
5080 (build-system python-build-system)
5081 (home-page "https://github.com/pypa/setuptools_scm/")
5082 (synopsis "Manage Python package versions in SCM metadata")
5083 (description
5084 "Setuptools_scm handles managing your Python package versions in
5085@dfn{software configuration management} (SCM) metadata instead of declaring
5086them as the version argument or in a SCM managed file.")
5087 (license license:expat)))
5088
a0b2accf
MO
5089;; Needed by python-lazy-object-proxy, remove on next update cycle.
5090(define-public python-setuptools-scm-3.3
5091 (package
5092 (inherit python-setuptools-scm)
5093 (version "3.3.3")
5094 (source (origin
5095 (method url-fetch)
5096 (uri (pypi-uri "setuptools_scm" version))
5097 (sha256
5098 (base32
5099 "19cyndx23xmpbhz4qrwmfwsmnnaczd0dw7qg977ksq2dbvxy29dx"))))))
5100
44d10b1f
RW
5101(define-public python2-setuptools-scm
5102 (package-with-python2 python-setuptools-scm))
5103
bb74ea09
RW
5104(define-public python-pathlib2
5105 (package
5106 (name "python-pathlib2")
5107 (version "2.3.3")
5108 (source
5109 (origin
5110 (method url-fetch)
5111 (uri (pypi-uri "pathlib2" version))
5112 (sha256
5113 (base32
5114 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
5115 (build-system python-build-system)
5116 (propagated-inputs
5117 `(("python-scandir" ,python-scandir)
5118 ("python-six" ,python-six)))
e85af137 5119 (home-page "https://pypi.org/project/pathlib2/")
746d3384 5120 (synopsis "Object-oriented file system paths")
bb74ea09
RW
5121 (description "The goal of pathlib2 is to provide a backport of the
5122standard @code{pathlib} module which tracks the standard library module, so
5123all the newest features of the standard @code{pathlib} can be used also on
5124older Python versions.")
5125 (license license:expat)))
5126
fd5c264a
MB
5127(define-public python2-importlib-resources
5128 (package
5129 (name "python2-importlib-resources")
5130 (version "1.0.2")
5131 (source (origin
5132 (method url-fetch)
5133 (uri (pypi-uri "importlib_resources" version))
5134 (sha256
5135 (base32
5136 "0y3hg12iby1qyaspnbisz4s4vxax7syikk3skznwqizqyv89y9yk"))))
5137 (build-system python-build-system)
5138 (arguments
5139 `(#:python ,python-2))
5140 (native-inputs
5141 `(("python-wheel" ,python2-wheel)))
5142 (propagated-inputs
5143 `(("python-pathlib2" ,python2-pathlib2)
5144 ("python-typing" ,python2-typing)))
5145 (home-page "https://gitlab.com/python-devs/importlib_resources")
5146 (synopsis "Backport of @code{importlib.resources} from Python 3.7")
5147 (description
5148 "This package provides an implementation of @code{importlib.resources}
5149for older versions of Python.")
5150 (license license:asl2.0)))
5151
15b65617
RW
5152(define-public python-importlib-metadata
5153 (package
5154 (name "python-importlib-metadata")
4dc04d11 5155 (version "1.4.0")
15b65617
RW
5156 (source
5157 (origin
5158 (method url-fetch)
5159 (uri (pypi-uri "importlib_metadata" version))
5160 (sha256
4dc04d11 5161 (base32 "1n76444v7zn910xrhh8954jdn4byxbn9f1jck6b85a716mbh2z7i"))))
15b65617
RW
5162 (build-system python-build-system)
5163 (propagated-inputs
4dc04d11 5164 `(("python-zipp" ,python-zipp)))
15b65617
RW
5165 (native-inputs
5166 `(("python-setuptools-scm" ,python-setuptools-scm)
4dc04d11 5167 ("python-packaging" ,python-packaging)))
15b65617
RW
5168 (home-page "https://importlib-metadata.readthedocs.io/")
5169 (synopsis "Read metadata from Python packages")
5170 (description
5171 "@code{importlib_metadata} is a library which provides an API for
5172accessing an installed Python package's metadata, such as its entry points or
5173its top-level name. This functionality intends to replace most uses of
5174@code{pkg_resources} entry point API and metadata API. Along with
5175@code{importlib.resources} in Python 3.7 and newer, this can eliminate the
5176need to use the older and less efficient @code{pkg_resources} package.")
3dfb3d44 5177 (properties `((python2-variant . ,(delay python2-importlib-metadata))))
15b65617
RW
5178 (license license:asl2.0)))
5179
5efa04dd
MB
5180(define-public python2-importlib-metadata
5181 (let ((base (package-with-python2 (strip-python2-variant
5182 python-importlib-metadata))))
5183 (package/inherit
5184 base
5185 (name "python2-importlib-metadata")
5186 (propagated-inputs
5187 `(("python-configparser" ,python2-configparser)
5188 ("python-contextlib2" ,python2-contextlib2)
5189 ("python-importlib-resources" ,python2-importlib-resources)
5190 ("python-pathlib2" ,python2-pathlib2)
5191 ,@(package-propagated-inputs base))))))
5192
37c173d1
RW
5193(define-public python-jaraco-packaging
5194 (package
5195 (name "python-jaraco-packaging")
5196 (version "6.1")
5197 (source
5198 (origin
5199 (method url-fetch)
5200 (uri (pypi-uri "jaraco.packaging" version))
5201 (sha256
5202 (base32
5203 "0zimrnkh33b9g8ffw11mjh6kvs54cy5gcjw1h5cl1r7dc833dmkm"))))
5204 (build-system python-build-system)
5205 (propagated-inputs
5206 `(("python-pytest" ,python-pytest)
5207 ("python-pytest-checkdocs" ,python-pytest-checkdocs)
5208 ("python-pytest-flake8" ,python-pytest-flake8)
5209 ("python-rst.linker" ,python-rst.linker)
5210 ("python-setuptools" ,python-setuptools)
5211 ("python-setuptools-scm" ,python-setuptools-scm)
5212 ("python-six" ,python-six)
5213 ("python-sphinx" ,python-sphinx)))
5214 (home-page "https://github.com/jaraco/jaraco.packaging")
5215 (synopsis "Tools to supplement packaging Python releases")
5216 (description
5217 "This package provides various tools to supplement packaging Python
5218releases.")
5219 (license license:expat)))
5220
44d10b1f
RW
5221(define-public python-pathpy
5222 (package
5223 (name "python-pathpy")
a3dd8871 5224 (version "11.5.1")
44d10b1f
RW
5225 (source
5226 (origin
5227 (method url-fetch)
5228 (uri (pypi-uri "path.py" version))
5229 (sha256
a3dd8871 5230 (base32 "0ir9j1haq2jbi7aip6k2fa9l7q1l03k4hp1awxhjhcwzsnwp3ll8"))))
49ad11e9 5231 (outputs '("out" "doc"))
44d10b1f
RW
5232 (build-system python-build-system)
5233 (propagated-inputs
01a53e0b
MC
5234 `(("python-appdirs" ,python-appdirs)
5235 ("python-importlib-metadata" ,python-importlib-metadata)))
44d10b1f
RW
5236 (native-inputs
5237 `(("python-setuptools-scm" ,python-setuptools-scm)
5238 ("python-sphinx" ,python-sphinx)
5239 ("python-rst.linker" ,python-rst.linker)
5240 ("python-pytest" ,python-pytest)
49ad11e9
RW
5241 ("python-pytest-runner" ,python-pytest-runner)
5242 ("python-jaraco-packaging" ,python-jaraco-packaging)))
44d10b1f 5243 (arguments
49ad11e9
RW
5244 `(#:phases
5245 (modify-phases %standard-phases
5246 (add-after 'build 'build-doc
5247 (lambda _
5248 (setenv "LANG" "en_US.UTF-8")
5249 (invoke "python" "setup.py" "build_sphinx")))
5250 (add-after 'install 'install-doc
5251 (lambda* (#:key outputs #:allow-other-keys)
5252 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5253 (doc (string-append data "/doc/" ,name "-" ,version))
5254 (html (string-append doc "/html")))
5255 (mkdir-p html)
5256 (for-each (lambda (file)
5257 (copy-file file (string-append doc "/" file)))
5258 '("README.rst" "CHANGES.rst"))
5259 (copy-recursively "build/sphinx/html" html)
5260 #t)))
5261 (replace 'check
5262 (lambda _
5263 ;; The import time test aborts if an import takes longer than
5264 ;; 100ms. It may very well take a little longer than that.
5265 (invoke "pytest" "-v" "-k" "not test_import_time"))))))
44d10b1f
RW
5266 (home-page "https://github.com/jaraco/path.py")
5267 (synopsis "Python module wrapper for built-in os.path")
5268 (description
5269 "@code{path.py} implements path objects as first-class entities, allowing
5270common operations on files to be invoked on those path objects directly.")
5271 (license license:expat)))
5272
5273(define-public python2-pathpy
5274 (package-with-python2 python-pathpy))
5275
5276(define-public python-simplegeneric
5277 (package
5278 (name "python-simplegeneric")
5279 (version "0.8.1")
5280 (source
5281 (origin
5282 (method url-fetch)
6c8c3980 5283 (uri (pypi-uri "simplegeneric" version ".zip"))
44d10b1f
RW
5284 (sha256
5285 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
5286 (build-system python-build-system)
5287 (native-inputs
5288 `(("unzip" ,unzip)))
5289 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
5290 (synopsis "Python module for simple generic functions")
5291 (description
5292 "The simplegeneric module lets you define simple single-dispatch generic
5293functions, akin to Python’s built-in generic functions like @code{len()},
5294@code{iter()} and so on. However, instead of using specially-named methods,
5295these generic functions use simple lookup tables, akin to those used by
5296e.g. @code{pickle.dump()} and other generic functions found in the Python
5297standard library.")
5298 (license license:zpl2.1)))
5299
5300(define-public python2-simplegeneric
5301 (package-with-python2 python-simplegeneric))
5302
5303(define-public python-ipython-genutils
5304 ;; TODO: This package is retired, check if can be removed, see description.
5305 (package
5306 (name "python-ipython-genutils")
5307 (version "0.1.0")
5308 (source
5309 (origin
5310 (method url-fetch)
c9671d4b 5311 (uri (pypi-uri "ipython_genutils" version))
44d10b1f
RW
5312 (sha256
5313 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
5314 (build-system python-build-system)
5315 (arguments `(#:tests? #f)) ; no tests
5316 (home-page "https://ipython.org")
5317 (synopsis "Vestigial utilities from IPython")
5318 (description
5319 "This package provides retired utilities from IPython. No packages
5320outside IPython/Jupyter should depend on it.
5321
5322This package shouldn't exist. It contains some common utilities shared by
5323Jupyter and IPython projects during The Big Split. As soon as possible, those
5324packages will remove their dependency on this, and this package will go
5325away.")
5326 (license license:bsd-3)))
5327
5328(define-public python2-ipython-genutils
5329 (package-with-python2 python-ipython-genutils))
5330
5331(define-public python-traitlets
5332 (package
5333 (name "python-traitlets")
ac5e205a 5334 (version "4.3.3")
44d10b1f
RW
5335 (source
5336 (origin
5337 (method url-fetch)
5338 (uri (pypi-uri "traitlets" version))
5339 (sha256
5340 (base32
ac5e205a 5341 "1xsrwgivpkxlbr4dfndfsi098s29yqgswgjc1qqn69yxklvfw8yh"))))
44d10b1f
RW
5342 (build-system python-build-system)
5343 (arguments
5344 `(#:phases
5345 (modify-phases %standard-phases
5346 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
5347 (propagated-inputs
5348 `(("python-ipython-genutils" ,python-ipython-genutils)
ac5e205a 5349 ("python-decorator" ,python-decorator)))
44d10b1f
RW
5350 (native-inputs
5351 `(("python-pytest" ,python-pytest)))
5352 (properties `((python2-variant . ,(delay python2-traitlets))))
5353 (home-page "https://ipython.org")
5354 (synopsis "Configuration system for Python applications")
5355 (description
5356 "Traitlets is a framework that lets Python classes have attributes with
5357type checking, dynamically calculated default values, and ‘on change’
5358callbacks. The package also includes a mechanism to use traitlets for
5359configuration, loading values from files or from command line arguments. This
5360is a distinct layer on top of traitlets, so you can use traitlets in your code
5361without using the configuration machinery.")
5362 (license license:bsd-3)))
5363
5364(define-public python2-traitlets
5365 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
5366 (package
5367 (inherit traitlets)
5368 (propagated-inputs
5369 `(("python2-enum34" ,python2-enum34)
5370 ,@(package-propagated-inputs traitlets))))))
5371
5372(define-public python-jupyter-core
5373 (package
5374 (name "python-jupyter-core")
5375 (version "4.4.0")
5376 (source
5377 (origin
5378 (method url-fetch)
5379 (uri (string-append (pypi-uri "jupyter_core" version)))
5380 (sha256
5381 (base32
5382 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
5383 (build-system python-build-system)
5384 ;; FIXME: not sure how to run the tests
5385 (arguments `(#:tests? #f))
5386 (propagated-inputs
5387 `(("python-traitlets" ,python-traitlets)))
5388 (home-page "http://jupyter.org/")
5389 (synopsis "Jupyter base package")
5390 (description
5391 "Jupyter core is the base package on which Jupyter projects rely.")
5392 (license license:bsd-3)))
5393
5394(define-public python2-jupyter-core
5395 (package-with-python2 python-jupyter-core))
5396
5397(define-public python-jupyter-client
5398 (package
5399 (name "python-jupyter-client")
5400 (version "5.2.4")
5401 (source
5402 (origin
5403 (method url-fetch)
5404 (uri (pypi-uri "jupyter_client" version))
5405 (sha256
5406 (base32
5407 "0l9mh7ccrpl3lppym3dnky8n1nk7xarzzdcxf4q2s7aw203cpydm"))))
5408 (build-system python-build-system)
5409 ;; Tests fail because of missing native python kernel which I assume is
5410 ;; provided by the ipython package, which we cannot use because it would
5411 ;; cause a dependency cycle.
ddc586ea
LC
5412 (arguments
5413 `(#:tests? #f
5414
5415 #:phases (modify-phases %standard-phases
5416 (add-after 'unpack 'set-tool-file-names
5417 (lambda* (#:key inputs #:allow-other-keys)
5418 (let ((iproute (assoc-ref inputs "iproute")))
5419 (substitute* "jupyter_client/localinterfaces.py"
5420 (("'ip'")
5421 (string-append "'" iproute "/sbin/ip'")))
5422 #t))))))
5423 (inputs
5424 `(("iproute" ,iproute)))
44d10b1f
RW
5425 (propagated-inputs
5426 `(("python-pyzmq" ,python-pyzmq)
5427 ("python-traitlets" ,python-traitlets)
5428 ("python-jupyter-core" ,python-jupyter-core)))
5429 (home-page "http://jupyter.org/")
5430 (synopsis "Jupyter protocol implementation and client libraries")
5431 (description
5432 "The @code{jupyter_client} package contains the reference implementation
5433of the Jupyter protocol. It also provides client and kernel management APIs
5434for working with kernels, and the @code{jupyter kernelspec} entrypoint for
5435installing @code{kernelspec}s for use with Jupyter frontends.")
5436 (license license:bsd-3)))
5437
5438(define-public python2-jupyter-client
5439 (package-with-python2 python-jupyter-client))
5440
5441(define-public python-ipykernel
5442 (package
5443 (name "python-ipykernel")
08d0a355 5444 (version "5.1.3")
44d10b1f
RW
5445 (source
5446 (origin
5447 (method url-fetch)
5448 (uri (pypi-uri "ipykernel" version))
5449 (sha256
08d0a355 5450 (base32 "1a08y677lpn80qzvv7z0smgggmr5m5ayf0bs6vds47xpxl9sss5k"))))
44d10b1f
RW
5451 (build-system python-build-system)
5452 (arguments
5453 `(#:phases
5454 (modify-phases %standard-phases
5455 (replace 'check
5456 (lambda _
5457 (setenv "HOME" "/tmp")
5458 (invoke "pytest" "-v")
aa856d02
LC
5459 #t))
5460 (add-after 'install 'set-python-file-name
5461 (lambda* (#:key outputs #:allow-other-keys)
5462 ;; Record the absolute file name of the 'python' executable in
5463 ;; 'kernel.json'.
5464 (let ((out (assoc-ref outputs "out")))
5465 (substitute* (string-append out "/share/jupyter"
5466 "/kernels/python3/kernel.json")
5467 (("\"python\"")
5468 (string-append "\"" (which "python") "\"")))
5469 #t))))))
44d10b1f
RW
5470 (propagated-inputs
5471 `(("python-ipython" ,python-ipython)
5472 ;; imported at runtime during connect
5473 ("python-jupyter-client" ,python-jupyter-client)))
5474 (native-inputs
08d0a355
TGR
5475 `(("python-flaky" ,python-flaky)
5476 ("python-nose" ,python-nose)
5477 ("python-pytest" ,python-pytest)))
44d10b1f
RW
5478 (home-page "https://ipython.org")
5479 (synopsis "IPython Kernel for Jupyter")
5480 (description
5481 "This package provides the IPython kernel for Jupyter.")
5482 (license license:bsd-3)))
5483
0f378947 5484;; Version 5.1.1 and above no longer support Python 2.
44d10b1f 5485(define-public python2-ipykernel
0f378947
RW
5486 (package
5487 (name "python2-ipykernel")
5488 (version "5.1.0")
5489 (source
5490 (origin
5491 (method url-fetch)
5492 (uri (pypi-uri "ipykernel" version))
5493 (sha256
5494 (base32 "0br95qhrd5k65g10djngiy27hs0642301hlf2q142i8djabvzh0g"))))
5495 (build-system python-build-system)
5496 (arguments
5497 `(#:python ,python-2
5498 #:phases
5499 (modify-phases %standard-phases
5500 (replace 'check
5501 (lambda _
5502 (setenv "HOME" "/tmp")
5503 (invoke "pytest" "-v")
5504 #t)))))
5505 (propagated-inputs
5506 `(("python2-ipython" ,python2-ipython)
5507 ;; imported at runtime during connect
5508 ("python2-jupyter-client" ,python2-jupyter-client)))
5509 (native-inputs
5510 `(("python2-pytest" ,python2-pytest)
5511 ("python2-nose" ,python2-nose)))
5512 (home-page "https://ipython.org")
5513 (synopsis "IPython Kernel for Jupyter")
5514 (description
5515 "This package provides the IPython kernel for Jupyter.")
5516 (license license:bsd-3)))
44d10b1f 5517
966aa714
AE
5518(define-public python-pari-jupyter
5519 (package
5520 (name "python-pari-jupyter")
5521 (version "1.3.2")
5522 (source
5523 (origin
5524 (method url-fetch)
5525 (uri (pypi-uri "pari_jupyter" version))
5526 (sha256
5527 (base32
5528 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
5529 (build-system python-build-system)
5530 (propagated-inputs
5531 `(("python-ipykernel" ,python-ipykernel)))
5532 (inputs
5533 `(("pari-gp" ,pari-gp)
5534 ("readline" ,readline)))
5535 (arguments
5536 `(#:tests? #f)) ; no test suite
5537 (home-page
5538 "https://github.com/jdemeyer/pari_jupyter")
5539 (synopsis "A Jupyter kernel for PARI/GP")
5540 (description "The package provides a PARI/GP kernel for Jupyter.")
5541 (license license:gpl3+)))
5542
dede052a
RW
5543(define-public python-backcall
5544 (package
5545 (name "python-backcall")
5546 (version "0.1.0")
5547 (source
5548 (origin
5549 (method url-fetch)
5550 (uri (pypi-uri "backcall" version))
5551 (sha256
5552 (base32
5553 "1r01dqch3f8fdj3n6fviw8hxqrs6w5v0qw4izmvqzry1w9dxiv1q"))))
5554 (build-system python-build-system)
5555 (home-page "https://github.com/takluyver/backcall/")
5556 (synopsis "Specifications for callback functions passed in to an API")
5557 (description
5558 "If your code lets other people supply callback functions, it's important
5559to specify the function signature you expect, and check that functions support
5560that. Adding extra parameters later would break other peoples code unless
5561you're careful. The @code{backcall} package provides a way of specifying the
5562callback signature using a prototype function.")
5563 (license license:bsd-3)))
5564
44d10b1f
RW
5565;; This is the latest release of the LTS version of ipython with support for
5566;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
8b5f756c
RW
5567;; dropped support for Python 2.7.
5568(define-public python2-ipython
44d10b1f 5569 (package
8b5f756c 5570 (name "python2-ipython")
44d10b1f
RW
5571 (version "5.8.0")
5572 (source
5573 (origin
5574 (method url-fetch)
5575 (uri (pypi-uri "ipython" version ".tar.gz"))
5576 (sha256
5577 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
5578 (build-system python-build-system)
44d10b1f 5579 (propagated-inputs
8b5f756c
RW
5580 `(("python2-backports-shutil-get-terminal-size"
5581 ,python2-backports-shutil-get-terminal-size)
5582 ("python2-pathlib2" ,python2-pathlib2)
5583 ("python2-pyzmq" ,python2-pyzmq)
5584 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
5585 ("python2-terminado" ,python2-terminado)
5586 ("python2-matplotlib" ,python2-matplotlib)
5587 ("python2-numpy" ,python2-numpy)
5588 ("python2-numpydoc" ,python2-numpydoc)
5589 ("python2-jinja2" ,python2-jinja2)
5590 ("python2-mistune" ,python2-mistune)
5591 ("python2-pexpect" ,python2-pexpect)
5592 ("python2-pickleshare" ,python2-pickleshare)
5593 ("python2-simplegeneric" ,python2-simplegeneric)
5594 ("python2-jsonschema" ,python2-jsonschema)
5595 ("python2-traitlets" ,python2-traitlets)
5596 ("python2-nbformat" ,python2-nbformat)
5597 ("python2-pygments" ,python2-pygments)))
5598 (inputs
5599 `(("readline" ,readline)
5600 ("which" ,which)))
5601 (native-inputs
5602 `(("graphviz" ,graphviz)
5603 ("pkg-config" ,pkg-config)
5604 ("python2-requests" ,python2-requests) ;; for tests
5605 ("python2-testpath" ,python2-testpath)
5606 ("python2-mock" ,python2-mock)
5607 ("python2-nose" ,python2-nose)))
5608 (arguments
5609 `(#:python ,python-2
5610 #:phases
5611 (modify-phases %standard-phases
5612 (add-before 'check 'delete-broken-tests
5613 (lambda* (#:key inputs #:allow-other-keys)
5614 ;; These tests throw errors for unknown reasons.
5615 (delete-file "IPython/core/tests/test_profile.py")
5616 (delete-file "IPython/core/tests/test_interactiveshell.py")
5617 (delete-file "IPython/core/tests/test_magic.py")
5618 #t)))))
5619 (home-page "https://ipython.org")
5620 (synopsis "IPython is a tool for interactive computing in Python")
5621 (description
5622 "IPython provides a rich architecture for interactive computing with:
5623Powerful interactive shells, a browser-based notebook, support for interactive
5624data visualization, embeddable interpreters and tools for parallel
5625computing.")
5626 (license license:bsd-3)))
5627
5628(define-public python-ipython
5629 (package
5630 (name "python-ipython")
ee515773 5631 (version "7.9.0")
8b5f756c
RW
5632 (source
5633 (origin
5634 (method url-fetch)
5635 (uri (pypi-uri "ipython" version ".tar.gz"))
5636 (sha256
ee515773 5637 (base32 "103jkw18z7fnwdal1mdbijjxi1fndzn31g887lmj7ddpf2r07lyz"))))
8b5f756c
RW
5638 (build-system python-build-system)
5639 (propagated-inputs
5640 `(("python-backcall" ,python-backcall)
5641 ("python-pyzmq" ,python-pyzmq)
5642 ("python-prompt-toolkit" ,python-prompt-toolkit)
44d10b1f
RW
5643 ("python-terminado" ,python-terminado)
5644 ("python-matplotlib" ,python-matplotlib)
5645 ("python-numpy" ,python-numpy)
5646 ("python-numpydoc" ,python-numpydoc)
8b5f756c 5647 ("python-jedi" ,python-jedi)
44d10b1f
RW
5648 ("python-jinja2" ,python-jinja2)
5649 ("python-mistune" ,python-mistune)
5650 ("python-pexpect" ,python-pexpect)
5651 ("python-pickleshare" ,python-pickleshare)
5652 ("python-simplegeneric" ,python-simplegeneric)
5653 ("python-jsonschema" ,python-jsonschema)
5654 ("python-traitlets" ,python-traitlets)
5655 ("python-nbformat" ,python-nbformat)
5656 ("python-pygments" ,python-pygments)))
5657 (inputs
5658 `(("readline" ,readline)
5659 ("which" ,which)))
5660 (native-inputs
5661 `(("graphviz" ,graphviz)
5662 ("pkg-config" ,pkg-config)
5663 ("python-requests" ,python-requests) ;; for tests
5664 ("python-testpath" ,python-testpath)
8b5f756c 5665 ("python-nose" ,python-nose)))
44d10b1f
RW
5666 (arguments
5667 `(#:phases
5668 (modify-phases %standard-phases
0f272518
RW
5669 (add-after 'unpack 'make-docs-reproducible
5670 (lambda _
5671 (substitute* "IPython/sphinxext/ipython_directive.py"
5672 ((".*import datetime") "")
5673 ((".*datetime.datetime.now\\(\\)") "")
5674 (("%timeit") "# %timeit"))
5675 #t))
44d10b1f
RW
5676 ;; Tests can only be run after the library has been installed and not
5677 ;; within the source directory.
5678 (delete 'check)
5679 (add-after 'install 'check
5680 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5681 (if tests?
5682 (begin
5683 ;; Make installed package available for running the tests
5684 (add-installed-pythonpath inputs outputs)
5685 (setenv "HOME" "/tmp/") ;; required by a test
5686 ;; We only test the core because one of the other tests
5687 ;; tries to import ipykernel.
5688 (invoke "python" "IPython/testing/iptest.py"
5689 "-v" "IPython/core/tests"))
5690 #t)))
5691 (add-before 'check 'fix-tests
5692 (lambda* (#:key inputs #:allow-other-keys)
5693 (substitute* "./IPython/utils/_process_posix.py"
5694 (("/usr/bin/env', 'which") (which "which")))
5695 (substitute* "./IPython/core/tests/test_inputtransformer.py"
5696 (("#!/usr/bin/env python")
5697 (string-append "#!" (which "python"))))
44d10b1f
RW
5698 ;; This test introduces a circular dependency on ipykernel
5699 ;; (which depends on ipython).
5700 (delete-file "IPython/core/tests/test_display.py")
8b5f756c 5701 ;; AttributeError: module 'IPython.core' has no attribute 'formatters'
44d10b1f 5702 (delete-file "IPython/core/tests/test_interactiveshell.py")
44d10b1f
RW
5703 #t)))))
5704 (home-page "https://ipython.org")
5705 (synopsis "IPython is a tool for interactive computing in Python")
5706 (description
5707 "IPython provides a rich architecture for interactive computing with:
5708Powerful interactive shells, a browser-based notebook, support for interactive
5709data visualization, embeddable interpreters and tools for parallel
5710computing.")
8b5f756c 5711 (license license:bsd-3)))
44d10b1f 5712
8b5f756c
RW
5713(define-public python-ipython-documentation
5714 (package
5715 (inherit python-ipython)
5716 (name "python-ipython-documentation")
5717 (version (package-version python-ipython))
5718 (arguments
5719 `(#:phases
5720 (modify-phases %standard-phases
5721 (delete 'build)
5722 (delete 'check)
5723 (replace 'install
5724 (lambda* (#:key outputs #:allow-other-keys)
5725 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
5726 (doc (string-append data "/doc/" ,name "-" ,version))
5727 (html (string-append doc "/html"))
5728 (man1 (string-append data "/man/man1"))
5729 (info (string-append data "/info"))
5730 (examples (string-append doc "/examples"))
5731 (python-arg (string-append "PYTHON=" (which "python"))))
5732 (setenv "LANG" "en_US.utf8")
5733 (with-directory-excursion "docs"
5734 ;; FIXME: pdf fails to build
5735 ;;(system* "make" "pdf" "PAPER=a4")
5736 (system* "make" python-arg "html")
5737 ;; FIXME: the generated texi file contains ^@^@, which trips
5738 ;; up the parser.
5739 ;; (system* "make" python-arg "info")
5740 )
5741 (copy-recursively "docs/man" man1)
5742 (copy-recursively "examples" examples)
5743 (copy-recursively "docs/build/html" html)
5744 ;; (copy-file "docs/build/latex/ipython.pdf"
5745 ;; (string-append doc "/ipython.pdf"))
5746 (mkdir-p info)
5747 ;; (copy-file "docs/build/texinfo/ipython.info"
5748 ;; (string-append info "/ipython.info"))
5749 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
5750 #t)))))
5751 (inputs
5752 `(("python-ipython" ,python-ipython)
5753 ("python-ipykernel" ,python-ipykernel)))
5754 (native-inputs
5755 `(("python-sphinx" ,python-sphinx)
5756 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
5757 ;; FIXME: It's possible that a smaller union would work just as well.
f75aa97f 5758 ("texlive" ,(texlive-union (list texlive-amsfonts
8b5f756c
RW
5759 texlive-fonts-ec
5760 texlive-generic-ifxetex
5761 texlive-generic-pdftex
8b5f756c
RW
5762 texlive-latex-capt-of
5763 texlive-latex-cmap
5764 texlive-latex-environ
5765 texlive-latex-eqparbox
5766 texlive-latex-etoolbox
5767 texlive-latex-expdlist
5768 texlive-latex-fancyhdr
5769 texlive-latex-fancyvrb
5770 texlive-latex-fncychap
5771 texlive-latex-float
5772 texlive-latex-framed
5773 texlive-latex-geometry
5774 texlive-latex-graphics
5775 texlive-latex-hyperref
5776 texlive-latex-mdwtools
5777 texlive-latex-multirow
5778 texlive-latex-needspace
5779 texlive-latex-oberdiek
5780 texlive-latex-parskip
5781 texlive-latex-preview
5782 texlive-latex-tabulary
5783 texlive-latex-threeparttable
5784 texlive-latex-titlesec
5785 texlive-latex-trimspaces
5786 texlive-latex-ucs
5787 texlive-latex-upquote
5788 texlive-latex-url
5789 texlive-latex-varwidth
5790 texlive-latex-wrapfig)))
5791 ("texinfo" ,texinfo)))))
44d10b1f
RW
5792
5793(define-public python-urwid
5794 (package
5795 (name "python-urwid")
5796 (version "2.0.1")
5797 (source
5798 (origin
5799 (method url-fetch)
5800 (uri (pypi-uri "urwid" version))
5801 (sha256
5802 (base32
5803 "1g6cpicybvbananpjikmjk8npmjk4xvak1wjzji62wc600wkwkb4"))))
5804 (build-system python-build-system)
5805 (home-page "http://urwid.org")
5806 (synopsis "Console user interface library for Python")
5807 (description
5808 "Urwid is a curses-based UI/widget library for Python. It includes many
5809features useful for text console applications.")
5810 (license license:lgpl2.1+)))
5811
5812(define-public python2-urwid
5813 (package-with-python2 python-urwid))
5814
5815(define-public python-urwidtrees
5816 (package
5817 (name "python-urwidtrees")
5818 (version "1.0.2")
5819 (source
5820 (origin
c8364072 5821 (method git-fetch)
44d10b1f
RW
5822 ;; package author intends on distributing via github rather than pypi:
5823 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
c8364072
EF
5824 (uri (git-reference
5825 (url "https://github.com/pazz/urwidtrees")
5826 (commit version)))
5827 (file-name (git-file-name name version))
44d10b1f
RW
5828 (sha256
5829 (base32
c8364072 5830 "1n1kpidvkdnsqyb82vlvk78gmly96kh8351lqxn2pzgwwns6fml2"))))
44d10b1f
RW
5831 (build-system python-build-system)
5832 (arguments
26bb7fc6
EF
5833 '(#:use-setuptools? #f
5834 #:tests? #f)) ; no tests
44d10b1f
RW
5835 (propagated-inputs `(("python-urwid" ,python-urwid)))
5836 (home-page "https://github.com/pazz/urwidtrees")
5837 (synopsis "Tree widgets for urwid")
5838 (description "Urwidtrees is a Widget Container API for the @code{urwid}
5839toolkit. Use it to build trees of widgets.")
5840 (license license:gpl3+)))
5841
5842(define-public python2-urwidtrees
5843 (package-with-python2 python-urwidtrees))
5844
5845(define-public python-ua-parser
5846 (package
5847 (name "python-ua-parser")
5848 (version "0.8.0")
5849 (source
5850 (origin
5851 (method url-fetch)
5852 (uri (pypi-uri "ua-parser" version))
5853 (sha256
5854 (base32
5855 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
5856 (build-system python-build-system)
5857 (arguments
5858 `(#:tests? #f)) ;no test suite in release
5859 (native-inputs
5860 `(("python-pyyaml" ,python-pyyaml)))
5861 (home-page "https://github.com/ua-parser/uap-python")
5862 (synopsis "User agent parser")
5863 (description
5864 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
5865 (license license:asl2.0)))
5866
5867(define-public python2-ua-parser
5868 (package-with-python2 python-ua-parser))
5869
5870(define-public python-user-agents
5871 (package
5872 (name "python-user-agents")
5873 (version "1.1.0")
5874 (source
5875 (origin
5876 (method url-fetch)
5877 (uri (pypi-uri "user-agents" version))
5878 (sha256
5879 (base32
5880 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
5881 (build-system python-build-system)
5882 (arguments
5883 `(#:tests? #f)) ;missing devices.json test file in release
5884 (propagated-inputs
5885 `(("python-ua-parser" ,python-ua-parser)))
5886 (home-page "https://github.com/selwin/python-user-agents")
5887 (synopsis "User Agent strings parsing library")
5888 (description
5889 "A library to identify devices (phones, tablets) and their capabilities by
5890parsing (browser/HTTP) user agent strings.")
5891 (license license:expat)))
5892
5893(define-public python2-user-agents
5894 (package-with-python2 python-user-agents))
5895
5896(define-public python-dbus
5897 (package
5898 (name "python-dbus")
ba5ef999 5899 (version "1.2.14")
44d10b1f
RW
5900 (source
5901 (origin
5902 (method url-fetch)
5903 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
5904 "dbus-python-" version ".tar.gz"))
5905 (sha256
ba5ef999 5906 (base32 "0cdchkgnivlka4lf8q4qfk0yxq483i3r3aqickjf8hfn7nx0c0mi"))))
44d10b1f 5907 (build-system gnu-build-system)
44d10b1f
RW
5908 (native-inputs
5909 `(("pkg-config" ,pkg-config)))
5910 (inputs
5911 `(("python" ,python-wrapper)
5912 ("dbus-glib" ,dbus-glib)))
5913 (synopsis "Python bindings for D-bus")
5914 (description "python-dbus provides bindings for libdbus, the reference
5915implementation of D-Bus.")
5916 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
5917 (license license:expat)))
5918
5919(define-public python2-dbus
5920 (package (inherit python-dbus)
5921 (name "python2-dbus")
5922 (inputs `(("python" ,python-2)
5923 ,@(alist-delete "python"
5924 (package-inputs python-dbus)
ba5ef999 5925 equal?)))))
44d10b1f 5926
fb236fdd
AG
5927(define-public python-notify2
5928 (package
5929 (name "python-notify2")
5930 (version "0.3.1")
5931 (source
5932 (origin
5933 (method url-fetch)
5934 (uri (pypi-uri "notify2" version))
5935 (sha256
5936 (base32
5937 "0z8rrv9rsg1r2qgh2dxj3dfj5xnki98kgi3w839kqby4a26i1yik"))))
5938 (build-system python-build-system)
5939 (arguments `(#:tests? #f)) ; tests depend on system state
5940 (native-inputs
5941 `(("python-dbus" ,python-dbus)))
5942 (home-page "https://bitbucket.org/takluyver/pynotify2")
5943 (synopsis "Python interface to D-Bus notifications")
5944 (description
5945 "Pynotify2 provides a Python interface for sending D-Bus notifications.
5946It is a reimplementation of pynotify in pure Python, and an alternative to
5947the GObject Introspection bindings to libnotify for non-GTK applications.")
5948 (license (list license:bsd-2
5949 license:lgpl2.1+))))
5950
5951(define-public python2-notify2
5952 (package-with-python2 python-notify2))
5953
44d10b1f
RW
5954;; beautifulsoup4 has a totally different namespace than 3.x,
5955;; and pypi seems to put it under its own name, so I guess we should too
5956(define-public python-beautifulsoup4
5957 (package
5958 (name "python-beautifulsoup4")
abb53e6f 5959 (version "4.7.1")
44d10b1f
RW
5960 (source
5961 (origin
5962 (method url-fetch)
5963 (uri (pypi-uri "beautifulsoup4" version))
5964 (sha256
5965 (base32
abb53e6f 5966 "0j2kycz2dxgx68xzjm7rxg5xn6v61gq5ifvxyg99slmqkybnal4l"))))
44d10b1f
RW
5967 (build-system python-build-system)
5968 (arguments
5969 `(#:phases
5970 (modify-phases %standard-phases
5971 ;; The Python 2 source is the definitive source of beautifulsoup4. We
5972 ;; must use this conversion script when building with Python 3. The
5973 ;; conversion script also runs the tests.
5974 ;; For more information, see the file 'convert-py3k' in the source
5975 ;; distribution.
5976 (replace 'check
dff0197e 5977 (lambda _ (invoke "./convert-py3k"))))))
f83e10e4 5978 (propagated-inputs
abb53e6f 5979 `(("python-soupsieve" ,python-soupsieve)))
44d10b1f
RW
5980 (home-page
5981 "https://www.crummy.com/software/BeautifulSoup/bs4/")
5982 (synopsis
5983 "Python screen-scraping library")
5984 (description
5985 "Beautiful Soup is a Python library designed for rapidly setting up
5986screen-scraping projects. It offers Pythonic idioms for navigating,
5987searching, and modifying a parse tree, providing a toolkit for
5988dissecting a document and extracting what you need. It automatically
5989converts incoming documents to Unicode and outgoing documents to UTF-8.")
5990 (license license:expat)
5991 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
5992
5993(define-public python2-beautifulsoup4
5994 (package
5995 (inherit (package-with-python2
5996 (strip-python2-variant python-beautifulsoup4)))
5997 (arguments `(#:python ,python-2))))
5998
ad74978a
BT
5999(define-public python-soupsieve
6000 (package
6001 (name "python-soupsieve")
3367df31 6002 (version "1.9.5")
ad74978a
BT
6003 (source
6004 (origin
6005 (method url-fetch)
6006 (uri (pypi-uri "soupsieve" version))
6007 (sha256
6008 (base32
3367df31 6009 "1nhd0q0ifwva9wn645s6pn74p1rd97asn3qfg75nphx1wkgcbhg2"))))
ad74978a
BT
6010 (build-system python-build-system)
6011 (arguments `(#:tests? #f))
6012 ;;XXX: 2 tests fail currently despite claming they were to be
6013 ;;skipped. Also, beautifulsoup4 may depend on this in the future, so we
6014 ;;don't want to create a circular dependency.
6015 (home-page "https://github.com/facelessuser/soupsieve")
6016 (synopsis "CSS selector library")
6017 (description
6018 "Soup Sieve is a CSS selector library designed to be used with Beautiful
6019Soup 4. It aims to provide selecting, matching, and filtering using modern
6020CSS selectors. Soup Sieve currently provides selectors from the CSS level 1
6021specifications up through the latest CSS level 4 drafts and beyond (though
6022some are not yet implemented).")
d00b83fb 6023 (properties `((python2-variant . ,(delay python2-soupsieve))))
ad74978a
BT
6024 (license license:expat)))
6025
6026(define-public python2-soupsieve
d00b83fb 6027 (let ((base (package-with-python2 (strip-python2-variant python-soupsieve))))
ad74978a
BT
6028 (package
6029 (inherit base)
6030 (propagated-inputs
d00b83fb
MB
6031 `(("python2-backports-functools-lru-cache"
6032 ,python2-backports-functools-lru-cache)
6033 ,@(package-propagated-inputs base))))))
ad74978a 6034
44d10b1f
RW
6035(define-public python-netifaces
6036 (package
6037 (name "python-netifaces")
6038 (version "0.10.7")
6039 (source
6040 (origin
6041 (method url-fetch)
6042 (uri (pypi-uri "netifaces" version))
6043 (sha256
6044 (base32
6045 "1gccklrcplbbqh81g1mdgpa5y8na7kkf29cq2ka3f5a2fp5hyndx"))))
6046 (build-system python-build-system)
6047 (home-page "https://github.com/al45tair/netifaces")
6048 (synopsis
6049 "Python module for portable network interface information")
6050 (description
6051 "Netifaces is a Python module providing information on network
6052interfaces in an easy and portable manner.")
6053 (license license:expat)))
6054
6055(define-public python2-netifaces
6056 (package-with-python2 python-netifaces))
6057
6058(define-public python-networkx
6059 (package
6060 (name "python-networkx")
6061 (version "2.2")
6062 (source
6063 (origin
6064 (method url-fetch)
6065 (uri (pypi-uri "networkx" version ".zip"))
6066 (sha256
6067 (base32 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
6068 (build-system python-build-system)
6069 ;; python-decorator is needed at runtime.
6070 (propagated-inputs
6071 `(("python-decorator" ,python-decorator)))
6072 (native-inputs
6073 `(("python-nose" ,python-nose)
6074 ("unzip" ,unzip)))
6075 (home-page "https://networkx.github.io/")
6076 (synopsis "Python module for creating and manipulating graphs and networks")
6077 (description
6078 "NetworkX is a Python package for the creation, manipulation, and study
6079of the structure, dynamics, and functions of complex networks.")
6080 (license license:bsd-3)))
6081
6082(define-public python2-networkx
6083 (package-with-python2 python-networkx))
6084
6085(define-public python-datrie
6086 (package
6087 (name "python-datrie")
0b58cb42 6088 (version "0.8")
44d10b1f
RW
6089 (source
6090 (origin
6091 (method url-fetch)
6092 (uri (pypi-uri "datrie" version))
6093 (sha256
6094 (base32
0b58cb42 6095 "0338r8xgmpy78556jhms0h6qkvyjr10p8bpgdvcpqzm9lrmxmmdx"))))
44d10b1f 6096 (build-system python-build-system)
44d10b1f
RW
6097 (native-inputs
6098 `(("python-cython" ,python-cython)
6099 ("python-hypothesis" ,python-hypothesis)
6100 ("python-pytest" ,python-pytest)
6101 ("python-pytest-runner" ,python-pytest-runner)))
6102 (home-page "https://github.com/kmike/datrie")
6103 (synopsis "Fast, efficiently stored trie for Python")
6104 (description
6105 "This package provides a fast, efficiently stored trie implementation for
6106Python.")
6107 (license license:lgpl2.1+)))
6108
6109(define-public snakemake
6110 (package
6111 (name "snakemake")
93803c6b 6112 (version "5.7.1")
44d10b1f
RW
6113 (source
6114 (origin
6115 (method url-fetch)
6116 (uri (pypi-uri "snakemake" version))
6117 (sha256
93803c6b 6118 (base32 "1pnpvvn8n2a78cg360wz3ldmpqrsm2wzi0c0dmvki9fnsw6fxdas"))))
44d10b1f
RW
6119 (build-system python-build-system)
6120 (arguments
6121 ;; TODO: Package missing test dependencies.
6122 '(#:tests? #f
6123 #:phases
6124 (modify-phases %standard-phases
6125 ;; For cluster execution Snakemake will call Python. Since there is
6126 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
6127 ;; this by calling the snakemake wrapper instead.
6128 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
6129 (lambda* (#:key outputs #:allow-other-keys)
6130 (substitute* "snakemake/executors.py"
6131 (("\\{sys.executable\\} -m snakemake")
6132 (string-append (assoc-ref outputs "out")
6133 "/bin/snakemake")))
6134 #t)))))
6135 (propagated-inputs
8994ae34 6136 `(("python-appdirs" ,python-appdirs)
44d10b1f
RW
6137 ("python-configargparse" ,python-configargparse)
6138 ("python-datrie" ,python-datrie)
6139 ("python-docutils" ,python-docutils)
8994ae34 6140 ("python-gitpython" ,python-gitpython)
44d10b1f
RW
6141 ("python-jinja2" ,python-jinja2)
6142 ("python-jsonschema" ,python-jsonschema)
6143 ("python-networkx" ,python-networkx)
93803c6b 6144 ("python-psutil" ,python-psutil)
44d10b1f 6145 ("python-pyyaml" ,python-pyyaml)
8994ae34
TGR
6146 ("python-ratelimiter" ,python-ratelimiter)
6147 ("python-requests" ,python-requests)
6148 ("python-wrapt" ,python-wrapt)))
44d10b1f
RW
6149 (home-page "https://snakemake.readthedocs.io")
6150 (synopsis "Python-based execution environment for make-like workflows")
6151 (description
6152 "Snakemake aims to reduce the complexity of creating workflows by
6153providing a clean and modern domain specific specification language (DSL) in
6154Python style, together with a fast and comfortable execution environment.")
6155 (license license:expat)))
6156
44d10b1f
RW
6157(define-public python-pyqrcode
6158 (package
6159 (name "python-pyqrcode")
6160 (version "1.2.1")
6161 (source
6162 (origin
6163 (method url-fetch)
6164 (uri (pypi-uri "PyQRCode" version))
6165 (sha256
6166 (base32
6167 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
6168 (build-system python-build-system)
6169 (home-page
6170 "https://github.com/mnooner256/pyqrcode")
6171 (synopsis "QR code generator")
6172 (description
6173 "Pyqrcode is a QR code generator written purely in Python with
6174SVG, EPS, PNG and terminal output.")
6175 (license license:bsd-3)))
6176
6177(define-public python-seaborn
6178 (package
6179 (name "python-seaborn")
6180 (version "0.9.0")
6181 (source
6182 (origin
6183 (method url-fetch)
6184 (uri (pypi-uri "seaborn" version))
6185 (sha256
f9bd82e7
RW
6186 (base32 "0bqysi3fxfjl1866m5jq8z7mynhqbqnikim74dmzn8539iwkzj3n"))
6187 (patches
6188 (list (origin
6189 (method url-fetch)
6190 ;; This has already been merged, but there is no new
6191 ;; release including this patch. It fixes problems
6192 ;; with axis rotation that would lead to test
6193 ;; failures.
6194 (uri "https://patch-diff.githubusercontent.com/raw/mwaskom/seaborn/pull/1716.diff")
6195 (sha256
6196 (base32
6197 "1lm870z316n9ivsyr86hpk1gxaraw0mrjvq42lqsm0znhjdp9q9w"))
6198 (file-name "seaborn-0.9.0-axis-rotation.patch"))))))
44d10b1f
RW
6199 (build-system python-build-system)
6200 (arguments
6201 `(#:phases
6202 (modify-phases %standard-phases
6203 (add-before 'check 'start-xserver
6204 (lambda* (#:key inputs #:allow-other-keys)
6205 (let ((xorg-server (assoc-ref inputs "xorg-server")))
6206 ;; There must be a running X server and make check doesn't
6207 ;; start one. Therefore we must do it.
6208 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
6209 (setenv "DISPLAY" ":1")
6210 #t)))
a1322765
RW
6211 (add-after 'unpack 'fix-tests
6212 (lambda _
6213 ;; test_cbar_ticks fails probably because of matplotlib's
6214 ;; expectation of using an older version of FreeType.
6215 (delete-file "seaborn/tests/test_matrix.py")
6216 #t))
44d10b1f
RW
6217 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
6218 (propagated-inputs
6219 `(("python-pandas" ,python-pandas)
6220 ("python-matplotlib" ,python-matplotlib)
6221 ("python-numpy" ,python-numpy)
6222 ("python-scipy" ,python-scipy)))
6223 (native-inputs
6224 `(("python-pytest" ,python-pytest)
ff337525 6225 ("xorg-server" ,xorg-server-for-tests)))
d3d73bd6 6226 (home-page "https://seaborn.pydata.org/")
44d10b1f
RW
6227 (synopsis "Statistical data visualization")
6228 (description
6229 "Seaborn is a library for making attractive and informative statistical
6230graphics in Python. It is built on top of matplotlib and tightly integrated
6231with the PyData stack, including support for numpy and pandas data structures
6232and statistical routines from scipy and statsmodels.")
6233 (license license:bsd-3)))
6234
6235(define-public python2-seaborn
6236 (package-with-python2 python-seaborn))
6237
6238(define-public python-mpmath
6239 (package
6240 (name "python-mpmath")
6241 (version "0.19")
6242 (source (origin
6243 (method url-fetch)
6244 (uri (string-append "http://mpmath.org/files/mpmath-"
6245 version ".tar.gz"))
6246 (sha256
6247 (base32
6248 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
6249 (build-system python-build-system)
6250 (arguments
6251 '(#:phases
6252 (modify-phases %standard-phases
6253 (replace 'check
6254 (lambda _
5d7a6f1c 6255 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
44d10b1f
RW
6256 (home-page "http://mpmath.org")
6257 (synopsis "Arbitrary-precision floating-point arithmetic in python")
6258 (description
6259 "@code{mpmath} can be used as an arbitrary-precision substitute for
6260Python's float/complex types and math/cmath modules, but also does much
6261more advanced mathematics.")
6262 (license license:bsd-3)))
6263
6264(define-public python2-mpmath
6265 (package-with-python2 python-mpmath))
6266
6267(define-public python-bigfloat
6268 (package
6269 (name "python-bigfloat")
6270 (version "0.3.0")
6271 (source
6272 (origin
6273 (method url-fetch)
6274 (uri (pypi-uri "bigfloat" version))
6275 (sha256
6276 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
6277 (build-system python-build-system)
6278 (inputs
6279 `(("mpfr" ,mpfr)))
6280 (home-page "https://github.com/mdickinson/bigfloat")
6281 (synopsis "Arbitrary precision floating-point arithmetic for Python")
6282 (description
e36de31b 6283 "This package provides a Python interface to the MPFR library for
44d10b1f
RW
6284multiprecision arithmetic.")
6285 (license license:lgpl3+)))
6286
6287(define-public python2-bigfloat
6288 (package-with-python2 python-bigfloat))
6289
6290(define-public python-sympy
6291 (package
6292 (name "python-sympy")
6293 (version "1.1.1")
6294 (source
6295 (origin
6296 (method url-fetch)
6297 (uri (string-append
6298 "https://github.com/sympy/sympy/releases/download/sympy-"
6299 version "/sympy-" version ".tar.gz"))
6300 (sha256
6301 (base32 "190n29sppw7g8ihilc5451y7jlfcaw56crqiqbf1jff43dlmfnxc"))))
6302 (build-system python-build-system)
6303 (arguments
6304 `(#:phases
6305 (modify-phases %standard-phases
6306 ;; Run the core tests after installation. By default it would run
6307 ;; *all* tests, which take a very long time to complete and are known
6308 ;; to be flaky.
6309 (delete 'check)
6310 (add-after 'install 'check
6311 (lambda* (#:key outputs #:allow-other-keys)
6312 (invoke "python3" "-c" "import sympy; sympy.test(\"/core\")")
6313 #t)))))
6314 (propagated-inputs
6315 `(("python-mpmath" ,python-mpmath)))
2f35985c 6316 (home-page "https://www.sympy.org/")
44d10b1f
RW
6317 (synopsis "Python library for symbolic mathematics")
6318 (description
6319 "SymPy is a Python library for symbolic mathematics. It aims to become a
6320full-featured computer algebra system (CAS) while keeping the code as simple
6321as possible in order to be comprehensible and easily extensible.")
6322 (license license:bsd-3)))
6323
6324(define-public python2-sympy
6325 (package
6326 (inherit (package-with-python2 python-sympy))
6327 (arguments
6328 `(#:phases
6329 (modify-phases %standard-phases
6330 ;; Run the core tests after installation. By default it would run
6331 ;; *all* tests, which take a very long time to complete and are known
6332 ;; to be flaky.
6333 (delete 'check)
6334 (add-after 'install 'check
6335 (lambda* (#:key outputs #:allow-other-keys)
6336 (invoke "python" "-c" "import sympy; sympy.test(\"/core\")")
6337 #t)))))))
6338
6339(define-public python-q
6340 (package
6341 (name "python-q")
6342 (version "2.6")
6343 (source
6344 (origin
6345 (method url-fetch)
6346 (uri (pypi-uri "q" version))
6347 (sha256
6348 (base32
6349 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
6350 (build-system python-build-system)
6351 (home-page "https://github.com/zestyping/q")
6352 (synopsis "Quick-and-dirty debugging output for tired programmers")
6353 (description
6354 "q is a Python module for \"print\" style of debugging Python code. It
6355provides convenient short API for print out of values, tracebacks, and
6356falling into the Python interpreter.")
6357 (license license:asl2.0)))
6358
6359(define-public python2-q
6360 (package-with-python2 python-q))
6361
6362(define-public python2-xlib
6363 (package
6364 (name "python2-xlib")
6365 (version "0.14")
6366 (source (origin
6367 (method url-fetch)
6368 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
6369 "/" version "/"
6370 "python-xlib-" version ".tar.gz"))
6371 (sha256
6372 (base32
6373 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
6374 (build-system python-build-system)
6375 (arguments
6376 `(#:python ,python-2 ;Python 2 only
6377 #:tests? #f)) ;no tests
6378 (home-page "http://python-xlib.sourceforge.net/")
6379 (synopsis "Python X11 client library")
6380 (description
6381 "The Python X Library is intended to be a fully functional X client
6382library for Python programs. It is useful to implement low-level X clients.
6383It is written entirely in Python.")
6384 (license license:gpl2+)))
6385
6386(define-public python-singledispatch
6387 (package
6388 (name "python-singledispatch")
6389 (version "3.4.0.3")
6390 (source
6391 (origin
6392 (method url-fetch)
6393 (uri (pypi-uri "singledispatch" version))
6394 (sha256
6395 (base32
6396 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
6397 (build-system python-build-system)
6398 (native-inputs
6399 `(("python-six" ,python-six))) ; required for conversion, not at run-time
6400 (home-page
8680eff3 6401 "https://docs.python.org/3/library/functools.html#functools.singledispatch")
44d10b1f
RW
6402 (synopsis "Backport of singledispatch feature from Python 3.4")
6403 (description
6404 "This library brings functools.singledispatch from Python 3.4 to Python
64052.6-3.3.")
6406 (license license:expat)))
6407
6408(define-public python2-singledispatch
6409 (package-with-python2 python-singledispatch))
6410
6411;; the python- version can be removed with python-3.5
6412(define-public python-backports-abc
6413 (package
6414 (name "python-backports-abc")
6415 (version "0.5")
6416 (source
6417 (origin
6418 (method url-fetch)
6419 (uri (pypi-uri "backports_abc" version))
6420 (sha256
6421 (base32
6422 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
6423 (build-system python-build-system)
6424 (home-page "https://github.com/cython/backports_abc")
6425 (synopsis "Backport of additions to the 'collections.abc' module")
6426 (description
6427 "Python-backports-abc provides a backport of additions to the
36a4366d 6428@code{collections.abc} module in Python-3.5.")
44d10b1f
RW
6429 (license license:psfl)))
6430
6431(define-public python2-backports-abc
6432 (package-with-python2 python-backports-abc))
6433
6434(define-public python-backports-csv
6435 (package
6436 (name "python-backports-csv")
6437 (version "1.0.5")
6438 (source
6439 (origin
6440 (method url-fetch)
6441 (uri (pypi-uri "backports.csv" version))
6442 (sha256
6443 (base32
6444 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
6445 (build-system python-build-system)
6446 (home-page "https://github.com/ryanhiebert/backports.csv")
6447 (synopsis "Backport of Python 3's csv module for Python 2")
6448 (description
6449 "Provides a backport of Python 3's @code{csv} module for parsing
6450comma separated values. The API of the @code{csv} module in Python 2
6451is drastically different from the @code{csv} module in Python 3.
6452This is due, for the most part, to the difference between str in
6453Python 2 and Python 3.")
6454 (license license:psfl)))
6455
6456(define-public python2-backports-csv
6457 (package-with-python2 python-backports-csv))
6458
6459(define-public python2-backports-shutil-get-terminal-size
6460 (package
6461 (name "python2-backports-shutil-get-terminal-size")
6462 (version "1.0.0")
6463 (source
6464 (origin
6465 (method url-fetch)
6466 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
6467 (sha256
6468 (base32
6469 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
6470 (build-system python-build-system)
6471 (arguments
6472 `(#:python ,python-2
6473 #:phases
6474 (modify-phases %standard-phases
6475 (replace 'check
6476 (lambda _
4a4a7d9a 6477 (invoke "py.test" "-v"))))))
44d10b1f
RW
6478 (native-inputs
6479 `(("python2-pytest" ,python2-pytest)))
6480 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
6481 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
6482 (description
6483 "This package provides a backport of the @code{get_terminal_size
6484function} from Python 3.3's @code{shutil}.
6485Unlike the original version it is written in pure Python rather than C,
6486so it might be a tiny bit slower.")
6487 (license license:expat)))
6488
6489(define-public python-waf
6490 (package
6491 (name "python-waf")
6c2c11fa 6492 (version "2.0.19")
44d10b1f
RW
6493 (source (origin
6494 (method url-fetch)
6495 (uri (string-append "https://waf.io/"
6496 "waf-" version ".tar.bz2"))
6497 (sha256
6498 (base32
6c2c11fa 6499 "19dvqbsvxz7ch03dh1v0znklrwxlz6yzddc3k9smzrrgny4jch6q"))))
44d10b1f
RW
6500 (build-system python-build-system)
6501 (arguments
6502 '(#:phases
6503 (modify-phases %standard-phases
6504 (replace 'build
6505 (lambda _
633c8b71
MO
6506 ;; XXX: Find a way to add all extra tools.
6507 (let ((tools '("gccdeps"
6508 "clang_compilation_database")))
6509 (invoke "python" "waf-light" "configure" "build"
6510 (string-append "--tools="
6511 (string-join tools ","))))))
44d10b1f
RW
6512 (replace 'check
6513 (lambda _
6514 (invoke "python" "waf" "--version")))
6515 (replace 'install
6516 (lambda* (#:key outputs #:allow-other-keys)
6517 (let ((out (assoc-ref outputs "out")))
6518 (install-file "waf" (string-append out "/bin")))
6519 #t))
6520 ;; waf breaks when it is wrapped.
6521 (delete 'wrap))))
6522 (home-page "https://waf.io/")
6523 (synopsis "Python-based build system")
6524 (description
6525 "Waf is a Python-based framework for configuring, compiling and installing
6526applications.")
6527 (license license:bsd-3)))
6528
6529(define-public python2-waf
6530 (package-with-python2 python-waf))
6531
6532(define-public python-pyzmq
6533 (package
6534 (name "python-pyzmq")
6535 (version "17.1.2")
6536 (source
6537 (origin
6538 (method url-fetch)
6539 (uri (pypi-uri "pyzmq" version))
6540 (sha256
6541 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
6542 (build-system python-build-system)
6543 (arguments
6544 `(#:configure-flags
6545 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
6546 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
6547 ;; --inplace' for 'python setup.py test' to work.
6548 #:tests? #f))
6549 (inputs
6550 `(("zeromq" ,zeromq)))
6551 (native-inputs
6552 `(("pkg-config" ,pkg-config)
6553 ("python-nose" ,python-nose)))
6554 (home-page "https://github.com/zeromq/pyzmq")
6555 (synopsis "Python bindings for 0MQ")
6556 (description
6557 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
6558 (license license:bsd-4)))
6559
6560(define-public python2-pyzmq
6561 (package-with-python2 python-pyzmq))
6562
6563(define-public python-pep8
6564 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
6565 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
6566 ;; some dependents' test suites, and nothing more.
6567 (package
6568 (name "python-pep8")
6569 (version "1.7.0")
6570 (source
6571 (origin
6572 (method url-fetch)
6573 (uri (pypi-uri "pep8" version))
6574 (sha256
6575 (base32
2be878d8
CB
6576 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))
6577 (patches (search-patches "python-pep8-stdlib-tokenize-compat.patch"))))
44d10b1f
RW
6578 (build-system python-build-system)
6579 (home-page "https://pep8.readthedocs.org/")
6580 (synopsis "Python style guide checker")
6581 (description
6582 "This tools checks Python code against some of the style conventions in
6583PEP 8.")
6584 (license license:expat)))
6585
6586(define-public python2-pep8
6587 (package-with-python2 python-pep8))
6588
6589(define-public python-pyflakes
6590 (package
6591 (name "python-pyflakes")
d0cba11b 6592 (version "2.1.1")
44d10b1f
RW
6593 (source
6594 (origin
6595 (method url-fetch)
6596 (uri (pypi-uri "pyflakes" version))
6597 (sha256
6598 (base32
d0cba11b 6599 "18pq95a1xj2dgdd0m85gyfsn40jajj4xc3lp8wfv7igqhrc86xnr"))))
44d10b1f
RW
6600 (build-system python-build-system)
6601 (home-page
6602 "https://github.com/pyflakes/pyflakes")
6603 (synopsis "Passive checker of Python programs")
6604 (description
6605 "Pyflakes statically checks Python source code for common errors.")
6606 (license license:expat)))
6607
6608(define-public python2-pyflakes
6609 (package-with-python2 python-pyflakes))
6610
6611(define-public python-mccabe
6612 (package
6613 (name "python-mccabe")
6614 (version "0.6.1")
6615 (source
6616 (origin
6617 (method url-fetch)
6618 (uri (pypi-uri "mccabe" version))
6619 (sha256
6620 (base32
6621 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
6622 (build-system python-build-system)
6623 (native-inputs
6624 `(("python-pytest" ,python-pytest-bootstrap)
6625 ("python-pytest-runner" ,python-pytest-runner)))
6626 (home-page "https://github.com/flintwork/mccabe")
6627 (synopsis "McCabe checker, plugin for flake8")
6628 (description
6629 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
6630complexity of Python source code.")
6631 (license license:expat)))
6632
6633(define-public python2-mccabe
6634 (package-with-python2 python-mccabe))
6635
6636(define-public python-mccabe-0.2.1
6637 (package (inherit python-mccabe)
6638 (version "0.2.1")
6639 (source
6640 (origin
6641 (method url-fetch)
6642 (uri (pypi-uri "mccabe" version))
6643 (sha256
6644 (base32
6645 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
6646
6647(define-public python2-mccabe-0.2.1
6648 (package-with-python2 python-mccabe-0.2.1))
6649
6650;; Flake8 2.4.1 requires an older version of pep8.
6651;; This should be removed ASAP.
6652(define-public python-pep8-1.5.7
6653 (package (inherit python-pep8)
6654 (version "1.5.7")
6655 (source
f3576970
RW
6656 (origin
6657 (method url-fetch)
6658 (uri (pypi-uri "pep8" version))
6659 (sha256
6660 (base32
6661 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
44d10b1f
RW
6662 (arguments
6663 ;; XXX Tests not compatible with Python 3.5.
6664 '(#:tests? #f))))
6665
6666(define-public python2-pep8-1.5.7
6667 (package-with-python2 python-pep8-1.5.7))
6668
6669;; Flake8 2.4.1 requires an older version of pyflakes.
6670;; This should be removed ASAP.
6671(define-public python-pyflakes-0.8.1
6672 (package (inherit python-pyflakes)
6673 (version "0.8.1")
6674 (source
8c4dffb5
RW
6675 (origin
6676 (method url-fetch)
6677 (uri (pypi-uri "pyflakes" version))
6678 (sha256
6679 (base32
6680 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
44d10b1f
RW
6681 (arguments
6682 ;; XXX Tests not compatible with Python 3.5.
6683 '(#:tests? #f))))
6684
6685(define-public python2-pyflakes-0.8.1
6686 (package-with-python2 python-pyflakes-0.8.1))
6687
ac63cf0a 6688(define-public python-flake8
44d10b1f
RW
6689 (package
6690 (name "python-flake8")
beaff4a8 6691 (version "3.7.7")
ac63cf0a
MB
6692 (source (origin
6693 (method url-fetch)
6694 (uri (pypi-uri "flake8" version))
6695 (sha256
6696 (base32
beaff4a8 6697 "0qg6zggqigrd4k3gv88shd1a27d0cwgfql8vfiq2c7rl7w3rd6c5"))))
44d10b1f
RW
6698 (build-system python-build-system)
6699 (arguments
6700 `(#:phases
6701 (modify-phases %standard-phases
44d10b1f
RW
6702 (delete 'check)
6703 (add-after 'install 'check
6704 (lambda* (#:key inputs outputs #:allow-other-keys)
6705 (add-installed-pythonpath inputs outputs)
6706 (invoke "pytest" "-v")
6707 #t)))))
6708 (propagated-inputs
6709 `(("python-pycodestyle" ,python-pycodestyle)
beaff4a8 6710 ("python-entrypoints" ,python-entrypoints)
44d10b1f
RW
6711 ("python-pyflakes" ,python-pyflakes)
6712 ("python-mccabe" ,python-mccabe)))
6713 (native-inputs
6714 `(("python-mock" ,python-mock)
6715 ("python-pytest" ,python-pytest-bootstrap)
6716 ("python-pytest-runner" ,python-pytest-runner)))
6717 (home-page "https://gitlab.com/pycqa/flake8")
6718 (synopsis
6719 "The modular source code checker: pep8, pyflakes and co")
6720 (description
6721 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
ac63cf0a 6722 (properties `((python2-variant . ,(delay python2-flake8))))
44d10b1f
RW
6723 (license license:expat)))
6724
ac63cf0a
MB
6725(define-public python2-flake8
6726 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
44d10b1f
RW
6727 (package (inherit base)
6728 (propagated-inputs
6729 `(("python2-configparser" ,python2-configparser)
6730 ("python2-enum34" ,python2-enum34)
beaff4a8 6731 ("python2-typing" ,python2-typing)
44d10b1f
RW
6732 ,@(package-propagated-inputs base))))))
6733
44d10b1f
RW
6734;; python-hacking requires flake8 <2.6.0.
6735(define-public python-flake8-2.5
6736 (package
6737 (inherit python-flake8)
6738 (version "2.5.5")
6739 (source (origin
6740 (method url-fetch)
6741 (uri (pypi-uri "flake8" version))
6742 (sha256
6743 (base32
6744 "1snylqwbmrylbx3r1wpz8ggk98f6bcag4441ag8mm2l7wyn58sij"))))
6745 (propagated-inputs
6746 `(("python-pep8" ,python-pep8)
6747 ,@(package-propagated-inputs python-flake8)))
6748 (properties `((python2-variant . ,(delay python2-flake8-2.5))))))
6749
6750(define-public python2-flake8-2.5
6751 (package
6752 (inherit python2-flake8)
6753 (version (package-version python-flake8-2.5))
6754 (source (origin
6755 (inherit (package-source python-flake8-2.5))))
6756 (propagated-inputs
6757 `(("python2-pep8" ,python2-pep8)
6758 ,@(package-propagated-inputs python2-flake8)))))
6759
6760(define-public python-flake8-polyfill
6761 (package
6762 (name "python-flake8-polyfill")
6763 (version "1.0.2")
6764 (source
6765 (origin
6766 (method url-fetch)
6767 (uri (pypi-uri "flake8-polyfill" version))
6768 (sha256
6769 (base32
6770 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
6771 (build-system python-build-system)
6772 (arguments
6773 '(#:phases
6774 (modify-phases %standard-phases
6775 (replace 'check
6776 (lambda _
40a7153d
MB
6777 ;; Be compatible with Pytest 4:
6778 ;; https://gitlab.com/pycqa/flake8-polyfill/merge_requests/7
6779 (substitute* "setup.cfg"
6780 (("\\[pytest\\]")
6781 "[tool:pytest]"))
6782
44d10b1f
RW
6783 (setenv "PYTHONPATH"
6784 (string-append (getcwd) "/build/lib:"
6785 (getenv "PYTHONPATH")))
4f0a0894 6786 (invoke "py.test" "-v"))))))
44d10b1f
RW
6787 (native-inputs
6788 `(("python-flake8" ,python-flake8)
6789 ("python-mock" ,python-mock)
6790 ("python-pep8" ,python-pep8)
6791 ("python-pycodestyle" ,python-pycodestyle)
6792 ("python-pytest" ,python-pytest)))
6793 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
6794 (synopsis "Polyfill package for Flake8 plugins")
6795 (description
6796 "This package that provides some compatibility helpers for Flake8
6797plugins that intend to support Flake8 2.x and 3.x simultaneously.")
6798 (license license:expat)))
6799
6800(define-public python2-flake8-polyfill
6801 (package-with-python2 python-flake8-polyfill))
6802
6803(define-public python-mistune
6804 (package
6805 (name "python-mistune")
6806 (version "0.8.4")
6807 (source
6808 (origin
6809 (method url-fetch)
6810 (uri (pypi-uri "mistune" version))
6811 (sha256
6812 (base32
6813 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
6814 (build-system python-build-system)
6815 (native-inputs
6816 `(("python-nose" ,python-nose)
6817 ("python-cython" ,python-cython)))
6818 (home-page "https://github.com/lepture/mistune")
6819 (synopsis "Markdown parser in pure Python")
6820 (description "This package provides a fast markdown parser in pure
6821Python.")
6822 (license license:bsd-3)))
6823
6824(define-public python2-mistune
6825 (package-with-python2 python-mistune))
6826
6827(define-public python-markdown
6828 (package
6829 (name "python-markdown")
0d1d0a6e 6830 (version "3.2.1")
44d10b1f
RW
6831 (source
6832 (origin
6833 (method url-fetch)
6834 (uri (pypi-uri "Markdown" version))
6835 (sha256
6836 (base32
0d1d0a6e 6837 "00k91gwhxnm8jdnm2v5xjz9irj6dbi7afywz2hpakqdbxs1ydzlh"))))
44d10b1f
RW
6838 (build-system python-build-system)
6839 (native-inputs
6840 `(("python-nose" ,python-nose)
6841 ("python-pyyaml" ,python-pyyaml)))
6842 (home-page "https://python-markdown.github.io/")
6843 (synopsis "Python implementation of Markdown")
6844 (description
6845 "This package provides a Python implementation of John Gruber's
6846Markdown. The library features international input, various Markdown
6847extensions, and several HTML output formats. A command line wrapper
6848markdown_py is also provided to convert Markdown files to HTML.")
2537ce68 6849 (properties `((python2-variant . ,(delay python2-markdown))))
44d10b1f
RW
6850 (license license:bsd-3)))
6851
2537ce68 6852;; Markdown 3.2 dropped support for Python 2.
44d10b1f 6853(define-public python2-markdown
2537ce68
MB
6854 (let ((base (package-with-python2 (strip-python2-variant python-markdown))))
6855 (package/inherit
6856 base
6857 (version "3.1.1")
6858 (source (origin
6859 (method url-fetch)
6860 (uri (pypi-uri "Markdown" version))
6861 (sha256
6862 (base32
6863 "0yhylk4ffqqs7x086fav4pnfsl1021v7lghznzkififprmmqfl1f")))))))
44d10b1f
RW
6864
6865(define-public python-ptyprocess
6866 (package
6867 (name "python-ptyprocess")
6868 (version "0.5.2")
6869 (source
6870 (origin
6871 (method url-fetch)
6872 (uri (pypi-uri "ptyprocess" version))
6873 (sha256
6874 (base32
6875 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
6876 (build-system python-build-system)
6877 (native-inputs
6878 `(("python-nose" ,python-nose)))
6879 (arguments
6880 `(#:phases
6881 (modify-phases %standard-phases
6882 (replace 'check
7904d6fa 6883 (lambda _ (invoke "nosetests"))))))
44d10b1f
RW
6884 (home-page "https://github.com/pexpect/ptyprocess")
6885 (synopsis "Run a subprocess in a pseudo terminal")
6886 (description
6887 "This package provides a Python library used to launch a subprocess in a
6888pseudo terminal (pty), and interact with both the process and its pty.")
6889 (license license:isc)))
6890
6891(define-public python2-ptyprocess
6892 (package-with-python2 python-ptyprocess))
6893
6894(define-public python-cram
6895 (package
6896 (name "python-cram")
6897 (version "0.7")
6898 (home-page "https://bitheap.org/cram/")
6899 (source (origin
6900 (method url-fetch)
6901 (uri (list (string-append home-page "cram-"
6902 version ".tar.gz")
6903 (pypi-uri "cram" version)))
6904 (sha256
6905 (base32
6906 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
6907 (arguments
6908 '(#:phases
6909 (modify-phases %standard-phases
6910 (add-after 'unpack 'patch-source
6911 (lambda _
6912 (substitute* (find-files "cram" ".*\\.py$")
6913 ;; Replace default shell path.
6914 (("/bin/sh") (which "sh")))
6915 (substitute* (find-files "tests" ".*\\.t$")
6916 (("md5") "md5sum")
6917 (("/bin/bash") (which "bash"))
6918 (("/bin/sh") (which "sh")))
6919 (substitute* "cram/_test.py"
6920 ;; This hack works around a bug triggered by substituting
6921 ;; the /bin/sh paths. "tests/usage.t" compares the output of
6922 ;; "cram -h", which breaks the output at 80 characters. This
6923 ;; causes the line showing the default shell to break into two
6924 ;; lines, but the test expects a single line...
6925 (("env\\['COLUMNS'\\] = '80'")
6926 "env['COLUMNS'] = '160'"))
ff1e80d7
MB
6927
6928 (substitute* "Makefile"
6929 ;; Recent versions of python-coverage have caused the test
6930 ;; coverage to decrease (as of version 0.7). Allow that.
6931 (("--fail-under=100")
6932 "--fail-under=90"))
6933
44d10b1f 6934 #t))
ff1e80d7 6935 (replace 'check
44d10b1f 6936 ;; The test phase uses the built library and executable.
44d10b1f
RW
6937 (lambda* (#:key inputs outputs #:allow-other-keys)
6938 (add-installed-pythonpath inputs outputs)
6939 (setenv "PATH" (string-append (getenv "PATH") ":"
6940 (assoc-ref outputs "out") "/bin"))
2d7db192 6941 (invoke "make" "test"))))))
44d10b1f
RW
6942 (build-system python-build-system)
6943 (native-inputs
6944 `(("python-coverage" ,python-coverage)
6945 ("which" ,which)))
6946 (synopsis "Simple testing framework for command line applications")
6947 (description
6948 "Cram is a functional testing framework for command line applications.
6949Cram tests look like snippets of interactive shell sessions. Cram runs each
6950command and compares the command output in the test with the command’s actual
6951output.")
6952 (license license:gpl2+)))
6953
6954(define-public python2-cram
6955 (package-with-python2 python-cram))
6956
6957(define-public python-straight-plugin
6958 (package
6959 (name "python-straight-plugin")
6960 (version "1.4.1")
6961 (source
6962 (origin
6963 (method url-fetch)
6964 (uri (pypi-uri "straight.plugin" version))
6965 (sha256
6966 (base32
6967 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
6968 (build-system python-build-system)
6969 (home-page "https://github.com/ironfroggy/straight.plugin")
6970 (synopsis "Simple namespaced plugin facility")
6971 (description "Straight Plugin provides a type of plugin you can create from
6972almost any existing Python modules, and an easy way for outside developers to
6973add functionality and customization to your projects with their own plugins.")
6974 (license license:expat)))
6975
6976(define-public python2-straight-plugin
6977 (package-with-python2 python-straight-plugin))
6978
6979(define-public python-fonttools
6980 (package
6981 (name "python-fonttools")
1a4bb420 6982 (version "3.38.0")
44d10b1f
RW
6983 (source (origin
6984 (method url-fetch)
6985 (uri (pypi-uri "fonttools" version ".zip"))
6986 (sha256
6987 (base32
1a4bb420 6988 "12ripk3s7skgxr1bs9r8n13r94ym3s8iir7ivfixls9fa4dabmlh"))))
44d10b1f
RW
6989 (build-system python-build-system)
6990 (native-inputs
6991 `(("unzip" ,unzip)
6992 ("python-pytest" ,python-pytest)
6993 ("python-pytest-runner" ,python-pytest-runner)))
9d25a454 6994 (home-page "https://github.com/fonttools/fonttools")
44d10b1f
RW
6995 (synopsis "Tools to manipulate font files")
6996 (description
6997 "FontTools/TTX is a library to manipulate font files from Python. It
6998supports reading and writing of TrueType/OpenType fonts, reading and writing
6999of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
7000also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
7001from an XML-based format.")
7002 (license license:expat)))
7003
7004(define-public python2-fonttools
7005 (package-with-python2 python-fonttools))
7006
7007(define-public python-ly
7008 (package
7009 (name "python-ly")
7010 (version "0.9.5")
7011 (source
7012 (origin
7013 (method url-fetch)
7014 (uri (pypi-uri name version))
7015 (sha256
7016 (base32
7017 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
7018 (build-system python-build-system)
7019 (arguments
7020 ;; FIXME: Some tests need network access.
7021 '(#:tests? #f))
7022 (synopsis "Tool and library for manipulating LilyPond files")
7023 (description "This package provides a Python library to parse, manipulate
7024or create documents in LilyPond format. A command line program ly is also
7025provided that can be used to do various manipulations with LilyPond files.")
e85af137 7026 (home-page "https://pypi.org/project/python-ly/")
44d10b1f
RW
7027 (license license:gpl2+)))
7028
7029(define-public python-appdirs
7030 (package
7031 (name "python-appdirs")
7032 (version "1.4.3")
7033 (source
7034 (origin
7035 (method url-fetch)
7036 (uri (pypi-uri "appdirs" version))
7037 (sha256
7038 (base32
7039 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
7040 (build-system python-build-system)
7041 (home-page "https://github.com/ActiveState/appdirs")
7042 (synopsis
7043 "Determine platform-specific dirs, e.g. a \"user data dir\"")
7044 (description
7045 "This module provides a portable way of finding out where user data
7046should be stored on various operating systems.")
7047 (license license:expat)))
7048
7049(define-public python2-appdirs
7050 (package-with-python2 python-appdirs))
7051
7052(define-public python-llfuse
7053 (package
7054 (name "python-llfuse")
7055 (version "1.3.5")
7056 (source (origin
7057 (method url-fetch)
7058 (uri (pypi-uri "llfuse" version ".tar.bz2"))
7059 (sha256
7060 (base32
7061 "1n7a90jww3ly49fm7x27m3xw3la3qfrnykcakga654g6kcyjlhbf"))))
7062 (build-system python-build-system)
7063 (inputs
7064 `(("fuse" ,fuse)
7065 ("attr" ,attr)))
7066 (native-inputs
7067 `(("pkg-config" ,pkg-config)))
7068 (synopsis "Python bindings for FUSE")
7069 (description
7070 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
7071 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
7072 (license license:lgpl2.0+)
7073 (properties `((python2-variant . ,(delay python2-llfuse))))))
7074
7075(define-public python2-llfuse
7076 (package (inherit (package-with-python2
7077 (strip-python2-variant python-llfuse)))
7078 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
7079
7080;; For attic-0.16
7081(define-public python-llfuse-0.41
7082 (package (inherit python-llfuse)
7083 (version "0.41.1")
7084 (source (origin
7085 (method url-fetch)
7086 (uri (string-append
7087 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
7088 "llfuse-" version ".tar.bz2"))
7089 (sha256
7090 (base32
7091 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
7092 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
7093 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
7094 (license (list license:expat license:lgpl2.0+))))
7095
7096(define-public python-msgpack
7097 (package
7098 (name "python-msgpack")
7099 (version "0.5.6")
7100 (source (origin
7101 (method url-fetch)
7102 (uri (pypi-uri "msgpack" version))
7103 (sha256
7104 (base32
7105 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
7106 (build-system python-build-system)
7107 (arguments
7108 `(#:modules ((guix build utils)
7109 (guix build python-build-system)
7110 (ice-9 ftw)
7111 (srfi srfi-1)
7112 (srfi srfi-26))
7113 #:phases
7114 (modify-phases %standard-phases
7115 (replace 'check
7116 (lambda _
7117 (let ((cwd (getcwd)))
7118 (setenv "PYTHONPATH"
7119 (string-append cwd "/build/"
7120 (find (cut string-prefix? "lib" <>)
7121 (scandir (string-append cwd "/build")))
7122 ":"
7123 (getenv "PYTHONPATH")))
7124 (invoke "pytest" "-v" "test")))))))
7125 (native-inputs
7126 `(("python-pytest" ,python-pytest)))
7127 (synopsis "MessagePack (de)serializer")
7128 (description "MessagePack is a fast, compact binary serialization format,
7129suitable for similar data to JSON. This package provides CPython bindings for
7130reading and writing MessagePack data.")
e85af137 7131 (home-page "https://pypi.org/project/msgpack/")
44d10b1f
RW
7132 (license license:asl2.0)))
7133
7134;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
7135;; release 0.5. Some packages like borg still call it by the old name for now.
7136;; <https://bugs.gnu.org/30662>
7137(define-public python-msgpack-transitional
7138 (package
7139 (inherit python-msgpack)
7140 (name "python-msgpack-transitional")
7141 (arguments
7142 (substitute-keyword-arguments (package-arguments python-msgpack)
7143 ((#:phases phases)
7144 `(modify-phases ,phases
7145 (add-after 'unpack 'configure-transitional
7146 (lambda _
7147 ;; Keep using the old name.
7148 (substitute* "setup.py"
7149 (("TRANSITIONAL = False")
7150 "TRANSITIONAL = 1"))
7151 #t))))))))
7152
7153(define-public python2-msgpack
7154 (package-with-python2 python-msgpack))
7155
7156(define-public python-netaddr
7157 (package
7158 (name "python-netaddr")
7159 (version "0.7.19")
7160 (source
7161 (origin
7162 (method url-fetch)
7163 (uri (pypi-uri "netaddr" version))
7164 (sha256
7165 (base32
7166 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
7167 (build-system python-build-system)
7168 (arguments `(#:tests? #f)) ;; No tests.
7169 (home-page "https://github.com/drkjam/netaddr/")
7170 (synopsis "Pythonic manipulation of network addresses")
7171 (description
7172 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
7173and MAC network addresses.")
7174 (license license:bsd-3)))
7175
7176(define-public python2-netaddr
7177 (package-with-python2 python-netaddr))
7178
dd85eca0
AG
7179(define-public python2-pyroute2
7180 (package
7181 (name "python2-pyroute2")
7182 (version "0.5.6")
7183 (source
7184 (origin
7185 (method url-fetch)
7186 (uri (pypi-uri "pyroute2" version))
7187 (sha256
7188 (base32
7189 "1gmz4r1w0yzj6fjjypnalmfyy0lnfznydyn62gi3wk50j5hhxbny"))))
7190 (build-system python-build-system)
7191 (arguments
7192 `(#:python ,python-2)) ;Python 3.x is not supported
7193 (home-page "https://github.com/svinota/pyroute2")
7194 (synopsis "Python netlink library")
7195 (description
7196 "Pyroute2 is a pure Python netlink library with minimal dependencies.
7197Supported netlink families and protocols include:
7198@itemize
7199@item rtnl, network settings - addresses, routes, traffic controls
7200@item nfnetlink - netfilter API: ipset, nftables, ...
7201@item ipq - simplest userspace packet filtering, iptables QUEUE target
7202@item devlink - manage and monitor devlink-enabled hardware
7203@item generic - generic netlink families
7204 @itemize
7205 @item nl80211 - wireless functions API (basic support)
7206 @item taskstats - extended process statistics
7207 @item acpi_events - ACPI events monitoring
7208 @item thermal_events - thermal events monitoring
7209 @item VFS_DQUOT - disk quota events monitoring
7210 @end itemize
7211@end itemize")
7212 (license license:gpl2+)))
7213
44d10b1f
RW
7214(define-public python-wrapt
7215 (package
7216 (name "python-wrapt")
2271a1dc 7217 (version "1.11.2")
44d10b1f 7218 (source
2271a1dc
MB
7219 (origin
7220 (method url-fetch)
7221 (uri (pypi-uri "wrapt" version))
7222 (sha256
7223 (base32
7224 "1q81762dgsgrd12f8qc39zk8s5wll3m5xc32jdmlf6cls4gh4njn"))))
44d10b1f
RW
7225 (build-system python-build-system)
7226 (arguments
7227 ;; Tests are not included in the tarball, they are only available in the
7228 ;; git repository.
7229 `(#:tests? #f))
7230 (home-page "https://github.com/GrahamDumpleton/wrapt")
7231 (synopsis "Module for decorators, wrappers and monkey patching")
7232 (description
2271a1dc 7233 "The aim of the wrapt module is to provide a transparent object proxy for
44d10b1f
RW
7234 Python, which can be used as the basis for the construction of function
7235 wrappers and decorator functions.")
7236 (license license:bsd-2)))
7237
7238(define-public python2-wrapt
7239 (package-with-python2 python-wrapt))
7240
7241(define-public python-xlrd
7242 (package
7243 (name "python-xlrd")
3a2b1a3c 7244 (version "1.2.0")
44d10b1f
RW
7245 (source (origin
7246 (method url-fetch)
7247 (uri (pypi-uri "xlrd" version))
7248 (sha256
7249 (base32
3a2b1a3c 7250 "1ci93fda4n67qhdvfl16zasyxrpygzk53hs6m8z0rd4dxrnb6vjl"))))
44d10b1f
RW
7251 (build-system python-build-system)
7252 (arguments
7253 `(#:phases
7254 (modify-phases %standard-phases
3ccdd3a5
MO
7255 ;; Some tests depend on writing a temporary file to the user's home
7256 ;; directory.
3a2b1a3c
GL
7257 (add-after 'unpack 'fix-tests
7258 (lambda _
7259 (delete-file "tests/test_open_workbook.py")
7260 #t)))))
44d10b1f
RW
7261 (home-page "http://www.python-excel.org/")
7262 (synopsis "Library for extracting data from Excel files")
a0909286 7263 (description "This package provides a library to extract data from
44d10b1f
RW
7264spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
7265@samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
7266Unicode-aware. It is not intended as an end-user tool.")
7267 (license license:bsd-3)))
7268
7269(define-public python2-xlrd
7270 (package-with-python2 python-xlrd))
7271
7272(define-public python-prettytable
7273 (package
7274 (name "python-prettytable")
7275 (version "0.7.2")
7276 (source
7277 (origin
7278 (method url-fetch)
337c3a1e 7279 (uri (pypi-uri "prettytable" version ".tar.bz2"))
44d10b1f
RW
7280 (sha256
7281 (base32
7282 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
7283 (build-system python-build-system)
8be58b48 7284 (home-page "https://code.google.com/archive/p/prettytable/")
44d10b1f
RW
7285 (synopsis "Display tabular data in an ASCII table format")
7286 (description
7287 "A library designed to represent tabular data in visually appealing ASCII
7288tables. PrettyTable allows for selection of which columns are to be printed,
7289independent alignment of columns (left or right justified or centred) and
7290printing of sub-tables by specifying a row range.")
7291 (license license:bsd-3)))
7292
7293(define-public python2-prettytable
7294 (package-with-python2 python-prettytable))
7295
7296(define-public python-tables
7297 (package
7298 (name "python-tables")
7299 (version "3.4.4")
7300 (source
7301 (origin
7302 (method url-fetch)
7303 (uri (pypi-uri "tables" version))
7304 (sha256
7305 (base32
7306 "0affz7k8babh8wdmsgrz5jxrd569by2w8ffimcxs9wiaf5rw1idx"))
7307 (modules '((guix build utils)))
7308 (snippet
7309 '(begin
7310 ;; Remove pre-compiled .pyc files from source.
7311 (for-each delete-file-recursively
7312 (find-files "." "__pycache__" #:directories? #t))
7313 (for-each delete-file (find-files "." "\\.pyc$"))
7314 #t))))
7315 (build-system python-build-system)
7316 (arguments
7317 `(;; FIXME: python-build-system does not pass configure-flags to "build"
7318 ;; or "check", so we must override the build and check phases.
7319 #:phases
7320 (modify-phases %standard-phases
7321 (add-after 'unpack 'use-gcc
7322 (lambda _
7323 (substitute* "setup.py"
7324 (("compiler = new_compiler\\(\\)" line)
7325 (string-append line
7326 "\ncompiler.set_executables(compiler='gcc',"
7327 "compiler_so='gcc',"
7328 "linker_exe='gcc',"
7329 "linker_so='gcc -shared')")))
7330 #t))
70b74663
RW
7331 (add-after 'unpack 'disable-tuning
7332 (lambda _
7333 (substitute* "setup.py"
7334 (("cpu_flags = .*")
7335 "cpu_flags = ['sse2']\n"))
7336 #t))
44d10b1f
RW
7337 (replace 'build
7338 (lambda* (#:key inputs #:allow-other-keys)
35d79d61
RW
7339 (invoke "python" "setup.py" "build"
7340 (string-append "--hdf5="
7341 (assoc-ref inputs "hdf5")))))
44d10b1f
RW
7342 (replace 'check
7343 (lambda* (#:key inputs #:allow-other-keys)
35d79d61
RW
7344 (invoke "python" "setup.py" "check"
7345 (string-append "--hdf5="
7346 (assoc-ref inputs "hdf5"))))))))
44d10b1f
RW
7347 (propagated-inputs
7348 `(("python-numexpr" ,python-numexpr)
7349 ("python-numpy" ,python-numpy)))
7350 (native-inputs
7351 `(("python-cython" ,python-cython)
7352 ("pkg-config" ,pkg-config)))
7353 (inputs
538c1a02 7354 `(("hdf5" ,hdf5-1.10)
44d10b1f
RW
7355 ("bzip2" ,bzip2)
7356 ("zlib" ,zlib)))
7357 (home-page "http://www.pytables.org/")
7358 (synopsis "Hierarchical datasets for Python")
7359 (description "PyTables is a package for managing hierarchical datasets and
7360designed to efficiently cope with extremely large amounts of data.")
7361 (license license:bsd-3)))
7362
7363(define-public python2-tables
7364 (package-with-python2 python-tables))
7365
cc2c2850
RW
7366(define-public python-pytest-black
7367 (package
7368 (name "python-pytest-black")
7369 (version "0.3.8")
7370 (source
7371 (origin
7372 (method url-fetch)
7373 (uri (pypi-uri "pytest-black" version))
7374 (sha256
7375 (base32
7376 "04lppqydxm0f3f3x0l8hj7v0j6d8syj34jc37yzqwqcyqsnaga81"))))
7377 (build-system python-build-system)
7378 (propagated-inputs
7379 `(("python-pytest" ,python-pytest)
7380 ("python-black" ,python-black)
7381 ("python-toml" ,python-toml)))
7382 (native-inputs
7383 `(("python-setuptools-scm" ,python-setuptools-scm)))
7384 (home-page "https://github.com/shopkeep/pytest-black")
7385 (synopsis "Pytest plugin to enable format checking with black")
7386 (description
7387 "This package provides a pytest plugin to enable format checking with the
7388Python code formatter \"black\".")
7389 (license license:expat)))
7390
2ceff35f
RW
7391(define-public python-get-version
7392 (package
7393 (name "python-get-version")
7394 (version "2.1")
7395 (source
7396 (origin
7397 (method url-fetch)
7398 (uri (pypi-uri "get_version" version))
7399 (sha256
7400 (base32
7401 "1g15jyx33vkxavv9hwv275cs4g9bp2i1y942raw3fxamq8kbaml1"))))
7402 (build-system python-build-system)
7403 (propagated-inputs
7404 `(("python-pygments" ,python-pygments)
7405 ("python-pytest" ,python-pytest)
7406 ("python-pytest-black" ,python-pytest-black)
7407 ("python-pytest-cov" ,python-pytest-cov)
7408 ("python-setuptools" ,python-setuptools)
7409 ("python-testpath" ,python-testpath)))
7410 (home-page "https://github.com/flying-sheep/get_version")
7411 (synopsis "Version helper in the spirit of versioneer")
7412 (description
7413 "This package provides a version helper that lets you automatically use
7414the latest @code{vX.X.X} Git tag as the version in your Python package. It
7415also supports getting the version from Python source distributions or, once
7416your package is installed, via @code{pkg_resources} (part of
7417@code{setuptools}).")
7418 (license license:gpl3+)))
7419
053ab825
RW
7420(define-public python-legacy-api-wrap
7421 (package
7422 (name "python-legacy-api-wrap")
7423 (version "1.2")
7424 (source
7425 (origin
7426 (method url-fetch)
7427 (uri (pypi-uri "legacy-api-wrap" version))
7428 (sha256
7429 (base32
7430 "06qhp0g543dy98vpa41hwdalvdbsjfc3ldk474yr9sd75mhl8jh3"))))
7431 (build-system python-build-system)
7432 (propagated-inputs
7433 `(("python-get-version" ,python-get-version)
7434 ("python-pytest" ,python-pytest)
7435 ("python-pytest-black" ,python-pytest-black)
7436 ("python-pytest-cov" ,python-pytest-cov)
7437 ("python-setuptools" ,python-setuptools)))
7438 (home-page "https://github.com/flying-sheep/legacy-api-wrap")
7439 (synopsis "Legacy API wrapper")
7440 (description "This module defines a decorator to wrap legacy APIs. The
7441primary use case is APIs defined before keyword-only parameters existed.")
7442 (license license:gpl3+)))
7443
44d10b1f
RW
7444(define-public python-pyasn1
7445 (package
7446 (name "python-pyasn1")
7447 (version "0.4.3")
7448 (source
7449 (origin
7450 (method url-fetch)
7451 (uri (pypi-uri "pyasn1" version))
7452 (sha256
7453 (base32
7454 "1z5h38anjzzrxpraa9iq9llffyx2zs8gx0q6dc1g029miwnn50gv"))))
7455 (build-system python-build-system)
7456 (home-page "http://pyasn1.sourceforge.net/")
7457 (synopsis "ASN.1 types and codecs")
7458 (description
7459 "This is an implementation of ASN.1 types and codecs in Python. It is
7460suitable for a wide range of protocols based on the ASN.1 specification.")
7461 (license license:bsd-2)))
7462
7463(define-public python2-pyasn1
7464 (package-with-python2 python-pyasn1))
7465
7466(define-public python-pyasn1-modules
7467 (package
7468 (name "python-pyasn1-modules")
7469 (version "0.2.2")
7470 (source
7471 (origin
7472 (method url-fetch)
7473 (uri (pypi-uri "pyasn1-modules" version))
7474 (sha256
7475 (base32
7476 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
7477 (build-system python-build-system)
7478 (propagated-inputs
7479 `(("python-pyasn1" ,python-pyasn1)))
7480 (home-page "https://sourceforge.net/projects/pyasn1/")
7481 (synopsis "ASN.1 codec implementations")
7482 (description
7483 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
7484implementations of ASN.1-based codecs and protocols.")
7485 (license license:bsd-3)))
7486
7487(define-public python2-pyasn1-modules
7488 (package-with-python2 python-pyasn1-modules))
7489
7490(define-public python-ipaddress
7491 (package
7492 (name "python-ipaddress")
7493 (version "1.0.22")
7494 (source (origin
7495 (method url-fetch)
7496 (uri (pypi-uri "ipaddress" version))
7497 (sha256
7498 (base32
7499 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
7500 (build-system python-build-system)
7501 (home-page "https://github.com/phihag/ipaddress")
7502 (synopsis "IP address manipulation library")
7503 (description
7504 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
7505 in Python. This library is used to create, poke at, and manipulate IPv4 and
7506 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
7507 module to older versions of Python.")
7508 (license license:psfl)))
7509
7510(define-public python2-ipaddress
7511 (package-with-python2 python-ipaddress))
7512
7513(define-public python2-ipaddr
7514 (package
7515 (name "python2-ipaddr")
7516 (version "2.1.11")
7517 (source
7518 (origin
7519 (method url-fetch)
7520 (uri (pypi-uri "ipaddr" version))
7521 (sha256
7522 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
7523 (build-system python-build-system)
7524 (arguments
7525 `(#:python ,python-2 ;version 2 only
7526 #:phases
7527 (modify-phases %standard-phases
7528 (replace 'check
40b8c4e3 7529 (lambda _ (invoke "python" "ipaddr_test.py"))))))
44d10b1f
RW
7530 (home-page "https://github.com/google/ipaddr-py")
7531 (synopsis "IP address manipulation library")
7532 (description
7533 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
7534IPv6 addresses and networks.
7535
7536For new implementations you may prefer to use the standard module
7537@code{ipaddress}, which was introduced in Python 3.3 and backported to older
7538versions of Python.")
7539 (license license:asl2.0)))
7540
7541(define-public python-idna
7542 (package
7543 (name "python-idna")
e95c9837 7544 (version "2.8")
44d10b1f
RW
7545 (source
7546 (origin
7547 (method url-fetch)
7548 (uri (pypi-uri "idna" version))
7549 (sha256
7550 (base32
e95c9837 7551 "01rlkigdxg17sf9yar1jl8n18ls59367wqh59hnawlyg53vb6my3"))))
44d10b1f
RW
7552 (build-system python-build-system)
7553 (home-page "https://github.com/kjd/idna")
7554 (synopsis "Internationalized domain names in applications")
7555 (description
7556 "This is a library to support the Internationalised Domain Names in
7557Applications (IDNA) protocol as specified in RFC 5891. This version of the
7558protocol is often referred to as “IDNA2008” and can produce different results
7559from the earlier standard from 2003. The library is also intended to act as a
7560suitable drop-in replacement for the “encodings.idna” module that comes with
7561the Python standard library but currently only supports the older 2003
7562specification.")
7563 (license license:bsd-4)))
7564
a76e6a69
JM
7565(define-public python-idna-2.7
7566 (package (inherit python-idna)
7567 (version "2.7")
7568 (source (origin
7569 (method url-fetch)
7570 (uri (pypi-uri "idna" version))
7571 (sha256
7572 (base32
7573 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))))
7574
7575
44d10b1f
RW
7576(define-public python2-idna
7577 (package-with-python2 python-idna))
7578
7579(define-public python-idna-ssl
7580 (package
7581 (name "python-idna-ssl")
7582 (version "1.0.1")
7583 (source
7584 (origin
7585 (method url-fetch)
7586 (uri (pypi-uri "idna-ssl" version))
7587 (sha256
7588 (base32
7589 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
7590 (build-system python-build-system)
7591 (arguments
7592 `(#:tests? #f)) ;circular dependency with python-aiohttp
7593 (home-page "https://github.com/aio-libs/idna-ssl")
7594 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
7595 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
7596domains support.")
7597 (license license:expat)))
7598
7599(define-public python-pretend
7600 (package
7601 (name "python-pretend")
7602 (version "1.0.9")
7603 (source
7604 (origin
7605 (method url-fetch)
9f1f22ee 7606 (uri (pypi-uri "pretend" version))
44d10b1f
RW
7607 (sha256
7608 (base32
7609 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
7610 (build-system python-build-system)
7611 (home-page "https://github.com/alex/pretend")
7612 (synopsis "Library for stubbing in Python")
7613 (description
7614 "Pretend is a library to make stubbing with Python easier. Stubbing is a
7615technique for writing tests. You may hear the term mixed up with mocks,
7616fakes, or doubles. Basically, a stub is an object that returns pre-canned
7617responses, rather than doing any computation.")
7618 (license license:bsd-3)))
7619
7620(define-public python2-pretend
7621 (package-with-python2 python-pretend))
7622
7623(define-public python-pip
7624 (package
7625 (name "python-pip")
0a193d32 7626 (version "20.0.2")
44d10b1f
RW
7627 (source
7628 (origin
7629 (method url-fetch)
7630 (uri (pypi-uri "pip" version))
7631 (sha256
7632 (base32
0a193d32 7633 "0zwnlsjn6mb742cr995zfbk9v56ygxp8w3k49601r9by9kmcic3x"))))
44d10b1f
RW
7634 (build-system python-build-system)
7635 (arguments
7636 '(#:tests? #f)) ; there are no tests in the pypi archive.
7637 (home-page "https://pip.pypa.io/")
7638 (synopsis "Package manager for Python software")
7639 (description
7640 "Pip is a package manager for Python software, that finds packages on the
7641Python Package Index (PyPI).")
7642 (license license:expat)))
7643
7644(define-public python2-pip
7645 (package-with-python2 python-pip))
7646
7647(define-public python-tlsh
7648 (package
7649 (name "python-tlsh")
7650 (version "3.4.5")
7651 (home-page "https://github.com/trendmicro/tlsh")
3e3ff8ad
TGR
7652 (source
7653 (origin
7654 (method git-fetch)
7655 (uri (git-reference
7656 (url "https://github.com/trendmicro/tlsh.git")
7657 (commit (string-append "v" version))))
7658 (file-name (git-file-name name version))
7659 (sha256
7660 (base32 "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll"))))
44d10b1f
RW
7661 (build-system cmake-build-system)
7662 (arguments
7663 '(#:out-of-source? #f
7664 #:phases (modify-phases %standard-phases
7665 (replace
7666 'install
7667 (lambda* (#:key outputs #:allow-other-keys)
7668 ;; Build and install the Python bindings. The underlying
7669 ;; C++ library is apparently not meant to be installed.
7670 (let ((out (assoc-ref outputs "out")))
7671 (with-directory-excursion "py_ext"
7672 (and (system* "python" "setup.py" "build")
7673 (system* "python" "setup.py" "install"
7674 (string-append "--prefix=" out))))))))))
7675 (inputs `(("python" ,python-wrapper))) ;for the bindings
7676 (synopsis "Fuzzy matching library for Python")
7677 (description
7678 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
7679Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
7680value which can be used for similarity comparisons. Similar objects have
7681similar hash values, which allows for the detection of similar objects by
7682comparing their hash values. The byte stream should have a sufficient amount
7683of complexity; for example, a byte stream of identical bytes will not generate
7684a hash value.")
7685 (license license:asl2.0)))
7686
7687(define-public python2-tlsh
7688 (package
7689 (inherit python-tlsh)
7690 (name "python2-tlsh")
7691 (inputs `(("python" ,python-2)))))
7692
7693(define-public python-termcolor
7694 (package
7695 (name "python-termcolor")
7696 (version "1.1.0")
7697 (source
7698 (origin
7699 (method url-fetch)
7700 (uri (pypi-uri "termcolor" version))
7701 (sha256
7702 (base32
7703 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
7704 (build-system python-build-system)
7705 (arguments
7706 ;; There are no tests.
7707 `(#:tests? #f))
e85af137 7708 (home-page "https://pypi.org/project/termcolor/")
44d10b1f
RW
7709 (synopsis "ANSII Color formatting for terminal output")
7710 (description
7711 "This package provides ANSII Color formatting for output in terminals.")
7712 (license license:expat)))
7713
7714(define-public python2-termcolor
7715 (package-with-python2 python-termcolor))
7716
7717(define-public python-libarchive-c
7718 (package
7719 (name "python-libarchive-c")
f2774824 7720 (version "2.9")
44d10b1f
RW
7721 (source (origin
7722 (method url-fetch)
7723 (uri (pypi-uri "libarchive-c" version))
7724 (sha256
7725 (base32
f2774824 7726 "0q7g6a97110bk0j5x81555kajyxh4sybaabab6v5sgr0xi6386cr"))))
44d10b1f
RW
7727 (build-system python-build-system)
7728 (arguments
7729 '(#:phases (modify-phases %standard-phases
7730 (add-before
7731 'build 'reference-libarchive
7732 (lambda* (#:key inputs #:allow-other-keys)
7733 ;; Retain the absolute file name of libarchive.so.
7734 (let ((libarchive (assoc-ref inputs "libarchive")))
7735 (substitute* "libarchive/ffi.py"
7736 (("find_library\\('archive'\\)")
7737 (string-append "'" libarchive
7738 "/lib/libarchive.so'"))))))
7739 (replace 'check
7740 (lambda _ (invoke "pytest" "-vv"))))))
7741 (native-inputs
7742 `(("python-mock" ,python-mock)
7743 ("python-pytest" ,python-pytest)))
7744 (inputs
7745 `(("libarchive" ,libarchive)))
7746 (home-page "https://github.com/Changaco/python-libarchive-c")
7747 (synopsis "Python interface to libarchive")
7748 (description
7749 "This package provides Python bindings to libarchive, a C library to
7750access possibly compressed archives in many different formats. It uses
7751Python's @code{ctypes} foreign function interface (FFI).")
7752 (license license:lgpl2.0+)))
7753
7754(define-public python2-libarchive-c
7755 (package-with-python2 python-libarchive-c))
7756
7757(define-public python-file
7758 (package
7759 (inherit file)
7760 (name "python-file")
7761 (build-system python-build-system)
7762 (arguments
7763 '(#:tests? #f ;no tests
7764 #:configure-flags '("--single-version-externally-managed" "--root=/")
7765 #:phases (modify-phases %standard-phases
7766 (add-before 'build 'change-directory
7767 (lambda _
7768 (chdir "python")
7769 #t))
7770 (add-before 'build 'set-library-file-name
7771 (lambda* (#:key inputs #:allow-other-keys)
7772 (let ((file (assoc-ref inputs "file")))
7773 (substitute* "magic.py"
7774 (("find_library\\('magic'\\)")
7775 (string-append "'" file "/lib/libmagic.so'")))
7776 #t))))))
7777 (inputs `(("file" ,file)))
528ea990
LC
7778 (native-inputs (if (%current-target-system)
7779 `(("self" ,this-package))
7780 '()))
44d10b1f
RW
7781 (synopsis "Python bindings to the libmagic file type guesser. Note that
7782this module and the python-magic module both provide a \"magic.py\" file;
7783these two modules, which are different and were developed separately, both
7784serve the same purpose: provide Python bindings for libmagic.")))
7785
7786(define-public python2-file
7787 (package-with-python2 python-file))
7788
7789(define-public python-debian
7790 (package
7791 (name "python-debian")
7792 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
9f74bd31 7793 (version "0.1.36")
44d10b1f
RW
7794 (source
7795 (origin
9f74bd31
VC
7796 ;; Use git-fetch, as pypi doesn't include test suite.
7797 (method git-fetch)
7798 (uri (git-reference
7799 (url home-page)
7800 (commit version)))
7801 (file-name (git-file-name name version))
44d10b1f
RW
7802 (sha256
7803 (base32
9f74bd31 7804 "0qy6x28bj6yfikhjww932v5xq4mf5bm1iczl7acy4c7zm6mwhqfa"))))
44d10b1f 7805 (build-system python-build-system)
9f74bd31
VC
7806 (arguments
7807 `(#:phases (modify-phases %standard-phases
7808 (add-after 'unpack 'remove-debian-specific-tests
7809 ;; python-apt, apt and dpkg are not yet available in guix,
7810 ;; and these tests heavily depend on them.
7811 (lambda _
7812 (delete-file "lib/debian/tests/test_deb822.py")
7813 (delete-file "lib/debian/tests/test_debfile.py")
7814 #t)))))
44d10b1f 7815 (propagated-inputs
9f74bd31
VC
7816 `(("python-six" ,python-six)
7817 ("python-chardet" ,python-chardet)))
44d10b1f
RW
7818 (synopsis "Debian package related modules")
7819 (description
7820 ;; XXX: Use @enumerate instead of @itemize to work around
7821 ;; <http://bugs.gnu.org/21772>.
7822 "This package provides Python modules that abstract many formats of
7823Debian-related files, such as:
7824
7825@enumerate
7826@item Debtags information;
7827@item @file{debian/changelog} files;
7828@item packages files, pdiffs;
7829@item control files of single or multiple RFC822-style paragraphs---e.g.
7830 @file{debian/control}, @file{.changes}, @file{.dsc};
7831@item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
7832 contained files and meta-information.
7833@end enumerate\n")
7834
7835 ;; Modules are either GPLv2+ or GPLv3+.
7836 (license license:gpl3+)))
7837
44d10b1f
RW
7838(define-public python-nbformat
7839 (package
7840 (name "python-nbformat")
7841 (version "4.4.0")
7842 (source
7843 (origin
7844 (method url-fetch)
7845 (uri (pypi-uri "nbformat" version))
7846 (sha256
7847 (base32
7848 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
7849 (build-system python-build-system)
7850 (arguments `(#:tests? #f)) ; no test target
7851 (propagated-inputs
7852 `(("python-ipython-genutils" ,python-ipython-genutils)
7853 ("python-jsonschema" ,python-jsonschema)
7854 ("python-jupyter-core" ,python-jupyter-core)
7855 ("python-traitlets" ,python-traitlets)))
7856 (home-page "http://jupyter.org")
7857 (synopsis "Jupyter Notebook format")
7858 (description "This package provides the reference implementation of the
7859Jupyter Notebook format and Python APIs for working with notebooks.")
7860 (license license:bsd-3)))
7861
7862(define-public python2-nbformat
7863 (package-with-python2 python-nbformat))
7864
7865(define-public python-bleach
7866 (package
7867 (name "python-bleach")
e6daf515 7868 (version "3.1.1")
44d10b1f
RW
7869 (source
7870 (origin
7871 (method url-fetch)
7872 (uri (pypi-uri "bleach" version))
7873 (sha256
7874 (base32
e6daf515 7875 "0j4xlnw99m1xy0s7wxz9fk5f3c1n8r296fh75jn5p5j61w6qg2xa"))))
44d10b1f
RW
7876 (build-system python-build-system)
7877 (propagated-inputs
ff0efc8f 7878 `(("python-webencodings" ,python-webencodings)
44d10b1f
RW
7879 ("python-six" ,python-six)))
7880 (native-inputs
ff0efc8f
MB
7881 `(("python-pytest" ,python-pytest)
7882 ("python-pytest-runner" ,python-pytest-runner-2)))
44d10b1f
RW
7883 (home-page "https://github.com/jsocol/bleach")
7884 (synopsis "Whitelist-based HTML-sanitizing tool")
7885 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
7886 (license license:asl2.0)))
7887
7888(define-public python2-bleach
7889 (package-with-python2 python-bleach))
7890
7891(define-public python-entrypoints
7892 (package
7893 (name "python-entrypoints")
a7f1b718 7894 (version "0.3")
44d10b1f
RW
7895 (source
7896 (origin
7897 (method url-fetch)
a7f1b718 7898 (uri (pypi-uri "entrypoints" version))
44d10b1f
RW
7899 (sha256
7900 (base32
a7f1b718 7901 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
44d10b1f
RW
7902 (build-system python-build-system)
7903 ;; The package does not come with a setup.py file, so we have to generate
7904 ;; one ourselves.
7905 (arguments
7906 `(#:tests? #f
7907 #:phases
7908 (modify-phases %standard-phases
7909 (add-after 'unpack 'create-setup.py
7910 (lambda _
7911 (call-with-output-file "setup.py"
7912 (lambda (port)
7913 (format port "\
7914from setuptools import setup
7915setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
7916" ,version))))))))
7917 (home-page "https://github.com/takluyver/entrypoints")
7918 (synopsis "Discover and load entry points from installed Python packages")
7919 (description "Entry points are a way for Python packages to advertise
7920objects with some common interface. The most common examples are
7921@code{console_scripts} entry points, which define shell commands by
7922identifying a Python function to run. The @code{entrypoints} module contains
7923functions to find and load entry points.")
7924 (license license:expat)))
7925
7926(define-public python2-entrypoints
7927 (package-with-python2 python-entrypoints))
7928
7929(define-public python-nbconvert
7930 (package
7931 (name "python-nbconvert")
7932 (version "5.0.0b1")
7933 (source
7934 (origin
7935 (method url-fetch)
7936 (uri (pypi-uri "nbconvert" version))
7937 (sha256
7938 (base32
7939 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
7940 (build-system python-build-system)
7941 (arguments
7942 `(;; The "bdist_egg" target is disabled by default, causing the installation
7943 ;; to fail.
7944 #:configure-flags (list "bdist_egg")
7945 ;; FIXME: 5 failures, 40 errors.
7946 #:tests? #f))
7947 ;; #:phases
7948 ;; (modify-phases %standard-phases
7949 ;; (replace 'check
7950 ;; (lambda _
7951 ;; (zero? (system* "py.test" "-v")))))
7952 (native-inputs
7953 `(("python-pytest" ,python-pytest)))
7954 (propagated-inputs
7955 `(("python-bleach" ,python-bleach)
7956 ("python-entrypoints" ,python-entrypoints)
7957 ("python-jinja2" ,python-jinja2)
7958 ("python-jupyter-core" ,python-jupyter-core)
7959 ("python-mistune" ,python-mistune)
7960 ("python-nbformat" ,python-nbformat)
7961 ("python-pygments" ,python-pygments)
7962 ("python-traitlets" ,python-traitlets)))
7963 (home-page "http://jupyter.org")
7964 (synopsis "Converting Jupyter Notebooks")
7965 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
7966notebooks to various other formats via Jinja templates. It allows you to
7967convert an @code{.ipynb} notebook file into various static formats including:
7968
7969@enumerate
7970@item HTML
7971@item LaTeX
7972@item PDF
7973@item Reveal JS
7974@item Markdown (md)
7975@item ReStructured Text (rst)
7976@item executable script
7977@end enumerate\n")
7978 (license license:bsd-3)))
7979
7980(define-public python2-nbconvert
7981 (package-with-python2 python-nbconvert))
7982
44d10b1f
RW
7983(define-public python-notebook
7984 (package
7985 (name "python-notebook")
7986 (version "5.7.4")
7987 (source (origin
7988 (method url-fetch)
7989 (uri (pypi-uri "notebook" version))
7990 (sha256
7991 (base32
7992 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
7993 (build-system python-build-system)
7994 (arguments
7995 `(#:phases
7996 (modify-phases %standard-phases
7997 (replace 'check
7998 (lambda _
7999 ;; These tests require a browser
8000 (delete-file-recursively "notebook/tests/selenium")
8001 ;; Some tests need HOME
8002 (setenv "HOME" "/tmp")
8003 ;; This file contains "warningfilters", which are not supported
8004 ;; by this version of nose.
8005 (delete-file "setup.cfg")
8006 (with-directory-excursion "/tmp"
8007 (invoke "nosetests" "-v"))
8008 #t)))))
8009 (propagated-inputs
8010 `(("python-jupyter-core" ,python-jupyter-core)
8011 ("python-nbformat" ,python-nbformat)
8012 ("python-nbconvert" ,python-nbconvert)
8013 ("python-prometheus-client" ,python-prometheus-client)
8014 ("python-send2trash" ,python-send2trash)
8015 ("python-terminado" ,python-terminado)))
8016 (native-inputs
8017 `(("python-nose" ,python-nose)
8018 ("python-sphinx" ,python-sphinx)
8019 ("python-requests" ,python-requests)))
8020 (home-page "http://jupyter.org/")
8021 (synopsis "Web-based notebook environment for interactive computing")
8022 (description
8023 "The Jupyter HTML notebook is a web-based notebook environment for
8024interactive computing.")
8025 (properties `((python2-variant . ,(delay python2-notebook))))
8026 (license license:bsd-3)))
8027
8028(define-public python2-notebook
8029 (let ((base (package-with-python2
8030 (strip-python2-variant python-notebook))))
8031 (package (inherit base)
8032 (native-inputs
8033 `(("python2-mock" ,python2-mock)
8034 ,@(package-native-inputs base)))
8035 (arguments
8036 (substitute-keyword-arguments (package-arguments base)
8037 ((#:phases phases)
8038 `(modify-phases ,phases
8039 (add-before 'check 'disable-test-case
8040 ;; The test requires network access to localhost. Curiously it
8041 ;; fails with Python 2 only. Simply make the test-case return
8042 ;; immediately.
8043 (lambda _
8044 (substitute*
8045 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
8046 (("formats = self.nbconvert_api") "return #")))))))))))
8047
8048(define-public python-widgetsnbextension
8049 (package
8050 (name "python-widgetsnbextension")
8051 (version "3.4.2")
8052 (source
8053 (origin
8054 (method url-fetch)
8055 (uri (pypi-uri "widgetsnbextension" version))
8056 (sha256
8057 (base32
8058 "0rc2nivdy7k4m3vljx7wdh2jh11djapcgwhvzlbs0isl8gl8nqgs"))))
8059 (build-system python-build-system)
8060 (propagated-inputs
8061 `(("python-ipykernel" ,python-ipykernel)
8062 ("python-notebook" ,python-notebook)))
8063 (native-inputs
8064 `(("python-certifi" ,python-certifi)
8065 ("python-nose" ,python-nose)))
8066 (home-page "https://ipython.org")
8067 (synopsis "IPython HTML widgets for Jupyter")
8068 (description "This package provides interactive HTML widgets for Jupyter
8069notebooks.")
8070 (license license:bsd-3)))
8071
8072(define-public python2-widgetsnbextension
8073 (package-with-python2 python-widgetsnbextension))
8074
8075(define-public python-ipywidgets
8076 (package
8077 (name "python-ipywidgets")
8078 (version "5.2.2")
8079 (source
8080 (origin
8081 (method url-fetch)
8082 (uri (pypi-uri "ipywidgets" version))
8083 (sha256
8084 (base32
8085 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
8086 (build-system python-build-system)
8087 (propagated-inputs
8088 `(("python-ipython" ,python-ipython)
8089 ("python-traitlets" ,python-traitlets)
8090 ("python-widgetsnbextension" ,python-widgetsnbextension)))
8091 (native-inputs
8092 `(("python-nose" ,python-nose)
8093 ("python-pytest" ,python-pytest)))
8094 (home-page "https://ipython.org")
8095 (synopsis "IPython HTML widgets for Jupyter")
8096 (description "Ipywidgets are interactive HTML widgets for Jupyter
8097notebooks and the IPython kernel. Notebooks come alive when interactive
8098widgets are used. Users gain control of their data and can visualize changes
8099in the data.")
8100 (license license:bsd-3)))
8101
8102(define-public python2-ipywidgets
8103 (package-with-python2 python-ipywidgets))
8104
8105(define-public python-jupyter-console
8106 (package
8107 (name "python-jupyter-console")
becb9cbf 8108 (version "6.0.0")
44d10b1f
RW
8109 (source
8110 (origin
8111 (method url-fetch)
8112 (uri (pypi-uri "jupyter_console" version))
8113 (sha256
8114 (base32
becb9cbf 8115 "1xdjw11cppf1fxvwkw2bk13ckkwas3bdah8baingn9296mvfi31h"))))
44d10b1f 8116 (build-system python-build-system)
44d10b1f
RW
8117 (propagated-inputs
8118 `(("python-ipykernel" ,python-ipykernel)
8119 ("python-jupyter-client" ,python-jupyter-client)
becb9cbf 8120 ("python-prompt-toolkit" ,python-prompt-toolkit)
44d10b1f
RW
8121 ("python-pygments" ,python-pygments)))
8122 (native-inputs
8123 `(("python-nose" ,python-nose)))
8124 (home-page "https://jupyter.org")
8125 (synopsis "Jupyter terminal console")
8126 (description "This package provides a terminal-based console frontend for
8127Jupyter kernels. It also allows for console-based interaction with non-Python
8128Jupyter kernels such as IJulia and IRKernel.")
8129 (license license:bsd-3)))
8130
8131(define-public python2-jupyter-console
8e590c81
RW
8132 (package
8133 (name "python2-jupyter-console")
8134 (version "5.2.0")
8135 (source
8136 (origin
8137 (method url-fetch)
8138 (uri (pypi-uri "jupyter_console" version))
8139 (sha256
8140 (base32
8141 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
8142 (build-system python-build-system)
8143 ;; Tests only run in an TTY.
8144 (arguments `(#:tests? #f))
8145 (propagated-inputs
8146 `(("python2-ipykernel" ,python2-ipykernel)
8147 ("python2-jupyter-client" ,python2-jupyter-client)
8148 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
8149 ("python2-pygments" ,python2-pygments)))
8150 (native-inputs
8151 `(("python2-nose" ,python2-nose)))
8152 (home-page "https://jupyter.org")
8153 (synopsis "Jupyter terminal console")
8154 (description "This package provides a terminal-based console frontend for
8155Jupyter kernels. It also allows for console-based interaction with non-Python
8156Jupyter kernels such as IJulia and IRKernel.")
8157 (license license:bsd-3)))
44d10b1f
RW
8158
8159;; The python-ipython and python-jupyter-console require each other. To get
8160;; the functionality in both packages working, strip down the
8161;; python-jupyter-console package when using it as an input to python-ipython.
8162(define python-jupyter-console-minimal
8163 (package
8164 (inherit python-jupyter-console)
8165 (name "python-jupyter-console-minimal")
8166 (arguments
8167 (substitute-keyword-arguments
8168 (package-arguments python-jupyter-console)
8169 ((#:phases phases)
8170 `(modify-phases ,phases
8171 (add-after 'install 'delete-bin
8172 (lambda* (#:key outputs #:allow-other-keys)
8173 ;; Delete the bin files, to avoid conflicts in profiles
8174 ;; where python-ipython and python-jupyter-console are
8175 ;; both present.
8176 (delete-file-recursively
8177 (string-append
8178 (assoc-ref outputs "out") "/bin"))))))))
8179 ;; Remove the python-ipython propagated input, to avoid the cycle
8180 (propagated-inputs
8181 (alist-delete
8182 "python-ipython"
8183 (package-propagated-inputs python-jupyter-console)))))
8184
8185(define-public python-qtconsole
8186 (package
8187 (name "python-qtconsole")
8188 (version "4.4.3")
8189 (source
8190 (origin
8191 (method url-fetch)
8192 (uri (pypi-uri "qtconsole" version))
8193 (sha256
8194 (base32
8195 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
8196 (build-system python-build-system)
8197 (arguments
8198 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
8199 ;; but we only have the LTS version 5.x. This means that there might be
8200 ;; runtime errors, but since this is a dependency of the Jupyter package,
8201 ;; and Jupyter can be used without the qtconsole we can overlook this for
8202 ;; now.
8203 `(#:tests? #f
8204 #:phases
8205 (modify-phases %standard-phases
8206 (add-before 'check 'pre-check
8207 (lambda _
8208 (setenv "QT_QPA_PLATFORM" "offscreen")
8209 #t)))))
8210 (propagated-inputs
8211 `(("python-ipykernel" ,python-ipykernel)
8212 ("python-ipython" ,python-ipython)))
8213 (native-inputs
8214 `(("python-pytest" ,python-pytest)))
8215 (home-page "http://jupyter.org")
8216 (synopsis "Jupyter Qt console")
8217 (description "This package provides a Qt-based console for Jupyter with
8218support for rich media output.")
8219 (license license:bsd-3)))
8220
6ec87223
VC
8221(define-public python-jsbeautifier
8222 (package
8223 (name "python-jsbeautifier")
8224 (version "1.10.2")
8225 (home-page "https://github.com/beautify-web/js-beautify")
8226 (source (origin
8227 (method git-fetch)
8228 (uri (git-reference
8229 (url home-page)
8230 (commit (string-append "v" version))))
8231 (file-name (git-file-name name version))
8232 (sha256
8233 (base32
8234 "0wawb070ki1axb3jc9xvsrgpji52vcfif3zmjzc3z4g98m5xw4kg"))))
8235 (build-system python-build-system)
8236 (arguments
8237 `(#:phases (modify-phases %standard-phases
8238 (add-after 'unpack 'chdir
8239 (lambda _
8240 ;; The upstream Git repository contains all the code,
8241 ;; but this package only builds the python code.
8242 (chdir "python")
8243 #t))
8244 (add-after 'unpack 'patch-python-six-requirements
8245 (lambda _
8246 (substitute* "python/setup.py"
8247 (("six>=1.12.0")
8248 "six>=1.11.0"))
8249 #t)))))
8250 (propagated-inputs
8251 `(("python-editorconfig" ,python-editorconfig)
8252 ("python-six" ,python-six)))
8253 (native-inputs
8254 `(("python-pytest" ,python-pytest)))
8255 (synopsis "JavaScript unobfuscator and beautifier")
8256 (description "Beautify, unpack or deobfuscate JavaScript, leveraging
8257popular online obfuscators.")
8258 (license license:expat)))
8259
44d10b1f
RW
8260(define-public jupyter
8261 (package
8262 (name "jupyter")
8263 (version "1.0.0")
8264 (source
8265 (origin
8266 (method url-fetch)
8267 (uri (pypi-uri "jupyter" version))
8268 (sha256
8269 (base32
8270 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
8271 (build-system python-build-system)
8272 (arguments '(#:tests? #f)) ; there are none.
8273 (propagated-inputs
8274 `(("python-ipykernel" ,python-ipykernel)
8275 ("python-ipywidgets" ,python-ipywidgets)
8276 ("python-jupyter-console" ,python-jupyter-console)
8277 ("python-nbconvert" ,python-nbconvert)
8278 ("python-notebook" ,python-notebook)
8279 ("python-qtconsole" ,python-qtconsole)))
8280 (native-search-paths
8281 (list (search-path-specification
8282 (variable "JUPYTER_PATH")
8283 (files '("share/jupyter")))))
8284 (home-page "https://jupyter.org")
8285 (synopsis "Web application for interactive documents")
8286 (description
8287 "The Jupyter Notebook is a web application that allows you to create and
8288share documents that contain live code, equations, visualizations and
8289explanatory text. Uses include: data cleaning and transformation, numerical
8290simulation, statistical modeling, machine learning and much more.")
8291 (license license:bsd-3)))
8292
8293(define-public python-chardet
8294 (package
8295 (name "python-chardet")
8296 (version "3.0.4")
8297 (source
8298 (origin
8299 (method url-fetch)
8300 (uri (pypi-uri "chardet" version))
8301 (sha256
8302 (base32
8303 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
8304 (native-inputs
8305 `(("python-hypothesis" ,python-hypothesis)
8306 ("python-pytest" ,python-pytest)
8307 ("python-pytest-runner" ,python-pytest-runner)))
8308 (build-system python-build-system)
3d369407
MB
8309 ;; XXX: Incompatible with Pytest 4: <https://github.com/chardet/chardet/issues/173>.
8310 (arguments `(#:tests? #f))
44d10b1f
RW
8311 (home-page "https://github.com/chardet/chardet")
8312 (synopsis "Universal encoding detector for Python 2 and 3")
8313 (description
8314 "This package provides @code{chardet}, a Python module that can
8315automatically detect a wide range of file encodings.")
8316 (license license:lgpl2.1+)))
8317
8318(define-public python2-chardet
8319 (package-with-python2 python-chardet))
8320
8321(define-public python-docopt
8322 (package
8323 (name "python-docopt")
8324 (version "0.6.2")
8325 (source
8326 (origin
11e46326 8327 (method git-fetch)
44d10b1f 8328 ;; The release on PyPI does not include tests.
11e46326
EF
8329 (uri (git-reference
8330 (url "https://github.com/docopt/docopt")
8331 (commit version)))
8332 (file-name (git-file-name name version))
44d10b1f
RW
8333 (sha256
8334 (base32
11e46326 8335 "0aad9gbswnnhssin2q0m5lmpm0ahyf80ahs2zjigbn5y7fvljnd0"))))
44d10b1f
RW
8336 (build-system python-build-system)
8337 (native-inputs
8338 `(("python-pytest" ,python-pytest)))
8339 (arguments
8340 `(#:phases
8341 (modify-phases %standard-phases
8342 (replace 'check
8343 (lambda _ (invoke "py.test"))))))
8344 (home-page "http://docopt.org")
8345 (synopsis "Command-line interface description language for Python")
8346 (description "This library allows the user to define a command-line
8347interface from a program's help message rather than specifying it
4ca7207b 8348programmatically with command-line parsers like @code{getopt} and
44d10b1f
RW
8349@code{argparse}.")
8350 (license license:expat)))
8351
8352(define-public python2-docopt
8353 (package-with-python2 python-docopt))
8354
8355(define-public python-pythondialog
8356 (package
8357 (name "python-pythondialog")
8358 (version "3.4.0")
8359 (source
8360 (origin
8361 (method url-fetch)
8362 (uri (pypi-uri "pythondialog" version))
8363 (sha256
8364 (base32
8365 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
8366 (build-system python-build-system)
8367 (arguments
8368 `(#:phases
8369 (modify-phases %standard-phases
8370 (add-after 'unpack 'patch-path
8371 (lambda* (#:key inputs #:allow-other-keys)
8372 (let* ((dialog (assoc-ref inputs "dialog")))
8373 ;; Since this library really wants to grovel the search path, we
8374 ;; must hardcode dialog's store path into it.
8375 (substitute* "dialog.py"
8376 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
8377 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
8378 #t))))
8379 #:tests? #f)) ; no test suite
8380 (propagated-inputs
8381 `(("dialog" ,dialog)))
8382 (home-page "http://pythondialog.sourceforge.net/")
8383 (synopsis "Python interface to the UNIX dialog utility")
8384 (description "A Python wrapper for the dialog utility. Its purpose is to
8385provide an easy to use, pythonic and comprehensive Python interface to dialog.
8386This allows one to make simple text-mode user interfaces on Unix-like systems")
8387 (license license:lgpl2.1)
8388 (properties `((python2-variant . ,(delay python2-pythondialog))))))
8389
8390(define-public python2-pythondialog
8391 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
8392 (package
8393 (inherit base)
8394 (version (package-version python-pythondialog))
8395 (source (origin
8396 (method url-fetch)
8397 (uri (pypi-uri "python2-pythondialog" version))
8398 (sha256
8399 (base32
8400 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
8401
8402(define-public python-configobj
8403 (package
8404 (name "python-configobj")
8405 (version "5.0.6")
8406 (source (origin
8407 (method url-fetch)
b0758fbb 8408 (uri (pypi-uri "configobj" version))
44d10b1f
RW
8409 (sha256
8410 (base32
8411 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
8412 ;; Patch setup.py so it looks for python-setuptools, which is
8413 ;; required to parse the keyword 'install_requires' in setup.py.
8414 (patches (search-patches "python-configobj-setuptools.patch"))))
8415 (build-system python-build-system)
8416 (propagated-inputs
8417 `(("python-six" ,python-six)))
8418 (synopsis "Config file reading, writing and validation")
8419 (description "ConfigObj is a simple but powerful config file reader and
8420writer: an ini file round tripper. Its main feature is that it is very easy to
8421use, with a straightforward programmer’s interface and a simple syntax for
8422config files.")
8423 (home-page "https://github.com/DiffSK/configobj")
8424 (license license:bsd-3)))
8425
8426(define-public python2-configobj
8427 (package-with-python2 python-configobj))
8428
8429(define-public python-configargparse
8430 (package
8431 (name "python-configargparse")
86ae491f 8432 (version "0.14.0")
44d10b1f
RW
8433 (source (origin
8434 (method url-fetch)
8435 (uri (pypi-uri "ConfigArgParse" version))
8436 (sha256
8437 (base32
86ae491f 8438 "149fy4zya0rsnlkvxbbq43cyr8lscb5k4pj1m6n7f1grwcmzwbif"))))
44d10b1f
RW
8439 (build-system python-build-system)
8440 (native-inputs
8441 `(("python-pyyaml" ,python-pyyaml)))
8442 (arguments
8443 `(#:phases
8444 (modify-phases %standard-phases
8445 (replace 'check
8446 (lambda _
8447 ;; Bypass setuptools-shim because one test relies on "setup.py"
8448 ;; being the first argument passed to the python call.
8449 ;;
8450 ;; NOTE: Many tests do not run because they rely on Python's
8451 ;; built-in test.test_argparse, but we remove the unit tests from
8452 ;; our Python installation.
8453 (invoke "python" "setup.py" "test"))))))
8454 (synopsis "Replacement for argparse")
8455 (description "A drop-in replacement for argparse that allows options to also
8456be set via config files and/or environment variables.")
8457 (home-page "https://github.com/bw2/ConfigArgParse")
8458 (license license:expat)))
8459
8460(define-public python2-configargparse
8461 (package-with-python2 python-configargparse))
8462
8463(define-public python-argparse-manpage
8464 (package
8465 (name "python-argparse-manpage")
8466 (version "1.1")
8467 (source
8468 (origin
8469 (method url-fetch)
8470 (uri (pypi-uri "argparse-manpage" version))
8471 (sha256
8472 (base32
8473 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
8474 (build-system python-build-system)
8475 (home-page "https://github.com/praiskup/argparse-manpage")
8476 (synopsis "Build manual page from Python's ArgumentParser object")
8477 (description
8478 "This package provides tools to build manual pages from Python's
8479@code{ArgumentParser} object.")
8480 (license license:asl2.0)))
8481
3e8f76d8
RW
8482(define-public python-contextlib2
8483 (package
8484 (name "python-contextlib2")
8485 (version "0.5.5")
8486 (source
8487 (origin
8488 (method url-fetch)
8489 (uri (pypi-uri "contextlib2" version))
8490 (sha256
8491 (base32
8492 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
8493 (build-system python-build-system)
a0fdade2 8494 (home-page "https://contextlib2.readthedocs.org/")
3e8f76d8
RW
8495 (synopsis "Tools for decorators and context managers")
8496 (description "This module is primarily a backport of the Python
84973.2 contextlib to earlier Python versions. Like contextlib, it
8498provides utilities for common tasks involving decorators and context
8499managers. It also contains additional features that are not part of
8500the standard library.")
1e158ba1 8501 (properties `((python2-variant . ,(delay python2-contextlib2))))
3e8f76d8
RW
8502 (license license:psfl)))
8503
44d10b1f 8504(define-public python2-contextlib2
1e158ba1
EF
8505 (let ((base (package-with-python2
8506 (strip-python2-variant python-contextlib2))))
8507 (package
8508 (inherit base)
8509 (arguments
8510 (substitute-keyword-arguments (package-arguments base)
8511 ((#:phases phases)
8512 `(modify-phases ,phases
8513 (replace 'check
8514 (lambda _ (invoke "python" "test_contextlib2.py" "-v")))))))
8515 (native-inputs
8516 `(("python2-unittest2" ,python2-unittest2))))))
44d10b1f
RW
8517
8518(define-public python-texttable
8519 (package
8520 (name "python-texttable")
02422b3b 8521 (version "1.6.2")
44d10b1f
RW
8522 (source
8523 (origin
8524 (method url-fetch)
8525 (uri (pypi-uri "texttable" version))
8526 (sha256
8527 (base32
02422b3b 8528 "1x5l77akfc20x52jma9573qp8l8r07q103pm4l0pbizvh4vp1wzg"))))
44d10b1f 8529 (build-system python-build-system)
02422b3b
RW
8530 (arguments
8531 `(#:phases
8532 (modify-phases %standard-phases
8533 (replace 'check
8534 (lambda _ (invoke "pytest" "tests.py"))))))
8535 (native-inputs
8536 `(("python-pytest" ,python-pytest)))
44d10b1f
RW
8537 (home-page "https://github.com/foutaise/texttable/")
8538 (synopsis "Python module for creating simple ASCII tables")
8539 (description "Texttable is a Python module for creating simple ASCII
8540tables.")
02422b3b 8541 (license license:expat)))
44d10b1f
RW
8542
8543(define-public python2-texttable
8544 (package-with-python2 python-texttable))
8545
8546(define-public python-atomicwrites
8547 (package
8548 (name "python-atomicwrites")
14f10479 8549 (version "1.3.0")
44d10b1f
RW
8550 (source (origin
8551 (method url-fetch)
8552 (uri (pypi-uri "atomicwrites" version))
8553 (sha256
8554 (base32
14f10479 8555 "19ngcscdf3jsqmpcxn6zl5b6anmsajb6izp1smcd1n02midl9abm"))))
44d10b1f
RW
8556 (build-system python-build-system)
8557 (synopsis "Atomic file writes in Python")
8558 (description "Library for atomic file writes using platform dependent tools
8559for atomic file system operations.")
8560 (home-page "https://github.com/untitaker/python-atomicwrites")
8561 (license license:expat)))
8562
8563(define-public python2-atomicwrites
8564 (package-with-python2 python-atomicwrites))
8565
8566(define-public python-click-threading
8567 (package
8568 (name "python-click-threading")
8569 (version "0.4.4")
8570 (source (origin
8571 (method url-fetch)
8572 (uri (pypi-uri "click-threading" version))
8573 (sha256
8574 (base32
8575 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
8576 (build-system python-build-system)
8577 (propagated-inputs
8578 `(("python-click" ,python-click)))
8579 (synopsis "Utilities for multithreading in Click")
8580 (description "This package provides utilities for multithreading in Click
8581applications.")
8582 (home-page "https://github.com/click-contrib/click-threading")
8583 (license license:expat)))
8584
8585(define-public python-click-log
8586 (package
8587 (name "python-click-log")
8588 (version "0.3.2")
8589 (source (origin
8590 (method url-fetch)
8591 (uri (pypi-uri "click-log" version))
8592 (sha256
8593 (base32
8594 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
8595 (build-system python-build-system)
8596 (propagated-inputs
8597 `(("python-click" ,python-click)))
8598 (synopsis "Logging for click applications")
8599 (description "This package provides a Python library for logging Click
8600applications.")
8601 (home-page "https://github.com/click-contrib/click-log")
8602 (license license:expat)))
8603
8604(define-public python-apipkg
8605 (package
8606 (name "python-apipkg")
8607 (version "1.4")
8608 (source (origin
8609 (method url-fetch)
8610 (uri (pypi-uri "apipkg" version))
8611 (sha256
8612 (base32
8613 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
8614 (build-system python-build-system)
8615 (native-inputs
8616 `(("python-pytest" ,python-pytest)))
8617 (synopsis "Namespace control and lazy-import mechanism")
8618 (description "With apipkg you can control the exported namespace of a Python
8619package and greatly reduce the number of imports for your users. It is a small
8620pure Python module that works on virtually all Python versions.")
8621 (home-page "https://github.com/pytest-dev/apipkg")
8622 (license license:expat)))
8623
8624(define-public python2-apipkg
8625 (package-with-python2 python-apipkg))
8626
8627(define-public python-execnet
8628 (package
8629 (name "python-execnet")
8630 (version "1.4.1")
8631 (source (origin
8632 (method url-fetch)
8633 (uri (pypi-uri "execnet" version))
8634 (sha256
8635 (base32
8636 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
8637 (build-system python-build-system)
8638 (arguments
8639 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
8640 ;; The two test failures are caused by the lack of an `ssh` executable.
8641 ;; The test suite can be run with pytest after the 'install' phase.
8642 #:tests? #f))
8643 (native-inputs
8644 `(("python-pytest" ,python-pytest)
8645 ("python-setuptools-scm" ,python-setuptools-scm)))
8646 (propagated-inputs
8647 `(("python-apipkg" ,python-apipkg)))
8648 (synopsis "Rapid multi-Python deployment")
8649 (description "Execnet provides a share-nothing model with
8650channel-send/receive communication for distributing execution across many
8651Python interpreters across version, platform and network barriers. It has a
8652minimal and fast API targeting the following uses:
8653@enumerate
8654@item distribute tasks to (many) local or remote CPUs
8655@item write and deploy hybrid multi-process applications
8656@item write scripts to administer multiple environments
8657@end enumerate")
14a5146f 8658 (home-page "https://codespeak.net/execnet/")
44d10b1f
RW
8659 (license license:expat)))
8660
8661(define-public python2-execnet
8662 (package-with-python2 python-execnet))
8663
8664(define-public python-icalendar
8665 (package
8666 (name "python-icalendar")
43ae8f79 8667 (version "4.0.4")
44d10b1f
RW
8668 (source (origin
8669 (method url-fetch)
8670 (uri (pypi-uri "icalendar" version))
8671 (sha256
8672 (base32
43ae8f79 8673 "16gjvqv0n05jrb9g228pdjgzd3amz2pdhvcgsn1jypszjg5m2w9l"))))
44d10b1f
RW
8674 (build-system python-build-system)
8675 (propagated-inputs
8676 `(("python-dateutil" ,python-dateutil)
8677 ("python-pytz" ,python-pytz)))
8678 (synopsis "Python library for parsing iCalendar files")
8679 (description "The icalendar package is a parser/generator of iCalendar
8680files for use with Python.")
8681 (home-page "https://github.com/collective/icalendar")
8682 (license license:bsd-2)))
8683
44d10b1f
RW
8684(define-public python-args
8685 (package
8686 (name "python-args")
8687 (version "0.1.0")
8688 (source (origin
8689 (method url-fetch)
8690 (uri (pypi-uri "args" version))
8691 (sha256
8692 (base32
8693 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
8694 (build-system python-build-system)
8695 (home-page "https://github.com/kennethreitz/args")
8696 (synopsis "Command-line argument parser")
8697 (description
8698 "This library provides a Python module to parse command-line arguments.")
8699 (license license:bsd-3)))
8700
8701(define-public python2-args
8702 (package-with-python2 python-args))
8703
8704(define-public python-clint
8705 (package
8706 (name "python-clint")
8707 (version "0.5.1")
8708 (source (origin
8709 (method url-fetch)
8710 (uri (pypi-uri "clint" version))
8711 (sha256
8712 (base32
8713 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
8714 (build-system python-build-system)
8715 (arguments
8716 '(#:phases
8717 (modify-phases %standard-phases
8718 (replace 'check
8719 (lambda _ (invoke "py.test" "-v"))))))
8720 (native-inputs
8721 `(("python-pytest" ,python-pytest)))
8722 (propagated-inputs
8723 `(("python-args" ,python-args)))
8724 (home-page "https://github.com/kennethreitz/clint")
8725 (synopsis "Command-line interface tools")
8726 (description
8727 "Clint is a Python module filled with a set of tools for developing
8728command-line applications, including tools for colored and indented
8729output, progress bar display, and pipes.")
8730 (license license:isc)))
8731
8732(define-public python2-clint
8733 (package-with-python2 python-clint))
8734
44d10b1f
RW
8735(define-public python-rply
8736 (package
8737 (name "python-rply")
8738 (version "0.7.5")
8739 (source (origin
8740 (method url-fetch)
8741 (uri (pypi-uri "rply" version))
8742 (sha256
8743 (base32
8744 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
8745 (build-system python-build-system)
8746 (propagated-inputs
8747 `(("python-appdirs" ,python-appdirs)))
8748 (home-page "https://github.com/alex/rply")
8749 (synopsis "Parser generator for Python")
8750 (description
8751 "This package provides a pure Python based parser generator, that also
8752works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
8753with a new public API, and RPython support.")
8754 (license license:bsd-3)))
8755
8756(define-public python2-rply
8757 (package-with-python2 python-rply))
8758
8759(define-public python-hy
8760 (package
8761 (name "python-hy")
c215051d 8762 (version "0.17.0")
44d10b1f
RW
8763 (source (origin
8764 (method url-fetch)
8765 (uri (pypi-uri "hy" version))
8766 (sha256
8767 (base32
c215051d 8768 "1gdbqsirsdxj320wnp7my5awzs1kfs6m4fqmkzbd1zd47qzj0zfi"))))
44d10b1f
RW
8769 (build-system python-build-system)
8770 (arguments
8771 '(#:phases
8772 (modify-phases %standard-phases
6ba6a1c1
JG
8773 (add-before 'install 'set-HOME
8774 (lambda _
8775 (setenv "HOME" "/tmp")))
44d10b1f
RW
8776 (replace 'check
8777 (lambda _
8778 ;; Tests require write access to HOME.
8779 (setenv "HOME" "/tmp")
8780 (invoke "nosetests"))))))
8781 (native-inputs
8782 `(("python-coverage" ,python-coverage)
8783 ("python-nose" ,python-nose)))
8784 (propagated-inputs
8785 `(("python-astor" ,python-astor)
8786 ("python-clint" ,python-clint)
c215051d
JG
8787 ("python-rply" ,python-rply)
8788 ("python-fastentrypoints"
8789 ,python-fastentrypoints)
8790 ("python-funcparserlib"
8791 ,python-funcparserlib)))
44d10b1f
RW
8792 (home-page "http://hylang.org/")
8793 (synopsis "Lisp frontend to Python")
8794 (description
8795 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
8796its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
8797Python at your fingertips, in Lisp form.")
8798 (license license:expat)))
8799
8800(define-public python2-hy
8801 (package-with-python2 python-hy))
8802
8803(define-public python2-functools32
8804 (package
8805 (name "python2-functools32")
8806 (version "3.2.3-2")
8807 (source
8808 (origin
8809 (method url-fetch)
8810 (uri (pypi-uri "functools32" version))
8811 (sha256
8812 (base32
8813 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
8814 (build-system python-build-system)
8815 (arguments
8816 `(#:python ,python-2
8817 #:tests? #f)) ; no test target
8818 (home-page "https://github.com/MiCHiLU/python-functools32")
8819 (synopsis
8820 "Backport of the functools module from Python 3.2.3")
8821 (description
8822 "This package is a backport of the @code{functools} module from Python
88233.2.3 for use with older versions of Python and PyPy.")
8824 (license license:expat)))
8825
8826(define-public python2-subprocess32
8827 (package
8828 (name "python2-subprocess32")
8829 (version "3.2.7")
8830 (source (origin
8831 (method url-fetch)
8832 (uri (pypi-uri "subprocess32" version))
8833 (sha256
8834 (base32
8835 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
8836 (patches
8837 (search-patches "python2-subprocess32-disable-input-test.patch"))))
8838 (build-system python-build-system)
8839 (arguments
8840 `(#:python ,python-2
8841 ;; The test suite fails with Python > 2.7.13:
8842 ;; import test.support
8843 ;; ImportError: No module named support
8844 #:tests? #f
8845 #:phases
8846 (modify-phases %standard-phases
8847 (add-after 'unpack 'patch-/bin/sh
8848 (lambda _
8849 (substitute* '("subprocess32.py"
8850 "test_subprocess32.py")
8851 (("/bin/sh") (which "sh")))
8852 #t)))))
8853 (home-page "https://github.com/google/python-subprocess32")
8854 (synopsis "Backport of the subprocess module from Python 3.2")
8855 (description
8856 "This is a backport of the @code{subprocess} standard library module
8857from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
8858new features. On POSIX systems it is guaranteed to be reliable when used
8859in threaded applications. It includes timeout support from Python 3.3 but
8860otherwise matches 3.2’s API.")
8861 (license license:psfl)))
8862
8863(define-public python2-futures
8864 (package
8865 (name "python2-futures")
8866 (version "3.2.0")
8867 (source
8868 (origin
8869 (method url-fetch)
8870 (uri (pypi-uri "futures" version))
8871 (sha256
8872 (base32
8873 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
8874 (build-system python-build-system)
ba88eea2
RW
8875 (arguments
8876 `(#:python ,python-2
8877 #:phases
8878 (modify-phases %standard-phases
8879 (replace 'check
8880 (lambda _
8881 (invoke "python" "test_futures.py")
8882 #t)))))
44d10b1f
RW
8883 (home-page "https://github.com/agronholm/pythonfutures")
8884 (synopsis
8885 "Backport of the concurrent.futures package from Python 3.2")
8886 (description
8887 "The concurrent.futures module provides a high-level interface for
8888asynchronously executing callables. This package backports the
8889concurrent.futures package from Python 3.2")
8890 (license license:bsd-3)))
8891
8892(define-public python-promise
8893 (package
8894 (name "python-promise")
8895 (version "0.4.2")
8896 (source
8897 (origin
8898 (method url-fetch)
8899 (uri (pypi-uri "promise" version))
8900 (sha256
8901 (base32
8902 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
8903 (build-system python-build-system)
8904 ;; Tests wants python-futures, which is a python2 only program, and
8905 ;; can't be found by python-promise at test time.
8906 (arguments `(#:tests? #f))
8907 (home-page "https://github.com/syrusakbary/promise")
8908 (synopsis "Promises/A+ implementation for Python")
8909 (description
8910 "Promises/A+ implementation for Python")
8911 (properties `((python2-variant . ,(delay python2-promise))))
8912 (license license:expat)))
8913
8914(define-public python2-promise
8915 (let ((promise (package-with-python2
8916 (strip-python2-variant python-promise))))
8917 (package (inherit promise)
8918 (arguments (substitute-keyword-arguments (package-arguments promise)
8919 ((#:tests? _) #t)))
8920 (native-inputs
8921 `(("python2-futures" ,python2-futures)
8922 ("python2-pytest" ,python2-pytest)
8923 ,@(package-native-inputs promise))))))
8924
d71d85cd
RW
8925(define-public python-progressbar33
8926 (package
8927 (name "python-progressbar33")
8928 (version "2.4")
8929 (source
8930 (origin
8931 (method url-fetch)
8932 (uri (pypi-uri "progressbar33" version))
8933 (sha256
8934 (base32
8935 "1zvf6zs5hzrc03p9nfs4p16vhilqikycvv1yk0pxn8s07fdhvzji"))))
8936 (build-system python-build-system)
8937 (home-page "http://github.com/germangh/python-progressbar")
8938 (synopsis "Text progress bar library for Python")
8939 (description
8940 "This package provides a text progress bar library for Python. This
8941version only differs from the original @code{progressbar} package in that it
8942uses relative package imports instead of absolute imports, which is necessary
8943for the module to work under Python 3.3.")
8944 ;; Either or both of these licenses may be selected.
8945 (license (list license:lgpl2.1+ license:bsd-3))))
8946
44d10b1f
RW
8947(define-public python-colorama
8948 (package
8949 (name "python-colorama")
bd137055 8950 (version "0.4.3")
44d10b1f
RW
8951 (source
8952 (origin
8953 (method url-fetch)
8954 (uri (pypi-uri "colorama" version))
8955 (sha256
8956 (base32
bd137055 8957 "189n8hpijy14jfan4ha9f5n06mnl33cxz7ay92wjqgkr639s0vg9"))))
44d10b1f
RW
8958 (build-system python-build-system)
8959 (synopsis "Colored terminal text rendering for Python")
8960 (description "Colorama is a Python library for rendering colored terminal
8961text.")
e85af137 8962 (home-page "https://pypi.org/project/colorama/")
44d10b1f
RW
8963 (license license:bsd-3)))
8964
8965(define-public python2-colorama
8966 (package-with-python2 python-colorama))
8967
8968(define-public python-rsa
8969 (package
8970 (name "python-rsa")
8971 (version "3.4.2")
8972 (source
8973 (origin
8974 (method url-fetch)
8975 (uri (pypi-uri "rsa" version))
8976 (sha256
8977 (base32
8978 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
8979 (build-system python-build-system)
8980 (propagated-inputs
8981 `(("python-pyasn1" ,python-pyasn1)))
8982 (synopsis "Pure-Python RSA implementation")
8983 (description "Python-RSA is a pure-Python RSA implementation. It supports
8984encryption and decryption, signing and verifying signatures, and key
8985generation according to PKCS#1 version 1.5. It can be used as a Python
8986library as well as on the command line.")
8987 (home-page "https://stuvel.eu/rsa")
8988 (license license:asl2.0)))
8989
8990(define-public python2-rsa
8991 (package-with-python2 python-rsa))
8992
8993(define-public python-pluggy
8994 (package
8995 (name "python-pluggy")
e5731c03 8996 (version "0.11.0")
44d10b1f
RW
8997 (source
8998 (origin
8999 (method url-fetch)
9000 (uri (pypi-uri "pluggy" version))
9001 (sha256
9002 (base32
e5731c03 9003 "10511a54dvafw1jrk75mrhml53c7b7w4yaw7241696lc2hfvr895"))))
44d10b1f
RW
9004 (build-system python-build-system)
9005 (native-inputs
9006 `(("python-setuptools-scm" ,python-setuptools-scm)))
9007 (synopsis "Plugin and hook calling mechanism for Python")
9008 (description "Pluggy is an extraction of the plugin manager as used by
9009Pytest but stripped of Pytest specific details.")
e85af137 9010 (home-page "https://pypi.org/project/pluggy/")
44d10b1f
RW
9011 (license license:expat)))
9012
9013(define-public python2-pluggy
9014 (package-with-python2 python-pluggy))
9015
9016(define-public python-tox
9017 (package
9018 (name "python-tox")
9019 (version "2.8.1")
9020 (source
9021 (origin
9022 (method url-fetch)
9023 (uri (pypi-uri "tox" version))
9024 (sha256
9025 (base32
9026 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
9027 (build-system python-build-system)
9028 (arguments
9029 ;; FIXME: Tests require pytest-timeout, which itself requires
9030 ;; pytest>=2.8.0 for installation.
9031 '(#:tests? #f))
9032 (propagated-inputs
9033 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
9034 ("python-py" ,python-py)
9035 ("python-virtualenv" ,python-virtualenv)))
9036 (native-inputs
9037 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
9038 ("python-pytest" ,python-pytest) ; >= 2.3.5
9039 ("python-setuptools-scm" ,python-setuptools-scm)))
d81fb2ae 9040 (home-page "https://tox.readthedocs.io")
44d10b1f
RW
9041 (synopsis "Virtualenv-based automation of test activities")
9042 (description "Tox is a generic virtualenv management and test command line
9043tool. It can be used to check that a package installs correctly with
9044different Python versions and interpreters, or run tests in each type of
9045supported environment, or act as a frontend to continuous integration
9046servers.")
9047 (license license:expat)))
9048
9049(define-public python2-tox
9050 (package-with-python2 python-tox))
9051
9052(define-public python-jmespath
9053 (package
9054 (name "python-jmespath")
27fb781f 9055 (version "0.9.4")
44d10b1f
RW
9056 (source
9057 (origin
9058 (method url-fetch)
9059 (uri (pypi-uri "jmespath" version))
9060 (sha256
9061 (base32
27fb781f 9062 "0k0765x1mybcrzajh3hiqkl8sy9hs0bmn4900frxy0j3ykvaxqmx"))))
44d10b1f
RW
9063 (build-system python-build-system)
9064 (native-inputs
9065 `(("python-nose" ,python-nose)))
9066 (synopsis "JSON Matching Expressions")
9067 (description "JMESPath (pronounced “james path”) is a Python library that
9068allows one to declaratively specify how to extract elements from a JSON
9069document.")
9070 (home-page "https://github.com/jmespath/jmespath.py")
9071 (license license:expat)))
9072
9073(define-public python2-jmespath
9074 (package-with-python2 python-jmespath))
9075
9076(define-public python-botocore
9077 (package
7bcf827c
RW
9078 (name "python-botocore")
9079 (version "1.12.149")
9080 (source
9081 (origin
9082 (method url-fetch)
9083 (uri (pypi-uri "botocore" version))
9084 (sha256
9085 (base32
9086 "12597f74khp3ngwr282cb949w0gcqj20rkfc3x275dijavyy5cmf"))))
9087 (build-system python-build-system)
9088 (arguments
9089 ;; FIXME: Many tests are failing.
9090 '(#:tests? #f))
9091 (propagated-inputs
9092 `(("python-dateutil" ,python-dateutil)
9093 ("python-docutils" ,python-docutils)
9094 ("python-jmespath" ,python-jmespath)))
9095 (native-inputs
9096 `(("python-mock" ,python-mock)
9097 ("python-nose" ,python-nose)
9098 ("behave" ,behave)
9099 ("python-tox" ,python-tox)
9100 ("python-urllib3" ,python-urllib3)
9101 ("python-wheel" ,python-wheel)))
9102 (home-page "https://github.com/boto/botocore")
9103 (synopsis "Low-level interface to AWS")
9104 (description "Botocore is a Python library that provides a low-level
44d10b1f 9105interface to the Amazon Web Services (AWS) API.")
7bcf827c 9106 (license license:asl2.0)))
44d10b1f
RW
9107
9108(define-public python2-botocore
9109 (package-with-python2 python-botocore))
9110
9111(define-public python-xdo
9112 (package
9113 (name "python-xdo")
9114 (version "0.3")
9115 (source (origin
9116 (method url-fetch)
9117 (uri (string-append
9118 "http://http.debian.net/debian/pool/main/p/python-xdo/"
9119 "python-xdo_" version ".orig.tar.gz"))
9120 (sha256
9121 (base32
9122 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
9123 (build-system python-build-system)
9124 (arguments
9125 '(#:phases
9126 (modify-phases %standard-phases
9127 (add-before 'install 'patch-libxdo-path
9128 ;; Hardcode the path of dynamically loaded libxdo library.
9129 (lambda* (#:key inputs #:allow-other-keys)
9130 (let ((libxdo (string-append
9131 (assoc-ref inputs "xdotool")
9132 "/lib/libxdo.so")))
9133 (substitute* "xdo/_xdo.py"
9134 (("find_library\\(\"xdo\"\\)")
9135 (simple-format #f "\"~a\"" libxdo)))
9136 #t))))
9137 #:tests? #f)) ; no tests provided
9138 (propagated-inputs
9139 `(("python-six" ,python-six)))
9140 (inputs
9141 `(("xdotool" ,xdotool)
9142 ("libX11" ,libx11)))
9143 (home-page "https://tracker.debian.org/pkg/python-xdo")
9144 (synopsis "Python library for simulating X11 keyboard/mouse input")
9145 (description "Provides bindings to libxdo for manipulating X11 via simulated
9146input. (Note that this is mostly a legacy library; you may wish to look at
9147python-xdo for newer bindings.)")
9148 (license license:bsd-3)))
9149
9150(define-public python2-xdo
9151 (package-with-python2 python-xdo))
9152
9153(define-public python-mako
9154 (package
9155 (name "python-mako")
6bf53ad5 9156 (version "1.1.0")
44d10b1f
RW
9157 (source
9158 (origin
9159 (method url-fetch)
9160 (uri (pypi-uri "Mako" version))
9161 (sha256
9162 (base32
6bf53ad5 9163 "0jqa3qfpykyn4fmkn0kh6043sfls7br8i2bsdbccazcvk9cijsd3"))))
44d10b1f 9164 (build-system python-build-system)
6bf53ad5
MB
9165 (arguments
9166 `(#:phases (modify-phases %standard-phases
9167 (replace 'check
9168 (lambda _
9169 (invoke "pytest" "-vv"))))))
44d10b1f
RW
9170 (propagated-inputs
9171 `(("python-markupsafe" ,python-markupsafe)))
9172 (native-inputs
9173 `(("python-mock" ,python-mock)
44d10b1f 9174 ("python-pytest" ,python-pytest)))
7016e620 9175 (home-page "https://www.makotemplates.org/")
44d10b1f
RW
9176 (synopsis "Templating language for Python")
9177 (description "Mako is a templating language for Python that compiles
9178templates into Python modules.")
9179 (license license:expat)))
9180
9181(define-public python2-mako
9182 (package-with-python2 python-mako))
9183
9184(define-public python-waitress
9185 (package
9186 (name "python-waitress")
9187 (version "1.1.0")
9188 (source
9189 (origin
9190 (method url-fetch)
9191 (uri (pypi-uri "waitress" version))
9192 (patches (search-patches "python-waitress-fix-tests.patch"))
9193 (sha256
9194 (base32
9195 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
9196 (build-system python-build-system)
9197 (home-page "https://github.com/Pylons/waitress")
9198 (synopsis "Waitress WSGI server")
9199 (description "Waitress is meant to be a production-quality pure-Python WSGI
9200server with very acceptable performance.")
9201 (license license:zpl2.1)))
9202
9203(define-public python2-waitress
9204 (package-with-python2 python-waitress))
9205
b2b23d12
TLC
9206(define-public python-whichcraft
9207 (package
9208 (name "python-whichcraft")
9209 (version "0.6.1")
9210 (source
9211 (origin
9212 (method url-fetch)
9213 (uri (pypi-uri "whichcraft" version))
9214 (sha256
9215 (base32
9216 "11yfkzyplizdgndy34vyd5qlmr1n5mxis3a3svxmx8fnccdvknxc"))))
9217 (build-system python-build-system)
9218 (native-inputs
9219 `(("python-pytest" ,python-pytest)))
9220 (home-page "https://github.com/pydanny/whichcraft")
9221 (synopsis "Cross-platform cross-python shutil.which functionality")
9222 (description
9223 "This package provides a shim of the shutil.which function that's
9224designed to work across multiple versions of Python.")
9225 (license license:bsd-3)))
9226
1133ca44
TLC
9227(define-public python-cookiecutter
9228 (package
9229 (name "python-cookiecutter")
9230 (version "1.6.0")
9231 (source
9232 (origin
9233 (method url-fetch)
9234 (uri (pypi-uri "cookiecutter" version))
9235 (sha256
9236 (base32
9237 "0glsvaz8igi2wy1hsnhm9fkn6560vdvdixzvkq6dn20z3hpaa5hk"))))
9238 (build-system python-build-system)
9239 (native-inputs
9240 `(("python-freezegun" ,python-freezegun)
9241 ("python-pytest" ,python-pytest)
9242 ("python-pytest-catchlog" ,python-pytest-catchlog)
9243 ("python-pytest-cov" ,python-pytest-cov)
9244 ("python-pytest-mock" ,python-pytest-mock)))
9245 (propagated-inputs
9246 `(("python-binaryornot" ,python-binaryornot)
9247 ("python-click" ,python-click)
9248 ("python-future" ,python-future)
9249 ("python-jinja2" ,python-jinja2)
9250 ("python-jinja2-time" ,python-jinja2-time)
9251 ("python-poyo" ,python-poyo)
9252 ("python-requests" ,python-requests)
9253 ("python-whichcraft" ,python-whichcraft)))
9254 (home-page "https://github.com/audreyr/cookiecutter")
9255 (synopsis
9256 "Command-line utility that creates projects from project templates")
9257 (description
9258 "This package provides a command-line utility that creates projects from
9259project templates, e.g. creating a Python package project from a Python package
9260project template.")
9261 (license license:bsd-3)))
9262
44d10b1f
RW
9263(define-public python-pyquery
9264 (package
9265 (name "python-pyquery")
9266 (version "1.2.17")
9267 (source
9268 (origin
9269 (method url-fetch)
9270 (uri (pypi-uri "pyquery" version))
9271 (sha256
9272 (base32
9273 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
9274 (build-system python-build-system)
9275 (native-inputs
9276 `(("python-webob" ,python-webob)
9277 ("python-webtest" ,python-webtest)))
9278 (propagated-inputs
9279 `(("python-lxml" ,python-lxml)
9280 ("python-cssselect" ,python-cssselect)))
9281 (home-page "https://github.com/gawel/pyquery")
9282 (synopsis "Make jQuery-like queries on xml documents")
9283 (description "pyquery allows you to make jQuery queries on xml documents.
9284The API is as much as possible the similar to jQuery. pyquery uses lxml for
9285fast xml and html manipulation.")
9286 (license license:bsd-3)))
9287
44d10b1f
RW
9288(define-public python-anyjson
9289 (package
9290 (name "python-anyjson")
9291 (version "0.3.3")
9292 (source
9293 (origin
9294 (method url-fetch)
9295 (uri (pypi-uri "anyjson" version))
9296 (sha256
9297 (base32
9298 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
9299 (build-system python-build-system)
9300 (arguments
9301 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
9302 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
9303 ;; whatever) so this transformation needs to be done before the tests
9304 ;; can be run. Maybe we could add a build step to transform beforehand
9305 ;; but it could be annoying/difficult.
9306 ;; We can enable tests for the Python 2 version, though, and do below.
9307 #:tests? #f))
9308 (home-page "https://bitbucket.org/runeh/anyjson/")
9309 (synopsis
9310 "Wraps best available JSON implementation in a common interface")
9311 (description
9312 "Anyjson loads whichever is the fastest JSON module installed
9313and provides a uniform API regardless of which JSON implementation is used.")
9314 (license license:bsd-3)
9315 (properties `((python2-variant . ,(delay python2-anyjson))))))
9316
9317(define-public python2-anyjson
9318 (let ((anyjson (package-with-python2
9319 (strip-python2-variant python-anyjson))))
9320 (package
9321 (inherit anyjson)
9322 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
9323 #:tests? #t
9324 ,@(package-arguments anyjson)))
9325 (native-inputs `(("python2-nose" ,python2-nose))))))
9326
9327(define-public python-amqp
9328 (package
9329 (name "python-amqp")
9330 (version "2.3.2")
9331 (source
9332 (origin
9333 (method url-fetch)
9334 (uri (pypi-uri "amqp" version))
9335 (sha256
9336 (base32
9337 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
9338 (build-system python-build-system)
9339 (native-inputs
9340 `(("python-case" ,python-case)
9341 ("python-pytest-sugar" ,python-pytest-sugar)
9342 ("python-mock" ,python-mock)))
9343 (propagated-inputs
9344 `(("python-vine" ,python-vine)))
9345 (home-page "https://github.com/celery/py-amqp")
9346 (synopsis
9347 "Low-level AMQP client for Python (fork of amqplib)")
9348 (description
9349 "This is a fork of amqplib which was originally written by Barry Pederson.
9350It is maintained by the Celery project, and used by kombu as a pure python
9351alternative when librabbitmq is not available.")
9352 (license license:lgpl2.1+)
9353 (properties `((python2-variant . ,(delay python2-amqp))))))
9354
9355(define-public python2-amqp
9356 (let ((amqp (package-with-python2
9357 (strip-python2-variant python-amqp))))
9358 (package
9359 (inherit amqp)
9360 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
9361 ;; unmaintained. Weirdly, does not do this on the python 3
9362 ;; version?
9363 #:tests? #f
9364 ,@(package-arguments amqp))))))
9365
9366(define-public python-txamqp
9367 (package
9368 (name "python-txamqp")
9369 (version "0.8.2")
9370 (source
9371 (origin
9372 (method url-fetch)
9373 (uri (pypi-uri "txAMQP" version))
9374 (sha256
9375 (base32
9376 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
9377 (build-system python-build-system)
9378 (propagated-inputs
9379 `(("python-six" ,python-six)
9380 ("python-twisted" ,python-twisted)))
9381 (home-page "https://github.com/txamqp/txamqp")
9382 (synopsis "Communicate with AMQP peers and brokers using Twisted")
9383 (description
9384 "This package provides a Python library for communicating with AMQP peers
9385and brokers using the asynchronous networking framework Twisted. It contains
9386all the necessary code to connect, send and receive messages to/from an
9387AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
9388also includes support for using Thrift RPC over AMQP in Twisted
9389applications.")
9390 (license license:asl2.0)))
9391
9392(define-public python2-txamqp
9393 (package-with-python2 python-txamqp))
9394
9395(define-public python-kombu
9396 (package
9397 (name "python-kombu")
9398 (version "4.2.2")
9399 (source
9400 (origin
9401 (method url-fetch)
9402 (uri (pypi-uri "kombu" version))
9403 (sha256
9404 (base32
9405 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
9406 (build-system python-build-system)
9407 (native-inputs
9408 `(("python-mock" ,python-mock)
9409 ("python-case" ,python-case)
9410 ("python-pyro4" ,python-pyro4)
9411 ("python-pytest-sugar" ,python-pytest-sugar)
9412 ("python-pytz" ,python-pytz)))
9413 (propagated-inputs
9414 `(("python-anyjson" ,python-anyjson)
9415 ("python-amqp" ,python-amqp)
9416 ("python-redis" ,python-redis)))
9417 (home-page "https://kombu.readthedocs.io")
9418 (synopsis "Message passing library for Python")
9419 (description "The aim of Kombu is to make messaging in Python as easy as
9420possible by providing an idiomatic high-level interface for the AMQ protocol,
9421and also provide proven and tested solutions to common messaging problems.
9422AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
9423message orientation, queuing, routing, reliability and security, for which the
9424RabbitMQ messaging server is the most popular implementation.")
9425 (license license:bsd-3)
9426 (properties `((python2-variant . ,(delay python2-kombu))))))
9427
9428(define-public python2-kombu
9429 (let ((kombu (package-with-python2
9430 (strip-python2-variant python-kombu))))
9431 (package
9432 (inherit kombu)
9433 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
9434 ;; It works fine on the python3 variant.
9435 #:tests? #f
9436 ,@(package-arguments kombu)))
9437 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9438 ,@(package-native-inputs kombu))))))
9439
9440(define-public python-billiard
9441 (package
9442 (name "python-billiard")
9443 (version "3.5.0.5")
9444 (source
9445 (origin
9446 (method url-fetch)
9447 (uri (pypi-uri "billiard" version))
9448 (sha256
9449 (base32
9450 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
9451 (build-system python-build-system)
9452 (native-inputs
9453 `(("python-case" ,python-case)
9454 ("python-pytest" ,python-pytest)))
9455 (home-page "https://github.com/celery/billiard")
9456 (synopsis
9457 "Python multiprocessing fork with improvements and bugfixes")
9458 (description
9459 "Billiard is a fork of the Python 2.7 multiprocessing package. The
9460multiprocessing package itself is a renamed and updated version of R Oudkerk's
9461pyprocessing package. This standalone variant is intended to be compatible with
9462Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
9463 (license license:bsd-3)
9464 (properties `((python2-variant . ,(delay python2-billiard))))))
9465
9466(define-public python2-billiard
9467 (let ((billiard (package-with-python2
9468 (strip-python2-variant python-billiard))))
9469 (package
9470 (inherit billiard)
9471 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9472 ("python2-mock" ,python2-mock)
9473 ,@(package-native-inputs billiard))))))
9474
9475(define-public python-celery
9476 (package
9477 (name "python-celery")
9478 (version "4.2.1")
9479 (source
9480 (origin
9481 (method url-fetch)
9482 (uri (pypi-uri "celery" version))
9483 (sha256
9484 (base32
9485 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
9486 (build-system python-build-system)
9487 (arguments
9488 '(;; TODO The tests fail with Python 3.7
9489 ;; https://github.com/celery/celery/issues/4849
9490 #:tests? #f
9491 #:phases
9492 (modify-phases %standard-phases
9493 (add-after 'unpack 'patch-requirements
9494 (lambda _
9495 (substitute* "requirements/test.txt"
9496 (("pytest>=3\\.0,<3\\.3")
9497 "pytest>=3.0"))
9498 #t)))))
9499 (native-inputs
9500 `(("python-case" ,python-case)
9501 ("python-pytest" ,python-pytest)))
9502 (propagated-inputs
9503 `(("python-pytz" ,python-pytz)
9504 ("python-billiard" ,python-billiard)
9505 ("python-kombu" ,python-kombu)))
9506 (home-page "https://celeryproject.org")
9507 (synopsis "Distributed Task Queue")
9508 (description "Celery is an asynchronous task queue/job queue based on
9509distributed message passing. It is focused on real-time operation, but
9510supports scheduling as well. The execution units, called tasks, are executed
9511concurrently on a single or more worker servers using multiprocessing,
9512Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
9513synchronously (wait until ready).")
9514 (license license:bsd-3)
9515 (properties `((python2-variant . ,(delay python2-celery))))))
9516
9517(define-public python2-celery
9518 (let ((celery (package-with-python2
9519 (strip-python2-variant python-celery))))
9520 (package
9521 (inherit celery)
9522 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9523 ("python2-mock" ,python2-mock)
9524 ,@(package-native-inputs celery))))))
9525
9526(define-public python-translitcodec
9527 (package
9528 (name "python-translitcodec")
9529 (version "0.4.0")
9530 (source
9531 (origin
9532 (method url-fetch)
9533 (uri (pypi-uri "translitcodec" version))
9534 (sha256
9535 (base32
9536 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
9537 (build-system python-build-system)
9538 (arguments
9539 `(#:tests? #f)) ; no tests provided
9540 (home-page
9541 "https://github.com/claudep/translitcodec")
9542 (synopsis
9543 "Unicode to 8-bit charset transliteration codec")
9544 (description
9545 "This package contains codecs for transliterating ISO 10646 texts into
9546best-effort representations using smaller coded character sets (ASCII,
9547ISO 8859, etc.).")
9548 (license license:expat)))
9549
9550(define-public python2-translitcodec
9551 (package-with-python2 python-translitcodec))
9552
9553(define-public python-editor
9554 (package
9555 (name "python-editor")
9556 (version "0.5")
9557 (source
9558 (origin
9559 (method url-fetch)
9560 (uri (pypi-uri "python-editor" version))
9561 (sha256
9562 (base32
9563 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
9564 (build-system python-build-system)
9565 (home-page
9566 "https://github.com/fmoo/python-editor")
9567 (synopsis
9568 "Programmatically open an editor, capture the result")
9569 (description
9570 "python-editor is a library that provides the editor module for
9571programmatically interfacing with your system's $EDITOR.")
9572 (license license:asl2.0)))
9573
9574(define-public python2-editor
9575 (package-with-python2 python-editor))
9576
44d10b1f
RW
9577(define-public python-vobject
9578 (package
9579 (name "python-vobject")
9580 (version "0.9.5")
9581 (source (origin
9582 (method url-fetch)
9583 (uri (pypi-uri "vobject" version))
9584 (sha256
9585 (base32
9586 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
9587 (build-system python-build-system)
9588 (arguments
9589 '(;; The test suite relies on some non-portable Windows interfaces.
9590 #:tests? #f))
9591 (propagated-inputs
9592 `(("python-dateutil" ,python-dateutil)
9593 ("python-pyicu" ,python-pyicu)))
9594 (synopsis "Parse and generate vCard and vCalendar files")
9595 (description "Vobject is intended to be a full featured Python package for
9596parsing and generating vCard and vCalendar files. Currently, iCalendar files
9597are supported and well tested. vCard 3.0 files are supported, and all data
9598should be imported, but only a few components are understood in a sophisticated
9599way.")
5d6e7106 9600 (home-page "https://eventable.github.io/vobject/")
44d10b1f
RW
9601 (license license:asl2.0)))
9602
9603(define-public python2-vobject
9604 (package-with-python2 python-vobject))
9605
9606(define-public python-munkres
9607 (package
9608 (name "python-munkres")
9609 (version "1.0.8")
9610 (source (origin
9611 (method url-fetch)
9612 (uri (pypi-uri "munkres" version))
9613 (sha256
9614 (base32
9615 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
9616 (build-system python-build-system)
9617 (arguments
9618 '(#:tests? #f)) ; no test suite
78f8780e 9619 (home-page "https://software.clapper.org/munkres/")
44d10b1f
RW
9620 (synopsis "Implementation of the Munkres algorithm")
9621 (description "The Munkres module provides an implementation of the Munkres
9622algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
9623useful for solving the Assignment Problem.")
9624 (license license:bsd-3)))
9625
9626(define-public python2-munkres
9627 (package-with-python2 python-munkres))
9628
9629(define-public python-whoosh
9630 (package
9631 (name "python-whoosh")
9632 (version "2.7.4")
9633 (source
9634 (origin
9635 (method url-fetch)
9636 (uri (pypi-uri "Whoosh" version))
9637 (sha256
9638 (base32
9639 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
9640 (build-system python-build-system)
2679d9a4 9641 (arguments '(#:tests? #f)) ; Test invocation is no longer supported by Python.
44d10b1f
RW
9642 (native-inputs
9643 `(("python-pytest" ,python-pytest)))
9644 (home-page "https://bitbucket.org/mchaput/whoosh")
9645 (synopsis "Full text indexing, search, and spell checking library")
9646 (description
9647 "Whoosh is a fast, pure-Python full text indexing, search, and spell
9648checking library.")
9649 (license license:bsd-2)))
9650
9651(define-public python2-whoosh
9652 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
9653 (package (inherit whoosh)
9654 (propagated-inputs
9655 `(("python2-backport-ssl-match-hostname"
9656 ,python2-backport-ssl-match-hostname)
9657 ,@(package-propagated-inputs whoosh))))))
9658
9659(define-public python-pathlib
9660 (package
9661 (name "python-pathlib")
9662 (version "1.0.1")
9663 (source (origin
9664 (method url-fetch)
9665 (uri (pypi-uri "pathlib" version))
9666 (sha256
9667 (base32
9668 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
9669 (build-system python-build-system)
9670 ;; The tests depend on the internal "test" module, which does not provide
9671 ;; a stable interface.
9672 (arguments `(#:tests? #f))
9673 (home-page "https://pathlib.readthedocs.org/")
9674 (synopsis "Object-oriented file system paths")
9675 (description "Pathlib offers a set of classes to handle file system paths.
9676It offers the following advantages over using string objects:
9677
9678@enumerate
9679@item No more cumbersome use of os and os.path functions. Everything can
9680be done easily through operators, attribute accesses, and method calls.
9681@item Embodies the semantics of different path types. For example,
9682comparing Windows paths ignores casing.
9683@item Well-defined semantics, eliminating any inconsistencies or
9684ambiguities (forward vs. backward slashes, etc.).
9685@end enumerate
9686
9687Note: In Python 3.4, pathlib is now part of the standard library. For other
9688Python versions please consider python-pathlib2 instead, which tracks the
9689standard library module. This module (python-pathlib) isn't maintained
9690anymore.")
9691 (license license:expat)))
9692
9693(define-public python2-pathlib
9694 (package-with-python2 python-pathlib))
9695
9696(define-public python2-pathlib2
9697 (package
9698 (name "python2-pathlib2")
54da6f9f 9699 (version "2.3.3")
44d10b1f
RW
9700 (source (origin
9701 (method url-fetch)
9702 (uri (pypi-uri "pathlib2" version))
9703 (sha256
9704 (base32
54da6f9f 9705 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
44d10b1f
RW
9706 (build-system python-build-system)
9707 ;; We only need the the Python 2 variant, since for Python 3 our minimum
9708 ;; version is 3.4 which already includes this package as part of the
9709 ;; standard library.
9710 (arguments
9711 `(#:python ,python-2))
9712 (propagated-inputs
9713 `(("python2-scandir" ,python2-scandir)
9714 ("python2-six" ,python2-six)))
e85af137 9715 (home-page "https://pypi.org/project/pathlib2/")
44d10b1f
RW
9716 (synopsis "Object-oriented file system paths - backport of standard
9717pathlib module")
9718 (description "The goal of pathlib2 is to provide a backport of standard
9719pathlib module which tracks the standard library module, so all the newest
9720features of the standard pathlib can be used also on older Python versions.
9721
9722Pathlib offers a set of classes to handle file system paths. It offers the
9723following 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 (license license:expat)))
9734
9735(define-public python2-pathlib2-bootstrap
9736 (hidden-package
9737 (package
9738 (inherit python2-pathlib2)
9739 (name "python2-pathlib2-bootstrap")
9740 (propagated-inputs
9741 `(("python2-scandir" ,python2-scandir)
9742 ("python2-six" ,python2-six-bootstrap))))))
9743
9744(define-public python-jellyfish
9745 (package
9746 (name "python-jellyfish")
9747 (version "0.5.6")
9748 (source (origin
9749 (method url-fetch)
9750 (uri (pypi-uri "jellyfish" version))
9751 (sha256
9752 (base32
9753 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
9754 (build-system python-build-system)
9755 (native-inputs
9756 `(("python-pytest" ,python-pytest)))
9757 (home-page "https://github.com/jamesturk/jellyfish")
9758 (synopsis "Approximate and phonetic matching of strings")
9759 (description "Jellyfish uses a variety of string comparison and phonetic
9760encoding algorithms to do fuzzy string matching.")
9761 (license license:bsd-2)
9762 (properties `((python2-variant . ,(delay python2-jellyfish))))))
9763
9764(define-public python2-jellyfish
9765 (let ((jellyfish (package-with-python2
9766 (strip-python2-variant python-jellyfish))))
9767 (package (inherit jellyfish)
9768 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
9769 ,@(package-native-inputs jellyfish))))))
9770
9771(define-public python2-unicodecsv
9772 (package
9773 (name "python2-unicodecsv")
9774 (version "0.14.1")
9775 (source (origin
f711b71b 9776 (method git-fetch)
44d10b1f
RW
9777 ;; The test suite is not included in the PyPi release.
9778 ;; https://github.com/jdunck/python-unicodecsv/issues/19
f711b71b
EF
9779 (uri (git-reference
9780 (url "https://github.com/jdunck/python-unicodecsv")
9781 (commit version)))
9782 (file-name (git-file-name name version))
44d10b1f
RW
9783 (sha256
9784 (base32
f711b71b 9785 "15hx2k41a2lpv4hcml9zp4cvlx1171mnb5s4s13xc1pxkq3vgdjy"))))
44d10b1f
RW
9786 (build-system python-build-system)
9787 (arguments
9788 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
9789 #:python ,python-2))
9790 (native-inputs
9791 `(("python2-unittest2" ,python2-unittest2)))
9792 (home-page "https://github.com/jdunck/python-unicodecsv")
9793 (synopsis "Unicode CSV module for Python 2")
9794 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
9795module, adding support for Unicode strings.")
9796 (license license:bsd-2)))
9797
9798(define-public python-rarfile
9799 (package
9800 (name "python-rarfile")
9801 (version "2.8")
9802 (source (origin
9803 (method url-fetch)
9804 (uri (pypi-uri "rarfile" version))
9805 (sha256
9806 (base32
9807 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
9808 (build-system python-build-system)
9809 (arguments
9810 '(#:phases
9811 (modify-phases %standard-phases
9812 (replace 'check
9813 ;; Many tests fail, but the installation proceeds.
e59dd341 9814 (lambda _ (invoke "make" "-C" "test" "test"))))))
44d10b1f
RW
9815 (native-inputs
9816 `(("which" ,which))) ; required for tests
9817 (propagated-inputs
9818 `(("libarchive" ,libarchive)))
9819 (home-page "https://github.com/markokr/rarfile")
9820 (synopsis "RAR archive reader for Python")
9821 (description "This is Python module for RAR archive reading. The interface
9822is made as zipfile like as possible.")
9823 (license license:isc)))
9824
9825(define-public python2-rarfile
9826 (package-with-python2 python-rarfile))
9827
9828(define-public python-magic
9829 (package
9830 (name "python-magic")
9831 (version "0.4.15")
9832 (source
9833 (origin
9834 (method url-fetch)
9835 (uri (pypi-uri "python-magic" version))
9836 (sha256
9837 (base32
9838 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
9839 (file-name (string-append name "-" version "-checkout"))))
9840 (build-system python-build-system)
9841 (arguments
9842 ;; The tests are unreliable, so don't run them. The tests fail
9843 ;; under Python3 because they were written for Python2 and
9844 ;; contain import statements that do not work in Python3. One of
9845 ;; the tests fails under Python2 because its assertions are
9846 ;; overly stringent; it relies on comparing output strings which
9847 ;; are brittle and can change depending on the version of
9848 ;; libmagic being used and the system on which the test is
9849 ;; running. In my case, under GuixSD 0.10.0, only one test
9850 ;; failed, and it seems to have failed only because the version
9851 ;; of libmagic that is packaged in Guix outputs a slightly
9852 ;; different (but not wrong) string than the one that the test
9853 ;; expected.
9854 '(#:tests? #f
9855 #:phases (modify-phases %standard-phases
9856 ;; Replace a specific method call with a hard-coded
9857 ;; path to the necessary libmagic.so file in the
9858 ;; store. If we don't do this, then the method call
9859 ;; will fail to find the libmagic.so file, which in
9860 ;; turn will cause any application using
9861 ;; python-magic to fail.
9862 (add-before 'build 'hard-code-path-to-libmagic
9863 (lambda* (#:key inputs #:allow-other-keys)
9864 (let ((file (assoc-ref inputs "file")))
9865 (substitute* "magic.py"
9866 (("ctypes.util.find_library\\('magic'\\)")
9867 (string-append "'" file "/lib/libmagic.so'")))
9868 #t)))
9869 (add-before 'install 'disable-egg-compression
9870 (lambda _
9871 (let ((port (open-file "setup.cfg" "a")))
9872 (display "\n[easy_install]\nzip_ok = 0\n"
9873 port)
9874 (close-port port)
9875 #t))))))
9876 (inputs
9877 ;; python-magic needs to be able to find libmagic.so.
9878 `(("file" ,file)))
9879 (home-page
9880 "https://github.com/ahupp/python-magic")
9881 (synopsis
9882 "File type identification using libmagic")
9883 (description
9884 "This module uses ctypes to access the libmagic file type
9885identification library. It makes use of the local magic database and
9886supports both textual and MIME-type output. Note that this module and
9887the python-file module both provide a \"magic.py\" file; these two
9888modules, which are different and were developed separately, both serve
9889the same purpose: to provide Python bindings for libmagic.")
9890 (license license:expat)))
9891
9892(define-public python2-magic
9893 (package-with-python2 python-magic))
9894
9895(define-public python2-s3cmd
9896 (package
9897 (name "python2-s3cmd")
9898 (version "1.6.1")
9899 (source
9900 (origin
9901 (method url-fetch)
9902 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
9903 "s3cmd-" version ".tar.gz"))
9904 (sha256
9905 (base32
9906 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
9907 (build-system python-build-system)
9908 (arguments
9909 ;; s3cmd is written for python2 only and contains no tests.
9910 `(#:python ,python-2
9911 #:tests? #f))
9912 (propagated-inputs
9913 `(("python2-dateutil" ,python2-dateutil)
9914 ;; The python-file package also provides a magic.py module.
9915 ;; This is an unfortunate state of affairs; however, s3cmd
9916 ;; fails to install if it cannot find specifically the
9917 ;; python-magic package. Thus we include it, instead of using
9918 ;; python-file. Ironically, s3cmd sometimes works better
9919 ;; without libmagic bindings at all:
9920 ;; https://github.com/s3tools/s3cmd/issues/198
9921 ("python2-magic" ,python2-magic)))
9922 (home-page "http://s3tools.org/s3cmd")
9923 (synopsis "Command line tool for S3-compatible storage services")
9924 (description
9925 "S3cmd is a command line tool for uploading, retrieving and managing data
9926in storage services that are compatible with the Amazon Simple Storage
9927Service (S3) protocol, including S3 itself. It supports rsync-like backup,
9928GnuPG encryption, and more. It also supports management of Amazon's
9929CloudFront content delivery network.")
9930 (license license:gpl2+)))
9931
9932(define-public python-pkgconfig
9933 (package
9934 (name "python-pkgconfig")
9935 (version "1.3.1")
9936 (source
9937 (origin
9938 (method url-fetch)
9939 (uri (pypi-uri "pkgconfig" version))
9940 (sha256
9941 (base32
9942 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
9943 (build-system python-build-system)
9944 (native-inputs
9945 `(("python-nose" ,python-nose)))
9946 (inputs
9947 `(("pkg-config" ,pkg-config)))
9948 (arguments
9949 `(#:phases
9950 (modify-phases %standard-phases
9951 (add-before 'build 'patch
9952 ;; Hard-code the path to pkg-config.
9953 (lambda _
9954 (substitute* "pkgconfig/pkgconfig.py"
9955 (("cmd = 'pkg-config")
9956 (string-append "cmd = '" (which "pkg-config"))))
9957 #t))
9958 (replace 'check
9959 (lambda _
9960 (invoke "nosetests" "test.py"))))))
9961 (home-page "https://github.com/matze/pkgconfig")
9962 (synopsis "Python interface for pkg-config")
9963 (description "This module provides a Python interface to pkg-config. It
9964can be used to find all pkg-config packages, check if a package exists,
9965check if a package meets certain version requirements, query CFLAGS and
9966LDFLAGS and parse the output to build extensions with setup.py.")
9967 (license license:expat)))
9968
9969(define-public python2-pkgconfig
9970 (package-with-python2 python-pkgconfig))
9971
9972(define-public python-bz2file
9973 (package
9974 (name "python-bz2file")
9975 (version "0.98")
9976 (source
9977 (origin
9978 (method url-fetch)
9979 (uri (pypi-uri "bz2file" version))
9980 (sha256
9981 (base32
9982 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
9983 (build-system python-build-system)
9984 (arguments
9985 `(#:tests? #f)) ; Tests use deprecated python modules.
9986 (home-page "https://github.com/nvawda/bz2file")
9987 (synopsis "Read and write bzip2-compressed files")
9988 (description
9989 "Bz2file is a Python library for reading and writing bzip2-compressed
9990files. It contains a drop-in replacement for the I/O interface in the
9991standard library's @code{bz2} module, including features from the latest
9992development version of CPython that are not available in older releases.")
9993 (license license:asl2.0)))
9994
9995(define-public python2-bz2file
9996 (package-with-python2 python-bz2file))
9997
9998(define-public python-future
9999 (package
10000 (name "python-future")
d5d54030 10001 (version "0.17.1")
44d10b1f
RW
10002 (source
10003 (origin
10004 (method url-fetch)
10005 (uri (pypi-uri "future" version))
10006 (sha256
10007 (base32
d5d54030 10008 "1f2rlqn9rh7adgir52dlbqz69gsab44x0mlm8gf1cs7xvhv54137"))))
44d10b1f
RW
10009 (build-system python-build-system)
10010 ;; Many tests connect to the network or are otherwise flawed.
10011 ;; https://github.com/PythonCharmers/python-future/issues/210
10012 (arguments
10013 `(#:tests? #f))
10014 (home-page "http://python-future.org")
10015 (synopsis "Single-source support for Python 3 and 2")
10016 (description
10017 "@code{python-future} is the missing compatibility layer between Python 2 and
10018Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
10019to support both Python 2 and Python 3 with minimal overhead.")
10020 (license license:expat)))
10021
10022(define-public python2-future
10023 (package-with-python2 python-future))
10024
10025(define-public python-cysignals
10026 (package
10027 (name "python-cysignals")
8e3e51df 10028 (version "1.9.0")
44d10b1f
RW
10029 (source
10030 (origin
10031 (method url-fetch)
8e3e51df 10032 (uri (pypi-uri "cysignals" version))
44d10b1f
RW
10033 (sha256
10034 (base32
8e3e51df 10035 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
44d10b1f
RW
10036 (build-system python-build-system)
10037 (native-inputs
10038 `(("python-cython" ,python-cython)
10039 ("python-sphinx" ,python-sphinx)))
10040 (inputs
10041 `(("pari-gp" ,pari-gp)))
10042 (arguments
10043 `(#:modules ((guix build python-build-system)
10044 ((guix build gnu-build-system) #:prefix gnu:)
10045 (guix build utils))
10046 ;; FIXME: Tests are executed after installation and currently fail
10047 ;; when not installing into standard locations; the author is working
10048 ;; on a fix.
10049 #:tests? #f
10050 #:phases
10051 (modify-phases %standard-phases
10052 (add-before
10053 'build 'configure
10054 (assoc-ref gnu:%standard-phases 'configure)))))
10055 (home-page
10056 "https://github.com/sagemath/cysignals")
10057 (synopsis
10058 "Handling of interrupts and signals for Cython")
10059 (description
10060 "The cysignals package provides mechanisms to handle interrupts (and
10061other signals and errors) in Cython code, using two related approaches,
10062for mixed Cython/Python code or external C libraries and pure Cython code,
10063respectively.")
10064 (license license:lgpl3+)))
10065
10066(define-public python2-cysignals
10067 (package-with-python2 python-cysignals))
10068
10069(define-public python2-shedskin
10070 (package
10071 (name "python2-shedskin")
10072 (version "0.9.4")
10073 (source
10074 (origin
10075 (method url-fetch)
10076 (uri (string-append "https://github.com/shedskin/shedskin/"
10077 "releases/download/v" version
10078 "/shedskin-" version ".tgz"))
10079 (sha256
10080 (base32
10081 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
10082 (build-system python-build-system)
10083 (arguments
10084 `(#:python ,python-2
10085 #:phases (modify-phases %standard-phases
10086 (add-after 'unpack 'fix-resulting-include-libs
10087 (lambda* (#:key inputs #:allow-other-keys)
10088 (let ((libgc (assoc-ref inputs "libgc"))
10089 (pcre (assoc-ref inputs "pcre")))
10090 (substitute* "shedskin/makefile.py"
10091 (("variable == 'CCFLAGS':[ ]*")
10092 (string-append "variable == 'CCFLAGS':\n"
10093 " line += ' -I " pcre "/include"
10094 " -I " libgc "/include'"))
10095 (("variable == 'LFLAGS':[ ]*")
10096 (string-append "variable == 'LFLAGS':\n"
10097 " line += ' -L" pcre "/lib"
10098 " -L " libgc "/lib'")))
10099 #t))))))
10100 (inputs `(("pcre" ,pcre)
10101 ("libgc" ,libgc)))
10102 (home-page "https://shedskin.github.io/")
10103 (synopsis "Experimental Python-2 to C++ Compiler")
10104 (description (string-append "This is an experimental compiler for a subset of
10105Python. It generates C++ code and a Makefile."))
10106 (license (list license:gpl3 license:bsd-3 license:expat))))
10107
10108(define-public python2-rope
10109 (package
10110 (name "python2-rope")
a9ba0a31 10111 (version "0.11.0")
44d10b1f
RW
10112 (source
10113 (origin
10114 (method url-fetch)
10115 (uri (pypi-uri "rope" version))
10116 (sha256
10117 (base32
a9ba0a31 10118 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
44d10b1f 10119 (arguments
afb29715 10120 ;; Rope has only partial python3 support, see `python-rope'
44d10b1f
RW
10121 `(#:python ,python-2))
10122 (build-system python-build-system)
10123 (native-inputs
10124 `(("python2-unittest2" ,python2-unittest2)))
10125 (home-page "https://github.com/python-rope/rope")
10126 (synopsis "Refactoring library for Python")
10127 (description "Rope is a refactoring library for Python. It facilitates
10128the renaming, moving and extracting of attributes, functions, modules, fields
10129and parameters in Python 2 source code. These refactorings can also be applied
10130to occurrences in strings and comments.")
10131 (license license:gpl2)))
10132
2c880ef4
LC
10133(define-public python-rope
10134 (package
10135 (inherit python2-rope)
10136 (name "python-rope")
10137 (arguments `(#:python ,python-wrapper
10138 ;; XXX: Only partial python3 support, results in some failing
10139 ;; tests: <https://github.com/python-rope/rope/issues/247>.
10140 #:tests? #f))
10141 (properties `((python2-variant . ,(delay python2-rope))))))
10142
44d10b1f
RW
10143(define-public python-py3status
10144 (package
10145 (name "python-py3status")
ef68b35d 10146 (version "3.21")
44d10b1f
RW
10147 (source
10148 (origin
10149 (method url-fetch)
10150 (uri (pypi-uri "py3status" version))
10151 (sha256
ef68b35d 10152 (base32 "16z8zq83hxy48g6hh4xczbdz50qvxv9k1aahr4fqq7jis60cc262"))))
44d10b1f
RW
10153 (build-system python-build-system)
10154 (inputs
10155 `(("file" ,file)))
10156 (arguments
10157 '(#:phases
10158 (modify-phases %standard-phases
10159 ;; 'file' is used for detection of configuration file encoding
10160 ;; let's make link the dependency to particular input
10161 (add-before 'build 'patch-file-path
10162 (lambda* (#:key inputs #:allow-other-keys)
10163 (let ((file-path (assoc-ref inputs "file")))
10164 (substitute* "py3status/parse_config.py"
6a6b8a3f 10165 (("\\[\"file\", \"-b\"")
44d10b1f
RW
10166 (string-append "['" file-path "/bin/file', '-b'")))
10167 #t))))
10168 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
10169 (home-page "https://github.com/ultrabug/py3status")
10170 (synopsis "Extensible i3status wrapper written in Python")
10171 (description "py3status is an i3status wrapper which extends i3status
10172functionality in a modular way, allowing you to extend your panel with your
10173own code, responding to click events and updating clock every second.")
10174 (license license:bsd-3)))
10175
10176(define-public python-tblib
10177 (package
10178 (name "python-tblib")
10179 (version "1.3.2")
10180 (source (origin
10181 (method url-fetch)
10182 (uri (pypi-uri "tblib" version))
10183 (sha256 (base32
10184 "1rsg8h069kqgncyv8fgzyj6qflk6j10cb78pa5jk34ixwq044vj3"))))
10185 (build-system python-build-system)
10186 (arguments
10187 `(#:phases
10188 (modify-phases %standard-phases
10189 (add-before 'check 'adjust-tests
10190 (lambda _
10191 (when (which "python3")
10192 ;; Adjust the example output to match that of Python 3.7:
10193 ;; <https://github.com/ionelmc/python-tblib/issues/36>.
10194 (substitute* "README.rst"
10195 (("Exception\\('fail',") "Exception('fail'"))
10196 #t)))
10197 (replace 'check
10198 (lambda _
10199 ;; Upstream runs tests after installation and the package itself
10200 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
10201 ;; found.
10202 (setenv "PYTHONPATH"
10203 (string-append (getcwd) "/build/lib:"
10204 (getenv "PYTHONPATH")))
10205 (invoke "py.test" "-vv" "tests" "README.rst"))))))
10206 (native-inputs
10207 `(("python-pytest" ,python-pytest)
10208 ("python-six" ,python-six)))
10209 (home-page "https://github.com/ionelmc/python-tblib")
10210 (synopsis "Traceback serialization library")
10211 (description
10212 "Traceback serialization allows you to:
10213
10214@enumerate
10215@item Pickle tracebacks and raise exceptions with pickled tracebacks in
10216different processes. This allows better error handling when running code over
10217multiple processes (imagine multiprocessing, billiard, futures, celery etc).
10218
10219@item Parse traceback strings and raise with the parsed tracebacks.
10220@end enumerate\n")
10221 (license license:bsd-3)))
10222
10223(define-public python2-tblib
10224 (package-with-python2 python-tblib))
10225
10226(define-public python-greenlet
10227 (package
10228 (name "python-greenlet")
10229 (version "0.4.15")
10230 (source (origin
10231 (method url-fetch)
10232 (uri (pypi-uri "greenlet" version))
10233 (sha256
10234 (base32
10235 "1g4g1wwc472ds89zmqlpyan3fbnzpa8qm48z3z1y6mlk44z485ll"))))
10236 (build-system python-build-system)
10237 (home-page "https://greenlet.readthedocs.io/")
10238 (synopsis "Lightweight in-process concurrent programming")
10239 (description
10240 "Greenlet package is a spin-off of Stackless, a version of CPython
10241that supports micro-threads called \"tasklets\". Tasklets run
10242pseudo-concurrently (typically in a single or a few OS-level threads) and
10243are synchronized with data exchanges on \"channels\".")
10244 (license (list license:psfl license:expat))))
10245
10246(define-public python2-greenlet
10247 (package-with-python2 python-greenlet))
10248
10249(define-public python-objgraph
10250 (package
10251 (name "python-objgraph")
eebc03bb 10252 (version "3.4.1")
44d10b1f
RW
10253 (source
10254 (origin
10255 (method url-fetch)
10256 (uri (pypi-uri "objgraph" version))
10257 (sha256
10258 (base32
eebc03bb 10259 "19qmqsh984zq1rzzjy4vqnmviaqnymcyl8h7z99pnicbgwnm2adz"))))
44d10b1f
RW
10260 (build-system python-build-system)
10261 (propagated-inputs
10262 `(("python-graphviz" ,python-graphviz)))
10263 (native-inputs
10264 `(("python-mock" ,python-mock)
10265 ("graphviz" ,graphviz)))
10266 (home-page "https://mg.pov.lt/objgraph/")
10267 (synopsis "Draw Python object reference graphs with graphviz")
10268 (description
10269 "This package provides tools to draw Python object reference graphs with
10270graphviz.")
10271 (license license:expat)))
10272
ffe58d1d
MB
10273(define-public python2-objgraph
10274 (package-with-python2 python-objgraph))
10275
44d10b1f
RW
10276(define-public python-gevent
10277 (package
10278 (name "python-gevent")
10279 (version "1.3.7")
10280 (source (origin
10281 (method url-fetch)
10282 (uri (pypi-uri "gevent" version))
10283 (sha256
10284 (base32
10285 "0b0fr04qdk1p4sniv87fh8z5psac60x01pv054kpgi94520g81iz"))
10286 (modules '((guix build utils)))
10287 (snippet
10288 '(begin
10289 ;; unbunding libev and c-ares
10290 (delete-file-recursively "deps")
10291 #t))))
10292 (build-system python-build-system)
10293 (arguments
10294 `(#:modules ((ice-9 ftw)
10295 (ice-9 match)
10296 (srfi srfi-26)
10297 (guix build utils)
10298 (guix build python-build-system))
10299 #:phases (modify-phases %standard-phases
44d10b1f
RW
10300 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
10301 (lambda _
10302 (substitute* "src/gevent/subprocess.py"
10303 (("/bin/sh") (which "sh")))
10304 (for-each (lambda (file)
10305 (substitute* file
10306 (("/bin/sh") (which "sh"))
10307 (("/bin/true") (which "true"))))
10308 (find-files "src/greentest" "\\.py$"))
10309 #t))
10310 (add-before 'build 'do-not-use-bundled-sources
10311 (lambda* (#:key inputs #:allow-other-keys)
10312 (setenv "CONFIG_SHELL" (which "bash"))
10313 (setenv "LIBEV_EMBED" "false")
10314 (setenv "CARES_EMBED" "false")
10315 (setenv "EMBED" "false")
10316
b5b56b7f
MB
10317 ;; Prevent building bundled libev.
10318 (substitute* "setup.py"
10319 (("run_make=_BUILDING")
10320 "run_make=False"))
10321
44d10b1f
RW
10322 (let ((greenlet (string-append
10323 (assoc-ref inputs "python-greenlet")
10324 "/include")))
10325 (match (scandir greenlet
10326 (lambda (item)
10327 (string-prefix? "python" item)))
10328 ((python)
b5b56b7f 10329 (setenv "C_INCLUDE_PATH"
44d10b1f
RW
10330 (string-append greenlet "/" python)))))
10331 #t))
10332 (add-before 'check 'skip-timer-test
10333 (lambda _
10334 ;; XXX: Skip 'TestTimerResolution', which appears to be
10335 ;; unreliable.
10336 (substitute* "src/greentest/test__core_timer.py"
10337 (("not greentest.RUNNING_ON_CI") "False"))
10338 #t))
10339 (replace 'check
10340 (lambda _
10341 ;; Make sure the build directory is on PYTHONPATH.
10342 (setenv "PYTHONPATH"
10343 (string-append
10344 (getenv "PYTHONPATH") ":"
10345 (getcwd) "/build/"
10346 (car (scandir "build" (cut string-prefix? "lib." <>)))))
10347 (with-directory-excursion "src/greentest"
10348 ;; XXX: Many tests require network access. Instead we only
10349 ;; run known-good tests. Unfortunately we cannot use
10350 ;; recursion here since this directory also contains
10351 ;; Python-version-specific subfolders.
10352 (apply invoke "python" "testrunner.py" "--config"
10353 "known_failures.py"
10354 (scandir "." (cut regexp-exec
10355 (make-regexp "test_+(subprocess|core)")
10356 <>)))))))))
10357 (propagated-inputs
10358 `(("python-greenlet" ,python-greenlet)
10359 ("python-objgraph" ,python-objgraph)))
10360 (native-inputs
b5b56b7f 10361 `(("python-six" ,python-six)))
44d10b1f
RW
10362 (inputs
10363 `(("c-ares" ,c-ares)
10364 ("libev" ,libev)))
10365 (home-page "http://www.gevent.org/")
10366 (synopsis "Coroutine-based network library")
10367 (description
10368 "gevent is a coroutine-based Python networking library that uses greenlet
10369to provide a high-level synchronous API on top of the libev event loop.")
10370 (license license:expat)
10371 (properties `((python2-variant . ,(delay python2-gevent))))))
10372
10373(define-public python2-gevent
10374 (let ((base (package-with-python2
10375 (strip-python2-variant python-gevent))))
10376 (package
10377 (inherit base)
10378 (native-inputs `(,@(package-native-inputs python-gevent)
10379 ("python-mock" ,python2-mock))))))
10380
10381(define-public python-fastimport
10382 (package
10383 (name "python-fastimport")
10384 (version "0.9.6")
10385 (source
10386 (origin
10387 (method url-fetch)
10388 (uri (pypi-uri "fastimport" version))
10389 (sha256
10390 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
10391 (build-system python-build-system)
10392 (home-page "https://github.com/jelmer/python-fastimport")
10393 (synopsis "VCS fastimport parser and generator in Python")
10394 (description "This package provides a parser for and generator of the Git
10395@url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
10396format.")
10397 (license license:gpl2+)))
10398
10399(define-public python2-fastimport
10400 (package-with-python2 python-fastimport))
10401
10402(define-public python-twisted
10403 (package
10404 (name "python-twisted")
fdfad2fc 10405 (version "19.7.0")
44d10b1f
RW
10406 (source (origin
10407 (method url-fetch)
10408 (uri (pypi-uri "Twisted" version ".tar.bz2"))
10409 (sha256
10410 (base32
fdfad2fc 10411 "17d3hnxv9qndagzz63mdpyk99xj63p9gq586vjn0rxk8cl197nym"))))
44d10b1f
RW
10412 (build-system python-build-system)
10413 (arguments
0107c9b8 10414 '(#:tests? #f)) ; FIXME: some tests fail
44d10b1f
RW
10415 (propagated-inputs
10416 `(("python-zope-interface" ,python-zope-interface)
52ca1c4a 10417 ("python-pyhamcrest" ,python-pyhamcrest)
44d10b1f 10418 ("python-incremental" ,python-incremental)
e5ba2fe3 10419 ("python-hyperlink" ,python-hyperlink)
44d10b1f
RW
10420 ("python-constantly" ,python-constantly)
10421 ("python-automat" ,python-automat)))
10422 (home-page "https://twistedmatrix.com/")
10423 (synopsis "Asynchronous networking framework written in Python")
10424 (description
10425 "Twisted is an extensible framework for Python programming, with special
10426focus on event-based network programming and multiprotocol integration.")
10427 (license license:expat)))
10428
10429(define-public python2-twisted
10430 (package-with-python2 python-twisted))
10431
10432(define-public python-pika
10433 (package
10434 (name "python-pika")
10435 (version "0.12.0")
10436 (source
10437 (origin
10438 (method url-fetch)
10439 (uri (pypi-uri "pika" version))
10440 (sha256
10441 (base32
10442 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
10443 (build-system python-build-system)
10444 (native-inputs
10445 `(("python-pyev" ,python-pyev)
10446 ("python-tornado" ,python-tornado)
10447 ("python-twisted" ,python-twisted)))
10448 (home-page "https://pika.readthedocs.org")
10449 (synopsis "Pure Python AMQP Client Library")
10450 (description
10451 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
10452Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
10453network support library.")
10454 (license license:bsd-3)))
10455
10456(define-public python2-pika
10457 (package-with-python2 python-pika))
10458
10459(define-public python-ply
10460 (package
10461 (name "python-ply")
10462 (version "3.10")
10463 (source
10464 (origin
10465 (method url-fetch)
10466 (uri (pypi-uri "ply" version))
10467 (sha256
10468 (base32
10469 "1jxsr1d2f732r6ljhvm827113dckwl6qwakfvpbdhcbhvpvlmscn"))))
10470 (build-system python-build-system)
10471 (home-page "http://www.dabeaz.com/ply/")
10472 (synopsis "Python Lex & Yacc")
10473 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
10474It uses LR parsing and does extensive error checking.")
10475 (license license:bsd-3)))
10476
10477(define-public python2-ply
10478 (package-with-python2 python-ply))
10479
10480(define-public python-tabulate
10481 (package
10482 (name "python-tabulate")
10483 (version "0.7.7")
10484 (source (origin
10485 (method url-fetch)
10486 (uri (pypi-uri "tabulate" version))
10487 (sha256
10488 (base32
10489 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
10490 (build-system python-build-system)
10491 (arguments
10492 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
10493 ;; and the latest release is not tagged in the upstream repository.
10494 '(#:tests? #f))
10495 (home-page "https://bitbucket.org/astanin/python-tabulate")
10496 (synopsis "Pretty-print tabular data")
10497 (description
10498 "Tabulate is a library and command-line utility to pretty-print tabular
10499data in Python.")
10500 (license license:expat)))
10501
10502(define-public python2-tabulate
10503 (package-with-python2 python-tabulate))
10504
10505(define-public python-kazoo
10506 (package
10507 (name "python-kazoo")
10508 (version "2.4.0")
10509 (source
10510 (origin
10511 (method url-fetch)
10512 (uri (pypi-uri "kazoo" version))
10513 (sha256
10514 (base32
10515 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
10516 (build-system python-build-system)
10517 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
10518 (propagated-inputs
10519 `(("python-six" ,python-six)))
10520 (home-page "https://kazoo.readthedocs.org")
10521 (synopsis "High-level Zookeeper client library")
10522 (description
10523 "Kazoo is a Python client library for the Apache Zookeeper distributed
10524application service. It is designed to be easy to use and to avoid common
10525programming errors.")
10526 (license license:asl2.0)))
10527
10528(define-public python2-kazoo
10529 (package-with-python2 python-kazoo))
10530
10531(define-public python-pykafka
10532 (package
10533 (name "python-pykafka")
10534 (version "2.4.0")
10535 (source (origin
10536 (method url-fetch)
0ca1d040 10537 (uri (pypi-uri "pykafka" version))
44d10b1f
RW
10538 (sha256
10539 (base32
10540 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
10541 (build-system python-build-system)
10542 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
10543 (propagated-inputs
10544 `(("python-gevent" ,python-gevent)
10545 ("python-kazoo" ,python-kazoo)
10546 ("python-tabulate" ,python-tabulate)))
10547 (inputs
10548 `(("librdkafka" ,librdkafka)))
10549 (home-page "https://pykafka.readthedocs.io/")
10550 (synopsis "Apache Kafka client for Python")
10551 (description
10552 "PyKafka is a client for the Apache Kafka distributed messaging system.
10553It includes Python implementations of Kafka producers and consumers, which
10554are optionally backed by a C extension built on librdkafka.")
10555 (license license:asl2.0)))
10556
10557(define-public python2-pykafka
10558 (package-with-python2 python-pykafka))
10559
10560(define-public python-wcwidth
28ac442b
MB
10561 (package
10562 (name "python-wcwidth")
574a71a7 10563 (version "0.1.8")
28ac442b
MB
10564 (source (origin
10565 (method url-fetch)
10566 (uri (pypi-uri "wcwidth" version))
10567 (sha256
10568 (base32
574a71a7 10569 "1a1pzds3xzfylm5mnc5f6c1p8kiig0daqjc9gygd9rc3cj53x2zj"))))
28ac442b
MB
10570 (build-system python-build-system)
10571 (home-page "https://github.com/jquast/wcwidth")
10572 (synopsis "Measure number of terminal column cells of wide-character codes")
10573 (description "Wcwidth measures the number of terminal column cells of
44d10b1f
RW
10574wide-character codes. It is useful for those implementing a terminal emulator,
10575or programs that carefully produce output to be interpreted by one. It is a
10576Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
10577specified in POSIX.1-2001 and POSIX.1-2008.")
28ac442b 10578 (license license:expat)))
44d10b1f
RW
10579
10580(define-public python2-wcwidth
10581 (package-with-python2 python-wcwidth))
10582
10583(define-public python2-jsonrpclib
10584 (package
10585 (name "python2-jsonrpclib")
10586 (version "0.1.7")
10587 (source (origin
10588 (method url-fetch)
6571bba0 10589 (uri (pypi-uri "jsonrpclib" version))
44d10b1f
RW
10590 (sha256
10591 (base32
10592 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
10593 (build-system python-build-system)
10594 (arguments
10595 `(#:tests? #f
10596 #:python ,python-2))
10597 (home-page "https://github.com/joshmarshall/jsonrpclib/")
10598 (synopsis "Implementation of JSON-RPC specification for Python")
10599 (description
10600 "This library is an implementation of the JSON-RPC specification.
10601It supports both the original 1.0 specification, as well as the
10602new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
10603etc.")
10604 (license license:asl2.0)))
10605
10606(define-public python-chai
10607 (package
10608 (name "python-chai")
10609 (version "1.1.2")
10610 (source (origin
10611 (method url-fetch)
10612 (uri (pypi-uri "chai" version))
10613 (sha256
10614 (base32
10615 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
10616 (build-system python-build-system)
10617 (home-page "https://github.com/agoragames/chai")
10618 (synopsis "Mocking framework for Python")
10619 (description
10620 "Chai provides an api for mocking, stubbing and spying your python
10621objects, patterned after the Mocha library for Ruby.")
10622 (license license:bsd-3)))
10623
10624(define-public python2-chai
10625 (package-with-python2 python-chai))
10626
10627(define-public python-inflection
10628 (package
10629 (name "python-inflection")
10630 (version "0.3.1")
10631 (source
10632 (origin (method url-fetch)
10633 (uri (pypi-uri "inflection" version))
10634 (sha256
10635 (base32
10636 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
10637 (build-system python-build-system)
10638 (native-inputs
10639 `(("python-pytest" ,python-pytest)))
10640 (home-page "https://github.com/jpvanhal/inflection")
10641 (synopsis "Python string transformation library")
10642 (description
10643 "Inflection is a string transformation library. It singularizes
10644and pluralizes English words, and transforms strings from CamelCase to
10645underscored string.")
10646 (license license:expat)))
10647
10648(define-public python2-inflection
10649 (package-with-python2 python-inflection))
10650
10651(define-public python-pylev
10652 (package
10653 (name "python-pylev")
10654 (version "1.3.0")
10655 (source (origin
10656 (method url-fetch)
10657 (uri (pypi-uri "pylev" version))
10658 (sha256
10659 (base32
10660 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
10661 (build-system python-build-system)
10662 (home-page "https://github.com/toastdriven/pylev")
10663 (synopsis "Levenshtein distance implementation in Python")
10664 (description "Pure Python Levenshtein implementation, based off the
10665Wikipedia code samples at
10666@url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
10667 (license license:bsd-3)))
10668
10669(define-public python2-pylev
10670 (package-with-python2 python-pylev))
10671
10672(define-public python-cleo
10673 (package
10674 (name "python-cleo")
0c101a04 10675 (version "0.7.6")
44d10b1f
RW
10676 (source (origin
10677 (method url-fetch)
10678 (uri (pypi-uri "cleo" version))
10679 (sha256
10680 (base32
0c101a04 10681 "02dlc0rn43zgvw0s5v4j80bca9n1jfpwy3r78gn9qjgk0qj39kwr"))))
44d10b1f
RW
10682 (build-system python-build-system)
10683 (native-inputs
af2d3713 10684 `( ;; For testing
44d10b1f
RW
10685 ("python-mock" ,python-mock)
10686 ("python-pytest-mock" ,python-pytest-mock)
10687 ("python-pytest" ,python-pytest)))
10688 (propagated-inputs
10689 `(("python-backpack" ,python-backpack)
0c101a04 10690 ("python-clikit" ,python-clikit)
44d10b1f
RW
10691 ("python-pastel" ,python-pastel)
10692 ("python-pylev" ,python-pylev)))
10693 (home-page "https://github.com/sdispater/cleo")
10694 (synopsis "Command-line arguments library for Python")
10695 (description
10696 "Cleo allows you to create command-line commands with signature in
10697docstring and colored output.")
10698 (license license:expat)))
10699
10700(define-public python2-cleo
10701 (package-with-python2 python-cleo))
10702
2be85c45
TLC
10703(define-public python-tomlkit
10704 (package
10705 (name "python-tomlkit")
20c9914e 10706 (version "0.5.8")
2be85c45
TLC
10707 (source
10708 (origin
10709 (method url-fetch)
10710 (uri (pypi-uri "tomlkit" version))
10711 (sha256
10712 (base32
20c9914e 10713 "0sf2a4q61kf344hjbw8kb6za1hlccl89j9lzqw0l2zpddp0hrh9j"))))
2be85c45
TLC
10714 (build-system python-build-system)
10715 (native-inputs
10716 `(("python-pytest" ,python-pytest)))
10717 (home-page
10718 "https://github.com/sdispater/tomlkit")
10719 (synopsis "Style preserving TOML library")
10720 (description
10721 "TOML Kit is a 0.5.0-compliant TOML library. It includes a parser that
10722preserves all comments, indentations, whitespace and internal element ordering,
10723and makes them accessible and editable via an intuitive API. It can also
10724create new TOML documents from scratch using the provided helpers. Part of the
10725implementation as been adapted, improved and fixed from Molten.")
10726 (license license:expat)))
10727
0bb32201
TLC
10728(define-public python-shellingham
10729 (package
10730 (name "python-shellingham")
10731 (version "1.3.1")
10732 (source
10733 (origin
10734 (method url-fetch)
10735 (uri (pypi-uri "shellingham" version))
10736 (sha256
10737 (base32
10738 "1q7kws7w4x2hji3g7y0ni9ddk4sd676ylrb3db54gbpys6xj6nwq"))))
10739 (build-system python-build-system)
10740 (home-page
10741 "https://github.com/sarugaku/shellingham")
10742 (synopsis "Tool to detect surrounding shell")
10743 (description
10744 "Shellingham detects what shell the current Python executable is
10745running in.")
10746 (license license:isc)))
10747
aee92957
TLC
10748(define-public python-memcached
10749 (package
10750 (name "python-memcached")
10751 (version "1.59")
10752 (source
10753 (origin
10754 (method url-fetch)
10755 (uri (pypi-uri "python-memcached" version))
10756 (sha256
10757 (base32
10758 "0kvyapavbirk2x3n1jx4yb9nyigrj1s3x15nm3qhpvhkpqvqdqm2"))))
10759 (build-system python-build-system)
10760 (propagated-inputs `(("python-six" ,python-six)))
10761 (home-page
10762 "https://github.com/linsomniac/python-memcached")
10763 (synopsis "Pure python memcached client")
10764 (description
10765 "This software is a pure Python interface to the memcached memory cache
10766daemon. It is the client side software which allows storing values in one or
10767more, possibly remote, memcached servers.")
10768 (license license:psfl)))
10769
b2ac2508
TLC
10770(define-public python-clikit
10771 (package
10772 (name "python-clikit")
4573b94d 10773 (version "0.4.1")
b2ac2508
TLC
10774 (source
10775 (origin
10776 (method url-fetch)
10777 (uri (pypi-uri "clikit" version))
10778 (sha256
10779 (base32
4573b94d 10780 "10gab65pq0jdf589n33sj2513pxal2lisl4xwf1ijysdjxmpdr4a"))))
b2ac2508
TLC
10781 (build-system python-build-system)
10782 (propagated-inputs
10783 `(("python-pastel" ,python-pastel)
10784 ("python-pylev" ,python-pylev)))
10785 (home-page "https://github.com/sdispater/clikit")
10786 (synopsis "Group of utilities to build command line interfaces")
10787 (description
10788 "CliKit is a group of utilities to build testable command line
10789interfaces.")
10790 (license license:expat)))
10791
c6f008d6
TLC
10792(define-public python-msgpack-python
10793 (package
10794 (name "python-msgpack-python")
10795 (version "0.5.6")
10796 (source
10797 (origin
10798 (method url-fetch)
10799 (uri (pypi-uri "msgpack-python" version))
10800 (sha256
10801 (base32
10802 "16wh8qgybmfh4pjp8vfv78mdlkxfmcasg78lzlnm6nslsfkci31p"))))
10803 (build-system python-build-system)
10804 (home-page "http://msgpack.org/")
10805 (synopsis "Package to deserialize messages in MessagePack binary format")
10806 (description
10807 "MessagePack is an efficient binary serialization format. It lets you
10808exchange data among multiple languages like JSON. But it's faster and
10809smaller. Small integers are encoded into a single byte, and typical short
10810strings require only one extra byte in addition to the strings themselves.")
10811 (license license:asl2.0)))
10812
badc1c63
TLC
10813(define-public python-cachy
10814 (package
10815 (name "python-cachy")
10816 (version "0.2.0")
10817 (source
10818 (origin
10819 (method url-fetch)
10820 (uri (pypi-uri "cachy" version))
10821 (sha256
10822 (base32
10823 "0v6mjyhgx6j7ya20bk69cr3gdzdkdf6psay0h090rscclgji65dp"))))
10824 (build-system python-build-system)
10825 (native-inputs
10826 `(("python-fakeredis" ,python-fakeredis)
10827 ("python-flexmock" ,python-flexmock)
10828 ("python-pytest" ,python-pytest)))
10829 (propagated-inputs
10830 `(("python-memcached" ,python-memcached)
10831 ("python-msgpack-python" ,python-msgpack-python)
10832 ("python-redis" ,python-redis)))
10833 (home-page "https://github.com/sdispater/cachy")
10834 (synopsis "Simple yet effective caching library")
10835 (description
10836 "Cachy provides a simple yet effective caching library. A simple but
10837powerful API: thread-safety; decorator syntax; support for memcached, redis,
10838database, file, dict stores. Cachy supports python versions 2.7+ and 3.2+.")
10839 (license license:expat)))
10840
617bb67b
TLC
10841(define-public poetry
10842 (package
10843 (name "poetry")
10844 (version "0.12.17")
10845 ;; Poetry can only be built from source with poetry.
10846 (source
10847 (origin
10848 (method url-fetch)
10849 (uri (pypi-uri "poetry" version))
10850 (sha256
10851 (base32
10852 "0gxwcd65qjmzqzppf53x51sic1rbcd9py6cdzx3aprppipimslvf"))))
10853 (build-system python-build-system)
10854 (arguments
10855 `(#:tests? #f ;; Pypi does not have tests.
10856 #:phases
10857 (modify-phases %standard-phases
10858 (replace 'build
10859 (lambda _
10860 ;; Bug in poetry https://github.com/sdispater/poetry/issues/866.
10861 (invoke "sed" "-i" "-e" "s/from distutils.core/from setuptools/"
10862 "setup.py")
10863 #t)))))
10864 (propagated-inputs
10865 `(("python-cachecontrol" ,python-cachecontrol)
10866 ("python-cachy" ,python-cachy)
10867 ("python-cleo" ,python-cleo)
10868 ("python-glob2" ,python-glob2)
10869 ("python-html5lib" ,python-html5lib)
10870 ("python-jsonschema" ,python-jsonschema)
10871 ("python-msgpack" ,python-msgpack)
617bb67b
TLC
10872 ("python-pkginfo" ,python-pkginfo)
10873 ("python-pyparsing" ,python-pyparsing)
10874 ("python-pyrsistent" ,python-pyrsistent)
10875 ("python-requests" ,python-requests)
10876 ("python-requests-toolbelt" ,python-requests-toolbelt)
10877 ("python-shellingham" ,python-shellingham)
10878 ("python-tomlkit" ,python-tomlkit)
10879 ("python-virtualenv" ,python-virtualenv)))
10880 (home-page "https://poetry.eustace.io/")
10881 (synopsis "Python dependency management and packaging made easy")
10882 (description "Poetry is a tool for dependency management and packaging
10883in Python. It allows you to declare the libraries your project depends on and
10884it will manage (install/update) them for you.")
10885 (license license:expat)))
10886
44d10b1f
RW
10887(define-public python-lazy-object-proxy
10888 (package
10889 (name "python-lazy-object-proxy")
7454078a 10890 (version "1.4.3")
44d10b1f
RW
10891 (source (origin
10892 (method url-fetch)
10893 (uri (pypi-uri "lazy-object-proxy" version))
10894 (sha256
10895 (base32
7454078a 10896 "1w1aaay424ciz8fz3fkzxb0pxzfxn184f2whpyn4fx72bn50x47k"))))
63d4873b
MO
10897 (native-inputs
10898 `(("python-setuptools-scm" ,python-setuptools-scm-3.3)))
44d10b1f
RW
10899 (build-system python-build-system)
10900 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
10901 (synopsis "Lazy object proxy for python")
10902 (description
10903 "Lazy object proxy is an object that wraps a callable but defers the call
10904until the object is actually required, and caches the result of said call.")
10905 (license license:bsd-2)))
10906
10907(define-public python2-lazy-object-proxy
10908 (package-with-python2 python-lazy-object-proxy))
10909
10910(define-public python-dnspython
10911 (package
10912 (name "python-dnspython")
10913 (version "1.15.0")
10914 (source (origin
10915 (method url-fetch)
10916 (uri (string-append "http://www.dnspython.org/kits/"
10917 version "/dnspython-" version ".tar.gz"))
10918 (sha256
10919 (base32
10920 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
10921 (build-system python-build-system)
10922 (arguments '(#:tests? #f)) ; XXX: requires internet access
10923 (home-page "http://www.dnspython.org")
10924 (synopsis "DNS toolkit for Python")
10925 (description
10926 "dnspython is a DNS toolkit for Python. It supports almost all record
10927types. It can be used for queries, zone transfers, and dynamic updates.
10928It supports TSIG authenticated messages and EDNS0.")
10929 (license license:expat)))
10930
10931(define-public python2-dnspython
10932 (package-with-python2 python-dnspython))
10933
10934(define-public python-email-validator
10935 (package
10936 (name "python-email-validator")
10937 (version "1.0.2")
10938 (source
10939 (origin (method url-fetch)
10940 (uri (pypi-uri "email_validator" version))
10941 (sha256
10942 (base32
10943 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
10944 (build-system python-build-system)
10945 (arguments
10946 '(#:phases
10947 (modify-phases %standard-phases
10948 (add-before 'build 'use-dnspython
10949 (lambda _
10950 (substitute* "setup.py"
10951 (("dnspython3") "dnspython"))
10952 #t)))))
10953 (propagated-inputs
10954 `(("python-dnspython" ,python-dnspython)
10955 ("python-idna" ,python-idna)))
10956 (home-page "https://github.com/JoshData/python-email-validator")
10957 (synopsis "Email address validation library for Python")
10958 (description
10959 "This library validates email address syntax and deliverability.")
10960 (license license:cc0)))
10961
10962(define-public python2-email-validator
10963 (package-with-python2 python-email-validator))
10964
10965(define-public python-ukpostcodeparser
10966 (package
10967 (name "python-ukpostcodeparser")
10968 (version "1.0.3")
10969 (source (origin
10970 (method url-fetch)
10971 (uri (pypi-uri "UkPostcodeParser" version))
10972 (sha256
10973 (base32
10974 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
10975 (build-system python-build-system)
10976 (home-page "https://github.com/hamstah/ukpostcodeparser")
10977 (synopsis "UK Postcode parser for Python")
10978 (description
10979 "This library provides the @code{parse_uk_postcode} function for
10980parsing UK postcodes.")
10981 (license license:expat)))
10982
10983(define-public python2-ukpostcodeparser
10984 (package-with-python2 python-ukpostcodeparser))
10985
10986(define-public python-faker
10987 (package
10988 (name "python-faker")
10989 (version "0.7.9")
10990 (source (origin
10991 (method url-fetch)
10992 (uri (pypi-uri "Faker" version))
10993 (sha256
10994 (base32
10995 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
10996 (patches
10997 (search-patches "python-faker-fix-build-32bit.patch"))
10998 (modules '((guix build utils)))
10999 (snippet
11000 '(begin
11001 (for-each delete-file (find-files "." "\\.pyc$"))
11002 #t))))
11003 (build-system python-build-system)
11004 (arguments
11005 '(#:phases
11006 (modify-phases %standard-phases
11007 (replace 'check
49ff8827 11008 (lambda _ (invoke "python" "-m" "unittest" "-v" "tests"))))))
44d10b1f
RW
11009 (native-inputs
11010 `(;; For testing
11011 ("python-email-validator" ,python-email-validator)
11012 ("python-mock" ,python-mock)
11013 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
11014 (propagated-inputs
11015 `(("python-dateutil" ,python-dateutil)
11016 ("python-six" ,python-six)))
11017 (home-page "https://github.com/joke2k/faker")
11018 (synopsis "Python package that generates fake data")
11019 (description
11020 "Faker is a Python package that generates fake data such as names,
11021addresses, and phone numbers.")
11022 (license license:expat)
11023 (properties `((python2-variant . ,(delay python2-faker))))))
11024
11025(define-public python2-faker
11026 (let ((base (package-with-python2 (strip-python2-variant
11027 python-faker))))
11028 (package
11029 (inherit base)
11030 (propagated-inputs
11031 `(("python2-ipaddress" ,python2-ipaddress)
11032 ,@(package-propagated-inputs base))))))
11033
11034(define-public python-pyaml
11035 (package
11036 (name "python-pyaml")
11037 (version "18.11.0")
11038 (source (origin
11039 (method url-fetch)
11040 (uri (pypi-uri "pyaml" version))
11041 (sha256
11042 (base32
11043 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
11044 (build-system python-build-system)
11045 (native-inputs
11046 `(("python-unidecode" ,python-unidecode)))
11047 (propagated-inputs
11048 `(("python-pyyaml" ,python-pyyaml)))
11049 (home-page "https://github.com/mk-fg/pretty-yaml")
11050 (synopsis "YAML pretty-print library for Python")
11051 (description
11052 "pyaml is a PyYAML based python module to produce pretty and readable
11053YAML-serialized data.")
492e3a7a 11054 (license license:wtfpl2)))
44d10b1f
RW
11055
11056(define-public python2-pyaml
11057 (package-with-python2 python-pyaml))
11058
11059(define-public python-backpack
11060 (package
11061 (name "python-backpack")
11062 (version "0.1")
11063 (source
11064 (origin
11065 (method url-fetch)
11066 (uri (pypi-uri "backpack" version))
11067 (sha256
11068 (base32
11069 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
11070 (build-system python-build-system)
11071 (native-inputs
11072 `(("python-pytest" ,python-pytest)
11073 ("python-nose" ,python-nose)))
11074 (propagated-inputs
11075 `(("python-simplejson" ,python-simplejson)))
11076 (home-page "https://github.com/sdispater/backpack")
11077 (synopsis "Utilities for working with Python collections")
11078 (description "Backpack provides some useful utilities for working with
11079collections of data.")
11080 (license license:expat)))
11081
11082(define-public python2-backpack
11083 (package-with-python2 python-backpack))
11084
11085(define-public python-prompt-toolkit
11086 (package
11087 (name "python-prompt-toolkit")
11088 (version "2.0.7")
11089 (source
11090 (origin
11091 (method url-fetch)
11092 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
11093 (sha256
11094 (base32
11095 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
11096 (build-system python-build-system)
11097 (arguments
11098 `(#:phases
11099 (modify-phases %standard-phases
11100 (delete 'check)
11101 (add-after 'install 'post-install-check
11102 (lambda* (#:key inputs outputs #:allow-other-keys)
11103 ;; HOME is needed for the test
11104 ;; "test_pathcompleter_can_expanduser".
11105 (setenv "HOME" "/tmp")
11106 (add-installed-pythonpath inputs outputs)
11107 (invoke "py.test"))))))
11108 (propagated-inputs
11109 `(("python-wcwidth" ,python-wcwidth)
11110 ("python-six" ,python-six)
11111 ("python-pygments" ,python-pygments)))
11112 (native-inputs
11113 `(("python-pytest" ,python-pytest)))
11114 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
11115 (synopsis "Library for building command line interfaces in Python")
11116 (description
11117 "Prompt-Toolkit is a library for building interactive command line
11118interfaces in Python. It's like GNU Readline but it also features syntax
11119highlighting while typing, out-of-the-box multi-line input editing, advanced
11120code completion, incremental search, support for Chinese double-width
11121characters, mouse support, and auto suggestions.")
11122 (license license:bsd-3)))
11123
11124(define-public python2-prompt-toolkit
11125 (package-with-python2 python-prompt-toolkit))
11126
11127(define-public python-prompt-toolkit-1
11128 (package (inherit python-prompt-toolkit)
11129 (version "1.0.15")
11130 (source
11131 (origin
11132 (method url-fetch)
11133 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
11134 (sha256
11135 (base32
11136 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
11137
11138(define-public python2-prompt-toolkit-1
11139 (package-with-python2 python-prompt-toolkit-1))
11140
11141(define-public python-jedi
11142 (package
11143 (name "python-jedi")
296e1aea 11144 (version "0.15.1")
44d10b1f
RW
11145 (source
11146 (origin
11147 (method url-fetch)
11148 (uri (pypi-uri "jedi" version))
11149 (sha256
11150 (base32
296e1aea 11151 "0bp4pxhsynaarbvzblsn5x32lzp29svy3sxfy8i6m5iwz9s9r1ds"))))
44d10b1f
RW
11152 (build-system python-build-system)
11153 (arguments
296e1aea 11154 `(#:phases
44d10b1f 11155 (modify-phases %standard-phases
296e1aea
MC
11156 (add-after 'unpack 'disable-file-completion-test
11157 ;; A single parameterized test currently fail (see:
11158 ;; https://github.com/davidhalter/jedi/issues/1395). Remove it.
11159 (lambda _
11160 (substitute* "test/test_api/test_completion.py"
11161 ((".*'example.py', 'rb\"' \\+ join\\('\\.\\.'.*") ""))
11162 #t))
44d10b1f 11163 (replace 'check
296e1aea
MC
11164 (lambda _
11165 (setenv "HOME" "/tmp")
11166 (invoke "python" "-m" "pytest"))))))
44d10b1f
RW
11167 (native-inputs
11168 `(("python-pytest" ,python-pytest)
11169 ("python-docopt" ,python-docopt)))
11170 (propagated-inputs
11171 `(("python-parso" ,python-parso)))
11172 (home-page "https://github.com/davidhalter/jedi")
11173 (synopsis "Autocompletion and static analysis library for Python")
11174 (description
11175 "Jedi is a static analysis tool for Python that can be used in Integrated
11176Development Environments (@dfn{IDE}s) and text editors. It understands Python
11177on a deeper level than many other static analysis frameworks for Python.
11178
11179Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
11180well.")
11181 (license license:expat)))
11182
11183(define-public python2-jedi
296e1aea 11184 (package-with-python2 python-jedi))
44d10b1f
RW
11185
11186(define-public ptpython
11187 (package
11188 (name "ptpython")
11189 (version "0.34")
11190 (source (origin
11191 (method url-fetch)
11192 (uri (pypi-uri "ptpython" version))
11193 (sha256
11194 (base32
11195 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
11196 (build-system python-build-system)
11197 (arguments
11198 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
11199 (propagated-inputs
11200 `(("python-docopt" ,python-docopt)
11201 ("python-jedi" ,python-jedi)
11202 ("python-prompt-toolkit" ,python-prompt-toolkit)
11203 ("python-pygments" ,python-pygments)))
11204 (home-page "https://github.com/jonathanslenders/ptpython")
11205 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
11206 (description
11207 "ptpython is a Python read-eval-print loop with IDE-like features.
11208It supports syntax highlighting, multiline editing, autocompletion, mouse,
11209color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
11210etc.")
11211 (license license:bsd-3)
11212 (properties `((python2-variant . ,(delay ptpython-2))))))
11213
11214(define-public ptpython-2
11215 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
11216 (package
11217 (inherit base)
11218 (name "ptpython2"))))
11219
11220(define-public python-stem
11221 (package
11222 (name "python-stem")
e746d1c3 11223 (version "1.7.1")
44d10b1f
RW
11224 (source
11225 (origin
11226 (method url-fetch)
11227 (uri (pypi-uri "stem" version))
11228 (sha256
11229 (base32
e746d1c3 11230 "18lc95pmc7i089nlsb06dsxyjl5wbhxfqgdxbjcia35ndh8z7sn9"))))
44d10b1f
RW
11231 (build-system python-build-system)
11232 (arguments
11233 `(#:phases
11234 (modify-phases %standard-phases
11235 (replace 'check
11236 (lambda _
11237 (invoke "./run_tests.py" "--unit")
11238 #t)))))
11239 (native-inputs
11240 `(("python-mock" ,python-mock)
11241 ("python-pycodestyle" ,python-pycodestyle)
11242 ("python-pyflakes" ,python-pyflakes)))
11243 (home-page "https://stem.torproject.org/")
11244 (synopsis
11245 "Python controller library that allows applications to interact with Tor")
11246 (description
11247 "Stem is a Python controller library for Tor. With it you can use Tor's
11248control protocol to script against the Tor process and read descriptor data
11249relays publish about themselves.")
11250 (license license:lgpl3)))
11251
11252(define-public python2-stem
11253 (package-with-python2 python-stem))
11254
11255(define-public python-pyserial
11256 (package
11257 (name "python-pyserial")
00d81f98 11258 (version "3.4")
44d10b1f
RW
11259 (source
11260 (origin
11261 (method url-fetch)
11262 (uri (pypi-uri "pyserial" version))
11263 (sha256
11264 (base32
00d81f98 11265 "09y68bczw324a4jb9a1cfwrbjhq179vnfkkkrybbksp0vqgl0bbf"))))
44d10b1f
RW
11266 (build-system python-build-system)
11267 (arguments
11268 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
11269 ;; #:phases
11270 ;; (modify-phases %standard-phases
11271 ;; (replace 'check
11272 ;; (lambda _
11273 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
11274 (home-page
11275 "https://github.com/pyserial/pyserial")
11276 (synopsis "Python Serial Port Bindings")
11277 (description "@code{pyserial} provide serial port bindings for Python. It
11278supports different byte sizes, stop bits, parity and flow control with RTS/CTS
11279and/or Xon/Xoff. The port is accessed in RAW mode.")
11280 (license license:bsd-3)))
11281
11282(define-public python2-pyserial
11283 (package-with-python2 python-pyserial))
11284
11285(define-public python-kivy
11286 (package
11287 (name "python-kivy")
11288 (version "1.10.1")
11289 (source
11290 (origin
11291 (method url-fetch)
11292 (uri (pypi-uri "Kivy" version))
11293 (file-name (string-append name "-" version ".tar.gz"))
11294 (sha256
11295 (base32
11296 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
11297 (build-system python-build-system)
11298 (arguments
11299 `(#:tests? #f ; Tests require many optional packages
11300 #:phases
11301 (modify-phases %standard-phases
11302 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
11303 (lambda* (#:key inputs #:allow-other-keys)
11304 (setenv "KIVY_SDL2_PATH"
11305 (string-append (assoc-ref inputs "sdl-union")
11306 "/include/SDL2"))
11307 #t)))))
11308 (native-inputs
11309 `(("git" ,git)
11310 ("pkg-config" ,pkg-config)
11311 ("python-cython" ,python-cython)))
11312 (inputs
11313 `(("gstreamer" ,gstreamer)
11314 ("mesa" ,mesa)
11315 ("sdl-union"
11316 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
11317 (home-page "http://kivy.org")
11318 (synopsis
11319 "Multitouch application framework")
11320 (description
11321 "A software library for rapid development of
11322hardware-accelerated multitouch applications.")
11323 (license license:expat)))
11324
11325(define-public python2-kivy
11326 (package-with-python2 python-kivy))
11327
11328(define-public python-kivy-next
11329 (deprecated-package "python-kivy-next" python-kivy))
11330
11331(define-public python2-kivy-next
11332 (deprecated-package "python2-kivy-next" python2-kivy))
11333
11334(define-public python-binaryornot
11335 (package
11336 (name "python-binaryornot")
11337 (version "0.4.4")
11338 (source (origin
11339 (method url-fetch)
11340 (uri (pypi-uri "binaryornot" version))
11341 (sha256
11342 (base32
11343 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
11344 (build-system python-build-system)
86723f98
DM
11345 (arguments
11346 `(#:phases
11347 (modify-phases %standard-phases
ee623903 11348 (add-after 'unpack 'patch-tests
86723f98
DM
11349 (lambda _
11350 ;; TypeError: binary() got an unexpected keyword argument
11351 ;; 'average_size'.
11352 (substitute* "tests/test_check.py"
11353 (("average_size=512") ""))
11354 #t)))))
44d10b1f
RW
11355 (propagated-inputs
11356 `(("python-chardet" ,python-chardet)
11357 ("python-hypothesis" ,python-hypothesis)))
11358 (home-page "https://github.com/audreyr/binaryornot")
11359 (synopsis "Package to check if a file is binary or text")
11360 (description "Ultra-lightweight pure Python package to check if a file is
11361binary or text.")
11362 (license license:bsd-3)
11363 (properties `((python2-variant . ,(delay python2-binaryornot))))))
11364
11365(define-public python2-binaryornot
11366 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
11367 (package (inherit base)
11368 (propagated-inputs
11369 `(("python2-enum34" ,python2-enum34)
11370 ,@(package-propagated-inputs base))))))
11371
f315673d 11372(define-public python-binwalk
9b9ab657
JK
11373 (package
11374 (name "python-binwalk")
11375 (version "2.2.0")
11376 (source
11377 (origin
11378 (method git-fetch)
11379 (uri (git-reference
11380 (url "https://github.com/ReFirmLabs/binwalk")
11381 (commit (string-append "v" version))))
11382 (file-name (git-file-name name version))
11383 (sha256
11384 (base32
11385 "1bxgj569fzwv6jhcbl864nmlsi9x1k1r20aywjxc8b9b1zgqrlvc"))))
11386 (build-system python-build-system)
11387 (arguments
11388 `(#:phases
11389 (modify-phases %standard-phases
11390 (add-before 'check 'set-pythonpath
11391 (lambda _
11392 (setenv "PYTHONPATH"
11393 (string-append
11394 (getcwd) "/src/"
11395 ":" (getenv "PYTHONPATH")))
11396 (setenv "HOME" "")
11397 #t)))))
11398 (native-inputs
11399 `(("python-coverage" ,python-coverage)
11400 ("python-nose" ,python-nose)))
11401 (home-page "https://github.com/ReFirmLabs/binwalk")
11402 (synopsis "Firmware analysis tool")
11403 (description "Binwalk is a tool for analyzing, reverse engineering, and
11404extracting firmware images")
11405 (license license:expat)))
f315673d 11406
44d10b1f
RW
11407(define-public python-nltk
11408 (package
11409 (name "python-nltk")
11410 (version "3.2.1")
11411 (source (origin
11412 (method url-fetch)
11413 (uri (pypi-uri "nltk" version))
11414 (sha256
11415 (base32
11416 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
11417 (build-system python-build-system)
11418 (arguments
11419 '(;; The tests require some extra resources to be downloaded.
11420 ;; TODO Try packaging these resources.
11421 #:tests? #f))
11422 (home-page "http://nltk.org/")
11423 (synopsis "Natural Language Toolkit")
11424 (description "It provides interfaces to over 50 corpora and lexical
11425resources such as WordNet, along with a suite of text processing libraries
11426for classification, tokenization, stemming, tagging, parsing, and semantic
11427reasoning, wrappers for natural language processing libraries.")
11428 (license license:asl2.0)))
11429
11430(define-public python2-nltk
11431 (package-with-python2 python-nltk))
11432
11433(define-public python-pymongo
11434 (package
11435 (name "python-pymongo")
11436 (version "3.7.2")
11437 (source (origin
11438 (method url-fetch)
11439 (uri (pypi-uri "pymongo" version))
11440 (sha256
11441 (base32
11442 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
11443 (build-system python-build-system)
11444 (propagated-inputs
11445 `(("python-certifi" ,python-certifi)))
11446 (home-page "https://github.com/mongodb/mongo-python-driver")
11447 (synopsis "Python driver for MongoDB")
11448 (description "Python driver for MongoDB.")
11449 (license license:asl2.0)))
11450
11451(define-public python2-pymongo
11452 (package-with-python2 python-pymongo))
11453
44d10b1f
RW
11454(define-public python-consul
11455 (package
11456 (name "python-consul")
11457 (version "0.6.1")
11458 (source
11459 (origin
11460 (method url-fetch)
11461 (uri (pypi-uri "python-consul" version))
11462 (sha256
11463 (base32
11464 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
11465 (build-system python-build-system)
11466 (arguments
11467 '(#:tests? #f)) ; The tests are not distributed
11468 (propagated-inputs
11469 `(("python-requests" ,python-requests)
11470 ("python-six" ,python-six)))
11471 (home-page "https://github.com/cablehead/python-consul")
11472 (synopsis "Python client for Consul")
11473 (description
11474 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
11475discovery, monitoring and configuration.")
11476 (license license:expat)))
11477
11478(define-public python2-consul
11479 (package-with-python2 python-consul))
11480
11481(define-public python-schematics
11482 (package
11483 (name "python-schematics")
11484 (version "1.1.1")
11485 (source
1961d187
TGR
11486 (origin
11487 (method git-fetch)
11488 (uri (git-reference
11489 (url "https://github.com/schematics/schematics.git")
11490 (commit (string-append "v" version))))
11491 (file-name (git-file-name name version))
11492 (sha256
11493 (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd"))))
44d10b1f
RW
11494 (build-system python-build-system)
11495 (propagated-inputs
11496 `(("python-six" ,python-six)))
11497 (arguments
1961d187
TGR
11498 ;; The tests require a bunch of not very nice packages with fixed
11499 ;; version requirements (e.g. python-coveralls).
11500 `(#:tests? #f))
44d10b1f
RW
11501 (home-page "https://github.com/schematics/schematics")
11502 (synopsis "Python Data Structures for Humans")
11503 (description "Python Data Structures for Humans.")
11504 (license license:bsd-3)))
11505
11506(define-public python2-schematics
11507 (package-with-python2 python-schematics))
11508
11509(define-public python-odfpy
11510 (package
11511 (name "python-odfpy")
11512 (version "1.3.3")
11513 (source (origin
11514 (method url-fetch)
11515 (uri (pypi-uri "odfpy" version))
11516 (sha256
11517 (base32
11518 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
11519 (arguments
11520 `(#:modules ((srfi srfi-1)
11521 (guix build python-build-system)
11522 (guix build utils))
11523 #:phases
11524 (modify-phases %standard-phases
11525 (replace 'check
11526 ;; The test runner invokes python2 and python3 for test*.py.
11527 ;; To avoid having both in inputs, we replicate it here.
11528 (lambda _
21ccc01d
RW
11529 (for-each (lambda (test-file) (invoke "python" test-file))
11530 (find-files "tests" "^test.*\\.py$"))
11531 #t)))))
44d10b1f
RW
11532 (build-system python-build-system)
11533 (home-page "https://github.com/eea/odfpy")
11534 (synopsis "Python API and tools to manipulate OpenDocument files")
11535 (description "Collection of libraries and utility programs written in
11536Python to manipulate OpenDocument 1.2 files.")
11537 (license
11538 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
11539 ;; number of files with other licenses.
11540 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
11541
11542(define-public python2-odfpy
11543 (package-with-python2 python-odfpy))
11544
11545(define-public python-natsort
11546 (package
11547 (name "python-natsort")
11548 (version "5.4.1")
11549 (source (origin
11550 (method url-fetch)
11551 (uri (pypi-uri "natsort" version))
11552 (sha256
11553 (base32
11554 "0i732amg6yzkx4g4c9j09jmqq39q377x9cl2nbkm5hax2c2v0wxf"))))
11555 (build-system python-build-system)
11556 (arguments
11557 `(#:modules ((guix build utils)
11558 (guix build python-build-system)
11559 (srfi srfi-1)
11560 (srfi srfi-26)
11561 (ice-9 ftw))
11562 #:phases
11563 (modify-phases %standard-phases
11564 (add-before 'check 'set-cachedir
11565 ;; Tests require write access to $HOME by default
11566 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
11567 (replace 'check
11568 (lambda _
11569 (let ((cwd (getcwd)))
11570 (setenv "PYTHONPATH"
11571 (string-append
11572 cwd "/build/"
11573 (find (cut string-prefix? "lib" <>)
11574 (scandir (string-append cwd "/build")))
11575 ":"
11576 (getenv "PYTHONPATH")))
11577 (invoke "pytest" "-v")))))))
11578 (native-inputs
11579 `(("python-hypothesis" ,python-hypothesis)
11580 ("python-pytest-cov" ,python-pytest-cov)
11581 ("python-pytest-mock" ,python-pytest-mock)
11582 ("python-pytest" ,python-pytest)))
11583 (propagated-inputs ; TODO: Add python-fastnumbers.
11584 `(("python-pyicu" ,python-pyicu)))
11585 (home-page "https://github.com/SethMMorton/natsort")
11586 (synopsis "Natural sorting for python and shell")
11587 (description
11588 "Natsort lets you apply natural sorting on lists instead of
11589lexicographical. If you use the built-in @code{sorted} method in python
36a4366d
EF
11590on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4},
11591@code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20},
11592@code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that
11593identifies numbers and sorts them separately from strings. It can also sort
11594version numbers, real numbers, mixed types and more, and comes with a shell
11595command @command{natsort} that exposes this functionality in the command line.")
44d10b1f
RW
11596 (license license:expat)
11597 (properties `((python2-variant . ,(delay python2-natsort))))))
11598
11599(define-public python2-natsort
11600 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
11601 (package (inherit base)
11602 (native-inputs
11603 `(("python2-pathlib" ,python2-pathlib)
11604 ,@(package-native-inputs base))))))
11605
11606(define-public python-glances
11607 (package
11608 (name "python-glances")
a4ac25df 11609 (version "3.1.2")
44d10b1f
RW
11610 (source
11611 (origin
11612 (method url-fetch)
11613 (uri (pypi-uri "Glances" version))
11614 (sha256
a4ac25df 11615 (base32 "15384pbvw9wj4sb8zgvd9v1812vrypbyjg0acicjf1hdb3p30fkk"))
15b4c911
TGR
11616 (modules '((guix build utils)))
11617 (snippet
11618 '(begin
11619 ;; Glances phones PyPI for weekly update checks by default.
11620 ;; Disable these. The user can re-enable them if desired.
11621 (substitute* "glances/outdated.py"
11622 (("^(.*)self\\.load_config\\(config\\)\n" line indentation)
11623 (string-append indentation
11624 "self.args.disable_check_update = True\n"
11625 line)))
11626 #t))))
44d10b1f
RW
11627 (build-system python-build-system)
11628 (propagated-inputs
9898a2d3
TGR
11629 `(("python-future" ,python-future)
11630 ("python-psutil" ,python-psutil)))
a4ac25df 11631 (home-page "https://github.com/nicolargo/glances")
bab94ffa 11632 (synopsis "Cross-platform curses-based monitoring tool")
44d10b1f
RW
11633 (description
11634 "Glances is a curses-based monitoring tool for a wide variety of platforms.
bab94ffa
TGR
11635Glances uses the PsUtil library to get information from your system. It
11636monitors CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
44d10b1f
RW
11637 (license license:lgpl3+)))
11638
11639(define-public python2-glances
11640 (package-with-python2 python-glances))
11641
11642(define-public python-graphql-core
11643 (package
11644 (name "python-graphql-core")
11645 (version "0.5.3")
11646 (source
11647 (origin
11648 (method url-fetch)
11649 (uri (pypi-uri "graphql-core" version))
11650 (sha256
11651 (base32
11652 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
11653 (build-system python-build-system)
11654 (arguments
11655 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
11656 #:phases
11657 (modify-phases %standard-phases
11658 (add-after 'unpack 'patch-hardcoded-version
11659 (lambda _ (substitute*
11660 "setup.py"
11661 (("'gevent==1.1rc1'") "'gevent'"))
11662 #t)))))
11663 (native-inputs
11664 `(("python-gevent" ,python-gevent)
11665 ("python-mock" ,python-mock)
11666 ("python-pytest-mock" ,python-pytest-mock)))
11667 (propagated-inputs
11668 `(("python-promise" ,python-promise)
11669 ("python-six" ,python-six)))
11670 (home-page "https://github.com/graphql-python/graphql-core")
11671 (synopsis "GraphQL implementation for Python")
11672 (description
11673 "GraphQL implementation for Python. GraphQL is a data query language and
11674runtime designed and used to request and deliver data to mobile and web apps.
11675This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
11676to Python.")
11677 (license license:expat)))
11678
11679(define-public python2-graphql-core
11680 (package-with-python2 python-graphql-core))
11681
11682(define-public python-graphql-relay
11683 (package
11684 (name "python-graphql-relay")
11685 (version "0.4.5")
11686 (source
11687 (origin
11688 (method url-fetch)
11689 (uri (pypi-uri "graphql-relay" version))
11690 (sha256
11691 (base32
11692 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
11693 (build-system python-build-system)
11694 (arguments
11695 '(#:tests? #f)) ; The tests are not distributed
11696 (propagated-inputs
11697 `(("python-graphql-core" ,python-graphql-core)
11698 ("python-promise" ,python-promise)
11699 ("python-six" ,python-six)))
11700 (home-page "https://github.com/graphql-python/graphql-relay-py")
11701 (synopsis "Relay implementation for Python")
11702 (description
11703 "This is a library to allow the easy creation of Relay-compliant servers
11704using the GraphQL Python reference implementation of a GraphQL server. It
11705should be noted that the code is a exact port of the original
11706@url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
11707from Facebook.")
11708 (license license:expat)))
11709
11710(define-public python2-graphql-relay
11711 (package-with-python2 python-graphql-relay))
11712
11713(define-public python-graphene
11714 (package
11715 (name "python-graphene")
11716 (version "0.10.2")
11717 (source
11718 (origin
11719 (method url-fetch)
11720 (uri (pypi-uri "graphene" version))
11721 (sha256
11722 (base32
11723 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
11724 (build-system python-build-system)
11725 (propagated-inputs
11726 `(("python-graphql-core" ,python-graphql-core)
11727 ("python-graphql-relay" ,python-graphql-relay)
11728 ("python-iso8601" ,python-iso8601)
11729 ("python-promise" ,python-promise)
11730 ("python-six" ,python-six)))
11731 (arguments
11732 `(#:tests? #f)) ; no tests/ in the PyPI tarball
3dd74c8d 11733 (home-page "https://graphene-python.org/")
44d10b1f
RW
11734 (synopsis "GraphQL Framework for Python")
11735 (description
11736 "Graphene is a Python library for building GraphQL schemas/types.
11737A GraphQL schema describes your data model, and provides a GraphQL server
11738with an associated set of resolve methods that know how to fetch data.")
11739 (properties `((python2-variant . ,(delay python2-graphene))))
11740 (license license:expat)))
11741
11742(define-public python2-graphene
11743 (let ((base (package-with-python2
11744 (strip-python2-variant python-graphene))))
11745 (package (inherit base)
11746 (native-inputs
11747 `(("python2-sqlalchemy" ,python2-sqlalchemy)
11748 ,@(package-native-inputs base))))))
11749
11750(define-public python-nautilus
11751 (package
11752 (name "python-nautilus")
11753 (version "0.4.9")
11754 (source
11755 (origin
11756 (method url-fetch)
11757 (uri (pypi-uri "nautilus" version))
11758 (sha256
11759 (base32
11760 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
11761 (build-system python-build-system)
11762 (arguments `(#:tests? #f)) ; fails to import test modules
11763 (propagated-inputs
11764 `(("python-bcrypt" ,python-bcrypt)
11765 ("python-click" ,python-click)
11766 ("python-consul" ,python-consul)
11767 ("python-graphene" ,python-graphene)
11768 ("python-jinja2" ,python-jinja2)
11769 ("python-peewee" ,python-peewee)
11770 ("python-pika" ,python-pika)
11771 ("python-tornado" ,python-tornado)
11772 ("python-wtforms" ,python-wtforms)))
11773 (native-inputs
11774 `(("python-nose2" ,python-nose2)))
11775 (home-page "https://github.com/AlecAivazis/nautilus")
11776 (synopsis "Library for creating microservice applications")
11777 (description
11778 "Nautilus is a framework for flux based microservices that looks to
11779provide extendible implementations of common aspects of a cloud so that you can
11780focus on building massively scalable web applications.")
11781 (license license:expat)))
11782
11783(define-public python-snowballstemmer
11784 (package
11785 (name "python-snowballstemmer")
11786 (version "1.2.1")
11787 (source (origin
11788 (method url-fetch)
11789 (uri (pypi-uri "snowballstemmer" version))
11790 (sha256
11791 (base32
11792 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
11793 (build-system python-build-system)
11794 (arguments
11795 `(;; No tests exist
11796 #:tests? #f))
11797 (home-page "https://github.com/shibukawa/snowball_py")
11798 (synopsis "Snowball stemming library collection for Python")
11799 (description "This package provides 16 word stemmer algorithms generated
11800from Snowball algorithms. It includes the 15 original ones plus the Poerter
11801English stemmer.")
11802 (license license:bsd-3)))
11803
11804(define-public python2-snowballstemmer
11805 (package-with-python2 python-snowballstemmer))
11806
44d10b1f
RW
11807(define-public python-setproctitle
11808(package
11809 (name "python-setproctitle")
11810 (version "1.1.10")
11811 (source
11812 (origin
11813 (method url-fetch)
11814 (uri (pypi-uri "setproctitle" version))
11815 (sha256
11816 (base32
11817 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
11818 (build-system python-build-system)
11819 (arguments
11820 '(#:phases
11821 (modify-phases %standard-phases
11822 (add-before 'check 'patch-Makefile
11823 ;; Stricly this is only required for the python2 variant.
11824 ;; But adding a phase in an inherited package seems to be
11825 ;; cumbersum. So we patch even for python3.
11826 (lambda _
11827 (let ((nose (assoc-ref %build-inputs "python2-nose")))
11828 (when nose
11829 (substitute* "Makefile"
11830 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
11831 (string-append nose "/bin/nosetests "))))
11832 #t)))
11833 (replace 'check
11834 (lambda _
11835 (setenv "PYTHON" (or (which "python3") (which "python")))
11836 (setenv "PYCONFIG" (or (which "python3-config")
11837 (which "python-config")))
11838 (setenv "CC" "gcc")
11839 ;; No need to extend PYTHONPATH to find the built package, since
11840 ;; the Makefile will build anyway
11841 (invoke "make" "check"))))))
11842 (native-inputs
11843 `(("procps" ,procps))) ; required for tests
11844 (home-page
11845 "https://github.com/dvarrazzo/py-setproctitle")
11846 (synopsis
11847 "Setproctitle implementation for Python to customize the process title")
11848 (description "The library allows a process to change its title (as displayed
11849by system tools such as ps and top).
11850
11851Changing the title is mostly useful in multi-process systems, for
11852example when a master process is forked: changing the children's title
11853allows to identify the task each process is busy with. The technique
11854is used by PostgreSQL and the OpenSSH Server for example.")
11855 (license license:bsd-3)
11856 (properties `((python2-variant . ,(delay python2-setproctitle))))))
11857
11858(define-public python2-setproctitle
11859 (let ((base (package-with-python2
11860 (strip-python2-variant python-setproctitle))))
11861 (package
11862 (inherit base)
11863 (native-inputs `(("python2-nose" ,python2-nose)
11864 ,@(package-native-inputs base))))))
11865
11866(define-public python-validictory
11867 (package
11868 (name "python-validictory")
11869 (version "1.0.1")
11870 (source
11871 (origin
11872 (method url-fetch)
11873 (uri (pypi-uri "validictory" version))
11874 (sha256
11875 (base32
11876 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
11877 (build-system python-build-system)
11878 (arguments
11879 '(#:phases
11880 (modify-phases %standard-phases
11881 (add-after 'unpack 'bootstrap
11882 ;; Move the tests out of the package directory to avoid
11883 ;; packaging them.
11884 (lambda* _
11885 (rename-file "validictory/tests" "tests")
11886 (delete-file "tests/__init__.py")))
11887 (replace 'check
11888 (lambda _
11889 ;; Extend PYTHONPATH so the built package will be found.
11890 (setenv "PYTHONPATH"
11891 (string-append (getcwd) "/build/lib:"
11892 (getenv "PYTHONPATH")))
6568bd5d 11893 (invoke "py.test" "-vv" ))))))
44d10b1f
RW
11894 (native-inputs
11895 `(("python-pytest" ,python-pytest)))
11896 (home-page
11897 "https://github.com/jamesturk/validictory")
11898 (synopsis "General purpose Python data validator")
11899 (description "It allows validation of arbitrary Python data structures.
11900
11901The schema format is based on the JSON Schema
11902proposal (http://json-schema.org), so combined with json the library is also
11903useful as a validator for JSON data.")
11904 (license license:expat)))
11905
11906(define-public python2-validictory
11907 (package-with-python2 python-validictory))
11908
11909(define-public python-pyelftools
11910 (package
11911 (name "python-pyelftools")
11912 (version "0.25")
11913 (source
11914 (origin
11915 (method url-fetch)
11916 (uri (pypi-uri "pyelftools" version))
11917 (sha256
11918 (base32
11919 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
11920 (build-system python-build-system)
11921 (arguments
11922 `(#:phases
11923 (modify-phases %standard-phases
11924 (add-before 'check 'set-pythonpath
11925 (lambda _
11926 (setenv "PYTHONPATH"
11927 (string-append
11928 (getcwd) "/test/"
11929 ":" (getenv "PYTHONPATH")))
11930 #t)))))
11931 (home-page
11932 "https://github.com/eliben/pyelftools")
11933 (synopsis
11934 "Analyze binary and library file information")
11935 (description "This Python library provides interfaces for parsing and
11936analyzing two binary and library file formats; the Executable and Linking
11937Format (ELF), and debugging information in the Debugging With Attributed
11938Record Format (DWARF).")
11939 (license license:public-domain)))
11940
11941(define-public python-pyev
11942 (package
11943 (name "python-pyev")
11944 (version "0.9.0")
11945 (source
11946 (origin
11947 (method url-fetch)
11948 (uri (pypi-uri "pyev" version))
11949 (sha256
11950 (base32
11951 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
11952 (build-system python-build-system)
11953 (arguments
11954 `(#:tests? #f ; no test suite
11955 #:phases
11956 (modify-phases %standard-phases
11957 (add-after 'unpack 'patch
11958 (lambda* (#:key inputs #:allow-other-keys)
11959 (let ((libev (string-append (assoc-ref inputs "libev")
11960 "/lib/libev.so.4")))
11961 (substitute* "setup.py"
11962 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
11963 (string-append "libev_dll_name = \"" libev "\"")))))))))
11964 (inputs
11965 `(("libev" ,libev)))
11966 (home-page "http://pythonhosted.org/pyev/")
11967 (synopsis "Python libev interface")
11968 (description "Pyev provides a Python interface to libev.")
11969 (license license:gpl3)))
11970
11971(define-public python2-pyev
11972 (package-with-python2 python-pyev))
11973
11974(define-public python-imagesize
11975 (package
11976 (name "python-imagesize")
11977 (version "1.1.0")
11978 (source
11979 (origin
11980 (method url-fetch)
11981 (uri (pypi-uri "imagesize" version))
11982 (sha256
11983 (base32
11984 "1dg3wn7qpwmhgqc0r9na2ding1wif9q5spz3j9zn2riwphc2k0zk"))))
11985 (build-system python-build-system)
11986 (home-page "https://github.com/shibukawa/imagesize_py")
11987 (synopsis "Gets image size of files in various formats in Python")
11988 (description
11989 "This package allows determination of image size from
11990PNG, JPEG, JPEG2000 and GIF files in pure Python.")
11991 (license license:expat)))
11992
11993(define-public python2-imagesize
11994 (package-with-python2 python-imagesize))
11995
11996(define-public python-termstyle
11997 (package
11998 (name "python-termstyle")
11999 (version "0.1.11")
12000 (source
12001 (origin
12002 (method url-fetch)
12003 (uri (pypi-uri "termstyle" version))
12004 (sha256
12005 (base32
12006 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
12007 (build-system python-build-system)
12008 (arguments
12009 '(#:phases
12010 (modify-phases %standard-phases
12011 (replace 'check
12012 (lambda _
831080a6 12013 (invoke "python" "test3.py"))))))
44d10b1f
RW
12014 (home-page "https://github.com/gfxmonk/termstyle")
12015 (synopsis "Console text coloring for Python")
12016 (description "This package provides console text coloring for Python.")
12017 (license license:bsd-3)))
12018
12019(define-public python-argcomplete
12020 (package
12021 (name "python-argcomplete")
98aecd3a 12022 (version "1.10.3")
44d10b1f 12023 (source
98aecd3a
RW
12024 (origin
12025 (method url-fetch)
12026 (uri (pypi-uri "argcomplete" version))
12027 (sha256
12028 (base32
12029 "02jkc44drb0yjz6x28lvg6rj607n8r2irdpdvyylm8xnycn54zx3"))))
44d10b1f 12030 (build-system python-build-system)
98aecd3a
RW
12031 (arguments
12032 `(#:phases
12033 (modify-phases %standard-phases
12034 (add-after 'unpack 'embed-tool-references
12035 (lambda _
12036 (substitute* "argcomplete/bash_completion.d/python-argcomplete.sh"
12037 ((" grep")
12038 (string-append " " (which "grep")))
12039 ((" egrep")
12040 (string-append " " (which "egrep")))
12041 (("elif which")
12042 (string-append "elif " (which "which")))
12043 (("\\$\\(which")
12044 (string-append "$(" (which "which"))))
12045 #t)))))
12046 (inputs
12047 `(("grep" ,grep)
12048 ("which" ,which)))
44d10b1f 12049 (native-inputs
98aecd3a
RW
12050 `(("python-coverage" ,python-coverage)
12051 ("python-flake8" ,python-flake8)
12052 ("python-pexpect" ,python-pexpect)
12053 ("python-wheel" ,python-wheel)
44d10b1f 12054 ("tcsh" ,tcsh)
98aecd3a
RW
12055 ("fish" ,fish)
12056 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
44d10b1f
RW
12057 (home-page "https://github.com/kislyuk/argcomplete")
12058 (synopsis "Shell tab completion for Python argparse")
12059 (description "argcomplete provides extensible command line tab completion
12060of arguments and options for Python scripts using @code{argparse}. It's
12061particularly useful for programs with many options or sub-parsers that can
12062dynamically suggest completions; for example, when browsing resources over the
12063network.")
12064 (license license:asl2.0)))
12065
12066(define-public python2-argcomplete
12067 (package-with-python2 python-argcomplete))
12068
12069(define-public python-xopen
12070 (package
12071 (name "python-xopen")
24d64989 12072 (version "0.5.0")
44d10b1f
RW
12073 (source
12074 (origin
12075 (method url-fetch)
12076 (uri (pypi-uri "xopen" version))
12077 (sha256
12078 (base32
24d64989 12079 "17xbrgi23l87yg6h0qcknssp2q812miiy33qw6v45v5gx0jwv5xh"))))
44d10b1f 12080 (build-system python-build-system)
24d64989
RW
12081 (propagated-inputs
12082 `(("python-setuptools-scm" ,python-setuptools-scm)))
44d10b1f
RW
12083 (home-page "https://github.com/marcelm/xopen/")
12084 (synopsis "Open compressed files transparently")
12085 (description "This module provides an @code{xopen} function that works like
12086Python's built-in @code{open} function, but can also deal with compressed files.
12087Supported compression formats are gzip, bzip2 and, xz, and are automatically
12088recognized by their file extensions. The focus is on being as efficient as
12089possible on all supported Python versions.")
12090 (license license:expat)))
12091
12092(define-public python2-xopen
12093 (let ((base (package-with-python2
12094 (strip-python2-variant python-xopen))))
12095 (package
12096 (inherit base)
12097 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
12098 ,@(package-propagated-inputs base))))))
12099
12100(define-public python-cheetah
12101 (package
12102 (name "python-cheetah")
12103 (version "3.1.0")
12104 (source
12105 (origin
12106 (method url-fetch)
12107 (uri (pypi-uri "Cheetah3" version))
12108 (sha256
12109 (base32
12110 "1ihag9cxll6b86fc8v5lkhmr3brdbi4yiz16zpgw79yylmv8fgr9"))))
12111 (build-system python-build-system)
12112 (arguments
12113 `(#:modules ((guix build utils)
12114 (guix build python-build-system)
12115 (ice-9 ftw)
12116 (srfi srfi-1)
12117 (srfi srfi-26))
12118 #:phases (modify-phases %standard-phases
12119 (add-after 'unpack 'use-absolute-python
12120 (lambda _
12121 (substitute* "Cheetah/CheetahWrapper.py"
12122 (("#!/usr/bin/env python")
12123 (string-append "#!" (which "python"))))
12124 #t))
12125 (replace 'check
12126 (lambda _
12127 (let ((cwd (getcwd)))
12128 (setenv "PYTHONPATH"
12129 (string-append
12130 cwd "/build/"
12131 (find (cut string-prefix? "lib" <>)
12132 (scandir (string-append cwd "/build")))
12133 ":" (getenv "PYTHONPATH")))
12134 (setenv "PATH"
12135 (string-append (getenv "PATH")
12136 ":" cwd "/bin"))
12137 (setenv "TMPDIR" "/tmp")
12138
12139 (substitute* "Cheetah/Tests/Test.py"
12140 (("unittest.TextTestRunner\\(\\)")
12141 "unittest.TextTestRunner(verbosity=2)"))
12142
12143 (invoke "python" "Cheetah/Tests/Test.py")))))))
12144 (propagated-inputs
12145 `(("python-markdown" ,python-markdown))) ;optional
12146 (home-page "http://cheetahtemplate.org/")
12147 (synopsis "Template engine")
12148 (description "Cheetah is a text-based template engine and Python code
12149generator.
12150
12151Cheetah can be used as a standalone templating utility or referenced as
12152a library from other Python applications. It has many potential uses,
12153but web developers looking for a viable alternative to ASP, JSP, PHP and
12154PSP are expected to be its principle user group.
12155
12156Features:
12157@enumerate
12158@item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
12159 text-based format.
12160@item Cleanly separates content, graphic design, and program code.
12161@item Blends the power and flexibility of Python with a simple template language
12162 that non-programmers can understand.
12163@item Gives template writers full access to any Python data structure, module,
12164 function, object, or method in their templates.
12165@item Makes code reuse easy by providing an object-orientated interface to
12166 templates that is accessible from Python code or other Cheetah templates.
12167 One template can subclass another and selectively reimplement sections of it.
12168@item Provides a simple, yet powerful, caching mechanism that can dramatically
12169 improve the performance of a dynamic website.
12170@item Compiles templates into optimized, yet readable, Python code.
12171@end enumerate")
12172 (license (license:x11-style "file://LICENSE"))))
12173
12174(define-public python2-cheetah
12175 (package-with-python2 python-cheetah))
12176
12177(define-public python-dulwich
12178 (package
12179 (name "python-dulwich")
12180 (version "0.18.6")
12181 (source
12182 (origin
12183 (method url-fetch)
12184 (uri (list (string-append "https://www.dulwich.io/releases/"
12185 "dulwich-" version ".tar.gz")
12186 (pypi-uri "dulwich" version)))
12187 (sha256
12188 (base32
12189 "1aa1xfrxkc3j9s4xi0llhf5gndyi9ryprcxsqfa5fcb8ph34981q"))))
12190 (build-system python-build-system)
12191 (arguments
12192 `(#:phases
12193 (modify-phases %standard-phases
12194 (add-before 'check 'fix-tests
12195 (lambda* (#:key inputs #:allow-other-keys)
12196 ;; The tests use Popen with a custom environment which doesn't
12197 ;; include PATH.
12198 (substitute* "dulwich/tests/compat/utils.py"
12199 (("'git'") (string-append "'"
12200 (which "git")
12201 "'")))
12202 (substitute* '("dulwich/tests/test_repository.py"
12203 "dulwich/tests/test_hooks.py")
12204 (("#!/bin/sh") (string-append "#!" (which "sh"))))
12205 (setenv "TEST_RUNNER" "unittest")
12206 (setenv "PYTHONHASHSEED" "random")
12207 #t)))))
12208 (propagated-inputs
12209 `(("python-fastimport" ,python-fastimport)))
12210 (native-inputs
12211 `(("python-mock" ,python-mock)
12212 ("python-geventhttpclient" ,python-geventhttpclient)
12213 ("git" ,git)))
12214 (home-page "https://www.dulwich.io/")
12215 (synopsis "Git implementation in Python")
12216 (description "Dulwich is an implementation of the Git file formats and
12217protocols written in pure Python.")
12218 ;; Can be used with either license.
12219 (license (list license:asl2.0 license:gpl2+))))
12220
12221(define-public python2-dulwich
12222 (package-with-python2 python-dulwich))
12223
12224(define-public python-pbkdf2
12225 (package
12226 (name "python-pbkdf2")
12227 (version "1.3")
12228 (source
12229 (origin
12230 (method url-fetch)
12231 (uri (pypi-uri "pbkdf2" version))
12232 (sha256
12233 (base32
12234 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
12235 (build-system python-build-system)
12236 (arguments
12237 '(#:phases
12238 (modify-phases %standard-phases
12239 (replace 'check
12240 (lambda _
12241 (setenv "PYTHONPATH"
12242 (string-append (getcwd) "/build/lib:"
12243 (getenv "PYTHONPATH")))
ee2bb944 12244 (invoke "python" "test/test_pbkdf2.py"))))))
44d10b1f
RW
12245 (propagated-inputs
12246 `(("python-pycrypto" ,python-pycrypto))) ; optional
12247 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
12248 (synopsis "Password-based key derivation")
12249 (description "This module implements the password-based key derivation
12250function, PBKDF2, specified in RSA PKCS#5 v2.0.
12251
12252PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
12253is part of the RSA Public Key Cryptography Standards series. The provided
12254implementation takes a password or a passphrase and a salt value (and
12255optionally a iteration count, a digest module, and a MAC module) and provides
12256a file-like object from which an arbitrarly-sized key can be read.")
12257 (license license:expat)))
12258
12259(define-public python2-pbkdf2
12260 (package-with-python2 python-pbkdf2))
12261
12262(define-public python-qrcode
12263 (package
12264 (name "python-qrcode")
217ea1a1 12265 (version "6.1")
44d10b1f
RW
12266 (source
12267 (origin
12268 (method url-fetch)
12269 (uri (pypi-uri "qrcode" version))
12270 (sha256
217ea1a1 12271 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
44d10b1f
RW
12272 (build-system python-build-system)
12273 (arguments
12274 ;; FIXME: Tests require packaging 'pymaging'.
12275 '(#:tests? #f))
12276 (propagated-inputs
12277 `(("python-lxml" ,python-lxml) ; for SVG output
12278 ("python-pillow" ,python-pillow) ; for PNG output
12279 ("python-six" ,python-six)))
44d10b1f
RW
12280 (home-page "https://github.com/lincolnloop/python-qrcode")
12281 (synopsis "QR Code image generator")
12282 (description "This package provides a pure Python QR Code generator
12283module. It uses the Python Imaging Library (PIL) to allow for the generation
12284of QR Codes.
12285
12286In addition this package provides a command line tool to generate QR codes and
12287either write these QR codes to a file or do the output as ascii art at the
12288console.")
12289 (license license:bsd-3)))
12290
12291(define-public python2-qrcode
12292 (package-with-python2 python-qrcode))
12293
12294(define-public python-rst2ansi
12295 (package
12296 (name "python-rst2ansi")
12297 (version "0.1.5")
12298 (source
12299 (origin
12300 (method url-fetch)
12301 (uri (pypi-uri "rst2ansi" version))
12302 (sha256
12303 (base32
12304 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
12305 (build-system python-build-system)
12306 (propagated-inputs
12307 `(("python-docutils" ,python-docutils)))
12308 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
12309 (synopsis "Convert RST to ANSI-decorated console output")
12310 (description
12311 "Python module dedicated to rendering RST (reStructuredText) documents
12312to ansi-escaped strings suitable for display in a terminal.")
12313 (license license:expat)))
12314
12315(define-public python-ansi2html
12316 (package
12317 (name "python-ansi2html")
12318 (version "1.2.0")
12319 (source
12320 (origin
12321 (method url-fetch)
12322 (uri (pypi-uri "ansi2html" version))
12323 (sha256
12324 (base32
12325 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
12326 (build-system python-build-system)
12327 (native-inputs
12328 `(("python-mock" ,python-mock)
12329 ("python-nose" ,python-nose)))
12330 (propagated-inputs
12331 `(("python-six" ,python-six)))
12332 (home-page "https://github.com/ralphbean/ansi2html")
12333 (synopsis "Convert ANSI-decorated console output to HTML")
12334 (description
12335 "@command{ansi2html} is a Python library and command line utility for
12336convering text with ANSI color codes to HTML or LaTeX.")
12337 (license license:gpl3+)))
12338
12339(define-public python2-ansi2html
12340 (package-with-python2 python-ansi2html))
12341
12342(define-public python-ddt
12343 (package
12344 (name "python-ddt")
12345 (version "1.1.3")
12346 (source
12347 (origin
12348 (method url-fetch)
12349 (uri (pypi-uri "ddt" version))
12350 (sha256
12351 (base32
12352 "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk"))))
12353 (build-system python-build-system)
12354 (native-inputs
12355 `(("python-mock" ,python-mock)
12356 ("python-nose" ,python-nose)))
12357 (propagated-inputs
12358 `(("python-six" ,python-six)
12359 ("python-pyyaml" ,python-pyyaml)))
12360 (home-page "https://github.com/txels/ddt")
12361 (synopsis "Data-Driven Tests")
12362 (description
12363 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
12364running it with different test data, and make it appear as multiple test
12365cases.")
12366 (license license:expat)))
12367
12368(define-public python2-ddt
12369 (package-with-python2 python-ddt))
12370
12371(define-public python-pycountry
12372 (package
12373 (name "python-pycountry")
12374 (version "18.5.26")
12375 (source
12376 (origin
12377 (method url-fetch)
12378 (uri (pypi-uri "pycountry" version))
12379 (sha256
12380 (base32
12381 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
12382 (build-system python-build-system)
12383 (home-page "https://bitbucket.org/flyingcircus/pycountry")
12384 (synopsis "ISO databases for languages, countries, currencies, etc.")
12385 (description
12386 "@code{pycountry} provides the ISO databases for the standards:
12387@enumerate
12388@item 639-3 (Languages)
12389@item 3166 (Countries)
12390@item 3166-3 (Deleted Countries)
12391@item 3166-2 (Subdivisions of countries)
12392@item 4217 (Currencies)
12393@item 15924 (Scripts)
12394@end enumerate
12395It includes a copy from Debian’s pkg-isocodes and makes the data accessible
12396through a Python API.")
12397 (license license:lgpl2.1+)))
12398
12399(define-public python2-pycountry
12400 (package-with-python2 python-pycountry))
12401
12402(define-public python-pycosat
12403 (package
12404 (name "python-pycosat")
12405 (version "0.6.1")
12406 (source
12407 (origin
12408 (method url-fetch)
12409 (uri (pypi-uri "pycosat" version))
12410 (sha256
12411 (base32
12412 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
12413 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
12414 (build-system python-build-system)
12415 (home-page "https://github.com/ContinuumIO/pycosat")
12416 (synopsis "Bindings to picosat (a SAT solver)")
12417 (description
12418 "This package provides efficient Python bindings to @code{picosat} on
12419the C level. When importing pycosat, the @code{picosat} solver becomes part
12420of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
12421Problem} (SAT) solver.")
12422 (license license:expat)))
12423
12424(define-public python2-pycosat
12425 (package-with-python2 python-pycosat))
12426
12427(define-public python2-ruamel.ordereddict
12428 (package
12429 (name "python2-ruamel.ordereddict")
12430 (version "0.4.9")
12431 (source
12432 (origin
12433 (method url-fetch)
12434 (uri (pypi-uri "ruamel.ordereddict" version))
12435 (sha256
12436 (base32
12437 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
12438 (build-system python-build-system)
12439 (arguments
12440 `(#:python ,python-2
12441 #:phases
12442 (modify-phases %standard-phases
12443 (delete 'check)
12444 (add-after 'install 'check
12445 (lambda* (#:key inputs outputs #:allow-other-keys)
12446 (add-installed-pythonpath inputs outputs)
f987ac30 12447 (invoke "python" "test/testordereddict.py"))))))
44d10b1f
RW
12448 (home-page "https://bitbucket.org/ruamel/ordereddict")
12449 (synopsis "Version of dict that keeps keys in insertion order")
12450 (description
12451 "This is an implementation of an ordered dictionary with @dfn{Key
12452Insertion Order} (KIO: updates of values do not affect the position of the
12453key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
12454removed and put at the back). The standard library module @code{OrderedDict},
12455implemented later, implements a subset of @code{ordereddict} functionality.
12456Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
12457Order} (KSO, no sorting function can be specified, but a transform can be
12458specified to apply on the key before comparison (e.g. @code{string.lower})).")
12459 (license license:expat)))
12460
12461(define-public python-pypeg2
12462 (package
12463 (name "python-pypeg2")
12464 (version "2.15.2")
12465 (source
12466 (origin
12467 (method url-fetch)
12468 (uri (pypi-uri "pyPEG2" version))
12469 (sha256
12470 (base32
12471 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
12472 (build-system python-build-system)
12473 (propagated-inputs `(("python-lxml" ,python-lxml)))
12474 (arguments
12475 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
12476 '(#:tests? #f))
12477 (home-page "https://fdik.org/pyPEG/")
12478 (synopsis "Parsering Expression Grammars in Python")
12479 (description "PyPEG is an intrinsic parser interpreter framework for
12480Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
12481parse many formal languages.")
12482 (license license:gpl2)))
12483
12484(define-public python-incremental
12485 (package
12486 (name "python-incremental")
12487 (version "17.5.0")
12488 (source
12489 (origin
12490 (method url-fetch)
12491 (uri (pypi-uri "incremental" version))
12492 (sha256
12493 (base32
12494 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
12495 (build-system python-build-system)
12496 (home-page "https://github.com/hawkowl/incremental")
12497 (synopsis "Library for versioning Python projects")
12498 (description "Incremental is a small library that versions your Python
12499projects.")
12500 (license license:expat)))
12501
12502(define-public python2-incremental
12503 (package-with-python2 python-incremental))
12504
12505(define-public python-invoke
12506 (package
12507 (name "python-invoke")
b5544cb4 12508 (home-page "https://www.pyinvoke.org/")
a5662319 12509 (version "1.3.0")
44d10b1f
RW
12510 (source (origin
12511 (method url-fetch)
12512 (uri (pypi-uri "invoke" version))
12513 (sha256
12514 (base32
a5662319 12515 "1nn7gad0rvy492acpyhkrp01zsk86acf34qhsvq4xmm6x39788n5"))))
44d10b1f
RW
12516 (build-system python-build-system)
12517 (arguments
12518 ;; XXX: Requires many dependencies that are not yet in Guix.
12519 `(#:tests? #f))
12520 (synopsis "Pythonic task execution")
12521 (description
12522 "Invoke is a Python task execution tool and library, drawing inspiration
12523from various sources to arrive at a powerful and clean feature set. It is
12524evolved from the Fabric project, but focuses on local and abstract concerns
12525instead of servers and network commands.")
12526 (license license:bsd-3)))
12527
12528(define-public python2-invoke
12529 (package-with-python2 python-invoke))
12530
12531(define-public python-automat
12532 (package
12533 (name "python-automat")
919d80a0 12534 (version "0.7.0")
44d10b1f
RW
12535 (source (origin
12536 (method url-fetch)
12537 (uri (pypi-uri "Automat" version))
12538 (sha256
12539 (base32
919d80a0 12540 "03ivg70n3b1cbcd2zvjhk8y4kmqxcvhmili39lmgx09dza1qpmyb"))))
44d10b1f
RW
12541 (build-system python-build-system)
12542 ;; We disable the tests because they require python-twisted, while
12543 ;; python-twisted depends on python-automat. Twisted is optional, but the
12544 ;; tests fail if it is not available. Also see
12545 ;; <https://github.com/glyph/automat/issues/71>.
12546 (arguments '(#:tests? #f))
12547 (native-inputs
12548 `(("python-m2r" ,python-m2r)
12549 ("python-setuptools-scm" ,python-setuptools-scm)
12550 ("python-graphviz" ,python-graphviz)))
12551 (propagated-inputs
12552 `(("python-six" ,python-six)
12553 ("python-attrs" ,python-attrs)))
12554 (home-page "https://github.com/glyph/Automat")
12555 (synopsis "Self-service finite-state machines")
12556 (description "Automat is a library for concise, idiomatic Python
12557expression of finite-state automata (particularly deterministic finite-state
12558transducers).")
12559 (license license:expat)))
12560
12561(define-public python2-automat
12562 (package-with-python2 python-automat))
12563
12564(define-public python-m2r
12565 (package
12566 (name "python-m2r")
bcfb8fac 12567 (version "0.2.1")
44d10b1f
RW
12568 (source (origin
12569 (method url-fetch)
12570 (uri (pypi-uri "m2r" version))
12571 (sha256
12572 (base32
bcfb8fac 12573 "16gdm8i06jjmlpvckpfmlkr4693dh0vs192vgsqn84fsdkbbm45z"))))
44d10b1f
RW
12574 (build-system python-build-system)
12575 (propagated-inputs
12576 `(("python-docutils" ,python-docutils)
12577 ("python-mistune" ,python-mistune)))
12578 (native-inputs
12579 `(("python-pygments" ,python-pygments)
12580 ("python-mock" ,python-mock)))
12581 (home-page "https://github.com/miyakogi/m2r")
12582 (synopsis "Markdown to reStructuredText converter")
12583 (description "M2R converts a markdown file including reST markups to valid
12584reST format.")
12585 (license license:expat)))
12586
12587(define-public python2-m2r
12588 (package-with-python2 python-m2r))
12589
12590(define-public python-constantly
12591 (package
12592 (name "python-constantly")
12593 (version "15.1.0")
12594 (source (origin
12595 (method url-fetch)
12596 (uri (pypi-uri "constantly" version))
12597 (sha256
12598 (base32
12599 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
12600 (build-system python-build-system)
12601 (home-page "https://github.com/twisted/constantly")
12602 (synopsis "Symbolic constants in Python")
12603 (description "Constantly is a Python library that provides symbolic
12604constant support. It includes collections and constants with text, numeric,
12605and bit flag values.")
12606 (license license:expat)))
12607
12608(define-public python2-constantly
12609 (package-with-python2 python-constantly))
12610
12611(define-public python-attrs
12612 (package
12613 (name "python-attrs")
c41d5144 12614 (version "19.1.0")
44d10b1f
RW
12615 (source (origin
12616 (method url-fetch)
12617 (uri (pypi-uri "attrs" version))
12618 (sha256
12619 (base32
c41d5144 12620 "16g33zr5f449lqc5wgvzpknxryfzrfsxcr6kpgxwn7l5fkv71f7h"))))
44d10b1f
RW
12621 (build-system python-build-system)
12622 (arguments
12623 `(#:modules ((guix build utils)
12624 (guix build python-build-system)
12625 (ice-9 ftw)
12626 (srfi srfi-1)
12627 (srfi srfi-26))
12628 #:phases (modify-phases %standard-phases
12629 (replace 'check
12630 (lambda _
12631 (let ((cwd (getcwd)))
12632 (setenv "PYTHONPATH"
12633 (string-append
12634 cwd "/build/"
12635 (find (cut string-prefix? "lib" <>)
12636 (scandir (string-append cwd "/build")))
12637 ":"
12638 (getenv "PYTHONPATH")))
12639 (invoke "python" "-m" "pytest")))))))
12640 (native-inputs
12641 `(("python-coverage" ,python-coverage)
12642 ("python-hypothesis" ,python-hypothesis)
12643 ("python-pympler" ,python-pympler)
12644 ("python-pytest" ,python-pytest)
12645 ("python-six" ,python-six)
12646 ("python-sphinx" ,python-sphinx)
12647 ("python-zope-interface" ,python-zope-interface)))
12648 (home-page "https://github.com/python-attrs/attrs/")
12649 (synopsis "Attributes without boilerplate")
12650 (description "@code{attrs} is a Python package with class decorators that
12651ease the chores of implementing the most common attribute-related object
12652protocols.")
12653 (license license:expat)))
12654
12655(define-public python2-attrs
12656 (package-with-python2 python-attrs))
12657
12658(define-public python-attrs-bootstrap
12659 (package
12660 (inherit python-attrs)
12661 (name "python-attrs-bootstrap")
44d10b1f
RW
12662 (native-inputs `())
12663 (arguments `(#:tests? #f))))
12664
12665(define-public python2-attrs-bootstrap
12666 (package-with-python2 python-attrs-bootstrap))
12667
12668(define-public python2-cliapp
12669 (package
12670 (name "python2-cliapp")
9064b84e 12671 (version "1.20180812.1")
44d10b1f
RW
12672 (source
12673 (origin
12674 (method url-fetch)
12675 (uri (string-append
12676 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
12677 version ".tar.gz"))
12678 (sha256
12679 (base32
9064b84e 12680 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
44d10b1f
RW
12681 (build-system python-build-system)
12682 (arguments
12683 `(#:python ,python-2
12684 #:phases
12685 (modify-phases %standard-phases
12686 ;; check phase needs to be run before the build phase. If not,
12687 ;; coverage-test-runner looks for tests for the built source files,
12688 ;; and fails.
12689 (delete 'check)
12690 (add-before 'build 'check
12691 (lambda _
12692 ;; Disable python3 tests
12693 (substitute* "check"
12694 (("python3") "# python3"))
6c826d32 12695 (invoke "./check"))))))
44d10b1f
RW
12696 (native-inputs
12697 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
12698 ("python2-pep8" ,python2-pep8)))
12699 (propagated-inputs
12700 `(("python2-pyaml" ,python2-pyaml)))
12701 (home-page "https://liw.fi/cliapp/")
12702 (synopsis "Python framework for command line programs")
12703 (description "@code{python2-cliapp} is a python framework for
12704command line programs. It contains the typical stuff such programs
12705need to do, such as parsing the command line for options, and
12706iterating over input files.")
12707 (license license:gpl2+)))
12708
12709(define-public python2-ttystatus
12710 (package
12711 (name "python2-ttystatus")
e516a9c2 12712 (version "0.36")
44d10b1f
RW
12713 (source
12714 (origin
12715 (method url-fetch)
12716 (uri (string-append
12717 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
12718 version ".tar.gz"))
12719 (sha256
12720 (base32
e516a9c2 12721 "06mdk4d19zw2j3is54gndhzl396g3xc8k52m7i86z69s9hcz71by"))))
44d10b1f
RW
12722 (build-system python-build-system)
12723 (native-inputs
12724 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
12725 ("python2-pep8" ,python2-pep8)))
12726 (arguments
12727 `(#:python ,python-2
12728 #:phases
12729 (modify-phases %standard-phases
12730 ;; check phase needs to be run before the build phase. If not,
12731 ;; coverage-test-runner looks for tests for the built source files,
12732 ;; and fails.
12733 (delete 'check)
12734 (add-before 'build 'check
cbeee881 12735 (lambda _ (invoke "make" "check"))))))
44d10b1f
RW
12736 (home-page "https://liw.fi/ttystatus/")
12737 (synopsis "Python library for showing progress reporting and
12738status updates on terminals")
12739 (description "@code{python2-ttystatus} is a python library for
12740showing progress reporting and status updates on terminals, for
12741command line programs. Output is automatically adapted to the width
12742of the terminal: truncated if it does not fit, and resized if the
12743terminal size changes.")
12744 (license license:gpl3+)))
12745
12746(define-public python2-tracing
12747 (package
12748 (name "python2-tracing")
12749 (version "0.10")
12750 (source
12751 (origin
12752 (method url-fetch)
12753 (uri (string-append
12754 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
12755 version ".tar.gz"))
12756 (sha256
12757 (base32
12758 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
12759 (build-system python-build-system)
12760 (arguments
12761 `(#:python ,python-2))
12762 (home-page "https://liw.fi/tracing/")
12763 (synopsis "Python debug logging helper")
12764 (description "@code{python2-tracing} is a python library for
12765logging debug messages. It provides a way to turn debugging messages
12766on and off, based on the filename they occur in. It is much faster
12767than using @code{logging.Filter} to accomplish the same thing, which
12768matters when code is run in production mode. The actual logging still
12769happens using the @code{logging} library.")
12770 (license license:gpl3+)))
12771
12772(define-public python2-larch
12773 (package
12774 (name "python2-larch")
12775 (version "1.20151025")
12776 (source
12777 (origin
12778 (method url-fetch)
12779 (uri (string-append
12780 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
12781 version ".tar.gz"))
12782 (patches (search-patches
12783 "python2-larch-coverage-4.0a6-compatibility.patch"))
12784 (sha256
12785 (base32
12786 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
12787 (build-system python-build-system)
12788 (arguments
12789 `(#:python ,python-2
12790 #:phases
12791 (modify-phases %standard-phases
12792 ;; check phase needs to be run before the build phase. If not,
12793 ;; coverage-test-runner looks for tests for the built source files,
12794 ;; and fails.
12795 (delete 'check)
12796 (add-before 'build 'check
204ad455 12797 (lambda _ (invoke "make" "check"))))))
44d10b1f
RW
12798 (native-inputs
12799 `(("cmdtest" ,cmdtest)
12800 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
12801 (propagated-inputs
12802 `(("python2-tracing" ,python2-tracing)))
12803 (home-page "https://liw.fi/larch/")
12804 (synopsis "Python copy-on-write B-tree library")
12805 (description "@code{python2-larch} is an implementation of
12806particular kind of B-tree, based on research by Ohad Rodeh. See
12807@url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
12808on the data structure.
12809
12810The distinctive feature of this B-tree is that a node is never
12811(conceptually) modified. Instead, all updates are done by
12812copy-on-write. This makes it easy to clone a tree, and modify only the
12813clone, while other processes access the original tree.")
12814 (license license:gpl3+)))
12815
12816(define-public python-astroid
12817 (package
12818 (name "python-astroid")
1c43c698 12819 (version "2.3.3")
44d10b1f
RW
12820 (source
12821 (origin
12822 (method url-fetch)
12823 (uri (pypi-uri "astroid" version))
12824 (sha256
1c43c698 12825 (base32 "0fnibsl2cb5mvzbfm7sycj85smx48f8w8m7ks1sqlmpr9ps0gski"))))
44d10b1f
RW
12826 (build-system python-build-system)
12827 (propagated-inputs
12828 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
12829 ("python-six" ,python-six)
f0935460 12830 ("python-typed-ast" ,python-typed-ast)
44d10b1f
RW
12831 ("python-wrapt" ,python-wrapt)))
12832 (native-inputs
12833 `(("python-dateutil" ,python-dateutil)
12834 ("python-nose" ,python-nose)
12835 ("python-pytest" ,python-pytest)
12836 ("python-pytest-runner" ,python-pytest-runner)))
12837 (arguments
12838 `(#:phases
12839 (modify-phases %standard-phases
12840 (add-after 'unpack 'remove-spurious-test
12841 (lambda _
12842 ;; This can be removed after upgrading from python-3.7
12843 ;; https://github.com/PyCQA/astroid/issues/593
12844 ;; https://bugs.python.org/issue34056
12845 (delete-file "astroid/tests/unittest_modutils.py")
12846 #t))
12847 (replace 'check
12848 (lambda _
12849 (invoke "pytest" "astroid"))))))
12850 (home-page "https://github.com/PyCQA/astroid")
12851 (synopsis "Common base representation of python source code for pylint and
12852other projects")
12853 (description "@code{python-astroid} provides a common base representation
12854of python source code for projects such as pychecker, pyreverse, pylint, etc.
12855
12856It provides a compatible representation which comes from the _ast module. It
12857rebuilds the tree generated by the builtin _ast module by recursively walking
12858down the AST and building an extended ast. The new node classes have
12859additional methods and attributes for different usages. They include some
12860support for static inference and local name scopes. Furthermore, astroid
12861builds partial trees by inspecting living objects.")
12862 (license license:lgpl2.1+)
12863 (properties `((python2-variant . ,(delay python2-astroid))))))
12864
12865(define-public python2-astroid
12866 (let ((base (package-with-python2
12867 (strip-python2-variant python-astroid))))
12868 (package (inherit base)
12869 ;; Version 2.x removes python2 support.
12870 (version "1.6.5")
12871 (source
12872 (origin
12873 (method url-fetch)
12874 (uri (pypi-uri "astroid" version))
12875 (sha256
12876 (base32
12877 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
12878 (arguments
12879 (substitute-keyword-arguments (package-arguments base)
12880 ((#:phases phases)
12881 `(modify-phases ,phases
12882 (add-after 'unpack 'remove-spurious-test
12883 (lambda _
12884 ;; https://github.com/PyCQA/astroid/issues/276
12885 (delete-file "astroid/tests/unittest_brain.py")
12886 #t))
12887 (replace 'check
12888 (lambda _
12889 (invoke"python" "-m" "unittest" "discover"
12890 "-p" "unittest*.py")))))))
12891 (native-inputs `())
12892 (propagated-inputs
12893 `(("python2-backports-functools-lru-cache"
12894 ,python2-backports-functools-lru-cache)
12895 ("python2-enum34" ,python2-enum34)
12896 ("python2-singledispatch" ,python2-singledispatch)
741f98b3
MO
12897 ,@(alist-delete "python-typed-ast"
12898 (package-propagated-inputs base)))))))
44d10b1f
RW
12899
12900(define-public python-isort
12901 (package
12902 (name "python-isort")
e2227b6a 12903 (version "4.3.4")
44d10b1f
RW
12904 (source
12905 (origin
e2227b6a
EF
12906 (method git-fetch)
12907 (uri (git-reference
12908 ;; Tests pass only from the Github sources
12909 (url "https://github.com/timothycrosley/isort")
12910 (commit version)))
12911 (file-name (git-file-name name version))
44d10b1f
RW
12912 (sha256
12913 (base32
e2227b6a 12914 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
44d10b1f
RW
12915 (build-system python-build-system)
12916 (native-inputs
12917 `(("python-mock" ,python-mock)
12918 ("python-pytest" ,python-pytest)))
12919 (home-page "https://github.com/timothycrosley/isort")
12920 (synopsis "Python utility/library to sort python imports")
12921 (description "@code{python-isort} is a python utility/library to sort
12922imports alphabetically, and automatically separated into sections. It
12923provides a command line utility, a python library and plugins for various
12924editors.")
e2227b6a
EF
12925 (license license:expat)
12926 (properties `((python2-variant . ,(delay python2-isort))))))
44d10b1f
RW
12927
12928(define-public python2-isort
e2227b6a
EF
12929 (let ((base (package-with-python2
12930 (strip-python2-variant python-isort))))
12931 (package (inherit base)
12932 (native-inputs
12933 `(("python2-futures" ,python2-futures)
12934 ,@(package-native-inputs base))))))
44d10b1f
RW
12935
12936(define-public python2-backports-functools-lru-cache
12937 (package
12938 (name "python2-backports-functools-lru-cache")
12939 (version "1.5")
12940 (source
12941 (origin
12942 (method url-fetch)
12943 ;; only the pypi tarballs contain the necessary metadata
12944 (uri (pypi-uri "backports.functools_lru_cache" version))
12945 (sha256
12946 (base32
12947 "06jgv8gib4fhky0p5cmxdghvsgjyzcdgk48k8pxb1ccf11znk64x"))))
12948 (build-system python-build-system)
12949 (native-inputs
12950 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
12951 (arguments
12952 `(#:python ,python-2))
12953 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
12954 (synopsis "Backport of functools.lru_cache from Python 3.3")
12955 (description "@code{python2-backports-functools-lru-cache} is a backport
12956of @code{functools.lru_cache} from python 3.3.")
12957 (license license:expat)))
12958
12959(define-public python-configparser
12960 (package
12961 (name "python-configparser")
84127f8c 12962 (version "3.7.1")
44d10b1f
RW
12963 (source
12964 (origin
12965 (method url-fetch)
84127f8c 12966 (uri (pypi-uri "configparser" version))
44d10b1f
RW
12967 (sha256
12968 (base32
84127f8c 12969 "0cnz213il9lhgda6x70fw7mfqr8da43s3wm343lwzhqx94mgmmav"))))
44d10b1f 12970 (build-system python-build-system)
809f003f 12971 (home-page "https://github.com/jaraco/configparser/")
44d10b1f
RW
12972 (synopsis "Backport of configparser from python 3.5")
12973 (description "@code{python-configparser} is a backport of
12974@code{configparser} from Python 3.5 so that it can be used directly
12975in other versions.")
12976 (license license:expat)))
12977
12978(define-public python2-configparser
12979 (package-with-python2 python-configparser))
12980
12981(define-public python-mando
12982 (package
12983 (name "python-mando")
12984 (version "0.6.4")
12985 (source (origin
12986 (method url-fetch)
12987 (uri (pypi-uri "mando" version))
12988 (sha256
12989 (base32
12990 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
12991 (build-system python-build-system)
12992 (propagated-inputs
12993 `(("python-rst2ansi" ,python-rst2ansi)
12994 ("python-six" ,python-six)))
12995 (native-inputs
12996 `(("python-pytest" ,python-pytest)))
12997 (home-page "https://mando.readthedocs.org/")
12998 (synopsis
12999 "Wrapper around argparse, allowing creation of complete CLI applications")
13000 (description
13001 "This package is a wrapper around argparse, allowing you to write complete CLI
13002applications in seconds while maintaining all the flexibility.")
13003 (license license:expat)))
13004
13005(define-public python2-mando
13006 (package-with-python2 python-mando))
13007
70daf82f
RW
13008(define-public python2-argparse
13009 (package
13010 (name "python2-argparse")
13011 (version "1.4.0")
13012 (source
13013 (origin
13014 (method url-fetch)
13015 (uri (pypi-uri "argparse" version))
13016 (sha256
13017 (base32
13018 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
13019 (build-system python-build-system)
13020 (arguments
13021 `(#:python ,python-2))
13022 (home-page "https://github.com/ThomasWaldmann/argparse/")
13023 (synopsis "Python command-line parsing library")
13024 (description
13025 "This package is mostly for people who want to have @code{argparse} on
13026older Pythons because it was not part of the standard library back then.")
13027 (license license:psfl)))
13028
44d10b1f
RW
13029(define-public python-fudge
13030 (package
13031 (name "python-fudge")
13032 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
13033 ;; package, which is currently the only use of this package.
13034 (version "0.9.6")
13035 (source
13036 (origin
13037 (method url-fetch)
13038 (uri (pypi-uri "fudge" version))
13039 (sha256
13040 (base32
13041 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
13042 (build-system python-build-system)
13043 (arguments
13044 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
13045 (home-page "https://github.com/fudge-py/fudge")
13046 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
13047 (description
13048 "Fudge is a Python module for using fake objects (mocks and stubs) to
13049test real ones.
13050
13051In readable Python code, you declare the methods available on your fake object
13052and how they should be called. Then you inject that into your application and
13053start testing. This declarative approach means you don’t have to record and
13054playback actions and you don’t have to inspect your fakes after running code.
13055If the fake object was used incorrectly then you’ll see an informative
13056exception message with a traceback that points to the culprit.")
13057 (license license:expat)))
13058
13059(define-public python2-fudge
13060 (package-with-python2 python-fudge))
13061
13062(define-public python-mwclient
13063 (package
13064 (name "python-mwclient")
957c6833 13065 (version "0.10.0")
44d10b1f
RW
13066 (source
13067 (origin
957c6833 13068 (method git-fetch)
44d10b1f 13069 ;; The PyPI version wouldn't contain tests.
957c6833
EF
13070 (uri (git-reference
13071 (url "https://github.com/mwclient/mwclient")
13072 (commit (string-append "v" version))))
13073 (file-name (git-file-name name version))
44d10b1f
RW
13074 (sha256
13075 (base32
957c6833 13076 "1c3q6lwmb05yqywc4ya98ca7hsl15niili8rccl4n1yqp77c103v"))))
44d10b1f
RW
13077 (build-system python-build-system)
13078 (propagated-inputs
957c6833 13079 `(("python-requests-oauthlib" ,python-requests-oauthlib)
44d10b1f
RW
13080 ("python-six" ,python-six)))
13081 (native-inputs
13082 `(("python-mock" ,python-mock)
13083 ("python-pytest" ,python-pytest)
44d10b1f 13084 ("python-pytest-cov" ,python-pytest-cov)
957c6833 13085 ("python-pytest-runner" ,python-pytest-runner)
44d10b1f
RW
13086 ("python-responses" ,python-responses)))
13087 (home-page "https://github.com/btongminh/mwclient")
13088 (synopsis "MediaWiki API client")
13089 (description "This package provides a MediaWiki API client.")
13090 (license license:expat)))
13091
13092(define-public python2-mwclient
13093 (package-with-python2 python-mwclient))
13094
13095(define-public python-utils
13096 (package
13097 (name "python-utils")
13098 (version "2.1.0")
13099 (source (origin
13100 (method url-fetch)
13101 (uri (pypi-uri "python-utils" version))
13102 (sha256
13103 (base32
13104 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
13105 (build-system python-build-system)
13106 (native-inputs
13107 `(("pytest-runner" ,python-pytest-runner)
13108 ("pytest" ,python-pytest)
13109 ("six" ,python-six)))
13110 (home-page "https://github.com/WoLpH/python-utils")
13111 (synopsis "Convenient utilities not included with the standard Python install")
13112 (description
13113 "Python Utils is a collection of small Python functions and classes which
13114make common patterns shorter and easier.")
13115 (license license:bsd-2)))
13116
13117(define-public python2-utils
13118 (package-with-python2 python-utils))
13119
44d10b1f
RW
13120(define-public python-diff-match-patch
13121 (package
13122 (name "python-diff-match-patch")
13123 (version "20121119")
13124 (source
13125 (origin
13126 (method url-fetch)
13127 (uri (pypi-uri "diff-match-patch" version))
13128 (sha256
13129 (base32
13130 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
13131 (build-system python-build-system)
13132 (home-page "https://code.google.com/p/google-diff-match-patch")
13133 (synopsis "Synchronize plain text")
13134 (description "Diff Match and Patch libraries offer robust algorithms to
13135perform the operations required for synchronizing plain text.")
13136 (license license:asl2.0)))
13137
13138(define-public python2-diff-match-patch
13139 (package-with-python2 python-diff-match-patch))
13140
13141(define-public python-dirsync
13142 (package
13143 (name "python-dirsync")
13144 (version "2.2.3")
13145 (source
13146 (origin
13147 (method url-fetch)
13148 (uri (pypi-uri "dirsync" version))
13149 (sha256
13150 (base32
13151 "1r40fkanksagcszf1ag85mdr8w7rgc7196n6s1qlsk2abw6i7v0z"))))
13152 (build-system python-build-system)
13153 (propagated-inputs
13154 `(("six" ,python-six)))
13155 (home-page "https://bitbucket.org/tkhyn/dirsync")
13156 (synopsis "Advanced directory tree synchronisation tool")
13157 (description "Advanced directory tree synchronisation tool.")
13158 (license license:expat)))
13159
13160(define-public python2-dirsync
13161 (package-with-python2 python-dirsync))
13162
13163(define-public python-levenshtein
13164 (package
13165 (name "python-levenshtein")
13166 (version "0.12.0")
13167 (source
13168 (origin
13169 (method url-fetch)
13170 (uri (pypi-uri "python-Levenshtein" version))
13171 (sha256
13172 (base32
13173 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
13174 (build-system python-build-system)
13175 (home-page "https://github.com/ztane/python-Levenshtein")
13176 (synopsis "Fast computation of Levenshtein distance and string similarity")
13177 (description
13178 "The Levenshtein Python C extension module contains functions for fast computation of
13179@enumerate
13180@item Levenshtein (edit) distance, and edit operations
13181@item string similarity
13182@item approximate median strings, and generally string averaging
13183@item string sequence and set similarity
13184@end enumerate
13185It supports both normal and Unicode strings.")
13186 (license license:gpl2+)))
13187
13188(define-public python2-levenshtein
13189 (package-with-python2 python-levenshtein))
13190
13191(define-public python-scandir
13192 (package
13193 (name "python-scandir")
13194 (version "1.9.0")
13195 (source
13196 (origin
13197 (method url-fetch)
13198 (uri (pypi-uri "scandir" version))
13199 (sha256
13200 (base32 "0r3hvf1a9jm1rkqgx40gxkmccknkaiqjavs8lccgq9s8khh5x5s4"))))
13201 (build-system python-build-system)
13202 (arguments
13203 `(#:phases (modify-phases %standard-phases
13204 (replace 'check
13205 (lambda _
13206 (invoke "python" "test/run_tests.py"))))))
13207 (home-page "https://github.com/benhoyt/scandir")
13208 (synopsis "Directory iteration function")
13209 (description
13210 "Directory iteration function like os.listdir(), except that instead of
13211returning a list of bare filenames, it yields DirEntry objects that include
13212file type and stat information along with the name. Using scandir() increases
13213the speed of os.walk() by 2-20 times (depending on the platform and file
13214system) by avoiding unnecessary calls to os.stat() in most cases.
13215
13216This package is part of the Python standard library since version 3.5.")
13217 (license license:bsd-3)))
13218
13219(define-public python2-scandir
13220 (package-with-python2 python-scandir))
13221
13222(define-public python2-stemming
13223 (package
13224 (name "python2-stemming")
13225 (version "1.0.1")
13226 (source
13227 (origin
13228 (method url-fetch)
13229 (uri (pypi-uri "stemming" version))
13230 (sha256
13231 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
13232 (build-system python-build-system)
13233 (arguments
13234 `(#:python ,python-2))
13235 (home-page "https://bitbucket.org/mchaput/stemming/overview")
13236 (synopsis "Python implementations of various stemming algorithms")
13237 (description
13238 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
13239stemming algorithms for English. These implementations are straightforward and
13240efficient, unlike some Python versions of the same algorithms available on the
13241Web. This package is an extraction of the stemming code included in the Whoosh
13242search engine.")
13243 (license license:public-domain)))
13244
13245(define-public python-factory-boy
13246 (package
13247 (name "python-factory-boy")
13248 (version "2.8.1")
13249 (source
13250 (origin
13251 (method url-fetch)
13252 (uri (pypi-uri "factory_boy" version))
13253 (sha256
13254 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
13255 (build-system python-build-system)
13256 (arguments
13257 ;; Tests are not included in the tarball.
13258 `(#:tests? #f))
13259 (propagated-inputs
13260 `(("faker" ,python-faker)))
13261 (home-page "https://github.com/benhoyt/scandir")
13262 (synopsis "Versatile test fixtures replacement")
13263 (description
13264 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
13265
13266As a fixtures replacement tool, it aims to replace static, hard to maintain
13267fixtures with easy-to-use factories for complex object.
13268
13269Instead of building an exhaustive test setup with every possible combination
13270of corner cases, factory_boy allows you to use objects customized for the
13271current test, while only declaring the test-specific fields")
13272 (license license:expat)))
13273
13274(define-public python2-factory-boy
13275 (package-with-python2 python-factory-boy))
13276
13277(define-public python-translate-toolkit
13278 (package
13279 (name "python-translate-toolkit")
13280 (version "2.1.0")
13281 (source
13282 (origin
13283 (method url-fetch)
13284 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
13285 (sha256
13286 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
13287 (build-system python-build-system)
13288 (native-inputs
13289 `(("python-pytest" ,python-pytest)
13290 ("python-sphinx" ,python-sphinx)))
13291 (propagated-inputs
13292 `(("python-babel" ,python-babel)
13293 ("python-beautifulsoup4" ,python-beautifulsoup4)
13294 ("python-chardet" ,python-chardet)
13295 ("python-diff-match-patch" ,python-diff-match-patch)
13296 ("python-levenshtein" ,python-levenshtein)
13297 ("python-lxml" ,python-lxml)
13298 ("python-six" ,python-six)
13299 ("python-vobject" ,python-vobject)
13300 ("python-pyyaml" ,python-pyyaml)))
13301 (arguments
13302 ;; TODO: tests are not run, because they end with
13303 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
13304 ;; 'parse_funcs'
13305 ;; during test setup.
13306 `(#:tests? #f))
18919cf9 13307 (home-page "https://toolkit.translatehouse.org")
44d10b1f
RW
13308 (synopsis "Tools and API for translation and localization engineering")
13309 (description
13310 "Tools and API for translation and localization engineering. It contains
13311several utilities, as well as an API for building localization tools.")
13312 (license license:gpl2+)))
13313
13314(define-public python2-translate-toolkit
13315 (package-with-python2 python-translate-toolkit))
13316
13317(define-public python-packaging
13318 (package
13319 (name "python-packaging")
a72a1892 13320 (version "20.0")
44d10b1f
RW
13321 (source
13322 (origin
13323 (method url-fetch)
13324 (uri (pypi-uri "packaging" version))
20bf58bf
MB
13325 ;; XXX: The URL in the patch file is wrong, it should be
13326 ;; <https://github.com/pypa/packaging/pull/256>.
fdd0c369 13327 (patches (search-patches "python-packaging-test-arch.patch"))
44d10b1f
RW
13328 (sha256
13329 (base32
a72a1892 13330 "1y2ip3a4ykkpgnwgn85j6hkspcl0cg3mzms97f40mk57vwqq67gy"))))
44d10b1f
RW
13331 (build-system python-build-system)
13332 (arguments
13333 `(#:phases (modify-phases %standard-phases
13334 (replace 'check
13335 (lambda _ (invoke "py.test" "-vv"))))))
13336 (native-inputs
13337 `(("python-pretend" ,python-pretend)
13338 ("python-pytest" ,python-pytest)))
13339 (propagated-inputs
13340 `(("python-pyparsing" ,python-pyparsing)
13341 ("python-six" ,python-six)))
13342 (home-page "https://github.com/pypa/packaging")
13343 (synopsis "Core utilities for Python packages")
13344 (description "Packaging is a Python module for dealing with Python packages.
13345It offers an interface for working with package versions, names, and dependency
13346information.")
13347 ;; From 'LICENSE': This software is made available under the terms of
13348 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
13349 ;; Contributions to this software is made under the terms of *both* these
13350 ;; licenses.
13351 (license (list license:asl2.0 license:bsd-2))))
13352
13353(define-public python2-packaging
13354 (package-with-python2 python-packaging))
13355
13356(define-public python-relatorio
13357 (package
13358 (name "python-relatorio")
13359 (version "0.8.0")
13360 (source
13361 (origin
13362 (method url-fetch)
13363 (uri (pypi-uri "relatorio" version))
13364 (sha256
13365 (base32
13366 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
13367 (build-system python-build-system)
13368 (propagated-inputs
13369 `(("python-lxml" ,python-lxml)
13370 ("python-genshi" ,python-genshi)))
13371 (native-inputs
13372 `(("python-magic" ,python-magic)))
13373 (home-page "https://relatorio.tryton.org/")
13374 (synopsis "Templating library able to output ODT and PDF files")
13375 (description "Relatorio is a templating library which provides a way to
13376easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
13377for more filetypes can be easily added by creating plugins for them.")
13378 (license license:gpl3+)))
13379
13380(define-public python2-relatorio
13381 (package-with-python2 python-relatorio))
13382
13383(define-public python-radon
13384 (package
13385 (name "python-radon")
f675ab4f 13386 (version "4.1.0")
44d10b1f
RW
13387 (source
13388 (origin
13389 (method url-fetch)
13390 (uri (pypi-uri "radon" version))
13391 (sha256
13392 (base32
f675ab4f 13393 "0vfxxzbnz5lxfvp0yxp35g6c8qqnnbhi4dm7shkm1d3d4192q22n"))))
44d10b1f
RW
13394 (build-system python-build-system)
13395 (arguments
13396 `(#:phases (modify-phases %standard-phases
13397 (replace 'check
13398 (lambda _
13399 (invoke "python" "radon/tests/run.py"))))))
13400 (propagated-inputs
13401 `(("python-colorama" ,python-colorama)
13402 ("python-flake8-polyfill" ,python-flake8-polyfill)
13403 ("python-mando" ,python-mando)))
13404 (native-inputs
13405 `(("python-pytest" ,python-pytest)
13406 ("python-pytest-mock" ,python-pytest-mock)))
13407 (home-page "https://radon.readthedocs.org/")
13408 (synopsis "Code Metrics in Python")
13409 (description "Radon is a Python tool which computes various code metrics.
13410Supported metrics are:
13411@itemize @bullet
13412@item raw metrics: SLOC, comment lines, blank lines, &c.
13413@item Cyclomatic Complexity (i.e. McCabe’s Complexity)
13414@item Halstead metrics (all of them)
13415@item the Maintainability Index (a Visual Studio metric)
13416@end itemize")
13417 (license license:expat)))
13418
13419(define-public python2-radon
13420 (package-with-python2 python-radon))
13421
13422(define-public python-sure
13423 (package
13424 (name "python-sure")
13425 (version "1.4.11")
13426 (source
13427 (origin
13428 (method url-fetch)
13429 (uri (pypi-uri "sure" version))
13430 (sha256
13431 (base32
13432 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
13433 (build-system python-build-system)
13434 (propagated-inputs
13435 `(("python-mock" ,python-mock)
13436 ("python-six" ,python-six)))
13437 (native-inputs
13438 `(("python-nose" ,python-nose)))
13439 (home-page "https://github.com/gabrielfalcao/sure")
13440 (synopsis "Automated testing library in python for python")
13441 (description
13442 "Sure is a python library that leverages a DSL for writing assertions.
13443Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
13444 (license license:gpl3+)))
13445
13446(define-public python2-sure
13447 (package-with-python2 python-sure))
13448
13449(define-public python2-couleur
13450 ;; This package does not seem to support python3 at all, hence,
13451 ;; only the python2 variant definition is provided.
13452 (package
13453 (name "python2-couleur")
13454 (version "0.6.2")
13455 (source
13456 (origin
13457 (method url-fetch)
13458 (uri (pypi-uri "couleur" version))
13459 (sha256
13460 (base32
13461 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
13462 (build-system python-build-system)
13463 (arguments
13464 `(#:python ,python-2))
13465 (home-page "https://github.com/gabrielfalcao/couleur")
13466 (synopsis
13467 "ANSI terminal tool for python, colored shell and other handy fancy features")
13468 (description
13469 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
13470terminal such as coloured output in the shell, overwriting output, indentation, etc.")
13471 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
13472 ;; https://github.com/gabrielfalcao/couleur/issues/11
13473 (license license:lgpl3+)))
13474
13475(define-public python-misaka
13476 (package
13477 (name "python-misaka")
0dcb3412 13478 (version "2.1.1")
44d10b1f
RW
13479 (source
13480 (origin
13481 (method url-fetch)
13482 (uri (pypi-uri "misaka" version))
13483 (sha256
13484 (base32
0dcb3412 13485 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
44d10b1f
RW
13486 (build-system python-build-system)
13487 (arguments
13488 `(;; Line 37 of setup.py calls self.run_command('develop')
13489 ;; in the 'check' phase. This command seems to be trying
13490 ;; to write to
13491 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
13492 ;; for which it does not have the permission to write.
13493 #:tests? #f))
13494 (propagated-inputs
13495 `(("python-cffi" ,python-cffi)))
13496 (home-page "https://github.com/FSX/misaka")
13497 (synopsis "Python binding for Hoedown")
13498 (description
13499 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
13500library written in C. It features a fast HTML renderer and functionality to make custom
13501renderers (e.g. man pages or LaTeX).")
13502 (license license:expat)))
13503
13504(define-public python2-misaka
13505 (package-with-python2 python-misaka))
13506
13507(define-public python2-steadymark
13508 ;; This is forced into being a python2 only variant
13509 ;; due to its dependence on couleur that has no support
13510 ;; for python3
13511 (package
13512 (name "python2-steadymark")
13513 (version "0.7.3")
13514 (source
13515 (origin
13516 (method url-fetch)
13517 (uri (pypi-uri "steadymark" version))
13518 (sha256
13519 (base32
13520 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
13521 (build-system python-build-system)
13522 (native-inputs
13523 `(("python-couleur" ,python2-couleur)
13524 ("python-sure" ,python2-sure)
13525 ("python-misaka" ,python2-misaka)))
13526 (arguments
13527 `(#:python ,python-2
13528 #:phases
13529 (modify-phases %standard-phases
13530 (add-before 'build 'patch-setup-py
13531 (lambda _
13532 ;; Update requirements from dependency==version
13533 ;; to dependency>=version
13534 (substitute* "setup.py"
13535 (("==") ">="))
13536 #t)))))
13537 (home-page "https://github.com/gabrielfalcao/steadymark")
13538 (synopsis "Markdown-based test runner for python")
13539 (description
13540 "@code{Steadymark} allows documentation to be written in github-flavoured
13541markdown. The documentation may contain snippets of code surrounded by python
13542code blocks and @code{Steadymark} will find these snippets and run them, making
13543sure that there are no old malfunctional examples in the documentation examples.")
13544 (license license:expat)))
13545
13546(define-public python-jsonpointer
13547 (package
13548 (name "python-jsonpointer")
13549 (version "1.10")
13550 (source
13551 (origin
13552 (method url-fetch)
13553 (uri (pypi-uri "jsonpointer" version))
13554 (sha256
13555 (base32
13556 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
13557 (build-system python-build-system)
13558 (home-page "https://github.com/stefankoegl/python-json-pointer")
13559 (synopsis "Identify specific nodes in a JSON document")
13560 (description "@code{jsonpointer} allows you to access specific nodes
13561by path in a JSON document (see RFC 6901).")
13562 (license license:bsd-3)))
13563
13564(define-public python2-jsonpointer
13565 (package-with-python2 python-jsonpointer))
13566
13567(define-public python-jsonpatch
13568 (package
13569 (name "python-jsonpatch")
13570 (version "1.16")
13571 (source
13572 (origin
854c5c95 13573 (method git-fetch)
44d10b1f 13574 ;; pypi version lacks tests.js
854c5c95
EF
13575 (uri (git-reference
13576 (url "https://github.com/stefankoegl/python-json-patch")
13577 (commit (string-append "v" version))))
13578 (file-name (git-file-name name version))
44d10b1f
RW
13579 (sha256
13580 (base32
854c5c95 13581 "0k9pff06lxama3nhsc7cdxbp83422bdy8ifs52i6xkas8hpyzfzr"))))
44d10b1f
RW
13582 (build-system python-build-system)
13583 (native-inputs
13584 `(("python-jsonpointer" ,python-jsonpointer)))
13585 (home-page "https://github.com/stefankoegl/python-json-patch")
13586 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
13587 (description "@code{jsonpatch} is a library and program that allows
13588applying JSON Patches according to RFC 6902.")
13589 (license license:bsd-3)))
13590
13591(define-public python2-jsonpatch
13592 (package-with-python2 python-jsonpatch))
13593
13594(define-public python-jsonpatch-0.4
13595 (package (inherit python-jsonpatch)
13596 (name "python-jsonpatch")
13597 (version "0.4")
13598 (source
13599 (origin
a9722d0d
EF
13600 (method git-fetch)
13601 (uri (git-reference
13602 (url "https://github.com/stefankoegl/python-json-patch")
13603 (commit (string-append "v" version))))
13604 (file-name (git-file-name name version))
44d10b1f
RW
13605 (sha256
13606 (base32
a9722d0d 13607 "1fq02y57kinyknxjcav0slcb0k9mwdffqw2hnlhdkpj7palh2mwk"))))))
44d10b1f
RW
13608
13609(define-public python2-jsonpatch-0.4
13610 (package-with-python2 python-jsonpatch-0.4))
13611
13612(define-public python-rfc3986
13613 (package
13614 (name "python-rfc3986")
13615 (version "1.1.0")
13616 (source (origin
13617 (method url-fetch)
13618 (uri (pypi-uri "rfc3986" version))
13619 (sha256
13620 (base32
13621 "06wlmysw83f75ff84zr1yr6n0shvc2xn1n1sb4iwzqap9hf5fn44"))))
13622 (build-system python-build-system)
13623 (arguments
13624 `(#:modules ((guix build utils)
13625 (guix build python-build-system)
13626 (ice-9 ftw)
13627 (srfi srfi-1)
13628 (srfi srfi-26))
13629 #:phases
13630 (modify-phases %standard-phases
13631 (replace 'check
13632 (lambda _
13633 (let ((cwd (getcwd)))
13634 (setenv "PYTHONPATH"
13635 (string-append cwd "/build/"
13636 (find (cut string-prefix? "lib" <>)
13637 (scandir (string-append cwd "/build")))
13638 ":"
13639 (getenv "PYTHONPATH")))
13640 (invoke "pytest" "-v")))))))
13641 (native-inputs
13642 `(("python-pytest" ,python-pytest)))
13643 (home-page "https://rfc3986.readthedocs.io/")
13644 (synopsis "Parse and validate URI references")
13645 (description
13646 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
13647validation and authority parsing. This module also supports RFC@tie{}6874
13648which adds support for zone identifiers to IPv6 addresses.")
13649 (license license:asl2.0)))
13650
13651(define-public python2-rfc3986
13652 (package-with-python2 python-rfc3986))
13653
13654(define-public python-rfc3987
13655 (package
13656 (name "python-rfc3987")
13657 (version "1.3.7")
13658 (source
13659 (origin
13660 (method url-fetch)
13661 (uri (pypi-uri "rfc3987" version))
13662 (sha256
13663 (base32
13664 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
13665 (build-system python-build-system)
e85af137 13666 (home-page "https://pypi.org/project/rfc3987/")
44d10b1f
RW
13667 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
13668 (description "@code{rfc3987} provides routines for parsing and
13669validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
13670 (license license:gpl3+)))
13671
13672(define-public python2-rfc3987
13673 (package-with-python2 python-rfc3987))
13674
13675(define-public python-validate-email
13676 (package
13677 (name "python-validate-email")
13678 (version "1.3")
13679 (source
13680 (origin
13681 (method url-fetch)
13682 (uri (pypi-uri "validate_email" version))
13683 (sha256
13684 (base32
13685 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
13686 (build-system python-build-system)
13687 (home-page "https://github.com/syrusakbary/validate_email")
13688 (synopsis "Verifies if an email address is valid and really exists")
13689 (description "@code{validate_email} can be used to verify if an email
13690address is valid and really exists.")
13691 (license license:lgpl3+)))
13692
13693(define-public python2-validate-email
13694 (package-with-python2 python-validate-email))
13695
13696(define-public python-flex
13697 (package
13698 (name "python-flex")
13699 (version "6.10.0")
13700 (source
13701 (origin
13702 (method url-fetch)
13703 (uri (pypi-uri "flex" version))
13704 (sha256
13705 (base32
13706 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
13707 (build-system python-build-system)
13708 (propagated-inputs
13709 `(("python-click" ,python-click)
13710 ("python-iso8601" ,python-iso8601)
13711 ("python-jsonpointer" ,python-jsonpointer)
13712 ("python-pyyaml" ,python-pyyaml)
13713 ("python-requests" ,python-requests)
13714 ("python-rfc3987" ,python-rfc3987)
13715 ("python-six" ,python-six)
13716 ("python-validate-email" ,python-validate-email)))
13717 (home-page "https://github.com/pipermerriam/flex")
13718 (synopsis "Validates Swagger schemata")
13719 (description "@code{flex} can be used to validate Swagger schemata.")
13720 (license license:bsd-3)))
13721
13722(define-public python2-flex
13723 (package-with-python2 python-flex))
13724
13725(define-public python-marshmallow
13726 (package
13727 (name "python-marshmallow")
13728 (version "3.0.0b14")
13729 (source
13730 (origin
13731 (method url-fetch)
13732 (uri (pypi-uri "marshmallow" version))
13733 (sha256
13734 (base32
13735 "1digk3f5cfk7wmlka65mc7bzsd96pbsgcsvp6pimd5b4ff9zb5p3"))))
13736 (build-system python-build-system)
13737 (propagated-inputs
13738 `(("python-dateutil" ,python-dateutil)
13739 ("python-simplejson" ,python-simplejson)))
13740 (native-inputs
13741 `(("python-pytest" ,python-pytest)
13742 ("python-pytz" ,python-pytz)))
13743 (home-page "https://github.com/marshmallow-code/marshmallow")
13744 (synopsis "Convert complex datatypes to and from native
13745Python datatypes.")
13746 (description "@code{marshmallow} provides a library for converting
13747complex datatypes to and from native Python datatypes.")
13748 (license license:expat)))
13749
13750(define-public python2-marshmallow
13751 (package-with-python2 python-marshmallow))
13752
13753(define-public python-apispec
13754 (package
13755 (name "python-apispec")
13756 (version "0.25.3")
13757 (source
13758 (origin
13759 (method url-fetch)
13760 (uri (pypi-uri "apispec" version))
13761 (sha256
13762 (base32
13763 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
13764 (build-system python-build-system)
13765 (propagated-inputs
13766 `(("python-pyyaml" ,python-pyyaml)))
13767 (native-inputs
13768 `(("python-pytest" ,python-pytest)
13769 ("python-flask" ,python-flask)
13770 ("python-marshmallow" ,python-marshmallow)
13771 ("python-tornado" ,python-tornado)
13772 ("python-bottle" ,python-bottle)
13773 ("python-mock" ,python-mock)))
13774 (home-page "https://github.com/marshmallow-code/apispec")
13775 (synopsis "Swagger 2.0 API specification generator")
13776 (description "@code{python-apispec} is a pluggable API specification
13777generator. Currently supports the OpenAPI specification (f.k.a.
13778Swagger 2.0).")
13779 (license license:expat)))
13780
13781(define-public python2-apispec
13782 (package-with-python2 python-apispec))
13783
13784(define-public python-flasgger
13785 (package
13786 (name "python-flasgger")
13787 (version "0.6.3")
13788 (source
13789 (origin
1a04d421
TGR
13790 (method git-fetch)
13791 (uri (git-reference
13792 (url "https://github.com/rochacbruno/flasgger.git")
13793 (commit version)))
13794 (file-name (git-file-name name version))
44d10b1f 13795 (sha256
1a04d421 13796 (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn"))))
44d10b1f
RW
13797 (build-system python-build-system)
13798 (arguments
13799 `(#:phases
13800 (modify-phases %standard-phases
13801 (replace 'check
13802 (lambda* (#:key inputs outputs #:allow-other-keys)
13803 (substitute* "Makefile"
13804 (("flake8 flasgger --ignore=F403")
13805 "flake8 flasgger --ignore=E731,F403"))
13806 (setenv "PYTHONPATH" (string-append (getcwd)
13807 ":"
13808 (getenv "PYTHONPATH")))
ac599a09 13809 (invoke "py.test"))))))
44d10b1f
RW
13810 (propagated-inputs
13811 `(("python-flask" ,python-flask)
13812 ("python-pyyaml" ,python-pyyaml)
13813 ("python-jsonschema" ,python-jsonschema)
13814 ("python-mistune" ,python-mistune)
13815 ("python-six" ,python-six)))
13816 (native-inputs
13817 `(("python-decorator" ,python-decorator)
13818 ("python-flake8" ,python-flake8)
13819 ("python-flask-restful" ,python-flask-restful)
13820 ("python-flex" ,python-flex)
13821 ("python-pytest" ,python-pytest)
13822 ("python-pytest-cov" ,python-pytest-cov)
13823 ("python-marshmallow" ,python-marshmallow)
13824 ("python-apispec" ,python-apispec)))
13825 (home-page "https://github.com/rochacbruno/flasgger/")
13826 (synopsis "Extract Swagger specs from your Flask project")
13827 (description "@code{python-flasgger} allows extracting Swagger specs
13828from your Flask project. It is a fork of Flask-Swagger.")
13829 (license license:expat)))
13830
13831(define-public python2-flasgger
13832 (package-with-python2 python-flasgger))
13833
13834(define-public python-swagger-spec-validator
13835 (package
13836 (name "python-swagger-spec-validator")
fe9c5b1d 13837 (version "2.4.3")
44d10b1f
RW
13838 (source
13839 (origin
13840 (method url-fetch)
13841 (uri (pypi-uri "swagger-spec-validator" version))
13842 (sha256
13843 (base32
fe9c5b1d 13844 "11g627icrsqwazsncwi0sdvprcj6hwaayw5xk3xsj8d97bmrzqjp"))))
44d10b1f
RW
13845 (build-system python-build-system)
13846 (propagated-inputs
13847 `(("python-jsonschema" ,python-jsonschema)
fe9c5b1d 13848 ("python-pyyaml" ,python-pyyaml)
44d10b1f
RW
13849 ("python-six" ,python-six)))
13850 (home-page
13851 "https://github.com/Yelp/swagger_spec_validator")
13852 (synopsis "Validation of Swagger specifications")
13853 (description "@code{swagger_spec_validator} provides a library for
13854validating Swagger API specifications.")
13855 (license license:asl2.0)))
13856
13857(define-public python2-swagger-spec-validator
13858 (package-with-python2 python-swagger-spec-validator))
13859
13860(define-public python-apache-libcloud
13861 (package
13862 (name "python-apache-libcloud")
13863 (version "2.4.0")
13864 (source
13865 (origin
13866 (method url-fetch)
13867 (uri (pypi-uri "apache-libcloud" version))
13868 (sha256
13869 (base32
13870 "0daj3mkzw79v5zin2r1s2wkrz1hplfc16bwj4ss68i5qjq4l2p0j"))))
13871 (build-system python-build-system)
13872 (arguments
13873 `(#:phases
13874 (modify-phases %standard-phases
13875 (add-after 'unpack 'patch-ssh
13876 (lambda* (#:key inputs #:allow-other-keys)
13877 (substitute* "libcloud/compute/ssh.py"
13878 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
13879 "/bin/ssh" "'")))
13880 #t))
13881 (add-after 'unpack 'patch-tests
13882 (lambda _
13883 (substitute* "./libcloud/test/test_file_fixtures.py"
13884 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
13885 (("def _ascii") "def _raw_data(self, method, url, body, headers):
13886 return (httplib.OK,
13887 \"1234abcd\",
13888 {\"test\": \"value\"},
13889 httplib.responses[httplib.OK])
13890 def _ascii"))
13891 (substitute* "libcloud/test/compute/test_ssh_client.py"
13892 (("class ShellOutSSHClientTests")
13893 "@unittest.skip(\"Guix container doesn't have ssh service\")
13894class ShellOutSSHClientTests")
13895 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
13896 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
13897 (("'.xF0', '.x90', '.x8D', '.x88'")
13898 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
13899 #t))
13900 (add-before 'check 'copy-secret
13901 (lambda _
13902 (copy-file "libcloud/test/secrets.py-dist"
13903 "libcloud/test/secrets.py")
13904 #t)))))
13905 (inputs
13906 `(("openssh" ,openssh)))
13907 (propagated-inputs
13908 `(("python-paramiko" ,python-paramiko)
13909 ("python-requests" ,python-requests)))
13910 (native-inputs
13911 `(("python-lockfile" ,python-lockfile)
13912 ("python-mock" ,python-mock)
13913 ("python-pytest" ,python-pytest)
13914 ("python-pytest-runner" ,python-pytest-runner)
13915 ("python-requests-mock" ,python-requests-mock)))
13916 (home-page "https://libcloud.apache.org/")
13917 (synopsis "Unified Cloud API")
13918 (description "@code{libcloud} is a Python library for interacting with
13919many of the popular cloud service providers using a unified API.")
13920 (license license:asl2.0)))
13921
13922(define-public python2-apache-libcloud
13923 (package-with-python2 python-apache-libcloud))
13924
1639e0b7 13925(define-public python-smmap
44d10b1f 13926 (package
1639e0b7
MC
13927 (name "python-smmap")
13928 (version "3.0.1")
44d10b1f
RW
13929 (source
13930 (origin
13931 (method url-fetch)
1639e0b7 13932 (uri (pypi-uri "smmap" version))
44d10b1f 13933 (sha256
1639e0b7 13934 (base32 "0ijlnv60y8f41py1wnn5n1a1i81cxd9dfpdhr0k3cgkrcbz8850p"))))
44d10b1f
RW
13935 (build-system python-build-system)
13936 (native-inputs
13937 `(("python-nosexcover" ,python-nosexcover)))
13938 (home-page "https://github.com/Byron/smmap")
13939 (synopsis "Python sliding window memory map manager")
1639e0b7 13940 (description "@code{smmap} is a pure Python implementation of a sliding
44d10b1f
RW
13941window memory map manager.")
13942 (license license:bsd-3)))
13943
1639e0b7
MC
13944(define-public python-smmap2
13945 (deprecated-package "python-smmap2" python-smmap))
13946
13947(define-public python2-smmap
13948 (package-with-python2 python-smmap))
13949
44d10b1f 13950(define-public python2-smmap2
1639e0b7 13951 (deprecated-package "python2-smmap2" python2-smmap))
44d10b1f
RW
13952
13953(define-public python-regex
13954 (package
13955 (name "python-regex")
c187c9d7 13956 (version "2019.04.14")
44d10b1f
RW
13957 (source (origin
13958 (method url-fetch)
13959 (uri (pypi-uri "regex" version))
13960 (sha256
13961 (base32
c187c9d7
BT
13962 "1a6hhfs6l6snr1z654ay6wzbmwdkmv282fzfkd5hk2d1n73y8v6m"))))
13963 ;; TODO: Fix and enable regex_test.py tests that complain about the
13964 ;; test.support module not existing.
44d10b1f
RW
13965 (build-system python-build-system)
13966 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
13967 (synopsis "Alternative regular expression module")
13968 (description "This regular expression implementation is backwards-
13969compatible with the standard @code{re} module, but offers additional
13970functionality like full case-folding for case-insensitive matches in Unicode.")
13971 (license license:psfl)))
13972
13973(define-public python2-regex
13974 (package-with-python2 python-regex))
13975
13976(define-public python2-pyopengl
13977 (package
13978 (name "python2-pyopengl")
13979 (version "3.1.0")
13980 (source
13981 (origin
13982 (method url-fetch)
13983 (uri (pypi-uri "PyOpenGL" version))
13984 (sha256
13985 (base32
13986 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
13987 (arguments
13988 `(#:python ,python-2))
13989 (build-system python-build-system)
13990 (home-page "http://pyopengl.sourceforge.net")
13991 (synopsis "Standard OpenGL bindings for Python")
13992 (description
13993 "PyOpenGL is the most common cross platform Python binding to OpenGL and
13994related APIs. The binding is created using the standard @code{ctypes}
13995library.")
13996 (license license:bsd-3)))
13997
13998(define-public python2-pyopengl-accelerate
13999 (package
14000 (inherit python2-pyopengl)
14001 (name "python2-pyopengl-accelerate")
14002 (version "3.1.0")
14003 (source
14004 (origin
14005 (method url-fetch)
14006 (uri (pypi-uri "PyOpenGL-accelerate" version))
14007 (sha256
14008 (base32
14009 "0464c1ifzk0k92lyndikmvzjgnx1y25r7bkkc8pnxm4kp1q4czwj"))))
14010 (synopsis "Acceleration code for PyOpenGL")
14011 (description
14012 "This is the Cython-coded accelerator module for PyOpenGL.")))
14013
14014(define-public python-rencode
14015 (package
14016 (name "python-rencode")
14017 (version "1.0.5")
14018 (source
14019 (origin
14020 (method url-fetch)
14021 (uri (pypi-uri "rencode" version))
14022 (sha256
14023 (base32
14024 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
14025 (build-system python-build-system)
14026 (arguments
14027 `(#:phases
14028 (modify-phases %standard-phases
14029 (add-before 'check 'delete-bogus-test
14030 ;; This test requires /home/aresch/Downloads, which is not provided by
14031 ;; the build environment.
14032 (lambda _
14033 (delete-file "rencode/t.py")
14034 #t)))))
14035 (native-inputs `(("pkg-config" ,pkg-config)
14036 ("python-cython" ,python-cython)))
14037 (home-page "https://github.com/aresch/rencode")
14038 (synopsis "Serialization of heterogeneous data structures")
14039 (description
14040 "The @code{rencode} module is a data structure serialization library,
14041similar to @code{bencode} from the BitTorrent project. For complex,
14042heterogeneous data structures with many small elements, r-encoding stake up
14043significantly less space than b-encodings. This version of rencode is a
14044complete rewrite in Cython to attempt to increase the performance over the
14045pure Python module.")
14046 (license license:bsd-3)))
14047
14048(define-public python2-rencode
14049 (package-with-python2 python-rencode))
14050
14051(define-public python-xenon
14052 (package
14053 (name "python-xenon")
8c06d6d8 14054 (version "0.7.0")
44d10b1f
RW
14055 (source
14056 (origin
14057 (method url-fetch)
14058 (uri (pypi-uri "xenon" version))
14059 (sha256
14060 (base32
8c06d6d8 14061 "0nv207ql2wmh9q62503np056c4vf1c1hlsi5cvv5p5kx574k6r2y"))))
44d10b1f
RW
14062 (build-system python-build-system)
14063 (native-inputs
14064 `(("python-pyyaml" ,python-pyyaml)
14065 ("python-radon" ,python-radon)
14066 ("python-requests" ,python-requests)
14067 ("python-flake8" ,python-flake8)
14068 ("python-tox" ,python-tox)))
14069 (arguments
8c06d6d8
MC
14070 `(#:tests? #f ;test suite not shipped with the PyPI archive
14071 #:phases
44d10b1f
RW
14072 (modify-phases %standard-phases
14073 (add-before 'build 'patch-test-requirements
14074 (lambda _
14075 ;; Remove httpretty dependency for tests.
14076 (substitute* "setup.py"
14077 (("httpretty") ""))
14078 #t)))))
14079 (home-page "https://xenon.readthedocs.org/")
14080 (synopsis "Monitor code metrics for Python on your CI server")
14081 (description
14082 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
14083Ideally, @code{xenon} is run every time code is committed. Through command
14084line options, various thresholds can be set for the complexity of code. It
14085will fail (i.e. it will exit with a non-zero exit code) when any of these
14086requirements is not met.")
14087 (license license:expat)))
14088
14089(define-public python2-xenon
14090 (package-with-python2 python-xenon))
14091
14092(define-public python-pysocks
14093 (package
14094 (name "python-pysocks")
b8725cdf 14095 (version "1.7.0")
44d10b1f
RW
14096 (source
14097 (origin
14098 (method url-fetch)
14099 (uri (pypi-uri "PySocks" version))
14100 (sha256
14101 (base32
b8725cdf 14102 "0z4p31bpqm893cf87qqgb30k7nwd8kqfjwwjm5cvxb6zbyj1w0yr"))))
44d10b1f
RW
14103 (build-system python-build-system)
14104 (arguments `(#:tests? #f))
14105 (home-page "https://github.com/Anorov/PySocks")
14106 (synopsis "SOCKS client module")
14107 (description "@code{pysocks} is an updated and semi-actively maintained
14108version of @code{SocksiPy} with bug fixes and extra features.")
14109 (license license:bsd-3)))
14110
14111(define-public python2-pysocks
14112 (package-with-python2 python-pysocks))
14113
14114(define-public python-pydiff
14115 (package
14116 (name "python-pydiff")
14117 (version "0.2")
14118 (source
14119 (origin
14120 (method url-fetch)
14121 (uri (pypi-uri "pydiff" version))
14122 (sha256
14123 (base32
14124 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
14125 (build-system python-build-system)
14126 (home-page "https://github.com/myint/pydiff")
14127 (synopsis "Library to diff two Python files at the bytecode level")
14128 (description
14129 "@code{pydiff} makes it easy to look for actual code changes while
14130ignoring formatting changes.")
14131 (license license:expat)))
14132
14133(define-public python2-pydiff
14134 (package-with-python2 python-pydiff))
14135
14136(define-public python-tqdm
14137 (package
14138 (name "python-tqdm")
14139 (version "4.19.6")
14140 (source
14141 (origin
14142 (method url-fetch)
14143 (uri (pypi-uri "tqdm" version))
14144 (sha256
14145 (base32
14146 "1pw0ngm0zn9papdmkwipi3yih5c3di6d0w849bdmrraq4d2d9h2y"))))
14147 (build-system python-build-system)
14148 (native-inputs
14149 `(("python-flake8" ,python-flake8)
14150 ("python-nose" ,python-nose)
14151 ("python-coverage" ,python-coverage)))
14152 (home-page "https://github.com/tqdm/tqdm")
14153 (synopsis "Fast, extensible progress meter")
14154 (description
14155 "Make loops show a progress bar on the console by just wrapping any
14156iterable with @code{|tqdm(iterable)|}. Offers many options to define
14157design and layout.")
f875d76f
PL
14158 (license (list license:mpl2.0 license:expat))
14159 (properties `((python2-variant . ,(delay python2-tqdm))))))
44d10b1f
RW
14160
14161(define-public python2-tqdm
f875d76f
PL
14162 (let ((tqdm (package-with-python2
14163 (strip-python2-variant python-tqdm))))
14164 (package (inherit tqdm)
14165 (native-inputs `(("python2-functools32" ,python2-functools32)
14166 ,@(package-native-inputs tqdm))))))
44d10b1f
RW
14167
14168(define-public python-pkginfo
14169 (package
14170 (name "python-pkginfo")
14171 (version "1.4.2")
14172 (source
14173 (origin
14174 (method url-fetch)
14175 (uri (pypi-uri "pkginfo" version))
14176 (sha256
14177 (base32
14178 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
14179 (build-system python-build-system)
14180 (arguments
14181 ;; The tests are broken upstream.
14182 '(#:tests? #f))
14183 (home-page
14184 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
14185 (synopsis
14186 "Query metadatdata from sdists, bdists, and installed packages")
14187 (description
14188 "API to query the distutils metadata written in @file{PKG-INFO} inside a
14189source distriubtion (an sdist) or a binary distribution (e.g., created by
14190running bdist_egg). It can also query the EGG-INFO directory of an installed
14191distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
14192created by running @code{python setup.py develop}).")
14193 (license license:expat)))
14194
14195(define-public python2-pkginfo
14196 (package-with-python2 python-pkginfo))
14197
14198(define-public python-twine
14199 (package
14200 (name "python-twine")
14201 (version "1.9.1")
14202 (source
14203 (origin
14204 (method url-fetch)
14205 (uri (pypi-uri "twine" version))
14206 (sha256
14207 (base32
14208 "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a"))))
14209 (build-system python-build-system)
14210 (propagated-inputs
14211 `(("python-tqdm" ,python-tqdm)
14212 ("python-pkginfo" ,python-pkginfo)
14213 ("python-requests" ,python-requests)
14214 ("python-requests-toolbelt" ,python-requests-toolbelt)))
14215 (home-page "https://github.com/pypa/twine")
14216 (synopsis "Collection of utilities for interacting with PyPI")
14217 (description
14218 "@code{twine} currently supports registering projects and uploading
14219distributions. It authenticates the user over HTTPS, allows them to pre-sign
14220their files and supports any packaging format (including wheels).")
14221 (license license:asl2.0)))
14222
14223(define-public python2-twine
14224 (package-with-python2 python-twine))
14225
14226(define-public python-linecache2
14227 (package
14228 (name "python-linecache2")
14229 (version "1.0.0")
14230 (source
14231 (origin
14232 (method url-fetch)
14233 (uri (pypi-uri "linecache2" version))
14234 (sha256
14235 (base32
14236 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
14237 (build-system python-build-system)
14238 (arguments
14239 `(;; The tests depend on unittest2, and our version is a bit too old.
14240 #:tests? #f))
14241 (native-inputs
14242 `(("python-pbr" ,python-pbr-minimal)))
14243 (home-page
14244 "https://github.com/testing-cabal/linecache2")
14245 (synopsis "Backports of the linecache module")
14246 (description
14247 "The linecache module allows one to get any line from any file, while
14248attempting to optimize internally, using a cache, the common case where many
14249lines are read from a single file.")
14250 (license license:psfl)))
14251
14252(define-public python2-linecache2
14253 (package-with-python2 python-linecache2))
14254
14255(define-public python-traceback2
14256 (package
14257 (name "python-traceback2")
14258 (version "1.4.0")
14259 (source
14260 (origin
14261 (method url-fetch)
14262 (uri (pypi-uri "traceback2" version))
14263 (sha256
14264 (base32
14265 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
14266 (build-system python-build-system)
14267 (arguments
14268 `(;; python-traceback2 and python-unittest2 depend on one another.
14269 #:tests? #f))
14270 (native-inputs
14271 `(("python-pbr" ,python-pbr-minimal)))
14272 (propagated-inputs
14273 `(("python-linecache2" ,python-linecache2)))
14274 (home-page
14275 "https://github.com/testing-cabal/traceback2")
14276 (synopsis "Backports of the traceback module")
14277 (description
14278 "This module provides a standard interface to extract, format and print
14279stack traces of Python programs. It exactly mimics the behavior of the Python
14280interpreter when it prints a stack trace.")
14281 (license license:psfl)))
14282
14283(define-public python2-traceback2
14284 (package-with-python2 python-traceback2))
14285
14286(define-public python-ratelimiter
14287 (package
14288 (name "python-ratelimiter")
14289 (version "1.2.0")
14290 (source
14291 (origin
14292 (method url-fetch)
14293 (uri (pypi-uri "ratelimiter" version))
14294 (sha256
14295 (base32
14296 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
14297 (build-system python-build-system)
14298 (arguments
14299 '(#:tests? #f)) ; There are no tests in the pypi archive.
14300 (home-page "https://github.com/RazerM/ratelimiter")
14301 (synopsis "Simple rate limiting object")
14302 (description
14303 "The @code{ratelimiter} module ensures that an operation will not be
14304executed more than a given number of times during a given period.")
14305 (license license:asl2.0)))
14306
14307(define-public python2-ratelimiter
14308 (package-with-python2 python-ratelimiter))
14309
14310(define-public python-dukpy
14311 (package
14312 (name "python-dukpy")
14313 (version "0.3")
14314 (source
14315 (origin
5b77ebe1
TGR
14316 (method git-fetch)
14317 (uri (git-reference
14318 (url "https://github.com/kovidgoyal/dukpy.git")
14319 (commit (string-append "v" version))))
14320 (file-name (git-file-name name version))
44d10b1f 14321 (sha256
5b77ebe1 14322 (base32 "13h21nqzasv4zj32xs61brmc106pr2cx243672crcmwxxnjgaxls"))))
44d10b1f
RW
14323 (build-system python-build-system)
14324 (home-page "https://github.com/kovidgoyal/dukpy")
14325 (synopsis "Run JavaScript in python")
14326 (description
14327 "dukpy is a JavaScript runtime environment for Python using the duktape
14328embeddable JavaScript engine.")
14329 ;; Dukpy is licensed under MIT like the embedded duktape library,
14330 ;; with 'errors.c' as GPL3.
14331 (license (list license:expat license:gpl3))))
14332
14333(define-public python2-dukpy
14334 (package-with-python2 python-dukpy))
14335
14336(define-public python-jsonrpclib-pelix
14337 (package
14338 (name "python-jsonrpclib-pelix")
14339 (version "0.3.2")
14340 (source
14341 (origin
14342 (method url-fetch)
14343 (uri (pypi-uri "jsonrpclib-pelix" version))
14344 (sha256
14345 (base32
14346 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
14347 (build-system python-build-system)
14348 (arguments
14349 `(#:tests? #f)) ; no tests in PyPI tarball
14350 (home-page "https://github.com/tcalmant/jsonrpclib/")
14351 (synopsis "JSON-RPC 2.0 client library for Python")
14352 (description
14353 "This library implements the JSON-RPC v2.0
14354specification (backwards-compatible) as a client library for Python. This
14355version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
14356services.")
14357 (license license:asl2.0)))
14358
14359(define-public python2-jsonrpclib-pelix
14360 (package-with-python2 python-jsonrpclib-pelix))
14361
14362(define-public python-setuptools-scm-git-archive
14363 (package
14364 (name "python-setuptools-scm-git-archive")
14365 (version "1.0")
14366 (source
14367 (origin
14368 (method url-fetch)
14369 (uri (pypi-uri "setuptools_scm_git_archive" version))
14370 (sha256
14371 (base32
14372 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
14373 (build-system python-build-system)
14374 (native-inputs
14375 `(("python-pytest" ,python-pytest)))
14376 (propagated-inputs
14377 `(("python-setuptools-scm" ,python-setuptools-scm)))
14378 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
14379 (synopsis "Setuptools_scm plugin for git archives")
14380 (description
14381 "The setuptools_scm_git_archive package is a plugin to
14382setuptools_scm, which supports obtaining versions from git archives that
14383belong to tagged versions.")
14384 (license license:expat)))
14385
14386(define-public python2-setuptools-scm-git-archive
14387 (package-with-python2 python-setuptools-scm-git-archive))
14388
724a350c
RW
14389(define-public python-setuptools-git
14390 (package
14391 (name "python-setuptools-git")
14392 (version "1.2")
14393 (source
14394 (origin
14395 (method url-fetch)
14396 (uri (pypi-uri "setuptools-git" version))
14397 (sha256
14398 (base32
14399 "0i84qjwp5m0l9qagdjww2frdh63r37km1c48mrvbmaqsl1ni6r7z"))))
14400 (build-system python-build-system)
14401 (arguments
14402 `(#:phases
14403 (modify-phases %standard-phases
14404 ;; This is needed for tests.
14405 (add-after 'unpack 'configure-git
14406 (lambda _
14407 (setenv "HOME" "/tmp")
14408 (invoke "git" "config" "--global" "user.email" "guix")
14409 (invoke "git" "config" "--global" "user.name" "guix")
14410 #t)))))
14411 (native-inputs
14412 `(("git" ,git-minimal)))
14413 (home-page "https://github.com/msabramo/setuptools-git")
14414 (synopsis "Setuptools revision control system plugin for Git")
14415 (description
14416 "This package provides a plugin for Setuptools for revision control with
14417Git.")
14418 (license license:bsd-3)))
14419
44d10b1f
RW
14420(define-public python-pyclipper
14421 (package
14422 (name "python-pyclipper")
ff3d1b99 14423 (version "1.1.0.post3")
44d10b1f
RW
14424 (source
14425 (origin
14426 (method url-fetch)
14427 (uri (pypi-uri "pyclipper" version ".zip"))
14428 (sha256
ff3d1b99 14429 (base32 "164yksvqwqvwzh8f8lq92asg87hd8rvcy2xb5vm4y4ccvd5xgb7i"))
44d10b1f
RW
14430 (modules '((guix build utils)))
14431 (snippet
14432 '(begin
14433 ;; This file is generated by Cython.
14434 (delete-file "pyclipper/pyclipper.cpp") #t))))
14435 (build-system python-build-system)
14436 (arguments
14437 `(#:phases
14438 (modify-phases %standard-phases
14439 (add-before 'build 'cythonize-sources
14440 (lambda _
14441 (with-directory-excursion "pyclipper"
14442 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
14443 (propagated-inputs
14444 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
14445 (native-inputs
14446 `(("python-cython" ,python-cython)
14447 ("python-pytest" ,python-pytest)
14448 ("python-pytest-runner" ,python-pytest-runner)
14449 ("python-unittest2" ,python-unittest2)
14450 ("unzip" ,unzip)))
14451 (home-page "https://github.com/greginvm/pyclipper")
14452 (synopsis "Wrapper for Angus Johnson's Clipper library")
14453 (description
14454 "Pyclipper is a Cython wrapper for the C++ translation of the
14455Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
14456 (license license:expat)))
14457
14458(define-public python2-pyclipper
14459 (package-with-python2 python-pyclipper))
14460
14461(define-public python2-booleanoperations
14462 (package
14463 (name "python2-booleanoperations")
14464 (version "0.7.1")
14465 (source
14466 (origin
14467 (method url-fetch)
14468 (uri (pypi-uri "booleanOperations" version ".zip"))
14469 (sha256
14470 (base32
14471 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
14472 (build-system python-build-system)
14473 (arguments
14474 `(#:python ,python-2))
14475 (native-inputs
14476 `(("unzip" ,unzip)
14477 ("python2-pytest" ,python2-pytest)
14478 ("python2-pytest-runner" ,python2-pytest-runner)))
14479 (propagated-inputs
14480 `(("python-fonttools" ,python2-fonttools)
14481 ("python-pyclipper" ,python2-pyclipper)
14482 ("python-ufolib" ,python2-ufolib)))
14483 (home-page "https://github.com/typemytype/booleanOperations")
14484 (synopsis "Boolean operations on paths")
14485 (description
14486 "BooleanOperations provides a Python library that enables
14487boolean operations on paths.")
14488 (license license:expat)))
14489
14490(define-public python-tempdir
14491 (package
14492 (name "python-tempdir")
14493 (version "0.7.1")
14494 (source
14495 (origin
14496 (method url-fetch)
14497 (uri (pypi-uri "tempdir" version))
14498 (sha256
14499 (base32
14500 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
14501 (build-system python-build-system)
14502 (home-page "https://pypi.org/project/tempdir/")
14503 (arguments
14504 ;; the package has no tests
14505 '(#:tests? #f))
14506 (synopsis "Python library for managing temporary directories")
14507 (description
14508 "This library manages temporary directories that are automatically
14509deleted with all their contents when they are no longer needed. It is
14510particularly convenient for use in tests.")
14511 (license license:expat)))
14512
14513(define-public python2-tempdir
14514 (package-with-python2 python-tempdir))
14515
14516(define-public python-activepapers
14517 (package
14518 (name "python-activepapers")
14519 (version "0.2.2")
14520 (source
14521 (origin
14522 (method url-fetch)
14523 (uri (pypi-uri "ActivePapers.Py" version))
14524 (sha256
14525 (base32
14526 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
14527 (build-system python-build-system)
14528 (arguments
14529 `(#:modules ((ice-9 ftw)
14530 (srfi srfi-1)
14531 (guix build utils)
14532 (guix build python-build-system))
14533
14534 #:phases
14535 (modify-phases %standard-phases
14536 (add-after 'unpack 'delete-python2-code
14537 (lambda _
14538 (for-each delete-file
14539 '("lib/activepapers/builtins2.py"
14540 "lib/activepapers/standardlib2.py"
14541 "lib/activepapers/utility2.py"))))
14542 (replace 'check
14543 (lambda _
14544 ;; Deactivate the test cases that download files
14545 (setenv "NO_NETWORK_ACCESS" "1")
14546 ;; For some strange reason, some tests fail if nosetests runs all
14547 ;; test modules in a single execution. They pass if each test
14548 ;; module is run individually.
14549 (for-each (lambda (filename)
14550 (invoke "nosetests"
14551 (string-append "tests/" filename)))
14552 (scandir "tests"
14553 (lambda (filename)
14554 (string-suffix? ".py" filename)))))))))
14555 (native-inputs
14556 `(("python-tempdir" ,python-tempdir)
14557 ("python-nose" ,python-nose)))
14558 (propagated-inputs
14559 `(("python-h5py" ,python-h5py)))
26827dfe 14560 (home-page "https://www.activepapers.org/")
44d10b1f
RW
14561 (synopsis "Executable papers for scientific computing")
14562 (description
14563 "ActivePapers is a tool for working with executable papers, which
14564combine data, code, and documentation in single-file packages,
14565suitable for publication as supplementary material or on repositories
14566such as figshare or Zenodo.")
14567 (properties `((python2-variant . ,(delay python2-activepapers))))
14568 (license license:bsd-3)))
14569
14570(define-public python2-activepapers
14571 (let ((base (package-with-python2
14572 (strip-python2-variant python-activepapers))))
14573 (package
14574 (inherit base)
14575 (arguments
14576 (substitute-keyword-arguments (package-arguments base)
14577 ((#:phases phases)
14578 `(modify-phases ,phases
14579 (delete 'delete-python2-code)
14580 (add-after 'unpack 'delete-python3-code
14581 (lambda _
14582 (for-each delete-file
14583 '("lib/activepapers/builtins3.py"
14584 "lib/activepapers/standardlib3.py"
14585 "lib/activepapers/utility3.py")))))))))))
14586
14587(define-public python-semver
14588 (package
14589 (name "python-semver")
594280b1 14590 (version "2.9.0")
44d10b1f 14591 (source
2ecbba24
BG
14592 (origin
14593 (method url-fetch)
14594 (uri (pypi-uri "semver" version))
14595 (sha256
14596 (base32
14597 "183kg1rhzz3hqizvphkd8hlbf1zxfx8737zhfkmqzxi71jmdw7pd"))))
44d10b1f 14598 (build-system python-build-system)
44d10b1f
RW
14599 (native-inputs
14600 `(("python-tox" ,python-tox)
14601 ("python-virtualenv" ,python-virtualenv)))
14602 (home-page "https://github.com/k-bx/python-semver")
14603 (synopsis "Python helper for Semantic Versioning")
14604 (description "This package provides a Python library for
14605@url{Semantic Versioning, http://semver.org/}.")
14606 (license license:bsd-3)))
14607
14608(define-public python2-semver
14609 (package-with-python2 python-semver))
14610
14611(define-public python-pyro4
14612 (package
14613 (name "python-pyro4")
3ce91d44 14614 (version "4.77")
44d10b1f
RW
14615 (source
14616 (origin
14617 (method url-fetch)
14618 (uri (pypi-uri "Pyro4" version))
14619 (sha256
3ce91d44 14620 (base32 "0gsjg869y4gpy265s1gj1f2qy6jn5iz8r2bwwnq78r1r5yi15zib"))))
44d10b1f 14621 (build-system python-build-system)
3ce91d44
GL
14622 (arguments
14623 '(#:tests? #f)) ;FIXME: Some tests require network access.
14624 (native-inputs
14625 `(("python-cloudpickle" ,python-cloudpickle)
14626 ("python-dill" ,python-dill)
14627 ("python-msgpack" ,python-msgpack)))
44d10b1f
RW
14628 (propagated-inputs
14629 `(("python-serpent" ,python-serpent)))
14630 (home-page "https://pyro4.readthedocs.io")
14631 (synopsis "Distributed object middleware for Python")
14632 (description
14633 "Pyro enables you to build applications in which objects can talk to each
14634other over the network. You can just use normal Python method calls to call
14635objects on other machines, also known as remote procedure calls (RPC).")
14636 (license license:expat)))
14637
14638(define-public python2-pyro
14639 (package
14640 (name "python2-pyro")
14641 (version "3.16")
14642 (source
14643 (origin
14644 (method url-fetch)
14645 (uri (pypi-uri "Pyro" version))
14646 (file-name (string-append "Pyro-" version ".tar.gz"))
14647 (sha256
14648 (base32
14649 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
14650 (build-system python-build-system)
14651 (arguments
14652 ;; Pyro is not compatible with Python 3
14653 `(#:python ,python-2
14654 ;; Pyro has no test cases for automatic execution
14655 #:tests? #f))
14656 (home-page "http://pythonhosted.org/Pyro/")
14657 (synopsis "Distributed object manager for Python")
14658 (description "Pyro is a Distributed Object Technology system
14659written in Python that is designed to be easy to use. It resembles
14660Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
14661which is a system and language independent Distributed Object Technology
14662and has much more to offer than Pyro or RMI. Pyro 3.x is no
14663longer maintained. New projects should use Pyro4 instead, which
14664is the new Pyro version that is actively developed.")
14665 (license license:expat)))
14666
14667(define-public python2-scientific
14668 (package
14669 (name "python2-scientific")
14670 (version "2.9.4")
14671 (source
14672 (origin
c695f011
KH
14673 (method git-fetch)
14674 (uri (git-reference
14675 (url "https://github.com/khinsen/ScientificPython")
14676 (commit (string-append "rel" version))))
14677 (file-name (git-file-name name version))
44d10b1f
RW
14678 (sha256
14679 (base32
c695f011 14680 "16l48aj9fps9r7jyk8gpxppwrv0fqvlc13sayxskz28r5s6sjwbl"))))
44d10b1f
RW
14681 (build-system python-build-system)
14682 (inputs
14683 `(("netcdf" ,netcdf)))
14684 (propagated-inputs
14685 `(("python-numpy" ,python2-numpy-1.8)
14686 ("python-pyro" ,python2-pyro)))
14687 (arguments
14688 ;; ScientificPython is not compatible with Python 3
14689 `(#:python ,python-2
14690 #:tests? #f ; No test suite
14691 #:phases
14692 (modify-phases %standard-phases
14693 (replace 'build
14694 (lambda* (#:key inputs #:allow-other-keys)
77e61e25
RW
14695 (invoke "python" "setup.py" "build"
14696 (string-append "--netcdf_prefix="
14697 (assoc-ref inputs "netcdf"))))))))
c695f011 14698 (home-page "http://dirac.cnrs-orleans.fr/ScientificPython")
44d10b1f
RW
14699 (synopsis "Python modules for scientific computing")
14700 (description "ScientificPython is a collection of Python modules that are
14701useful for scientific computing. Most modules are rather general (Geometry,
14702physical units, automatic derivatives, ...) whereas others are more
14703domain-specific (e.g. netCDF and PDB support). The library is currently
14704not actively maintained and works only with Python 2 and NumPy < 1.9.")
14705 (license license:cecill-c)))
14706
14707(define-public python2-mmtk
14708 (package
14709 (name "python2-mmtk")
fe9b72c5 14710 (version "2.7.12")
44d10b1f
RW
14711 (source
14712 (origin
fe9b72c5
KH
14713 (method git-fetch)
14714 (uri (git-reference
14715 (url "https://github.com/khinsen/MMTK")
14716 (commit (string-append "rel" version))))
14717 (file-name (git-file-name name version))
44d10b1f
RW
14718 (sha256
14719 (base32
fe9b72c5 14720 "1fqwh3ba9jd42nigvn5shndgwb1zy7kh9520ncvqci7n8ffjr6p1"))))
44d10b1f
RW
14721 (build-system python-build-system)
14722 (native-inputs
14723 `(("netcdf" ,netcdf)))
14724 (propagated-inputs
14725 `(("python-scientific" ,python2-scientific)
14726 ("python-tkinter" ,python-2 "tk")))
14727 (arguments
14728 `(#:python ,python-2
14729 #:tests? #f
14730 #:phases
14731 (modify-phases %standard-phases
14732 (add-before 'build 'includes-from-scientific
14733 (lambda* (#:key inputs #:allow-other-keys)
14734 (mkdir-p "Include/Scientific")
14735 (copy-recursively
14736 (string-append
14737 (assoc-ref inputs "python-scientific")
14738 "/include/python2.7/Scientific")
14739 "Include/Scientific"))))))
14740 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
14741 (synopsis "Python library for molecular simulation")
14742 (description "MMTK is a library for molecular simulations with an emphasis
14743on biomolecules. It provides widely used methods such as Molecular Dynamics
14744and normal mode analysis, but also basic routines for implementing new methods
14745for simulation and analysis. The library is currently not actively maintained
14746and works only with Python 2 and NumPy < 1.9.")
14747 (license license:cecill-c)))
14748
14749(define-public python-phonenumbers
14750 (package
14751 (name "python-phonenumbers")
14752 (version "8.9.1")
14753 (source
14754 (origin
14755 (method url-fetch)
14756 (uri (pypi-uri "phonenumbers" version))
14757 (sha256
14758 (base32
14759 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
14760 (build-system python-build-system)
14761 (home-page
14762 "https://github.com/daviddrysdale/python-phonenumbers")
14763 (synopsis
14764 "Python library for dealing with international phone numbers")
14765 (description
14766 "This package provides a Python port of Google's libphonenumber library.")
14767 (license license:asl2.0)))
14768
14769(define-public python2-phonenumbers
14770 (package-with-python2 python-phonenumbers))
14771
14772(define-public python-send2trash
14773 (package
14774 (name "python-send2trash")
d9b0216b 14775 (version "1.5.0")
44d10b1f 14776 (source
d9b0216b 14777 (origin (method git-fetch)
44d10b1f 14778 ;; Source tarball on PyPI doesn't include tests.
d9b0216b
RW
14779 (uri (git-reference
14780 (url "https://github.com/hsoft/send2trash.git")
14781 (commit version)))
14782 (file-name (git-file-name name version))
44d10b1f
RW
14783 (sha256
14784 (base32
d9b0216b 14785 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
44d10b1f
RW
14786 (build-system python-build-system)
14787 (arguments
14788 '(#:phases
14789 (modify-phases %standard-phases
14790 (add-before 'check 'pre-check
14791 (lambda _
14792 (mkdir-p "/tmp/foo")
14793 (setenv "HOME" "/tmp/foo")
14794 #t)))))
14795 (home-page "https://github.com/hsoft/send2trash")
14796 (synopsis "Send files to the user's @file{~/Trash} directory")
14797 (description "This package provides a Python library to send files to the
14798user's @file{~/Trash} directory.")
20b3fde7 14799 (properties `((python2-variant . ,(delay python2-send2trash))))
44d10b1f
RW
14800 (license license:bsd-3)))
14801
14802(define-public python2-send2trash
14803 (package
f32164ab 14804 (inherit (package-with-python2 (strip-python2-variant python-send2trash)))
44d10b1f
RW
14805 (arguments
14806 (substitute-keyword-arguments (package-arguments python-send2trash)
14807 ((#:phases phases)
14808 `(modify-phases ,phases
14809 (add-before 'check 'setenv
14810 (lambda _
14811 (setenv "PYTHONPATH"
14812 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
4782a06f 14813 #t))))))))
44d10b1f
RW
14814
14815(define-public python-yapf
14816 (package
14817 (name "python-yapf")
19ba75dc 14818 (version "0.29.0")
44d10b1f
RW
14819 (source
14820 (origin
14821 (method url-fetch)
14822 (uri (pypi-uri "yapf" version))
14823 (sha256
14824 (base32
19ba75dc 14825 "1pj3xzblmbssshi889b6n9hwqbjpabw6j0fimlng2sshd3226bki"))))
44d10b1f
RW
14826 (build-system python-build-system)
14827 (home-page "https://github.com/google/yapf")
14828 (synopsis "Formatter for Python code")
14829 (description "YAPF is a formatter for Python code. It's based off of
14830@dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
14831takes the code and reformats it to the best formatting that conforms to the
14832style guide, even if the original code didn't violate the style guide.")
14833 (license license:asl2.0)))
14834
14835(define-public python2-yapf
14836 (package-with-python2 python-yapf))
14837
14838(define-public python-gyp
14839 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
14840 (revision "0"))
14841 (package
14842 (name "python-gyp")
14843 ;; Google does not release versions,
14844 ;; based on second most recent commit date.
14845 (version (git-version "0.0.0" revision commit))
14846 (source
14847 (origin
14848 ;; Google does not release tarballs,
14849 ;; git checkout is needed.
14850 (method git-fetch)
14851 (uri (git-reference
14852 (url "https://chromium.googlesource.com/external/gyp")
14853 (commit commit)))
14854 (file-name (git-file-name name version))
14855 (sha256
14856 (base32
14857 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
14858 (build-system python-build-system)
14859 (home-page "https://gyp.gsrc.io/")
14860 (synopsis "GYP is a Meta-Build system")
14861 (description
14862 "GYP builds build systems for large, cross platform applications.
14863It can be used to generate XCode projects, Visual Studio projects, Ninja build
14864files, and Makefiles.")
14865 (license license:bsd-3))))
14866
14867(define-public python2-gyp
14868 (package-with-python2 python-gyp))
14869
14870(define-public python-whatever
14871 (package
14872 (name "python-whatever")
97610a66 14873 (version "0.6")
44d10b1f
RW
14874 (source
14875 (origin
ac0ea38c
EF
14876 (method git-fetch)
14877 (uri (git-reference
14878 (url "https://github.com/Suor/whatever")
14879 (commit version)))
14880 (file-name (git-file-name name version))
44d10b1f 14881 (sha256
ac0ea38c 14882 (base32 "1q7ajgqjfivxqsqgnhp4lc4p6jxyh4zprcsdbpd6dw54inaf0av5"))))
44d10b1f
RW
14883 (build-system python-build-system)
14884 (arguments
14885 `(#:phases
14886 (modify-phases %standard-phases
14887 (replace 'check
14888 (lambda _
14889 (invoke "py.test"))))))
14890 (native-inputs
14891 `(("python-pytest" ,python-pytest)))
14892 (home-page "http://github.com/Suor/whatever")
14893 (synopsis "Make anonymous functions by partial application of operators")
14894 (description "@code{whatever} provides an easy way to make anonymous
14895functions by partial application of operators.")
14896 (license license:bsd-3)))
14897
14898(define-public python2-whatever
14899 (package-with-python2 python-whatever))
14900
14901(define-public python-funcy
14902 (package
14903 (name "python-funcy")
9e396ab8 14904 (version "1.11")
44d10b1f
RW
14905 (source
14906 (origin
a85c6027
TGR
14907 (method git-fetch)
14908 (uri (git-reference
14909 (url "https://github.com/Suor/funcy.git")
14910 (commit version)))
44d10b1f 14911 (sha256
a85c6027
TGR
14912 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
14913 (file-name (git-file-name name version))))
44d10b1f
RW
14914 (build-system python-build-system)
14915 (arguments
14916 `(#:phases
14917 (modify-phases %standard-phases
14918 (replace 'check
14919 (lambda _
14920 (invoke "py.test"))))))
14921 (native-inputs
14922 `(("python-pytest" ,python-pytest)
14923 ("python-whatever" ,python-whatever)))
14924 (home-page "http://github.com/Suor/funcy")
14925 (synopsis "Functional tools")
14926 (description "@code{funcy} is a library that provides functional tools.
14927Examples are:
14928@enumerate
14929@item merge - Merges collections of the same type
14930@item walk - Type-preserving map
14931@item select - Selects a part of a collection
14932@item take - Takes the first n items of a collection
14933@item first - Takes the first item of a collection
14934@item remove - Predicated-removes items of a collection
14935@item concat - Concatenates two collections
14936@item flatten - Flattens a collection with subcollections
14937@item distinct - Returns only distinct items
14938@item split - Predicated-splits a collection
14939@item split_at - Splits a collection at a given item
14940@item group_by - Groups items by group
14941@item pairwise - Pairs off adjacent items
14942@item partial - Partially-applies a function
14943@item curry - Curries a function
14944@item compose - Composes functions
14945@item complement - Complements a predicate
14946@item all_fn - \"all\" with predicate
14947@end enumerate")
14948 (license license:bsd-3)))
14949
14950(define-public python2-funcy
14951 (package-with-python2 python-funcy))
14952
14953(define-public python-isoweek
14954 (package
14955 (name "python-isoweek")
14956 (version "1.3.3")
14957 (source
14958 (origin
14959 (method url-fetch)
14960 (uri (pypi-uri "isoweek" version))
14961 (sha256
14962 (base32
14963 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
14964 (build-system python-build-system)
14965 (home-page "https://github.com/gisle/isoweek")
14966 (synopsis "Objects representing a week")
14967 (description "The @code{isoweek} module provide the class Week that
14968implements the week definition of ISO 8601. This standard also defines
14969a notation for identifying weeks; yyyyWww (where the W is a literal).
14970Week instances stringify to this form.")
14971 (license license:bsd-3)))
14972
14973(define-public python2-isoweek
14974 (package-with-python2 python-isoweek))
14975
14976(define-public python-tokenize-rt
14977 (package
14978 (name "python-tokenize-rt")
14979 (version "2.0.1")
14980 (source
14981 (origin
14982 (method url-fetch)
14983 (uri (pypi-uri "tokenize-rt" version))
14984 (sha256
14985 (base32
14986 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
14987 (build-system python-build-system)
14988 (home-page "https://github.com/asottile/tokenize-rt")
14989 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
14990 (description
14991 "This Python library is a wrapper around @code{tokenize} from the Python
14992standard library. It provides two additional tokens @code{ESCAPED_NL} and
14993@code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
14994and @code{tokens_to_src} to roundtrip.")
14995 (license license:expat)))
14996
14997(define-public python-future-fstrings
14998 (package
14999 (name "python-future-fstrings")
15000 (version "0.4.1")
15001 (source
15002 (origin
15003 (method url-fetch)
15004 (uri (pypi-uri "future_fstrings" version))
15005 (sha256
15006 (base32
15007 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
15008 (build-system python-build-system)
15009 (propagated-inputs
15010 `(("python-tokenize-rt" ,python-tokenize-rt)))
15011 (home-page "https://github.com/asottile/future-fstrings")
15012 (synopsis "Backport of fstrings to Python < 3.6")
15013 (description
15014 "This package provides a UTF-8 compatible encoding
15015@code{future_fstrings}, which performs source manipulation. It decodes the
15016source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
15017@code{f} strings.")
15018 (license license:expat)))
15019
dae2eb1c
MC
15020(define-public python-typed-ast
15021 (package
15022 (name "python-typed-ast")
bae89583 15023 (version "1.4.0")
dae2eb1c
MC
15024 (source
15025 (origin
bae89583
MO
15026 (method git-fetch)
15027 (uri (git-reference
15028 (url "https://github.com/python/typed_ast.git")
15029 (commit version)))
dae2eb1c 15030 (sha256
bae89583
MO
15031 (base32 "0l0hz809f7i356kmqkvfsaswiidb98j9hs9rrjnfawzqcbffzgyb"))
15032 (file-name (git-file-name name version))))
dae2eb1c
MC
15033 (build-system python-build-system)
15034 (arguments
15035 `(#:modules ((guix build utils)
15036 (guix build python-build-system)
15037 (ice-9 ftw)
15038 (srfi srfi-1)
15039 (srfi srfi-26))
15040 #:phases
15041 (modify-phases %standard-phases
15042 (replace 'check
15043 (lambda _
15044 (let ((cwd (getcwd)))
15045 (setenv "PYTHONPATH"
15046 (string-append cwd "/build/"
15047 (find (cut string-prefix? "lib" <>)
15048 (scandir (string-append cwd "/build")))
15049 ":"
15050 (getenv "PYTHONPATH"))))
15051 (invoke "pytest")
15052 #t)))))
15053 (native-inputs `(("python-pytest" ,python-pytest)))
15054 (home-page "https://github.com/python/typed_ast")
15055 (synopsis "Fork of Python @code{ast} modules with type comment support")
15056 (description "This package provides a parser similar to the standard
15057@code{ast} library. Unlike @code{ast}, the parsers in @code{typed_ast}
15058include PEP 484 type comments and are independent of the version of Python
15059under which they are run. The @code{typed_ast} parsers produce the standard
15060Python AST (plus type comments), and are both fast and correct, as they are
15061based on the CPython 2.7 and 3.7 parsers.")
15062 ;; See the file "LICENSE" for the details.
15063 (license (list license:psfl
15064 license:asl2.0
15065 license:expat)))) ;ast27/Parser/spark.py
15066
44d10b1f
RW
15067(define-public python-typing
15068 (package
15069 (name "python-typing")
15070 (version "3.6.6")
15071 (source
15072 (origin
15073 (method url-fetch)
15074 (uri (pypi-uri "typing" version))
15075 (sha256
15076 (base32
15077 "0ba9acs4awx15bf9v3nrs781msbd2nx826906nj6fqks2bvca9s0"))))
15078 (build-system python-build-system)
15079 (home-page "https://docs.python.org/3/library/typing.html")
15080 (synopsis "Type hints for Python")
15081 (description "This is a backport of the standard library @code{typing}
15082module to Python versions older than 3.5. Typing defines a standard notation
15083for Python function and variable type annotations. The notation can be used
15084for documenting code in a concise, standard format, and it has been designed
15085to also be used by static and runtime type checkers, static analyzers, IDEs
15086and other tools.")
15087 (license license:psfl)))
15088
15089(define-public python2-typing
15090 (package-with-python2 python-typing))
15091
f89d443b
VC
15092(define-public python-typing-extensions
15093 (package
15094 (name "python-typing-extensions")
15095 (version "3.7.2")
15096 (source
15097 (origin
15098 (method url-fetch)
15099 (uri (pypi-uri "typing_extensions" version))
15100 (sha256
15101 (base32
15102 "0wfsv71pvkyf2na938l579jh0v3kzl6g744ijgnahcwd4d9x0b7v"))))
15103 (build-system python-build-system)
15104 (home-page
15105 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
15106 (synopsis "Experimental type hints for Python")
15107 (description
15108 "The typing_extensions module contains additional @code{typing} hints not
15109yet present in the of the @code{typing} standard library.
15110Included are implementations of:
15111@enumerate
15112@item ClassVar
15113@item ContextManager
15114@item Counter
15115@item DefaultDict
15116@item Deque
15117@item NewType
15118@item NoReturn
15119@item overload
15120@item Protocol
15121@item runtime
15122@item Text
15123@item Type
15124@item TYPE_CHECKING
15125@item AsyncGenerator
15126@end enumerate\n")
15127 (license license:psfl)))
15128
44d10b1f
RW
15129(define-public bpython
15130 (package
15131 (name "bpython")
4de93b2f 15132 (version "0.18")
44d10b1f
RW
15133 (source
15134 (origin
15135 (method url-fetch)
15136 (uri (pypi-uri "bpython" version))
15137 (sha256
4de93b2f 15138 (base32 "1hl6frgvr2lqaxqczl8amg9xih32b3gzv429vs0qrjb8wpdj1k2n"))))
44d10b1f
RW
15139 (build-system python-build-system)
15140 (arguments
15141 `(#:phases
15142 (modify-phases %standard-phases
15143 (add-after 'unpack 'remove-failing-test
15144 (lambda _
15145 ;; Remove failing test. FIXME: make it pass
15146 (delete-file "bpython/test/test_args.py")
15147 #t))
15148 (add-after 'wrap 'add-aliases
15149 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
15150 (lambda* (#:key outputs #:allow-other-keys)
15151 (let ((out (assoc-ref outputs "out")))
15152 (for-each
15153 (lambda (old new)
15154 (symlink old (string-append out "/bin/" new)))
15155 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
15156 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
15157 #t)))))
15158 (propagated-inputs
15159 `(("python-pygments" ,python-pygments)
15160 ("python-requests" ,python-requests)
4de93b2f 15161 ("python-babel" ,python-babel) ; optional, for internationalization
44d10b1f
RW
15162 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
15163 ("python-greenlet" ,python-greenlet)
4de93b2f 15164 ("python-urwid" ,python-urwid) ; for bpython-urwid only
44d10b1f
RW
15165 ("python-six" ,python-six)))
15166 (native-inputs
15167 `(("python-sphinx" ,python-sphinx)
15168 ("python-mock" ,python-mock)))
15169 (home-page "https://bpython-interpreter.org/")
15170 (synopsis "Fancy interface to the Python interpreter")
15171 (description "Bpython is a fancy interface to the Python
15172interpreter. bpython's main features are
15173
15174@enumerate
15175@item in-line syntax highlighting,
15176@item readline-like autocomplete with suggestions displayed as you type,
15177@item expected parameter list for any Python function,
15178@item \"rewind\" function to pop the last line of code from memory and
15179 re-evaluate,
15180@item send the code you've entered off to a pastebin,
15181@item save the code you've entered to a file, and
15182@item auto-indentation.
15183@end enumerate")
15184 (license license:expat)))
15185
15186(define-public bpython2
15187 (let ((base (package-with-python2
15188 (strip-python2-variant bpython))))
15189 (package (inherit base)
15190 (name "bpython2")
15191 (arguments
15192 `(#:python ,python-2
15193 #:phases
15194 (modify-phases %standard-phases
15195 (add-after 'unpack 'remove-failing-test
15196 (lambda _
15197 ;; Remove failing test. FIXME: make it pass
15198 (delete-file "bpython/test/test_args.py")
15199 ;; Disable failing test-cases (renaming inhibits they are
15200 ;; discovered)
15201 (substitute* "bpython/test/test_curtsies_repl.py"
15202 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
15203 (string-append a "xxx_off_" b))
15204 (("^(\\s*def )(test_complex\\W)" _ a b)
15205 (string-append a "xxx_off_" b)))
15206 #t))
15207 (add-before 'build 'rename-scripts
15208 ;; rename the scripts to bypthon2, bpdb2, etc.
15209 (lambda _
15210 (substitute* "setup.py"
15211 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
15212 (string-append name "2" rest "\n"))
15213 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
15214 (string-append name "2" (or sub "") rest "\n")))
15215 #t))))))))
15216
15217(define-public python-pyinotify
15218 (package
15219 (name "python-pyinotify")
15220 (version "0.9.6")
15221 (source (origin
15222 (method url-fetch)
15223 (uri (pypi-uri "pyinotify" version))
15224 (sha256
15225 (base32
15226 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
15227 (build-system python-build-system)
15228 (arguments `(#:tests? #f)) ;no tests
15229 (home-page "https://github.com/seb-m/pyinotify")
15230 (synopsis "Python library for monitoring inotify events")
15231 (description
15232 "@code{pyinotify} provides a Python interface for monitoring
15233file system events on Linux.")
15234 (license license:expat)))
15235
15236(define-public python2-pyinotify
15237 (package-with-python2 python-pyinotify))
15238
15239;; Ada parser uses this version.
15240(define-public python2-quex-0.67.3
15241 (package
15242 (name "python2-quex")
15243 (version "0.67.3")
15244 (source
15245 (origin
15246 (method url-fetch)
15247 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
15248 (version-major+minor version)
15249 "/quex-" version ".zip"))
15250 (sha256
15251 (base32
15252 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
15253 (build-system python-build-system)
15254 (native-inputs
15255 `(("unzip" ,unzip)))
15256 (arguments
15257 `(#:python ,python-2
15258 #:tests? #f
15259 #:phases
15260 (modify-phases %standard-phases
15261 (delete 'configure)
15262 (delete 'build)
15263 (replace 'install
15264 (lambda* (#:key outputs #:allow-other-keys)
15265 (let* ((out (assoc-ref outputs "out"))
15266 (share/quex (string-append out "/share/quex"))
15267 (bin (string-append out "/bin")))
15268 (copy-recursively "." share/quex)
15269 (mkdir-p bin)
15270 (symlink (string-append share/quex "/quex-exe.py")
15271 (string-append bin "/quex"))
15272 #t))))))
15273 (native-search-paths
15274 (list (search-path-specification
15275 (variable "QUEX_PATH")
15276 (files '("share/quex")))))
15277 (home-page "http://quex.sourceforge.net/")
15278 (synopsis "Lexical analyzer generator in Python")
15279 (description "@code{quex} is a lexical analyzer generator in Python.")
15280 (license license:lgpl2.1+))) ; Non-military
15281
15282(define-public python2-quex
15283 (package (inherit python2-quex-0.67.3)
15284 (name "python2-quex")
15285 (version "0.68.1")
15286 (source
15287 (origin
15288 (method url-fetch)
15289 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
15290 (sha256
15291 (base32
15292 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
15293 (file-name (string-append name "-" version ".tar.gz"))))))
15294
15295(define-public python-more-itertools
15296 (package
15297 (name "python-more-itertools")
1b066827 15298 (version "7.1.0")
44d10b1f
RW
15299 (source
15300 (origin
15301 (method url-fetch)
15302 (uri (pypi-uri "more-itertools" version))
15303 (sha256
15304 (base32
1b066827 15305 "16phg2f2dvm6ci5wr49ncha5lmc0m2in3bsl33c61vzca4gkvd4b"))))
44d10b1f 15306 (build-system python-build-system)
44d10b1f
RW
15307 (home-page "https://github.com/erikrose/more-itertools")
15308 (synopsis "More routines for operating on iterables, beyond itertools")
15309 (description "Python's built-in @code{itertools} module implements a
15310number of iterator building blocks inspired by constructs from APL, Haskell,
15311and SML. @code{more-itertools} includes additional building blocks for
15312working with iterables.")
47f66348 15313 (properties `((python2-variant . ,(delay python2-more-itertools))))
44d10b1f
RW
15314 (license license:expat)))
15315
47f66348 15316;; The 5.x series are the last versions supporting Python 2.7.
44d10b1f 15317(define-public python2-more-itertools
47f66348
MB
15318 (package
15319 (inherit python-more-itertools)
15320 (name "python2-more-itertools")
15321 (version "5.0.0")
15322 (source (origin
15323 (method url-fetch)
15324 (uri (pypi-uri "more-itertools" version))
15325 (sha256
15326 (base32
15327 "1r12cm6mcdwdzz7d47a6g4l437xsvapdlgyhqay3i2nrlv03da9q"))))
15328 (arguments
15329 `(#:python ,python2-minimal))
15330 (propagated-inputs
15331 `(("python2-six" ,python2-six-bootstrap)))))
44d10b1f
RW
15332
15333(define-public python-latexcodec
15334 (package
15335 (name "python-latexcodec")
f3415ba5 15336 (version "1.0.7")
44d10b1f
RW
15337 (source
15338 (origin
15339 (method url-fetch)
15340 (uri (pypi-uri "latexcodec" version))
15341 (sha256
f3415ba5 15342 (base32 "0wnp3yqcgx0rpy8dz51vh75lbp2qif67da19zi7m3ca98n887hgb"))))
44d10b1f
RW
15343 (build-system python-build-system)
15344 (inputs
15345 `(("python-six" ,python-six)))
15346 (home-page "https://readthedocs.org/projects/latexcodec/")
15347 (synopsis "Work with LaTeX code in Python")
15348 (description "Lexer and codec to work with LaTeX code in Python.")
15349 (license license:expat)))
15350
15351(define-public python-pybtex
15352 (package
15353 (name "python-pybtex")
9441a9c1 15354 (version "0.22.2")
44d10b1f
RW
15355 (source
15356 (origin
15357 (method url-fetch)
15358 (uri (pypi-uri "pybtex" version))
15359 (sha256
9441a9c1 15360 (base32 "070wfcmxrd7xg1si421mi9150gmx2qwx431nwf69sq3hhmgnx080"))))
44d10b1f
RW
15361 (build-system python-build-system)
15362 (native-inputs
15363 `(("python-nose" ,python-nose)))
15364 (inputs
15365 `(("python-latexcodec" ,python-latexcodec)
15366 ("python-pyyaml" ,python-pyyaml)
15367 ("python-six" ,python-six)))
15368 (arguments
15369 `(#:test-target "nosetests"))
15370 (home-page "https://pybtex.org/")
15371 (synopsis "BibTeX-compatible bibliography processor")
15372 (description "Pybtex is a BibTeX-compatible bibliography processor written
15373in Python. You can simply type pybtex instead of bibtex.")
15374 (license license:expat)))
15375
15376(define-public python-onetimepass
15377 (package
15378 (name "python-onetimepass")
15379 (version "1.0.1")
15380 (source
15381 (origin
15382 (method url-fetch)
15383 (uri (pypi-uri "onetimepass" version))
15384 (sha256
15385 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
15386 (build-system python-build-system)
15387 (propagated-inputs `(("python-six" ,python-six)))
15388 (home-page "https://github.com/tadeck/onetimepass/")
15389 (synopsis "One-time password library")
15390 (description "Python one-time password library for HMAC-based (HOTP) and
15391time-based (TOTP) passwords.")
15392 (license license:expat)))
15393
15394(define-public python-parso
15395 (package
15396 (name "python-parso")
170d5844 15397 (version "0.5.2")
44d10b1f
RW
15398 (source
15399 (origin
15400 (method url-fetch)
15401 (uri (pypi-uri "parso" version))
15402 (sha256
15403 (base32
170d5844 15404 "1qgvrkpma7vylrk047mxxvqd66nwqk978n3ig2w8iz9m3bgjbksm"))))
44d10b1f
RW
15405 (native-inputs
15406 `(("python-pytest" ,python-pytest)))
15407 (build-system python-build-system)
4eb97c25
MC
15408 (arguments
15409 `(#:phases (modify-phases %standard-phases
15410 (replace 'check
15411 (lambda _ (invoke "pytest" "-vv"))))))
44d10b1f
RW
15412 (home-page "https://github.com/davidhalter/parso")
15413 (synopsis "Python Parser")
15414 (description "Parso is a Python parser that supports error recovery and
15415round-trip parsing for different Python versions (in multiple Python versions).
15416Parso is also able to list multiple syntax errors in your Python file.")
15417 (license license:expat)))
15418
15419(define-public python2-parso
15420 (package-with-python2 python-parso))
15421
15422(define-public python-async-generator
15423 (package
15424 (name "python-async-generator")
94fcbf8d 15425 (version "1.10")
44d10b1f
RW
15426 (source
15427 (origin
15428 (method url-fetch)
15429 (uri (pypi-uri "async_generator" version))
15430 (sha256
15431 (base32
94fcbf8d 15432 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
44d10b1f
RW
15433 (build-system python-build-system)
15434 (native-inputs
15435 `(("python-pytest" ,python-pytest)))
15436 (home-page "https://github.com/python-trio/async_generator")
15437 (synopsis "Async generators and context managers for Python 3.5+")
15438 (description "@code{async_generator} back-ports Python 3.6's native async
15439generators and Python 3.7's context managers into Python 3.5.")
15440 ;; Dual licensed.
15441 (license (list license:expat license:asl2.0))))
15442
15443(define-public python-async-timeout
15444 (package
15445 (name "python-async-timeout")
15446 (version "3.0.1")
15447 (source
15448 (origin
15449 (method url-fetch)
15450 (uri (pypi-uri "async-timeout" version))
15451 (sha256
15452 (base32
15453 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
15454 (build-system python-build-system)
15455 (home-page "https://github.com/aio-libs/async_timeout/")
15456 (synopsis "Timeout context manager for asyncio programs")
15457 (description "@code{async-timeout} provides a timeout timeout context
15458manager compatible with @code{asyncio}.")
15459 (license license:asl2.0)))
15460
15461(define-public python-glob2
15462 (package
15463 (name "python-glob2")
4df49d19 15464 (version "0.7")
8fa2bcc7
TGR
15465 (source
15466 (origin
15467 (method git-fetch)
15468 (uri (git-reference
15469 (url "https://github.com/miracle2k/python-glob2.git")
4df49d19 15470 (commit (string-append "v" version))))
8fa2bcc7
TGR
15471 (file-name (git-file-name name version))
15472 (sha256
4df49d19 15473 (base32 "160nh2ay9lw2hi0rixpzb2k87r6ql56k0j2cm87lqz8xc8zbw919"))))
44d10b1f
RW
15474 (build-system python-build-system)
15475 (home-page "https://github.com/miracle2k/python-glob2/")
15476 (synopsis "Extended Version of the python buildin glob module")
15477 (description "This is an extended version of the Python
15478@url{http://docs.python.org/library/glob.html, built-in glob module} which
15479adds:
15480
15481@itemize
15482@item The ability to capture the text matched by glob patterns, and return
15483those matches alongside the file names.
15484@item A recursive @code{**} globbing syntax, akin for example to the
15485@code{globstar} option of Bash.
15486@item The ability to replace the file system functions used, in order to glob
15487on virtual file systems.
15488@item Compatible with Python 2 and Python 3 (tested with 3.3).
15489@end itemize
15490
15491Glob2 currently based on the glob code from Python 3.3.1.")
15492 (license license:bsd-2)))
15493
15494(define-public python2-glob2
15495 (package-with-python2 python-glob2))
15496
15497(define-public python-gipc
15498 (package
15499 (name "python-gipc")
15500 (version "0.6.0")
15501 (source
15502 (origin
15503 (method url-fetch)
15504 (uri (pypi-uri "gipc" version ".zip"))
15505 (sha256
15506 (base32
15507 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
15508 (build-system python-build-system)
15509 (native-inputs
15510 `(("unzip" ,unzip)))
15511 (propagated-inputs
15512 `(("python-gevent" ,python-gevent)))
fd3ae040 15513 (home-page "https://gehrcke.de/gipc/")
44d10b1f
RW
15514 (synopsis "Child process management in the context of gevent")
15515 (description "Usage of Python's multiprocessing package in a
15516gevent-powered application may raise problems. With @code{gipc},
15517process-based child processes can safely be created anywhere within a
15518gevent-powered application.")
15519 (license license:expat)))
15520
15521(define-public python2-gipc
15522 (package-with-python2 python-gipc))
15523
15524(define-public python-fusepy
15525 (package
15526 (name "python-fusepy")
15527 (version "2.0.4")
15528 (source
15529 (origin
15530 (method url-fetch)
15531 (uri (pypi-uri "fusepy" version))
15532 (sha256
15533 (base32
15534 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
15535 (build-system python-build-system)
15536 (arguments
15537 `(#:phases
15538 (modify-phases %standard-phases
15539 (add-before 'build 'set-library-file-name
15540 (lambda* (#:key inputs #:allow-other-keys)
15541 (let ((fuse (assoc-ref inputs "fuse")))
15542 (substitute* "fuse.py"
15543 (("find_library\\('fuse'\\)")
15544 (string-append "'" fuse "/lib/libfuse.so'")))
15545 #t))))))
15546 (propagated-inputs
15547 `(("fuse" ,fuse)))
15548 (home-page "https://github.com/fusepy/fusepy")
15549 (synopsis "Simple ctypes bindings for FUSE")
15550 (description "Python module that provides a simple interface to FUSE and
15551MacFUSE. The binding is created using the standard @code{ctypes} library.")
15552 (license license:isc)))
15553
15554(define-public python2-fusepy
15555 (package-with-python2 python-fusepy))
15556
15557(define-public python2-gdrivefs
15558 (package
15559 (name "python2-gdrivefs")
15560 (version "0.14.9")
15561 (source
15562 (origin
15563 (method url-fetch)
15564 (uri (pypi-uri "gdrivefs" version))
15565 (sha256
15566 (base32
15567 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
15568 (build-system python-build-system)
15569 (arguments
15570 `(#:python ,python-2
15571 #:phases
15572 (modify-phases %standard-phases
15573 (add-before 'build 'patch-setup-py
15574 (lambda _
15575 ;; Update requirements from dependency==version
15576 ;; to dependency>=version
15577 (substitute* "gdrivefs/resources/requirements.txt"
15578 (("==") ">="))
15579 #t)))))
15580 (native-inputs
15581 `(("python2-gipc" ,python2-gipc)
15582 ("python2-gevent" ,python2-gevent)
15583 ("python2-greenlet" ,python2-greenlet)
15584 ("python2-httplib2" ,python2-httplib2)
15585 ("python2-uritemplate" ,python2-uritemplate)
15586 ("python2-oauth2client" ,python2-oauth2client)
15587 ("python2-six" ,python2-six)))
15588 (propagated-inputs
15589 `(("python2-dateutil" ,python2-dateutil)
15590 ("python2-fusepy" ,python2-fusepy)
15591 ("python2-google-api-client" ,python2-google-api-client)))
15592 (home-page "https://github.com/dsoprea/GDriveFS")
15593 (synopsis "Mount Google Drive as a local file system")
15594 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
15595under Python 2.7.")
15596 (license license:gpl2)))
15597
15598(define-public pybind11
15599 (package
15600 (name "pybind11")
0690f324 15601 (version "2.4.3")
44d10b1f
RW
15602 (source (origin
15603 (method git-fetch)
15604 (uri (git-reference
15605 (url "https://github.com/pybind/pybind11.git")
15606 (commit (string-append "v" version))))
15607 (sha256
15608 (base32
0690f324 15609 "0k89w4bsfbpzw963ykg1cyszi3h3nk393qd31m6y46pcfxkqh4rd"))
44d10b1f
RW
15610 (file-name (git-file-name name version))))
15611 (build-system cmake-build-system)
15612 (native-inputs
3cf579e9 15613 `(("python" ,python-wrapper)
ae8db9ce
LC
15614
15615 ;; The following dependencies are used for tests.
15616 ("python-pytest" ,python-pytest)
15617 ("catch" ,catch-framework2-1)
15618 ("eigen" ,eigen)))
44d10b1f 15619 (arguments
ae8db9ce
LC
15620 `(#:configure-flags
15621 (list (string-append "-DCATCH_INCLUDE_DIR="
15622 (assoc-ref %build-inputs "catch")
15623 "/include/catch"))
15624
3cf579e9
LC
15625 #:phases (modify-phases %standard-phases
15626 (add-after 'install 'install-python
15627 (lambda* (#:key outputs #:allow-other-keys)
15628 (let ((out (assoc-ref outputs "out")))
15629 (with-directory-excursion "../source"
15630 (setenv "PYBIND11_USE_CMAKE" "yes")
15631 (invoke "python" "setup.py" "install"
15632 "--single-version-externally-managed"
15633 "--root=/"
15634 (string-append "--prefix=" out)))))))
15635
ae8db9ce 15636 #:test-target "check"))
44d10b1f
RW
15637 (home-page "https://github.com/pybind/pybind11/")
15638 (synopsis "Seamless operability between C++11 and Python")
ab17297a
LC
15639 (description
15640 "@code{pybind11} is a lightweight header-only library that exposes C++
15641types in Python and vice versa, mainly to create Python bindings of existing
15642C++ code. Its goals and syntax are similar to the @code{Boost.Python}
15643library: to minimize boilerplate code in traditional extension modules by
15644inferring type information using compile-time introspection.")
65eada58 15645 (license license:bsd-3)))
44d10b1f
RW
15646
15647(define-public python-fasteners
15648 (package
15649 (name "python-fasteners")
15650 (version "0.14.1")
15651 (source
15652 (origin
15653 (method url-fetch)
15654 (uri (pypi-uri "fasteners" version))
15655 (sha256
15656 (base32
15657 "063y20kx01ihbz2mziapmjxi2cd0dq48jzg587xdsdp07xvpcz22"))))
15658 (build-system python-build-system)
15659 (propagated-inputs
15660 `(("python-monotonic" ,python-monotonic)
15661 ("python-six" ,python-six)
15662 ("python-testtools" ,python-testtools)))
15663 (home-page "https://github.com/harlowja/fasteners")
15664 (synopsis "Python package that provides useful locks")
15665 (description
15666 "This package provides a Python program that provides following locks:
15667
15668@itemize
15669@item Locking decorator
15670@item Reader-writer locks
15671@item Inter-process locks
15672@item Generic helpers
15673@end itemize\n")
15674 (properties `((python2-variant . ,(delay python2-fasteners))))
15675 (license license:asl2.0)))
15676
15677(define-public python2-fasteners
15678 (let ((base (package-with-python2 (strip-python2-variant python-fasteners))))
15679 (package
15680 (inherit base)
15681 (propagated-inputs
15682 `(("python2-futures" ,python2-futures)
15683 ,@(package-propagated-inputs base))))))
15684
15685(define-public python-requests-file
15686 (package
15687 (name "python-requests-file")
15688 (version "1.4.3")
15689 (source
15690 (origin
15691 (method url-fetch)
15692 (uri (pypi-uri "requests-file" version))
15693 (sha256
15694 (base32
15695 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
15696 (build-system python-build-system)
15697 (propagated-inputs
15698 `(("python-requests" ,python-requests)
15699 ("python-six" ,python-six)))
15700 (home-page
15701 "https://github.com/dashea/requests-file")
15702 (synopsis "File transport adapter for Requests")
15703 (description
15704 "Requests-File is a transport adapter for use with the Requests Python
52beae7b 15705library to allow local file system access via @code{file://} URLs.")
44d10b1f
RW
15706 (license license:asl2.0)))
15707
15708(define-public python2-requests-file
15709 (package-with-python2 python-requests-file))
15710
15711(define-public python-tldextract
15712 (package
15713 (name "python-tldextract")
15714 (version "2.2.0")
15715 (source
15716 (origin
15717 (method url-fetch)
15718 (uri (pypi-uri "tldextract" version))
15719 (sha256
15720 (base32
15721 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
15722 (build-system python-build-system)
15723 (native-inputs
15724 `(("python-pytest" ,python-pytest)
15725 ("python-responses" ,python-responses)))
15726 (propagated-inputs
15727 `(("python-idna" ,python-idna)
15728 ("python-requests" ,python-requests)
15729 ("python-requests-file" ,python-requests-file)))
15730 (home-page
15731 "https://github.com/john-kurkowski/tldextract")
15732 (synopsis
15733 "Separate the TLD from the registered domain and subdomains of a URL")
15734 (description
15735 "TLDExtract accurately separates the TLD from the registered domain and
15736subdomains of a URL, using the Public Suffix List. By default, this includes
15737the public ICANN TLDs and their exceptions. It can optionally support the
15738Public Suffix List's private domains as well.")
15739 (license license:bsd-3)))
15740
15741(define-public python2-tldextract
15742 (package-with-python2 python-tldextract))
15743
15744(define-public python-pynamecheap
15745 (package
15746 (name "python-pynamecheap")
15747 (version "0.0.3")
15748 (source
15749 (origin
15750 (method url-fetch)
15751 (uri (pypi-uri "PyNamecheap" version))
15752 (sha256
15753 (base32
15754 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
15755 (build-system python-build-system)
15756 (propagated-inputs
15757 `(("python-requests" ,python-requests)))
15758 (home-page
15759 "https://github.com/Bemmu/PyNamecheap")
15760 (synopsis
15761 "Namecheap API client in Python")
15762 (description
15763 "PyNamecheap is a Namecheap API client in Python.")
15764 (license license:expat)))
15765
15766(define-public python2-pynamecheap
15767 (package-with-python2 python-pynamecheap))
15768
15769(define-public python-dns-lexicon
15770 (package
15771 (name "python-dns-lexicon")
15772 (version "2.4.0")
15773 (source
15774 (origin
15775 (method url-fetch)
15776 (uri (pypi-uri "dns-lexicon" version))
15777 (sha256
15778 (base32
15779 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
15780 (build-system python-build-system)
15781 (arguments
15782 `(#:tests? #f)) ;requires internet access
15783 (propagated-inputs
15784 `(("python-future" ,python-future)
15785 ("python-pynamecheap" ,python-pynamecheap)
15786 ("python-requests" ,python-requests)
15787 ("python-tldextract" ,python-tldextract)
15788 ("python-urllib3" ,python-urllib3)))
15789 (home-page "https://github.com/AnalogJ/lexicon")
15790 (synopsis
15791 "Manipulate DNS records on various DNS providers")
15792 (description
15793 "Lexicon provides a way to manipulate DNS records on multiple DNS
15794providers in a standardized way. It has a CLI but it can also be used as a
15795Python library. It was designed to be used in automation, specifically with
15796Let's Encrypt.")
15797 (license license:expat)))
15798
15799(define-public python2-dns-lexicon
15800 (package-with-python2 python-dns-lexicon))
15801
15802(define-public python-commandlines
15803 (package
15804 (name "python-commandlines")
15805 (version "0.4.1")
15806 (source
15807 (origin
15808 (method url-fetch)
15809 (uri (pypi-uri "commandlines" version))
15810 (sha256
15811 (base32
15812 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
15813 (build-system python-build-system)
15814 (home-page "https://github.com/chrissimpkins/commandlines")
15815 (synopsis "Command line argument to object parsing library")
15816 (description
15817 "@code{Commandlines} is a Python library for command line application
15818development that supports command line argument parsing, command string
15819validation testing and application logic.")
15820 (license license:expat)))
15821
15822;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
15823;; python-numba. They have a very unflexible relationship.
15824(define-public python-numba
15825 (package
15826 (name "python-numba")
65f84096 15827 (version "0.46.0")
44d10b1f
RW
15828 (source
15829 (origin
15830 (method url-fetch)
15831 (uri (pypi-uri "numba" version))
15832 (sha256
15833 (base32
65f84096 15834 "1vnfzcq6fcnkmdms6114d49awvvj5181fl7z1wlha27qc2paxjy2"))))
44d10b1f
RW
15835 (build-system python-build-system)
15836 (arguments
15837 `(#:modules ((guix build utils)
15838 (guix build python-build-system)
15839 (ice-9 ftw)
15840 (srfi srfi-1)
15841 (srfi srfi-26))
15842 #:phases
15843 (modify-phases %standard-phases
15844 (add-after 'unpack 'disable-proprietary-features
15845 (lambda _
15846 (setenv "NUMBA_DISABLE_HSA" "1")
15847 (setenv "NUMBA_DISABLE_CUDA" "1")
15848 #t))
15849 (add-after 'unpack 'remove-failing-tests
15850 (lambda _
65f84096 15851 ;; FIXME: These tests fail for unknown reasons:
44d10b1f
RW
15852 ;; test_non_writable_pycache, test_non_creatable_pycache, and
15853 ;; test_frozen (all in numba.tests.test_dispatcher.TestCache).
15854 (substitute* "numba/tests/test_dispatcher.py"
15855 (("def test(_non_writable_pycache)" _ m)
15856 (string-append "def guix_skip" m))
15857 (("def test(_non_creatable_pycache)" _ m)
15858 (string-append "def guix_skip" m))
15859 (("def test(_frozen)" _ m)
15860 (string-append "def guix_skip" m)))
15861
15862 ;; These tests fail because we don't run the tests from the build
15863 ;; directory: test_setup_py_distutils, test_setup_py_setuptools
65f84096 15864 ;; They are in numba.tests.test_pycc.TestDistutilsSupport.
44d10b1f
RW
15865 (substitute* "numba/tests/test_pycc.py"
15866 (("def test(_setup_py_distutils|_setup_py_setuptools)" _ m)
15867 (string-append "def guix_skip" m)))
65f84096
BG
15868
15869 ;; These tests fail because our version of Python does not have
15870 ;; a recognizable front-end for the Numba distribution to use
15871 ;; to check against.
15872 (substitute* "numba/tests/test_entrypoints.py"
15873 (("def test(_init_entrypoint)" _ m)
15874 (string-append "def guix_skip" m)))
15875 (substitute* "numba/tests/test_jitclasses.py"
15876 (("def test(_jitclass_longlabel_not_truncated)" _ m)
15877 (string-append "def guix_skip" m)))
44d10b1f
RW
15878 #t))
15879 (replace 'check
15880 (lambda _
15881 (let ((cwd (getcwd)))
15882 (setenv "PYTHONPATH"
15883 (string-append cwd "/build/"
15884 (find (cut string-prefix? "lib" <>)
15885 (scandir (string-append cwd "/build")))
15886 ":"
15887 (getenv "PYTHONPATH")))
15888 ;; Something is wrong with the PYTHONPATH when running the
15889 ;; tests from the build directory, as it complains about not being
15890 ;; able to import certain modules.
15891 (with-directory-excursion "/tmp"
15892 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))
15893 #t)))))
15894 (propagated-inputs
15895 `(("python-llvmlite" ,python-llvmlite)
15896 ("python-numpy" ,python-numpy)
15897 ("python-singledispatch" ,python-singledispatch)))
15898 ;; Needed for tests.
15899 (inputs
15900 `(("python-jinja2" ,python-jinja2)
15901 ("python-pygments" ,python-pygments)))
15902 (home-page "https://numba.pydata.org")
15903 (synopsis "Compile Python code using LLVM")
15904 (description "Numba gives you the power to speed up your applications with
15905high performance functions written directly in Python. With a few
15906annotations, array-oriented and math-heavy Python code can be just-in-time
15907compiled to native machine instructions, similar in performance to C, C++ and
15908Fortran, without having to switch languages or Python interpreters.
15909
15910Numba works by generating optimized machine code using the LLVM compiler
15911infrastructure at import time, runtime, or statically (using the included pycc
15912tool).")
15913 (license license:bsd-3)))
15914
241409cd
RW
15915(define-public python-numcodecs
15916 (package
15917 (name "python-numcodecs")
15918 (version "0.6.4")
15919 (source
15920 (origin
15921 (method url-fetch)
15922 (uri (pypi-uri "numcodecs" version))
15923 (sha256
15924 (base32
15925 "0kbfr8pl3x9glsypbq8hzim003f16ml1b1cvgrh4w1sdvgal6j7g"))))
15926 (build-system python-build-system)
15927 (propagated-inputs
15928 `(("python-numpy" ,python-numpy)
15929 ("python-msgpack" ,python-msgpack)))
15930 (native-inputs
15931 `(("python-pytest" ,python-pytest)
15932 ("python-setuptools-scm" ,python-setuptools-scm)))
15933 (home-page "https://github.com/zarr-developers/numcodecs")
15934 (synopsis "Buffer compression and transformation codecs")
15935 (description
15936 "This Python package provides buffer compression and transformation
15937codecs for use in data storage and communication applications.")
15938 (license license:expat)))
15939
8e04b233
RW
15940(define-public python-asciitree
15941 (package
15942 (name "python-asciitree")
15943 (version "0.3.3")
15944 (source
15945 (origin
15946 (method url-fetch)
15947 (uri (pypi-uri "asciitree" version))
15948 (sha256
15949 (base32
15950 "0vhgri2m2xlnibhz4xwn4hpbc7xacisxjqrk6k5kyppq96vbk92a"))))
15951 (build-system python-build-system)
15952 (home-page "https://github.com/mbr/asciitree")
15953 (synopsis "Draws ASCII trees")
15954 (description "This package draws tree structures using characters.")
15955 (license license:expat)))
15956
7032c1cc
RW
15957(define-public python-zarr
15958 (package
15959 (name "python-zarr")
15960 (version "2.4.0")
15961 (source
15962 (origin
15963 (method url-fetch)
15964 (uri (pypi-uri "zarr" version))
15965 (sha256
15966 (base32
15967 "026n3sjzjv2gmwx6y72b8ij0hk42bc8zdbvfj5gdqzd4i6wj3ajk"))))
15968 (build-system python-build-system)
15969 (arguments
15970 `(#:phases
15971 (modify-phases %standard-phases
15972 (add-after 'unpack 'disable-service-tests
15973 (lambda _
15974 (setenv "ZARR_TEST_ABS" "0")
15975 (setenv "ZARR_TEST_MONGO" "0")
15976 (setenv "ZARR_TEST_REDIS" "0")
15977 #t))
15978 (replace 'check
15979 (lambda _
15980 (invoke "pytest" "-vv" "-k" "not lmdb")
15981 #t)))))
15982 (propagated-inputs
15983 `(("python-asciitree" ,python-asciitree)
15984 ("python-fasteners" ,python-fasteners)
15985 ("python-numcodecs" ,python-numcodecs)
15986 ("python-numpy" ,python-numpy)))
15987 (native-inputs
15988 `(("python-pytest" ,python-pytest)
15989 ("python-setuptools-scm" ,python-setuptools-scm)))
15990 (home-page "https://github.com/zarr-developers/zarr-python")
15991 (synopsis "Chunked, compressed, N-dimensional arrays for Python")
15992 (description
15993 "This package provides an implementation of chunked, compressed,
15994N-dimensional arrays for Python.")
15995 (license license:expat)))
15996
44d10b1f
RW
15997(define-public python-anndata
15998 (package
15999 (name "python-anndata")
a098b349 16000 (version "0.7.1")
44d10b1f
RW
16001 (source
16002 (origin
16003 (method url-fetch)
16004 (uri (pypi-uri "anndata" version))
16005 (sha256
16006 (base32
a098b349 16007 "0rnfbpr55j1a1bi2kd4mz444741hrn74kz90h5rnjr59jmpfnh09"))))
44d10b1f 16008 (build-system python-build-system)
a098b349
RW
16009 (arguments
16010 `(#:phases
16011 (modify-phases %standard-phases
16012 (add-after 'unpack 'delete-inconvenient-tests
16013 (lambda _
16014 ;; This test depends on python-scikit-learn.
16015 (delete-file "anndata/tests/test_inplace_subset.py")
16016 #t))
16017 (delete 'check)
16018 (add-after 'install 'check
16019 (lambda* (#:key inputs outputs #:allow-other-keys)
16020 (add-installed-pythonpath inputs outputs)
16021 (invoke "pytest" "-vv"))))))
44d10b1f
RW
16022 (propagated-inputs
16023 `(("python-h5py" ,python-h5py)
a098b349 16024 ("python-importlib-metadata" ,python-importlib-metadata)
44d10b1f 16025 ("python-natsort" ,python-natsort)
a098b349
RW
16026 ("python-numcodecs" ,python-numcodecs)
16027 ("python-packaging" ,python-packaging)
44d10b1f 16028 ("python-pandas" ,python-pandas)
a098b349
RW
16029 ("python-scipy" ,python-scipy)
16030 ("python-zarr" ,python-zarr)))
16031 (native-inputs
16032 `(("python-joblib" ,python-joblib)
16033 ("python-pytest" ,python-pytest)
16034 ("python-setuptools-scm" ,python-setuptools-scm)))
44d10b1f
RW
16035 (home-page "https://github.com/theislab/anndata")
16036 (synopsis "Annotated data for data analysis pipelines")
16037 (description "Anndata is a package for simple (functional) high-level APIs
16038for data analysis pipelines. In this context, it provides an efficient,
16039scalable way of keeping track of data together with learned annotations and
16040reduces the code overhead typically encountered when using a mostly
16041object-oriented library such as @code{scikit-learn}.")
16042 (license license:bsd-3)))
16043
16044(define-public python-dill
16045 (package
16046 (name "python-dill")
32be3577 16047 (version "0.3.1.1")
44d10b1f
RW
16048 (source
16049 (origin
16050 (method url-fetch)
16051 (uri (pypi-uri "dill" version))
16052 (sha256
32be3577 16053 (base32 "1704g8z70d210ksgbccs2v545v9w0wc6lx15m296alb7jf0yzn22"))))
44d10b1f 16054 (build-system python-build-system)
32be3577
MIP
16055 (arguments
16056 `(#:phases
16057 (modify-phases %standard-phases
16058 (replace 'check
16059 (lambda _
16060 (with-directory-excursion "/tmp"
16061 (invoke "nosetests" "-v"))
16062 #t)))))
16063 (native-inputs
16064 `(("python-nose" ,python-nose)))
16065 (home-page "https://pypi.org/project/dill/")
44d10b1f
RW
16066 (synopsis "Serialize all of Python")
16067 (description "Dill extends Python's @code{pickle} module for serializing
16068and de-serializing Python objects to the majority of the built-in Python
16069types. Dill provides the user the same interface as the @code{pickle} module,
16070and also includes some additional features. In addition to pickling Python
16071objects, @code{dill} provides the ability to save the state of an interpreter
61985d65 16072session in a single command. Hence, it would be feasible to save a
44d10b1f
RW
16073interpreter session, close the interpreter, ship the pickled file to another
16074computer, open a new interpreter, unpickle the session and thus continue from
16075the saved state of the original interpreter session.")
16076 (license license:bsd-3)))
16077
16078(define-public python-multiprocess
16079 (package
16080 (name "python-multiprocess")
fcc4e9e7 16081 (version "0.70.9")
44d10b1f
RW
16082 (source
16083 (origin
16084 (method url-fetch)
16085 (uri (pypi-uri "multiprocess" version))
16086 (sha256
16087 (base32
fcc4e9e7 16088 "1r882nvd44xqwbrclwqx5rhs80l6809rcvpc7pkpgnij06cvvmcz"))))
44d10b1f 16089 (build-system python-build-system)
fcc4e9e7
MIP
16090 (arguments
16091 `(#:phases
16092 (modify-phases %standard-phases
16093 (add-after 'unpack 'disable-broken-tests
16094 (lambda _
16095 ;; This test is broken as there is no keyboard interrupt.
16096 (substitute* "py3.7/multiprocess/tests/__init__.py"
16097 (("^(.*)def test_wait_result"
16098 line indent)
16099 (string-append indent
16100 "@unittest.skip(\"Disabled by Guix\")\n"
16101 line)))
16102 #t))
16103 ;; Tests must be run after installation.
16104 (delete 'check)
16105 (add-after 'install 'check
16106 (lambda* (#:key inputs outputs #:allow-other-keys)
16107 (add-installed-pythonpath inputs outputs)
16108 (invoke "python" "-m" "multiprocess.tests")
16109 #t)))))
44d10b1f
RW
16110 (propagated-inputs
16111 `(("python-dill" ,python-dill)))
fcc4e9e7 16112 (home-page "https://pypi.org/project/multiprocess/")
44d10b1f
RW
16113 (synopsis "Multiprocessing and multithreading in Python")
16114 (description
16115 "This package is a fork of the multiprocessing Python package, a package
16116which supports the spawning of processes using the API of the standard
16117library's @code{threading} module.")
16118 (license license:bsd-3)))
16119
16120(define-public python-toolz
16121 (package
16122 (name "python-toolz")
16123 (version "0.9.0")
16124 (source
16125 (origin
16126 (method url-fetch)
16127 (uri (pypi-uri "toolz" version))
16128 (sha256
16129 (base32
16130 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
16131 (build-system python-build-system)
16132 ;; FIXME: tests cannot be computed: "Can't perform this operation for
16133 ;; unregistered loader type"
16134 (arguments '(#:tests? #f))
16135 (home-page "https://github.com/pytoolz/toolz/")
16136 (synopsis "List processing tools and functional utilities")
16137 (description
16138 "This package provides a set of utility functions for iterators,
16139functions, and dictionaries.")
16140 (license license:bsd-3)))
16141
16142(define-public python2-toolz
16143 (package-with-python2 python-toolz))
16144
16145(define-public python-cytoolz
16146 (package
16147 (name "python-cytoolz")
16148 (version "0.9.0.1")
16149 (source
16150 (origin
16151 (method url-fetch)
16152 (uri (pypi-uri "cytoolz" version))
16153 (sha256
16154 (base32
16155 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
16156 (build-system python-build-system)
16157 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
16158 ;; 'exceptions'"
16159 (arguments '(#:tests? #f))
16160 (propagated-inputs
16161 `(("python-toolz" ,python-toolz)))
16162 (native-inputs
16163 `(("python-cython" ,python-cython)))
16164 (home-page "https://github.com/pytoolz/cytoolz")
16165 (synopsis "High performance functional utilities")
16166 (description
16167 "The cytoolz package implements the same API as provided by toolz. The
16168main differences are that @code{cytoolz} is faster and cytoolz offers a C API
16169that is accessible to other projects developed in Cython.")
16170 (license license:bsd-3)))
16171
16172(define-public python-sortedcontainers
16173 (package
16174 (name "python-sortedcontainers")
b244f166 16175 (version "2.1.0")
44d10b1f
RW
16176 (source
16177 (origin
16178 (method url-fetch)
16179 (uri (pypi-uri "sortedcontainers" version))
16180 (sha256
16181 (base32
b244f166 16182 "0fm0w5id2yhqld95hg2m636vjgkz377rvgdfqaxc25vbylr9lklp"))))
44d10b1f
RW
16183 (build-system python-build-system)
16184 (native-inputs
16185 `(("python-tox" ,python-tox)))
16186 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
16187 (synopsis "Sorted List, Sorted Dict, Sorted Set")
16188 (description
16189 "This package provides a sorted collections library, written in
16190pure-Python.")
16191 (license license:asl2.0)))
16192
16193(define-public python-cloudpickle
16194 (package
16195 (name "python-cloudpickle")
16196 (version "0.6.1")
16197 (source
16198 (origin
16199 (method url-fetch)
16200 (uri (pypi-uri "cloudpickle" version))
16201 (sha256
16202 (base32
16203 "1wdw89mlm7fqa3fm3ymskx05jrys66n8m1z1a8s0mss0799ahsgi"))))
16204 (build-system python-build-system)
16205 ;; FIXME: there are 5 errors in 122 tests:
16206 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.CloudPickleTest)
16207 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.CloudPickleTest)
16208 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.Protocol2CloudPickleTest)
16209 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.Protocol2CloudPickleTest)
16210 ;; ERROR: test_temp_file (tests.cloudpickle_file_test.CloudPickleFileTests)
16211 ;; TypeError: cannot serialize '_io.BufferedRandom' object
16212 (arguments '(#:tests? #f))
16213 (native-inputs
16214 `(("python-pytest" ,python-pytest)
16215 ("python-mock" ,python-mock)
16216 ("python-tornado" ,python-tornado)))
16217 (home-page "https://github.com/cloudpipe/cloudpickle")
16218 (synopsis "Extended pickling support for Python objects")
16219 (description
16220 "Cloudpickle makes it possible to serialize Python constructs not
16221supported by the default pickle module from the Python standard library. It
16222is especially useful for cluster computing where Python expressions are
16223shipped over the network to execute on remote hosts, possibly close to the
16224data.")
16225 (license license:bsd-3)))
16226
16227(define-public python2-cloudpickle
16228 (package-with-python2 python-cloudpickle))
16229
16230(define-public python-locket
16231 (package
16232 (name "python-locket")
16233 (version "0.2.0")
16234 (source
16235 (origin
16236 (method url-fetch)
16237 (uri (pypi-uri "locket" version))
16238 (sha256
16239 (base32
16240 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
16241 (build-system python-build-system)
16242 (home-page "https://github.com/mwilliamson/locket.py")
16243 (synopsis "File-based locks for Python")
16244 (description
16245 "Locket implements a lock that can be used by multiple processes provided
16246they use the same path.")
16247 (license license:bsd-2)))
16248
16249(define-public python2-locket
16250 (package-with-python2 python-locket))
16251
16252(define-public python-blosc
16253 (package
16254 (name "python-blosc")
16255 (version "1.5.1")
16256 (source
16257 (origin
16258 (method url-fetch)
16259 (uri (pypi-uri "blosc" version))
16260 (sha256
16261 (base32
16262 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
16263 (build-system python-build-system)
16264 ;; FIXME: all tests pass, but then this error is printed:
16265 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
16266 (arguments '(#:tests? #f))
16267 (propagated-inputs
16268 `(("python-numpy" ,python-numpy)))
16269 (home-page "https://github.com/blosc/python-blosc")
16270 (synopsis "Python wrapper for the Blosc data compressor library")
16271 (description "Blosc is a high performance compressor optimized for binary
16272data. It has been designed to transmit data to the processor cache faster
16273than the traditional, non-compressed, direct memory fetch approach via a
16274@code{memcpy()} system call.
16275
16276Blosc works well for compressing numerical arrays that contains data with
16277relatively low entropy, like sparse data, time series, grids with
16278regular-spaced values, etc.
16279
16280This Python package wraps the Blosc library.")
16281 (license license:bsd-3)))
16282
16283(define-public python2-blosc
16284 (package-with-python2 python-blosc))
16285
16286(define-public python-partd
16287 (package
16288 (name "python-partd")
16289 (version "0.3.9")
16290 (source
16291 (origin
16292 (method url-fetch)
16293 (uri (pypi-uri "partd" version))
16294 (sha256
16295 (base32
16296 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
16297 (build-system python-build-system)
16298 (propagated-inputs
16299 `(("python-blosc" ,python-blosc)
16300 ("python-locket" ,python-locket)
16301 ("python-numpy" ,python-numpy)
16302 ("python-pandas" ,python-pandas)
16303 ("python-pyzmq" ,python-pyzmq)
16304 ("python-toolz" ,python-toolz)))
16305 (home-page "https://github.com/dask/partd/")
16306 (synopsis "Appendable key-value storage")
16307 (description "Partd stores key-value pairs. Values are raw bytes. We
16308append on old values. Partd excels at shuffling operations.")
16309 (license license:bsd-3)))
16310
16311(define-public python2-partd
16312 (package-with-python2 python-partd))
16313
c70a0191
RW
16314(define-public python-fsspec
16315 (package
16316 (name "python-fsspec")
16317 (version "0.6.1")
16318 (source
16319 (origin
16320 (method url-fetch)
16321 (uri (pypi-uri "fsspec" version))
16322 (sha256
16323 (base32
16324 "1g9ba8v04s1nrh7pvzfm2md7ivl2mrz3hcq3y9d1a44gd62h17zj"))))
16325 (build-system python-build-system)
16326 (arguments '(#:tests? #f)) ; there are none
16327 (home-page "https://github.com/intake/filesystem_spec")
16328 (synopsis "File-system specification")
16329 (description "The purpose of this package is to produce a template or
16330specification for a file-system interface, that specific implementations
16331should follow, so that applications making use of them can rely on a common
16332behavior and not have to worry about the specific internal implementation
16333decisions with any given backend.")
16334 (license license:bsd-3)))
16335
44d10b1f
RW
16336(define-public python-dask
16337 (package
16338 (name "python-dask")
86c7ca07 16339 (version "2.9.0")
44d10b1f
RW
16340 (source
16341 (origin
16342 (method url-fetch)
16343 (uri (pypi-uri "dask" version))
16344 (sha256
86c7ca07 16345 (base32 "1w1hqr8vyx6ygwflj2737dcy0mmgvrc0s602gnny8pzlcbs9m76b"))))
44d10b1f 16346 (build-system python-build-system)
44d10b1f
RW
16347 (arguments
16348 `(#:phases
16349 (modify-phases %standard-phases
86c7ca07 16350 (add-after 'unpack 'disable-broken-tests
44d10b1f 16351 (lambda _
86c7ca07 16352 ;; This test is marked as xfail when pytest-xdist is used.
44d10b1f
RW
16353 (substitute* "dask/tests/test_threaded.py"
16354 (("def test_interrupt\\(\\)" m)
16355 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
16356 m)))
86c7ca07
RW
16357 ;; This one fails with a type error:
16358 ;; TypeError: Already tz-aware, use tz_convert to convert.
16359 (substitute* "dask/dataframe/tests/test_shuffle.py"
16360 (("def test_set_index_timestamp\\(\\)" m)
16361 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
16362 m)))
44d10b1f
RW
16363 #t))
16364 (replace 'check
16365 (lambda _ (invoke "pytest" "-vv"))))))
16366 (propagated-inputs
16367 `(("python-cloudpickle" ,python-cloudpickle)
86c7ca07 16368 ("python-fsspec" ,python-fsspec)
44d10b1f 16369 ("python-numpy" ,python-numpy)
86c7ca07 16370 ("python-packaging" ,python-packaging)
44d10b1f
RW
16371 ("python-pandas" ,python-pandas)
16372 ("python-partd" ,python-partd)
16373 ("python-toolz" ,python-toolz)
16374 ("python-pyyaml" ,python-pyyaml)))
16375 (native-inputs
16376 `(("python-pytest" ,python-pytest)
16377 ("python-pytest-runner" ,python-pytest-runner)))
16378 (home-page "https://github.com/dask/dask/")
16379 (synopsis "Parallel computing with task scheduling")
16380 (description
16381 "Dask is a flexible parallel computing library for analytics. It
16382consists of two components: dynamic task scheduling optimized for computation,
16383and large data collections like parallel arrays, dataframes, and lists that
16384extend common interfaces like NumPy, Pandas, or Python iterators to
16385larger-than-memory or distributed environments. These parallel collections
16386run on top of the dynamic task schedulers. ")
16387 (license license:bsd-3)))
16388
44d10b1f
RW
16389(define-public python-ilinkedlist
16390 (package
16391 (name "python-ilinkedlist")
16392 (version "0.4.0")
16393 (source
16394 (origin
16395 (method url-fetch)
16396 (uri (pypi-uri "ilinkedlist" version))
16397 (sha256
16398 (base32
16399 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
16400 (build-system python-build-system)
16401 (native-inputs `(("python-pytest" ,python-pytest)))
16402 (inputs `(("python" ,python)))
16403 (home-page "https://github.com/luther9/ilinkedlist-py")
16404 (synopsis "Immutable linked list library")
16405 (description
16406 "This is a implementation of immutable linked lists for Python. It
16407contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
16408Since a linked list is treated as immutable, it is hashable, and its length
16409can be retrieved in constant time. Some of the terminology is inspired by
16410LISP. It is possible to create an improper list by creating a @code{Pair}
16411with a non-list @code{cdr}.")
16412 (license license:gpl3+)))
16413
16414(define-public python-readlike
16415 (package
16416 (name "python-readlike")
16417 (version "0.1.3")
16418 (source
16419 (origin
16420 (method url-fetch)
16421 (uri (pypi-uri "readlike" version))
16422 (sha256
16423 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
16424 (build-system python-build-system)
16425 (home-page "https://github.com/jangler/readlike")
16426 (synopsis "GNU Readline-like line editing module")
16427 (description
16428 "This Python module provides line editing functions similar to the default
16429Emacs-style ones of GNU Readline. Unlike the Python standard library's
16430@code{readline} package, this one allows access to those capabilties in settings
16431outside of a standard command-line interface. It is especially well-suited to
16432interfacing with Urwid, due to a shared syntax for describing key inputs.
16433
16434Currently, all stateless Readline commands are implemented. Yanking and history
16435are not supported.")
16436 (license license:expat)))
16437
16438(define-public python2-readlike
16439 (package-with-python2 python-readlike))
16440
16441(define-public python-reparser
16442 (package
16443 (name "python-reparser")
16444 (version "1.4.3")
16445 (source
16446 (origin
16447 (method url-fetch)
16448 (uri (pypi-uri "ReParser" version))
16449 (sha256
16450 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
16451 (build-system python-build-system)
16452 (home-page "https://github.com/xmikos/reparser")
16453 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
16454 (description
16455 "This Python library provides a simple lexer/parser for inline markup based
16456on regular expressions.")
16457 (license license:expat)))
16458
16459(define-public python2-reparser
16460 (let ((reparser (package-with-python2
16461 (strip-python2-variant python-reparser))))
16462 (package (inherit reparser)
16463 (propagated-inputs
16464 `(("python2-enum34" ,python2-enum34)
16465 ,@(package-propagated-inputs reparser))))))
16466
16467(define-public python-precis-i18n
16468 (package
16469 (name "python-precis-i18n")
16470 (version "1.0.0")
16471 (source
16472 (origin
16473 (method url-fetch)
16474 (uri (pypi-uri "precis_i18n" version))
16475 (sha256
16476 (base32
16477 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
16478 (build-system python-build-system)
16479 (home-page "https://github.com/byllyfish/precis_i18n")
16480 (synopsis "Implementation of the PRECIS framework")
16481 (description
16482 "This module implements the PRECIS Framework as described in RFC 8264,
16483RFC 8265 and RFC 8266.")
16484 (license license:expat)))
16485
d0446c4b
RW
16486(define-public python-absl-py
16487 (package
16488 (name "python-absl-py")
16489 (version "0.6.1")
16490 (source
16491 (origin
16492 (method url-fetch)
16493 (uri (pypi-uri "absl-py" version))
16494 (sha256
16495 (base32
16496 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
16497 (build-system python-build-system)
16498 (propagated-inputs
16499 `(("python-six" ,python-six)))
16500 (home-page "https://github.com/abseil/abseil-py")
16501 (synopsis "Abseil Python common libraries")
16502 (description
16503 "This package provides the Abseil Python Common Libraries, a collection
16504of Python libraries for building Python applications.")
16505 (license license:asl2.0)))
16506
81bed4e9
RW
16507(define-public python-astor
16508 (package
16509 (name "python-astor")
16510 (version "0.7.1")
16511 (source
16512 (origin
16513 (method url-fetch)
16514 (uri (pypi-uri "astor" version))
16515 (sha256
16516 (base32
16517 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
16518 (build-system python-build-system)
16519 ;; FIXME: There are two errors and two test failures.
16520 (arguments `(#:tests? #f))
16521 (home-page "https://github.com/berkerpeksag/astor")
39ee82ff 16522 (synopsis "Read and write Python ASTs")
81bed4e9 16523 (description "Astor is designed to allow easy manipulation of Python
39ee82ff 16524source via the Abstract Syntax Tree.")
81bed4e9
RW
16525 (license license:bsd-3)))
16526
39ee82ff
RW
16527(define-public python2-astor
16528 (package-with-python2 python-astor))
16529
22e623ae
RW
16530(define-public python-grpcio
16531 (package
16532 (name "python-grpcio")
16533 (version "1.17.1")
16534 (source
16535 (origin
16536 (method url-fetch)
16537 (uri (pypi-uri "grpcio" version))
16538 (sha256
16539 (base32
16540 "0qb9y6j83nxa6d4kc60i8yfgdm7a8ms7b54kncjzf5y7nsxp8rzx"))))
16541 (build-system python-build-system)
16542 (propagated-inputs
16543 `(("python-six" ,python-six)))
16544 (home-page "https://grpc.io")
16545 (synopsis "HTTP/2-based RPC framework")
16546 (description "This package provides a Python library for communicating
16547with the HTTP/2-based RPC framework gRPC.")
16548 (license license:asl2.0)))
16549
79869f80
RW
16550(define-public python-astunparse
16551 (package
16552 (name "python-astunparse")
47d79541 16553 (version "1.6.2")
79869f80
RW
16554 (source
16555 (origin
16556 (method url-fetch)
16557 (uri (pypi-uri "astunparse" version))
16558 (sha256
47d79541 16559 (base32 "0rzbc44xcvzjhhiy7wac96mgal5mcjz1mfq8rmvgswskf4kf9cys"))))
79869f80 16560 (build-system python-build-system)
47d79541 16561 (arguments '(#:tests? #f)) ; there are none
79869f80
RW
16562 (propagated-inputs
16563 `(("python-six" ,python-six)
16564 ("python-wheel" ,python-wheel)))
16565 (home-page "https://github.com/simonpercivall/astunparse")
16566 (synopsis "AST unparser for Python")
16567 (description "This package provides an AST unparser for Python. It is a
16568factored out version of @code{unparse} found in the Python source
16569distribution.")
16570 (license license:bsd-3)))
16571
2884aac0
RW
16572(define-public python-gast
16573 (package
16574 (name "python-gast")
bd300261 16575 (version "0.2.2")
2884aac0
RW
16576 (source
16577 (origin
16578 (method url-fetch)
16579 (uri (pypi-uri "gast" version))
16580 (sha256
bd300261 16581 (base32 "1w5dzdb3gpcfmd2s0b93d8gff40a1s41rv31458z14inb3s9v4zy"))))
2884aac0
RW
16582 (build-system python-build-system)
16583 (propagated-inputs
16584 `(("python-astunparse" ,python-astunparse)))
16585 (home-page "https://pypi.org/project/gast/")
16586 (synopsis "Generic Python AST that abstracts the underlying Python version")
16587 (description
16588 "GAST provides a compatibility layer between the AST of various Python
16589versions, as produced by @code{ast.parse} from the standard @code{ast}
16590module.")
16591 (license license:bsd-3)))
16592
44d10b1f
RW
16593(define-public python-wikidata
16594 (package
16595 (name "python-wikidata")
16596 (version "0.6.1")
16597 (source
16598 (origin
16599 (method url-fetch)
16600 (uri (pypi-uri "Wikidata" version))
16601 (sha256
16602 (base32
16603 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
16604 (build-system python-build-system)
16605 (propagated-inputs
16606 `(("python-babel" ,python-babel)))
16607 (home-page "https://github.com/dahlia/wikidata")
16608 (synopsis "Wikidata client library")
16609 (description
16610 "This package provides a Python interface to
16611@url{https://www.wikidata.org/, Wikidata}.")
16612 (properties '((upstream-name . "Wikidata")))
16613 (license license:gpl3+)))
16614
16615(define-public python-doctest-ignore-unicode
16616 (package
16617 (name "python-doctest-ignore-unicode")
16618 (version "0.1.2")
16619 (source
16620 (origin
16621 (method url-fetch)
16622 (uri (pypi-uri "doctest-ignore-unicode" version))
16623 (sha256
16624 (base32
16625 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
16626 (build-system python-build-system)
16627 (native-inputs
16628 `(("python-nose" ,python-nose)))
16629 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
16630 (synopsis "Ignore Unicode literal prefixes in doctests")
16631 (description
16632 "This package adds support for a flag to ignore Unicode literal prefixes
16633in doctests.")
16634 (license license:asl2.0)))
16635
16636(define-public python-attr
16637 (package
16638 (name "python-attr")
16639 (version "0.3.1")
16640 (source
16641 (origin
16642 (method url-fetch)
16643 (uri (pypi-uri "attr" version))
16644 (sha256
16645 (base32
16646 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
16647 (build-system python-build-system)
16648 (home-page "https://github.com/denis-ryzhkov/attr")
16649 (synopsis "Decorator for attributes of target function or class")
16650 (description "Simple decorator to set attributes of target function or
16651class in a @acronym{DRY, Don't Repeat Yourself} way.")
16652 (license license:expat)))
f98232a3
VC
16653
16654(define-public python-construct
16655 (package
16656 (name "python-construct")
d854ab15 16657 (version "2.10.56")
f98232a3
VC
16658 (source
16659 (origin
16660 (method url-fetch)
16661 (uri (pypi-uri "construct" version))
16662 (sha256
16663 (base32
d854ab15 16664 "0q86jjzsvy835h3c8pjj4619vbp7ihfg8njmyw86ym4qrpni7flp"))))
f98232a3
VC
16665 (build-system python-build-system)
16666 (arguments
16667 `(#:tests? #f)) ; No tests exist.
16668 (propagated-inputs
16669 `(("python-extras" ,python-extras)
16670 ("python-arrow" ,python-arrow)
16671 ("python-numpy" ,python-numpy)
16672 ("python-ruamel.yaml" ,python-ruamel.yaml)))
aabc8954 16673 (home-page "https://construct.readthedocs.io")
f98232a3
VC
16674 (synopsis "Declarative and symmetrical parser and builder for binary data")
16675 (description
16676 "This package provides both simple, atomic constructs (such as
16677integers of various sizes), as well as composite ones which allow you
16678form hierarchical and sequential structures of increasing complexity.
16679It features bit and byte granularity, easy debugging and testing, an
16680easy-to-extend subclass system, and lots of primitive constructs to
16681make your work easier.")
16682 (license license:expat)))
b742c006
LF
16683
16684(define-public python-humanize
16685 (package
16686 (name "python-humanize")
16687 (version "0.5.1")
16688 (source
16689 (origin
16690 (method url-fetch)
16691 (uri (pypi-uri "humanize" version))
16692 (sha256
16693 (base32
16694 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
16695 (arguments
16696 '(#:tests? #f)) ; tests not in pypi archive
16697 (build-system python-build-system)
16698 (home-page "https://github.com/jmoiron/humanize")
16699 (synopsis "Print numerical information in a human-readable form")
16700 (description "This package provides a Python module that displays numbers
16701and dates in \"human readable\" forms. For example, it would display
16702\"12345591313\" as \"12.3 billion\".")
16703 (license license:expat)))
d5bbf66d
LF
16704
16705(define-public python-txaio
16706 (package
16707 (name "python-txaio")
16708 (version "18.8.1")
16709 (source
16710 (origin
16711 (method url-fetch)
16712 (uri (pypi-uri "txaio" version))
16713 (sha256
16714 (base32
16715 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
16716 (build-system python-build-system)
16717 (propagated-inputs
16718 `(("python-twisted" ,python-twisted)
16719 ("python-six" ,python-six)))
16720 (home-page "https://github.com/crossbario/txaio")
16721 (synopsis "Compatibility layer between Python asyncio and Twisted")
16722 (description "Txaio provides a compatibility layer between the Python
16723@code{asyncio} module and @code{Twisted}.")
16724 (license license:expat)))
963dfd3a
RW
16725
16726(define-public python-toolshed
16727 (package
16728 (name "python-toolshed")
16729 (version "0.4.6")
16730 (source
16731 (origin
16732 (method url-fetch)
16733 (uri (pypi-uri "toolshed" version))
16734 (sha256
16735 (base32
16736 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
16737 (build-system python-build-system)
16738 (native-inputs
16739 `(("python-nose" ,python-nose)))
16740 (home-page "https://github.com/brentp/toolshed/")
16741 (synopsis "Collection of modules and functions for working with data")
16742 (description "This is a collection of well-tested, simple modules and
16743functions that aim to reduce boilerplate when working with data.")
16744 (license license:bsd-2)))
c91ecf2d
RW
16745
16746(define-public python-annoy
16747 (package
16748 (name "python-annoy")
16749 (version "1.15.1")
16750 (source
16751 (origin
16752 (method url-fetch)
16753 (uri (pypi-uri "annoy" version))
16754 (sha256
16755 (base32
16756 "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp"))))
16757 (build-system python-build-system)
16758 (native-inputs
16759 `(("python-nose" ,python-nose)))
16760 (home-page "https://github.com/spotify/annoy/")
16761 (synopsis "Approximate nearest neighbors library")
16762 (description
16763 "Annoy is a C++ library with Python bindings to search for points in
16764space that are close to a given query point. It also creates large read-only
16765file-based data structures that are @code{mmap}ped into memory so that many
16766processes may share the same data.")
16767 (license license:asl2.0)))
412342d1 16768
79bfa422 16769(define-public python-pylzma
412342d1 16770 (package
79bfa422
DM
16771 (name "python-pylzma")
16772 (version "0.5.0")
16773 (source
16774 (origin
16775 (method url-fetch)
16776 (uri (pypi-uri "pylzma" version))
16777 (sha256
16778 (base32
16779 "074anvhyjgsv2iby2ql1ixfvjgmhnvcwjbdz8gk70xzkzcm1fx5q"))))
412342d1 16780 (build-system python-build-system)
79bfa422
DM
16781 (home-page "http://www.joachim-bauch.de/projects/pylzma/")
16782 (synopsis "Python bindings for the LZMA library by Igor Pavlov.")
16783 (description "This package provides Python bindings for the LZMA library
16784by Igor Pavlov.")
16785 (license license:lgpl2.1+)))
16786
16787(define-public python2-pylzma
16788 (package-with-python2 python-pylzma))
f825e605 16789
6609ebe7
AG
16790(define-public python2-zeroconf
16791 (package
16792 (name "python2-zeroconf")
16793
16794 ;; This is the last version that supports Python 2.x.
16795 (version "0.19.1")
16796 (source
16797 (origin
16798 (method url-fetch)
16799 (uri (pypi-uri "zeroconf" version))
16800 (sha256
16801 (base32
16802 "0ykzg730n915qbrq9bn5pn06bv6rb5zawal4sqjyfnjjm66snkj3"))))
16803 (build-system python-build-system)
16804 (arguments
16805 `(#:python ,python-2
16806 #:phases
16807 (modify-phases %standard-phases
16808 (add-after 'unpack 'patch-requires
16809 (lambda* (#:key inputs #:allow-other-keys)
16810 (substitute* "setup.py"
16811 (("enum-compat")
16812 "enum34"))
16813 #t)))))
16814 (native-inputs
16815 `(("python2-six" ,python2-six)
16816 ("python2-enum32" ,python2-enum34)
16817 ("python2-netifaces" ,python2-netifaces)
16818 ("python2-typing" ,python2-typing)))
16819 (home-page "https://github.com/jstasiak/python-zeroconf")
16820 (synopsis "Pure Python mDNS service discovery")
16821 (description
16822 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
16823compatible).")
16824 (license license:lgpl2.1+)))
16825
f825e605
GLV
16826(define-public python-bsddb3
16827 (package
16828 (name "python-bsddb3")
16829 (version "6.2.6")
16830 (source
16831 (origin
16832 (method url-fetch)
16833 (uri (pypi-uri "bsddb3" version))
16834 (sha256
16835 (base32
16836 "019db2y6bfmiqbrgg9x9f6h72qjmqh05czdn2v5sy9bl0gs23mj2"))))
16837 (build-system python-build-system)
16838 (inputs
16839 `(("bdb" ,bdb)))
16840 (arguments
16841 '(#:phases
16842 (modify-phases %standard-phases
16843 (add-after 'unpack 'configure-locations
16844 (lambda* (#:key inputs #:allow-other-keys)
16845 (setenv "BERKELEYDB_DIR" (assoc-ref inputs "bdb"))
16846 (setenv "YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION" "1")
16847 #t))
16848 (replace 'check
16849 (lambda _
16850 (invoke "python3" "test3.py" "-v"))))))
16851 (home-page "https://www.jcea.es/programacion/pybsddb.htm")
16852 (synopsis "Python bindings for Oracle Berkeley DB")
16853 (description
16854 "This module provides a nearly complete wrapping of the Oracle/Sleepycat
16855C API for the Database Environment, Database, Cursor, Log Cursor, Sequence and
16856Transaction objects, and each of these is exposed as a Python type in the
16857bsddb3.db module. The database objects can use various access methods: btree,
16858hash, recno, and queue. Complete support of Berkeley DB distributed
16859transactions. Complete support for Berkeley DB Replication Manager.
16860Complete support for Berkeley DB Base Replication. Support for RPC.")
16861 (license license:bsd-3)))
edeb04bf
PL
16862
16863(define-public python-dbfread
16864 (package
16865 (name "python-dbfread")
16866 (version "2.0.7")
16867 (source (origin
16868 (method url-fetch)
16869 (uri (pypi-uri "dbfread" version))
16870 (sha256
16871 (base32
16872 "0gdpwdzf1fngsi6jrdyj4qdf6cr7gnnr3zp80dpkzbgz0spskj07"))))
16873 (build-system python-build-system)
16874 (native-inputs
16875 `(("python-pytest" ,python-pytest)))
16876 (home-page "https://dbfread.readthedocs.io")
16877 (synopsis "Read DBF Files with Python")
16878 (description
16879 "This library reads DBF files and returns the data as native Python data
16880types for further processing. It is primarily intended for batch jobs and
16881one-off scripts.")
16882 (license license:expat)))
e308b4f0
JM
16883
16884(define-public python-cached-property
16885 (package
16886 (name "python-cached-property")
16887 (version "1.5.1")
16888 (source
16889 (origin
16890 (method url-fetch)
16891 (uri (pypi-uri "cached-property" version))
16892 (sha256
16893 (base32
16894 "010m1bl380l2r3vwq24r5v14l6gwvgm9v0mqqjkjss552jgsa5wj"))))
16895 (build-system python-build-system)
16896 (arguments
16897 `(#:phases
16898 (modify-phases %standard-phases
16899 ;; https://github.com/pydanny/cached-property/issues/131
16900 ;; recent versions of freezegun break one test
16901 (add-after 'unpack 'disable-broken-test
16902 (lambda _
16903 (substitute* "tests/test_cached_property.py"
16904 (("def test_threads_ttl_expiry\\(self\\)" m)
16905 (string-append "@unittest.skip(\"Disabled by Guix\")\n"
16906 " " m)))
16907 #t)))))
16908 (native-inputs
16909 `(("python-freezegun" ,python-freezegun)))
16910 (home-page
16911 "https://github.com/pydanny/cached-property")
16912 (synopsis
16913 "Decorator for caching properties in classes")
16914 (description
16915 "This package provides a decorator which makes caching
16916time-or-computationally-expensive properties quick and easy and works in Python
169172 or 3.")
16918 (license license:bsd-3)))
dfe8a704
NG
16919
16920(define-public python-folium
16921 (package
16922 (name "python-folium")
d3bc1ea9 16923 (version "0.10.1")
dfe8a704
NG
16924 (source
16925 (origin
16926 (method url-fetch)
16927 (uri (pypi-uri "folium" version))
16928 (sha256
16929 (base32
d3bc1ea9 16930 "0gcc267wxwxr57ry86pqpbiyfvl0g48hfvgy0f2mz9s58g87kgzd"))))
dfe8a704
NG
16931 (build-system python-build-system)
16932 (propagated-inputs
16933 `(("python-branca" ,python-branca)
16934 ("python-jinja2" ,python-jinja2)
16935 ("python-numpy" ,python-numpy)
16936 ("python-requests" ,python-requests)))
16937 (native-inputs
16938 `(("python-pytest" ,python-pytest)))
16939 (home-page "https://github.com/python-visualization/folium")
16940 (synopsis "Make beautiful maps with Leaflet.js & Python")
16941 (description "@code{folium} makes it easy to visualize data that’s been
16942manipulated in Python on an interactive leaflet map. It enables both the
16943binding of data to a map for @code{choropleth} visualizations as well as
16944passing rich vector/raster/HTML visualizations as markers on the map.
16945
16946The library has a number of built-in tilesets from OpenStreetMap, Mapbox, and
16947Stamen, and supports custom tilesets with Mapbox or Cloudmade API keys. It
16948supports Image, Video, GeoJSON and TopoJSON overlays.")
16949 (license license:expat)))
9dd5f475
LC
16950
16951(define-public jube
16952 (package
16953 ;; This is a command-line tool, so no "python-" prefix.
16954 (name "jube")
16955 (version "2.2.2")
16956 (source (origin
16957 (method url-fetch)
16958 (uri (string-append
16959 "http://apps.fz-juelich.de/jsc/jube/jube2/download.php?version="
16960 version))
16961 (sha256
16962 (base32
16963 "0xq4k1q63s1p6swgyp61vahlrd1fqmgbm0gm5kpj8ikwy0yc0nqk"))
16964 (file-name (string-append "jube-" version ".tar.gz"))))
16965 (build-system python-build-system)
16966 (home-page "https://apps.fz-juelich.de/jsc/jube/jube2/docu/index.html")
16967 (synopsis "Benchmarking environment")
16968 (description
16969 "JUBE helps perform and analyze benchmarks in a systematic way. For each
16970benchmarked application, benchmark data is stored in a format that allows JUBE
16971to deduct the desired information. This data can be parsed by automatic pre-
16972and post-processing scripts that draw information and store it more densely
16973for manual interpretation.")
a9f33960 16974 (license license:gpl3+)))
66436424
NG
16975
16976(define-public python-pyroutelib3
16977 (package
16978 (name "python-pyroutelib3")
16979 (version "1.3.post1")
16980 (source
16981 (origin
16982 (method url-fetch)
16983 (uri (pypi-uri "pyroutelib3" version))
16984 (sha256
16985 (base32
16986 "1hpbydpn2alyswiajfbvhzq4c7f36vdmvxy91hgv8l1lb2g2vfrj"))))
16987 (build-system python-build-system)
16988 (propagated-inputs
16989 `(("python-dateutil" ,python-dateutil)))
16990 (home-page "https://github.com/MKuranowski/pyroutelib3")
16991 (synopsis "Library for simple routing on OSM data")
16992 (description "Library for simple routing on OSM data")
16993 (license license:gpl3+)))
30e7c03a 16994
c1bbef69
16995(define-public python-bibtexparser
16996 (package
16997 (name "python-bibtexparser")
16998 (version "1.1.0")
16999 (source
17000 (origin
17001 (method url-fetch)
17002 (uri (pypi-uri "bibtexparser" version))
17003 (sha256
17004 (base32
17005 "0zwhfkrzf3n5847dbnfng92k7ak199l9v6x6ax3dgdidfpm6d2fz"))))
17006 (build-system python-build-system)
17007 (propagated-inputs
17008 `(("python-pyparsing" ,python-pyparsing)))
17009 (native-inputs
17010 `(("python-future" ,python-future)))
17011 (home-page "https://github.com/sciunto-org/python-bibtexparser")
17012 (synopsis "Python library to parse BibTeX files")
17013 (description "BibtexParser is a Python library to parse BibTeX files.")
17014 (license (list license:bsd-3 license:lgpl3))))
8581b40d
HG
17015
17016(define-public python-distro
17017 (package
17018 (name "python-distro")
17019 (version "1.4.0")
17020 (source
17021 (origin
17022 (method url-fetch)
17023 (uri (pypi-uri "distro" version))
17024 (sha256
17025 (base32
17026 "0mrg75w4ap7mdzyga75yaid9n8bgb345ih5mwjp3plj6v1jxwb9n"))))
17027 (build-system python-build-system)
17028 (native-inputs
17029 `(("python-pytest" ,python-pytest)))
17030 (home-page "https://github.com/nir0s/distro")
17031 (synopsis
17032 "OS platform information API")
17033 (description
17034 "@code{distro} provides information about the OS distribution it runs on,
17035such as a reliable machine-readable ID, or version information.
17036
17037It is the recommended replacement for Python's original
17038`platform.linux_distribution` function (which will be removed in Python 3.8).
17039@code{distro} also provides a command-line interface to output the platform
17040information in various formats.")
17041 (license license:asl2.0)))
f2f41e1a
HG
17042
17043(define-public python-cairosvg
17044 (package
17045 (name "python-cairosvg")
17046 (version "2.4.2")
17047 (source
17048 (origin
17049 (method url-fetch)
17050 (uri (pypi-uri "CairoSVG" version))
17051 (sha256
17052 (base32 "1bb7irxbaxxb9ahm3z5wsx1q96mm5gzskc7b6q07h9ikcnb8yrjf"))))
17053 (build-system python-build-system)
17054 (arguments
17055 `(#:phases
17056 (modify-phases %standard-phases
17057 (replace 'check
17058 (lambda _ (invoke "pytest"))))))
17059 (propagated-inputs
17060 `(("python-cairocffi" ,python-cairocffi)
17061 ("python-cssselect2" ,python-cssselect2)
17062 ("python-defusedxml" ,python-defusedxml)
17063 ("python-pillow" ,python-pillow)
17064 ("python-tinycss2" ,python-tinycss2)))
17065 (native-inputs
17066 `(("python-pytest-flake8" ,python-pytest-flake8)
17067 ("python-pytest-isort" ,python-pytest-isort)
17068 ("python-pytest-runner" ,python-pytest-runner)))
17069 (home-page "https://cairosvg.org/")
17070 (synopsis "SVG to PDF/PS/PNG converter based on Cairo")
17071 (description "CairoSVG is a SVG converter based on Cairo. It can export
17072SVG files to PDF, PostScript and PNG files. The main part of CairoSVG is a
17073SVG parser, trying to follow the SVG 1.1 recommendation from the W3C. Once
17074parsed, the result is drawn to a Cairo surface that can be exported to
17075qvarious formats: PDF, PostScript, PNG and even SVG.")
17076 (license license:lgpl3+)))
ea1801e0
HG
17077
17078(define-public python-pyphen
17079 (package
17080 (name "python-pyphen")
17081 (version "0.9.5")
17082 (source
17083 (origin
17084 (method url-fetch)
17085 (uri (pypi-uri "Pyphen" version))
17086 (sha256
17087 (base32 "08c9y69ry9d6m4zalhnalg86lsp9v2j5n1ziw5vxfmiihx83lqrv"))))
17088 (build-system python-build-system)
17089 ;; TODO: Use the Guix system hyphenation packages hyphen-* rather than the
17090 ;; embedded set provided by upstream - like Debian does.
17091 (home-page "https://github.com/Kozea/Pyphen")
17092 (synopsis "Pure Python module to hyphenate text")
17093 (description "Pyphen is a pure Python module to hyphenate text using
17094existing Hunspell hyphenation dictionaries.")
17095 (license (list license:gpl2 license:lgpl2.1 license:mpl1.1))))
85cfb0e9
CL
17096
17097(define-public python-intelhex
17098 (package
17099 (name "python-intelhex")
17100 (version "2.2.1")
17101 (source
17102 (origin
17103 (method url-fetch)
17104 (uri (pypi-uri "intelhex" version))
17105 (sha256
17106 (base32
17107 "0ckqjbxd8gwcg98gfzpn4vq1qxzfvq3rdbrr1hikj1nmw08qb780"))))
17108 (build-system python-build-system)
17109 (arguments '(#:tests? #f)) ;issue with version
17110 (home-page "https://pypi.org/project/IntelHex/")
17111 (synopsis "Python library for Intel HEX files manipulations")
17112 (description "The Intel HEX file format is widely used in microprocessors
17113and microcontrollers area (embedded systems etc.) as the de facto standard for
17114representation of code to be programmed into microelectronic devices. This
17115package provides an intelhex Python library to read, write, create from
17116scratch and manipulate data from Intel HEX file format. It also includes
17117several convenience Python scripts, including \"classic\" hex2bin and bin2hex
17118converters and more, those based on the library itself.")
17119 (license license:bsd-3)))
34bf6869
CL
17120
17121(define-public python-pykwalify
17122 (package
17123 (name "python-pykwalify")
17124 (version "1.7.0")
17125 (source
17126 (origin
17127 (method url-fetch)
17128 (uri (pypi-uri "pykwalify" version))
17129 (sha256
17130 (base32
17131 "1cnfzkg1b01f825ikpw2fhjclf9c8akxjfrbd1vc22x1lg2kk2vy"))))
17132 (build-system python-build-system)
17133 (arguments '(#:tests? #f)) ;missing dependencies
17134 (propagated-inputs
17135 `(("python-dateutil" ,python-dateutil)
17136 ("python-docopt" ,python-docopt)
17137 ("python-pyyaml" ,python-pyyaml)))
17138 (home-page "https://github.com/grokzen/pykwalify")
17139 (synopsis
17140 "Python lib/cli for JSON/YAML schema validation")
17141 (description
17142 "This package provides a parser, schema validator, and data binding tool
17143for YAML and JSON.")
17144 (license license:expat)))
e2ebbbcc
KK
17145
17146(define-public python-dbusmock
17147 (package
022b0d5f
BG
17148 (name "python-dbusmock")
17149 (version "0.18.3")
17150 (source
17151 (origin
17152 (method url-fetch)
17153 (uri (pypi-uri "python-dbusmock" version))
17154 (sha256
e2ebbbcc 17155 (base32
022b0d5f
BG
17156 "0hp2kyac88nh9iv6l8hlmv7s1sa1s5f1a3wc2pmlmmxnd211fjlr"))))
17157 (build-system python-build-system)
17158 (arguments
17159 '(#:phases
17160 (modify-phases %standard-phases
17161 (add-after 'unpack 'patch-shell-path
17162 (lambda _
17163 (substitute* "tests/test_code.py"
17164 (("/bin/bash") (which "bash")))
17165 #t)))))
17166 (native-inputs
17167 `(;; For tests.
17168 ("dbus" ,dbus) ; for dbus-daemon
17169 ("python-nose" ,python-nose)
17170 ("which" ,which)))
17171 (propagated-inputs
17172 `(("python-dbus" ,python-dbus)
17173 ("python-pygobject" ,python-pygobject)))
17174 (home-page "https://github.com/martinpitt/python-dbusmock")
17175 (synopsis "Python library for mock D-Bus objects")
17176 (description "python-dbusmock allows for the easy creation of mock objects on
e2ebbbcc
KK
17177D-Bus. This is useful for writing tests for software which talks to D-Bus
17178services such as upower, systemd, logind, gnome-session or others, and it is
17179hard (or impossible without root privileges) to set the state of the real
17180services to what you expect in your tests.")
022b0d5f 17181 (license license:lgpl3+)))
b657b23f
BG
17182
17183(define-public python-ujson
17184 (package
17185 (name "python-ujson")
17186 (version "1.35")
17187 (source
17188 (origin
17189 (method url-fetch)
17190 (uri (pypi-uri "ujson" version))
17191 (sha256
17192 (base32
17193 "11jz5wi7mbgqcsz52iqhpyykiaasila4lq8cmc2d54bfa3jp6q7n"))))
17194 (build-system python-build-system)
17195 (home-page "http://www.esn.me")
17196 (synopsis
17197 "Ultra fast JSON encoder and decoder for Python")
17198 (description
17199 "UltraJSON is an ultra fast JSON encoder and decoder written in pure C with
17200 bindings for Python 2.5+ and 3.")
17201 (license license:bsd-3)))
17202
17203(define-public python2-ujson
17204 (package-with-python2 python-ujson))
dbcef44a
MIP
17205
17206(define-public python-iocapture
17207 ;; The latest release is more than a year older than this commit.
17208 (let ((commit "fdc021c431d0840303908dfc3ca8769db383595c")
17209 (revision "1"))
17210 (package
17211 (name "python-iocapture")
17212 (version "0.1.2")
17213 (source
17214 (origin
17215 (method git-fetch)
17216 (uri (git-reference
17217 (url "https://github.com/oinume/iocapture.git")
17218 (commit commit)))
17219 (file-name (git-file-name name version))
17220 (sha256
17221 (base32
17222 "1mkbhqibxvgwg0p7slr8dfraa3g2s6bsayladhax2jccwj4kcndz"))))
17223 (build-system python-build-system)
17224 (arguments
17225 `(#:phases
17226 (modify-phases %standard-phases
17227 (delete 'check)
17228 (add-after 'install 'check
17229 (lambda* (#:key inputs outputs #:allow-other-keys)
17230 (add-installed-pythonpath inputs outputs)
17231 (invoke "py.test" "-v" "tests")
17232 #t)))))
17233 (propagated-inputs
17234 `(("python-flexmock" ,python-flexmock)
17235 ("python-pytest" ,python-pytest)
17236 ("python-pytest-cov" ,python-pytest-cov)
17237 ("python-six" ,python-six)))
17238 (home-page "https://github.com/oinume/iocapture")
17239 (synopsis "Python capturing tool for stdout and stderr")
17240 (description
17241 "This package helps you to capture the standard out (stdout) and the
17242standard error channel (stderr) in your program.")
17243 (license license:expat))))
db6bd842
MIP
17244
17245(define-public python-argh
17246 ;; There are 21 commits since the latest release containing important
17247 ;; improvements.
17248 (let ((commit "dcd3253f2994400a6a58a700c118c53765bc50a4")
17249 (revision "1"))
17250 (package
17251 (name "python-argh")
17252 (version (git-version "0.26.2" revision commit))
17253 (source
17254 (origin
17255 (method git-fetch)
17256 (uri (git-reference
17257 (url "https://github.com/neithere/argh.git")
17258 (commit commit)))
17259 (file-name (git-file-name name version))
17260 (sha256
17261 (base32
17262 "1p5h3dnpbsjmqrvil96s71asc6i3gpinmbrabqmwnrsxprz7r3ns"))))
17263 (build-system python-build-system)
17264 (propagated-inputs
17265 `(("python-iocapture" ,python-iocapture)
17266 ("python-mock" ,python-mock)
17267 ("python-pytest" ,python-pytest)
17268 ("python-pytest-cov" ,python-pytest-cov)
17269 ("python-pytest-xdist" ,python-pytest-xdist)
17270 ("python-tox" ,python-tox)))
17271 (home-page "https://github.com/neithere/argh/")
17272 (synopsis "Argparse wrapper with natural syntax")
17273 (description
17274 "python-argh is a small library that provides several layers of
17275abstraction on top of @code{python-argparse}. The layers can be mixed. It is
17276always possible to declare a command with the highest possible (and least
17277flexible) layer and then tune the behaviour with any of the lower layers
17278including the native API of @code{python-argparse}.")
17279 (license license:lgpl3+))))
073723fa
MIP
17280
17281(define-public python-ppft
17282 (package
17283 (name "python-ppft")
17284 (version "1.6.6.1")
17285 (source
17286 (origin
17287 (method url-fetch)
17288 (uri (pypi-uri "ppft" version))
17289 (sha256
17290 (base32
17291 "1z1invkhszc5d2mvgr221v7cszzifcc77mz0pv3wjp6x5q2768cy"))))
17292 (build-system python-build-system)
17293 (arguments '(#:tests? #f)) ; there are none
17294 (propagated-inputs
17295 `(("python-six" ,python-six)))
17296 (home-page "https://pypi.org/project/ppft/")
17297 (synopsis "Fork of Parallel Python")
17298 (description
17299 "This package is a fork of Parallel Python. The Parallel Python
17300module (@code{pp}) provides an easy and efficient way to create
17301parallel-enabled applications for @dfn{symmetric multiprocessing} (SMP)
17302computers and clusters. It features cross-platform portability and dynamic
17303load balancing.")
17304 (license license:bsd-3)))
8451ea19
MIP
17305
17306(define-public python-pox
17307 (package
17308 (name "python-pox")
17309 (version "0.2.7")
17310 (source
17311 (origin
17312 (method url-fetch)
17313 (uri (pypi-uri "pox" version))
17314 (sha256
17315 (base32
17316 "0y17ckc2p6i6709s279sjdj4q459mpcc38ymg9zv9y6vl6jf3bq6"))))
17317 (build-system python-build-system)
17318 (arguments
17319 `(#:phases
17320 (modify-phases %standard-phases
17321 (replace 'check
17322 (lambda _
17323 (mkdir-p "/tmp/guix")
17324 (setenv "SHELL" "bash")
17325 (setenv "USERNAME" "guix")
17326 (setenv "HOME" "/tmp/guix") ; must end on USERNAME...
17327 (invoke "py.test" "-vv")
17328 #t)))))
17329 (native-inputs
17330 `(("python-pytest" ,python-pytest)
17331 ("which" ,which)))
17332 (home-page "https://pypi.org/project/pox/")
17333 (synopsis "Python utilities for filesystem exploration and automated builds")
17334 (description
17335 "Pox provides a collection of utilities for navigating and manipulating
17336filesystems. This module is designed to facilitate some of the low level
17337operating system interactions that are useful when exploring a filesystem on a
17338remote host. Pox provides Python equivalents of several shell commands such
17339as @command{which} and @command{find}. These commands allow automated
17340discovery of what has been installed on an operating system, and where the
17341essential tools are located.")
17342 (license license:bsd-3)))
7e476ae8
MIP
17343
17344(define-public python-pathos
17345 (package
17346 (name "python-pathos")
17347 (version "0.2.5")
17348 (source
17349 (origin
17350 (method url-fetch)
17351 (uri (pypi-uri "pathos" version))
17352 (sha256
17353 (base32
17354 "0in8hxdz7k081ijn6q94gr39ycy7363sx4zysmbwyvd7snqjrbi1"))))
17355 (build-system python-build-system)
8f82e7e3
EF
17356 (arguments
17357 '(#:phases
17358 (modify-phases %standard-phases
17359 (replace 'check
17360 (lambda _
17361 (setenv "PYTHONPATH"
17362 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
17363 (invoke "python" "./tests/__main__.py"))))))
7e476ae8
MIP
17364 (propagated-inputs
17365 `(("python-dill" ,python-dill)
17366 ("python-multiprocess" ,python-multiprocess)
17367 ("python-pox" ,python-pox)
17368 ("python-ppft" ,python-ppft)))
8f82e7e3
EF
17369 (native-inputs
17370 `(("python-pytest" ,python-pytest)))
7e476ae8
MIP
17371 (home-page "https://pypi.org/project/pathos/")
17372 (synopsis
17373 "Parallel graph management and execution in heterogeneous computing")
17374 (description
17375 "Python-pathos is a framework for heterogenous computing. It provides a
17376consistent high-level interface for configuring and launching parallel
17377computations across heterogenous resources. Python-pathos provides configurable
17378launchers for parallel and distributed computing, where each launcher contains
17379the syntactic logic to configure and launch jobs in an execution environment.")
17380 (license license:bsd-3)))
54e5ee5a
BG
17381
17382(define-public python-flit
17383 (package
17384 (name "python-flit")
17385 (version "2.1.0")
17386 (source
17387 (origin
17388 (method url-fetch)
17389 (uri (pypi-uri "flit" version))
17390 (sha256
17391 (base32
17392 "0h5vvmqinqzn97mr3ix7zx53af9ad4fimjjwqpx88yp8qhz4r5bc"))))
17393 (build-system python-build-system)
17394 (arguments
17395 `(#:tests? #f)) ; XXX: Check requires network access.
17396 (home-page "https://flit.readthedocs.io/")
17397 (synopsis
17398 "Simple packaging tool for simple packages")
17399 (description
17400 "Flit is a simple way to put Python packages and modules on PyPI. Flit
17401packages a single importable module or package at a time, using the import
17402name as the name on PyPI. All subpackages and data files within a package
17403are included automatically.")
17404 (license license:bsd-3)))
02139b42
BG
17405
17406(define-public python-pathtools
17407 (package
17408 (name "python-pathtools")
17409 (version "0.1.2")
17410 (source
17411 (origin
17412 (method url-fetch)
17413 (uri (pypi-uri "pathtools" version))
17414 (sha256
17415 (base32
17416 "1h7iam33vwxk8bvslfj4qlsdprdnwf8bvzhqh3jq5frr391cadbw"))))
17417 (build-system python-build-system)
17418 (home-page
17419 "https://github.com/gorakhargosh/pathtools")
17420 (synopsis "Path utilities for Python")
17421 (description "Pattern matching and various utilities for file systems
17422paths.")
17423 (license license:expat)))
6b520177
JG
17424
17425(define-public python-fastentrypoints
17426 (package
17427 (name "python-fastentrypoints")
17428 (version "0.12")
17429 (source
17430 (origin
17431 (method url-fetch)
17432 (uri (pypi-uri "fastentrypoints" version))
17433 (sha256
17434 (base32
17435 "02s1j8i2dzbpbwgq2a3fiqwm3cnmhii2qzc0k42l0rdxd4a4ya7z"))))
17436 (build-system python-build-system)
17437 (home-page
17438 "https://github.com/ninjaaron/fast-entry_points")
17439 (synopsis
17440 "Makes entry_points specified in setup.py load more quickly")
17441 (description
17442 "Using entry_points in your setup.py makes scripts that start really
17443slowly because it imports pkg_resources. This package allows such setup
17444scripts to load entry points more quickly.")
17445 (license license:bsd-3)))
c5eb8cf8
JG
17446
17447(define-public python-funcparserlib
17448 (package
17449 (name "python-funcparserlib")
17450 (version "0.3.6")
17451 (source
17452 (origin
17453 (method url-fetch)
17454 (uri (pypi-uri "funcparserlib" version))
17455 (sha256
17456 (base32
17457 "07f9cgjr3h4j2m67fhwapn8fja87vazl58zsj4yppf9y3an2x6dp"))))
17458 (native-inputs
17459 `(("python-tox" ,python-tox)))
17460 (arguments
17461 `(#:phases
17462 (modify-phases %standard-phases
17463 (replace 'check
17464 (lambda _
17465 (invoke "tox"))))))
17466 (build-system python-build-system)
17467 (home-page
17468 "https://github.com/vlasovskikh/funcparserlib")
17469 (synopsis
17470 "Recursive descent parsing library based on functional combinators")
17471 (description
11140cf1 17472 "This package is a recursive descent parsing library for Python based on
c5eb8cf8
JG
17473functional combinators. Parser combinators are just higher-order functions
17474that take parsers as their arguments and return them as result values.")
17475 (license license:expat)))
602f3b67
NG
17476
17477(define-public python-speg
17478 (package
17479 (name "python-speg")
17480 (version "0.3")
17481 (source
17482 (origin
17483 (method url-fetch)
17484 (uri (pypi-uri "speg" version ".zip"))
17485 (sha256
17486 (base32 "0w9y4jf4787dzhy6rvhwi0mpl0r8qkqmqmyv2hpwdpv8w53yzjqh"))))
17487 (arguments
17488 `(#:tests? #f)) ;FIXME: tests fail, not sure why
17489 (native-inputs
17490 `(("unzip" ,unzip)))
17491 (build-system python-build-system)
17492 (home-page "https://github.com/avakar/speg")
17493 (synopsis "PEG-based parser interpreter with memoization")
17494 (description "This package is a PEG-based parser and interpreter with
17495memoization.")
17496 (license license:expat)))
07c8177b
NG
17497
17498(define-public python-cson
17499 (package
17500 (name "python-cson")
17501 (version "0.8")
17502 (source
17503 (origin
17504 (method url-fetch)
17505 (uri (pypi-uri "cson" version))
17506 (sha256
17507 (base32 "00cyvigg4npbph39ghkg77xbxisa6plf75vii24igxfizik0337f"))))
17508 (build-system python-build-system)
17509 (propagated-inputs
17510 `(("python-speg" ,python-speg)))
17511 (home-page "https://github.com/avakar/pycson")
17512 (synopsis "Parser for Coffeescript Object Notation (CSON)")
17513 (description "This package is a parser for Coffeescript Object
17514Notation (CSON).")
17515 (license license:expat)))
e24c672e
LDB
17516
17517(define-public python-asynctest
17518 (package
17519 (name "python-asynctest")
17520 (version "0.13.0")
17521 (source
17522 (origin
17523 (method url-fetch)
17524 (uri (pypi-uri "asynctest" version))
17525 (sha256
17526 (base32
17527 "1b3zsy7p84gag6q8ai2ylyrhx213qdk2h2zb6im3xn0m5n264y62"))))
17528 (build-system python-build-system)
17529 (arguments
17530 '(#:phases
17531 (modify-phases %standard-phases
17532 (replace 'check
17533 (lambda _
17534 (invoke "python" "-X" "dev" "-m" "unittest" "-v" "test")))
17535 (add-after 'unpack 'disable-tests
17536 (lambda* _
17537 (substitute* "test/test_selector.py"
17538 ;; XXX: This test fails for unknown reason inside the build
17539 ;; environment.
17540 (("def test_events_watched_outside_test_are_ignored")
17541 "@unittest.skip('disabled by guix')
17542 def test_events_watched_outside_test_are_ignored")))))))
17543 (home-page "https://github.com/Martiusweb/asynctest")
17544 (synopsis "Extension of unittest for testing asyncio libraries")
17545 (description
17546 "The package asynctest is built on top of the standard unittest module
17547and cuts down boilerplate code when testing libraries for asyncio.")
17548 (license license:asl2.0)))
1cc9c38e
LDB
17549
17550(define-public python-aionotify
17551 (package
17552 (name "python-aionotify")
17553 (version "0.2.0")
17554 (source
17555 (origin
17556 ;; Source tarball on PyPi lacks tests
17557 (method git-fetch)
17558 (uri (git-reference
17559 (url "https://github.com/rbarrois/aionotify")
17560 (commit (string-append "v" version))))
17561 (file-name (git-file-name name version))
17562 (sha256
17563 (base32 "1sk9i8czxgsbrswsf1nlb4c82vgnlzi8zrvrxdip92w2z8hqh43y"))))
17564 (build-system python-build-system)
17565 (native-inputs `(("python-asynctest" ,python-asynctest)))
17566 (home-page "https://github.com/rbarrois/aionotify")
17567 (synopsis "Asyncio-powered inotify library")
17568 (description
17569 "@code{aionotify} is a simple, asyncio-based inotify library.")
17570 (license license:bsd-3)))
84efaa3b
LDB
17571
17572(define-public python-forbiddenfruit
17573 (package
17574 (name "python-forbiddenfruit")
17575 (version "0.1.3")
17576 (source
17577 (origin
17578 ;; Source tarball on PyPi lacks Makefile that builds and runs tests
17579 (method git-fetch)
17580 (uri (git-reference
17581 (url "https://github.com/clarete/forbiddenfruit")
17582 (commit version)))
17583 (file-name (git-file-name name version))
17584 (sha256
17585 (base32 "1fp2xvdqpi910j9r3q68x38phpxbm700gjdi2m2j5gs91xdnyyh2"))))
17586 (build-system python-build-system)
17587 (arguments
17588 '(#:phases
17589 (modify-phases %standard-phases
17590 (replace 'check
17591 (lambda _
17592 (invoke "make" "SKIP_DEPS=1"))))))
17593 (native-inputs
17594 `(("python-nose" ,python-nose)
17595 ("python-coverage" ,python-coverage)))
17596 (home-page "https://github.com/clarete/forbiddenfruit")
17597 (synopsis "Patch python built-in objects")
17598 (description "This project allows Python code to extend built-in types.")
17599 (license (list license:gpl3+ license:expat))))
9786258b
LDB
17600
17601(define-public python-shouldbe
17602 (package
17603 (name "python-shouldbe")
17604 (version "0.1.2")
17605 (source
17606 (origin
17607 (method url-fetch)
17608 (uri (pypi-uri "shouldbe" version))
17609 (sha256
17610 (base32
17611 "16zbvjxf71dl4yfbgcr6idyim3mdrfvix1dv8b95p0s9z07372pj"))))
17612 (build-system python-build-system)
17613 (propagated-inputs
17614 `(("python-forbiddenfruit" ,python-forbiddenfruit)))
17615 (native-inputs
17616 `(("python-nose" ,python-nose)))
17617 (home-page "https://github.com/directxman12/should_be")
17618 (synopsis "Python Assertion Helpers inspired by Shouldly")
17619 (description
17620 "Python Assertion Helpers inspired by Shouldly.")
17621 (license license:isc)))
72c2478a
LDB
17622
17623(define-public python-k5test
17624 (package
17625 (name "python-k5test")
17626 (version "0.9.2")
17627 (source
17628 (origin
17629 (method url-fetch)
17630 (uri (pypi-uri "k5test" version))
17631 (sha256
17632 (base32
17633 "1lqp3jgfngyhaxjgj3n230hn90wsylwilh120yjf62h7b1s02mh8"))))
17634 (build-system python-build-system)
17635 (propagated-inputs
17636 `(("python-six" ,python-six)
17637 ;; `which`, `kadmin.local` binaries called inside library
17638 ("which" ,which)
17639 ("mit-krb5" ,mit-krb5)))
17640 (native-inputs `(("mit-krb5" ,mit-krb5)))
17641 (arguments
17642 '(#:phases
17643 (modify-phases %standard-phases
17644 (add-after 'unpack 'patch-paths
17645 (lambda* _
17646 (substitute* "k5test/realm.py"
17647 (("'kadmin_local'") "'kadmin.local'")))))))
17648 (home-page "https://github.com/pythongssapi/k5test")
17649 (synopsis "Library for setting up self-contained Kerberos 5 environments")
17650 (description
17651 "@code{k5test} is a library for setting up self-contained Kerberos 5
17652environments, and running Python unit tests inside those environments. It is
17653based on the file of the same name found alongside the MIT Kerberos 5 unit
17654tests.")
17655 (license license:isc)))
a8ef4978
LDB
17656
17657(define-public python-gssapi
17658 (package
17659 (name "python-gssapi")
17660 (version "1.6.1")
17661 (source
17662 (origin
17663 (method url-fetch)
17664 (uri (pypi-uri "gssapi" version))
17665 (sha256
17666 (base32
17667 "1gymg4asvwrz7y13qpwp2s5g8qwq179d72gkj09q6bfcgs82l5wr"))))
17668 (build-system python-build-system)
17669 (propagated-inputs
17670 `(("python-decorator" ,python-decorator)
17671 ("python-six" ,python-six)))
17672 (inputs
17673 `(("mit-krb5" ,mit-krb5)))
17674 ;; for tests
17675 (native-inputs
17676 `(("python-shouldbe" ,python-shouldbe)
17677 ("python-parameterized" ,python-parameterized)
17678 ("python-k5test" ,python-k5test)
17679 ("python-nose" ,python-nose)))
17680 (home-page "https://github.com/pythongssapi/python-gssapi")
17681 (synopsis "Python GSSAPI Wrapper")
17682 (description
17683 "Python-GSSAPI provides both low-level and high level wrappers around the
17684GSSAPI C libraries. While it focuses on the Kerberos mechanism, it should
17685also be useable with other GSSAPI mechanisms.")
17686 (license license:isc)))
7261bdca
JL
17687
17688(define-public python-check-manifest
17689 (package
17690 (name "python-check-manifest")
17691 (version "0.37")
17692 (source
17693 (origin
17694 (method url-fetch)
17695 (uri (pypi-uri "check-manifest" version))
17696 (sha256
17697 (base32
17698 "0lk45ifdv2cpkl6ayfyix7jwmnxa1rha7xvb0ih5999k115wzqs4"))))
17699 (build-system python-build-system)
17700 (native-inputs
17701 `(("python-mock" ,python-mock)
17702 ("git" ,git)))
17703 (home-page "https://github.com/mgedmin/check-manifest")
17704 (synopsis "Check MANIFEST.in in a Python source package for completeness")
17705 (description "Python package can include a MANIFEST.in file to help with
17706sending package files to the Python Package Index. This package checks that
17707file to ensure it completely and accurately describes your project.")
17708 (license license:expat)))
b487b7b5
JL
17709
17710(define-public python-android-stringslib
17711 (package
17712 (name "python-android-stringslib")
17713 (version "0.1.2")
17714 (source
17715 (origin
17716 (method git-fetch)
17717 (uri (git-reference
17718 (url "https://framagit.org/tyreunom/python-android-strings-lib")
17719 (commit (string-append "v" version))))
17720 (file-name (git-file-name name version))
17721 (sha256
17722 (base32
17723 "0gij55qzzq1h83kfpvhai1vf78kkhyvxa6l17m2nl24454lhfin4"))))
17724 (build-system python-build-system)
17725 (arguments
17726 `(#:tests? #f))
17727 (home-page "https://framagit.org/tyreunom/python-android-strings-lib")
17728 (synopsis "Android strings.xml support")
17729 (description "Android Strings Lib provides support for android's strings.xml
17730files. These files are used to translate strings in android apps.")
17731 (license license:expat)))
87435943 17732
7dec888f
JL
17733(define-public python-watchdog
17734 (package
17735 (name "python-watchdog")
17736 (version "0.9.0")
17737 (source
17738 (origin
17739 (method url-fetch)
17740 (uri (pypi-uri "watchdog" version))
17741 (sha256
17742 (base32
17743 "07cnvvlpif7a6cg4rav39zq8fxa5pfqawchr46433pij0y6napwn"))))
17744 (build-system python-build-system)
17745 (arguments
17746 `(#:phases
17747 (modify-phases %standard-phases
17748 (add-before 'check 'remove-failing
17749 (lambda _
17750 (delete-file "tests/test_inotify_buffer.py")
17751 (delete-file "tests/test_snapshot_diff.py")
17752 #t)))))
17753 (propagated-inputs
17754 `(("python-argh" ,python-argh)
17755 ("python-pathtools" ,python-pathtools)
17756 ("python-pyyaml" ,python-pyyaml)))
17757 (native-inputs
17758 `(("python-pytest-cov" ,python-pytest-cov)
17759 ("python-pytest-timeout" ,python-pytest-timeout)))
17760 (home-page "https://github.com/gorakhargosh/watchdog")
17761 (synopsis "Filesystem events monitoring")
17762 (description "This package provides a way to monitor filesystem events
17763such as a file modification and trigger an action. This is similar to inotify,
17764but portable.")
17765 (license license:asl2.0)))
2cbede59 17766
9c9704a9
MC
17767(define-public python-wget
17768 (package
17769 (name "python-wget")
17770 (version "3.2")
17771 (source
17772 (origin
17773 (method url-fetch)
17774 (uri (pypi-uri "wget" version ".zip"))
17775 (sha256
17776 (base32
17777 "0qb0y7ipby42m4m7h0ipazpdyc3bn9xi46lvifcwwl5albn31rim"))))
17778 (build-system python-build-system)
17779 (native-inputs `(("unzip" ,unzip)))
17780 (home-page "https://bitbucket.org/techtonik/python-wget/")
17781 (synopsis "Pure Python download utility")
17782 (description "The python-wget library provides an API to download files
17783with features similar to the @command{wget} utility.")
17784 (license license:unlicense)))
17785
2cbede59
JL
17786(define-public offlate
17787 (package
17788 (name "offlate")
17789 (version "0.5")
17790 (source
17791 (origin
17792 (method git-fetch)
17793 (uri (git-reference
17794 (url "https://framagit.org/tyreunom/offlate")
17795 (commit version)))
17796 (file-name (git-file-name name version))
17797 (sha256
17798 (base32
17799 "13pqnbl05wcyldfvl75fp89vjgwsvxyc69vhnb17kkha2rc2k1h7"))))
17800 (build-system python-build-system)
17801 (arguments
17802 ;; No tests
17803 `(#:tests? #f))
17804 (propagated-inputs
17805 `(("python-android-stringslib" ,python-android-stringslib)
17806 ("python-dateutil" ,python-dateutil)
17807 ("python-gitlab" ,python-gitlab)
17808 ("python-lxml" ,python-lxml)
17809 ("python-polib" ,python-polib)
17810 ("python-pyenchant" ,python-pyenchant)
17811 ("python-pygit2" ,python-pygit2)
17812 ("python-pygithub" ,python-pygithub)
17813 ("python-pyqt" ,python-pyqt)
17814 ("python-requests" ,python-requests)
17815 ("python-ruamel.yaml" ,python-ruamel.yaml)
17816 ("python-translation-finder" ,python-translation-finder)
17817 ("python-watchdog" ,python-watchdog)))
17818 (native-inputs
17819 `(("qttools" ,qttools)))
17820 (home-page "https://framagit.org/tyreunom/offlate")
17821 (synopsis "Offline translation interface for online translation tools")
17822 (description "Offlate offers a unified interface for different translation
17823file formats, as well as many different online translation platforms. You can
17824use it to get work from online platforms, specialized such as the Translation
17825Project, or not such a gitlab instance when your upstream doesn't use any
17826dedicated platform. The tool proposes a unified interface for any format and
17827an upload option to send your work back to the platform.")
17828 (license license:gpl3+)))
479f4013
JK
17829
17830(define-public python-pypng
17831 (package
17832 (name "python-pypng")
17833 (version "0.0.20")
17834 (source
17835 (origin
17836 (method url-fetch)
17837 (uri (pypi-uri "pypng" version))
17838 (sha256
17839 (base32 "02qpa22ls41vwsrzw9r9qhj1nhq05p03hb5473pay6y980s86chh"))))
17840 (build-system python-build-system)
17841 (home-page "https://github.com/drj11/pypng")
17842 (synopsis "Pure Python PNG image encoder/decoder")
17843 (description
17844 "The PyPNG module implements support for PNG images. It reads and writes
17845PNG files with all allowable bit depths (1/2/4/8/16/24/32/48/64 bits per
17846pixel) and colour combinations: greyscale (1/2/4/8/16 bit); RGB, RGBA,
17847LA (greyscale with alpha) with 8/16 bits per channel; colour mapped
17848images (1/2/4/8 bit). Adam7 interlacing is supported for reading and writing.
17849A number of optional chunks can be specified (when writing) and
17850understood (when reading): tRNS, bKGD, gAMA.
17851
17852PyPNG is not a high level toolkit for image processing (like PIL) and does not
17853aim at being a replacement or competitor. Its strength lies in fine-grained
17854extensive support of PNG features. It can also read and write Netpbm PAM
17855files, with a focus on its use as an intermediate format for implementing
17856custom PNG processing.")
17857 (license license:expat)))
da8ca4c3 17858
17859(define-public python-fuzzywuzzy
17860 (package
17861 (name "python-fuzzywuzzy")
17862 (version "0.18.0")
17863 (source
17864 (origin
17865 (method url-fetch)
17866 (uri (pypi-uri "fuzzywuzzy" version))
17867 (sha256
17868 (base32
17869 "1s00zn75y2dkxgnbw8kl8dw4p1mc77cv78fwfa4yb0274s96w0a5"))))
17870 (build-system python-build-system)
17871 (native-inputs
17872 `(("python-hypothesis" ,python-hypothesis)
17873 ("python-pycodestyle" ,python-pycodestyle)
17874 ("python-pytest" ,python-pytest)))
17875 (propagated-inputs
17876 `(("python-levenshtein" ,python-levenshtein)))
17877 (home-page "https://github.com/seatgeek/fuzzywuzzy")
7d9f8db2 17878 (synopsis "Fuzzy string matching in Python")
da8ca4c3 17879 (description "Approximate string matching using
17880@emph{Levenshtein Distance} to calculate the differences between
17881sequences.")
17882 (license license:gpl2)))
17883
17884(define-public python2-fuzzywuzzy
17885 (package-with-python2 python-fuzzywuzzy))