gnu: Add python-ujson.
[jackhill/guix/guix.git] / gnu / packages / python-xyz.scm
CommitLineData
44d10b1f
RW
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
2d040763 3;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
fa8ffaa0 4;;; Copyright © 2013, 2014, 2015, 2016, 2019 Andreas Enge <andreas@enge.fr>
44d10b1f
RW
5;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
6;;; Copyright © 2014, 2017 Eric Bavier <bavier@member.fsf.org>
7;;; Copyright © 2014, 2015 Federico Beffa <beffa@fbengineering.ch>
8;;; Copyright © 2015 Omar Radwan <toxemicsquire4@gmail.com>
9;;; Copyright © 2015 Pierre-Antoine Rault <par@rigelk.eu>
10;;; Copyright © 2015, 2016, 2017, 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
11;;; Copyright © 2015, 2016 Christopher Allan Webber <cwebber@dustycloud.org>
12;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
13;;; Copyright © 2015, 2016 David Thompson <davet@gnu.org>
b742c006 14;;; Copyright © 2015, 2016, 2017, 2019 Leo Famulari <leo@famulari.name>
44d10b1f
RW
15;;; Copyright © 2015, 2017 Ben Woodcroft <donttrustben@gmail.com>
16;;; Copyright © 2015, 2016 Erik Edrosa <erik.edrosa@gmail.com>
17;;; Copyright © 2015, 2016, 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
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>
47f66348 29;;; Copyright © 2016, 2017, 2018, 2019 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
RW
33;;; Copyright © 2016, 2017, 2018 Arun Isaac <arunisaac@systemreboot.net>
34;;; Copyright © 2016, 2017, 2018 Julien Lepiller <julien@lepiller.eu>
217ea1a1 35;;; Copyright © 2016, 2017, 2018, 2019 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>
412342d1 54;;; Copyright © 2018, 2019 Nicolas Goaziou <mail@nicolasgoaziou.fr>
44d10b1f 55;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
85cfb0e9 56;;; Copyright © 2018, 2019 Clément Lassieur <clement@lassieur.org>
4caf37b0 57;;; Copyright © 2018, 2019 Maxim Cournoyer <maxim.cournoyer@gmail.com>
44d10b1f
RW
58;;; Copyright © 2018 Luther Thompson <lutheroto@gmail.com>
59;;; Copyright © 2018 Vagrant Cascadian <vagrant@debian.org>
a9ba0a31 60;;; Copyright © 2019 Brett Gilio <brettg@posteo.net>
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>
44d10b1f
RW
70;;;
71;;; This file is part of GNU Guix.
72;;;
73;;; GNU Guix is free software; you can redistribute it and/or modify it
74;;; under the terms of the GNU General Public License as published by
75;;; the Free Software Foundation; either version 3 of the License, or (at
76;;; your option) any later version.
77;;;
78;;; GNU Guix is distributed in the hope that it will be useful, but
79;;; WITHOUT ANY WARRANTY; without even the implied warranty of
80;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
81;;; GNU General Public License for more details.
82;;;
83;;; You should have received a copy of the GNU General Public License
84;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
85
86(define-module (gnu packages python-xyz)
87 #:use-module ((guix licenses) #:prefix license:)
88 #:use-module (gnu packages)
89 #:use-module (gnu packages algebra)
90 #:use-module (gnu packages adns)
91 #:use-module (gnu packages attr)
92 #:use-module (gnu packages backup)
93 #:use-module (gnu packages bash)
94 #:use-module (gnu packages check)
95 #:use-module (gnu packages compression)
96 #:use-module (gnu packages crypto)
97 #:use-module (gnu packages databases)
f825e605 98 #:use-module (gnu packages dbm)
44d10b1f
RW
99 #:use-module (gnu packages file)
100 #:use-module (gnu packages fontutils)
101 #:use-module (gnu packages gcc)
102 #:use-module (gnu packages geo)
103 #:use-module (gnu packages ghostscript)
104 #:use-module (gnu packages gl)
105 #:use-module (gnu packages glib)
e2ebbbcc 106 #:use-module (gnu packages gnome)
44d10b1f
RW
107 #:use-module (gnu packages graphviz)
108 #:use-module (gnu packages graphics)
109 #:use-module (gnu packages gstreamer)
110 #:use-module (gnu packages gtk)
111 #:use-module (gnu packages icu4c)
112 #:use-module (gnu packages image)
113 #:use-module (gnu packages imagemagick)
114 #:use-module (gnu packages libevent)
115 #:use-module (gnu packages libffi)
116 #:use-module (gnu packages linux)
117 #:use-module (gnu packages llvm)
118 #:use-module (gnu packages man)
119 #:use-module (gnu packages maths)
42f0b0c2 120 #:use-module (gnu packages monitoring)
44d10b1f
RW
121 #:use-module (gnu packages multiprecision)
122 #:use-module (gnu packages networking)
123 #:use-module (gnu packages ncurses)
124 #:use-module (gnu packages openstack)
125 #:use-module (gnu packages pcre)
126 #:use-module (gnu packages perl)
127 #:use-module (gnu packages pkg-config)
128 #:use-module (gnu packages python)
d362b11d 129 #:use-module (gnu packages python-check)
15b65617 130 #:use-module (gnu packages python-compression)
44d10b1f 131 #:use-module (gnu packages python-crypto)
ca7c3653 132 #:use-module (gnu packages python-science)
44d10b1f
RW
133 #:use-module (gnu packages python-web)
134 #:use-module (gnu packages qt)
135 #:use-module (gnu packages readline)
136 #:use-module (gnu packages sdl)
137 #:use-module (gnu packages search)
138 #:use-module (gnu packages shells)
9d0c291e 139 #:use-module (gnu packages sphinx)
44d10b1f
RW
140 #:use-module (gnu packages ssh)
141 #:use-module (gnu packages terminals)
142 #:use-module (gnu packages tex)
143 #:use-module (gnu packages texinfo)
144 #:use-module (gnu packages time)
145 #:use-module (gnu packages tls)
146 #:use-module (gnu packages version-control)
147 #:use-module (gnu packages video)
148 #:use-module (gnu packages web)
149 #:use-module (gnu packages base)
150 #:use-module (gnu packages xml)
151 #:use-module (gnu packages xorg)
152 #:use-module (gnu packages xdisorg)
153 #:use-module (gnu packages tcl)
154 #:use-module (gnu packages bdw-gc)
f98232a3 155 #:use-module (gnu packages serialization)
44d10b1f
RW
156 #:use-module (guix packages)
157 #:use-module (guix download)
158 #:use-module (guix git-download)
a042d348 159 #:use-module (guix hg-download)
44d10b1f
RW
160 #:use-module (guix utils)
161 #:use-module (guix build-system gnu)
162 #:use-module (guix build-system cmake)
163 #:use-module (guix build-system python)
164 #:use-module (guix build-system trivial)
165 #:use-module (srfi srfi-1)
166 #:use-module (srfi srfi-26))
167
168(define-public python-psutil
169 (package
170 (name "python-psutil")
e9119ac1 171 (version "5.6.5")
44d10b1f
RW
172 (source
173 (origin
174 (method url-fetch)
175 (uri (pypi-uri "psutil" version))
176 (sha256
e9119ac1 177 (base32 "0isil5jxwwd8awz54qk28rpgjg43i5l6yl70g40vxwa4r4m56lfh"))))
44d10b1f
RW
178 (build-system python-build-system)
179 (arguments
180 ;; FIXME: some tests does not return and times out.
181 '(#:tests? #f))
182 (home-page "https://www.github.com/giampaolo/psutil")
183 (synopsis "Library for retrieving information on running processes")
184 (description
185 "psutil (Python system and process utilities) is a library for retrieving
186information on running processes and system utilization (CPU, memory, disks,
187network) in Python. It is useful mainly for system monitoring, profiling and
188limiting process resources and management of running processes. It implements
189many functionalities offered by command line tools such as: ps, top, lsof,
190netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
191pidof, tty, taskset, pmap.")
192 (properties `((python2-variant . ,(delay python2-psutil))))
193 (license license:bsd-3)))
194
195(define-public python2-psutil
196 (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
197 (package
198 (inherit base)
199 (propagated-inputs
200 `(("python2-enum34" ,python2-enum34) ;optional
201 ,@(package-propagated-inputs base))))))
202
203(define-public python-shapely
204 (package
205 (name "python-shapely")
6d94465b 206 (version "1.6.4.post2")
44d10b1f
RW
207 (source
208 (origin
209 (method url-fetch)
210 (uri (pypi-uri "Shapely" version))
211 (sha256
212 (base32
6d94465b 213 "03r42fmd9alp6r3q95ad6rldq2f7n1wimrw53zy5kpn33yv7pf64"))))
44d10b1f
RW
214 (build-system python-build-system)
215 (native-inputs
216 `(("python-cython" ,python-cython)
217 ("python-matplotlib" ,python-matplotlib)
218 ("python-pytest" ,python-pytest)
219 ("python-pytest-cov" ,python-pytest-cov)))
220 (inputs
221 `(("geos" ,geos)))
222 (propagated-inputs
223 `(("python-numpy" ,python-numpy)))
224 (arguments
225 `(#:phases
226 (modify-phases %standard-phases
227 (add-after 'unpack 'patch-geos-path
228 (lambda* (#:key inputs #:allow-other-keys)
229 (let ((geos (assoc-ref inputs "geos"))
230 (glibc (assoc-ref inputs ,(if (%current-target-system)
231 "cross-libc" "libc"))))
232 (substitute* "shapely/geos.py"
233 (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)")
234 (string-append "_lgeos = load_dll('geos_c', fallbacks=['"
235 geos "/lib/libgeos_c.so'])"))
236 (("free = load_dll\\('c'\\)\\.free")
237 (string-append "free = load_dll('c', fallbacks=['"
238 glibc "/lib/libc.so.6']).free"))))
239 #t)))))
240 (home-page "https://github.com/Toblerity/Shapely")
241 (synopsis "Library for the manipulation and analysis of geometric objects")
242 (description "Shapely is a Python package for manipulation and analysis of
243planar geometric objects. It is based on the @code{GEOS} library.")
244 (license license:bsd-3)))
245
a91f4eba
S
246(define-public python-shortuuid
247 (package
248 (name "python-shortuuid")
249 (version "0.5.0")
250 (source
251 (origin
252 (method url-fetch)
253 (uri (pypi-uri "shortuuid" version))
254 (sha256
255 (base32
256 "1f8i4zwj5vmpzbz6b17bljy4399gx5aq7vsyw63sz2qgyjcd73yh"))))
257 (build-system python-build-system)
258 (native-inputs
259 `(("python-pep8" ,python-pep8)))
260 (home-page "https://github.com/skorokithakis/shortuuid")
261 (synopsis "Generator library for concise, unambiguous and URL-safe UUIDs")
262 (description
263 "@code{shortuuid} is a Python library for generating concise, unambiguous
264and URL-safe UUIDs. UUIDs are generated using the built-in Python @code{uuid}
265module and then similar looking characters are removed.")
266 (license license:bsd-3)))
267
44d10b1f
RW
268(define-public python-logwrap
269 (package
270 (name "python-logwrap")
271 (version "3.2.1")
272 (source
273 (origin
274 (method url-fetch)
275 (uri (pypi-uri "logwrap" version ".zip"))
276 (sha256
277 (base32
278 "1d2k0hvpbi51vl410y8fbs5m0nxnlh2k7gr2nrh3k81ibhzscsra"))))
279 (build-system python-build-system)
280 (propagated-inputs
281 `(("python-six" ,python-six)
282 ("python-typing" ,python-typing)))
283 (native-inputs
284 `(("unzip" ,unzip)
285 ("python-cython" ,python-cython)
286 ("python-pytest" ,python-pytest)
287 ("python-pytest-cov" ,python-pytest-cov)
288 ("python-pytest-runner" ,python-pytest-runner)))
289 (home-page "https://github.com/penguinolog/logwrap")
290 (synopsis "Decorator for logging function arguments")
291 (description "This package provides a decorator to log function arguments
292and function call return values in a human-readable way.")
293 (license license:asl2.0)))
294
295(define-public python2-shapely
296 (package-with-python2 python-shapely))
297
298(define-public python-clyent
299 (package
300 (name "python-clyent")
301 (version "1.2.1")
302 (source
303 (origin
304 (method url-fetch)
305 (uri (pypi-uri "clyent" version))
306 (sha256
307 (base32
308 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
309 (build-system python-build-system)
310 (native-inputs
311 `(("python-mock" ,python-mock)))
312 (home-page "https://github.com/binstar/clyent")
313 (synopsis "Command line client library")
314 (description "Clyent is a Python command line utiliy library. It is used
315by @code{binstar}, @code{binstar-build} and @code{chalmers}.")
316 (license license:bsd-3)))
317
318(define-public python2-clyent
319 (package-with-python2 python-clyent))
320
321(define-public python-babel
322 (package
323 (name "python-babel")
93253411 324 (version "2.7.0")
44d10b1f
RW
325 (source
326 (origin
327 (method url-fetch)
328 (uri (pypi-uri "Babel" version))
329 (sha256
330 (base32
93253411 331 "0a7wawx8vsg7igvz6p3x909fskhg4b2y1910xk4f4c8y22p3aqg8"))))
44d10b1f
RW
332 (build-system python-build-system)
333 (native-inputs
334 `(("python-freezegun" ,python-freezegun)
335 ("python-pytest" ,python-pytest)))
336 (propagated-inputs
337 `(("python-pytz" ,python-pytz)))
338 (arguments
339 `(#:phases (modify-phases %standard-phases
340 (replace 'check
8acd1e90
MB
341 (lambda _
342 (invoke "pytest" "-vv" "-k"
343 (string-append
344 ;; XXX: These tests fail when using Pytest 4.x and
345 ;; Babel 2.6.0. Try removing this for later versions.
346 "not test_no_inherit_metazone_marker_never_in_output"
347 " and not test_smoke_dates"
348 " and not test_smoke_numbers")))))))
44d10b1f
RW
349 (home-page "http://babel.pocoo.org/")
350 (synopsis
351 "Tools for internationalizing Python applications")
352 (description
353 "Babel is composed of two major parts:
354- tools to build and work with gettext message catalogs
355- a Python interface to the CLDR (Common Locale Data Repository), providing
356access to various locale display names, localized number and date formatting,
357etc. ")
358 (license license:bsd-3)))
359
360(define-public python2-babel
361 (package-with-python2 python-babel))
362
93253411
MB
363;; Sphinx < 2.0 requires this version. Remove once no longer needed.
364(define-public python2-babel-2.6
365 (package
366 (inherit python2-babel)
367 (version "2.6.0")
368 (source (origin
369 (method url-fetch)
370 (uri (pypi-uri "Babel" version))
371 (sha256
372 (base32
373 "08rxmbx2s4irp0w0gmn498vns5xy0fagm0fg33xa772jiks51flc"))))))
374
44d10b1f
RW
375(define-public python2-backport-ssl-match-hostname
376 (package
377 (name "python2-backport-ssl-match-hostname")
378 (version "3.5.0.1")
379 (source
380 (origin
381 (method url-fetch)
2c1f0d09 382 (uri (pypi-uri "backports.ssl_match_hostname" version))
44d10b1f
RW
383 (sha256
384 (base32
385 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
386 (build-system python-build-system)
387 (arguments
388 `(#:python ,python-2
389 #:tests? #f)) ; no test target
390 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
391 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
392 (description
393 "This backport brings the ssl.match_hostname() function to users of
394earlier versions of Python. The function checks the hostname in the
395certificate returned by the server to which a connection has been established,
396and verifies that it matches the intended target hostname.")
397 (license license:psfl)))
398
dc827867
TGR
399(define-public python-boolean.py
400 (package
401 (name "python-boolean.py")
402 (version "3.6")
403 (source
404 (origin
405 ;; There's no source tarball on PyPI.
406 (method git-fetch)
407 (uri (git-reference
408 (url "https://github.com/bastikr/boolean.py")
409 (commit (string-append "v" version))))
410 (file-name (git-file-name name version))
411 (sha256
412 (base32 "1wc89y73va58cj7dsx6c199zpxsy9q53dsffsdj6zmc90inqz6qs"))))
413 (build-system python-build-system)
414 (home-page "https://github.com/bastikr/boolean.py")
415 (synopsis "Boolean algebra in one Python module")
416 (description
417 "This is a small Python library that implements boolean algebra.
418It defines two base elements, @code{TRUE} and @code{FALSE}, and a
419@code{Symbol} class that can take on one of these two values. Calculations
420are done only in terms of @code{AND}, @code{OR}, and @code{NOT}---other
421compositions like @code{XOR} and @code{NAND} are emulated on top of them.
422Expressions are constructed from parsed strings or directly in Python.")
423 (license license:bsd-2)))
424
44d10b1f
RW
425(define-public python-hdf4
426 (package
427 (name "python-hdf4")
428 (version "0.9")
429 (source
430 (origin
431 (method url-fetch)
432 (uri (pypi-uri name version))
433 (sha256
434 (base32
435 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
436 (build-system python-build-system)
437 (native-inputs `(("nose" ,python-nose)))
438 (propagated-inputs `(("numpy" ,python-numpy)))
439 (inputs
440 `(("hdf4" ,hdf4)
441 ("libjpeg" ,libjpeg)
442 ("zlib" ,zlib)))
443 (arguments
444 `(#:phases
445 (modify-phases %standard-phases
446 (replace 'check
447 (lambda _
448 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
449 ;; on to import numpy. Somehow this works on their CI system.
450 ;; Let's just manage PYTHONPATH here instead.
451 (substitute* "runexamples.sh"
452 (("export PYTHONPATH=.*") ""))
453 (setenv "PYTHONPATH"
454 (string-append (getcwd) ":"
455 (getenv "PYTHONPATH")))
456 (invoke "./runexamples.sh")
457 (invoke "nosetests" "-v"))))))
458 (home-page "https://github.com/fhs/python-hdf4")
459 (synopsis "Python interface to the NCSA HDF4 library")
460 (description
461 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
462which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
463NetCDF files can also be read and modified. Python-HDF4 is a fork of
464@url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
465 (license license:expat)))
466
467(define-public python2-hdf4
468 (package-with-python2 python-hdf4))
469
470(define-public python-h5py
471 (package
472 (name "python-h5py")
473 (version "2.8.0")
474 (source
475 (origin
476 (method url-fetch)
477 (uri (pypi-uri "h5py" version))
478 (sha256
479 (base32
480 "0mdr6wrq02ac93m1aqx9kad0ppfzmm4imlxqgyy1x4l7hmdcc9p6"))))
481 (build-system python-build-system)
482 (arguments
483 `(#:tests? #f ; no test target
484 #:phases
485 (modify-phases %standard-phases
486 (add-after 'unpack 'fix-hdf5-paths
487 (lambda* (#:key inputs #:allow-other-keys)
488 (let ((prefix (assoc-ref inputs "hdf5")))
489 (substitute* "setup_build.py"
490 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
491 (string-append "['" prefix "/lib" "']"))
492 (("'/opt/local/include', '/usr/local/include'")
493 (string-append "'" prefix "/include" "'")))
494 (substitute* "setup_configure.py"
495 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
496 (string-append "['" prefix "/lib" "']")))
497 #t))))))
498 (propagated-inputs
499 `(("python-six" ,python-six)
500 ("python-numpy" ,python-numpy)))
501 (inputs
502 `(("hdf5" ,hdf5)))
503 (native-inputs
504 `(("python-cython" ,python-cython)
505 ("python-pkgconfig" ,python-pkgconfig)))
506 (home-page "http://www.h5py.org/")
507 (synopsis "Read and write HDF5 files from Python")
508 (description
509 "The h5py package provides both a high- and low-level interface to the
510HDF5 library from Python. The low-level interface is intended to be a
511complete wrapping of the HDF5 API, while the high-level component supports
512access to HDF5 files, datasets and groups using established Python and NumPy
513concepts.")
514 (license license:bsd-3)))
515
516(define-public python2-h5py
517 (package-with-python2 python-h5py))
518
8b89dedc
RW
519(define-public python-sh
520 (package
521 (name "python-sh")
522 (version "1.12.14")
523 (source
524 (origin
525 (method url-fetch)
526 (uri (pypi-uri "sh" version))
527 (sha256
528 (base32
529 "1z2hx357xp3v4cv44xmqp7lli3frndqpyfmpbxf7n76h7s1zaaxm"))))
530 (build-system python-build-system)
fd3638d8
EF
531 (arguments
532 '(#:phases
533 (modify-phases %standard-phases
534 (replace 'check
535 (lambda _
ca983a2f
NG
536 ;; XXX: A Python 2 test fails when HOME=/homeless-shelter.
537 (setenv "HOME" "/tmp")
fd3638d8
EF
538 (invoke "python" "sh.py" "test"))))))
539 (native-inputs
540 `(("python-coverage" ,python-coverage)))
8b89dedc
RW
541 (home-page "https://github.com/amoffat/sh")
542 (synopsis "Python subprocess replacement")
543 (description "This package provides a replacement for Python's
544@code{subprocess} feature.")
545 (license license:expat)))
546
3869effd
RW
547(define-public python2-sh
548 (package-with-python2 python-sh))
549
d362b11d
RW
550(define-public python-cftime
551 (package
552 (name "python-cftime")
da107cf5 553 (version "1.0.4.2")
d362b11d
RW
554 (source
555 (origin
556 (method url-fetch)
557 (uri (pypi-uri "cftime" version))
558 (sha256
da107cf5 559 (base32 "0w0gi6jnch38hiygl62j4xkcirv4y3dcwrvxl9p7bsk6j27lzihs"))))
d362b11d
RW
560 (build-system python-build-system)
561 (propagated-inputs
562 `(("python-numpy" ,python-numpy)))
563 (native-inputs
564 `(("python-coveralls" ,python-coveralls)
565 ("python-cython" ,python-cython)
566 ("python-pytest-cov" ,python-pytest-cov)))
567 (home-page "https://github.com/Unidata/cftime")
568 (synopsis "Library for time handling")
569 (description
570 "This package provides time-handling functionality that used to be part
571of the netcdf4 package before.")
572 ;; This package claims to include code under the GPLv3 but is released
573 ;; under ISC.
574 (license (list license:isc license:gpl3+))))
575
44d10b1f
RW
576(define-public python-netcdf4
577 (package
578 (name "python-netcdf4")
93e7b209 579 (version "1.4.2")
44d10b1f
RW
580 (source
581 (origin
582 (method url-fetch)
583 (uri (pypi-uri "netCDF4" version))
584 (sha256
585 (base32
93e7b209 586 "0c0sklgrmv15ygliin8qq0hp7vanmbi74m6zpi0r1ksr0hssyd5r"))))
44d10b1f 587 (build-system python-build-system)
93e7b209
RW
588 (arguments
589 '(#:phases
590 (modify-phases %standard-phases
591 (add-after 'unpack 'configure-locations
592 (lambda* (#:key inputs #:allow-other-keys)
593 (setenv "HDF5_DIR" (assoc-ref inputs "hdf5"))
594 #t)))))
44d10b1f
RW
595 (native-inputs
596 `(("python-cython" ,python-cython)))
597 (propagated-inputs
93e7b209
RW
598 `(("python-numpy" ,python-numpy)
599 ("python-cftime" ,python-cftime)))
44d10b1f
RW
600 (inputs
601 `(("netcdf" ,netcdf)
602 ("hdf4" ,hdf4)
603 ("hdf5" ,hdf5)))
93e7b209 604 (home-page "https://github.com/Unidata/netcdf4-python")
44d10b1f
RW
605 (synopsis "Python/numpy interface to the netCDF library")
606 (description "Netcdf4-python is a Python interface to the netCDF C
607library. netCDF version 4 has many features not found in earlier
608versions of the library and is implemented on top of HDF5. This module
609can read and write files in both the new netCDF 4 and the old netCDF 3
610format, and can create files that are readable by HDF5 clients. The
611API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
612to users of that module.")
613 ;; The software is mainly ISC, but includes some files covered
614 ;; by the Expat license.
615 (license (list license:isc license:expat))))
616
617(define-public python2-netcdf4
618 (package-with-python2 python-netcdf4))
619
d6803445
TGR
620(define-public python-license-expression
621 (package
622 (name "python-license-expression")
623 (version "0.999")
624 (source
625 (origin
626 (method url-fetch)
627 (uri (pypi-uri "license-expression" version))
628 (sha256
629 (base32 "08ppb0bxbrsxazy88sgpl9yffvdsabw6dkk1nc332wcz2mphwwyf"))))
630 (build-system python-build-system)
631 (propagated-inputs
632 `(("python-boolean.py" ,python-boolean.py)))
633 (home-page "https://github.com/nexB/license-expression")
634 (synopsis "Apply boolean logic to license expressions")
635 (description
636 "This Python module defines a tiny language to evaluate and compare
637license expressions using boolean logic. Logical combinations of licenses can
638be tested for equality, containment, and equivalence. They can be normalised
639and simplified. It supports SPDX license expressions as well as other naming
640conventions and aliases in the same expression.")
641 (license license:gpl2+)))
642
44d10b1f
RW
643(define-public python-lockfile
644 (package
645 (name "python-lockfile")
646 (version "0.12.2")
647 (source
648 (origin
649 (method url-fetch)
8318bf07 650 (uri (pypi-uri "lockfile" version))
44d10b1f
RW
651 (sha256
652 (base32
653 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
654 (build-system python-build-system)
655 (arguments '(#:test-target "check"))
656 (native-inputs
657 `(("python-pbr" ,python-pbr)))
658 (home-page "https://launchpad.net/pylockfile")
659 (synopsis "Platform-independent file locking module")
660 (description
661 "The lockfile package exports a LockFile class which provides a simple
662API for locking files.")
663 (license license:expat)))
664
665(define-public python2-lockfile
666 (package-with-python2 python-lockfile))
667
668(define-public python-semantic-version
669 (package
670 (name "python-semantic-version")
671 (version "2.6.0")
672 (source
673 (origin
674 (method url-fetch)
675 (uri (pypi-uri "semantic_version" version))
676 (sha256
677 (base32
678 "1h2l9xyg1zzsda6kjcmfcgycbvrafwci283vcr1v5sbk01l2hhra"))))
679 (build-system python-build-system)
680 (arguments
681 `(#:tests? #f)) ; PyPI tarball lacks tests
682 (home-page "https://github.com/rbarrois/python-semanticversion")
683 (synopsis "Semantic versioning module for Python")
684 (description
685 "The @code{semantic_version} class is a small library for handling
686@uref{https://semver.org/, semantic versioning} (@dfn{SemVer}) in Python.
687
688It can compare versions, generate a new version that represents a bump in one of
689the version levels, and check whether any given string is a proper semantic
690version identifier.")
691 (license license:bsd-3)))
692
693(define-public python2-semantic-version
694 (package-with-python2 python-semantic-version))
695
696(define-public python-serpent
697 (package
698 (name "python-serpent")
fa9d14ac 699 (version "1.28")
44d10b1f
RW
700 (source
701 (origin
702 (method url-fetch)
703 (uri (pypi-uri "serpent" version))
704 (sha256
fa9d14ac 705 (base32 "1arnckykpkvv2qrp49l1k7q5mr5pisswl0rvdx98x8wsl1n361pk"))))
44d10b1f 706 (build-system python-build-system)
fa9d14ac
TGR
707 (native-inputs
708 `(("python-attrs" ,python-attrs)
709 ("python-pytz" ,python-pytz)))
44d10b1f
RW
710 (home-page "https://github.com/irmen/Serpent")
711 (synopsis "Serializer for literal Python expressions")
712 (description
1d3c7803
TGR
713 "Serpent provides @code{ast.literal_eval()}-compatible object tree
714serialization. It serializes an object tree into bytes (an utf-8 encoded
715string) that can be decoded and then passed as-is to @code{ast.literal_eval()}
716to rebuild the original object tree.
717
718Because only safe literals are encoded, it is safe to send serpent data to
719other machines, such as over the network.")
44d10b1f
RW
720 (license license:expat)))
721
722(define-public python-setuptools
723 (package
724 (name "python-setuptools")
e39d4933 725 (version "41.0.1")
44d10b1f
RW
726 (source
727 (origin
728 (method url-fetch)
729 (uri (pypi-uri "setuptools" version ".zip"))
730 (sha256
731 (base32
e39d4933 732 "04sns22y2hhsrwfy1mha2lgslvpjsjsz8xws7h2rh5a7ylkd28m2"))
44d10b1f
RW
733 (modules '((guix build utils)))
734 (snippet
735 '(begin
736 ;; Remove included binaries which are used to build self-extracting
737 ;; installers for Windows.
738 ;; TODO: Find some way to build them ourself so we can include them.
739 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
740 #t))))
741 (build-system python-build-system)
742 ;; FIXME: Tests require pytest, which itself relies on setuptools.
743 ;; One could bootstrap with an internal untested setuptools.
744 (arguments
745 `(#:tests? #f))
746 (home-page "https://pypi.python.org/pypi/setuptools")
747 (synopsis
748 "Library designed to facilitate packaging Python projects")
749 (description
750 "Setuptools is a fully-featured, stable library designed to facilitate
751packaging Python projects, where packaging includes:
752Python package and module definitions,
753distribution package metadata,
754test hooks,
755project installation,
756platform-specific details,
757Python 3 support.")
758 ;; TODO: setuptools now bundles the following libraries:
759 ;; packaging, pyparsing, six and appdirs. How to unbundle?
760 (license (list license:psfl ; setuptools itself
761 license:expat ; six, appdirs, pyparsing
762 license:asl2.0 ; packaging is dual ASL2/BSD-2
763 license:bsd-2))))
764
765(define-public python2-setuptools
766 (package-with-python2 python-setuptools))
767
0fdec2a3
MB
768;; The setuptools provided by Python 3.7.4 is too new for Tensorflow.
769(define-public python-setuptools-for-tensorflow
770 (hidden-package
771 (package
772 (inherit python-setuptools)
773 (version "39.1.0")
774 (source (origin
775 (inherit (package-source python-setuptools))
776 (uri (pypi-uri "setuptools" version ".zip"))
777 (sha256
778 (base32
779 "1mzdhvfhnv4lggxa8rjl0dzqxvfx377gg5sqs57v89wrp09lwj65")))))))
780
44d10b1f
RW
781(define-public python-uniseg
782 (package
783 (name "python-uniseg")
784 (version "0.7.1")
785 (source
786 (origin
787 (method url-fetch)
788 (uri (pypi-uri "uniseg" version ".zip"))
789 (sha256
790 (base32
791 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
792 (build-system python-build-system)
793 (arguments
794 '(#:tests? #f)) ; The test suite requires network access.
795 (native-inputs
796 `(("unzip" ,unzip)))
797 (home-page
798 "https://bitbucket.org/emptypage/uniseg-python")
799 (synopsis
800 "Python library to determine Unicode text segmentations")
801 (description
802 "Uniseg is a Python package used to determine Unicode text segmentations.
803Supported segmentations include:
804@enumerate
805@item @dfn{Code point} (any value in the Unicode codespace)
806@item @dfn{Grapheme cluster} (user-perceived character made of a single or
807multiple Unicode code points, e.g. \"G\" + acute-accent)
808@item Word break
809@item Sentence break
810@item Line break
811@end enumerate")
812 (license license:expat)))
813
814(define-public python2-uniseg
815 (package-with-python2 python-uniseg))
816
817(define-public python-humanfriendly
818 (package
819 (name "python-humanfriendly")
820 (version "4.4.1")
821 (source
822 (origin
823 (method url-fetch)
824 (uri (pypi-uri "humanfriendly" version))
825 (sha256
826 (base32
827 "0pisgizjql86785jchfjv217g0lsgk114g2lja5j4y3lsc3b9szi"))))
828 (build-system python-build-system)
829 (arguments
830 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
831 #:tests? #f))
832 (propagated-inputs
833 `(("python-monotonic" ,python-monotonic)))
834 (home-page "https://humanfriendly.readthedocs.io")
835 (synopsis "Human-friendly input and output in Python")
836 (description
837 "The functions and classes in @code{humanfriendly} can be used to make
838text interfaces more user-friendly. It includes tools to parse and format
839numbers, file sizes, and timespans, timers for long-running operations, menus
840to allow the user to choose from a list of options, and terminal interaction
841helpers.")
842 (license license:expat)))
843
844(define-public python2-humanfriendly
845 (package-with-python2 python-humanfriendly))
846
847(define-public python-capturer
848 (package
849 (name "python-capturer")
850 (version "2.4")
851 (source
852 (origin
853 (method url-fetch)
854 (uri (pypi-uri "capturer" version))
855 (sha256
856 (base32
857 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
858 (build-system python-build-system)
859 (arguments
860 `(#:tests? #f))
861 (propagated-inputs
862 `(("python-humanfriendly" ,python-humanfriendly)))
863 (home-page "https://capturer.readthedocs.io")
864 (synopsis "Capture stdout and stderr streams of the current process")
865 (description
866 "The capturer package makes it easy to capture the stdout and stderr
867streams of the current process and subprocesses. Output can be relayed
868to the terminal in real time but is also available to the Python program
869for additional processing.")
870 (license license:expat)))
871
872(define-public python2-capturer
873 (package-with-python2 python-capturer))
874
875(define-public python-case
876 (package
877 (name "python-case")
878 (version "1.5.3")
879 (source
880 (origin
881 (method url-fetch)
882 (uri (pypi-uri "case" version))
883 (sha256
884 (base32
885 "1cagg06vfph864s6l5jb0zqliwxh647bki8j6lf4a4qrv40jnhs8"))))
886 (build-system python-build-system)
887 (propagated-inputs
888 `(("python-mock" ,python-mock)
889 ("python-nose" ,python-nose)
890 ("python-six" ,python-six)
891 ("python-unittest2" ,python-unittest2)))
892 (native-inputs
893 `(("python-coverage" ,python-coverage)))
894 (home-page "https://github.com/celery/case")
895 (synopsis "Unittest utilities and convenience methods")
896 (description
897 "The @code{case} package provides utilities on top of unittest, including
898some helpful Python 2 compatibility convenience methods.")
899 (license license:bsd-3)))
900
901(define-public python-verboselogs
902 (package
903 (name "python-verboselogs")
904 (version "1.7")
905 (source
906 (origin
907 (method url-fetch)
908 (uri (pypi-uri "verboselogs" version))
909 (sha256
910 (base32
911 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
912 (build-system python-build-system)
1760c970
MO
913 (arguments
914 `(#:phases
915 (modify-phases %standard-phases
916 (replace 'check
917 (lambda _
918 ;; Do not run pylint plugin test, as astroid is an old
919 ;; unsupported version.
920 (invoke "pytest" "-v" "-k" "not test_pylint_plugin"
921 "verboselogs/tests.py"))))))
44d10b1f
RW
922 (native-inputs
923 `(("python-mock" ,python-mock)
1760c970 924 ("python-pytest" ,python-pytest)))
44d10b1f
RW
925 (home-page "https://verboselogs.readthedocs.io")
926 (synopsis "Verbose logging level for Python's logging module")
927 (description
928 "The @code{verboselogs} package extends Python's @code{logging} module to
929add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
930 (license license:expat)))
931
932(define-public python2-verboselogs
933 (package-with-python2 python-verboselogs))
934
935(define-public python-coloredlogs
936 (package
937 (name "python-coloredlogs")
b2b8a39c 938 (version "10.0")
44d10b1f
RW
939 (source
940 (origin
941 (method url-fetch)
942 (uri (pypi-uri "coloredlogs" version))
943 (sha256
944 (base32
b2b8a39c 945 "0dkw6xp0r1dwgz4s2f58npx5nxfq51wf4l6qkm5ib27slgfs4sdq"))))
44d10b1f
RW
946 (build-system python-build-system)
947 (arguments
948 `(;Tests require some updated modules
949 #:tests? #f))
950 (propagated-inputs
951 `(("python-capturer" ,python-capturer)))
952 (home-page "https://coloredlogs.readthedocs.io")
953 (synopsis "Colored stream handler for Python's logging module")
954 (description
955 "The @code{coloredlogs} package enables colored terminal output for
956Python's logging module. The @code{ColoredFormatter} class inherits from
957@code{logging.Formatter} and uses ANSI escape sequences to render your logging
958messages in color.")
959 (license license:expat)))
960
961(define-public python2-coloredlogs
962 (package-with-python2 python-coloredlogs))
963
af760990
VC
964(define-public python-editorconfig
965 (package
966 (name "python-editorconfig")
967 (version "0.12.2")
968 (source
969 (origin
970 (method url-fetch)
971 (uri (pypi-uri "EditorConfig" version))
972 (sha256
973 (base32
974 "0v55z351p9qkyp3bbspwywwn28sbcknhirngjbj779n3z52z63hv"))))
975 (build-system python-build-system)
976 (home-page "https://editorconfig.org/")
977 (synopsis "EditorConfig bindings for python")
978 (description "The EditorConfig project consists of a file format for
979defining coding styles and a collection of text editor plugins that enable
980editors to read the file format and adhere to defined styles. EditorConfig
981files are easily readable and they work nicely with version control systems.")
982 ;; "fnmatch.py" and "ini.py" are licensed under psfl, the rest is bsd-2.
983 (license (list license:bsd-2 license:psfl))))
984
4caf37b0
MC
985(define-public python-et-xmlfile
986 (package
987 (name "python-et-xmlfile")
988 (version "1.0.1")
989 (source
990 (origin
991 (method url-fetch)
992 (uri (pypi-uri "et_xmlfile" version))
993 (sha256
994 (base32
995 "0nrkhcb6jdrlb6pwkvd4rycw34y3s931hjf409ij9xkjsli9fkb1"))))
996 (build-system python-build-system)
997 (arguments
998 `(#:phases (modify-phases %standard-phases
999 (replace 'check
1000 (lambda _
1001 (invoke "pytest"))))))
1002 (native-inputs
1003 `(("python-pytest" ,python-pytest)
1004 ("python-lxml" ,python-lxml))) ;used for the tests
1005 (home-page "https://bitbucket.org/openpyxl/et_xmlfile")
1006 (synopsis "Low memory implementation of @code{lxml.xmlfile}")
1007 (description "This Python library is based upon the @code{xmlfile} module
1008from @code{lxml}. It aims to provide a low memory, compatible implementation
1009of @code{xmlfile}.")
1010 (license license:expat)))
1011
1012(define-public python2-et-xmlfile
1013 (package-with-python2 python-et-xmlfile))
1014
a042d348
MC
1015(define-public python-openpyxl
1016 (package
1017 (name "python-openpyxl")
441e6d93 1018 (version "2.6.2")
a042d348
MC
1019 (source
1020 (origin
1021 ;; We use the upstream repository, as the tests are not included in the
1022 ;; PyPI releases.
1023 (method hg-fetch)
1024 (uri (hg-reference
1025 (url "https://bitbucket.org/openpyxl/openpyxl")
1026 (changeset version)))
1027 (file-name (string-append name "-" version "-checkout"))
1028 (sha256
441e6d93 1029 (base32 "1qhij6kcvdxqjy4g6193nsv4q7fy8n4fwyd3c2z047idlm6s3j4w"))))
a042d348
MC
1030 (build-system python-build-system)
1031 (arguments
1032 `(#:phases (modify-phases %standard-phases
1033 (replace 'check
1034 (lambda _
1035 (invoke "pytest"))))))
1036 (native-inputs
1037 ;; For the test suite.
1038 `(("python-lxml" ,python-lxml)
1039 ("python-pillow" ,python-pillow)
1040 ("python-pytest" ,python-pytest)))
1041 (propagated-inputs
1042 `(("python-et-xmlfile" ,python-et-xmlfile)
1043 ("python-jdcal" ,python-jdcal)))
1044 (home-page "https://openpyxl.readthedocs.io")
1045 (synopsis "Python library to read/write Excel 2010 XLSX/XLSM files")
1046 (description "This Python library allows reading and writing to the Excel XLSX, XLSM,
1047XLTX and XLTM file formats that are defined by the Office Open XML (OOXML)
1048standard.")
1049 (license license:expat)))
1050
44d10b1f
RW
1051(define-public python-eventlet
1052 (package
1053 (name "python-eventlet")
1054 (version "0.20.1")
1055 (source
1056 (origin
1057 (method url-fetch)
1058 (uri (pypi-uri "eventlet" version))
1059 (sha256
1060 (base32
1061 "0f3q55mq4n021wb7qa53pz3ix6i2py64sap66vsaqm2scjw83m9s"))))
1062 (build-system python-build-system)
1063 (propagated-inputs
1064 `(("python-greenlet" ,python-greenlet)))
1065 (arguments
1066 ;; TODO: Requires unpackaged 'enum-compat'.
1067 '(#:tests? #f))
1068 (home-page "http://eventlet.net")
1069 (synopsis "Concurrent networking library for Python")
1070 (description
1071 "Eventlet is a concurrent networking library for Python that
1072allows you to change how you run your code, not how you write it.
1073It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
1074Coroutines ensure that the developer uses a blocking style of programming
1075that is similar to threading, but provide the benefits of non-blocking I/O.
1076The event dispatch is implicit, which means you can easily use @code{Eventlet}
1077from the Python interpreter, or as a small part of a larger application.")
1078 (license license:expat)))
1079
1080(define-public python2-eventlet
1081 (let ((base (package-with-python2
1082 (strip-python2-variant python-eventlet))))
1083 (package (inherit base)
1084 (propagated-inputs
1085 `(("python2-enum34" ,python2-enum34)
1086 ,@(package-propagated-inputs base))))))
1087
1088(define-public python-six
1089 (package
1090 (name "python-six")
6c58a06e 1091 (version "1.12.0")
44d10b1f
RW
1092 (source
1093 (origin
1094 (method url-fetch)
1095 (uri (pypi-uri "six" version))
1096 (sha256
1097 (base32
6c58a06e 1098 "0wxs1q74v07ssjywbbm7x6h5v9qx209ld2yfsif4060sxi0h2sni"))))
44d10b1f
RW
1099 (build-system python-build-system)
1100 (arguments
1101 `(#:phases
1102 (modify-phases %standard-phases
1103 (replace 'check
1104 (lambda _
1105 (invoke "py.test" "-v"))))))
1106 (native-inputs
1107 `(("python-py" ,python-py)
1108 ("python-pytest" ,python-pytest-bootstrap)))
1109 (home-page "https://pypi.python.org/pypi/six/")
1110 (synopsis "Python 2 and 3 compatibility utilities")
1111 (description
1112 "Six is a Python 2 and 3 compatibility library. It provides utility
1113functions for smoothing over the differences between the Python versions with
1114the goal of writing Python code that is compatible on both Python versions.
1115Six supports every Python version since 2.5. It is contained in only one
1116Python file, so it can be easily copied into your project.")
1117 (license license:x11)))
1118
1119(define-public python2-six
1120 (package-with-python2 python-six))
1121
1122(define-public python-six-bootstrap
1123 (package
1124 (inherit python-six)
1125 (name "python-six-bootstrap")
1126 (native-inputs `())
1127 (arguments `(#:tests? #f))))
1128
1129(define-public python2-six-bootstrap
1130 (package-with-python2 python-six-bootstrap))
1131
1132(define-public python-schedule
1133 (package
1134 (name "python-schedule")
1135 (version "0.4.3")
1136 (source
1137 (origin
1138 (method url-fetch)
1139 (uri (pypi-uri "schedule" version))
1140 (sha256
1141 (base32
1142 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
1143 (build-system python-build-system)
1144 (native-inputs
1145 `(("python-pytest" ,python-pytest)
1146 ("python-mock" ,python-mock)))
1147 (home-page "https://github.com/dbader/schedule")
1148 (synopsis "Schedule periodic function calls in Python")
1149 (description
1150 "Schedule is an in-process scheduler for periodic jobs that uses the
1151builder pattern for configuration. Schedule lets you run Python functions (or
1152any other callable) periodically at pre-determined intervals using a simple,
1153human-friendly syntax.")
1154 (license license:expat)))
1155
1156(define-public python2-schedule
1157 (package-with-python2 python-schedule))
1158
44d10b1f
RW
1159(define-public python2-mechanize
1160 (package
1161 (name "python2-mechanize")
1162 (version "0.2.5")
1163 (source
1164 (origin
1165 (method url-fetch)
1cc184e6 1166 (uri (pypi-uri "mechanize" version))
44d10b1f
RW
1167 (sha256
1168 (base32
1169 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1170 (build-system python-build-system)
1171 (arguments
1172 `(#:python ,python-2 ; apparently incompatible with Python 3
1173 #:tests? #f))
1174 ;; test fails with message
1175 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1176 ;; (python-3.3.2) or
1177 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1178 ;; (python-2.7.5).
1179 ;; The source code is from March 2011 and probably not up-to-date
1180 ;; with respect to python unit tests.
1181 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1182 (synopsis
1183 "Stateful programmatic web browsing in Python")
1184 (description
1185 "Mechanize implements stateful programmatic web browsing in Python,
1186after Andy Lester’s Perl module WWW::Mechanize.")
1187 (license (license:non-copyleft
1188 "file://COPYING"
1189 "See COPYING in the distribution."))))
1190
1191
1192(define-public python-simplejson
1193 (package
1194 (name "python-simplejson")
1195 (version "3.14.0")
1196 (source
1197 (origin
1198 (method url-fetch)
1199 (uri (pypi-uri "simplejson" version))
1200 (sha256
1201 (base32
1202 "1lkv3xlf7ryzi69zqfdbkvpxdfy1rg1rq2yzcnxgf4km5m6difqy"))))
1203 (build-system python-build-system)
1204 (home-page "http://simplejson.readthedocs.org/en/latest/")
1205 (synopsis
1206 "Json library for Python")
1207 (description
1208 "JSON (JavaScript Object Notation) is a subset of JavaScript
1209syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1210format.
1211
1212Simplejson exposes an API familiar to users of the standard library marshal
1213and pickle modules. It is the externally maintained version of the json
1214library contained in Python 2.6, but maintains compatibility with Python 2.5
1215and (currently) has significant performance advantages, even without using
1216the optional C extension for speedups. Simplejson is also supported on
1217Python 3.3+.")
1218 (license license:x11)))
1219
1220(define-public python2-simplejson
1221 (package-with-python2 python-simplejson))
1222
1223
1224(define-public python-pyicu
1225 (package
1226 (name "python-pyicu")
dc23bb45 1227 (version "2.3.1")
44d10b1f
RW
1228 (source
1229 (origin
1230 (method url-fetch)
1231 (uri (pypi-uri "PyICU" version))
1232 (sha256
1233 (base32
dc23bb45 1234 "1x4w8m7ifki9z2a187pgjr33z6z0rp2fii9b73djak1vhm9v9cnx"))))
44d10b1f
RW
1235 (build-system python-build-system)
1236 (inputs
1237 `(("icu4c" ,icu4c)))
1238 (native-inputs
1239 `(("python-pytest" ,python-pytest)
1240 ("python-six" ,python-six)))
1241 (home-page "https://github.com/ovalhub/pyicu")
1242 (synopsis "Python extension wrapping the ICU C++ API")
1243 (description
1244 "PyICU is a python extension wrapping the ICU C++ API.")
1245 (properties `((python2-variant . ,(delay python2-pyicu))))
1246 (license license:x11)))
1247
1248(define-public python2-pyicu
1249 (let ((base (package-with-python2
1250 (strip-python2-variant python-pyicu))))
1251 (package
1252 (inherit base)
1253 (arguments
1254 `(,@(package-arguments base)
1255 #:phases
1256 (modify-phases %standard-phases
1257 (add-before 'check 'delete-failing-test
1258 (λ _
1259 ;; XXX: This fails due to Unicode issues unique to Python 2,
1260 ;; it seems: <https://github.com/ovalhub/pyicu/issues/61>.
1261 (delete-file "test/test_Script.py")
1262 #t))))))))
1263
1264(define-public python2-dogtail
1265 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1266 ;; spaces in indentation" with Python 3.
1267 (package
1268 (name "python2-dogtail")
1269 (version "0.9.9")
1270 (source (origin
1271 (method url-fetch)
1272 (uri (pypi-uri "dogtail" version))
1273 (sha256
1274 (base32
1275 "0p5wfssvzr9w0bvhllzbbd8fnp4cca2qxcpcsc33dchrmh5n552x"))))
1276 (build-system python-build-system)
1277 (arguments `(#:python ,python-2
1278 #:tests? #f)) ; invalid command "test"
1279 ;; Currently no offical homepage.
1280 (home-page "https://pypi.python.org/pypi/dogtail/")
1281 (synopsis "GUI test tool and automation framework written in Python")
1282 (description
1283 "Dogtail is a GUI test tool and automation framework written in Python.
1284It uses Accessibility (a11y) technologies to communicate with desktop
1285applications. dogtail scripts are written in Python and executed like any
1286other Python program.")
1287 (license license:gpl2+)))
1288
1289(define-public python-empy
1290 (package
1291 (name "python-empy")
0f6d5115 1292 (version "3.3.3")
44d10b1f
RW
1293 (source (origin
1294 (method url-fetch)
1295 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1296 version ".tar.gz"))
1297 (sha256
1298 (base32
0f6d5115 1299 "1mxfy5mgp473ga1pgz2nvm8ds6z4g3hdky8523z6jzvcs9ny6hcq"))))
44d10b1f
RW
1300 (build-system python-build-system)
1301 (arguments
0f6d5115 1302 `(#:tests? #f)) ; python2 only
44d10b1f
RW
1303 (home-page "http://www.alcyone.com/software/empy/")
1304 (synopsis "Templating system for Python")
1305 (description
1306 "EmPy is a system for embedding Python expressions and statements in
1307template text; it takes an EmPy source file, processes it, and produces
1308output. This is accomplished via expansions, which are special signals to the
1309EmPy system and are set off by a special prefix (by default the at sign, @@).
1310EmPy can expand arbitrary Python expressions and statements in this way, as
1311well as a variety of special forms. Textual data not explicitly delimited in
1312this way is sent unaffected to the output, allowing Python to be used in
1313effect as a markup language. Also supported are callbacks via hooks,
1314recording and playback via diversions, and dynamic, chainable filters. The
1315system is highly configurable via command line options and embedded
1316commands.")
1317 (license license:lgpl2.1+)))
1318
1319(define-public python2-empy
0f064242
TGR
1320 (let ((base (package-with-python2 (strip-python2-variant python-empy))))
1321 (package
1322 (inherit base)
1323 (arguments `(,@(package-arguments base)
1324 #:tests? #t)))))
44d10b1f
RW
1325
1326(define-public python2-element-tree
1327 (package
1328 (name "python2-element-tree")
1329 (version "1.2.6")
1330 (source (origin
1331 (method url-fetch)
1332 (uri (string-append
1333 "http://effbot.org/media/downloads/elementtree-"
1334 version "-20050316.tar.gz"))
1335 (sha256
1336 (base32
1337 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1338 (build-system python-build-system)
1339 (arguments
1340 `(#:python ,python-2 ; seems to be part of Python 3
1341 #:tests? #f)) ; no 'test' sub-command
1342 (synopsis "Toolkit for XML processing in Python")
1343 (description
1344 "ElementTree is a Python library supporting lightweight XML processing.")
1345 (home-page "http://effbot.org/zone/element-index.htm")
1346 (license (license:x11-style
1347 "http://docs.python.org/2/license.html"
1348 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1349
1350(define-public python2-pybugz
1351 (package
1352 (name "python2-pybugz")
1353 (version "0.6.11")
1354 (source (origin
1355 (method url-fetch)
1356 (uri (string-append
1357 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1358 version ".tar.gz"))
1359 (sha256
1360 (base32
1361 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1362 (patches (search-patches "pybugz-stty.patch"
1363 "pybugz-encode-error.patch"))))
1364 (build-system python-build-system)
1365 (arguments
1366 `(#:python ,python-2 ; SyntaxError with Python 3
1367 #:tests? #f)) ; no 'test' sub-command
1368 (propagated-inputs
1369 `(("element-tree" ,python2-element-tree)))
1370 (synopsis "Python and command-line interface to Bugzilla")
1371 (description
1372 "PyBugz is a Python library and command-line tool to query the Bugzilla
1373bug tracking system. It is meant as an aid to speed up interaction with the
1374bug tracker.")
1375 (home-page "http://www.liquidx.net/pybugz/")
1376 (license license:gpl2)))
1377
1378(define-public python2-enum
1379 (package
1380 (name "python2-enum")
1381 (version "0.4.6")
1382 (source (origin
1383 (method url-fetch)
1384 (uri (pypi-uri "enum" version))
1385 (sha256
1386 (base32
1387 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
1388 (build-system python-build-system)
1389 (arguments
1390 `(#:python ,python-2))
1391 (home-page "http://pypi.python.org/pypi/enum/")
1392 (synopsis "Robust enumerated type support in Python")
1393 (description
1394 "This provides a module for robust enumerations in Python. It has
1395been superseded by the Python standard library and is provided only for
1396compatibility.")
1397 ;; Choice of either license.
1398 (license (list license:gpl3+ license:psfl))))
1399
1400(define-public python-enum34
1401 (package
1402 (name "python-enum34")
1403 (version "1.1.6")
1404 (source
1405 (origin
1406 (method url-fetch)
1407 (uri (pypi-uri "enum34" version))
1408 (sha256
1409 (base32
1410 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
1411 (build-system python-build-system)
1412 (home-page "https://pypi.python.org/pypi/enum34")
1413 (synopsis "Backported Python 3.4 Enum")
1414 (description
1415 "Enum34 is the new Python stdlib enum module available in Python 3.4
1416backported for previous versions of Python from 2.4 to 3.3.")
1417 (license license:bsd-3)))
1418
1419(define-public python2-enum34
1420 (package-with-python2 python-enum34))
1421
1422(define-public python-parse-type
1423 (package
1424 (name "python-parse-type")
1425 (version "0.4.2")
1426 (source
1427 (origin
1428 (method url-fetch)
1429 (uri (pypi-uri "parse_type" version))
1430 (sha256
1431 (base32
1432 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
1433 (build-system python-build-system)
1434 (propagated-inputs
1435 `(("python-six" ,python-six)
1436 ("python-parse" ,python-parse)))
1437 (native-inputs
1438 `(("python-pytest" ,python-pytest)
1439 ("python-pytest-runner" ,python-pytest-runner)))
1440 (home-page "https://github.com/jenisys/parse_type")
1441 (synopsis "Extended parse module")
1442 (description
1443 "Parse_type extends the python parse module.")
1444 (properties
1445 `((python2-variant . ,(delay python2-parse-type))))
1446 (license license:bsd-3)))
1447
1448(define-public python2-parse-type
1449 (let ((base (package-with-python2
1450 (strip-python2-variant python-parse-type))))
1451 (package (inherit base)
1452 (propagated-inputs
1453 `(("python2-enum34" ,python2-enum34)
1454 ,@(package-propagated-inputs base))))))
1455
1456(define-public python-parse
1457 (package
1458 (name "python-parse")
1459 (version "1.8.4")
1460 (source
1461 (origin
1462 (method url-fetch)
1463 (uri (pypi-uri "parse" version))
1464 (sha256
1465 (base32
1466 "0f8997xr8nq2nq35iiviq8ningd1zvy59fg503xfpbi2dwhgdkf3"))))
1467 (build-system python-build-system)
1468 (arguments
1469 `(#:phases
1470 (modify-phases %standard-phases
1471 (replace 'check
1472 (lambda _ (invoke "python" "test_parse.py"))))))
1473 (home-page "https://github.com/r1chardj0n3s/parse")
1474 (synopsis "Parse strings")
1475 (description
1476 "Parse strings using a specification based on the Python @code{format()}
1477syntax.")
1478 (license license:x11)))
1479
1480(define-public python-polib
1481 (package
1482 (name "python-polib")
1483 (version "1.0.8")
1484 (source (origin
1485 (method url-fetch)
1486 (uri (pypi-uri "polib" version))
1487 (sha256
1488 (base32
1489 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1490 (build-system python-build-system)
1491 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1492 (synopsis "Manipulate, create and modify gettext files")
1493 (description "Polib can manipulate any gettext format (po, pot and mo)
1494files. It can be used to create po files from scratch or to modify
1495existing ones.")
1496 (license license:expat)))
1497
1498(define-public python2-polib
1499 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1500 (package
1501 (inherit base)
1502 (arguments `(,@(package-arguments base)
1503 ;; Tests don't work with python2.
1504 #:tests? #f)))))
1505
6830120e
TLC
1506(define-public python-poyo
1507 (package
1508 (name "python-poyo")
1509 (version "0.5.0")
1510 (source
1511 (origin
1512 (method url-fetch)
1513 (uri (pypi-uri "poyo" version))
1514 (sha256
1515 (base32
1516 "1pflivs6j22frz0v3dqxnvc8yb8fb52g11lqr88z0i8cg2m5csg2"))))
1517 (build-system python-build-system)
1518 (home-page "https://github.com/hackebrot/poyo")
1519 (synopsis "Lightweight YAML Parser for Python")
1520 (description
1521 "This package provides a lightweight YAML Parser for Python. It supports
1522only a chosen subset of the YAML format that is required to parse cookiecutter
1523user configuration files. It does not have support for serializing into YAML
1524and is not compatible with JSON.")
1525 (license license:expat)))
1526
44d10b1f
RW
1527(define-public scons
1528 (package
1529 (name "scons")
05487ed8 1530 (version "3.0.4")
44d10b1f 1531 (source (origin
ad34338d
RW
1532 (method git-fetch)
1533 (uri (git-reference
1534 (url "https://github.com/SCons/scons.git")
1535 (commit version)))
1536 (file-name (git-file-name name version))
44d10b1f
RW
1537 (sha256
1538 (base32
05487ed8 1539 "1xy8jrwz87y589ihcld4hv7wn122sjbz914xn8h50ww77wbhk8hn"))))
44d10b1f
RW
1540 (build-system python-build-system)
1541 (arguments
1542 `(#:use-setuptools? #f ; still relies on distutils
ad34338d
RW
1543 #:tests? #f ; no 'python setup.py test' command
1544 #:phases
1545 (modify-phases %standard-phases
1546 (add-before 'build 'bootstrap
1547 (lambda _
1548 (substitute* "src/engine/SCons/compat/__init__.py"
1549 (("sys.modules\\[new\\] = imp.load_module\\(old, \\*imp.find_module\\(old\\)\\)")
1550 "sys.modules[new] = __import__(old)"))
05487ed8
RW
1551 (substitute* "src/engine/SCons/Platform/__init__.py"
1552 (("mod = imp.load_module\\(full_name, file, path, desc\\)")
1553 "mod = __import__(full_name)"))
ad34338d
RW
1554 (invoke "python" "bootstrap.py" "build/scons" "DEVELOPER=guix")
1555 (chdir "build/scons")
1556 #t)))))
44d10b1f
RW
1557 (home-page "http://scons.org/")
1558 (synopsis "Software construction tool written in Python")
1559 (description
1560 "SCons is a software construction tool. Think of SCons as an improved,
1561cross-platform substitute for the classic Make utility with integrated
1562functionality similar to autoconf/automake and compiler caches such as ccache.
1563In short, SCons is an easier, more reliable and faster way to build
1564software.")
1565 (license license:x11)))
1566
1567(define-public scons-python2
1568 (package
1569 (inherit (package-with-python2 scons))
1570 (name "scons-python2")))
1571
1572(define-public python-extras
1573 (package
1574 (name "python-extras")
1575 (version "1.0.0")
1576 (source
1577 (origin
1578 (method url-fetch)
1579 (uri (pypi-uri "extras" version))
1580 (sha256
1581 (base32
1582 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
1583 (build-system python-build-system)
1584 (arguments
1585 ;; FIXME: Circular dependency on testtools.
1586 '(#:tests? #f))
1587 (home-page "https://github.com/testing-cabal/extras")
1588 (synopsis "Useful extensions to the Python standard library")
1589 (description
1590 "Extras is a set of extensions to the Python standard library.")
1591 (license license:expat)))
1592
1593(define-public python2-extras
1594 (package-with-python2 python-extras))
1595
1596(define-public python-mimeparse
1597 (package
1598 (name "python-mimeparse")
1599 (version "1.6.0")
1600 (source
1601 (origin
1602 (method url-fetch)
89bf667c 1603 (uri (pypi-uri "python-mimeparse" version))
44d10b1f
RW
1604 (sha256
1605 (base32
1606 "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n"))))
1607 (build-system python-build-system)
1608 (arguments
1609 '(#:phases
1610 (modify-phases %standard-phases
1611 (replace 'check
1612 (lambda _
1613 (invoke "./mimeparse_test.py"))))))
1614 (home-page
1615 "https://github.com/dbtsai/python-mimeparse")
1616 (synopsis "Python library for parsing MIME types")
1617 (description
1618 "Mimeparse provides basic functions for parsing MIME type names and
1619matching them against a list of media-ranges.")
1620 (license license:expat)))
1621
1622(define-public python2-mimeparse
1623 (package-with-python2 python-mimeparse))
1624
1625(define-public python-miniboa
1626 (package
1627 (name "python-miniboa")
1628 (version "1.0.7")
1629 (source
1630 (origin
1631 (method url-fetch)
1632 (uri (pypi-uri "miniboa" version))
1633 (sha256
1634 (base32
1635 "09jh3pn4rh7kh7jayanf8jzy6gp03791b5a193w6148cf3i6k9m3"))))
1636 (build-system python-build-system)
1637 (home-page "https://github.com/shmup/miniboa")
1638 (synopsis "Simple, single-threaded Telnet server")
1639 (description
1640 "Miniboa is a simple, asynchronous, single-threaded, poll-based Telnet
1641server.")
1642 (license license:asl2.0)))
1643
1644(define-public python2-miniboa
1645 (package-with-python2 python-miniboa))
1646
1647(define-public python-pafy
1648 (package
1649 (name "python-pafy")
1650 (version "0.5.3.1")
1651 (source
1652 (origin
1653 (method url-fetch)
1654 (uri (pypi-uri "pafy" version))
1655 (sha256
1656 (base32
1657 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
1658 (build-system python-build-system)
1659 (arguments
1660 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
1661 (propagated-inputs
1662 ;; Youtube-dl is a python package which is imported in the file
1663 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1664 `(("youtube-dl" ,youtube-dl)))
1665 (home-page "https://np1.github.io/pafy/")
1666 (synopsis "Retrieve YouTube content and metadata")
1667 (description
1668 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1669 (license license:lgpl3+)))
1670
1671(define-public python2-funcsigs
1672 (package
1673 (name "python2-funcsigs")
1674 (version "1.0.2")
1675 (source (origin
1676 (method url-fetch)
1677 (uri (pypi-uri "funcsigs" version))
1678 (sha256
1679 (base32
1680 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
1681 (build-system python-build-system)
1682 (arguments
1683 `(#:python ,python-2))
1684 (native-inputs
1685 `(("python2-unittest2" ,python2-unittest2)))
1686 (home-page "http://funcsigs.readthedocs.org")
1687 (synopsis "Python function signatures from PEP362")
1688 (description
1689 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
1690 (license license:asl2.0)))
1691
1692(define-public python2-funcsigs-bootstrap
1693 (package
1694 (inherit python2-funcsigs)
1695 (name "python2-funcsigs-bootstrap")
1696 (native-inputs `())
1697 (arguments
1698 `(#:tests? #f
1699 ,@(package-arguments python2-funcsigs)))))
1700
1701(define-public python-py
1702 (package
1703 (name "python-py")
08eba545 1704 (version "1.8.0")
44d10b1f
RW
1705 (source
1706 (origin
1707 (method url-fetch)
1708 (uri (pypi-uri "py" version))
1709 (sha256
1710 (base32
08eba545 1711 "0lsy1gajva083pzc7csj1cvbmminb7b4l6a0prdzyb3fd829nqyw"))))
44d10b1f
RW
1712 (build-system python-build-system)
1713 (arguments
1714 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1715 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1716 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1717 ;; Is this module globally installed?"
1718 '(#:tests? #f))
1719 (native-inputs
1720 `(("python-setuptools-scm" ,python-setuptools-scm)))
1721 (home-page "https://github.com/pytest-dev/py")
1722 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1723 (description
1724 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1725code introspection, and logging.")
1726 (license license:expat)))
1727
1728(define-public python2-py
1729 (package-with-python2 python-py))
1730
1731;; Recent versions of python-fixtures and python-testrepository need
1732;; python-pbr for packaging, which itself needs these two packages for
1733;; testing.
1734;; To fix this circular dependency, we use a build of python-pbr, based on the
1735;; same source, just without any test dependencies and with tests disabled.
1736;; python-pbr-minmal is then used to package python-fixtures and
1737;; python-testrepository.
1738;; Strictly speaking we currently could remove the test-requirements from the
1739;; normal python-pbr package (and save this package) since test are disabled
1740;; there anyway. But this may change in future.
1741(define-public python-pbr-minimal
1742 (package
1743 (name "python-pbr-minimal")
1744 (version "3.0.1")
1745 (source
1746 (origin
1747 (method url-fetch)
1748 (uri (pypi-uri "pbr" version))
1749 (sha256
1750 (base32
1751 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
1752 (build-system python-build-system)
1753 (arguments
1754 `(#:tests? #f))
1755 (home-page "http://docs.openstack.org/developer/pbr/")
1756 (synopsis "Minimal build of python-pbr used for bootstrapping")
1757 (description
1758 "Used only for bootstrapping python2-pbr, you should not need this.")
1759 (license license:asl2.0)))
1760
1761(define-public python2-pbr-minimal
1762 (package-with-python2 python-pbr-minimal))
1763
1764(define-public python-pbr
1765 (package
1766 (inherit python-pbr-minimal)
1767 (name "python-pbr")
1768 (arguments
1769 `(#:tests? #f)) ;; Most tests seem to use the Internet.
1770 (propagated-inputs
1771 `(("git" ,git))) ;; pbr actually uses the "git" binary.
1772 (native-inputs
1773 `(("python-fixtures" ,python-fixtures-bootstrap)
1774 ;; discover, coverage, hacking, subunit
1775 ("python-mock" ,python-mock)
1776 ("python-six" ,python-six)
1777 ("python-sphinx" ,python-sphinx)
1778 ("python-testrepository" ,python-testrepository-bootstrap)
1779 ("python-testresources" ,python-testresources-bootstrap)
1780 ("python-testscenarios" ,python-testscenarios-bootstrap)
1781 ("python-testtools" ,python-testtools-bootstrap)
1782 ("python-virtualenv" ,python-virtualenv)))
1783 (synopsis "Enhance the default behavior of Python’s setuptools")
1784 (description
1785 "Python Build Reasonableness (PBR) is a library that injects some useful
1786and sensible default behaviors into your setuptools run. It will set
1787versions, process requirements files and generate AUTHORS and ChangeLog file
1788from git information.
1789")))
1790
1791(define-public python2-pbr
1792 (package-with-python2 python-pbr))
1793
ea43f0d5
MB
1794(define-public python-pyrsistent
1795 (package
1796 (name "python-pyrsistent")
1797 (version "0.14.11")
1798 (home-page "https://github.com/tobgu/pyrsistent")
1799 (source (origin
1800 (method url-fetch)
1801 (uri (pypi-uri "pyrsistent" version))
1802 (sha256
1803 (base32
1804 "1qkh74bm296mp5g3r11lgsksr6bh4w1bf8pji4nmxdlfj542ga1w"))))
1805 (build-system python-build-system)
1806 (native-inputs
1807 `(("python-hypothesis" ,python-hypothesis)
1808 ("python-pytest" ,python-pytest)
1809 ("python-pytest-runner" ,python-pytest-runner)))
1810 (propagated-inputs
1811 `(("python-six" ,python-six)))
1812 (synopsis "Persistent data structures for Python")
1813 (description
1814 "Pyrsistent is a number of persistent collections (by some referred to as
1815functional data structures). Persistent in the sense that they are immutable.
1816
1817All methods on a data structure that would normally mutate it instead return a
1818new copy of the structure containing the requested updates. The original
1819structure is left untouched.")
1820 (license license:expat)))
1821
1822(define-public python2-pyrsistent
1823 (package-with-python2 python-pyrsistent))
1824
44d10b1f
RW
1825(define-public python-exif-read
1826 (package
1827 (name "python-exif-read")
1828 (version "2.1.2")
1829 (source (origin
1830 (method url-fetch)
1831 (uri (pypi-uri "ExifRead" version))
1832 (sha256
1833 (base32
1834 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
1835 (build-system python-build-system)
1836 (arguments `(#:tests? #f)) ; no tests
1837 (home-page "https://github.com/ianare/exif-py")
1838 (synopsis "Python library to extract EXIF data from image files")
1839 (description
1840 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
1841files.")
1842 (license license:bsd-3)))
1843
1844(define-public python2-exif-read
1845 (package-with-python2 python-exif-read))
1846
1847(define-public python-pyld
1848 (package
1849 (name "python-pyld")
6d4ed78d 1850 (version "1.0.5")
44d10b1f
RW
1851 (source (origin
1852 (method url-fetch)
1853 (uri (pypi-uri "PyLD" version))
1854 (sha256
1855 (base32
6d4ed78d 1856 "1ywbdbsrkg533qh8xn9ifjh2mvam6v5msrjyqq73jfpvcp89qvff"))))
44d10b1f
RW
1857 (build-system python-build-system)
1858 (home-page "https://github.com/digitalbazaar/pyld")
1859 (synopsis "Python implementation of the JSON-LD specification")
1860 (description
1861 "PyLD is an implementation of the JSON-LD specification.")
1862 (license license:bsd-3)))
1863
1864(define-public python2-pyld
1865 (package-with-python2 python-pyld))
1866
1867(define-public python-click
1868 (package
1869 (name "python-click")
61984855 1870 (version "7.0")
44d10b1f
RW
1871 (source
1872 (origin
1873 (method url-fetch)
1874 (uri (pypi-uri "click" version))
1875 (sha256
1876 (base32
61984855 1877 "1mzjixd4vjbjvzb6vylki9w1556a9qmdh35kzmq6cign46av952v"))))
44d10b1f
RW
1878 (build-system python-build-system)
1879 (arguments
8d7e7ca6 1880 `(#:phases
44d10b1f
RW
1881 (modify-phases %standard-phases
1882 (add-after 'unpack 'fix-paths
1883 (lambda* (#:key inputs #:allow-other-keys)
1884 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
1885 "cross-libc" "libc"))))
1886 (substitute* "click/_unicodefun.py"
1887 (("'locale'")
1888 (string-append "'" glibc "/bin/locale'"))))
8d7e7ca6
EF
1889 #t))
1890 (replace 'check
1891 (lambda _
1892 (invoke "python" "-m" "pytest"))))))
44d10b1f
RW
1893 (native-inputs
1894 `(("python-pytest" ,python-pytest)))
61984855 1895 (home-page "https://palletsprojects.com/p/click/")
44d10b1f
RW
1896 (synopsis "Command line library for Python")
1897 (description
1898 "Click is a Python package for creating command line interfaces in a
1899composable way with as little code as necessary. Its name stands for
1900\"Command Line Interface Creation Kit\". It's highly configurable but comes
1901with sensible defaults out of the box.")
1902 (license license:bsd-3)))
1903
1904(define-public python2-click
1905 (package-with-python2 python-click))
1906
1907(define-public python-wheel
1908 (package
1909 (name "python-wheel")
746c074b 1910 (version "0.32.3")
44d10b1f
RW
1911 (source
1912 (origin
1913 (method url-fetch)
1914 (uri (pypi-uri "wheel" version))
1915 (sha256
1916 (base32
746c074b 1917 "1dhxl1bf18bx9szmqcnxbg6204hp3im8089q3hkwh5jfa6zh75q2"))))
44d10b1f
RW
1918 (build-system python-build-system)
1919 (native-inputs
1920 `(("python-jsonschema" ,python-jsonschema)
1921 ("python-pytest-cov" ,python-pytest-cov)))
1922 (home-page "https://bitbucket.org/pypa/wheel/")
1923 (synopsis "Format for built Python packages")
1924 (description
1925 "A wheel is a ZIP-format archive with a specially formatted filename and
1926the @code{.whl} extension. It is designed to contain all the files for a PEP
1927376 compatible install in a way that is very close to the on-disk format. Many
1928packages will be properly installed with only the @code{Unpack} step and the
1929unpacked archive preserves enough information to @code{Spread} (copy data and
1930scripts to their final locations) at any later time. Wheel files can be
1931installed with a newer @code{pip} or with wheel's own command line utility.")
1932 (license license:expat)
1933 (properties `((python2-variant . ,(delay python2-wheel))))))
1934
1935(define-public python2-wheel
1936 (let ((wheel (package-with-python2
1937 (strip-python2-variant python-wheel))))
1938 (package (inherit wheel)
1939 (native-inputs `(("python2-functools32" ,python2-functools32)
1940 ,@(package-native-inputs wheel))))))
1941
1942(define-public python-vcversioner
1943 (package
1944 (name "python-vcversioner")
1945 (version "2.16.0.0")
1946 (source
1947 (origin
1948 (method url-fetch)
1949 (uri (pypi-uri "vcversioner" version))
1950 (sha256
1951 (base32
1952 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
1953 (build-system python-build-system)
1954 (synopsis "Python library for version number discovery")
1955 (description "Vcversioner is a Python library that inspects tagging
1956information in a variety of version control systems in order to discover
1957version numbers.")
1958 (home-page "https://github.com/habnabit/vcversioner")
1959 (license license:isc)))
1960
1961(define-public python2-vcversioner
1962 (package-with-python2 python-vcversioner))
1963
5591fc4f
MC
1964(define-public python-jdcal
1965 (package
1966 (name "python-jdcal")
1967 (version "1.4")
1968 (source
1969 (origin
1970 (method url-fetch)
1971 (uri (pypi-uri "jdcal" version))
1972 (sha256
1973 (base32
1974 "1ja6j2xq97bsl6rv09mhdx7n0xnrsfx0mj5xqza0mxghqmkm02pa"))))
1975 (build-system python-build-system)
1976 (arguments
1977 `(#:phases (modify-phases %standard-phases
1978 (replace 'check
1979 (lambda _
1980 (invoke "pytest"))))))
1981 (native-inputs
1982 `(("python-pytest" ,python-pytest)))
1983 (home-page "https://github.com/phn/jdcal")
1984 (synopsis "Functions to convert between Julian dates Gregorian dates")
1985 (description "This Python library provides functions for converting
1986between Julian dates and Gregorian dates.")
1987 (license license:bsd-2)))
1988
1989(define-public python2-jdcal
1990 (package-with-python2 python-jdcal))
1991
44d10b1f
RW
1992(define-public python-jsonschema
1993 (package
1994 (name "python-jsonschema")
1adde06e 1995 (version "3.0.1")
44d10b1f
RW
1996 (source (origin
1997 (method url-fetch)
786ccb87 1998 (uri (pypi-uri "jsonschema" version))
44d10b1f
RW
1999 (sha256
2000 (base32
1adde06e 2001 "03g20i1xfg4qdlk4475pl4pp7y0h37g1fbgs5qhy678q9xb822hc"))))
44d10b1f
RW
2002 (build-system python-build-system)
2003 (arguments
2004 '(#:phases
2005 (modify-phases %standard-phases
1adde06e
MB
2006 (replace 'check
2007 (lambda _
2008 (setenv "PYTHONPATH" (string-append ".:" (getenv "PYTHONPATH")))
2009 (invoke "trial" "jsonschema"))))))
44d10b1f 2010 (native-inputs
1adde06e
MB
2011 `(("python-setuptools_scm" ,python-setuptools-scm)
2012 ("python-twisted" ,python-twisted)))
2013 (propagated-inputs
2014 `(("python-attrs" ,python-attrs)
2015 ("python-pyrsistent" ,python-pyrsistent)
2016 ("python-six" ,python-six)))
44d10b1f
RW
2017 (home-page "https://github.com/Julian/jsonschema")
2018 (synopsis "Implementation of JSON Schema for Python")
2019 (description
2020 "Jsonschema is an implementation of JSON Schema for Python.")
2021 (license license:expat)
2022 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2023
2024(define-public python2-jsonschema
2025 (let ((jsonschema (package-with-python2
2026 (strip-python2-variant python-jsonschema))))
2027 (package (inherit jsonschema)
44d10b1f 2028 (propagated-inputs
1adde06e
MB
2029 `(("python2-functools32" ,python2-functools32)
2030 ,@(package-propagated-inputs jsonschema))))))
44d10b1f 2031
914bba28
TGR
2032;; This old version is still required by docker-compose as of 1.24.0.
2033(define-public python-jsonschema-2.6
2034 (package
2035 (name "python-jsonschema")
2036 (version "2.6.0")
2037 (source (origin
2038 (method url-fetch)
2039 (uri (pypi-uri "jsonschema" version))
2040 (sha256
2041 (base32
2042 "00kf3zmpp9ya4sydffpifn0j0mzm342a2vzh82p6r0vh10cg7xbg"))))
2043 (build-system python-build-system)
2044 (arguments
2045 '(#:phases
2046 (modify-phases %standard-phases
2047 (replace 'check (lambda _ (invoke "nosetests"))))))
2048 (native-inputs
2049 `(("python-nose" ,python-nose)
2050 ("python-vcversioner" ,python-vcversioner)))
2051 (home-page "https://github.com/Julian/jsonschema")
2052 (synopsis "Implementation of JSON Schema for Python")
2053 (description
2054 "Jsonschema is an implementation of JSON Schema for Python.")
2055 (license license:expat)
2056 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2057
44d10b1f
RW
2058(define-public python-schema
2059 (package
2060 (name "python-schema")
2061 (version "0.6.6")
2062 (source
2063 (origin
2064 (method url-fetch)
2065 (uri (pypi-uri "schema" version))
2066 (sha256
2067 (base32
2068 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
2069 (build-system python-build-system)
2070 (native-inputs
2071 `(("python-pytest" ,python-pytest)))
2072 (home-page "https://github.com/keleshev/schema")
2073 (synopsis "Simple data validation library")
2074 (description
2075 "@code{python-schema} is a library for validating Python data
2076structures, such as those obtained from config-files, forms, external
2077services or command-line parsing, converted from JSON/YAML (or
2078something else) to Python data-types.")
2079 (license license:psfl)))
2080
2081(define-public python2-schema
2082 (package-with-python2 python-schema))
2083
2084(define-public python-schema-0.5
2085 (package (inherit python-schema)
2086 (version "0.5.0")
2087 (source
2088 (origin
2089 (method url-fetch)
2090 (uri (pypi-uri "schema" version))
2091 (sha256
2092 (base32
2093 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
2094
2095(define-public python2-schema-0.5
2096 (package-with-python2 python-schema-0.5))
2097
2098(define-public python-kitchen
2099 (package
2100 (name "python-kitchen")
2101 (version "1.2.5")
2102 (source
2103 (origin
2104 (method url-fetch)
2105 (uri (pypi-uri "kitchen" version))
2106 (sha256
2107 (base32
2108 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
2109 (build-system python-build-system)
2110 (propagated-inputs
2111 `(("python-chardet" ,python-chardet)))
2112 (home-page "https://github.com/fedora-infra/kitchen")
2113 (synopsis "Python API for snippets")
2114 (description "@code{kitchen} module provides a python API for all sorts of
2115little useful snippets of code that everybody ends up writing for their projects
2116but never seem big enough to build an independent release. Use kitchen and stop
2117cutting and pasting that code over and over.")
2118 (license (list license:lgpl2.1+
2119 ;; subprocess.py, test_subprocess.py,
2120 ;; kitchen/pycompat25/defaultdict.py:
2121 license:psfl))))
2122
2123(define-public python2-kitchen
2124 (package-with-python2 python-kitchen))
2125
2126(define-public python-unidecode
2127 (package
2128 (name "python-unidecode")
eb80a300 2129 (version "1.1.1")
44d10b1f
RW
2130 (source (origin
2131 (method url-fetch)
2132 (uri (pypi-uri "Unidecode" version))
2133 (sha256
2134 (base32
eb80a300 2135 "1s6cp2lv4m0f00hjckjz8p6m7d3n3v16jvg353llf5ia1iqsnsib"))))
44d10b1f
RW
2136 (build-system python-build-system)
2137 (home-page "https://pypi.python.org/pypi/Unidecode")
2138 (synopsis "ASCII transliterations of Unicode text")
2139 (description
2140 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2141useful when integrating with legacy code that doesn't support Unicode, or for
2142ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2143machine identifiers from human-readable Unicode strings that should still be
2144somewhat intelligible.")
2145 (license license:gpl2+)))
2146
2147(define-public python2-unidecode
2148 (package-with-python2 python-unidecode))
2149
2150(define-public python-pyjwt
2151 (package
2152 (name "python-pyjwt")
be6f2f56 2153 (version "1.7.1")
44d10b1f
RW
2154 (source
2155 (origin
2156 (method url-fetch)
2157 (uri (pypi-uri "PyJWT" version))
2158 (sha256
2159 (base32
be6f2f56 2160 "15hflax5qkw1v6nssk1r0wkj83jgghskcmn875m3wgvpzdvajncd"))
44d10b1f
RW
2161 (modules '((guix build utils)))
2162 (snippet
2163 '(begin
2164 (for-each delete-file-recursively
2165 (find-files "." "\\.pyc$"))
2166 #t))))
2167 (build-system python-build-system)
2168 (native-inputs
2169 `(("python-pytest" ,python-pytest)
2170 ("python-pytest-cov" ,python-pytest-cov)
2171 ("python-pytest-runner" ,python-pytest-runner)))
2172 (home-page "https://github.com/progrium/pyjwt")
2173 (synopsis "JSON Web Token implementation in Python")
2174 (description
2175 "PyJWT is a JSON Web Token implementation written in Python.")
2176 (license license:expat)))
2177
2178(define-public python2-pyjwt
2179 (package-with-python2 python-pyjwt))
2180
2181(define-public python-pykka
2182 (package
2183 (name "python-pykka")
2184 (version "1.2.1")
2185 (source
2186 (origin
2187 (method url-fetch)
2188 (uri (pypi-uri "Pykka" version))
2189 (sha256
2190 (base32
2191 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
2192 (build-system python-build-system)
2193 (native-inputs
2194 `(("python-mock" ,python-mock)
2195 ("python-nose" ,python-nose)
2196 ("python-gevent" ,python-gevent)
2197 ("python-eventlet" ,python-eventlet)))
2198 (home-page "https://www.pykka.org/")
2199 (synopsis "Pykka is a Python implementation of the actor model")
2200 (description
2201 "Pykka is a Python implementation of the actor model.
2202The actor model introduces some simple rules to control the sharing
2203of state and cooperation between execution units, which makes it
2204easier to build concurrent applications.")
2205 (license license:asl2.0)))
2206
2207(define-public python2-pykka
2208 (package-with-python2 python-pykka))
2209
8d22f7e3
VC
2210(define-public python-pymsgbox
2211 (package
2212 (name "python-pymsgbox")
2213 (version "1.0.6")
2214 (source
2215 (origin
2216 (method git-fetch)
2217 (uri (git-reference
2218 ;; LICENSE.txt is not present on pypi
2219 (url "https://github.com/asweigart/PyMsgBox")
2220 (commit "55926b55f46caa969c5ddb87990ebea2737bd66f")))
2221 (file-name (git-file-name name version))
2222 (sha256
2223 (base32
2224 "0zy7rjfpwlrd8b64j7jk2lb8m2npc21rnpwakpfvwgl4nxdy80rg"))))
2225 (arguments
2226 ;; Circular dependency to run tests:
2227 ;; Tests need pyautogui, which depends on pymsgbox.
2228 '(#:tests? #f))
2229 (build-system python-build-system)
2230 (home-page "https://github.com/asweigart/PyMsgBox")
2231 (synopsis "Python module for JavaScript-like message boxes")
2232 (description
2233 "PyMsgBox is a simple, cross-platform, pure Python module for
2234JavaScript-like message boxes. Types of dialog boxes include:
2235@enumerate
2236@item alert
2237@item confirm
2238@item prompt
2239@item password
2240@end enumerate
2241")
2242 (license license:bsd-3)))
2243
44d10b1f
RW
2244(define-public python-pympler
2245 (package
2246 (name "python-pympler")
2247 (home-page "https://pythonhosted.org/Pympler/")
c498a07e 2248 (version "0.7")
44d10b1f
RW
2249 (source (origin
2250 (method url-fetch)
2251 (uri (pypi-uri "Pympler" version))
2252 (sha256
2253 (base32
c498a07e 2254 "0ki7bqp1h9l1xc2k1h4vjyzsgs20i8ingvcdhszyi72s28wyf4bs"))))
44d10b1f
RW
2255 (build-system python-build-system)
2256 (arguments
2257 `(#:phases (modify-phases %standard-phases
2258 (delete 'check)
2259 (add-after 'install 'check
2260 (lambda* (#:key inputs outputs #:allow-other-keys)
2261 (add-installed-pythonpath inputs outputs)
2262 (invoke "python" "setup.py" "test"))))))
2263 (synopsis "Measure, monitor and analyze memory behavior")
2264 (description
2265 "Pympler is a development tool to measure, monitor and analyze
2266the memory behavior of Python objects in a running Python application.
2267
2268By pympling a Python application, detailed insight in the size and the
2269lifetime of Python objects can be obtained. Undesirable or unexpected
2270runtime behavior like memory bloat and other @samp{pymples} can easily
2271be identified.
2272
2273A web profiling frontend exposes process statistics, garbage
2274visualisation and class tracker statistics.")
2275 (license license:asl2.0)))
2276
2277(define-public python2-pympler
2278 (package-with-python2 python-pympler))
2279
2280(define-public python-itsdangerous
2281 (package
2282 (name "python-itsdangerous")
acfcf2ed 2283 (version "1.1.0")
44d10b1f
RW
2284 (source
2285 (origin
2286 (method url-fetch)
acfcf2ed 2287 (uri (pypi-uri "itsdangerous" version))
44d10b1f
RW
2288 (sha256
2289 (base32
acfcf2ed 2290 "068zpbksq5q2z4dckh2k1zbcq43ay74ylqn77rni797j0wyh66rj"))))
44d10b1f 2291 (build-system python-build-system)
acfcf2ed 2292 (home-page "https://palletsprojects.com/p/itsdangerous/")
44d10b1f
RW
2293 (synopsis "Python library for passing data to/from untrusted environments")
2294 (description
2295 "Itsdangerous provides various helpers to pass trusted data to untrusted
2296environments and back.")
2297 (license license:bsd-3)))
2298
2299(define-public python2-itsdangerous
2300 (package-with-python2 python-itsdangerous))
2301
2302(define-public python-pyyaml
2303 (package
2304 (name "python-pyyaml")
2305 (version "3.13")
2306 (source
2307 (origin
2308 (method url-fetch)
2309 (uri (pypi-uri "PyYAML" version))
2310 (sha256
2311 (base32
2312 "1gx603g484z46cb74j9rzr6sjlh2vndxayicvlyhxdz98lhhkwry"))))
2313 (build-system python-build-system)
2314 (inputs
2315 `(("libyaml" ,libyaml)))
2316 (home-page "http://pyyaml.org/wiki/PyYAML")
2317 (synopsis "YAML parser and emitter for Python")
2318 (description
2319 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2320complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2321API, and sensible error messages. PyYAML supports standard YAML tags and
2322provides Python-specific tags that allow to represent an arbitrary Python
2323object.")
2324 (license license:expat)))
2325
2326(define-public python2-pyyaml
2327 (package-with-python2 python-pyyaml))
2328
2329(define-public python-vine
2330 (package
2331 (name "python-vine")
2332 (version "1.1.4")
2333 (source
2334 (origin
2335 (method url-fetch)
2336 (uri (pypi-uri "vine" version))
2337 (sha256
2338 (base32
2339 "0wkskb2hb494v9gixqnf4bl972p4ibcmxdykzpwjlfa5picns4aj"))))
2340 (build-system python-build-system)
2341 (native-inputs
2342 `(("python-pytest" ,python-pytest)
2343 ("python-case" ,python-case)))
2344 (home-page "https://github.com/celery/vine")
2345 (synopsis "Promises for Python")
2346 (description
2347 "@code{vine} provides a special implementation of promises in that it can
2348be used both for \"promise of a value\" and lazy evaluation. The biggest
2349upside for this is that everything in a promise can also be a promise,
2350e.g. filters, callbacks and errbacks can all be promises.")
2351 (license license:bsd-3)))
2352
2353(define-public python-virtualenv
2354 (package
2355 (name "python-virtualenv")
2782bd51 2356 (version "16.1.0")
44d10b1f
RW
2357 (source
2358 (origin
2359 (method url-fetch)
2360 (uri (pypi-uri "virtualenv" version))
2361 (sha256
2362 (base32
2782bd51 2363 "0242cg3hdq3qdvx5flyrki8lpwlgwf5k45c21ks5049fv7ygm6gq"))))
44d10b1f
RW
2364 (build-system python-build-system)
2365 (arguments
2366 `(#:phases
2367 (modify-phases %standard-phases
2782bd51 2368 (add-before 'check 'disable-failing-test
44d10b1f
RW
2369 (lambda _
2370 ;; Disable failing test. See upstream bug report
2371 ;; https://github.com/pypa/virtualenv/issues/957
2372 (substitute* "tests/test_virtualenv.py"
2373 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2782bd51 2374 #t)))))
44d10b1f
RW
2375 (native-inputs
2376 `(("python-mock" ,python-mock)
2377 ("python-pytest" ,python-pytest)))
2378 (home-page "https://virtualenv.pypa.io/")
2379 (synopsis "Virtual Python environment builder")
2380 (description
2381 "Virtualenv is a tool to create isolated Python environments.")
2382 (license license:expat)))
2383
2384(define-public python2-virtualenv
2385 (package-with-python2 python-virtualenv))
2386
2387(define-public python-markupsafe
2388 (package
2389 (name "python-markupsafe")
753eb411 2390 (version "1.1.1")
44d10b1f
RW
2391 (source
2392 (origin
2393 (method url-fetch)
5182927c 2394 (uri (pypi-uri "MarkupSafe" version))
44d10b1f
RW
2395 (sha256
2396 (base32
753eb411 2397 "0sqipg4fk7xbixqd8kq6rlkxj664d157bdwbh93farcphf92x1r9"))))
44d10b1f 2398 (build-system python-build-system)
753eb411
MB
2399 (arguments
2400 `(#:modules ((ice-9 ftw)
2401 (srfi srfi-1)
2402 (srfi srfi-26)
2403 (guix build utils)
2404 (guix build python-build-system))
2405 #:phases (modify-phases %standard-phases
2406 (replace 'check
2407 (lambda _
2408 (let ((cwd (getcwd))
2409 (libdir (find (cut string-prefix? "lib." <>)
2410 (scandir "build"))))
2411 (setenv "PYTHONPATH"
2412 (string-append cwd "/build/" libdir ":"
2413 (getenv "PYTHONPATH")))
2414 (invoke "pytest" "-vv")))))))
2415 (native-inputs
2416 `(("python-pytest" ,python-pytest)))
44d10b1f
RW
2417 (home-page "https://github.com/mitsuhiko/markupsafe")
2418 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2419 (description
2420 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2421for Python.")
2422 (license license:bsd-3)))
2423
2424(define-public python2-markupsafe
2425 (package-with-python2 python-markupsafe))
2426
2427(define-public python-jinja2
2428 (package
2429 (name "python-jinja2")
4a5c7934 2430 (version "2.10.1")
44d10b1f
RW
2431 (source
2432 (origin
2433 (method url-fetch)
2434 (uri (pypi-uri "Jinja2" version))
2435 (sha256
2436 (base32
4a5c7934 2437 "04shqrs56aj04ipyqykj512rw2l0zfammvj9krawzxz7xc14yp06"))))
44d10b1f
RW
2438 (build-system python-build-system)
2439 (propagated-inputs
2440 `(("python-markupsafe" ,python-markupsafe)))
2441 (home-page "http://jinja.pocoo.org/")
2442 (synopsis "Python template engine")
2443 (description
2444 "Jinja2 is a small but fast and easy to use stand-alone template engine
2445written in pure Python.")
2446 (license license:bsd-3)))
2447
2448(define-public python2-jinja2
2449 (package-with-python2 python-jinja2))
2450
ba42a6bf
TLC
2451(define-public python-jinja2-time
2452 (package
2453 (name "python-jinja2-time")
2454 (version "0.2.0")
2455 (source
2456 (origin
2457 (method url-fetch)
2458 (uri (pypi-uri "jinja2-time" version))
2459 (sha256
2460 (base32
2461 "0h0dr7cfpjnjj8bgl2vk9063a53649pn37wnlkd8hxjy656slkni"))))
2462 (build-system python-build-system)
2463 (propagated-inputs
2464 `(("python-arrow" ,python-arrow)
2465 ("python-jinja2" ,python-jinja2)))
2466 (home-page
2467 "https://github.com/hackebrot/jinja2-time")
2468 (synopsis "Jinja2 Extension for Dates and Times")
2469 (description
2470 "This package provides an extension for the template engine Jinja2. It
2471adds a 'now' tag providing a convenient access to the arrow.now() API from
2472templates. A format string can be provided to control the output.")
2473 (license license:expat)))
2474
44d10b1f
RW
2475(define-public python-pystache
2476 (package
2477 (name "python-pystache")
2478 (version "0.5.4")
2479 (source (origin
2480 (method url-fetch)
2481 (uri (pypi-uri "pystache" version))
2482 (sha256
2483 (base32
2484 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2485 (build-system python-build-system)
2486 (arguments
2487 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
2488 (home-page "http://defunkt.io/pystache/")
2489 (synopsis "Python logic-less template engine")
2490 (description
2491 "Pystache is a Python implementation of the framework agnostic,
2492logic-free templating system Mustache.")
2493 (license license:expat)
2494 (properties `((python2-variant . ,(delay python2-pystache))))))
2495
2496(define-public python2-pystache
2497 (package (inherit (package-with-python2
2498 (strip-python2-variant python-pystache)))
2499 (arguments
2500 `(#:python ,python-2
2501 #:phases
2502 (modify-phases %standard-phases
2503 (replace 'check
2504 (lambda _
dfafc29b 2505 (invoke "python" "test_pystache.py"))))))))
44d10b1f
RW
2506
2507(define-public python-joblib
2508 (package
2509 (name "python-joblib")
2510 (version "0.13.0")
2511 (source (origin
2512 (method url-fetch)
2513 (uri (pypi-uri "joblib" version))
2514 (sha256
2515 (base32
2516 "0612nazad8dxmn3xghfrmjax6456l4xy6hn9cngs7vydi14ds7v5"))))
2517 (build-system python-build-system)
2518 (arguments
2519 `(#:phases
2520 (modify-phases %standard-phases
2521 (replace 'check
2522 (lambda _ (invoke "pytest" "-v" "joblib"))))))
2523 (native-inputs
2524 `(("python-pytest" ,python-pytest)))
2525 (home-page "https://joblib.readthedocs.io/")
2526 (synopsis "Using Python functions as pipeline jobs")
2527 (description
2528 "Joblib is a set of tools to provide lightweight pipelining in Python.
2529In particular, joblib offers: transparent disk-caching of the output values
2530and lazy re-evaluation (memoize pattern), easy simple parallel computing
2531logging and tracing of the execution.")
2532 (license license:bsd-3)))
2533
2534(define-public python2-joblib
2535 (package-with-python2 python-joblib))
2536
a3363341
VC
2537(define-public python-daemon
2538 (package
2539 (name "python-daemon")
2540 (version "2.2.3")
2541 (source
2542 (origin
2543 (method url-fetch)
2544 (uri (pypi-uri "python-daemon" version))
2545 (sha256
2546 (base32
2547 "09fcjdjzk9ywmpnrj62iyxqgcygzdafsz41qlrk2dknzbagcmzmg"))))
2548 (build-system python-build-system)
2549 (arguments
2550 `(#:phases
2551 (modify-phases %standard-phases
2552 (add-before 'check 'disable-tests
2553 (lambda _
2554 ;; FIXME: Determine why test fails
2555 (substitute* "test/test_daemon.py"
2556 (("test_detaches_process_context")
2557 "skip_test_detaches_process_context"))
2558 #t)))))
2559 (propagated-inputs
2560 `(("python-lockfile" ,python-lockfile)))
2561 (native-inputs
2562 `(("python-unittest2" ,python-unittest2)
2563 ("python-testtools" ,python-testtools)
2564 ("python-testscenarios" ,python-testscenarios)
2565 ("python-mock" ,python-mock)
2566 ("python-docutils" ,python-docutils)))
2567 (home-page "https://pagure.io/python-daemon/")
2568 (synopsis "Python library for making a Unix daemon process")
2569 (description "Python-daemon is a library that assists a Python program to
2570turn itself into a well-behaved Unix daemon process, as specified in PEP 3143.
2571
2572This library provides a @code{DaemonContext} class that manages the following
2573important tasks for becoming a daemon process:
2574@enumerate
2575@item Detach the process into its own process group.
2576@item Set process environment appropriate for running inside a chroot.
2577@item Renounce suid and sgid privileges.
2578@item Close all open file descriptors.
2579@item Change the working directory, uid, gid, and umask.
2580@item Set appropriate signal handlers.
2581@item Open new file descriptors for stdin, stdout, and stderr.
2582@item Manage a specified PID lock file.
2583@item Register cleanup functions for at-exit processing.
2584@end enumerate")
2585 ;; Only setup.py is gpl3+, everything else is apache 2.0 licensed.
2586 (license (list license:asl2.0 license:gpl3+))))
2587
44d10b1f
RW
2588(define-public python-docutils
2589 (package
2590 (name "python-docutils")
2591 (version "0.14")
2592 (source
2593 (origin
2594 (method url-fetch)
2595 (uri (pypi-uri "docutils" version))
2596 (sha256
2597 (base32
2598 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))
2599 (build-system python-build-system)
2600 (arguments
2601 '(#:tests? #f)) ; no setup.py test command
2602 (home-page "http://docutils.sourceforge.net/")
2603 (synopsis "Python Documentation Utilities")
2604 (description
2605 "Docutils is a modular system for processing documentation into useful
2606formats, such as HTML, XML, and LaTeX. For input Docutils supports
2607reStructuredText.")
2608 ;; Most of the source code is public domain, but some source files are
2609 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
2610 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
2611
2612(define-public python2-docutils
2613 (package-with-python2 python-docutils))
2614
2615(define-public python-pygments
2616 (package
2617 (name "python-pygments")
eed81080 2618 (version "2.4.2")
44d10b1f
RW
2619 (source
2620 (origin
2621 (method url-fetch)
2622 (uri (pypi-uri "Pygments" version))
2623 (sha256
2624 (base32
eed81080 2625 "15v2sqm5g12bqa0c7wikfh9ck2nl97ayizy1hpqhmws5gqalq748"))))
44d10b1f
RW
2626 (build-system python-build-system)
2627 (arguments
2628 ;; FIXME: Tests require sphinx, which depends on this.
2629 '(#:tests? #f))
2630 (home-page "http://pygments.org/")
2631 (synopsis "Syntax highlighting")
2632 (description
2633 "Pygments is a syntax highlighting package written in Python.")
2634 (license license:bsd-2)))
2635
2636(define-public python2-pygments
2637 (package-with-python2 python-pygments))
2638
0f0a5ef9
MC
2639(define-public python-bumpversion
2640 (package
2641 (name "python-bumpversion")
2642 (version "0.5.3")
2643 (source
2644 (origin
2645 (method url-fetch)
2646 (uri (pypi-uri "bumpversion" version))
2647 (sha256
2648 (base32
2649 "0zn7694yfipxg35ikkfh7kvgl2fissha3dnqad2c5bvsvmrwhi37"))))
2650 (build-system python-build-system)
2651 (home-page "https://github.com/peritus/bumpversion")
2652 (synopsis "Tool to bump software version")
2653 (description "This tool provides a command-line interface (CLI) to bump a
2654software version simply.")
2655 (license license:expat)))
2656
b24fd2c2
MC
2657(define-public python-deprecated
2658 (package
2659 (name "python-deprecated")
2660 (version "1.2.5")
2661 (source
2662 (origin
2663 (method git-fetch)
2664 (uri (git-reference
2665 (url "https://github.com/tantale/deprecated.git")
2666 (commit (string-append "v" version))))
2667 (file-name (git-file-name name version))
2668 (sha256
2669 (base32
2670 "14909glxxwwc4b9qpz2b9jdriwzi5n65ichw85xqppap5f79wcwz"))))
2671 (build-system python-build-system)
2672 (arguments
2673 `(#:phases (modify-phases %standard-phases
2674 (replace 'check
2675 (lambda _
2676 (invoke "pytest"))))))
2677 (propagated-inputs
2678 `(("python-wrapt" ,python-wrapt)))
2679 (native-inputs
2680 `(("python-bumpversion" ,python-bumpversion)
2681 ("python-pytest" ,python-pytest)
2682 ("python-pytest-cov" ,python-pytest-cov)
2683 ("python-sphinx" ,python-sphinx)
2684 ("python-tox" ,python-tox)))
2685 (home-page "https://github.com/tantale/deprecated")
2686 (synopsis "Python decorator to deprecate classes, functions or methods")
2687 (description "The @code{deprecated} decorator provides a convenient way to deprecate
2688to deprecate classes, functions or methods.")
2689 (license license:expat)))
2690
d5a998fa
MC
2691(define-public python-pygithub
2692 (package
2693 (name "python-pygithub")
749e38d7 2694 (version "1.43.8")
d5a998fa
MC
2695 (source
2696 ;; We fetch from the Git repo because there are no tests in the PyPI
2697 ;; archive.
2698 (origin
2699 (method git-fetch)
2700 (uri (git-reference
2701 (url "https://github.com/PyGithub/PyGithub.git")
2702 (commit (string-append "v" version))))
2703 (file-name (git-file-name name version))
2704 (sha256
749e38d7 2705 (base32 "1625v558xga5mwhl9jqmibywy5qafmg1vqrirqz6zfq1la1d22mw"))))
d5a998fa
MC
2706 (build-system python-build-system)
2707 (arguments
2708 `(#:phases (modify-phases %standard-phases
2709 ;; Some tests rely on the network.
2710 (add-after 'unpack 'disable-failing-tests
2711 (lambda _
2712 (substitute* "tests/Issue142.py"
2713 (("testDecodeJson") "disabled_testDecodeJson"))
2714 #t))
2715 (add-before 'check 'prepare-for-tests
2716 (lambda _
2717 (for-each (lambda (f)
2718 (chmod f #o666))
2719 (find-files "./tests"))
2720 (system* "python" "-m" "lib2to3" "-w" "-n" "tests")
2721 (setenv "PYTHONPATH"
2722 (string-append "./tests:" (getenv "PYTHONPATH")))
2723 #t)))))
2724 (propagated-inputs
2725 `(("python-deprecated" ,python-deprecated)
2726 ("python-pyjwt" ,python-pyjwt)
2727 ("python-requests" ,python-requests)))
2728 (native-inputs `(("python-httpretty" ,python-httpretty)))
2729 (home-page "https://pygithub.readthedocs.io/en/latest/")
2730 (synopsis "Python library for the GitHub API")
2731 (description "This library allows managing GitHub resources such as
2732repositories, user profiles, and organizations in your Python applications,
2733using version 3 of the GitHub application programming interface (API).")
2734 (license license:lgpl3+)))
2735
c0c0bb38
MC
2736(define-public python-rellu
2737 (package
2738 (name "python-rellu")
2739 (version "0.7")
2740 (source
2741 (origin
2742 (method url-fetch)
2743 (uri (pypi-uri "rellu" version))
2744 (sha256
2745 (base32
2746 "1w0arpj1sm7vh29nrbnca4pnp8sx42l07r17inwqcjjf9bhng66x"))))
2747 (build-system python-build-system)
2748 (propagated-inputs
2749 `(("python-invoke" ,python-invoke)
2750 ("python-pygithub" ,python-pygithub)))
2751 (home-page "https://github.com/robotframework/rellu")
2752 (synopsis "Utilities to create PyPI releases")
2753 (description "This collection of utilities contains tooling and templates
2754to assist in creating releases on GitHub and publishing them on PyPI. It is
2755designed to be used by Robot Framework and tools and libraries in its
2756ecosystem, but can naturally be used also by other projects.")
2757 (license license:asl2.0)))
2758
b9790285
MC
2759(define-public python-robotframework
2760 (package
2761 (name "python-robotframework")
1710b8f8 2762 (version "3.1.2")
b9790285
MC
2763 ;; There are no tests in the PyPI archive.
2764 (source
2765 (origin
2766 (method git-fetch)
2767 (uri (git-reference
2768 (url "https://github.com/robotframework/robotframework.git")
2769 (commit (string-append "v" version))))
2770 (file-name (git-file-name name version))
2771 (sha256
1710b8f8 2772 (base32 "16gnxy0qinh8fhs0qvhff5z2xh49c3cqgm0d7bfjw120df6x7fym"))
b9790285
MC
2773 (patches (search-patches
2774 "python-robotframework-honor-source-date-epoch.patch"))))
2775 (build-system python-build-system)
2776 (arguments
2777 `(#:phases (modify-phases %standard-phases
2778 (add-before 'build 'build-and-install-doc
2779 (lambda* (#:key outputs #:allow-other-keys)
2780 (let* ((doc-output (assoc-ref outputs "doc"))
2781 (doc (string-append doc-output "/share/"
2782 ,name "-" ,version "/")))
2783 (invoke "invoke" "library-docs" "all")
2784 (mkdir-p doc)
2785 (copy-recursively "doc/libraries"
2786 (string-append doc "/libraries"))
2787 #t)))
2788 (replace 'check
2789 (lambda _
2790 (invoke "python" "utest/run.py"))))))
2791 (native-inputs
2792 `(("python-invoke" ,python-invoke)
2793 ("python-rellu" ,python-rellu)
2794 ("python:tk" ,python "tk"))) ;used when building the HTML doc
2795 (outputs '("out" "doc"))
2796 (home-page "https://robotframework.org")
2797 (synopsis "Generic automation framework")
2798 (description "Robot Framework is a generic automation framework for
2799acceptance testing, acceptance test driven development (ATDD), and robotic
2800process automation (RPA).")
2801 (license license:asl2.0)))
2802
5b84c120
MC
2803(define-public python-robotframework-lint
2804 ;; There is no properly tagged release; the commit below seems to correspond
2805 ;; to the 0.9 stable release available from PyPI. The tests are not
2806 ;; included in the PyPI archive, so we fetch the sources from the upstream
2807 ;; Git repo.
2808 (let ((commit "e851879bab1f63e4e53b34a4dc8a67ed95102830")
2809 (revision "1"))
2810 (package
2811 (name "python-robotframework-lint")
2812 (version (git-version "0.9.0" revision commit))
2813 (source
2814 (origin
2815 (method git-fetch)
2816 (uri (git-reference
2817 (url "https://github.com/boakley/robotframework-lint.git")
2818 (commit commit)))
2819 (file-name (git-file-name name version))
2820 (sha256
2821 (base32
2822 "1p6fknqg5sb9qz5857ji4a877657vgfjm5v3zn45994parx6ml1m"))))
2823 (build-system python-build-system)
2824 (arguments
2825 `(#:phases
2826 (modify-phases %standard-phases
2827 (replace 'check
2828 (lambda _
2829 (invoke "python" "-m" "robot" "-A"
2830 "tests/conf/default.args" "tests"))))))
2831 (propagated-inputs
2832 `(("python-robotframework" ,python-robotframework)))
2833 (home-page "https://github.com/boakley/robotframework-lint/")
2834 (synopsis "Static analysis tool (linter) for Robot Framework")
2835 (description "This package provides the @code{rflint} command-line
2836utility, a static analysis tool (linter) for Robot Framework source files.")
2837 (license license:asl2.0))))
2838
c0c64f17
MC
2839(define-public python-robotframework-sshlibrary
2840 (package
2841 (name "python-robotframework-sshlibrary")
2842 (version "3.3.0")
2843 ;; There are no tests in the PyPI archive.
2844 (source
2845 (origin
2846 (method git-fetch)
2847 (uri (git-reference
2848 (url "https://github.com/robotframework/SSHLibrary.git")
2849 (commit (string-append "v" version))))
2850 (file-name (git-file-name name version))
2851 (sha256
2852 (base32
2853 "1mk6dz2jqqndbx4yji09012q6rmadnqdywi7czvj62b0s07dr3r2"))))
2854 (build-system python-build-system)
2855 (arguments
2856 `(#:phases
2857 (modify-phases %standard-phases
2858 (add-before 'build 'build-and-install-doc
2859 (lambda* (#:key outputs #:allow-other-keys)
2860 (let* ((doc-output (assoc-ref outputs "doc"))
2861 (doc (string-append doc-output "/share/"
2862 ,name "-" ,version "/")))
2863 (invoke "chmod" "-R" "+w" "docs")
2864 (invoke "invoke" "kw-docs" "project-docs")
2865 (mkdir-p doc)
2866 (for-each delete-file (find-files "docs" "\\.rst"))
2867 (copy-recursively "docs" doc)
2868 #t)))
2869 (replace 'check
2870 (lambda _
2871 ;; Some tests require an SSH server; we remove them.
2872 (delete-file "utest/test_client_api.py")
2873 (delete-file "utest/test_scp.py")
2874 (invoke "python" "utest/run.py"))))))
2875 (propagated-inputs
2876 `(("python-robotframework" ,python-robotframework)
2877 ("python-paramiko" ,python-paramiko)
2878 ("python-scp" ,python-scp)))
2879 (native-inputs
2880 `(("openssh" ,openssh)
2881 ("which" ,which)
2882 ;; To generate the documentation
2883 ("python-docutils" ,python-docutils)
2884 ("python-invoke" ,python-invoke)
2885 ("python-pygments" ,python-pygments)
2886 ("python-rellu" ,python-rellu)))
2887 (outputs '("out" "doc"))
2888 (home-page "https://github.com/robotframework/SSHLibrary")
2889 (synopsis "Robot Framework library for SSH and SFTP")
2890 (description "SSHLibrary is a Robot Framework library providing support
2891for SSH and SFTP. It has the following main usages:
2892@itemize @bullet
2893@item Executing commands on the remote machine, either blocking or non-blocking.
2894@item Writing and reading in an interactive shell.
2895@item Transferring files and directories over SFTP.
2896@item Ensuring that files and directories exist on the remote machine.
2897@end itemize")
2898 (license license:asl2.0)))
2899
13d825fc
MC
2900(define-public python-scp
2901 (package
2902 (name "python-scp")
2903 (version "0.13.2")
2904 (source
2905 (origin
2906 (method url-fetch)
2907 (uri (pypi-uri "scp" version))
2908 (sha256
2909 (base32
2910 "1crlpw9lnn58fs1c1rmh7s7s9y5gkgpgjsqlvg9qa51kq1knx7gg"))))
2911 (build-system python-build-system)
2912 (arguments
2913 '(#:tests? #f)) ;tests require an SSH server
2914 (propagated-inputs
2915 `(("python-paramiko" ,python-paramiko)))
2916 (home-page "https://github.com/jbardin/scp.py")
2917 (synopsis "SCP protocol module for Python and Paramiko")
2918 (description "The scp module extends the Paramiko library to send and
2919receive files via the SCP1 protocol, as implemented by the OpenSSH
2920@command{scp} program.")
2921 (license license:gpl2+)))
2922
44d10b1f
RW
2923(define-public python-rst.linker
2924 (package
2925 (name "python-rst.linker")
d37e8e53 2926 (version "1.11")
44d10b1f
RW
2927 (source
2928 (origin
2929 (method url-fetch)
2930 (uri (pypi-uri "rst.linker" version))
2931 (sha256
d37e8e53 2932 (base32 "0pqsfqqx8h0pq21k8l3k62kznrgaj2ala93c64s4d9rpbr4mgkd2"))))
44d10b1f
RW
2933 (build-system python-build-system)
2934 (propagated-inputs
2935 `(("python-dateutil" ,python-dateutil)
2936 ("python-six" ,python-six)))
2937 (native-inputs
2938 `(("python-setuptools-scm" ,python-setuptools-scm)))
2939 ;; Test would require path.py, which would introduce a cyclic dependence.
2940 (arguments `(#:tests? #f))
2941 ;; Note: As of version 1.7 the documentation is not worth building.
2942 (home-page "https://github.com/jaraco/rst.linker")
2943 (synopsis "Sphinx plugin to add links and timestamps")
2944 (description "rst.linker allows to automatically replace text by a
2945reStructuredText external reference or timestamps. It's primary purpose is to
2946augment the changelog, but it can be used for other documents, too.")
2947 (license license:expat)))
2948
2949(define-public python2-rst.linker
2950 (package-with-python2 python-rst.linker))
2951
2952(define-public python-feedgenerator
2953 (package
2954 (name "python-feedgenerator")
2955 (version "1.9")
2956 (source
2957 (origin
2958 (method url-fetch)
2959 (uri (pypi-uri "feedgenerator" version))
2960 (sha256
2961 (base32
2962 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
2963 (modules '((guix build utils)))
2964 (snippet
2965 '(begin
2966 ;; Remove pre-compiled .pyc files from source.
2967 (for-each delete-file-recursively
2968 (find-files "." "__pycache__" #:directories? #t))
2969 (for-each delete-file (find-files "." "\\.pyc$"))
2970 #t))))
2971 (build-system python-build-system)
2972 (propagated-inputs
2973 `(("python-pytz" ,python-pytz)
2974 ("python-six" ,python-six)))
2975 (home-page "https://github.com/getpelican/feedgenerator")
2976 (synopsis
2977 "Standalone version of Django's Atom/RSS feed generator")
2978 (description
2979 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
2980which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
2981 (license license:bsd-3)))
2982
2983(define-public python2-feedgenerator
2984 (package-with-python2 python-feedgenerator))
2985
2986(define-public python-toml
2987 (package
2988 (name "python-toml")
2989 (version "0.9.4")
2990 (source
2991 (origin
2992 (method url-fetch)
2993 (uri (pypi-uri "toml" version))
2994 (sha256
2995 (base32
2996 "0bdbpbip67wdm6c7xwc6mmbmskyradj4cdxn1iibj4fcx1nbv1lf"))))
2997 (build-system python-build-system)
2998 (arguments
2999 `(#:tests? #f)) ;no tests suite in release
3000 (home-page "https://github.com/uiri/toml")
3001 (synopsis "Library for TOML")
3002 (description
3003 "@code{toml} is a library for parsing and creating Tom's Obvious, Minimal
3004Language (TOML) configuration files.")
3005 (license license:expat)))
3006
346c8752
BG
3007(define-public python-jsonrpc-server
3008 (package
3009 (name "python-jsonrpc-server")
3010 (version "0.1.2")
3011 (source
3012 (origin
3013 (method url-fetch)
3014 (uri (pypi-uri "python-jsonrpc-server" version))
3015 (sha256
3016 (base32
3017 "0m4ykpcdy52x37n1ikysp07j7p8ialcdvvvsrjp3545sn7iiid09"))))
3018 (build-system python-build-system)
3019 (propagated-inputs
3020 `(("python-future" ,python-future)
3021 ("python-mock" ,python-mock)
3022 ("python-pytest" ,python-pytest)))
3023 (home-page
3024 "https://github.com/palantir/python-jsonrpc-server")
3025 (synopsis "JSON RPC 2.0 server library")
3026 (description
1df5407c 3027 "This package provides a JSON RPC 2.0 server library for Python.")
346c8752
BG
3028 (license license:expat)))
3029
56f4ad47
BG
3030(define-public python-pydocstyle
3031 (package
3032 (name "python-pydocstyle")
3033 (version "3.0.0")
3034 (source
3035 (origin
3036 (method url-fetch)
3037 (uri (pypi-uri "pydocstyle" version))
3038 (sha256
3039 (base32
3040 "1m1xv9clkg9lgzyza6dnj359z04vh5g0h49nhzghv7lg81gchhap"))))
3041 (build-system python-build-system)
3042 (propagated-inputs
3043 `(("python-six" ,python-six)
3044 ("python-snowballstemmer" ,python-snowballstemmer)))
3045 (home-page
3046 "https://github.com/PyCQA/pydocstyle/")
3047 (synopsis "Python docstring style checker")
3048 (description
3049 "This package provides a style checker for the Python Language
3050Server (PLS).")
3051 (license license:expat)))
3052
be4d840c 3053(define-public python-language-server
808dd2d0
BL
3054 (package
3055 (name "python-language-server")
3056 (version "0.29.1")
3057 (source
3058 (origin
3059 (method url-fetch)
3060 (uri (pypi-uri "python-language-server" version))
3061 (sha256
3062 (base32
3063 "1f8qlflh6j3s7qfmzhirpl8fgidl6f0qbakdmiml96wdxzvka0s3"))))
3064 (build-system python-build-system)
3065 (propagated-inputs
3066 `(("python-pluggy" ,python-pluggy)
3067 ("python-jsonrpc-server" ,python-jsonrpc-server)
3068 ("python-jedi" ,python-jedi)
3069 ("python-yapf" ,python-yapf)
3070 ("python-pyflakes" ,python-pyflakes)
3071 ("python-pydocstyle" ,python-pydocstyle)
3072 ("python-pycodestyle" ,python-pycodestyle)
3073 ("python-mccabe" ,python-mccabe)
3074 ("python-rope" ,python-rope)
3075 ("python-autopep8" ,python-autopep8)
3076 ("python-flake8" ,python-flake8)
3077 ("python-pylint" ,python-pylint)))
3078 (home-page "https://github.com/palantir/python-language-server")
3079 (synopsis "Python implementation of the Language Server Protocol")
3080 (description
3081 "The Python Language Server (pyls) is an implementation of the Python 3
be4d840c
BG
3082language specification for the Language Server Protocol (LSP). This tool is
3083used in text editing environments to provide a complete and integrated
3084feature-set for programming Python effectively.")
808dd2d0 3085 (license license:expat)))
be4d840c 3086
44d10b1f
RW
3087(define-public python-black
3088 (package
3089 (name "python-black")
3090 (version "18.6b4")
3091 (source
3092 (origin
3093 (method url-fetch)
3094 (uri (pypi-uri "black" version))
3095 (sha256
3096 (base32
3097 "0i4sfqgz6w15vd50kbhi7g7rifgqlf8yfr8y78rypd56q64qn592"))))
3098 (build-system python-build-system)
3099 (arguments
3100 `(#:phases
3101 (modify-phases %standard-phases
3102 (add-after 'patch-source-shebangs 'patch-extra-shebangs
3103 (lambda _
3104 (let ((python3 (which "python3")))
3105 (substitute* '("tests/data/fmtonoff.py"
3106 "tests/data/string_prefixes.py"
3107 "tests/data/function.py")
3108 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
3109 (string-append "#!" python3 (if (string? minor-version)
3110 minor-version
3111 ""))))))))))
3112 (propagated-inputs
3113 `(("python-click" ,python-click)
3114 ("python-attrs" ,python-attrs)
3115 ("python-appdirs" ,python-appdirs)
3116 ("python-toml" ,python-toml)))
3117 (home-page "https://github.com/ambv/black")
3118 (synopsis "The uncompromising code formatter")
3119 (description "Black is the uncompromising Python code formatter.")
3120 (license license:expat)))
3121
3122(define-public python-blinker
3123 (package
3124 (name "python-blinker")
3125 (version "1.4")
3126 (source
3127 (origin
3128 (method url-fetch)
3129 (uri (pypi-uri "blinker" version))
3130 (sha256
3131 (base32
3132 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
3133 (build-system python-build-system)
3134 (home-page "http://pythonhosted.org/blinker/")
3135 (synopsis "Fast, simple object-to-object and broadcast signaling")
3136 (description
3137 "Blinker provides a fast dispatching system that allows any number of
3138interested parties to subscribe to events, or \"signals\".")
3139 (license license:expat)))
3140
3141(define-public python2-blinker
3142 (package-with-python2 python-blinker))
3143
3144(define-public pelican
3145 (package
3146 (name "pelican")
aa71b690 3147 (version "4.0.1")
44d10b1f
RW
3148 (source
3149 (origin
3150 (method url-fetch)
3151 (uri (pypi-uri "pelican" version))
3152 (sha256
3153 (base32
aa71b690 3154 "05yda7n6r0ll18fpdjzkzyr0ls8hbb86fnjyb33k9jvv5avah2lr"))))
44d10b1f
RW
3155 (build-system python-build-system)
3156 (propagated-inputs
3157 `(("python-feedgenerator" ,python-feedgenerator)
3158 ("python-jinja2" ,python-jinja2)
3159 ("python-pygments" ,python-pygments)
3160 ("python-docutils" ,python-docutils)
3161 ("python-pytz" ,python-pytz)
3162 ("python-blinker" ,python-blinker)
3163 ("python-unidecode" ,python-unidecode)
3164 ("python-six" ,python-six)
3165 ("python-dateutil" ,python-dateutil)
3166 ("python-markdown" ,python-markdown)))
3167 (home-page "https://getpelican.com/")
3168 (arguments
3169 `(;; XXX Requires a lot more packages to do unit tests :P
3170 #:tests? #f
3171 #:phases (modify-phases %standard-phases
3172 (add-before
3173 'install 'adjust-requires
3174 ;; Since feedgenerator is installed from git, it doesn't
3175 ;; conform to the version requirements.
3176 ;;
3177 ;; We *do have* "feedgenerator >= 1.6", but strip off the
3178 ;; version requirement so setuptools doesn't get confused.
3179 (lambda _
3180 (substitute* "setup.py"
3181 (("['\"]feedgenerator.*?['\"]")
3182 "'feedgenerator'")))))))
3183 (synopsis "Python-based static site publishing system")
3184 (description
3185 "Pelican is a tool to generate a static blog from reStructuredText,
3186Markdown input files, and more. Pelican uses Jinja2 for templating
3187and is very extensible.")
3188 (license license:agpl3+)))
3189
8c141421
JH
3190(define-public mallard-ducktype
3191 (package
3192 (name "mallard-ducktype")
12cc3da5 3193 (version "1.0.2")
8c141421
JH
3194 (source
3195 (origin
3196 (method git-fetch)
12cc3da5
JH
3197 ;; git-reference because tests are not included in pypi source tarball
3198 ;; https://issues.guix.gnu.org/issue/36755#2
8c141421
JH
3199 (uri (git-reference
3200 (url "https://github.com/projectmallard/mallard-ducktype.git")
3201 (commit version)))
3202 (file-name (git-file-name name version))
3203 (sha256
3204 (base32
12cc3da5 3205 "1jk9bfz7g04ip78s03b0xak6d54rj4h9zpgadkziy1ji216g6y4c"))))
8c141421 3206 (build-system python-build-system)
5246655f
EF
3207 (arguments
3208 '(#:phases
3209 (modify-phases %standard-phases
3210 (replace 'check
3211 (lambda _
3212 (with-directory-excursion "tests"
3213 (invoke "sh" "runtests")))))))
8c141421
JH
3214 (home-page "http://projectmallard.org")
3215 (synopsis "Convert Ducktype to Mallard documentation markup")
3216 (description
3217 "Ducktype is a lightweight syntax that can represent all the semantics
3218of the Mallard XML documentation system. Ducktype files can be converted to
3219Mallard using the @command{ducktype} tool. The yelp-tools package
3220provides additional functionality on the produced Mallard documents.")
3221 (license license:expat)))
3222
44d10b1f
RW
3223(define-public python-cython
3224 (package
3225 (name "python-cython")
6fd27a71 3226 (version "0.29.13")
44d10b1f
RW
3227 (source
3228 (origin
3229 (method url-fetch)
3230 (uri (pypi-uri "Cython" version))
3231 (sha256
6fd27a71
TGR
3232 (base32
3233 "13k37lrcgagwwnzr5bzririsscb793vndj234d475x1h9ad0d7f2"))))
44d10b1f
RW
3234 (build-system python-build-system)
3235 ;; we need the full python package and not just the python-wrapper
3236 ;; because we need libpython3.3m.so
3237 (inputs
3238 `(("python" ,python)))
3239 (arguments
3240 `(#:phases
3241 (modify-phases %standard-phases
3242 (add-before 'check 'set-HOME
3243 ;; some tests require access to "$HOME/.cython"
3244 (lambda _ (setenv "HOME" "/tmp") #t))
3245
3246 ;; FIXME: These tests started failing on armhf after the 0.28 update
3247 ;; (commit c69d11c5930), both with an error such as this:
3248 ;; compiling (cpp) and running dictcomp ...
3249 ;; === C/C++ compiler error output: ===
3250 ;; ‘
3251 ;; dictcomp.cpp:5221: confused by earlier errors, bailing out
3252 ;; See <https://hydra.gnu.org/build/2948724> for logs.
3253 ,@(if (target-arm32?)
3254 `((add-before 'check 'disable-failing-tests
3255 (lambda _
3256 (let ((disabled-tests (open-file "tests/bugs.txt" "a")))
3257 (for-each (lambda (test)
3258 (format disabled-tests "~a\n" test))
3259 '("memslice" "dictcomp"))
3260 (close-port disabled-tests)))))
3261 '())
3262
3263 (replace 'check
3264 (lambda _
e9194eb0
MB
3265 ;; Disable compiler optimizations to greatly reduce the running
3266 ;; time of the test suite.
3267 (setenv "CFLAGS" "-O0")
3268
3269 (invoke "python" "runtests.py" "-vv"
3270 "-j" (number->string (parallel-job-count))))))))
f319409b 3271 (home-page "https://cython.org/")
44d10b1f
RW
3272 (synopsis "C extensions for Python")
3273 (description "Cython is an optimising static compiler for both the Python
3274programming language and the extended Cython programming language. It makes
3275writing C extensions for Python as easy as Python itself.")
3276 (license license:asl2.0)
3277 (properties `((python2-variant . ,(delay python2-cython))))))
3278
3279(define-public python2-cython
da460865
MB
3280 (let ((base (package-with-python2 (strip-python2-variant python-cython))))
3281 (package
3282 (inherit base)
3283 (name "python2-cython")
3284 (inputs
3285 `(("python-2" ,python-2))) ;this is not automatically changed
3286 (arguments
3287 (substitute-keyword-arguments (package-arguments base)
3288 ((#:phases phases)
3289 `(modify-phases ,phases
3290 (add-before 'check 'adjust-test_embed
3291 (lambda _
3292 (substitute* "runtests.py"
3293 ;; test_embed goes great lengths to find the static libpythonX.Y.a
3294 ;; so it can give the right -L flag to GCC when embedding static
3295 ;; builds of Python. It is unaware that the Python "config"
3296 ;; directory (where the static library lives) was renamed in
3297 ;; Python 3, and falls back to sysconfig.get_config_var('LIBDIR'),
3298 ;; which works fine, because that is where the shared library is.
3299 ;;
3300 ;; It also appears to be unaware that the Makefile in Demos/embed
3301 ;; already unconditionally pass the static library location to GCC,
3302 ;; after checking sysconfig.get_config_var('LIBPL).
3303 ;;
3304 ;; The effect is that the linker is unable to resolve libexpat
3305 ;; symbols when building for Python 2, because neither the Python 2
3306 ;; shared library nor Expat is available. To fix it, we can either
3307 ;; add Expat as an input and make it visible to the linker, or just
3308 ;; prevent it from overriding the Python shared library location.
3309 ;; The end result is identical, so we take the easy route.
3310 ((" or libname not in os\\.listdir\\(libdir\\)")
3311 ""))
3312 #t)))))))))
44d10b1f
RW
3313
3314;; The RPython toolchain currently does not support Python 3.
3315(define-public python2-rpython
3316 (package
3317 (name "python2-rpython")
3318 (version "0.2.1")
3319 (source
3320 (origin
3321 (method url-fetch)
3322 (uri (pypi-uri "rpython" version))
3323 (sha256
3324 (base32
3325 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
3326 (build-system python-build-system)
3327 (arguments `(#:python ,python-2))
3328 (native-inputs
3329 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
3330 (home-page "https://rpython.readthedocs.org")
3331 (synopsis "Framework for implementing interpreters and virtual machines")
3332 (description "RPython is a translation and support framework for
3333producing implementations of dynamic languages, emphasizing a clean separation
3334between language specification and implementation aspects.")
3335 (license license:expat)))
3336
3337;; NOTE: when upgrading numpy please make sure that python-pandas and
3338;; python-scipy still build, as these three packages are often used together.
3339(define-public python-numpy
3340 (package
3341 (name "python-numpy")
8e5fbd5d 3342 (version "1.17.3")
44d10b1f
RW
3343 (source
3344 (origin
3345 (method url-fetch)
3346 (uri (string-append
3347 "https://github.com/numpy/numpy/releases/download/v"
3348 version "/numpy-" version ".tar.gz"))
3349 (sha256
3350 (base32
8e5fbd5d 3351 "1ak9dmjja0q90a7fsxli51ypcwssh8c4pb6f8wkrsnf2xgdk6dy9"))))
44d10b1f
RW
3352 (build-system python-build-system)
3353 (inputs
3354 `(("openblas" ,openblas)
3355 ("lapack" ,lapack)))
3356 (native-inputs
3357 `(("python-cython" ,python-cython)
3358 ("python-pytest" ,python-pytest)
3359 ("gfortran" ,gfortran)))
3360 (arguments
3361 `(#:phases
3362 (modify-phases %standard-phases
3363 (add-before 'build 'configure-blas-lapack
3364 (lambda* (#:key inputs #:allow-other-keys)
3365 (call-with-output-file "site.cfg"
3366 (lambda (port)
3367 (format port
3368 "[openblas]
3369libraries = openblas
3370library_dirs = ~a/lib
3371include_dirs = ~a/include
3372
3373# backslash-n to make emacs happy
3374\n[lapack]
3375lapack_libs = lapack
3376library_dirs = ~a/lib
3377include_dirs = ~a/include
3378"
3379 (assoc-ref inputs "openblas")
3380 (assoc-ref inputs "openblas")
3381 (assoc-ref inputs "lapack")
3382 (assoc-ref inputs "lapack"))))
3383 #t))
3384 (add-before 'build 'fix-executable-paths
3385 (lambda* (#:key inputs #:allow-other-keys)
3386 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
3387 ;; instead of /bin/sh.
3388 (substitute* "numpy/distutils/exec_command.py"
3389 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
3390 (string-append match-start (assoc-ref inputs "bash") match-end)))
3391 ;; Use "gcc" executable, not "cc".
3392 (substitute* "numpy/distutils/system_info.py"
3393 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3394 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
3395 #t))
3396 ;; Tests can only be run after the library has been installed and not
3397 ;; within the source directory.
3398 (delete 'check)
3399 (add-after 'install 'check
3400 (lambda* (#:key outputs inputs #:allow-other-keys)
3401 ;; Make installed package available for running the tests
3402 (add-installed-pythonpath inputs outputs)
3403 ;; Make sure "f2py" etc is found.
3404 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
3405 ":" (getenv "PATH")))
3406 (with-directory-excursion "/tmp"
3407 (invoke "python" "-c"
3408 "import numpy; numpy.test(verbose=2)")))))))
3409 (home-page "http://www.numpy.org/")
3410 (synopsis "Fundamental package for scientific computing with Python")
3411 (description "NumPy is the fundamental package for scientific computing
3412with Python. It contains among other things: a powerful N-dimensional array
3413object, sophisticated (broadcasting) functions, tools for integrating C/C++
3414and Fortran code, useful linear algebra, Fourier transform, and random number
3415capabilities.")
adb396ea 3416 (properties `((python2-variant . ,(delay python2-numpy))))
44d10b1f
RW
3417 (license license:bsd-3)))
3418
adb396ea 3419;; Numpy 1.16.x are the last versions that support Python 2.
44d10b1f 3420(define-public python2-numpy
adb396ea
MB
3421 (let ((numpy (package-with-python2
3422 (strip-python2-variant python-numpy))))
3423 (package/inherit
3424 numpy
3425 (version "1.16.5")
3426 (source (origin
3427 (method url-fetch)
3428 (uri (string-append
3429 "https://github.com/numpy/numpy/releases/download/v"
3430 version "/numpy-" version ".tar.gz"))
3431 (sha256
3432 (base32
3433 "0lg1cycxzi4rvvrd5zxinpdz0ni792fpx6xjd75z1923zcac8qrb")))))))
44d10b1f
RW
3434
3435;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
3436;; interest only for legacy code going back to NumPy's predecessor
3437;; Numeric.
3438(define-public python2-numpy-1.8
3439 (package (inherit python2-numpy)
3440 (version "1.8.2")
3441 (source
3442 (origin
3443 (method url-fetch)
3444 (uri (string-append
3445 "https://github.com/numpy/numpy/archive/v" version ".tar.gz"))
3446 (file-name (string-append "python2-numpy-" version ".tar.gz"))
3447 (sha256
3448 (base32
3449 "0sc20gz1b17xnyrkp5frca3ql5qfalpv916hfg2kqxpwr6jg0f1g"))))
3450 (arguments
3451 (substitute-keyword-arguments (package-arguments python2-numpy)
3452 ((#:phases phases)
3453 `(modify-phases ,phases
3454 (replace 'configure-blas-lapack
3455 (lambda* (#:key inputs #:allow-other-keys)
3456 (call-with-output-file "site.cfg"
3457 (lambda (port)
3458 (format port
3459 "[openblas]
3460libraries = openblas,lapack
3461library_dirs = ~a/lib:~a/lib
3462include_dirs = ~a/include:~a/include
3463"
3464 (assoc-ref inputs "openblas")
3465 (assoc-ref inputs "lapack")
3466 (assoc-ref inputs "openblas")
3467 (assoc-ref inputs "lapack"))))
3468 #t))))))
3469 (native-inputs
3470 `(("python2-nose" ,python2-nose)))
3471 (description "NumPy is the fundamental package for scientific computing
3472with Python. It contains among other things: a powerful N-dimensional array
3473object, sophisticated (broadcasting) functions, tools for integrating C/C++
3474and Fortran code, useful linear algebra, Fourier transform, and random number
3475capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
3476that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
3477Numeric.")
3478 (license license:bsd-3)))
3479
3480(define-public python-munch
3481 (package
3482 (name "python-munch")
3483 (version "2.0.4")
3484 (source
3485 (origin
3486 (method url-fetch)
3487 (uri (pypi-uri "munch" version))
3488 (sha256
3489 (base32
3490 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3491 (build-system python-build-system)
3492 (home-page "https://github.com/Infinidat/munch")
3493 (synopsis "Dot-accessible dictionary")
3494 (description "Munch is a dot-accessible dictionary similar to JavaScript
3495objects.")
3496 (license license:expat)))
3497
3498(define-public python2-munch
3499 (package-with-python2 python-munch))
3500
3501(define-public python-colormath
3502 (package
3503 (name "python-colormath")
3504 (version "3.0.0")
3505 (source
3506 (origin
3507 (method url-fetch)
3508 (uri (pypi-uri "colormath" version))
3509 (sha256
3510 (base32
3511 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
3512 (build-system python-build-system)
3513 (propagated-inputs
3514 `(("python-networkx" ,python-networkx)
3515 ("python-numpy" ,python-numpy)))
3516 (home-page "https://github.com/gtaylor/python-colormath")
3517 (synopsis "Color math and conversion library")
3518 (description
3519 "This is a Python library for color math and conversions.")
3520 (license license:bsd-3)))
3521
3522(define-public python2-colormath
3523 (package-with-python2 python-colormath))
3524
3525(define-public python-spectra
3526 (package
3527 (name "python-spectra")
3528 (version "0.0.11")
3529 (source
3530 (origin
3531 (method url-fetch)
3532 (uri (pypi-uri "spectra" version))
3533 (sha256
3534 (base32
3535 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
3536 (build-system python-build-system)
3537 (arguments
3538 `(#:phases
3539 (modify-phases %standard-phases
3540 (replace 'check
38ec0f6a 3541 (lambda _ (invoke "nosetests" "-v"))))))
44d10b1f
RW
3542 (propagated-inputs
3543 `(("python-colormath" ,python-colormath)))
3544 (native-inputs
3545 `(("python-nose" ,python-nose)))
3546 (home-page "https://github.com/jsvine/spectra")
3547 (synopsis "Color scales and color conversion")
3548 (description
3549 "This package provides a Python library intended to make color math,
3550color scales, and color space conversion easy. It has support for:
3551
3552@enumerate
3553@item Color scales
3554@item Color ranges
3555@item Color blending
3556@item Brightening/darkening colors
3557@item Saturating/desaturating colors
3558@item Conversion to/from multiple color spaces.
3559@end enumerate\n")
3560 (license license:expat)))
3561
3562(define-public python2-spectra
3563 (package-with-python2 python-spectra))
3564
3565(define-public python-numpy-documentation
3566 (package
3567 (name "python-numpy-documentation")
3568 (version (package-version python-numpy))
3569 (source (package-source python-numpy))
3570 (build-system python-build-system)
3571 (native-inputs
3572 `(("python-matplotlib" ,python-matplotlib)
3573 ("python-numpy" ,python-numpy)
3574 ("pkg-config" ,pkg-config)
3575 ("python-sphinx" ,python-sphinx)
3576 ("python-numpydoc" ,python-numpydoc)
f75aa97f 3577 ("texlive" ,(texlive-union (list texlive-fonts-cm-super
44d10b1f
RW
3578 texlive-fonts-ec
3579 texlive-generic-ifxetex
3580 texlive-generic-pdftex
f75aa97f 3581 texlive-amsfonts
44d10b1f
RW
3582 texlive-latex-capt-of
3583 texlive-latex-cmap
3584 texlive-latex-environ
3585 texlive-latex-eqparbox
3586 texlive-latex-etoolbox
3587 texlive-latex-expdlist
3588 texlive-latex-fancyhdr
3589 texlive-latex-fancyvrb
3590 texlive-latex-fncychap
3591 texlive-latex-float
3592 texlive-latex-framed
3593 texlive-latex-geometry
3594 texlive-latex-graphics
3595 texlive-latex-hyperref
3596 texlive-latex-mdwtools
3597 texlive-latex-multirow
3598 texlive-latex-needspace
3599 texlive-latex-oberdiek
3600 texlive-latex-parskip
3601 texlive-latex-preview
3602 texlive-latex-tabulary
3603 texlive-latex-threeparttable
3604 texlive-latex-titlesec
3605 texlive-latex-trimspaces
3606 texlive-latex-ucs
3607 texlive-latex-upquote
3608 texlive-latex-url
3609 texlive-latex-varwidth
3610 texlive-latex-wrapfig)))
3611 ("texinfo" ,texinfo)
3612 ("perl" ,perl)
3613 ("scipy-sphinx-theme"
3614 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
3615 (method git-fetch)
3616 (uri (git-reference
3617 (url "https://github.com/scipy/scipy-sphinx-theme.git")
3618 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
3619 (sha256
3620 (base32
3621 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
3622 ,@(package-native-inputs python-numpy)))
3623 (arguments
3624 `(#:tests? #f ; we're only generating the documentation
3625 #:phases
3626 (modify-phases %standard-phases
3627 (delete 'build)
3628 (replace 'install
3629 (lambda* (#:key inputs outputs #:allow-other-keys)
3630 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3631 (doc (string-append
3632 data "/doc/" ,name "-"
3633 ,(package-version python-numpy)))
3634 (info-reader (string-append data "/info"))
3635 (html (string-append doc "/html"))
3636 (scipy-sphinx-theme "scipy-sphinx-theme")
3637 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
3638 (pyver ,(string-append "PYVER=")))
3639
3640 ;; FIXME: this is needed to for texlive-union to generate
3641 ;; fonts, which are not found.
3642 (setenv "HOME" "/tmp")
3643
3644 (with-directory-excursion "doc"
3645 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
3646 (mkdir-p html)
4fc898da
RW
3647 (invoke "make" "html" pyver)
3648 (invoke "make" "latex" "PAPER=a4" pyver)
3649 (invoke "make" "-C" "build/latex"
44d10b1f
RW
3650 "all-pdf" "PAPER=a4" pyver)
3651 ;; FIXME: Generation of the info file fails.
4fc898da 3652 ;; (invoke "make" "info" pyver)
44d10b1f
RW
3653 ;; (mkdir-p info)
3654 ;; (copy-file "build/texinfo/numpy.info"
3655 ;; (string-append info "/numpy.info"))
3656 (for-each (lambda (file)
3657 (copy-file (string-append "build/latex" file)
3658 (string-append doc file)))
3659 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3660 (with-directory-excursion "build/html"
3661 (for-each (lambda (file)
3662 (let* ((dir (dirname file))
3663 (tgt-dir (string-append html "/" dir)))
3664 (unless (equal? "." dir)
3665 (mkdir-p tgt-dir))
3666 (install-file file html)))
3667 (find-files "." ".*")))))
3668 #t)))))
3669 (home-page (package-home-page python-numpy))
3670 (synopsis "Documentation for the python-numpy package")
3671 (description (package-description python-numpy))
3672 (license (package-license python-numpy))))
3673
3674(define-public python2-numpy-documentation
3675 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
3676 (package
3677 (inherit numpy-documentation)
3678 (native-inputs `(("python2-functools32" ,python2-functools32)
3679 ,@(package-native-inputs numpy-documentation))))))
3680
3681(define-public python-pygit2
3682 (package
3683 (name "python-pygit2")
dac8b275 3684 (version "0.28.2")
44d10b1f
RW
3685 (source
3686 (origin
3687 (method url-fetch)
3688 (uri (pypi-uri "pygit2" version))
3689 (sha256
dac8b275 3690 (base32 "11kzj5mjkspvplnpdb6bj8dcj6rgmkk986k8hjcklyg5yaxkz32d"))))
44d10b1f
RW
3691 (build-system python-build-system)
3692 (arguments
c3ecab0d 3693 '(#:tests? #f)) ; tests don't run correctly in our environment
44d10b1f
RW
3694 (propagated-inputs
3695 `(("python-six" ,python-six)
3696 ("python-cffi" ,python-cffi)
3697 ("libgit2" ,libgit2)
3698 ("python-tox" ,python-tox)))
3699 (native-inputs
3700 `(("python-pytest" ,python-pytest)))
3701 (home-page "https://github.com/libgit2/pygit2")
3702 (synopsis "Python bindings for libgit2")
3703 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3704library, libgit2 implements Git plumbing.")
3705 ;; GPL2.0 only, with linking exception.
3706 (license license:gpl2)))
3707
3708(define-public python2-pygit2
3709 (package-with-python2 python-pygit2))
3710
3711(define-public python-pyparsing
3712 (package
3713 (name "python-pyparsing")
6d3cff5a 3714 (version "2.3.1")
44d10b1f
RW
3715 (source
3716 (origin
3717 (method url-fetch)
3718 (uri (pypi-uri "pyparsing" version))
3719 (sha256
6d3cff5a 3720 (base32 "0yk6xl885b91dmlhlsap7x78hk2rdr879fln9anbq6k4ca42djb6"))))
44d10b1f
RW
3721 (build-system python-build-system)
3722 (outputs '("out" "doc"))
3723 (arguments
3724 `(#:tests? #f ; no test target
3725 #:phases
3726 (modify-phases %standard-phases
3727 (add-after 'install 'install-doc
3728 (lambda* (#:key outputs #:allow-other-keys)
3729 (let* ((doc (string-append (assoc-ref outputs "doc")
3730 "/share/doc/" ,name "-" ,version))
3731 (html-doc (string-append doc "/html"))
3732 (examples (string-append doc "/examples")))
3733 (mkdir-p html-doc)
3734 (mkdir-p examples)
3735 (for-each
3736 (lambda (dir tgt)
3737 (map (lambda (file)
3738 (install-file file tgt))
3739 (find-files dir ".*")))
3740 (list "docs" "htmldoc" "examples")
3741 (list doc html-doc examples))
3742 #t))))))
3743 (home-page "https://github.com/pyparsing/pyparsing")
3744 (synopsis "Python parsing class library")
3745 (description
3746 "The pyparsing module is an alternative approach to creating and
3747executing simple grammars, vs. the traditional lex/yacc approach, or the use
3748of regular expressions. The pyparsing module provides a library of classes
3749that client code uses to construct the grammar directly in Python code.")
3750 (license license:expat)))
3751
3752(define-public python2-pyparsing
3753 (package-with-python2 python-pyparsing))
3754
3755(define-public python-numpydoc
3756 (package
3757 (name "python-numpydoc")
3758 (version "0.8.0")
3759 (source
3760 (origin
3761 (method url-fetch)
3762 (uri (pypi-uri "numpydoc" version))
3763 (sha256
3764 (base32
3765 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
3766 (build-system python-build-system)
3767 (propagated-inputs
3768 `(("python-sphinx" ,python-sphinx)))
3769 (native-inputs
3770 `(("python-nose" ,python-nose)))
3771 (home-page "https://pypi.python.org/pypi/numpydoc")
3772 (synopsis
3773 "Numpy's Sphinx extensions")
3774 (description
3775 "Sphinx extension to support docstrings in Numpy format.")
3776 (license license:bsd-2)))
3777
3778(define-public python2-numpydoc
3779 (package-with-python2 python-numpydoc))
3780
3781(define-public python-numexpr
3782 (package
3783 (name "python-numexpr")
3784 (version "2.6.5")
3785 (source
3786 (origin
3787 (method url-fetch)
3788 (uri (pypi-uri "numexpr" version))
3789 (sha256
3790 (base32
3791 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
3792 (build-system python-build-system)
3793 (arguments `(#:tests? #f)) ; no tests included
3794 (propagated-inputs
3795 `(("python-numpy" ,python-numpy)))
3796 (home-page "https://github.com/pydata/numexpr")
3797 (synopsis "Fast numerical expression evaluator for NumPy")
3798 (description
3799 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3800expressions that operate on arrays are accelerated and use less memory than
3801doing the same calculation in Python. In addition, its multi-threaded
3802capabilities can make use of all your cores, which may accelerate
3803computations, most specially if they are not memory-bounded (e.g. those using
3804transcendental functions).")
3805 (license license:expat)))
3806
3807(define-public python2-numexpr
3808 (package-with-python2 python-numexpr))
3809
3810(define-public python-cycler
3811 (package
3812 (name "python-cycler")
3813 (version "0.10.0")
3814 (source (origin
3815 (method url-fetch)
3816 (uri (pypi-uri "cycler" version))
3817 (sha256
3818 (base32
3819 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
3820 (build-system python-build-system)
3821 (arguments
3822 ;; XXX: The current version requires 'coveralls' which we don't have.
3823 ;; Enable this for the next release which uses 'python-pytest'.
3824 '(#:tests? #f))
3825 (propagated-inputs
3826 `(("python-six" ,python-six)))
3827 (home-page "http://matplotlib.org/cycler/")
3828 (synopsis "Composable keyword argument iterator")
3829 (description
3830 "When using @code{matplotlib} and plotting more than one line, it is
3831common to want to be able to want to be able to cycle over one or more artist
3832styles; but the plotting logic can quickly become involved.
3833To address this and enable easy cycling over arbitrary @code{kwargs}, the
3834@code{Cycler} class was developed.")
3835 (license license:bsd-3)))
3836
3837(define-public python2-cycler
3838 (package-with-python2 python-cycler))
3839
3840(define-public python-colorspacious
3841 (package
3842 (name "python-colorspacious")
53a3ebed 3843 (version "1.1.2")
44d10b1f 3844 (source
dee92e65
TGR
3845 (origin
3846 (method git-fetch)
3847 (uri (git-reference
3848 (url "https://github.com/njsmith/colorspacious.git")
3849 (commit (string-append "v" version))))
3850 (file-name (git-file-name name version))
3851 (sha256
53a3ebed 3852 (base32 "0x7nkphr6g5ql5fvgss8l56rgiyjgh6fm8zzs73i94ci9wzlm63w"))))
44d10b1f
RW
3853 (build-system python-build-system)
3854 (propagated-inputs
3855 `(("python-numpy" ,python-numpy)))
3856 (native-inputs
3857 `(("python-nose" ,python-nose)))
3858 (arguments
3859 `(#:phases
3860 (modify-phases %standard-phases
3861 (replace 'check
3862 (lambda _
c988afda 3863 (invoke "nosetests" "--all-modules" "-v" "colorspacious"))))))
44d10b1f
RW
3864 (home-page "https://github.com/njsmith/colorspacious")
3865 (synopsis "Python library for colorspace conversions")
3866 (description "@code{colorspacious} is a Python library that lets you
3867convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
3868 (license license:expat)))
3869
3870(define-public python2-colorspacious
3871 (package-with-python2 python-colorspacious))
3872
3873(define-public python-matplotlib
3874 (package
3875 (name "python-matplotlib")
9e7cb2f1 3876 (version "3.1.2")
44d10b1f
RW
3877 (source
3878 (origin
3879 (method url-fetch)
3880 (uri (pypi-uri "matplotlib" version))
3881 (sha256
3882 (base32
9e7cb2f1 3883 "1nmshfqh7wyg15i16hx1yiylcvzkws29ivn66n3i0wyqwcpjr3lf"))))
44d10b1f
RW
3884 (build-system python-build-system)
3885 (propagated-inputs ; the following packages are all needed at run time
3886 `(("python-cycler" ,python-cycler)
3887 ("python-kiwisolver" ,python-kiwisolver)
3888 ("python-pyparsing" ,python-pyparsing)
3889 ("python-pygobject" ,python-pygobject)
3890 ("gobject-introspection" ,gobject-introspection)
3891 ("python-tkinter" ,python "tk")
3892 ("python-dateutil" ,python-dateutil)
3893 ("python-numpy" ,python-numpy)
3894 ("python-pillow" ,python-pillow)
3895 ("python-pytz" ,python-pytz)
3896 ("python-six" ,python-six)
44d10b1f
RW
3897 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3898 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3899 ;; object. For this reason we need to import both libraries.
5ea654cf 3900 ;; https://cairocffi.readthedocs.io/en/stable/cffi_api.html#converting-pycairo-wrappers-to-cairocffi
44d10b1f 3901 ("python-pycairo" ,python-pycairo)
44d10b1f
RW
3902 ("python-cairocffi" ,python-cairocffi)))
3903 (inputs
3904 `(("libpng" ,libpng)
3905 ("imagemagick" ,imagemagick)
3906 ("freetype" ,freetype)
3907 ("cairo" ,cairo)
3908 ("glib" ,glib)
3909 ;; FIXME: Add backends when available.
3910 ;("python-wxpython" ,python-wxpython)
3911 ("tcl" ,tcl)
3912 ("tk" ,tk)))
3913 (native-inputs
3914 `(("pkg-config" ,pkg-config)
5ea654cf
RW
3915 ("python-pytest" ,python-pytest)
3916 ("python-mock" ,python-mock)
3917 ("unzip" ,unzip)
3918 ("jquery-ui"
3919 ,(origin
3920 (method url-fetch)
3921 (uri "https://jqueryui.com/resources/download/jquery-ui-1.12.1.zip")
3922 (sha256
3923 (base32
3924 "0kb21xf38diqgxcdi1z3s9ssq36pldvyqxy56hn6pcva6rs3c8zq"))))))
44d10b1f
RW
3925 (arguments
3926 `(#:phases
3927 (modify-phases %standard-phases
5ea654cf
RW
3928 ;; XXX We disable all image comparison tests because we're using a
3929 ;; newer version of FreeType than matplotlib expects. This leads to
3930 ;; minor differences throughout the tests.
3931 (add-after 'unpack 'fix-and-disable-failing-tests
3932 (lambda _
3933 (substitute* (append (find-files "lib/matplotlib/tests/"
3934 "test_.*\\.py$")
3935 (find-files "lib/mpl_toolkits/tests"
3936 "test_.*\\.py$"))
3937 (("^from matplotlib" match)
3938 (string-append "import pytest\n" match))
3939 (("( *)@image_comparison" match indent)
3940 (string-append indent
3941 "@pytest.mark.skip(reason=\"unknown minor image differences\")\n"
3942 match)))
3943 (substitute* "lib/matplotlib/tests/test_animation.py"
3944 (("/bin/sh") (which "sh")))
3945 (for-each delete-file
3946 ;; test_normal_axes, test_get_tightbbox_polar
3947 '("lib/matplotlib/tests/test_axes.py"
9e7cb2f1
RW
3948 ;; We don't use the webagg backend and this test forces it.
3949 "lib/matplotlib/tests/test_backend_webagg.py"
5ea654cf
RW
3950 ;; test_outward_ticks
3951 "lib/matplotlib/tests/test_tightlayout.py"
9e7cb2f1
RW
3952 ;; test_hidden_axes fails with minor extent
3953 ;; differences, possibly due to the use of a
3954 ;; different version of FreeType.
3955 "lib/matplotlib/tests/test_constrainedlayout.py"
5ea654cf
RW
3956 ;; Fontconfig returns no fonts.
3957 "lib/matplotlib/tests/test_font_manager.py"))
3958 #t))
3959 (add-before 'install 'install-jquery-ui
3960 (lambda* (#:key outputs inputs #:allow-other-keys)
3961 (let ((dir (string-append (assoc-ref outputs "out")
3962 "/lib/python3.7/site-packages/matplotlib/backends/web_backend/")))
3963 (mkdir-p dir)
3964 (invoke "unzip"
3965 (assoc-ref inputs "jquery-ui")
3966 "-d" dir))
3967 #t))
c09f598d 3968 (replace 'check
5ea654cf
RW
3969 (lambda* (#:key outputs inputs #:allow-other-keys)
3970 (add-installed-pythonpath inputs outputs)
3971 (invoke "python" "tests.py" "-v"
9e7cb2f1 3972 "-m" "not network and not webagg")))
44d10b1f
RW
3973 (add-before 'build 'configure-environment
3974 (lambda* (#:key outputs inputs #:allow-other-keys)
34c2a16b
RW
3975 (let ((cairo (assoc-ref inputs "cairo")))
3976 ;; Setting this directory in the 'basedirlist' of 'setup.cfg'
44d10b1f 3977 ;; has not effect.
34c2a16b 3978 (setenv "LD_LIBRARY_PATH" (string-append cairo "/lib"))
44d10b1f
RW
3979 (setenv "HOME" (getcwd))
3980 (call-with-output-file "setup.cfg"
3981 (lambda (port)
3982 (format port "[directories]~%
3983basedirlist = ~a,~a~%
5ea654cf
RW
3984[packages]~%
3985tests = True~%"
44d10b1f
RW
3986 (assoc-ref inputs "tcl")
3987 (assoc-ref inputs "tk")))))
3988 #t)))))
339b5828 3989 (home-page "https://matplotlib.org/")
44d10b1f
RW
3990 (synopsis "2D plotting library for Python")
3991 (description
3992 "Matplotlib is a Python 2D plotting library which produces publication
3993quality figures in a variety of hardcopy formats and interactive environments
3994across platforms. Matplotlib can be used in Python scripts, the python and
3995ipython shell, web application servers, and six graphical user interface
3996toolkits.")
3997 (license license:psfl)
3998 (properties `((python2-variant . ,(delay python2-matplotlib))))))
3999
4000(define-public python2-matplotlib
4001 (let ((matplotlib (package-with-python2
4002 (strip-python2-variant python-matplotlib))))
4003 (package (inherit matplotlib)
7380df73 4004 (version "2.2.4")
5ea654cf
RW
4005 (source
4006 (origin
4007 (method url-fetch)
4008 (uri (pypi-uri "matplotlib" version))
4009 (sha256
4010 (base32
7380df73 4011 "09i1gnrra1590brc1f8d5rh2zvnknmfgzp613ab0462qkrwj15h2"))))
5d484f42
EF
4012 (arguments
4013 (substitute-keyword-arguments (package-arguments matplotlib)
4014 ((#:phases phases)
4015 `(modify-phases ,phases
66a3c2db
EF
4016 (replace 'install-jquery-ui
4017 (lambda* (#:key outputs inputs #:allow-other-keys)
4018 (let ((dir (string-append (assoc-ref outputs "out")
4019 "/lib/python2.7/site-packages/"
4020 "matplotlib/backends/web_backend/")))
4021 (mkdir-p dir)
4022 (invoke "unzip"
4023 (assoc-ref inputs "jquery-ui")
4024 "-d" dir))
4025 #t))
38a404d5 4026 (delete 'fix-and-disable-failing-tests)
5d484f42 4027 (delete 'check))))) ; These tests weren't run the the past.
44d10b1f
RW
4028 ;; Make sure to use special packages for Python 2 instead
4029 ;; of those automatically rewritten by package-with-python2.
4030 (propagated-inputs
4031 `(("python2-pycairo" ,python2-pycairo)
4032 ("python2-backports-functools-lru-cache"
4033 ,python2-backports-functools-lru-cache)
4034 ("python2-functools32" ,python2-functools32)
4035 ("python2-pygobject-2" ,python2-pygobject-2)
4036 ("python2-subprocess32" ,python2-subprocess32)
4037 ("python2-tkinter" ,python-2 "tk")
4038 ,@(fold alist-delete (package-propagated-inputs matplotlib)
4039 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
4040
4041(define-public python-matplotlib-documentation
4042 (package
4043 (name "python-matplotlib-documentation")
4044 (version (package-version python-matplotlib))
4045 (source (package-source python-matplotlib))
4046 (build-system python-build-system)
4047 (native-inputs
4048 `(("python-matplotlib" ,python-matplotlib)
4049 ("python-colorspacious" ,python-colorspacious)
4050 ("python-sphinx" ,python-sphinx)
5ad0a452 4051 ("python-sphinx-copybutton" ,python-sphinx-copybutton)
44d10b1f
RW
4052 ("python-sphinx-gallery" ,python-sphinx-gallery)
4053 ("python-numpydoc" ,python-numpydoc)
4054 ("python-ipython" ,python-ipython)
e7a53914 4055 ("python-ipykernel" ,python-ipykernel)
44d10b1f
RW
4056 ("python-mock" ,python-mock)
4057 ("graphviz" ,graphviz)
f75aa97f 4058 ("texlive" ,(texlive-union (list texlive-amsfonts
e7a53914
RW
4059 texlive-latex-amsmath
4060 texlive-latex-enumitem
4061 texlive-latex-expdlist
4062 texlive-latex-geometry
4063 texlive-latex-preview
4064 texlive-latex-type1cm
4065 texlive-latex-ucs
4066
4067 texlive-generic-pdftex
4068
e7a53914
RW
4069 texlive-fonts-ec
4070 texlive-fonts-adobe-times
4071 texlive-fonts-txfonts)))
44d10b1f
RW
4072 ("texinfo" ,texinfo)
4073 ,@(package-native-inputs python-matplotlib)))
4074 (arguments
4075 `(#:tests? #f ; we're only generating documentation
4076 #:phases
4077 (modify-phases %standard-phases
5ea654cf
RW
4078 ;; The tests in python-matplotlib are run after the install phase, so
4079 ;; we need to delete the extra phase here.
4080 (delete 'check)
44d10b1f
RW
4081 (replace 'build
4082 (lambda _
4083 (chdir "doc")
e7a53914
RW
4084 (setenv "PYTHONPATH"
4085 (string-append (getenv "PYTHONPATH")
4086 ":" (getcwd) "/../examples/units"))
44d10b1f 4087 (substitute* "conf.py"
e7a53914
RW
4088 ;; Don't use git.
4089 (("^SHA = check_output.*")
4090 (string-append "SHA = \"" ,version "\"\n"))
4091 ;; Don't fetch intersphinx files from the Internet
4092 (("^explicit_order_folders" m)
4093 (string-append "intersphinx_mapping = {}\n" m))
4094 (("'sphinx.ext.intersphinx',") "")
4095 ;; Disable URL embedding which requires internet access.
4096 (("'https://docs.scipy.org/doc/numpy'") "None")
4097 (("'https://docs.scipy.org/doc/scipy/reference'") "None"))
4098 (invoke "make"
4099 "SPHINXBUILD=sphinx-build"
4100 "SPHINXOPTS=" ; don't abort on warnings
4101 "html" "texinfo")))
44d10b1f
RW
4102 (replace 'install
4103 (lambda* (#:key inputs outputs #:allow-other-keys)
4104 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
4105 (doc (string-append data "/doc/python-matplotlib-" ,version))
4106 (info (string-append data "/info"))
4107 (html (string-append doc "/html")))
4108 (mkdir-p html)
4109 (mkdir-p info)
4110 (copy-recursively "build/html" html)
4111 (symlink (string-append html "/_images")
4112 (string-append info "/matplotlib-figures"))
4113 (with-directory-excursion "build/texinfo"
4114 (substitute* "matplotlib.texi"
4115 (("@image\\{([^,]*)" all file)
4116 (string-append "@image{matplotlib-figures/" file)))
4117 (symlink (string-append html "/_images")
4118 "./matplotlib-figures")
e7a53914
RW
4119 (invoke "makeinfo" "--no-split"
4120 "-o" "matplotlib.info" "matplotlib.texi"))
4121 (install-file "build/texinfo/matplotlib.info" info))
44d10b1f
RW
4122 #t)))))
4123 (home-page (package-home-page python-matplotlib))
4124 (synopsis "Documentation for the python-matplotlib package")
4125 (description (package-description python-matplotlib))
4126 (license (package-license python-matplotlib))))
4127
4128(define-public python2-matplotlib-documentation
5ad0a452
RW
4129 (let ((parent (package-with-python2 python-matplotlib-documentation)))
4130 (package
4131 (inherit parent)
4132 (native-inputs
4133 (alist-delete "python-sphinx-copybutton"
4134 (package-native-inputs parent))))))
44d10b1f 4135
55dae98f
RW
4136(define-public python-matplotlib-venn
4137 (package
4138 (name "python-matplotlib-venn")
4139 (version "0.11.5")
4140 (source
4141 (origin
4142 (method url-fetch)
4143 (uri (pypi-uri "matplotlib-venn" version ".zip"))
4144 (sha256
4145 (base32
4146 "13w3i1wih0mij08hrgppzg0g9z50y54rc28l6gdi1r5w45l7l0dy"))))
4147 (build-system python-build-system)
4148 (arguments '(#:tests? #f)) ; tests are not included
4149 (propagated-inputs
4150 `(("python-matplotlib" ,python-matplotlib)
4151 ("python-numpy" ,python-numpy)
4152 ("python-scipy" ,python-scipy)))
4153 (native-inputs
4154 `(("unzip" ,unzip)))
4155 (home-page "https://github.com/konstantint/matplotlib-venn")
4156 (synopsis "Plot area-proportional Venn diagrams")
4157 (description
4158 "This package provides tools for plotting area-proportional two- and
4159three-way Venn diagrams in @code{matplotlib}.")
4160 (license license:expat)))
4161
44d10b1f
RW
4162(define-public python2-pysnptools
4163 (package
4164 (name "python2-pysnptools")
5d1ade85 4165 (version "0.3.13")
44d10b1f
RW
4166 (source
4167 (origin
4168 (method url-fetch)
5d1ade85 4169 (uri (pypi-uri "pysnptools" version))
44d10b1f
RW
4170 (sha256
4171 (base32
5d1ade85 4172 "0lnis5xsl7bi0hz4f7gbicahzi5zlxkc21nk3g374xv8fb5hb3qm"))))
44d10b1f
RW
4173 (build-system python-build-system)
4174 (arguments
5d1ade85
RW
4175 `(#:python ,python-2 ; only Python 2.7 is supported
4176 #:tests? #f)) ; test files (e.g. examples/toydata.bim) not included
44d10b1f
RW
4177 (propagated-inputs
4178 `(("python2-numpy" ,python2-numpy)
4179 ("python2-scipy" ,python2-scipy)
4180 ("python2-pandas" ,python2-pandas)))
44d10b1f 4181 (native-inputs
5d1ade85 4182 `(("python2-cython" ,python2-cython)))
1b66989b 4183 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
44d10b1f
RW
4184 (synopsis "Library for reading and manipulating genetic data")
4185 (description
4186 "PySnpTools is a library for reading and manipulating genetic data. It
4187can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
4188those files. It can also efficiently manipulate ranges of integers using set
4189operators such as union, intersection, and difference.")
4190 (license license:asl2.0)))
4191
44d10b1f
RW
4192(define-public python-socksipy-branch
4193 (package
4194 (name "python-socksipy-branch")
4195 (version "1.01")
4196 (source
4197 (origin
4198 (method url-fetch)
4199 (uri (pypi-uri "SocksiPy-branch" version))
4200 (sha256
4201 (base32
4202 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
4203 (build-system python-build-system)
4204 (arguments
4205 `(#:tests? #f)) ; There are no tests
4206 (home-page "https://code.google.com/archive/p/socksipy-branch/")
4207 (synopsis "Python SOCKS module")
4208 (description
4209 "SocksiPy - A Python SOCKS client module. It provides a
4210socket-like interface that supports connections to any TCP
4211service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
4212The original version was developed by Dan Haim, this is a
4213branch created by Mario Vilas to address some open issues,
4214as the original project seems to have been abandoned circa 2007.")
4215 (license license:bsd-3)))
4216
4217(define-public python2-socksipy-branch
4218 (package-with-python2 python-socksipy-branch))
4219
6fcceb23
AG
4220(define-public python-socksipychain
4221 (package
4222 (name "python-socksipychain")
d97cdff1 4223 (version "2.1.0")
6fcceb23
AG
4224 (source
4225 (origin
4226 (method git-fetch)
4227 (uri (git-reference
4228 (url "https://github.com/pagekite/PySocksipyChain.git")
4229 (commit (string-append "v" version))))
4230 (file-name (git-file-name name version))
4231 (sha256
4232 (base32
d97cdff1 4233 "0idm9a050rd2kbgbz2sk9ib9589kj4xh1xdnggs6xbq2v2y8f6zn"))))
6fcceb23
AG
4234 (build-system python-build-system)
4235 (arguments
4236 `(#:tests? #f)) ; Tests try to access the network.
4237 (home-page "http://pagekite.net/wiki/Floss/PySocksipyChain/")
4238 (synopsis "Python SOCKS module with chained proxies support")
4239 (description
4240 "SocksiPyChain is a modified version of the SocksiPy SOCKS module, which
4241adds support for arbitrary chaining of proxy servers and various modes of
4242TLS/SSL encryption. It was developed for use in PageKite, and also includes
4243a simple netcat replacement with chaining support.")
4244 (license license:bsd-3)))
4245
44d10b1f
RW
4246(define-public python-pycodestyle
4247 (package
4248 (name "python-pycodestyle")
d16ef28b 4249 (version "2.5.0")
44d10b1f 4250 (source
ba88eea2
RW
4251 (origin
4252 (method url-fetch)
4253 (uri (pypi-uri "pycodestyle" version))
4254 (sha256
4255 (base32
d16ef28b 4256 "0v4prb05n21bm8650v0a01k1nyqjdmkrsm3zycfxh2j5k9n962p4"))))
44d10b1f
RW
4257 (build-system python-build-system)
4258 (home-page "https://pycodestyle.readthedocs.io/")
4259 (synopsis "Python style guide checker")
4260 (description "@code{pycodestyle} (formerly pep8) is a tool to check
4261Python code against some of the style conventions in
4262@url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
4263 (license license:expat)))
4264
4265(define-public python2-pycodestyle
4266 (package-with-python2 python-pycodestyle))
4267
4268(define-public python-multidict
4269 (package
4270 (name "python-multidict")
4271 (version "4.2.0")
4272 (source
4273 (origin
4274 (method url-fetch)
4275 (uri (pypi-uri "multidict" version))
4276 (sha256
4277 (base32
4278 "1vf5bq8hn5a9rvhr5v4fwbmarfsp35hhr8gs74kqfijy34j2f194"))))
4279 (build-system python-build-system)
4280 (native-inputs
4281 `(("python-pytest" ,python-pytest)
4282 ("python-pytest-runner" ,python-pytest-runner)))
4283 (home-page "https://github.com/aio-libs/multidict/")
4284 (synopsis "Multidict implementation")
4285 (description "Multidict is dict-like collection of key-value pairs
4286where key might be occurred more than once in the container.")
4287 (license license:asl2.0)))
4288
4289(define-public python-orderedmultidict
4290 (package
4291 (name "python-orderedmultidict")
4292 (version "0.7.11")
4293 (source
4294 (origin
4295 (method url-fetch)
4296 (uri (pypi-uri "orderedmultidict" version))
4297 (sha256
4298 (base32
4299 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
4300 (build-system python-build-system)
4301 (arguments
4302 `(#:phases
4303 (modify-phases %standard-phases
4304 (add-after 'unpack 'fix-tests
4305 (lambda _
4306 ;; The package uses nosetest for running the tests.
4307 ;; Adding this initfile allows to run the test suite
4308 ;; without requiring nosetest.
d1c4f329
RW
4309 (with-output-to-file "tests/__init__.py" newline)
4310 #t)))))
44d10b1f
RW
4311 (propagated-inputs
4312 `(("python-six" ,python-six)))
4313 (native-inputs
4314 `(("python-pycodestyle" ,python-pycodestyle)))
4315 (home-page "https://github.com/gruns/orderedmultidict")
4316 (synopsis "Python Ordered Multivalue Dictionary - omdict")
4317 (description "This package contains a library for ordered multivalue
4318dictionaries. A multivalue dictionary is a dictionary that can store
4319multiple values for the same key. An ordered multivalue dictionary is a
4320multivalue dictionary that retains the order of insertions and deletions.")
4321 (license license:unlicense)))
4322
4323(define-public python2-orderedmultidict
4324 (package-with-python2 python-orderedmultidict))
4325
4326(define-public python-autopep8
4327 (package
4328 (name "python-autopep8")
4329 (version "1.3.5")
4330 (source
4331 (origin
4332 (method url-fetch)
4333 (uri (pypi-uri "autopep8" version))
4334 (sha256
4335 (base32
4336 "192bvhzi4d0claqxgzymvv7k3qnj627742bc8sgxpzjj42pd9112"))))
4337 (build-system python-build-system)
4338 (propagated-inputs
4339 `(("python-pycodestyle" ,python-pycodestyle)))
4340 (home-page "https://github.com/hhatto/autopep8")
4341 (synopsis "Format Python code according to the PEP 8 style guide")
4342 (description
4343 "@code{autopep8} automatically formats Python code to conform to
4344the PEP 8 style guide. It uses the pycodestyle utility to determine
4345what parts of the code needs to be formatted. @code{autopep8} is
4346capable of fixing most of the formatting issues that can be reported
4347by pycodestyle.")
4348 (license (license:non-copyleft
4349 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
4350
4351(define-public python2-autopep8
4352 (package-with-python2 python-autopep8))
4353
4354(define-public python-distutils-extra
4355 (package
4356 (name "python-distutils-extra")
4357 (version "2.38")
4358 (source
4359 (origin
4360 (method url-fetch)
4361 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4362 version "/+download/python-distutils-extra-"
4363 version ".tar.gz"))
4364 (sha256
4365 (base32
4366 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4367 (build-system python-build-system)
4368 (home-page "https://launchpad.net/python-distutils-extra/")
4369 (synopsis "Enhancements to Python's distutils")
4370 (description
4371 "The python-distutils-extra module enables you to easily integrate
4372gettext support, themed icons, and scrollkeeper-based documentation into
4373Python's distutils.")
4374 (license license:gpl2)))
4375
4376(define-public python2-distutils-extra
4377 (package-with-python2 python-distutils-extra))
4378
4379(define-public python2-elib.intl
4380 (package
4381 (name "python2-elib.intl")
4382 (version "0.0.3")
4383 (source
4384 (origin
4385 ;; This project doesn't tag releases or publish tarballs, so we take
4386 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4387 (method git-fetch)
4388 (uri (git-reference
4389 (url "https://github.com/dieterv/elib.intl.git")
4390 (commit "d09997cfef")))
4391 (file-name (string-append name "-" version "-checkout"))
4392 (sha256
4393 (base32
4394 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4395 (build-system python-build-system)
4396 (arguments
4397 ;; incompatible with Python 3 (exception syntax)
4398 `(#:python ,python-2
4399 #:tests? #f))
4400 (home-page "https://github.com/dieterv/elib.intl")
4401 (synopsis "Enhanced internationalization for Python")
4402 (description
4403 "The elib.intl module provides enhanced internationalization (I18N)
4404services for your Python modules and applications.")
4405 (license license:lgpl3+)))
4406
4407(define-public python-olefile
4408 (package
4409 (name "python-olefile")
5bef0f10 4410 (version "0.46")
44d10b1f
RW
4411 (source
4412 (origin
4413 (method url-fetch)
5bef0f10
MB
4414 (uri (string-append "https://github.com/decalage2/olefile/releases/"
4415 "download/v" version "/olefile-" version ".tar.gz"))
44d10b1f
RW
4416 (file-name (string-append name "-" version ".tar.gz"))
4417 (sha256
4418 (base32
5bef0f10 4419 "1kjxh4gr651hpqkjfv89cfzr40hyvf3vjlda7mifiail83j7j07m"))))
44d10b1f 4420 (build-system python-build-system)
5bef0f10 4421 (home-page "https://www.decalage.info/python/olefileio")
44d10b1f
RW
4422 (synopsis "Read and write Microsoft OLE2 files.")
4423 (description
4424 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
4425Storage or Compound Document, Microsoft Office). It is an improved version of
4426the OleFileIO module from PIL, the Python Image Library.")
4427 (license license:bsd-3)))
4428
4429(define-public python2-olefile
4430 (package-with-python2 python-olefile))
4431
4432(define-public python-pillow
4433 (package
4434 (name "python-pillow")
5fbdd917 4435 (version "6.2.1")
44d10b1f
RW
4436 (source
4437 (origin
4438 (method url-fetch)
4439 (uri (pypi-uri "Pillow" version))
4440 (sha256
4441 (base32
5fbdd917 4442 "1c8wkzc58f5wdh006jvmwdk3wxld1xgagcbdvj7iv17qi0m9fkmz"))))
44d10b1f
RW
4443 (build-system python-build-system)
4444 (native-inputs
4445 `(("python-pytest" ,python-pytest)))
4446 (inputs
4447 `(("freetype" ,freetype)
4448 ("lcms" ,lcms)
44d10b1f 4449 ("libjpeg" ,libjpeg)
44d10b1f 4450 ("libtiff" ,libtiff)
0c4e1c5f
EF
4451 ("libwebp" ,libwebp)
4452 ("openjpeg" ,openjpeg)
4453 ("zlib" ,zlib)))
44d10b1f
RW
4454 (propagated-inputs
4455 `(("python-olefile" ,python-olefile)))
4456 (arguments
4457 `(#:phases
4458 (modify-phases %standard-phases
4459 (add-after 'unpack 'patch-ldconfig
4460 (lambda _
4461 (substitute* "setup.py"
4462 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
61b77ff3 4463 (replace 'check
979d8464
EF
4464 (lambda* (#:key outputs inputs tests? #:allow-other-keys)
4465 (if tests?
4466 (begin
4467 (setenv "HOME" (getcwd))
4468 ;; Make installed package available for running the tests.
4469 (add-installed-pythonpath inputs outputs)
4470 (invoke "python" "selftest.py" "--installed")
4471 (invoke "python" "-m" "pytest" "-vv"))
4472 #t))))))
44d10b1f
RW
4473 (home-page "https://python-pillow.org")
4474 (synopsis "Fork of the Python Imaging Library")
4475 (description
4476 "The Python Imaging Library adds image processing capabilities to your
4477Python interpreter. This library provides extensive file format support, an
4478efficient internal representation, and fairly powerful image processing
4479capabilities. The core image library is designed for fast access to data
4480stored in a few basic pixel formats. It should provide a solid foundation for
4481a general image processing tool.")
4482 (license (license:x11-style
4483 "http://www.pythonware.com/products/pil/license.htm"
4484 "The PIL Software License"))))
4485
4486(define-public python2-pillow
4487 (package-with-python2 python-pillow))
4488
4489(define-public python-pycparser
4490 (package
4491 (name "python-pycparser")
c6c0940e 4492 (version "2.19")
44d10b1f
RW
4493 (source
4494 (origin
4495 (method url-fetch)
4496 (uri (pypi-uri "pycparser" version))
4497 (sha256
4498 (base32
c6c0940e 4499 "1cr5dcj9628lkz1qlwq3fv97c25363qppkmcayqvd05dpy573259"))))
44d10b1f
RW
4500 (outputs '("out" "doc"))
4501 (build-system python-build-system)
4502 (native-inputs
4503 `(("pkg-config" ,pkg-config)))
4504 (arguments
4505 `(#:phases
4506 (modify-phases %standard-phases
4507 (replace 'check
4508 (lambda _
4509 (with-directory-excursion "tests"
acb75c03
RW
4510 (invoke "python" "all_tests.py"))
4511 #t))
44d10b1f
RW
4512 (add-after 'install 'install-doc
4513 (lambda* (#:key outputs #:allow-other-keys)
4514 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4515 (doc (string-append data "/doc/" ,name "-" ,version))
4516 (examples (string-append doc "/examples")))
4517 (mkdir-p examples)
4518 (for-each (lambda (file)
4519 (copy-file (string-append "." file)
4520 (string-append doc file)))
4521 '("/README.rst" "/CHANGES" "/LICENSE"))
c6c0940e
MB
4522 (copy-recursively "examples" examples)
4523 #t))))))
44d10b1f
RW
4524 (home-page "https://github.com/eliben/pycparser")
4525 (synopsis "C parser in Python")
4526 (description
4527 "Pycparser is a complete parser of the C language, written in pure Python
4528using the PLY parsing library. It parses C code into an AST and can serve as
4529a front-end for C compilers or analysis tools.")
4530 (license license:bsd-3)))
4531
4532(define-public python2-pycparser
4533 (package-with-python2 python-pycparser))
4534
4535(define-public python-pywavelets
4536 (package
4537 (name "python-pywavelets")
4538 (version "1.0.1")
4539 (home-page "https://github.com/PyWavelets/pywt")
4540 (source (origin
4541 (method url-fetch)
4542 (uri (pypi-uri "PyWavelets" version))
4543 (sha256
4544 (base32
4545 "1p3qv2v66ghnqrb1f98wyyhp9dz71jwcd6kfpsax65sfdpiyqp1w"))))
4546 (build-system python-build-system)
4547 (arguments
4548 '(#:modules ((ice-9 ftw)
4549 (srfi srfi-1)
4550 (srfi srfi-26)
4551 (guix build utils)
4552 (guix build python-build-system))
4553 #:phases (modify-phases %standard-phases
4554 (replace 'check
4555 (lambda _
4556 (let ((cwd (getcwd))
4557 (libdir (find (cut string-prefix? "lib." <>)
4558 (scandir "build"))))
4559 (with-directory-excursion (string-append cwd "/build/" libdir)
4560 (invoke "nosetests" "-v" "."))))))))
4561 (native-inputs
4562 `(("python-matplotlib" ,python-matplotlib) ;for tests
4563 ("python-nose" ,python-nose)))
4564 (propagated-inputs
4565 `(("python-numpy" ,python-numpy)))
4566 (synopsis "Wavelet transforms in Python")
4567 (description
4568 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
4569mathematical basis functions that are localized in both time and frequency.
4570Wavelet transforms are time-frequency transforms employing wavelets. They are
4571similar to Fourier transforms, the difference being that Fourier transforms are
4572localized only in frequency instead of in time and frequency.")
4573 (license license:expat)))
4574
4575(define-public python2-pywavelets
4576 (package-with-python2 python-pywavelets))
4577
4578(define-public python-xcffib
4579 (package
4580 (name "python-xcffib")
4581 (version "0.6.0")
4582 (source
4583 (origin
4584 (method url-fetch)
4585 (uri (pypi-uri "xcffib" version))
4586 (sha256
4587 (base32
4588 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
4589 (build-system python-build-system)
4590 (inputs
4591 `(("libxcb" ,libxcb)))
4592 (propagated-inputs
4593 `(("python-cffi" ,python-cffi) ; used at run time
4594 ("python-six" ,python-six)))
4595 (arguments
4596 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
4597 #:tests? #f
4598 #:phases
4599 (modify-phases %standard-phases
4600 (add-after 'unpack 'fix-libxcb-path
4601 (lambda* (#:key inputs #:allow-other-keys)
4602 (let ((libxcb (assoc-ref inputs "libxcb")))
4603 (substitute* '("xcffib/__init__.py")
4604 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
4605 #t)))
4606 (add-after 'install 'install-doc
4607 (lambda* (#:key outputs #:allow-other-keys)
4608 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4609 "/doc/" ,name "-" ,version)))
4610 (mkdir-p doc)
4611 (copy-file "README.md"
4612 (string-append doc "/README.md"))
4613 #t))))))
4614 (home-page "https://github.com/tych0/xcffib")
4615 (synopsis "XCB Python bindings")
4616 (description
4617 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4618support for Python 3 and PyPy. It is based on cffi.")
4619 (license license:expat)))
4620
4621(define-public python2-xcffib
4622 (package-with-python2 python-xcffib))
4623
4624(define-public python-cairocffi
4625 (package
4626 (name "python-cairocffi")
4627 (version "0.9.0")
4628 (source
4629 (origin
4630 (method url-fetch)
4631 (uri (pypi-uri "cairocffi" version))
4632 (sha256
4633 (base32
4634 "0dq3k4zhqd8cwsf3nyjqvjqm8wkvrjn1wjf44rl3v0h8kqx6qf0m"))
4635 (patches (search-patches "python-cairocffi-dlopen-path.patch"))))
4636 (build-system python-build-system)
4637 (outputs '("out" "doc"))
4638 (inputs
4639 `(("glib" ,glib)
4640 ("gtk+" ,gtk+)
4641 ("gdk-pixbuf" ,gdk-pixbuf)
4642 ("cairo" ,cairo)
4643 ("pango" ,pango)))
4644 (native-inputs
4645 `(("pkg-config" ,pkg-config)
4646 ("python-pytest" ,python-pytest)
4647 ("python-pytest-cov" ,python-pytest-cov)
4648 ("python-pytest-runner" ,python-pytest-runner)
4649 ("python-sphinx" ,python-sphinx)
4650 ("python-docutils" ,python-docutils)))
4651 (propagated-inputs
4652 `(("python-xcffib" ,python-xcffib))) ; used at run time
4653 (arguments
4654 `(#:phases
4655 (modify-phases %standard-phases
4656 (add-after 'unpack 'patch-paths
4657 (lambda* (#:key inputs outputs #:allow-other-keys)
4658 (substitute* (find-files "." "\\.py$")
4659 (("dlopen\\(ffi, 'cairo'")
4660 (string-append "dlopen(ffi, '" (assoc-ref inputs "cairo")
4661 "/lib/libcairo.so.2'"))
4662 (("dlopen\\(ffi, 'gdk-3'")
4663 (string-append "dlopen(ffi, '" (assoc-ref inputs "gtk+")
4664 "/lib/libgtk-3.so.0'"))
4665 (("dlopen\\(ffi, 'gdk_pixbuf-2.0'")
4666 (string-append "dlopen(ffi, '" (assoc-ref inputs "gdk-pixbuf")
4667 "/lib/libgdk_pixbuf-2.0.so.0'"))
4668 (("dlopen\\(ffi, 'glib-2.0'")
4669 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4670 "/lib/libglib-2.0.so.0'"))
4671 (("dlopen\\(ffi, 'gobject-2.0'")
4672 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4673 "/lib/libgobject-2.0.so.0'"))
4674 (("dlopen\\(ffi, 'pangocairo-1.0'")
4675 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4676 "/lib/libpangocairo-1.0.so.0'"))
4677 (("dlopen\\(ffi, 'pango-1.0'")
4678 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4679 "/lib/libpango-1.0.so.0'")))
4680 #t))
4681 (add-after 'install 'install-doc
4682 (lambda* (#:key inputs outputs #:allow-other-keys)
4683 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4684 (doc (string-append data "/doc/" ,name "-" ,version))
4685 (html (string-append doc "/html")))
4686 (setenv "LD_LIBRARY_PATH"
4687 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4688 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4689 (setenv "LANG" "en_US.UTF-8")
4690 (mkdir-p html)
4691 (for-each (lambda (file)
4692 (copy-file (string-append "." file)
4693 (string-append doc file)))
4694 '("/README.rst" "/CHANGES" "/LICENSE"))
4695 (system* "python" "setup.py" "build_sphinx")
4696 (copy-recursively "docs/_build/html" html)
4697 #t))))))
4698 (home-page "https://github.com/Kozea/cairocffi")
4699 (synopsis "Python bindings and object-oriented API for Cairo")
4700 (description
4701 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4702Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4703graphics library with support for multiple backends including image buffers,
4704PNG, PostScript, PDF, and SVG file output.")
4705 (license license:bsd-3)))
4706
4707(define-public python2-cairocffi
4708 (package-with-python2 python-cairocffi))
4709
4710(define-public python-decorator
4711 (package
4712 (name "python-decorator")
4713 (version "4.3.0")
4714 (source
4715 (origin
4716 (method url-fetch)
4717 (uri (pypi-uri "decorator" version))
4718 (sha256
4719 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
4720 (build-system python-build-system)
4721 (home-page "https://pypi.python.org/pypi/decorator/")
4722 (synopsis "Python module to simplify usage of decorators")
4723 (description
4724 "The aim of the decorator module is to simplify the usage of decorators
4725for the average programmer, and to popularize decorators usage giving examples
4726of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4727etc. The core of this module is a decorator factory.")
4728 (license license:expat)))
4729
4730(define-public python2-decorator
4731 (package-with-python2 python-decorator))
4732
4733(define-public python-drmaa
4734 (package
4735 (name "python-drmaa")
4736 (version "0.7.7")
4737 (source
4738 (origin
4739 (method url-fetch)
4740 (uri (pypi-uri "drmaa" version))
4741 (sha256
4742 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
4743 (build-system python-build-system)
4744 ;; The test suite requires libdrmaa which is provided by the cluster
4745 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4746 ;; should be set to the path of the libdrmaa library.
4747 (arguments '(#:tests? #f))
4748 (native-inputs
4749 `(("python-nose" ,python-nose)))
4750 (home-page "https://pypi.python.org/pypi/drmaa")
4751 (synopsis "Python bindings for the DRMAA library")
4752 (description
4753 "A Python package for Distributed Resource Management (DRM) job
4754submission and control. This package is an implementation of the DRMAA 1.0
4755Python language binding specification.")
4756 (license license:bsd-3)))
4757
4758(define-public python2-drmaa
4759 (package-with-python2 python-drmaa))
4760
4761(define-public python-grako
4762 (package
4763 (name "python-grako")
4764 (version "3.99.9")
4765 (source
4766 (origin
4767 (method url-fetch)
4768 (uri
4769 (pypi-uri "grako" version ".zip"))
4770 (sha256
4771 (base32
4772 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
4773 (build-system python-build-system)
4774 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
4775 (native-inputs
4776 `(("unzip" ,unzip)
4777 ("python-pytest" ,python-pytest)
4778 ("python-pytest-runner" ,python-pytest-runner)))
4779 (home-page "https://bitbucket.org/neogeny/grako")
4780 (synopsis "EBNF parser generator")
4781 (description
4782 "Grako takes a grammar in a variation of EBNF as input, and outputs a
4783memoizing PEG/Packrat parser in Python.")
4784 (license license:bsd-3)))
4785
4786(define-public python2-grako
4787 (package-with-python2 python-grako))
4788
4789(define-public python-gridmap
4790 (package
4791 (name "python-gridmap")
4792 (version "0.13.0")
4793 (source
4794 (origin
768fea0f
TGR
4795 (method git-fetch)
4796 (uri (git-reference
4797 (url "https://github.com/pygridtools/gridmap.git")
4798 (commit (string-append "v" version))))
4799 (file-name (git-file-name name version))
44d10b1f 4800 (sha256
768fea0f 4801 (base32 "1478lbwsr1w24cii2x01m2910fvh8r43ghnb78nc972a96hqiknm"))))
44d10b1f
RW
4802 (build-system python-build-system)
4803 (arguments
4804 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
4805 (propagated-inputs
4806 `(("python-psutil" ,python-psutil)
4807 ("python-drmaa" ,python-drmaa)
4808 ("python-pyzmq" ,python-pyzmq)))
4809 (home-page "https://github.com/pygridtools/gridmap")
4810 (synopsis "Create jobs on a cluster directly from Python")
4811 (description
4812 "Gridmap is a Python package to allow you to easily create jobs on the
4813cluster directly from Python. You can directly map Python functions onto the
4814cluster without needing to write any wrapper code yourself.")
4815 (license license:gpl3+)))
4816
4817(define-public python2-gridmap
4818 (package-with-python2 python-gridmap))
4819
4820(define-public python-honcho
4821 (package
4822 (name "python-honcho")
4823 (version "1.0.1")
4824 (source
4825 (origin
8524d130
TGR
4826 (method git-fetch)
4827 (uri (git-reference
4828 (url "https://github.com/nickstenning/honcho.git")
4829 (commit (string-append "v" version))))
4830 (file-name (git-file-name name version))
44d10b1f 4831 (sha256
8524d130 4832 (base32 "11bd87474qpif20xdcn0ra1idj5k16ka51i658wfpxwc6nzsn92b"))))
44d10b1f
RW
4833 (build-system python-build-system)
4834 (native-inputs
4835 `(("python-pytest" ,python-pytest)
4836 ("python-mock" ,python-mock)
4837 ("python-tox" ,python-tox)
4838 ("which" ,which))) ;for tests
4839 (propagated-inputs
4840 `(("python-jinja2" ,python-jinja2)))
4841 (arguments
4842 `(#:phases
4843 (modify-phases %standard-phases
4844 (delete 'check)
4845 (add-after 'install 'check
4846 (lambda* (#:key outputs inputs #:allow-other-keys)
4847 ;; fix honcho path in testsuite
4848 (substitute* "tests/conftest.py"
4849 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
4850 "/bin/honcho" "'")))
4851 ;; It's easier to run tests after install.
4852 ;; Make installed package available for running the tests
4853 (add-installed-pythonpath inputs outputs)
95b707fb 4854 (invoke "py.test" "-v"))))))
44d10b1f
RW
4855 (home-page "https://github.com/nickstenning/honcho")
4856 (synopsis "Manage Procfile-based applications")
4857 (description
4858 "A Procfile is a file which describes how to run an application
50fceab0 4859consisting of several processes. honcho starts all listed processes.
44d10b1f
RW
4860The output of all running processes is collected by honcho and
4861displayed.")
4862 (license license:expat)))
4863
4864(define-public python2-honcho
4865 (package-with-python2 python-honcho))
4866
4867(define-public python-pexpect
4868 (package
4869 (name "python-pexpect")
4870 (version "4.6.0")
4871 (source
4872 (origin
4873 (method url-fetch)
4874 (uri (pypi-uri "pexpect" version))
4875 (sha256
4876 (base32 "1fla85g47iaxxpjhp9vkxdnv4pgc7rplfy6ja491smrrk0jqi3ia"))))
4877 (build-system python-build-system)
4878 (arguments
4879 `(#:phases
4880 (modify-phases %standard-phases
4881 (add-before 'check 'prepare-tests
4882 (lambda _
4883 (substitute* (find-files "tests")
4884 (("/bin/ls") (which "ls"))
4885 (("/bin/echo") (which "echo"))
4886 (("/bin/which") (which "which"))
4887 ;; Many tests try to use the /bin directory which
4888 ;; is not present in the build environment.
4889 ;; Use one that's non-empty and unlikely to change.
4890 (("/bin'") "/dev'"))
4891 ;; XXX: Socket connection test gets "Connection reset by peer".
4892 ;; Why does it not work? Delete for now.
4893 (delete-file "tests/test_socket.py")
4894 #t))
4895 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
4896 (native-inputs
4897 `(("python-nose" ,python-nose)
4898 ("python-pytest" ,python-pytest)
4899 ("man-db" ,man-db)
4900 ("which" ,which)
4901 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
4902 (propagated-inputs
4903 `(("python-ptyprocess" ,python-ptyprocess)))
4904 (home-page "http://pexpect.readthedocs.org/")
4905 (synopsis "Controlling interactive console applications")
4906 (description
4907 "Pexpect is a pure Python module for spawning child applications;
4908controlling them; and responding to expected patterns in their output.
4909Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4910child application and control it as if a human were typing commands.")
4911 (license license:isc)))
4912
4913(define-public python2-pexpect
4914 (package-with-python2 python-pexpect))
4915
4916(define-public python-setuptools-scm
4917 (package
4918 (name "python-setuptools-scm")
85092643 4919 (version "3.2.0")
44d10b1f
RW
4920 (source (origin
4921 (method url-fetch)
4922 (uri (pypi-uri "setuptools_scm" version))
4923 (sha256
4924 (base32
85092643 4925 "0n3knn3p1sqlx31k2lahn7z9bacvlv8nhlfidj77vz50bxqlgasj"))))
44d10b1f
RW
4926 (build-system python-build-system)
4927 (home-page "https://github.com/pypa/setuptools_scm/")
4928 (synopsis "Manage Python package versions in SCM metadata")
4929 (description
4930 "Setuptools_scm handles managing your Python package versions in
4931@dfn{software configuration management} (SCM) metadata instead of declaring
4932them as the version argument or in a SCM managed file.")
4933 (license license:expat)))
4934
a0b2accf
MO
4935;; Needed by python-lazy-object-proxy, remove on next update cycle.
4936(define-public python-setuptools-scm-3.3
4937 (package
4938 (inherit python-setuptools-scm)
4939 (version "3.3.3")
4940 (source (origin
4941 (method url-fetch)
4942 (uri (pypi-uri "setuptools_scm" version))
4943 (sha256
4944 (base32
4945 "19cyndx23xmpbhz4qrwmfwsmnnaczd0dw7qg977ksq2dbvxy29dx"))))))
4946
44d10b1f
RW
4947(define-public python2-setuptools-scm
4948 (package-with-python2 python-setuptools-scm))
4949
bb74ea09
RW
4950(define-public python-pathlib2
4951 (package
4952 (name "python-pathlib2")
4953 (version "2.3.3")
4954 (source
4955 (origin
4956 (method url-fetch)
4957 (uri (pypi-uri "pathlib2" version))
4958 (sha256
4959 (base32
4960 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
4961 (build-system python-build-system)
4962 (propagated-inputs
4963 `(("python-scandir" ,python-scandir)
4964 ("python-six" ,python-six)))
4965 (home-page "https://pypi.python.org/pypi/pathlib2/")
746d3384 4966 (synopsis "Object-oriented file system paths")
bb74ea09
RW
4967 (description "The goal of pathlib2 is to provide a backport of the
4968standard @code{pathlib} module which tracks the standard library module, so
4969all the newest features of the standard @code{pathlib} can be used also on
4970older Python versions.")
4971 (license license:expat)))
4972
15b65617
RW
4973(define-public python-importlib-metadata
4974 (package
4975 (name "python-importlib-metadata")
0af697d9 4976 (version "0.23")
15b65617
RW
4977 (source
4978 (origin
4979 (method url-fetch)
4980 (uri (pypi-uri "importlib_metadata" version))
4981 (sha256
0af697d9 4982 (base32 "09mdqdfv5rdrwz80jh9m379gxmvk2vhjfz0fg53hid00icvxf65a"))))
15b65617
RW
4983 (build-system python-build-system)
4984 (propagated-inputs
4985 `(("python-configparser" ,python-configparser)
4986 ("python-contextlib2" ,python-contextlib2)
4987 ("python-docutils" ,python-docutils)
4988 ("python-pathlib2" ,python-pathlib2)
4989 ("python-rst.linker" ,python-rst.linker)
4990 ("python-zipp" ,python-zipp)))
4991 (native-inputs
4992 `(("python-setuptools-scm" ,python-setuptools-scm)
4993 ("python-sphinx" ,python-sphinx)))
4994 (home-page "https://importlib-metadata.readthedocs.io/")
4995 (synopsis "Read metadata from Python packages")
4996 (description
4997 "@code{importlib_metadata} is a library which provides an API for
4998accessing an installed Python package's metadata, such as its entry points or
4999its top-level name. This functionality intends to replace most uses of
5000@code{pkg_resources} entry point API and metadata API. Along with
5001@code{importlib.resources} in Python 3.7 and newer, this can eliminate the
5002need to use the older and less efficient @code{pkg_resources} package.")
5003 (license license:asl2.0)))
5004
37c173d1
RW
5005(define-public python-jaraco-packaging
5006 (package
5007 (name "python-jaraco-packaging")
5008 (version "6.1")
5009 (source
5010 (origin
5011 (method url-fetch)
5012 (uri (pypi-uri "jaraco.packaging" version))
5013 (sha256
5014 (base32
5015 "0zimrnkh33b9g8ffw11mjh6kvs54cy5gcjw1h5cl1r7dc833dmkm"))))
5016 (build-system python-build-system)
5017 (propagated-inputs
5018 `(("python-pytest" ,python-pytest)
5019 ("python-pytest-checkdocs" ,python-pytest-checkdocs)
5020 ("python-pytest-flake8" ,python-pytest-flake8)
5021 ("python-rst.linker" ,python-rst.linker)
5022 ("python-setuptools" ,python-setuptools)
5023 ("python-setuptools-scm" ,python-setuptools-scm)
5024 ("python-six" ,python-six)
5025 ("python-sphinx" ,python-sphinx)))
5026 (home-page "https://github.com/jaraco/jaraco.packaging")
5027 (synopsis "Tools to supplement packaging Python releases")
5028 (description
5029 "This package provides various tools to supplement packaging Python
5030releases.")
5031 (license license:expat)))
5032
44d10b1f
RW
5033(define-public python-pathpy
5034 (package
5035 (name "python-pathpy")
a3dd8871 5036 (version "11.5.1")
44d10b1f
RW
5037 (source
5038 (origin
5039 (method url-fetch)
5040 (uri (pypi-uri "path.py" version))
5041 (sha256
a3dd8871 5042 (base32 "0ir9j1haq2jbi7aip6k2fa9l7q1l03k4hp1awxhjhcwzsnwp3ll8"))))
49ad11e9 5043 (outputs '("out" "doc"))
44d10b1f
RW
5044 (build-system python-build-system)
5045 (propagated-inputs
01a53e0b
MC
5046 `(("python-appdirs" ,python-appdirs)
5047 ("python-importlib-metadata" ,python-importlib-metadata)))
44d10b1f
RW
5048 (native-inputs
5049 `(("python-setuptools-scm" ,python-setuptools-scm)
5050 ("python-sphinx" ,python-sphinx)
5051 ("python-rst.linker" ,python-rst.linker)
5052 ("python-pytest" ,python-pytest)
49ad11e9
RW
5053 ("python-pytest-runner" ,python-pytest-runner)
5054 ("python-jaraco-packaging" ,python-jaraco-packaging)))
44d10b1f 5055 (arguments
49ad11e9
RW
5056 `(#:phases
5057 (modify-phases %standard-phases
5058 (add-after 'build 'build-doc
5059 (lambda _
5060 (setenv "LANG" "en_US.UTF-8")
5061 (invoke "python" "setup.py" "build_sphinx")))
5062 (add-after 'install 'install-doc
5063 (lambda* (#:key outputs #:allow-other-keys)
5064 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5065 (doc (string-append data "/doc/" ,name "-" ,version))
5066 (html (string-append doc "/html")))
5067 (mkdir-p html)
5068 (for-each (lambda (file)
5069 (copy-file file (string-append doc "/" file)))
5070 '("README.rst" "CHANGES.rst"))
5071 (copy-recursively "build/sphinx/html" html)
5072 #t)))
5073 (replace 'check
5074 (lambda _
5075 ;; The import time test aborts if an import takes longer than
5076 ;; 100ms. It may very well take a little longer than that.
5077 (invoke "pytest" "-v" "-k" "not test_import_time"))))))
44d10b1f
RW
5078 (home-page "https://github.com/jaraco/path.py")
5079 (synopsis "Python module wrapper for built-in os.path")
5080 (description
5081 "@code{path.py} implements path objects as first-class entities, allowing
5082common operations on files to be invoked on those path objects directly.")
5083 (license license:expat)))
5084
5085(define-public python2-pathpy
5086 (package-with-python2 python-pathpy))
5087
5088(define-public python-simplegeneric
5089 (package
5090 (name "python-simplegeneric")
5091 (version "0.8.1")
5092 (source
5093 (origin
5094 (method url-fetch)
6c8c3980 5095 (uri (pypi-uri "simplegeneric" version ".zip"))
44d10b1f
RW
5096 (sha256
5097 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
5098 (build-system python-build-system)
5099 (native-inputs
5100 `(("unzip" ,unzip)))
5101 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
5102 (synopsis "Python module for simple generic functions")
5103 (description
5104 "The simplegeneric module lets you define simple single-dispatch generic
5105functions, akin to Python’s built-in generic functions like @code{len()},
5106@code{iter()} and so on. However, instead of using specially-named methods,
5107these generic functions use simple lookup tables, akin to those used by
5108e.g. @code{pickle.dump()} and other generic functions found in the Python
5109standard library.")
5110 (license license:zpl2.1)))
5111
5112(define-public python2-simplegeneric
5113 (package-with-python2 python-simplegeneric))
5114
5115(define-public python-ipython-genutils
5116 ;; TODO: This package is retired, check if can be removed, see description.
5117 (package
5118 (name "python-ipython-genutils")
5119 (version "0.1.0")
5120 (source
5121 (origin
5122 (method url-fetch)
c9671d4b 5123 (uri (pypi-uri "ipython_genutils" version))
44d10b1f
RW
5124 (sha256
5125 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
5126 (build-system python-build-system)
5127 (arguments `(#:tests? #f)) ; no tests
5128 (home-page "https://ipython.org")
5129 (synopsis "Vestigial utilities from IPython")
5130 (description
5131 "This package provides retired utilities from IPython. No packages
5132outside IPython/Jupyter should depend on it.
5133
5134This package shouldn't exist. It contains some common utilities shared by
5135Jupyter and IPython projects during The Big Split. As soon as possible, those
5136packages will remove their dependency on this, and this package will go
5137away.")
5138 (license license:bsd-3)))
5139
5140(define-public python2-ipython-genutils
5141 (package-with-python2 python-ipython-genutils))
5142
5143(define-public python-traitlets
5144 (package
5145 (name "python-traitlets")
ac5e205a 5146 (version "4.3.3")
44d10b1f
RW
5147 (source
5148 (origin
5149 (method url-fetch)
5150 (uri (pypi-uri "traitlets" version))
5151 (sha256
5152 (base32
ac5e205a 5153 "1xsrwgivpkxlbr4dfndfsi098s29yqgswgjc1qqn69yxklvfw8yh"))))
44d10b1f
RW
5154 (build-system python-build-system)
5155 (arguments
5156 `(#:phases
5157 (modify-phases %standard-phases
5158 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
5159 (propagated-inputs
5160 `(("python-ipython-genutils" ,python-ipython-genutils)
ac5e205a 5161 ("python-decorator" ,python-decorator)))
44d10b1f
RW
5162 (native-inputs
5163 `(("python-pytest" ,python-pytest)))
5164 (properties `((python2-variant . ,(delay python2-traitlets))))
5165 (home-page "https://ipython.org")
5166 (synopsis "Configuration system for Python applications")
5167 (description
5168 "Traitlets is a framework that lets Python classes have attributes with
5169type checking, dynamically calculated default values, and ‘on change’
5170callbacks. The package also includes a mechanism to use traitlets for
5171configuration, loading values from files or from command line arguments. This
5172is a distinct layer on top of traitlets, so you can use traitlets in your code
5173without using the configuration machinery.")
5174 (license license:bsd-3)))
5175
5176(define-public python2-traitlets
5177 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
5178 (package
5179 (inherit traitlets)
5180 (propagated-inputs
5181 `(("python2-enum34" ,python2-enum34)
5182 ,@(package-propagated-inputs traitlets))))))
5183
5184(define-public python-jupyter-core
5185 (package
5186 (name "python-jupyter-core")
5187 (version "4.4.0")
5188 (source
5189 (origin
5190 (method url-fetch)
5191 (uri (string-append (pypi-uri "jupyter_core" version)))
5192 (sha256
5193 (base32
5194 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
5195 (build-system python-build-system)
5196 ;; FIXME: not sure how to run the tests
5197 (arguments `(#:tests? #f))
5198 (propagated-inputs
5199 `(("python-traitlets" ,python-traitlets)))
5200 (home-page "http://jupyter.org/")
5201 (synopsis "Jupyter base package")
5202 (description
5203 "Jupyter core is the base package on which Jupyter projects rely.")
5204 (license license:bsd-3)))
5205
5206(define-public python2-jupyter-core
5207 (package-with-python2 python-jupyter-core))
5208
5209(define-public python-jupyter-client
5210 (package
5211 (name "python-jupyter-client")
5212 (version "5.2.4")
5213 (source
5214 (origin
5215 (method url-fetch)
5216 (uri (pypi-uri "jupyter_client" version))
5217 (sha256
5218 (base32
5219 "0l9mh7ccrpl3lppym3dnky8n1nk7xarzzdcxf4q2s7aw203cpydm"))))
5220 (build-system python-build-system)
5221 ;; Tests fail because of missing native python kernel which I assume is
5222 ;; provided by the ipython package, which we cannot use because it would
5223 ;; cause a dependency cycle.
ddc586ea
LC
5224 (arguments
5225 `(#:tests? #f
5226
5227 #:phases (modify-phases %standard-phases
5228 (add-after 'unpack 'set-tool-file-names
5229 (lambda* (#:key inputs #:allow-other-keys)
5230 (let ((iproute (assoc-ref inputs "iproute")))
5231 (substitute* "jupyter_client/localinterfaces.py"
5232 (("'ip'")
5233 (string-append "'" iproute "/sbin/ip'")))
5234 #t))))))
5235 (inputs
5236 `(("iproute" ,iproute)))
44d10b1f
RW
5237 (propagated-inputs
5238 `(("python-pyzmq" ,python-pyzmq)
5239 ("python-traitlets" ,python-traitlets)
5240 ("python-jupyter-core" ,python-jupyter-core)))
5241 (home-page "http://jupyter.org/")
5242 (synopsis "Jupyter protocol implementation and client libraries")
5243 (description
5244 "The @code{jupyter_client} package contains the reference implementation
5245of the Jupyter protocol. It also provides client and kernel management APIs
5246for working with kernels, and the @code{jupyter kernelspec} entrypoint for
5247installing @code{kernelspec}s for use with Jupyter frontends.")
5248 (license license:bsd-3)))
5249
5250(define-public python2-jupyter-client
5251 (package-with-python2 python-jupyter-client))
5252
5253(define-public python-ipykernel
5254 (package
5255 (name "python-ipykernel")
08d0a355 5256 (version "5.1.3")
44d10b1f
RW
5257 (source
5258 (origin
5259 (method url-fetch)
5260 (uri (pypi-uri "ipykernel" version))
5261 (sha256
08d0a355 5262 (base32 "1a08y677lpn80qzvv7z0smgggmr5m5ayf0bs6vds47xpxl9sss5k"))))
44d10b1f
RW
5263 (build-system python-build-system)
5264 (arguments
5265 `(#:phases
5266 (modify-phases %standard-phases
5267 (replace 'check
5268 (lambda _
5269 (setenv "HOME" "/tmp")
5270 (invoke "pytest" "-v")
aa856d02
LC
5271 #t))
5272 (add-after 'install 'set-python-file-name
5273 (lambda* (#:key outputs #:allow-other-keys)
5274 ;; Record the absolute file name of the 'python' executable in
5275 ;; 'kernel.json'.
5276 (let ((out (assoc-ref outputs "out")))
5277 (substitute* (string-append out "/share/jupyter"
5278 "/kernels/python3/kernel.json")
5279 (("\"python\"")
5280 (string-append "\"" (which "python") "\"")))
5281 #t))))))
44d10b1f
RW
5282 (propagated-inputs
5283 `(("python-ipython" ,python-ipython)
5284 ;; imported at runtime during connect
5285 ("python-jupyter-client" ,python-jupyter-client)))
5286 (native-inputs
08d0a355
TGR
5287 `(("python-flaky" ,python-flaky)
5288 ("python-nose" ,python-nose)
5289 ("python-pytest" ,python-pytest)))
44d10b1f
RW
5290 (home-page "https://ipython.org")
5291 (synopsis "IPython Kernel for Jupyter")
5292 (description
5293 "This package provides the IPython kernel for Jupyter.")
5294 (license license:bsd-3)))
5295
0f378947 5296;; Version 5.1.1 and above no longer support Python 2.
44d10b1f 5297(define-public python2-ipykernel
0f378947
RW
5298 (package
5299 (name "python2-ipykernel")
5300 (version "5.1.0")
5301 (source
5302 (origin
5303 (method url-fetch)
5304 (uri (pypi-uri "ipykernel" version))
5305 (sha256
5306 (base32 "0br95qhrd5k65g10djngiy27hs0642301hlf2q142i8djabvzh0g"))))
5307 (build-system python-build-system)
5308 (arguments
5309 `(#:python ,python-2
5310 #:phases
5311 (modify-phases %standard-phases
5312 (replace 'check
5313 (lambda _
5314 (setenv "HOME" "/tmp")
5315 (invoke "pytest" "-v")
5316 #t)))))
5317 (propagated-inputs
5318 `(("python2-ipython" ,python2-ipython)
5319 ;; imported at runtime during connect
5320 ("python2-jupyter-client" ,python2-jupyter-client)))
5321 (native-inputs
5322 `(("python2-pytest" ,python2-pytest)
5323 ("python2-nose" ,python2-nose)))
5324 (home-page "https://ipython.org")
5325 (synopsis "IPython Kernel for Jupyter")
5326 (description
5327 "This package provides the IPython kernel for Jupyter.")
5328 (license license:bsd-3)))
44d10b1f 5329
966aa714
AE
5330(define-public python-pari-jupyter
5331 (package
5332 (name "python-pari-jupyter")
5333 (version "1.3.2")
5334 (source
5335 (origin
5336 (method url-fetch)
5337 (uri (pypi-uri "pari_jupyter" version))
5338 (sha256
5339 (base32
5340 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
5341 (build-system python-build-system)
5342 (propagated-inputs
5343 `(("python-ipykernel" ,python-ipykernel)))
5344 (inputs
5345 `(("pari-gp" ,pari-gp)
5346 ("readline" ,readline)))
5347 (arguments
5348 `(#:tests? #f)) ; no test suite
5349 (home-page
5350 "https://github.com/jdemeyer/pari_jupyter")
5351 (synopsis "A Jupyter kernel for PARI/GP")
5352 (description "The package provides a PARI/GP kernel for Jupyter.")
5353 (license license:gpl3+)))
5354
dede052a
RW
5355(define-public python-backcall
5356 (package
5357 (name "python-backcall")
5358 (version "0.1.0")
5359 (source
5360 (origin
5361 (method url-fetch)
5362 (uri (pypi-uri "backcall" version))
5363 (sha256
5364 (base32
5365 "1r01dqch3f8fdj3n6fviw8hxqrs6w5v0qw4izmvqzry1w9dxiv1q"))))
5366 (build-system python-build-system)
5367 (home-page "https://github.com/takluyver/backcall/")
5368 (synopsis "Specifications for callback functions passed in to an API")
5369 (description
5370 "If your code lets other people supply callback functions, it's important
5371to specify the function signature you expect, and check that functions support
5372that. Adding extra parameters later would break other peoples code unless
5373you're careful. The @code{backcall} package provides a way of specifying the
5374callback signature using a prototype function.")
5375 (license license:bsd-3)))
5376
44d10b1f
RW
5377;; This is the latest release of the LTS version of ipython with support for
5378;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
8b5f756c
RW
5379;; dropped support for Python 2.7.
5380(define-public python2-ipython
44d10b1f 5381 (package
8b5f756c 5382 (name "python2-ipython")
44d10b1f
RW
5383 (version "5.8.0")
5384 (source
5385 (origin
5386 (method url-fetch)
5387 (uri (pypi-uri "ipython" version ".tar.gz"))
5388 (sha256
5389 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
5390 (build-system python-build-system)
44d10b1f 5391 (propagated-inputs
8b5f756c
RW
5392 `(("python2-backports-shutil-get-terminal-size"
5393 ,python2-backports-shutil-get-terminal-size)
5394 ("python2-pathlib2" ,python2-pathlib2)
5395 ("python2-pyzmq" ,python2-pyzmq)
5396 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
5397 ("python2-terminado" ,python2-terminado)
5398 ("python2-matplotlib" ,python2-matplotlib)
5399 ("python2-numpy" ,python2-numpy)
5400 ("python2-numpydoc" ,python2-numpydoc)
5401 ("python2-jinja2" ,python2-jinja2)
5402 ("python2-mistune" ,python2-mistune)
5403 ("python2-pexpect" ,python2-pexpect)
5404 ("python2-pickleshare" ,python2-pickleshare)
5405 ("python2-simplegeneric" ,python2-simplegeneric)
5406 ("python2-jsonschema" ,python2-jsonschema)
5407 ("python2-traitlets" ,python2-traitlets)
5408 ("python2-nbformat" ,python2-nbformat)
5409 ("python2-pygments" ,python2-pygments)))
5410 (inputs
5411 `(("readline" ,readline)
5412 ("which" ,which)))
5413 (native-inputs
5414 `(("graphviz" ,graphviz)
5415 ("pkg-config" ,pkg-config)
5416 ("python2-requests" ,python2-requests) ;; for tests
5417 ("python2-testpath" ,python2-testpath)
5418 ("python2-mock" ,python2-mock)
5419 ("python2-nose" ,python2-nose)))
5420 (arguments
5421 `(#:python ,python-2
5422 #:phases
5423 (modify-phases %standard-phases
5424 (add-before 'check 'delete-broken-tests
5425 (lambda* (#:key inputs #:allow-other-keys)
5426 ;; These tests throw errors for unknown reasons.
5427 (delete-file "IPython/core/tests/test_profile.py")
5428 (delete-file "IPython/core/tests/test_interactiveshell.py")
5429 (delete-file "IPython/core/tests/test_magic.py")
5430 #t)))))
5431 (home-page "https://ipython.org")
5432 (synopsis "IPython is a tool for interactive computing in Python")
5433 (description
5434 "IPython provides a rich architecture for interactive computing with:
5435Powerful interactive shells, a browser-based notebook, support for interactive
5436data visualization, embeddable interpreters and tools for parallel
5437computing.")
5438 (license license:bsd-3)))
5439
5440(define-public python-ipython
5441 (package
5442 (name "python-ipython")
ee515773 5443 (version "7.9.0")
8b5f756c
RW
5444 (source
5445 (origin
5446 (method url-fetch)
5447 (uri (pypi-uri "ipython" version ".tar.gz"))
5448 (sha256
ee515773 5449 (base32 "103jkw18z7fnwdal1mdbijjxi1fndzn31g887lmj7ddpf2r07lyz"))))
8b5f756c
RW
5450 (build-system python-build-system)
5451 (propagated-inputs
5452 `(("python-backcall" ,python-backcall)
5453 ("python-pyzmq" ,python-pyzmq)
5454 ("python-prompt-toolkit" ,python-prompt-toolkit)
44d10b1f
RW
5455 ("python-terminado" ,python-terminado)
5456 ("python-matplotlib" ,python-matplotlib)
5457 ("python-numpy" ,python-numpy)
5458 ("python-numpydoc" ,python-numpydoc)
8b5f756c 5459 ("python-jedi" ,python-jedi)
44d10b1f
RW
5460 ("python-jinja2" ,python-jinja2)
5461 ("python-mistune" ,python-mistune)
5462 ("python-pexpect" ,python-pexpect)
5463 ("python-pickleshare" ,python-pickleshare)
5464 ("python-simplegeneric" ,python-simplegeneric)
5465 ("python-jsonschema" ,python-jsonschema)
5466 ("python-traitlets" ,python-traitlets)
5467 ("python-nbformat" ,python-nbformat)
5468 ("python-pygments" ,python-pygments)))
5469 (inputs
5470 `(("readline" ,readline)
5471 ("which" ,which)))
5472 (native-inputs
5473 `(("graphviz" ,graphviz)
5474 ("pkg-config" ,pkg-config)
5475 ("python-requests" ,python-requests) ;; for tests
5476 ("python-testpath" ,python-testpath)
8b5f756c 5477 ("python-nose" ,python-nose)))
44d10b1f
RW
5478 (arguments
5479 `(#:phases
5480 (modify-phases %standard-phases
0f272518
RW
5481 (add-after 'unpack 'make-docs-reproducible
5482 (lambda _
5483 (substitute* "IPython/sphinxext/ipython_directive.py"
5484 ((".*import datetime") "")
5485 ((".*datetime.datetime.now\\(\\)") "")
5486 (("%timeit") "# %timeit"))
5487 #t))
44d10b1f
RW
5488 ;; Tests can only be run after the library has been installed and not
5489 ;; within the source directory.
5490 (delete 'check)
5491 (add-after 'install 'check
5492 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5493 (if tests?
5494 (begin
5495 ;; Make installed package available for running the tests
5496 (add-installed-pythonpath inputs outputs)
5497 (setenv "HOME" "/tmp/") ;; required by a test
5498 ;; We only test the core because one of the other tests
5499 ;; tries to import ipykernel.
5500 (invoke "python" "IPython/testing/iptest.py"
5501 "-v" "IPython/core/tests"))
5502 #t)))
5503 (add-before 'check 'fix-tests
5504 (lambda* (#:key inputs #:allow-other-keys)
5505 (substitute* "./IPython/utils/_process_posix.py"
5506 (("/usr/bin/env', 'which") (which "which")))
5507 (substitute* "./IPython/core/tests/test_inputtransformer.py"
5508 (("#!/usr/bin/env python")
5509 (string-append "#!" (which "python"))))
44d10b1f
RW
5510 ;; This test introduces a circular dependency on ipykernel
5511 ;; (which depends on ipython).
5512 (delete-file "IPython/core/tests/test_display.py")
8b5f756c 5513 ;; AttributeError: module 'IPython.core' has no attribute 'formatters'
44d10b1f 5514 (delete-file "IPython/core/tests/test_interactiveshell.py")
44d10b1f
RW
5515 #t)))))
5516 (home-page "https://ipython.org")
5517 (synopsis "IPython is a tool for interactive computing in Python")
5518 (description
5519 "IPython provides a rich architecture for interactive computing with:
5520Powerful interactive shells, a browser-based notebook, support for interactive
5521data visualization, embeddable interpreters and tools for parallel
5522computing.")
8b5f756c 5523 (license license:bsd-3)))
44d10b1f 5524
8b5f756c
RW
5525(define-public python-ipython-documentation
5526 (package
5527 (inherit python-ipython)
5528 (name "python-ipython-documentation")
5529 (version (package-version python-ipython))
5530 (arguments
5531 `(#:phases
5532 (modify-phases %standard-phases
5533 (delete 'build)
5534 (delete 'check)
5535 (replace 'install
5536 (lambda* (#:key outputs #:allow-other-keys)
5537 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
5538 (doc (string-append data "/doc/" ,name "-" ,version))
5539 (html (string-append doc "/html"))
5540 (man1 (string-append data "/man/man1"))
5541 (info (string-append data "/info"))
5542 (examples (string-append doc "/examples"))
5543 (python-arg (string-append "PYTHON=" (which "python"))))
5544 (setenv "LANG" "en_US.utf8")
5545 (with-directory-excursion "docs"
5546 ;; FIXME: pdf fails to build
5547 ;;(system* "make" "pdf" "PAPER=a4")
5548 (system* "make" python-arg "html")
5549 ;; FIXME: the generated texi file contains ^@^@, which trips
5550 ;; up the parser.
5551 ;; (system* "make" python-arg "info")
5552 )
5553 (copy-recursively "docs/man" man1)
5554 (copy-recursively "examples" examples)
5555 (copy-recursively "docs/build/html" html)
5556 ;; (copy-file "docs/build/latex/ipython.pdf"
5557 ;; (string-append doc "/ipython.pdf"))
5558 (mkdir-p info)
5559 ;; (copy-file "docs/build/texinfo/ipython.info"
5560 ;; (string-append info "/ipython.info"))
5561 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
5562 #t)))))
5563 (inputs
5564 `(("python-ipython" ,python-ipython)
5565 ("python-ipykernel" ,python-ipykernel)))
5566 (native-inputs
5567 `(("python-sphinx" ,python-sphinx)
5568 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
5569 ;; FIXME: It's possible that a smaller union would work just as well.
f75aa97f 5570 ("texlive" ,(texlive-union (list texlive-amsfonts
8b5f756c
RW
5571 texlive-fonts-ec
5572 texlive-generic-ifxetex
5573 texlive-generic-pdftex
8b5f756c
RW
5574 texlive-latex-capt-of
5575 texlive-latex-cmap
5576 texlive-latex-environ
5577 texlive-latex-eqparbox
5578 texlive-latex-etoolbox
5579 texlive-latex-expdlist
5580 texlive-latex-fancyhdr
5581 texlive-latex-fancyvrb
5582 texlive-latex-fncychap
5583 texlive-latex-float
5584 texlive-latex-framed
5585 texlive-latex-geometry
5586 texlive-latex-graphics
5587 texlive-latex-hyperref
5588 texlive-latex-mdwtools
5589 texlive-latex-multirow
5590 texlive-latex-needspace
5591 texlive-latex-oberdiek
5592 texlive-latex-parskip
5593 texlive-latex-preview
5594 texlive-latex-tabulary
5595 texlive-latex-threeparttable
5596 texlive-latex-titlesec
5597 texlive-latex-trimspaces
5598 texlive-latex-ucs
5599 texlive-latex-upquote
5600 texlive-latex-url
5601 texlive-latex-varwidth
5602 texlive-latex-wrapfig)))
5603 ("texinfo" ,texinfo)))))
44d10b1f
RW
5604
5605(define-public python-urwid
5606 (package
5607 (name "python-urwid")
5608 (version "2.0.1")
5609 (source
5610 (origin
5611 (method url-fetch)
5612 (uri (pypi-uri "urwid" version))
5613 (sha256
5614 (base32
5615 "1g6cpicybvbananpjikmjk8npmjk4xvak1wjzji62wc600wkwkb4"))))
5616 (build-system python-build-system)
5617 (home-page "http://urwid.org")
5618 (synopsis "Console user interface library for Python")
5619 (description
5620 "Urwid is a curses-based UI/widget library for Python. It includes many
5621features useful for text console applications.")
5622 (license license:lgpl2.1+)))
5623
5624(define-public python2-urwid
5625 (package-with-python2 python-urwid))
5626
5627(define-public python-urwidtrees
5628 (package
5629 (name "python-urwidtrees")
5630 (version "1.0.2")
5631 (source
5632 (origin
5633 (method url-fetch)
5634 ;; package author intends on distributing via github rather than pypi:
5635 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
5636 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
5637 version ".tar.gz"))
5638 (file-name (string-append name "-" version ".tar.gz"))
5639 (sha256
5640 (base32
5641 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
5642 (build-system python-build-system)
5643 (arguments
5644 '(#:tests? #f)) ; no tests
5645 (propagated-inputs `(("python-urwid" ,python-urwid)))
5646 (home-page "https://github.com/pazz/urwidtrees")
5647 (synopsis "Tree widgets for urwid")
5648 (description "Urwidtrees is a Widget Container API for the @code{urwid}
5649toolkit. Use it to build trees of widgets.")
5650 (license license:gpl3+)))
5651
5652(define-public python2-urwidtrees
5653 (package-with-python2 python-urwidtrees))
5654
5655(define-public python-ua-parser
5656 (package
5657 (name "python-ua-parser")
5658 (version "0.8.0")
5659 (source
5660 (origin
5661 (method url-fetch)
5662 (uri (pypi-uri "ua-parser" version))
5663 (sha256
5664 (base32
5665 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
5666 (build-system python-build-system)
5667 (arguments
5668 `(#:tests? #f)) ;no test suite in release
5669 (native-inputs
5670 `(("python-pyyaml" ,python-pyyaml)))
5671 (home-page "https://github.com/ua-parser/uap-python")
5672 (synopsis "User agent parser")
5673 (description
5674 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
5675 (license license:asl2.0)))
5676
5677(define-public python2-ua-parser
5678 (package-with-python2 python-ua-parser))
5679
5680(define-public python-user-agents
5681 (package
5682 (name "python-user-agents")
5683 (version "1.1.0")
5684 (source
5685 (origin
5686 (method url-fetch)
5687 (uri (pypi-uri "user-agents" version))
5688 (sha256
5689 (base32
5690 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
5691 (build-system python-build-system)
5692 (arguments
5693 `(#:tests? #f)) ;missing devices.json test file in release
5694 (propagated-inputs
5695 `(("python-ua-parser" ,python-ua-parser)))
5696 (home-page "https://github.com/selwin/python-user-agents")
5697 (synopsis "User Agent strings parsing library")
5698 (description
5699 "A library to identify devices (phones, tablets) and their capabilities by
5700parsing (browser/HTTP) user agent strings.")
5701 (license license:expat)))
5702
5703(define-public python2-user-agents
5704 (package-with-python2 python-user-agents))
5705
5706(define-public python-dbus
5707 (package
5708 (name "python-dbus")
ba5ef999 5709 (version "1.2.14")
44d10b1f
RW
5710 (source
5711 (origin
5712 (method url-fetch)
5713 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
5714 "dbus-python-" version ".tar.gz"))
5715 (sha256
ba5ef999 5716 (base32 "0cdchkgnivlka4lf8q4qfk0yxq483i3r3aqickjf8hfn7nx0c0mi"))))
44d10b1f 5717 (build-system gnu-build-system)
44d10b1f
RW
5718 (native-inputs
5719 `(("pkg-config" ,pkg-config)))
5720 (inputs
5721 `(("python" ,python-wrapper)
5722 ("dbus-glib" ,dbus-glib)))
5723 (synopsis "Python bindings for D-bus")
5724 (description "python-dbus provides bindings for libdbus, the reference
5725implementation of D-Bus.")
5726 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
5727 (license license:expat)))
5728
5729(define-public python2-dbus
5730 (package (inherit python-dbus)
5731 (name "python2-dbus")
5732 (inputs `(("python" ,python-2)
5733 ,@(alist-delete "python"
5734 (package-inputs python-dbus)
ba5ef999 5735 equal?)))))
44d10b1f 5736
fb236fdd
AG
5737(define-public python-notify2
5738 (package
5739 (name "python-notify2")
5740 (version "0.3.1")
5741 (source
5742 (origin
5743 (method url-fetch)
5744 (uri (pypi-uri "notify2" version))
5745 (sha256
5746 (base32
5747 "0z8rrv9rsg1r2qgh2dxj3dfj5xnki98kgi3w839kqby4a26i1yik"))))
5748 (build-system python-build-system)
5749 (arguments `(#:tests? #f)) ; tests depend on system state
5750 (native-inputs
5751 `(("python-dbus" ,python-dbus)))
5752 (home-page "https://bitbucket.org/takluyver/pynotify2")
5753 (synopsis "Python interface to D-Bus notifications")
5754 (description
5755 "Pynotify2 provides a Python interface for sending D-Bus notifications.
5756It is a reimplementation of pynotify in pure Python, and an alternative to
5757the GObject Introspection bindings to libnotify for non-GTK applications.")
5758 (license (list license:bsd-2
5759 license:lgpl2.1+))))
5760
5761(define-public python2-notify2
5762 (package-with-python2 python-notify2))
5763
44d10b1f
RW
5764(define-public python-lxml
5765 (package
5766 (name "python-lxml")
2a74f928 5767 (version "4.4.1")
44d10b1f
RW
5768 (source
5769 (origin
5770 (method url-fetch)
5771 (uri (pypi-uri "lxml" version))
5772 (sha256
5773 (base32
2a74f928 5774 "14jnpfcpgqr9sx8ppd286jzcbk0b36hbqsvd8jkvffipzw5v8768"))))
44d10b1f 5775 (build-system python-build-system)
2f3c2daf
MB
5776 (arguments
5777 `(#:phases (modify-phases %standard-phases
5778 (replace 'check
5779 (lambda _
5780 (invoke "make" "test"))))))
44d10b1f
RW
5781 (inputs
5782 `(("libxml2" ,libxml2)
5783 ("libxslt" ,libxslt)))
5784 (home-page "http://lxml.de/")
5785 (synopsis
5786 "Python XML processing library")
5787 (description
5788 "The lxml XML toolkit is a Pythonic binding for the C libraries
5789libxml2 and libxslt.")
5790 (license license:bsd-3))) ; and a few more, see LICENSES.txt
5791
5792(define-public python2-lxml
5793 (package-with-python2 python-lxml))
5794
5795;; beautifulsoup4 has a totally different namespace than 3.x,
5796;; and pypi seems to put it under its own name, so I guess we should too
5797(define-public python-beautifulsoup4
5798 (package
5799 (name "python-beautifulsoup4")
abb53e6f 5800 (version "4.7.1")
44d10b1f
RW
5801 (source
5802 (origin
5803 (method url-fetch)
5804 (uri (pypi-uri "beautifulsoup4" version))
5805 (sha256
5806 (base32
abb53e6f 5807 "0j2kycz2dxgx68xzjm7rxg5xn6v61gq5ifvxyg99slmqkybnal4l"))))
44d10b1f
RW
5808 (build-system python-build-system)
5809 (arguments
5810 `(#:phases
5811 (modify-phases %standard-phases
5812 ;; The Python 2 source is the definitive source of beautifulsoup4. We
5813 ;; must use this conversion script when building with Python 3. The
5814 ;; conversion script also runs the tests.
5815 ;; For more information, see the file 'convert-py3k' in the source
5816 ;; distribution.
5817 (replace 'check
dff0197e 5818 (lambda _ (invoke "./convert-py3k"))))))
f83e10e4 5819 (propagated-inputs
abb53e6f 5820 `(("python-soupsieve" ,python-soupsieve)))
44d10b1f
RW
5821 (home-page
5822 "https://www.crummy.com/software/BeautifulSoup/bs4/")
5823 (synopsis
5824 "Python screen-scraping library")
5825 (description
5826 "Beautiful Soup is a Python library designed for rapidly setting up
5827screen-scraping projects. It offers Pythonic idioms for navigating,
5828searching, and modifying a parse tree, providing a toolkit for
5829dissecting a document and extracting what you need. It automatically
5830converts incoming documents to Unicode and outgoing documents to UTF-8.")
5831 (license license:expat)
5832 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
5833
5834(define-public python2-beautifulsoup4
5835 (package
5836 (inherit (package-with-python2
5837 (strip-python2-variant python-beautifulsoup4)))
5838 (arguments `(#:python ,python-2))))
5839
ad74978a
BT
5840(define-public python-soupsieve
5841 (package
5842 (name "python-soupsieve")
3367df31 5843 (version "1.9.5")
ad74978a
BT
5844 (source
5845 (origin
5846 (method url-fetch)
5847 (uri (pypi-uri "soupsieve" version))
5848 (sha256
5849 (base32
3367df31 5850 "1nhd0q0ifwva9wn645s6pn74p1rd97asn3qfg75nphx1wkgcbhg2"))))
ad74978a
BT
5851 (build-system python-build-system)
5852 (arguments `(#:tests? #f))
5853 ;;XXX: 2 tests fail currently despite claming they were to be
5854 ;;skipped. Also, beautifulsoup4 may depend on this in the future, so we
5855 ;;don't want to create a circular dependency.
5856 (home-page "https://github.com/facelessuser/soupsieve")
5857 (synopsis "CSS selector library")
5858 (description
5859 "Soup Sieve is a CSS selector library designed to be used with Beautiful
5860Soup 4. It aims to provide selecting, matching, and filtering using modern
5861CSS selectors. Soup Sieve currently provides selectors from the CSS level 1
5862specifications up through the latest CSS level 4 drafts and beyond (though
5863some are not yet implemented).")
d00b83fb 5864 (properties `((python2-variant . ,(delay python2-soupsieve))))
ad74978a
BT
5865 (license license:expat)))
5866
5867(define-public python2-soupsieve
d00b83fb 5868 (let ((base (package-with-python2 (strip-python2-variant python-soupsieve))))
ad74978a
BT
5869 (package
5870 (inherit base)
5871 (propagated-inputs
d00b83fb
MB
5872 `(("python2-backports-functools-lru-cache"
5873 ,python2-backports-functools-lru-cache)
5874 ,@(package-propagated-inputs base))))))
ad74978a 5875
44d10b1f
RW
5876(define-public python-netifaces
5877 (package
5878 (name "python-netifaces")
5879 (version "0.10.7")
5880 (source
5881 (origin
5882 (method url-fetch)
5883 (uri (pypi-uri "netifaces" version))
5884 (sha256
5885 (base32
5886 "1gccklrcplbbqh81g1mdgpa5y8na7kkf29cq2ka3f5a2fp5hyndx"))))
5887 (build-system python-build-system)
5888 (home-page "https://github.com/al45tair/netifaces")
5889 (synopsis
5890 "Python module for portable network interface information")
5891 (description
5892 "Netifaces is a Python module providing information on network
5893interfaces in an easy and portable manner.")
5894 (license license:expat)))
5895
5896(define-public python2-netifaces
5897 (package-with-python2 python-netifaces))
5898
5899(define-public python-networkx
5900 (package
5901 (name "python-networkx")
5902 (version "2.2")
5903 (source
5904 (origin
5905 (method url-fetch)
5906 (uri (pypi-uri "networkx" version ".zip"))
5907 (sha256
5908 (base32 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
5909 (build-system python-build-system)
5910 ;; python-decorator is needed at runtime.
5911 (propagated-inputs
5912 `(("python-decorator" ,python-decorator)))
5913 (native-inputs
5914 `(("python-nose" ,python-nose)
5915 ("unzip" ,unzip)))
5916 (home-page "https://networkx.github.io/")
5917 (synopsis "Python module for creating and manipulating graphs and networks")
5918 (description
5919 "NetworkX is a Python package for the creation, manipulation, and study
5920of the structure, dynamics, and functions of complex networks.")
5921 (license license:bsd-3)))
5922
5923(define-public python2-networkx
5924 (package-with-python2 python-networkx))
5925
5926(define-public python-datrie
5927 (package
5928 (name "python-datrie")
0b58cb42 5929 (version "0.8")
44d10b1f
RW
5930 (source
5931 (origin
5932 (method url-fetch)
5933 (uri (pypi-uri "datrie" version))
5934 (sha256
5935 (base32
0b58cb42 5936 "0338r8xgmpy78556jhms0h6qkvyjr10p8bpgdvcpqzm9lrmxmmdx"))))
44d10b1f 5937 (build-system python-build-system)
44d10b1f
RW
5938 (native-inputs
5939 `(("python-cython" ,python-cython)
5940 ("python-hypothesis" ,python-hypothesis)
5941 ("python-pytest" ,python-pytest)
5942 ("python-pytest-runner" ,python-pytest-runner)))
5943 (home-page "https://github.com/kmike/datrie")
5944 (synopsis "Fast, efficiently stored trie for Python")
5945 (description
5946 "This package provides a fast, efficiently stored trie implementation for
5947Python.")
5948 (license license:lgpl2.1+)))
5949
5950(define-public snakemake
5951 (package
5952 (name "snakemake")
93803c6b 5953 (version "5.7.1")
44d10b1f
RW
5954 (source
5955 (origin
5956 (method url-fetch)
5957 (uri (pypi-uri "snakemake" version))
5958 (sha256
93803c6b 5959 (base32 "1pnpvvn8n2a78cg360wz3ldmpqrsm2wzi0c0dmvki9fnsw6fxdas"))))
44d10b1f
RW
5960 (build-system python-build-system)
5961 (arguments
5962 ;; TODO: Package missing test dependencies.
5963 '(#:tests? #f
5964 #:phases
5965 (modify-phases %standard-phases
5966 ;; For cluster execution Snakemake will call Python. Since there is
5967 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
5968 ;; this by calling the snakemake wrapper instead.
5969 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
5970 (lambda* (#:key outputs #:allow-other-keys)
5971 (substitute* "snakemake/executors.py"
5972 (("\\{sys.executable\\} -m snakemake")
5973 (string-append (assoc-ref outputs "out")
5974 "/bin/snakemake")))
5975 #t)))))
5976 (propagated-inputs
8994ae34 5977 `(("python-appdirs" ,python-appdirs)
44d10b1f
RW
5978 ("python-configargparse" ,python-configargparse)
5979 ("python-datrie" ,python-datrie)
5980 ("python-docutils" ,python-docutils)
8994ae34 5981 ("python-gitpython" ,python-gitpython)
44d10b1f
RW
5982 ("python-jinja2" ,python-jinja2)
5983 ("python-jsonschema" ,python-jsonschema)
5984 ("python-networkx" ,python-networkx)
93803c6b 5985 ("python-psutil" ,python-psutil)
44d10b1f 5986 ("python-pyyaml" ,python-pyyaml)
8994ae34
TGR
5987 ("python-ratelimiter" ,python-ratelimiter)
5988 ("python-requests" ,python-requests)
5989 ("python-wrapt" ,python-wrapt)))
44d10b1f
RW
5990 (home-page "https://snakemake.readthedocs.io")
5991 (synopsis "Python-based execution environment for make-like workflows")
5992 (description
5993 "Snakemake aims to reduce the complexity of creating workflows by
5994providing a clean and modern domain specific specification language (DSL) in
5995Python style, together with a fast and comfortable execution environment.")
5996 (license license:expat)))
5997
44d10b1f
RW
5998(define-public python-pyqrcode
5999 (package
6000 (name "python-pyqrcode")
6001 (version "1.2.1")
6002 (source
6003 (origin
6004 (method url-fetch)
6005 (uri (pypi-uri "PyQRCode" version))
6006 (sha256
6007 (base32
6008 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
6009 (build-system python-build-system)
6010 (home-page
6011 "https://github.com/mnooner256/pyqrcode")
6012 (synopsis "QR code generator")
6013 (description
6014 "Pyqrcode is a QR code generator written purely in Python with
6015SVG, EPS, PNG and terminal output.")
6016 (license license:bsd-3)))
6017
6018(define-public python-seaborn
6019 (package
6020 (name "python-seaborn")
6021 (version "0.9.0")
6022 (source
6023 (origin
6024 (method url-fetch)
6025 (uri (pypi-uri "seaborn" version))
6026 (sha256
f9bd82e7
RW
6027 (base32 "0bqysi3fxfjl1866m5jq8z7mynhqbqnikim74dmzn8539iwkzj3n"))
6028 (patches
6029 (list (origin
6030 (method url-fetch)
6031 ;; This has already been merged, but there is no new
6032 ;; release including this patch. It fixes problems
6033 ;; with axis rotation that would lead to test
6034 ;; failures.
6035 (uri "https://patch-diff.githubusercontent.com/raw/mwaskom/seaborn/pull/1716.diff")
6036 (sha256
6037 (base32
6038 "1lm870z316n9ivsyr86hpk1gxaraw0mrjvq42lqsm0znhjdp9q9w"))
6039 (file-name "seaborn-0.9.0-axis-rotation.patch"))))))
44d10b1f
RW
6040 (build-system python-build-system)
6041 (arguments
6042 `(#:phases
6043 (modify-phases %standard-phases
6044 (add-before 'check 'start-xserver
6045 (lambda* (#:key inputs #:allow-other-keys)
6046 (let ((xorg-server (assoc-ref inputs "xorg-server")))
6047 ;; There must be a running X server and make check doesn't
6048 ;; start one. Therefore we must do it.
6049 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
6050 (setenv "DISPLAY" ":1")
6051 #t)))
a1322765
RW
6052 (add-after 'unpack 'fix-tests
6053 (lambda _
6054 ;; test_cbar_ticks fails probably because of matplotlib's
6055 ;; expectation of using an older version of FreeType.
6056 (delete-file "seaborn/tests/test_matrix.py")
6057 #t))
44d10b1f
RW
6058 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
6059 (propagated-inputs
6060 `(("python-pandas" ,python-pandas)
6061 ("python-matplotlib" ,python-matplotlib)
6062 ("python-numpy" ,python-numpy)
6063 ("python-scipy" ,python-scipy)))
6064 (native-inputs
6065 `(("python-pytest" ,python-pytest)
ff337525 6066 ("xorg-server" ,xorg-server-for-tests)))
44d10b1f
RW
6067 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
6068 (synopsis "Statistical data visualization")
6069 (description
6070 "Seaborn is a library for making attractive and informative statistical
6071graphics in Python. It is built on top of matplotlib and tightly integrated
6072with the PyData stack, including support for numpy and pandas data structures
6073and statistical routines from scipy and statsmodels.")
6074 (license license:bsd-3)))
6075
6076(define-public python2-seaborn
6077 (package-with-python2 python-seaborn))
6078
6079(define-public python-mpmath
6080 (package
6081 (name "python-mpmath")
6082 (version "0.19")
6083 (source (origin
6084 (method url-fetch)
6085 (uri (string-append "http://mpmath.org/files/mpmath-"
6086 version ".tar.gz"))
6087 (sha256
6088 (base32
6089 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
6090 (build-system python-build-system)
6091 (arguments
6092 '(#:phases
6093 (modify-phases %standard-phases
6094 (replace 'check
6095 (lambda _
5d7a6f1c 6096 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
44d10b1f
RW
6097 (home-page "http://mpmath.org")
6098 (synopsis "Arbitrary-precision floating-point arithmetic in python")
6099 (description
6100 "@code{mpmath} can be used as an arbitrary-precision substitute for
6101Python's float/complex types and math/cmath modules, but also does much
6102more advanced mathematics.")
6103 (license license:bsd-3)))
6104
6105(define-public python2-mpmath
6106 (package-with-python2 python-mpmath))
6107
6108(define-public python-bigfloat
6109 (package
6110 (name "python-bigfloat")
6111 (version "0.3.0")
6112 (source
6113 (origin
6114 (method url-fetch)
6115 (uri (pypi-uri "bigfloat" version))
6116 (sha256
6117 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
6118 (build-system python-build-system)
6119 (inputs
6120 `(("mpfr" ,mpfr)))
6121 (home-page "https://github.com/mdickinson/bigfloat")
6122 (synopsis "Arbitrary precision floating-point arithmetic for Python")
6123 (description
e36de31b 6124 "This package provides a Python interface to the MPFR library for
44d10b1f
RW
6125multiprecision arithmetic.")
6126 (license license:lgpl3+)))
6127
6128(define-public python2-bigfloat
6129 (package-with-python2 python-bigfloat))
6130
6131(define-public python-sympy
6132 (package
6133 (name "python-sympy")
6134 (version "1.1.1")
6135 (source
6136 (origin
6137 (method url-fetch)
6138 (uri (string-append
6139 "https://github.com/sympy/sympy/releases/download/sympy-"
6140 version "/sympy-" version ".tar.gz"))
6141 (sha256
6142 (base32 "190n29sppw7g8ihilc5451y7jlfcaw56crqiqbf1jff43dlmfnxc"))))
6143 (build-system python-build-system)
6144 (arguments
6145 `(#:phases
6146 (modify-phases %standard-phases
6147 ;; Run the core tests after installation. By default it would run
6148 ;; *all* tests, which take a very long time to complete and are known
6149 ;; to be flaky.
6150 (delete 'check)
6151 (add-after 'install 'check
6152 (lambda* (#:key outputs #:allow-other-keys)
6153 (invoke "python3" "-c" "import sympy; sympy.test(\"/core\")")
6154 #t)))))
6155 (propagated-inputs
6156 `(("python-mpmath" ,python-mpmath)))
6157 (home-page "http://www.sympy.org/")
6158 (synopsis "Python library for symbolic mathematics")
6159 (description
6160 "SymPy is a Python library for symbolic mathematics. It aims to become a
6161full-featured computer algebra system (CAS) while keeping the code as simple
6162as possible in order to be comprehensible and easily extensible.")
6163 (license license:bsd-3)))
6164
6165(define-public python2-sympy
6166 (package
6167 (inherit (package-with-python2 python-sympy))
6168 (arguments
6169 `(#:phases
6170 (modify-phases %standard-phases
6171 ;; Run the core tests after installation. By default it would run
6172 ;; *all* tests, which take a very long time to complete and are known
6173 ;; to be flaky.
6174 (delete 'check)
6175 (add-after 'install 'check
6176 (lambda* (#:key outputs #:allow-other-keys)
6177 (invoke "python" "-c" "import sympy; sympy.test(\"/core\")")
6178 #t)))))))
6179
6180(define-public python-q
6181 (package
6182 (name "python-q")
6183 (version "2.6")
6184 (source
6185 (origin
6186 (method url-fetch)
6187 (uri (pypi-uri "q" version))
6188 (sha256
6189 (base32
6190 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
6191 (build-system python-build-system)
6192 (home-page "https://github.com/zestyping/q")
6193 (synopsis "Quick-and-dirty debugging output for tired programmers")
6194 (description
6195 "q is a Python module for \"print\" style of debugging Python code. It
6196provides convenient short API for print out of values, tracebacks, and
6197falling into the Python interpreter.")
6198 (license license:asl2.0)))
6199
6200(define-public python2-q
6201 (package-with-python2 python-q))
6202
6203(define-public python2-xlib
6204 (package
6205 (name "python2-xlib")
6206 (version "0.14")
6207 (source (origin
6208 (method url-fetch)
6209 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
6210 "/" version "/"
6211 "python-xlib-" version ".tar.gz"))
6212 (sha256
6213 (base32
6214 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
6215 (build-system python-build-system)
6216 (arguments
6217 `(#:python ,python-2 ;Python 2 only
6218 #:tests? #f)) ;no tests
6219 (home-page "http://python-xlib.sourceforge.net/")
6220 (synopsis "Python X11 client library")
6221 (description
6222 "The Python X Library is intended to be a fully functional X client
6223library for Python programs. It is useful to implement low-level X clients.
6224It is written entirely in Python.")
6225 (license license:gpl2+)))
6226
6227(define-public python-singledispatch
6228 (package
6229 (name "python-singledispatch")
6230 (version "3.4.0.3")
6231 (source
6232 (origin
6233 (method url-fetch)
6234 (uri (pypi-uri "singledispatch" version))
6235 (sha256
6236 (base32
6237 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
6238 (build-system python-build-system)
6239 (native-inputs
6240 `(("python-six" ,python-six))) ; required for conversion, not at run-time
6241 (home-page
6242 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
6243 (synopsis "Backport of singledispatch feature from Python 3.4")
6244 (description
6245 "This library brings functools.singledispatch from Python 3.4 to Python
62462.6-3.3.")
6247 (license license:expat)))
6248
6249(define-public python2-singledispatch
6250 (package-with-python2 python-singledispatch))
6251
6252;; the python- version can be removed with python-3.5
6253(define-public python-backports-abc
6254 (package
6255 (name "python-backports-abc")
6256 (version "0.5")
6257 (source
6258 (origin
6259 (method url-fetch)
6260 (uri (pypi-uri "backports_abc" version))
6261 (sha256
6262 (base32
6263 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
6264 (build-system python-build-system)
6265 (home-page "https://github.com/cython/backports_abc")
6266 (synopsis "Backport of additions to the 'collections.abc' module")
6267 (description
6268 "Python-backports-abc provides a backport of additions to the
36a4366d 6269@code{collections.abc} module in Python-3.5.")
44d10b1f
RW
6270 (license license:psfl)))
6271
6272(define-public python2-backports-abc
6273 (package-with-python2 python-backports-abc))
6274
6275(define-public python-backports-csv
6276 (package
6277 (name "python-backports-csv")
6278 (version "1.0.5")
6279 (source
6280 (origin
6281 (method url-fetch)
6282 (uri (pypi-uri "backports.csv" version))
6283 (sha256
6284 (base32
6285 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
6286 (build-system python-build-system)
6287 (home-page "https://github.com/ryanhiebert/backports.csv")
6288 (synopsis "Backport of Python 3's csv module for Python 2")
6289 (description
6290 "Provides a backport of Python 3's @code{csv} module for parsing
6291comma separated values. The API of the @code{csv} module in Python 2
6292is drastically different from the @code{csv} module in Python 3.
6293This is due, for the most part, to the difference between str in
6294Python 2 and Python 3.")
6295 (license license:psfl)))
6296
6297(define-public python2-backports-csv
6298 (package-with-python2 python-backports-csv))
6299
6300(define-public python2-backports-shutil-get-terminal-size
6301 (package
6302 (name "python2-backports-shutil-get-terminal-size")
6303 (version "1.0.0")
6304 (source
6305 (origin
6306 (method url-fetch)
6307 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
6308 (sha256
6309 (base32
6310 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
6311 (build-system python-build-system)
6312 (arguments
6313 `(#:python ,python-2
6314 #:phases
6315 (modify-phases %standard-phases
6316 (replace 'check
6317 (lambda _
4a4a7d9a 6318 (invoke "py.test" "-v"))))))
44d10b1f
RW
6319 (native-inputs
6320 `(("python2-pytest" ,python2-pytest)))
6321 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
6322 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
6323 (description
6324 "This package provides a backport of the @code{get_terminal_size
6325function} from Python 3.3's @code{shutil}.
6326Unlike the original version it is written in pure Python rather than C,
6327so it might be a tiny bit slower.")
6328 (license license:expat)))
6329
6330(define-public python-waf
6331 (package
6332 (name "python-waf")
6333 (version "2.0.11")
6334 (source (origin
6335 (method url-fetch)
6336 (uri (string-append "https://waf.io/"
6337 "waf-" version ".tar.bz2"))
6338 (sha256
6339 (base32
6340 "13zrniwkmfqgsgzi9v5m1367fppp9yzrz6z2ny6hy8dmpb8mj4z4"))))
6341 (build-system python-build-system)
6342 (arguments
6343 '(#:phases
6344 (modify-phases %standard-phases
6345 (replace 'build
6346 (lambda _
6347 (invoke "python" "waf-light" "configure" "build")))
6348 (replace 'check
6349 (lambda _
6350 (invoke "python" "waf" "--version")))
6351 (replace 'install
6352 (lambda* (#:key outputs #:allow-other-keys)
6353 (let ((out (assoc-ref outputs "out")))
6354 (install-file "waf" (string-append out "/bin")))
6355 #t))
6356 ;; waf breaks when it is wrapped.
6357 (delete 'wrap))))
6358 (home-page "https://waf.io/")
6359 (synopsis "Python-based build system")
6360 (description
6361 "Waf is a Python-based framework for configuring, compiling and installing
6362applications.")
6363 (license license:bsd-3)))
6364
6365(define-public python2-waf
6366 (package-with-python2 python-waf))
6367
6368(define-public python-pyzmq
6369 (package
6370 (name "python-pyzmq")
6371 (version "17.1.2")
6372 (source
6373 (origin
6374 (method url-fetch)
6375 (uri (pypi-uri "pyzmq" version))
6376 (sha256
6377 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
6378 (build-system python-build-system)
6379 (arguments
6380 `(#:configure-flags
6381 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
6382 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
6383 ;; --inplace' for 'python setup.py test' to work.
6384 #:tests? #f))
6385 (inputs
6386 `(("zeromq" ,zeromq)))
6387 (native-inputs
6388 `(("pkg-config" ,pkg-config)
6389 ("python-nose" ,python-nose)))
6390 (home-page "https://github.com/zeromq/pyzmq")
6391 (synopsis "Python bindings for 0MQ")
6392 (description
6393 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
6394 (license license:bsd-4)))
6395
6396(define-public python2-pyzmq
6397 (package-with-python2 python-pyzmq))
6398
6399(define-public python-pep8
6400 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
6401 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
6402 ;; some dependents' test suites, and nothing more.
6403 (package
6404 (name "python-pep8")
6405 (version "1.7.0")
6406 (source
6407 (origin
6408 (method url-fetch)
6409 (uri (pypi-uri "pep8" version))
6410 (sha256
6411 (base32
2be878d8
CB
6412 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))
6413 (patches (search-patches "python-pep8-stdlib-tokenize-compat.patch"))))
44d10b1f
RW
6414 (build-system python-build-system)
6415 (home-page "https://pep8.readthedocs.org/")
6416 (synopsis "Python style guide checker")
6417 (description
6418 "This tools checks Python code against some of the style conventions in
6419PEP 8.")
6420 (license license:expat)))
6421
6422(define-public python2-pep8
6423 (package-with-python2 python-pep8))
6424
6425(define-public python-pyflakes
6426 (package
6427 (name "python-pyflakes")
d0cba11b 6428 (version "2.1.1")
44d10b1f
RW
6429 (source
6430 (origin
6431 (method url-fetch)
6432 (uri (pypi-uri "pyflakes" version))
6433 (sha256
6434 (base32
d0cba11b 6435 "18pq95a1xj2dgdd0m85gyfsn40jajj4xc3lp8wfv7igqhrc86xnr"))))
44d10b1f
RW
6436 (build-system python-build-system)
6437 (home-page
6438 "https://github.com/pyflakes/pyflakes")
6439 (synopsis "Passive checker of Python programs")
6440 (description
6441 "Pyflakes statically checks Python source code for common errors.")
6442 (license license:expat)))
6443
6444(define-public python2-pyflakes
6445 (package-with-python2 python-pyflakes))
6446
6447(define-public python-mccabe
6448 (package
6449 (name "python-mccabe")
6450 (version "0.6.1")
6451 (source
6452 (origin
6453 (method url-fetch)
6454 (uri (pypi-uri "mccabe" version))
6455 (sha256
6456 (base32
6457 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
6458 (build-system python-build-system)
6459 (native-inputs
6460 `(("python-pytest" ,python-pytest-bootstrap)
6461 ("python-pytest-runner" ,python-pytest-runner)))
6462 (home-page "https://github.com/flintwork/mccabe")
6463 (synopsis "McCabe checker, plugin for flake8")
6464 (description
6465 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
6466complexity of Python source code.")
6467 (license license:expat)))
6468
6469(define-public python2-mccabe
6470 (package-with-python2 python-mccabe))
6471
6472(define-public python-mccabe-0.2.1
6473 (package (inherit python-mccabe)
6474 (version "0.2.1")
6475 (source
6476 (origin
6477 (method url-fetch)
6478 (uri (pypi-uri "mccabe" version))
6479 (sha256
6480 (base32
6481 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
6482
6483(define-public python2-mccabe-0.2.1
6484 (package-with-python2 python-mccabe-0.2.1))
6485
6486;; Flake8 2.4.1 requires an older version of pep8.
6487;; This should be removed ASAP.
6488(define-public python-pep8-1.5.7
6489 (package (inherit python-pep8)
6490 (version "1.5.7")
6491 (source
f3576970
RW
6492 (origin
6493 (method url-fetch)
6494 (uri (pypi-uri "pep8" version))
6495 (sha256
6496 (base32
6497 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
44d10b1f
RW
6498 (arguments
6499 ;; XXX Tests not compatible with Python 3.5.
6500 '(#:tests? #f))))
6501
6502(define-public python2-pep8-1.5.7
6503 (package-with-python2 python-pep8-1.5.7))
6504
6505;; Flake8 2.4.1 requires an older version of pyflakes.
6506;; This should be removed ASAP.
6507(define-public python-pyflakes-0.8.1
6508 (package (inherit python-pyflakes)
6509 (version "0.8.1")
6510 (source
8c4dffb5
RW
6511 (origin
6512 (method url-fetch)
6513 (uri (pypi-uri "pyflakes" version))
6514 (sha256
6515 (base32
6516 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
44d10b1f
RW
6517 (arguments
6518 ;; XXX Tests not compatible with Python 3.5.
6519 '(#:tests? #f))))
6520
6521(define-public python2-pyflakes-0.8.1
6522 (package-with-python2 python-pyflakes-0.8.1))
6523
ac63cf0a 6524(define-public python-flake8
44d10b1f
RW
6525 (package
6526 (name "python-flake8")
beaff4a8 6527 (version "3.7.7")
ac63cf0a
MB
6528 (source (origin
6529 (method url-fetch)
6530 (uri (pypi-uri "flake8" version))
6531 (sha256
6532 (base32
beaff4a8 6533 "0qg6zggqigrd4k3gv88shd1a27d0cwgfql8vfiq2c7rl7w3rd6c5"))))
44d10b1f
RW
6534 (build-system python-build-system)
6535 (arguments
6536 `(#:phases
6537 (modify-phases %standard-phases
44d10b1f
RW
6538 (delete 'check)
6539 (add-after 'install 'check
6540 (lambda* (#:key inputs outputs #:allow-other-keys)
6541 (add-installed-pythonpath inputs outputs)
6542 (invoke "pytest" "-v")
6543 #t)))))
6544 (propagated-inputs
6545 `(("python-pycodestyle" ,python-pycodestyle)
beaff4a8 6546 ("python-entrypoints" ,python-entrypoints)
44d10b1f
RW
6547 ("python-pyflakes" ,python-pyflakes)
6548 ("python-mccabe" ,python-mccabe)))
6549 (native-inputs
6550 `(("python-mock" ,python-mock)
6551 ("python-pytest" ,python-pytest-bootstrap)
6552 ("python-pytest-runner" ,python-pytest-runner)))
6553 (home-page "https://gitlab.com/pycqa/flake8")
6554 (synopsis
6555 "The modular source code checker: pep8, pyflakes and co")
6556 (description
6557 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
ac63cf0a 6558 (properties `((python2-variant . ,(delay python2-flake8))))
44d10b1f
RW
6559 (license license:expat)))
6560
ac63cf0a
MB
6561(define-public python2-flake8
6562 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
44d10b1f
RW
6563 (package (inherit base)
6564 (propagated-inputs
6565 `(("python2-configparser" ,python2-configparser)
6566 ("python2-enum34" ,python2-enum34)
beaff4a8 6567 ("python2-typing" ,python2-typing)
44d10b1f
RW
6568 ,@(package-propagated-inputs base))))))
6569
44d10b1f
RW
6570;; python-hacking requires flake8 <2.6.0.
6571(define-public python-flake8-2.5
6572 (package
6573 (inherit python-flake8)
6574 (version "2.5.5")
6575 (source (origin
6576 (method url-fetch)
6577 (uri (pypi-uri "flake8" version))
6578 (sha256
6579 (base32
6580 "1snylqwbmrylbx3r1wpz8ggk98f6bcag4441ag8mm2l7wyn58sij"))))
6581 (propagated-inputs
6582 `(("python-pep8" ,python-pep8)
6583 ,@(package-propagated-inputs python-flake8)))
6584 (properties `((python2-variant . ,(delay python2-flake8-2.5))))))
6585
6586(define-public python2-flake8-2.5
6587 (package
6588 (inherit python2-flake8)
6589 (version (package-version python-flake8-2.5))
6590 (source (origin
6591 (inherit (package-source python-flake8-2.5))))
6592 (propagated-inputs
6593 `(("python2-pep8" ,python2-pep8)
6594 ,@(package-propagated-inputs python2-flake8)))))
6595
6596(define-public python-flake8-polyfill
6597 (package
6598 (name "python-flake8-polyfill")
6599 (version "1.0.2")
6600 (source
6601 (origin
6602 (method url-fetch)
6603 (uri (pypi-uri "flake8-polyfill" version))
6604 (sha256
6605 (base32
6606 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
6607 (build-system python-build-system)
6608 (arguments
6609 '(#:phases
6610 (modify-phases %standard-phases
6611 (replace 'check
6612 (lambda _
40a7153d
MB
6613 ;; Be compatible with Pytest 4:
6614 ;; https://gitlab.com/pycqa/flake8-polyfill/merge_requests/7
6615 (substitute* "setup.cfg"
6616 (("\\[pytest\\]")
6617 "[tool:pytest]"))
6618
44d10b1f
RW
6619 (setenv "PYTHONPATH"
6620 (string-append (getcwd) "/build/lib:"
6621 (getenv "PYTHONPATH")))
4f0a0894 6622 (invoke "py.test" "-v"))))))
44d10b1f
RW
6623 (native-inputs
6624 `(("python-flake8" ,python-flake8)
6625 ("python-mock" ,python-mock)
6626 ("python-pep8" ,python-pep8)
6627 ("python-pycodestyle" ,python-pycodestyle)
6628 ("python-pytest" ,python-pytest)))
6629 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
6630 (synopsis "Polyfill package for Flake8 plugins")
6631 (description
6632 "This package that provides some compatibility helpers for Flake8
6633plugins that intend to support Flake8 2.x and 3.x simultaneously.")
6634 (license license:expat)))
6635
6636(define-public python2-flake8-polyfill
6637 (package-with-python2 python-flake8-polyfill))
6638
6639(define-public python-mistune
6640 (package
6641 (name "python-mistune")
6642 (version "0.8.4")
6643 (source
6644 (origin
6645 (method url-fetch)
6646 (uri (pypi-uri "mistune" version))
6647 (sha256
6648 (base32
6649 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
6650 (build-system python-build-system)
6651 (native-inputs
6652 `(("python-nose" ,python-nose)
6653 ("python-cython" ,python-cython)))
6654 (home-page "https://github.com/lepture/mistune")
6655 (synopsis "Markdown parser in pure Python")
6656 (description "This package provides a fast markdown parser in pure
6657Python.")
6658 (license license:bsd-3)))
6659
6660(define-public python2-mistune
6661 (package-with-python2 python-mistune))
6662
6663(define-public python-markdown
6664 (package
6665 (name "python-markdown")
ceb1936a 6666 (version "3.1.1")
44d10b1f
RW
6667 (source
6668 (origin
6669 (method url-fetch)
6670 (uri (pypi-uri "Markdown" version))
6671 (sha256
6672 (base32
ceb1936a 6673 "0yhylk4ffqqs7x086fav4pnfsl1021v7lghznzkififprmmqfl1f"))))
44d10b1f
RW
6674 (build-system python-build-system)
6675 (native-inputs
6676 `(("python-nose" ,python-nose)
6677 ("python-pyyaml" ,python-pyyaml)))
6678 (home-page "https://python-markdown.github.io/")
6679 (synopsis "Python implementation of Markdown")
6680 (description
6681 "This package provides a Python implementation of John Gruber's
6682Markdown. The library features international input, various Markdown
6683extensions, and several HTML output formats. A command line wrapper
6684markdown_py is also provided to convert Markdown files to HTML.")
6685 (license license:bsd-3)))
6686
6687(define-public python2-markdown
6688 (package-with-python2 python-markdown))
6689
6690(define-public python-ptyprocess
6691 (package
6692 (name "python-ptyprocess")
6693 (version "0.5.2")
6694 (source
6695 (origin
6696 (method url-fetch)
6697 (uri (pypi-uri "ptyprocess" version))
6698 (sha256
6699 (base32
6700 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
6701 (build-system python-build-system)
6702 (native-inputs
6703 `(("python-nose" ,python-nose)))
6704 (arguments
6705 `(#:phases
6706 (modify-phases %standard-phases
6707 (replace 'check
7904d6fa 6708 (lambda _ (invoke "nosetests"))))))
44d10b1f
RW
6709 (home-page "https://github.com/pexpect/ptyprocess")
6710 (synopsis "Run a subprocess in a pseudo terminal")
6711 (description
6712 "This package provides a Python library used to launch a subprocess in a
6713pseudo terminal (pty), and interact with both the process and its pty.")
6714 (license license:isc)))
6715
6716(define-public python2-ptyprocess
6717 (package-with-python2 python-ptyprocess))
6718
6719(define-public python-cram
6720 (package
6721 (name "python-cram")
6722 (version "0.7")
6723 (home-page "https://bitheap.org/cram/")
6724 (source (origin
6725 (method url-fetch)
6726 (uri (list (string-append home-page "cram-"
6727 version ".tar.gz")
6728 (pypi-uri "cram" version)))
6729 (sha256
6730 (base32
6731 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
6732 (arguments
6733 '(#:phases
6734 (modify-phases %standard-phases
6735 (add-after 'unpack 'patch-source
6736 (lambda _
6737 (substitute* (find-files "cram" ".*\\.py$")
6738 ;; Replace default shell path.
6739 (("/bin/sh") (which "sh")))
6740 (substitute* (find-files "tests" ".*\\.t$")
6741 (("md5") "md5sum")
6742 (("/bin/bash") (which "bash"))
6743 (("/bin/sh") (which "sh")))
6744 (substitute* "cram/_test.py"
6745 ;; This hack works around a bug triggered by substituting
6746 ;; the /bin/sh paths. "tests/usage.t" compares the output of
6747 ;; "cram -h", which breaks the output at 80 characters. This
6748 ;; causes the line showing the default shell to break into two
6749 ;; lines, but the test expects a single line...
6750 (("env\\['COLUMNS'\\] = '80'")
6751 "env['COLUMNS'] = '160'"))
ff1e80d7
MB
6752
6753 (substitute* "Makefile"
6754 ;; Recent versions of python-coverage have caused the test
6755 ;; coverage to decrease (as of version 0.7). Allow that.
6756 (("--fail-under=100")
6757 "--fail-under=90"))
6758
44d10b1f 6759 #t))
ff1e80d7 6760 (replace 'check
44d10b1f 6761 ;; The test phase uses the built library and executable.
44d10b1f
RW
6762 (lambda* (#:key inputs outputs #:allow-other-keys)
6763 (add-installed-pythonpath inputs outputs)
6764 (setenv "PATH" (string-append (getenv "PATH") ":"
6765 (assoc-ref outputs "out") "/bin"))
2d7db192 6766 (invoke "make" "test"))))))
44d10b1f
RW
6767 (build-system python-build-system)
6768 (native-inputs
6769 `(("python-coverage" ,python-coverage)
6770 ("which" ,which)))
6771 (synopsis "Simple testing framework for command line applications")
6772 (description
6773 "Cram is a functional testing framework for command line applications.
6774Cram tests look like snippets of interactive shell sessions. Cram runs each
6775command and compares the command output in the test with the command’s actual
6776output.")
6777 (license license:gpl2+)))
6778
6779(define-public python2-cram
6780 (package-with-python2 python-cram))
6781
6782(define-public python-straight-plugin
6783 (package
6784 (name "python-straight-plugin")
6785 (version "1.4.1")
6786 (source
6787 (origin
6788 (method url-fetch)
6789 (uri (pypi-uri "straight.plugin" version))
6790 (sha256
6791 (base32
6792 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
6793 (build-system python-build-system)
6794 (home-page "https://github.com/ironfroggy/straight.plugin")
6795 (synopsis "Simple namespaced plugin facility")
6796 (description "Straight Plugin provides a type of plugin you can create from
6797almost any existing Python modules, and an easy way for outside developers to
6798add functionality and customization to your projects with their own plugins.")
6799 (license license:expat)))
6800
6801(define-public python2-straight-plugin
6802 (package-with-python2 python-straight-plugin))
6803
6804(define-public python-fonttools
6805 (package
6806 (name "python-fonttools")
1a4bb420 6807 (version "3.38.0")
44d10b1f
RW
6808 (source (origin
6809 (method url-fetch)
6810 (uri (pypi-uri "fonttools" version ".zip"))
6811 (sha256
6812 (base32
1a4bb420 6813 "12ripk3s7skgxr1bs9r8n13r94ym3s8iir7ivfixls9fa4dabmlh"))))
44d10b1f
RW
6814 (build-system python-build-system)
6815 (native-inputs
6816 `(("unzip" ,unzip)
6817 ("python-pytest" ,python-pytest)
6818 ("python-pytest-runner" ,python-pytest-runner)))
6819 (home-page "https://github.com/behdad/fonttools")
6820 (synopsis "Tools to manipulate font files")
6821 (description
6822 "FontTools/TTX is a library to manipulate font files from Python. It
6823supports reading and writing of TrueType/OpenType fonts, reading and writing
6824of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
6825also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
6826from an XML-based format.")
6827 (license license:expat)))
6828
6829(define-public python2-fonttools
6830 (package-with-python2 python-fonttools))
6831
6832(define-public python-ly
6833 (package
6834 (name "python-ly")
6835 (version "0.9.5")
6836 (source
6837 (origin
6838 (method url-fetch)
6839 (uri (pypi-uri name version))
6840 (sha256
6841 (base32
6842 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
6843 (build-system python-build-system)
6844 (arguments
6845 ;; FIXME: Some tests need network access.
6846 '(#:tests? #f))
6847 (synopsis "Tool and library for manipulating LilyPond files")
6848 (description "This package provides a Python library to parse, manipulate
6849or create documents in LilyPond format. A command line program ly is also
6850provided that can be used to do various manipulations with LilyPond files.")
6851 (home-page "https://pypi.python.org/pypi/python-ly")
6852 (license license:gpl2+)))
6853
6854(define-public python-appdirs
6855 (package
6856 (name "python-appdirs")
6857 (version "1.4.3")
6858 (source
6859 (origin
6860 (method url-fetch)
6861 (uri (pypi-uri "appdirs" version))
6862 (sha256
6863 (base32
6864 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
6865 (build-system python-build-system)
6866 (home-page "https://github.com/ActiveState/appdirs")
6867 (synopsis
6868 "Determine platform-specific dirs, e.g. a \"user data dir\"")
6869 (description
6870 "This module provides a portable way of finding out where user data
6871should be stored on various operating systems.")
6872 (license license:expat)))
6873
6874(define-public python2-appdirs
6875 (package-with-python2 python-appdirs))
6876
6877(define-public python-llfuse
6878 (package
6879 (name "python-llfuse")
6880 (version "1.3.5")
6881 (source (origin
6882 (method url-fetch)
6883 (uri (pypi-uri "llfuse" version ".tar.bz2"))
6884 (sha256
6885 (base32
6886 "1n7a90jww3ly49fm7x27m3xw3la3qfrnykcakga654g6kcyjlhbf"))))
6887 (build-system python-build-system)
6888 (inputs
6889 `(("fuse" ,fuse)
6890 ("attr" ,attr)))
6891 (native-inputs
6892 `(("pkg-config" ,pkg-config)))
6893 (synopsis "Python bindings for FUSE")
6894 (description
6895 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
6896 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
6897 (license license:lgpl2.0+)
6898 (properties `((python2-variant . ,(delay python2-llfuse))))))
6899
6900(define-public python2-llfuse
6901 (package (inherit (package-with-python2
6902 (strip-python2-variant python-llfuse)))
6903 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
6904
6905;; For attic-0.16
6906(define-public python-llfuse-0.41
6907 (package (inherit python-llfuse)
6908 (version "0.41.1")
6909 (source (origin
6910 (method url-fetch)
6911 (uri (string-append
6912 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6913 "llfuse-" version ".tar.bz2"))
6914 (sha256
6915 (base32
6916 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
6917 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
6918 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
6919 (license (list license:expat license:lgpl2.0+))))
6920
6921(define-public python-msgpack
6922 (package
6923 (name "python-msgpack")
6924 (version "0.5.6")
6925 (source (origin
6926 (method url-fetch)
6927 (uri (pypi-uri "msgpack" version))
6928 (sha256
6929 (base32
6930 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
6931 (build-system python-build-system)
6932 (arguments
6933 `(#:modules ((guix build utils)
6934 (guix build python-build-system)
6935 (ice-9 ftw)
6936 (srfi srfi-1)
6937 (srfi srfi-26))
6938 #:phases
6939 (modify-phases %standard-phases
6940 (replace 'check
6941 (lambda _
6942 (let ((cwd (getcwd)))
6943 (setenv "PYTHONPATH"
6944 (string-append cwd "/build/"
6945 (find (cut string-prefix? "lib" <>)
6946 (scandir (string-append cwd "/build")))
6947 ":"
6948 (getenv "PYTHONPATH")))
6949 (invoke "pytest" "-v" "test")))))))
6950 (native-inputs
6951 `(("python-pytest" ,python-pytest)))
6952 (synopsis "MessagePack (de)serializer")
6953 (description "MessagePack is a fast, compact binary serialization format,
6954suitable for similar data to JSON. This package provides CPython bindings for
6955reading and writing MessagePack data.")
6956 (home-page "https://pypi.python.org/pypi/msgpack/")
6957 (license license:asl2.0)))
6958
6959;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
6960;; release 0.5. Some packages like borg still call it by the old name for now.
6961;; <https://bugs.gnu.org/30662>
6962(define-public python-msgpack-transitional
6963 (package
6964 (inherit python-msgpack)
6965 (name "python-msgpack-transitional")
6966 (arguments
6967 (substitute-keyword-arguments (package-arguments python-msgpack)
6968 ((#:phases phases)
6969 `(modify-phases ,phases
6970 (add-after 'unpack 'configure-transitional
6971 (lambda _
6972 ;; Keep using the old name.
6973 (substitute* "setup.py"
6974 (("TRANSITIONAL = False")
6975 "TRANSITIONAL = 1"))
6976 #t))))))))
6977
6978(define-public python2-msgpack
6979 (package-with-python2 python-msgpack))
6980
6981(define-public python-netaddr
6982 (package
6983 (name "python-netaddr")
6984 (version "0.7.19")
6985 (source
6986 (origin
6987 (method url-fetch)
6988 (uri (pypi-uri "netaddr" version))
6989 (sha256
6990 (base32
6991 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
6992 (build-system python-build-system)
6993 (arguments `(#:tests? #f)) ;; No tests.
6994 (home-page "https://github.com/drkjam/netaddr/")
6995 (synopsis "Pythonic manipulation of network addresses")
6996 (description
6997 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
6998and MAC network addresses.")
6999 (license license:bsd-3)))
7000
7001(define-public python2-netaddr
7002 (package-with-python2 python-netaddr))
7003
dd85eca0
AG
7004(define-public python2-pyroute2
7005 (package
7006 (name "python2-pyroute2")
7007 (version "0.5.6")
7008 (source
7009 (origin
7010 (method url-fetch)
7011 (uri (pypi-uri "pyroute2" version))
7012 (sha256
7013 (base32
7014 "1gmz4r1w0yzj6fjjypnalmfyy0lnfznydyn62gi3wk50j5hhxbny"))))
7015 (build-system python-build-system)
7016 (arguments
7017 `(#:python ,python-2)) ;Python 3.x is not supported
7018 (home-page "https://github.com/svinota/pyroute2")
7019 (synopsis "Python netlink library")
7020 (description
7021 "Pyroute2 is a pure Python netlink library with minimal dependencies.
7022Supported netlink families and protocols include:
7023@itemize
7024@item rtnl, network settings - addresses, routes, traffic controls
7025@item nfnetlink - netfilter API: ipset, nftables, ...
7026@item ipq - simplest userspace packet filtering, iptables QUEUE target
7027@item devlink - manage and monitor devlink-enabled hardware
7028@item generic - generic netlink families
7029 @itemize
7030 @item nl80211 - wireless functions API (basic support)
7031 @item taskstats - extended process statistics
7032 @item acpi_events - ACPI events monitoring
7033 @item thermal_events - thermal events monitoring
7034 @item VFS_DQUOT - disk quota events monitoring
7035 @end itemize
7036@end itemize")
7037 (license license:gpl2+)))
7038
44d10b1f
RW
7039(define-public python-wrapt
7040 (package
7041 (name "python-wrapt")
2271a1dc 7042 (version "1.11.2")
44d10b1f 7043 (source
2271a1dc
MB
7044 (origin
7045 (method url-fetch)
7046 (uri (pypi-uri "wrapt" version))
7047 (sha256
7048 (base32
7049 "1q81762dgsgrd12f8qc39zk8s5wll3m5xc32jdmlf6cls4gh4njn"))))
44d10b1f
RW
7050 (build-system python-build-system)
7051 (arguments
7052 ;; Tests are not included in the tarball, they are only available in the
7053 ;; git repository.
7054 `(#:tests? #f))
7055 (home-page "https://github.com/GrahamDumpleton/wrapt")
7056 (synopsis "Module for decorators, wrappers and monkey patching")
7057 (description
2271a1dc 7058 "The aim of the wrapt module is to provide a transparent object proxy for
44d10b1f
RW
7059 Python, which can be used as the basis for the construction of function
7060 wrappers and decorator functions.")
7061 (license license:bsd-2)))
7062
7063(define-public python2-wrapt
7064 (package-with-python2 python-wrapt))
7065
7066(define-public python-xlrd
7067 (package
7068 (name "python-xlrd")
3a2b1a3c 7069 (version "1.2.0")
44d10b1f
RW
7070 (source (origin
7071 (method url-fetch)
7072 (uri (pypi-uri "xlrd" version))
7073 (sha256
7074 (base32
3a2b1a3c 7075 "1ci93fda4n67qhdvfl16zasyxrpygzk53hs6m8z0rd4dxrnb6vjl"))))
44d10b1f
RW
7076 (build-system python-build-system)
7077 (arguments
7078 `(#:phases
7079 (modify-phases %standard-phases
3ccdd3a5
MO
7080 ;; Some tests depend on writing a temporary file to the user's home
7081 ;; directory.
3a2b1a3c
GL
7082 (add-after 'unpack 'fix-tests
7083 (lambda _
7084 (delete-file "tests/test_open_workbook.py")
7085 #t)))))
44d10b1f
RW
7086 (home-page "http://www.python-excel.org/")
7087 (synopsis "Library for extracting data from Excel files")
a0909286 7088 (description "This package provides a library to extract data from
44d10b1f
RW
7089spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
7090@samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
7091Unicode-aware. It is not intended as an end-user tool.")
7092 (license license:bsd-3)))
7093
7094(define-public python2-xlrd
7095 (package-with-python2 python-xlrd))
7096
7097(define-public python-prettytable
7098 (package
7099 (name "python-prettytable")
7100 (version "0.7.2")
7101 (source
7102 (origin
7103 (method url-fetch)
337c3a1e 7104 (uri (pypi-uri "prettytable" version ".tar.bz2"))
44d10b1f
RW
7105 (sha256
7106 (base32
7107 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
7108 (build-system python-build-system)
7109 (home-page "http://code.google.com/p/prettytable/")
7110 (synopsis "Display tabular data in an ASCII table format")
7111 (description
7112 "A library designed to represent tabular data in visually appealing ASCII
7113tables. PrettyTable allows for selection of which columns are to be printed,
7114independent alignment of columns (left or right justified or centred) and
7115printing of sub-tables by specifying a row range.")
7116 (license license:bsd-3)))
7117
7118(define-public python2-prettytable
7119 (package-with-python2 python-prettytable))
7120
7121(define-public python-tables
7122 (package
7123 (name "python-tables")
7124 (version "3.4.4")
7125 (source
7126 (origin
7127 (method url-fetch)
7128 (uri (pypi-uri "tables" version))
7129 (sha256
7130 (base32
7131 "0affz7k8babh8wdmsgrz5jxrd569by2w8ffimcxs9wiaf5rw1idx"))
7132 (modules '((guix build utils)))
7133 (snippet
7134 '(begin
7135 ;; Remove pre-compiled .pyc files from source.
7136 (for-each delete-file-recursively
7137 (find-files "." "__pycache__" #:directories? #t))
7138 (for-each delete-file (find-files "." "\\.pyc$"))
7139 #t))))
7140 (build-system python-build-system)
7141 (arguments
7142 `(;; FIXME: python-build-system does not pass configure-flags to "build"
7143 ;; or "check", so we must override the build and check phases.
7144 #:phases
7145 (modify-phases %standard-phases
7146 (add-after 'unpack 'use-gcc
7147 (lambda _
7148 (substitute* "setup.py"
7149 (("compiler = new_compiler\\(\\)" line)
7150 (string-append line
7151 "\ncompiler.set_executables(compiler='gcc',"
7152 "compiler_so='gcc',"
7153 "linker_exe='gcc',"
7154 "linker_so='gcc -shared')")))
7155 #t))
7156 (replace 'build
7157 (lambda* (#:key inputs #:allow-other-keys)
35d79d61
RW
7158 (invoke "python" "setup.py" "build"
7159 (string-append "--hdf5="
7160 (assoc-ref inputs "hdf5")))))
44d10b1f
RW
7161 (replace 'check
7162 (lambda* (#:key inputs #:allow-other-keys)
35d79d61
RW
7163 (invoke "python" "setup.py" "check"
7164 (string-append "--hdf5="
7165 (assoc-ref inputs "hdf5"))))))))
44d10b1f
RW
7166 (propagated-inputs
7167 `(("python-numexpr" ,python-numexpr)
7168 ("python-numpy" ,python-numpy)))
7169 (native-inputs
7170 `(("python-cython" ,python-cython)
7171 ("pkg-config" ,pkg-config)))
7172 (inputs
7173 `(("hdf5" ,hdf5)
7174 ("bzip2" ,bzip2)
7175 ("zlib" ,zlib)))
7176 (home-page "http://www.pytables.org/")
7177 (synopsis "Hierarchical datasets for Python")
7178 (description "PyTables is a package for managing hierarchical datasets and
7179designed to efficiently cope with extremely large amounts of data.")
7180 (license license:bsd-3)))
7181
7182(define-public python2-tables
7183 (package-with-python2 python-tables))
7184
7185(define-public python-pyasn1
7186 (package
7187 (name "python-pyasn1")
7188 (version "0.4.3")
7189 (source
7190 (origin
7191 (method url-fetch)
7192 (uri (pypi-uri "pyasn1" version))
7193 (sha256
7194 (base32
7195 "1z5h38anjzzrxpraa9iq9llffyx2zs8gx0q6dc1g029miwnn50gv"))))
7196 (build-system python-build-system)
7197 (home-page "http://pyasn1.sourceforge.net/")
7198 (synopsis "ASN.1 types and codecs")
7199 (description
7200 "This is an implementation of ASN.1 types and codecs in Python. It is
7201suitable for a wide range of protocols based on the ASN.1 specification.")
7202 (license license:bsd-2)))
7203
7204(define-public python2-pyasn1
7205 (package-with-python2 python-pyasn1))
7206
7207(define-public python-pyasn1-modules
7208 (package
7209 (name "python-pyasn1-modules")
7210 (version "0.2.2")
7211 (source
7212 (origin
7213 (method url-fetch)
7214 (uri (pypi-uri "pyasn1-modules" version))
7215 (sha256
7216 (base32
7217 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
7218 (build-system python-build-system)
7219 (propagated-inputs
7220 `(("python-pyasn1" ,python-pyasn1)))
7221 (home-page "https://sourceforge.net/projects/pyasn1/")
7222 (synopsis "ASN.1 codec implementations")
7223 (description
7224 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
7225implementations of ASN.1-based codecs and protocols.")
7226 (license license:bsd-3)))
7227
7228(define-public python2-pyasn1-modules
7229 (package-with-python2 python-pyasn1-modules))
7230
7231(define-public python-ipaddress
7232 (package
7233 (name "python-ipaddress")
7234 (version "1.0.22")
7235 (source (origin
7236 (method url-fetch)
7237 (uri (pypi-uri "ipaddress" version))
7238 (sha256
7239 (base32
7240 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
7241 (build-system python-build-system)
7242 (home-page "https://github.com/phihag/ipaddress")
7243 (synopsis "IP address manipulation library")
7244 (description
7245 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
7246 in Python. This library is used to create, poke at, and manipulate IPv4 and
7247 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
7248 module to older versions of Python.")
7249 (license license:psfl)))
7250
7251(define-public python2-ipaddress
7252 (package-with-python2 python-ipaddress))
7253
7254(define-public python2-ipaddr
7255 (package
7256 (name "python2-ipaddr")
7257 (version "2.1.11")
7258 (source
7259 (origin
7260 (method url-fetch)
7261 (uri (pypi-uri "ipaddr" version))
7262 (sha256
7263 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
7264 (build-system python-build-system)
7265 (arguments
7266 `(#:python ,python-2 ;version 2 only
7267 #:phases
7268 (modify-phases %standard-phases
7269 (replace 'check
40b8c4e3 7270 (lambda _ (invoke "python" "ipaddr_test.py"))))))
44d10b1f
RW
7271 (home-page "https://github.com/google/ipaddr-py")
7272 (synopsis "IP address manipulation library")
7273 (description
7274 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
7275IPv6 addresses and networks.
7276
7277For new implementations you may prefer to use the standard module
7278@code{ipaddress}, which was introduced in Python 3.3 and backported to older
7279versions of Python.")
7280 (license license:asl2.0)))
7281
7282(define-public python-idna
7283 (package
7284 (name "python-idna")
e95c9837 7285 (version "2.8")
44d10b1f
RW
7286 (source
7287 (origin
7288 (method url-fetch)
7289 (uri (pypi-uri "idna" version))
7290 (sha256
7291 (base32
e95c9837 7292 "01rlkigdxg17sf9yar1jl8n18ls59367wqh59hnawlyg53vb6my3"))))
44d10b1f
RW
7293 (build-system python-build-system)
7294 (home-page "https://github.com/kjd/idna")
7295 (synopsis "Internationalized domain names in applications")
7296 (description
7297 "This is a library to support the Internationalised Domain Names in
7298Applications (IDNA) protocol as specified in RFC 5891. This version of the
7299protocol is often referred to as “IDNA2008” and can produce different results
7300from the earlier standard from 2003. The library is also intended to act as a
7301suitable drop-in replacement for the “encodings.idna” module that comes with
7302the Python standard library but currently only supports the older 2003
7303specification.")
7304 (license license:bsd-4)))
7305
a76e6a69
JM
7306(define-public python-idna-2.7
7307 (package (inherit python-idna)
7308 (version "2.7")
7309 (source (origin
7310 (method url-fetch)
7311 (uri (pypi-uri "idna" version))
7312 (sha256
7313 (base32
7314 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))))
7315
7316
44d10b1f
RW
7317(define-public python2-idna
7318 (package-with-python2 python-idna))
7319
7320(define-public python-idna-ssl
7321 (package
7322 (name "python-idna-ssl")
7323 (version "1.0.1")
7324 (source
7325 (origin
7326 (method url-fetch)
7327 (uri (pypi-uri "idna-ssl" version))
7328 (sha256
7329 (base32
7330 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
7331 (build-system python-build-system)
7332 (arguments
7333 `(#:tests? #f)) ;circular dependency with python-aiohttp
7334 (home-page "https://github.com/aio-libs/idna-ssl")
7335 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
7336 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
7337domains support.")
7338 (license license:expat)))
7339
7340(define-public python-pretend
7341 (package
7342 (name "python-pretend")
7343 (version "1.0.9")
7344 (source
7345 (origin
7346 (method url-fetch)
9f1f22ee 7347 (uri (pypi-uri "pretend" version))
44d10b1f
RW
7348 (sha256
7349 (base32
7350 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
7351 (build-system python-build-system)
7352 (home-page "https://github.com/alex/pretend")
7353 (synopsis "Library for stubbing in Python")
7354 (description
7355 "Pretend is a library to make stubbing with Python easier. Stubbing is a
7356technique for writing tests. You may hear the term mixed up with mocks,
7357fakes, or doubles. Basically, a stub is an object that returns pre-canned
7358responses, rather than doing any computation.")
7359 (license license:bsd-3)))
7360
7361(define-public python2-pretend
7362 (package-with-python2 python-pretend))
7363
7364(define-public python-pip
7365 (package
7366 (name "python-pip")
523ba4b1 7367 (version "19.2.1")
44d10b1f
RW
7368 (source
7369 (origin
7370 (method url-fetch)
7371 (uri (pypi-uri "pip" version))
7372 (sha256
7373 (base32
523ba4b1 7374 "100sd12ss4mbdj5lf3wawad29cm573b27765mq098x6xhcj71395"))))
44d10b1f
RW
7375 (build-system python-build-system)
7376 (arguments
7377 '(#:tests? #f)) ; there are no tests in the pypi archive.
7378 (home-page "https://pip.pypa.io/")
7379 (synopsis "Package manager for Python software")
7380 (description
7381 "Pip is a package manager for Python software, that finds packages on the
7382Python Package Index (PyPI).")
7383 (license license:expat)))
7384
7385(define-public python2-pip
7386 (package-with-python2 python-pip))
7387
7388(define-public python-tlsh
7389 (package
7390 (name "python-tlsh")
7391 (version "3.4.5")
7392 (home-page "https://github.com/trendmicro/tlsh")
3e3ff8ad
TGR
7393 (source
7394 (origin
7395 (method git-fetch)
7396 (uri (git-reference
7397 (url "https://github.com/trendmicro/tlsh.git")
7398 (commit (string-append "v" version))))
7399 (file-name (git-file-name name version))
7400 (sha256
7401 (base32 "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll"))))
44d10b1f
RW
7402 (build-system cmake-build-system)
7403 (arguments
7404 '(#:out-of-source? #f
7405 #:phases (modify-phases %standard-phases
7406 (replace
7407 'install
7408 (lambda* (#:key outputs #:allow-other-keys)
7409 ;; Build and install the Python bindings. The underlying
7410 ;; C++ library is apparently not meant to be installed.
7411 (let ((out (assoc-ref outputs "out")))
7412 (with-directory-excursion "py_ext"
7413 (and (system* "python" "setup.py" "build")
7414 (system* "python" "setup.py" "install"
7415 (string-append "--prefix=" out))))))))))
7416 (inputs `(("python" ,python-wrapper))) ;for the bindings
7417 (synopsis "Fuzzy matching library for Python")
7418 (description
7419 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
7420Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
7421value which can be used for similarity comparisons. Similar objects have
7422similar hash values, which allows for the detection of similar objects by
7423comparing their hash values. The byte stream should have a sufficient amount
7424of complexity; for example, a byte stream of identical bytes will not generate
7425a hash value.")
7426 (license license:asl2.0)))
7427
7428(define-public python2-tlsh
7429 (package
7430 (inherit python-tlsh)
7431 (name "python2-tlsh")
7432 (inputs `(("python" ,python-2)))))
7433
7434(define-public python-termcolor
7435 (package
7436 (name "python-termcolor")
7437 (version "1.1.0")
7438 (source
7439 (origin
7440 (method url-fetch)
7441 (uri (pypi-uri "termcolor" version))
7442 (sha256
7443 (base32
7444 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
7445 (build-system python-build-system)
7446 (arguments
7447 ;; There are no tests.
7448 `(#:tests? #f))
7449 (home-page "https://pypi.python.org/pypi/termcolor")
7450 (synopsis "ANSII Color formatting for terminal output")
7451 (description
7452 "This package provides ANSII Color formatting for output in terminals.")
7453 (license license:expat)))
7454
7455(define-public python2-termcolor
7456 (package-with-python2 python-termcolor))
7457
7458(define-public python-libarchive-c
7459 (package
7460 (name "python-libarchive-c")
7461 (version "2.8")
7462 (source (origin
7463 (method url-fetch)
7464 (uri (pypi-uri "libarchive-c" version))
7465 (sha256
7466 (base32
7467 "0qg0v1s9c1xdk9philhnv8k6c6nicvnvfwlc0j9srg90jmdlvm06"))))
7468 (build-system python-build-system)
7469 (arguments
7470 '(#:phases (modify-phases %standard-phases
7471 (add-before
7472 'build 'reference-libarchive
7473 (lambda* (#:key inputs #:allow-other-keys)
7474 ;; Retain the absolute file name of libarchive.so.
7475 (let ((libarchive (assoc-ref inputs "libarchive")))
7476 (substitute* "libarchive/ffi.py"
7477 (("find_library\\('archive'\\)")
7478 (string-append "'" libarchive
7479 "/lib/libarchive.so'"))))))
7480 (replace 'check
7481 (lambda _ (invoke "pytest" "-vv"))))))
7482 (native-inputs
7483 `(("python-mock" ,python-mock)
7484 ("python-pytest" ,python-pytest)))
7485 (inputs
7486 `(("libarchive" ,libarchive)))
7487 (home-page "https://github.com/Changaco/python-libarchive-c")
7488 (synopsis "Python interface to libarchive")
7489 (description
7490 "This package provides Python bindings to libarchive, a C library to
7491access possibly compressed archives in many different formats. It uses
7492Python's @code{ctypes} foreign function interface (FFI).")
7493 (license license:lgpl2.0+)))
7494
7495(define-public python2-libarchive-c
7496 (package-with-python2 python-libarchive-c))
7497
7498(define-public python-file
7499 (package
7500 (inherit file)
7501 (name "python-file")
7502 (build-system python-build-system)
7503 (arguments
7504 '(#:tests? #f ;no tests
7505 #:configure-flags '("--single-version-externally-managed" "--root=/")
7506 #:phases (modify-phases %standard-phases
7507 (add-before 'build 'change-directory
7508 (lambda _
7509 (chdir "python")
7510 #t))
7511 (add-before 'build 'set-library-file-name
7512 (lambda* (#:key inputs #:allow-other-keys)
7513 (let ((file (assoc-ref inputs "file")))
7514 (substitute* "magic.py"
7515 (("find_library\\('magic'\\)")
7516 (string-append "'" file "/lib/libmagic.so'")))
7517 #t))))))
7518 (inputs `(("file" ,file)))
528ea990
LC
7519 (native-inputs (if (%current-target-system)
7520 `(("self" ,this-package))
7521 '()))
44d10b1f
RW
7522 (synopsis "Python bindings to the libmagic file type guesser. Note that
7523this module and the python-magic module both provide a \"magic.py\" file;
7524these two modules, which are different and were developed separately, both
7525serve the same purpose: provide Python bindings for libmagic.")))
7526
7527(define-public python2-file
7528 (package-with-python2 python-file))
7529
7530(define-public python-debian
7531 (package
7532 (name "python-debian")
7533 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
9f74bd31 7534 (version "0.1.36")
44d10b1f
RW
7535 (source
7536 (origin
9f74bd31
VC
7537 ;; Use git-fetch, as pypi doesn't include test suite.
7538 (method git-fetch)
7539 (uri (git-reference
7540 (url home-page)
7541 (commit version)))
7542 (file-name (git-file-name name version))
44d10b1f
RW
7543 (sha256
7544 (base32
9f74bd31 7545 "0qy6x28bj6yfikhjww932v5xq4mf5bm1iczl7acy4c7zm6mwhqfa"))))
44d10b1f 7546 (build-system python-build-system)
9f74bd31
VC
7547 (arguments
7548 `(#:phases (modify-phases %standard-phases
7549 (add-after 'unpack 'remove-debian-specific-tests
7550 ;; python-apt, apt and dpkg are not yet available in guix,
7551 ;; and these tests heavily depend on them.
7552 (lambda _
7553 (delete-file "lib/debian/tests/test_deb822.py")
7554 (delete-file "lib/debian/tests/test_debfile.py")
7555 #t)))))
44d10b1f 7556 (propagated-inputs
9f74bd31
VC
7557 `(("python-six" ,python-six)
7558 ("python-chardet" ,python-chardet)))
44d10b1f
RW
7559 (synopsis "Debian package related modules")
7560 (description
7561 ;; XXX: Use @enumerate instead of @itemize to work around
7562 ;; <http://bugs.gnu.org/21772>.
7563 "This package provides Python modules that abstract many formats of
7564Debian-related files, such as:
7565
7566@enumerate
7567@item Debtags information;
7568@item @file{debian/changelog} files;
7569@item packages files, pdiffs;
7570@item control files of single or multiple RFC822-style paragraphs---e.g.
7571 @file{debian/control}, @file{.changes}, @file{.dsc};
7572@item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
7573 contained files and meta-information.
7574@end enumerate\n")
7575
7576 ;; Modules are either GPLv2+ or GPLv3+.
7577 (license license:gpl3+)))
7578
7579(define-public python2-debian
7580 (package-with-python2 python-debian))
7581
7582(define-public python-nbformat
7583 (package
7584 (name "python-nbformat")
7585 (version "4.4.0")
7586 (source
7587 (origin
7588 (method url-fetch)
7589 (uri (pypi-uri "nbformat" version))
7590 (sha256
7591 (base32
7592 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
7593 (build-system python-build-system)
7594 (arguments `(#:tests? #f)) ; no test target
7595 (propagated-inputs
7596 `(("python-ipython-genutils" ,python-ipython-genutils)
7597 ("python-jsonschema" ,python-jsonschema)
7598 ("python-jupyter-core" ,python-jupyter-core)
7599 ("python-traitlets" ,python-traitlets)))
7600 (home-page "http://jupyter.org")
7601 (synopsis "Jupyter Notebook format")
7602 (description "This package provides the reference implementation of the
7603Jupyter Notebook format and Python APIs for working with notebooks.")
7604 (license license:bsd-3)))
7605
7606(define-public python2-nbformat
7607 (package-with-python2 python-nbformat))
7608
7609(define-public python-bleach
7610 (package
7611 (name "python-bleach")
ff0efc8f 7612 (version "3.1.0")
44d10b1f
RW
7613 (source
7614 (origin
7615 (method url-fetch)
7616 (uri (pypi-uri "bleach" version))
7617 (sha256
7618 (base32
ff0efc8f 7619 "1yhrgrhkln8bd6gn3imj69g1h4xqah9gaz9q26crqr6gmmvpzprz"))))
44d10b1f
RW
7620 (build-system python-build-system)
7621 (propagated-inputs
ff0efc8f 7622 `(("python-webencodings" ,python-webencodings)
44d10b1f
RW
7623 ("python-six" ,python-six)))
7624 (native-inputs
ff0efc8f
MB
7625 `(("python-pytest" ,python-pytest)
7626 ("python-pytest-runner" ,python-pytest-runner-2)))
44d10b1f
RW
7627 (home-page "https://github.com/jsocol/bleach")
7628 (synopsis "Whitelist-based HTML-sanitizing tool")
7629 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
7630 (license license:asl2.0)))
7631
7632(define-public python2-bleach
7633 (package-with-python2 python-bleach))
7634
7635(define-public python-entrypoints
7636 (package
7637 (name "python-entrypoints")
a7f1b718 7638 (version "0.3")
44d10b1f
RW
7639 (source
7640 (origin
7641 (method url-fetch)
a7f1b718 7642 (uri (pypi-uri "entrypoints" version))
44d10b1f
RW
7643 (sha256
7644 (base32
a7f1b718 7645 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
44d10b1f
RW
7646 (build-system python-build-system)
7647 ;; The package does not come with a setup.py file, so we have to generate
7648 ;; one ourselves.
7649 (arguments
7650 `(#:tests? #f
7651 #:phases
7652 (modify-phases %standard-phases
7653 (add-after 'unpack 'create-setup.py
7654 (lambda _
7655 (call-with-output-file "setup.py"
7656 (lambda (port)
7657 (format port "\
7658from setuptools import setup
7659setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
7660" ,version))))))))
7661 (home-page "https://github.com/takluyver/entrypoints")
7662 (synopsis "Discover and load entry points from installed Python packages")
7663 (description "Entry points are a way for Python packages to advertise
7664objects with some common interface. The most common examples are
7665@code{console_scripts} entry points, which define shell commands by
7666identifying a Python function to run. The @code{entrypoints} module contains
7667functions to find and load entry points.")
7668 (license license:expat)))
7669
7670(define-public python2-entrypoints
7671 (package-with-python2 python-entrypoints))
7672
7673(define-public python-nbconvert
7674 (package
7675 (name "python-nbconvert")
7676 (version "5.0.0b1")
7677 (source
7678 (origin
7679 (method url-fetch)
7680 (uri (pypi-uri "nbconvert" version))
7681 (sha256
7682 (base32
7683 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
7684 (build-system python-build-system)
7685 (arguments
7686 `(;; The "bdist_egg" target is disabled by default, causing the installation
7687 ;; to fail.
7688 #:configure-flags (list "bdist_egg")
7689 ;; FIXME: 5 failures, 40 errors.
7690 #:tests? #f))
7691 ;; #:phases
7692 ;; (modify-phases %standard-phases
7693 ;; (replace 'check
7694 ;; (lambda _
7695 ;; (zero? (system* "py.test" "-v")))))
7696 (native-inputs
7697 `(("python-pytest" ,python-pytest)))
7698 (propagated-inputs
7699 `(("python-bleach" ,python-bleach)
7700 ("python-entrypoints" ,python-entrypoints)
7701 ("python-jinja2" ,python-jinja2)
7702 ("python-jupyter-core" ,python-jupyter-core)
7703 ("python-mistune" ,python-mistune)
7704 ("python-nbformat" ,python-nbformat)
7705 ("python-pygments" ,python-pygments)
7706 ("python-traitlets" ,python-traitlets)))
7707 (home-page "http://jupyter.org")
7708 (synopsis "Converting Jupyter Notebooks")
7709 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
7710notebooks to various other formats via Jinja templates. It allows you to
7711convert an @code{.ipynb} notebook file into various static formats including:
7712
7713@enumerate
7714@item HTML
7715@item LaTeX
7716@item PDF
7717@item Reveal JS
7718@item Markdown (md)
7719@item ReStructured Text (rst)
7720@item executable script
7721@end enumerate\n")
7722 (license license:bsd-3)))
7723
7724(define-public python2-nbconvert
7725 (package-with-python2 python-nbconvert))
7726
44d10b1f
RW
7727(define-public python-notebook
7728 (package
7729 (name "python-notebook")
7730 (version "5.7.4")
7731 (source (origin
7732 (method url-fetch)
7733 (uri (pypi-uri "notebook" version))
7734 (sha256
7735 (base32
7736 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
7737 (build-system python-build-system)
7738 (arguments
7739 `(#:phases
7740 (modify-phases %standard-phases
7741 (replace 'check
7742 (lambda _
7743 ;; These tests require a browser
7744 (delete-file-recursively "notebook/tests/selenium")
7745 ;; Some tests need HOME
7746 (setenv "HOME" "/tmp")
7747 ;; This file contains "warningfilters", which are not supported
7748 ;; by this version of nose.
7749 (delete-file "setup.cfg")
7750 (with-directory-excursion "/tmp"
7751 (invoke "nosetests" "-v"))
7752 #t)))))
7753 (propagated-inputs
7754 `(("python-jupyter-core" ,python-jupyter-core)
7755 ("python-nbformat" ,python-nbformat)
7756 ("python-nbconvert" ,python-nbconvert)
7757 ("python-prometheus-client" ,python-prometheus-client)
7758 ("python-send2trash" ,python-send2trash)
7759 ("python-terminado" ,python-terminado)))
7760 (native-inputs
7761 `(("python-nose" ,python-nose)
7762 ("python-sphinx" ,python-sphinx)
7763 ("python-requests" ,python-requests)))
7764 (home-page "http://jupyter.org/")
7765 (synopsis "Web-based notebook environment for interactive computing")
7766 (description
7767 "The Jupyter HTML notebook is a web-based notebook environment for
7768interactive computing.")
7769 (properties `((python2-variant . ,(delay python2-notebook))))
7770 (license license:bsd-3)))
7771
7772(define-public python2-notebook
7773 (let ((base (package-with-python2
7774 (strip-python2-variant python-notebook))))
7775 (package (inherit base)
7776 (native-inputs
7777 `(("python2-mock" ,python2-mock)
7778 ,@(package-native-inputs base)))
7779 (arguments
7780 (substitute-keyword-arguments (package-arguments base)
7781 ((#:phases phases)
7782 `(modify-phases ,phases
7783 (add-before 'check 'disable-test-case
7784 ;; The test requires network access to localhost. Curiously it
7785 ;; fails with Python 2 only. Simply make the test-case return
7786 ;; immediately.
7787 (lambda _
7788 (substitute*
7789 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
7790 (("formats = self.nbconvert_api") "return #")))))))))))
7791
7792(define-public python-widgetsnbextension
7793 (package
7794 (name "python-widgetsnbextension")
7795 (version "3.4.2")
7796 (source
7797 (origin
7798 (method url-fetch)
7799 (uri (pypi-uri "widgetsnbextension" version))
7800 (sha256
7801 (base32
7802 "0rc2nivdy7k4m3vljx7wdh2jh11djapcgwhvzlbs0isl8gl8nqgs"))))
7803 (build-system python-build-system)
7804 (propagated-inputs
7805 `(("python-ipykernel" ,python-ipykernel)
7806 ("python-notebook" ,python-notebook)))
7807 (native-inputs
7808 `(("python-certifi" ,python-certifi)
7809 ("python-nose" ,python-nose)))
7810 (home-page "https://ipython.org")
7811 (synopsis "IPython HTML widgets for Jupyter")
7812 (description "This package provides interactive HTML widgets for Jupyter
7813notebooks.")
7814 (license license:bsd-3)))
7815
7816(define-public python2-widgetsnbextension
7817 (package-with-python2 python-widgetsnbextension))
7818
7819(define-public python-ipywidgets
7820 (package
7821 (name "python-ipywidgets")
7822 (version "5.2.2")
7823 (source
7824 (origin
7825 (method url-fetch)
7826 (uri (pypi-uri "ipywidgets" version))
7827 (sha256
7828 (base32
7829 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
7830 (build-system python-build-system)
7831 (propagated-inputs
7832 `(("python-ipython" ,python-ipython)
7833 ("python-traitlets" ,python-traitlets)
7834 ("python-widgetsnbextension" ,python-widgetsnbextension)))
7835 (native-inputs
7836 `(("python-nose" ,python-nose)
7837 ("python-pytest" ,python-pytest)))
7838 (home-page "https://ipython.org")
7839 (synopsis "IPython HTML widgets for Jupyter")
7840 (description "Ipywidgets are interactive HTML widgets for Jupyter
7841notebooks and the IPython kernel. Notebooks come alive when interactive
7842widgets are used. Users gain control of their data and can visualize changes
7843in the data.")
7844 (license license:bsd-3)))
7845
7846(define-public python2-ipywidgets
7847 (package-with-python2 python-ipywidgets))
7848
7849(define-public python-jupyter-console
7850 (package
7851 (name "python-jupyter-console")
becb9cbf 7852 (version "6.0.0")
44d10b1f
RW
7853 (source
7854 (origin
7855 (method url-fetch)
7856 (uri (pypi-uri "jupyter_console" version))
7857 (sha256
7858 (base32
becb9cbf 7859 "1xdjw11cppf1fxvwkw2bk13ckkwas3bdah8baingn9296mvfi31h"))))
44d10b1f 7860 (build-system python-build-system)
44d10b1f
RW
7861 (propagated-inputs
7862 `(("python-ipykernel" ,python-ipykernel)
7863 ("python-jupyter-client" ,python-jupyter-client)
becb9cbf 7864 ("python-prompt-toolkit" ,python-prompt-toolkit)
44d10b1f
RW
7865 ("python-pygments" ,python-pygments)))
7866 (native-inputs
7867 `(("python-nose" ,python-nose)))
7868 (home-page "https://jupyter.org")
7869 (synopsis "Jupyter terminal console")
7870 (description "This package provides a terminal-based console frontend for
7871Jupyter kernels. It also allows for console-based interaction with non-Python
7872Jupyter kernels such as IJulia and IRKernel.")
7873 (license license:bsd-3)))
7874
7875(define-public python2-jupyter-console
8e590c81
RW
7876 (package
7877 (name "python2-jupyter-console")
7878 (version "5.2.0")
7879 (source
7880 (origin
7881 (method url-fetch)
7882 (uri (pypi-uri "jupyter_console" version))
7883 (sha256
7884 (base32
7885 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
7886 (build-system python-build-system)
7887 ;; Tests only run in an TTY.
7888 (arguments `(#:tests? #f))
7889 (propagated-inputs
7890 `(("python2-ipykernel" ,python2-ipykernel)
7891 ("python2-jupyter-client" ,python2-jupyter-client)
7892 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
7893 ("python2-pygments" ,python2-pygments)))
7894 (native-inputs
7895 `(("python2-nose" ,python2-nose)))
7896 (home-page "https://jupyter.org")
7897 (synopsis "Jupyter terminal console")
7898 (description "This package provides a terminal-based console frontend for
7899Jupyter kernels. It also allows for console-based interaction with non-Python
7900Jupyter kernels such as IJulia and IRKernel.")
7901 (license license:bsd-3)))
44d10b1f
RW
7902
7903;; The python-ipython and python-jupyter-console require each other. To get
7904;; the functionality in both packages working, strip down the
7905;; python-jupyter-console package when using it as an input to python-ipython.
7906(define python-jupyter-console-minimal
7907 (package
7908 (inherit python-jupyter-console)
7909 (name "python-jupyter-console-minimal")
7910 (arguments
7911 (substitute-keyword-arguments
7912 (package-arguments python-jupyter-console)
7913 ((#:phases phases)
7914 `(modify-phases ,phases
7915 (add-after 'install 'delete-bin
7916 (lambda* (#:key outputs #:allow-other-keys)
7917 ;; Delete the bin files, to avoid conflicts in profiles
7918 ;; where python-ipython and python-jupyter-console are
7919 ;; both present.
7920 (delete-file-recursively
7921 (string-append
7922 (assoc-ref outputs "out") "/bin"))))))))
7923 ;; Remove the python-ipython propagated input, to avoid the cycle
7924 (propagated-inputs
7925 (alist-delete
7926 "python-ipython"
7927 (package-propagated-inputs python-jupyter-console)))))
7928
7929(define-public python-qtconsole
7930 (package
7931 (name "python-qtconsole")
7932 (version "4.4.3")
7933 (source
7934 (origin
7935 (method url-fetch)
7936 (uri (pypi-uri "qtconsole" version))
7937 (sha256
7938 (base32
7939 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
7940 (build-system python-build-system)
7941 (arguments
7942 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
7943 ;; but we only have the LTS version 5.x. This means that there might be
7944 ;; runtime errors, but since this is a dependency of the Jupyter package,
7945 ;; and Jupyter can be used without the qtconsole we can overlook this for
7946 ;; now.
7947 `(#:tests? #f
7948 #:phases
7949 (modify-phases %standard-phases
7950 (add-before 'check 'pre-check
7951 (lambda _
7952 (setenv "QT_QPA_PLATFORM" "offscreen")
7953 #t)))))
7954 (propagated-inputs
7955 `(("python-ipykernel" ,python-ipykernel)
7956 ("python-ipython" ,python-ipython)))
7957 (native-inputs
7958 `(("python-pytest" ,python-pytest)))
7959 (home-page "http://jupyter.org")
7960 (synopsis "Jupyter Qt console")
7961 (description "This package provides a Qt-based console for Jupyter with
7962support for rich media output.")
7963 (license license:bsd-3)))
7964
6ec87223
VC
7965(define-public python-jsbeautifier
7966 (package
7967 (name "python-jsbeautifier")
7968 (version "1.10.2")
7969 (home-page "https://github.com/beautify-web/js-beautify")
7970 (source (origin
7971 (method git-fetch)
7972 (uri (git-reference
7973 (url home-page)
7974 (commit (string-append "v" version))))
7975 (file-name (git-file-name name version))
7976 (sha256
7977 (base32
7978 "0wawb070ki1axb3jc9xvsrgpji52vcfif3zmjzc3z4g98m5xw4kg"))))
7979 (build-system python-build-system)
7980 (arguments
7981 `(#:phases (modify-phases %standard-phases
7982 (add-after 'unpack 'chdir
7983 (lambda _
7984 ;; The upstream Git repository contains all the code,
7985 ;; but this package only builds the python code.
7986 (chdir "python")
7987 #t))
7988 (add-after 'unpack 'patch-python-six-requirements
7989 (lambda _
7990 (substitute* "python/setup.py"
7991 (("six>=1.12.0")
7992 "six>=1.11.0"))
7993 #t)))))
7994 (propagated-inputs
7995 `(("python-editorconfig" ,python-editorconfig)
7996 ("python-six" ,python-six)))
7997 (native-inputs
7998 `(("python-pytest" ,python-pytest)))
7999 (synopsis "JavaScript unobfuscator and beautifier")
8000 (description "Beautify, unpack or deobfuscate JavaScript, leveraging
8001popular online obfuscators.")
8002 (license license:expat)))
8003
44d10b1f
RW
8004(define-public jupyter
8005 (package
8006 (name "jupyter")
8007 (version "1.0.0")
8008 (source
8009 (origin
8010 (method url-fetch)
8011 (uri (pypi-uri "jupyter" version))
8012 (sha256
8013 (base32
8014 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
8015 (build-system python-build-system)
8016 (arguments '(#:tests? #f)) ; there are none.
8017 (propagated-inputs
8018 `(("python-ipykernel" ,python-ipykernel)
8019 ("python-ipywidgets" ,python-ipywidgets)
8020 ("python-jupyter-console" ,python-jupyter-console)
8021 ("python-nbconvert" ,python-nbconvert)
8022 ("python-notebook" ,python-notebook)
8023 ("python-qtconsole" ,python-qtconsole)))
8024 (native-search-paths
8025 (list (search-path-specification
8026 (variable "JUPYTER_PATH")
8027 (files '("share/jupyter")))))
8028 (home-page "https://jupyter.org")
8029 (synopsis "Web application for interactive documents")
8030 (description
8031 "The Jupyter Notebook is a web application that allows you to create and
8032share documents that contain live code, equations, visualizations and
8033explanatory text. Uses include: data cleaning and transformation, numerical
8034simulation, statistical modeling, machine learning and much more.")
8035 (license license:bsd-3)))
8036
8037(define-public python-chardet
8038 (package
8039 (name "python-chardet")
8040 (version "3.0.4")
8041 (source
8042 (origin
8043 (method url-fetch)
8044 (uri (pypi-uri "chardet" version))
8045 (sha256
8046 (base32
8047 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
8048 (native-inputs
8049 `(("python-hypothesis" ,python-hypothesis)
8050 ("python-pytest" ,python-pytest)
8051 ("python-pytest-runner" ,python-pytest-runner)))
8052 (build-system python-build-system)
3d369407
MB
8053 ;; XXX: Incompatible with Pytest 4: <https://github.com/chardet/chardet/issues/173>.
8054 (arguments `(#:tests? #f))
44d10b1f
RW
8055 (home-page "https://github.com/chardet/chardet")
8056 (synopsis "Universal encoding detector for Python 2 and 3")
8057 (description
8058 "This package provides @code{chardet}, a Python module that can
8059automatically detect a wide range of file encodings.")
8060 (license license:lgpl2.1+)))
8061
8062(define-public python2-chardet
8063 (package-with-python2 python-chardet))
8064
8065(define-public python-docopt
8066 (package
8067 (name "python-docopt")
8068 (version "0.6.2")
8069 (source
8070 (origin
8071 (method url-fetch)
8072 ;; The release on PyPI does not include tests.
8073 (uri (string-append
8074 "https://github.com/docopt/docopt/archive/"
8075 version ".tar.gz"))
8076 (file-name (string-append name "-" version ".tar.gz"))
8077 (sha256
8078 (base32
8079 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
8080 (build-system python-build-system)
8081 (native-inputs
8082 `(("python-pytest" ,python-pytest)))
8083 (arguments
8084 `(#:phases
8085 (modify-phases %standard-phases
8086 (replace 'check
8087 (lambda _ (invoke "py.test"))))))
8088 (home-page "http://docopt.org")
8089 (synopsis "Command-line interface description language for Python")
8090 (description "This library allows the user to define a command-line
8091interface from a program's help message rather than specifying it
4ca7207b 8092programmatically with command-line parsers like @code{getopt} and
44d10b1f
RW
8093@code{argparse}.")
8094 (license license:expat)))
8095
8096(define-public python2-docopt
8097 (package-with-python2 python-docopt))
8098
8099(define-public python-pythondialog
8100 (package
8101 (name "python-pythondialog")
8102 (version "3.4.0")
8103 (source
8104 (origin
8105 (method url-fetch)
8106 (uri (pypi-uri "pythondialog" version))
8107 (sha256
8108 (base32
8109 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
8110 (build-system python-build-system)
8111 (arguments
8112 `(#:phases
8113 (modify-phases %standard-phases
8114 (add-after 'unpack 'patch-path
8115 (lambda* (#:key inputs #:allow-other-keys)
8116 (let* ((dialog (assoc-ref inputs "dialog")))
8117 ;; Since this library really wants to grovel the search path, we
8118 ;; must hardcode dialog's store path into it.
8119 (substitute* "dialog.py"
8120 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
8121 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
8122 #t))))
8123 #:tests? #f)) ; no test suite
8124 (propagated-inputs
8125 `(("dialog" ,dialog)))
8126 (home-page "http://pythondialog.sourceforge.net/")
8127 (synopsis "Python interface to the UNIX dialog utility")
8128 (description "A Python wrapper for the dialog utility. Its purpose is to
8129provide an easy to use, pythonic and comprehensive Python interface to dialog.
8130This allows one to make simple text-mode user interfaces on Unix-like systems")
8131 (license license:lgpl2.1)
8132 (properties `((python2-variant . ,(delay python2-pythondialog))))))
8133
8134(define-public python2-pythondialog
8135 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
8136 (package
8137 (inherit base)
8138 (version (package-version python-pythondialog))
8139 (source (origin
8140 (method url-fetch)
8141 (uri (pypi-uri "python2-pythondialog" version))
8142 (sha256
8143 (base32
8144 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
8145
8146(define-public python-configobj
8147 (package
8148 (name "python-configobj")
8149 (version "5.0.6")
8150 (source (origin
8151 (method url-fetch)
b0758fbb 8152 (uri (pypi-uri "configobj" version))
44d10b1f
RW
8153 (sha256
8154 (base32
8155 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
8156 ;; Patch setup.py so it looks for python-setuptools, which is
8157 ;; required to parse the keyword 'install_requires' in setup.py.
8158 (patches (search-patches "python-configobj-setuptools.patch"))))
8159 (build-system python-build-system)
8160 (propagated-inputs
8161 `(("python-six" ,python-six)))
8162 (synopsis "Config file reading, writing and validation")
8163 (description "ConfigObj is a simple but powerful config file reader and
8164writer: an ini file round tripper. Its main feature is that it is very easy to
8165use, with a straightforward programmer’s interface and a simple syntax for
8166config files.")
8167 (home-page "https://github.com/DiffSK/configobj")
8168 (license license:bsd-3)))
8169
8170(define-public python2-configobj
8171 (package-with-python2 python-configobj))
8172
8173(define-public python-configargparse
8174 (package
8175 (name "python-configargparse")
86ae491f 8176 (version "0.14.0")
44d10b1f
RW
8177 (source (origin
8178 (method url-fetch)
8179 (uri (pypi-uri "ConfigArgParse" version))
8180 (sha256
8181 (base32
86ae491f 8182 "149fy4zya0rsnlkvxbbq43cyr8lscb5k4pj1m6n7f1grwcmzwbif"))))
44d10b1f
RW
8183 (build-system python-build-system)
8184 (native-inputs
8185 `(("python-pyyaml" ,python-pyyaml)))
8186 (arguments
8187 `(#:phases
8188 (modify-phases %standard-phases
8189 (replace 'check
8190 (lambda _
8191 ;; Bypass setuptools-shim because one test relies on "setup.py"
8192 ;; being the first argument passed to the python call.
8193 ;;
8194 ;; NOTE: Many tests do not run because they rely on Python's
8195 ;; built-in test.test_argparse, but we remove the unit tests from
8196 ;; our Python installation.
8197 (invoke "python" "setup.py" "test"))))))
8198 (synopsis "Replacement for argparse")
8199 (description "A drop-in replacement for argparse that allows options to also
8200be set via config files and/or environment variables.")
8201 (home-page "https://github.com/bw2/ConfigArgParse")
8202 (license license:expat)))
8203
8204(define-public python2-configargparse
8205 (package-with-python2 python-configargparse))
8206
8207(define-public python-argparse-manpage
8208 (package
8209 (name "python-argparse-manpage")
8210 (version "1.1")
8211 (source
8212 (origin
8213 (method url-fetch)
8214 (uri (pypi-uri "argparse-manpage" version))
8215 (sha256
8216 (base32
8217 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
8218 (build-system python-build-system)
8219 (home-page "https://github.com/praiskup/argparse-manpage")
8220 (synopsis "Build manual page from Python's ArgumentParser object")
8221 (description
8222 "This package provides tools to build manual pages from Python's
8223@code{ArgumentParser} object.")
8224 (license license:asl2.0)))
8225
3e8f76d8
RW
8226(define-public python-contextlib2
8227 (package
8228 (name "python-contextlib2")
8229 (version "0.5.5")
8230 (source
8231 (origin
8232 (method url-fetch)
8233 (uri (pypi-uri "contextlib2" version))
8234 (sha256
8235 (base32
8236 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
8237 (build-system python-build-system)
8238 (home-page "http://contextlib2.readthedocs.org/")
8239 (synopsis "Tools for decorators and context managers")
8240 (description "This module is primarily a backport of the Python
82413.2 contextlib to earlier Python versions. Like contextlib, it
8242provides utilities for common tasks involving decorators and context
8243managers. It also contains additional features that are not part of
8244the standard library.")
8245 (license license:psfl)))
8246
44d10b1f
RW
8247(define-public python2-contextlib2
8248 (package
8249 (name "python2-contextlib2")
8250 (version "0.5.5")
8251 (source
8252 (origin
8253 (method url-fetch)
8254 (uri (pypi-uri "contextlib2" version))
8255 (sha256
8256 (base32
8257 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
8258 (build-system python-build-system)
8259 (arguments
8260 `(#:python ,python-2
8261 #:phases
8262 (modify-phases %standard-phases
8263 (replace 'check
8264 (lambda _ (invoke "python" "test_contextlib2.py" "-v"))))))
8265 (native-inputs
8266 `(("python2-unittest2" ,python2-unittest2)))
8267 (home-page "http://contextlib2.readthedocs.org/")
8268 (synopsis "Tools for decorators and context managers")
8269 (description "This module is primarily a backport of the Python
82703.2 contextlib to earlier Python versions. Like contextlib, it
8271provides utilities for common tasks involving decorators and context
8272managers. It also contains additional features that are not part of
8273the standard library.")
8274 (license license:psfl)))
8275
8276(define-public python-texttable
8277 (package
8278 (name "python-texttable")
52cc4892 8279 (version "0.9.1")
44d10b1f
RW
8280 (source
8281 (origin
8282 (method url-fetch)
8283 (uri (pypi-uri "texttable" version))
8284 (sha256
8285 (base32
52cc4892 8286 "0yawv64c0zbawwv6zz84whb32fnb2n9jylwjcfsrcdgh7xvl340i"))))
44d10b1f
RW
8287 (build-system python-build-system)
8288 (arguments '(#:tests? #f)) ; no tests
8289 (home-page "https://github.com/foutaise/texttable/")
8290 (synopsis "Python module for creating simple ASCII tables")
8291 (description "Texttable is a Python module for creating simple ASCII
8292tables.")
8293 (license license:lgpl2.1+)))
8294
8295(define-public python2-texttable
8296 (package-with-python2 python-texttable))
8297
8298(define-public python-atomicwrites
8299 (package
8300 (name "python-atomicwrites")
14f10479 8301 (version "1.3.0")
44d10b1f
RW
8302 (source (origin
8303 (method url-fetch)
8304 (uri (pypi-uri "atomicwrites" version))
8305 (sha256
8306 (base32
14f10479 8307 "19ngcscdf3jsqmpcxn6zl5b6anmsajb6izp1smcd1n02midl9abm"))))
44d10b1f
RW
8308 (build-system python-build-system)
8309 (synopsis "Atomic file writes in Python")
8310 (description "Library for atomic file writes using platform dependent tools
8311for atomic file system operations.")
8312 (home-page "https://github.com/untitaker/python-atomicwrites")
8313 (license license:expat)))
8314
8315(define-public python2-atomicwrites
8316 (package-with-python2 python-atomicwrites))
8317
8318(define-public python-click-threading
8319 (package
8320 (name "python-click-threading")
8321 (version "0.4.4")
8322 (source (origin
8323 (method url-fetch)
8324 (uri (pypi-uri "click-threading" version))
8325 (sha256
8326 (base32
8327 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
8328 (build-system python-build-system)
8329 (propagated-inputs
8330 `(("python-click" ,python-click)))
8331 (synopsis "Utilities for multithreading in Click")
8332 (description "This package provides utilities for multithreading in Click
8333applications.")
8334 (home-page "https://github.com/click-contrib/click-threading")
8335 (license license:expat)))
8336
8337(define-public python-click-log
8338 (package
8339 (name "python-click-log")
8340 (version "0.3.2")
8341 (source (origin
8342 (method url-fetch)
8343 (uri (pypi-uri "click-log" version))
8344 (sha256
8345 (base32
8346 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
8347 (build-system python-build-system)
8348 (propagated-inputs
8349 `(("python-click" ,python-click)))
8350 (synopsis "Logging for click applications")
8351 (description "This package provides a Python library for logging Click
8352applications.")
8353 (home-page "https://github.com/click-contrib/click-log")
8354 (license license:expat)))
8355
8356(define-public python-apipkg
8357 (package
8358 (name "python-apipkg")
8359 (version "1.4")
8360 (source (origin
8361 (method url-fetch)
8362 (uri (pypi-uri "apipkg" version))
8363 (sha256
8364 (base32
8365 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
8366 (build-system python-build-system)
8367 (native-inputs
8368 `(("python-pytest" ,python-pytest)))
8369 (synopsis "Namespace control and lazy-import mechanism")
8370 (description "With apipkg you can control the exported namespace of a Python
8371package and greatly reduce the number of imports for your users. It is a small
8372pure Python module that works on virtually all Python versions.")
8373 (home-page "https://github.com/pytest-dev/apipkg")
8374 (license license:expat)))
8375
8376(define-public python2-apipkg
8377 (package-with-python2 python-apipkg))
8378
8379(define-public python-execnet
8380 (package
8381 (name "python-execnet")
8382 (version "1.4.1")
8383 (source (origin
8384 (method url-fetch)
8385 (uri (pypi-uri "execnet" version))
8386 (sha256
8387 (base32
8388 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
8389 (build-system python-build-system)
8390 (arguments
8391 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
8392 ;; The two test failures are caused by the lack of an `ssh` executable.
8393 ;; The test suite can be run with pytest after the 'install' phase.
8394 #:tests? #f))
8395 (native-inputs
8396 `(("python-pytest" ,python-pytest)
8397 ("python-setuptools-scm" ,python-setuptools-scm)))
8398 (propagated-inputs
8399 `(("python-apipkg" ,python-apipkg)))
8400 (synopsis "Rapid multi-Python deployment")
8401 (description "Execnet provides a share-nothing model with
8402channel-send/receive communication for distributing execution across many
8403Python interpreters across version, platform and network barriers. It has a
8404minimal and fast API targeting the following uses:
8405@enumerate
8406@item distribute tasks to (many) local or remote CPUs
8407@item write and deploy hybrid multi-process applications
8408@item write scripts to administer multiple environments
8409@end enumerate")
8410 (home-page "http://codespeak.net/execnet/")
8411 (license license:expat)))
8412
8413(define-public python2-execnet
8414 (package-with-python2 python-execnet))
8415
8416(define-public python-icalendar
8417 (package
8418 (name "python-icalendar")
43ae8f79 8419 (version "4.0.4")
44d10b1f
RW
8420 (source (origin
8421 (method url-fetch)
8422 (uri (pypi-uri "icalendar" version))
8423 (sha256
8424 (base32
43ae8f79 8425 "16gjvqv0n05jrb9g228pdjgzd3amz2pdhvcgsn1jypszjg5m2w9l"))))
44d10b1f
RW
8426 (build-system python-build-system)
8427 (propagated-inputs
8428 `(("python-dateutil" ,python-dateutil)
8429 ("python-pytz" ,python-pytz)))
8430 (synopsis "Python library for parsing iCalendar files")
8431 (description "The icalendar package is a parser/generator of iCalendar
8432files for use with Python.")
8433 (home-page "https://github.com/collective/icalendar")
8434 (license license:bsd-2)))
8435
44d10b1f
RW
8436(define-public python-args
8437 (package
8438 (name "python-args")
8439 (version "0.1.0")
8440 (source (origin
8441 (method url-fetch)
8442 (uri (pypi-uri "args" version))
8443 (sha256
8444 (base32
8445 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
8446 (build-system python-build-system)
8447 (home-page "https://github.com/kennethreitz/args")
8448 (synopsis "Command-line argument parser")
8449 (description
8450 "This library provides a Python module to parse command-line arguments.")
8451 (license license:bsd-3)))
8452
8453(define-public python2-args
8454 (package-with-python2 python-args))
8455
8456(define-public python-clint
8457 (package
8458 (name "python-clint")
8459 (version "0.5.1")
8460 (source (origin
8461 (method url-fetch)
8462 (uri (pypi-uri "clint" version))
8463 (sha256
8464 (base32
8465 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
8466 (build-system python-build-system)
8467 (arguments
8468 '(#:phases
8469 (modify-phases %standard-phases
8470 (replace 'check
8471 (lambda _ (invoke "py.test" "-v"))))))
8472 (native-inputs
8473 `(("python-pytest" ,python-pytest)))
8474 (propagated-inputs
8475 `(("python-args" ,python-args)))
8476 (home-page "https://github.com/kennethreitz/clint")
8477 (synopsis "Command-line interface tools")
8478 (description
8479 "Clint is a Python module filled with a set of tools for developing
8480command-line applications, including tools for colored and indented
8481output, progress bar display, and pipes.")
8482 (license license:isc)))
8483
8484(define-public python2-clint
8485 (package-with-python2 python-clint))
8486
44d10b1f
RW
8487(define-public python-rply
8488 (package
8489 (name "python-rply")
8490 (version "0.7.5")
8491 (source (origin
8492 (method url-fetch)
8493 (uri (pypi-uri "rply" version))
8494 (sha256
8495 (base32
8496 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
8497 (build-system python-build-system)
8498 (propagated-inputs
8499 `(("python-appdirs" ,python-appdirs)))
8500 (home-page "https://github.com/alex/rply")
8501 (synopsis "Parser generator for Python")
8502 (description
8503 "This package provides a pure Python based parser generator, that also
8504works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
8505with a new public API, and RPython support.")
8506 (license license:bsd-3)))
8507
8508(define-public python2-rply
8509 (package-with-python2 python-rply))
8510
8511(define-public python-hy
8512 (package
8513 (name "python-hy")
8514 (version "0.13.0")
8515 (source (origin
8516 (method url-fetch)
8517 (uri (pypi-uri "hy" version))
8518 (sha256
8519 (base32
8520 "19sfymaksx9jhksfnb15ahid46mzrhdfzz6yy2craz2qnzvpmky8"))))
8521 (build-system python-build-system)
8522 (arguments
8523 '(#:phases
8524 (modify-phases %standard-phases
6ba6a1c1
JG
8525 (add-before 'install 'set-HOME
8526 (lambda _
8527 (setenv "HOME" "/tmp")))
44d10b1f
RW
8528 (replace 'check
8529 (lambda _
8530 ;; Tests require write access to HOME.
8531 (setenv "HOME" "/tmp")
8532 (invoke "nosetests"))))))
8533 (native-inputs
8534 `(("python-coverage" ,python-coverage)
8535 ("python-nose" ,python-nose)))
8536 (propagated-inputs
8537 `(("python-astor" ,python-astor)
8538 ("python-clint" ,python-clint)
8539 ("python-rply" ,python-rply)))
8540 (home-page "http://hylang.org/")
8541 (synopsis "Lisp frontend to Python")
8542 (description
8543 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
8544its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
8545Python at your fingertips, in Lisp form.")
8546 (license license:expat)))
8547
8548(define-public python2-hy
8549 (package-with-python2 python-hy))
8550
8551(define-public python2-functools32
8552 (package
8553 (name "python2-functools32")
8554 (version "3.2.3-2")
8555 (source
8556 (origin
8557 (method url-fetch)
8558 (uri (pypi-uri "functools32" version))
8559 (sha256
8560 (base32
8561 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
8562 (build-system python-build-system)
8563 (arguments
8564 `(#:python ,python-2
8565 #:tests? #f)) ; no test target
8566 (home-page "https://github.com/MiCHiLU/python-functools32")
8567 (synopsis
8568 "Backport of the functools module from Python 3.2.3")
8569 (description
8570 "This package is a backport of the @code{functools} module from Python
85713.2.3 for use with older versions of Python and PyPy.")
8572 (license license:expat)))
8573
8574(define-public python2-subprocess32
8575 (package
8576 (name "python2-subprocess32")
8577 (version "3.2.7")
8578 (source (origin
8579 (method url-fetch)
8580 (uri (pypi-uri "subprocess32" version))
8581 (sha256
8582 (base32
8583 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
8584 (patches
8585 (search-patches "python2-subprocess32-disable-input-test.patch"))))
8586 (build-system python-build-system)
8587 (arguments
8588 `(#:python ,python-2
8589 ;; The test suite fails with Python > 2.7.13:
8590 ;; import test.support
8591 ;; ImportError: No module named support
8592 #:tests? #f
8593 #:phases
8594 (modify-phases %standard-phases
8595 (add-after 'unpack 'patch-/bin/sh
8596 (lambda _
8597 (substitute* '("subprocess32.py"
8598 "test_subprocess32.py")
8599 (("/bin/sh") (which "sh")))
8600 #t)))))
8601 (home-page "https://github.com/google/python-subprocess32")
8602 (synopsis "Backport of the subprocess module from Python 3.2")
8603 (description
8604 "This is a backport of the @code{subprocess} standard library module
8605from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
8606new features. On POSIX systems it is guaranteed to be reliable when used
8607in threaded applications. It includes timeout support from Python 3.3 but
8608otherwise matches 3.2’s API.")
8609 (license license:psfl)))
8610
8611(define-public python2-futures
8612 (package
8613 (name "python2-futures")
8614 (version "3.2.0")
8615 (source
8616 (origin
8617 (method url-fetch)
8618 (uri (pypi-uri "futures" version))
8619 (sha256
8620 (base32
8621 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
8622 (build-system python-build-system)
ba88eea2
RW
8623 (arguments
8624 `(#:python ,python-2
8625 #:phases
8626 (modify-phases %standard-phases
8627 (replace 'check
8628 (lambda _
8629 (invoke "python" "test_futures.py")
8630 #t)))))
44d10b1f
RW
8631 (home-page "https://github.com/agronholm/pythonfutures")
8632 (synopsis
8633 "Backport of the concurrent.futures package from Python 3.2")
8634 (description
8635 "The concurrent.futures module provides a high-level interface for
8636asynchronously executing callables. This package backports the
8637concurrent.futures package from Python 3.2")
8638 (license license:bsd-3)))
8639
8640(define-public python-promise
8641 (package
8642 (name "python-promise")
8643 (version "0.4.2")
8644 (source
8645 (origin
8646 (method url-fetch)
8647 (uri (pypi-uri "promise" version))
8648 (sha256
8649 (base32
8650 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
8651 (build-system python-build-system)
8652 ;; Tests wants python-futures, which is a python2 only program, and
8653 ;; can't be found by python-promise at test time.
8654 (arguments `(#:tests? #f))
8655 (home-page "https://github.com/syrusakbary/promise")
8656 (synopsis "Promises/A+ implementation for Python")
8657 (description
8658 "Promises/A+ implementation for Python")
8659 (properties `((python2-variant . ,(delay python2-promise))))
8660 (license license:expat)))
8661
8662(define-public python2-promise
8663 (let ((promise (package-with-python2
8664 (strip-python2-variant python-promise))))
8665 (package (inherit promise)
8666 (arguments (substitute-keyword-arguments (package-arguments promise)
8667 ((#:tests? _) #t)))
8668 (native-inputs
8669 `(("python2-futures" ,python2-futures)
8670 ("python2-pytest" ,python2-pytest)
8671 ,@(package-native-inputs promise))))))
8672
d71d85cd
RW
8673(define-public python-progressbar33
8674 (package
8675 (name "python-progressbar33")
8676 (version "2.4")
8677 (source
8678 (origin
8679 (method url-fetch)
8680 (uri (pypi-uri "progressbar33" version))
8681 (sha256
8682 (base32
8683 "1zvf6zs5hzrc03p9nfs4p16vhilqikycvv1yk0pxn8s07fdhvzji"))))
8684 (build-system python-build-system)
8685 (home-page "http://github.com/germangh/python-progressbar")
8686 (synopsis "Text progress bar library for Python")
8687 (description
8688 "This package provides a text progress bar library for Python. This
8689version only differs from the original @code{progressbar} package in that it
8690uses relative package imports instead of absolute imports, which is necessary
8691for the module to work under Python 3.3.")
8692 ;; Either or both of these licenses may be selected.
8693 (license (list license:lgpl2.1+ license:bsd-3))))
8694
44d10b1f
RW
8695(define-public python-colorama
8696 (package
8697 (name "python-colorama")
8698 (version "0.3.9")
8699 (source
8700 (origin
8701 (method url-fetch)
8702 (uri (pypi-uri "colorama" version))
8703 (sha256
8704 (base32
8705 "1wd1szk0z3073ghx26ynw43gnc140ibln1safgsis6s6z3s25ss8"))))
8706 (build-system python-build-system)
8707 (synopsis "Colored terminal text rendering for Python")
8708 (description "Colorama is a Python library for rendering colored terminal
8709text.")
8710 (home-page "https://pypi.python.org/pypi/colorama")
8711 (license license:bsd-3)))
8712
8713(define-public python2-colorama
8714 (package-with-python2 python-colorama))
8715
8716(define-public python-rsa
8717 (package
8718 (name "python-rsa")
8719 (version "3.4.2")
8720 (source
8721 (origin
8722 (method url-fetch)
8723 (uri (pypi-uri "rsa" version))
8724 (sha256
8725 (base32
8726 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
8727 (build-system python-build-system)
8728 (propagated-inputs
8729 `(("python-pyasn1" ,python-pyasn1)))
8730 (synopsis "Pure-Python RSA implementation")
8731 (description "Python-RSA is a pure-Python RSA implementation. It supports
8732encryption and decryption, signing and verifying signatures, and key
8733generation according to PKCS#1 version 1.5. It can be used as a Python
8734library as well as on the command line.")
8735 (home-page "https://stuvel.eu/rsa")
8736 (license license:asl2.0)))
8737
8738(define-public python2-rsa
8739 (package-with-python2 python-rsa))
8740
8741(define-public python-pluggy
8742 (package
8743 (name "python-pluggy")
e5731c03 8744 (version "0.11.0")
44d10b1f
RW
8745 (source
8746 (origin
8747 (method url-fetch)
8748 (uri (pypi-uri "pluggy" version))
8749 (sha256
8750 (base32
e5731c03 8751 "10511a54dvafw1jrk75mrhml53c7b7w4yaw7241696lc2hfvr895"))))
44d10b1f
RW
8752 (build-system python-build-system)
8753 (native-inputs
8754 `(("python-setuptools-scm" ,python-setuptools-scm)))
8755 (synopsis "Plugin and hook calling mechanism for Python")
8756 (description "Pluggy is an extraction of the plugin manager as used by
8757Pytest but stripped of Pytest specific details.")
8758 (home-page "https://pypi.python.org/pypi/pluggy")
8759 (license license:expat)))
8760
8761(define-public python2-pluggy
8762 (package-with-python2 python-pluggy))
8763
8764(define-public python-tox
8765 (package
8766 (name "python-tox")
8767 (version "2.8.1")
8768 (source
8769 (origin
8770 (method url-fetch)
8771 (uri (pypi-uri "tox" version))
8772 (sha256
8773 (base32
8774 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
8775 (build-system python-build-system)
8776 (arguments
8777 ;; FIXME: Tests require pytest-timeout, which itself requires
8778 ;; pytest>=2.8.0 for installation.
8779 '(#:tests? #f))
8780 (propagated-inputs
8781 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
8782 ("python-py" ,python-py)
8783 ("python-virtualenv" ,python-virtualenv)))
8784 (native-inputs
8785 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
8786 ("python-pytest" ,python-pytest) ; >= 2.3.5
8787 ("python-setuptools-scm" ,python-setuptools-scm)))
8788 (home-page "http://tox.testrun.org/")
8789 (synopsis "Virtualenv-based automation of test activities")
8790 (description "Tox is a generic virtualenv management and test command line
8791tool. It can be used to check that a package installs correctly with
8792different Python versions and interpreters, or run tests in each type of
8793supported environment, or act as a frontend to continuous integration
8794servers.")
8795 (license license:expat)))
8796
8797(define-public python2-tox
8798 (package-with-python2 python-tox))
8799
8800(define-public python-jmespath
8801 (package
8802 (name "python-jmespath")
27fb781f 8803 (version "0.9.4")
44d10b1f
RW
8804 (source
8805 (origin
8806 (method url-fetch)
8807 (uri (pypi-uri "jmespath" version))
8808 (sha256
8809 (base32
27fb781f 8810 "0k0765x1mybcrzajh3hiqkl8sy9hs0bmn4900frxy0j3ykvaxqmx"))))
44d10b1f
RW
8811 (build-system python-build-system)
8812 (native-inputs
8813 `(("python-nose" ,python-nose)))
8814 (synopsis "JSON Matching Expressions")
8815 (description "JMESPath (pronounced “james path”) is a Python library that
8816allows one to declaratively specify how to extract elements from a JSON
8817document.")
8818 (home-page "https://github.com/jmespath/jmespath.py")
8819 (license license:expat)))
8820
8821(define-public python2-jmespath
8822 (package-with-python2 python-jmespath))
8823
8824(define-public python-botocore
8825 (package
7bcf827c
RW
8826 (name "python-botocore")
8827 (version "1.12.149")
8828 (source
8829 (origin
8830 (method url-fetch)
8831 (uri (pypi-uri "botocore" version))
8832 (sha256
8833 (base32
8834 "12597f74khp3ngwr282cb949w0gcqj20rkfc3x275dijavyy5cmf"))))
8835 (build-system python-build-system)
8836 (arguments
8837 ;; FIXME: Many tests are failing.
8838 '(#:tests? #f))
8839 (propagated-inputs
8840 `(("python-dateutil" ,python-dateutil)
8841 ("python-docutils" ,python-docutils)
8842 ("python-jmespath" ,python-jmespath)))
8843 (native-inputs
8844 `(("python-mock" ,python-mock)
8845 ("python-nose" ,python-nose)
8846 ("behave" ,behave)
8847 ("python-tox" ,python-tox)
8848 ("python-urllib3" ,python-urllib3)
8849 ("python-wheel" ,python-wheel)))
8850 (home-page "https://github.com/boto/botocore")
8851 (synopsis "Low-level interface to AWS")
8852 (description "Botocore is a Python library that provides a low-level
44d10b1f 8853interface to the Amazon Web Services (AWS) API.")
7bcf827c 8854 (license license:asl2.0)))
44d10b1f
RW
8855
8856(define-public python2-botocore
8857 (package-with-python2 python-botocore))
8858
8859(define-public python-xdo
8860 (package
8861 (name "python-xdo")
8862 (version "0.3")
8863 (source (origin
8864 (method url-fetch)
8865 (uri (string-append
8866 "http://http.debian.net/debian/pool/main/p/python-xdo/"
8867 "python-xdo_" version ".orig.tar.gz"))
8868 (sha256
8869 (base32
8870 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
8871 (build-system python-build-system)
8872 (arguments
8873 '(#:phases
8874 (modify-phases %standard-phases
8875 (add-before 'install 'patch-libxdo-path
8876 ;; Hardcode the path of dynamically loaded libxdo library.
8877 (lambda* (#:key inputs #:allow-other-keys)
8878 (let ((libxdo (string-append
8879 (assoc-ref inputs "xdotool")
8880 "/lib/libxdo.so")))
8881 (substitute* "xdo/_xdo.py"
8882 (("find_library\\(\"xdo\"\\)")
8883 (simple-format #f "\"~a\"" libxdo)))
8884 #t))))
8885 #:tests? #f)) ; no tests provided
8886 (propagated-inputs
8887 `(("python-six" ,python-six)))
8888 (inputs
8889 `(("xdotool" ,xdotool)
8890 ("libX11" ,libx11)))
8891 (home-page "https://tracker.debian.org/pkg/python-xdo")
8892 (synopsis "Python library for simulating X11 keyboard/mouse input")
8893 (description "Provides bindings to libxdo for manipulating X11 via simulated
8894input. (Note that this is mostly a legacy library; you may wish to look at
8895python-xdo for newer bindings.)")
8896 (license license:bsd-3)))
8897
8898(define-public python2-xdo
8899 (package-with-python2 python-xdo))
8900
8901(define-public python-mako
8902 (package
8903 (name "python-mako")
6bf53ad5 8904 (version "1.1.0")
44d10b1f
RW
8905 (source
8906 (origin
8907 (method url-fetch)
8908 (uri (pypi-uri "Mako" version))
8909 (sha256
8910 (base32
6bf53ad5 8911 "0jqa3qfpykyn4fmkn0kh6043sfls7br8i2bsdbccazcvk9cijsd3"))))
44d10b1f 8912 (build-system python-build-system)
6bf53ad5
MB
8913 (arguments
8914 `(#:phases (modify-phases %standard-phases
8915 (replace 'check
8916 (lambda _
8917 (invoke "pytest" "-vv"))))))
44d10b1f
RW
8918 (propagated-inputs
8919 `(("python-markupsafe" ,python-markupsafe)))
8920 (native-inputs
8921 `(("python-mock" ,python-mock)
44d10b1f 8922 ("python-pytest" ,python-pytest)))
7016e620 8923 (home-page "https://www.makotemplates.org/")
44d10b1f
RW
8924 (synopsis "Templating language for Python")
8925 (description "Mako is a templating language for Python that compiles
8926templates into Python modules.")
8927 (license license:expat)))
8928
8929(define-public python2-mako
8930 (package-with-python2 python-mako))
8931
8932(define-public python-waitress
8933 (package
8934 (name "python-waitress")
8935 (version "1.1.0")
8936 (source
8937 (origin
8938 (method url-fetch)
8939 (uri (pypi-uri "waitress" version))
8940 (patches (search-patches "python-waitress-fix-tests.patch"))
8941 (sha256
8942 (base32
8943 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
8944 (build-system python-build-system)
8945 (home-page "https://github.com/Pylons/waitress")
8946 (synopsis "Waitress WSGI server")
8947 (description "Waitress is meant to be a production-quality pure-Python WSGI
8948server with very acceptable performance.")
8949 (license license:zpl2.1)))
8950
8951(define-public python2-waitress
8952 (package-with-python2 python-waitress))
8953
b2b23d12
TLC
8954(define-public python-whichcraft
8955 (package
8956 (name "python-whichcraft")
8957 (version "0.6.1")
8958 (source
8959 (origin
8960 (method url-fetch)
8961 (uri (pypi-uri "whichcraft" version))
8962 (sha256
8963 (base32
8964 "11yfkzyplizdgndy34vyd5qlmr1n5mxis3a3svxmx8fnccdvknxc"))))
8965 (build-system python-build-system)
8966 (native-inputs
8967 `(("python-pytest" ,python-pytest)))
8968 (home-page "https://github.com/pydanny/whichcraft")
8969 (synopsis "Cross-platform cross-python shutil.which functionality")
8970 (description
8971 "This package provides a shim of the shutil.which function that's
8972designed to work across multiple versions of Python.")
8973 (license license:bsd-3)))
8974
1133ca44
TLC
8975(define-public python-cookiecutter
8976 (package
8977 (name "python-cookiecutter")
8978 (version "1.6.0")
8979 (source
8980 (origin
8981 (method url-fetch)
8982 (uri (pypi-uri "cookiecutter" version))
8983 (sha256
8984 (base32
8985 "0glsvaz8igi2wy1hsnhm9fkn6560vdvdixzvkq6dn20z3hpaa5hk"))))
8986 (build-system python-build-system)
8987 (native-inputs
8988 `(("python-freezegun" ,python-freezegun)
8989 ("python-pytest" ,python-pytest)
8990 ("python-pytest-catchlog" ,python-pytest-catchlog)
8991 ("python-pytest-cov" ,python-pytest-cov)
8992 ("python-pytest-mock" ,python-pytest-mock)))
8993 (propagated-inputs
8994 `(("python-binaryornot" ,python-binaryornot)
8995 ("python-click" ,python-click)
8996 ("python-future" ,python-future)
8997 ("python-jinja2" ,python-jinja2)
8998 ("python-jinja2-time" ,python-jinja2-time)
8999 ("python-poyo" ,python-poyo)
9000 ("python-requests" ,python-requests)
9001 ("python-whichcraft" ,python-whichcraft)))
9002 (home-page "https://github.com/audreyr/cookiecutter")
9003 (synopsis
9004 "Command-line utility that creates projects from project templates")
9005 (description
9006 "This package provides a command-line utility that creates projects from
9007project templates, e.g. creating a Python package project from a Python package
9008project template.")
9009 (license license:bsd-3)))
9010
44d10b1f
RW
9011(define-public python-pyquery
9012 (package
9013 (name "python-pyquery")
9014 (version "1.2.17")
9015 (source
9016 (origin
9017 (method url-fetch)
9018 (uri (pypi-uri "pyquery" version))
9019 (sha256
9020 (base32
9021 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
9022 (build-system python-build-system)
9023 (native-inputs
9024 `(("python-webob" ,python-webob)
9025 ("python-webtest" ,python-webtest)))
9026 (propagated-inputs
9027 `(("python-lxml" ,python-lxml)
9028 ("python-cssselect" ,python-cssselect)))
9029 (home-page "https://github.com/gawel/pyquery")
9030 (synopsis "Make jQuery-like queries on xml documents")
9031 (description "pyquery allows you to make jQuery queries on xml documents.
9032The API is as much as possible the similar to jQuery. pyquery uses lxml for
9033fast xml and html manipulation.")
9034 (license license:bsd-3)))
9035
44d10b1f
RW
9036(define-public python-anyjson
9037 (package
9038 (name "python-anyjson")
9039 (version "0.3.3")
9040 (source
9041 (origin
9042 (method url-fetch)
9043 (uri (pypi-uri "anyjson" version))
9044 (sha256
9045 (base32
9046 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
9047 (build-system python-build-system)
9048 (arguments
9049 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
9050 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
9051 ;; whatever) so this transformation needs to be done before the tests
9052 ;; can be run. Maybe we could add a build step to transform beforehand
9053 ;; but it could be annoying/difficult.
9054 ;; We can enable tests for the Python 2 version, though, and do below.
9055 #:tests? #f))
9056 (home-page "https://bitbucket.org/runeh/anyjson/")
9057 (synopsis
9058 "Wraps best available JSON implementation in a common interface")
9059 (description
9060 "Anyjson loads whichever is the fastest JSON module installed
9061and provides a uniform API regardless of which JSON implementation is used.")
9062 (license license:bsd-3)
9063 (properties `((python2-variant . ,(delay python2-anyjson))))))
9064
9065(define-public python2-anyjson
9066 (let ((anyjson (package-with-python2
9067 (strip-python2-variant python-anyjson))))
9068 (package
9069 (inherit anyjson)
9070 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
9071 #:tests? #t
9072 ,@(package-arguments anyjson)))
9073 (native-inputs `(("python2-nose" ,python2-nose))))))
9074
9075(define-public python-amqp
9076 (package
9077 (name "python-amqp")
9078 (version "2.3.2")
9079 (source
9080 (origin
9081 (method url-fetch)
9082 (uri (pypi-uri "amqp" version))
9083 (sha256
9084 (base32
9085 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
9086 (build-system python-build-system)
9087 (native-inputs
9088 `(("python-case" ,python-case)
9089 ("python-pytest-sugar" ,python-pytest-sugar)
9090 ("python-mock" ,python-mock)))
9091 (propagated-inputs
9092 `(("python-vine" ,python-vine)))
9093 (home-page "https://github.com/celery/py-amqp")
9094 (synopsis
9095 "Low-level AMQP client for Python (fork of amqplib)")
9096 (description
9097 "This is a fork of amqplib which was originally written by Barry Pederson.
9098It is maintained by the Celery project, and used by kombu as a pure python
9099alternative when librabbitmq is not available.")
9100 (license license:lgpl2.1+)
9101 (properties `((python2-variant . ,(delay python2-amqp))))))
9102
9103(define-public python2-amqp
9104 (let ((amqp (package-with-python2
9105 (strip-python2-variant python-amqp))))
9106 (package
9107 (inherit amqp)
9108 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
9109 ;; unmaintained. Weirdly, does not do this on the python 3
9110 ;; version?
9111 #:tests? #f
9112 ,@(package-arguments amqp))))))
9113
9114(define-public python-txamqp
9115 (package
9116 (name "python-txamqp")
9117 (version "0.8.2")
9118 (source
9119 (origin
9120 (method url-fetch)
9121 (uri (pypi-uri "txAMQP" version))
9122 (sha256
9123 (base32
9124 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
9125 (build-system python-build-system)
9126 (propagated-inputs
9127 `(("python-six" ,python-six)
9128 ("python-twisted" ,python-twisted)))
9129 (home-page "https://github.com/txamqp/txamqp")
9130 (synopsis "Communicate with AMQP peers and brokers using Twisted")
9131 (description
9132 "This package provides a Python library for communicating with AMQP peers
9133and brokers using the asynchronous networking framework Twisted. It contains
9134all the necessary code to connect, send and receive messages to/from an
9135AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
9136also includes support for using Thrift RPC over AMQP in Twisted
9137applications.")
9138 (license license:asl2.0)))
9139
9140(define-public python2-txamqp
9141 (package-with-python2 python-txamqp))
9142
9143(define-public python-kombu
9144 (package
9145 (name "python-kombu")
9146 (version "4.2.2")
9147 (source
9148 (origin
9149 (method url-fetch)
9150 (uri (pypi-uri "kombu" version))
9151 (sha256
9152 (base32
9153 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
9154 (build-system python-build-system)
9155 (native-inputs
9156 `(("python-mock" ,python-mock)
9157 ("python-case" ,python-case)
9158 ("python-pyro4" ,python-pyro4)
9159 ("python-pytest-sugar" ,python-pytest-sugar)
9160 ("python-pytz" ,python-pytz)))
9161 (propagated-inputs
9162 `(("python-anyjson" ,python-anyjson)
9163 ("python-amqp" ,python-amqp)
9164 ("python-redis" ,python-redis)))
9165 (home-page "https://kombu.readthedocs.io")
9166 (synopsis "Message passing library for Python")
9167 (description "The aim of Kombu is to make messaging in Python as easy as
9168possible by providing an idiomatic high-level interface for the AMQ protocol,
9169and also provide proven and tested solutions to common messaging problems.
9170AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
9171message orientation, queuing, routing, reliability and security, for which the
9172RabbitMQ messaging server is the most popular implementation.")
9173 (license license:bsd-3)
9174 (properties `((python2-variant . ,(delay python2-kombu))))))
9175
9176(define-public python2-kombu
9177 (let ((kombu (package-with-python2
9178 (strip-python2-variant python-kombu))))
9179 (package
9180 (inherit kombu)
9181 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
9182 ;; It works fine on the python3 variant.
9183 #:tests? #f
9184 ,@(package-arguments kombu)))
9185 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9186 ,@(package-native-inputs kombu))))))
9187
9188(define-public python-billiard
9189 (package
9190 (name "python-billiard")
9191 (version "3.5.0.5")
9192 (source
9193 (origin
9194 (method url-fetch)
9195 (uri (pypi-uri "billiard" version))
9196 (sha256
9197 (base32
9198 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
9199 (build-system python-build-system)
9200 (native-inputs
9201 `(("python-case" ,python-case)
9202 ("python-pytest" ,python-pytest)))
9203 (home-page "https://github.com/celery/billiard")
9204 (synopsis
9205 "Python multiprocessing fork with improvements and bugfixes")
9206 (description
9207 "Billiard is a fork of the Python 2.7 multiprocessing package. The
9208multiprocessing package itself is a renamed and updated version of R Oudkerk's
9209pyprocessing package. This standalone variant is intended to be compatible with
9210Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
9211 (license license:bsd-3)
9212 (properties `((python2-variant . ,(delay python2-billiard))))))
9213
9214(define-public python2-billiard
9215 (let ((billiard (package-with-python2
9216 (strip-python2-variant python-billiard))))
9217 (package
9218 (inherit billiard)
9219 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9220 ("python2-mock" ,python2-mock)
9221 ,@(package-native-inputs billiard))))))
9222
9223(define-public python-celery
9224 (package
9225 (name "python-celery")
9226 (version "4.2.1")
9227 (source
9228 (origin
9229 (method url-fetch)
9230 (uri (pypi-uri "celery" version))
9231 (sha256
9232 (base32
9233 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
9234 (build-system python-build-system)
9235 (arguments
9236 '(;; TODO The tests fail with Python 3.7
9237 ;; https://github.com/celery/celery/issues/4849
9238 #:tests? #f
9239 #:phases
9240 (modify-phases %standard-phases
9241 (add-after 'unpack 'patch-requirements
9242 (lambda _
9243 (substitute* "requirements/test.txt"
9244 (("pytest>=3\\.0,<3\\.3")
9245 "pytest>=3.0"))
9246 #t)))))
9247 (native-inputs
9248 `(("python-case" ,python-case)
9249 ("python-pytest" ,python-pytest)))
9250 (propagated-inputs
9251 `(("python-pytz" ,python-pytz)
9252 ("python-billiard" ,python-billiard)
9253 ("python-kombu" ,python-kombu)))
9254 (home-page "https://celeryproject.org")
9255 (synopsis "Distributed Task Queue")
9256 (description "Celery is an asynchronous task queue/job queue based on
9257distributed message passing. It is focused on real-time operation, but
9258supports scheduling as well. The execution units, called tasks, are executed
9259concurrently on a single or more worker servers using multiprocessing,
9260Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
9261synchronously (wait until ready).")
9262 (license license:bsd-3)
9263 (properties `((python2-variant . ,(delay python2-celery))))))
9264
9265(define-public python2-celery
9266 (let ((celery (package-with-python2
9267 (strip-python2-variant python-celery))))
9268 (package
9269 (inherit celery)
9270 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9271 ("python2-mock" ,python2-mock)
9272 ,@(package-native-inputs celery))))))
9273
9274(define-public python-translitcodec
9275 (package
9276 (name "python-translitcodec")
9277 (version "0.4.0")
9278 (source
9279 (origin
9280 (method url-fetch)
9281 (uri (pypi-uri "translitcodec" version))
9282 (sha256
9283 (base32
9284 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
9285 (build-system python-build-system)
9286 (arguments
9287 `(#:tests? #f)) ; no tests provided
9288 (home-page
9289 "https://github.com/claudep/translitcodec")
9290 (synopsis
9291 "Unicode to 8-bit charset transliteration codec")
9292 (description
9293 "This package contains codecs for transliterating ISO 10646 texts into
9294best-effort representations using smaller coded character sets (ASCII,
9295ISO 8859, etc.).")
9296 (license license:expat)))
9297
9298(define-public python2-translitcodec
9299 (package-with-python2 python-translitcodec))
9300
9301(define-public python-editor
9302 (package
9303 (name "python-editor")
9304 (version "0.5")
9305 (source
9306 (origin
9307 (method url-fetch)
9308 (uri (pypi-uri "python-editor" version))
9309 (sha256
9310 (base32
9311 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
9312 (build-system python-build-system)
9313 (home-page
9314 "https://github.com/fmoo/python-editor")
9315 (synopsis
9316 "Programmatically open an editor, capture the result")
9317 (description
9318 "python-editor is a library that provides the editor module for
9319programmatically interfacing with your system's $EDITOR.")
9320 (license license:asl2.0)))
9321
9322(define-public python2-editor
9323 (package-with-python2 python-editor))
9324
44d10b1f
RW
9325(define-public python-vobject
9326 (package
9327 (name "python-vobject")
9328 (version "0.9.5")
9329 (source (origin
9330 (method url-fetch)
9331 (uri (pypi-uri "vobject" version))
9332 (sha256
9333 (base32
9334 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
9335 (build-system python-build-system)
9336 (arguments
9337 '(;; The test suite relies on some non-portable Windows interfaces.
9338 #:tests? #f))
9339 (propagated-inputs
9340 `(("python-dateutil" ,python-dateutil)
9341 ("python-pyicu" ,python-pyicu)))
9342 (synopsis "Parse and generate vCard and vCalendar files")
9343 (description "Vobject is intended to be a full featured Python package for
9344parsing and generating vCard and vCalendar files. Currently, iCalendar files
9345are supported and well tested. vCard 3.0 files are supported, and all data
9346should be imported, but only a few components are understood in a sophisticated
9347way.")
9348 (home-page "http://eventable.github.io/vobject/")
9349 (license license:asl2.0)))
9350
9351(define-public python2-vobject
9352 (package-with-python2 python-vobject))
9353
9354(define-public python-munkres
9355 (package
9356 (name "python-munkres")
9357 (version "1.0.8")
9358 (source (origin
9359 (method url-fetch)
9360 (uri (pypi-uri "munkres" version))
9361 (sha256
9362 (base32
9363 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
9364 (build-system python-build-system)
9365 (arguments
9366 '(#:tests? #f)) ; no test suite
9367 (home-page "http://software.clapper.org/munkres/")
9368 (synopsis "Implementation of the Munkres algorithm")
9369 (description "The Munkres module provides an implementation of the Munkres
9370algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
9371useful for solving the Assignment Problem.")
9372 (license license:bsd-3)))
9373
9374(define-public python2-munkres
9375 (package-with-python2 python-munkres))
9376
9377(define-public python-whoosh
9378 (package
9379 (name "python-whoosh")
9380 (version "2.7.4")
9381 (source
9382 (origin
9383 (method url-fetch)
9384 (uri (pypi-uri "Whoosh" version))
9385 (sha256
9386 (base32
9387 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
9388 (build-system python-build-system)
2679d9a4 9389 (arguments '(#:tests? #f)) ; Test invocation is no longer supported by Python.
44d10b1f
RW
9390 (native-inputs
9391 `(("python-pytest" ,python-pytest)))
9392 (home-page "https://bitbucket.org/mchaput/whoosh")
9393 (synopsis "Full text indexing, search, and spell checking library")
9394 (description
9395 "Whoosh is a fast, pure-Python full text indexing, search, and spell
9396checking library.")
9397 (license license:bsd-2)))
9398
9399(define-public python2-whoosh
9400 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
9401 (package (inherit whoosh)
9402 (propagated-inputs
9403 `(("python2-backport-ssl-match-hostname"
9404 ,python2-backport-ssl-match-hostname)
9405 ,@(package-propagated-inputs whoosh))))))
9406
9407(define-public python-pathlib
9408 (package
9409 (name "python-pathlib")
9410 (version "1.0.1")
9411 (source (origin
9412 (method url-fetch)
9413 (uri (pypi-uri "pathlib" version))
9414 (sha256
9415 (base32
9416 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
9417 (build-system python-build-system)
9418 ;; The tests depend on the internal "test" module, which does not provide
9419 ;; a stable interface.
9420 (arguments `(#:tests? #f))
9421 (home-page "https://pathlib.readthedocs.org/")
9422 (synopsis "Object-oriented file system paths")
9423 (description "Pathlib offers a set of classes to handle file system paths.
9424It offers the following advantages over using string objects:
9425
9426@enumerate
9427@item No more cumbersome use of os and os.path functions. Everything can
9428be done easily through operators, attribute accesses, and method calls.
9429@item Embodies the semantics of different path types. For example,
9430comparing Windows paths ignores casing.
9431@item Well-defined semantics, eliminating any inconsistencies or
9432ambiguities (forward vs. backward slashes, etc.).
9433@end enumerate
9434
9435Note: In Python 3.4, pathlib is now part of the standard library. For other
9436Python versions please consider python-pathlib2 instead, which tracks the
9437standard library module. This module (python-pathlib) isn't maintained
9438anymore.")
9439 (license license:expat)))
9440
9441(define-public python2-pathlib
9442 (package-with-python2 python-pathlib))
9443
9444(define-public python2-pathlib2
9445 (package
9446 (name "python2-pathlib2")
54da6f9f 9447 (version "2.3.3")
44d10b1f
RW
9448 (source (origin
9449 (method url-fetch)
9450 (uri (pypi-uri "pathlib2" version))
9451 (sha256
9452 (base32
54da6f9f 9453 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
44d10b1f
RW
9454 (build-system python-build-system)
9455 ;; We only need the the Python 2 variant, since for Python 3 our minimum
9456 ;; version is 3.4 which already includes this package as part of the
9457 ;; standard library.
9458 (arguments
9459 `(#:python ,python-2))
9460 (propagated-inputs
9461 `(("python2-scandir" ,python2-scandir)
9462 ("python2-six" ,python2-six)))
9463 (home-page "https://pypi.python.org/pypi/pathlib2/")
9464 (synopsis "Object-oriented file system paths - backport of standard
9465pathlib module")
9466 (description "The goal of pathlib2 is to provide a backport of standard
9467pathlib module which tracks the standard library module, so all the newest
9468features of the standard pathlib can be used also on older Python versions.
9469
9470Pathlib offers a set of classes to handle file system paths. It offers the
9471following advantages over using string objects:
9472
9473@enumerate
9474@item No more cumbersome use of os and os.path functions. Everything can
9475be done easily through operators, attribute accesses, and method calls.
9476@item Embodies the semantics of different path types. For example,
9477comparing Windows paths ignores casing.
9478@item Well-defined semantics, eliminating any inconsistencies or
9479ambiguities (forward vs. backward slashes, etc.).
9480@end enumerate")
9481 (license license:expat)))
9482
9483(define-public python2-pathlib2-bootstrap
9484 (hidden-package
9485 (package
9486 (inherit python2-pathlib2)
9487 (name "python2-pathlib2-bootstrap")
9488 (propagated-inputs
9489 `(("python2-scandir" ,python2-scandir)
9490 ("python2-six" ,python2-six-bootstrap))))))
9491
9492(define-public python-jellyfish
9493 (package
9494 (name "python-jellyfish")
9495 (version "0.5.6")
9496 (source (origin
9497 (method url-fetch)
9498 (uri (pypi-uri "jellyfish" version))
9499 (sha256
9500 (base32
9501 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
9502 (build-system python-build-system)
9503 (native-inputs
9504 `(("python-pytest" ,python-pytest)))
9505 (home-page "https://github.com/jamesturk/jellyfish")
9506 (synopsis "Approximate and phonetic matching of strings")
9507 (description "Jellyfish uses a variety of string comparison and phonetic
9508encoding algorithms to do fuzzy string matching.")
9509 (license license:bsd-2)
9510 (properties `((python2-variant . ,(delay python2-jellyfish))))))
9511
9512(define-public python2-jellyfish
9513 (let ((jellyfish (package-with-python2
9514 (strip-python2-variant python-jellyfish))))
9515 (package (inherit jellyfish)
9516 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
9517 ,@(package-native-inputs jellyfish))))))
9518
9519(define-public python2-unicodecsv
9520 (package
9521 (name "python2-unicodecsv")
9522 (version "0.14.1")
9523 (source (origin
9524 (method url-fetch)
9525 ;; The test suite is not included in the PyPi release.
9526 ;; https://github.com/jdunck/python-unicodecsv/issues/19
9527 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
9528 "archive/" version ".tar.gz"))
9529 (file-name (string-append name "-" version ".tar.gz"))
9530 (sha256
9531 (base32
9532 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
9533 (build-system python-build-system)
9534 (arguments
9535 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
9536 #:python ,python-2))
9537 (native-inputs
9538 `(("python2-unittest2" ,python2-unittest2)))
9539 (home-page "https://github.com/jdunck/python-unicodecsv")
9540 (synopsis "Unicode CSV module for Python 2")
9541 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
9542module, adding support for Unicode strings.")
9543 (license license:bsd-2)))
9544
9545(define-public python-rarfile
9546 (package
9547 (name "python-rarfile")
9548 (version "2.8")
9549 (source (origin
9550 (method url-fetch)
9551 (uri (pypi-uri "rarfile" version))
9552 (sha256
9553 (base32
9554 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
9555 (build-system python-build-system)
9556 (arguments
9557 '(#:phases
9558 (modify-phases %standard-phases
9559 (replace 'check
9560 ;; Many tests fail, but the installation proceeds.
e59dd341 9561 (lambda _ (invoke "make" "-C" "test" "test"))))))
44d10b1f
RW
9562 (native-inputs
9563 `(("which" ,which))) ; required for tests
9564 (propagated-inputs
9565 `(("libarchive" ,libarchive)))
9566 (home-page "https://github.com/markokr/rarfile")
9567 (synopsis "RAR archive reader for Python")
9568 (description "This is Python module for RAR archive reading. The interface
9569is made as zipfile like as possible.")
9570 (license license:isc)))
9571
9572(define-public python2-rarfile
9573 (package-with-python2 python-rarfile))
9574
9575(define-public python-magic
9576 (package
9577 (name "python-magic")
9578 (version "0.4.15")
9579 (source
9580 (origin
9581 (method url-fetch)
9582 (uri (pypi-uri "python-magic" version))
9583 (sha256
9584 (base32
9585 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
9586 (file-name (string-append name "-" version "-checkout"))))
9587 (build-system python-build-system)
9588 (arguments
9589 ;; The tests are unreliable, so don't run them. The tests fail
9590 ;; under Python3 because they were written for Python2 and
9591 ;; contain import statements that do not work in Python3. One of
9592 ;; the tests fails under Python2 because its assertions are
9593 ;; overly stringent; it relies on comparing output strings which
9594 ;; are brittle and can change depending on the version of
9595 ;; libmagic being used and the system on which the test is
9596 ;; running. In my case, under GuixSD 0.10.0, only one test
9597 ;; failed, and it seems to have failed only because the version
9598 ;; of libmagic that is packaged in Guix outputs a slightly
9599 ;; different (but not wrong) string than the one that the test
9600 ;; expected.
9601 '(#:tests? #f
9602 #:phases (modify-phases %standard-phases
9603 ;; Replace a specific method call with a hard-coded
9604 ;; path to the necessary libmagic.so file in the
9605 ;; store. If we don't do this, then the method call
9606 ;; will fail to find the libmagic.so file, which in
9607 ;; turn will cause any application using
9608 ;; python-magic to fail.
9609 (add-before 'build 'hard-code-path-to-libmagic
9610 (lambda* (#:key inputs #:allow-other-keys)
9611 (let ((file (assoc-ref inputs "file")))
9612 (substitute* "magic.py"
9613 (("ctypes.util.find_library\\('magic'\\)")
9614 (string-append "'" file "/lib/libmagic.so'")))
9615 #t)))
9616 (add-before 'install 'disable-egg-compression
9617 (lambda _
9618 (let ((port (open-file "setup.cfg" "a")))
9619 (display "\n[easy_install]\nzip_ok = 0\n"
9620 port)
9621 (close-port port)
9622 #t))))))
9623 (inputs
9624 ;; python-magic needs to be able to find libmagic.so.
9625 `(("file" ,file)))
9626 (home-page
9627 "https://github.com/ahupp/python-magic")
9628 (synopsis
9629 "File type identification using libmagic")
9630 (description
9631 "This module uses ctypes to access the libmagic file type
9632identification library. It makes use of the local magic database and
9633supports both textual and MIME-type output. Note that this module and
9634the python-file module both provide a \"magic.py\" file; these two
9635modules, which are different and were developed separately, both serve
9636the same purpose: to provide Python bindings for libmagic.")
9637 (license license:expat)))
9638
9639(define-public python2-magic
9640 (package-with-python2 python-magic))
9641
9642(define-public python2-s3cmd
9643 (package
9644 (name "python2-s3cmd")
9645 (version "1.6.1")
9646 (source
9647 (origin
9648 (method url-fetch)
9649 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
9650 "s3cmd-" version ".tar.gz"))
9651 (sha256
9652 (base32
9653 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
9654 (build-system python-build-system)
9655 (arguments
9656 ;; s3cmd is written for python2 only and contains no tests.
9657 `(#:python ,python-2
9658 #:tests? #f))
9659 (propagated-inputs
9660 `(("python2-dateutil" ,python2-dateutil)
9661 ;; The python-file package also provides a magic.py module.
9662 ;; This is an unfortunate state of affairs; however, s3cmd
9663 ;; fails to install if it cannot find specifically the
9664 ;; python-magic package. Thus we include it, instead of using
9665 ;; python-file. Ironically, s3cmd sometimes works better
9666 ;; without libmagic bindings at all:
9667 ;; https://github.com/s3tools/s3cmd/issues/198
9668 ("python2-magic" ,python2-magic)))
9669 (home-page "http://s3tools.org/s3cmd")
9670 (synopsis "Command line tool for S3-compatible storage services")
9671 (description
9672 "S3cmd is a command line tool for uploading, retrieving and managing data
9673in storage services that are compatible with the Amazon Simple Storage
9674Service (S3) protocol, including S3 itself. It supports rsync-like backup,
9675GnuPG encryption, and more. It also supports management of Amazon's
9676CloudFront content delivery network.")
9677 (license license:gpl2+)))
9678
9679(define-public python-pkgconfig
9680 (package
9681 (name "python-pkgconfig")
9682 (version "1.3.1")
9683 (source
9684 (origin
9685 (method url-fetch)
9686 (uri (pypi-uri "pkgconfig" version))
9687 (sha256
9688 (base32
9689 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
9690 (build-system python-build-system)
9691 (native-inputs
9692 `(("python-nose" ,python-nose)))
9693 (inputs
9694 `(("pkg-config" ,pkg-config)))
9695 (arguments
9696 `(#:phases
9697 (modify-phases %standard-phases
9698 (add-before 'build 'patch
9699 ;; Hard-code the path to pkg-config.
9700 (lambda _
9701 (substitute* "pkgconfig/pkgconfig.py"
9702 (("cmd = 'pkg-config")
9703 (string-append "cmd = '" (which "pkg-config"))))
9704 #t))
9705 (replace 'check
9706 (lambda _
9707 (invoke "nosetests" "test.py"))))))
9708 (home-page "https://github.com/matze/pkgconfig")
9709 (synopsis "Python interface for pkg-config")
9710 (description "This module provides a Python interface to pkg-config. It
9711can be used to find all pkg-config packages, check if a package exists,
9712check if a package meets certain version requirements, query CFLAGS and
9713LDFLAGS and parse the output to build extensions with setup.py.")
9714 (license license:expat)))
9715
9716(define-public python2-pkgconfig
9717 (package-with-python2 python-pkgconfig))
9718
9719(define-public python-bz2file
9720 (package
9721 (name "python-bz2file")
9722 (version "0.98")
9723 (source
9724 (origin
9725 (method url-fetch)
9726 (uri (pypi-uri "bz2file" version))
9727 (sha256
9728 (base32
9729 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
9730 (build-system python-build-system)
9731 (arguments
9732 `(#:tests? #f)) ; Tests use deprecated python modules.
9733 (home-page "https://github.com/nvawda/bz2file")
9734 (synopsis "Read and write bzip2-compressed files")
9735 (description
9736 "Bz2file is a Python library for reading and writing bzip2-compressed
9737files. It contains a drop-in replacement for the I/O interface in the
9738standard library's @code{bz2} module, including features from the latest
9739development version of CPython that are not available in older releases.")
9740 (license license:asl2.0)))
9741
9742(define-public python2-bz2file
9743 (package-with-python2 python-bz2file))
9744
9745(define-public python-future
9746 (package
9747 (name "python-future")
d5d54030 9748 (version "0.17.1")
44d10b1f
RW
9749 (source
9750 (origin
9751 (method url-fetch)
9752 (uri (pypi-uri "future" version))
9753 (sha256
9754 (base32
d5d54030 9755 "1f2rlqn9rh7adgir52dlbqz69gsab44x0mlm8gf1cs7xvhv54137"))))
44d10b1f
RW
9756 (build-system python-build-system)
9757 ;; Many tests connect to the network or are otherwise flawed.
9758 ;; https://github.com/PythonCharmers/python-future/issues/210
9759 (arguments
9760 `(#:tests? #f))
9761 (home-page "http://python-future.org")
9762 (synopsis "Single-source support for Python 3 and 2")
9763 (description
9764 "@code{python-future} is the missing compatibility layer between Python 2 and
9765Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
9766to support both Python 2 and Python 3 with minimal overhead.")
9767 (license license:expat)))
9768
9769(define-public python2-future
9770 (package-with-python2 python-future))
9771
9772(define-public python-cysignals
9773 (package
9774 (name "python-cysignals")
8e3e51df 9775 (version "1.9.0")
44d10b1f
RW
9776 (source
9777 (origin
9778 (method url-fetch)
8e3e51df 9779 (uri (pypi-uri "cysignals" version))
44d10b1f
RW
9780 (sha256
9781 (base32
8e3e51df 9782 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
44d10b1f
RW
9783 (build-system python-build-system)
9784 (native-inputs
9785 `(("python-cython" ,python-cython)
9786 ("python-sphinx" ,python-sphinx)))
9787 (inputs
9788 `(("pari-gp" ,pari-gp)))
9789 (arguments
9790 `(#:modules ((guix build python-build-system)
9791 ((guix build gnu-build-system) #:prefix gnu:)
9792 (guix build utils))
9793 ;; FIXME: Tests are executed after installation and currently fail
9794 ;; when not installing into standard locations; the author is working
9795 ;; on a fix.
9796 #:tests? #f
9797 #:phases
9798 (modify-phases %standard-phases
9799 (add-before
9800 'build 'configure
9801 (assoc-ref gnu:%standard-phases 'configure)))))
9802 (home-page
9803 "https://github.com/sagemath/cysignals")
9804 (synopsis
9805 "Handling of interrupts and signals for Cython")
9806 (description
9807 "The cysignals package provides mechanisms to handle interrupts (and
9808other signals and errors) in Cython code, using two related approaches,
9809for mixed Cython/Python code or external C libraries and pure Cython code,
9810respectively.")
9811 (license license:lgpl3+)))
9812
9813(define-public python2-cysignals
9814 (package-with-python2 python-cysignals))
9815
9816(define-public python2-shedskin
9817 (package
9818 (name "python2-shedskin")
9819 (version "0.9.4")
9820 (source
9821 (origin
9822 (method url-fetch)
9823 (uri (string-append "https://github.com/shedskin/shedskin/"
9824 "releases/download/v" version
9825 "/shedskin-" version ".tgz"))
9826 (sha256
9827 (base32
9828 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
9829 (build-system python-build-system)
9830 (arguments
9831 `(#:python ,python-2
9832 #:phases (modify-phases %standard-phases
9833 (add-after 'unpack 'fix-resulting-include-libs
9834 (lambda* (#:key inputs #:allow-other-keys)
9835 (let ((libgc (assoc-ref inputs "libgc"))
9836 (pcre (assoc-ref inputs "pcre")))
9837 (substitute* "shedskin/makefile.py"
9838 (("variable == 'CCFLAGS':[ ]*")
9839 (string-append "variable == 'CCFLAGS':\n"
9840 " line += ' -I " pcre "/include"
9841 " -I " libgc "/include'"))
9842 (("variable == 'LFLAGS':[ ]*")
9843 (string-append "variable == 'LFLAGS':\n"
9844 " line += ' -L" pcre "/lib"
9845 " -L " libgc "/lib'")))
9846 #t))))))
9847 (inputs `(("pcre" ,pcre)
9848 ("libgc" ,libgc)))
9849 (home-page "https://shedskin.github.io/")
9850 (synopsis "Experimental Python-2 to C++ Compiler")
9851 (description (string-append "This is an experimental compiler for a subset of
9852Python. It generates C++ code and a Makefile."))
9853 (license (list license:gpl3 license:bsd-3 license:expat))))
9854
9855(define-public python2-rope
9856 (package
9857 (name "python2-rope")
a9ba0a31 9858 (version "0.11.0")
44d10b1f
RW
9859 (source
9860 (origin
9861 (method url-fetch)
9862 (uri (pypi-uri "rope" version))
9863 (sha256
9864 (base32
a9ba0a31 9865 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
44d10b1f 9866 (arguments
afb29715 9867 ;; Rope has only partial python3 support, see `python-rope'
44d10b1f
RW
9868 `(#:python ,python-2))
9869 (build-system python-build-system)
9870 (native-inputs
9871 `(("python2-unittest2" ,python2-unittest2)))
9872 (home-page "https://github.com/python-rope/rope")
9873 (synopsis "Refactoring library for Python")
9874 (description "Rope is a refactoring library for Python. It facilitates
9875the renaming, moving and extracting of attributes, functions, modules, fields
9876and parameters in Python 2 source code. These refactorings can also be applied
9877to occurrences in strings and comments.")
9878 (license license:gpl2)))
9879
2c880ef4
LC
9880(define-public python-rope
9881 (package
9882 (inherit python2-rope)
9883 (name "python-rope")
9884 (arguments `(#:python ,python-wrapper
9885 ;; XXX: Only partial python3 support, results in some failing
9886 ;; tests: <https://github.com/python-rope/rope/issues/247>.
9887 #:tests? #f))
9888 (properties `((python2-variant . ,(delay python2-rope))))))
9889
44d10b1f
RW
9890(define-public python-py3status
9891 (package
9892 (name "python-py3status")
ef68b35d 9893 (version "3.21")
44d10b1f
RW
9894 (source
9895 (origin
9896 (method url-fetch)
9897 (uri (pypi-uri "py3status" version))
9898 (sha256
ef68b35d 9899 (base32 "16z8zq83hxy48g6hh4xczbdz50qvxv9k1aahr4fqq7jis60cc262"))))
44d10b1f
RW
9900 (build-system python-build-system)
9901 (inputs
9902 `(("file" ,file)))
9903 (arguments
9904 '(#:phases
9905 (modify-phases %standard-phases
9906 ;; 'file' is used for detection of configuration file encoding
9907 ;; let's make link the dependency to particular input
9908 (add-before 'build 'patch-file-path
9909 (lambda* (#:key inputs #:allow-other-keys)
9910 (let ((file-path (assoc-ref inputs "file")))
9911 (substitute* "py3status/parse_config.py"
9912 (("\\['file', '-b'")
9913 (string-append "['" file-path "/bin/file', '-b'")))
9914 #t))))
9915 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
9916 (home-page "https://github.com/ultrabug/py3status")
9917 (synopsis "Extensible i3status wrapper written in Python")
9918 (description "py3status is an i3status wrapper which extends i3status
9919functionality in a modular way, allowing you to extend your panel with your
9920own code, responding to click events and updating clock every second.")
9921 (license license:bsd-3)))
9922
9923(define-public python-tblib
9924 (package
9925 (name "python-tblib")
9926 (version "1.3.2")
9927 (source (origin
9928 (method url-fetch)
9929 (uri (pypi-uri "tblib" version))
9930 (sha256 (base32
9931 "1rsg8h069kqgncyv8fgzyj6qflk6j10cb78pa5jk34ixwq044vj3"))))
9932 (build-system python-build-system)
9933 (arguments
9934 `(#:phases
9935 (modify-phases %standard-phases
9936 (add-before 'check 'adjust-tests
9937 (lambda _
9938 (when (which "python3")
9939 ;; Adjust the example output to match that of Python 3.7:
9940 ;; <https://github.com/ionelmc/python-tblib/issues/36>.
9941 (substitute* "README.rst"
9942 (("Exception\\('fail',") "Exception('fail'"))
9943 #t)))
9944 (replace 'check
9945 (lambda _
9946 ;; Upstream runs tests after installation and the package itself
9947 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
9948 ;; found.
9949 (setenv "PYTHONPATH"
9950 (string-append (getcwd) "/build/lib:"
9951 (getenv "PYTHONPATH")))
9952 (invoke "py.test" "-vv" "tests" "README.rst"))))))
9953 (native-inputs
9954 `(("python-pytest" ,python-pytest)
9955 ("python-six" ,python-six)))
9956 (home-page "https://github.com/ionelmc/python-tblib")
9957 (synopsis "Traceback serialization library")
9958 (description
9959 "Traceback serialization allows you to:
9960
9961@enumerate
9962@item Pickle tracebacks and raise exceptions with pickled tracebacks in
9963different processes. This allows better error handling when running code over
9964multiple processes (imagine multiprocessing, billiard, futures, celery etc).
9965
9966@item Parse traceback strings and raise with the parsed tracebacks.
9967@end enumerate\n")
9968 (license license:bsd-3)))
9969
9970(define-public python2-tblib
9971 (package-with-python2 python-tblib))
9972
9973(define-public python-greenlet
9974 (package
9975 (name "python-greenlet")
9976 (version "0.4.15")
9977 (source (origin
9978 (method url-fetch)
9979 (uri (pypi-uri "greenlet" version))
9980 (sha256
9981 (base32
9982 "1g4g1wwc472ds89zmqlpyan3fbnzpa8qm48z3z1y6mlk44z485ll"))))
9983 (build-system python-build-system)
9984 (home-page "https://greenlet.readthedocs.io/")
9985 (synopsis "Lightweight in-process concurrent programming")
9986 (description
9987 "Greenlet package is a spin-off of Stackless, a version of CPython
9988that supports micro-threads called \"tasklets\". Tasklets run
9989pseudo-concurrently (typically in a single or a few OS-level threads) and
9990are synchronized with data exchanges on \"channels\".")
9991 (license (list license:psfl license:expat))))
9992
9993(define-public python2-greenlet
9994 (package-with-python2 python-greenlet))
9995
9996(define-public python-objgraph
9997 (package
9998 (name "python-objgraph")
9999 (version "3.4.0")
10000 (source
10001 (origin
10002 (method url-fetch)
10003 (uri (pypi-uri "objgraph" version))
10004 (sha256
10005 (base32
10006 "184m09am5gpbqfaiy7l0hwh476mczbrly1dffs0rw2p1d1i2q32a"))))
10007 (build-system python-build-system)
10008 (propagated-inputs
10009 `(("python-graphviz" ,python-graphviz)))
10010 (native-inputs
10011 `(("python-mock" ,python-mock)
10012 ("graphviz" ,graphviz)))
10013 (home-page "https://mg.pov.lt/objgraph/")
10014 (synopsis "Draw Python object reference graphs with graphviz")
10015 (description
10016 "This package provides tools to draw Python object reference graphs with
10017graphviz.")
10018 (license license:expat)))
10019
10020(define-public python-gevent
10021 (package
10022 (name "python-gevent")
10023 (version "1.3.7")
10024 (source (origin
10025 (method url-fetch)
10026 (uri (pypi-uri "gevent" version))
10027 (sha256
10028 (base32
10029 "0b0fr04qdk1p4sniv87fh8z5psac60x01pv054kpgi94520g81iz"))
10030 (modules '((guix build utils)))
10031 (snippet
10032 '(begin
10033 ;; unbunding libev and c-ares
10034 (delete-file-recursively "deps")
10035 #t))))
10036 (build-system python-build-system)
10037 (arguments
10038 `(#:modules ((ice-9 ftw)
10039 (ice-9 match)
10040 (srfi srfi-26)
10041 (guix build utils)
10042 (guix build python-build-system))
10043 #:phases (modify-phases %standard-phases
44d10b1f
RW
10044 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
10045 (lambda _
10046 (substitute* "src/gevent/subprocess.py"
10047 (("/bin/sh") (which "sh")))
10048 (for-each (lambda (file)
10049 (substitute* file
10050 (("/bin/sh") (which "sh"))
10051 (("/bin/true") (which "true"))))
10052 (find-files "src/greentest" "\\.py$"))
10053 #t))
10054 (add-before 'build 'do-not-use-bundled-sources
10055 (lambda* (#:key inputs #:allow-other-keys)
10056 (setenv "CONFIG_SHELL" (which "bash"))
10057 (setenv "LIBEV_EMBED" "false")
10058 (setenv "CARES_EMBED" "false")
10059 (setenv "EMBED" "false")
10060
b5b56b7f
MB
10061 ;; Prevent building bundled libev.
10062 (substitute* "setup.py"
10063 (("run_make=_BUILDING")
10064 "run_make=False"))
10065
44d10b1f
RW
10066 (let ((greenlet (string-append
10067 (assoc-ref inputs "python-greenlet")
10068 "/include")))
10069 (match (scandir greenlet
10070 (lambda (item)
10071 (string-prefix? "python" item)))
10072 ((python)
b5b56b7f 10073 (setenv "C_INCLUDE_PATH"
44d10b1f
RW
10074 (string-append greenlet "/" python)))))
10075 #t))
10076 (add-before 'check 'skip-timer-test
10077 (lambda _
10078 ;; XXX: Skip 'TestTimerResolution', which appears to be
10079 ;; unreliable.
10080 (substitute* "src/greentest/test__core_timer.py"
10081 (("not greentest.RUNNING_ON_CI") "False"))
10082 #t))
10083 (replace 'check
10084 (lambda _
10085 ;; Make sure the build directory is on PYTHONPATH.
10086 (setenv "PYTHONPATH"
10087 (string-append
10088 (getenv "PYTHONPATH") ":"
10089 (getcwd) "/build/"
10090 (car (scandir "build" (cut string-prefix? "lib." <>)))))
10091 (with-directory-excursion "src/greentest"
10092 ;; XXX: Many tests require network access. Instead we only
10093 ;; run known-good tests. Unfortunately we cannot use
10094 ;; recursion here since this directory also contains
10095 ;; Python-version-specific subfolders.
10096 (apply invoke "python" "testrunner.py" "--config"
10097 "known_failures.py"
10098 (scandir "." (cut regexp-exec
10099 (make-regexp "test_+(subprocess|core)")
10100 <>)))))))))
10101 (propagated-inputs
10102 `(("python-greenlet" ,python-greenlet)
10103 ("python-objgraph" ,python-objgraph)))
10104 (native-inputs
b5b56b7f 10105 `(("python-six" ,python-six)))
44d10b1f
RW
10106 (inputs
10107 `(("c-ares" ,c-ares)
10108 ("libev" ,libev)))
10109 (home-page "http://www.gevent.org/")
10110 (synopsis "Coroutine-based network library")
10111 (description
10112 "gevent is a coroutine-based Python networking library that uses greenlet
10113to provide a high-level synchronous API on top of the libev event loop.")
10114 (license license:expat)
10115 (properties `((python2-variant . ,(delay python2-gevent))))))
10116
10117(define-public python2-gevent
10118 (let ((base (package-with-python2
10119 (strip-python2-variant python-gevent))))
10120 (package
10121 (inherit base)
10122 (native-inputs `(,@(package-native-inputs python-gevent)
10123 ("python-mock" ,python2-mock))))))
10124
10125(define-public python-fastimport
10126 (package
10127 (name "python-fastimport")
10128 (version "0.9.6")
10129 (source
10130 (origin
10131 (method url-fetch)
10132 (uri (pypi-uri "fastimport" version))
10133 (sha256
10134 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
10135 (build-system python-build-system)
10136 (home-page "https://github.com/jelmer/python-fastimport")
10137 (synopsis "VCS fastimport parser and generator in Python")
10138 (description "This package provides a parser for and generator of the Git
10139@url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
10140format.")
10141 (license license:gpl2+)))
10142
10143(define-public python2-fastimport
10144 (package-with-python2 python-fastimport))
10145
10146(define-public python-twisted
10147 (package
10148 (name "python-twisted")
fdfad2fc 10149 (version "19.7.0")
44d10b1f
RW
10150 (source (origin
10151 (method url-fetch)
10152 (uri (pypi-uri "Twisted" version ".tar.bz2"))
10153 (sha256
10154 (base32
fdfad2fc 10155 "17d3hnxv9qndagzz63mdpyk99xj63p9gq586vjn0rxk8cl197nym"))))
44d10b1f
RW
10156 (build-system python-build-system)
10157 (arguments
0107c9b8 10158 '(#:tests? #f)) ; FIXME: some tests fail
44d10b1f
RW
10159 (propagated-inputs
10160 `(("python-zope-interface" ,python-zope-interface)
52ca1c4a 10161 ("python-pyhamcrest" ,python-pyhamcrest)
44d10b1f 10162 ("python-incremental" ,python-incremental)
e5ba2fe3 10163 ("python-hyperlink" ,python-hyperlink)
44d10b1f
RW
10164 ("python-constantly" ,python-constantly)
10165 ("python-automat" ,python-automat)))
10166 (home-page "https://twistedmatrix.com/")
10167 (synopsis "Asynchronous networking framework written in Python")
10168 (description
10169 "Twisted is an extensible framework for Python programming, with special
10170focus on event-based network programming and multiprotocol integration.")
10171 (license license:expat)))
10172
10173(define-public python2-twisted
10174 (package-with-python2 python-twisted))
10175
10176(define-public python-pika
10177 (package
10178 (name "python-pika")
10179 (version "0.12.0")
10180 (source
10181 (origin
10182 (method url-fetch)
10183 (uri (pypi-uri "pika" version))
10184 (sha256
10185 (base32
10186 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
10187 (build-system python-build-system)
10188 (native-inputs
10189 `(("python-pyev" ,python-pyev)
10190 ("python-tornado" ,python-tornado)
10191 ("python-twisted" ,python-twisted)))
10192 (home-page "https://pika.readthedocs.org")
10193 (synopsis "Pure Python AMQP Client Library")
10194 (description
10195 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
10196Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
10197network support library.")
10198 (license license:bsd-3)))
10199
10200(define-public python2-pika
10201 (package-with-python2 python-pika))
10202
10203(define-public python-ply
10204 (package
10205 (name "python-ply")
10206 (version "3.10")
10207 (source
10208 (origin
10209 (method url-fetch)
10210 (uri (pypi-uri "ply" version))
10211 (sha256
10212 (base32
10213 "1jxsr1d2f732r6ljhvm827113dckwl6qwakfvpbdhcbhvpvlmscn"))))
10214 (build-system python-build-system)
10215 (home-page "http://www.dabeaz.com/ply/")
10216 (synopsis "Python Lex & Yacc")
10217 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
10218It uses LR parsing and does extensive error checking.")
10219 (license license:bsd-3)))
10220
10221(define-public python2-ply
10222 (package-with-python2 python-ply))
10223
10224(define-public python-tabulate
10225 (package
10226 (name "python-tabulate")
10227 (version "0.7.7")
10228 (source (origin
10229 (method url-fetch)
10230 (uri (pypi-uri "tabulate" version))
10231 (sha256
10232 (base32
10233 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
10234 (build-system python-build-system)
10235 (arguments
10236 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
10237 ;; and the latest release is not tagged in the upstream repository.
10238 '(#:tests? #f))
10239 (home-page "https://bitbucket.org/astanin/python-tabulate")
10240 (synopsis "Pretty-print tabular data")
10241 (description
10242 "Tabulate is a library and command-line utility to pretty-print tabular
10243data in Python.")
10244 (license license:expat)))
10245
10246(define-public python2-tabulate
10247 (package-with-python2 python-tabulate))
10248
10249(define-public python-kazoo
10250 (package
10251 (name "python-kazoo")
10252 (version "2.4.0")
10253 (source
10254 (origin
10255 (method url-fetch)
10256 (uri (pypi-uri "kazoo" version))
10257 (sha256
10258 (base32
10259 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
10260 (build-system python-build-system)
10261 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
10262 (propagated-inputs
10263 `(("python-six" ,python-six)))
10264 (home-page "https://kazoo.readthedocs.org")
10265 (synopsis "High-level Zookeeper client library")
10266 (description
10267 "Kazoo is a Python client library for the Apache Zookeeper distributed
10268application service. It is designed to be easy to use and to avoid common
10269programming errors.")
10270 (license license:asl2.0)))
10271
10272(define-public python2-kazoo
10273 (package-with-python2 python-kazoo))
10274
10275(define-public python-pykafka
10276 (package
10277 (name "python-pykafka")
10278 (version "2.4.0")
10279 (source (origin
10280 (method url-fetch)
0ca1d040 10281 (uri (pypi-uri "pykafka" version))
44d10b1f
RW
10282 (sha256
10283 (base32
10284 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
10285 (build-system python-build-system)
10286 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
10287 (propagated-inputs
10288 `(("python-gevent" ,python-gevent)
10289 ("python-kazoo" ,python-kazoo)
10290 ("python-tabulate" ,python-tabulate)))
10291 (inputs
10292 `(("librdkafka" ,librdkafka)))
10293 (home-page "https://pykafka.readthedocs.io/")
10294 (synopsis "Apache Kafka client for Python")
10295 (description
10296 "PyKafka is a client for the Apache Kafka distributed messaging system.
10297It includes Python implementations of Kafka producers and consumers, which
10298are optionally backed by a C extension built on librdkafka.")
10299 (license license:asl2.0)))
10300
10301(define-public python2-pykafka
10302 (package-with-python2 python-pykafka))
10303
10304(define-public python-wcwidth
10305 (package
10306 (name "python-wcwidth")
10307 (version "0.1.7")
10308 (source
10309 (origin
10310 (method url-fetch)
10311 (uri (pypi-uri "wcwidth" version))
10312 (sha256
10313 (base32
10314 "0pn6dflzm609m4r3i8ik5ni9ijjbb5fa3vg1n7hn6vkd49r77wrx"))))
10315 (build-system python-build-system)
10316 (home-page "https://github.com/jquast/wcwidth")
10317 (synopsis "Measure number of terminal column cells of wide-character codes")
10318 (description "Wcwidth measures the number of terminal column cells of
10319wide-character codes. It is useful for those implementing a terminal emulator,
10320or programs that carefully produce output to be interpreted by one. It is a
10321Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
10322specified in POSIX.1-2001 and POSIX.1-2008.")
10323 (license license:expat)))
10324
10325(define-public python2-wcwidth
10326 (package-with-python2 python-wcwidth))
10327
10328(define-public python2-jsonrpclib
10329 (package
10330 (name "python2-jsonrpclib")
10331 (version "0.1.7")
10332 (source (origin
10333 (method url-fetch)
6571bba0 10334 (uri (pypi-uri "jsonrpclib" version))
44d10b1f
RW
10335 (sha256
10336 (base32
10337 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
10338 (build-system python-build-system)
10339 (arguments
10340 `(#:tests? #f
10341 #:python ,python-2))
10342 (home-page "https://github.com/joshmarshall/jsonrpclib/")
10343 (synopsis "Implementation of JSON-RPC specification for Python")
10344 (description
10345 "This library is an implementation of the JSON-RPC specification.
10346It supports both the original 1.0 specification, as well as the
10347new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
10348etc.")
10349 (license license:asl2.0)))
10350
10351(define-public python-chai
10352 (package
10353 (name "python-chai")
10354 (version "1.1.2")
10355 (source (origin
10356 (method url-fetch)
10357 (uri (pypi-uri "chai" version))
10358 (sha256
10359 (base32
10360 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
10361 (build-system python-build-system)
10362 (home-page "https://github.com/agoragames/chai")
10363 (synopsis "Mocking framework for Python")
10364 (description
10365 "Chai provides an api for mocking, stubbing and spying your python
10366objects, patterned after the Mocha library for Ruby.")
10367 (license license:bsd-3)))
10368
10369(define-public python2-chai
10370 (package-with-python2 python-chai))
10371
10372(define-public python-inflection
10373 (package
10374 (name "python-inflection")
10375 (version "0.3.1")
10376 (source
10377 (origin (method url-fetch)
10378 (uri (pypi-uri "inflection" version))
10379 (sha256
10380 (base32
10381 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
10382 (build-system python-build-system)
10383 (native-inputs
10384 `(("python-pytest" ,python-pytest)))
10385 (home-page "https://github.com/jpvanhal/inflection")
10386 (synopsis "Python string transformation library")
10387 (description
10388 "Inflection is a string transformation library. It singularizes
10389and pluralizes English words, and transforms strings from CamelCase to
10390underscored string.")
10391 (license license:expat)))
10392
10393(define-public python2-inflection
10394 (package-with-python2 python-inflection))
10395
10396(define-public python-pylev
10397 (package
10398 (name "python-pylev")
10399 (version "1.3.0")
10400 (source (origin
10401 (method url-fetch)
10402 (uri (pypi-uri "pylev" version))
10403 (sha256
10404 (base32
10405 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
10406 (build-system python-build-system)
10407 (home-page "https://github.com/toastdriven/pylev")
10408 (synopsis "Levenshtein distance implementation in Python")
10409 (description "Pure Python Levenshtein implementation, based off the
10410Wikipedia code samples at
10411@url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
10412 (license license:bsd-3)))
10413
10414(define-public python2-pylev
10415 (package-with-python2 python-pylev))
10416
10417(define-public python-cleo
10418 (package
10419 (name "python-cleo")
af2d3713 10420 (version "0.6.8")
44d10b1f
RW
10421 (source (origin
10422 (method url-fetch)
10423 (uri (pypi-uri "cleo" version))
10424 (sha256
10425 (base32
af2d3713 10426 "06zp695hq835rkaq6irr1ds1dp2qfzyf32v60vxpd8rcnxv319l5"))))
44d10b1f
RW
10427 (build-system python-build-system)
10428 (native-inputs
af2d3713 10429 `( ;; For testing
44d10b1f
RW
10430 ("python-mock" ,python-mock)
10431 ("python-pytest-mock" ,python-pytest-mock)
10432 ("python-pytest" ,python-pytest)))
10433 (propagated-inputs
10434 `(("python-backpack" ,python-backpack)
10435 ("python-pastel" ,python-pastel)
10436 ("python-pylev" ,python-pylev)))
10437 (home-page "https://github.com/sdispater/cleo")
10438 (synopsis "Command-line arguments library for Python")
10439 (description
10440 "Cleo allows you to create command-line commands with signature in
10441docstring and colored output.")
10442 (license license:expat)))
10443
10444(define-public python2-cleo
10445 (package-with-python2 python-cleo))
10446
2be85c45
TLC
10447(define-public python-tomlkit
10448 (package
10449 (name "python-tomlkit")
10450 (version "0.5.7")
10451 (source
10452 (origin
10453 (method url-fetch)
10454 (uri (pypi-uri "tomlkit" version))
10455 (sha256
10456 (base32
10457 "18820ga5z3if1w8dvykxrfm000akracq01ic402xrbljgbn5grn4"))))
10458 (build-system python-build-system)
10459 (native-inputs
10460 `(("python-pytest" ,python-pytest)))
10461 (home-page
10462 "https://github.com/sdispater/tomlkit")
10463 (synopsis "Style preserving TOML library")
10464 (description
10465 "TOML Kit is a 0.5.0-compliant TOML library. It includes a parser that
10466preserves all comments, indentations, whitespace and internal element ordering,
10467and makes them accessible and editable via an intuitive API. It can also
10468create new TOML documents from scratch using the provided helpers. Part of the
10469implementation as been adapted, improved and fixed from Molten.")
10470 (license license:expat)))
10471
0bb32201
TLC
10472(define-public python-shellingham
10473 (package
10474 (name "python-shellingham")
10475 (version "1.3.1")
10476 (source
10477 (origin
10478 (method url-fetch)
10479 (uri (pypi-uri "shellingham" version))
10480 (sha256
10481 (base32
10482 "1q7kws7w4x2hji3g7y0ni9ddk4sd676ylrb3db54gbpys6xj6nwq"))))
10483 (build-system python-build-system)
10484 (home-page
10485 "https://github.com/sarugaku/shellingham")
10486 (synopsis "Tool to detect surrounding shell")
10487 (description
10488 "Shellingham detects what shell the current Python executable is
10489running in.")
10490 (license license:isc)))
10491
aee92957
TLC
10492(define-public python-memcached
10493 (package
10494 (name "python-memcached")
10495 (version "1.59")
10496 (source
10497 (origin
10498 (method url-fetch)
10499 (uri (pypi-uri "python-memcached" version))
10500 (sha256
10501 (base32
10502 "0kvyapavbirk2x3n1jx4yb9nyigrj1s3x15nm3qhpvhkpqvqdqm2"))))
10503 (build-system python-build-system)
10504 (propagated-inputs `(("python-six" ,python-six)))
10505 (home-page
10506 "https://github.com/linsomniac/python-memcached")
10507 (synopsis "Pure python memcached client")
10508 (description
10509 "This software is a pure Python interface to the memcached memory cache
10510daemon. It is the client side software which allows storing values in one or
10511more, possibly remote, memcached servers.")
10512 (license license:psfl)))
10513
b2ac2508
TLC
10514(define-public python-clikit
10515 (package
10516 (name "python-clikit")
10517 (version "0.2.4")
10518 (source
10519 (origin
10520 (method url-fetch)
10521 (uri (pypi-uri "clikit" version))
10522 (sha256
10523 (base32
10524 "0dc8czib5f4j9px1ivcpqnmivnx2zjpc0xb00ldrhsqylks7r06n"))))
10525 (build-system python-build-system)
10526 (propagated-inputs
10527 `(("python-pastel" ,python-pastel)
10528 ("python-pylev" ,python-pylev)))
10529 (home-page "https://github.com/sdispater/clikit")
10530 (synopsis "Group of utilities to build command line interfaces")
10531 (description
10532 "CliKit is a group of utilities to build testable command line
10533interfaces.")
10534 (license license:expat)))
10535
c6f008d6
TLC
10536(define-public python-msgpack-python
10537 (package
10538 (name "python-msgpack-python")
10539 (version "0.5.6")
10540 (source
10541 (origin
10542 (method url-fetch)
10543 (uri (pypi-uri "msgpack-python" version))
10544 (sha256
10545 (base32
10546 "16wh8qgybmfh4pjp8vfv78mdlkxfmcasg78lzlnm6nslsfkci31p"))))
10547 (build-system python-build-system)
10548 (home-page "http://msgpack.org/")
10549 (synopsis "Package to deserialize messages in MessagePack binary format")
10550 (description
10551 "MessagePack is an efficient binary serialization format. It lets you
10552exchange data among multiple languages like JSON. But it's faster and
10553smaller. Small integers are encoded into a single byte, and typical short
10554strings require only one extra byte in addition to the strings themselves.")
10555 (license license:asl2.0)))
10556
badc1c63
TLC
10557(define-public python-cachy
10558 (package
10559 (name "python-cachy")
10560 (version "0.2.0")
10561 (source
10562 (origin
10563 (method url-fetch)
10564 (uri (pypi-uri "cachy" version))
10565 (sha256
10566 (base32
10567 "0v6mjyhgx6j7ya20bk69cr3gdzdkdf6psay0h090rscclgji65dp"))))
10568 (build-system python-build-system)
10569 (native-inputs
10570 `(("python-fakeredis" ,python-fakeredis)
10571 ("python-flexmock" ,python-flexmock)
10572 ("python-pytest" ,python-pytest)))
10573 (propagated-inputs
10574 `(("python-memcached" ,python-memcached)
10575 ("python-msgpack-python" ,python-msgpack-python)
10576 ("python-redis" ,python-redis)))
10577 (home-page "https://github.com/sdispater/cachy")
10578 (synopsis "Simple yet effective caching library")
10579 (description
10580 "Cachy provides a simple yet effective caching library. A simple but
10581powerful API: thread-safety; decorator syntax; support for memcached, redis,
10582database, file, dict stores. Cachy supports python versions 2.7+ and 3.2+.")
10583 (license license:expat)))
10584
617bb67b
TLC
10585(define-public poetry
10586 (package
10587 (name "poetry")
10588 (version "0.12.17")
10589 ;; Poetry can only be built from source with poetry.
10590 (source
10591 (origin
10592 (method url-fetch)
10593 (uri (pypi-uri "poetry" version))
10594 (sha256
10595 (base32
10596 "0gxwcd65qjmzqzppf53x51sic1rbcd9py6cdzx3aprppipimslvf"))))
10597 (build-system python-build-system)
10598 (arguments
10599 `(#:tests? #f ;; Pypi does not have tests.
10600 #:phases
10601 (modify-phases %standard-phases
10602 (replace 'build
10603 (lambda _
10604 ;; Bug in poetry https://github.com/sdispater/poetry/issues/866.
10605 (invoke "sed" "-i" "-e" "s/from distutils.core/from setuptools/"
10606 "setup.py")
10607 #t)))))
10608 (propagated-inputs
10609 `(("python-cachecontrol" ,python-cachecontrol)
10610 ("python-cachy" ,python-cachy)
10611 ("python-cleo" ,python-cleo)
10612 ("python-glob2" ,python-glob2)
10613 ("python-html5lib" ,python-html5lib)
10614 ("python-jsonschema" ,python-jsonschema)
10615 ("python-msgpack" ,python-msgpack)
10616 ("python-pathlib2" ,python-pathlib2)
10617 ("python-pkginfo" ,python-pkginfo)
10618 ("python-pyparsing" ,python-pyparsing)
10619 ("python-pyrsistent" ,python-pyrsistent)
10620 ("python-requests" ,python-requests)
10621 ("python-requests-toolbelt" ,python-requests-toolbelt)
10622 ("python-shellingham" ,python-shellingham)
10623 ("python-tomlkit" ,python-tomlkit)
10624 ("python-virtualenv" ,python-virtualenv)))
10625 (home-page "https://poetry.eustace.io/")
10626 (synopsis "Python dependency management and packaging made easy")
10627 (description "Poetry is a tool for dependency management and packaging
10628in Python. It allows you to declare the libraries your project depends on and
10629it will manage (install/update) them for you.")
10630 (license license:expat)))
10631
44d10b1f
RW
10632(define-public python-lazy-object-proxy
10633 (package
10634 (name "python-lazy-object-proxy")
7454078a 10635 (version "1.4.3")
44d10b1f
RW
10636 (source (origin
10637 (method url-fetch)
10638 (uri (pypi-uri "lazy-object-proxy" version))
10639 (sha256
10640 (base32
7454078a 10641 "1w1aaay424ciz8fz3fkzxb0pxzfxn184f2whpyn4fx72bn50x47k"))))
63d4873b
MO
10642 (native-inputs
10643 `(("python-setuptools-scm" ,python-setuptools-scm-3.3)))
44d10b1f
RW
10644 (build-system python-build-system)
10645 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
10646 (synopsis "Lazy object proxy for python")
10647 (description
10648 "Lazy object proxy is an object that wraps a callable but defers the call
10649until the object is actually required, and caches the result of said call.")
10650 (license license:bsd-2)))
10651
10652(define-public python2-lazy-object-proxy
10653 (package-with-python2 python-lazy-object-proxy))
10654
10655(define-public python-dnspython
10656 (package
10657 (name "python-dnspython")
10658 (version "1.15.0")
10659 (source (origin
10660 (method url-fetch)
10661 (uri (string-append "http://www.dnspython.org/kits/"
10662 version "/dnspython-" version ".tar.gz"))
10663 (sha256
10664 (base32
10665 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
10666 (build-system python-build-system)
10667 (arguments '(#:tests? #f)) ; XXX: requires internet access
10668 (home-page "http://www.dnspython.org")
10669 (synopsis "DNS toolkit for Python")
10670 (description
10671 "dnspython is a DNS toolkit for Python. It supports almost all record
10672types. It can be used for queries, zone transfers, and dynamic updates.
10673It supports TSIG authenticated messages and EDNS0.")
10674 (license license:expat)))
10675
10676(define-public python2-dnspython
10677 (package-with-python2 python-dnspython))
10678
10679(define-public python-email-validator
10680 (package
10681 (name "python-email-validator")
10682 (version "1.0.2")
10683 (source
10684 (origin (method url-fetch)
10685 (uri (pypi-uri "email_validator" version))
10686 (sha256
10687 (base32
10688 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
10689 (build-system python-build-system)
10690 (arguments
10691 '(#:phases
10692 (modify-phases %standard-phases
10693 (add-before 'build 'use-dnspython
10694 (lambda _
10695 (substitute* "setup.py"
10696 (("dnspython3") "dnspython"))
10697 #t)))))
10698 (propagated-inputs
10699 `(("python-dnspython" ,python-dnspython)
10700 ("python-idna" ,python-idna)))
10701 (home-page "https://github.com/JoshData/python-email-validator")
10702 (synopsis "Email address validation library for Python")
10703 (description
10704 "This library validates email address syntax and deliverability.")
10705 (license license:cc0)))
10706
10707(define-public python2-email-validator
10708 (package-with-python2 python-email-validator))
10709
10710(define-public python-ukpostcodeparser
10711 (package
10712 (name "python-ukpostcodeparser")
10713 (version "1.0.3")
10714 (source (origin
10715 (method url-fetch)
10716 (uri (pypi-uri "UkPostcodeParser" version))
10717 (sha256
10718 (base32
10719 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
10720 (build-system python-build-system)
10721 (home-page "https://github.com/hamstah/ukpostcodeparser")
10722 (synopsis "UK Postcode parser for Python")
10723 (description
10724 "This library provides the @code{parse_uk_postcode} function for
10725parsing UK postcodes.")
10726 (license license:expat)))
10727
10728(define-public python2-ukpostcodeparser
10729 (package-with-python2 python-ukpostcodeparser))
10730
10731(define-public python-faker
10732 (package
10733 (name "python-faker")
10734 (version "0.7.9")
10735 (source (origin
10736 (method url-fetch)
10737 (uri (pypi-uri "Faker" version))
10738 (sha256
10739 (base32
10740 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
10741 (patches
10742 (search-patches "python-faker-fix-build-32bit.patch"))
10743 (modules '((guix build utils)))
10744 (snippet
10745 '(begin
10746 (for-each delete-file (find-files "." "\\.pyc$"))
10747 #t))))
10748 (build-system python-build-system)
10749 (arguments
10750 '(#:phases
10751 (modify-phases %standard-phases
10752 (replace 'check
49ff8827 10753 (lambda _ (invoke "python" "-m" "unittest" "-v" "tests"))))))
44d10b1f
RW
10754 (native-inputs
10755 `(;; For testing
10756 ("python-email-validator" ,python-email-validator)
10757 ("python-mock" ,python-mock)
10758 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
10759 (propagated-inputs
10760 `(("python-dateutil" ,python-dateutil)
10761 ("python-six" ,python-six)))
10762 (home-page "https://github.com/joke2k/faker")
10763 (synopsis "Python package that generates fake data")
10764 (description
10765 "Faker is a Python package that generates fake data such as names,
10766addresses, and phone numbers.")
10767 (license license:expat)
10768 (properties `((python2-variant . ,(delay python2-faker))))))
10769
10770(define-public python2-faker
10771 (let ((base (package-with-python2 (strip-python2-variant
10772 python-faker))))
10773 (package
10774 (inherit base)
10775 (propagated-inputs
10776 `(("python2-ipaddress" ,python2-ipaddress)
10777 ,@(package-propagated-inputs base))))))
10778
10779(define-public python-pyaml
10780 (package
10781 (name "python-pyaml")
10782 (version "18.11.0")
10783 (source (origin
10784 (method url-fetch)
10785 (uri (pypi-uri "pyaml" version))
10786 (sha256
10787 (base32
10788 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
10789 (build-system python-build-system)
10790 (native-inputs
10791 `(("python-unidecode" ,python-unidecode)))
10792 (propagated-inputs
10793 `(("python-pyyaml" ,python-pyyaml)))
10794 (home-page "https://github.com/mk-fg/pretty-yaml")
10795 (synopsis "YAML pretty-print library for Python")
10796 (description
10797 "pyaml is a PyYAML based python module to produce pretty and readable
10798YAML-serialized data.")
492e3a7a 10799 (license license:wtfpl2)))
44d10b1f
RW
10800
10801(define-public python2-pyaml
10802 (package-with-python2 python-pyaml))
10803
10804(define-public python-backpack
10805 (package
10806 (name "python-backpack")
10807 (version "0.1")
10808 (source
10809 (origin
10810 (method url-fetch)
10811 (uri (pypi-uri "backpack" version))
10812 (sha256
10813 (base32
10814 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
10815 (build-system python-build-system)
10816 (native-inputs
10817 `(("python-pytest" ,python-pytest)
10818 ("python-nose" ,python-nose)))
10819 (propagated-inputs
10820 `(("python-simplejson" ,python-simplejson)))
10821 (home-page "https://github.com/sdispater/backpack")
10822 (synopsis "Utilities for working with Python collections")
10823 (description "Backpack provides some useful utilities for working with
10824collections of data.")
10825 (license license:expat)))
10826
10827(define-public python2-backpack
10828 (package-with-python2 python-backpack))
10829
10830(define-public python-prompt-toolkit
10831 (package
10832 (name "python-prompt-toolkit")
10833 (version "2.0.7")
10834 (source
10835 (origin
10836 (method url-fetch)
10837 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10838 (sha256
10839 (base32
10840 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
10841 (build-system python-build-system)
10842 (arguments
10843 `(#:phases
10844 (modify-phases %standard-phases
10845 (delete 'check)
10846 (add-after 'install 'post-install-check
10847 (lambda* (#:key inputs outputs #:allow-other-keys)
10848 ;; HOME is needed for the test
10849 ;; "test_pathcompleter_can_expanduser".
10850 (setenv "HOME" "/tmp")
10851 (add-installed-pythonpath inputs outputs)
10852 (invoke "py.test"))))))
10853 (propagated-inputs
10854 `(("python-wcwidth" ,python-wcwidth)
10855 ("python-six" ,python-six)
10856 ("python-pygments" ,python-pygments)))
10857 (native-inputs
10858 `(("python-pytest" ,python-pytest)))
10859 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
10860 (synopsis "Library for building command line interfaces in Python")
10861 (description
10862 "Prompt-Toolkit is a library for building interactive command line
10863interfaces in Python. It's like GNU Readline but it also features syntax
10864highlighting while typing, out-of-the-box multi-line input editing, advanced
10865code completion, incremental search, support for Chinese double-width
10866characters, mouse support, and auto suggestions.")
10867 (license license:bsd-3)))
10868
10869(define-public python2-prompt-toolkit
10870 (package-with-python2 python-prompt-toolkit))
10871
10872(define-public python-prompt-toolkit-1
10873 (package (inherit python-prompt-toolkit)
10874 (version "1.0.15")
10875 (source
10876 (origin
10877 (method url-fetch)
10878 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10879 (sha256
10880 (base32
10881 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
10882
10883(define-public python2-prompt-toolkit-1
10884 (package-with-python2 python-prompt-toolkit-1))
10885
10886(define-public python-jedi
10887 (package
10888 (name "python-jedi")
296e1aea 10889 (version "0.15.1")
44d10b1f
RW
10890 (source
10891 (origin
10892 (method url-fetch)
10893 (uri (pypi-uri "jedi" version))
10894 (sha256
10895 (base32
296e1aea 10896 "0bp4pxhsynaarbvzblsn5x32lzp29svy3sxfy8i6m5iwz9s9r1ds"))))
44d10b1f
RW
10897 (build-system python-build-system)
10898 (arguments
296e1aea 10899 `(#:phases
44d10b1f 10900 (modify-phases %standard-phases
296e1aea
MC
10901 (add-after 'unpack 'disable-file-completion-test
10902 ;; A single parameterized test currently fail (see:
10903 ;; https://github.com/davidhalter/jedi/issues/1395). Remove it.
10904 (lambda _
10905 (substitute* "test/test_api/test_completion.py"
10906 ((".*'example.py', 'rb\"' \\+ join\\('\\.\\.'.*") ""))
10907 #t))
44d10b1f 10908 (replace 'check
296e1aea
MC
10909 (lambda _
10910 (setenv "HOME" "/tmp")
10911 (invoke "python" "-m" "pytest"))))))
44d10b1f
RW
10912 (native-inputs
10913 `(("python-pytest" ,python-pytest)
10914 ("python-docopt" ,python-docopt)))
10915 (propagated-inputs
10916 `(("python-parso" ,python-parso)))
10917 (home-page "https://github.com/davidhalter/jedi")
10918 (synopsis "Autocompletion and static analysis library for Python")
10919 (description
10920 "Jedi is a static analysis tool for Python that can be used in Integrated
10921Development Environments (@dfn{IDE}s) and text editors. It understands Python
10922on a deeper level than many other static analysis frameworks for Python.
10923
10924Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
10925well.")
10926 (license license:expat)))
10927
10928(define-public python2-jedi
296e1aea 10929 (package-with-python2 python-jedi))
44d10b1f
RW
10930
10931(define-public ptpython
10932 (package
10933 (name "ptpython")
10934 (version "0.34")
10935 (source (origin
10936 (method url-fetch)
10937 (uri (pypi-uri "ptpython" version))
10938 (sha256
10939 (base32
10940 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
10941 (build-system python-build-system)
10942 (arguments
10943 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
10944 (propagated-inputs
10945 `(("python-docopt" ,python-docopt)
10946 ("python-jedi" ,python-jedi)
10947 ("python-prompt-toolkit" ,python-prompt-toolkit)
10948 ("python-pygments" ,python-pygments)))
10949 (home-page "https://github.com/jonathanslenders/ptpython")
10950 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
10951 (description
10952 "ptpython is a Python read-eval-print loop with IDE-like features.
10953It supports syntax highlighting, multiline editing, autocompletion, mouse,
10954color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
10955etc.")
10956 (license license:bsd-3)
10957 (properties `((python2-variant . ,(delay ptpython-2))))))
10958
10959(define-public ptpython-2
10960 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
10961 (package
10962 (inherit base)
10963 (name "ptpython2"))))
10964
10965(define-public python-stem
10966 (package
10967 (name "python-stem")
e746d1c3 10968 (version "1.7.1")
44d10b1f
RW
10969 (source
10970 (origin
10971 (method url-fetch)
10972 (uri (pypi-uri "stem" version))
10973 (sha256
10974 (base32
e746d1c3 10975 "18lc95pmc7i089nlsb06dsxyjl5wbhxfqgdxbjcia35ndh8z7sn9"))))
44d10b1f
RW
10976 (build-system python-build-system)
10977 (arguments
10978 `(#:phases
10979 (modify-phases %standard-phases
10980 (replace 'check
10981 (lambda _
10982 (invoke "./run_tests.py" "--unit")
10983 #t)))))
10984 (native-inputs
10985 `(("python-mock" ,python-mock)
10986 ("python-pycodestyle" ,python-pycodestyle)
10987 ("python-pyflakes" ,python-pyflakes)))
10988 (home-page "https://stem.torproject.org/")
10989 (synopsis
10990 "Python controller library that allows applications to interact with Tor")
10991 (description
10992 "Stem is a Python controller library for Tor. With it you can use Tor's
10993control protocol to script against the Tor process and read descriptor data
10994relays publish about themselves.")
10995 (license license:lgpl3)))
10996
10997(define-public python2-stem
10998 (package-with-python2 python-stem))
10999
11000(define-public python-pyserial
11001 (package
11002 (name "python-pyserial")
11003 (version "3.1.1")
11004 (source
11005 (origin
11006 (method url-fetch)
11007 (uri (pypi-uri "pyserial" version))
11008 (sha256
11009 (base32
11010 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
11011 (build-system python-build-system)
11012 (arguments
11013 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
11014 ;; #:phases
11015 ;; (modify-phases %standard-phases
11016 ;; (replace 'check
11017 ;; (lambda _
11018 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
11019 (home-page
11020 "https://github.com/pyserial/pyserial")
11021 (synopsis "Python Serial Port Bindings")
11022 (description "@code{pyserial} provide serial port bindings for Python. It
11023supports different byte sizes, stop bits, parity and flow control with RTS/CTS
11024and/or Xon/Xoff. The port is accessed in RAW mode.")
11025 (license license:bsd-3)))
11026
11027(define-public python2-pyserial
11028 (package-with-python2 python-pyserial))
11029
11030(define-public python-kivy
11031 (package
11032 (name "python-kivy")
11033 (version "1.10.1")
11034 (source
11035 (origin
11036 (method url-fetch)
11037 (uri (pypi-uri "Kivy" version))
11038 (file-name (string-append name "-" version ".tar.gz"))
11039 (sha256
11040 (base32
11041 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
11042 (build-system python-build-system)
11043 (arguments
11044 `(#:tests? #f ; Tests require many optional packages
11045 #:phases
11046 (modify-phases %standard-phases
11047 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
11048 (lambda* (#:key inputs #:allow-other-keys)
11049 (setenv "KIVY_SDL2_PATH"
11050 (string-append (assoc-ref inputs "sdl-union")
11051 "/include/SDL2"))
11052 #t)))))
11053 (native-inputs
11054 `(("git" ,git)
11055 ("pkg-config" ,pkg-config)
11056 ("python-cython" ,python-cython)))
11057 (inputs
11058 `(("gstreamer" ,gstreamer)
11059 ("mesa" ,mesa)
11060 ("sdl-union"
11061 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
11062 (home-page "http://kivy.org")
11063 (synopsis
11064 "Multitouch application framework")
11065 (description
11066 "A software library for rapid development of
11067hardware-accelerated multitouch applications.")
11068 (license license:expat)))
11069
11070(define-public python2-kivy
11071 (package-with-python2 python-kivy))
11072
11073(define-public python-kivy-next
11074 (deprecated-package "python-kivy-next" python-kivy))
11075
11076(define-public python2-kivy-next
11077 (deprecated-package "python2-kivy-next" python2-kivy))
11078
11079(define-public python-binaryornot
11080 (package
11081 (name "python-binaryornot")
11082 (version "0.4.4")
11083 (source (origin
11084 (method url-fetch)
11085 (uri (pypi-uri "binaryornot" version))
11086 (sha256
11087 (base32
11088 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
11089 (build-system python-build-system)
86723f98
DM
11090 (arguments
11091 `(#:phases
11092 (modify-phases %standard-phases
ee623903 11093 (add-after 'unpack 'patch-tests
86723f98
DM
11094 (lambda _
11095 ;; TypeError: binary() got an unexpected keyword argument
11096 ;; 'average_size'.
11097 (substitute* "tests/test_check.py"
11098 (("average_size=512") ""))
11099 #t)))))
44d10b1f
RW
11100 (propagated-inputs
11101 `(("python-chardet" ,python-chardet)
11102 ("python-hypothesis" ,python-hypothesis)))
11103 (home-page "https://github.com/audreyr/binaryornot")
11104 (synopsis "Package to check if a file is binary or text")
11105 (description "Ultra-lightweight pure Python package to check if a file is
11106binary or text.")
11107 (license license:bsd-3)
11108 (properties `((python2-variant . ,(delay python2-binaryornot))))))
11109
11110(define-public python2-binaryornot
11111 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
11112 (package (inherit base)
11113 (propagated-inputs
11114 `(("python2-enum34" ,python2-enum34)
11115 ,@(package-propagated-inputs base))))))
11116
f315673d
VC
11117(define-public python-binwalk
11118 (let ((commit "64201acfb5b0a9cdd9faa58c40a36dcff8612e29")
11119 (revision "0"))
11120 (package
11121 (name "python-binwalk")
11122 (version (git-version "2.1.1" revision commit))
11123 (source
11124 (origin
11125 (method git-fetch)
11126 (uri (git-reference
11127 (url "https://github.com/ReFirmLabs/binwalk")
11128 (commit commit)))
11129 (file-name (git-file-name name version))
11130 (sha256
11131 (base32
11132 "1z7ca6rfp887hw5jc3sb45mm4fa0xid4lsp2z8g4r590dr7k7w15"))))
11133 (build-system python-build-system)
11134 (arguments
11135 `(#:phases
11136 (modify-phases %standard-phases
11137 (add-before 'check 'set-pythonpath
11138 (lambda _
11139 (setenv "PYTHONPATH"
11140 (string-append
11141 (getcwd) "/src/"
11142 ":" (getenv "PYTHONPATH")))
11143 (setenv "HOME" "")
11144 #t)))))
11145 (native-inputs
11146 `(("python-coverage" ,python-coverage)
11147 ("python-nose" ,python-nose)))
11148 (home-page "https://github.com/ReFirmLabs/binwalk")
11149 (synopsis "Firmware analysis tool")
11150 (description "Binwalk is a tool for analyzing, reverse engineering, and extracting firmware images")
11151 (license license:expat))))
11152
44d10b1f
RW
11153(define-public python-nltk
11154 (package
11155 (name "python-nltk")
11156 (version "3.2.1")
11157 (source (origin
11158 (method url-fetch)
11159 (uri (pypi-uri "nltk" version))
11160 (sha256
11161 (base32
11162 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
11163 (build-system python-build-system)
11164 (arguments
11165 '(;; The tests require some extra resources to be downloaded.
11166 ;; TODO Try packaging these resources.
11167 #:tests? #f))
11168 (home-page "http://nltk.org/")
11169 (synopsis "Natural Language Toolkit")
11170 (description "It provides interfaces to over 50 corpora and lexical
11171resources such as WordNet, along with a suite of text processing libraries
11172for classification, tokenization, stemming, tagging, parsing, and semantic
11173reasoning, wrappers for natural language processing libraries.")
11174 (license license:asl2.0)))
11175
11176(define-public python2-nltk
11177 (package-with-python2 python-nltk))
11178
11179(define-public python-pymongo
11180 (package
11181 (name "python-pymongo")
11182 (version "3.7.2")
11183 (source (origin
11184 (method url-fetch)
11185 (uri (pypi-uri "pymongo" version))
11186 (sha256
11187 (base32
11188 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
11189 (build-system python-build-system)
11190 (propagated-inputs
11191 `(("python-certifi" ,python-certifi)))
11192 (home-page "https://github.com/mongodb/mongo-python-driver")
11193 (synopsis "Python driver for MongoDB")
11194 (description "Python driver for MongoDB.")
11195 (license license:asl2.0)))
11196
11197(define-public python2-pymongo
11198 (package-with-python2 python-pymongo))
11199
44d10b1f
RW
11200(define-public python-consul
11201 (package
11202 (name "python-consul")
11203 (version "0.6.1")
11204 (source
11205 (origin
11206 (method url-fetch)
11207 (uri (pypi-uri "python-consul" version))
11208 (sha256
11209 (base32
11210 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
11211 (build-system python-build-system)
11212 (arguments
11213 '(#:tests? #f)) ; The tests are not distributed
11214 (propagated-inputs
11215 `(("python-requests" ,python-requests)
11216 ("python-six" ,python-six)))
11217 (home-page "https://github.com/cablehead/python-consul")
11218 (synopsis "Python client for Consul")
11219 (description
11220 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
11221discovery, monitoring and configuration.")
11222 (license license:expat)))
11223
11224(define-public python2-consul
11225 (package-with-python2 python-consul))
11226
11227(define-public python-schematics
11228 (package
11229 (name "python-schematics")
11230 (version "1.1.1")
11231 (source
1961d187
TGR
11232 (origin
11233 (method git-fetch)
11234 (uri (git-reference
11235 (url "https://github.com/schematics/schematics.git")
11236 (commit (string-append "v" version))))
11237 (file-name (git-file-name name version))
11238 (sha256
11239 (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd"))))
44d10b1f
RW
11240 (build-system python-build-system)
11241 (propagated-inputs
11242 `(("python-six" ,python-six)))
11243 (arguments
1961d187
TGR
11244 ;; The tests require a bunch of not very nice packages with fixed
11245 ;; version requirements (e.g. python-coveralls).
11246 `(#:tests? #f))
44d10b1f
RW
11247 (home-page "https://github.com/schematics/schematics")
11248 (synopsis "Python Data Structures for Humans")
11249 (description "Python Data Structures for Humans.")
11250 (license license:bsd-3)))
11251
11252(define-public python2-schematics
11253 (package-with-python2 python-schematics))
11254
11255(define-public python-odfpy
11256 (package
11257 (name "python-odfpy")
11258 (version "1.3.3")
11259 (source (origin
11260 (method url-fetch)
11261 (uri (pypi-uri "odfpy" version))
11262 (sha256
11263 (base32
11264 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
11265 (arguments
11266 `(#:modules ((srfi srfi-1)
11267 (guix build python-build-system)
11268 (guix build utils))
11269 #:phases
11270 (modify-phases %standard-phases
11271 (replace 'check
11272 ;; The test runner invokes python2 and python3 for test*.py.
11273 ;; To avoid having both in inputs, we replicate it here.
11274 (lambda _
21ccc01d
RW
11275 (for-each (lambda (test-file) (invoke "python" test-file))
11276 (find-files "tests" "^test.*\\.py$"))
11277 #t)))))
44d10b1f
RW
11278 (build-system python-build-system)
11279 (home-page "https://github.com/eea/odfpy")
11280 (synopsis "Python API and tools to manipulate OpenDocument files")
11281 (description "Collection of libraries and utility programs written in
11282Python to manipulate OpenDocument 1.2 files.")
11283 (license
11284 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
11285 ;; number of files with other licenses.
11286 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
11287
11288(define-public python2-odfpy
11289 (package-with-python2 python-odfpy))
11290
11291(define-public python-natsort
11292 (package
11293 (name "python-natsort")
11294 (version "5.4.1")
11295 (source (origin
11296 (method url-fetch)
11297 (uri (pypi-uri "natsort" version))
11298 (sha256
11299 (base32
11300 "0i732amg6yzkx4g4c9j09jmqq39q377x9cl2nbkm5hax2c2v0wxf"))))
11301 (build-system python-build-system)
11302 (arguments
11303 `(#:modules ((guix build utils)
11304 (guix build python-build-system)
11305 (srfi srfi-1)
11306 (srfi srfi-26)
11307 (ice-9 ftw))
11308 #:phases
11309 (modify-phases %standard-phases
11310 (add-before 'check 'set-cachedir
11311 ;; Tests require write access to $HOME by default
11312 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
11313 (replace 'check
11314 (lambda _
11315 (let ((cwd (getcwd)))
11316 (setenv "PYTHONPATH"
11317 (string-append
11318 cwd "/build/"
11319 (find (cut string-prefix? "lib" <>)
11320 (scandir (string-append cwd "/build")))
11321 ":"
11322 (getenv "PYTHONPATH")))
11323 (invoke "pytest" "-v")))))))
11324 (native-inputs
11325 `(("python-hypothesis" ,python-hypothesis)
11326 ("python-pytest-cov" ,python-pytest-cov)
11327 ("python-pytest-mock" ,python-pytest-mock)
11328 ("python-pytest" ,python-pytest)))
11329 (propagated-inputs ; TODO: Add python-fastnumbers.
11330 `(("python-pyicu" ,python-pyicu)))
11331 (home-page "https://github.com/SethMMorton/natsort")
11332 (synopsis "Natural sorting for python and shell")
11333 (description
11334 "Natsort lets you apply natural sorting on lists instead of
11335lexicographical. If you use the built-in @code{sorted} method in python
36a4366d
EF
11336on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4},
11337@code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20},
11338@code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that
11339identifies numbers and sorts them separately from strings. It can also sort
11340version numbers, real numbers, mixed types and more, and comes with a shell
11341command @command{natsort} that exposes this functionality in the command line.")
44d10b1f
RW
11342 (license license:expat)
11343 (properties `((python2-variant . ,(delay python2-natsort))))))
11344
11345(define-public python2-natsort
11346 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
11347 (package (inherit base)
11348 (native-inputs
11349 `(("python2-pathlib" ,python2-pathlib)
11350 ,@(package-native-inputs base))))))
11351
11352(define-public python-glances
11353 (package
11354 (name "python-glances")
9898a2d3 11355 (version "3.1.1")
44d10b1f
RW
11356 (source
11357 (origin
11358 (method url-fetch)
11359 (uri (pypi-uri "Glances" version))
11360 (sha256
11361 (base32
15b4c911
TGR
11362 "07j1ggzsqiskyz1i4mrnyr9i95v0dqi0i0hibnv1l188km8shmi8"))
11363 (modules '((guix build utils)))
11364 (snippet
11365 '(begin
11366 ;; Glances phones PyPI for weekly update checks by default.
11367 ;; Disable these. The user can re-enable them if desired.
11368 (substitute* "glances/outdated.py"
11369 (("^(.*)self\\.load_config\\(config\\)\n" line indentation)
11370 (string-append indentation
11371 "self.args.disable_check_update = True\n"
11372 line)))
11373 #t))))
44d10b1f
RW
11374 (build-system python-build-system)
11375 (propagated-inputs
9898a2d3
TGR
11376 `(("python-future" ,python-future)
11377 ("python-psutil" ,python-psutil)))
44d10b1f
RW
11378 (home-page
11379 "https://github.com/nicolargo/glances")
bab94ffa 11380 (synopsis "Cross-platform curses-based monitoring tool")
44d10b1f
RW
11381 (description
11382 "Glances is a curses-based monitoring tool for a wide variety of platforms.
bab94ffa
TGR
11383Glances uses the PsUtil library to get information from your system. It
11384monitors CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
44d10b1f
RW
11385 (license license:lgpl3+)))
11386
11387(define-public python2-glances
11388 (package-with-python2 python-glances))
11389
11390(define-public python-graphql-core
11391 (package
11392 (name "python-graphql-core")
11393 (version "0.5.3")
11394 (source
11395 (origin
11396 (method url-fetch)
11397 (uri (pypi-uri "graphql-core" version))
11398 (sha256
11399 (base32
11400 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
11401 (build-system python-build-system)
11402 (arguments
11403 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
11404 #:phases
11405 (modify-phases %standard-phases
11406 (add-after 'unpack 'patch-hardcoded-version
11407 (lambda _ (substitute*
11408 "setup.py"
11409 (("'gevent==1.1rc1'") "'gevent'"))
11410 #t)))))
11411 (native-inputs
11412 `(("python-gevent" ,python-gevent)
11413 ("python-mock" ,python-mock)
11414 ("python-pytest-mock" ,python-pytest-mock)))
11415 (propagated-inputs
11416 `(("python-promise" ,python-promise)
11417 ("python-six" ,python-six)))
11418 (home-page "https://github.com/graphql-python/graphql-core")
11419 (synopsis "GraphQL implementation for Python")
11420 (description
11421 "GraphQL implementation for Python. GraphQL is a data query language and
11422runtime designed and used to request and deliver data to mobile and web apps.
11423This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
11424to Python.")
11425 (license license:expat)))
11426
11427(define-public python2-graphql-core
11428 (package-with-python2 python-graphql-core))
11429
11430(define-public python-graphql-relay
11431 (package
11432 (name "python-graphql-relay")
11433 (version "0.4.5")
11434 (source
11435 (origin
11436 (method url-fetch)
11437 (uri (pypi-uri "graphql-relay" version))
11438 (sha256
11439 (base32
11440 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
11441 (build-system python-build-system)
11442 (arguments
11443 '(#:tests? #f)) ; The tests are not distributed
11444 (propagated-inputs
11445 `(("python-graphql-core" ,python-graphql-core)
11446 ("python-promise" ,python-promise)
11447 ("python-six" ,python-six)))
11448 (home-page "https://github.com/graphql-python/graphql-relay-py")
11449 (synopsis "Relay implementation for Python")
11450 (description
11451 "This is a library to allow the easy creation of Relay-compliant servers
11452using the GraphQL Python reference implementation of a GraphQL server. It
11453should be noted that the code is a exact port of the original
11454@url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
11455from Facebook.")
11456 (license license:expat)))
11457
11458(define-public python2-graphql-relay
11459 (package-with-python2 python-graphql-relay))
11460
11461(define-public python-graphene
11462 (package
11463 (name "python-graphene")
11464 (version "0.10.2")
11465 (source
11466 (origin
11467 (method url-fetch)
11468 (uri (pypi-uri "graphene" version))
11469 (sha256
11470 (base32
11471 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
11472 (build-system python-build-system)
11473 (propagated-inputs
11474 `(("python-graphql-core" ,python-graphql-core)
11475 ("python-graphql-relay" ,python-graphql-relay)
11476 ("python-iso8601" ,python-iso8601)
11477 ("python-promise" ,python-promise)
11478 ("python-six" ,python-six)))
11479 (arguments
11480 `(#:tests? #f)) ; no tests/ in the PyPI tarball
11481 (home-page "http://graphene-python.org/")
11482 (synopsis "GraphQL Framework for Python")
11483 (description
11484 "Graphene is a Python library for building GraphQL schemas/types.
11485A GraphQL schema describes your data model, and provides a GraphQL server
11486with an associated set of resolve methods that know how to fetch data.")
11487 (properties `((python2-variant . ,(delay python2-graphene))))
11488 (license license:expat)))
11489
11490(define-public python2-graphene
11491 (let ((base (package-with-python2
11492 (strip-python2-variant python-graphene))))
11493 (package (inherit base)
11494 (native-inputs
11495 `(("python2-sqlalchemy" ,python2-sqlalchemy)
11496 ,@(package-native-inputs base))))))
11497
11498(define-public python-nautilus
11499 (package
11500 (name "python-nautilus")
11501 (version "0.4.9")
11502 (source
11503 (origin
11504 (method url-fetch)
11505 (uri (pypi-uri "nautilus" version))
11506 (sha256
11507 (base32
11508 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
11509 (build-system python-build-system)
11510 (arguments `(#:tests? #f)) ; fails to import test modules
11511 (propagated-inputs
11512 `(("python-bcrypt" ,python-bcrypt)
11513 ("python-click" ,python-click)
11514 ("python-consul" ,python-consul)
11515 ("python-graphene" ,python-graphene)
11516 ("python-jinja2" ,python-jinja2)
11517 ("python-peewee" ,python-peewee)
11518 ("python-pika" ,python-pika)
11519 ("python-tornado" ,python-tornado)
11520 ("python-wtforms" ,python-wtforms)))
11521 (native-inputs
11522 `(("python-nose2" ,python-nose2)))
11523 (home-page "https://github.com/AlecAivazis/nautilus")
11524 (synopsis "Library for creating microservice applications")
11525 (description
11526 "Nautilus is a framework for flux based microservices that looks to
11527provide extendible implementations of common aspects of a cloud so that you can
11528focus on building massively scalable web applications.")
11529 (license license:expat)))
11530
11531(define-public python-snowballstemmer
11532 (package
11533 (name "python-snowballstemmer")
11534 (version "1.2.1")
11535 (source (origin
11536 (method url-fetch)
11537 (uri (pypi-uri "snowballstemmer" version))
11538 (sha256
11539 (base32
11540 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
11541 (build-system python-build-system)
11542 (arguments
11543 `(;; No tests exist
11544 #:tests? #f))
11545 (home-page "https://github.com/shibukawa/snowball_py")
11546 (synopsis "Snowball stemming library collection for Python")
11547 (description "This package provides 16 word stemmer algorithms generated
11548from Snowball algorithms. It includes the 15 original ones plus the Poerter
11549English stemmer.")
11550 (license license:bsd-3)))
11551
11552(define-public python2-snowballstemmer
11553 (package-with-python2 python-snowballstemmer))
11554
44d10b1f
RW
11555(define-public python-setproctitle
11556(package
11557 (name "python-setproctitle")
11558 (version "1.1.10")
11559 (source
11560 (origin
11561 (method url-fetch)
11562 (uri (pypi-uri "setproctitle" version))
11563 (sha256
11564 (base32
11565 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
11566 (build-system python-build-system)
11567 (arguments
11568 '(#:phases
11569 (modify-phases %standard-phases
11570 (add-before 'check 'patch-Makefile
11571 ;; Stricly this is only required for the python2 variant.
11572 ;; But adding a phase in an inherited package seems to be
11573 ;; cumbersum. So we patch even for python3.
11574 (lambda _
11575 (let ((nose (assoc-ref %build-inputs "python2-nose")))
11576 (when nose
11577 (substitute* "Makefile"
11578 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
11579 (string-append nose "/bin/nosetests "))))
11580 #t)))
11581 (replace 'check
11582 (lambda _
11583 (setenv "PYTHON" (or (which "python3") (which "python")))
11584 (setenv "PYCONFIG" (or (which "python3-config")
11585 (which "python-config")))
11586 (setenv "CC" "gcc")
11587 ;; No need to extend PYTHONPATH to find the built package, since
11588 ;; the Makefile will build anyway
11589 (invoke "make" "check"))))))
11590 (native-inputs
11591 `(("procps" ,procps))) ; required for tests
11592 (home-page
11593 "https://github.com/dvarrazzo/py-setproctitle")
11594 (synopsis
11595 "Setproctitle implementation for Python to customize the process title")
11596 (description "The library allows a process to change its title (as displayed
11597by system tools such as ps and top).
11598
11599Changing the title is mostly useful in multi-process systems, for
11600example when a master process is forked: changing the children's title
11601allows to identify the task each process is busy with. The technique
11602is used by PostgreSQL and the OpenSSH Server for example.")
11603 (license license:bsd-3)
11604 (properties `((python2-variant . ,(delay python2-setproctitle))))))
11605
11606(define-public python2-setproctitle
11607 (let ((base (package-with-python2
11608 (strip-python2-variant python-setproctitle))))
11609 (package
11610 (inherit base)
11611 (native-inputs `(("python2-nose" ,python2-nose)
11612 ,@(package-native-inputs base))))))
11613
11614(define-public python-validictory
11615 (package
11616 (name "python-validictory")
11617 (version "1.0.1")
11618 (source
11619 (origin
11620 (method url-fetch)
11621 (uri (pypi-uri "validictory" version))
11622 (sha256
11623 (base32
11624 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
11625 (build-system python-build-system)
11626 (arguments
11627 '(#:phases
11628 (modify-phases %standard-phases
11629 (add-after 'unpack 'bootstrap
11630 ;; Move the tests out of the package directory to avoid
11631 ;; packaging them.
11632 (lambda* _
11633 (rename-file "validictory/tests" "tests")
11634 (delete-file "tests/__init__.py")))
11635 (replace 'check
11636 (lambda _
11637 ;; Extend PYTHONPATH so the built package will be found.
11638 (setenv "PYTHONPATH"
11639 (string-append (getcwd) "/build/lib:"
11640 (getenv "PYTHONPATH")))
6568bd5d 11641 (invoke "py.test" "-vv" ))))))
44d10b1f
RW
11642 (native-inputs
11643 `(("python-pytest" ,python-pytest)))
11644 (home-page
11645 "https://github.com/jamesturk/validictory")
11646 (synopsis "General purpose Python data validator")
11647 (description "It allows validation of arbitrary Python data structures.
11648
11649The schema format is based on the JSON Schema
11650proposal (http://json-schema.org), so combined with json the library is also
11651useful as a validator for JSON data.")
11652 (license license:expat)))
11653
11654(define-public python2-validictory
11655 (package-with-python2 python-validictory))
11656
11657(define-public python-pyelftools
11658 (package
11659 (name "python-pyelftools")
11660 (version "0.25")
11661 (source
11662 (origin
11663 (method url-fetch)
11664 (uri (pypi-uri "pyelftools" version))
11665 (sha256
11666 (base32
11667 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
11668 (build-system python-build-system)
11669 (arguments
11670 `(#:phases
11671 (modify-phases %standard-phases
11672 (add-before 'check 'set-pythonpath
11673 (lambda _
11674 (setenv "PYTHONPATH"
11675 (string-append
11676 (getcwd) "/test/"
11677 ":" (getenv "PYTHONPATH")))
11678 #t)))))
11679 (home-page
11680 "https://github.com/eliben/pyelftools")
11681 (synopsis
11682 "Analyze binary and library file information")
11683 (description "This Python library provides interfaces for parsing and
11684analyzing two binary and library file formats; the Executable and Linking
11685Format (ELF), and debugging information in the Debugging With Attributed
11686Record Format (DWARF).")
11687 (license license:public-domain)))
11688
11689(define-public python-pyev
11690 (package
11691 (name "python-pyev")
11692 (version "0.9.0")
11693 (source
11694 (origin
11695 (method url-fetch)
11696 (uri (pypi-uri "pyev" version))
11697 (sha256
11698 (base32
11699 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
11700 (build-system python-build-system)
11701 (arguments
11702 `(#:tests? #f ; no test suite
11703 #:phases
11704 (modify-phases %standard-phases
11705 (add-after 'unpack 'patch
11706 (lambda* (#:key inputs #:allow-other-keys)
11707 (let ((libev (string-append (assoc-ref inputs "libev")
11708 "/lib/libev.so.4")))
11709 (substitute* "setup.py"
11710 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
11711 (string-append "libev_dll_name = \"" libev "\"")))))))))
11712 (inputs
11713 `(("libev" ,libev)))
11714 (home-page "http://pythonhosted.org/pyev/")
11715 (synopsis "Python libev interface")
11716 (description "Pyev provides a Python interface to libev.")
11717 (license license:gpl3)))
11718
11719(define-public python2-pyev
11720 (package-with-python2 python-pyev))
11721
11722(define-public python-imagesize
11723 (package
11724 (name "python-imagesize")
11725 (version "1.1.0")
11726 (source
11727 (origin
11728 (method url-fetch)
11729 (uri (pypi-uri "imagesize" version))
11730 (sha256
11731 (base32
11732 "1dg3wn7qpwmhgqc0r9na2ding1wif9q5spz3j9zn2riwphc2k0zk"))))
11733 (build-system python-build-system)
11734 (home-page "https://github.com/shibukawa/imagesize_py")
11735 (synopsis "Gets image size of files in various formats in Python")
11736 (description
11737 "This package allows determination of image size from
11738PNG, JPEG, JPEG2000 and GIF files in pure Python.")
11739 (license license:expat)))
11740
11741(define-public python2-imagesize
11742 (package-with-python2 python-imagesize))
11743
11744(define-public python-termstyle
11745 (package
11746 (name "python-termstyle")
11747 (version "0.1.11")
11748 (source
11749 (origin
11750 (method url-fetch)
11751 (uri (pypi-uri "termstyle" version))
11752 (sha256
11753 (base32
11754 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
11755 (build-system python-build-system)
11756 (arguments
11757 '(#:phases
11758 (modify-phases %standard-phases
11759 (replace 'check
11760 (lambda _
831080a6 11761 (invoke "python" "test3.py"))))))
44d10b1f
RW
11762 (home-page "https://github.com/gfxmonk/termstyle")
11763 (synopsis "Console text coloring for Python")
11764 (description "This package provides console text coloring for Python.")
11765 (license license:bsd-3)))
11766
11767(define-public python-argcomplete
11768 (package
11769 (name "python-argcomplete")
11770 (version "1.7.0")
11771 (source
11772 (origin
11773 (method url-fetch)
11774 (uri (pypi-uri "argcomplete" version))
11775 (sha256
11776 (base32
11777 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
11778 (build-system python-build-system)
11779 (native-inputs
11780 `(("python-pexpect" ,python-pexpect)
11781 ("tcsh" ,tcsh)
11782 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
11783 (home-page "https://github.com/kislyuk/argcomplete")
11784 (synopsis "Shell tab completion for Python argparse")
11785 (description "argcomplete provides extensible command line tab completion
11786of arguments and options for Python scripts using @code{argparse}. It's
11787particularly useful for programs with many options or sub-parsers that can
11788dynamically suggest completions; for example, when browsing resources over the
11789network.")
11790 (license license:asl2.0)))
11791
11792(define-public python2-argcomplete
11793 (package-with-python2 python-argcomplete))
11794
11795(define-public python-xopen
11796 (package
11797 (name "python-xopen")
24d64989 11798 (version "0.5.0")
44d10b1f
RW
11799 (source
11800 (origin
11801 (method url-fetch)
11802 (uri (pypi-uri "xopen" version))
11803 (sha256
11804 (base32
24d64989 11805 "17xbrgi23l87yg6h0qcknssp2q812miiy33qw6v45v5gx0jwv5xh"))))
44d10b1f 11806 (build-system python-build-system)
24d64989
RW
11807 (propagated-inputs
11808 `(("python-setuptools-scm" ,python-setuptools-scm)))
44d10b1f
RW
11809 (home-page "https://github.com/marcelm/xopen/")
11810 (synopsis "Open compressed files transparently")
11811 (description "This module provides an @code{xopen} function that works like
11812Python's built-in @code{open} function, but can also deal with compressed files.
11813Supported compression formats are gzip, bzip2 and, xz, and are automatically
11814recognized by their file extensions. The focus is on being as efficient as
11815possible on all supported Python versions.")
11816 (license license:expat)))
11817
11818(define-public python2-xopen
11819 (let ((base (package-with-python2
11820 (strip-python2-variant python-xopen))))
11821 (package
11822 (inherit base)
11823 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
11824 ,@(package-propagated-inputs base))))))
11825
11826(define-public python-cheetah
11827 (package
11828 (name "python-cheetah")
11829 (version "3.1.0")
11830 (source
11831 (origin
11832 (method url-fetch)
11833 (uri (pypi-uri "Cheetah3" version))
11834 (sha256
11835 (base32
11836 "1ihag9cxll6b86fc8v5lkhmr3brdbi4yiz16zpgw79yylmv8fgr9"))))
11837 (build-system python-build-system)
11838 (arguments
11839 `(#:modules ((guix build utils)
11840 (guix build python-build-system)
11841 (ice-9 ftw)
11842 (srfi srfi-1)
11843 (srfi srfi-26))
11844 #:phases (modify-phases %standard-phases
11845 (add-after 'unpack 'use-absolute-python
11846 (lambda _
11847 (substitute* "Cheetah/CheetahWrapper.py"
11848 (("#!/usr/bin/env python")
11849 (string-append "#!" (which "python"))))
11850 #t))
11851 (replace 'check
11852 (lambda _
11853 (let ((cwd (getcwd)))
11854 (setenv "PYTHONPATH"
11855 (string-append
11856 cwd "/build/"
11857 (find (cut string-prefix? "lib" <>)
11858 (scandir (string-append cwd "/build")))
11859 ":" (getenv "PYTHONPATH")))
11860 (setenv "PATH"
11861 (string-append (getenv "PATH")
11862 ":" cwd "/bin"))
11863 (setenv "TMPDIR" "/tmp")
11864
11865 (substitute* "Cheetah/Tests/Test.py"
11866 (("unittest.TextTestRunner\\(\\)")
11867 "unittest.TextTestRunner(verbosity=2)"))
11868
11869 (invoke "python" "Cheetah/Tests/Test.py")))))))
11870 (propagated-inputs
11871 `(("python-markdown" ,python-markdown))) ;optional
11872 (home-page "http://cheetahtemplate.org/")
11873 (synopsis "Template engine")
11874 (description "Cheetah is a text-based template engine and Python code
11875generator.
11876
11877Cheetah can be used as a standalone templating utility or referenced as
11878a library from other Python applications. It has many potential uses,
11879but web developers looking for a viable alternative to ASP, JSP, PHP and
11880PSP are expected to be its principle user group.
11881
11882Features:
11883@enumerate
11884@item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
11885 text-based format.
11886@item Cleanly separates content, graphic design, and program code.
11887@item Blends the power and flexibility of Python with a simple template language
11888 that non-programmers can understand.
11889@item Gives template writers full access to any Python data structure, module,
11890 function, object, or method in their templates.
11891@item Makes code reuse easy by providing an object-orientated interface to
11892 templates that is accessible from Python code or other Cheetah templates.
11893 One template can subclass another and selectively reimplement sections of it.
11894@item Provides a simple, yet powerful, caching mechanism that can dramatically
11895 improve the performance of a dynamic website.
11896@item Compiles templates into optimized, yet readable, Python code.
11897@end enumerate")
11898 (license (license:x11-style "file://LICENSE"))))
11899
11900(define-public python2-cheetah
11901 (package-with-python2 python-cheetah))
11902
11903(define-public python-dulwich
11904 (package
11905 (name "python-dulwich")
11906 (version "0.18.6")
11907 (source
11908 (origin
11909 (method url-fetch)
11910 (uri (list (string-append "https://www.dulwich.io/releases/"
11911 "dulwich-" version ".tar.gz")
11912 (pypi-uri "dulwich" version)))
11913 (sha256
11914 (base32
11915 "1aa1xfrxkc3j9s4xi0llhf5gndyi9ryprcxsqfa5fcb8ph34981q"))))
11916 (build-system python-build-system)
11917 (arguments
11918 `(#:phases
11919 (modify-phases %standard-phases
11920 (add-before 'check 'fix-tests
11921 (lambda* (#:key inputs #:allow-other-keys)
11922 ;; The tests use Popen with a custom environment which doesn't
11923 ;; include PATH.
11924 (substitute* "dulwich/tests/compat/utils.py"
11925 (("'git'") (string-append "'"
11926 (which "git")
11927 "'")))
11928 (substitute* '("dulwich/tests/test_repository.py"
11929 "dulwich/tests/test_hooks.py")
11930 (("#!/bin/sh") (string-append "#!" (which "sh"))))
11931 (setenv "TEST_RUNNER" "unittest")
11932 (setenv "PYTHONHASHSEED" "random")
11933 #t)))))
11934 (propagated-inputs
11935 `(("python-fastimport" ,python-fastimport)))
11936 (native-inputs
11937 `(("python-mock" ,python-mock)
11938 ("python-geventhttpclient" ,python-geventhttpclient)
11939 ("git" ,git)))
11940 (home-page "https://www.dulwich.io/")
11941 (synopsis "Git implementation in Python")
11942 (description "Dulwich is an implementation of the Git file formats and
11943protocols written in pure Python.")
11944 ;; Can be used with either license.
11945 (license (list license:asl2.0 license:gpl2+))))
11946
11947(define-public python2-dulwich
11948 (package-with-python2 python-dulwich))
11949
11950(define-public python-pbkdf2
11951 (package
11952 (name "python-pbkdf2")
11953 (version "1.3")
11954 (source
11955 (origin
11956 (method url-fetch)
11957 (uri (pypi-uri "pbkdf2" version))
11958 (sha256
11959 (base32
11960 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
11961 (build-system python-build-system)
11962 (arguments
11963 '(#:phases
11964 (modify-phases %standard-phases
11965 (replace 'check
11966 (lambda _
11967 (setenv "PYTHONPATH"
11968 (string-append (getcwd) "/build/lib:"
11969 (getenv "PYTHONPATH")))
ee2bb944 11970 (invoke "python" "test/test_pbkdf2.py"))))))
44d10b1f
RW
11971 (propagated-inputs
11972 `(("python-pycrypto" ,python-pycrypto))) ; optional
11973 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
11974 (synopsis "Password-based key derivation")
11975 (description "This module implements the password-based key derivation
11976function, PBKDF2, specified in RSA PKCS#5 v2.0.
11977
11978PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
11979is part of the RSA Public Key Cryptography Standards series. The provided
11980implementation takes a password or a passphrase and a salt value (and
11981optionally a iteration count, a digest module, and a MAC module) and provides
11982a file-like object from which an arbitrarly-sized key can be read.")
11983 (license license:expat)))
11984
11985(define-public python2-pbkdf2
11986 (package-with-python2 python-pbkdf2))
11987
11988(define-public python-qrcode
11989 (package
11990 (name "python-qrcode")
217ea1a1 11991 (version "6.1")
44d10b1f
RW
11992 (source
11993 (origin
11994 (method url-fetch)
11995 (uri (pypi-uri "qrcode" version))
11996 (sha256
217ea1a1 11997 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
44d10b1f
RW
11998 (build-system python-build-system)
11999 (arguments
12000 ;; FIXME: Tests require packaging 'pymaging'.
12001 '(#:tests? #f))
12002 (propagated-inputs
12003 `(("python-lxml" ,python-lxml) ; for SVG output
12004 ("python-pillow" ,python-pillow) ; for PNG output
12005 ("python-six" ,python-six)))
44d10b1f
RW
12006 (home-page "https://github.com/lincolnloop/python-qrcode")
12007 (synopsis "QR Code image generator")
12008 (description "This package provides a pure Python QR Code generator
12009module. It uses the Python Imaging Library (PIL) to allow for the generation
12010of QR Codes.
12011
12012In addition this package provides a command line tool to generate QR codes and
12013either write these QR codes to a file or do the output as ascii art at the
12014console.")
12015 (license license:bsd-3)))
12016
12017(define-public python2-qrcode
12018 (package-with-python2 python-qrcode))
12019
12020(define-public python-rst2ansi
12021 (package
12022 (name "python-rst2ansi")
12023 (version "0.1.5")
12024 (source
12025 (origin
12026 (method url-fetch)
12027 (uri (pypi-uri "rst2ansi" version))
12028 (sha256
12029 (base32
12030 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
12031 (build-system python-build-system)
12032 (propagated-inputs
12033 `(("python-docutils" ,python-docutils)))
12034 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
12035 (synopsis "Convert RST to ANSI-decorated console output")
12036 (description
12037 "Python module dedicated to rendering RST (reStructuredText) documents
12038to ansi-escaped strings suitable for display in a terminal.")
12039 (license license:expat)))
12040
12041(define-public python-ansi2html
12042 (package
12043 (name "python-ansi2html")
12044 (version "1.2.0")
12045 (source
12046 (origin
12047 (method url-fetch)
12048 (uri (pypi-uri "ansi2html" version))
12049 (sha256
12050 (base32
12051 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
12052 (build-system python-build-system)
12053 (native-inputs
12054 `(("python-mock" ,python-mock)
12055 ("python-nose" ,python-nose)))
12056 (propagated-inputs
12057 `(("python-six" ,python-six)))
12058 (home-page "https://github.com/ralphbean/ansi2html")
12059 (synopsis "Convert ANSI-decorated console output to HTML")
12060 (description
12061 "@command{ansi2html} is a Python library and command line utility for
12062convering text with ANSI color codes to HTML or LaTeX.")
12063 (license license:gpl3+)))
12064
12065(define-public python2-ansi2html
12066 (package-with-python2 python-ansi2html))
12067
12068(define-public python-ddt
12069 (package
12070 (name "python-ddt")
12071 (version "1.1.3")
12072 (source
12073 (origin
12074 (method url-fetch)
12075 (uri (pypi-uri "ddt" version))
12076 (sha256
12077 (base32
12078 "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk"))))
12079 (build-system python-build-system)
12080 (native-inputs
12081 `(("python-mock" ,python-mock)
12082 ("python-nose" ,python-nose)))
12083 (propagated-inputs
12084 `(("python-six" ,python-six)
12085 ("python-pyyaml" ,python-pyyaml)))
12086 (home-page "https://github.com/txels/ddt")
12087 (synopsis "Data-Driven Tests")
12088 (description
12089 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
12090running it with different test data, and make it appear as multiple test
12091cases.")
12092 (license license:expat)))
12093
12094(define-public python2-ddt
12095 (package-with-python2 python-ddt))
12096
12097(define-public python-pycountry
12098 (package
12099 (name "python-pycountry")
12100 (version "18.5.26")
12101 (source
12102 (origin
12103 (method url-fetch)
12104 (uri (pypi-uri "pycountry" version))
12105 (sha256
12106 (base32
12107 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
12108 (build-system python-build-system)
12109 (home-page "https://bitbucket.org/flyingcircus/pycountry")
12110 (synopsis "ISO databases for languages, countries, currencies, etc.")
12111 (description
12112 "@code{pycountry} provides the ISO databases for the standards:
12113@enumerate
12114@item 639-3 (Languages)
12115@item 3166 (Countries)
12116@item 3166-3 (Deleted Countries)
12117@item 3166-2 (Subdivisions of countries)
12118@item 4217 (Currencies)
12119@item 15924 (Scripts)
12120@end enumerate
12121It includes a copy from Debian’s pkg-isocodes and makes the data accessible
12122through a Python API.")
12123 (license license:lgpl2.1+)))
12124
12125(define-public python2-pycountry
12126 (package-with-python2 python-pycountry))
12127
12128(define-public python-pycosat
12129 (package
12130 (name "python-pycosat")
12131 (version "0.6.1")
12132 (source
12133 (origin
12134 (method url-fetch)
12135 (uri (pypi-uri "pycosat" version))
12136 (sha256
12137 (base32
12138 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
12139 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
12140 (build-system python-build-system)
12141 (home-page "https://github.com/ContinuumIO/pycosat")
12142 (synopsis "Bindings to picosat (a SAT solver)")
12143 (description
12144 "This package provides efficient Python bindings to @code{picosat} on
12145the C level. When importing pycosat, the @code{picosat} solver becomes part
12146of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
12147Problem} (SAT) solver.")
12148 (license license:expat)))
12149
12150(define-public python2-pycosat
12151 (package-with-python2 python-pycosat))
12152
12153(define-public python2-ruamel.ordereddict
12154 (package
12155 (name "python2-ruamel.ordereddict")
12156 (version "0.4.9")
12157 (source
12158 (origin
12159 (method url-fetch)
12160 (uri (pypi-uri "ruamel.ordereddict" version))
12161 (sha256
12162 (base32
12163 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
12164 (build-system python-build-system)
12165 (arguments
12166 `(#:python ,python-2
12167 #:phases
12168 (modify-phases %standard-phases
12169 (delete 'check)
12170 (add-after 'install 'check
12171 (lambda* (#:key inputs outputs #:allow-other-keys)
12172 (add-installed-pythonpath inputs outputs)
f987ac30 12173 (invoke "python" "test/testordereddict.py"))))))
44d10b1f
RW
12174 (home-page "https://bitbucket.org/ruamel/ordereddict")
12175 (synopsis "Version of dict that keeps keys in insertion order")
12176 (description
12177 "This is an implementation of an ordered dictionary with @dfn{Key
12178Insertion Order} (KIO: updates of values do not affect the position of the
12179key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
12180removed and put at the back). The standard library module @code{OrderedDict},
12181implemented later, implements a subset of @code{ordereddict} functionality.
12182Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
12183Order} (KSO, no sorting function can be specified, but a transform can be
12184specified to apply on the key before comparison (e.g. @code{string.lower})).")
12185 (license license:expat)))
12186
12187(define-public python-pypeg2
12188 (package
12189 (name "python-pypeg2")
12190 (version "2.15.2")
12191 (source
12192 (origin
12193 (method url-fetch)
12194 (uri (pypi-uri "pyPEG2" version))
12195 (sha256
12196 (base32
12197 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
12198 (build-system python-build-system)
12199 (propagated-inputs `(("python-lxml" ,python-lxml)))
12200 (arguments
12201 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
12202 '(#:tests? #f))
12203 (home-page "https://fdik.org/pyPEG/")
12204 (synopsis "Parsering Expression Grammars in Python")
12205 (description "PyPEG is an intrinsic parser interpreter framework for
12206Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
12207parse many formal languages.")
12208 (license license:gpl2)))
12209
12210(define-public python-incremental
12211 (package
12212 (name "python-incremental")
12213 (version "17.5.0")
12214 (source
12215 (origin
12216 (method url-fetch)
12217 (uri (pypi-uri "incremental" version))
12218 (sha256
12219 (base32
12220 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
12221 (build-system python-build-system)
12222 (home-page "https://github.com/hawkowl/incremental")
12223 (synopsis "Library for versioning Python projects")
12224 (description "Incremental is a small library that versions your Python
12225projects.")
12226 (license license:expat)))
12227
12228(define-public python2-incremental
12229 (package-with-python2 python-incremental))
12230
12231(define-public python-invoke
12232 (package
12233 (name "python-invoke")
12234 (home-page "http://www.pyinvoke.org/")
a5662319 12235 (version "1.3.0")
44d10b1f
RW
12236 (source (origin
12237 (method url-fetch)
12238 (uri (pypi-uri "invoke" version))
12239 (sha256
12240 (base32
a5662319 12241 "1nn7gad0rvy492acpyhkrp01zsk86acf34qhsvq4xmm6x39788n5"))))
44d10b1f
RW
12242 (build-system python-build-system)
12243 (arguments
12244 ;; XXX: Requires many dependencies that are not yet in Guix.
12245 `(#:tests? #f))
12246 (synopsis "Pythonic task execution")
12247 (description
12248 "Invoke is a Python task execution tool and library, drawing inspiration
12249from various sources to arrive at a powerful and clean feature set. It is
12250evolved from the Fabric project, but focuses on local and abstract concerns
12251instead of servers and network commands.")
12252 (license license:bsd-3)))
12253
12254(define-public python2-invoke
12255 (package-with-python2 python-invoke))
12256
12257(define-public python-automat
12258 (package
12259 (name "python-automat")
919d80a0 12260 (version "0.7.0")
44d10b1f
RW
12261 (source (origin
12262 (method url-fetch)
12263 (uri (pypi-uri "Automat" version))
12264 (sha256
12265 (base32
919d80a0 12266 "03ivg70n3b1cbcd2zvjhk8y4kmqxcvhmili39lmgx09dza1qpmyb"))))
44d10b1f
RW
12267 (build-system python-build-system)
12268 ;; We disable the tests because they require python-twisted, while
12269 ;; python-twisted depends on python-automat. Twisted is optional, but the
12270 ;; tests fail if it is not available. Also see
12271 ;; <https://github.com/glyph/automat/issues/71>.
12272 (arguments '(#:tests? #f))
12273 (native-inputs
12274 `(("python-m2r" ,python-m2r)
12275 ("python-setuptools-scm" ,python-setuptools-scm)
12276 ("python-graphviz" ,python-graphviz)))
12277 (propagated-inputs
12278 `(("python-six" ,python-six)
12279 ("python-attrs" ,python-attrs)))
12280 (home-page "https://github.com/glyph/Automat")
12281 (synopsis "Self-service finite-state machines")
12282 (description "Automat is a library for concise, idiomatic Python
12283expression of finite-state automata (particularly deterministic finite-state
12284transducers).")
12285 (license license:expat)))
12286
12287(define-public python2-automat
12288 (package-with-python2 python-automat))
12289
12290(define-public python-m2r
12291 (package
12292 (name "python-m2r")
bcfb8fac 12293 (version "0.2.1")
44d10b1f
RW
12294 (source (origin
12295 (method url-fetch)
12296 (uri (pypi-uri "m2r" version))
12297 (sha256
12298 (base32
bcfb8fac 12299 "16gdm8i06jjmlpvckpfmlkr4693dh0vs192vgsqn84fsdkbbm45z"))))
44d10b1f
RW
12300 (build-system python-build-system)
12301 (propagated-inputs
12302 `(("python-docutils" ,python-docutils)
12303 ("python-mistune" ,python-mistune)))
12304 (native-inputs
12305 `(("python-pygments" ,python-pygments)
12306 ("python-mock" ,python-mock)))
12307 (home-page "https://github.com/miyakogi/m2r")
12308 (synopsis "Markdown to reStructuredText converter")
12309 (description "M2R converts a markdown file including reST markups to valid
12310reST format.")
12311 (license license:expat)))
12312
12313(define-public python2-m2r
12314 (package-with-python2 python-m2r))
12315
12316(define-public python-constantly
12317 (package
12318 (name "python-constantly")
12319 (version "15.1.0")
12320 (source (origin
12321 (method url-fetch)
12322 (uri (pypi-uri "constantly" version))
12323 (sha256
12324 (base32
12325 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
12326 (build-system python-build-system)
12327 (home-page "https://github.com/twisted/constantly")
12328 (synopsis "Symbolic constants in Python")
12329 (description "Constantly is a Python library that provides symbolic
12330constant support. It includes collections and constants with text, numeric,
12331and bit flag values.")
12332 (license license:expat)))
12333
12334(define-public python2-constantly
12335 (package-with-python2 python-constantly))
12336
12337(define-public python-attrs
12338 (package
12339 (name "python-attrs")
c41d5144 12340 (version "19.1.0")
44d10b1f
RW
12341 (source (origin
12342 (method url-fetch)
12343 (uri (pypi-uri "attrs" version))
12344 (sha256
12345 (base32
c41d5144 12346 "16g33zr5f449lqc5wgvzpknxryfzrfsxcr6kpgxwn7l5fkv71f7h"))))
44d10b1f
RW
12347 (build-system python-build-system)
12348 (arguments
12349 `(#:modules ((guix build utils)
12350 (guix build python-build-system)
12351 (ice-9 ftw)
12352 (srfi srfi-1)
12353 (srfi srfi-26))
12354 #:phases (modify-phases %standard-phases
12355 (replace 'check
12356 (lambda _
12357 (let ((cwd (getcwd)))
12358 (setenv "PYTHONPATH"
12359 (string-append
12360 cwd "/build/"
12361 (find (cut string-prefix? "lib" <>)
12362 (scandir (string-append cwd "/build")))
12363 ":"
12364 (getenv "PYTHONPATH")))
12365 (invoke "python" "-m" "pytest")))))))
12366 (native-inputs
12367 `(("python-coverage" ,python-coverage)
12368 ("python-hypothesis" ,python-hypothesis)
12369 ("python-pympler" ,python-pympler)
12370 ("python-pytest" ,python-pytest)
12371 ("python-six" ,python-six)
12372 ("python-sphinx" ,python-sphinx)
12373 ("python-zope-interface" ,python-zope-interface)))
12374 (home-page "https://github.com/python-attrs/attrs/")
12375 (synopsis "Attributes without boilerplate")
12376 (description "@code{attrs} is a Python package with class decorators that
12377ease the chores of implementing the most common attribute-related object
12378protocols.")
12379 (license license:expat)))
12380
12381(define-public python2-attrs
12382 (package-with-python2 python-attrs))
12383
12384(define-public python-attrs-bootstrap
12385 (package
12386 (inherit python-attrs)
12387 (name "python-attrs-bootstrap")
44d10b1f
RW
12388 (native-inputs `())
12389 (arguments `(#:tests? #f))))
12390
12391(define-public python2-attrs-bootstrap
12392 (package-with-python2 python-attrs-bootstrap))
12393
12394(define-public python2-cliapp
12395 (package
12396 (name "python2-cliapp")
9064b84e 12397 (version "1.20180812.1")
44d10b1f
RW
12398 (source
12399 (origin
12400 (method url-fetch)
12401 (uri (string-append
12402 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
12403 version ".tar.gz"))
12404 (sha256
12405 (base32
9064b84e 12406 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
44d10b1f
RW
12407 (build-system python-build-system)
12408 (arguments
12409 `(#:python ,python-2
12410 #:phases
12411 (modify-phases %standard-phases
12412 ;; check phase needs to be run before the build phase. If not,
12413 ;; coverage-test-runner looks for tests for the built source files,
12414 ;; and fails.
12415 (delete 'check)
12416 (add-before 'build 'check
12417 (lambda _
12418 ;; Disable python3 tests
12419 (substitute* "check"
12420 (("python3") "# python3"))
6c826d32 12421 (invoke "./check"))))))
44d10b1f
RW
12422 (native-inputs
12423 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
12424 ("python2-pep8" ,python2-pep8)))
12425 (propagated-inputs
12426 `(("python2-pyaml" ,python2-pyaml)))
12427 (home-page "https://liw.fi/cliapp/")
12428 (synopsis "Python framework for command line programs")
12429 (description "@code{python2-cliapp} is a python framework for
12430command line programs. It contains the typical stuff such programs
12431need to do, such as parsing the command line for options, and
12432iterating over input files.")
12433 (license license:gpl2+)))
12434
12435(define-public python2-ttystatus
12436 (package
12437 (name "python2-ttystatus")
e516a9c2 12438 (version "0.36")
44d10b1f
RW
12439 (source
12440 (origin
12441 (method url-fetch)
12442 (uri (string-append
12443 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
12444 version ".tar.gz"))
12445 (sha256
12446 (base32
e516a9c2 12447 "06mdk4d19zw2j3is54gndhzl396g3xc8k52m7i86z69s9hcz71by"))))
44d10b1f
RW
12448 (build-system python-build-system)
12449 (native-inputs
12450 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
12451 ("python2-pep8" ,python2-pep8)))
12452 (arguments
12453 `(#:python ,python-2
12454 #:phases
12455 (modify-phases %standard-phases
12456 ;; check phase needs to be run before the build phase. If not,
12457 ;; coverage-test-runner looks for tests for the built source files,
12458 ;; and fails.
12459 (delete 'check)
12460 (add-before 'build 'check
cbeee881 12461 (lambda _ (invoke "make" "check"))))))
44d10b1f
RW
12462 (home-page "https://liw.fi/ttystatus/")
12463 (synopsis "Python library for showing progress reporting and
12464status updates on terminals")
12465 (description "@code{python2-ttystatus} is a python library for
12466showing progress reporting and status updates on terminals, for
12467command line programs. Output is automatically adapted to the width
12468of the terminal: truncated if it does not fit, and resized if the
12469terminal size changes.")
12470 (license license:gpl3+)))
12471
12472(define-public python2-tracing
12473 (package
12474 (name "python2-tracing")
12475 (version "0.10")
12476 (source
12477 (origin
12478 (method url-fetch)
12479 (uri (string-append
12480 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
12481 version ".tar.gz"))
12482 (sha256
12483 (base32
12484 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
12485 (build-system python-build-system)
12486 (arguments
12487 `(#:python ,python-2))
12488 (home-page "https://liw.fi/tracing/")
12489 (synopsis "Python debug logging helper")
12490 (description "@code{python2-tracing} is a python library for
12491logging debug messages. It provides a way to turn debugging messages
12492on and off, based on the filename they occur in. It is much faster
12493than using @code{logging.Filter} to accomplish the same thing, which
12494matters when code is run in production mode. The actual logging still
12495happens using the @code{logging} library.")
12496 (license license:gpl3+)))
12497
12498(define-public python2-larch
12499 (package
12500 (name "python2-larch")
12501 (version "1.20151025")
12502 (source
12503 (origin
12504 (method url-fetch)
12505 (uri (string-append
12506 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
12507 version ".tar.gz"))
12508 (patches (search-patches
12509 "python2-larch-coverage-4.0a6-compatibility.patch"))
12510 (sha256
12511 (base32
12512 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
12513 (build-system python-build-system)
12514 (arguments
12515 `(#:python ,python-2
12516 #:phases
12517 (modify-phases %standard-phases
12518 ;; check phase needs to be run before the build phase. If not,
12519 ;; coverage-test-runner looks for tests for the built source files,
12520 ;; and fails.
12521 (delete 'check)
12522 (add-before 'build 'check
204ad455 12523 (lambda _ (invoke "make" "check"))))))
44d10b1f
RW
12524 (native-inputs
12525 `(("cmdtest" ,cmdtest)
12526 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
12527 (propagated-inputs
12528 `(("python2-tracing" ,python2-tracing)))
12529 (home-page "https://liw.fi/larch/")
12530 (synopsis "Python copy-on-write B-tree library")
12531 (description "@code{python2-larch} is an implementation of
12532particular kind of B-tree, based on research by Ohad Rodeh. See
12533@url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
12534on the data structure.
12535
12536The distinctive feature of this B-tree is that a node is never
12537(conceptually) modified. Instead, all updates are done by
12538copy-on-write. This makes it easy to clone a tree, and modify only the
12539clone, while other processes access the original tree.")
12540 (license license:gpl3+)))
12541
12542(define-public python-astroid
12543 (package
12544 (name "python-astroid")
1c43c698 12545 (version "2.3.3")
44d10b1f
RW
12546 (source
12547 (origin
12548 (method url-fetch)
12549 (uri (pypi-uri "astroid" version))
12550 (sha256
1c43c698 12551 (base32 "0fnibsl2cb5mvzbfm7sycj85smx48f8w8m7ks1sqlmpr9ps0gski"))))
44d10b1f
RW
12552 (build-system python-build-system)
12553 (propagated-inputs
12554 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
12555 ("python-six" ,python-six)
f0935460 12556 ("python-typed-ast" ,python-typed-ast)
44d10b1f
RW
12557 ("python-wrapt" ,python-wrapt)))
12558 (native-inputs
12559 `(("python-dateutil" ,python-dateutil)
12560 ("python-nose" ,python-nose)
12561 ("python-pytest" ,python-pytest)
12562 ("python-pytest-runner" ,python-pytest-runner)))
12563 (arguments
12564 `(#:phases
12565 (modify-phases %standard-phases
12566 (add-after 'unpack 'remove-spurious-test
12567 (lambda _
12568 ;; This can be removed after upgrading from python-3.7
12569 ;; https://github.com/PyCQA/astroid/issues/593
12570 ;; https://bugs.python.org/issue34056
12571 (delete-file "astroid/tests/unittest_modutils.py")
12572 #t))
12573 (replace 'check
12574 (lambda _
12575 (invoke "pytest" "astroid"))))))
12576 (home-page "https://github.com/PyCQA/astroid")
12577 (synopsis "Common base representation of python source code for pylint and
12578other projects")
12579 (description "@code{python-astroid} provides a common base representation
12580of python source code for projects such as pychecker, pyreverse, pylint, etc.
12581
12582It provides a compatible representation which comes from the _ast module. It
12583rebuilds the tree generated by the builtin _ast module by recursively walking
12584down the AST and building an extended ast. The new node classes have
12585additional methods and attributes for different usages. They include some
12586support for static inference and local name scopes. Furthermore, astroid
12587builds partial trees by inspecting living objects.")
12588 (license license:lgpl2.1+)
12589 (properties `((python2-variant . ,(delay python2-astroid))))))
12590
12591(define-public python2-astroid
12592 (let ((base (package-with-python2
12593 (strip-python2-variant python-astroid))))
12594 (package (inherit base)
12595 ;; Version 2.x removes python2 support.
12596 (version "1.6.5")
12597 (source
12598 (origin
12599 (method url-fetch)
12600 (uri (pypi-uri "astroid" version))
12601 (sha256
12602 (base32
12603 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
12604 (arguments
12605 (substitute-keyword-arguments (package-arguments base)
12606 ((#:phases phases)
12607 `(modify-phases ,phases
12608 (add-after 'unpack 'remove-spurious-test
12609 (lambda _
12610 ;; https://github.com/PyCQA/astroid/issues/276
12611 (delete-file "astroid/tests/unittest_brain.py")
12612 #t))
12613 (replace 'check
12614 (lambda _
12615 (invoke"python" "-m" "unittest" "discover"
12616 "-p" "unittest*.py")))))))
12617 (native-inputs `())
12618 (propagated-inputs
12619 `(("python2-backports-functools-lru-cache"
12620 ,python2-backports-functools-lru-cache)
12621 ("python2-enum34" ,python2-enum34)
12622 ("python2-singledispatch" ,python2-singledispatch)
741f98b3
MO
12623 ,@(alist-delete "python-typed-ast"
12624 (package-propagated-inputs base)))))))
44d10b1f
RW
12625
12626(define-public python-isort
12627 (package
12628 (name "python-isort")
e2227b6a 12629 (version "4.3.4")
44d10b1f
RW
12630 (source
12631 (origin
e2227b6a
EF
12632 (method git-fetch)
12633 (uri (git-reference
12634 ;; Tests pass only from the Github sources
12635 (url "https://github.com/timothycrosley/isort")
12636 (commit version)))
12637 (file-name (git-file-name name version))
44d10b1f
RW
12638 (sha256
12639 (base32
e2227b6a 12640 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
44d10b1f
RW
12641 (build-system python-build-system)
12642 (native-inputs
12643 `(("python-mock" ,python-mock)
12644 ("python-pytest" ,python-pytest)))
12645 (home-page "https://github.com/timothycrosley/isort")
12646 (synopsis "Python utility/library to sort python imports")
12647 (description "@code{python-isort} is a python utility/library to sort
12648imports alphabetically, and automatically separated into sections. It
12649provides a command line utility, a python library and plugins for various
12650editors.")
e2227b6a
EF
12651 (license license:expat)
12652 (properties `((python2-variant . ,(delay python2-isort))))))
44d10b1f
RW
12653
12654(define-public python2-isort
e2227b6a
EF
12655 (let ((base (package-with-python2
12656 (strip-python2-variant python-isort))))
12657 (package (inherit base)
12658 (native-inputs
12659 `(("python2-futures" ,python2-futures)
12660 ,@(package-native-inputs base))))))
44d10b1f
RW
12661
12662(define-public python2-backports-functools-lru-cache
12663 (package
12664 (name "python2-backports-functools-lru-cache")
12665 (version "1.5")
12666 (source
12667 (origin
12668 (method url-fetch)
12669 ;; only the pypi tarballs contain the necessary metadata
12670 (uri (pypi-uri "backports.functools_lru_cache" version))
12671 (sha256
12672 (base32
12673 "06jgv8gib4fhky0p5cmxdghvsgjyzcdgk48k8pxb1ccf11znk64x"))))
12674 (build-system python-build-system)
12675 (native-inputs
12676 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
12677 (arguments
12678 `(#:python ,python-2))
12679 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
12680 (synopsis "Backport of functools.lru_cache from Python 3.3")
12681 (description "@code{python2-backports-functools-lru-cache} is a backport
12682of @code{functools.lru_cache} from python 3.3.")
12683 (license license:expat)))
12684
12685(define-public python-configparser
12686 (package
12687 (name "python-configparser")
84127f8c 12688 (version "3.7.1")
44d10b1f
RW
12689 (source
12690 (origin
12691 (method url-fetch)
84127f8c 12692 (uri (pypi-uri "configparser" version))
44d10b1f
RW
12693 (sha256
12694 (base32
84127f8c 12695 "0cnz213il9lhgda6x70fw7mfqr8da43s3wm343lwzhqx94mgmmav"))))
44d10b1f 12696 (build-system python-build-system)
809f003f 12697 (home-page "https://github.com/jaraco/configparser/")
44d10b1f
RW
12698 (synopsis "Backport of configparser from python 3.5")
12699 (description "@code{python-configparser} is a backport of
12700@code{configparser} from Python 3.5 so that it can be used directly
12701in other versions.")
12702 (license license:expat)))
12703
12704(define-public python2-configparser
12705 (package-with-python2 python-configparser))
12706
12707(define-public python-mando
12708 (package
12709 (name "python-mando")
12710 (version "0.6.4")
12711 (source (origin
12712 (method url-fetch)
12713 (uri (pypi-uri "mando" version))
12714 (sha256
12715 (base32
12716 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
12717 (build-system python-build-system)
12718 (propagated-inputs
12719 `(("python-rst2ansi" ,python-rst2ansi)
12720 ("python-six" ,python-six)))
12721 (native-inputs
12722 `(("python-pytest" ,python-pytest)))
12723 (home-page "https://mando.readthedocs.org/")
12724 (synopsis
12725 "Wrapper around argparse, allowing creation of complete CLI applications")
12726 (description
12727 "This package is a wrapper around argparse, allowing you to write complete CLI
12728applications in seconds while maintaining all the flexibility.")
12729 (license license:expat)))
12730
12731(define-public python2-mando
12732 (package-with-python2 python-mando))
12733
70daf82f
RW
12734(define-public python2-argparse
12735 (package
12736 (name "python2-argparse")
12737 (version "1.4.0")
12738 (source
12739 (origin
12740 (method url-fetch)
12741 (uri (pypi-uri "argparse" version))
12742 (sha256
12743 (base32
12744 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
12745 (build-system python-build-system)
12746 (arguments
12747 `(#:python ,python-2))
12748 (home-page "https://github.com/ThomasWaldmann/argparse/")
12749 (synopsis "Python command-line parsing library")
12750 (description
12751 "This package is mostly for people who want to have @code{argparse} on
12752older Pythons because it was not part of the standard library back then.")
12753 (license license:psfl)))
12754
44d10b1f
RW
12755(define-public python-fudge
12756 (package
12757 (name "python-fudge")
12758 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
12759 ;; package, which is currently the only use of this package.
12760 (version "0.9.6")
12761 (source
12762 (origin
12763 (method url-fetch)
12764 (uri (pypi-uri "fudge" version))
12765 (sha256
12766 (base32
12767 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
12768 (build-system python-build-system)
12769 (arguments
12770 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
12771 (home-page "https://github.com/fudge-py/fudge")
12772 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
12773 (description
12774 "Fudge is a Python module for using fake objects (mocks and stubs) to
12775test real ones.
12776
12777In readable Python code, you declare the methods available on your fake object
12778and how they should be called. Then you inject that into your application and
12779start testing. This declarative approach means you don’t have to record and
12780playback actions and you don’t have to inspect your fakes after running code.
12781If the fake object was used incorrectly then you’ll see an informative
12782exception message with a traceback that points to the culprit.")
12783 (license license:expat)))
12784
12785(define-public python2-fudge
12786 (package-with-python2 python-fudge))
12787
12788(define-public python-mwclient
12789 (package
12790 (name "python-mwclient")
12791 (version "0.8.4")
12792 (source
12793 (origin
12794 (method url-fetch)
12795 ;; The PyPI version wouldn't contain tests.
12796 (uri (string-append "https://github.com/mwclient/mwclient/archive/"
12797 "v" version ".tar.gz"))
12798 (file-name (string-append name "-" version ".tar.gz"))
12799 (sha256
12800 (base32
12801 "1jj0yhilkjir00719fc7w133x7hdyhkxhk6xblla4asig45klsfv"))))
12802 (build-system python-build-system)
12803 (propagated-inputs
12804 `(("python-requests" ,python-requests)
12805 ("python-requests-oauthlib"
12806 ,python-requests-oauthlib)
12807 ("python-six" ,python-six)))
12808 (native-inputs
12809 `(("python-mock" ,python-mock)
12810 ("python-pytest" ,python-pytest)
12811 ("python-pytest-pep8" ,python-pytest-pep8)
12812 ("python-pytest-cache" ,python-pytest-cache)
12813 ("python-pytest-cov" ,python-pytest-cov)
12814 ("python-responses" ,python-responses)))
12815 (home-page "https://github.com/btongminh/mwclient")
12816 (synopsis "MediaWiki API client")
12817 (description "This package provides a MediaWiki API client.")
12818 (license license:expat)))
12819
12820(define-public python2-mwclient
12821 (package-with-python2 python-mwclient))
12822
12823(define-public python-utils
12824 (package
12825 (name "python-utils")
12826 (version "2.1.0")
12827 (source (origin
12828 (method url-fetch)
12829 (uri (pypi-uri "python-utils" version))
12830 (sha256
12831 (base32
12832 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
12833 (build-system python-build-system)
12834 (native-inputs
12835 `(("pytest-runner" ,python-pytest-runner)
12836 ("pytest" ,python-pytest)
12837 ("six" ,python-six)))
12838 (home-page "https://github.com/WoLpH/python-utils")
12839 (synopsis "Convenient utilities not included with the standard Python install")
12840 (description
12841 "Python Utils is a collection of small Python functions and classes which
12842make common patterns shorter and easier.")
12843 (license license:bsd-2)))
12844
12845(define-public python2-utils
12846 (package-with-python2 python-utils))
12847
44d10b1f
RW
12848(define-public python-diff-match-patch
12849 (package
12850 (name "python-diff-match-patch")
12851 (version "20121119")
12852 (source
12853 (origin
12854 (method url-fetch)
12855 (uri (pypi-uri "diff-match-patch" version))
12856 (sha256
12857 (base32
12858 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
12859 (build-system python-build-system)
12860 (home-page "https://code.google.com/p/google-diff-match-patch")
12861 (synopsis "Synchronize plain text")
12862 (description "Diff Match and Patch libraries offer robust algorithms to
12863perform the operations required for synchronizing plain text.")
12864 (license license:asl2.0)))
12865
12866(define-public python2-diff-match-patch
12867 (package-with-python2 python-diff-match-patch))
12868
12869(define-public python-dirsync
12870 (package
12871 (name "python-dirsync")
12872 (version "2.2.3")
12873 (source
12874 (origin
12875 (method url-fetch)
12876 (uri (pypi-uri "dirsync" version))
12877 (sha256
12878 (base32
12879 "1r40fkanksagcszf1ag85mdr8w7rgc7196n6s1qlsk2abw6i7v0z"))))
12880 (build-system python-build-system)
12881 (propagated-inputs
12882 `(("six" ,python-six)))
12883 (home-page "https://bitbucket.org/tkhyn/dirsync")
12884 (synopsis "Advanced directory tree synchronisation tool")
12885 (description "Advanced directory tree synchronisation tool.")
12886 (license license:expat)))
12887
12888(define-public python2-dirsync
12889 (package-with-python2 python-dirsync))
12890
12891(define-public python-levenshtein
12892 (package
12893 (name "python-levenshtein")
12894 (version "0.12.0")
12895 (source
12896 (origin
12897 (method url-fetch)
12898 (uri (pypi-uri "python-Levenshtein" version))
12899 (sha256
12900 (base32
12901 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
12902 (build-system python-build-system)
12903 (home-page "https://github.com/ztane/python-Levenshtein")
12904 (synopsis "Fast computation of Levenshtein distance and string similarity")
12905 (description
12906 "The Levenshtein Python C extension module contains functions for fast computation of
12907@enumerate
12908@item Levenshtein (edit) distance, and edit operations
12909@item string similarity
12910@item approximate median strings, and generally string averaging
12911@item string sequence and set similarity
12912@end enumerate
12913It supports both normal and Unicode strings.")
12914 (license license:gpl2+)))
12915
12916(define-public python2-levenshtein
12917 (package-with-python2 python-levenshtein))
12918
12919(define-public python-scandir
12920 (package
12921 (name "python-scandir")
12922 (version "1.9.0")
12923 (source
12924 (origin
12925 (method url-fetch)
12926 (uri (pypi-uri "scandir" version))
12927 (sha256
12928 (base32 "0r3hvf1a9jm1rkqgx40gxkmccknkaiqjavs8lccgq9s8khh5x5s4"))))
12929 (build-system python-build-system)
12930 (arguments
12931 `(#:phases (modify-phases %standard-phases
12932 (replace 'check
12933 (lambda _
12934 (invoke "python" "test/run_tests.py"))))))
12935 (home-page "https://github.com/benhoyt/scandir")
12936 (synopsis "Directory iteration function")
12937 (description
12938 "Directory iteration function like os.listdir(), except that instead of
12939returning a list of bare filenames, it yields DirEntry objects that include
12940file type and stat information along with the name. Using scandir() increases
12941the speed of os.walk() by 2-20 times (depending on the platform and file
12942system) by avoiding unnecessary calls to os.stat() in most cases.
12943
12944This package is part of the Python standard library since version 3.5.")
12945 (license license:bsd-3)))
12946
12947(define-public python2-scandir
12948 (package-with-python2 python-scandir))
12949
12950(define-public python2-stemming
12951 (package
12952 (name "python2-stemming")
12953 (version "1.0.1")
12954 (source
12955 (origin
12956 (method url-fetch)
12957 (uri (pypi-uri "stemming" version))
12958 (sha256
12959 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
12960 (build-system python-build-system)
12961 (arguments
12962 `(#:python ,python-2))
12963 (home-page "https://bitbucket.org/mchaput/stemming/overview")
12964 (synopsis "Python implementations of various stemming algorithms")
12965 (description
12966 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
12967stemming algorithms for English. These implementations are straightforward and
12968efficient, unlike some Python versions of the same algorithms available on the
12969Web. This package is an extraction of the stemming code included in the Whoosh
12970search engine.")
12971 (license license:public-domain)))
12972
12973(define-public python-factory-boy
12974 (package
12975 (name "python-factory-boy")
12976 (version "2.8.1")
12977 (source
12978 (origin
12979 (method url-fetch)
12980 (uri (pypi-uri "factory_boy" version))
12981 (sha256
12982 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
12983 (build-system python-build-system)
12984 (arguments
12985 ;; Tests are not included in the tarball.
12986 `(#:tests? #f))
12987 (propagated-inputs
12988 `(("faker" ,python-faker)))
12989 (home-page "https://github.com/benhoyt/scandir")
12990 (synopsis "Versatile test fixtures replacement")
12991 (description
12992 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
12993
12994As a fixtures replacement tool, it aims to replace static, hard to maintain
12995fixtures with easy-to-use factories for complex object.
12996
12997Instead of building an exhaustive test setup with every possible combination
12998of corner cases, factory_boy allows you to use objects customized for the
12999current test, while only declaring the test-specific fields")
13000 (license license:expat)))
13001
13002(define-public python2-factory-boy
13003 (package-with-python2 python-factory-boy))
13004
13005(define-public python-translate-toolkit
13006 (package
13007 (name "python-translate-toolkit")
13008 (version "2.1.0")
13009 (source
13010 (origin
13011 (method url-fetch)
13012 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
13013 (sha256
13014 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
13015 (build-system python-build-system)
13016 (native-inputs
13017 `(("python-pytest" ,python-pytest)
13018 ("python-sphinx" ,python-sphinx)))
13019 (propagated-inputs
13020 `(("python-babel" ,python-babel)
13021 ("python-beautifulsoup4" ,python-beautifulsoup4)
13022 ("python-chardet" ,python-chardet)
13023 ("python-diff-match-patch" ,python-diff-match-patch)
13024 ("python-levenshtein" ,python-levenshtein)
13025 ("python-lxml" ,python-lxml)
13026 ("python-six" ,python-six)
13027 ("python-vobject" ,python-vobject)
13028 ("python-pyyaml" ,python-pyyaml)))
13029 (arguments
13030 ;; TODO: tests are not run, because they end with
13031 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
13032 ;; 'parse_funcs'
13033 ;; during test setup.
13034 `(#:tests? #f))
18919cf9 13035 (home-page "https://toolkit.translatehouse.org")
44d10b1f
RW
13036 (synopsis "Tools and API for translation and localization engineering")
13037 (description
13038 "Tools and API for translation and localization engineering. It contains
13039several utilities, as well as an API for building localization tools.")
13040 (license license:gpl2+)))
13041
13042(define-public python2-translate-toolkit
13043 (package-with-python2 python-translate-toolkit))
13044
13045(define-public python-packaging
13046 (package
13047 (name "python-packaging")
1c10ba3a 13048 (version "19.2")
44d10b1f
RW
13049 (source
13050 (origin
13051 (method url-fetch)
13052 (uri (pypi-uri "packaging" version))
13053 (sha256
13054 (base32
1c10ba3a 13055 "0izwlz9h0bw171a1chr311g2y7n657zjaf4mq4rgm8pp9lbj9f98"))))
44d10b1f
RW
13056 (build-system python-build-system)
13057 (arguments
13058 `(#:phases (modify-phases %standard-phases
13059 (replace 'check
13060 (lambda _ (invoke "py.test" "-vv"))))))
13061 (native-inputs
13062 `(("python-pretend" ,python-pretend)
13063 ("python-pytest" ,python-pytest)))
13064 (propagated-inputs
13065 `(("python-pyparsing" ,python-pyparsing)
13066 ("python-six" ,python-six)))
13067 (home-page "https://github.com/pypa/packaging")
13068 (synopsis "Core utilities for Python packages")
13069 (description "Packaging is a Python module for dealing with Python packages.
13070It offers an interface for working with package versions, names, and dependency
13071information.")
13072 ;; From 'LICENSE': This software is made available under the terms of
13073 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
13074 ;; Contributions to this software is made under the terms of *both* these
13075 ;; licenses.
13076 (license (list license:asl2.0 license:bsd-2))))
13077
13078(define-public python2-packaging
13079 (package-with-python2 python-packaging))
13080
13081(define-public python-relatorio
13082 (package
13083 (name "python-relatorio")
13084 (version "0.8.0")
13085 (source
13086 (origin
13087 (method url-fetch)
13088 (uri (pypi-uri "relatorio" version))
13089 (sha256
13090 (base32
13091 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
13092 (build-system python-build-system)
13093 (propagated-inputs
13094 `(("python-lxml" ,python-lxml)
13095 ("python-genshi" ,python-genshi)))
13096 (native-inputs
13097 `(("python-magic" ,python-magic)))
13098 (home-page "https://relatorio.tryton.org/")
13099 (synopsis "Templating library able to output ODT and PDF files")
13100 (description "Relatorio is a templating library which provides a way to
13101easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
13102for more filetypes can be easily added by creating plugins for them.")
13103 (license license:gpl3+)))
13104
13105(define-public python2-relatorio
13106 (package-with-python2 python-relatorio))
13107
13108(define-public python-radon
13109 (package
13110 (name "python-radon")
13111 (version "2.2.0")
13112 (source
13113 (origin
13114 (method url-fetch)
13115 (uri (pypi-uri "radon" version))
13116 (sha256
13117 (base32
13118 "07gq5hq4nrffxnlnksws9hrx7fd001gam63j62i82gyfr23gvdym"))))
13119 (build-system python-build-system)
13120 (arguments
13121 `(#:phases (modify-phases %standard-phases
13122 (replace 'check
13123 (lambda _
13124 (invoke "python" "radon/tests/run.py"))))))
13125 (propagated-inputs
13126 `(("python-colorama" ,python-colorama)
13127 ("python-flake8-polyfill" ,python-flake8-polyfill)
13128 ("python-mando" ,python-mando)))
13129 (native-inputs
13130 `(("python-pytest" ,python-pytest)
13131 ("python-pytest-mock" ,python-pytest-mock)))
13132 (home-page "https://radon.readthedocs.org/")
13133 (synopsis "Code Metrics in Python")
13134 (description "Radon is a Python tool which computes various code metrics.
13135Supported metrics are:
13136@itemize @bullet
13137@item raw metrics: SLOC, comment lines, blank lines, &c.
13138@item Cyclomatic Complexity (i.e. McCabe’s Complexity)
13139@item Halstead metrics (all of them)
13140@item the Maintainability Index (a Visual Studio metric)
13141@end itemize")
13142 (license license:expat)))
13143
13144(define-public python2-radon
13145 (package-with-python2 python-radon))
13146
13147(define-public python-sure
13148 (package
13149 (name "python-sure")
13150 (version "1.4.11")
13151 (source
13152 (origin
13153 (method url-fetch)
13154 (uri (pypi-uri "sure" version))
13155 (sha256
13156 (base32
13157 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
13158 (build-system python-build-system)
13159 (propagated-inputs
13160 `(("python-mock" ,python-mock)
13161 ("python-six" ,python-six)))
13162 (native-inputs
13163 `(("python-nose" ,python-nose)))
13164 (home-page "https://github.com/gabrielfalcao/sure")
13165 (synopsis "Automated testing library in python for python")
13166 (description
13167 "Sure is a python library that leverages a DSL for writing assertions.
13168Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
13169 (license license:gpl3+)))
13170
13171(define-public python2-sure
13172 (package-with-python2 python-sure))
13173
13174(define-public python2-couleur
13175 ;; This package does not seem to support python3 at all, hence,
13176 ;; only the python2 variant definition is provided.
13177 (package
13178 (name "python2-couleur")
13179 (version "0.6.2")
13180 (source
13181 (origin
13182 (method url-fetch)
13183 (uri (pypi-uri "couleur" version))
13184 (sha256
13185 (base32
13186 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
13187 (build-system python-build-system)
13188 (arguments
13189 `(#:python ,python-2))
13190 (home-page "https://github.com/gabrielfalcao/couleur")
13191 (synopsis
13192 "ANSI terminal tool for python, colored shell and other handy fancy features")
13193 (description
13194 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
13195terminal such as coloured output in the shell, overwriting output, indentation, etc.")
13196 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
13197 ;; https://github.com/gabrielfalcao/couleur/issues/11
13198 (license license:lgpl3+)))
13199
13200(define-public python-misaka
13201 (package
13202 (name "python-misaka")
0dcb3412 13203 (version "2.1.1")
44d10b1f
RW
13204 (source
13205 (origin
13206 (method url-fetch)
13207 (uri (pypi-uri "misaka" version))
13208 (sha256
13209 (base32
0dcb3412 13210 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
44d10b1f
RW
13211 (build-system python-build-system)
13212 (arguments
13213 `(;; Line 37 of setup.py calls self.run_command('develop')
13214 ;; in the 'check' phase. This command seems to be trying
13215 ;; to write to
13216 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
13217 ;; for which it does not have the permission to write.
13218 #:tests? #f))
13219 (propagated-inputs
13220 `(("python-cffi" ,python-cffi)))
13221 (home-page "https://github.com/FSX/misaka")
13222 (synopsis "Python binding for Hoedown")
13223 (description
13224 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
13225library written in C. It features a fast HTML renderer and functionality to make custom
13226renderers (e.g. man pages or LaTeX).")
13227 (license license:expat)))
13228
13229(define-public python2-misaka
13230 (package-with-python2 python-misaka))
13231
13232(define-public python2-steadymark
13233 ;; This is forced into being a python2 only variant
13234 ;; due to its dependence on couleur that has no support
13235 ;; for python3
13236 (package
13237 (name "python2-steadymark")
13238 (version "0.7.3")
13239 (source
13240 (origin
13241 (method url-fetch)
13242 (uri (pypi-uri "steadymark" version))
13243 (sha256
13244 (base32
13245 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
13246 (build-system python-build-system)
13247 (native-inputs
13248 `(("python-couleur" ,python2-couleur)
13249 ("python-sure" ,python2-sure)
13250 ("python-misaka" ,python2-misaka)))
13251 (arguments
13252 `(#:python ,python-2
13253 #:phases
13254 (modify-phases %standard-phases
13255 (add-before 'build 'patch-setup-py
13256 (lambda _
13257 ;; Update requirements from dependency==version
13258 ;; to dependency>=version
13259 (substitute* "setup.py"
13260 (("==") ">="))
13261 #t)))))
13262 (home-page "https://github.com/gabrielfalcao/steadymark")
13263 (synopsis "Markdown-based test runner for python")
13264 (description
13265 "@code{Steadymark} allows documentation to be written in github-flavoured
13266markdown. The documentation may contain snippets of code surrounded by python
13267code blocks and @code{Steadymark} will find these snippets and run them, making
13268sure that there are no old malfunctional examples in the documentation examples.")
13269 (license license:expat)))
13270
13271(define-public python-jsonpointer
13272 (package
13273 (name "python-jsonpointer")
13274 (version "1.10")
13275 (source
13276 (origin
13277 (method url-fetch)
13278 (uri (pypi-uri "jsonpointer" version))
13279 (sha256
13280 (base32
13281 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
13282 (build-system python-build-system)
13283 (home-page "https://github.com/stefankoegl/python-json-pointer")
13284 (synopsis "Identify specific nodes in a JSON document")
13285 (description "@code{jsonpointer} allows you to access specific nodes
13286by path in a JSON document (see RFC 6901).")
13287 (license license:bsd-3)))
13288
13289(define-public python2-jsonpointer
13290 (package-with-python2 python-jsonpointer))
13291
13292(define-public python-jsonpatch
13293 (package
13294 (name "python-jsonpatch")
13295 (version "1.16")
13296 (source
13297 (origin
13298 (method url-fetch)
13299 ;; pypi version lacks tests.js
13300 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
13301 "archive/v" version ".tar.gz"))
13302 (file-name (string-append name "-" version ".tar.gz"))
13303 (sha256
13304 (base32
13305 "085ykisl8v7mv9h7hvhdy3l2fjzs4214gx32r5k6nx4f76hbv6y5"))))
13306 (build-system python-build-system)
13307 (native-inputs
13308 `(("python-jsonpointer" ,python-jsonpointer)))
13309 (home-page "https://github.com/stefankoegl/python-json-patch")
13310 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
13311 (description "@code{jsonpatch} is a library and program that allows
13312applying JSON Patches according to RFC 6902.")
13313 (license license:bsd-3)))
13314
13315(define-public python2-jsonpatch
13316 (package-with-python2 python-jsonpatch))
13317
13318(define-public python-jsonpatch-0.4
13319 (package (inherit python-jsonpatch)
13320 (name "python-jsonpatch")
13321 (version "0.4")
13322 (source
13323 (origin
13324 (method url-fetch)
13325 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
13326 "archive/v" version ".tar.gz"))
13327 (file-name (string-append name "-" version ".tar.gz"))
13328 (sha256
13329 (base32
13330 "0j0cd9z9zyp8kppp464jxrfgrnbgkzl1yi10i5gsv8yz6d95929d"))))))
13331
13332(define-public python2-jsonpatch-0.4
13333 (package-with-python2 python-jsonpatch-0.4))
13334
13335(define-public python-rfc3986
13336 (package
13337 (name "python-rfc3986")
13338 (version "1.1.0")
13339 (source (origin
13340 (method url-fetch)
13341 (uri (pypi-uri "rfc3986" version))
13342 (sha256
13343 (base32
13344 "06wlmysw83f75ff84zr1yr6n0shvc2xn1n1sb4iwzqap9hf5fn44"))))
13345 (build-system python-build-system)
13346 (arguments
13347 `(#:modules ((guix build utils)
13348 (guix build python-build-system)
13349 (ice-9 ftw)
13350 (srfi srfi-1)
13351 (srfi srfi-26))
13352 #:phases
13353 (modify-phases %standard-phases
13354 (replace 'check
13355 (lambda _
13356 (let ((cwd (getcwd)))
13357 (setenv "PYTHONPATH"
13358 (string-append cwd "/build/"
13359 (find (cut string-prefix? "lib" <>)
13360 (scandir (string-append cwd "/build")))
13361 ":"
13362 (getenv "PYTHONPATH")))
13363 (invoke "pytest" "-v")))))))
13364 (native-inputs
13365 `(("python-pytest" ,python-pytest)))
13366 (home-page "https://rfc3986.readthedocs.io/")
13367 (synopsis "Parse and validate URI references")
13368 (description
13369 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
13370validation and authority parsing. This module also supports RFC@tie{}6874
13371which adds support for zone identifiers to IPv6 addresses.")
13372 (license license:asl2.0)))
13373
13374(define-public python2-rfc3986
13375 (package-with-python2 python-rfc3986))
13376
13377(define-public python-rfc3987
13378 (package
13379 (name "python-rfc3987")
13380 (version "1.3.7")
13381 (source
13382 (origin
13383 (method url-fetch)
13384 (uri (pypi-uri "rfc3987" version))
13385 (sha256
13386 (base32
13387 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
13388 (build-system python-build-system)
13389 (home-page "https://pypi.python.org/pypi/rfc3987")
13390 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
13391 (description "@code{rfc3987} provides routines for parsing and
13392validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
13393 (license license:gpl3+)))
13394
13395(define-public python2-rfc3987
13396 (package-with-python2 python-rfc3987))
13397
13398(define-public python-validate-email
13399 (package
13400 (name "python-validate-email")
13401 (version "1.3")
13402 (source
13403 (origin
13404 (method url-fetch)
13405 (uri (pypi-uri "validate_email" version))
13406 (sha256
13407 (base32
13408 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
13409 (build-system python-build-system)
13410 (home-page "https://github.com/syrusakbary/validate_email")
13411 (synopsis "Verifies if an email address is valid and really exists")
13412 (description "@code{validate_email} can be used to verify if an email
13413address is valid and really exists.")
13414 (license license:lgpl3+)))
13415
13416(define-public python2-validate-email
13417 (package-with-python2 python-validate-email))
13418
13419(define-public python-flex
13420 (package
13421 (name "python-flex")
13422 (version "6.10.0")
13423 (source
13424 (origin
13425 (method url-fetch)
13426 (uri (pypi-uri "flex" version))
13427 (sha256
13428 (base32
13429 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
13430 (build-system python-build-system)
13431 (propagated-inputs
13432 `(("python-click" ,python-click)
13433 ("python-iso8601" ,python-iso8601)
13434 ("python-jsonpointer" ,python-jsonpointer)
13435 ("python-pyyaml" ,python-pyyaml)
13436 ("python-requests" ,python-requests)
13437 ("python-rfc3987" ,python-rfc3987)
13438 ("python-six" ,python-six)
13439 ("python-validate-email" ,python-validate-email)))
13440 (home-page "https://github.com/pipermerriam/flex")
13441 (synopsis "Validates Swagger schemata")
13442 (description "@code{flex} can be used to validate Swagger schemata.")
13443 (license license:bsd-3)))
13444
13445(define-public python2-flex
13446 (package-with-python2 python-flex))
13447
13448(define-public python-marshmallow
13449 (package
13450 (name "python-marshmallow")
13451 (version "3.0.0b14")
13452 (source
13453 (origin
13454 (method url-fetch)
13455 (uri (pypi-uri "marshmallow" version))
13456 (sha256
13457 (base32
13458 "1digk3f5cfk7wmlka65mc7bzsd96pbsgcsvp6pimd5b4ff9zb5p3"))))
13459 (build-system python-build-system)
13460 (propagated-inputs
13461 `(("python-dateutil" ,python-dateutil)
13462 ("python-simplejson" ,python-simplejson)))
13463 (native-inputs
13464 `(("python-pytest" ,python-pytest)
13465 ("python-pytz" ,python-pytz)))
13466 (home-page "https://github.com/marshmallow-code/marshmallow")
13467 (synopsis "Convert complex datatypes to and from native
13468Python datatypes.")
13469 (description "@code{marshmallow} provides a library for converting
13470complex datatypes to and from native Python datatypes.")
13471 (license license:expat)))
13472
13473(define-public python2-marshmallow
13474 (package-with-python2 python-marshmallow))
13475
13476(define-public python-apispec
13477 (package
13478 (name "python-apispec")
13479 (version "0.25.3")
13480 (source
13481 (origin
13482 (method url-fetch)
13483 (uri (pypi-uri "apispec" version))
13484 (sha256
13485 (base32
13486 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
13487 (build-system python-build-system)
13488 (propagated-inputs
13489 `(("python-pyyaml" ,python-pyyaml)))
13490 (native-inputs
13491 `(("python-pytest" ,python-pytest)
13492 ("python-flask" ,python-flask)
13493 ("python-marshmallow" ,python-marshmallow)
13494 ("python-tornado" ,python-tornado)
13495 ("python-bottle" ,python-bottle)
13496 ("python-mock" ,python-mock)))
13497 (home-page "https://github.com/marshmallow-code/apispec")
13498 (synopsis "Swagger 2.0 API specification generator")
13499 (description "@code{python-apispec} is a pluggable API specification
13500generator. Currently supports the OpenAPI specification (f.k.a.
13501Swagger 2.0).")
13502 (license license:expat)))
13503
13504(define-public python2-apispec
13505 (package-with-python2 python-apispec))
13506
13507(define-public python-flasgger
13508 (package
13509 (name "python-flasgger")
13510 (version "0.6.3")
13511 (source
13512 (origin
1a04d421
TGR
13513 (method git-fetch)
13514 (uri (git-reference
13515 (url "https://github.com/rochacbruno/flasgger.git")
13516 (commit version)))
13517 (file-name (git-file-name name version))
44d10b1f 13518 (sha256
1a04d421 13519 (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn"))))
44d10b1f
RW
13520 (build-system python-build-system)
13521 (arguments
13522 `(#:phases
13523 (modify-phases %standard-phases
13524 (replace 'check
13525 (lambda* (#:key inputs outputs #:allow-other-keys)
13526 (substitute* "Makefile"
13527 (("flake8 flasgger --ignore=F403")
13528 "flake8 flasgger --ignore=E731,F403"))
13529 (setenv "PYTHONPATH" (string-append (getcwd)
13530 ":"
13531 (getenv "PYTHONPATH")))
ac599a09 13532 (invoke "py.test"))))))
44d10b1f
RW
13533 (propagated-inputs
13534 `(("python-flask" ,python-flask)
13535 ("python-pyyaml" ,python-pyyaml)
13536 ("python-jsonschema" ,python-jsonschema)
13537 ("python-mistune" ,python-mistune)
13538 ("python-six" ,python-six)))
13539 (native-inputs
13540 `(("python-decorator" ,python-decorator)
13541 ("python-flake8" ,python-flake8)
13542 ("python-flask-restful" ,python-flask-restful)
13543 ("python-flex" ,python-flex)
13544 ("python-pytest" ,python-pytest)
13545 ("python-pytest-cov" ,python-pytest-cov)
13546 ("python-marshmallow" ,python-marshmallow)
13547 ("python-apispec" ,python-apispec)))
13548 (home-page "https://github.com/rochacbruno/flasgger/")
13549 (synopsis "Extract Swagger specs from your Flask project")
13550 (description "@code{python-flasgger} allows extracting Swagger specs
13551from your Flask project. It is a fork of Flask-Swagger.")
13552 (license license:expat)))
13553
13554(define-public python2-flasgger
13555 (package-with-python2 python-flasgger))
13556
13557(define-public python-swagger-spec-validator
13558 (package
13559 (name "python-swagger-spec-validator")
fe9c5b1d 13560 (version "2.4.3")
44d10b1f
RW
13561 (source
13562 (origin
13563 (method url-fetch)
13564 (uri (pypi-uri "swagger-spec-validator" version))
13565 (sha256
13566 (base32
fe9c5b1d 13567 "11g627icrsqwazsncwi0sdvprcj6hwaayw5xk3xsj8d97bmrzqjp"))))
44d10b1f
RW
13568 (build-system python-build-system)
13569 (propagated-inputs
13570 `(("python-jsonschema" ,python-jsonschema)
fe9c5b1d 13571 ("python-pyyaml" ,python-pyyaml)
44d10b1f
RW
13572 ("python-six" ,python-six)))
13573 (home-page
13574 "https://github.com/Yelp/swagger_spec_validator")
13575 (synopsis "Validation of Swagger specifications")
13576 (description "@code{swagger_spec_validator} provides a library for
13577validating Swagger API specifications.")
13578 (license license:asl2.0)))
13579
13580(define-public python2-swagger-spec-validator
13581 (package-with-python2 python-swagger-spec-validator))
13582
13583(define-public python-apache-libcloud
13584 (package
13585 (name "python-apache-libcloud")
13586 (version "2.4.0")
13587 (source
13588 (origin
13589 (method url-fetch)
13590 (uri (pypi-uri "apache-libcloud" version))
13591 (sha256
13592 (base32
13593 "0daj3mkzw79v5zin2r1s2wkrz1hplfc16bwj4ss68i5qjq4l2p0j"))))
13594 (build-system python-build-system)
13595 (arguments
13596 `(#:phases
13597 (modify-phases %standard-phases
13598 (add-after 'unpack 'patch-ssh
13599 (lambda* (#:key inputs #:allow-other-keys)
13600 (substitute* "libcloud/compute/ssh.py"
13601 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
13602 "/bin/ssh" "'")))
13603 #t))
13604 (add-after 'unpack 'patch-tests
13605 (lambda _
13606 (substitute* "./libcloud/test/test_file_fixtures.py"
13607 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
13608 (("def _ascii") "def _raw_data(self, method, url, body, headers):
13609 return (httplib.OK,
13610 \"1234abcd\",
13611 {\"test\": \"value\"},
13612 httplib.responses[httplib.OK])
13613 def _ascii"))
13614 (substitute* "libcloud/test/compute/test_ssh_client.py"
13615 (("class ShellOutSSHClientTests")
13616 "@unittest.skip(\"Guix container doesn't have ssh service\")
13617class ShellOutSSHClientTests")
13618 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
13619 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
13620 (("'.xF0', '.x90', '.x8D', '.x88'")
13621 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
13622 #t))
13623 (add-before 'check 'copy-secret
13624 (lambda _
13625 (copy-file "libcloud/test/secrets.py-dist"
13626 "libcloud/test/secrets.py")
13627 #t)))))
13628 (inputs
13629 `(("openssh" ,openssh)))
13630 (propagated-inputs
13631 `(("python-paramiko" ,python-paramiko)
13632 ("python-requests" ,python-requests)))
13633 (native-inputs
13634 `(("python-lockfile" ,python-lockfile)
13635 ("python-mock" ,python-mock)
13636 ("python-pytest" ,python-pytest)
13637 ("python-pytest-runner" ,python-pytest-runner)
13638 ("python-requests-mock" ,python-requests-mock)))
13639 (home-page "https://libcloud.apache.org/")
13640 (synopsis "Unified Cloud API")
13641 (description "@code{libcloud} is a Python library for interacting with
13642many of the popular cloud service providers using a unified API.")
13643 (license license:asl2.0)))
13644
13645(define-public python2-apache-libcloud
13646 (package-with-python2 python-apache-libcloud))
13647
13648(define-public python-smmap2
13649 (package
13650 (name "python-smmap2")
13651 (version "2.0.3")
13652 (source
13653 (origin
13654 (method url-fetch)
13655 (uri (pypi-uri "smmap2" version))
13656 (sha256
13657 (base32
13658 "1hvn28p3zvxa98sbi9lrqvv2ps4q284j4jq9a619zw0m7yv0sly7"))))
13659 (build-system python-build-system)
13660 (native-inputs
13661 `(("python-nosexcover" ,python-nosexcover)))
13662 (home-page "https://github.com/Byron/smmap")
13663 (synopsis "Python sliding window memory map manager")
13664 (description "@code{smmap2} is a pure Python implementation of a sliding
13665window memory map manager.")
13666 (license license:bsd-3)))
13667
13668(define-public python2-smmap2
13669 (package-with-python2 python-smmap2))
13670
13671(define-public python-regex
13672 (package
13673 (name "python-regex")
c187c9d7 13674 (version "2019.04.14")
44d10b1f
RW
13675 (source (origin
13676 (method url-fetch)
13677 (uri (pypi-uri "regex" version))
13678 (sha256
13679 (base32
c187c9d7
BT
13680 "1a6hhfs6l6snr1z654ay6wzbmwdkmv282fzfkd5hk2d1n73y8v6m"))))
13681 ;; TODO: Fix and enable regex_test.py tests that complain about the
13682 ;; test.support module not existing.
44d10b1f
RW
13683 (build-system python-build-system)
13684 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
13685 (synopsis "Alternative regular expression module")
13686 (description "This regular expression implementation is backwards-
13687compatible with the standard @code{re} module, but offers additional
13688functionality like full case-folding for case-insensitive matches in Unicode.")
13689 (license license:psfl)))
13690
13691(define-public python2-regex
13692 (package-with-python2 python-regex))
13693
13694(define-public python2-pyopengl
13695 (package
13696 (name "python2-pyopengl")
13697 (version "3.1.0")
13698 (source
13699 (origin
13700 (method url-fetch)
13701 (uri (pypi-uri "PyOpenGL" version))
13702 (sha256
13703 (base32
13704 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
13705 (arguments
13706 `(#:python ,python-2))
13707 (build-system python-build-system)
13708 (home-page "http://pyopengl.sourceforge.net")
13709 (synopsis "Standard OpenGL bindings for Python")
13710 (description
13711 "PyOpenGL is the most common cross platform Python binding to OpenGL and
13712related APIs. The binding is created using the standard @code{ctypes}
13713library.")
13714 (license license:bsd-3)))
13715
13716(define-public python2-pyopengl-accelerate
13717 (package
13718 (inherit python2-pyopengl)
13719 (name "python2-pyopengl-accelerate")
13720 (version "3.1.0")
13721 (source
13722 (origin
13723 (method url-fetch)
13724 (uri (pypi-uri "PyOpenGL-accelerate" version))
13725 (sha256
13726 (base32
13727 "0464c1ifzk0k92lyndikmvzjgnx1y25r7bkkc8pnxm4kp1q4czwj"))))
13728 (synopsis "Acceleration code for PyOpenGL")
13729 (description
13730 "This is the Cython-coded accelerator module for PyOpenGL.")))
13731
13732(define-public python-rencode
13733 (package
13734 (name "python-rencode")
13735 (version "1.0.5")
13736 (source
13737 (origin
13738 (method url-fetch)
13739 (uri (pypi-uri "rencode" version))
13740 (sha256
13741 (base32
13742 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
13743 (build-system python-build-system)
13744 (arguments
13745 `(#:phases
13746 (modify-phases %standard-phases
13747 (add-before 'check 'delete-bogus-test
13748 ;; This test requires /home/aresch/Downloads, which is not provided by
13749 ;; the build environment.
13750 (lambda _
13751 (delete-file "rencode/t.py")
13752 #t)))))
13753 (native-inputs `(("pkg-config" ,pkg-config)
13754 ("python-cython" ,python-cython)))
13755 (home-page "https://github.com/aresch/rencode")
13756 (synopsis "Serialization of heterogeneous data structures")
13757 (description
13758 "The @code{rencode} module is a data structure serialization library,
13759similar to @code{bencode} from the BitTorrent project. For complex,
13760heterogeneous data structures with many small elements, r-encoding stake up
13761significantly less space than b-encodings. This version of rencode is a
13762complete rewrite in Cython to attempt to increase the performance over the
13763pure Python module.")
13764 (license license:bsd-3)))
13765
13766(define-public python2-rencode
13767 (package-with-python2 python-rencode))
13768
13769(define-public python-xenon
13770 (package
13771 (name "python-xenon")
13772 (version "0.5.4")
13773 (source
13774 (origin
13775 (method url-fetch)
13776 (uri (pypi-uri "xenon" version))
13777 (sha256
13778 (base32
13779 "029cbhysg2vr5n4jz8gpg2793f8wkwnqpr1qgv6c1dn685vy31mc"))))
13780 (build-system python-build-system)
13781 (native-inputs
13782 `(("python-pyyaml" ,python-pyyaml)
13783 ("python-radon" ,python-radon)
13784 ("python-requests" ,python-requests)
13785 ("python-flake8" ,python-flake8)
13786 ("python-tox" ,python-tox)))
13787 (arguments
13788 `(#:phases
13789 (modify-phases %standard-phases
13790 (add-before 'build 'patch-test-requirements
13791 (lambda _
13792 ;; Remove httpretty dependency for tests.
13793 (substitute* "setup.py"
13794 (("httpretty") ""))
13795 #t)))))
13796 (home-page "https://xenon.readthedocs.org/")
13797 (synopsis "Monitor code metrics for Python on your CI server")
13798 (description
13799 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
13800Ideally, @code{xenon} is run every time code is committed. Through command
13801line options, various thresholds can be set for the complexity of code. It
13802will fail (i.e. it will exit with a non-zero exit code) when any of these
13803requirements is not met.")
13804 (license license:expat)))
13805
13806(define-public python2-xenon
13807 (package-with-python2 python-xenon))
13808
13809(define-public python-pysocks
13810 (package
13811 (name "python-pysocks")
b8725cdf 13812 (version "1.7.0")
44d10b1f
RW
13813 (source
13814 (origin
13815 (method url-fetch)
13816 (uri (pypi-uri "PySocks" version))
13817 (sha256
13818 (base32
b8725cdf 13819 "0z4p31bpqm893cf87qqgb30k7nwd8kqfjwwjm5cvxb6zbyj1w0yr"))))
44d10b1f
RW
13820 (build-system python-build-system)
13821 (arguments `(#:tests? #f))
13822 (home-page "https://github.com/Anorov/PySocks")
13823 (synopsis "SOCKS client module")
13824 (description "@code{pysocks} is an updated and semi-actively maintained
13825version of @code{SocksiPy} with bug fixes and extra features.")
13826 (license license:bsd-3)))
13827
13828(define-public python2-pysocks
13829 (package-with-python2 python-pysocks))
13830
13831(define-public python-pydiff
13832 (package
13833 (name "python-pydiff")
13834 (version "0.2")
13835 (source
13836 (origin
13837 (method url-fetch)
13838 (uri (pypi-uri "pydiff" version))
13839 (sha256
13840 (base32
13841 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
13842 (build-system python-build-system)
13843 (home-page "https://github.com/myint/pydiff")
13844 (synopsis "Library to diff two Python files at the bytecode level")
13845 (description
13846 "@code{pydiff} makes it easy to look for actual code changes while
13847ignoring formatting changes.")
13848 (license license:expat)))
13849
13850(define-public python2-pydiff
13851 (package-with-python2 python-pydiff))
13852
13853(define-public python-tqdm
13854 (package
13855 (name "python-tqdm")
13856 (version "4.19.6")
13857 (source
13858 (origin
13859 (method url-fetch)
13860 (uri (pypi-uri "tqdm" version))
13861 (sha256
13862 (base32
13863 "1pw0ngm0zn9papdmkwipi3yih5c3di6d0w849bdmrraq4d2d9h2y"))))
13864 (build-system python-build-system)
13865 (native-inputs
13866 `(("python-flake8" ,python-flake8)
13867 ("python-nose" ,python-nose)
13868 ("python-coverage" ,python-coverage)))
13869 (home-page "https://github.com/tqdm/tqdm")
13870 (synopsis "Fast, extensible progress meter")
13871 (description
13872 "Make loops show a progress bar on the console by just wrapping any
13873iterable with @code{|tqdm(iterable)|}. Offers many options to define
13874design and layout.")
f875d76f
PL
13875 (license (list license:mpl2.0 license:expat))
13876 (properties `((python2-variant . ,(delay python2-tqdm))))))
44d10b1f
RW
13877
13878(define-public python2-tqdm
f875d76f
PL
13879 (let ((tqdm (package-with-python2
13880 (strip-python2-variant python-tqdm))))
13881 (package (inherit tqdm)
13882 (native-inputs `(("python2-functools32" ,python2-functools32)
13883 ,@(package-native-inputs tqdm))))))
44d10b1f
RW
13884
13885(define-public python-pkginfo
13886 (package
13887 (name "python-pkginfo")
13888 (version "1.4.2")
13889 (source
13890 (origin
13891 (method url-fetch)
13892 (uri (pypi-uri "pkginfo" version))
13893 (sha256
13894 (base32
13895 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
13896 (build-system python-build-system)
13897 (arguments
13898 ;; The tests are broken upstream.
13899 '(#:tests? #f))
13900 (home-page
13901 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
13902 (synopsis
13903 "Query metadatdata from sdists, bdists, and installed packages")
13904 (description
13905 "API to query the distutils metadata written in @file{PKG-INFO} inside a
13906source distriubtion (an sdist) or a binary distribution (e.g., created by
13907running bdist_egg). It can also query the EGG-INFO directory of an installed
13908distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
13909created by running @code{python setup.py develop}).")
13910 (license license:expat)))
13911
13912(define-public python2-pkginfo
13913 (package-with-python2 python-pkginfo))
13914
13915(define-public python-twine
13916 (package
13917 (name "python-twine")
13918 (version "1.9.1")
13919 (source
13920 (origin
13921 (method url-fetch)
13922 (uri (pypi-uri "twine" version))
13923 (sha256
13924 (base32
13925 "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a"))))
13926 (build-system python-build-system)
13927 (propagated-inputs
13928 `(("python-tqdm" ,python-tqdm)
13929 ("python-pkginfo" ,python-pkginfo)
13930 ("python-requests" ,python-requests)
13931 ("python-requests-toolbelt" ,python-requests-toolbelt)))
13932 (home-page "https://github.com/pypa/twine")
13933 (synopsis "Collection of utilities for interacting with PyPI")
13934 (description
13935 "@code{twine} currently supports registering projects and uploading
13936distributions. It authenticates the user over HTTPS, allows them to pre-sign
13937their files and supports any packaging format (including wheels).")
13938 (license license:asl2.0)))
13939
13940(define-public python2-twine
13941 (package-with-python2 python-twine))
13942
13943(define-public python-linecache2
13944 (package
13945 (name "python-linecache2")
13946 (version "1.0.0")
13947 (source
13948 (origin
13949 (method url-fetch)
13950 (uri (pypi-uri "linecache2" version))
13951 (sha256
13952 (base32
13953 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
13954 (build-system python-build-system)
13955 (arguments
13956 `(;; The tests depend on unittest2, and our version is a bit too old.
13957 #:tests? #f))
13958 (native-inputs
13959 `(("python-pbr" ,python-pbr-minimal)))
13960 (home-page
13961 "https://github.com/testing-cabal/linecache2")
13962 (synopsis "Backports of the linecache module")
13963 (description
13964 "The linecache module allows one to get any line from any file, while
13965attempting to optimize internally, using a cache, the common case where many
13966lines are read from a single file.")
13967 (license license:psfl)))
13968
13969(define-public python2-linecache2
13970 (package-with-python2 python-linecache2))
13971
13972(define-public python-traceback2
13973 (package
13974 (name "python-traceback2")
13975 (version "1.4.0")
13976 (source
13977 (origin
13978 (method url-fetch)
13979 (uri (pypi-uri "traceback2" version))
13980 (sha256
13981 (base32
13982 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
13983 (build-system python-build-system)
13984 (arguments
13985 `(;; python-traceback2 and python-unittest2 depend on one another.
13986 #:tests? #f))
13987 (native-inputs
13988 `(("python-pbr" ,python-pbr-minimal)))
13989 (propagated-inputs
13990 `(("python-linecache2" ,python-linecache2)))
13991 (home-page
13992 "https://github.com/testing-cabal/traceback2")
13993 (synopsis "Backports of the traceback module")
13994 (description
13995 "This module provides a standard interface to extract, format and print
13996stack traces of Python programs. It exactly mimics the behavior of the Python
13997interpreter when it prints a stack trace.")
13998 (license license:psfl)))
13999
14000(define-public python2-traceback2
14001 (package-with-python2 python-traceback2))
14002
14003(define-public python-ratelimiter
14004 (package
14005 (name "python-ratelimiter")
14006 (version "1.2.0")
14007 (source
14008 (origin
14009 (method url-fetch)
14010 (uri (pypi-uri "ratelimiter" version))
14011 (sha256
14012 (base32
14013 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
14014 (build-system python-build-system)
14015 (arguments
14016 '(#:tests? #f)) ; There are no tests in the pypi archive.
14017 (home-page "https://github.com/RazerM/ratelimiter")
14018 (synopsis "Simple rate limiting object")
14019 (description
14020 "The @code{ratelimiter} module ensures that an operation will not be
14021executed more than a given number of times during a given period.")
14022 (license license:asl2.0)))
14023
14024(define-public python2-ratelimiter
14025 (package-with-python2 python-ratelimiter))
14026
14027(define-public python-dukpy
14028 (package
14029 (name "python-dukpy")
14030 (version "0.3")
14031 (source
14032 (origin
5b77ebe1
TGR
14033 (method git-fetch)
14034 (uri (git-reference
14035 (url "https://github.com/kovidgoyal/dukpy.git")
14036 (commit (string-append "v" version))))
14037 (file-name (git-file-name name version))
44d10b1f 14038 (sha256
5b77ebe1 14039 (base32 "13h21nqzasv4zj32xs61brmc106pr2cx243672crcmwxxnjgaxls"))))
44d10b1f
RW
14040 (build-system python-build-system)
14041 (home-page "https://github.com/kovidgoyal/dukpy")
14042 (synopsis "Run JavaScript in python")
14043 (description
14044 "dukpy is a JavaScript runtime environment for Python using the duktape
14045embeddable JavaScript engine.")
14046 ;; Dukpy is licensed under MIT like the embedded duktape library,
14047 ;; with 'errors.c' as GPL3.
14048 (license (list license:expat license:gpl3))))
14049
14050(define-public python2-dukpy
14051 (package-with-python2 python-dukpy))
14052
14053(define-public python-jsonrpclib-pelix
14054 (package
14055 (name "python-jsonrpclib-pelix")
14056 (version "0.3.2")
14057 (source
14058 (origin
14059 (method url-fetch)
14060 (uri (pypi-uri "jsonrpclib-pelix" version))
14061 (sha256
14062 (base32
14063 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
14064 (build-system python-build-system)
14065 (arguments
14066 `(#:tests? #f)) ; no tests in PyPI tarball
14067 (home-page "https://github.com/tcalmant/jsonrpclib/")
14068 (synopsis "JSON-RPC 2.0 client library for Python")
14069 (description
14070 "This library implements the JSON-RPC v2.0
14071specification (backwards-compatible) as a client library for Python. This
14072version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
14073services.")
14074 (license license:asl2.0)))
14075
14076(define-public python2-jsonrpclib-pelix
14077 (package-with-python2 python-jsonrpclib-pelix))
14078
14079(define-public python-setuptools-scm-git-archive
14080 (package
14081 (name "python-setuptools-scm-git-archive")
14082 (version "1.0")
14083 (source
14084 (origin
14085 (method url-fetch)
14086 (uri (pypi-uri "setuptools_scm_git_archive" version))
14087 (sha256
14088 (base32
14089 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
14090 (build-system python-build-system)
14091 (native-inputs
14092 `(("python-pytest" ,python-pytest)))
14093 (propagated-inputs
14094 `(("python-setuptools-scm" ,python-setuptools-scm)))
14095 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
14096 (synopsis "Setuptools_scm plugin for git archives")
14097 (description
14098 "The setuptools_scm_git_archive package is a plugin to
14099setuptools_scm, which supports obtaining versions from git archives that
14100belong to tagged versions.")
14101 (license license:expat)))
14102
14103(define-public python2-setuptools-scm-git-archive
14104 (package-with-python2 python-setuptools-scm-git-archive))
14105
724a350c
RW
14106(define-public python-setuptools-git
14107 (package
14108 (name "python-setuptools-git")
14109 (version "1.2")
14110 (source
14111 (origin
14112 (method url-fetch)
14113 (uri (pypi-uri "setuptools-git" version))
14114 (sha256
14115 (base32
14116 "0i84qjwp5m0l9qagdjww2frdh63r37km1c48mrvbmaqsl1ni6r7z"))))
14117 (build-system python-build-system)
14118 (arguments
14119 `(#:phases
14120 (modify-phases %standard-phases
14121 ;; This is needed for tests.
14122 (add-after 'unpack 'configure-git
14123 (lambda _
14124 (setenv "HOME" "/tmp")
14125 (invoke "git" "config" "--global" "user.email" "guix")
14126 (invoke "git" "config" "--global" "user.name" "guix")
14127 #t)))))
14128 (native-inputs
14129 `(("git" ,git-minimal)))
14130 (home-page "https://github.com/msabramo/setuptools-git")
14131 (synopsis "Setuptools revision control system plugin for Git")
14132 (description
14133 "This package provides a plugin for Setuptools for revision control with
14134Git.")
14135 (license license:bsd-3)))
14136
44d10b1f
RW
14137(define-public python-pyclipper
14138 (package
14139 (name "python-pyclipper")
ff3d1b99 14140 (version "1.1.0.post3")
44d10b1f
RW
14141 (source
14142 (origin
14143 (method url-fetch)
14144 (uri (pypi-uri "pyclipper" version ".zip"))
14145 (sha256
ff3d1b99 14146 (base32 "164yksvqwqvwzh8f8lq92asg87hd8rvcy2xb5vm4y4ccvd5xgb7i"))
44d10b1f
RW
14147 (modules '((guix build utils)))
14148 (snippet
14149 '(begin
14150 ;; This file is generated by Cython.
14151 (delete-file "pyclipper/pyclipper.cpp") #t))))
14152 (build-system python-build-system)
14153 (arguments
14154 `(#:phases
14155 (modify-phases %standard-phases
14156 (add-before 'build 'cythonize-sources
14157 (lambda _
14158 (with-directory-excursion "pyclipper"
14159 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
14160 (propagated-inputs
14161 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
14162 (native-inputs
14163 `(("python-cython" ,python-cython)
14164 ("python-pytest" ,python-pytest)
14165 ("python-pytest-runner" ,python-pytest-runner)
14166 ("python-unittest2" ,python-unittest2)
14167 ("unzip" ,unzip)))
14168 (home-page "https://github.com/greginvm/pyclipper")
14169 (synopsis "Wrapper for Angus Johnson's Clipper library")
14170 (description
14171 "Pyclipper is a Cython wrapper for the C++ translation of the
14172Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
14173 (license license:expat)))
14174
14175(define-public python2-pyclipper
14176 (package-with-python2 python-pyclipper))
14177
14178(define-public python2-booleanoperations
14179 (package
14180 (name "python2-booleanoperations")
14181 (version "0.7.1")
14182 (source
14183 (origin
14184 (method url-fetch)
14185 (uri (pypi-uri "booleanOperations" version ".zip"))
14186 (sha256
14187 (base32
14188 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
14189 (build-system python-build-system)
14190 (arguments
14191 `(#:python ,python-2))
14192 (native-inputs
14193 `(("unzip" ,unzip)
14194 ("python2-pytest" ,python2-pytest)
14195 ("python2-pytest-runner" ,python2-pytest-runner)))
14196 (propagated-inputs
14197 `(("python-fonttools" ,python2-fonttools)
14198 ("python-pyclipper" ,python2-pyclipper)
14199 ("python-ufolib" ,python2-ufolib)))
14200 (home-page "https://github.com/typemytype/booleanOperations")
14201 (synopsis "Boolean operations on paths")
14202 (description
14203 "BooleanOperations provides a Python library that enables
14204boolean operations on paths.")
14205 (license license:expat)))
14206
14207(define-public python-tempdir
14208 (package
14209 (name "python-tempdir")
14210 (version "0.7.1")
14211 (source
14212 (origin
14213 (method url-fetch)
14214 (uri (pypi-uri "tempdir" version))
14215 (sha256
14216 (base32
14217 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
14218 (build-system python-build-system)
14219 (home-page "https://pypi.org/project/tempdir/")
14220 (arguments
14221 ;; the package has no tests
14222 '(#:tests? #f))
14223 (synopsis "Python library for managing temporary directories")
14224 (description
14225 "This library manages temporary directories that are automatically
14226deleted with all their contents when they are no longer needed. It is
14227particularly convenient for use in tests.")
14228 (license license:expat)))
14229
14230(define-public python2-tempdir
14231 (package-with-python2 python-tempdir))
14232
14233(define-public python-activepapers
14234 (package
14235 (name "python-activepapers")
14236 (version "0.2.2")
14237 (source
14238 (origin
14239 (method url-fetch)
14240 (uri (pypi-uri "ActivePapers.Py" version))
14241 (sha256
14242 (base32
14243 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
14244 (build-system python-build-system)
14245 (arguments
14246 `(#:modules ((ice-9 ftw)
14247 (srfi srfi-1)
14248 (guix build utils)
14249 (guix build python-build-system))
14250
14251 #:phases
14252 (modify-phases %standard-phases
14253 (add-after 'unpack 'delete-python2-code
14254 (lambda _
14255 (for-each delete-file
14256 '("lib/activepapers/builtins2.py"
14257 "lib/activepapers/standardlib2.py"
14258 "lib/activepapers/utility2.py"))))
14259 (replace 'check
14260 (lambda _
14261 ;; Deactivate the test cases that download files
14262 (setenv "NO_NETWORK_ACCESS" "1")
14263 ;; For some strange reason, some tests fail if nosetests runs all
14264 ;; test modules in a single execution. They pass if each test
14265 ;; module is run individually.
14266 (for-each (lambda (filename)
14267 (invoke "nosetests"
14268 (string-append "tests/" filename)))
14269 (scandir "tests"
14270 (lambda (filename)
14271 (string-suffix? ".py" filename)))))))))
14272 (native-inputs
14273 `(("python-tempdir" ,python-tempdir)
14274 ("python-nose" ,python-nose)))
14275 (propagated-inputs
14276 `(("python-h5py" ,python-h5py)))
14277 (home-page "http://www.activepapers.org/")
14278 (synopsis "Executable papers for scientific computing")
14279 (description
14280 "ActivePapers is a tool for working with executable papers, which
14281combine data, code, and documentation in single-file packages,
14282suitable for publication as supplementary material or on repositories
14283such as figshare or Zenodo.")
14284 (properties `((python2-variant . ,(delay python2-activepapers))))
14285 (license license:bsd-3)))
14286
14287(define-public python2-activepapers
14288 (let ((base (package-with-python2
14289 (strip-python2-variant python-activepapers))))
14290 (package
14291 (inherit base)
14292 (arguments
14293 (substitute-keyword-arguments (package-arguments base)
14294 ((#:phases phases)
14295 `(modify-phases ,phases
14296 (delete 'delete-python2-code)
14297 (add-after 'unpack 'delete-python3-code
14298 (lambda _
14299 (for-each delete-file
14300 '("lib/activepapers/builtins3.py"
14301 "lib/activepapers/standardlib3.py"
14302 "lib/activepapers/utility3.py")))))))))))
14303
14304(define-public python-semver
14305 (package
14306 (name "python-semver")
14307 (version "2.7.9")
14308 (source
14309 (origin
14310 (method url-fetch)
14311 (uri (pypi-uri "semver" version))
14312 (sha256
14313 (base32
14314 "0hhgqppchv59rqj0yzi1prdg2nfsywqmjsqy2rycyxm0hvxmbyqz"))))
14315 (build-system python-build-system)
14316 (arguments
14317 `(#:phases
14318 (modify-phases %standard-phases
14319 (add-after 'unpack 'patch-test-requirements
14320 (lambda _
14321 (substitute* "setup.py"
14322 ;; Our Python is new enough.
14323 (("'virtualenv<14\\.0\\.0'") "'virtualenv'"))
14324 #t)))))
14325 (native-inputs
14326 `(("python-tox" ,python-tox)
14327 ("python-virtualenv" ,python-virtualenv)))
14328 (home-page "https://github.com/k-bx/python-semver")
14329 (synopsis "Python helper for Semantic Versioning")
14330 (description "This package provides a Python library for
14331@url{Semantic Versioning, http://semver.org/}.")
14332 (license license:bsd-3)))
14333
14334(define-public python2-semver
14335 (package-with-python2 python-semver))
14336
14337(define-public python-pyro4
14338 (package
14339 (name "python-pyro4")
3ce91d44 14340 (version "4.77")
44d10b1f
RW
14341 (source
14342 (origin
14343 (method url-fetch)
14344 (uri (pypi-uri "Pyro4" version))
14345 (sha256
3ce91d44 14346 (base32 "0gsjg869y4gpy265s1gj1f2qy6jn5iz8r2bwwnq78r1r5yi15zib"))))
44d10b1f 14347 (build-system python-build-system)
3ce91d44
GL
14348 (arguments
14349 '(#:tests? #f)) ;FIXME: Some tests require network access.
14350 (native-inputs
14351 `(("python-cloudpickle" ,python-cloudpickle)
14352 ("python-dill" ,python-dill)
14353 ("python-msgpack" ,python-msgpack)))
44d10b1f
RW
14354 (propagated-inputs
14355 `(("python-serpent" ,python-serpent)))
14356 (home-page "https://pyro4.readthedocs.io")
14357 (synopsis "Distributed object middleware for Python")
14358 (description
14359 "Pyro enables you to build applications in which objects can talk to each
14360other over the network. You can just use normal Python method calls to call
14361objects on other machines, also known as remote procedure calls (RPC).")
14362 (license license:expat)))
14363
14364(define-public python2-pyro
14365 (package
14366 (name "python2-pyro")
14367 (version "3.16")
14368 (source
14369 (origin
14370 (method url-fetch)
14371 (uri (pypi-uri "Pyro" version))
14372 (file-name (string-append "Pyro-" version ".tar.gz"))
14373 (sha256
14374 (base32
14375 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
14376 (build-system python-build-system)
14377 (arguments
14378 ;; Pyro is not compatible with Python 3
14379 `(#:python ,python-2
14380 ;; Pyro has no test cases for automatic execution
14381 #:tests? #f))
14382 (home-page "http://pythonhosted.org/Pyro/")
14383 (synopsis "Distributed object manager for Python")
14384 (description "Pyro is a Distributed Object Technology system
14385written in Python that is designed to be easy to use. It resembles
14386Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
14387which is a system and language independent Distributed Object Technology
14388and has much more to offer than Pyro or RMI. Pyro 3.x is no
14389longer maintained. New projects should use Pyro4 instead, which
14390is the new Pyro version that is actively developed.")
14391 (license license:expat)))
14392
14393(define-public python2-scientific
14394 (package
14395 (name "python2-scientific")
14396 (version "2.9.4")
14397 (source
14398 (origin
c695f011
KH
14399 (method git-fetch)
14400 (uri (git-reference
14401 (url "https://github.com/khinsen/ScientificPython")
14402 (commit (string-append "rel" version))))
14403 (file-name (git-file-name name version))
44d10b1f
RW
14404 (sha256
14405 (base32
c695f011 14406 "16l48aj9fps9r7jyk8gpxppwrv0fqvlc13sayxskz28r5s6sjwbl"))))
44d10b1f
RW
14407 (build-system python-build-system)
14408 (inputs
14409 `(("netcdf" ,netcdf)))
14410 (propagated-inputs
14411 `(("python-numpy" ,python2-numpy-1.8)
14412 ("python-pyro" ,python2-pyro)))
14413 (arguments
14414 ;; ScientificPython is not compatible with Python 3
14415 `(#:python ,python-2
14416 #:tests? #f ; No test suite
14417 #:phases
14418 (modify-phases %standard-phases
14419 (replace 'build
14420 (lambda* (#:key inputs #:allow-other-keys)
77e61e25
RW
14421 (invoke "python" "setup.py" "build"
14422 (string-append "--netcdf_prefix="
14423 (assoc-ref inputs "netcdf"))))))))
c695f011 14424 (home-page "http://dirac.cnrs-orleans.fr/ScientificPython")
44d10b1f
RW
14425 (synopsis "Python modules for scientific computing")
14426 (description "ScientificPython is a collection of Python modules that are
14427useful for scientific computing. Most modules are rather general (Geometry,
14428physical units, automatic derivatives, ...) whereas others are more
14429domain-specific (e.g. netCDF and PDB support). The library is currently
14430not actively maintained and works only with Python 2 and NumPy < 1.9.")
14431 (license license:cecill-c)))
14432
14433(define-public python2-mmtk
14434 (package
14435 (name "python2-mmtk")
fe9b72c5 14436 (version "2.7.12")
44d10b1f
RW
14437 (source
14438 (origin
fe9b72c5
KH
14439 (method git-fetch)
14440 (uri (git-reference
14441 (url "https://github.com/khinsen/MMTK")
14442 (commit (string-append "rel" version))))
14443 (file-name (git-file-name name version))
44d10b1f
RW
14444 (sha256
14445 (base32
fe9b72c5 14446 "1fqwh3ba9jd42nigvn5shndgwb1zy7kh9520ncvqci7n8ffjr6p1"))))
44d10b1f
RW
14447 (build-system python-build-system)
14448 (native-inputs
14449 `(("netcdf" ,netcdf)))
14450 (propagated-inputs
14451 `(("python-scientific" ,python2-scientific)
14452 ("python-tkinter" ,python-2 "tk")))
14453 (arguments
14454 `(#:python ,python-2
14455 #:tests? #f
14456 #:phases
14457 (modify-phases %standard-phases
14458 (add-before 'build 'includes-from-scientific
14459 (lambda* (#:key inputs #:allow-other-keys)
14460 (mkdir-p "Include/Scientific")
14461 (copy-recursively
14462 (string-append
14463 (assoc-ref inputs "python-scientific")
14464 "/include/python2.7/Scientific")
14465 "Include/Scientific"))))))
14466 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
14467 (synopsis "Python library for molecular simulation")
14468 (description "MMTK is a library for molecular simulations with an emphasis
14469on biomolecules. It provides widely used methods such as Molecular Dynamics
14470and normal mode analysis, but also basic routines for implementing new methods
14471for simulation and analysis. The library is currently not actively maintained
14472and works only with Python 2 and NumPy < 1.9.")
14473 (license license:cecill-c)))
14474
14475(define-public python-phonenumbers
14476 (package
14477 (name "python-phonenumbers")
14478 (version "8.9.1")
14479 (source
14480 (origin
14481 (method url-fetch)
14482 (uri (pypi-uri "phonenumbers" version))
14483 (sha256
14484 (base32
14485 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
14486 (build-system python-build-system)
14487 (home-page
14488 "https://github.com/daviddrysdale/python-phonenumbers")
14489 (synopsis
14490 "Python library for dealing with international phone numbers")
14491 (description
14492 "This package provides a Python port of Google's libphonenumber library.")
14493 (license license:asl2.0)))
14494
14495(define-public python2-phonenumbers
14496 (package-with-python2 python-phonenumbers))
14497
14498(define-public python-send2trash
14499 (package
14500 (name "python-send2trash")
d9b0216b 14501 (version "1.5.0")
44d10b1f 14502 (source
d9b0216b 14503 (origin (method git-fetch)
44d10b1f 14504 ;; Source tarball on PyPI doesn't include tests.
d9b0216b
RW
14505 (uri (git-reference
14506 (url "https://github.com/hsoft/send2trash.git")
14507 (commit version)))
14508 (file-name (git-file-name name version))
44d10b1f
RW
14509 (sha256
14510 (base32
d9b0216b 14511 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
44d10b1f
RW
14512 (build-system python-build-system)
14513 (arguments
14514 '(#:phases
14515 (modify-phases %standard-phases
14516 (add-before 'check 'pre-check
14517 (lambda _
14518 (mkdir-p "/tmp/foo")
14519 (setenv "HOME" "/tmp/foo")
14520 #t)))))
14521 (home-page "https://github.com/hsoft/send2trash")
14522 (synopsis "Send files to the user's @file{~/Trash} directory")
14523 (description "This package provides a Python library to send files to the
14524user's @file{~/Trash} directory.")
20b3fde7 14525 (properties `((python2-variant . ,(delay python2-send2trash))))
44d10b1f
RW
14526 (license license:bsd-3)))
14527
14528(define-public python2-send2trash
14529 (package
f32164ab 14530 (inherit (package-with-python2 (strip-python2-variant python-send2trash)))
44d10b1f
RW
14531 (arguments
14532 (substitute-keyword-arguments (package-arguments python-send2trash)
14533 ((#:phases phases)
14534 `(modify-phases ,phases
14535 (add-before 'check 'setenv
14536 (lambda _
14537 (setenv "PYTHONPATH"
14538 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
4782a06f 14539 #t))))))))
44d10b1f
RW
14540
14541(define-public python-yapf
14542 (package
14543 (name "python-yapf")
14544 (version "0.24.0")
14545 (source
14546 (origin
14547 (method url-fetch)
14548 (uri (pypi-uri "yapf" version))
14549 (sha256
14550 (base32
14551 "0anwby0ydmyzcsgjc5dn1ryddwvii4dq61vck447q0n96npnzfyf"))))
14552 (build-system python-build-system)
14553 (home-page "https://github.com/google/yapf")
14554 (synopsis "Formatter for Python code")
14555 (description "YAPF is a formatter for Python code. It's based off of
14556@dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
14557takes the code and reformats it to the best formatting that conforms to the
14558style guide, even if the original code didn't violate the style guide.")
14559 (license license:asl2.0)))
14560
14561(define-public python2-yapf
14562 (package-with-python2 python-yapf))
14563
14564(define-public python-gyp
14565 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
14566 (revision "0"))
14567 (package
14568 (name "python-gyp")
14569 ;; Google does not release versions,
14570 ;; based on second most recent commit date.
14571 (version (git-version "0.0.0" revision commit))
14572 (source
14573 (origin
14574 ;; Google does not release tarballs,
14575 ;; git checkout is needed.
14576 (method git-fetch)
14577 (uri (git-reference
14578 (url "https://chromium.googlesource.com/external/gyp")
14579 (commit commit)))
14580 (file-name (git-file-name name version))
14581 (sha256
14582 (base32
14583 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
14584 (build-system python-build-system)
14585 (home-page "https://gyp.gsrc.io/")
14586 (synopsis "GYP is a Meta-Build system")
14587 (description
14588 "GYP builds build systems for large, cross platform applications.
14589It can be used to generate XCode projects, Visual Studio projects, Ninja build
14590files, and Makefiles.")
14591 (license license:bsd-3))))
14592
14593(define-public python2-gyp
14594 (package-with-python2 python-gyp))
14595
14596(define-public python-whatever
14597 (package
14598 (name "python-whatever")
97610a66 14599 (version "0.6")
44d10b1f
RW
14600 (source
14601 (origin
14602 (method url-fetch)
14603 (uri (string-append "https://github.com/Suor/whatever/archive/" version
14604 ".tar.gz"))
14605 (sha256
97610a66 14606 (base32 "1rchg9hrlvw4sn20lq1zspczr4x1pv57c02gv73igiqx1hqpy2nc"))
44d10b1f
RW
14607 (file-name (string-append name "-" version ".tar.gz"))))
14608 (build-system python-build-system)
14609 (arguments
14610 `(#:phases
14611 (modify-phases %standard-phases
14612 (replace 'check
14613 (lambda _
14614 (invoke "py.test"))))))
14615 (native-inputs
14616 `(("python-pytest" ,python-pytest)))
14617 (home-page "http://github.com/Suor/whatever")
14618 (synopsis "Make anonymous functions by partial application of operators")
14619 (description "@code{whatever} provides an easy way to make anonymous
14620functions by partial application of operators.")
14621 (license license:bsd-3)))
14622
14623(define-public python2-whatever
14624 (package-with-python2 python-whatever))
14625
14626(define-public python-funcy
14627 (package
14628 (name "python-funcy")
9e396ab8 14629 (version "1.11")
44d10b1f
RW
14630 (source
14631 (origin
a85c6027
TGR
14632 (method git-fetch)
14633 (uri (git-reference
14634 (url "https://github.com/Suor/funcy.git")
14635 (commit version)))
44d10b1f 14636 (sha256
a85c6027
TGR
14637 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
14638 (file-name (git-file-name name version))))
44d10b1f
RW
14639 (build-system python-build-system)
14640 (arguments
14641 `(#:phases
14642 (modify-phases %standard-phases
14643 (replace 'check
14644 (lambda _
14645 (invoke "py.test"))))))
14646 (native-inputs
14647 `(("python-pytest" ,python-pytest)
14648 ("python-whatever" ,python-whatever)))
14649 (home-page "http://github.com/Suor/funcy")
14650 (synopsis "Functional tools")
14651 (description "@code{funcy} is a library that provides functional tools.
14652Examples are:
14653@enumerate
14654@item merge - Merges collections of the same type
14655@item walk - Type-preserving map
14656@item select - Selects a part of a collection
14657@item take - Takes the first n items of a collection
14658@item first - Takes the first item of a collection
14659@item remove - Predicated-removes items of a collection
14660@item concat - Concatenates two collections
14661@item flatten - Flattens a collection with subcollections
14662@item distinct - Returns only distinct items
14663@item split - Predicated-splits a collection
14664@item split_at - Splits a collection at a given item
14665@item group_by - Groups items by group
14666@item pairwise - Pairs off adjacent items
14667@item partial - Partially-applies a function
14668@item curry - Curries a function
14669@item compose - Composes functions
14670@item complement - Complements a predicate
14671@item all_fn - \"all\" with predicate
14672@end enumerate")
14673 (license license:bsd-3)))
14674
14675(define-public python2-funcy
14676 (package-with-python2 python-funcy))
14677
14678(define-public python-isoweek
14679 (package
14680 (name "python-isoweek")
14681 (version "1.3.3")
14682 (source
14683 (origin
14684 (method url-fetch)
14685 (uri (pypi-uri "isoweek" version))
14686 (sha256
14687 (base32
14688 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
14689 (build-system python-build-system)
14690 (home-page "https://github.com/gisle/isoweek")
14691 (synopsis "Objects representing a week")
14692 (description "The @code{isoweek} module provide the class Week that
14693implements the week definition of ISO 8601. This standard also defines
14694a notation for identifying weeks; yyyyWww (where the W is a literal).
14695Week instances stringify to this form.")
14696 (license license:bsd-3)))
14697
14698(define-public python2-isoweek
14699 (package-with-python2 python-isoweek))
14700
14701(define-public python-tokenize-rt
14702 (package
14703 (name "python-tokenize-rt")
14704 (version "2.0.1")
14705 (source
14706 (origin
14707 (method url-fetch)
14708 (uri (pypi-uri "tokenize-rt" version))
14709 (sha256
14710 (base32
14711 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
14712 (build-system python-build-system)
14713 (home-page "https://github.com/asottile/tokenize-rt")
14714 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
14715 (description
14716 "This Python library is a wrapper around @code{tokenize} from the Python
14717standard library. It provides two additional tokens @code{ESCAPED_NL} and
14718@code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
14719and @code{tokens_to_src} to roundtrip.")
14720 (license license:expat)))
14721
14722(define-public python-future-fstrings
14723 (package
14724 (name "python-future-fstrings")
14725 (version "0.4.1")
14726 (source
14727 (origin
14728 (method url-fetch)
14729 (uri (pypi-uri "future_fstrings" version))
14730 (sha256
14731 (base32
14732 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
14733 (build-system python-build-system)
14734 (propagated-inputs
14735 `(("python-tokenize-rt" ,python-tokenize-rt)))
14736 (home-page "https://github.com/asottile/future-fstrings")
14737 (synopsis "Backport of fstrings to Python < 3.6")
14738 (description
14739 "This package provides a UTF-8 compatible encoding
14740@code{future_fstrings}, which performs source manipulation. It decodes the
14741source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
14742@code{f} strings.")
14743 (license license:expat)))
14744
dae2eb1c
MC
14745(define-public python-typed-ast
14746 (package
14747 (name "python-typed-ast")
bae89583 14748 (version "1.4.0")
dae2eb1c
MC
14749 (source
14750 (origin
bae89583
MO
14751 (method git-fetch)
14752 (uri (git-reference
14753 (url "https://github.com/python/typed_ast.git")
14754 (commit version)))
dae2eb1c 14755 (sha256
bae89583
MO
14756 (base32 "0l0hz809f7i356kmqkvfsaswiidb98j9hs9rrjnfawzqcbffzgyb"))
14757 (file-name (git-file-name name version))))
dae2eb1c
MC
14758 (build-system python-build-system)
14759 (arguments
14760 `(#:modules ((guix build utils)
14761 (guix build python-build-system)
14762 (ice-9 ftw)
14763 (srfi srfi-1)
14764 (srfi srfi-26))
14765 #:phases
14766 (modify-phases %standard-phases
14767 (replace 'check
14768 (lambda _
14769 (let ((cwd (getcwd)))
14770 (setenv "PYTHONPATH"
14771 (string-append cwd "/build/"
14772 (find (cut string-prefix? "lib" <>)
14773 (scandir (string-append cwd "/build")))
14774 ":"
14775 (getenv "PYTHONPATH"))))
14776 (invoke "pytest")
14777 #t)))))
14778 (native-inputs `(("python-pytest" ,python-pytest)))
14779 (home-page "https://github.com/python/typed_ast")
14780 (synopsis "Fork of Python @code{ast} modules with type comment support")
14781 (description "This package provides a parser similar to the standard
14782@code{ast} library. Unlike @code{ast}, the parsers in @code{typed_ast}
14783include PEP 484 type comments and are independent of the version of Python
14784under which they are run. The @code{typed_ast} parsers produce the standard
14785Python AST (plus type comments), and are both fast and correct, as they are
14786based on the CPython 2.7 and 3.7 parsers.")
14787 ;; See the file "LICENSE" for the details.
14788 (license (list license:psfl
14789 license:asl2.0
14790 license:expat)))) ;ast27/Parser/spark.py
14791
44d10b1f
RW
14792(define-public python-typing
14793 (package
14794 (name "python-typing")
14795 (version "3.6.6")
14796 (source
14797 (origin
14798 (method url-fetch)
14799 (uri (pypi-uri "typing" version))
14800 (sha256
14801 (base32
14802 "0ba9acs4awx15bf9v3nrs781msbd2nx826906nj6fqks2bvca9s0"))))
14803 (build-system python-build-system)
14804 (home-page "https://docs.python.org/3/library/typing.html")
14805 (synopsis "Type hints for Python")
14806 (description "This is a backport of the standard library @code{typing}
14807module to Python versions older than 3.5. Typing defines a standard notation
14808for Python function and variable type annotations. The notation can be used
14809for documenting code in a concise, standard format, and it has been designed
14810to also be used by static and runtime type checkers, static analyzers, IDEs
14811and other tools.")
14812 (license license:psfl)))
14813
14814(define-public python2-typing
14815 (package-with-python2 python-typing))
14816
f89d443b
VC
14817(define-public python-typing-extensions
14818 (package
14819 (name "python-typing-extensions")
14820 (version "3.7.2")
14821 (source
14822 (origin
14823 (method url-fetch)
14824 (uri (pypi-uri "typing_extensions" version))
14825 (sha256
14826 (base32
14827 "0wfsv71pvkyf2na938l579jh0v3kzl6g744ijgnahcwd4d9x0b7v"))))
14828 (build-system python-build-system)
14829 (home-page
14830 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
14831 (synopsis "Experimental type hints for Python")
14832 (description
14833 "The typing_extensions module contains additional @code{typing} hints not
14834yet present in the of the @code{typing} standard library.
14835Included are implementations of:
14836@enumerate
14837@item ClassVar
14838@item ContextManager
14839@item Counter
14840@item DefaultDict
14841@item Deque
14842@item NewType
14843@item NoReturn
14844@item overload
14845@item Protocol
14846@item runtime
14847@item Text
14848@item Type
14849@item TYPE_CHECKING
14850@item AsyncGenerator
14851@end enumerate\n")
14852 (license license:psfl)))
14853
44d10b1f
RW
14854(define-public bpython
14855 (package
14856 (name "bpython")
4de93b2f 14857 (version "0.18")
44d10b1f
RW
14858 (source
14859 (origin
14860 (method url-fetch)
14861 (uri (pypi-uri "bpython" version))
14862 (sha256
4de93b2f 14863 (base32 "1hl6frgvr2lqaxqczl8amg9xih32b3gzv429vs0qrjb8wpdj1k2n"))))
44d10b1f
RW
14864 (build-system python-build-system)
14865 (arguments
14866 `(#:phases
14867 (modify-phases %standard-phases
14868 (add-after 'unpack 'remove-failing-test
14869 (lambda _
14870 ;; Remove failing test. FIXME: make it pass
14871 (delete-file "bpython/test/test_args.py")
14872 #t))
14873 (add-after 'wrap 'add-aliases
14874 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
14875 (lambda* (#:key outputs #:allow-other-keys)
14876 (let ((out (assoc-ref outputs "out")))
14877 (for-each
14878 (lambda (old new)
14879 (symlink old (string-append out "/bin/" new)))
14880 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
14881 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
14882 #t)))))
14883 (propagated-inputs
14884 `(("python-pygments" ,python-pygments)
14885 ("python-requests" ,python-requests)
4de93b2f 14886 ("python-babel" ,python-babel) ; optional, for internationalization
44d10b1f
RW
14887 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
14888 ("python-greenlet" ,python-greenlet)
4de93b2f 14889 ("python-urwid" ,python-urwid) ; for bpython-urwid only
44d10b1f
RW
14890 ("python-six" ,python-six)))
14891 (native-inputs
14892 `(("python-sphinx" ,python-sphinx)
14893 ("python-mock" ,python-mock)))
14894 (home-page "https://bpython-interpreter.org/")
14895 (synopsis "Fancy interface to the Python interpreter")
14896 (description "Bpython is a fancy interface to the Python
14897interpreter. bpython's main features are
14898
14899@enumerate
14900@item in-line syntax highlighting,
14901@item readline-like autocomplete with suggestions displayed as you type,
14902@item expected parameter list for any Python function,
14903@item \"rewind\" function to pop the last line of code from memory and
14904 re-evaluate,
14905@item send the code you've entered off to a pastebin,
14906@item save the code you've entered to a file, and
14907@item auto-indentation.
14908@end enumerate")
14909 (license license:expat)))
14910
14911(define-public bpython2
14912 (let ((base (package-with-python2
14913 (strip-python2-variant bpython))))
14914 (package (inherit base)
14915 (name "bpython2")
14916 (arguments
14917 `(#:python ,python-2
14918 #:phases
14919 (modify-phases %standard-phases
14920 (add-after 'unpack 'remove-failing-test
14921 (lambda _
14922 ;; Remove failing test. FIXME: make it pass
14923 (delete-file "bpython/test/test_args.py")
14924 ;; Disable failing test-cases (renaming inhibits they are
14925 ;; discovered)
14926 (substitute* "bpython/test/test_curtsies_repl.py"
14927 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
14928 (string-append a "xxx_off_" b))
14929 (("^(\\s*def )(test_complex\\W)" _ a b)
14930 (string-append a "xxx_off_" b)))
14931 #t))
14932 (add-before 'build 'rename-scripts
14933 ;; rename the scripts to bypthon2, bpdb2, etc.
14934 (lambda _
14935 (substitute* "setup.py"
14936 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
14937 (string-append name "2" rest "\n"))
14938 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
14939 (string-append name "2" (or sub "") rest "\n")))
14940 #t))))))))
14941
14942(define-public python-pyinotify
14943 (package
14944 (name "python-pyinotify")
14945 (version "0.9.6")
14946 (source (origin
14947 (method url-fetch)
14948 (uri (pypi-uri "pyinotify" version))
14949 (sha256
14950 (base32
14951 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
14952 (build-system python-build-system)
14953 (arguments `(#:tests? #f)) ;no tests
14954 (home-page "https://github.com/seb-m/pyinotify")
14955 (synopsis "Python library for monitoring inotify events")
14956 (description
14957 "@code{pyinotify} provides a Python interface for monitoring
14958file system events on Linux.")
14959 (license license:expat)))
14960
14961(define-public python2-pyinotify
14962 (package-with-python2 python-pyinotify))
14963
14964;; Ada parser uses this version.
14965(define-public python2-quex-0.67.3
14966 (package
14967 (name "python2-quex")
14968 (version "0.67.3")
14969 (source
14970 (origin
14971 (method url-fetch)
14972 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
14973 (version-major+minor version)
14974 "/quex-" version ".zip"))
14975 (sha256
14976 (base32
14977 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
14978 (build-system python-build-system)
14979 (native-inputs
14980 `(("unzip" ,unzip)))
14981 (arguments
14982 `(#:python ,python-2
14983 #:tests? #f
14984 #:phases
14985 (modify-phases %standard-phases
14986 (delete 'configure)
14987 (delete 'build)
14988 (replace 'install
14989 (lambda* (#:key outputs #:allow-other-keys)
14990 (let* ((out (assoc-ref outputs "out"))
14991 (share/quex (string-append out "/share/quex"))
14992 (bin (string-append out "/bin")))
14993 (copy-recursively "." share/quex)
14994 (mkdir-p bin)
14995 (symlink (string-append share/quex "/quex-exe.py")
14996 (string-append bin "/quex"))
14997 #t))))))
14998 (native-search-paths
14999 (list (search-path-specification
15000 (variable "QUEX_PATH")
15001 (files '("share/quex")))))
15002 (home-page "http://quex.sourceforge.net/")
15003 (synopsis "Lexical analyzer generator in Python")
15004 (description "@code{quex} is a lexical analyzer generator in Python.")
15005 (license license:lgpl2.1+))) ; Non-military
15006
15007(define-public python2-quex
15008 (package (inherit python2-quex-0.67.3)
15009 (name "python2-quex")
15010 (version "0.68.1")
15011 (source
15012 (origin
15013 (method url-fetch)
15014 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
15015 (sha256
15016 (base32
15017 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
15018 (file-name (string-append name "-" version ".tar.gz"))))))
15019
15020(define-public python-more-itertools
15021 (package
15022 (name "python-more-itertools")
1b066827 15023 (version "7.1.0")
44d10b1f
RW
15024 (source
15025 (origin
15026 (method url-fetch)
15027 (uri (pypi-uri "more-itertools" version))
15028 (sha256
15029 (base32
1b066827 15030 "16phg2f2dvm6ci5wr49ncha5lmc0m2in3bsl33c61vzca4gkvd4b"))))
44d10b1f 15031 (build-system python-build-system)
44d10b1f
RW
15032 (home-page "https://github.com/erikrose/more-itertools")
15033 (synopsis "More routines for operating on iterables, beyond itertools")
15034 (description "Python's built-in @code{itertools} module implements a
15035number of iterator building blocks inspired by constructs from APL, Haskell,
15036and SML. @code{more-itertools} includes additional building blocks for
15037working with iterables.")
47f66348 15038 (properties `((python2-variant . ,(delay python2-more-itertools))))
44d10b1f
RW
15039 (license license:expat)))
15040
47f66348 15041;; The 5.x series are the last versions supporting Python 2.7.
44d10b1f 15042(define-public python2-more-itertools
47f66348
MB
15043 (package
15044 (inherit python-more-itertools)
15045 (name "python2-more-itertools")
15046 (version "5.0.0")
15047 (source (origin
15048 (method url-fetch)
15049 (uri (pypi-uri "more-itertools" version))
15050 (sha256
15051 (base32
15052 "1r12cm6mcdwdzz7d47a6g4l437xsvapdlgyhqay3i2nrlv03da9q"))))
15053 (arguments
15054 `(#:python ,python2-minimal))
15055 (propagated-inputs
15056 `(("python2-six" ,python2-six-bootstrap)))))
44d10b1f
RW
15057
15058(define-public python-latexcodec
15059 (package
15060 (name "python-latexcodec")
f3415ba5 15061 (version "1.0.7")
44d10b1f
RW
15062 (source
15063 (origin
15064 (method url-fetch)
15065 (uri (pypi-uri "latexcodec" version))
15066 (sha256
f3415ba5 15067 (base32 "0wnp3yqcgx0rpy8dz51vh75lbp2qif67da19zi7m3ca98n887hgb"))))
44d10b1f
RW
15068 (build-system python-build-system)
15069 (inputs
15070 `(("python-six" ,python-six)))
15071 (home-page "https://readthedocs.org/projects/latexcodec/")
15072 (synopsis "Work with LaTeX code in Python")
15073 (description "Lexer and codec to work with LaTeX code in Python.")
15074 (license license:expat)))
15075
15076(define-public python-pybtex
15077 (package
15078 (name "python-pybtex")
9441a9c1 15079 (version "0.22.2")
44d10b1f
RW
15080 (source
15081 (origin
15082 (method url-fetch)
15083 (uri (pypi-uri "pybtex" version))
15084 (sha256
9441a9c1 15085 (base32 "070wfcmxrd7xg1si421mi9150gmx2qwx431nwf69sq3hhmgnx080"))))
44d10b1f
RW
15086 (build-system python-build-system)
15087 (native-inputs
15088 `(("python-nose" ,python-nose)))
15089 (inputs
15090 `(("python-latexcodec" ,python-latexcodec)
15091 ("python-pyyaml" ,python-pyyaml)
15092 ("python-six" ,python-six)))
15093 (arguments
15094 `(#:test-target "nosetests"))
15095 (home-page "https://pybtex.org/")
15096 (synopsis "BibTeX-compatible bibliography processor")
15097 (description "Pybtex is a BibTeX-compatible bibliography processor written
15098in Python. You can simply type pybtex instead of bibtex.")
15099 (license license:expat)))
15100
15101(define-public python-onetimepass
15102 (package
15103 (name "python-onetimepass")
15104 (version "1.0.1")
15105 (source
15106 (origin
15107 (method url-fetch)
15108 (uri (pypi-uri "onetimepass" version))
15109 (sha256
15110 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
15111 (build-system python-build-system)
15112 (propagated-inputs `(("python-six" ,python-six)))
15113 (home-page "https://github.com/tadeck/onetimepass/")
15114 (synopsis "One-time password library")
15115 (description "Python one-time password library for HMAC-based (HOTP) and
15116time-based (TOTP) passwords.")
15117 (license license:expat)))
15118
15119(define-public python-parso
15120 (package
15121 (name "python-parso")
1475094a 15122 (version "0.5.1")
44d10b1f
RW
15123 (source
15124 (origin
15125 (method url-fetch)
15126 (uri (pypi-uri "parso" version))
15127 (sha256
15128 (base32
1475094a 15129 "171a9ivhxwsd52h1cgsz40zgzpgzscn7yqb7sdjhy8m1lzj0wsv6"))))
44d10b1f
RW
15130 (native-inputs
15131 `(("python-pytest" ,python-pytest)))
15132 (build-system python-build-system)
4eb97c25
MC
15133 (arguments
15134 `(#:phases (modify-phases %standard-phases
15135 (replace 'check
15136 (lambda _ (invoke "pytest" "-vv"))))))
44d10b1f
RW
15137 (home-page "https://github.com/davidhalter/parso")
15138 (synopsis "Python Parser")
15139 (description "Parso is a Python parser that supports error recovery and
15140round-trip parsing for different Python versions (in multiple Python versions).
15141Parso is also able to list multiple syntax errors in your Python file.")
15142 (license license:expat)))
15143
15144(define-public python2-parso
15145 (package-with-python2 python-parso))
15146
15147(define-public python-async-generator
15148 (package
15149 (name "python-async-generator")
94fcbf8d 15150 (version "1.10")
44d10b1f
RW
15151 (source
15152 (origin
15153 (method url-fetch)
15154 (uri (pypi-uri "async_generator" version))
15155 (sha256
15156 (base32
94fcbf8d 15157 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
44d10b1f
RW
15158 (build-system python-build-system)
15159 (native-inputs
15160 `(("python-pytest" ,python-pytest)))
15161 (home-page "https://github.com/python-trio/async_generator")
15162 (synopsis "Async generators and context managers for Python 3.5+")
15163 (description "@code{async_generator} back-ports Python 3.6's native async
15164generators and Python 3.7's context managers into Python 3.5.")
15165 ;; Dual licensed.
15166 (license (list license:expat license:asl2.0))))
15167
15168(define-public python-async-timeout
15169 (package
15170 (name "python-async-timeout")
15171 (version "3.0.1")
15172 (source
15173 (origin
15174 (method url-fetch)
15175 (uri (pypi-uri "async-timeout" version))
15176 (sha256
15177 (base32
15178 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
15179 (build-system python-build-system)
15180 (home-page "https://github.com/aio-libs/async_timeout/")
15181 (synopsis "Timeout context manager for asyncio programs")
15182 (description "@code{async-timeout} provides a timeout timeout context
15183manager compatible with @code{asyncio}.")
15184 (license license:asl2.0)))
15185
15186(define-public python-glob2
15187 (package
15188 (name "python-glob2")
4df49d19 15189 (version "0.7")
8fa2bcc7
TGR
15190 (source
15191 (origin
15192 (method git-fetch)
15193 (uri (git-reference
15194 (url "https://github.com/miracle2k/python-glob2.git")
4df49d19 15195 (commit (string-append "v" version))))
8fa2bcc7
TGR
15196 (file-name (git-file-name name version))
15197 (sha256
4df49d19 15198 (base32 "160nh2ay9lw2hi0rixpzb2k87r6ql56k0j2cm87lqz8xc8zbw919"))))
44d10b1f
RW
15199 (build-system python-build-system)
15200 (home-page "https://github.com/miracle2k/python-glob2/")
15201 (synopsis "Extended Version of the python buildin glob module")
15202 (description "This is an extended version of the Python
15203@url{http://docs.python.org/library/glob.html, built-in glob module} which
15204adds:
15205
15206@itemize
15207@item The ability to capture the text matched by glob patterns, and return
15208those matches alongside the file names.
15209@item A recursive @code{**} globbing syntax, akin for example to the
15210@code{globstar} option of Bash.
15211@item The ability to replace the file system functions used, in order to glob
15212on virtual file systems.
15213@item Compatible with Python 2 and Python 3 (tested with 3.3).
15214@end itemize
15215
15216Glob2 currently based on the glob code from Python 3.3.1.")
15217 (license license:bsd-2)))
15218
15219(define-public python2-glob2
15220 (package-with-python2 python-glob2))
15221
15222(define-public python-gipc
15223 (package
15224 (name "python-gipc")
15225 (version "0.6.0")
15226 (source
15227 (origin
15228 (method url-fetch)
15229 (uri (pypi-uri "gipc" version ".zip"))
15230 (sha256
15231 (base32
15232 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
15233 (build-system python-build-system)
15234 (native-inputs
15235 `(("unzip" ,unzip)))
15236 (propagated-inputs
15237 `(("python-gevent" ,python-gevent)))
15238 (home-page "http://gehrcke.de/gipc")
15239 (synopsis "Child process management in the context of gevent")
15240 (description "Usage of Python's multiprocessing package in a
15241gevent-powered application may raise problems. With @code{gipc},
15242process-based child processes can safely be created anywhere within a
15243gevent-powered application.")
15244 (license license:expat)))
15245
15246(define-public python2-gipc
15247 (package-with-python2 python-gipc))
15248
15249(define-public python-fusepy
15250 (package
15251 (name "python-fusepy")
15252 (version "2.0.4")
15253 (source
15254 (origin
15255 (method url-fetch)
15256 (uri (pypi-uri "fusepy" version))
15257 (sha256
15258 (base32
15259 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
15260 (build-system python-build-system)
15261 (arguments
15262 `(#:phases
15263 (modify-phases %standard-phases
15264 (add-before 'build 'set-library-file-name
15265 (lambda* (#:key inputs #:allow-other-keys)
15266 (let ((fuse (assoc-ref inputs "fuse")))
15267 (substitute* "fuse.py"
15268 (("find_library\\('fuse'\\)")
15269 (string-append "'" fuse "/lib/libfuse.so'")))
15270 #t))))))
15271 (propagated-inputs
15272 `(("fuse" ,fuse)))
15273 (home-page "https://github.com/fusepy/fusepy")
15274 (synopsis "Simple ctypes bindings for FUSE")
15275 (description "Python module that provides a simple interface to FUSE and
15276MacFUSE. The binding is created using the standard @code{ctypes} library.")
15277 (license license:isc)))
15278
15279(define-public python2-fusepy
15280 (package-with-python2 python-fusepy))
15281
15282(define-public python2-gdrivefs
15283 (package
15284 (name "python2-gdrivefs")
15285 (version "0.14.9")
15286 (source
15287 (origin
15288 (method url-fetch)
15289 (uri (pypi-uri "gdrivefs" version))
15290 (sha256
15291 (base32
15292 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
15293 (build-system python-build-system)
15294 (arguments
15295 `(#:python ,python-2
15296 #:phases
15297 (modify-phases %standard-phases
15298 (add-before 'build 'patch-setup-py
15299 (lambda _
15300 ;; Update requirements from dependency==version
15301 ;; to dependency>=version
15302 (substitute* "gdrivefs/resources/requirements.txt"
15303 (("==") ">="))
15304 #t)))))
15305 (native-inputs
15306 `(("python2-gipc" ,python2-gipc)
15307 ("python2-gevent" ,python2-gevent)
15308 ("python2-greenlet" ,python2-greenlet)
15309 ("python2-httplib2" ,python2-httplib2)
15310 ("python2-uritemplate" ,python2-uritemplate)
15311 ("python2-oauth2client" ,python2-oauth2client)
15312 ("python2-six" ,python2-six)))
15313 (propagated-inputs
15314 `(("python2-dateutil" ,python2-dateutil)
15315 ("python2-fusepy" ,python2-fusepy)
15316 ("python2-google-api-client" ,python2-google-api-client)))
15317 (home-page "https://github.com/dsoprea/GDriveFS")
15318 (synopsis "Mount Google Drive as a local file system")
15319 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
15320under Python 2.7.")
15321 (license license:gpl2)))
15322
15323(define-public pybind11
15324 (package
15325 (name "pybind11")
d478cc04 15326 (version "2.3.0")
44d10b1f
RW
15327 (source (origin
15328 (method git-fetch)
15329 (uri (git-reference
15330 (url "https://github.com/pybind/pybind11.git")
15331 (commit (string-append "v" version))))
15332 (sha256
15333 (base32
d478cc04 15334 "11b6dniri8m05spfd2a19irz82shf4sdca73566bniggrf3zclnf"))
44d10b1f
RW
15335 (file-name (git-file-name name version))))
15336 (build-system cmake-build-system)
15337 (native-inputs
15338 `(("python" ,python)
15339 ("python-pytest" ,python-pytest)))
15340 (arguments
15341 `(#:test-target "check"))
15342 (home-page "https://github.com/pybind/pybind11/")
15343 (synopsis "Seamless operability between C++11 and Python")
15344 (description "pybind11 is a lightweight header-only library that exposes
15345C++ types in Python and vice versa, mainly to create Python bindings of
15346existing C++ code. Its goals and syntax are similar to the excellent
15347Boost.Python library by David Abrahams: to minimize boilerplate code in
15348traditional extension modules by inferring type information using compile-time
15349introspection.")
15350 (license license:expat)))
15351
15352(define-public python-fasteners
15353 (package
15354 (name "python-fasteners")
15355 (version "0.14.1")
15356 (source
15357 (origin
15358 (method url-fetch)
15359 (uri (pypi-uri "fasteners" version))
15360 (sha256
15361 (base32
15362 "063y20kx01ihbz2mziapmjxi2cd0dq48jzg587xdsdp07xvpcz22"))))
15363 (build-system python-build-system)
15364 (propagated-inputs
15365 `(("python-monotonic" ,python-monotonic)
15366 ("python-six" ,python-six)
15367 ("python-testtools" ,python-testtools)))
15368 (home-page "https://github.com/harlowja/fasteners")
15369 (synopsis "Python package that provides useful locks")
15370 (description
15371 "This package provides a Python program that provides following locks:
15372
15373@itemize
15374@item Locking decorator
15375@item Reader-writer locks
15376@item Inter-process locks
15377@item Generic helpers
15378@end itemize\n")
15379 (properties `((python2-variant . ,(delay python2-fasteners))))
15380 (license license:asl2.0)))
15381
15382(define-public python2-fasteners
15383 (let ((base (package-with-python2 (strip-python2-variant python-fasteners))))
15384 (package
15385 (inherit base)
15386 (propagated-inputs
15387 `(("python2-futures" ,python2-futures)
15388 ,@(package-propagated-inputs base))))))
15389
15390(define-public python-requests-file
15391 (package
15392 (name "python-requests-file")
15393 (version "1.4.3")
15394 (source
15395 (origin
15396 (method url-fetch)
15397 (uri (pypi-uri "requests-file" version))
15398 (sha256
15399 (base32
15400 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
15401 (build-system python-build-system)
15402 (propagated-inputs
15403 `(("python-requests" ,python-requests)
15404 ("python-six" ,python-six)))
15405 (home-page
15406 "https://github.com/dashea/requests-file")
15407 (synopsis "File transport adapter for Requests")
15408 (description
15409 "Requests-File is a transport adapter for use with the Requests Python
52beae7b 15410library to allow local file system access via @code{file://} URLs.")
44d10b1f
RW
15411 (license license:asl2.0)))
15412
15413(define-public python2-requests-file
15414 (package-with-python2 python-requests-file))
15415
15416(define-public python-tldextract
15417 (package
15418 (name "python-tldextract")
15419 (version "2.2.0")
15420 (source
15421 (origin
15422 (method url-fetch)
15423 (uri (pypi-uri "tldextract" version))
15424 (sha256
15425 (base32
15426 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
15427 (build-system python-build-system)
15428 (native-inputs
15429 `(("python-pytest" ,python-pytest)
15430 ("python-responses" ,python-responses)))
15431 (propagated-inputs
15432 `(("python-idna" ,python-idna)
15433 ("python-requests" ,python-requests)
15434 ("python-requests-file" ,python-requests-file)))
15435 (home-page
15436 "https://github.com/john-kurkowski/tldextract")
15437 (synopsis
15438 "Separate the TLD from the registered domain and subdomains of a URL")
15439 (description
15440 "TLDExtract accurately separates the TLD from the registered domain and
15441subdomains of a URL, using the Public Suffix List. By default, this includes
15442the public ICANN TLDs and their exceptions. It can optionally support the
15443Public Suffix List's private domains as well.")
15444 (license license:bsd-3)))
15445
15446(define-public python2-tldextract
15447 (package-with-python2 python-tldextract))
15448
15449(define-public python-pynamecheap
15450 (package
15451 (name "python-pynamecheap")
15452 (version "0.0.3")
15453 (source
15454 (origin
15455 (method url-fetch)
15456 (uri (pypi-uri "PyNamecheap" version))
15457 (sha256
15458 (base32
15459 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
15460 (build-system python-build-system)
15461 (propagated-inputs
15462 `(("python-requests" ,python-requests)))
15463 (home-page
15464 "https://github.com/Bemmu/PyNamecheap")
15465 (synopsis
15466 "Namecheap API client in Python")
15467 (description
15468 "PyNamecheap is a Namecheap API client in Python.")
15469 (license license:expat)))
15470
15471(define-public python2-pynamecheap
15472 (package-with-python2 python-pynamecheap))
15473
15474(define-public python-dns-lexicon
15475 (package
15476 (name "python-dns-lexicon")
15477 (version "2.4.0")
15478 (source
15479 (origin
15480 (method url-fetch)
15481 (uri (pypi-uri "dns-lexicon" version))
15482 (sha256
15483 (base32
15484 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
15485 (build-system python-build-system)
15486 (arguments
15487 `(#:tests? #f)) ;requires internet access
15488 (propagated-inputs
15489 `(("python-future" ,python-future)
15490 ("python-pynamecheap" ,python-pynamecheap)
15491 ("python-requests" ,python-requests)
15492 ("python-tldextract" ,python-tldextract)
15493 ("python-urllib3" ,python-urllib3)))
15494 (home-page "https://github.com/AnalogJ/lexicon")
15495 (synopsis
15496 "Manipulate DNS records on various DNS providers")
15497 (description
15498 "Lexicon provides a way to manipulate DNS records on multiple DNS
15499providers in a standardized way. It has a CLI but it can also be used as a
15500Python library. It was designed to be used in automation, specifically with
15501Let's Encrypt.")
15502 (license license:expat)))
15503
15504(define-public python2-dns-lexicon
15505 (package-with-python2 python-dns-lexicon))
15506
15507(define-public python-commandlines
15508 (package
15509 (name "python-commandlines")
15510 (version "0.4.1")
15511 (source
15512 (origin
15513 (method url-fetch)
15514 (uri (pypi-uri "commandlines" version))
15515 (sha256
15516 (base32
15517 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
15518 (build-system python-build-system)
15519 (home-page "https://github.com/chrissimpkins/commandlines")
15520 (synopsis "Command line argument to object parsing library")
15521 (description
15522 "@code{Commandlines} is a Python library for command line application
15523development that supports command line argument parsing, command string
15524validation testing and application logic.")
15525 (license license:expat)))
15526
15527;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
15528;; python-numba. They have a very unflexible relationship.
15529(define-public python-numba
15530 (package
15531 (name "python-numba")
7757e6d8 15532 (version "0.42.0")
44d10b1f
RW
15533 (source
15534 (origin
15535 (method url-fetch)
15536 (uri (pypi-uri "numba" version))
15537 (sha256
15538 (base32
7757e6d8 15539 "03rqdfx0512lcri2bcpngx5k3jwfbqnanqj3n19c7d6h6hqxvq9x"))))
44d10b1f
RW
15540 (build-system python-build-system)
15541 (arguments
15542 `(#:modules ((guix build utils)
15543 (guix build python-build-system)
15544 (ice-9 ftw)
15545 (srfi srfi-1)
15546 (srfi srfi-26))
15547 #:phases
15548 (modify-phases %standard-phases
15549 (add-after 'unpack 'disable-proprietary-features
15550 (lambda _
15551 (setenv "NUMBA_DISABLE_HSA" "1")
15552 (setenv "NUMBA_DISABLE_CUDA" "1")
15553 #t))
15554 (add-after 'unpack 'remove-failing-tests
15555 (lambda _
15556 ;; FIXME: these tests fail for unknown reasons:
15557 ;; test_non_writable_pycache, test_non_creatable_pycache, and
15558 ;; test_frozen (all in numba.tests.test_dispatcher.TestCache).
15559 (substitute* "numba/tests/test_dispatcher.py"
15560 (("def test(_non_writable_pycache)" _ m)
15561 (string-append "def guix_skip" m))
15562 (("def test(_non_creatable_pycache)" _ m)
15563 (string-append "def guix_skip" m))
15564 (("def test(_frozen)" _ m)
15565 (string-append "def guix_skip" m)))
15566
15567 ;; These tests fail because we don't run the tests from the build
15568 ;; directory: test_setup_py_distutils, test_setup_py_setuptools
15569 ;; They ar in numba.tests.test_pycc.TestDistutilsSupport.
15570 (substitute* "numba/tests/test_pycc.py"
15571 (("def test(_setup_py_distutils|_setup_py_setuptools)" _ m)
15572 (string-append "def guix_skip" m)))
15573 #t))
15574 (replace 'check
15575 (lambda _
15576 (let ((cwd (getcwd)))
15577 (setenv "PYTHONPATH"
15578 (string-append cwd "/build/"
15579 (find (cut string-prefix? "lib" <>)
15580 (scandir (string-append cwd "/build")))
15581 ":"
15582 (getenv "PYTHONPATH")))
15583 ;; Something is wrong with the PYTHONPATH when running the
15584 ;; tests from the build directory, as it complains about not being
15585 ;; able to import certain modules.
15586 (with-directory-excursion "/tmp"
15587 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))
15588 #t)))))
15589 (propagated-inputs
15590 `(("python-llvmlite" ,python-llvmlite)
15591 ("python-numpy" ,python-numpy)
15592 ("python-singledispatch" ,python-singledispatch)))
15593 ;; Needed for tests.
15594 (inputs
15595 `(("python-jinja2" ,python-jinja2)
15596 ("python-pygments" ,python-pygments)))
15597 (home-page "https://numba.pydata.org")
15598 (synopsis "Compile Python code using LLVM")
15599 (description "Numba gives you the power to speed up your applications with
15600high performance functions written directly in Python. With a few
15601annotations, array-oriented and math-heavy Python code can be just-in-time
15602compiled to native machine instructions, similar in performance to C, C++ and
15603Fortran, without having to switch languages or Python interpreters.
15604
15605Numba works by generating optimized machine code using the LLVM compiler
15606infrastructure at import time, runtime, or statically (using the included pycc
15607tool).")
15608 (license license:bsd-3)))
15609
15610(define-public python-anndata
15611 (package
15612 (name "python-anndata")
8c9372c1 15613 (version "0.6.18")
44d10b1f
RW
15614 (source
15615 (origin
15616 (method url-fetch)
15617 (uri (pypi-uri "anndata" version))
15618 (sha256
15619 (base32
8c9372c1 15620 "03x83yjaccbqszj7x4fwwmpil0ai59yx64d1zmf2691za3j03w73"))))
44d10b1f
RW
15621 (build-system python-build-system)
15622 (propagated-inputs
15623 `(("python-h5py" ,python-h5py)
15624 ("python-natsort" ,python-natsort)
15625 ("python-pandas" ,python-pandas)
15626 ("python-scipy" ,python-scipy)))
15627 (home-page "https://github.com/theislab/anndata")
15628 (synopsis "Annotated data for data analysis pipelines")
15629 (description "Anndata is a package for simple (functional) high-level APIs
15630for data analysis pipelines. In this context, it provides an efficient,
15631scalable way of keeping track of data together with learned annotations and
15632reduces the code overhead typically encountered when using a mostly
15633object-oriented library such as @code{scikit-learn}.")
15634 (license license:bsd-3)))
15635
15636(define-public python-dill
15637 (package
15638 (name "python-dill")
c60b15cc 15639 (version "0.2.9")
44d10b1f
RW
15640 (source
15641 (origin
15642 (method url-fetch)
15643 (uri (pypi-uri "dill" version))
15644 (sha256
c60b15cc 15645 (base32 "0vwqyi6hyz2r29zydc78dqymkbc5y7gia16xcdh215cikxph9mpn"))))
44d10b1f 15646 (build-system python-build-system)
c60b15cc 15647 ;; FIXME: The check phase fails with "don't know how to make test from: …".
44d10b1f
RW
15648 (arguments '(#:tests? #f))
15649 (home-page "https://pypi.org/project/dill")
15650 (synopsis "Serialize all of Python")
15651 (description "Dill extends Python's @code{pickle} module for serializing
15652and de-serializing Python objects to the majority of the built-in Python
15653types. Dill provides the user the same interface as the @code{pickle} module,
15654and also includes some additional features. In addition to pickling Python
15655objects, @code{dill} provides the ability to save the state of an interpreter
61985d65 15656session in a single command. Hence, it would be feasible to save a
44d10b1f
RW
15657interpreter session, close the interpreter, ship the pickled file to another
15658computer, open a new interpreter, unpickle the session and thus continue from
15659the saved state of the original interpreter session.")
15660 (license license:bsd-3)))
15661
15662(define-public python-multiprocess
15663 (package
15664 (name "python-multiprocess")
15665 (version "0.70.6.1")
15666 (source
15667 (origin
15668 (method url-fetch)
15669 (uri (pypi-uri "multiprocess" version))
15670 (sha256
15671 (base32
15672 "1ip5caz67b3q0553mr8gm8xwsb8x500jn8ml0gihgyfy52m2ypcq"))))
15673 (build-system python-build-system)
15674 (propagated-inputs
15675 `(("python-dill" ,python-dill)))
15676 (home-page "https://pypi.org/project/multiprocess")
15677 (synopsis "Multiprocessing and multithreading in Python")
15678 (description
15679 "This package is a fork of the multiprocessing Python package, a package
15680which supports the spawning of processes using the API of the standard
15681library's @code{threading} module.")
15682 (license license:bsd-3)))
15683
15684(define-public python-toolz
15685 (package
15686 (name "python-toolz")
15687 (version "0.9.0")
15688 (source
15689 (origin
15690 (method url-fetch)
15691 (uri (pypi-uri "toolz" version))
15692 (sha256
15693 (base32
15694 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
15695 (build-system python-build-system)
15696 ;; FIXME: tests cannot be computed: "Can't perform this operation for
15697 ;; unregistered loader type"
15698 (arguments '(#:tests? #f))
15699 (home-page "https://github.com/pytoolz/toolz/")
15700 (synopsis "List processing tools and functional utilities")
15701 (description
15702 "This package provides a set of utility functions for iterators,
15703functions, and dictionaries.")
15704 (license license:bsd-3)))
15705
15706(define-public python2-toolz
15707 (package-with-python2 python-toolz))
15708
15709(define-public python-cytoolz
15710 (package
15711 (name "python-cytoolz")
15712 (version "0.9.0.1")
15713 (source
15714 (origin
15715 (method url-fetch)
15716 (uri (pypi-uri "cytoolz" version))
15717 (sha256
15718 (base32
15719 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
15720 (build-system python-build-system)
15721 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
15722 ;; 'exceptions'"
15723 (arguments '(#:tests? #f))
15724 (propagated-inputs
15725 `(("python-toolz" ,python-toolz)))
15726 (native-inputs
15727 `(("python-cython" ,python-cython)))
15728 (home-page "https://github.com/pytoolz/cytoolz")
15729 (synopsis "High performance functional utilities")
15730 (description
15731 "The cytoolz package implements the same API as provided by toolz. The
15732main differences are that @code{cytoolz} is faster and cytoolz offers a C API
15733that is accessible to other projects developed in Cython.")
15734 (license license:bsd-3)))
15735
15736(define-public python-sortedcontainers
15737 (package
15738 (name "python-sortedcontainers")
15739 (version "2.0.4")
15740 (source
15741 (origin
15742 (method url-fetch)
15743 (uri (pypi-uri "sortedcontainers" version))
15744 (sha256
15745 (base32
15746 "10hrk2k0hbf9x78vd3f0lj277m1yzfhzzxr0hja718liwb398wk0"))))
15747 (build-system python-build-system)
15748 (native-inputs
15749 `(("python-tox" ,python-tox)))
15750 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
15751 (synopsis "Sorted List, Sorted Dict, Sorted Set")
15752 (description
15753 "This package provides a sorted collections library, written in
15754pure-Python.")
15755 (license license:asl2.0)))
15756
15757(define-public python-cloudpickle
15758 (package
15759 (name "python-cloudpickle")
15760 (version "0.6.1")
15761 (source
15762 (origin
15763 (method url-fetch)
15764 (uri (pypi-uri "cloudpickle" version))
15765 (sha256
15766 (base32
15767 "1wdw89mlm7fqa3fm3ymskx05jrys66n8m1z1a8s0mss0799ahsgi"))))
15768 (build-system python-build-system)
15769 ;; FIXME: there are 5 errors in 122 tests:
15770 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.CloudPickleTest)
15771 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.CloudPickleTest)
15772 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.Protocol2CloudPickleTest)
15773 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.Protocol2CloudPickleTest)
15774 ;; ERROR: test_temp_file (tests.cloudpickle_file_test.CloudPickleFileTests)
15775 ;; TypeError: cannot serialize '_io.BufferedRandom' object
15776 (arguments '(#:tests? #f))
15777 (native-inputs
15778 `(("python-pytest" ,python-pytest)
15779 ("python-mock" ,python-mock)
15780 ("python-tornado" ,python-tornado)))
15781 (home-page "https://github.com/cloudpipe/cloudpickle")
15782 (synopsis "Extended pickling support for Python objects")
15783 (description
15784 "Cloudpickle makes it possible to serialize Python constructs not
15785supported by the default pickle module from the Python standard library. It
15786is especially useful for cluster computing where Python expressions are
15787shipped over the network to execute on remote hosts, possibly close to the
15788data.")
15789 (license license:bsd-3)))
15790
15791(define-public python2-cloudpickle
15792 (package-with-python2 python-cloudpickle))
15793
15794(define-public python-locket
15795 (package
15796 (name "python-locket")
15797 (version "0.2.0")
15798 (source
15799 (origin
15800 (method url-fetch)
15801 (uri (pypi-uri "locket" version))
15802 (sha256
15803 (base32
15804 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
15805 (build-system python-build-system)
15806 (home-page "https://github.com/mwilliamson/locket.py")
15807 (synopsis "File-based locks for Python")
15808 (description
15809 "Locket implements a lock that can be used by multiple processes provided
15810they use the same path.")
15811 (license license:bsd-2)))
15812
15813(define-public python2-locket
15814 (package-with-python2 python-locket))
15815
15816(define-public python-blosc
15817 (package
15818 (name "python-blosc")
15819 (version "1.5.1")
15820 (source
15821 (origin
15822 (method url-fetch)
15823 (uri (pypi-uri "blosc" version))
15824 (sha256
15825 (base32
15826 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
15827 (build-system python-build-system)
15828 ;; FIXME: all tests pass, but then this error is printed:
15829 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
15830 (arguments '(#:tests? #f))
15831 (propagated-inputs
15832 `(("python-numpy" ,python-numpy)))
15833 (home-page "https://github.com/blosc/python-blosc")
15834 (synopsis "Python wrapper for the Blosc data compressor library")
15835 (description "Blosc is a high performance compressor optimized for binary
15836data. It has been designed to transmit data to the processor cache faster
15837than the traditional, non-compressed, direct memory fetch approach via a
15838@code{memcpy()} system call.
15839
15840Blosc works well for compressing numerical arrays that contains data with
15841relatively low entropy, like sparse data, time series, grids with
15842regular-spaced values, etc.
15843
15844This Python package wraps the Blosc library.")
15845 (license license:bsd-3)))
15846
15847(define-public python2-blosc
15848 (package-with-python2 python-blosc))
15849
15850(define-public python-partd
15851 (package
15852 (name "python-partd")
15853 (version "0.3.9")
15854 (source
15855 (origin
15856 (method url-fetch)
15857 (uri (pypi-uri "partd" version))
15858 (sha256
15859 (base32
15860 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
15861 (build-system python-build-system)
15862 (propagated-inputs
15863 `(("python-blosc" ,python-blosc)
15864 ("python-locket" ,python-locket)
15865 ("python-numpy" ,python-numpy)
15866 ("python-pandas" ,python-pandas)
15867 ("python-pyzmq" ,python-pyzmq)
15868 ("python-toolz" ,python-toolz)))
15869 (home-page "https://github.com/dask/partd/")
15870 (synopsis "Appendable key-value storage")
15871 (description "Partd stores key-value pairs. Values are raw bytes. We
15872append on old values. Partd excels at shuffling operations.")
15873 (license license:bsd-3)))
15874
15875(define-public python2-partd
15876 (package-with-python2 python-partd))
15877
15878(define-public python-dask
15879 (package
15880 (name "python-dask")
0998175f 15881 (version "1.2.2")
44d10b1f
RW
15882 (source
15883 (origin
15884 (method url-fetch)
15885 (uri (pypi-uri "dask" version))
15886 (sha256
0998175f 15887 (base32 "0b29gvf96gmp20wicly3v3mhyc93zbm3mdv935fka6x0wax7cy2y"))))
44d10b1f
RW
15888 (build-system python-build-system)
15889 ;; A single test out of 5000+ fails. This test is marked as xfail when
15890 ;; pytest-xdist is used.
15891 (arguments
15892 `(#:phases
15893 (modify-phases %standard-phases
15894 (add-after 'unpack 'disable-broken-test
15895 (lambda _
15896 (substitute* "dask/tests/test_threaded.py"
15897 (("def test_interrupt\\(\\)" m)
15898 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
15899 m)))
15900 (when (which "python2")
15901 ;; This test fails with recent Pandas:
15902 ;; <https://github.com/dask/dask/issues/3794>.
15903 (substitute* "dask/dataframe/tests/test_dataframe.py"
15904 (("def test_info\\(\\)" m)
15905 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
15906 m))))
15907 #t))
15908 (replace 'check
15909 (lambda _ (invoke "pytest" "-vv"))))))
15910 (propagated-inputs
15911 `(("python-cloudpickle" ,python-cloudpickle)
15912 ("python-numpy" ,python-numpy)
15913 ("python-pandas" ,python-pandas)
15914 ("python-partd" ,python-partd)
15915 ("python-toolz" ,python-toolz)
15916 ("python-pyyaml" ,python-pyyaml)))
15917 (native-inputs
15918 `(("python-pytest" ,python-pytest)
15919 ("python-pytest-runner" ,python-pytest-runner)))
15920 (home-page "https://github.com/dask/dask/")
15921 (synopsis "Parallel computing with task scheduling")
15922 (description
15923 "Dask is a flexible parallel computing library for analytics. It
15924consists of two components: dynamic task scheduling optimized for computation,
15925and large data collections like parallel arrays, dataframes, and lists that
15926extend common interfaces like NumPy, Pandas, or Python iterators to
15927larger-than-memory or distributed environments. These parallel collections
15928run on top of the dynamic task schedulers. ")
15929 (license license:bsd-3)))
15930
15931(define-public python2-dask
15932 (package-with-python2 python-dask))
15933
15934(define-public python-ilinkedlist
15935 (package
15936 (name "python-ilinkedlist")
15937 (version "0.4.0")
15938 (source
15939 (origin
15940 (method url-fetch)
15941 (uri (pypi-uri "ilinkedlist" version))
15942 (sha256
15943 (base32
15944 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
15945 (build-system python-build-system)
15946 (native-inputs `(("python-pytest" ,python-pytest)))
15947 (inputs `(("python" ,python)))
15948 (home-page "https://github.com/luther9/ilinkedlist-py")
15949 (synopsis "Immutable linked list library")
15950 (description
15951 "This is a implementation of immutable linked lists for Python. It
15952contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
15953Since a linked list is treated as immutable, it is hashable, and its length
15954can be retrieved in constant time. Some of the terminology is inspired by
15955LISP. It is possible to create an improper list by creating a @code{Pair}
15956with a non-list @code{cdr}.")
15957 (license license:gpl3+)))
15958
15959(define-public python-readlike
15960 (package
15961 (name "python-readlike")
15962 (version "0.1.3")
15963 (source
15964 (origin
15965 (method url-fetch)
15966 (uri (pypi-uri "readlike" version))
15967 (sha256
15968 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
15969 (build-system python-build-system)
15970 (home-page "https://github.com/jangler/readlike")
15971 (synopsis "GNU Readline-like line editing module")
15972 (description
15973 "This Python module provides line editing functions similar to the default
15974Emacs-style ones of GNU Readline. Unlike the Python standard library's
15975@code{readline} package, this one allows access to those capabilties in settings
15976outside of a standard command-line interface. It is especially well-suited to
15977interfacing with Urwid, due to a shared syntax for describing key inputs.
15978
15979Currently, all stateless Readline commands are implemented. Yanking and history
15980are not supported.")
15981 (license license:expat)))
15982
15983(define-public python2-readlike
15984 (package-with-python2 python-readlike))
15985
15986(define-public python-reparser
15987 (package
15988 (name "python-reparser")
15989 (version "1.4.3")
15990 (source
15991 (origin
15992 (method url-fetch)
15993 (uri (pypi-uri "ReParser" version))
15994 (sha256
15995 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
15996 (build-system python-build-system)
15997 (home-page "https://github.com/xmikos/reparser")
15998 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
15999 (description
16000 "This Python library provides a simple lexer/parser for inline markup based
16001on regular expressions.")
16002 (license license:expat)))
16003
16004(define-public python2-reparser
16005 (let ((reparser (package-with-python2
16006 (strip-python2-variant python-reparser))))
16007 (package (inherit reparser)
16008 (propagated-inputs
16009 `(("python2-enum34" ,python2-enum34)
16010 ,@(package-propagated-inputs reparser))))))
16011
16012(define-public python-precis-i18n
16013 (package
16014 (name "python-precis-i18n")
16015 (version "1.0.0")
16016 (source
16017 (origin
16018 (method url-fetch)
16019 (uri (pypi-uri "precis_i18n" version))
16020 (sha256
16021 (base32
16022 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
16023 (build-system python-build-system)
16024 (home-page "https://github.com/byllyfish/precis_i18n")
16025 (synopsis "Implementation of the PRECIS framework")
16026 (description
16027 "This module implements the PRECIS Framework as described in RFC 8264,
16028RFC 8265 and RFC 8266.")
16029 (license license:expat)))
16030
d0446c4b
RW
16031(define-public python-absl-py
16032 (package
16033 (name "python-absl-py")
16034 (version "0.6.1")
16035 (source
16036 (origin
16037 (method url-fetch)
16038 (uri (pypi-uri "absl-py" version))
16039 (sha256
16040 (base32
16041 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
16042 (build-system python-build-system)
16043 (propagated-inputs
16044 `(("python-six" ,python-six)))
16045 (home-page "https://github.com/abseil/abseil-py")
16046 (synopsis "Abseil Python common libraries")
16047 (description
16048 "This package provides the Abseil Python Common Libraries, a collection
16049of Python libraries for building Python applications.")
16050 (license license:asl2.0)))
16051
81bed4e9
RW
16052(define-public python-astor
16053 (package
16054 (name "python-astor")
16055 (version "0.7.1")
16056 (source
16057 (origin
16058 (method url-fetch)
16059 (uri (pypi-uri "astor" version))
16060 (sha256
16061 (base32
16062 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
16063 (build-system python-build-system)
16064 ;; FIXME: There are two errors and two test failures.
16065 (arguments `(#:tests? #f))
16066 (home-page "https://github.com/berkerpeksag/astor")
39ee82ff 16067 (synopsis "Read and write Python ASTs")
81bed4e9 16068 (description "Astor is designed to allow easy manipulation of Python
39ee82ff 16069source via the Abstract Syntax Tree.")
81bed4e9
RW
16070 (license license:bsd-3)))
16071
39ee82ff
RW
16072(define-public python2-astor
16073 (package-with-python2 python-astor))
16074
22e623ae
RW
16075(define-public python-grpcio
16076 (package
16077 (name "python-grpcio")
16078 (version "1.17.1")
16079 (source
16080 (origin
16081 (method url-fetch)
16082 (uri (pypi-uri "grpcio" version))
16083 (sha256
16084 (base32
16085 "0qb9y6j83nxa6d4kc60i8yfgdm7a8ms7b54kncjzf5y7nsxp8rzx"))))
16086 (build-system python-build-system)
16087 (propagated-inputs
16088 `(("python-six" ,python-six)))
16089 (home-page "https://grpc.io")
16090 (synopsis "HTTP/2-based RPC framework")
16091 (description "This package provides a Python library for communicating
16092with the HTTP/2-based RPC framework gRPC.")
16093 (license license:asl2.0)))
16094
79869f80
RW
16095(define-public python-astunparse
16096 (package
16097 (name "python-astunparse")
47d79541 16098 (version "1.6.2")
79869f80
RW
16099 (source
16100 (origin
16101 (method url-fetch)
16102 (uri (pypi-uri "astunparse" version))
16103 (sha256
47d79541 16104 (base32 "0rzbc44xcvzjhhiy7wac96mgal5mcjz1mfq8rmvgswskf4kf9cys"))))
79869f80 16105 (build-system python-build-system)
47d79541 16106 (arguments '(#:tests? #f)) ; there are none
79869f80
RW
16107 (propagated-inputs
16108 `(("python-six" ,python-six)
16109 ("python-wheel" ,python-wheel)))
16110 (home-page "https://github.com/simonpercivall/astunparse")
16111 (synopsis "AST unparser for Python")
16112 (description "This package provides an AST unparser for Python. It is a
16113factored out version of @code{unparse} found in the Python source
16114distribution.")
16115 (license license:bsd-3)))
16116
2884aac0
RW
16117(define-public python-gast
16118 (package
16119 (name "python-gast")
bd300261 16120 (version "0.2.2")
2884aac0
RW
16121 (source
16122 (origin
16123 (method url-fetch)
16124 (uri (pypi-uri "gast" version))
16125 (sha256
bd300261 16126 (base32 "1w5dzdb3gpcfmd2s0b93d8gff40a1s41rv31458z14inb3s9v4zy"))))
2884aac0
RW
16127 (build-system python-build-system)
16128 (propagated-inputs
16129 `(("python-astunparse" ,python-astunparse)))
16130 (home-page "https://pypi.org/project/gast/")
16131 (synopsis "Generic Python AST that abstracts the underlying Python version")
16132 (description
16133 "GAST provides a compatibility layer between the AST of various Python
16134versions, as produced by @code{ast.parse} from the standard @code{ast}
16135module.")
16136 (license license:bsd-3)))
16137
44d10b1f
RW
16138(define-public python-wikidata
16139 (package
16140 (name "python-wikidata")
16141 (version "0.6.1")
16142 (source
16143 (origin
16144 (method url-fetch)
16145 (uri (pypi-uri "Wikidata" version))
16146 (sha256
16147 (base32
16148 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
16149 (build-system python-build-system)
16150 (propagated-inputs
16151 `(("python-babel" ,python-babel)))
16152 (home-page "https://github.com/dahlia/wikidata")
16153 (synopsis "Wikidata client library")
16154 (description
16155 "This package provides a Python interface to
16156@url{https://www.wikidata.org/, Wikidata}.")
16157 (properties '((upstream-name . "Wikidata")))
16158 (license license:gpl3+)))
16159
16160(define-public python-doctest-ignore-unicode
16161 (package
16162 (name "python-doctest-ignore-unicode")
16163 (version "0.1.2")
16164 (source
16165 (origin
16166 (method url-fetch)
16167 (uri (pypi-uri "doctest-ignore-unicode" version))
16168 (sha256
16169 (base32
16170 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
16171 (build-system python-build-system)
16172 (native-inputs
16173 `(("python-nose" ,python-nose)))
16174 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
16175 (synopsis "Ignore Unicode literal prefixes in doctests")
16176 (description
16177 "This package adds support for a flag to ignore Unicode literal prefixes
16178in doctests.")
16179 (license license:asl2.0)))
16180
16181(define-public python-attr
16182 (package
16183 (name "python-attr")
16184 (version "0.3.1")
16185 (source
16186 (origin
16187 (method url-fetch)
16188 (uri (pypi-uri "attr" version))
16189 (sha256
16190 (base32
16191 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
16192 (build-system python-build-system)
16193 (home-page "https://github.com/denis-ryzhkov/attr")
16194 (synopsis "Decorator for attributes of target function or class")
16195 (description "Simple decorator to set attributes of target function or
16196class in a @acronym{DRY, Don't Repeat Yourself} way.")
16197 (license license:expat)))
f98232a3
VC
16198
16199(define-public python-construct
16200 (package
16201 (name "python-construct")
16202 (version "2.9.45")
16203 (source
16204 (origin
16205 (method url-fetch)
16206 (uri (pypi-uri "construct" version))
16207 (sha256
16208 (base32
16209 "130iy05awzigm2xah2yvlmb08mac5bi4gzr5m3g7k1krs3ps0w92"))))
16210 (build-system python-build-system)
16211 (arguments
16212 `(#:tests? #f)) ; No tests exist.
16213 (propagated-inputs
16214 `(("python-extras" ,python-extras)
16215 ("python-arrow" ,python-arrow)
16216 ("python-numpy" ,python-numpy)
16217 ("python-ruamel.yaml" ,python-ruamel.yaml)))
16218 (home-page "http://construct.readthedocs.io")
16219 (synopsis "Declarative and symmetrical parser and builder for binary data")
16220 (description
16221 "This package provides both simple, atomic constructs (such as
16222integers of various sizes), as well as composite ones which allow you
16223form hierarchical and sequential structures of increasing complexity.
16224It features bit and byte granularity, easy debugging and testing, an
16225easy-to-extend subclass system, and lots of primitive constructs to
16226make your work easier.")
16227 (license license:expat)))
b742c006
LF
16228
16229(define-public python-humanize
16230 (package
16231 (name "python-humanize")
16232 (version "0.5.1")
16233 (source
16234 (origin
16235 (method url-fetch)
16236 (uri (pypi-uri "humanize" version))
16237 (sha256
16238 (base32
16239 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
16240 (arguments
16241 '(#:tests? #f)) ; tests not in pypi archive
16242 (build-system python-build-system)
16243 (home-page "https://github.com/jmoiron/humanize")
16244 (synopsis "Print numerical information in a human-readable form")
16245 (description "This package provides a Python module that displays numbers
16246and dates in \"human readable\" forms. For example, it would display
16247\"12345591313\" as \"12.3 billion\".")
16248 (license license:expat)))
d5bbf66d
LF
16249
16250(define-public python-txaio
16251 (package
16252 (name "python-txaio")
16253 (version "18.8.1")
16254 (source
16255 (origin
16256 (method url-fetch)
16257 (uri (pypi-uri "txaio" version))
16258 (sha256
16259 (base32
16260 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
16261 (build-system python-build-system)
16262 (propagated-inputs
16263 `(("python-twisted" ,python-twisted)
16264 ("python-six" ,python-six)))
16265 (home-page "https://github.com/crossbario/txaio")
16266 (synopsis "Compatibility layer between Python asyncio and Twisted")
16267 (description "Txaio provides a compatibility layer between the Python
16268@code{asyncio} module and @code{Twisted}.")
16269 (license license:expat)))
963dfd3a
RW
16270
16271(define-public python-toolshed
16272 (package
16273 (name "python-toolshed")
16274 (version "0.4.6")
16275 (source
16276 (origin
16277 (method url-fetch)
16278 (uri (pypi-uri "toolshed" version))
16279 (sha256
16280 (base32
16281 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
16282 (build-system python-build-system)
16283 (native-inputs
16284 `(("python-nose" ,python-nose)))
16285 (home-page "https://github.com/brentp/toolshed/")
16286 (synopsis "Collection of modules and functions for working with data")
16287 (description "This is a collection of well-tested, simple modules and
16288functions that aim to reduce boilerplate when working with data.")
16289 (license license:bsd-2)))
c91ecf2d
RW
16290
16291(define-public python-annoy
16292 (package
16293 (name "python-annoy")
16294 (version "1.15.1")
16295 (source
16296 (origin
16297 (method url-fetch)
16298 (uri (pypi-uri "annoy" version))
16299 (sha256
16300 (base32
16301 "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp"))))
16302 (build-system python-build-system)
16303 (native-inputs
16304 `(("python-nose" ,python-nose)))
16305 (home-page "https://github.com/spotify/annoy/")
16306 (synopsis "Approximate nearest neighbors library")
16307 (description
16308 "Annoy is a C++ library with Python bindings to search for points in
16309space that are close to a given query point. It also creates large read-only
16310file-based data structures that are @code{mmap}ped into memory so that many
16311processes may share the same data.")
16312 (license license:asl2.0)))
412342d1 16313
79bfa422 16314(define-public python-pylzma
412342d1 16315 (package
79bfa422
DM
16316 (name "python-pylzma")
16317 (version "0.5.0")
16318 (source
16319 (origin
16320 (method url-fetch)
16321 (uri (pypi-uri "pylzma" version))
16322 (sha256
16323 (base32
16324 "074anvhyjgsv2iby2ql1ixfvjgmhnvcwjbdz8gk70xzkzcm1fx5q"))))
412342d1 16325 (build-system python-build-system)
79bfa422
DM
16326 (home-page "http://www.joachim-bauch.de/projects/pylzma/")
16327 (synopsis "Python bindings for the LZMA library by Igor Pavlov.")
16328 (description "This package provides Python bindings for the LZMA library
16329by Igor Pavlov.")
16330 (license license:lgpl2.1+)))
16331
16332(define-public python2-pylzma
16333 (package-with-python2 python-pylzma))
f825e605 16334
6609ebe7
AG
16335(define-public python2-zeroconf
16336 (package
16337 (name "python2-zeroconf")
16338
16339 ;; This is the last version that supports Python 2.x.
16340 (version "0.19.1")
16341 (source
16342 (origin
16343 (method url-fetch)
16344 (uri (pypi-uri "zeroconf" version))
16345 (sha256
16346 (base32
16347 "0ykzg730n915qbrq9bn5pn06bv6rb5zawal4sqjyfnjjm66snkj3"))))
16348 (build-system python-build-system)
16349 (arguments
16350 `(#:python ,python-2
16351 #:phases
16352 (modify-phases %standard-phases
16353 (add-after 'unpack 'patch-requires
16354 (lambda* (#:key inputs #:allow-other-keys)
16355 (substitute* "setup.py"
16356 (("enum-compat")
16357 "enum34"))
16358 #t)))))
16359 (native-inputs
16360 `(("python2-six" ,python2-six)
16361 ("python2-enum32" ,python2-enum34)
16362 ("python2-netifaces" ,python2-netifaces)
16363 ("python2-typing" ,python2-typing)))
16364 (home-page "https://github.com/jstasiak/python-zeroconf")
16365 (synopsis "Pure Python mDNS service discovery")
16366 (description
16367 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
16368compatible).")
16369 (license license:lgpl2.1+)))
16370
f825e605
GLV
16371(define-public python-bsddb3
16372 (package
16373 (name "python-bsddb3")
16374 (version "6.2.6")
16375 (source
16376 (origin
16377 (method url-fetch)
16378 (uri (pypi-uri "bsddb3" version))
16379 (sha256
16380 (base32
16381 "019db2y6bfmiqbrgg9x9f6h72qjmqh05czdn2v5sy9bl0gs23mj2"))))
16382 (build-system python-build-system)
16383 (inputs
16384 `(("bdb" ,bdb)))
16385 (arguments
16386 '(#:phases
16387 (modify-phases %standard-phases
16388 (add-after 'unpack 'configure-locations
16389 (lambda* (#:key inputs #:allow-other-keys)
16390 (setenv "BERKELEYDB_DIR" (assoc-ref inputs "bdb"))
16391 (setenv "YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION" "1")
16392 #t))
16393 (replace 'check
16394 (lambda _
16395 (invoke "python3" "test3.py" "-v"))))))
16396 (home-page "https://www.jcea.es/programacion/pybsddb.htm")
16397 (synopsis "Python bindings for Oracle Berkeley DB")
16398 (description
16399 "This module provides a nearly complete wrapping of the Oracle/Sleepycat
16400C API for the Database Environment, Database, Cursor, Log Cursor, Sequence and
16401Transaction objects, and each of these is exposed as a Python type in the
16402bsddb3.db module. The database objects can use various access methods: btree,
16403hash, recno, and queue. Complete support of Berkeley DB distributed
16404transactions. Complete support for Berkeley DB Replication Manager.
16405Complete support for Berkeley DB Base Replication. Support for RPC.")
16406 (license license:bsd-3)))
edeb04bf
PL
16407
16408(define-public python-dbfread
16409 (package
16410 (name "python-dbfread")
16411 (version "2.0.7")
16412 (source (origin
16413 (method url-fetch)
16414 (uri (pypi-uri "dbfread" version))
16415 (sha256
16416 (base32
16417 "0gdpwdzf1fngsi6jrdyj4qdf6cr7gnnr3zp80dpkzbgz0spskj07"))))
16418 (build-system python-build-system)
16419 (native-inputs
16420 `(("python-pytest" ,python-pytest)))
16421 (home-page "https://dbfread.readthedocs.io")
16422 (synopsis "Read DBF Files with Python")
16423 (description
16424 "This library reads DBF files and returns the data as native Python data
16425types for further processing. It is primarily intended for batch jobs and
16426one-off scripts.")
16427 (license license:expat)))
e308b4f0
JM
16428
16429(define-public python-cached-property
16430 (package
16431 (name "python-cached-property")
16432 (version "1.5.1")
16433 (source
16434 (origin
16435 (method url-fetch)
16436 (uri (pypi-uri "cached-property" version))
16437 (sha256
16438 (base32
16439 "010m1bl380l2r3vwq24r5v14l6gwvgm9v0mqqjkjss552jgsa5wj"))))
16440 (build-system python-build-system)
16441 (arguments
16442 `(#:phases
16443 (modify-phases %standard-phases
16444 ;; https://github.com/pydanny/cached-property/issues/131
16445 ;; recent versions of freezegun break one test
16446 (add-after 'unpack 'disable-broken-test
16447 (lambda _
16448 (substitute* "tests/test_cached_property.py"
16449 (("def test_threads_ttl_expiry\\(self\\)" m)
16450 (string-append "@unittest.skip(\"Disabled by Guix\")\n"
16451 " " m)))
16452 #t)))))
16453 (native-inputs
16454 `(("python-freezegun" ,python-freezegun)))
16455 (home-page
16456 "https://github.com/pydanny/cached-property")
16457 (synopsis
16458 "Decorator for caching properties in classes")
16459 (description
16460 "This package provides a decorator which makes caching
16461time-or-computationally-expensive properties quick and easy and works in Python
164622 or 3.")
16463 (license license:bsd-3)))
dfe8a704
NG
16464
16465(define-public python-folium
16466 (package
16467 (name "python-folium")
16468 (version "0.10.0")
16469 (source
16470 (origin
16471 (method url-fetch)
16472 (uri (pypi-uri "folium" version))
16473 (sha256
16474 (base32
16475 "18fzxijsgrb95r0a8anc9ba5ijyw3nlnv3rpavfbkqa5v878x84f"))))
16476 (build-system python-build-system)
16477 (propagated-inputs
16478 `(("python-branca" ,python-branca)
16479 ("python-jinja2" ,python-jinja2)
16480 ("python-numpy" ,python-numpy)
16481 ("python-requests" ,python-requests)))
16482 (native-inputs
16483 `(("python-pytest" ,python-pytest)))
16484 (home-page "https://github.com/python-visualization/folium")
16485 (synopsis "Make beautiful maps with Leaflet.js & Python")
16486 (description "@code{folium} makes it easy to visualize data that’s been
16487manipulated in Python on an interactive leaflet map. It enables both the
16488binding of data to a map for @code{choropleth} visualizations as well as
16489passing rich vector/raster/HTML visualizations as markers on the map.
16490
16491The library has a number of built-in tilesets from OpenStreetMap, Mapbox, and
16492Stamen, and supports custom tilesets with Mapbox or Cloudmade API keys. It
16493supports Image, Video, GeoJSON and TopoJSON overlays.")
16494 (license license:expat)))
9dd5f475
LC
16495
16496(define-public jube
16497 (package
16498 ;; This is a command-line tool, so no "python-" prefix.
16499 (name "jube")
16500 (version "2.2.2")
16501 (source (origin
16502 (method url-fetch)
16503 (uri (string-append
16504 "http://apps.fz-juelich.de/jsc/jube/jube2/download.php?version="
16505 version))
16506 (sha256
16507 (base32
16508 "0xq4k1q63s1p6swgyp61vahlrd1fqmgbm0gm5kpj8ikwy0yc0nqk"))
16509 (file-name (string-append "jube-" version ".tar.gz"))))
16510 (build-system python-build-system)
16511 (home-page "https://apps.fz-juelich.de/jsc/jube/jube2/docu/index.html")
16512 (synopsis "Benchmarking environment")
16513 (description
16514 "JUBE helps perform and analyze benchmarks in a systematic way. For each
16515benchmarked application, benchmark data is stored in a format that allows JUBE
16516to deduct the desired information. This data can be parsed by automatic pre-
16517and post-processing scripts that draw information and store it more densely
16518for manual interpretation.")
a9f33960 16519 (license license:gpl3+)))
66436424
NG
16520
16521(define-public python-pyroutelib3
16522 (package
16523 (name "python-pyroutelib3")
16524 (version "1.3.post1")
16525 (source
16526 (origin
16527 (method url-fetch)
16528 (uri (pypi-uri "pyroutelib3" version))
16529 (sha256
16530 (base32
16531 "1hpbydpn2alyswiajfbvhzq4c7f36vdmvxy91hgv8l1lb2g2vfrj"))))
16532 (build-system python-build-system)
16533 (propagated-inputs
16534 `(("python-dateutil" ,python-dateutil)))
16535 (home-page "https://github.com/MKuranowski/pyroutelib3")
16536 (synopsis "Library for simple routing on OSM data")
16537 (description "Library for simple routing on OSM data")
16538 (license license:gpl3+)))
30e7c03a
GL
16539
16540(define-public python-elementpath
16541 (package
16542 (name "python-elementpath")
16543 (version "1.2.0")
16544 (source
16545 (origin
16546 (method url-fetch)
16547 (uri (pypi-uri "elementpath" version))
16548 (sha256
16549 (base32
16550 "1syn2z543brab23dskh3fjd9pqvz6npqbcicrs2d88dbg26xl08p"))))
16551 (build-system python-build-system)
16552 (home-page
16553 "https://github.com/sissaschool/elementpath")
16554 (synopsis
16555 "XPath 1.0/2.0 parsers and selectors for ElementTree and lxml")
16556 (description
16557 "The proposal of this package is to provide XPath 1.0 and 2.0 selectors
16558for Python's ElementTree XML data structures, both for the standard
16559ElementTree library and for the @uref{http://lxml.de, lxml.etree} library.
16560
16561For lxml.etree this package can be useful for providing XPath 2.0 selectors,
16562because lxml.etree already has it's own implementation of XPath 1.0.")
16563 (license license:expat)))
c1bbef69
16564
16565(define-public python-bibtexparser
16566 (package
16567 (name "python-bibtexparser")
16568 (version "1.1.0")
16569 (source
16570 (origin
16571 (method url-fetch)
16572 (uri (pypi-uri "bibtexparser" version))
16573 (sha256
16574 (base32
16575 "0zwhfkrzf3n5847dbnfng92k7ak199l9v6x6ax3dgdidfpm6d2fz"))))
16576 (build-system python-build-system)
16577 (propagated-inputs
16578 `(("python-pyparsing" ,python-pyparsing)))
16579 (native-inputs
16580 `(("python-future" ,python-future)))
16581 (home-page "https://github.com/sciunto-org/python-bibtexparser")
16582 (synopsis "Python library to parse BibTeX files")
16583 (description "BibtexParser is a Python library to parse BibTeX files.")
16584 (license (list license:bsd-3 license:lgpl3))))
8581b40d
HG
16585
16586(define-public python-distro
16587 (package
16588 (name "python-distro")
16589 (version "1.4.0")
16590 (source
16591 (origin
16592 (method url-fetch)
16593 (uri (pypi-uri "distro" version))
16594 (sha256
16595 (base32
16596 "0mrg75w4ap7mdzyga75yaid9n8bgb345ih5mwjp3plj6v1jxwb9n"))))
16597 (build-system python-build-system)
16598 (native-inputs
16599 `(("python-pytest" ,python-pytest)))
16600 (home-page "https://github.com/nir0s/distro")
16601 (synopsis
16602 "OS platform information API")
16603 (description
16604 "@code{distro} provides information about the OS distribution it runs on,
16605such as a reliable machine-readable ID, or version information.
16606
16607It is the recommended replacement for Python's original
16608`platform.linux_distribution` function (which will be removed in Python 3.8).
16609@code{distro} also provides a command-line interface to output the platform
16610information in various formats.")
16611 (license license:asl2.0)))
f2f41e1a
HG
16612
16613(define-public python-cairosvg
16614 (package
16615 (name "python-cairosvg")
16616 (version "2.4.2")
16617 (source
16618 (origin
16619 (method url-fetch)
16620 (uri (pypi-uri "CairoSVG" version))
16621 (sha256
16622 (base32 "1bb7irxbaxxb9ahm3z5wsx1q96mm5gzskc7b6q07h9ikcnb8yrjf"))))
16623 (build-system python-build-system)
16624 (arguments
16625 `(#:phases
16626 (modify-phases %standard-phases
16627 (replace 'check
16628 (lambda _ (invoke "pytest"))))))
16629 (propagated-inputs
16630 `(("python-cairocffi" ,python-cairocffi)
16631 ("python-cssselect2" ,python-cssselect2)
16632 ("python-defusedxml" ,python-defusedxml)
16633 ("python-pillow" ,python-pillow)
16634 ("python-tinycss2" ,python-tinycss2)))
16635 (native-inputs
16636 `(("python-pytest-flake8" ,python-pytest-flake8)
16637 ("python-pytest-isort" ,python-pytest-isort)
16638 ("python-pytest-runner" ,python-pytest-runner)))
16639 (home-page "https://cairosvg.org/")
16640 (synopsis "SVG to PDF/PS/PNG converter based on Cairo")
16641 (description "CairoSVG is a SVG converter based on Cairo. It can export
16642SVG files to PDF, PostScript and PNG files. The main part of CairoSVG is a
16643SVG parser, trying to follow the SVG 1.1 recommendation from the W3C. Once
16644parsed, the result is drawn to a Cairo surface that can be exported to
16645qvarious formats: PDF, PostScript, PNG and even SVG.")
16646 (license license:lgpl3+)))
ea1801e0
HG
16647
16648(define-public python-pyphen
16649 (package
16650 (name "python-pyphen")
16651 (version "0.9.5")
16652 (source
16653 (origin
16654 (method url-fetch)
16655 (uri (pypi-uri "Pyphen" version))
16656 (sha256
16657 (base32 "08c9y69ry9d6m4zalhnalg86lsp9v2j5n1ziw5vxfmiihx83lqrv"))))
16658 (build-system python-build-system)
16659 ;; TODO: Use the Guix system hyphenation packages hyphen-* rather than the
16660 ;; embedded set provided by upstream - like Debian does.
16661 (home-page "https://github.com/Kozea/Pyphen")
16662 (synopsis "Pure Python module to hyphenate text")
16663 (description "Pyphen is a pure Python module to hyphenate text using
16664existing Hunspell hyphenation dictionaries.")
16665 (license (list license:gpl2 license:lgpl2.1 license:mpl1.1))))
85cfb0e9
CL
16666
16667(define-public python-intelhex
16668 (package
16669 (name "python-intelhex")
16670 (version "2.2.1")
16671 (source
16672 (origin
16673 (method url-fetch)
16674 (uri (pypi-uri "intelhex" version))
16675 (sha256
16676 (base32
16677 "0ckqjbxd8gwcg98gfzpn4vq1qxzfvq3rdbrr1hikj1nmw08qb780"))))
16678 (build-system python-build-system)
16679 (arguments '(#:tests? #f)) ;issue with version
16680 (home-page "https://pypi.org/project/IntelHex/")
16681 (synopsis "Python library for Intel HEX files manipulations")
16682 (description "The Intel HEX file format is widely used in microprocessors
16683and microcontrollers area (embedded systems etc.) as the de facto standard for
16684representation of code to be programmed into microelectronic devices. This
16685package provides an intelhex Python library to read, write, create from
16686scratch and manipulate data from Intel HEX file format. It also includes
16687several convenience Python scripts, including \"classic\" hex2bin and bin2hex
16688converters and more, those based on the library itself.")
16689 (license license:bsd-3)))
34bf6869
CL
16690
16691(define-public python-pykwalify
16692 (package
16693 (name "python-pykwalify")
16694 (version "1.7.0")
16695 (source
16696 (origin
16697 (method url-fetch)
16698 (uri (pypi-uri "pykwalify" version))
16699 (sha256
16700 (base32
16701 "1cnfzkg1b01f825ikpw2fhjclf9c8akxjfrbd1vc22x1lg2kk2vy"))))
16702 (build-system python-build-system)
16703 (arguments '(#:tests? #f)) ;missing dependencies
16704 (propagated-inputs
16705 `(("python-dateutil" ,python-dateutil)
16706 ("python-docopt" ,python-docopt)
16707 ("python-pyyaml" ,python-pyyaml)))
16708 (home-page "https://github.com/grokzen/pykwalify")
16709 (synopsis
16710 "Python lib/cli for JSON/YAML schema validation")
16711 (description
16712 "This package provides a parser, schema validator, and data binding tool
16713for YAML and JSON.")
16714 (license license:expat)))
e2ebbbcc
KK
16715
16716(define-public python-dbusmock
16717 (package
16718 (name "python-dbusmock")
09956cce 16719 (version "0.18.3")
e2ebbbcc
KK
16720 (source
16721 (origin
16722 (method url-fetch)
16723 (uri (pypi-uri "python-dbusmock" version))
16724 (sha256
16725 (base32
09956cce 16726 "0hp2kyac88nh9iv6l8hlmv7s1sa1s5f1a3wc2pmlmmxnd211fjlr"))))
e2ebbbcc
KK
16727 (build-system python-build-system)
16728 (arguments
16729 '(#:phases
16730 (modify-phases %standard-phases
09956cce 16731 (add-after 'unpack 'patch-shell-path
e2ebbbcc
KK
16732 (lambda _
16733 (substitute* "tests/test_code.py"
09956cce 16734 (("/bin/bash") (which "bash")))
e2ebbbcc
KK
16735 #t)))))
16736 (native-inputs
16737 `(;; For tests.
16738 ("dbus" ,dbus) ; for dbus-daemon
16739 ("python-nose" ,python-nose)
16740 ("which" ,which)))
16741 (propagated-inputs
16742 `(("python-dbus" ,python-dbus)
16743 ("python-pygobject" ,python-pygobject)))
16744 (home-page "https://github.com/martinpitt/python-dbusmock")
16745 (synopsis "Python library for mock D-Bus objects")
16746 (description "python-dbusmock allows for the easy creation of mock objects on
16747D-Bus. This is useful for writing tests for software which talks to D-Bus
16748services such as upower, systemd, logind, gnome-session or others, and it is
16749hard (or impossible without root privileges) to set the state of the real
16750services to what you expect in your tests.")
16751 (license license:lgpl3+)))
b657b23f
BG
16752
16753(define-public python-ujson
16754 (package
16755 (name "python-ujson")
16756 (version "1.35")
16757 (source
16758 (origin
16759 (method url-fetch)
16760 (uri (pypi-uri "ujson" version))
16761 (sha256
16762 (base32
16763 "11jz5wi7mbgqcsz52iqhpyykiaasila4lq8cmc2d54bfa3jp6q7n"))))
16764 (build-system python-build-system)
16765 (home-page "http://www.esn.me")
16766 (synopsis
16767 "Ultra fast JSON encoder and decoder for Python")
16768 (description
16769 "UltraJSON is an ultra fast JSON encoder and decoder written in pure C with
16770 bindings for Python 2.5+ and 3.")
16771 (license license:bsd-3)))
16772
16773(define-public python2-ujson
16774 (package-with-python2 python-ujson))