gnu: Replace uses of 'libjpeg' with 'libjpeg-turbo'.
[jackhill/guix/guix.git] / gnu / packages / python-xyz.scm
CommitLineData
44d10b1f
RW
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
2d040763 3;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
fa8ffaa0 4;;; Copyright © 2013, 2014, 2015, 2016, 2019 Andreas Enge <andreas@enge.fr>
44d10b1f
RW
5;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
6;;; Copyright © 2014, 2017 Eric Bavier <bavier@member.fsf.org>
7;;; Copyright © 2014, 2015 Federico Beffa <beffa@fbengineering.ch>
8;;; Copyright © 2015 Omar Radwan <toxemicsquire4@gmail.com>
9;;; Copyright © 2015 Pierre-Antoine Rault <par@rigelk.eu>
10;;; Copyright © 2015, 2016, 2017, 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
11;;; Copyright © 2015, 2016 Christopher Allan Webber <cwebber@dustycloud.org>
12;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
13;;; Copyright © 2015, 2016 David Thompson <davet@gnu.org>
b742c006 14;;; Copyright © 2015, 2016, 2017, 2019 Leo Famulari <leo@famulari.name>
44d10b1f
RW
15;;; Copyright © 2015, 2017 Ben Woodcroft <donttrustben@gmail.com>
16;;; Copyright © 2015, 2016 Erik Edrosa <erik.edrosa@gmail.com>
11e46326 17;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
44d10b1f
RW
18;;; Copyright © 2015, 2017 Kyle Meyer <kyle@kyleam.com>
19;;; Copyright © 2015, 2016 Chris Marusich <cmmarusich@gmail.com>
20;;; Copyright © 2016 Danny Milosavljevic <dannym+a@scratchpost.org>
21;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
8581b40d 22;;; Copyright © 2016, 2018-2019 Hartmut Goebel <h.goebel@crazy-compilers.com>
44d10b1f
RW
23;;; Copyright © 2016 Daniel Pimentel <d4n1@d4n1.org>
24;;; Copyright © 2016 Sou Bunnbu <iyzsong@gmail.com>
25;;; Copyright © 2016, 2017 Troy Sankey <sankeytms@gmail.com>
47956fa0 26;;; Copyright © 2016, 2017 ng0 <ng0@n0.is>
44d10b1f
RW
27;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
28;;; Copyright © 2016 David Craven <david@craven.ch>
fd5c264a 29;;; Copyright © 2016, 2017, 2018, 2019, 2020 Marius Bakke <mbakke@fastmail.com>
44d10b1f
RW
30;;; Copyright © 2016, 2017 Stefan Reichör <stefan@xsteve.at>
31;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
e746d1c3 32;;; Copyright © 2016, 2017, 2019 Alex Vong <alexvong1995@gmail.com>
44d10b1f
RW
33;;; Copyright © 2016, 2017, 2018 Arun Isaac <arunisaac@systemreboot.net>
34;;; Copyright © 2016, 2017, 2018 Julien Lepiller <julien@lepiller.eu>
783d1d40 35;;; Copyright © 2016, 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
44d10b1f
RW
36;;; Copyright © 2016, 2017 Thomas Danckaert <post@thomasdanckaert.be>
37;;; Copyright © 2017 Carlo Zancanaro <carlo@zancanaro.id.au>
38;;; Copyright © 2017 Frederick M. Muriithi <fredmanglis@gmail.com>
39;;; Copyright © 2017, 2018 Adriano Peluso <catonano@gmail.com>
40;;; Copyright © 2017 Ben Sturmfels <ben@sturm.com.au>
a0b2accf 41;;; Copyright © 2017, 2018, 2019 Mathieu Othacehe <m.othacehe@gmail.com>
44d10b1f
RW
42;;; Copyright © 2017 José Miguel Sánchez García <jmi2k@openmailbox.org>
43;;; Copyright © 2017 Roel Janssen <roel@gnu.org>
e2ebbbcc 44;;; Copyright © 2017, 2018, 2019 Kei Kebreau <kkebreau@posteo.net>
44d10b1f
RW
45;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
46;;; Copyright © 2017 Muriithi Frederick Muriuki <fredmanglis@gmail.com>
dcfa0acd 47;;; Copyright © 2017, 2019 Brendan Tildesley <mail@brendan.scot>
44d10b1f
RW
48;;; Copyright © 2018 Ethan R. Jones <ethanrjones97@gmail.com
49;;; Copyright © 2018 Fis Trivial <ybbs.daans@hotmail.com>
50;;; Copyright © 2018 Vijayalakshmi Vedantham <vijimay12@gmail.com>
51;;; Copyright © 2018 Mathieu Lirzin <mthl@gnu.org>
52;;; Copyright © 2018 Adam Massmann <massmannak@gmail.com>
53;;; Copyright © 2016, 2018 Tomáš Čech <sleep_walker@gnu.org>
a2548a3b 54;;; Copyright © 2018, 2019, 2020 Nicolas Goaziou <mail@nicolasgoaziou.fr>
44d10b1f 55;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
85cfb0e9 56;;; Copyright © 2018, 2019 Clément Lassieur <clement@lassieur.org>
4caf37b0 57;;; Copyright © 2018, 2019 Maxim Cournoyer <maxim.cournoyer@gmail.com>
44d10b1f
RW
58;;; Copyright © 2018 Luther Thompson <lutheroto@gmail.com>
59;;; Copyright © 2018 Vagrant Cascadian <vagrant@debian.org>
046dd621 60;;; Copyright © 2019, 2020 Brett Gilio <brettg@gnu.org>
a91f4eba 61;;; Copyright © 2019 Sam <smbaines8@gmail.com>
8c141421 62;;; Copyright © 2019 Jack Hill <jackhill@jackhill.us>
f825e605 63;;; Copyright © 2019 Guillaume Le Vaillant <glv@posteo.net>
fb236fdd 64;;; Copyright © 2019 Alex Griffin <a@ajgrf.com>
edeb04bf 65;;; Copyright © 2019 Pierre Langlois <pierre.langlois@gmx.com>
e308b4f0 66;;; Copyright © 2019 Jacob MacDonald <jaccarmac@gmail.com>
30e7c03a 67;;; Copyright © 2019 Giacomo Leidi <goodoldpaul@autistici.org>
c1bbef69 68;;; Copyright © 2019 Wiktor Żelazny <wzelazny@vurv.cz>
ba42a6bf 69;;; Copyright © 2019 Tanguy Le Carrour <tanguy@bioneland.org>
dbcef44a 70;;; Copyright © 2019 Mădălin Ionel Patrașcu <madalinionel.patrascu@mdc-berlin.de>
3963fc70 71;;; Copyright © 2020 Riku Viitanen <riku.viitanen@protonmail.com>
44d10b1f
RW
72;;;
73;;; This file is part of GNU Guix.
74;;;
75;;; GNU Guix is free software; you can redistribute it and/or modify it
76;;; under the terms of the GNU General Public License as published by
77;;; the Free Software Foundation; either version 3 of the License, or (at
78;;; your option) any later version.
79;;;
80;;; GNU Guix is distributed in the hope that it will be useful, but
81;;; WITHOUT ANY WARRANTY; without even the implied warranty of
82;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
83;;; GNU General Public License for more details.
84;;;
85;;; You should have received a copy of the GNU General Public License
86;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
87
88(define-module (gnu packages python-xyz)
89 #:use-module ((guix licenses) #:prefix license:)
90 #:use-module (gnu packages)
91 #:use-module (gnu packages algebra)
92 #:use-module (gnu packages adns)
93 #:use-module (gnu packages attr)
94 #:use-module (gnu packages backup)
95 #:use-module (gnu packages bash)
96 #:use-module (gnu packages check)
97 #:use-module (gnu packages compression)
98 #:use-module (gnu packages crypto)
99 #:use-module (gnu packages databases)
f825e605 100 #:use-module (gnu packages dbm)
44d10b1f
RW
101 #:use-module (gnu packages file)
102 #:use-module (gnu packages fontutils)
103 #:use-module (gnu packages gcc)
104 #:use-module (gnu packages geo)
105 #:use-module (gnu packages ghostscript)
106 #:use-module (gnu packages gl)
107 #:use-module (gnu packages glib)
e2ebbbcc 108 #:use-module (gnu packages gnome)
44d10b1f
RW
109 #:use-module (gnu packages graphviz)
110 #:use-module (gnu packages graphics)
111 #:use-module (gnu packages gstreamer)
112 #:use-module (gnu packages gtk)
113 #:use-module (gnu packages icu4c)
114 #:use-module (gnu packages image)
115 #:use-module (gnu packages imagemagick)
72c2478a 116 #:use-module (gnu packages kerberos)
44d10b1f
RW
117 #:use-module (gnu packages libevent)
118 #:use-module (gnu packages libffi)
119 #:use-module (gnu packages linux)
120 #:use-module (gnu packages llvm)
121 #:use-module (gnu packages man)
122 #:use-module (gnu packages maths)
42f0b0c2 123 #:use-module (gnu packages monitoring)
44d10b1f
RW
124 #:use-module (gnu packages multiprecision)
125 #:use-module (gnu packages networking)
126 #:use-module (gnu packages ncurses)
127 #:use-module (gnu packages openstack)
128 #:use-module (gnu packages pcre)
129 #:use-module (gnu packages perl)
130 #:use-module (gnu packages pkg-config)
131 #:use-module (gnu packages python)
d362b11d 132 #:use-module (gnu packages python-check)
15b65617 133 #:use-module (gnu packages python-compression)
44d10b1f 134 #:use-module (gnu packages python-crypto)
ca7c3653 135 #:use-module (gnu packages python-science)
44d10b1f
RW
136 #:use-module (gnu packages python-web)
137 #:use-module (gnu packages qt)
138 #:use-module (gnu packages readline)
139 #:use-module (gnu packages sdl)
140 #:use-module (gnu packages search)
141 #:use-module (gnu packages shells)
9d0c291e 142 #:use-module (gnu packages sphinx)
44d10b1f
RW
143 #:use-module (gnu packages ssh)
144 #:use-module (gnu packages terminals)
145 #:use-module (gnu packages tex)
146 #:use-module (gnu packages texinfo)
147 #:use-module (gnu packages time)
148 #:use-module (gnu packages tls)
149 #:use-module (gnu packages version-control)
150 #:use-module (gnu packages video)
151 #:use-module (gnu packages web)
152 #:use-module (gnu packages base)
153 #:use-module (gnu packages xml)
154 #:use-module (gnu packages xorg)
155 #:use-module (gnu packages xdisorg)
156 #:use-module (gnu packages tcl)
157 #:use-module (gnu packages bdw-gc)
f98232a3 158 #:use-module (gnu packages serialization)
44d10b1f
RW
159 #:use-module (guix packages)
160 #:use-module (guix download)
161 #:use-module (guix git-download)
a042d348 162 #:use-module (guix hg-download)
44d10b1f
RW
163 #:use-module (guix utils)
164 #:use-module (guix build-system gnu)
165 #:use-module (guix build-system cmake)
166 #:use-module (guix build-system python)
167 #:use-module (guix build-system trivial)
168 #:use-module (srfi srfi-1)
169 #:use-module (srfi srfi-26))
170
171(define-public python-psutil
172 (package
173 (name "python-psutil")
e9119ac1 174 (version "5.6.5")
44d10b1f
RW
175 (source
176 (origin
177 (method url-fetch)
178 (uri (pypi-uri "psutil" version))
179 (sha256
e9119ac1 180 (base32 "0isil5jxwwd8awz54qk28rpgjg43i5l6yl70g40vxwa4r4m56lfh"))))
44d10b1f
RW
181 (build-system python-build-system)
182 (arguments
183 ;; FIXME: some tests does not return and times out.
184 '(#:tests? #f))
185 (home-page "https://www.github.com/giampaolo/psutil")
186 (synopsis "Library for retrieving information on running processes")
187 (description
188 "psutil (Python system and process utilities) is a library for retrieving
189information on running processes and system utilization (CPU, memory, disks,
190network) in Python. It is useful mainly for system monitoring, profiling and
191limiting process resources and management of running processes. It implements
192many functionalities offered by command line tools such as: ps, top, lsof,
193netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
194pidof, tty, taskset, pmap.")
195 (properties `((python2-variant . ,(delay python2-psutil))))
196 (license license:bsd-3)))
197
198(define-public python2-psutil
199 (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
200 (package
201 (inherit base)
202 (propagated-inputs
203 `(("python2-enum34" ,python2-enum34) ;optional
204 ,@(package-propagated-inputs base))))))
205
206(define-public python-shapely
207 (package
208 (name "python-shapely")
6d94465b 209 (version "1.6.4.post2")
44d10b1f
RW
210 (source
211 (origin
212 (method url-fetch)
213 (uri (pypi-uri "Shapely" version))
214 (sha256
215 (base32
6d94465b 216 "03r42fmd9alp6r3q95ad6rldq2f7n1wimrw53zy5kpn33yv7pf64"))))
44d10b1f
RW
217 (build-system python-build-system)
218 (native-inputs
219 `(("python-cython" ,python-cython)
220 ("python-matplotlib" ,python-matplotlib)
221 ("python-pytest" ,python-pytest)
222 ("python-pytest-cov" ,python-pytest-cov)))
223 (inputs
224 `(("geos" ,geos)))
225 (propagated-inputs
226 `(("python-numpy" ,python-numpy)))
227 (arguments
228 `(#:phases
229 (modify-phases %standard-phases
230 (add-after 'unpack 'patch-geos-path
231 (lambda* (#:key inputs #:allow-other-keys)
232 (let ((geos (assoc-ref inputs "geos"))
233 (glibc (assoc-ref inputs ,(if (%current-target-system)
234 "cross-libc" "libc"))))
235 (substitute* "shapely/geos.py"
236 (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)")
237 (string-append "_lgeos = load_dll('geos_c', fallbacks=['"
238 geos "/lib/libgeos_c.so'])"))
239 (("free = load_dll\\('c'\\)\\.free")
240 (string-append "free = load_dll('c', fallbacks=['"
241 glibc "/lib/libc.so.6']).free"))))
242 #t)))))
243 (home-page "https://github.com/Toblerity/Shapely")
244 (synopsis "Library for the manipulation and analysis of geometric objects")
245 (description "Shapely is a Python package for manipulation and analysis of
246planar geometric objects. It is based on the @code{GEOS} library.")
247 (license license:bsd-3)))
248
a91f4eba
S
249(define-public python-shortuuid
250 (package
251 (name "python-shortuuid")
252 (version "0.5.0")
253 (source
254 (origin
255 (method url-fetch)
256 (uri (pypi-uri "shortuuid" version))
257 (sha256
258 (base32
259 "1f8i4zwj5vmpzbz6b17bljy4399gx5aq7vsyw63sz2qgyjcd73yh"))))
260 (build-system python-build-system)
261 (native-inputs
262 `(("python-pep8" ,python-pep8)))
263 (home-page "https://github.com/skorokithakis/shortuuid")
264 (synopsis "Generator library for concise, unambiguous and URL-safe UUIDs")
265 (description
266 "@code{shortuuid} is a Python library for generating concise, unambiguous
267and URL-safe UUIDs. UUIDs are generated using the built-in Python @code{uuid}
268module and then similar looking characters are removed.")
269 (license license:bsd-3)))
270
44d10b1f
RW
271(define-public python-logwrap
272 (package
273 (name "python-logwrap")
274 (version "3.2.1")
275 (source
276 (origin
277 (method url-fetch)
278 (uri (pypi-uri "logwrap" version ".zip"))
279 (sha256
280 (base32
281 "1d2k0hvpbi51vl410y8fbs5m0nxnlh2k7gr2nrh3k81ibhzscsra"))))
282 (build-system python-build-system)
283 (propagated-inputs
284 `(("python-six" ,python-six)
285 ("python-typing" ,python-typing)))
286 (native-inputs
287 `(("unzip" ,unzip)
288 ("python-cython" ,python-cython)
289 ("python-pytest" ,python-pytest)
290 ("python-pytest-cov" ,python-pytest-cov)
291 ("python-pytest-runner" ,python-pytest-runner)))
292 (home-page "https://github.com/penguinolog/logwrap")
293 (synopsis "Decorator for logging function arguments")
294 (description "This package provides a decorator to log function arguments
295and function call return values in a human-readable way.")
296 (license license:asl2.0)))
297
298(define-public python2-shapely
299 (package-with-python2 python-shapely))
300
301(define-public python-clyent
302 (package
303 (name "python-clyent")
304 (version "1.2.1")
305 (source
306 (origin
307 (method url-fetch)
308 (uri (pypi-uri "clyent" version))
309 (sha256
310 (base32
311 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
312 (build-system python-build-system)
313 (native-inputs
314 `(("python-mock" ,python-mock)))
315 (home-page "https://github.com/binstar/clyent")
316 (synopsis "Command line client library")
317 (description "Clyent is a Python command line utiliy library. It is used
318by @code{binstar}, @code{binstar-build} and @code{chalmers}.")
319 (license license:bsd-3)))
320
321(define-public python2-clyent
322 (package-with-python2 python-clyent))
323
324(define-public python-babel
325 (package
326 (name "python-babel")
93253411 327 (version "2.7.0")
44d10b1f
RW
328 (source
329 (origin
330 (method url-fetch)
331 (uri (pypi-uri "Babel" version))
332 (sha256
333 (base32
93253411 334 "0a7wawx8vsg7igvz6p3x909fskhg4b2y1910xk4f4c8y22p3aqg8"))))
44d10b1f
RW
335 (build-system python-build-system)
336 (native-inputs
337 `(("python-freezegun" ,python-freezegun)
338 ("python-pytest" ,python-pytest)))
339 (propagated-inputs
340 `(("python-pytz" ,python-pytz)))
341 (arguments
342 `(#:phases (modify-phases %standard-phases
343 (replace 'check
8acd1e90
MB
344 (lambda _
345 (invoke "pytest" "-vv" "-k"
346 (string-append
347 ;; XXX: These tests fail when using Pytest 4.x and
348 ;; Babel 2.6.0. Try removing this for later versions.
349 "not test_no_inherit_metazone_marker_never_in_output"
350 " and not test_smoke_dates"
351 " and not test_smoke_numbers")))))))
44d10b1f
RW
352 (home-page "http://babel.pocoo.org/")
353 (synopsis
354 "Tools for internationalizing Python applications")
355 (description
356 "Babel is composed of two major parts:
357- tools to build and work with gettext message catalogs
358- a Python interface to the CLDR (Common Locale Data Repository), providing
359access to various locale display names, localized number and date formatting,
360etc. ")
361 (license license:bsd-3)))
362
363(define-public python2-babel
364 (package-with-python2 python-babel))
365
93253411
MB
366;; Sphinx < 2.0 requires this version. Remove once no longer needed.
367(define-public python2-babel-2.6
368 (package
369 (inherit python2-babel)
370 (version "2.6.0")
371 (source (origin
372 (method url-fetch)
373 (uri (pypi-uri "Babel" version))
374 (sha256
375 (base32
376 "08rxmbx2s4irp0w0gmn498vns5xy0fagm0fg33xa772jiks51flc"))))))
377
44d10b1f
RW
378(define-public python2-backport-ssl-match-hostname
379 (package
380 (name "python2-backport-ssl-match-hostname")
381 (version "3.5.0.1")
382 (source
383 (origin
384 (method url-fetch)
2c1f0d09 385 (uri (pypi-uri "backports.ssl_match_hostname" version))
44d10b1f
RW
386 (sha256
387 (base32
388 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
389 (build-system python-build-system)
390 (arguments
391 `(#:python ,python-2
392 #:tests? #f)) ; no test target
393 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
394 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
395 (description
396 "This backport brings the ssl.match_hostname() function to users of
397earlier versions of Python. The function checks the hostname in the
398certificate returned by the server to which a connection has been established,
399and verifies that it matches the intended target hostname.")
400 (license license:psfl)))
401
dc827867
TGR
402(define-public python-boolean.py
403 (package
404 (name "python-boolean.py")
405 (version "3.6")
406 (source
407 (origin
408 ;; There's no source tarball on PyPI.
409 (method git-fetch)
410 (uri (git-reference
411 (url "https://github.com/bastikr/boolean.py")
412 (commit (string-append "v" version))))
413 (file-name (git-file-name name version))
414 (sha256
415 (base32 "1wc89y73va58cj7dsx6c199zpxsy9q53dsffsdj6zmc90inqz6qs"))))
416 (build-system python-build-system)
417 (home-page "https://github.com/bastikr/boolean.py")
418 (synopsis "Boolean algebra in one Python module")
419 (description
420 "This is a small Python library that implements boolean algebra.
421It defines two base elements, @code{TRUE} and @code{FALSE}, and a
422@code{Symbol} class that can take on one of these two values. Calculations
423are done only in terms of @code{AND}, @code{OR}, and @code{NOT}---other
424compositions like @code{XOR} and @code{NAND} are emulated on top of them.
425Expressions are constructed from parsed strings or directly in Python.")
426 (license license:bsd-2)))
427
44d10b1f
RW
428(define-public python-hdf4
429 (package
430 (name "python-hdf4")
431 (version "0.9")
432 (source
433 (origin
434 (method url-fetch)
435 (uri (pypi-uri name version))
436 (sha256
437 (base32
438 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
439 (build-system python-build-system)
440 (native-inputs `(("nose" ,python-nose)))
441 (propagated-inputs `(("numpy" ,python-numpy)))
442 (inputs
443 `(("hdf4" ,hdf4)
4bd428a7 444 ("libjpeg" ,libjpeg-turbo)
44d10b1f
RW
445 ("zlib" ,zlib)))
446 (arguments
447 `(#:phases
448 (modify-phases %standard-phases
449 (replace 'check
450 (lambda _
451 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
452 ;; on to import numpy. Somehow this works on their CI system.
453 ;; Let's just manage PYTHONPATH here instead.
454 (substitute* "runexamples.sh"
455 (("export PYTHONPATH=.*") ""))
456 (setenv "PYTHONPATH"
457 (string-append (getcwd) ":"
458 (getenv "PYTHONPATH")))
459 (invoke "./runexamples.sh")
460 (invoke "nosetests" "-v"))))))
461 (home-page "https://github.com/fhs/python-hdf4")
462 (synopsis "Python interface to the NCSA HDF4 library")
463 (description
464 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
465which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
466NetCDF files can also be read and modified. Python-HDF4 is a fork of
467@url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
468 (license license:expat)))
469
470(define-public python2-hdf4
471 (package-with-python2 python-hdf4))
472
473(define-public python-h5py
474 (package
475 (name "python-h5py")
476 (version "2.8.0")
477 (source
478 (origin
479 (method url-fetch)
480 (uri (pypi-uri "h5py" version))
481 (sha256
482 (base32
483 "0mdr6wrq02ac93m1aqx9kad0ppfzmm4imlxqgyy1x4l7hmdcc9p6"))))
484 (build-system python-build-system)
485 (arguments
486 `(#:tests? #f ; no test target
487 #:phases
488 (modify-phases %standard-phases
489 (add-after 'unpack 'fix-hdf5-paths
490 (lambda* (#:key inputs #:allow-other-keys)
491 (let ((prefix (assoc-ref inputs "hdf5")))
492 (substitute* "setup_build.py"
493 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
494 (string-append "['" prefix "/lib" "']"))
495 (("'/opt/local/include', '/usr/local/include'")
496 (string-append "'" prefix "/include" "'")))
497 (substitute* "setup_configure.py"
498 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
499 (string-append "['" prefix "/lib" "']")))
500 #t))))))
501 (propagated-inputs
502 `(("python-six" ,python-six)
503 ("python-numpy" ,python-numpy)))
504 (inputs
505 `(("hdf5" ,hdf5)))
506 (native-inputs
507 `(("python-cython" ,python-cython)
508 ("python-pkgconfig" ,python-pkgconfig)))
509 (home-page "http://www.h5py.org/")
510 (synopsis "Read and write HDF5 files from Python")
511 (description
512 "The h5py package provides both a high- and low-level interface to the
513HDF5 library from Python. The low-level interface is intended to be a
514complete wrapping of the HDF5 API, while the high-level component supports
515access to HDF5 files, datasets and groups using established Python and NumPy
516concepts.")
517 (license license:bsd-3)))
518
519(define-public python2-h5py
520 (package-with-python2 python-h5py))
521
8b89dedc
RW
522(define-public python-sh
523 (package
524 (name "python-sh")
525 (version "1.12.14")
526 (source
527 (origin
528 (method url-fetch)
529 (uri (pypi-uri "sh" version))
530 (sha256
531 (base32
532 "1z2hx357xp3v4cv44xmqp7lli3frndqpyfmpbxf7n76h7s1zaaxm"))))
533 (build-system python-build-system)
fd3638d8
EF
534 (arguments
535 '(#:phases
536 (modify-phases %standard-phases
537 (replace 'check
538 (lambda _
ca983a2f
NG
539 ;; XXX: A Python 2 test fails when HOME=/homeless-shelter.
540 (setenv "HOME" "/tmp")
fd3638d8
EF
541 (invoke "python" "sh.py" "test"))))))
542 (native-inputs
543 `(("python-coverage" ,python-coverage)))
8b89dedc
RW
544 (home-page "https://github.com/amoffat/sh")
545 (synopsis "Python subprocess replacement")
546 (description "This package provides a replacement for Python's
547@code{subprocess} feature.")
548 (license license:expat)))
549
3869effd
RW
550(define-public python2-sh
551 (package-with-python2 python-sh))
552
d362b11d
RW
553(define-public python-cftime
554 (package
555 (name "python-cftime")
da107cf5 556 (version "1.0.4.2")
d362b11d
RW
557 (source
558 (origin
559 (method url-fetch)
560 (uri (pypi-uri "cftime" version))
561 (sha256
da107cf5 562 (base32 "0w0gi6jnch38hiygl62j4xkcirv4y3dcwrvxl9p7bsk6j27lzihs"))))
d362b11d
RW
563 (build-system python-build-system)
564 (propagated-inputs
565 `(("python-numpy" ,python-numpy)))
566 (native-inputs
567 `(("python-coveralls" ,python-coveralls)
568 ("python-cython" ,python-cython)
569 ("python-pytest-cov" ,python-pytest-cov)))
570 (home-page "https://github.com/Unidata/cftime")
571 (synopsis "Library for time handling")
572 (description
573 "This package provides time-handling functionality that used to be part
574of the netcdf4 package before.")
575 ;; This package claims to include code under the GPLv3 but is released
576 ;; under ISC.
577 (license (list license:isc license:gpl3+))))
578
44d10b1f
RW
579(define-public python-netcdf4
580 (package
581 (name "python-netcdf4")
93e7b209 582 (version "1.4.2")
44d10b1f
RW
583 (source
584 (origin
585 (method url-fetch)
586 (uri (pypi-uri "netCDF4" version))
587 (sha256
588 (base32
93e7b209 589 "0c0sklgrmv15ygliin8qq0hp7vanmbi74m6zpi0r1ksr0hssyd5r"))))
44d10b1f 590 (build-system python-build-system)
93e7b209
RW
591 (arguments
592 '(#:phases
593 (modify-phases %standard-phases
594 (add-after 'unpack 'configure-locations
595 (lambda* (#:key inputs #:allow-other-keys)
596 (setenv "HDF5_DIR" (assoc-ref inputs "hdf5"))
597 #t)))))
44d10b1f
RW
598 (native-inputs
599 `(("python-cython" ,python-cython)))
600 (propagated-inputs
93e7b209
RW
601 `(("python-numpy" ,python-numpy)
602 ("python-cftime" ,python-cftime)))
44d10b1f
RW
603 (inputs
604 `(("netcdf" ,netcdf)
605 ("hdf4" ,hdf4)
606 ("hdf5" ,hdf5)))
93e7b209 607 (home-page "https://github.com/Unidata/netcdf4-python")
44d10b1f
RW
608 (synopsis "Python/numpy interface to the netCDF library")
609 (description "Netcdf4-python is a Python interface to the netCDF C
610library. netCDF version 4 has many features not found in earlier
611versions of the library and is implemented on top of HDF5. This module
612can read and write files in both the new netCDF 4 and the old netCDF 3
613format, and can create files that are readable by HDF5 clients. The
614API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
615to users of that module.")
616 ;; The software is mainly ISC, but includes some files covered
617 ;; by the Expat license.
618 (license (list license:isc license:expat))))
619
620(define-public python2-netcdf4
621 (package-with-python2 python-netcdf4))
622
d6803445
TGR
623(define-public python-license-expression
624 (package
625 (name "python-license-expression")
626 (version "0.999")
627 (source
628 (origin
629 (method url-fetch)
630 (uri (pypi-uri "license-expression" version))
631 (sha256
632 (base32 "08ppb0bxbrsxazy88sgpl9yffvdsabw6dkk1nc332wcz2mphwwyf"))))
633 (build-system python-build-system)
634 (propagated-inputs
635 `(("python-boolean.py" ,python-boolean.py)))
636 (home-page "https://github.com/nexB/license-expression")
637 (synopsis "Apply boolean logic to license expressions")
638 (description
639 "This Python module defines a tiny language to evaluate and compare
640license expressions using boolean logic. Logical combinations of licenses can
641be tested for equality, containment, and equivalence. They can be normalised
642and simplified. It supports SPDX license expressions as well as other naming
643conventions and aliases in the same expression.")
644 (license license:gpl2+)))
645
44d10b1f
RW
646(define-public python-lockfile
647 (package
648 (name "python-lockfile")
649 (version "0.12.2")
650 (source
651 (origin
652 (method url-fetch)
8318bf07 653 (uri (pypi-uri "lockfile" version))
44d10b1f
RW
654 (sha256
655 (base32
656 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
657 (build-system python-build-system)
658 (arguments '(#:test-target "check"))
659 (native-inputs
660 `(("python-pbr" ,python-pbr)))
661 (home-page "https://launchpad.net/pylockfile")
662 (synopsis "Platform-independent file locking module")
663 (description
664 "The lockfile package exports a LockFile class which provides a simple
665API for locking files.")
666 (license license:expat)))
667
668(define-public python2-lockfile
669 (package-with-python2 python-lockfile))
670
671(define-public python-semantic-version
672 (package
673 (name "python-semantic-version")
674 (version "2.6.0")
675 (source
676 (origin
677 (method url-fetch)
678 (uri (pypi-uri "semantic_version" version))
679 (sha256
680 (base32
681 "1h2l9xyg1zzsda6kjcmfcgycbvrafwci283vcr1v5sbk01l2hhra"))))
682 (build-system python-build-system)
683 (arguments
684 `(#:tests? #f)) ; PyPI tarball lacks tests
685 (home-page "https://github.com/rbarrois/python-semanticversion")
686 (synopsis "Semantic versioning module for Python")
687 (description
688 "The @code{semantic_version} class is a small library for handling
689@uref{https://semver.org/, semantic versioning} (@dfn{SemVer}) in Python.
690
691It can compare versions, generate a new version that represents a bump in one of
692the version levels, and check whether any given string is a proper semantic
693version identifier.")
694 (license license:bsd-3)))
695
696(define-public python2-semantic-version
697 (package-with-python2 python-semantic-version))
698
699(define-public python-serpent
700 (package
701 (name "python-serpent")
fa9d14ac 702 (version "1.28")
44d10b1f
RW
703 (source
704 (origin
705 (method url-fetch)
706 (uri (pypi-uri "serpent" version))
707 (sha256
fa9d14ac 708 (base32 "1arnckykpkvv2qrp49l1k7q5mr5pisswl0rvdx98x8wsl1n361pk"))))
44d10b1f 709 (build-system python-build-system)
fa9d14ac
TGR
710 (native-inputs
711 `(("python-attrs" ,python-attrs)
712 ("python-pytz" ,python-pytz)))
44d10b1f
RW
713 (home-page "https://github.com/irmen/Serpent")
714 (synopsis "Serializer for literal Python expressions")
715 (description
1d3c7803
TGR
716 "Serpent provides @code{ast.literal_eval()}-compatible object tree
717serialization. It serializes an object tree into bytes (an utf-8 encoded
718string) that can be decoded and then passed as-is to @code{ast.literal_eval()}
719to rebuild the original object tree.
720
721Because only safe literals are encoded, it is safe to send serpent data to
722other machines, such as over the network.")
44d10b1f
RW
723 (license license:expat)))
724
725(define-public python-setuptools
726 (package
727 (name "python-setuptools")
e39d4933 728 (version "41.0.1")
44d10b1f
RW
729 (source
730 (origin
731 (method url-fetch)
732 (uri (pypi-uri "setuptools" version ".zip"))
733 (sha256
734 (base32
e39d4933 735 "04sns22y2hhsrwfy1mha2lgslvpjsjsz8xws7h2rh5a7ylkd28m2"))
44d10b1f
RW
736 (modules '((guix build utils)))
737 (snippet
738 '(begin
739 ;; Remove included binaries which are used to build self-extracting
740 ;; installers for Windows.
741 ;; TODO: Find some way to build them ourself so we can include them.
742 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
743 #t))))
744 (build-system python-build-system)
745 ;; FIXME: Tests require pytest, which itself relies on setuptools.
746 ;; One could bootstrap with an internal untested setuptools.
747 (arguments
748 `(#:tests? #f))
749 (home-page "https://pypi.python.org/pypi/setuptools")
750 (synopsis
751 "Library designed to facilitate packaging Python projects")
752 (description
753 "Setuptools is a fully-featured, stable library designed to facilitate
754packaging Python projects, where packaging includes:
755Python package and module definitions,
756distribution package metadata,
757test hooks,
758project installation,
759platform-specific details,
760Python 3 support.")
761 ;; TODO: setuptools now bundles the following libraries:
762 ;; packaging, pyparsing, six and appdirs. How to unbundle?
763 (license (list license:psfl ; setuptools itself
764 license:expat ; six, appdirs, pyparsing
765 license:asl2.0 ; packaging is dual ASL2/BSD-2
766 license:bsd-2))))
767
768(define-public python2-setuptools
769 (package-with-python2 python-setuptools))
770
0fdec2a3
MB
771;; The setuptools provided by Python 3.7.4 is too new for Tensorflow.
772(define-public python-setuptools-for-tensorflow
773 (hidden-package
774 (package
775 (inherit python-setuptools)
776 (version "39.1.0")
777 (source (origin
778 (inherit (package-source python-setuptools))
779 (uri (pypi-uri "setuptools" version ".zip"))
780 (sha256
781 (base32
782 "1mzdhvfhnv4lggxa8rjl0dzqxvfx377gg5sqs57v89wrp09lwj65")))))))
783
44d10b1f
RW
784(define-public python-uniseg
785 (package
786 (name "python-uniseg")
787 (version "0.7.1")
788 (source
789 (origin
790 (method url-fetch)
791 (uri (pypi-uri "uniseg" version ".zip"))
792 (sha256
793 (base32
794 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
795 (build-system python-build-system)
796 (arguments
797 '(#:tests? #f)) ; The test suite requires network access.
798 (native-inputs
799 `(("unzip" ,unzip)))
800 (home-page
801 "https://bitbucket.org/emptypage/uniseg-python")
802 (synopsis
803 "Python library to determine Unicode text segmentations")
804 (description
805 "Uniseg is a Python package used to determine Unicode text segmentations.
806Supported segmentations include:
807@enumerate
808@item @dfn{Code point} (any value in the Unicode codespace)
809@item @dfn{Grapheme cluster} (user-perceived character made of a single or
810multiple Unicode code points, e.g. \"G\" + acute-accent)
811@item Word break
812@item Sentence break
813@item Line break
814@end enumerate")
815 (license license:expat)))
816
817(define-public python2-uniseg
818 (package-with-python2 python-uniseg))
819
820(define-public python-humanfriendly
821 (package
822 (name "python-humanfriendly")
823 (version "4.4.1")
824 (source
825 (origin
826 (method url-fetch)
827 (uri (pypi-uri "humanfriendly" version))
828 (sha256
829 (base32
830 "0pisgizjql86785jchfjv217g0lsgk114g2lja5j4y3lsc3b9szi"))))
831 (build-system python-build-system)
832 (arguments
833 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
834 #:tests? #f))
835 (propagated-inputs
836 `(("python-monotonic" ,python-monotonic)))
837 (home-page "https://humanfriendly.readthedocs.io")
838 (synopsis "Human-friendly input and output in Python")
839 (description
840 "The functions and classes in @code{humanfriendly} can be used to make
841text interfaces more user-friendly. It includes tools to parse and format
842numbers, file sizes, and timespans, timers for long-running operations, menus
843to allow the user to choose from a list of options, and terminal interaction
844helpers.")
845 (license license:expat)))
846
847(define-public python2-humanfriendly
848 (package-with-python2 python-humanfriendly))
849
850(define-public python-capturer
851 (package
852 (name "python-capturer")
853 (version "2.4")
854 (source
855 (origin
856 (method url-fetch)
857 (uri (pypi-uri "capturer" version))
858 (sha256
859 (base32
860 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
861 (build-system python-build-system)
862 (arguments
863 `(#:tests? #f))
864 (propagated-inputs
865 `(("python-humanfriendly" ,python-humanfriendly)))
866 (home-page "https://capturer.readthedocs.io")
867 (synopsis "Capture stdout and stderr streams of the current process")
868 (description
869 "The capturer package makes it easy to capture the stdout and stderr
870streams of the current process and subprocesses. Output can be relayed
871to the terminal in real time but is also available to the Python program
872for additional processing.")
873 (license license:expat)))
874
875(define-public python2-capturer
876 (package-with-python2 python-capturer))
877
878(define-public python-case
879 (package
880 (name "python-case")
881 (version "1.5.3")
882 (source
883 (origin
884 (method url-fetch)
885 (uri (pypi-uri "case" version))
886 (sha256
887 (base32
888 "1cagg06vfph864s6l5jb0zqliwxh647bki8j6lf4a4qrv40jnhs8"))))
889 (build-system python-build-system)
890 (propagated-inputs
891 `(("python-mock" ,python-mock)
892 ("python-nose" ,python-nose)
893 ("python-six" ,python-six)
894 ("python-unittest2" ,python-unittest2)))
895 (native-inputs
896 `(("python-coverage" ,python-coverage)))
897 (home-page "https://github.com/celery/case")
898 (synopsis "Unittest utilities and convenience methods")
899 (description
900 "The @code{case} package provides utilities on top of unittest, including
901some helpful Python 2 compatibility convenience methods.")
902 (license license:bsd-3)))
903
904(define-public python-verboselogs
905 (package
906 (name "python-verboselogs")
907 (version "1.7")
908 (source
909 (origin
910 (method url-fetch)
911 (uri (pypi-uri "verboselogs" version))
912 (sha256
913 (base32
914 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
915 (build-system python-build-system)
1760c970
MO
916 (arguments
917 `(#:phases
918 (modify-phases %standard-phases
919 (replace 'check
920 (lambda _
921 ;; Do not run pylint plugin test, as astroid is an old
922 ;; unsupported version.
923 (invoke "pytest" "-v" "-k" "not test_pylint_plugin"
924 "verboselogs/tests.py"))))))
44d10b1f
RW
925 (native-inputs
926 `(("python-mock" ,python-mock)
1760c970 927 ("python-pytest" ,python-pytest)))
44d10b1f
RW
928 (home-page "https://verboselogs.readthedocs.io")
929 (synopsis "Verbose logging level for Python's logging module")
930 (description
931 "The @code{verboselogs} package extends Python's @code{logging} module to
932add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
933 (license license:expat)))
934
935(define-public python2-verboselogs
936 (package-with-python2 python-verboselogs))
937
938(define-public python-coloredlogs
939 (package
940 (name "python-coloredlogs")
b2b8a39c 941 (version "10.0")
44d10b1f
RW
942 (source
943 (origin
944 (method url-fetch)
945 (uri (pypi-uri "coloredlogs" version))
946 (sha256
947 (base32
b2b8a39c 948 "0dkw6xp0r1dwgz4s2f58npx5nxfq51wf4l6qkm5ib27slgfs4sdq"))))
44d10b1f
RW
949 (build-system python-build-system)
950 (arguments
951 `(;Tests require some updated modules
952 #:tests? #f))
953 (propagated-inputs
954 `(("python-capturer" ,python-capturer)))
955 (home-page "https://coloredlogs.readthedocs.io")
956 (synopsis "Colored stream handler for Python's logging module")
957 (description
958 "The @code{coloredlogs} package enables colored terminal output for
959Python's logging module. The @code{ColoredFormatter} class inherits from
960@code{logging.Formatter} and uses ANSI escape sequences to render your logging
961messages in color.")
962 (license license:expat)))
963
964(define-public python2-coloredlogs
965 (package-with-python2 python-coloredlogs))
966
af760990
VC
967(define-public python-editorconfig
968 (package
969 (name "python-editorconfig")
970 (version "0.12.2")
971 (source
972 (origin
973 (method url-fetch)
974 (uri (pypi-uri "EditorConfig" version))
975 (sha256
976 (base32
977 "0v55z351p9qkyp3bbspwywwn28sbcknhirngjbj779n3z52z63hv"))))
978 (build-system python-build-system)
979 (home-page "https://editorconfig.org/")
980 (synopsis "EditorConfig bindings for python")
981 (description "The EditorConfig project consists of a file format for
982defining coding styles and a collection of text editor plugins that enable
983editors to read the file format and adhere to defined styles. EditorConfig
984files are easily readable and they work nicely with version control systems.")
985 ;; "fnmatch.py" and "ini.py" are licensed under psfl, the rest is bsd-2.
986 (license (list license:bsd-2 license:psfl))))
987
4caf37b0
MC
988(define-public python-et-xmlfile
989 (package
990 (name "python-et-xmlfile")
991 (version "1.0.1")
992 (source
993 (origin
994 (method url-fetch)
995 (uri (pypi-uri "et_xmlfile" version))
996 (sha256
997 (base32
998 "0nrkhcb6jdrlb6pwkvd4rycw34y3s931hjf409ij9xkjsli9fkb1"))))
999 (build-system python-build-system)
1000 (arguments
1001 `(#:phases (modify-phases %standard-phases
1002 (replace 'check
1003 (lambda _
1004 (invoke "pytest"))))))
1005 (native-inputs
1006 `(("python-pytest" ,python-pytest)
1007 ("python-lxml" ,python-lxml))) ;used for the tests
1008 (home-page "https://bitbucket.org/openpyxl/et_xmlfile")
1009 (synopsis "Low memory implementation of @code{lxml.xmlfile}")
1010 (description "This Python library is based upon the @code{xmlfile} module
1011from @code{lxml}. It aims to provide a low memory, compatible implementation
1012of @code{xmlfile}.")
1013 (license license:expat)))
1014
1015(define-public python2-et-xmlfile
1016 (package-with-python2 python-et-xmlfile))
1017
a042d348
MC
1018(define-public python-openpyxl
1019 (package
1020 (name "python-openpyxl")
441e6d93 1021 (version "2.6.2")
a042d348
MC
1022 (source
1023 (origin
1024 ;; We use the upstream repository, as the tests are not included in the
1025 ;; PyPI releases.
1026 (method hg-fetch)
1027 (uri (hg-reference
1028 (url "https://bitbucket.org/openpyxl/openpyxl")
1029 (changeset version)))
1030 (file-name (string-append name "-" version "-checkout"))
1031 (sha256
441e6d93 1032 (base32 "1qhij6kcvdxqjy4g6193nsv4q7fy8n4fwyd3c2z047idlm6s3j4w"))))
a042d348
MC
1033 (build-system python-build-system)
1034 (arguments
1035 `(#:phases (modify-phases %standard-phases
1036 (replace 'check
1037 (lambda _
1038 (invoke "pytest"))))))
1039 (native-inputs
1040 ;; For the test suite.
1041 `(("python-lxml" ,python-lxml)
1042 ("python-pillow" ,python-pillow)
1043 ("python-pytest" ,python-pytest)))
1044 (propagated-inputs
1045 `(("python-et-xmlfile" ,python-et-xmlfile)
1046 ("python-jdcal" ,python-jdcal)))
1047 (home-page "https://openpyxl.readthedocs.io")
1048 (synopsis "Python library to read/write Excel 2010 XLSX/XLSM files")
1049 (description "This Python library allows reading and writing to the Excel XLSX, XLSM,
1050XLTX and XLTM file formats that are defined by the Office Open XML (OOXML)
1051standard.")
1052 (license license:expat)))
1053
44d10b1f
RW
1054(define-public python-eventlet
1055 (package
1056 (name "python-eventlet")
c9876c9b 1057 (version "0.25.1")
44d10b1f
RW
1058 (source
1059 (origin
1060 (method url-fetch)
1061 (uri (pypi-uri "eventlet" version))
1062 (sha256
1063 (base32
c9876c9b 1064 "1hgz8jq19wlz8vwqj900ry8cjv578nz4scc91mlc8944yid6573c"))))
44d10b1f
RW
1065 (build-system python-build-system)
1066 (propagated-inputs
1067 `(("python-greenlet" ,python-greenlet)))
1068 (arguments
1069 ;; TODO: Requires unpackaged 'enum-compat'.
1070 '(#:tests? #f))
bff36617 1071 (home-page "https://eventlet.net")
44d10b1f
RW
1072 (synopsis "Concurrent networking library for Python")
1073 (description
1074 "Eventlet is a concurrent networking library for Python that
1075allows you to change how you run your code, not how you write it.
1076It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
1077Coroutines ensure that the developer uses a blocking style of programming
1078that is similar to threading, but provide the benefits of non-blocking I/O.
1079The event dispatch is implicit, which means you can easily use @code{Eventlet}
1080from the Python interpreter, or as a small part of a larger application.")
1081 (license license:expat)))
1082
1083(define-public python2-eventlet
1084 (let ((base (package-with-python2
1085 (strip-python2-variant python-eventlet))))
1086 (package (inherit base)
1087 (propagated-inputs
1088 `(("python2-enum34" ,python2-enum34)
1089 ,@(package-propagated-inputs base))))))
1090
1091(define-public python-six
1092 (package
1093 (name "python-six")
6c58a06e 1094 (version "1.12.0")
44d10b1f
RW
1095 (source
1096 (origin
1097 (method url-fetch)
1098 (uri (pypi-uri "six" version))
1099 (sha256
1100 (base32
6c58a06e 1101 "0wxs1q74v07ssjywbbm7x6h5v9qx209ld2yfsif4060sxi0h2sni"))))
44d10b1f
RW
1102 (build-system python-build-system)
1103 (arguments
1104 `(#:phases
1105 (modify-phases %standard-phases
1106 (replace 'check
1107 (lambda _
1108 (invoke "py.test" "-v"))))))
1109 (native-inputs
1110 `(("python-py" ,python-py)
1111 ("python-pytest" ,python-pytest-bootstrap)))
1112 (home-page "https://pypi.python.org/pypi/six/")
1113 (synopsis "Python 2 and 3 compatibility utilities")
1114 (description
1115 "Six is a Python 2 and 3 compatibility library. It provides utility
1116functions for smoothing over the differences between the Python versions with
1117the goal of writing Python code that is compatible on both Python versions.
1118Six supports every Python version since 2.5. It is contained in only one
1119Python file, so it can be easily copied into your project.")
1120 (license license:x11)))
1121
1122(define-public python2-six
1123 (package-with-python2 python-six))
1124
1125(define-public python-six-bootstrap
1126 (package
1127 (inherit python-six)
1128 (name "python-six-bootstrap")
1129 (native-inputs `())
1130 (arguments `(#:tests? #f))))
1131
1132(define-public python2-six-bootstrap
1133 (package-with-python2 python-six-bootstrap))
1134
1135(define-public python-schedule
1136 (package
1137 (name "python-schedule")
1138 (version "0.4.3")
1139 (source
1140 (origin
1141 (method url-fetch)
1142 (uri (pypi-uri "schedule" version))
1143 (sha256
1144 (base32
1145 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
1146 (build-system python-build-system)
1147 (native-inputs
1148 `(("python-pytest" ,python-pytest)
1149 ("python-mock" ,python-mock)))
1150 (home-page "https://github.com/dbader/schedule")
1151 (synopsis "Schedule periodic function calls in Python")
1152 (description
1153 "Schedule is an in-process scheduler for periodic jobs that uses the
1154builder pattern for configuration. Schedule lets you run Python functions (or
1155any other callable) periodically at pre-determined intervals using a simple,
1156human-friendly syntax.")
1157 (license license:expat)))
1158
1159(define-public python2-schedule
1160 (package-with-python2 python-schedule))
1161
44d10b1f
RW
1162(define-public python2-mechanize
1163 (package
1164 (name "python2-mechanize")
1165 (version "0.2.5")
1166 (source
1167 (origin
1168 (method url-fetch)
1cc184e6 1169 (uri (pypi-uri "mechanize" version))
44d10b1f
RW
1170 (sha256
1171 (base32
1172 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1173 (build-system python-build-system)
1174 (arguments
1175 `(#:python ,python-2 ; apparently incompatible with Python 3
1176 #:tests? #f))
1177 ;; test fails with message
1178 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1179 ;; (python-3.3.2) or
1180 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1181 ;; (python-2.7.5).
1182 ;; The source code is from March 2011 and probably not up-to-date
1183 ;; with respect to python unit tests.
1184 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1185 (synopsis
1186 "Stateful programmatic web browsing in Python")
1187 (description
1188 "Mechanize implements stateful programmatic web browsing in Python,
1189after Andy Lester’s Perl module WWW::Mechanize.")
1190 (license (license:non-copyleft
1191 "file://COPYING"
1192 "See COPYING in the distribution."))))
1193
1194
1195(define-public python-simplejson
1196 (package
1197 (name "python-simplejson")
1198 (version "3.14.0")
1199 (source
1200 (origin
1201 (method url-fetch)
1202 (uri (pypi-uri "simplejson" version))
1203 (sha256
1204 (base32
1205 "1lkv3xlf7ryzi69zqfdbkvpxdfy1rg1rq2yzcnxgf4km5m6difqy"))))
1206 (build-system python-build-system)
1207 (home-page "http://simplejson.readthedocs.org/en/latest/")
1208 (synopsis
1209 "Json library for Python")
1210 (description
1211 "JSON (JavaScript Object Notation) is a subset of JavaScript
1212syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1213format.
1214
1215Simplejson exposes an API familiar to users of the standard library marshal
1216and pickle modules. It is the externally maintained version of the json
1217library contained in Python 2.6, but maintains compatibility with Python 2.5
1218and (currently) has significant performance advantages, even without using
1219the optional C extension for speedups. Simplejson is also supported on
1220Python 3.3+.")
1221 (license license:x11)))
1222
1223(define-public python2-simplejson
1224 (package-with-python2 python-simplejson))
1225
1226
1227(define-public python-pyicu
1228 (package
1229 (name "python-pyicu")
dc23bb45 1230 (version "2.3.1")
44d10b1f
RW
1231 (source
1232 (origin
1233 (method url-fetch)
1234 (uri (pypi-uri "PyICU" version))
1235 (sha256
1236 (base32
dc23bb45 1237 "1x4w8m7ifki9z2a187pgjr33z6z0rp2fii9b73djak1vhm9v9cnx"))))
44d10b1f
RW
1238 (build-system python-build-system)
1239 (inputs
1240 `(("icu4c" ,icu4c)))
1241 (native-inputs
1242 `(("python-pytest" ,python-pytest)
1243 ("python-six" ,python-six)))
1244 (home-page "https://github.com/ovalhub/pyicu")
1245 (synopsis "Python extension wrapping the ICU C++ API")
1246 (description
1247 "PyICU is a python extension wrapping the ICU C++ API.")
1248 (properties `((python2-variant . ,(delay python2-pyicu))))
1249 (license license:x11)))
1250
1251(define-public python2-pyicu
1252 (let ((base (package-with-python2
1253 (strip-python2-variant python-pyicu))))
1254 (package
1255 (inherit base)
1256 (arguments
1257 `(,@(package-arguments base)
1258 #:phases
1259 (modify-phases %standard-phases
1260 (add-before 'check 'delete-failing-test
1261 (λ _
1262 ;; XXX: This fails due to Unicode issues unique to Python 2,
1263 ;; it seems: <https://github.com/ovalhub/pyicu/issues/61>.
1264 (delete-file "test/test_Script.py")
1265 #t))))))))
1266
1267(define-public python2-dogtail
1268 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1269 ;; spaces in indentation" with Python 3.
1270 (package
1271 (name "python2-dogtail")
1272 (version "0.9.9")
1273 (source (origin
1274 (method url-fetch)
1275 (uri (pypi-uri "dogtail" version))
1276 (sha256
1277 (base32
1278 "0p5wfssvzr9w0bvhllzbbd8fnp4cca2qxcpcsc33dchrmh5n552x"))))
1279 (build-system python-build-system)
1280 (arguments `(#:python ,python-2
1281 #:tests? #f)) ; invalid command "test"
1282 ;; Currently no offical homepage.
1283 (home-page "https://pypi.python.org/pypi/dogtail/")
1284 (synopsis "GUI test tool and automation framework written in Python")
1285 (description
1286 "Dogtail is a GUI test tool and automation framework written in Python.
1287It uses Accessibility (a11y) technologies to communicate with desktop
1288applications. dogtail scripts are written in Python and executed like any
1289other Python program.")
1290 (license license:gpl2+)))
1291
1292(define-public python-empy
1293 (package
1294 (name "python-empy")
0f6d5115 1295 (version "3.3.3")
44d10b1f
RW
1296 (source (origin
1297 (method url-fetch)
1298 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1299 version ".tar.gz"))
1300 (sha256
1301 (base32
0f6d5115 1302 "1mxfy5mgp473ga1pgz2nvm8ds6z4g3hdky8523z6jzvcs9ny6hcq"))))
44d10b1f
RW
1303 (build-system python-build-system)
1304 (arguments
0f6d5115 1305 `(#:tests? #f)) ; python2 only
44d10b1f
RW
1306 (home-page "http://www.alcyone.com/software/empy/")
1307 (synopsis "Templating system for Python")
1308 (description
1309 "EmPy is a system for embedding Python expressions and statements in
1310template text; it takes an EmPy source file, processes it, and produces
1311output. This is accomplished via expansions, which are special signals to the
1312EmPy system and are set off by a special prefix (by default the at sign, @@).
1313EmPy can expand arbitrary Python expressions and statements in this way, as
1314well as a variety of special forms. Textual data not explicitly delimited in
1315this way is sent unaffected to the output, allowing Python to be used in
1316effect as a markup language. Also supported are callbacks via hooks,
1317recording and playback via diversions, and dynamic, chainable filters. The
1318system is highly configurable via command line options and embedded
1319commands.")
1320 (license license:lgpl2.1+)))
1321
1322(define-public python2-empy
0f064242
TGR
1323 (let ((base (package-with-python2 (strip-python2-variant python-empy))))
1324 (package
1325 (inherit base)
1326 (arguments `(,@(package-arguments base)
1327 #:tests? #t)))))
44d10b1f
RW
1328
1329(define-public python2-element-tree
1330 (package
1331 (name "python2-element-tree")
1332 (version "1.2.6")
1333 (source (origin
1334 (method url-fetch)
1335 (uri (string-append
1336 "http://effbot.org/media/downloads/elementtree-"
1337 version "-20050316.tar.gz"))
1338 (sha256
1339 (base32
1340 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1341 (build-system python-build-system)
1342 (arguments
1343 `(#:python ,python-2 ; seems to be part of Python 3
1344 #:tests? #f)) ; no 'test' sub-command
1345 (synopsis "Toolkit for XML processing in Python")
1346 (description
1347 "ElementTree is a Python library supporting lightweight XML processing.")
1348 (home-page "http://effbot.org/zone/element-index.htm")
1349 (license (license:x11-style
1350 "http://docs.python.org/2/license.html"
1351 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1352
1353(define-public python2-pybugz
1354 (package
1355 (name "python2-pybugz")
1356 (version "0.6.11")
1357 (source (origin
1358 (method url-fetch)
1359 (uri (string-append
1360 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1361 version ".tar.gz"))
1362 (sha256
1363 (base32
1364 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1365 (patches (search-patches "pybugz-stty.patch"
1366 "pybugz-encode-error.patch"))))
1367 (build-system python-build-system)
1368 (arguments
1369 `(#:python ,python-2 ; SyntaxError with Python 3
1370 #:tests? #f)) ; no 'test' sub-command
1371 (propagated-inputs
1372 `(("element-tree" ,python2-element-tree)))
1373 (synopsis "Python and command-line interface to Bugzilla")
1374 (description
1375 "PyBugz is a Python library and command-line tool to query the Bugzilla
1376bug tracking system. It is meant as an aid to speed up interaction with the
1377bug tracker.")
1378 (home-page "http://www.liquidx.net/pybugz/")
1379 (license license:gpl2)))
1380
1381(define-public python2-enum
1382 (package
1383 (name "python2-enum")
1384 (version "0.4.6")
1385 (source (origin
1386 (method url-fetch)
1387 (uri (pypi-uri "enum" version))
1388 (sha256
1389 (base32
1390 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
1391 (build-system python-build-system)
1392 (arguments
1393 `(#:python ,python-2))
1394 (home-page "http://pypi.python.org/pypi/enum/")
1395 (synopsis "Robust enumerated type support in Python")
1396 (description
1397 "This provides a module for robust enumerations in Python. It has
1398been superseded by the Python standard library and is provided only for
1399compatibility.")
1400 ;; Choice of either license.
1401 (license (list license:gpl3+ license:psfl))))
1402
1403(define-public python-enum34
1404 (package
1405 (name "python-enum34")
1406 (version "1.1.6")
1407 (source
1408 (origin
1409 (method url-fetch)
1410 (uri (pypi-uri "enum34" version))
1411 (sha256
1412 (base32
1413 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
1414 (build-system python-build-system)
1415 (home-page "https://pypi.python.org/pypi/enum34")
1416 (synopsis "Backported Python 3.4 Enum")
1417 (description
1418 "Enum34 is the new Python stdlib enum module available in Python 3.4
1419backported for previous versions of Python from 2.4 to 3.3.")
1420 (license license:bsd-3)))
1421
1422(define-public python2-enum34
1423 (package-with-python2 python-enum34))
1424
1425(define-public python-parse-type
1426 (package
1427 (name "python-parse-type")
1428 (version "0.4.2")
1429 (source
1430 (origin
1431 (method url-fetch)
1432 (uri (pypi-uri "parse_type" version))
1433 (sha256
1434 (base32
1435 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
1436 (build-system python-build-system)
1437 (propagated-inputs
1438 `(("python-six" ,python-six)
1439 ("python-parse" ,python-parse)))
1440 (native-inputs
1441 `(("python-pytest" ,python-pytest)
1442 ("python-pytest-runner" ,python-pytest-runner)))
1443 (home-page "https://github.com/jenisys/parse_type")
1444 (synopsis "Extended parse module")
1445 (description
1446 "Parse_type extends the python parse module.")
1447 (properties
1448 `((python2-variant . ,(delay python2-parse-type))))
1449 (license license:bsd-3)))
1450
1451(define-public python2-parse-type
1452 (let ((base (package-with-python2
1453 (strip-python2-variant python-parse-type))))
1454 (package (inherit base)
1455 (propagated-inputs
1456 `(("python2-enum34" ,python2-enum34)
1457 ,@(package-propagated-inputs base))))))
1458
1459(define-public python-parse
1460 (package
1461 (name "python-parse")
1462 (version "1.8.4")
1463 (source
1464 (origin
1465 (method url-fetch)
1466 (uri (pypi-uri "parse" version))
1467 (sha256
1468 (base32
1469 "0f8997xr8nq2nq35iiviq8ningd1zvy59fg503xfpbi2dwhgdkf3"))))
1470 (build-system python-build-system)
1471 (arguments
1472 `(#:phases
1473 (modify-phases %standard-phases
1474 (replace 'check
1475 (lambda _ (invoke "python" "test_parse.py"))))))
1476 (home-page "https://github.com/r1chardj0n3s/parse")
1477 (synopsis "Parse strings")
1478 (description
1479 "Parse strings using a specification based on the Python @code{format()}
1480syntax.")
1481 (license license:x11)))
1482
1483(define-public python-polib
1484 (package
1485 (name "python-polib")
1486 (version "1.0.8")
1487 (source (origin
1488 (method url-fetch)
1489 (uri (pypi-uri "polib" version))
1490 (sha256
1491 (base32
1492 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1493 (build-system python-build-system)
1494 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1495 (synopsis "Manipulate, create and modify gettext files")
1496 (description "Polib can manipulate any gettext format (po, pot and mo)
1497files. It can be used to create po files from scratch or to modify
1498existing ones.")
1499 (license license:expat)))
1500
1501(define-public python2-polib
1502 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1503 (package
1504 (inherit base)
1505 (arguments `(,@(package-arguments base)
1506 ;; Tests don't work with python2.
1507 #:tests? #f)))))
1508
6830120e
TLC
1509(define-public python-poyo
1510 (package
1511 (name "python-poyo")
1512 (version "0.5.0")
1513 (source
1514 (origin
1515 (method url-fetch)
1516 (uri (pypi-uri "poyo" version))
1517 (sha256
1518 (base32
1519 "1pflivs6j22frz0v3dqxnvc8yb8fb52g11lqr88z0i8cg2m5csg2"))))
1520 (build-system python-build-system)
1521 (home-page "https://github.com/hackebrot/poyo")
1522 (synopsis "Lightweight YAML Parser for Python")
1523 (description
1524 "This package provides a lightweight YAML Parser for Python. It supports
1525only a chosen subset of the YAML format that is required to parse cookiecutter
1526user configuration files. It does not have support for serializing into YAML
1527and is not compatible with JSON.")
1528 (license license:expat)))
1529
44d10b1f
RW
1530(define-public scons
1531 (package
1532 (name "scons")
05487ed8 1533 (version "3.0.4")
44d10b1f 1534 (source (origin
ad34338d
RW
1535 (method git-fetch)
1536 (uri (git-reference
1537 (url "https://github.com/SCons/scons.git")
1538 (commit version)))
1539 (file-name (git-file-name name version))
44d10b1f
RW
1540 (sha256
1541 (base32
05487ed8 1542 "1xy8jrwz87y589ihcld4hv7wn122sjbz914xn8h50ww77wbhk8hn"))))
44d10b1f
RW
1543 (build-system python-build-system)
1544 (arguments
1545 `(#:use-setuptools? #f ; still relies on distutils
ad34338d
RW
1546 #:tests? #f ; no 'python setup.py test' command
1547 #:phases
1548 (modify-phases %standard-phases
1549 (add-before 'build 'bootstrap
1550 (lambda _
1551 (substitute* "src/engine/SCons/compat/__init__.py"
1552 (("sys.modules\\[new\\] = imp.load_module\\(old, \\*imp.find_module\\(old\\)\\)")
1553 "sys.modules[new] = __import__(old)"))
05487ed8
RW
1554 (substitute* "src/engine/SCons/Platform/__init__.py"
1555 (("mod = imp.load_module\\(full_name, file, path, desc\\)")
1556 "mod = __import__(full_name)"))
ad34338d
RW
1557 (invoke "python" "bootstrap.py" "build/scons" "DEVELOPER=guix")
1558 (chdir "build/scons")
1559 #t)))))
44d10b1f
RW
1560 (home-page "http://scons.org/")
1561 (synopsis "Software construction tool written in Python")
1562 (description
1563 "SCons is a software construction tool. Think of SCons as an improved,
1564cross-platform substitute for the classic Make utility with integrated
1565functionality similar to autoconf/automake and compiler caches such as ccache.
1566In short, SCons is an easier, more reliable and faster way to build
1567software.")
1568 (license license:x11)))
1569
1570(define-public scons-python2
1571 (package
1572 (inherit (package-with-python2 scons))
1573 (name "scons-python2")))
1574
1575(define-public python-extras
1576 (package
1577 (name "python-extras")
1578 (version "1.0.0")
1579 (source
1580 (origin
1581 (method url-fetch)
1582 (uri (pypi-uri "extras" version))
1583 (sha256
1584 (base32
1585 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
1586 (build-system python-build-system)
1587 (arguments
1588 ;; FIXME: Circular dependency on testtools.
1589 '(#:tests? #f))
1590 (home-page "https://github.com/testing-cabal/extras")
1591 (synopsis "Useful extensions to the Python standard library")
1592 (description
1593 "Extras is a set of extensions to the Python standard library.")
1594 (license license:expat)))
1595
1596(define-public python2-extras
1597 (package-with-python2 python-extras))
1598
1599(define-public python-mimeparse
1600 (package
1601 (name "python-mimeparse")
1602 (version "1.6.0")
1603 (source
1604 (origin
1605 (method url-fetch)
89bf667c 1606 (uri (pypi-uri "python-mimeparse" version))
44d10b1f
RW
1607 (sha256
1608 (base32
1609 "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n"))))
1610 (build-system python-build-system)
1611 (arguments
1612 '(#:phases
1613 (modify-phases %standard-phases
1614 (replace 'check
1615 (lambda _
1616 (invoke "./mimeparse_test.py"))))))
1617 (home-page
1618 "https://github.com/dbtsai/python-mimeparse")
1619 (synopsis "Python library for parsing MIME types")
1620 (description
1621 "Mimeparse provides basic functions for parsing MIME type names and
1622matching them against a list of media-ranges.")
1623 (license license:expat)))
1624
1625(define-public python2-mimeparse
1626 (package-with-python2 python-mimeparse))
1627
1628(define-public python-miniboa
1629 (package
1630 (name "python-miniboa")
1631 (version "1.0.7")
1632 (source
1633 (origin
1634 (method url-fetch)
1635 (uri (pypi-uri "miniboa" version))
1636 (sha256
1637 (base32
1638 "09jh3pn4rh7kh7jayanf8jzy6gp03791b5a193w6148cf3i6k9m3"))))
1639 (build-system python-build-system)
1640 (home-page "https://github.com/shmup/miniboa")
1641 (synopsis "Simple, single-threaded Telnet server")
1642 (description
1643 "Miniboa is a simple, asynchronous, single-threaded, poll-based Telnet
1644server.")
1645 (license license:asl2.0)))
1646
1647(define-public python2-miniboa
1648 (package-with-python2 python-miniboa))
1649
1650(define-public python-pafy
1651 (package
1652 (name "python-pafy")
1653 (version "0.5.3.1")
1654 (source
1655 (origin
1656 (method url-fetch)
1657 (uri (pypi-uri "pafy" version))
1658 (sha256
1659 (base32
1660 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
1661 (build-system python-build-system)
1662 (arguments
1663 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
1664 (propagated-inputs
1665 ;; Youtube-dl is a python package which is imported in the file
1666 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1667 `(("youtube-dl" ,youtube-dl)))
1668 (home-page "https://np1.github.io/pafy/")
1669 (synopsis "Retrieve YouTube content and metadata")
1670 (description
1671 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1672 (license license:lgpl3+)))
1673
1674(define-public python2-funcsigs
1675 (package
1676 (name "python2-funcsigs")
1677 (version "1.0.2")
1678 (source (origin
1679 (method url-fetch)
1680 (uri (pypi-uri "funcsigs" version))
1681 (sha256
1682 (base32
1683 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
1684 (build-system python-build-system)
1685 (arguments
1686 `(#:python ,python-2))
1687 (native-inputs
1688 `(("python2-unittest2" ,python2-unittest2)))
1689 (home-page "http://funcsigs.readthedocs.org")
1690 (synopsis "Python function signatures from PEP362")
1691 (description
1692 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
1693 (license license:asl2.0)))
1694
1695(define-public python2-funcsigs-bootstrap
1696 (package
1697 (inherit python2-funcsigs)
1698 (name "python2-funcsigs-bootstrap")
1699 (native-inputs `())
1700 (arguments
1701 `(#:tests? #f
1702 ,@(package-arguments python2-funcsigs)))))
1703
1704(define-public python-py
1705 (package
1706 (name "python-py")
08eba545 1707 (version "1.8.0")
44d10b1f
RW
1708 (source
1709 (origin
1710 (method url-fetch)
1711 (uri (pypi-uri "py" version))
1712 (sha256
1713 (base32
08eba545 1714 "0lsy1gajva083pzc7csj1cvbmminb7b4l6a0prdzyb3fd829nqyw"))))
44d10b1f
RW
1715 (build-system python-build-system)
1716 (arguments
1717 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1718 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1719 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1720 ;; Is this module globally installed?"
1721 '(#:tests? #f))
1722 (native-inputs
1723 `(("python-setuptools-scm" ,python-setuptools-scm)))
1724 (home-page "https://github.com/pytest-dev/py")
1725 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1726 (description
1727 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1728code introspection, and logging.")
1729 (license license:expat)))
1730
1731(define-public python2-py
1732 (package-with-python2 python-py))
1733
1734;; Recent versions of python-fixtures and python-testrepository need
1735;; python-pbr for packaging, which itself needs these two packages for
1736;; testing.
1737;; To fix this circular dependency, we use a build of python-pbr, based on the
1738;; same source, just without any test dependencies and with tests disabled.
1739;; python-pbr-minmal is then used to package python-fixtures and
1740;; python-testrepository.
1741;; Strictly speaking we currently could remove the test-requirements from the
1742;; normal python-pbr package (and save this package) since test are disabled
1743;; there anyway. But this may change in future.
1744(define-public python-pbr-minimal
1745 (package
1746 (name "python-pbr-minimal")
1747 (version "3.0.1")
1748 (source
1749 (origin
1750 (method url-fetch)
1751 (uri (pypi-uri "pbr" version))
1752 (sha256
1753 (base32
1754 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
1755 (build-system python-build-system)
1756 (arguments
1757 `(#:tests? #f))
1758 (home-page "http://docs.openstack.org/developer/pbr/")
1759 (synopsis "Minimal build of python-pbr used for bootstrapping")
1760 (description
1761 "Used only for bootstrapping python2-pbr, you should not need this.")
1762 (license license:asl2.0)))
1763
1764(define-public python2-pbr-minimal
1765 (package-with-python2 python-pbr-minimal))
1766
1767(define-public python-pbr
1768 (package
1769 (inherit python-pbr-minimal)
1770 (name "python-pbr")
1771 (arguments
1772 `(#:tests? #f)) ;; Most tests seem to use the Internet.
1773 (propagated-inputs
1774 `(("git" ,git))) ;; pbr actually uses the "git" binary.
1775 (native-inputs
1776 `(("python-fixtures" ,python-fixtures-bootstrap)
1777 ;; discover, coverage, hacking, subunit
1778 ("python-mock" ,python-mock)
1779 ("python-six" ,python-six)
1780 ("python-sphinx" ,python-sphinx)
1781 ("python-testrepository" ,python-testrepository-bootstrap)
1782 ("python-testresources" ,python-testresources-bootstrap)
1783 ("python-testscenarios" ,python-testscenarios-bootstrap)
1784 ("python-testtools" ,python-testtools-bootstrap)
1785 ("python-virtualenv" ,python-virtualenv)))
1786 (synopsis "Enhance the default behavior of Python’s setuptools")
1787 (description
1788 "Python Build Reasonableness (PBR) is a library that injects some useful
1789and sensible default behaviors into your setuptools run. It will set
1790versions, process requirements files and generate AUTHORS and ChangeLog file
1791from git information.
1792")))
1793
1794(define-public python2-pbr
1795 (package-with-python2 python-pbr))
1796
ea43f0d5
MB
1797(define-public python-pyrsistent
1798 (package
1799 (name "python-pyrsistent")
1800 (version "0.14.11")
1801 (home-page "https://github.com/tobgu/pyrsistent")
1802 (source (origin
1803 (method url-fetch)
1804 (uri (pypi-uri "pyrsistent" version))
1805 (sha256
1806 (base32
1807 "1qkh74bm296mp5g3r11lgsksr6bh4w1bf8pji4nmxdlfj542ga1w"))))
1808 (build-system python-build-system)
1809 (native-inputs
1810 `(("python-hypothesis" ,python-hypothesis)
1811 ("python-pytest" ,python-pytest)
1812 ("python-pytest-runner" ,python-pytest-runner)))
1813 (propagated-inputs
1814 `(("python-six" ,python-six)))
1815 (synopsis "Persistent data structures for Python")
1816 (description
1817 "Pyrsistent is a number of persistent collections (by some referred to as
1818functional data structures). Persistent in the sense that they are immutable.
1819
1820All methods on a data structure that would normally mutate it instead return a
1821new copy of the structure containing the requested updates. The original
1822structure is left untouched.")
1823 (license license:expat)))
1824
1825(define-public python2-pyrsistent
1826 (package-with-python2 python-pyrsistent))
1827
44d10b1f
RW
1828(define-public python-exif-read
1829 (package
1830 (name "python-exif-read")
1831 (version "2.1.2")
1832 (source (origin
1833 (method url-fetch)
1834 (uri (pypi-uri "ExifRead" version))
1835 (sha256
1836 (base32
1837 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
1838 (build-system python-build-system)
1839 (arguments `(#:tests? #f)) ; no tests
1840 (home-page "https://github.com/ianare/exif-py")
1841 (synopsis "Python library to extract EXIF data from image files")
1842 (description
1843 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
1844files.")
1845 (license license:bsd-3)))
1846
1847(define-public python2-exif-read
1848 (package-with-python2 python-exif-read))
1849
1850(define-public python-pyld
1851 (package
1852 (name "python-pyld")
6d4ed78d 1853 (version "1.0.5")
44d10b1f
RW
1854 (source (origin
1855 (method url-fetch)
1856 (uri (pypi-uri "PyLD" version))
1857 (sha256
1858 (base32
6d4ed78d 1859 "1ywbdbsrkg533qh8xn9ifjh2mvam6v5msrjyqq73jfpvcp89qvff"))))
44d10b1f
RW
1860 (build-system python-build-system)
1861 (home-page "https://github.com/digitalbazaar/pyld")
1862 (synopsis "Python implementation of the JSON-LD specification")
1863 (description
1864 "PyLD is an implementation of the JSON-LD specification.")
1865 (license license:bsd-3)))
1866
1867(define-public python2-pyld
1868 (package-with-python2 python-pyld))
1869
1870(define-public python-click
1871 (package
1872 (name "python-click")
61984855 1873 (version "7.0")
44d10b1f
RW
1874 (source
1875 (origin
1876 (method url-fetch)
1877 (uri (pypi-uri "click" version))
1878 (sha256
1879 (base32
61984855 1880 "1mzjixd4vjbjvzb6vylki9w1556a9qmdh35kzmq6cign46av952v"))))
44d10b1f
RW
1881 (build-system python-build-system)
1882 (arguments
8d7e7ca6 1883 `(#:phases
44d10b1f
RW
1884 (modify-phases %standard-phases
1885 (add-after 'unpack 'fix-paths
1886 (lambda* (#:key inputs #:allow-other-keys)
1887 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
1888 "cross-libc" "libc"))))
1889 (substitute* "click/_unicodefun.py"
1890 (("'locale'")
1891 (string-append "'" glibc "/bin/locale'"))))
8d7e7ca6
EF
1892 #t))
1893 (replace 'check
1894 (lambda _
1895 (invoke "python" "-m" "pytest"))))))
44d10b1f
RW
1896 (native-inputs
1897 `(("python-pytest" ,python-pytest)))
61984855 1898 (home-page "https://palletsprojects.com/p/click/")
44d10b1f
RW
1899 (synopsis "Command line library for Python")
1900 (description
1901 "Click is a Python package for creating command line interfaces in a
1902composable way with as little code as necessary. Its name stands for
1903\"Command Line Interface Creation Kit\". It's highly configurable but comes
1904with sensible defaults out of the box.")
1905 (license license:bsd-3)))
1906
1907(define-public python2-click
1908 (package-with-python2 python-click))
1909
1910(define-public python-wheel
1911 (package
1912 (name "python-wheel")
8f137daf 1913 (version "0.33.6")
44d10b1f
RW
1914 (source
1915 (origin
1916 (method url-fetch)
1917 (uri (pypi-uri "wheel" version))
1918 (sha256
1919 (base32
8f137daf 1920 "0ii6f34rvpjg3nmw4bc2h7fhdsy38y1h93hghncfs5akfrldmj8h"))))
44d10b1f 1921 (build-system python-build-system)
8f137daf
MB
1922 (arguments
1923 ;; FIXME: The test suite runs "python setup.py bdist_wheel", which in turn
1924 ;; fails to find the newly-built bdist_wheel library, even though it is
1925 ;; available on PYTHONPATH. What search path is consulted by setup.py?
1926 '(#:tests? #f))
44d10b1f
RW
1927 (home-page "https://bitbucket.org/pypa/wheel/")
1928 (synopsis "Format for built Python packages")
1929 (description
1930 "A wheel is a ZIP-format archive with a specially formatted filename and
1931the @code{.whl} extension. It is designed to contain all the files for a PEP
1932376 compatible install in a way that is very close to the on-disk format. Many
1933packages will be properly installed with only the @code{Unpack} step and the
1934unpacked archive preserves enough information to @code{Spread} (copy data and
1935scripts to their final locations) at any later time. Wheel files can be
1936installed with a newer @code{pip} or with wheel's own command line utility.")
8f137daf 1937 (license license:expat)))
44d10b1f
RW
1938
1939(define-public python2-wheel
8f137daf 1940 (package-with-python2 python-wheel))
44d10b1f
RW
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
544ea9c2
MB
2588(define-public python-anytree
2589 (package
2590 (name "python-anytree")
2591 (version "2.8.0")
2592 (source (origin
2593 (method url-fetch)
2594 (uri (pypi-uri "anytree" version))
2595 (sha256
2596 (base32
2597 "1aycpc387wqz7h9w2p53qxn43qsh3m6by6ak4kkc66x9aprr63rz"))))
2598 (build-system python-build-system)
2599 (propagated-inputs
2600 `(("python-six" ,python-six)))
2601 (native-inputs
2602 `(;; For tests.
2603 ("graphviz" ,graphviz) ;for 'dot'
2604 ("python-nose" ,python-nose)))
2605 (home-page "https://github.com/c0fec0de/anytree")
2606 (synopsis "Lightweight tree data library")
2607 (description
2608 "@code{anytree} is a simple, lightweight, and extensible tree data
2609structure for Python.")
2610 (license license:asl2.0)))
2611
44d10b1f
RW
2612(define-public python-docutils
2613 (package
2614 (name "python-docutils")
2615 (version "0.14")
2616 (source
2617 (origin
2618 (method url-fetch)
2619 (uri (pypi-uri "docutils" version))
2620 (sha256
2621 (base32
2622 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))
2623 (build-system python-build-system)
2624 (arguments
2625 '(#:tests? #f)) ; no setup.py test command
2626 (home-page "http://docutils.sourceforge.net/")
2627 (synopsis "Python Documentation Utilities")
2628 (description
2629 "Docutils is a modular system for processing documentation into useful
2630formats, such as HTML, XML, and LaTeX. For input Docutils supports
2631reStructuredText.")
2632 ;; Most of the source code is public domain, but some source files are
2633 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
2634 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
2635
2636(define-public python2-docutils
2637 (package-with-python2 python-docutils))
2638
2639(define-public python-pygments
2640 (package
2641 (name "python-pygments")
2daded5a 2642 (version "2.5.2")
44d10b1f
RW
2643 (source
2644 (origin
2645 (method url-fetch)
2646 (uri (pypi-uri "Pygments" version))
2647 (sha256
2648 (base32
2daded5a 2649 "1zmhnswy0wxfn0xprs9aqsvx2c3kmzfn2wx14q8cv3vpkxdamj4q"))))
44d10b1f
RW
2650 (build-system python-build-system)
2651 (arguments
2652 ;; FIXME: Tests require sphinx, which depends on this.
2653 '(#:tests? #f))
2654 (home-page "http://pygments.org/")
2655 (synopsis "Syntax highlighting")
2656 (description
2657 "Pygments is a syntax highlighting package written in Python.")
2658 (license license:bsd-2)))
2659
2660(define-public python2-pygments
2661 (package-with-python2 python-pygments))
2662
0f0a5ef9
MC
2663(define-public python-bumpversion
2664 (package
2665 (name "python-bumpversion")
2666 (version "0.5.3")
2667 (source
2668 (origin
2669 (method url-fetch)
2670 (uri (pypi-uri "bumpversion" version))
2671 (sha256
2672 (base32
2673 "0zn7694yfipxg35ikkfh7kvgl2fissha3dnqad2c5bvsvmrwhi37"))))
2674 (build-system python-build-system)
2675 (home-page "https://github.com/peritus/bumpversion")
2676 (synopsis "Tool to bump software version")
2677 (description "This tool provides a command-line interface (CLI) to bump a
2678software version simply.")
2679 (license license:expat)))
2680
b24fd2c2
MC
2681(define-public python-deprecated
2682 (package
2683 (name "python-deprecated")
2684 (version "1.2.5")
2685 (source
2686 (origin
2687 (method git-fetch)
2688 (uri (git-reference
2689 (url "https://github.com/tantale/deprecated.git")
2690 (commit (string-append "v" version))))
2691 (file-name (git-file-name name version))
2692 (sha256
2693 (base32
2694 "14909glxxwwc4b9qpz2b9jdriwzi5n65ichw85xqppap5f79wcwz"))))
2695 (build-system python-build-system)
2696 (arguments
2697 `(#:phases (modify-phases %standard-phases
2698 (replace 'check
2699 (lambda _
2700 (invoke "pytest"))))))
2701 (propagated-inputs
2702 `(("python-wrapt" ,python-wrapt)))
2703 (native-inputs
2704 `(("python-bumpversion" ,python-bumpversion)
2705 ("python-pytest" ,python-pytest)
2706 ("python-pytest-cov" ,python-pytest-cov)
2707 ("python-sphinx" ,python-sphinx)
2708 ("python-tox" ,python-tox)))
2709 (home-page "https://github.com/tantale/deprecated")
2710 (synopsis "Python decorator to deprecate classes, functions or methods")
2711 (description "The @code{deprecated} decorator provides a convenient way to deprecate
2712to deprecate classes, functions or methods.")
2713 (license license:expat)))
2714
d5a998fa
MC
2715(define-public python-pygithub
2716 (package
2717 (name "python-pygithub")
749e38d7 2718 (version "1.43.8")
d5a998fa
MC
2719 (source
2720 ;; We fetch from the Git repo because there are no tests in the PyPI
2721 ;; archive.
2722 (origin
2723 (method git-fetch)
2724 (uri (git-reference
2725 (url "https://github.com/PyGithub/PyGithub.git")
2726 (commit (string-append "v" version))))
2727 (file-name (git-file-name name version))
2728 (sha256
749e38d7 2729 (base32 "1625v558xga5mwhl9jqmibywy5qafmg1vqrirqz6zfq1la1d22mw"))))
d5a998fa
MC
2730 (build-system python-build-system)
2731 (arguments
2732 `(#:phases (modify-phases %standard-phases
2733 ;; Some tests rely on the network.
2734 (add-after 'unpack 'disable-failing-tests
2735 (lambda _
2736 (substitute* "tests/Issue142.py"
2737 (("testDecodeJson") "disabled_testDecodeJson"))
2738 #t))
2739 (add-before 'check 'prepare-for-tests
2740 (lambda _
2741 (for-each (lambda (f)
2742 (chmod f #o666))
2743 (find-files "./tests"))
2744 (system* "python" "-m" "lib2to3" "-w" "-n" "tests")
2745 (setenv "PYTHONPATH"
2746 (string-append "./tests:" (getenv "PYTHONPATH")))
2747 #t)))))
2748 (propagated-inputs
2749 `(("python-deprecated" ,python-deprecated)
2750 ("python-pyjwt" ,python-pyjwt)
2751 ("python-requests" ,python-requests)))
2752 (native-inputs `(("python-httpretty" ,python-httpretty)))
2753 (home-page "https://pygithub.readthedocs.io/en/latest/")
2754 (synopsis "Python library for the GitHub API")
2755 (description "This library allows managing GitHub resources such as
2756repositories, user profiles, and organizations in your Python applications,
2757using version 3 of the GitHub application programming interface (API).")
2758 (license license:lgpl3+)))
2759
c0c0bb38
MC
2760(define-public python-rellu
2761 (package
2762 (name "python-rellu")
2763 (version "0.7")
2764 (source
2765 (origin
2766 (method url-fetch)
2767 (uri (pypi-uri "rellu" version))
2768 (sha256
2769 (base32
2770 "1w0arpj1sm7vh29nrbnca4pnp8sx42l07r17inwqcjjf9bhng66x"))))
2771 (build-system python-build-system)
2772 (propagated-inputs
2773 `(("python-invoke" ,python-invoke)
2774 ("python-pygithub" ,python-pygithub)))
2775 (home-page "https://github.com/robotframework/rellu")
2776 (synopsis "Utilities to create PyPI releases")
2777 (description "This collection of utilities contains tooling and templates
2778to assist in creating releases on GitHub and publishing them on PyPI. It is
2779designed to be used by Robot Framework and tools and libraries in its
2780ecosystem, but can naturally be used also by other projects.")
2781 (license license:asl2.0)))
2782
b9790285
MC
2783(define-public python-robotframework
2784 (package
2785 (name "python-robotframework")
1710b8f8 2786 (version "3.1.2")
b9790285
MC
2787 ;; There are no tests in the PyPI archive.
2788 (source
2789 (origin
2790 (method git-fetch)
2791 (uri (git-reference
2792 (url "https://github.com/robotframework/robotframework.git")
2793 (commit (string-append "v" version))))
2794 (file-name (git-file-name name version))
2795 (sha256
1710b8f8 2796 (base32 "16gnxy0qinh8fhs0qvhff5z2xh49c3cqgm0d7bfjw120df6x7fym"))
b9790285
MC
2797 (patches (search-patches
2798 "python-robotframework-honor-source-date-epoch.patch"))))
2799 (build-system python-build-system)
2800 (arguments
2801 `(#:phases (modify-phases %standard-phases
2802 (add-before 'build 'build-and-install-doc
2803 (lambda* (#:key outputs #:allow-other-keys)
2804 (let* ((doc-output (assoc-ref outputs "doc"))
2805 (doc (string-append doc-output "/share/"
2806 ,name "-" ,version "/")))
2807 (invoke "invoke" "library-docs" "all")
2808 (mkdir-p doc)
2809 (copy-recursively "doc/libraries"
2810 (string-append doc "/libraries"))
2811 #t)))
2812 (replace 'check
2813 (lambda _
2814 (invoke "python" "utest/run.py"))))))
2815 (native-inputs
2816 `(("python-invoke" ,python-invoke)
2817 ("python-rellu" ,python-rellu)
2818 ("python:tk" ,python "tk"))) ;used when building the HTML doc
2819 (outputs '("out" "doc"))
2820 (home-page "https://robotframework.org")
2821 (synopsis "Generic automation framework")
2822 (description "Robot Framework is a generic automation framework for
2823acceptance testing, acceptance test driven development (ATDD), and robotic
2824process automation (RPA).")
2825 (license license:asl2.0)))
2826
5b84c120
MC
2827(define-public python-robotframework-lint
2828 ;; There is no properly tagged release; the commit below seems to correspond
2829 ;; to the 0.9 stable release available from PyPI. The tests are not
2830 ;; included in the PyPI archive, so we fetch the sources from the upstream
2831 ;; Git repo.
2832 (let ((commit "e851879bab1f63e4e53b34a4dc8a67ed95102830")
2833 (revision "1"))
2834 (package
2835 (name "python-robotframework-lint")
2836 (version (git-version "0.9.0" revision commit))
2837 (source
2838 (origin
2839 (method git-fetch)
2840 (uri (git-reference
2841 (url "https://github.com/boakley/robotframework-lint.git")
2842 (commit commit)))
2843 (file-name (git-file-name name version))
2844 (sha256
2845 (base32
2846 "1p6fknqg5sb9qz5857ji4a877657vgfjm5v3zn45994parx6ml1m"))))
2847 (build-system python-build-system)
2848 (arguments
2849 `(#:phases
2850 (modify-phases %standard-phases
2851 (replace 'check
2852 (lambda _
2853 (invoke "python" "-m" "robot" "-A"
2854 "tests/conf/default.args" "tests"))))))
2855 (propagated-inputs
2856 `(("python-robotframework" ,python-robotframework)))
2857 (home-page "https://github.com/boakley/robotframework-lint/")
2858 (synopsis "Static analysis tool (linter) for Robot Framework")
2859 (description "This package provides the @code{rflint} command-line
2860utility, a static analysis tool (linter) for Robot Framework source files.")
2861 (license license:asl2.0))))
2862
c0c64f17
MC
2863(define-public python-robotframework-sshlibrary
2864 (package
2865 (name "python-robotframework-sshlibrary")
2866 (version "3.3.0")
2867 ;; There are no tests in the PyPI archive.
2868 (source
2869 (origin
2870 (method git-fetch)
2871 (uri (git-reference
2872 (url "https://github.com/robotframework/SSHLibrary.git")
2873 (commit (string-append "v" version))))
2874 (file-name (git-file-name name version))
2875 (sha256
2876 (base32
2877 "1mk6dz2jqqndbx4yji09012q6rmadnqdywi7czvj62b0s07dr3r2"))))
2878 (build-system python-build-system)
2879 (arguments
2880 `(#:phases
2881 (modify-phases %standard-phases
2882 (add-before 'build 'build-and-install-doc
2883 (lambda* (#:key outputs #:allow-other-keys)
2884 (let* ((doc-output (assoc-ref outputs "doc"))
2885 (doc (string-append doc-output "/share/"
2886 ,name "-" ,version "/")))
2887 (invoke "chmod" "-R" "+w" "docs")
2888 (invoke "invoke" "kw-docs" "project-docs")
2889 (mkdir-p doc)
2890 (for-each delete-file (find-files "docs" "\\.rst"))
2891 (copy-recursively "docs" doc)
2892 #t)))
2893 (replace 'check
2894 (lambda _
2895 ;; Some tests require an SSH server; we remove them.
2896 (delete-file "utest/test_client_api.py")
2897 (delete-file "utest/test_scp.py")
2898 (invoke "python" "utest/run.py"))))))
2899 (propagated-inputs
2900 `(("python-robotframework" ,python-robotframework)
2901 ("python-paramiko" ,python-paramiko)
2902 ("python-scp" ,python-scp)))
2903 (native-inputs
2904 `(("openssh" ,openssh)
2905 ("which" ,which)
2906 ;; To generate the documentation
2907 ("python-docutils" ,python-docutils)
2908 ("python-invoke" ,python-invoke)
2909 ("python-pygments" ,python-pygments)
2910 ("python-rellu" ,python-rellu)))
2911 (outputs '("out" "doc"))
2912 (home-page "https://github.com/robotframework/SSHLibrary")
2913 (synopsis "Robot Framework library for SSH and SFTP")
2914 (description "SSHLibrary is a Robot Framework library providing support
2915for SSH and SFTP. It has the following main usages:
2916@itemize @bullet
2917@item Executing commands on the remote machine, either blocking or non-blocking.
2918@item Writing and reading in an interactive shell.
2919@item Transferring files and directories over SFTP.
2920@item Ensuring that files and directories exist on the remote machine.
2921@end itemize")
2922 (license license:asl2.0)))
2923
13d825fc
MC
2924(define-public python-scp
2925 (package
2926 (name "python-scp")
2927 (version "0.13.2")
2928 (source
2929 (origin
2930 (method url-fetch)
2931 (uri (pypi-uri "scp" version))
2932 (sha256
2933 (base32
2934 "1crlpw9lnn58fs1c1rmh7s7s9y5gkgpgjsqlvg9qa51kq1knx7gg"))))
2935 (build-system python-build-system)
2936 (arguments
2937 '(#:tests? #f)) ;tests require an SSH server
2938 (propagated-inputs
2939 `(("python-paramiko" ,python-paramiko)))
2940 (home-page "https://github.com/jbardin/scp.py")
2941 (synopsis "SCP protocol module for Python and Paramiko")
2942 (description "The scp module extends the Paramiko library to send and
2943receive files via the SCP1 protocol, as implemented by the OpenSSH
2944@command{scp} program.")
2945 (license license:gpl2+)))
2946
44d10b1f
RW
2947(define-public python-rst.linker
2948 (package
2949 (name "python-rst.linker")
d37e8e53 2950 (version "1.11")
44d10b1f
RW
2951 (source
2952 (origin
2953 (method url-fetch)
2954 (uri (pypi-uri "rst.linker" version))
2955 (sha256
d37e8e53 2956 (base32 "0pqsfqqx8h0pq21k8l3k62kznrgaj2ala93c64s4d9rpbr4mgkd2"))))
44d10b1f
RW
2957 (build-system python-build-system)
2958 (propagated-inputs
2959 `(("python-dateutil" ,python-dateutil)
2960 ("python-six" ,python-six)))
2961 (native-inputs
2962 `(("python-setuptools-scm" ,python-setuptools-scm)))
2963 ;; Test would require path.py, which would introduce a cyclic dependence.
2964 (arguments `(#:tests? #f))
2965 ;; Note: As of version 1.7 the documentation is not worth building.
2966 (home-page "https://github.com/jaraco/rst.linker")
2967 (synopsis "Sphinx plugin to add links and timestamps")
2968 (description "rst.linker allows to automatically replace text by a
2969reStructuredText external reference or timestamps. It's primary purpose is to
2970augment the changelog, but it can be used for other documents, too.")
2971 (license license:expat)))
2972
2973(define-public python2-rst.linker
2974 (package-with-python2 python-rst.linker))
2975
2976(define-public python-feedgenerator
2977 (package
2978 (name "python-feedgenerator")
2979 (version "1.9")
2980 (source
2981 (origin
2982 (method url-fetch)
2983 (uri (pypi-uri "feedgenerator" version))
2984 (sha256
2985 (base32
2986 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
2987 (modules '((guix build utils)))
2988 (snippet
2989 '(begin
2990 ;; Remove pre-compiled .pyc files from source.
2991 (for-each delete-file-recursively
2992 (find-files "." "__pycache__" #:directories? #t))
2993 (for-each delete-file (find-files "." "\\.pyc$"))
2994 #t))))
2995 (build-system python-build-system)
2996 (propagated-inputs
2997 `(("python-pytz" ,python-pytz)
2998 ("python-six" ,python-six)))
2999 (home-page "https://github.com/getpelican/feedgenerator")
3000 (synopsis
3001 "Standalone version of Django's Atom/RSS feed generator")
3002 (description
3003 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
3004which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
3005 (license license:bsd-3)))
3006
3007(define-public python2-feedgenerator
3008 (package-with-python2 python-feedgenerator))
3009
3010(define-public python-toml
3011 (package
3012 (name "python-toml")
3013 (version "0.9.4")
3014 (source
3015 (origin
3016 (method url-fetch)
3017 (uri (pypi-uri "toml" version))
3018 (sha256
3019 (base32
3020 "0bdbpbip67wdm6c7xwc6mmbmskyradj4cdxn1iibj4fcx1nbv1lf"))))
3021 (build-system python-build-system)
3022 (arguments
3023 `(#:tests? #f)) ;no tests suite in release
3024 (home-page "https://github.com/uiri/toml")
3025 (synopsis "Library for TOML")
3026 (description
3027 "@code{toml} is a library for parsing and creating Tom's Obvious, Minimal
3028Language (TOML) configuration files.")
3029 (license license:expat)))
3030
346c8752
BG
3031(define-public python-jsonrpc-server
3032 (package
3033 (name "python-jsonrpc-server")
d6cf4c6e 3034 (version "0.3.2")
346c8752
BG
3035 (source
3036 (origin
3037 (method url-fetch)
3038 (uri (pypi-uri "python-jsonrpc-server" version))
3039 (sha256
3040 (base32
d6cf4c6e 3041 "0ddgdp26dfxaz6isjbb12974b3rxavgsqrn2zrmck62cmipg5g05"))))
346c8752
BG
3042 (build-system python-build-system)
3043 (propagated-inputs
3044 `(("python-future" ,python-future)
3045 ("python-mock" ,python-mock)
d6cf4c6e
BG
3046 ("python-pytest" ,python-pytest)
3047 ("python-ujson" ,python-ujson)))
346c8752
BG
3048 (home-page
3049 "https://github.com/palantir/python-jsonrpc-server")
3050 (synopsis "JSON RPC 2.0 server library")
3051 (description
1df5407c 3052 "This package provides a JSON RPC 2.0 server library for Python.")
346c8752
BG
3053 (license license:expat)))
3054
56f4ad47
BG
3055(define-public python-pydocstyle
3056 (package
3057 (name "python-pydocstyle")
3058 (version "3.0.0")
3059 (source
3060 (origin
3061 (method url-fetch)
3062 (uri (pypi-uri "pydocstyle" version))
3063 (sha256
3064 (base32
3065 "1m1xv9clkg9lgzyza6dnj359z04vh5g0h49nhzghv7lg81gchhap"))))
3066 (build-system python-build-system)
3067 (propagated-inputs
3068 `(("python-six" ,python-six)
3069 ("python-snowballstemmer" ,python-snowballstemmer)))
3070 (home-page
3071 "https://github.com/PyCQA/pydocstyle/")
3072 (synopsis "Python docstring style checker")
3073 (description
3074 "This package provides a style checker for the Python Language
3075Server (PLS).")
3076 (license license:expat)))
3077
be4d840c 3078(define-public python-language-server
808dd2d0
BL
3079 (package
3080 (name "python-language-server")
81e3ba03 3081 (version "0.31.6")
808dd2d0
BL
3082 (source
3083 (origin
3084 (method url-fetch)
3085 (uri (pypi-uri "python-language-server" version))
3086 (sha256
3087 (base32
81e3ba03 3088 "0cqrffd5272p2hifa35rf1h1g6dss741jmjkwa43jninifmbz0df"))))
808dd2d0
BL
3089 (build-system python-build-system)
3090 (propagated-inputs
3091 `(("python-pluggy" ,python-pluggy)
3092 ("python-jsonrpc-server" ,python-jsonrpc-server)
3093 ("python-jedi" ,python-jedi)
3094 ("python-yapf" ,python-yapf)
3095 ("python-pyflakes" ,python-pyflakes)
3096 ("python-pydocstyle" ,python-pydocstyle)
3097 ("python-pycodestyle" ,python-pycodestyle)
3098 ("python-mccabe" ,python-mccabe)
3099 ("python-rope" ,python-rope)
3100 ("python-autopep8" ,python-autopep8)
3101 ("python-flake8" ,python-flake8)
3102 ("python-pylint" ,python-pylint)))
3103 (home-page "https://github.com/palantir/python-language-server")
3104 (synopsis "Python implementation of the Language Server Protocol")
3105 (description
3106 "The Python Language Server (pyls) is an implementation of the Python 3
be4d840c
BG
3107language specification for the Language Server Protocol (LSP). This tool is
3108used in text editing environments to provide a complete and integrated
3109feature-set for programming Python effectively.")
808dd2d0 3110 (license license:expat)))
be4d840c 3111
44d10b1f
RW
3112(define-public python-black
3113 (package
3114 (name "python-black")
3115 (version "18.6b4")
3116 (source
3117 (origin
3118 (method url-fetch)
3119 (uri (pypi-uri "black" version))
3120 (sha256
3121 (base32
3122 "0i4sfqgz6w15vd50kbhi7g7rifgqlf8yfr8y78rypd56q64qn592"))))
3123 (build-system python-build-system)
3124 (arguments
3125 `(#:phases
3126 (modify-phases %standard-phases
3127 (add-after 'patch-source-shebangs 'patch-extra-shebangs
3128 (lambda _
3129 (let ((python3 (which "python3")))
3130 (substitute* '("tests/data/fmtonoff.py"
3131 "tests/data/string_prefixes.py"
3132 "tests/data/function.py")
3133 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
3134 (string-append "#!" python3 (if (string? minor-version)
3135 minor-version
3136 ""))))))))))
3137 (propagated-inputs
3138 `(("python-click" ,python-click)
3139 ("python-attrs" ,python-attrs)
3140 ("python-appdirs" ,python-appdirs)
3141 ("python-toml" ,python-toml)))
3142 (home-page "https://github.com/ambv/black")
3143 (synopsis "The uncompromising code formatter")
3144 (description "Black is the uncompromising Python code formatter.")
3145 (license license:expat)))
3146
3147(define-public python-blinker
3148 (package
3149 (name "python-blinker")
3150 (version "1.4")
3151 (source
3152 (origin
3153 (method url-fetch)
3154 (uri (pypi-uri "blinker" version))
3155 (sha256
3156 (base32
3157 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
3158 (build-system python-build-system)
3159 (home-page "http://pythonhosted.org/blinker/")
3160 (synopsis "Fast, simple object-to-object and broadcast signaling")
3161 (description
3162 "Blinker provides a fast dispatching system that allows any number of
3163interested parties to subscribe to events, or \"signals\".")
3164 (license license:expat)))
3165
3166(define-public python2-blinker
3167 (package-with-python2 python-blinker))
3168
3169(define-public pelican
3170 (package
3171 (name "pelican")
fa9e3b5e 3172 (version "4.2.0")
44d10b1f
RW
3173 (source
3174 (origin
3175 (method url-fetch)
3176 (uri (pypi-uri "pelican" version))
3177 (sha256
3178 (base32
fa9e3b5e 3179 "0mp7hjyhs38ag1hyfcy882g400z0babqi72pnli46dqijfhajzmy"))))
44d10b1f
RW
3180 (build-system python-build-system)
3181 (propagated-inputs
fa9e3b5e
VC
3182 `(("python-blinker" ,python-blinker)
3183 ("python-dateutil" ,python-dateutil)
3184 ("python-docutils" ,python-docutils)
3185 ("python-feedgenerator" ,python-feedgenerator)
44d10b1f 3186 ("python-jinja2" ,python-jinja2)
fa9e3b5e 3187 ("python-markdown" ,python-markdown)
44d10b1f 3188 ("python-pygments" ,python-pygments)
44d10b1f 3189 ("python-pytz" ,python-pytz)
44d10b1f 3190 ("python-six" ,python-six)
fa9e3b5e 3191 ("python-unidecode" ,python-unidecode)))
44d10b1f
RW
3192 (home-page "https://getpelican.com/")
3193 (arguments
3194 `(;; XXX Requires a lot more packages to do unit tests :P
fa9e3b5e 3195 #:tests? #f))
44d10b1f
RW
3196 (synopsis "Python-based static site publishing system")
3197 (description
3198 "Pelican is a tool to generate a static blog from reStructuredText,
3199Markdown input files, and more. Pelican uses Jinja2 for templating
3200and is very extensible.")
3201 (license license:agpl3+)))
3202
8c141421
JH
3203(define-public mallard-ducktype
3204 (package
3205 (name "mallard-ducktype")
12cc3da5 3206 (version "1.0.2")
8c141421
JH
3207 (source
3208 (origin
3209 (method git-fetch)
12cc3da5
JH
3210 ;; git-reference because tests are not included in pypi source tarball
3211 ;; https://issues.guix.gnu.org/issue/36755#2
8c141421
JH
3212 (uri (git-reference
3213 (url "https://github.com/projectmallard/mallard-ducktype.git")
3214 (commit version)))
3215 (file-name (git-file-name name version))
3216 (sha256
3217 (base32
12cc3da5 3218 "1jk9bfz7g04ip78s03b0xak6d54rj4h9zpgadkziy1ji216g6y4c"))))
8c141421 3219 (build-system python-build-system)
5246655f
EF
3220 (arguments
3221 '(#:phases
3222 (modify-phases %standard-phases
3223 (replace 'check
3224 (lambda _
3225 (with-directory-excursion "tests"
3226 (invoke "sh" "runtests")))))))
8c141421
JH
3227 (home-page "http://projectmallard.org")
3228 (synopsis "Convert Ducktype to Mallard documentation markup")
3229 (description
3230 "Ducktype is a lightweight syntax that can represent all the semantics
3231of the Mallard XML documentation system. Ducktype files can be converted to
3232Mallard using the @command{ducktype} tool. The yelp-tools package
3233provides additional functionality on the produced Mallard documents.")
3234 (license license:expat)))
3235
44d10b1f
RW
3236(define-public python-cython
3237 (package
3238 (name "python-cython")
6fd27a71 3239 (version "0.29.13")
44d10b1f
RW
3240 (source
3241 (origin
3242 (method url-fetch)
3243 (uri (pypi-uri "Cython" version))
3244 (sha256
6fd27a71
TGR
3245 (base32
3246 "13k37lrcgagwwnzr5bzririsscb793vndj234d475x1h9ad0d7f2"))))
44d10b1f
RW
3247 (build-system python-build-system)
3248 ;; we need the full python package and not just the python-wrapper
3249 ;; because we need libpython3.3m.so
3250 (inputs
3251 `(("python" ,python)))
3252 (arguments
3253 `(#:phases
3254 (modify-phases %standard-phases
3255 (add-before 'check 'set-HOME
3256 ;; some tests require access to "$HOME/.cython"
3257 (lambda _ (setenv "HOME" "/tmp") #t))
3258
3259 ;; FIXME: These tests started failing on armhf after the 0.28 update
3260 ;; (commit c69d11c5930), both with an error such as this:
3261 ;; compiling (cpp) and running dictcomp ...
3262 ;; === C/C++ compiler error output: ===
3263 ;; ‘
3264 ;; dictcomp.cpp:5221: confused by earlier errors, bailing out
3265 ;; See <https://hydra.gnu.org/build/2948724> for logs.
3266 ,@(if (target-arm32?)
3267 `((add-before 'check 'disable-failing-tests
3268 (lambda _
3269 (let ((disabled-tests (open-file "tests/bugs.txt" "a")))
3270 (for-each (lambda (test)
3271 (format disabled-tests "~a\n" test))
3272 '("memslice" "dictcomp"))
3273 (close-port disabled-tests)))))
3274 '())
3275
3276 (replace 'check
3277 (lambda _
e9194eb0
MB
3278 ;; Disable compiler optimizations to greatly reduce the running
3279 ;; time of the test suite.
3280 (setenv "CFLAGS" "-O0")
3281
3282 (invoke "python" "runtests.py" "-vv"
3283 "-j" (number->string (parallel-job-count))))))))
f319409b 3284 (home-page "https://cython.org/")
44d10b1f
RW
3285 (synopsis "C extensions for Python")
3286 (description "Cython is an optimising static compiler for both the Python
3287programming language and the extended Cython programming language. It makes
3288writing C extensions for Python as easy as Python itself.")
3289 (license license:asl2.0)
3290 (properties `((python2-variant . ,(delay python2-cython))))))
3291
3292(define-public python2-cython
da460865
MB
3293 (let ((base (package-with-python2 (strip-python2-variant python-cython))))
3294 (package
3295 (inherit base)
3296 (name "python2-cython")
3297 (inputs
3298 `(("python-2" ,python-2))) ;this is not automatically changed
3299 (arguments
3300 (substitute-keyword-arguments (package-arguments base)
3301 ((#:phases phases)
3302 `(modify-phases ,phases
3303 (add-before 'check 'adjust-test_embed
3304 (lambda _
3305 (substitute* "runtests.py"
3306 ;; test_embed goes great lengths to find the static libpythonX.Y.a
3307 ;; so it can give the right -L flag to GCC when embedding static
3308 ;; builds of Python. It is unaware that the Python "config"
3309 ;; directory (where the static library lives) was renamed in
3310 ;; Python 3, and falls back to sysconfig.get_config_var('LIBDIR'),
3311 ;; which works fine, because that is where the shared library is.
3312 ;;
3313 ;; It also appears to be unaware that the Makefile in Demos/embed
3314 ;; already unconditionally pass the static library location to GCC,
3315 ;; after checking sysconfig.get_config_var('LIBPL).
3316 ;;
3317 ;; The effect is that the linker is unable to resolve libexpat
3318 ;; symbols when building for Python 2, because neither the Python 2
3319 ;; shared library nor Expat is available. To fix it, we can either
3320 ;; add Expat as an input and make it visible to the linker, or just
3321 ;; prevent it from overriding the Python shared library location.
3322 ;; The end result is identical, so we take the easy route.
3323 ((" or libname not in os\\.listdir\\(libdir\\)")
3324 ""))
3325 #t)))))))))
44d10b1f
RW
3326
3327;; The RPython toolchain currently does not support Python 3.
3328(define-public python2-rpython
3329 (package
3330 (name "python2-rpython")
3331 (version "0.2.1")
3332 (source
3333 (origin
3334 (method url-fetch)
3335 (uri (pypi-uri "rpython" version))
3336 (sha256
3337 (base32
3338 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
3339 (build-system python-build-system)
3340 (arguments `(#:python ,python-2))
3341 (native-inputs
3342 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
3343 (home-page "https://rpython.readthedocs.org")
3344 (synopsis "Framework for implementing interpreters and virtual machines")
3345 (description "RPython is a translation and support framework for
3346producing implementations of dynamic languages, emphasizing a clean separation
3347between language specification and implementation aspects.")
3348 (license license:expat)))
3349
3350;; NOTE: when upgrading numpy please make sure that python-pandas and
3351;; python-scipy still build, as these three packages are often used together.
3352(define-public python-numpy
3353 (package
3354 (name "python-numpy")
8e5fbd5d 3355 (version "1.17.3")
44d10b1f
RW
3356 (source
3357 (origin
3358 (method url-fetch)
3359 (uri (string-append
3360 "https://github.com/numpy/numpy/releases/download/v"
3361 version "/numpy-" version ".tar.gz"))
3362 (sha256
3363 (base32
8e5fbd5d 3364 "1ak9dmjja0q90a7fsxli51ypcwssh8c4pb6f8wkrsnf2xgdk6dy9"))))
44d10b1f
RW
3365 (build-system python-build-system)
3366 (inputs
3367 `(("openblas" ,openblas)
3368 ("lapack" ,lapack)))
3369 (native-inputs
3370 `(("python-cython" ,python-cython)
3371 ("python-pytest" ,python-pytest)
3372 ("gfortran" ,gfortran)))
3373 (arguments
3374 `(#:phases
3375 (modify-phases %standard-phases
3376 (add-before 'build 'configure-blas-lapack
3377 (lambda* (#:key inputs #:allow-other-keys)
3378 (call-with-output-file "site.cfg"
3379 (lambda (port)
3380 (format port
3381 "[openblas]
3382libraries = openblas
3383library_dirs = ~a/lib
3384include_dirs = ~a/include
3385
3386# backslash-n to make emacs happy
3387\n[lapack]
3388lapack_libs = lapack
3389library_dirs = ~a/lib
3390include_dirs = ~a/include
3391"
3392 (assoc-ref inputs "openblas")
3393 (assoc-ref inputs "openblas")
3394 (assoc-ref inputs "lapack")
3395 (assoc-ref inputs "lapack"))))
3396 #t))
3397 (add-before 'build 'fix-executable-paths
3398 (lambda* (#:key inputs #:allow-other-keys)
3399 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
3400 ;; instead of /bin/sh.
3401 (substitute* "numpy/distutils/exec_command.py"
3402 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
3403 (string-append match-start (assoc-ref inputs "bash") match-end)))
3404 ;; Use "gcc" executable, not "cc".
3405 (substitute* "numpy/distutils/system_info.py"
3406 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3407 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
3408 #t))
3409 ;; Tests can only be run after the library has been installed and not
3410 ;; within the source directory.
3411 (delete 'check)
3412 (add-after 'install 'check
3413 (lambda* (#:key outputs inputs #:allow-other-keys)
3414 ;; Make installed package available for running the tests
3415 (add-installed-pythonpath inputs outputs)
3416 ;; Make sure "f2py" etc is found.
3417 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
3418 ":" (getenv "PATH")))
3419 (with-directory-excursion "/tmp"
3420 (invoke "python" "-c"
3421 "import numpy; numpy.test(verbose=2)")))))))
3422 (home-page "http://www.numpy.org/")
3423 (synopsis "Fundamental package for scientific computing with Python")
3424 (description "NumPy is the fundamental package for scientific computing
3425with Python. It contains among other things: a powerful N-dimensional array
3426object, sophisticated (broadcasting) functions, tools for integrating C/C++
3427and Fortran code, useful linear algebra, Fourier transform, and random number
3428capabilities.")
adb396ea 3429 (properties `((python2-variant . ,(delay python2-numpy))))
44d10b1f
RW
3430 (license license:bsd-3)))
3431
adb396ea 3432;; Numpy 1.16.x are the last versions that support Python 2.
44d10b1f 3433(define-public python2-numpy
adb396ea
MB
3434 (let ((numpy (package-with-python2
3435 (strip-python2-variant python-numpy))))
3436 (package/inherit
3437 numpy
3438 (version "1.16.5")
3439 (source (origin
3440 (method url-fetch)
3441 (uri (string-append
3442 "https://github.com/numpy/numpy/releases/download/v"
3443 version "/numpy-" version ".tar.gz"))
3444 (sha256
3445 (base32
3446 "0lg1cycxzi4rvvrd5zxinpdz0ni792fpx6xjd75z1923zcac8qrb")))))))
44d10b1f
RW
3447
3448;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
3449;; interest only for legacy code going back to NumPy's predecessor
3450;; Numeric.
3451(define-public python2-numpy-1.8
3452 (package (inherit python2-numpy)
3453 (version "1.8.2")
3454 (source
3455 (origin
6b61fc47
EF
3456 (method git-fetch)
3457 (uri (git-reference
3458 (url "https://github.com/numpy/numpy")
3459 (commit (string-append "v" version))))
3460 (file-name (git-file-name "numpy" version))
44d10b1f
RW
3461 (sha256
3462 (base32
6b61fc47 3463 "0ikgi15rsqwbkfsjjxrwh40lqyal2wvyp3923y6w6ch3dcr82sfk"))))
44d10b1f
RW
3464 (arguments
3465 (substitute-keyword-arguments (package-arguments python2-numpy)
3466 ((#:phases phases)
3467 `(modify-phases ,phases
3468 (replace 'configure-blas-lapack
3469 (lambda* (#:key inputs #:allow-other-keys)
3470 (call-with-output-file "site.cfg"
3471 (lambda (port)
3472 (format port
3473 "[openblas]
3474libraries = openblas,lapack
3475library_dirs = ~a/lib:~a/lib
3476include_dirs = ~a/include:~a/include
3477"
3478 (assoc-ref inputs "openblas")
3479 (assoc-ref inputs "lapack")
3480 (assoc-ref inputs "openblas")
3481 (assoc-ref inputs "lapack"))))
3482 #t))))))
3483 (native-inputs
3484 `(("python2-nose" ,python2-nose)))
3485 (description "NumPy is the fundamental package for scientific computing
3486with Python. It contains among other things: a powerful N-dimensional array
3487object, sophisticated (broadcasting) functions, tools for integrating C/C++
3488and Fortran code, useful linear algebra, Fourier transform, and random number
3489capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
3490that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
3491Numeric.")
3492 (license license:bsd-3)))
3493
3494(define-public python-munch
3495 (package
3496 (name "python-munch")
3497 (version "2.0.4")
3498 (source
3499 (origin
3500 (method url-fetch)
3501 (uri (pypi-uri "munch" version))
3502 (sha256
3503 (base32
3504 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3505 (build-system python-build-system)
3506 (home-page "https://github.com/Infinidat/munch")
3507 (synopsis "Dot-accessible dictionary")
3508 (description "Munch is a dot-accessible dictionary similar to JavaScript
3509objects.")
3510 (license license:expat)))
3511
3512(define-public python2-munch
3513 (package-with-python2 python-munch))
3514
3515(define-public python-colormath
3516 (package
3517 (name "python-colormath")
3518 (version "3.0.0")
3519 (source
3520 (origin
3521 (method url-fetch)
3522 (uri (pypi-uri "colormath" version))
3523 (sha256
3524 (base32
3525 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
3526 (build-system python-build-system)
3527 (propagated-inputs
3528 `(("python-networkx" ,python-networkx)
3529 ("python-numpy" ,python-numpy)))
3530 (home-page "https://github.com/gtaylor/python-colormath")
3531 (synopsis "Color math and conversion library")
3532 (description
3533 "This is a Python library for color math and conversions.")
3534 (license license:bsd-3)))
3535
3536(define-public python2-colormath
3537 (package-with-python2 python-colormath))
3538
3539(define-public python-spectra
3540 (package
3541 (name "python-spectra")
3542 (version "0.0.11")
3543 (source
3544 (origin
3545 (method url-fetch)
3546 (uri (pypi-uri "spectra" version))
3547 (sha256
3548 (base32
3549 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
3550 (build-system python-build-system)
3551 (arguments
3552 `(#:phases
3553 (modify-phases %standard-phases
3554 (replace 'check
38ec0f6a 3555 (lambda _ (invoke "nosetests" "-v"))))))
44d10b1f
RW
3556 (propagated-inputs
3557 `(("python-colormath" ,python-colormath)))
3558 (native-inputs
3559 `(("python-nose" ,python-nose)))
3560 (home-page "https://github.com/jsvine/spectra")
3561 (synopsis "Color scales and color conversion")
3562 (description
3563 "This package provides a Python library intended to make color math,
3564color scales, and color space conversion easy. It has support for:
3565
3566@enumerate
3567@item Color scales
3568@item Color ranges
3569@item Color blending
3570@item Brightening/darkening colors
3571@item Saturating/desaturating colors
3572@item Conversion to/from multiple color spaces.
3573@end enumerate\n")
3574 (license license:expat)))
3575
3576(define-public python2-spectra
3577 (package-with-python2 python-spectra))
3578
3579(define-public python-numpy-documentation
3580 (package
3581 (name "python-numpy-documentation")
3582 (version (package-version python-numpy))
3583 (source (package-source python-numpy))
3584 (build-system python-build-system)
3585 (native-inputs
3586 `(("python-matplotlib" ,python-matplotlib)
3587 ("python-numpy" ,python-numpy)
3588 ("pkg-config" ,pkg-config)
3589 ("python-sphinx" ,python-sphinx)
3590 ("python-numpydoc" ,python-numpydoc)
f75aa97f 3591 ("texlive" ,(texlive-union (list texlive-fonts-cm-super
44d10b1f
RW
3592 texlive-fonts-ec
3593 texlive-generic-ifxetex
3594 texlive-generic-pdftex
f75aa97f 3595 texlive-amsfonts
44d10b1f
RW
3596 texlive-latex-capt-of
3597 texlive-latex-cmap
3598 texlive-latex-environ
3599 texlive-latex-eqparbox
3600 texlive-latex-etoolbox
3601 texlive-latex-expdlist
3602 texlive-latex-fancyhdr
3603 texlive-latex-fancyvrb
3604 texlive-latex-fncychap
3605 texlive-latex-float
3606 texlive-latex-framed
3607 texlive-latex-geometry
3608 texlive-latex-graphics
3609 texlive-latex-hyperref
3610 texlive-latex-mdwtools
3611 texlive-latex-multirow
3612 texlive-latex-needspace
3613 texlive-latex-oberdiek
3614 texlive-latex-parskip
3615 texlive-latex-preview
3616 texlive-latex-tabulary
3617 texlive-latex-threeparttable
3618 texlive-latex-titlesec
3619 texlive-latex-trimspaces
3620 texlive-latex-ucs
3621 texlive-latex-upquote
3622 texlive-latex-url
3623 texlive-latex-varwidth
3624 texlive-latex-wrapfig)))
3625 ("texinfo" ,texinfo)
3626 ("perl" ,perl)
3627 ("scipy-sphinx-theme"
3628 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
3629 (method git-fetch)
3630 (uri (git-reference
3631 (url "https://github.com/scipy/scipy-sphinx-theme.git")
3632 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
3633 (sha256
3634 (base32
3635 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
3636 ,@(package-native-inputs python-numpy)))
3637 (arguments
3638 `(#:tests? #f ; we're only generating the documentation
3639 #:phases
3640 (modify-phases %standard-phases
3641 (delete 'build)
3642 (replace 'install
3643 (lambda* (#:key inputs outputs #:allow-other-keys)
3644 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3645 (doc (string-append
3646 data "/doc/" ,name "-"
3647 ,(package-version python-numpy)))
3648 (info-reader (string-append data "/info"))
3649 (html (string-append doc "/html"))
3650 (scipy-sphinx-theme "scipy-sphinx-theme")
3651 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
3652 (pyver ,(string-append "PYVER=")))
3653
3654 ;; FIXME: this is needed to for texlive-union to generate
3655 ;; fonts, which are not found.
3656 (setenv "HOME" "/tmp")
3657
3658 (with-directory-excursion "doc"
3659 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
3660 (mkdir-p html)
4fc898da
RW
3661 (invoke "make" "html" pyver)
3662 (invoke "make" "latex" "PAPER=a4" pyver)
3663 (invoke "make" "-C" "build/latex"
44d10b1f
RW
3664 "all-pdf" "PAPER=a4" pyver)
3665 ;; FIXME: Generation of the info file fails.
4fc898da 3666 ;; (invoke "make" "info" pyver)
44d10b1f
RW
3667 ;; (mkdir-p info)
3668 ;; (copy-file "build/texinfo/numpy.info"
3669 ;; (string-append info "/numpy.info"))
3670 (for-each (lambda (file)
3671 (copy-file (string-append "build/latex" file)
3672 (string-append doc file)))
3673 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3674 (with-directory-excursion "build/html"
3675 (for-each (lambda (file)
3676 (let* ((dir (dirname file))
3677 (tgt-dir (string-append html "/" dir)))
3678 (unless (equal? "." dir)
3679 (mkdir-p tgt-dir))
3680 (install-file file html)))
3681 (find-files "." ".*")))))
3682 #t)))))
3683 (home-page (package-home-page python-numpy))
3684 (synopsis "Documentation for the python-numpy package")
3685 (description (package-description python-numpy))
3686 (license (package-license python-numpy))))
3687
3688(define-public python2-numpy-documentation
3689 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
3690 (package
3691 (inherit numpy-documentation)
3692 (native-inputs `(("python2-functools32" ,python2-functools32)
3693 ,@(package-native-inputs numpy-documentation))))))
3694
3695(define-public python-pygit2
3696 (package
3697 (name "python-pygit2")
dac8b275 3698 (version "0.28.2")
44d10b1f
RW
3699 (source
3700 (origin
3701 (method url-fetch)
3702 (uri (pypi-uri "pygit2" version))
3703 (sha256
dac8b275 3704 (base32 "11kzj5mjkspvplnpdb6bj8dcj6rgmkk986k8hjcklyg5yaxkz32d"))))
44d10b1f
RW
3705 (build-system python-build-system)
3706 (arguments
c3ecab0d 3707 '(#:tests? #f)) ; tests don't run correctly in our environment
44d10b1f
RW
3708 (propagated-inputs
3709 `(("python-six" ,python-six)
3710 ("python-cffi" ,python-cffi)
3711 ("libgit2" ,libgit2)
3712 ("python-tox" ,python-tox)))
3713 (native-inputs
3714 `(("python-pytest" ,python-pytest)))
3715 (home-page "https://github.com/libgit2/pygit2")
3716 (synopsis "Python bindings for libgit2")
3717 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3718library, libgit2 implements Git plumbing.")
3719 ;; GPL2.0 only, with linking exception.
3720 (license license:gpl2)))
3721
3722(define-public python2-pygit2
3723 (package-with-python2 python-pygit2))
3724
3725(define-public python-pyparsing
3726 (package
3727 (name "python-pyparsing")
6d3cff5a 3728 (version "2.3.1")
44d10b1f
RW
3729 (source
3730 (origin
3731 (method url-fetch)
3732 (uri (pypi-uri "pyparsing" version))
3733 (sha256
6d3cff5a 3734 (base32 "0yk6xl885b91dmlhlsap7x78hk2rdr879fln9anbq6k4ca42djb6"))))
44d10b1f
RW
3735 (build-system python-build-system)
3736 (outputs '("out" "doc"))
3737 (arguments
3738 `(#:tests? #f ; no test target
3739 #:phases
3740 (modify-phases %standard-phases
3741 (add-after 'install 'install-doc
3742 (lambda* (#:key outputs #:allow-other-keys)
3743 (let* ((doc (string-append (assoc-ref outputs "doc")
3744 "/share/doc/" ,name "-" ,version))
3745 (html-doc (string-append doc "/html"))
3746 (examples (string-append doc "/examples")))
3747 (mkdir-p html-doc)
3748 (mkdir-p examples)
3749 (for-each
3750 (lambda (dir tgt)
3751 (map (lambda (file)
3752 (install-file file tgt))
3753 (find-files dir ".*")))
3754 (list "docs" "htmldoc" "examples")
3755 (list doc html-doc examples))
3756 #t))))))
3757 (home-page "https://github.com/pyparsing/pyparsing")
3758 (synopsis "Python parsing class library")
3759 (description
3760 "The pyparsing module is an alternative approach to creating and
3761executing simple grammars, vs. the traditional lex/yacc approach, or the use
3762of regular expressions. The pyparsing module provides a library of classes
3763that client code uses to construct the grammar directly in Python code.")
3764 (license license:expat)))
3765
3766(define-public python2-pyparsing
3767 (package-with-python2 python-pyparsing))
3768
3769(define-public python-numpydoc
3770 (package
3771 (name "python-numpydoc")
3772 (version "0.8.0")
3773 (source
3774 (origin
3775 (method url-fetch)
3776 (uri (pypi-uri "numpydoc" version))
3777 (sha256
3778 (base32
3779 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
3780 (build-system python-build-system)
3781 (propagated-inputs
3782 `(("python-sphinx" ,python-sphinx)))
3783 (native-inputs
3784 `(("python-nose" ,python-nose)))
3785 (home-page "https://pypi.python.org/pypi/numpydoc")
3786 (synopsis
3787 "Numpy's Sphinx extensions")
3788 (description
3789 "Sphinx extension to support docstrings in Numpy format.")
3790 (license license:bsd-2)))
3791
3792(define-public python2-numpydoc
3793 (package-with-python2 python-numpydoc))
3794
3795(define-public python-numexpr
3796 (package
3797 (name "python-numexpr")
3798 (version "2.6.5")
3799 (source
3800 (origin
3801 (method url-fetch)
3802 (uri (pypi-uri "numexpr" version))
3803 (sha256
3804 (base32
3805 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
3806 (build-system python-build-system)
3807 (arguments `(#:tests? #f)) ; no tests included
3808 (propagated-inputs
3809 `(("python-numpy" ,python-numpy)))
3810 (home-page "https://github.com/pydata/numexpr")
3811 (synopsis "Fast numerical expression evaluator for NumPy")
3812 (description
3813 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3814expressions that operate on arrays are accelerated and use less memory than
3815doing the same calculation in Python. In addition, its multi-threaded
3816capabilities can make use of all your cores, which may accelerate
3817computations, most specially if they are not memory-bounded (e.g. those using
3818transcendental functions).")
3819 (license license:expat)))
3820
3821(define-public python2-numexpr
3822 (package-with-python2 python-numexpr))
3823
3824(define-public python-cycler
3825 (package
3826 (name "python-cycler")
3827 (version "0.10.0")
3828 (source (origin
3829 (method url-fetch)
3830 (uri (pypi-uri "cycler" version))
3831 (sha256
3832 (base32
3833 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
3834 (build-system python-build-system)
3835 (arguments
3836 ;; XXX: The current version requires 'coveralls' which we don't have.
3837 ;; Enable this for the next release which uses 'python-pytest'.
3838 '(#:tests? #f))
3839 (propagated-inputs
3840 `(("python-six" ,python-six)))
3841 (home-page "http://matplotlib.org/cycler/")
3842 (synopsis "Composable keyword argument iterator")
3843 (description
3844 "When using @code{matplotlib} and plotting more than one line, it is
3845common to want to be able to want to be able to cycle over one or more artist
3846styles; but the plotting logic can quickly become involved.
3847To address this and enable easy cycling over arbitrary @code{kwargs}, the
3848@code{Cycler} class was developed.")
3849 (license license:bsd-3)))
3850
3851(define-public python2-cycler
3852 (package-with-python2 python-cycler))
3853
3854(define-public python-colorspacious
3855 (package
3856 (name "python-colorspacious")
53a3ebed 3857 (version "1.1.2")
44d10b1f 3858 (source
dee92e65
TGR
3859 (origin
3860 (method git-fetch)
3861 (uri (git-reference
3862 (url "https://github.com/njsmith/colorspacious.git")
3863 (commit (string-append "v" version))))
3864 (file-name (git-file-name name version))
3865 (sha256
53a3ebed 3866 (base32 "0x7nkphr6g5ql5fvgss8l56rgiyjgh6fm8zzs73i94ci9wzlm63w"))))
44d10b1f
RW
3867 (build-system python-build-system)
3868 (propagated-inputs
3869 `(("python-numpy" ,python-numpy)))
3870 (native-inputs
3871 `(("python-nose" ,python-nose)))
3872 (arguments
3873 `(#:phases
3874 (modify-phases %standard-phases
3875 (replace 'check
3876 (lambda _
c988afda 3877 (invoke "nosetests" "--all-modules" "-v" "colorspacious"))))))
44d10b1f
RW
3878 (home-page "https://github.com/njsmith/colorspacious")
3879 (synopsis "Python library for colorspace conversions")
3880 (description "@code{colorspacious} is a Python library that lets you
3881convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
3882 (license license:expat)))
3883
3884(define-public python2-colorspacious
3885 (package-with-python2 python-colorspacious))
3886
3887(define-public python-matplotlib
3888 (package
3889 (name "python-matplotlib")
9e7cb2f1 3890 (version "3.1.2")
44d10b1f
RW
3891 (source
3892 (origin
3893 (method url-fetch)
3894 (uri (pypi-uri "matplotlib" version))
3895 (sha256
3896 (base32
9e7cb2f1 3897 "1nmshfqh7wyg15i16hx1yiylcvzkws29ivn66n3i0wyqwcpjr3lf"))))
44d10b1f
RW
3898 (build-system python-build-system)
3899 (propagated-inputs ; the following packages are all needed at run time
3900 `(("python-cycler" ,python-cycler)
3901 ("python-kiwisolver" ,python-kiwisolver)
3902 ("python-pyparsing" ,python-pyparsing)
3903 ("python-pygobject" ,python-pygobject)
3904 ("gobject-introspection" ,gobject-introspection)
3905 ("python-tkinter" ,python "tk")
3906 ("python-dateutil" ,python-dateutil)
3907 ("python-numpy" ,python-numpy)
3908 ("python-pillow" ,python-pillow)
3909 ("python-pytz" ,python-pytz)
3910 ("python-six" ,python-six)
44d10b1f
RW
3911 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3912 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3913 ;; object. For this reason we need to import both libraries.
5ea654cf 3914 ;; https://cairocffi.readthedocs.io/en/stable/cffi_api.html#converting-pycairo-wrappers-to-cairocffi
44d10b1f 3915 ("python-pycairo" ,python-pycairo)
44d10b1f
RW
3916 ("python-cairocffi" ,python-cairocffi)))
3917 (inputs
3918 `(("libpng" ,libpng)
3919 ("imagemagick" ,imagemagick)
3920 ("freetype" ,freetype)
3921 ("cairo" ,cairo)
3922 ("glib" ,glib)
3923 ;; FIXME: Add backends when available.
3924 ;("python-wxpython" ,python-wxpython)
3925 ("tcl" ,tcl)
3926 ("tk" ,tk)))
3927 (native-inputs
3928 `(("pkg-config" ,pkg-config)
5ea654cf
RW
3929 ("python-pytest" ,python-pytest)
3930 ("python-mock" ,python-mock)
3931 ("unzip" ,unzip)
3932 ("jquery-ui"
3933 ,(origin
3934 (method url-fetch)
3935 (uri "https://jqueryui.com/resources/download/jquery-ui-1.12.1.zip")
3936 (sha256
3937 (base32
3938 "0kb21xf38diqgxcdi1z3s9ssq36pldvyqxy56hn6pcva6rs3c8zq"))))))
44d10b1f
RW
3939 (arguments
3940 `(#:phases
3941 (modify-phases %standard-phases
5ea654cf
RW
3942 ;; XXX We disable all image comparison tests because we're using a
3943 ;; newer version of FreeType than matplotlib expects. This leads to
3944 ;; minor differences throughout the tests.
3945 (add-after 'unpack 'fix-and-disable-failing-tests
3946 (lambda _
3947 (substitute* (append (find-files "lib/matplotlib/tests/"
3948 "test_.*\\.py$")
3949 (find-files "lib/mpl_toolkits/tests"
3950 "test_.*\\.py$"))
3951 (("^from matplotlib" match)
3952 (string-append "import pytest\n" match))
3953 (("( *)@image_comparison" match indent)
3954 (string-append indent
3955 "@pytest.mark.skip(reason=\"unknown minor image differences\")\n"
3956 match)))
3957 (substitute* "lib/matplotlib/tests/test_animation.py"
3958 (("/bin/sh") (which "sh")))
3959 (for-each delete-file
3960 ;; test_normal_axes, test_get_tightbbox_polar
3961 '("lib/matplotlib/tests/test_axes.py"
9e7cb2f1
RW
3962 ;; We don't use the webagg backend and this test forces it.
3963 "lib/matplotlib/tests/test_backend_webagg.py"
5ea654cf
RW
3964 ;; test_outward_ticks
3965 "lib/matplotlib/tests/test_tightlayout.py"
9e7cb2f1
RW
3966 ;; test_hidden_axes fails with minor extent
3967 ;; differences, possibly due to the use of a
3968 ;; different version of FreeType.
3969 "lib/matplotlib/tests/test_constrainedlayout.py"
5ea654cf
RW
3970 ;; Fontconfig returns no fonts.
3971 "lib/matplotlib/tests/test_font_manager.py"))
3972 #t))
3973 (add-before 'install 'install-jquery-ui
3974 (lambda* (#:key outputs inputs #:allow-other-keys)
3975 (let ((dir (string-append (assoc-ref outputs "out")
3976 "/lib/python3.7/site-packages/matplotlib/backends/web_backend/")))
3977 (mkdir-p dir)
3978 (invoke "unzip"
3979 (assoc-ref inputs "jquery-ui")
3980 "-d" dir))
3981 #t))
c09f598d 3982 (replace 'check
5ea654cf
RW
3983 (lambda* (#:key outputs inputs #:allow-other-keys)
3984 (add-installed-pythonpath inputs outputs)
3985 (invoke "python" "tests.py" "-v"
9e7cb2f1 3986 "-m" "not network and not webagg")))
44d10b1f
RW
3987 (add-before 'build 'configure-environment
3988 (lambda* (#:key outputs inputs #:allow-other-keys)
34c2a16b
RW
3989 (let ((cairo (assoc-ref inputs "cairo")))
3990 ;; Setting this directory in the 'basedirlist' of 'setup.cfg'
44d10b1f 3991 ;; has not effect.
34c2a16b 3992 (setenv "LD_LIBRARY_PATH" (string-append cairo "/lib"))
44d10b1f
RW
3993 (setenv "HOME" (getcwd))
3994 (call-with-output-file "setup.cfg"
3995 (lambda (port)
3996 (format port "[directories]~%
3997basedirlist = ~a,~a~%
5ea654cf
RW
3998[packages]~%
3999tests = True~%"
44d10b1f
RW
4000 (assoc-ref inputs "tcl")
4001 (assoc-ref inputs "tk")))))
4002 #t)))))
339b5828 4003 (home-page "https://matplotlib.org/")
44d10b1f
RW
4004 (synopsis "2D plotting library for Python")
4005 (description
4006 "Matplotlib is a Python 2D plotting library which produces publication
4007quality figures in a variety of hardcopy formats and interactive environments
4008across platforms. Matplotlib can be used in Python scripts, the python and
4009ipython shell, web application servers, and six graphical user interface
4010toolkits.")
4011 (license license:psfl)
4012 (properties `((python2-variant . ,(delay python2-matplotlib))))))
4013
4014(define-public python2-matplotlib
4015 (let ((matplotlib (package-with-python2
4016 (strip-python2-variant python-matplotlib))))
4017 (package (inherit matplotlib)
7380df73 4018 (version "2.2.4")
5ea654cf
RW
4019 (source
4020 (origin
4021 (method url-fetch)
4022 (uri (pypi-uri "matplotlib" version))
4023 (sha256
4024 (base32
7380df73 4025 "09i1gnrra1590brc1f8d5rh2zvnknmfgzp613ab0462qkrwj15h2"))))
5d484f42
EF
4026 (arguments
4027 (substitute-keyword-arguments (package-arguments matplotlib)
4028 ((#:phases phases)
4029 `(modify-phases ,phases
66a3c2db
EF
4030 (replace 'install-jquery-ui
4031 (lambda* (#:key outputs inputs #:allow-other-keys)
4032 (let ((dir (string-append (assoc-ref outputs "out")
4033 "/lib/python2.7/site-packages/"
4034 "matplotlib/backends/web_backend/")))
4035 (mkdir-p dir)
4036 (invoke "unzip"
4037 (assoc-ref inputs "jquery-ui")
4038 "-d" dir))
4039 #t))
38a404d5 4040 (delete 'fix-and-disable-failing-tests)
5d484f42 4041 (delete 'check))))) ; These tests weren't run the the past.
44d10b1f
RW
4042 ;; Make sure to use special packages for Python 2 instead
4043 ;; of those automatically rewritten by package-with-python2.
4044 (propagated-inputs
4045 `(("python2-pycairo" ,python2-pycairo)
4046 ("python2-backports-functools-lru-cache"
4047 ,python2-backports-functools-lru-cache)
4048 ("python2-functools32" ,python2-functools32)
4049 ("python2-pygobject-2" ,python2-pygobject-2)
4050 ("python2-subprocess32" ,python2-subprocess32)
4051 ("python2-tkinter" ,python-2 "tk")
4052 ,@(fold alist-delete (package-propagated-inputs matplotlib)
4053 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
4054
4055(define-public python-matplotlib-documentation
4056 (package
4057 (name "python-matplotlib-documentation")
4058 (version (package-version python-matplotlib))
4059 (source (package-source python-matplotlib))
4060 (build-system python-build-system)
4061 (native-inputs
4062 `(("python-matplotlib" ,python-matplotlib)
4063 ("python-colorspacious" ,python-colorspacious)
4064 ("python-sphinx" ,python-sphinx)
5ad0a452 4065 ("python-sphinx-copybutton" ,python-sphinx-copybutton)
44d10b1f
RW
4066 ("python-sphinx-gallery" ,python-sphinx-gallery)
4067 ("python-numpydoc" ,python-numpydoc)
4068 ("python-ipython" ,python-ipython)
e7a53914 4069 ("python-ipykernel" ,python-ipykernel)
44d10b1f
RW
4070 ("python-mock" ,python-mock)
4071 ("graphviz" ,graphviz)
f75aa97f 4072 ("texlive" ,(texlive-union (list texlive-amsfonts
e7a53914
RW
4073 texlive-latex-amsmath
4074 texlive-latex-enumitem
4075 texlive-latex-expdlist
4076 texlive-latex-geometry
4077 texlive-latex-preview
4078 texlive-latex-type1cm
4079 texlive-latex-ucs
4080
4081 texlive-generic-pdftex
4082
e7a53914
RW
4083 texlive-fonts-ec
4084 texlive-fonts-adobe-times
4085 texlive-fonts-txfonts)))
44d10b1f
RW
4086 ("texinfo" ,texinfo)
4087 ,@(package-native-inputs python-matplotlib)))
4088 (arguments
4089 `(#:tests? #f ; we're only generating documentation
4090 #:phases
4091 (modify-phases %standard-phases
5ea654cf
RW
4092 ;; The tests in python-matplotlib are run after the install phase, so
4093 ;; we need to delete the extra phase here.
4094 (delete 'check)
44d10b1f
RW
4095 (replace 'build
4096 (lambda _
4097 (chdir "doc")
e7a53914
RW
4098 (setenv "PYTHONPATH"
4099 (string-append (getenv "PYTHONPATH")
4100 ":" (getcwd) "/../examples/units"))
44d10b1f 4101 (substitute* "conf.py"
e7a53914
RW
4102 ;; Don't use git.
4103 (("^SHA = check_output.*")
4104 (string-append "SHA = \"" ,version "\"\n"))
4105 ;; Don't fetch intersphinx files from the Internet
4106 (("^explicit_order_folders" m)
4107 (string-append "intersphinx_mapping = {}\n" m))
4108 (("'sphinx.ext.intersphinx',") "")
4109 ;; Disable URL embedding which requires internet access.
4110 (("'https://docs.scipy.org/doc/numpy'") "None")
4111 (("'https://docs.scipy.org/doc/scipy/reference'") "None"))
4112 (invoke "make"
4113 "SPHINXBUILD=sphinx-build"
4114 "SPHINXOPTS=" ; don't abort on warnings
4115 "html" "texinfo")))
44d10b1f
RW
4116 (replace 'install
4117 (lambda* (#:key inputs outputs #:allow-other-keys)
4118 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
4119 (doc (string-append data "/doc/python-matplotlib-" ,version))
4120 (info (string-append data "/info"))
4121 (html (string-append doc "/html")))
4122 (mkdir-p html)
4123 (mkdir-p info)
4124 (copy-recursively "build/html" html)
4125 (symlink (string-append html "/_images")
4126 (string-append info "/matplotlib-figures"))
4127 (with-directory-excursion "build/texinfo"
4128 (substitute* "matplotlib.texi"
4129 (("@image\\{([^,]*)" all file)
4130 (string-append "@image{matplotlib-figures/" file)))
4131 (symlink (string-append html "/_images")
4132 "./matplotlib-figures")
e7a53914
RW
4133 (invoke "makeinfo" "--no-split"
4134 "-o" "matplotlib.info" "matplotlib.texi"))
4135 (install-file "build/texinfo/matplotlib.info" info))
44d10b1f
RW
4136 #t)))))
4137 (home-page (package-home-page python-matplotlib))
4138 (synopsis "Documentation for the python-matplotlib package")
4139 (description (package-description python-matplotlib))
4140 (license (package-license python-matplotlib))))
4141
4142(define-public python2-matplotlib-documentation
5ad0a452
RW
4143 (let ((parent (package-with-python2 python-matplotlib-documentation)))
4144 (package
4145 (inherit parent)
4146 (native-inputs
4147 (alist-delete "python-sphinx-copybutton"
4148 (package-native-inputs parent))))))
44d10b1f 4149
55dae98f
RW
4150(define-public python-matplotlib-venn
4151 (package
4152 (name "python-matplotlib-venn")
4153 (version "0.11.5")
4154 (source
4155 (origin
4156 (method url-fetch)
4157 (uri (pypi-uri "matplotlib-venn" version ".zip"))
4158 (sha256
4159 (base32
4160 "13w3i1wih0mij08hrgppzg0g9z50y54rc28l6gdi1r5w45l7l0dy"))))
4161 (build-system python-build-system)
4162 (arguments '(#:tests? #f)) ; tests are not included
4163 (propagated-inputs
4164 `(("python-matplotlib" ,python-matplotlib)
4165 ("python-numpy" ,python-numpy)
4166 ("python-scipy" ,python-scipy)))
4167 (native-inputs
4168 `(("unzip" ,unzip)))
4169 (home-page "https://github.com/konstantint/matplotlib-venn")
4170 (synopsis "Plot area-proportional Venn diagrams")
4171 (description
4172 "This package provides tools for plotting area-proportional two- and
4173three-way Venn diagrams in @code{matplotlib}.")
4174 (license license:expat)))
4175
44d10b1f
RW
4176(define-public python2-pysnptools
4177 (package
4178 (name "python2-pysnptools")
5d1ade85 4179 (version "0.3.13")
44d10b1f
RW
4180 (source
4181 (origin
4182 (method url-fetch)
5d1ade85 4183 (uri (pypi-uri "pysnptools" version))
44d10b1f
RW
4184 (sha256
4185 (base32
5d1ade85 4186 "0lnis5xsl7bi0hz4f7gbicahzi5zlxkc21nk3g374xv8fb5hb3qm"))))
44d10b1f
RW
4187 (build-system python-build-system)
4188 (arguments
5d1ade85
RW
4189 `(#:python ,python-2 ; only Python 2.7 is supported
4190 #:tests? #f)) ; test files (e.g. examples/toydata.bim) not included
44d10b1f
RW
4191 (propagated-inputs
4192 `(("python2-numpy" ,python2-numpy)
4193 ("python2-scipy" ,python2-scipy)
4194 ("python2-pandas" ,python2-pandas)))
44d10b1f 4195 (native-inputs
5d1ade85 4196 `(("python2-cython" ,python2-cython)))
1b66989b 4197 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
44d10b1f
RW
4198 (synopsis "Library for reading and manipulating genetic data")
4199 (description
4200 "PySnpTools is a library for reading and manipulating genetic data. It
4201can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
4202those files. It can also efficiently manipulate ranges of integers using set
4203operators such as union, intersection, and difference.")
4204 (license license:asl2.0)))
4205
44d10b1f
RW
4206(define-public python-socksipy-branch
4207 (package
4208 (name "python-socksipy-branch")
4209 (version "1.01")
4210 (source
4211 (origin
4212 (method url-fetch)
4213 (uri (pypi-uri "SocksiPy-branch" version))
4214 (sha256
4215 (base32
4216 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
4217 (build-system python-build-system)
4218 (arguments
4219 `(#:tests? #f)) ; There are no tests
4220 (home-page "https://code.google.com/archive/p/socksipy-branch/")
4221 (synopsis "Python SOCKS module")
4222 (description
4223 "SocksiPy - A Python SOCKS client module. It provides a
4224socket-like interface that supports connections to any TCP
4225service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
4226The original version was developed by Dan Haim, this is a
4227branch created by Mario Vilas to address some open issues,
4228as the original project seems to have been abandoned circa 2007.")
4229 (license license:bsd-3)))
4230
4231(define-public python2-socksipy-branch
4232 (package-with-python2 python-socksipy-branch))
4233
6fcceb23
AG
4234(define-public python-socksipychain
4235 (package
4236 (name "python-socksipychain")
d97cdff1 4237 (version "2.1.0")
6fcceb23
AG
4238 (source
4239 (origin
4240 (method git-fetch)
4241 (uri (git-reference
4242 (url "https://github.com/pagekite/PySocksipyChain.git")
4243 (commit (string-append "v" version))))
4244 (file-name (git-file-name name version))
4245 (sha256
4246 (base32
d97cdff1 4247 "0idm9a050rd2kbgbz2sk9ib9589kj4xh1xdnggs6xbq2v2y8f6zn"))))
6fcceb23
AG
4248 (build-system python-build-system)
4249 (arguments
4250 `(#:tests? #f)) ; Tests try to access the network.
4251 (home-page "http://pagekite.net/wiki/Floss/PySocksipyChain/")
4252 (synopsis "Python SOCKS module with chained proxies support")
4253 (description
4254 "SocksiPyChain is a modified version of the SocksiPy SOCKS module, which
4255adds support for arbitrary chaining of proxy servers and various modes of
4256TLS/SSL encryption. It was developed for use in PageKite, and also includes
4257a simple netcat replacement with chaining support.")
4258 (license license:bsd-3)))
4259
44d10b1f
RW
4260(define-public python-pycodestyle
4261 (package
4262 (name "python-pycodestyle")
d16ef28b 4263 (version "2.5.0")
44d10b1f 4264 (source
ba88eea2
RW
4265 (origin
4266 (method url-fetch)
4267 (uri (pypi-uri "pycodestyle" version))
4268 (sha256
4269 (base32
d16ef28b 4270 "0v4prb05n21bm8650v0a01k1nyqjdmkrsm3zycfxh2j5k9n962p4"))))
44d10b1f
RW
4271 (build-system python-build-system)
4272 (home-page "https://pycodestyle.readthedocs.io/")
4273 (synopsis "Python style guide checker")
4274 (description "@code{pycodestyle} (formerly pep8) is a tool to check
4275Python code against some of the style conventions in
4276@url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
4277 (license license:expat)))
4278
4279(define-public python2-pycodestyle
4280 (package-with-python2 python-pycodestyle))
4281
4282(define-public python-multidict
4283 (package
4284 (name "python-multidict")
4285 (version "4.2.0")
4286 (source
4287 (origin
4288 (method url-fetch)
4289 (uri (pypi-uri "multidict" version))
4290 (sha256
4291 (base32
4292 "1vf5bq8hn5a9rvhr5v4fwbmarfsp35hhr8gs74kqfijy34j2f194"))))
4293 (build-system python-build-system)
4294 (native-inputs
4295 `(("python-pytest" ,python-pytest)
4296 ("python-pytest-runner" ,python-pytest-runner)))
4297 (home-page "https://github.com/aio-libs/multidict/")
4298 (synopsis "Multidict implementation")
4299 (description "Multidict is dict-like collection of key-value pairs
4300where key might be occurred more than once in the container.")
4301 (license license:asl2.0)))
4302
4303(define-public python-orderedmultidict
4304 (package
4305 (name "python-orderedmultidict")
4306 (version "0.7.11")
4307 (source
4308 (origin
4309 (method url-fetch)
4310 (uri (pypi-uri "orderedmultidict" version))
4311 (sha256
4312 (base32
4313 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
4314 (build-system python-build-system)
4315 (arguments
4316 `(#:phases
4317 (modify-phases %standard-phases
4318 (add-after 'unpack 'fix-tests
4319 (lambda _
4320 ;; The package uses nosetest for running the tests.
4321 ;; Adding this initfile allows to run the test suite
4322 ;; without requiring nosetest.
d1c4f329
RW
4323 (with-output-to-file "tests/__init__.py" newline)
4324 #t)))))
44d10b1f
RW
4325 (propagated-inputs
4326 `(("python-six" ,python-six)))
4327 (native-inputs
4328 `(("python-pycodestyle" ,python-pycodestyle)))
4329 (home-page "https://github.com/gruns/orderedmultidict")
4330 (synopsis "Python Ordered Multivalue Dictionary - omdict")
4331 (description "This package contains a library for ordered multivalue
4332dictionaries. A multivalue dictionary is a dictionary that can store
4333multiple values for the same key. An ordered multivalue dictionary is a
4334multivalue dictionary that retains the order of insertions and deletions.")
4335 (license license:unlicense)))
4336
4337(define-public python2-orderedmultidict
4338 (package-with-python2 python-orderedmultidict))
4339
4340(define-public python-autopep8
4341 (package
4342 (name "python-autopep8")
4343 (version "1.3.5")
4344 (source
4345 (origin
4346 (method url-fetch)
4347 (uri (pypi-uri "autopep8" version))
4348 (sha256
4349 (base32
4350 "192bvhzi4d0claqxgzymvv7k3qnj627742bc8sgxpzjj42pd9112"))))
4351 (build-system python-build-system)
4352 (propagated-inputs
4353 `(("python-pycodestyle" ,python-pycodestyle)))
4354 (home-page "https://github.com/hhatto/autopep8")
4355 (synopsis "Format Python code according to the PEP 8 style guide")
4356 (description
4357 "@code{autopep8} automatically formats Python code to conform to
4358the PEP 8 style guide. It uses the pycodestyle utility to determine
4359what parts of the code needs to be formatted. @code{autopep8} is
4360capable of fixing most of the formatting issues that can be reported
4361by pycodestyle.")
4362 (license (license:non-copyleft
4363 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
4364
4365(define-public python2-autopep8
4366 (package-with-python2 python-autopep8))
4367
4368(define-public python-distutils-extra
4369 (package
4370 (name "python-distutils-extra")
4371 (version "2.38")
4372 (source
4373 (origin
4374 (method url-fetch)
4375 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4376 version "/+download/python-distutils-extra-"
4377 version ".tar.gz"))
4378 (sha256
4379 (base32
4380 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4381 (build-system python-build-system)
4382 (home-page "https://launchpad.net/python-distutils-extra/")
4383 (synopsis "Enhancements to Python's distutils")
4384 (description
4385 "The python-distutils-extra module enables you to easily integrate
4386gettext support, themed icons, and scrollkeeper-based documentation into
4387Python's distutils.")
4388 (license license:gpl2)))
4389
4390(define-public python2-distutils-extra
4391 (package-with-python2 python-distutils-extra))
4392
4393(define-public python2-elib.intl
4394 (package
4395 (name "python2-elib.intl")
4396 (version "0.0.3")
4397 (source
4398 (origin
4399 ;; This project doesn't tag releases or publish tarballs, so we take
4400 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4401 (method git-fetch)
4402 (uri (git-reference
4403 (url "https://github.com/dieterv/elib.intl.git")
4404 (commit "d09997cfef")))
4405 (file-name (string-append name "-" version "-checkout"))
4406 (sha256
4407 (base32
4408 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4409 (build-system python-build-system)
4410 (arguments
4411 ;; incompatible with Python 3 (exception syntax)
4412 `(#:python ,python-2
4413 #:tests? #f))
4414 (home-page "https://github.com/dieterv/elib.intl")
4415 (synopsis "Enhanced internationalization for Python")
4416 (description
4417 "The elib.intl module provides enhanced internationalization (I18N)
4418services for your Python modules and applications.")
4419 (license license:lgpl3+)))
4420
4421(define-public python-olefile
4422 (package
4423 (name "python-olefile")
5bef0f10 4424 (version "0.46")
44d10b1f
RW
4425 (source
4426 (origin
4427 (method url-fetch)
5bef0f10
MB
4428 (uri (string-append "https://github.com/decalage2/olefile/releases/"
4429 "download/v" version "/olefile-" version ".tar.gz"))
44d10b1f
RW
4430 (file-name (string-append name "-" version ".tar.gz"))
4431 (sha256
4432 (base32
5bef0f10 4433 "1kjxh4gr651hpqkjfv89cfzr40hyvf3vjlda7mifiail83j7j07m"))))
44d10b1f 4434 (build-system python-build-system)
5bef0f10 4435 (home-page "https://www.decalage.info/python/olefileio")
44d10b1f
RW
4436 (synopsis "Read and write Microsoft OLE2 files.")
4437 (description
4438 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
4439Storage or Compound Document, Microsoft Office). It is an improved version of
4440the OleFileIO module from PIL, the Python Image Library.")
4441 (license license:bsd-3)))
4442
4443(define-public python2-olefile
4444 (package-with-python2 python-olefile))
4445
4446(define-public python-pillow
4447 (package
4448 (name "python-pillow")
5fbdd917 4449 (version "6.2.1")
44d10b1f
RW
4450 (source
4451 (origin
4452 (method url-fetch)
4453 (uri (pypi-uri "Pillow" version))
4454 (sha256
4455 (base32
5fbdd917 4456 "1c8wkzc58f5wdh006jvmwdk3wxld1xgagcbdvj7iv17qi0m9fkmz"))))
44d10b1f
RW
4457 (build-system python-build-system)
4458 (native-inputs
4459 `(("python-pytest" ,python-pytest)))
4460 (inputs
4461 `(("freetype" ,freetype)
4462 ("lcms" ,lcms)
4bd428a7 4463 ("libjpeg" ,libjpeg-turbo)
44d10b1f 4464 ("libtiff" ,libtiff)
0c4e1c5f
EF
4465 ("libwebp" ,libwebp)
4466 ("openjpeg" ,openjpeg)
4467 ("zlib" ,zlib)))
44d10b1f
RW
4468 (propagated-inputs
4469 `(("python-olefile" ,python-olefile)))
4470 (arguments
4471 `(#:phases
4472 (modify-phases %standard-phases
4473 (add-after 'unpack 'patch-ldconfig
4474 (lambda _
4475 (substitute* "setup.py"
4476 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
61b77ff3 4477 (replace 'check
979d8464
EF
4478 (lambda* (#:key outputs inputs tests? #:allow-other-keys)
4479 (if tests?
4480 (begin
4481 (setenv "HOME" (getcwd))
4482 ;; Make installed package available for running the tests.
4483 (add-installed-pythonpath inputs outputs)
4484 (invoke "python" "selftest.py" "--installed")
4485 (invoke "python" "-m" "pytest" "-vv"))
4486 #t))))))
44d10b1f
RW
4487 (home-page "https://python-pillow.org")
4488 (synopsis "Fork of the Python Imaging Library")
4489 (description
4490 "The Python Imaging Library adds image processing capabilities to your
4491Python interpreter. This library provides extensive file format support, an
4492efficient internal representation, and fairly powerful image processing
4493capabilities. The core image library is designed for fast access to data
4494stored in a few basic pixel formats. It should provide a solid foundation for
4495a general image processing tool.")
4496 (license (license:x11-style
4497 "http://www.pythonware.com/products/pil/license.htm"
4498 "The PIL Software License"))))
4499
4500(define-public python2-pillow
4501 (package-with-python2 python-pillow))
4502
4503(define-public python-pycparser
4504 (package
4505 (name "python-pycparser")
c6c0940e 4506 (version "2.19")
44d10b1f
RW
4507 (source
4508 (origin
4509 (method url-fetch)
4510 (uri (pypi-uri "pycparser" version))
4511 (sha256
4512 (base32
c6c0940e 4513 "1cr5dcj9628lkz1qlwq3fv97c25363qppkmcayqvd05dpy573259"))))
44d10b1f
RW
4514 (outputs '("out" "doc"))
4515 (build-system python-build-system)
4516 (native-inputs
4517 `(("pkg-config" ,pkg-config)))
4518 (arguments
4519 `(#:phases
4520 (modify-phases %standard-phases
4521 (replace 'check
4522 (lambda _
4523 (with-directory-excursion "tests"
acb75c03
RW
4524 (invoke "python" "all_tests.py"))
4525 #t))
44d10b1f
RW
4526 (add-after 'install 'install-doc
4527 (lambda* (#:key outputs #:allow-other-keys)
4528 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4529 (doc (string-append data "/doc/" ,name "-" ,version))
4530 (examples (string-append doc "/examples")))
4531 (mkdir-p examples)
4532 (for-each (lambda (file)
4533 (copy-file (string-append "." file)
4534 (string-append doc file)))
4535 '("/README.rst" "/CHANGES" "/LICENSE"))
c6c0940e
MB
4536 (copy-recursively "examples" examples)
4537 #t))))))
44d10b1f
RW
4538 (home-page "https://github.com/eliben/pycparser")
4539 (synopsis "C parser in Python")
4540 (description
4541 "Pycparser is a complete parser of the C language, written in pure Python
4542using the PLY parsing library. It parses C code into an AST and can serve as
4543a front-end for C compilers or analysis tools.")
4544 (license license:bsd-3)))
4545
4546(define-public python2-pycparser
4547 (package-with-python2 python-pycparser))
4548
4549(define-public python-pywavelets
4550 (package
4551 (name "python-pywavelets")
4552 (version "1.0.1")
4553 (home-page "https://github.com/PyWavelets/pywt")
4554 (source (origin
4555 (method url-fetch)
4556 (uri (pypi-uri "PyWavelets" version))
4557 (sha256
4558 (base32
4559 "1p3qv2v66ghnqrb1f98wyyhp9dz71jwcd6kfpsax65sfdpiyqp1w"))))
4560 (build-system python-build-system)
4561 (arguments
4562 '(#:modules ((ice-9 ftw)
4563 (srfi srfi-1)
4564 (srfi srfi-26)
4565 (guix build utils)
4566 (guix build python-build-system))
4567 #:phases (modify-phases %standard-phases
4568 (replace 'check
4569 (lambda _
4570 (let ((cwd (getcwd))
4571 (libdir (find (cut string-prefix? "lib." <>)
4572 (scandir "build"))))
4573 (with-directory-excursion (string-append cwd "/build/" libdir)
4574 (invoke "nosetests" "-v" "."))))))))
4575 (native-inputs
4576 `(("python-matplotlib" ,python-matplotlib) ;for tests
4577 ("python-nose" ,python-nose)))
4578 (propagated-inputs
4579 `(("python-numpy" ,python-numpy)))
4580 (synopsis "Wavelet transforms in Python")
4581 (description
4582 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
4583mathematical basis functions that are localized in both time and frequency.
4584Wavelet transforms are time-frequency transforms employing wavelets. They are
4585similar to Fourier transforms, the difference being that Fourier transforms are
4586localized only in frequency instead of in time and frequency.")
4587 (license license:expat)))
4588
4589(define-public python2-pywavelets
4590 (package-with-python2 python-pywavelets))
4591
4592(define-public python-xcffib
4593 (package
4594 (name "python-xcffib")
4595 (version "0.6.0")
4596 (source
4597 (origin
4598 (method url-fetch)
4599 (uri (pypi-uri "xcffib" version))
4600 (sha256
4601 (base32
4602 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
4603 (build-system python-build-system)
4604 (inputs
4605 `(("libxcb" ,libxcb)))
4606 (propagated-inputs
4607 `(("python-cffi" ,python-cffi) ; used at run time
4608 ("python-six" ,python-six)))
4609 (arguments
4610 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
4611 #:tests? #f
4612 #:phases
4613 (modify-phases %standard-phases
4614 (add-after 'unpack 'fix-libxcb-path
4615 (lambda* (#:key inputs #:allow-other-keys)
4616 (let ((libxcb (assoc-ref inputs "libxcb")))
4617 (substitute* '("xcffib/__init__.py")
4618 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
4619 #t)))
4620 (add-after 'install 'install-doc
4621 (lambda* (#:key outputs #:allow-other-keys)
4622 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4623 "/doc/" ,name "-" ,version)))
4624 (mkdir-p doc)
4625 (copy-file "README.md"
4626 (string-append doc "/README.md"))
4627 #t))))))
4628 (home-page "https://github.com/tych0/xcffib")
4629 (synopsis "XCB Python bindings")
4630 (description
4631 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4632support for Python 3 and PyPy. It is based on cffi.")
4633 (license license:expat)))
4634
4635(define-public python2-xcffib
4636 (package-with-python2 python-xcffib))
4637
4638(define-public python-cairocffi
4639 (package
4640 (name "python-cairocffi")
4641 (version "0.9.0")
4642 (source
4643 (origin
4644 (method url-fetch)
4645 (uri (pypi-uri "cairocffi" version))
4646 (sha256
4647 (base32
4648 "0dq3k4zhqd8cwsf3nyjqvjqm8wkvrjn1wjf44rl3v0h8kqx6qf0m"))
4649 (patches (search-patches "python-cairocffi-dlopen-path.patch"))))
4650 (build-system python-build-system)
4651 (outputs '("out" "doc"))
4652 (inputs
4653 `(("glib" ,glib)
4654 ("gtk+" ,gtk+)
4655 ("gdk-pixbuf" ,gdk-pixbuf)
4656 ("cairo" ,cairo)
4657 ("pango" ,pango)))
4658 (native-inputs
4659 `(("pkg-config" ,pkg-config)
4660 ("python-pytest" ,python-pytest)
4661 ("python-pytest-cov" ,python-pytest-cov)
4662 ("python-pytest-runner" ,python-pytest-runner)
4663 ("python-sphinx" ,python-sphinx)
4664 ("python-docutils" ,python-docutils)))
4665 (propagated-inputs
4666 `(("python-xcffib" ,python-xcffib))) ; used at run time
4667 (arguments
4668 `(#:phases
4669 (modify-phases %standard-phases
4670 (add-after 'unpack 'patch-paths
4671 (lambda* (#:key inputs outputs #:allow-other-keys)
4672 (substitute* (find-files "." "\\.py$")
4673 (("dlopen\\(ffi, 'cairo'")
4674 (string-append "dlopen(ffi, '" (assoc-ref inputs "cairo")
4675 "/lib/libcairo.so.2'"))
4676 (("dlopen\\(ffi, 'gdk-3'")
4677 (string-append "dlopen(ffi, '" (assoc-ref inputs "gtk+")
4678 "/lib/libgtk-3.so.0'"))
4679 (("dlopen\\(ffi, 'gdk_pixbuf-2.0'")
4680 (string-append "dlopen(ffi, '" (assoc-ref inputs "gdk-pixbuf")
4681 "/lib/libgdk_pixbuf-2.0.so.0'"))
4682 (("dlopen\\(ffi, 'glib-2.0'")
4683 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4684 "/lib/libglib-2.0.so.0'"))
4685 (("dlopen\\(ffi, 'gobject-2.0'")
4686 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4687 "/lib/libgobject-2.0.so.0'"))
4688 (("dlopen\\(ffi, 'pangocairo-1.0'")
4689 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4690 "/lib/libpangocairo-1.0.so.0'"))
4691 (("dlopen\\(ffi, 'pango-1.0'")
4692 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4693 "/lib/libpango-1.0.so.0'")))
4694 #t))
4695 (add-after 'install 'install-doc
4696 (lambda* (#:key inputs outputs #:allow-other-keys)
4697 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4698 (doc (string-append data "/doc/" ,name "-" ,version))
4699 (html (string-append doc "/html")))
4700 (setenv "LD_LIBRARY_PATH"
4701 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4702 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4703 (setenv "LANG" "en_US.UTF-8")
4704 (mkdir-p html)
4705 (for-each (lambda (file)
4706 (copy-file (string-append "." file)
4707 (string-append doc file)))
4708 '("/README.rst" "/CHANGES" "/LICENSE"))
4709 (system* "python" "setup.py" "build_sphinx")
4710 (copy-recursively "docs/_build/html" html)
4711 #t))))))
4712 (home-page "https://github.com/Kozea/cairocffi")
4713 (synopsis "Python bindings and object-oriented API for Cairo")
4714 (description
4715 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4716Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4717graphics library with support for multiple backends including image buffers,
4718PNG, PostScript, PDF, and SVG file output.")
4719 (license license:bsd-3)))
4720
4721(define-public python2-cairocffi
4722 (package-with-python2 python-cairocffi))
4723
4724(define-public python-decorator
4725 (package
4726 (name "python-decorator")
4727 (version "4.3.0")
4728 (source
4729 (origin
4730 (method url-fetch)
4731 (uri (pypi-uri "decorator" version))
4732 (sha256
4733 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
4734 (build-system python-build-system)
4735 (home-page "https://pypi.python.org/pypi/decorator/")
4736 (synopsis "Python module to simplify usage of decorators")
4737 (description
4738 "The aim of the decorator module is to simplify the usage of decorators
4739for the average programmer, and to popularize decorators usage giving examples
4740of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4741etc. The core of this module is a decorator factory.")
4742 (license license:expat)))
4743
4744(define-public python2-decorator
4745 (package-with-python2 python-decorator))
4746
4747(define-public python-drmaa
4748 (package
4749 (name "python-drmaa")
4750 (version "0.7.7")
4751 (source
4752 (origin
4753 (method url-fetch)
4754 (uri (pypi-uri "drmaa" version))
4755 (sha256
4756 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
4757 (build-system python-build-system)
4758 ;; The test suite requires libdrmaa which is provided by the cluster
4759 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4760 ;; should be set to the path of the libdrmaa library.
4761 (arguments '(#:tests? #f))
4762 (native-inputs
4763 `(("python-nose" ,python-nose)))
4764 (home-page "https://pypi.python.org/pypi/drmaa")
4765 (synopsis "Python bindings for the DRMAA library")
4766 (description
4767 "A Python package for Distributed Resource Management (DRM) job
4768submission and control. This package is an implementation of the DRMAA 1.0
4769Python language binding specification.")
4770 (license license:bsd-3)))
4771
4772(define-public python2-drmaa
4773 (package-with-python2 python-drmaa))
4774
4775(define-public python-grako
4776 (package
4777 (name "python-grako")
4778 (version "3.99.9")
4779 (source
4780 (origin
4781 (method url-fetch)
4782 (uri
4783 (pypi-uri "grako" version ".zip"))
4784 (sha256
4785 (base32
4786 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
4787 (build-system python-build-system)
4788 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
4789 (native-inputs
4790 `(("unzip" ,unzip)
4791 ("python-pytest" ,python-pytest)
4792 ("python-pytest-runner" ,python-pytest-runner)))
4793 (home-page "https://bitbucket.org/neogeny/grako")
4794 (synopsis "EBNF parser generator")
4795 (description
4796 "Grako takes a grammar in a variation of EBNF as input, and outputs a
4797memoizing PEG/Packrat parser in Python.")
4798 (license license:bsd-3)))
4799
4800(define-public python2-grako
4801 (package-with-python2 python-grako))
4802
4803(define-public python-gridmap
4804 (package
4805 (name "python-gridmap")
4806 (version "0.13.0")
4807 (source
4808 (origin
768fea0f
TGR
4809 (method git-fetch)
4810 (uri (git-reference
4811 (url "https://github.com/pygridtools/gridmap.git")
4812 (commit (string-append "v" version))))
4813 (file-name (git-file-name name version))
44d10b1f 4814 (sha256
768fea0f 4815 (base32 "1478lbwsr1w24cii2x01m2910fvh8r43ghnb78nc972a96hqiknm"))))
44d10b1f
RW
4816 (build-system python-build-system)
4817 (arguments
4818 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
4819 (propagated-inputs
4820 `(("python-psutil" ,python-psutil)
4821 ("python-drmaa" ,python-drmaa)
4822 ("python-pyzmq" ,python-pyzmq)))
4823 (home-page "https://github.com/pygridtools/gridmap")
4824 (synopsis "Create jobs on a cluster directly from Python")
4825 (description
4826 "Gridmap is a Python package to allow you to easily create jobs on the
4827cluster directly from Python. You can directly map Python functions onto the
4828cluster without needing to write any wrapper code yourself.")
4829 (license license:gpl3+)))
4830
4831(define-public python2-gridmap
4832 (package-with-python2 python-gridmap))
4833
4834(define-public python-honcho
4835 (package
4836 (name "python-honcho")
4837 (version "1.0.1")
4838 (source
4839 (origin
8524d130
TGR
4840 (method git-fetch)
4841 (uri (git-reference
4842 (url "https://github.com/nickstenning/honcho.git")
4843 (commit (string-append "v" version))))
4844 (file-name (git-file-name name version))
44d10b1f 4845 (sha256
8524d130 4846 (base32 "11bd87474qpif20xdcn0ra1idj5k16ka51i658wfpxwc6nzsn92b"))))
44d10b1f
RW
4847 (build-system python-build-system)
4848 (native-inputs
4849 `(("python-pytest" ,python-pytest)
4850 ("python-mock" ,python-mock)
4851 ("python-tox" ,python-tox)
4852 ("which" ,which))) ;for tests
4853 (propagated-inputs
4854 `(("python-jinja2" ,python-jinja2)))
4855 (arguments
4856 `(#:phases
4857 (modify-phases %standard-phases
4858 (delete 'check)
4859 (add-after 'install 'check
4860 (lambda* (#:key outputs inputs #:allow-other-keys)
4861 ;; fix honcho path in testsuite
4862 (substitute* "tests/conftest.py"
4863 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
4864 "/bin/honcho" "'")))
4865 ;; It's easier to run tests after install.
4866 ;; Make installed package available for running the tests
4867 (add-installed-pythonpath inputs outputs)
95b707fb 4868 (invoke "py.test" "-v"))))))
44d10b1f
RW
4869 (home-page "https://github.com/nickstenning/honcho")
4870 (synopsis "Manage Procfile-based applications")
4871 (description
4872 "A Procfile is a file which describes how to run an application
50fceab0 4873consisting of several processes. honcho starts all listed processes.
44d10b1f
RW
4874The output of all running processes is collected by honcho and
4875displayed.")
4876 (license license:expat)))
4877
4878(define-public python2-honcho
4879 (package-with-python2 python-honcho))
4880
4881(define-public python-pexpect
4882 (package
4883 (name "python-pexpect")
4884 (version "4.6.0")
4885 (source
4886 (origin
4887 (method url-fetch)
4888 (uri (pypi-uri "pexpect" version))
4889 (sha256
4890 (base32 "1fla85g47iaxxpjhp9vkxdnv4pgc7rplfy6ja491smrrk0jqi3ia"))))
4891 (build-system python-build-system)
4892 (arguments
4893 `(#:phases
4894 (modify-phases %standard-phases
4895 (add-before 'check 'prepare-tests
4896 (lambda _
4897 (substitute* (find-files "tests")
4898 (("/bin/ls") (which "ls"))
4899 (("/bin/echo") (which "echo"))
4900 (("/bin/which") (which "which"))
4901 ;; Many tests try to use the /bin directory which
4902 ;; is not present in the build environment.
4903 ;; Use one that's non-empty and unlikely to change.
4904 (("/bin'") "/dev'"))
4905 ;; XXX: Socket connection test gets "Connection reset by peer".
4906 ;; Why does it not work? Delete for now.
4907 (delete-file "tests/test_socket.py")
4908 #t))
4909 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
4910 (native-inputs
4911 `(("python-nose" ,python-nose)
4912 ("python-pytest" ,python-pytest)
4913 ("man-db" ,man-db)
4914 ("which" ,which)
4915 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
4916 (propagated-inputs
4917 `(("python-ptyprocess" ,python-ptyprocess)))
4918 (home-page "http://pexpect.readthedocs.org/")
4919 (synopsis "Controlling interactive console applications")
4920 (description
4921 "Pexpect is a pure Python module for spawning child applications;
4922controlling them; and responding to expected patterns in their output.
4923Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4924child application and control it as if a human were typing commands.")
4925 (license license:isc)))
4926
4927(define-public python2-pexpect
4928 (package-with-python2 python-pexpect))
4929
4930(define-public python-setuptools-scm
4931 (package
4932 (name "python-setuptools-scm")
85092643 4933 (version "3.2.0")
44d10b1f
RW
4934 (source (origin
4935 (method url-fetch)
4936 (uri (pypi-uri "setuptools_scm" version))
4937 (sha256
4938 (base32
85092643 4939 "0n3knn3p1sqlx31k2lahn7z9bacvlv8nhlfidj77vz50bxqlgasj"))))
44d10b1f
RW
4940 (build-system python-build-system)
4941 (home-page "https://github.com/pypa/setuptools_scm/")
4942 (synopsis "Manage Python package versions in SCM metadata")
4943 (description
4944 "Setuptools_scm handles managing your Python package versions in
4945@dfn{software configuration management} (SCM) metadata instead of declaring
4946them as the version argument or in a SCM managed file.")
4947 (license license:expat)))
4948
a0b2accf
MO
4949;; Needed by python-lazy-object-proxy, remove on next update cycle.
4950(define-public python-setuptools-scm-3.3
4951 (package
4952 (inherit python-setuptools-scm)
4953 (version "3.3.3")
4954 (source (origin
4955 (method url-fetch)
4956 (uri (pypi-uri "setuptools_scm" version))
4957 (sha256
4958 (base32
4959 "19cyndx23xmpbhz4qrwmfwsmnnaczd0dw7qg977ksq2dbvxy29dx"))))))
4960
44d10b1f
RW
4961(define-public python2-setuptools-scm
4962 (package-with-python2 python-setuptools-scm))
4963
bb74ea09
RW
4964(define-public python-pathlib2
4965 (package
4966 (name "python-pathlib2")
4967 (version "2.3.3")
4968 (source
4969 (origin
4970 (method url-fetch)
4971 (uri (pypi-uri "pathlib2" version))
4972 (sha256
4973 (base32
4974 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
4975 (build-system python-build-system)
4976 (propagated-inputs
4977 `(("python-scandir" ,python-scandir)
4978 ("python-six" ,python-six)))
4979 (home-page "https://pypi.python.org/pypi/pathlib2/")
746d3384 4980 (synopsis "Object-oriented file system paths")
bb74ea09
RW
4981 (description "The goal of pathlib2 is to provide a backport of the
4982standard @code{pathlib} module which tracks the standard library module, so
4983all the newest features of the standard @code{pathlib} can be used also on
4984older Python versions.")
4985 (license license:expat)))
4986
fd5c264a
MB
4987(define-public python2-importlib-resources
4988 (package
4989 (name "python2-importlib-resources")
4990 (version "1.0.2")
4991 (source (origin
4992 (method url-fetch)
4993 (uri (pypi-uri "importlib_resources" version))
4994 (sha256
4995 (base32
4996 "0y3hg12iby1qyaspnbisz4s4vxax7syikk3skznwqizqyv89y9yk"))))
4997 (build-system python-build-system)
4998 (arguments
4999 `(#:python ,python-2))
5000 (native-inputs
5001 `(("python-wheel" ,python2-wheel)))
5002 (propagated-inputs
5003 `(("python-pathlib2" ,python2-pathlib2)
5004 ("python-typing" ,python2-typing)))
5005 (home-page "https://gitlab.com/python-devs/importlib_resources")
5006 (synopsis "Backport of @code{importlib.resources} from Python 3.7")
5007 (description
5008 "This package provides an implementation of @code{importlib.resources}
5009for older versions of Python.")
5010 (license license:asl2.0)))
5011
15b65617
RW
5012(define-public python-importlib-metadata
5013 (package
5014 (name "python-importlib-metadata")
4dc04d11 5015 (version "1.4.0")
15b65617
RW
5016 (source
5017 (origin
5018 (method url-fetch)
5019 (uri (pypi-uri "importlib_metadata" version))
5020 (sha256
4dc04d11 5021 (base32 "1n76444v7zn910xrhh8954jdn4byxbn9f1jck6b85a716mbh2z7i"))))
15b65617
RW
5022 (build-system python-build-system)
5023 (propagated-inputs
4dc04d11 5024 `(("python-zipp" ,python-zipp)))
15b65617
RW
5025 (native-inputs
5026 `(("python-setuptools-scm" ,python-setuptools-scm)
4dc04d11 5027 ("python-packaging" ,python-packaging)))
15b65617
RW
5028 (home-page "https://importlib-metadata.readthedocs.io/")
5029 (synopsis "Read metadata from Python packages")
5030 (description
5031 "@code{importlib_metadata} is a library which provides an API for
5032accessing an installed Python package's metadata, such as its entry points or
5033its top-level name. This functionality intends to replace most uses of
5034@code{pkg_resources} entry point API and metadata API. Along with
5035@code{importlib.resources} in Python 3.7 and newer, this can eliminate the
5036need to use the older and less efficient @code{pkg_resources} package.")
3dfb3d44 5037 (properties `((python2-variant . ,(delay python2-importlib-metadata))))
15b65617
RW
5038 (license license:asl2.0)))
5039
5efa04dd
MB
5040(define-public python2-importlib-metadata
5041 (let ((base (package-with-python2 (strip-python2-variant
5042 python-importlib-metadata))))
5043 (package/inherit
5044 base
5045 (name "python2-importlib-metadata")
5046 (propagated-inputs
5047 `(("python-configparser" ,python2-configparser)
5048 ("python-contextlib2" ,python2-contextlib2)
5049 ("python-importlib-resources" ,python2-importlib-resources)
5050 ("python-pathlib2" ,python2-pathlib2)
5051 ,@(package-propagated-inputs base))))))
5052
37c173d1
RW
5053(define-public python-jaraco-packaging
5054 (package
5055 (name "python-jaraco-packaging")
5056 (version "6.1")
5057 (source
5058 (origin
5059 (method url-fetch)
5060 (uri (pypi-uri "jaraco.packaging" version))
5061 (sha256
5062 (base32
5063 "0zimrnkh33b9g8ffw11mjh6kvs54cy5gcjw1h5cl1r7dc833dmkm"))))
5064 (build-system python-build-system)
5065 (propagated-inputs
5066 `(("python-pytest" ,python-pytest)
5067 ("python-pytest-checkdocs" ,python-pytest-checkdocs)
5068 ("python-pytest-flake8" ,python-pytest-flake8)
5069 ("python-rst.linker" ,python-rst.linker)
5070 ("python-setuptools" ,python-setuptools)
5071 ("python-setuptools-scm" ,python-setuptools-scm)
5072 ("python-six" ,python-six)
5073 ("python-sphinx" ,python-sphinx)))
5074 (home-page "https://github.com/jaraco/jaraco.packaging")
5075 (synopsis "Tools to supplement packaging Python releases")
5076 (description
5077 "This package provides various tools to supplement packaging Python
5078releases.")
5079 (license license:expat)))
5080
44d10b1f
RW
5081(define-public python-pathpy
5082 (package
5083 (name "python-pathpy")
a3dd8871 5084 (version "11.5.1")
44d10b1f
RW
5085 (source
5086 (origin
5087 (method url-fetch)
5088 (uri (pypi-uri "path.py" version))
5089 (sha256
a3dd8871 5090 (base32 "0ir9j1haq2jbi7aip6k2fa9l7q1l03k4hp1awxhjhcwzsnwp3ll8"))))
49ad11e9 5091 (outputs '("out" "doc"))
44d10b1f
RW
5092 (build-system python-build-system)
5093 (propagated-inputs
01a53e0b
MC
5094 `(("python-appdirs" ,python-appdirs)
5095 ("python-importlib-metadata" ,python-importlib-metadata)))
44d10b1f
RW
5096 (native-inputs
5097 `(("python-setuptools-scm" ,python-setuptools-scm)
5098 ("python-sphinx" ,python-sphinx)
5099 ("python-rst.linker" ,python-rst.linker)
5100 ("python-pytest" ,python-pytest)
49ad11e9
RW
5101 ("python-pytest-runner" ,python-pytest-runner)
5102 ("python-jaraco-packaging" ,python-jaraco-packaging)))
44d10b1f 5103 (arguments
49ad11e9
RW
5104 `(#:phases
5105 (modify-phases %standard-phases
5106 (add-after 'build 'build-doc
5107 (lambda _
5108 (setenv "LANG" "en_US.UTF-8")
5109 (invoke "python" "setup.py" "build_sphinx")))
5110 (add-after 'install 'install-doc
5111 (lambda* (#:key outputs #:allow-other-keys)
5112 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5113 (doc (string-append data "/doc/" ,name "-" ,version))
5114 (html (string-append doc "/html")))
5115 (mkdir-p html)
5116 (for-each (lambda (file)
5117 (copy-file file (string-append doc "/" file)))
5118 '("README.rst" "CHANGES.rst"))
5119 (copy-recursively "build/sphinx/html" html)
5120 #t)))
5121 (replace 'check
5122 (lambda _
5123 ;; The import time test aborts if an import takes longer than
5124 ;; 100ms. It may very well take a little longer than that.
5125 (invoke "pytest" "-v" "-k" "not test_import_time"))))))
44d10b1f
RW
5126 (home-page "https://github.com/jaraco/path.py")
5127 (synopsis "Python module wrapper for built-in os.path")
5128 (description
5129 "@code{path.py} implements path objects as first-class entities, allowing
5130common operations on files to be invoked on those path objects directly.")
5131 (license license:expat)))
5132
5133(define-public python2-pathpy
5134 (package-with-python2 python-pathpy))
5135
5136(define-public python-simplegeneric
5137 (package
5138 (name "python-simplegeneric")
5139 (version "0.8.1")
5140 (source
5141 (origin
5142 (method url-fetch)
6c8c3980 5143 (uri (pypi-uri "simplegeneric" version ".zip"))
44d10b1f
RW
5144 (sha256
5145 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
5146 (build-system python-build-system)
5147 (native-inputs
5148 `(("unzip" ,unzip)))
5149 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
5150 (synopsis "Python module for simple generic functions")
5151 (description
5152 "The simplegeneric module lets you define simple single-dispatch generic
5153functions, akin to Python’s built-in generic functions like @code{len()},
5154@code{iter()} and so on. However, instead of using specially-named methods,
5155these generic functions use simple lookup tables, akin to those used by
5156e.g. @code{pickle.dump()} and other generic functions found in the Python
5157standard library.")
5158 (license license:zpl2.1)))
5159
5160(define-public python2-simplegeneric
5161 (package-with-python2 python-simplegeneric))
5162
5163(define-public python-ipython-genutils
5164 ;; TODO: This package is retired, check if can be removed, see description.
5165 (package
5166 (name "python-ipython-genutils")
5167 (version "0.1.0")
5168 (source
5169 (origin
5170 (method url-fetch)
c9671d4b 5171 (uri (pypi-uri "ipython_genutils" version))
44d10b1f
RW
5172 (sha256
5173 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
5174 (build-system python-build-system)
5175 (arguments `(#:tests? #f)) ; no tests
5176 (home-page "https://ipython.org")
5177 (synopsis "Vestigial utilities from IPython")
5178 (description
5179 "This package provides retired utilities from IPython. No packages
5180outside IPython/Jupyter should depend on it.
5181
5182This package shouldn't exist. It contains some common utilities shared by
5183Jupyter and IPython projects during The Big Split. As soon as possible, those
5184packages will remove their dependency on this, and this package will go
5185away.")
5186 (license license:bsd-3)))
5187
5188(define-public python2-ipython-genutils
5189 (package-with-python2 python-ipython-genutils))
5190
5191(define-public python-traitlets
5192 (package
5193 (name "python-traitlets")
ac5e205a 5194 (version "4.3.3")
44d10b1f
RW
5195 (source
5196 (origin
5197 (method url-fetch)
5198 (uri (pypi-uri "traitlets" version))
5199 (sha256
5200 (base32
ac5e205a 5201 "1xsrwgivpkxlbr4dfndfsi098s29yqgswgjc1qqn69yxklvfw8yh"))))
44d10b1f
RW
5202 (build-system python-build-system)
5203 (arguments
5204 `(#:phases
5205 (modify-phases %standard-phases
5206 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
5207 (propagated-inputs
5208 `(("python-ipython-genutils" ,python-ipython-genutils)
ac5e205a 5209 ("python-decorator" ,python-decorator)))
44d10b1f
RW
5210 (native-inputs
5211 `(("python-pytest" ,python-pytest)))
5212 (properties `((python2-variant . ,(delay python2-traitlets))))
5213 (home-page "https://ipython.org")
5214 (synopsis "Configuration system for Python applications")
5215 (description
5216 "Traitlets is a framework that lets Python classes have attributes with
5217type checking, dynamically calculated default values, and ‘on change’
5218callbacks. The package also includes a mechanism to use traitlets for
5219configuration, loading values from files or from command line arguments. This
5220is a distinct layer on top of traitlets, so you can use traitlets in your code
5221without using the configuration machinery.")
5222 (license license:bsd-3)))
5223
5224(define-public python2-traitlets
5225 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
5226 (package
5227 (inherit traitlets)
5228 (propagated-inputs
5229 `(("python2-enum34" ,python2-enum34)
5230 ,@(package-propagated-inputs traitlets))))))
5231
5232(define-public python-jupyter-core
5233 (package
5234 (name "python-jupyter-core")
5235 (version "4.4.0")
5236 (source
5237 (origin
5238 (method url-fetch)
5239 (uri (string-append (pypi-uri "jupyter_core" version)))
5240 (sha256
5241 (base32
5242 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
5243 (build-system python-build-system)
5244 ;; FIXME: not sure how to run the tests
5245 (arguments `(#:tests? #f))
5246 (propagated-inputs
5247 `(("python-traitlets" ,python-traitlets)))
5248 (home-page "http://jupyter.org/")
5249 (synopsis "Jupyter base package")
5250 (description
5251 "Jupyter core is the base package on which Jupyter projects rely.")
5252 (license license:bsd-3)))
5253
5254(define-public python2-jupyter-core
5255 (package-with-python2 python-jupyter-core))
5256
5257(define-public python-jupyter-client
5258 (package
5259 (name "python-jupyter-client")
5260 (version "5.2.4")
5261 (source
5262 (origin
5263 (method url-fetch)
5264 (uri (pypi-uri "jupyter_client" version))
5265 (sha256
5266 (base32
5267 "0l9mh7ccrpl3lppym3dnky8n1nk7xarzzdcxf4q2s7aw203cpydm"))))
5268 (build-system python-build-system)
5269 ;; Tests fail because of missing native python kernel which I assume is
5270 ;; provided by the ipython package, which we cannot use because it would
5271 ;; cause a dependency cycle.
ddc586ea
LC
5272 (arguments
5273 `(#:tests? #f
5274
5275 #:phases (modify-phases %standard-phases
5276 (add-after 'unpack 'set-tool-file-names
5277 (lambda* (#:key inputs #:allow-other-keys)
5278 (let ((iproute (assoc-ref inputs "iproute")))
5279 (substitute* "jupyter_client/localinterfaces.py"
5280 (("'ip'")
5281 (string-append "'" iproute "/sbin/ip'")))
5282 #t))))))
5283 (inputs
5284 `(("iproute" ,iproute)))
44d10b1f
RW
5285 (propagated-inputs
5286 `(("python-pyzmq" ,python-pyzmq)
5287 ("python-traitlets" ,python-traitlets)
5288 ("python-jupyter-core" ,python-jupyter-core)))
5289 (home-page "http://jupyter.org/")
5290 (synopsis "Jupyter protocol implementation and client libraries")
5291 (description
5292 "The @code{jupyter_client} package contains the reference implementation
5293of the Jupyter protocol. It also provides client and kernel management APIs
5294for working with kernels, and the @code{jupyter kernelspec} entrypoint for
5295installing @code{kernelspec}s for use with Jupyter frontends.")
5296 (license license:bsd-3)))
5297
5298(define-public python2-jupyter-client
5299 (package-with-python2 python-jupyter-client))
5300
5301(define-public python-ipykernel
5302 (package
5303 (name "python-ipykernel")
08d0a355 5304 (version "5.1.3")
44d10b1f
RW
5305 (source
5306 (origin
5307 (method url-fetch)
5308 (uri (pypi-uri "ipykernel" version))
5309 (sha256
08d0a355 5310 (base32 "1a08y677lpn80qzvv7z0smgggmr5m5ayf0bs6vds47xpxl9sss5k"))))
44d10b1f
RW
5311 (build-system python-build-system)
5312 (arguments
5313 `(#:phases
5314 (modify-phases %standard-phases
5315 (replace 'check
5316 (lambda _
5317 (setenv "HOME" "/tmp")
5318 (invoke "pytest" "-v")
aa856d02
LC
5319 #t))
5320 (add-after 'install 'set-python-file-name
5321 (lambda* (#:key outputs #:allow-other-keys)
5322 ;; Record the absolute file name of the 'python' executable in
5323 ;; 'kernel.json'.
5324 (let ((out (assoc-ref outputs "out")))
5325 (substitute* (string-append out "/share/jupyter"
5326 "/kernels/python3/kernel.json")
5327 (("\"python\"")
5328 (string-append "\"" (which "python") "\"")))
5329 #t))))))
44d10b1f
RW
5330 (propagated-inputs
5331 `(("python-ipython" ,python-ipython)
5332 ;; imported at runtime during connect
5333 ("python-jupyter-client" ,python-jupyter-client)))
5334 (native-inputs
08d0a355
TGR
5335 `(("python-flaky" ,python-flaky)
5336 ("python-nose" ,python-nose)
5337 ("python-pytest" ,python-pytest)))
44d10b1f
RW
5338 (home-page "https://ipython.org")
5339 (synopsis "IPython Kernel for Jupyter")
5340 (description
5341 "This package provides the IPython kernel for Jupyter.")
5342 (license license:bsd-3)))
5343
0f378947 5344;; Version 5.1.1 and above no longer support Python 2.
44d10b1f 5345(define-public python2-ipykernel
0f378947
RW
5346 (package
5347 (name "python2-ipykernel")
5348 (version "5.1.0")
5349 (source
5350 (origin
5351 (method url-fetch)
5352 (uri (pypi-uri "ipykernel" version))
5353 (sha256
5354 (base32 "0br95qhrd5k65g10djngiy27hs0642301hlf2q142i8djabvzh0g"))))
5355 (build-system python-build-system)
5356 (arguments
5357 `(#:python ,python-2
5358 #:phases
5359 (modify-phases %standard-phases
5360 (replace 'check
5361 (lambda _
5362 (setenv "HOME" "/tmp")
5363 (invoke "pytest" "-v")
5364 #t)))))
5365 (propagated-inputs
5366 `(("python2-ipython" ,python2-ipython)
5367 ;; imported at runtime during connect
5368 ("python2-jupyter-client" ,python2-jupyter-client)))
5369 (native-inputs
5370 `(("python2-pytest" ,python2-pytest)
5371 ("python2-nose" ,python2-nose)))
5372 (home-page "https://ipython.org")
5373 (synopsis "IPython Kernel for Jupyter")
5374 (description
5375 "This package provides the IPython kernel for Jupyter.")
5376 (license license:bsd-3)))
44d10b1f 5377
966aa714
AE
5378(define-public python-pari-jupyter
5379 (package
5380 (name "python-pari-jupyter")
5381 (version "1.3.2")
5382 (source
5383 (origin
5384 (method url-fetch)
5385 (uri (pypi-uri "pari_jupyter" version))
5386 (sha256
5387 (base32
5388 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
5389 (build-system python-build-system)
5390 (propagated-inputs
5391 `(("python-ipykernel" ,python-ipykernel)))
5392 (inputs
5393 `(("pari-gp" ,pari-gp)
5394 ("readline" ,readline)))
5395 (arguments
5396 `(#:tests? #f)) ; no test suite
5397 (home-page
5398 "https://github.com/jdemeyer/pari_jupyter")
5399 (synopsis "A Jupyter kernel for PARI/GP")
5400 (description "The package provides a PARI/GP kernel for Jupyter.")
5401 (license license:gpl3+)))
5402
dede052a
RW
5403(define-public python-backcall
5404 (package
5405 (name "python-backcall")
5406 (version "0.1.0")
5407 (source
5408 (origin
5409 (method url-fetch)
5410 (uri (pypi-uri "backcall" version))
5411 (sha256
5412 (base32
5413 "1r01dqch3f8fdj3n6fviw8hxqrs6w5v0qw4izmvqzry1w9dxiv1q"))))
5414 (build-system python-build-system)
5415 (home-page "https://github.com/takluyver/backcall/")
5416 (synopsis "Specifications for callback functions passed in to an API")
5417 (description
5418 "If your code lets other people supply callback functions, it's important
5419to specify the function signature you expect, and check that functions support
5420that. Adding extra parameters later would break other peoples code unless
5421you're careful. The @code{backcall} package provides a way of specifying the
5422callback signature using a prototype function.")
5423 (license license:bsd-3)))
5424
44d10b1f
RW
5425;; This is the latest release of the LTS version of ipython with support for
5426;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
8b5f756c
RW
5427;; dropped support for Python 2.7.
5428(define-public python2-ipython
44d10b1f 5429 (package
8b5f756c 5430 (name "python2-ipython")
44d10b1f
RW
5431 (version "5.8.0")
5432 (source
5433 (origin
5434 (method url-fetch)
5435 (uri (pypi-uri "ipython" version ".tar.gz"))
5436 (sha256
5437 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
5438 (build-system python-build-system)
44d10b1f 5439 (propagated-inputs
8b5f756c
RW
5440 `(("python2-backports-shutil-get-terminal-size"
5441 ,python2-backports-shutil-get-terminal-size)
5442 ("python2-pathlib2" ,python2-pathlib2)
5443 ("python2-pyzmq" ,python2-pyzmq)
5444 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
5445 ("python2-terminado" ,python2-terminado)
5446 ("python2-matplotlib" ,python2-matplotlib)
5447 ("python2-numpy" ,python2-numpy)
5448 ("python2-numpydoc" ,python2-numpydoc)
5449 ("python2-jinja2" ,python2-jinja2)
5450 ("python2-mistune" ,python2-mistune)
5451 ("python2-pexpect" ,python2-pexpect)
5452 ("python2-pickleshare" ,python2-pickleshare)
5453 ("python2-simplegeneric" ,python2-simplegeneric)
5454 ("python2-jsonschema" ,python2-jsonschema)
5455 ("python2-traitlets" ,python2-traitlets)
5456 ("python2-nbformat" ,python2-nbformat)
5457 ("python2-pygments" ,python2-pygments)))
5458 (inputs
5459 `(("readline" ,readline)
5460 ("which" ,which)))
5461 (native-inputs
5462 `(("graphviz" ,graphviz)
5463 ("pkg-config" ,pkg-config)
5464 ("python2-requests" ,python2-requests) ;; for tests
5465 ("python2-testpath" ,python2-testpath)
5466 ("python2-mock" ,python2-mock)
5467 ("python2-nose" ,python2-nose)))
5468 (arguments
5469 `(#:python ,python-2
5470 #:phases
5471 (modify-phases %standard-phases
5472 (add-before 'check 'delete-broken-tests
5473 (lambda* (#:key inputs #:allow-other-keys)
5474 ;; These tests throw errors for unknown reasons.
5475 (delete-file "IPython/core/tests/test_profile.py")
5476 (delete-file "IPython/core/tests/test_interactiveshell.py")
5477 (delete-file "IPython/core/tests/test_magic.py")
5478 #t)))))
5479 (home-page "https://ipython.org")
5480 (synopsis "IPython is a tool for interactive computing in Python")
5481 (description
5482 "IPython provides a rich architecture for interactive computing with:
5483Powerful interactive shells, a browser-based notebook, support for interactive
5484data visualization, embeddable interpreters and tools for parallel
5485computing.")
5486 (license license:bsd-3)))
5487
5488(define-public python-ipython
5489 (package
5490 (name "python-ipython")
ee515773 5491 (version "7.9.0")
8b5f756c
RW
5492 (source
5493 (origin
5494 (method url-fetch)
5495 (uri (pypi-uri "ipython" version ".tar.gz"))
5496 (sha256
ee515773 5497 (base32 "103jkw18z7fnwdal1mdbijjxi1fndzn31g887lmj7ddpf2r07lyz"))))
8b5f756c
RW
5498 (build-system python-build-system)
5499 (propagated-inputs
5500 `(("python-backcall" ,python-backcall)
5501 ("python-pyzmq" ,python-pyzmq)
5502 ("python-prompt-toolkit" ,python-prompt-toolkit)
44d10b1f
RW
5503 ("python-terminado" ,python-terminado)
5504 ("python-matplotlib" ,python-matplotlib)
5505 ("python-numpy" ,python-numpy)
5506 ("python-numpydoc" ,python-numpydoc)
8b5f756c 5507 ("python-jedi" ,python-jedi)
44d10b1f
RW
5508 ("python-jinja2" ,python-jinja2)
5509 ("python-mistune" ,python-mistune)
5510 ("python-pexpect" ,python-pexpect)
5511 ("python-pickleshare" ,python-pickleshare)
5512 ("python-simplegeneric" ,python-simplegeneric)
5513 ("python-jsonschema" ,python-jsonschema)
5514 ("python-traitlets" ,python-traitlets)
5515 ("python-nbformat" ,python-nbformat)
5516 ("python-pygments" ,python-pygments)))
5517 (inputs
5518 `(("readline" ,readline)
5519 ("which" ,which)))
5520 (native-inputs
5521 `(("graphviz" ,graphviz)
5522 ("pkg-config" ,pkg-config)
5523 ("python-requests" ,python-requests) ;; for tests
5524 ("python-testpath" ,python-testpath)
8b5f756c 5525 ("python-nose" ,python-nose)))
44d10b1f
RW
5526 (arguments
5527 `(#:phases
5528 (modify-phases %standard-phases
0f272518
RW
5529 (add-after 'unpack 'make-docs-reproducible
5530 (lambda _
5531 (substitute* "IPython/sphinxext/ipython_directive.py"
5532 ((".*import datetime") "")
5533 ((".*datetime.datetime.now\\(\\)") "")
5534 (("%timeit") "# %timeit"))
5535 #t))
44d10b1f
RW
5536 ;; Tests can only be run after the library has been installed and not
5537 ;; within the source directory.
5538 (delete 'check)
5539 (add-after 'install 'check
5540 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5541 (if tests?
5542 (begin
5543 ;; Make installed package available for running the tests
5544 (add-installed-pythonpath inputs outputs)
5545 (setenv "HOME" "/tmp/") ;; required by a test
5546 ;; We only test the core because one of the other tests
5547 ;; tries to import ipykernel.
5548 (invoke "python" "IPython/testing/iptest.py"
5549 "-v" "IPython/core/tests"))
5550 #t)))
5551 (add-before 'check 'fix-tests
5552 (lambda* (#:key inputs #:allow-other-keys)
5553 (substitute* "./IPython/utils/_process_posix.py"
5554 (("/usr/bin/env', 'which") (which "which")))
5555 (substitute* "./IPython/core/tests/test_inputtransformer.py"
5556 (("#!/usr/bin/env python")
5557 (string-append "#!" (which "python"))))
44d10b1f
RW
5558 ;; This test introduces a circular dependency on ipykernel
5559 ;; (which depends on ipython).
5560 (delete-file "IPython/core/tests/test_display.py")
8b5f756c 5561 ;; AttributeError: module 'IPython.core' has no attribute 'formatters'
44d10b1f 5562 (delete-file "IPython/core/tests/test_interactiveshell.py")
44d10b1f
RW
5563 #t)))))
5564 (home-page "https://ipython.org")
5565 (synopsis "IPython is a tool for interactive computing in Python")
5566 (description
5567 "IPython provides a rich architecture for interactive computing with:
5568Powerful interactive shells, a browser-based notebook, support for interactive
5569data visualization, embeddable interpreters and tools for parallel
5570computing.")
8b5f756c 5571 (license license:bsd-3)))
44d10b1f 5572
8b5f756c
RW
5573(define-public python-ipython-documentation
5574 (package
5575 (inherit python-ipython)
5576 (name "python-ipython-documentation")
5577 (version (package-version python-ipython))
5578 (arguments
5579 `(#:phases
5580 (modify-phases %standard-phases
5581 (delete 'build)
5582 (delete 'check)
5583 (replace 'install
5584 (lambda* (#:key outputs #:allow-other-keys)
5585 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
5586 (doc (string-append data "/doc/" ,name "-" ,version))
5587 (html (string-append doc "/html"))
5588 (man1 (string-append data "/man/man1"))
5589 (info (string-append data "/info"))
5590 (examples (string-append doc "/examples"))
5591 (python-arg (string-append "PYTHON=" (which "python"))))
5592 (setenv "LANG" "en_US.utf8")
5593 (with-directory-excursion "docs"
5594 ;; FIXME: pdf fails to build
5595 ;;(system* "make" "pdf" "PAPER=a4")
5596 (system* "make" python-arg "html")
5597 ;; FIXME: the generated texi file contains ^@^@, which trips
5598 ;; up the parser.
5599 ;; (system* "make" python-arg "info")
5600 )
5601 (copy-recursively "docs/man" man1)
5602 (copy-recursively "examples" examples)
5603 (copy-recursively "docs/build/html" html)
5604 ;; (copy-file "docs/build/latex/ipython.pdf"
5605 ;; (string-append doc "/ipython.pdf"))
5606 (mkdir-p info)
5607 ;; (copy-file "docs/build/texinfo/ipython.info"
5608 ;; (string-append info "/ipython.info"))
5609 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
5610 #t)))))
5611 (inputs
5612 `(("python-ipython" ,python-ipython)
5613 ("python-ipykernel" ,python-ipykernel)))
5614 (native-inputs
5615 `(("python-sphinx" ,python-sphinx)
5616 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
5617 ;; FIXME: It's possible that a smaller union would work just as well.
f75aa97f 5618 ("texlive" ,(texlive-union (list texlive-amsfonts
8b5f756c
RW
5619 texlive-fonts-ec
5620 texlive-generic-ifxetex
5621 texlive-generic-pdftex
8b5f756c
RW
5622 texlive-latex-capt-of
5623 texlive-latex-cmap
5624 texlive-latex-environ
5625 texlive-latex-eqparbox
5626 texlive-latex-etoolbox
5627 texlive-latex-expdlist
5628 texlive-latex-fancyhdr
5629 texlive-latex-fancyvrb
5630 texlive-latex-fncychap
5631 texlive-latex-float
5632 texlive-latex-framed
5633 texlive-latex-geometry
5634 texlive-latex-graphics
5635 texlive-latex-hyperref
5636 texlive-latex-mdwtools
5637 texlive-latex-multirow
5638 texlive-latex-needspace
5639 texlive-latex-oberdiek
5640 texlive-latex-parskip
5641 texlive-latex-preview
5642 texlive-latex-tabulary
5643 texlive-latex-threeparttable
5644 texlive-latex-titlesec
5645 texlive-latex-trimspaces
5646 texlive-latex-ucs
5647 texlive-latex-upquote
5648 texlive-latex-url
5649 texlive-latex-varwidth
5650 texlive-latex-wrapfig)))
5651 ("texinfo" ,texinfo)))))
44d10b1f
RW
5652
5653(define-public python-urwid
5654 (package
5655 (name "python-urwid")
5656 (version "2.0.1")
5657 (source
5658 (origin
5659 (method url-fetch)
5660 (uri (pypi-uri "urwid" version))
5661 (sha256
5662 (base32
5663 "1g6cpicybvbananpjikmjk8npmjk4xvak1wjzji62wc600wkwkb4"))))
5664 (build-system python-build-system)
5665 (home-page "http://urwid.org")
5666 (synopsis "Console user interface library for Python")
5667 (description
5668 "Urwid is a curses-based UI/widget library for Python. It includes many
5669features useful for text console applications.")
5670 (license license:lgpl2.1+)))
5671
5672(define-public python2-urwid
5673 (package-with-python2 python-urwid))
5674
5675(define-public python-urwidtrees
5676 (package
5677 (name "python-urwidtrees")
5678 (version "1.0.2")
5679 (source
5680 (origin
c8364072 5681 (method git-fetch)
44d10b1f
RW
5682 ;; package author intends on distributing via github rather than pypi:
5683 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
c8364072
EF
5684 (uri (git-reference
5685 (url "https://github.com/pazz/urwidtrees")
5686 (commit version)))
5687 (file-name (git-file-name name version))
44d10b1f
RW
5688 (sha256
5689 (base32
c8364072 5690 "1n1kpidvkdnsqyb82vlvk78gmly96kh8351lqxn2pzgwwns6fml2"))))
44d10b1f
RW
5691 (build-system python-build-system)
5692 (arguments
26bb7fc6
EF
5693 '(#:use-setuptools? #f
5694 #:tests? #f)) ; no tests
44d10b1f
RW
5695 (propagated-inputs `(("python-urwid" ,python-urwid)))
5696 (home-page "https://github.com/pazz/urwidtrees")
5697 (synopsis "Tree widgets for urwid")
5698 (description "Urwidtrees is a Widget Container API for the @code{urwid}
5699toolkit. Use it to build trees of widgets.")
5700 (license license:gpl3+)))
5701
5702(define-public python2-urwidtrees
5703 (package-with-python2 python-urwidtrees))
5704
5705(define-public python-ua-parser
5706 (package
5707 (name "python-ua-parser")
5708 (version "0.8.0")
5709 (source
5710 (origin
5711 (method url-fetch)
5712 (uri (pypi-uri "ua-parser" version))
5713 (sha256
5714 (base32
5715 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
5716 (build-system python-build-system)
5717 (arguments
5718 `(#:tests? #f)) ;no test suite in release
5719 (native-inputs
5720 `(("python-pyyaml" ,python-pyyaml)))
5721 (home-page "https://github.com/ua-parser/uap-python")
5722 (synopsis "User agent parser")
5723 (description
5724 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
5725 (license license:asl2.0)))
5726
5727(define-public python2-ua-parser
5728 (package-with-python2 python-ua-parser))
5729
5730(define-public python-user-agents
5731 (package
5732 (name "python-user-agents")
5733 (version "1.1.0")
5734 (source
5735 (origin
5736 (method url-fetch)
5737 (uri (pypi-uri "user-agents" version))
5738 (sha256
5739 (base32
5740 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
5741 (build-system python-build-system)
5742 (arguments
5743 `(#:tests? #f)) ;missing devices.json test file in release
5744 (propagated-inputs
5745 `(("python-ua-parser" ,python-ua-parser)))
5746 (home-page "https://github.com/selwin/python-user-agents")
5747 (synopsis "User Agent strings parsing library")
5748 (description
5749 "A library to identify devices (phones, tablets) and their capabilities by
5750parsing (browser/HTTP) user agent strings.")
5751 (license license:expat)))
5752
5753(define-public python2-user-agents
5754 (package-with-python2 python-user-agents))
5755
5756(define-public python-dbus
5757 (package
5758 (name "python-dbus")
ba5ef999 5759 (version "1.2.14")
44d10b1f
RW
5760 (source
5761 (origin
5762 (method url-fetch)
5763 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
5764 "dbus-python-" version ".tar.gz"))
5765 (sha256
ba5ef999 5766 (base32 "0cdchkgnivlka4lf8q4qfk0yxq483i3r3aqickjf8hfn7nx0c0mi"))))
44d10b1f 5767 (build-system gnu-build-system)
44d10b1f
RW
5768 (native-inputs
5769 `(("pkg-config" ,pkg-config)))
5770 (inputs
5771 `(("python" ,python-wrapper)
5772 ("dbus-glib" ,dbus-glib)))
5773 (synopsis "Python bindings for D-bus")
5774 (description "python-dbus provides bindings for libdbus, the reference
5775implementation of D-Bus.")
5776 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
5777 (license license:expat)))
5778
5779(define-public python2-dbus
5780 (package (inherit python-dbus)
5781 (name "python2-dbus")
5782 (inputs `(("python" ,python-2)
5783 ,@(alist-delete "python"
5784 (package-inputs python-dbus)
ba5ef999 5785 equal?)))))
44d10b1f 5786
fb236fdd
AG
5787(define-public python-notify2
5788 (package
5789 (name "python-notify2")
5790 (version "0.3.1")
5791 (source
5792 (origin
5793 (method url-fetch)
5794 (uri (pypi-uri "notify2" version))
5795 (sha256
5796 (base32
5797 "0z8rrv9rsg1r2qgh2dxj3dfj5xnki98kgi3w839kqby4a26i1yik"))))
5798 (build-system python-build-system)
5799 (arguments `(#:tests? #f)) ; tests depend on system state
5800 (native-inputs
5801 `(("python-dbus" ,python-dbus)))
5802 (home-page "https://bitbucket.org/takluyver/pynotify2")
5803 (synopsis "Python interface to D-Bus notifications")
5804 (description
5805 "Pynotify2 provides a Python interface for sending D-Bus notifications.
5806It is a reimplementation of pynotify in pure Python, and an alternative to
5807the GObject Introspection bindings to libnotify for non-GTK applications.")
5808 (license (list license:bsd-2
5809 license:lgpl2.1+))))
5810
5811(define-public python2-notify2
5812 (package-with-python2 python-notify2))
5813
44d10b1f
RW
5814;; beautifulsoup4 has a totally different namespace than 3.x,
5815;; and pypi seems to put it under its own name, so I guess we should too
5816(define-public python-beautifulsoup4
5817 (package
5818 (name "python-beautifulsoup4")
abb53e6f 5819 (version "4.7.1")
44d10b1f
RW
5820 (source
5821 (origin
5822 (method url-fetch)
5823 (uri (pypi-uri "beautifulsoup4" version))
5824 (sha256
5825 (base32
abb53e6f 5826 "0j2kycz2dxgx68xzjm7rxg5xn6v61gq5ifvxyg99slmqkybnal4l"))))
44d10b1f
RW
5827 (build-system python-build-system)
5828 (arguments
5829 `(#:phases
5830 (modify-phases %standard-phases
5831 ;; The Python 2 source is the definitive source of beautifulsoup4. We
5832 ;; must use this conversion script when building with Python 3. The
5833 ;; conversion script also runs the tests.
5834 ;; For more information, see the file 'convert-py3k' in the source
5835 ;; distribution.
5836 (replace 'check
dff0197e 5837 (lambda _ (invoke "./convert-py3k"))))))
f83e10e4 5838 (propagated-inputs
abb53e6f 5839 `(("python-soupsieve" ,python-soupsieve)))
44d10b1f
RW
5840 (home-page
5841 "https://www.crummy.com/software/BeautifulSoup/bs4/")
5842 (synopsis
5843 "Python screen-scraping library")
5844 (description
5845 "Beautiful Soup is a Python library designed for rapidly setting up
5846screen-scraping projects. It offers Pythonic idioms for navigating,
5847searching, and modifying a parse tree, providing a toolkit for
5848dissecting a document and extracting what you need. It automatically
5849converts incoming documents to Unicode and outgoing documents to UTF-8.")
5850 (license license:expat)
5851 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
5852
5853(define-public python2-beautifulsoup4
5854 (package
5855 (inherit (package-with-python2
5856 (strip-python2-variant python-beautifulsoup4)))
5857 (arguments `(#:python ,python-2))))
5858
ad74978a
BT
5859(define-public python-soupsieve
5860 (package
5861 (name "python-soupsieve")
3367df31 5862 (version "1.9.5")
ad74978a
BT
5863 (source
5864 (origin
5865 (method url-fetch)
5866 (uri (pypi-uri "soupsieve" version))
5867 (sha256
5868 (base32
3367df31 5869 "1nhd0q0ifwva9wn645s6pn74p1rd97asn3qfg75nphx1wkgcbhg2"))))
ad74978a
BT
5870 (build-system python-build-system)
5871 (arguments `(#:tests? #f))
5872 ;;XXX: 2 tests fail currently despite claming they were to be
5873 ;;skipped. Also, beautifulsoup4 may depend on this in the future, so we
5874 ;;don't want to create a circular dependency.
5875 (home-page "https://github.com/facelessuser/soupsieve")
5876 (synopsis "CSS selector library")
5877 (description
5878 "Soup Sieve is a CSS selector library designed to be used with Beautiful
5879Soup 4. It aims to provide selecting, matching, and filtering using modern
5880CSS selectors. Soup Sieve currently provides selectors from the CSS level 1
5881specifications up through the latest CSS level 4 drafts and beyond (though
5882some are not yet implemented).")
d00b83fb 5883 (properties `((python2-variant . ,(delay python2-soupsieve))))
ad74978a
BT
5884 (license license:expat)))
5885
5886(define-public python2-soupsieve
d00b83fb 5887 (let ((base (package-with-python2 (strip-python2-variant python-soupsieve))))
ad74978a
BT
5888 (package
5889 (inherit base)
5890 (propagated-inputs
d00b83fb
MB
5891 `(("python2-backports-functools-lru-cache"
5892 ,python2-backports-functools-lru-cache)
5893 ,@(package-propagated-inputs base))))))
ad74978a 5894
44d10b1f
RW
5895(define-public python-netifaces
5896 (package
5897 (name "python-netifaces")
5898 (version "0.10.7")
5899 (source
5900 (origin
5901 (method url-fetch)
5902 (uri (pypi-uri "netifaces" version))
5903 (sha256
5904 (base32
5905 "1gccklrcplbbqh81g1mdgpa5y8na7kkf29cq2ka3f5a2fp5hyndx"))))
5906 (build-system python-build-system)
5907 (home-page "https://github.com/al45tair/netifaces")
5908 (synopsis
5909 "Python module for portable network interface information")
5910 (description
5911 "Netifaces is a Python module providing information on network
5912interfaces in an easy and portable manner.")
5913 (license license:expat)))
5914
5915(define-public python2-netifaces
5916 (package-with-python2 python-netifaces))
5917
5918(define-public python-networkx
5919 (package
5920 (name "python-networkx")
5921 (version "2.2")
5922 (source
5923 (origin
5924 (method url-fetch)
5925 (uri (pypi-uri "networkx" version ".zip"))
5926 (sha256
5927 (base32 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
5928 (build-system python-build-system)
5929 ;; python-decorator is needed at runtime.
5930 (propagated-inputs
5931 `(("python-decorator" ,python-decorator)))
5932 (native-inputs
5933 `(("python-nose" ,python-nose)
5934 ("unzip" ,unzip)))
5935 (home-page "https://networkx.github.io/")
5936 (synopsis "Python module for creating and manipulating graphs and networks")
5937 (description
5938 "NetworkX is a Python package for the creation, manipulation, and study
5939of the structure, dynamics, and functions of complex networks.")
5940 (license license:bsd-3)))
5941
5942(define-public python2-networkx
5943 (package-with-python2 python-networkx))
5944
5945(define-public python-datrie
5946 (package
5947 (name "python-datrie")
0b58cb42 5948 (version "0.8")
44d10b1f
RW
5949 (source
5950 (origin
5951 (method url-fetch)
5952 (uri (pypi-uri "datrie" version))
5953 (sha256
5954 (base32
0b58cb42 5955 "0338r8xgmpy78556jhms0h6qkvyjr10p8bpgdvcpqzm9lrmxmmdx"))))
44d10b1f 5956 (build-system python-build-system)
44d10b1f
RW
5957 (native-inputs
5958 `(("python-cython" ,python-cython)
5959 ("python-hypothesis" ,python-hypothesis)
5960 ("python-pytest" ,python-pytest)
5961 ("python-pytest-runner" ,python-pytest-runner)))
5962 (home-page "https://github.com/kmike/datrie")
5963 (synopsis "Fast, efficiently stored trie for Python")
5964 (description
5965 "This package provides a fast, efficiently stored trie implementation for
5966Python.")
5967 (license license:lgpl2.1+)))
5968
5969(define-public snakemake
5970 (package
5971 (name "snakemake")
93803c6b 5972 (version "5.7.1")
44d10b1f
RW
5973 (source
5974 (origin
5975 (method url-fetch)
5976 (uri (pypi-uri "snakemake" version))
5977 (sha256
93803c6b 5978 (base32 "1pnpvvn8n2a78cg360wz3ldmpqrsm2wzi0c0dmvki9fnsw6fxdas"))))
44d10b1f
RW
5979 (build-system python-build-system)
5980 (arguments
5981 ;; TODO: Package missing test dependencies.
5982 '(#:tests? #f
5983 #:phases
5984 (modify-phases %standard-phases
5985 ;; For cluster execution Snakemake will call Python. Since there is
5986 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
5987 ;; this by calling the snakemake wrapper instead.
5988 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
5989 (lambda* (#:key outputs #:allow-other-keys)
5990 (substitute* "snakemake/executors.py"
5991 (("\\{sys.executable\\} -m snakemake")
5992 (string-append (assoc-ref outputs "out")
5993 "/bin/snakemake")))
5994 #t)))))
5995 (propagated-inputs
8994ae34 5996 `(("python-appdirs" ,python-appdirs)
44d10b1f
RW
5997 ("python-configargparse" ,python-configargparse)
5998 ("python-datrie" ,python-datrie)
5999 ("python-docutils" ,python-docutils)
8994ae34 6000 ("python-gitpython" ,python-gitpython)
44d10b1f
RW
6001 ("python-jinja2" ,python-jinja2)
6002 ("python-jsonschema" ,python-jsonschema)
6003 ("python-networkx" ,python-networkx)
93803c6b 6004 ("python-psutil" ,python-psutil)
44d10b1f 6005 ("python-pyyaml" ,python-pyyaml)
8994ae34
TGR
6006 ("python-ratelimiter" ,python-ratelimiter)
6007 ("python-requests" ,python-requests)
6008 ("python-wrapt" ,python-wrapt)))
44d10b1f
RW
6009 (home-page "https://snakemake.readthedocs.io")
6010 (synopsis "Python-based execution environment for make-like workflows")
6011 (description
6012 "Snakemake aims to reduce the complexity of creating workflows by
6013providing a clean and modern domain specific specification language (DSL) in
6014Python style, together with a fast and comfortable execution environment.")
6015 (license license:expat)))
6016
44d10b1f
RW
6017(define-public python-pyqrcode
6018 (package
6019 (name "python-pyqrcode")
6020 (version "1.2.1")
6021 (source
6022 (origin
6023 (method url-fetch)
6024 (uri (pypi-uri "PyQRCode" version))
6025 (sha256
6026 (base32
6027 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
6028 (build-system python-build-system)
6029 (home-page
6030 "https://github.com/mnooner256/pyqrcode")
6031 (synopsis "QR code generator")
6032 (description
6033 "Pyqrcode is a QR code generator written purely in Python with
6034SVG, EPS, PNG and terminal output.")
6035 (license license:bsd-3)))
6036
6037(define-public python-seaborn
6038 (package
6039 (name "python-seaborn")
6040 (version "0.9.0")
6041 (source
6042 (origin
6043 (method url-fetch)
6044 (uri (pypi-uri "seaborn" version))
6045 (sha256
f9bd82e7
RW
6046 (base32 "0bqysi3fxfjl1866m5jq8z7mynhqbqnikim74dmzn8539iwkzj3n"))
6047 (patches
6048 (list (origin
6049 (method url-fetch)
6050 ;; This has already been merged, but there is no new
6051 ;; release including this patch. It fixes problems
6052 ;; with axis rotation that would lead to test
6053 ;; failures.
6054 (uri "https://patch-diff.githubusercontent.com/raw/mwaskom/seaborn/pull/1716.diff")
6055 (sha256
6056 (base32
6057 "1lm870z316n9ivsyr86hpk1gxaraw0mrjvq42lqsm0znhjdp9q9w"))
6058 (file-name "seaborn-0.9.0-axis-rotation.patch"))))))
44d10b1f
RW
6059 (build-system python-build-system)
6060 (arguments
6061 `(#:phases
6062 (modify-phases %standard-phases
6063 (add-before 'check 'start-xserver
6064 (lambda* (#:key inputs #:allow-other-keys)
6065 (let ((xorg-server (assoc-ref inputs "xorg-server")))
6066 ;; There must be a running X server and make check doesn't
6067 ;; start one. Therefore we must do it.
6068 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
6069 (setenv "DISPLAY" ":1")
6070 #t)))
a1322765
RW
6071 (add-after 'unpack 'fix-tests
6072 (lambda _
6073 ;; test_cbar_ticks fails probably because of matplotlib's
6074 ;; expectation of using an older version of FreeType.
6075 (delete-file "seaborn/tests/test_matrix.py")
6076 #t))
44d10b1f
RW
6077 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
6078 (propagated-inputs
6079 `(("python-pandas" ,python-pandas)
6080 ("python-matplotlib" ,python-matplotlib)
6081 ("python-numpy" ,python-numpy)
6082 ("python-scipy" ,python-scipy)))
6083 (native-inputs
6084 `(("python-pytest" ,python-pytest)
ff337525 6085 ("xorg-server" ,xorg-server-for-tests)))
44d10b1f
RW
6086 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
6087 (synopsis "Statistical data visualization")
6088 (description
6089 "Seaborn is a library for making attractive and informative statistical
6090graphics in Python. It is built on top of matplotlib and tightly integrated
6091with the PyData stack, including support for numpy and pandas data structures
6092and statistical routines from scipy and statsmodels.")
6093 (license license:bsd-3)))
6094
6095(define-public python2-seaborn
6096 (package-with-python2 python-seaborn))
6097
6098(define-public python-mpmath
6099 (package
6100 (name "python-mpmath")
6101 (version "0.19")
6102 (source (origin
6103 (method url-fetch)
6104 (uri (string-append "http://mpmath.org/files/mpmath-"
6105 version ".tar.gz"))
6106 (sha256
6107 (base32
6108 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
6109 (build-system python-build-system)
6110 (arguments
6111 '(#:phases
6112 (modify-phases %standard-phases
6113 (replace 'check
6114 (lambda _
5d7a6f1c 6115 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
44d10b1f
RW
6116 (home-page "http://mpmath.org")
6117 (synopsis "Arbitrary-precision floating-point arithmetic in python")
6118 (description
6119 "@code{mpmath} can be used as an arbitrary-precision substitute for
6120Python's float/complex types and math/cmath modules, but also does much
6121more advanced mathematics.")
6122 (license license:bsd-3)))
6123
6124(define-public python2-mpmath
6125 (package-with-python2 python-mpmath))
6126
6127(define-public python-bigfloat
6128 (package
6129 (name "python-bigfloat")
6130 (version "0.3.0")
6131 (source
6132 (origin
6133 (method url-fetch)
6134 (uri (pypi-uri "bigfloat" version))
6135 (sha256
6136 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
6137 (build-system python-build-system)
6138 (inputs
6139 `(("mpfr" ,mpfr)))
6140 (home-page "https://github.com/mdickinson/bigfloat")
6141 (synopsis "Arbitrary precision floating-point arithmetic for Python")
6142 (description
e36de31b 6143 "This package provides a Python interface to the MPFR library for
44d10b1f
RW
6144multiprecision arithmetic.")
6145 (license license:lgpl3+)))
6146
6147(define-public python2-bigfloat
6148 (package-with-python2 python-bigfloat))
6149
6150(define-public python-sympy
6151 (package
6152 (name "python-sympy")
6153 (version "1.1.1")
6154 (source
6155 (origin
6156 (method url-fetch)
6157 (uri (string-append
6158 "https://github.com/sympy/sympy/releases/download/sympy-"
6159 version "/sympy-" version ".tar.gz"))
6160 (sha256
6161 (base32 "190n29sppw7g8ihilc5451y7jlfcaw56crqiqbf1jff43dlmfnxc"))))
6162 (build-system python-build-system)
6163 (arguments
6164 `(#:phases
6165 (modify-phases %standard-phases
6166 ;; Run the core tests after installation. By default it would run
6167 ;; *all* tests, which take a very long time to complete and are known
6168 ;; to be flaky.
6169 (delete 'check)
6170 (add-after 'install 'check
6171 (lambda* (#:key outputs #:allow-other-keys)
6172 (invoke "python3" "-c" "import sympy; sympy.test(\"/core\")")
6173 #t)))))
6174 (propagated-inputs
6175 `(("python-mpmath" ,python-mpmath)))
6176 (home-page "http://www.sympy.org/")
6177 (synopsis "Python library for symbolic mathematics")
6178 (description
6179 "SymPy is a Python library for symbolic mathematics. It aims to become a
6180full-featured computer algebra system (CAS) while keeping the code as simple
6181as possible in order to be comprehensible and easily extensible.")
6182 (license license:bsd-3)))
6183
6184(define-public python2-sympy
6185 (package
6186 (inherit (package-with-python2 python-sympy))
6187 (arguments
6188 `(#:phases
6189 (modify-phases %standard-phases
6190 ;; Run the core tests after installation. By default it would run
6191 ;; *all* tests, which take a very long time to complete and are known
6192 ;; to be flaky.
6193 (delete 'check)
6194 (add-after 'install 'check
6195 (lambda* (#:key outputs #:allow-other-keys)
6196 (invoke "python" "-c" "import sympy; sympy.test(\"/core\")")
6197 #t)))))))
6198
6199(define-public python-q
6200 (package
6201 (name "python-q")
6202 (version "2.6")
6203 (source
6204 (origin
6205 (method url-fetch)
6206 (uri (pypi-uri "q" version))
6207 (sha256
6208 (base32
6209 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
6210 (build-system python-build-system)
6211 (home-page "https://github.com/zestyping/q")
6212 (synopsis "Quick-and-dirty debugging output for tired programmers")
6213 (description
6214 "q is a Python module for \"print\" style of debugging Python code. It
6215provides convenient short API for print out of values, tracebacks, and
6216falling into the Python interpreter.")
6217 (license license:asl2.0)))
6218
6219(define-public python2-q
6220 (package-with-python2 python-q))
6221
6222(define-public python2-xlib
6223 (package
6224 (name "python2-xlib")
6225 (version "0.14")
6226 (source (origin
6227 (method url-fetch)
6228 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
6229 "/" version "/"
6230 "python-xlib-" version ".tar.gz"))
6231 (sha256
6232 (base32
6233 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
6234 (build-system python-build-system)
6235 (arguments
6236 `(#:python ,python-2 ;Python 2 only
6237 #:tests? #f)) ;no tests
6238 (home-page "http://python-xlib.sourceforge.net/")
6239 (synopsis "Python X11 client library")
6240 (description
6241 "The Python X Library is intended to be a fully functional X client
6242library for Python programs. It is useful to implement low-level X clients.
6243It is written entirely in Python.")
6244 (license license:gpl2+)))
6245
6246(define-public python-singledispatch
6247 (package
6248 (name "python-singledispatch")
6249 (version "3.4.0.3")
6250 (source
6251 (origin
6252 (method url-fetch)
6253 (uri (pypi-uri "singledispatch" version))
6254 (sha256
6255 (base32
6256 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
6257 (build-system python-build-system)
6258 (native-inputs
6259 `(("python-six" ,python-six))) ; required for conversion, not at run-time
6260 (home-page
6261 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
6262 (synopsis "Backport of singledispatch feature from Python 3.4")
6263 (description
6264 "This library brings functools.singledispatch from Python 3.4 to Python
62652.6-3.3.")
6266 (license license:expat)))
6267
6268(define-public python2-singledispatch
6269 (package-with-python2 python-singledispatch))
6270
6271;; the python- version can be removed with python-3.5
6272(define-public python-backports-abc
6273 (package
6274 (name "python-backports-abc")
6275 (version "0.5")
6276 (source
6277 (origin
6278 (method url-fetch)
6279 (uri (pypi-uri "backports_abc" version))
6280 (sha256
6281 (base32
6282 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
6283 (build-system python-build-system)
6284 (home-page "https://github.com/cython/backports_abc")
6285 (synopsis "Backport of additions to the 'collections.abc' module")
6286 (description
6287 "Python-backports-abc provides a backport of additions to the
36a4366d 6288@code{collections.abc} module in Python-3.5.")
44d10b1f
RW
6289 (license license:psfl)))
6290
6291(define-public python2-backports-abc
6292 (package-with-python2 python-backports-abc))
6293
6294(define-public python-backports-csv
6295 (package
6296 (name "python-backports-csv")
6297 (version "1.0.5")
6298 (source
6299 (origin
6300 (method url-fetch)
6301 (uri (pypi-uri "backports.csv" version))
6302 (sha256
6303 (base32
6304 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
6305 (build-system python-build-system)
6306 (home-page "https://github.com/ryanhiebert/backports.csv")
6307 (synopsis "Backport of Python 3's csv module for Python 2")
6308 (description
6309 "Provides a backport of Python 3's @code{csv} module for parsing
6310comma separated values. The API of the @code{csv} module in Python 2
6311is drastically different from the @code{csv} module in Python 3.
6312This is due, for the most part, to the difference between str in
6313Python 2 and Python 3.")
6314 (license license:psfl)))
6315
6316(define-public python2-backports-csv
6317 (package-with-python2 python-backports-csv))
6318
6319(define-public python2-backports-shutil-get-terminal-size
6320 (package
6321 (name "python2-backports-shutil-get-terminal-size")
6322 (version "1.0.0")
6323 (source
6324 (origin
6325 (method url-fetch)
6326 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
6327 (sha256
6328 (base32
6329 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
6330 (build-system python-build-system)
6331 (arguments
6332 `(#:python ,python-2
6333 #:phases
6334 (modify-phases %standard-phases
6335 (replace 'check
6336 (lambda _
4a4a7d9a 6337 (invoke "py.test" "-v"))))))
44d10b1f
RW
6338 (native-inputs
6339 `(("python2-pytest" ,python2-pytest)))
6340 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
6341 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
6342 (description
6343 "This package provides a backport of the @code{get_terminal_size
6344function} from Python 3.3's @code{shutil}.
6345Unlike the original version it is written in pure Python rather than C,
6346so it might be a tiny bit slower.")
6347 (license license:expat)))
6348
6349(define-public python-waf
6350 (package
6351 (name "python-waf")
6c2c11fa 6352 (version "2.0.19")
44d10b1f
RW
6353 (source (origin
6354 (method url-fetch)
6355 (uri (string-append "https://waf.io/"
6356 "waf-" version ".tar.bz2"))
6357 (sha256
6358 (base32
6c2c11fa 6359 "19dvqbsvxz7ch03dh1v0znklrwxlz6yzddc3k9smzrrgny4jch6q"))))
44d10b1f
RW
6360 (build-system python-build-system)
6361 (arguments
6362 '(#:phases
6363 (modify-phases %standard-phases
6364 (replace 'build
6365 (lambda _
633c8b71
MO
6366 ;; XXX: Find a way to add all extra tools.
6367 (let ((tools '("gccdeps"
6368 "clang_compilation_database")))
6369 (invoke "python" "waf-light" "configure" "build"
6370 (string-append "--tools="
6371 (string-join tools ","))))))
44d10b1f
RW
6372 (replace 'check
6373 (lambda _
6374 (invoke "python" "waf" "--version")))
6375 (replace 'install
6376 (lambda* (#:key outputs #:allow-other-keys)
6377 (let ((out (assoc-ref outputs "out")))
6378 (install-file "waf" (string-append out "/bin")))
6379 #t))
6380 ;; waf breaks when it is wrapped.
6381 (delete 'wrap))))
6382 (home-page "https://waf.io/")
6383 (synopsis "Python-based build system")
6384 (description
6385 "Waf is a Python-based framework for configuring, compiling and installing
6386applications.")
6387 (license license:bsd-3)))
6388
6389(define-public python2-waf
6390 (package-with-python2 python-waf))
6391
6392(define-public python-pyzmq
6393 (package
6394 (name "python-pyzmq")
6395 (version "17.1.2")
6396 (source
6397 (origin
6398 (method url-fetch)
6399 (uri (pypi-uri "pyzmq" version))
6400 (sha256
6401 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
6402 (build-system python-build-system)
6403 (arguments
6404 `(#:configure-flags
6405 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
6406 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
6407 ;; --inplace' for 'python setup.py test' to work.
6408 #:tests? #f))
6409 (inputs
6410 `(("zeromq" ,zeromq)))
6411 (native-inputs
6412 `(("pkg-config" ,pkg-config)
6413 ("python-nose" ,python-nose)))
6414 (home-page "https://github.com/zeromq/pyzmq")
6415 (synopsis "Python bindings for 0MQ")
6416 (description
6417 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
6418 (license license:bsd-4)))
6419
6420(define-public python2-pyzmq
6421 (package-with-python2 python-pyzmq))
6422
6423(define-public python-pep8
6424 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
6425 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
6426 ;; some dependents' test suites, and nothing more.
6427 (package
6428 (name "python-pep8")
6429 (version "1.7.0")
6430 (source
6431 (origin
6432 (method url-fetch)
6433 (uri (pypi-uri "pep8" version))
6434 (sha256
6435 (base32
2be878d8
CB
6436 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))
6437 (patches (search-patches "python-pep8-stdlib-tokenize-compat.patch"))))
44d10b1f
RW
6438 (build-system python-build-system)
6439 (home-page "https://pep8.readthedocs.org/")
6440 (synopsis "Python style guide checker")
6441 (description
6442 "This tools checks Python code against some of the style conventions in
6443PEP 8.")
6444 (license license:expat)))
6445
6446(define-public python2-pep8
6447 (package-with-python2 python-pep8))
6448
6449(define-public python-pyflakes
6450 (package
6451 (name "python-pyflakes")
d0cba11b 6452 (version "2.1.1")
44d10b1f
RW
6453 (source
6454 (origin
6455 (method url-fetch)
6456 (uri (pypi-uri "pyflakes" version))
6457 (sha256
6458 (base32
d0cba11b 6459 "18pq95a1xj2dgdd0m85gyfsn40jajj4xc3lp8wfv7igqhrc86xnr"))))
44d10b1f
RW
6460 (build-system python-build-system)
6461 (home-page
6462 "https://github.com/pyflakes/pyflakes")
6463 (synopsis "Passive checker of Python programs")
6464 (description
6465 "Pyflakes statically checks Python source code for common errors.")
6466 (license license:expat)))
6467
6468(define-public python2-pyflakes
6469 (package-with-python2 python-pyflakes))
6470
6471(define-public python-mccabe
6472 (package
6473 (name "python-mccabe")
6474 (version "0.6.1")
6475 (source
6476 (origin
6477 (method url-fetch)
6478 (uri (pypi-uri "mccabe" version))
6479 (sha256
6480 (base32
6481 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
6482 (build-system python-build-system)
6483 (native-inputs
6484 `(("python-pytest" ,python-pytest-bootstrap)
6485 ("python-pytest-runner" ,python-pytest-runner)))
6486 (home-page "https://github.com/flintwork/mccabe")
6487 (synopsis "McCabe checker, plugin for flake8")
6488 (description
6489 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
6490complexity of Python source code.")
6491 (license license:expat)))
6492
6493(define-public python2-mccabe
6494 (package-with-python2 python-mccabe))
6495
6496(define-public python-mccabe-0.2.1
6497 (package (inherit python-mccabe)
6498 (version "0.2.1")
6499 (source
6500 (origin
6501 (method url-fetch)
6502 (uri (pypi-uri "mccabe" version))
6503 (sha256
6504 (base32
6505 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
6506
6507(define-public python2-mccabe-0.2.1
6508 (package-with-python2 python-mccabe-0.2.1))
6509
6510;; Flake8 2.4.1 requires an older version of pep8.
6511;; This should be removed ASAP.
6512(define-public python-pep8-1.5.7
6513 (package (inherit python-pep8)
6514 (version "1.5.7")
6515 (source
f3576970
RW
6516 (origin
6517 (method url-fetch)
6518 (uri (pypi-uri "pep8" version))
6519 (sha256
6520 (base32
6521 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
44d10b1f
RW
6522 (arguments
6523 ;; XXX Tests not compatible with Python 3.5.
6524 '(#:tests? #f))))
6525
6526(define-public python2-pep8-1.5.7
6527 (package-with-python2 python-pep8-1.5.7))
6528
6529;; Flake8 2.4.1 requires an older version of pyflakes.
6530;; This should be removed ASAP.
6531(define-public python-pyflakes-0.8.1
6532 (package (inherit python-pyflakes)
6533 (version "0.8.1")
6534 (source
8c4dffb5
RW
6535 (origin
6536 (method url-fetch)
6537 (uri (pypi-uri "pyflakes" version))
6538 (sha256
6539 (base32
6540 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
44d10b1f
RW
6541 (arguments
6542 ;; XXX Tests not compatible with Python 3.5.
6543 '(#:tests? #f))))
6544
6545(define-public python2-pyflakes-0.8.1
6546 (package-with-python2 python-pyflakes-0.8.1))
6547
ac63cf0a 6548(define-public python-flake8
44d10b1f
RW
6549 (package
6550 (name "python-flake8")
beaff4a8 6551 (version "3.7.7")
ac63cf0a
MB
6552 (source (origin
6553 (method url-fetch)
6554 (uri (pypi-uri "flake8" version))
6555 (sha256
6556 (base32
beaff4a8 6557 "0qg6zggqigrd4k3gv88shd1a27d0cwgfql8vfiq2c7rl7w3rd6c5"))))
44d10b1f
RW
6558 (build-system python-build-system)
6559 (arguments
6560 `(#:phases
6561 (modify-phases %standard-phases
44d10b1f
RW
6562 (delete 'check)
6563 (add-after 'install 'check
6564 (lambda* (#:key inputs outputs #:allow-other-keys)
6565 (add-installed-pythonpath inputs outputs)
6566 (invoke "pytest" "-v")
6567 #t)))))
6568 (propagated-inputs
6569 `(("python-pycodestyle" ,python-pycodestyle)
beaff4a8 6570 ("python-entrypoints" ,python-entrypoints)
44d10b1f
RW
6571 ("python-pyflakes" ,python-pyflakes)
6572 ("python-mccabe" ,python-mccabe)))
6573 (native-inputs
6574 `(("python-mock" ,python-mock)
6575 ("python-pytest" ,python-pytest-bootstrap)
6576 ("python-pytest-runner" ,python-pytest-runner)))
6577 (home-page "https://gitlab.com/pycqa/flake8")
6578 (synopsis
6579 "The modular source code checker: pep8, pyflakes and co")
6580 (description
6581 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
ac63cf0a 6582 (properties `((python2-variant . ,(delay python2-flake8))))
44d10b1f
RW
6583 (license license:expat)))
6584
ac63cf0a
MB
6585(define-public python2-flake8
6586 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
44d10b1f
RW
6587 (package (inherit base)
6588 (propagated-inputs
6589 `(("python2-configparser" ,python2-configparser)
6590 ("python2-enum34" ,python2-enum34)
beaff4a8 6591 ("python2-typing" ,python2-typing)
44d10b1f
RW
6592 ,@(package-propagated-inputs base))))))
6593
44d10b1f
RW
6594;; python-hacking requires flake8 <2.6.0.
6595(define-public python-flake8-2.5
6596 (package
6597 (inherit python-flake8)
6598 (version "2.5.5")
6599 (source (origin
6600 (method url-fetch)
6601 (uri (pypi-uri "flake8" version))
6602 (sha256
6603 (base32
6604 "1snylqwbmrylbx3r1wpz8ggk98f6bcag4441ag8mm2l7wyn58sij"))))
6605 (propagated-inputs
6606 `(("python-pep8" ,python-pep8)
6607 ,@(package-propagated-inputs python-flake8)))
6608 (properties `((python2-variant . ,(delay python2-flake8-2.5))))))
6609
6610(define-public python2-flake8-2.5
6611 (package
6612 (inherit python2-flake8)
6613 (version (package-version python-flake8-2.5))
6614 (source (origin
6615 (inherit (package-source python-flake8-2.5))))
6616 (propagated-inputs
6617 `(("python2-pep8" ,python2-pep8)
6618 ,@(package-propagated-inputs python2-flake8)))))
6619
6620(define-public python-flake8-polyfill
6621 (package
6622 (name "python-flake8-polyfill")
6623 (version "1.0.2")
6624 (source
6625 (origin
6626 (method url-fetch)
6627 (uri (pypi-uri "flake8-polyfill" version))
6628 (sha256
6629 (base32
6630 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
6631 (build-system python-build-system)
6632 (arguments
6633 '(#:phases
6634 (modify-phases %standard-phases
6635 (replace 'check
6636 (lambda _
40a7153d
MB
6637 ;; Be compatible with Pytest 4:
6638 ;; https://gitlab.com/pycqa/flake8-polyfill/merge_requests/7
6639 (substitute* "setup.cfg"
6640 (("\\[pytest\\]")
6641 "[tool:pytest]"))
6642
44d10b1f
RW
6643 (setenv "PYTHONPATH"
6644 (string-append (getcwd) "/build/lib:"
6645 (getenv "PYTHONPATH")))
4f0a0894 6646 (invoke "py.test" "-v"))))))
44d10b1f
RW
6647 (native-inputs
6648 `(("python-flake8" ,python-flake8)
6649 ("python-mock" ,python-mock)
6650 ("python-pep8" ,python-pep8)
6651 ("python-pycodestyle" ,python-pycodestyle)
6652 ("python-pytest" ,python-pytest)))
6653 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
6654 (synopsis "Polyfill package for Flake8 plugins")
6655 (description
6656 "This package that provides some compatibility helpers for Flake8
6657plugins that intend to support Flake8 2.x and 3.x simultaneously.")
6658 (license license:expat)))
6659
6660(define-public python2-flake8-polyfill
6661 (package-with-python2 python-flake8-polyfill))
6662
6663(define-public python-mistune
6664 (package
6665 (name "python-mistune")
6666 (version "0.8.4")
6667 (source
6668 (origin
6669 (method url-fetch)
6670 (uri (pypi-uri "mistune" version))
6671 (sha256
6672 (base32
6673 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
6674 (build-system python-build-system)
6675 (native-inputs
6676 `(("python-nose" ,python-nose)
6677 ("python-cython" ,python-cython)))
6678 (home-page "https://github.com/lepture/mistune")
6679 (synopsis "Markdown parser in pure Python")
6680 (description "This package provides a fast markdown parser in pure
6681Python.")
6682 (license license:bsd-3)))
6683
6684(define-public python2-mistune
6685 (package-with-python2 python-mistune))
6686
6687(define-public python-markdown
6688 (package
6689 (name "python-markdown")
ceb1936a 6690 (version "3.1.1")
44d10b1f
RW
6691 (source
6692 (origin
6693 (method url-fetch)
6694 (uri (pypi-uri "Markdown" version))
6695 (sha256
6696 (base32
ceb1936a 6697 "0yhylk4ffqqs7x086fav4pnfsl1021v7lghznzkififprmmqfl1f"))))
44d10b1f
RW
6698 (build-system python-build-system)
6699 (native-inputs
6700 `(("python-nose" ,python-nose)
6701 ("python-pyyaml" ,python-pyyaml)))
6702 (home-page "https://python-markdown.github.io/")
6703 (synopsis "Python implementation of Markdown")
6704 (description
6705 "This package provides a Python implementation of John Gruber's
6706Markdown. The library features international input, various Markdown
6707extensions, and several HTML output formats. A command line wrapper
6708markdown_py is also provided to convert Markdown files to HTML.")
6709 (license license:bsd-3)))
6710
6711(define-public python2-markdown
6712 (package-with-python2 python-markdown))
6713
6714(define-public python-ptyprocess
6715 (package
6716 (name "python-ptyprocess")
6717 (version "0.5.2")
6718 (source
6719 (origin
6720 (method url-fetch)
6721 (uri (pypi-uri "ptyprocess" version))
6722 (sha256
6723 (base32
6724 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
6725 (build-system python-build-system)
6726 (native-inputs
6727 `(("python-nose" ,python-nose)))
6728 (arguments
6729 `(#:phases
6730 (modify-phases %standard-phases
6731 (replace 'check
7904d6fa 6732 (lambda _ (invoke "nosetests"))))))
44d10b1f
RW
6733 (home-page "https://github.com/pexpect/ptyprocess")
6734 (synopsis "Run a subprocess in a pseudo terminal")
6735 (description
6736 "This package provides a Python library used to launch a subprocess in a
6737pseudo terminal (pty), and interact with both the process and its pty.")
6738 (license license:isc)))
6739
6740(define-public python2-ptyprocess
6741 (package-with-python2 python-ptyprocess))
6742
6743(define-public python-cram
6744 (package
6745 (name "python-cram")
6746 (version "0.7")
6747 (home-page "https://bitheap.org/cram/")
6748 (source (origin
6749 (method url-fetch)
6750 (uri (list (string-append home-page "cram-"
6751 version ".tar.gz")
6752 (pypi-uri "cram" version)))
6753 (sha256
6754 (base32
6755 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
6756 (arguments
6757 '(#:phases
6758 (modify-phases %standard-phases
6759 (add-after 'unpack 'patch-source
6760 (lambda _
6761 (substitute* (find-files "cram" ".*\\.py$")
6762 ;; Replace default shell path.
6763 (("/bin/sh") (which "sh")))
6764 (substitute* (find-files "tests" ".*\\.t$")
6765 (("md5") "md5sum")
6766 (("/bin/bash") (which "bash"))
6767 (("/bin/sh") (which "sh")))
6768 (substitute* "cram/_test.py"
6769 ;; This hack works around a bug triggered by substituting
6770 ;; the /bin/sh paths. "tests/usage.t" compares the output of
6771 ;; "cram -h", which breaks the output at 80 characters. This
6772 ;; causes the line showing the default shell to break into two
6773 ;; lines, but the test expects a single line...
6774 (("env\\['COLUMNS'\\] = '80'")
6775 "env['COLUMNS'] = '160'"))
ff1e80d7
MB
6776
6777 (substitute* "Makefile"
6778 ;; Recent versions of python-coverage have caused the test
6779 ;; coverage to decrease (as of version 0.7). Allow that.
6780 (("--fail-under=100")
6781 "--fail-under=90"))
6782
44d10b1f 6783 #t))
ff1e80d7 6784 (replace 'check
44d10b1f 6785 ;; The test phase uses the built library and executable.
44d10b1f
RW
6786 (lambda* (#:key inputs outputs #:allow-other-keys)
6787 (add-installed-pythonpath inputs outputs)
6788 (setenv "PATH" (string-append (getenv "PATH") ":"
6789 (assoc-ref outputs "out") "/bin"))
2d7db192 6790 (invoke "make" "test"))))))
44d10b1f
RW
6791 (build-system python-build-system)
6792 (native-inputs
6793 `(("python-coverage" ,python-coverage)
6794 ("which" ,which)))
6795 (synopsis "Simple testing framework for command line applications")
6796 (description
6797 "Cram is a functional testing framework for command line applications.
6798Cram tests look like snippets of interactive shell sessions. Cram runs each
6799command and compares the command output in the test with the command’s actual
6800output.")
6801 (license license:gpl2+)))
6802
6803(define-public python2-cram
6804 (package-with-python2 python-cram))
6805
6806(define-public python-straight-plugin
6807 (package
6808 (name "python-straight-plugin")
6809 (version "1.4.1")
6810 (source
6811 (origin
6812 (method url-fetch)
6813 (uri (pypi-uri "straight.plugin" version))
6814 (sha256
6815 (base32
6816 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
6817 (build-system python-build-system)
6818 (home-page "https://github.com/ironfroggy/straight.plugin")
6819 (synopsis "Simple namespaced plugin facility")
6820 (description "Straight Plugin provides a type of plugin you can create from
6821almost any existing Python modules, and an easy way for outside developers to
6822add functionality and customization to your projects with their own plugins.")
6823 (license license:expat)))
6824
6825(define-public python2-straight-plugin
6826 (package-with-python2 python-straight-plugin))
6827
6828(define-public python-fonttools
6829 (package
6830 (name "python-fonttools")
3963fc70 6831 (version "4.2.2")
44d10b1f
RW
6832 (source (origin
6833 (method url-fetch)
6834 (uri (pypi-uri "fonttools" version ".zip"))
6835 (sha256
6836 (base32
3963fc70 6837 "012qqspnwdl4vy8qgzzpfglkk5dgzxiw0fak2jq74ngygvz3vfv6"))))
44d10b1f
RW
6838 (build-system python-build-system)
6839 (native-inputs
6840 `(("unzip" ,unzip)
6841 ("python-pytest" ,python-pytest)
6842 ("python-pytest-runner" ,python-pytest-runner)))
9d25a454 6843 (home-page "https://github.com/fonttools/fonttools")
44d10b1f
RW
6844 (synopsis "Tools to manipulate font files")
6845 (description
6846 "FontTools/TTX is a library to manipulate font files from Python. It
6847supports reading and writing of TrueType/OpenType fonts, reading and writing
6848of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
6849also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
6850from an XML-based format.")
6851 (license license:expat)))
6852
7a039449 6853;; Fonttools 4.x dropped support for Python 2, so stick with 3.x here.
44d10b1f 6854(define-public python2-fonttools
7a039449
MB
6855 (let ((base (package-with-python2 (strip-python2-variant python-fonttools))))
6856 (package/inherit
6857 base
8057faf0 6858 (version "3.44.0")
7a039449
MB
6859 (source (origin
6860 (method url-fetch)
6861 (uri (pypi-uri "fonttools" version ".zip"))
6862 (sha256
6863 (base32
8057faf0 6864 "0v6399g755f2hn1ry62i5b6gdinf2fpx2966v3bxh6bjw1accb5p")))))))
44d10b1f
RW
6865
6866(define-public python-ly
6867 (package
6868 (name "python-ly")
6869 (version "0.9.5")
6870 (source
6871 (origin
6872 (method url-fetch)
6873 (uri (pypi-uri name version))
6874 (sha256
6875 (base32
6876 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
6877 (build-system python-build-system)
6878 (arguments
6879 ;; FIXME: Some tests need network access.
6880 '(#:tests? #f))
6881 (synopsis "Tool and library for manipulating LilyPond files")
6882 (description "This package provides a Python library to parse, manipulate
6883or create documents in LilyPond format. A command line program ly is also
6884provided that can be used to do various manipulations with LilyPond files.")
6885 (home-page "https://pypi.python.org/pypi/python-ly")
6886 (license license:gpl2+)))
6887
6888(define-public python-appdirs
6889 (package
6890 (name "python-appdirs")
6891 (version "1.4.3")
6892 (source
6893 (origin
6894 (method url-fetch)
6895 (uri (pypi-uri "appdirs" version))
6896 (sha256
6897 (base32
6898 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
6899 (build-system python-build-system)
6900 (home-page "https://github.com/ActiveState/appdirs")
6901 (synopsis
6902 "Determine platform-specific dirs, e.g. a \"user data dir\"")
6903 (description
6904 "This module provides a portable way of finding out where user data
6905should be stored on various operating systems.")
6906 (license license:expat)))
6907
6908(define-public python2-appdirs
6909 (package-with-python2 python-appdirs))
6910
6911(define-public python-llfuse
6912 (package
6913 (name "python-llfuse")
6914 (version "1.3.5")
6915 (source (origin
6916 (method url-fetch)
6917 (uri (pypi-uri "llfuse" version ".tar.bz2"))
6918 (sha256
6919 (base32
6920 "1n7a90jww3ly49fm7x27m3xw3la3qfrnykcakga654g6kcyjlhbf"))))
6921 (build-system python-build-system)
6922 (inputs
6923 `(("fuse" ,fuse)
6924 ("attr" ,attr)))
6925 (native-inputs
6926 `(("pkg-config" ,pkg-config)))
6927 (synopsis "Python bindings for FUSE")
6928 (description
6929 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
6930 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
6931 (license license:lgpl2.0+)
6932 (properties `((python2-variant . ,(delay python2-llfuse))))))
6933
6934(define-public python2-llfuse
6935 (package (inherit (package-with-python2
6936 (strip-python2-variant python-llfuse)))
6937 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
6938
6939;; For attic-0.16
6940(define-public python-llfuse-0.41
6941 (package (inherit python-llfuse)
6942 (version "0.41.1")
6943 (source (origin
6944 (method url-fetch)
6945 (uri (string-append
6946 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6947 "llfuse-" version ".tar.bz2"))
6948 (sha256
6949 (base32
6950 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
6951 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
6952 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
6953 (license (list license:expat license:lgpl2.0+))))
6954
6955(define-public python-msgpack
6956 (package
6957 (name "python-msgpack")
6958 (version "0.5.6")
6959 (source (origin
6960 (method url-fetch)
6961 (uri (pypi-uri "msgpack" version))
6962 (sha256
6963 (base32
6964 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
6965 (build-system python-build-system)
6966 (arguments
6967 `(#:modules ((guix build utils)
6968 (guix build python-build-system)
6969 (ice-9 ftw)
6970 (srfi srfi-1)
6971 (srfi srfi-26))
6972 #:phases
6973 (modify-phases %standard-phases
6974 (replace 'check
6975 (lambda _
6976 (let ((cwd (getcwd)))
6977 (setenv "PYTHONPATH"
6978 (string-append cwd "/build/"
6979 (find (cut string-prefix? "lib" <>)
6980 (scandir (string-append cwd "/build")))
6981 ":"
6982 (getenv "PYTHONPATH")))
6983 (invoke "pytest" "-v" "test")))))))
6984 (native-inputs
6985 `(("python-pytest" ,python-pytest)))
6986 (synopsis "MessagePack (de)serializer")
6987 (description "MessagePack is a fast, compact binary serialization format,
6988suitable for similar data to JSON. This package provides CPython bindings for
6989reading and writing MessagePack data.")
6990 (home-page "https://pypi.python.org/pypi/msgpack/")
6991 (license license:asl2.0)))
6992
6993;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
6994;; release 0.5. Some packages like borg still call it by the old name for now.
6995;; <https://bugs.gnu.org/30662>
6996(define-public python-msgpack-transitional
6997 (package
6998 (inherit python-msgpack)
6999 (name "python-msgpack-transitional")
7000 (arguments
7001 (substitute-keyword-arguments (package-arguments python-msgpack)
7002 ((#:phases phases)
7003 `(modify-phases ,phases
7004 (add-after 'unpack 'configure-transitional
7005 (lambda _
7006 ;; Keep using the old name.
7007 (substitute* "setup.py"
7008 (("TRANSITIONAL = False")
7009 "TRANSITIONAL = 1"))
7010 #t))))))))
7011
7012(define-public python2-msgpack
7013 (package-with-python2 python-msgpack))
7014
7015(define-public python-netaddr
7016 (package
7017 (name "python-netaddr")
7018 (version "0.7.19")
7019 (source
7020 (origin
7021 (method url-fetch)
7022 (uri (pypi-uri "netaddr" version))
7023 (sha256
7024 (base32
7025 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
7026 (build-system python-build-system)
7027 (arguments `(#:tests? #f)) ;; No tests.
7028 (home-page "https://github.com/drkjam/netaddr/")
7029 (synopsis "Pythonic manipulation of network addresses")
7030 (description
7031 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
7032and MAC network addresses.")
7033 (license license:bsd-3)))
7034
7035(define-public python2-netaddr
7036 (package-with-python2 python-netaddr))
7037
dd85eca0
AG
7038(define-public python2-pyroute2
7039 (package
7040 (name "python2-pyroute2")
7041 (version "0.5.6")
7042 (source
7043 (origin
7044 (method url-fetch)
7045 (uri (pypi-uri "pyroute2" version))
7046 (sha256
7047 (base32
7048 "1gmz4r1w0yzj6fjjypnalmfyy0lnfznydyn62gi3wk50j5hhxbny"))))
7049 (build-system python-build-system)
7050 (arguments
7051 `(#:python ,python-2)) ;Python 3.x is not supported
7052 (home-page "https://github.com/svinota/pyroute2")
7053 (synopsis "Python netlink library")
7054 (description
7055 "Pyroute2 is a pure Python netlink library with minimal dependencies.
7056Supported netlink families and protocols include:
7057@itemize
7058@item rtnl, network settings - addresses, routes, traffic controls
7059@item nfnetlink - netfilter API: ipset, nftables, ...
7060@item ipq - simplest userspace packet filtering, iptables QUEUE target
7061@item devlink - manage and monitor devlink-enabled hardware
7062@item generic - generic netlink families
7063 @itemize
7064 @item nl80211 - wireless functions API (basic support)
7065 @item taskstats - extended process statistics
7066 @item acpi_events - ACPI events monitoring
7067 @item thermal_events - thermal events monitoring
7068 @item VFS_DQUOT - disk quota events monitoring
7069 @end itemize
7070@end itemize")
7071 (license license:gpl2+)))
7072
44d10b1f
RW
7073(define-public python-wrapt
7074 (package
7075 (name "python-wrapt")
2271a1dc 7076 (version "1.11.2")
44d10b1f 7077 (source
2271a1dc
MB
7078 (origin
7079 (method url-fetch)
7080 (uri (pypi-uri "wrapt" version))
7081 (sha256
7082 (base32
7083 "1q81762dgsgrd12f8qc39zk8s5wll3m5xc32jdmlf6cls4gh4njn"))))
44d10b1f
RW
7084 (build-system python-build-system)
7085 (arguments
7086 ;; Tests are not included in the tarball, they are only available in the
7087 ;; git repository.
7088 `(#:tests? #f))
7089 (home-page "https://github.com/GrahamDumpleton/wrapt")
7090 (synopsis "Module for decorators, wrappers and monkey patching")
7091 (description
2271a1dc 7092 "The aim of the wrapt module is to provide a transparent object proxy for
44d10b1f
RW
7093 Python, which can be used as the basis for the construction of function
7094 wrappers and decorator functions.")
7095 (license license:bsd-2)))
7096
7097(define-public python2-wrapt
7098 (package-with-python2 python-wrapt))
7099
7100(define-public python-xlrd
7101 (package
7102 (name "python-xlrd")
3a2b1a3c 7103 (version "1.2.0")
44d10b1f
RW
7104 (source (origin
7105 (method url-fetch)
7106 (uri (pypi-uri "xlrd" version))
7107 (sha256
7108 (base32
3a2b1a3c 7109 "1ci93fda4n67qhdvfl16zasyxrpygzk53hs6m8z0rd4dxrnb6vjl"))))
44d10b1f
RW
7110 (build-system python-build-system)
7111 (arguments
7112 `(#:phases
7113 (modify-phases %standard-phases
3ccdd3a5
MO
7114 ;; Some tests depend on writing a temporary file to the user's home
7115 ;; directory.
3a2b1a3c
GL
7116 (add-after 'unpack 'fix-tests
7117 (lambda _
7118 (delete-file "tests/test_open_workbook.py")
7119 #t)))))
44d10b1f
RW
7120 (home-page "http://www.python-excel.org/")
7121 (synopsis "Library for extracting data from Excel files")
a0909286 7122 (description "This package provides a library to extract data from
44d10b1f
RW
7123spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
7124@samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
7125Unicode-aware. It is not intended as an end-user tool.")
7126 (license license:bsd-3)))
7127
7128(define-public python2-xlrd
7129 (package-with-python2 python-xlrd))
7130
7131(define-public python-prettytable
7132 (package
7133 (name "python-prettytable")
7134 (version "0.7.2")
7135 (source
7136 (origin
7137 (method url-fetch)
337c3a1e 7138 (uri (pypi-uri "prettytable" version ".tar.bz2"))
44d10b1f
RW
7139 (sha256
7140 (base32
7141 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
7142 (build-system python-build-system)
7143 (home-page "http://code.google.com/p/prettytable/")
7144 (synopsis "Display tabular data in an ASCII table format")
7145 (description
7146 "A library designed to represent tabular data in visually appealing ASCII
7147tables. PrettyTable allows for selection of which columns are to be printed,
7148independent alignment of columns (left or right justified or centred) and
7149printing of sub-tables by specifying a row range.")
7150 (license license:bsd-3)))
7151
7152(define-public python2-prettytable
7153 (package-with-python2 python-prettytable))
7154
7155(define-public python-tables
7156 (package
7157 (name "python-tables")
7158 (version "3.4.4")
7159 (source
7160 (origin
7161 (method url-fetch)
7162 (uri (pypi-uri "tables" version))
7163 (sha256
7164 (base32
7165 "0affz7k8babh8wdmsgrz5jxrd569by2w8ffimcxs9wiaf5rw1idx"))
7166 (modules '((guix build utils)))
7167 (snippet
7168 '(begin
7169 ;; Remove pre-compiled .pyc files from source.
7170 (for-each delete-file-recursively
7171 (find-files "." "__pycache__" #:directories? #t))
7172 (for-each delete-file (find-files "." "\\.pyc$"))
7173 #t))))
7174 (build-system python-build-system)
7175 (arguments
7176 `(;; FIXME: python-build-system does not pass configure-flags to "build"
7177 ;; or "check", so we must override the build and check phases.
7178 #:phases
7179 (modify-phases %standard-phases
7180 (add-after 'unpack 'use-gcc
7181 (lambda _
7182 (substitute* "setup.py"
7183 (("compiler = new_compiler\\(\\)" line)
7184 (string-append line
7185 "\ncompiler.set_executables(compiler='gcc',"
7186 "compiler_so='gcc',"
7187 "linker_exe='gcc',"
7188 "linker_so='gcc -shared')")))
7189 #t))
7190 (replace 'build
7191 (lambda* (#:key inputs #:allow-other-keys)
35d79d61
RW
7192 (invoke "python" "setup.py" "build"
7193 (string-append "--hdf5="
7194 (assoc-ref inputs "hdf5")))))
44d10b1f
RW
7195 (replace 'check
7196 (lambda* (#:key inputs #:allow-other-keys)
35d79d61
RW
7197 (invoke "python" "setup.py" "check"
7198 (string-append "--hdf5="
7199 (assoc-ref inputs "hdf5"))))))))
44d10b1f
RW
7200 (propagated-inputs
7201 `(("python-numexpr" ,python-numexpr)
7202 ("python-numpy" ,python-numpy)))
7203 (native-inputs
7204 `(("python-cython" ,python-cython)
7205 ("pkg-config" ,pkg-config)))
7206 (inputs
7207 `(("hdf5" ,hdf5)
7208 ("bzip2" ,bzip2)
7209 ("zlib" ,zlib)))
7210 (home-page "http://www.pytables.org/")
7211 (synopsis "Hierarchical datasets for Python")
7212 (description "PyTables is a package for managing hierarchical datasets and
7213designed to efficiently cope with extremely large amounts of data.")
7214 (license license:bsd-3)))
7215
7216(define-public python2-tables
7217 (package-with-python2 python-tables))
7218
7219(define-public python-pyasn1
7220 (package
7221 (name "python-pyasn1")
7222 (version "0.4.3")
7223 (source
7224 (origin
7225 (method url-fetch)
7226 (uri (pypi-uri "pyasn1" version))
7227 (sha256
7228 (base32
7229 "1z5h38anjzzrxpraa9iq9llffyx2zs8gx0q6dc1g029miwnn50gv"))))
7230 (build-system python-build-system)
7231 (home-page "http://pyasn1.sourceforge.net/")
7232 (synopsis "ASN.1 types and codecs")
7233 (description
7234 "This is an implementation of ASN.1 types and codecs in Python. It is
7235suitable for a wide range of protocols based on the ASN.1 specification.")
7236 (license license:bsd-2)))
7237
7238(define-public python2-pyasn1
7239 (package-with-python2 python-pyasn1))
7240
7241(define-public python-pyasn1-modules
7242 (package
7243 (name "python-pyasn1-modules")
7244 (version "0.2.2")
7245 (source
7246 (origin
7247 (method url-fetch)
7248 (uri (pypi-uri "pyasn1-modules" version))
7249 (sha256
7250 (base32
7251 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
7252 (build-system python-build-system)
7253 (propagated-inputs
7254 `(("python-pyasn1" ,python-pyasn1)))
7255 (home-page "https://sourceforge.net/projects/pyasn1/")
7256 (synopsis "ASN.1 codec implementations")
7257 (description
7258 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
7259implementations of ASN.1-based codecs and protocols.")
7260 (license license:bsd-3)))
7261
7262(define-public python2-pyasn1-modules
7263 (package-with-python2 python-pyasn1-modules))
7264
7265(define-public python-ipaddress
7266 (package
7267 (name "python-ipaddress")
7268 (version "1.0.22")
7269 (source (origin
7270 (method url-fetch)
7271 (uri (pypi-uri "ipaddress" version))
7272 (sha256
7273 (base32
7274 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
7275 (build-system python-build-system)
7276 (home-page "https://github.com/phihag/ipaddress")
7277 (synopsis "IP address manipulation library")
7278 (description
7279 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
7280 in Python. This library is used to create, poke at, and manipulate IPv4 and
7281 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
7282 module to older versions of Python.")
7283 (license license:psfl)))
7284
7285(define-public python2-ipaddress
7286 (package-with-python2 python-ipaddress))
7287
7288(define-public python2-ipaddr
7289 (package
7290 (name "python2-ipaddr")
7291 (version "2.1.11")
7292 (source
7293 (origin
7294 (method url-fetch)
7295 (uri (pypi-uri "ipaddr" version))
7296 (sha256
7297 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
7298 (build-system python-build-system)
7299 (arguments
7300 `(#:python ,python-2 ;version 2 only
7301 #:phases
7302 (modify-phases %standard-phases
7303 (replace 'check
40b8c4e3 7304 (lambda _ (invoke "python" "ipaddr_test.py"))))))
44d10b1f
RW
7305 (home-page "https://github.com/google/ipaddr-py")
7306 (synopsis "IP address manipulation library")
7307 (description
7308 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
7309IPv6 addresses and networks.
7310
7311For new implementations you may prefer to use the standard module
7312@code{ipaddress}, which was introduced in Python 3.3 and backported to older
7313versions of Python.")
7314 (license license:asl2.0)))
7315
7316(define-public python-idna
7317 (package
7318 (name "python-idna")
e95c9837 7319 (version "2.8")
44d10b1f
RW
7320 (source
7321 (origin
7322 (method url-fetch)
7323 (uri (pypi-uri "idna" version))
7324 (sha256
7325 (base32
e95c9837 7326 "01rlkigdxg17sf9yar1jl8n18ls59367wqh59hnawlyg53vb6my3"))))
44d10b1f
RW
7327 (build-system python-build-system)
7328 (home-page "https://github.com/kjd/idna")
7329 (synopsis "Internationalized domain names in applications")
7330 (description
7331 "This is a library to support the Internationalised Domain Names in
7332Applications (IDNA) protocol as specified in RFC 5891. This version of the
7333protocol is often referred to as “IDNA2008” and can produce different results
7334from the earlier standard from 2003. The library is also intended to act as a
7335suitable drop-in replacement for the “encodings.idna” module that comes with
7336the Python standard library but currently only supports the older 2003
7337specification.")
7338 (license license:bsd-4)))
7339
a76e6a69
JM
7340(define-public python-idna-2.7
7341 (package (inherit python-idna)
7342 (version "2.7")
7343 (source (origin
7344 (method url-fetch)
7345 (uri (pypi-uri "idna" version))
7346 (sha256
7347 (base32
7348 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))))
7349
7350
44d10b1f
RW
7351(define-public python2-idna
7352 (package-with-python2 python-idna))
7353
7354(define-public python-idna-ssl
7355 (package
7356 (name "python-idna-ssl")
7357 (version "1.0.1")
7358 (source
7359 (origin
7360 (method url-fetch)
7361 (uri (pypi-uri "idna-ssl" version))
7362 (sha256
7363 (base32
7364 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
7365 (build-system python-build-system)
7366 (arguments
7367 `(#:tests? #f)) ;circular dependency with python-aiohttp
7368 (home-page "https://github.com/aio-libs/idna-ssl")
7369 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
7370 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
7371domains support.")
7372 (license license:expat)))
7373
7374(define-public python-pretend
7375 (package
7376 (name "python-pretend")
7377 (version "1.0.9")
7378 (source
7379 (origin
7380 (method url-fetch)
9f1f22ee 7381 (uri (pypi-uri "pretend" version))
44d10b1f
RW
7382 (sha256
7383 (base32
7384 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
7385 (build-system python-build-system)
7386 (home-page "https://github.com/alex/pretend")
7387 (synopsis "Library for stubbing in Python")
7388 (description
7389 "Pretend is a library to make stubbing with Python easier. Stubbing is a
7390technique for writing tests. You may hear the term mixed up with mocks,
7391fakes, or doubles. Basically, a stub is an object that returns pre-canned
7392responses, rather than doing any computation.")
7393 (license license:bsd-3)))
7394
7395(define-public python2-pretend
7396 (package-with-python2 python-pretend))
7397
7398(define-public python-pip
7399 (package
7400 (name "python-pip")
523ba4b1 7401 (version "19.2.1")
44d10b1f
RW
7402 (source
7403 (origin
7404 (method url-fetch)
7405 (uri (pypi-uri "pip" version))
7406 (sha256
7407 (base32
523ba4b1 7408 "100sd12ss4mbdj5lf3wawad29cm573b27765mq098x6xhcj71395"))))
44d10b1f
RW
7409 (build-system python-build-system)
7410 (arguments
7411 '(#:tests? #f)) ; there are no tests in the pypi archive.
7412 (home-page "https://pip.pypa.io/")
7413 (synopsis "Package manager for Python software")
7414 (description
7415 "Pip is a package manager for Python software, that finds packages on the
7416Python Package Index (PyPI).")
7417 (license license:expat)))
7418
7419(define-public python2-pip
7420 (package-with-python2 python-pip))
7421
7422(define-public python-tlsh
7423 (package
7424 (name "python-tlsh")
7425 (version "3.4.5")
7426 (home-page "https://github.com/trendmicro/tlsh")
3e3ff8ad
TGR
7427 (source
7428 (origin
7429 (method git-fetch)
7430 (uri (git-reference
7431 (url "https://github.com/trendmicro/tlsh.git")
7432 (commit (string-append "v" version))))
7433 (file-name (git-file-name name version))
7434 (sha256
7435 (base32 "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll"))))
44d10b1f
RW
7436 (build-system cmake-build-system)
7437 (arguments
7438 '(#:out-of-source? #f
7439 #:phases (modify-phases %standard-phases
7440 (replace
7441 'install
7442 (lambda* (#:key outputs #:allow-other-keys)
7443 ;; Build and install the Python bindings. The underlying
7444 ;; C++ library is apparently not meant to be installed.
7445 (let ((out (assoc-ref outputs "out")))
7446 (with-directory-excursion "py_ext"
7447 (and (system* "python" "setup.py" "build")
7448 (system* "python" "setup.py" "install"
7449 (string-append "--prefix=" out))))))))))
7450 (inputs `(("python" ,python-wrapper))) ;for the bindings
7451 (synopsis "Fuzzy matching library for Python")
7452 (description
7453 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
7454Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
7455value which can be used for similarity comparisons. Similar objects have
7456similar hash values, which allows for the detection of similar objects by
7457comparing their hash values. The byte stream should have a sufficient amount
7458of complexity; for example, a byte stream of identical bytes will not generate
7459a hash value.")
7460 (license license:asl2.0)))
7461
7462(define-public python2-tlsh
7463 (package
7464 (inherit python-tlsh)
7465 (name "python2-tlsh")
7466 (inputs `(("python" ,python-2)))))
7467
7468(define-public python-termcolor
7469 (package
7470 (name "python-termcolor")
7471 (version "1.1.0")
7472 (source
7473 (origin
7474 (method url-fetch)
7475 (uri (pypi-uri "termcolor" version))
7476 (sha256
7477 (base32
7478 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
7479 (build-system python-build-system)
7480 (arguments
7481 ;; There are no tests.
7482 `(#:tests? #f))
7483 (home-page "https://pypi.python.org/pypi/termcolor")
7484 (synopsis "ANSII Color formatting for terminal output")
7485 (description
7486 "This package provides ANSII Color formatting for output in terminals.")
7487 (license license:expat)))
7488
7489(define-public python2-termcolor
7490 (package-with-python2 python-termcolor))
7491
7492(define-public python-libarchive-c
7493 (package
7494 (name "python-libarchive-c")
7495 (version "2.8")
7496 (source (origin
7497 (method url-fetch)
7498 (uri (pypi-uri "libarchive-c" version))
7499 (sha256
7500 (base32
7501 "0qg0v1s9c1xdk9philhnv8k6c6nicvnvfwlc0j9srg90jmdlvm06"))))
7502 (build-system python-build-system)
7503 (arguments
7504 '(#:phases (modify-phases %standard-phases
7505 (add-before
7506 'build 'reference-libarchive
7507 (lambda* (#:key inputs #:allow-other-keys)
7508 ;; Retain the absolute file name of libarchive.so.
7509 (let ((libarchive (assoc-ref inputs "libarchive")))
7510 (substitute* "libarchive/ffi.py"
7511 (("find_library\\('archive'\\)")
7512 (string-append "'" libarchive
7513 "/lib/libarchive.so'"))))))
7514 (replace 'check
7515 (lambda _ (invoke "pytest" "-vv"))))))
7516 (native-inputs
7517 `(("python-mock" ,python-mock)
7518 ("python-pytest" ,python-pytest)))
7519 (inputs
7520 `(("libarchive" ,libarchive)))
7521 (home-page "https://github.com/Changaco/python-libarchive-c")
7522 (synopsis "Python interface to libarchive")
7523 (description
7524 "This package provides Python bindings to libarchive, a C library to
7525access possibly compressed archives in many different formats. It uses
7526Python's @code{ctypes} foreign function interface (FFI).")
7527 (license license:lgpl2.0+)))
7528
7529(define-public python2-libarchive-c
7530 (package-with-python2 python-libarchive-c))
7531
7532(define-public python-file
7533 (package
7534 (inherit file)
7535 (name "python-file")
7536 (build-system python-build-system)
7537 (arguments
7538 '(#:tests? #f ;no tests
7539 #:configure-flags '("--single-version-externally-managed" "--root=/")
7540 #:phases (modify-phases %standard-phases
7541 (add-before 'build 'change-directory
7542 (lambda _
7543 (chdir "python")
7544 #t))
7545 (add-before 'build 'set-library-file-name
7546 (lambda* (#:key inputs #:allow-other-keys)
7547 (let ((file (assoc-ref inputs "file")))
7548 (substitute* "magic.py"
7549 (("find_library\\('magic'\\)")
7550 (string-append "'" file "/lib/libmagic.so'")))
7551 #t))))))
7552 (inputs `(("file" ,file)))
528ea990
LC
7553 (native-inputs (if (%current-target-system)
7554 `(("self" ,this-package))
7555 '()))
44d10b1f
RW
7556 (synopsis "Python bindings to the libmagic file type guesser. Note that
7557this module and the python-magic module both provide a \"magic.py\" file;
7558these two modules, which are different and were developed separately, both
7559serve the same purpose: provide Python bindings for libmagic.")))
7560
7561(define-public python2-file
7562 (package-with-python2 python-file))
7563
7564(define-public python-debian
7565 (package
7566 (name "python-debian")
7567 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
9f74bd31 7568 (version "0.1.36")
44d10b1f
RW
7569 (source
7570 (origin
9f74bd31
VC
7571 ;; Use git-fetch, as pypi doesn't include test suite.
7572 (method git-fetch)
7573 (uri (git-reference
7574 (url home-page)
7575 (commit version)))
7576 (file-name (git-file-name name version))
44d10b1f
RW
7577 (sha256
7578 (base32
9f74bd31 7579 "0qy6x28bj6yfikhjww932v5xq4mf5bm1iczl7acy4c7zm6mwhqfa"))))
44d10b1f 7580 (build-system python-build-system)
9f74bd31
VC
7581 (arguments
7582 `(#:phases (modify-phases %standard-phases
7583 (add-after 'unpack 'remove-debian-specific-tests
7584 ;; python-apt, apt and dpkg are not yet available in guix,
7585 ;; and these tests heavily depend on them.
7586 (lambda _
7587 (delete-file "lib/debian/tests/test_deb822.py")
7588 (delete-file "lib/debian/tests/test_debfile.py")
7589 #t)))))
44d10b1f 7590 (propagated-inputs
9f74bd31
VC
7591 `(("python-six" ,python-six)
7592 ("python-chardet" ,python-chardet)))
44d10b1f
RW
7593 (synopsis "Debian package related modules")
7594 (description
7595 ;; XXX: Use @enumerate instead of @itemize to work around
7596 ;; <http://bugs.gnu.org/21772>.
7597 "This package provides Python modules that abstract many formats of
7598Debian-related files, such as:
7599
7600@enumerate
7601@item Debtags information;
7602@item @file{debian/changelog} files;
7603@item packages files, pdiffs;
7604@item control files of single or multiple RFC822-style paragraphs---e.g.
7605 @file{debian/control}, @file{.changes}, @file{.dsc};
7606@item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
7607 contained files and meta-information.
7608@end enumerate\n")
7609
7610 ;; Modules are either GPLv2+ or GPLv3+.
7611 (license license:gpl3+)))
7612
7613(define-public python2-debian
7614 (package-with-python2 python-debian))
7615
7616(define-public python-nbformat
7617 (package
7618 (name "python-nbformat")
7619 (version "4.4.0")
7620 (source
7621 (origin
7622 (method url-fetch)
7623 (uri (pypi-uri "nbformat" version))
7624 (sha256
7625 (base32
7626 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
7627 (build-system python-build-system)
7628 (arguments `(#:tests? #f)) ; no test target
7629 (propagated-inputs
7630 `(("python-ipython-genutils" ,python-ipython-genutils)
7631 ("python-jsonschema" ,python-jsonschema)
7632 ("python-jupyter-core" ,python-jupyter-core)
7633 ("python-traitlets" ,python-traitlets)))
7634 (home-page "http://jupyter.org")
7635 (synopsis "Jupyter Notebook format")
7636 (description "This package provides the reference implementation of the
7637Jupyter Notebook format and Python APIs for working with notebooks.")
7638 (license license:bsd-3)))
7639
7640(define-public python2-nbformat
7641 (package-with-python2 python-nbformat))
7642
7643(define-public python-bleach
7644 (package
7645 (name "python-bleach")
ff0efc8f 7646 (version "3.1.0")
44d10b1f
RW
7647 (source
7648 (origin
7649 (method url-fetch)
7650 (uri (pypi-uri "bleach" version))
7651 (sha256
7652 (base32
ff0efc8f 7653 "1yhrgrhkln8bd6gn3imj69g1h4xqah9gaz9q26crqr6gmmvpzprz"))))
44d10b1f
RW
7654 (build-system python-build-system)
7655 (propagated-inputs
ff0efc8f 7656 `(("python-webencodings" ,python-webencodings)
44d10b1f
RW
7657 ("python-six" ,python-six)))
7658 (native-inputs
ff0efc8f
MB
7659 `(("python-pytest" ,python-pytest)
7660 ("python-pytest-runner" ,python-pytest-runner-2)))
44d10b1f
RW
7661 (home-page "https://github.com/jsocol/bleach")
7662 (synopsis "Whitelist-based HTML-sanitizing tool")
7663 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
7664 (license license:asl2.0)))
7665
7666(define-public python2-bleach
7667 (package-with-python2 python-bleach))
7668
7669(define-public python-entrypoints
7670 (package
7671 (name "python-entrypoints")
a7f1b718 7672 (version "0.3")
44d10b1f
RW
7673 (source
7674 (origin
7675 (method url-fetch)
a7f1b718 7676 (uri (pypi-uri "entrypoints" version))
44d10b1f
RW
7677 (sha256
7678 (base32
a7f1b718 7679 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
44d10b1f
RW
7680 (build-system python-build-system)
7681 ;; The package does not come with a setup.py file, so we have to generate
7682 ;; one ourselves.
7683 (arguments
7684 `(#:tests? #f
7685 #:phases
7686 (modify-phases %standard-phases
7687 (add-after 'unpack 'create-setup.py
7688 (lambda _
7689 (call-with-output-file "setup.py"
7690 (lambda (port)
7691 (format port "\
7692from setuptools import setup
7693setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
7694" ,version))))))))
7695 (home-page "https://github.com/takluyver/entrypoints")
7696 (synopsis "Discover and load entry points from installed Python packages")
7697 (description "Entry points are a way for Python packages to advertise
7698objects with some common interface. The most common examples are
7699@code{console_scripts} entry points, which define shell commands by
7700identifying a Python function to run. The @code{entrypoints} module contains
7701functions to find and load entry points.")
7702 (license license:expat)))
7703
7704(define-public python2-entrypoints
7705 (package-with-python2 python-entrypoints))
7706
7707(define-public python-nbconvert
7708 (package
7709 (name "python-nbconvert")
7710 (version "5.0.0b1")
7711 (source
7712 (origin
7713 (method url-fetch)
7714 (uri (pypi-uri "nbconvert" version))
7715 (sha256
7716 (base32
7717 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
7718 (build-system python-build-system)
7719 (arguments
7720 `(;; The "bdist_egg" target is disabled by default, causing the installation
7721 ;; to fail.
7722 #:configure-flags (list "bdist_egg")
7723 ;; FIXME: 5 failures, 40 errors.
7724 #:tests? #f))
7725 ;; #:phases
7726 ;; (modify-phases %standard-phases
7727 ;; (replace 'check
7728 ;; (lambda _
7729 ;; (zero? (system* "py.test" "-v")))))
7730 (native-inputs
7731 `(("python-pytest" ,python-pytest)))
7732 (propagated-inputs
7733 `(("python-bleach" ,python-bleach)
7734 ("python-entrypoints" ,python-entrypoints)
7735 ("python-jinja2" ,python-jinja2)
7736 ("python-jupyter-core" ,python-jupyter-core)
7737 ("python-mistune" ,python-mistune)
7738 ("python-nbformat" ,python-nbformat)
7739 ("python-pygments" ,python-pygments)
7740 ("python-traitlets" ,python-traitlets)))
7741 (home-page "http://jupyter.org")
7742 (synopsis "Converting Jupyter Notebooks")
7743 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
7744notebooks to various other formats via Jinja templates. It allows you to
7745convert an @code{.ipynb} notebook file into various static formats including:
7746
7747@enumerate
7748@item HTML
7749@item LaTeX
7750@item PDF
7751@item Reveal JS
7752@item Markdown (md)
7753@item ReStructured Text (rst)
7754@item executable script
7755@end enumerate\n")
7756 (license license:bsd-3)))
7757
7758(define-public python2-nbconvert
7759 (package-with-python2 python-nbconvert))
7760
44d10b1f
RW
7761(define-public python-notebook
7762 (package
7763 (name "python-notebook")
7764 (version "5.7.4")
7765 (source (origin
7766 (method url-fetch)
7767 (uri (pypi-uri "notebook" version))
7768 (sha256
7769 (base32
7770 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
7771 (build-system python-build-system)
7772 (arguments
7773 `(#:phases
7774 (modify-phases %standard-phases
7775 (replace 'check
7776 (lambda _
7777 ;; These tests require a browser
7778 (delete-file-recursively "notebook/tests/selenium")
7779 ;; Some tests need HOME
7780 (setenv "HOME" "/tmp")
7781 ;; This file contains "warningfilters", which are not supported
7782 ;; by this version of nose.
7783 (delete-file "setup.cfg")
7784 (with-directory-excursion "/tmp"
7785 (invoke "nosetests" "-v"))
7786 #t)))))
7787 (propagated-inputs
7788 `(("python-jupyter-core" ,python-jupyter-core)
7789 ("python-nbformat" ,python-nbformat)
7790 ("python-nbconvert" ,python-nbconvert)
7791 ("python-prometheus-client" ,python-prometheus-client)
7792 ("python-send2trash" ,python-send2trash)
7793 ("python-terminado" ,python-terminado)))
7794 (native-inputs
7795 `(("python-nose" ,python-nose)
7796 ("python-sphinx" ,python-sphinx)
7797 ("python-requests" ,python-requests)))
7798 (home-page "http://jupyter.org/")
7799 (synopsis "Web-based notebook environment for interactive computing")
7800 (description
7801 "The Jupyter HTML notebook is a web-based notebook environment for
7802interactive computing.")
7803 (properties `((python2-variant . ,(delay python2-notebook))))
7804 (license license:bsd-3)))
7805
7806(define-public python2-notebook
7807 (let ((base (package-with-python2
7808 (strip-python2-variant python-notebook))))
7809 (package (inherit base)
7810 (native-inputs
7811 `(("python2-mock" ,python2-mock)
7812 ,@(package-native-inputs base)))
7813 (arguments
7814 (substitute-keyword-arguments (package-arguments base)
7815 ((#:phases phases)
7816 `(modify-phases ,phases
7817 (add-before 'check 'disable-test-case
7818 ;; The test requires network access to localhost. Curiously it
7819 ;; fails with Python 2 only. Simply make the test-case return
7820 ;; immediately.
7821 (lambda _
7822 (substitute*
7823 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
7824 (("formats = self.nbconvert_api") "return #")))))))))))
7825
7826(define-public python-widgetsnbextension
7827 (package
7828 (name "python-widgetsnbextension")
7829 (version "3.4.2")
7830 (source
7831 (origin
7832 (method url-fetch)
7833 (uri (pypi-uri "widgetsnbextension" version))
7834 (sha256
7835 (base32
7836 "0rc2nivdy7k4m3vljx7wdh2jh11djapcgwhvzlbs0isl8gl8nqgs"))))
7837 (build-system python-build-system)
7838 (propagated-inputs
7839 `(("python-ipykernel" ,python-ipykernel)
7840 ("python-notebook" ,python-notebook)))
7841 (native-inputs
7842 `(("python-certifi" ,python-certifi)
7843 ("python-nose" ,python-nose)))
7844 (home-page "https://ipython.org")
7845 (synopsis "IPython HTML widgets for Jupyter")
7846 (description "This package provides interactive HTML widgets for Jupyter
7847notebooks.")
7848 (license license:bsd-3)))
7849
7850(define-public python2-widgetsnbextension
7851 (package-with-python2 python-widgetsnbextension))
7852
7853(define-public python-ipywidgets
7854 (package
7855 (name "python-ipywidgets")
7856 (version "5.2.2")
7857 (source
7858 (origin
7859 (method url-fetch)
7860 (uri (pypi-uri "ipywidgets" version))
7861 (sha256
7862 (base32
7863 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
7864 (build-system python-build-system)
7865 (propagated-inputs
7866 `(("python-ipython" ,python-ipython)
7867 ("python-traitlets" ,python-traitlets)
7868 ("python-widgetsnbextension" ,python-widgetsnbextension)))
7869 (native-inputs
7870 `(("python-nose" ,python-nose)
7871 ("python-pytest" ,python-pytest)))
7872 (home-page "https://ipython.org")
7873 (synopsis "IPython HTML widgets for Jupyter")
7874 (description "Ipywidgets are interactive HTML widgets for Jupyter
7875notebooks and the IPython kernel. Notebooks come alive when interactive
7876widgets are used. Users gain control of their data and can visualize changes
7877in the data.")
7878 (license license:bsd-3)))
7879
7880(define-public python2-ipywidgets
7881 (package-with-python2 python-ipywidgets))
7882
7883(define-public python-jupyter-console
7884 (package
7885 (name "python-jupyter-console")
becb9cbf 7886 (version "6.0.0")
44d10b1f
RW
7887 (source
7888 (origin
7889 (method url-fetch)
7890 (uri (pypi-uri "jupyter_console" version))
7891 (sha256
7892 (base32
becb9cbf 7893 "1xdjw11cppf1fxvwkw2bk13ckkwas3bdah8baingn9296mvfi31h"))))
44d10b1f 7894 (build-system python-build-system)
44d10b1f
RW
7895 (propagated-inputs
7896 `(("python-ipykernel" ,python-ipykernel)
7897 ("python-jupyter-client" ,python-jupyter-client)
becb9cbf 7898 ("python-prompt-toolkit" ,python-prompt-toolkit)
44d10b1f
RW
7899 ("python-pygments" ,python-pygments)))
7900 (native-inputs
7901 `(("python-nose" ,python-nose)))
7902 (home-page "https://jupyter.org")
7903 (synopsis "Jupyter terminal console")
7904 (description "This package provides a terminal-based console frontend for
7905Jupyter kernels. It also allows for console-based interaction with non-Python
7906Jupyter kernels such as IJulia and IRKernel.")
7907 (license license:bsd-3)))
7908
7909(define-public python2-jupyter-console
8e590c81
RW
7910 (package
7911 (name "python2-jupyter-console")
7912 (version "5.2.0")
7913 (source
7914 (origin
7915 (method url-fetch)
7916 (uri (pypi-uri "jupyter_console" version))
7917 (sha256
7918 (base32
7919 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
7920 (build-system python-build-system)
7921 ;; Tests only run in an TTY.
7922 (arguments `(#:tests? #f))
7923 (propagated-inputs
7924 `(("python2-ipykernel" ,python2-ipykernel)
7925 ("python2-jupyter-client" ,python2-jupyter-client)
7926 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
7927 ("python2-pygments" ,python2-pygments)))
7928 (native-inputs
7929 `(("python2-nose" ,python2-nose)))
7930 (home-page "https://jupyter.org")
7931 (synopsis "Jupyter terminal console")
7932 (description "This package provides a terminal-based console frontend for
7933Jupyter kernels. It also allows for console-based interaction with non-Python
7934Jupyter kernels such as IJulia and IRKernel.")
7935 (license license:bsd-3)))
44d10b1f
RW
7936
7937;; The python-ipython and python-jupyter-console require each other. To get
7938;; the functionality in both packages working, strip down the
7939;; python-jupyter-console package when using it as an input to python-ipython.
7940(define python-jupyter-console-minimal
7941 (package
7942 (inherit python-jupyter-console)
7943 (name "python-jupyter-console-minimal")
7944 (arguments
7945 (substitute-keyword-arguments
7946 (package-arguments python-jupyter-console)
7947 ((#:phases phases)
7948 `(modify-phases ,phases
7949 (add-after 'install 'delete-bin
7950 (lambda* (#:key outputs #:allow-other-keys)
7951 ;; Delete the bin files, to avoid conflicts in profiles
7952 ;; where python-ipython and python-jupyter-console are
7953 ;; both present.
7954 (delete-file-recursively
7955 (string-append
7956 (assoc-ref outputs "out") "/bin"))))))))
7957 ;; Remove the python-ipython propagated input, to avoid the cycle
7958 (propagated-inputs
7959 (alist-delete
7960 "python-ipython"
7961 (package-propagated-inputs python-jupyter-console)))))
7962
7963(define-public python-qtconsole
7964 (package
7965 (name "python-qtconsole")
7966 (version "4.4.3")
7967 (source
7968 (origin
7969 (method url-fetch)
7970 (uri (pypi-uri "qtconsole" version))
7971 (sha256
7972 (base32
7973 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
7974 (build-system python-build-system)
7975 (arguments
7976 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
7977 ;; but we only have the LTS version 5.x. This means that there might be
7978 ;; runtime errors, but since this is a dependency of the Jupyter package,
7979 ;; and Jupyter can be used without the qtconsole we can overlook this for
7980 ;; now.
7981 `(#:tests? #f
7982 #:phases
7983 (modify-phases %standard-phases
7984 (add-before 'check 'pre-check
7985 (lambda _
7986 (setenv "QT_QPA_PLATFORM" "offscreen")
7987 #t)))))
7988 (propagated-inputs
7989 `(("python-ipykernel" ,python-ipykernel)
7990 ("python-ipython" ,python-ipython)))
7991 (native-inputs
7992 `(("python-pytest" ,python-pytest)))
7993 (home-page "http://jupyter.org")
7994 (synopsis "Jupyter Qt console")
7995 (description "This package provides a Qt-based console for Jupyter with
7996support for rich media output.")
7997 (license license:bsd-3)))
7998
6ec87223
VC
7999(define-public python-jsbeautifier
8000 (package
8001 (name "python-jsbeautifier")
8002 (version "1.10.2")
8003 (home-page "https://github.com/beautify-web/js-beautify")
8004 (source (origin
8005 (method git-fetch)
8006 (uri (git-reference
8007 (url home-page)
8008 (commit (string-append "v" version))))
8009 (file-name (git-file-name name version))
8010 (sha256
8011 (base32
8012 "0wawb070ki1axb3jc9xvsrgpji52vcfif3zmjzc3z4g98m5xw4kg"))))
8013 (build-system python-build-system)
8014 (arguments
8015 `(#:phases (modify-phases %standard-phases
8016 (add-after 'unpack 'chdir
8017 (lambda _
8018 ;; The upstream Git repository contains all the code,
8019 ;; but this package only builds the python code.
8020 (chdir "python")
8021 #t))
8022 (add-after 'unpack 'patch-python-six-requirements
8023 (lambda _
8024 (substitute* "python/setup.py"
8025 (("six>=1.12.0")
8026 "six>=1.11.0"))
8027 #t)))))
8028 (propagated-inputs
8029 `(("python-editorconfig" ,python-editorconfig)
8030 ("python-six" ,python-six)))
8031 (native-inputs
8032 `(("python-pytest" ,python-pytest)))
8033 (synopsis "JavaScript unobfuscator and beautifier")
8034 (description "Beautify, unpack or deobfuscate JavaScript, leveraging
8035popular online obfuscators.")
8036 (license license:expat)))
8037
44d10b1f
RW
8038(define-public jupyter
8039 (package
8040 (name "jupyter")
8041 (version "1.0.0")
8042 (source
8043 (origin
8044 (method url-fetch)
8045 (uri (pypi-uri "jupyter" version))
8046 (sha256
8047 (base32
8048 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
8049 (build-system python-build-system)
8050 (arguments '(#:tests? #f)) ; there are none.
8051 (propagated-inputs
8052 `(("python-ipykernel" ,python-ipykernel)
8053 ("python-ipywidgets" ,python-ipywidgets)
8054 ("python-jupyter-console" ,python-jupyter-console)
8055 ("python-nbconvert" ,python-nbconvert)
8056 ("python-notebook" ,python-notebook)
8057 ("python-qtconsole" ,python-qtconsole)))
8058 (native-search-paths
8059 (list (search-path-specification
8060 (variable "JUPYTER_PATH")
8061 (files '("share/jupyter")))))
8062 (home-page "https://jupyter.org")
8063 (synopsis "Web application for interactive documents")
8064 (description
8065 "The Jupyter Notebook is a web application that allows you to create and
8066share documents that contain live code, equations, visualizations and
8067explanatory text. Uses include: data cleaning and transformation, numerical
8068simulation, statistical modeling, machine learning and much more.")
8069 (license license:bsd-3)))
8070
8071(define-public python-chardet
8072 (package
8073 (name "python-chardet")
8074 (version "3.0.4")
8075 (source
8076 (origin
8077 (method url-fetch)
8078 (uri (pypi-uri "chardet" version))
8079 (sha256
8080 (base32
8081 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
8082 (native-inputs
8083 `(("python-hypothesis" ,python-hypothesis)
8084 ("python-pytest" ,python-pytest)
8085 ("python-pytest-runner" ,python-pytest-runner)))
8086 (build-system python-build-system)
3d369407
MB
8087 ;; XXX: Incompatible with Pytest 4: <https://github.com/chardet/chardet/issues/173>.
8088 (arguments `(#:tests? #f))
44d10b1f
RW
8089 (home-page "https://github.com/chardet/chardet")
8090 (synopsis "Universal encoding detector for Python 2 and 3")
8091 (description
8092 "This package provides @code{chardet}, a Python module that can
8093automatically detect a wide range of file encodings.")
8094 (license license:lgpl2.1+)))
8095
8096(define-public python2-chardet
8097 (package-with-python2 python-chardet))
8098
8099(define-public python-docopt
8100 (package
8101 (name "python-docopt")
8102 (version "0.6.2")
8103 (source
8104 (origin
11e46326 8105 (method git-fetch)
44d10b1f 8106 ;; The release on PyPI does not include tests.
11e46326
EF
8107 (uri (git-reference
8108 (url "https://github.com/docopt/docopt")
8109 (commit version)))
8110 (file-name (git-file-name name version))
44d10b1f
RW
8111 (sha256
8112 (base32
11e46326 8113 "0aad9gbswnnhssin2q0m5lmpm0ahyf80ahs2zjigbn5y7fvljnd0"))))
44d10b1f
RW
8114 (build-system python-build-system)
8115 (native-inputs
8116 `(("python-pytest" ,python-pytest)))
8117 (arguments
8118 `(#:phases
8119 (modify-phases %standard-phases
8120 (replace 'check
8121 (lambda _ (invoke "py.test"))))))
8122 (home-page "http://docopt.org")
8123 (synopsis "Command-line interface description language for Python")
8124 (description "This library allows the user to define a command-line
8125interface from a program's help message rather than specifying it
4ca7207b 8126programmatically with command-line parsers like @code{getopt} and
44d10b1f
RW
8127@code{argparse}.")
8128 (license license:expat)))
8129
8130(define-public python2-docopt
8131 (package-with-python2 python-docopt))
8132
8133(define-public python-pythondialog
8134 (package
8135 (name "python-pythondialog")
8136 (version "3.4.0")
8137 (source
8138 (origin
8139 (method url-fetch)
8140 (uri (pypi-uri "pythondialog" version))
8141 (sha256
8142 (base32
8143 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
8144 (build-system python-build-system)
8145 (arguments
8146 `(#:phases
8147 (modify-phases %standard-phases
8148 (add-after 'unpack 'patch-path
8149 (lambda* (#:key inputs #:allow-other-keys)
8150 (let* ((dialog (assoc-ref inputs "dialog")))
8151 ;; Since this library really wants to grovel the search path, we
8152 ;; must hardcode dialog's store path into it.
8153 (substitute* "dialog.py"
8154 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
8155 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
8156 #t))))
8157 #:tests? #f)) ; no test suite
8158 (propagated-inputs
8159 `(("dialog" ,dialog)))
8160 (home-page "http://pythondialog.sourceforge.net/")
8161 (synopsis "Python interface to the UNIX dialog utility")
8162 (description "A Python wrapper for the dialog utility. Its purpose is to
8163provide an easy to use, pythonic and comprehensive Python interface to dialog.
8164This allows one to make simple text-mode user interfaces on Unix-like systems")
8165 (license license:lgpl2.1)
8166 (properties `((python2-variant . ,(delay python2-pythondialog))))))
8167
8168(define-public python2-pythondialog
8169 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
8170 (package
8171 (inherit base)
8172 (version (package-version python-pythondialog))
8173 (source (origin
8174 (method url-fetch)
8175 (uri (pypi-uri "python2-pythondialog" version))
8176 (sha256
8177 (base32
8178 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
8179
8180(define-public python-configobj
8181 (package
8182 (name "python-configobj")
8183 (version "5.0.6")
8184 (source (origin
8185 (method url-fetch)
b0758fbb 8186 (uri (pypi-uri "configobj" version))
44d10b1f
RW
8187 (sha256
8188 (base32
8189 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
8190 ;; Patch setup.py so it looks for python-setuptools, which is
8191 ;; required to parse the keyword 'install_requires' in setup.py.
8192 (patches (search-patches "python-configobj-setuptools.patch"))))
8193 (build-system python-build-system)
8194 (propagated-inputs
8195 `(("python-six" ,python-six)))
8196 (synopsis "Config file reading, writing and validation")
8197 (description "ConfigObj is a simple but powerful config file reader and
8198writer: an ini file round tripper. Its main feature is that it is very easy to
8199use, with a straightforward programmer’s interface and a simple syntax for
8200config files.")
8201 (home-page "https://github.com/DiffSK/configobj")
8202 (license license:bsd-3)))
8203
8204(define-public python2-configobj
8205 (package-with-python2 python-configobj))
8206
8207(define-public python-configargparse
8208 (package
8209 (name "python-configargparse")
86ae491f 8210 (version "0.14.0")
44d10b1f
RW
8211 (source (origin
8212 (method url-fetch)
8213 (uri (pypi-uri "ConfigArgParse" version))
8214 (sha256
8215 (base32
86ae491f 8216 "149fy4zya0rsnlkvxbbq43cyr8lscb5k4pj1m6n7f1grwcmzwbif"))))
44d10b1f
RW
8217 (build-system python-build-system)
8218 (native-inputs
8219 `(("python-pyyaml" ,python-pyyaml)))
8220 (arguments
8221 `(#:phases
8222 (modify-phases %standard-phases
8223 (replace 'check
8224 (lambda _
8225 ;; Bypass setuptools-shim because one test relies on "setup.py"
8226 ;; being the first argument passed to the python call.
8227 ;;
8228 ;; NOTE: Many tests do not run because they rely on Python's
8229 ;; built-in test.test_argparse, but we remove the unit tests from
8230 ;; our Python installation.
8231 (invoke "python" "setup.py" "test"))))))
8232 (synopsis "Replacement for argparse")
8233 (description "A drop-in replacement for argparse that allows options to also
8234be set via config files and/or environment variables.")
8235 (home-page "https://github.com/bw2/ConfigArgParse")
8236 (license license:expat)))
8237
8238(define-public python2-configargparse
8239 (package-with-python2 python-configargparse))
8240
8241(define-public python-argparse-manpage
8242 (package
8243 (name "python-argparse-manpage")
8244 (version "1.1")
8245 (source
8246 (origin
8247 (method url-fetch)
8248 (uri (pypi-uri "argparse-manpage" version))
8249 (sha256
8250 (base32
8251 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
8252 (build-system python-build-system)
8253 (home-page "https://github.com/praiskup/argparse-manpage")
8254 (synopsis "Build manual page from Python's ArgumentParser object")
8255 (description
8256 "This package provides tools to build manual pages from Python's
8257@code{ArgumentParser} object.")
8258 (license license:asl2.0)))
8259
3e8f76d8
RW
8260(define-public python-contextlib2
8261 (package
8262 (name "python-contextlib2")
8263 (version "0.5.5")
8264 (source
8265 (origin
8266 (method url-fetch)
8267 (uri (pypi-uri "contextlib2" version))
8268 (sha256
8269 (base32
8270 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
8271 (build-system python-build-system)
8272 (home-page "http://contextlib2.readthedocs.org/")
8273 (synopsis "Tools for decorators and context managers")
8274 (description "This module is primarily a backport of the Python
82753.2 contextlib to earlier Python versions. Like contextlib, it
8276provides utilities for common tasks involving decorators and context
8277managers. It also contains additional features that are not part of
8278the standard library.")
1e158ba1 8279 (properties `((python2-variant . ,(delay python2-contextlib2))))
3e8f76d8
RW
8280 (license license:psfl)))
8281
44d10b1f 8282(define-public python2-contextlib2
1e158ba1
EF
8283 (let ((base (package-with-python2
8284 (strip-python2-variant python-contextlib2))))
8285 (package
8286 (inherit base)
8287 (arguments
8288 (substitute-keyword-arguments (package-arguments base)
8289 ((#:phases phases)
8290 `(modify-phases ,phases
8291 (replace 'check
8292 (lambda _ (invoke "python" "test_contextlib2.py" "-v")))))))
8293 (native-inputs
8294 `(("python2-unittest2" ,python2-unittest2))))))
44d10b1f
RW
8295
8296(define-public python-texttable
8297 (package
8298 (name "python-texttable")
52cc4892 8299 (version "0.9.1")
44d10b1f
RW
8300 (source
8301 (origin
8302 (method url-fetch)
8303 (uri (pypi-uri "texttable" version))
8304 (sha256
8305 (base32
52cc4892 8306 "0yawv64c0zbawwv6zz84whb32fnb2n9jylwjcfsrcdgh7xvl340i"))))
44d10b1f
RW
8307 (build-system python-build-system)
8308 (arguments '(#:tests? #f)) ; no tests
8309 (home-page "https://github.com/foutaise/texttable/")
8310 (synopsis "Python module for creating simple ASCII tables")
8311 (description "Texttable is a Python module for creating simple ASCII
8312tables.")
8313 (license license:lgpl2.1+)))
8314
8315(define-public python2-texttable
8316 (package-with-python2 python-texttable))
8317
8318(define-public python-atomicwrites
8319 (package
8320 (name "python-atomicwrites")
14f10479 8321 (version "1.3.0")
44d10b1f
RW
8322 (source (origin
8323 (method url-fetch)
8324 (uri (pypi-uri "atomicwrites" version))
8325 (sha256
8326 (base32
14f10479 8327 "19ngcscdf3jsqmpcxn6zl5b6anmsajb6izp1smcd1n02midl9abm"))))
44d10b1f
RW
8328 (build-system python-build-system)
8329 (synopsis "Atomic file writes in Python")
8330 (description "Library for atomic file writes using platform dependent tools
8331for atomic file system operations.")
8332 (home-page "https://github.com/untitaker/python-atomicwrites")
8333 (license license:expat)))
8334
8335(define-public python2-atomicwrites
8336 (package-with-python2 python-atomicwrites))
8337
8338(define-public python-click-threading
8339 (package
8340 (name "python-click-threading")
8341 (version "0.4.4")
8342 (source (origin
8343 (method url-fetch)
8344 (uri (pypi-uri "click-threading" version))
8345 (sha256
8346 (base32
8347 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
8348 (build-system python-build-system)
8349 (propagated-inputs
8350 `(("python-click" ,python-click)))
8351 (synopsis "Utilities for multithreading in Click")
8352 (description "This package provides utilities for multithreading in Click
8353applications.")
8354 (home-page "https://github.com/click-contrib/click-threading")
8355 (license license:expat)))
8356
8357(define-public python-click-log
8358 (package
8359 (name "python-click-log")
8360 (version "0.3.2")
8361 (source (origin
8362 (method url-fetch)
8363 (uri (pypi-uri "click-log" version))
8364 (sha256
8365 (base32
8366 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
8367 (build-system python-build-system)
8368 (propagated-inputs
8369 `(("python-click" ,python-click)))
8370 (synopsis "Logging for click applications")
8371 (description "This package provides a Python library for logging Click
8372applications.")
8373 (home-page "https://github.com/click-contrib/click-log")
8374 (license license:expat)))
8375
8376(define-public python-apipkg
8377 (package
8378 (name "python-apipkg")
8379 (version "1.4")
8380 (source (origin
8381 (method url-fetch)
8382 (uri (pypi-uri "apipkg" version))
8383 (sha256
8384 (base32
8385 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
8386 (build-system python-build-system)
8387 (native-inputs
8388 `(("python-pytest" ,python-pytest)))
8389 (synopsis "Namespace control and lazy-import mechanism")
8390 (description "With apipkg you can control the exported namespace of a Python
8391package and greatly reduce the number of imports for your users. It is a small
8392pure Python module that works on virtually all Python versions.")
8393 (home-page "https://github.com/pytest-dev/apipkg")
8394 (license license:expat)))
8395
8396(define-public python2-apipkg
8397 (package-with-python2 python-apipkg))
8398
8399(define-public python-execnet
8400 (package
8401 (name "python-execnet")
8402 (version "1.4.1")
8403 (source (origin
8404 (method url-fetch)
8405 (uri (pypi-uri "execnet" version))
8406 (sha256
8407 (base32
8408 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
8409 (build-system python-build-system)
8410 (arguments
8411 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
8412 ;; The two test failures are caused by the lack of an `ssh` executable.
8413 ;; The test suite can be run with pytest after the 'install' phase.
8414 #:tests? #f))
8415 (native-inputs
8416 `(("python-pytest" ,python-pytest)
8417 ("python-setuptools-scm" ,python-setuptools-scm)))
8418 (propagated-inputs
8419 `(("python-apipkg" ,python-apipkg)))
8420 (synopsis "Rapid multi-Python deployment")
8421 (description "Execnet provides a share-nothing model with
8422channel-send/receive communication for distributing execution across many
8423Python interpreters across version, platform and network barriers. It has a
8424minimal and fast API targeting the following uses:
8425@enumerate
8426@item distribute tasks to (many) local or remote CPUs
8427@item write and deploy hybrid multi-process applications
8428@item write scripts to administer multiple environments
8429@end enumerate")
8430 (home-page "http://codespeak.net/execnet/")
8431 (license license:expat)))
8432
8433(define-public python2-execnet
8434 (package-with-python2 python-execnet))
8435
8436(define-public python-icalendar
8437 (package
8438 (name "python-icalendar")
43ae8f79 8439 (version "4.0.4")
44d10b1f
RW
8440 (source (origin
8441 (method url-fetch)
8442 (uri (pypi-uri "icalendar" version))
8443 (sha256
8444 (base32
43ae8f79 8445 "16gjvqv0n05jrb9g228pdjgzd3amz2pdhvcgsn1jypszjg5m2w9l"))))
44d10b1f
RW
8446 (build-system python-build-system)
8447 (propagated-inputs
8448 `(("python-dateutil" ,python-dateutil)
8449 ("python-pytz" ,python-pytz)))
8450 (synopsis "Python library for parsing iCalendar files")
8451 (description "The icalendar package is a parser/generator of iCalendar
8452files for use with Python.")
8453 (home-page "https://github.com/collective/icalendar")
8454 (license license:bsd-2)))
8455
44d10b1f
RW
8456(define-public python-args
8457 (package
8458 (name "python-args")
8459 (version "0.1.0")
8460 (source (origin
8461 (method url-fetch)
8462 (uri (pypi-uri "args" version))
8463 (sha256
8464 (base32
8465 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
8466 (build-system python-build-system)
8467 (home-page "https://github.com/kennethreitz/args")
8468 (synopsis "Command-line argument parser")
8469 (description
8470 "This library provides a Python module to parse command-line arguments.")
8471 (license license:bsd-3)))
8472
8473(define-public python2-args
8474 (package-with-python2 python-args))
8475
8476(define-public python-clint
8477 (package
8478 (name "python-clint")
8479 (version "0.5.1")
8480 (source (origin
8481 (method url-fetch)
8482 (uri (pypi-uri "clint" version))
8483 (sha256
8484 (base32
8485 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
8486 (build-system python-build-system)
8487 (arguments
8488 '(#:phases
8489 (modify-phases %standard-phases
8490 (replace 'check
8491 (lambda _ (invoke "py.test" "-v"))))))
8492 (native-inputs
8493 `(("python-pytest" ,python-pytest)))
8494 (propagated-inputs
8495 `(("python-args" ,python-args)))
8496 (home-page "https://github.com/kennethreitz/clint")
8497 (synopsis "Command-line interface tools")
8498 (description
8499 "Clint is a Python module filled with a set of tools for developing
8500command-line applications, including tools for colored and indented
8501output, progress bar display, and pipes.")
8502 (license license:isc)))
8503
8504(define-public python2-clint
8505 (package-with-python2 python-clint))
8506
44d10b1f
RW
8507(define-public python-rply
8508 (package
8509 (name "python-rply")
8510 (version "0.7.5")
8511 (source (origin
8512 (method url-fetch)
8513 (uri (pypi-uri "rply" version))
8514 (sha256
8515 (base32
8516 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
8517 (build-system python-build-system)
8518 (propagated-inputs
8519 `(("python-appdirs" ,python-appdirs)))
8520 (home-page "https://github.com/alex/rply")
8521 (synopsis "Parser generator for Python")
8522 (description
8523 "This package provides a pure Python based parser generator, that also
8524works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
8525with a new public API, and RPython support.")
8526 (license license:bsd-3)))
8527
8528(define-public python2-rply
8529 (package-with-python2 python-rply))
8530
8531(define-public python-hy
8532 (package
8533 (name "python-hy")
c215051d 8534 (version "0.17.0")
44d10b1f
RW
8535 (source (origin
8536 (method url-fetch)
8537 (uri (pypi-uri "hy" version))
8538 (sha256
8539 (base32
c215051d 8540 "1gdbqsirsdxj320wnp7my5awzs1kfs6m4fqmkzbd1zd47qzj0zfi"))))
44d10b1f
RW
8541 (build-system python-build-system)
8542 (arguments
8543 '(#:phases
8544 (modify-phases %standard-phases
6ba6a1c1
JG
8545 (add-before 'install 'set-HOME
8546 (lambda _
8547 (setenv "HOME" "/tmp")))
44d10b1f
RW
8548 (replace 'check
8549 (lambda _
8550 ;; Tests require write access to HOME.
8551 (setenv "HOME" "/tmp")
8552 (invoke "nosetests"))))))
8553 (native-inputs
8554 `(("python-coverage" ,python-coverage)
8555 ("python-nose" ,python-nose)))
8556 (propagated-inputs
8557 `(("python-astor" ,python-astor)
8558 ("python-clint" ,python-clint)
c215051d
JG
8559 ("python-rply" ,python-rply)
8560 ("python-fastentrypoints"
8561 ,python-fastentrypoints)
8562 ("python-funcparserlib"
8563 ,python-funcparserlib)))
44d10b1f
RW
8564 (home-page "http://hylang.org/")
8565 (synopsis "Lisp frontend to Python")
8566 (description
8567 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
8568its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
8569Python at your fingertips, in Lisp form.")
8570 (license license:expat)))
8571
8572(define-public python2-hy
8573 (package-with-python2 python-hy))
8574
8575(define-public python2-functools32
8576 (package
8577 (name "python2-functools32")
8578 (version "3.2.3-2")
8579 (source
8580 (origin
8581 (method url-fetch)
8582 (uri (pypi-uri "functools32" version))
8583 (sha256
8584 (base32
8585 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
8586 (build-system python-build-system)
8587 (arguments
8588 `(#:python ,python-2
8589 #:tests? #f)) ; no test target
8590 (home-page "https://github.com/MiCHiLU/python-functools32")
8591 (synopsis
8592 "Backport of the functools module from Python 3.2.3")
8593 (description
8594 "This package is a backport of the @code{functools} module from Python
85953.2.3 for use with older versions of Python and PyPy.")
8596 (license license:expat)))
8597
8598(define-public python2-subprocess32
8599 (package
8600 (name "python2-subprocess32")
8601 (version "3.2.7")
8602 (source (origin
8603 (method url-fetch)
8604 (uri (pypi-uri "subprocess32" version))
8605 (sha256
8606 (base32
8607 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
8608 (patches
8609 (search-patches "python2-subprocess32-disable-input-test.patch"))))
8610 (build-system python-build-system)
8611 (arguments
8612 `(#:python ,python-2
8613 ;; The test suite fails with Python > 2.7.13:
8614 ;; import test.support
8615 ;; ImportError: No module named support
8616 #:tests? #f
8617 #:phases
8618 (modify-phases %standard-phases
8619 (add-after 'unpack 'patch-/bin/sh
8620 (lambda _
8621 (substitute* '("subprocess32.py"
8622 "test_subprocess32.py")
8623 (("/bin/sh") (which "sh")))
8624 #t)))))
8625 (home-page "https://github.com/google/python-subprocess32")
8626 (synopsis "Backport of the subprocess module from Python 3.2")
8627 (description
8628 "This is a backport of the @code{subprocess} standard library module
8629from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
8630new features. On POSIX systems it is guaranteed to be reliable when used
8631in threaded applications. It includes timeout support from Python 3.3 but
8632otherwise matches 3.2’s API.")
8633 (license license:psfl)))
8634
8635(define-public python2-futures
8636 (package
8637 (name "python2-futures")
8638 (version "3.2.0")
8639 (source
8640 (origin
8641 (method url-fetch)
8642 (uri (pypi-uri "futures" version))
8643 (sha256
8644 (base32
8645 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
8646 (build-system python-build-system)
ba88eea2
RW
8647 (arguments
8648 `(#:python ,python-2
8649 #:phases
8650 (modify-phases %standard-phases
8651 (replace 'check
8652 (lambda _
8653 (invoke "python" "test_futures.py")
8654 #t)))))
44d10b1f
RW
8655 (home-page "https://github.com/agronholm/pythonfutures")
8656 (synopsis
8657 "Backport of the concurrent.futures package from Python 3.2")
8658 (description
8659 "The concurrent.futures module provides a high-level interface for
8660asynchronously executing callables. This package backports the
8661concurrent.futures package from Python 3.2")
8662 (license license:bsd-3)))
8663
8664(define-public python-promise
8665 (package
8666 (name "python-promise")
8667 (version "0.4.2")
8668 (source
8669 (origin
8670 (method url-fetch)
8671 (uri (pypi-uri "promise" version))
8672 (sha256
8673 (base32
8674 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
8675 (build-system python-build-system)
8676 ;; Tests wants python-futures, which is a python2 only program, and
8677 ;; can't be found by python-promise at test time.
8678 (arguments `(#:tests? #f))
8679 (home-page "https://github.com/syrusakbary/promise")
8680 (synopsis "Promises/A+ implementation for Python")
8681 (description
8682 "Promises/A+ implementation for Python")
8683 (properties `((python2-variant . ,(delay python2-promise))))
8684 (license license:expat)))
8685
8686(define-public python2-promise
8687 (let ((promise (package-with-python2
8688 (strip-python2-variant python-promise))))
8689 (package (inherit promise)
8690 (arguments (substitute-keyword-arguments (package-arguments promise)
8691 ((#:tests? _) #t)))
8692 (native-inputs
8693 `(("python2-futures" ,python2-futures)
8694 ("python2-pytest" ,python2-pytest)
8695 ,@(package-native-inputs promise))))))
8696
d71d85cd
RW
8697(define-public python-progressbar33
8698 (package
8699 (name "python-progressbar33")
8700 (version "2.4")
8701 (source
8702 (origin
8703 (method url-fetch)
8704 (uri (pypi-uri "progressbar33" version))
8705 (sha256
8706 (base32
8707 "1zvf6zs5hzrc03p9nfs4p16vhilqikycvv1yk0pxn8s07fdhvzji"))))
8708 (build-system python-build-system)
8709 (home-page "http://github.com/germangh/python-progressbar")
8710 (synopsis "Text progress bar library for Python")
8711 (description
8712 "This package provides a text progress bar library for Python. This
8713version only differs from the original @code{progressbar} package in that it
8714uses relative package imports instead of absolute imports, which is necessary
8715for the module to work under Python 3.3.")
8716 ;; Either or both of these licenses may be selected.
8717 (license (list license:lgpl2.1+ license:bsd-3))))
8718
44d10b1f
RW
8719(define-public python-colorama
8720 (package
8721 (name "python-colorama")
8722 (version "0.3.9")
8723 (source
8724 (origin
8725 (method url-fetch)
8726 (uri (pypi-uri "colorama" version))
8727 (sha256
8728 (base32
8729 "1wd1szk0z3073ghx26ynw43gnc140ibln1safgsis6s6z3s25ss8"))))
8730 (build-system python-build-system)
8731 (synopsis "Colored terminal text rendering for Python")
8732 (description "Colorama is a Python library for rendering colored terminal
8733text.")
8734 (home-page "https://pypi.python.org/pypi/colorama")
8735 (license license:bsd-3)))
8736
8737(define-public python2-colorama
8738 (package-with-python2 python-colorama))
8739
8740(define-public python-rsa
8741 (package
8742 (name "python-rsa")
8743 (version "3.4.2")
8744 (source
8745 (origin
8746 (method url-fetch)
8747 (uri (pypi-uri "rsa" version))
8748 (sha256
8749 (base32
8750 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
8751 (build-system python-build-system)
8752 (propagated-inputs
8753 `(("python-pyasn1" ,python-pyasn1)))
8754 (synopsis "Pure-Python RSA implementation")
8755 (description "Python-RSA is a pure-Python RSA implementation. It supports
8756encryption and decryption, signing and verifying signatures, and key
8757generation according to PKCS#1 version 1.5. It can be used as a Python
8758library as well as on the command line.")
8759 (home-page "https://stuvel.eu/rsa")
8760 (license license:asl2.0)))
8761
8762(define-public python2-rsa
8763 (package-with-python2 python-rsa))
8764
8765(define-public python-pluggy
8766 (package
8767 (name "python-pluggy")
e5731c03 8768 (version "0.11.0")
44d10b1f
RW
8769 (source
8770 (origin
8771 (method url-fetch)
8772 (uri (pypi-uri "pluggy" version))
8773 (sha256
8774 (base32
e5731c03 8775 "10511a54dvafw1jrk75mrhml53c7b7w4yaw7241696lc2hfvr895"))))
44d10b1f
RW
8776 (build-system python-build-system)
8777 (native-inputs
8778 `(("python-setuptools-scm" ,python-setuptools-scm)))
8779 (synopsis "Plugin and hook calling mechanism for Python")
8780 (description "Pluggy is an extraction of the plugin manager as used by
8781Pytest but stripped of Pytest specific details.")
8782 (home-page "https://pypi.python.org/pypi/pluggy")
8783 (license license:expat)))
8784
8785(define-public python2-pluggy
8786 (package-with-python2 python-pluggy))
8787
8788(define-public python-tox
8789 (package
8790 (name "python-tox")
8791 (version "2.8.1")
8792 (source
8793 (origin
8794 (method url-fetch)
8795 (uri (pypi-uri "tox" version))
8796 (sha256
8797 (base32
8798 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
8799 (build-system python-build-system)
8800 (arguments
8801 ;; FIXME: Tests require pytest-timeout, which itself requires
8802 ;; pytest>=2.8.0 for installation.
8803 '(#:tests? #f))
8804 (propagated-inputs
8805 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
8806 ("python-py" ,python-py)
8807 ("python-virtualenv" ,python-virtualenv)))
8808 (native-inputs
8809 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
8810 ("python-pytest" ,python-pytest) ; >= 2.3.5
8811 ("python-setuptools-scm" ,python-setuptools-scm)))
8812 (home-page "http://tox.testrun.org/")
8813 (synopsis "Virtualenv-based automation of test activities")
8814 (description "Tox is a generic virtualenv management and test command line
8815tool. It can be used to check that a package installs correctly with
8816different Python versions and interpreters, or run tests in each type of
8817supported environment, or act as a frontend to continuous integration
8818servers.")
8819 (license license:expat)))
8820
8821(define-public python2-tox
8822 (package-with-python2 python-tox))
8823
8824(define-public python-jmespath
8825 (package
8826 (name "python-jmespath")
27fb781f 8827 (version "0.9.4")
44d10b1f
RW
8828 (source
8829 (origin
8830 (method url-fetch)
8831 (uri (pypi-uri "jmespath" version))
8832 (sha256
8833 (base32
27fb781f 8834 "0k0765x1mybcrzajh3hiqkl8sy9hs0bmn4900frxy0j3ykvaxqmx"))))
44d10b1f
RW
8835 (build-system python-build-system)
8836 (native-inputs
8837 `(("python-nose" ,python-nose)))
8838 (synopsis "JSON Matching Expressions")
8839 (description "JMESPath (pronounced “james path”) is a Python library that
8840allows one to declaratively specify how to extract elements from a JSON
8841document.")
8842 (home-page "https://github.com/jmespath/jmespath.py")
8843 (license license:expat)))
8844
8845(define-public python2-jmespath
8846 (package-with-python2 python-jmespath))
8847
8848(define-public python-botocore
8849 (package
7bcf827c
RW
8850 (name "python-botocore")
8851 (version "1.12.149")
8852 (source
8853 (origin
8854 (method url-fetch)
8855 (uri (pypi-uri "botocore" version))
8856 (sha256
8857 (base32
8858 "12597f74khp3ngwr282cb949w0gcqj20rkfc3x275dijavyy5cmf"))))
8859 (build-system python-build-system)
8860 (arguments
8861 ;; FIXME: Many tests are failing.
8862 '(#:tests? #f))
8863 (propagated-inputs
8864 `(("python-dateutil" ,python-dateutil)
8865 ("python-docutils" ,python-docutils)
8866 ("python-jmespath" ,python-jmespath)))
8867 (native-inputs
8868 `(("python-mock" ,python-mock)
8869 ("python-nose" ,python-nose)
8870 ("behave" ,behave)
8871 ("python-tox" ,python-tox)
8872 ("python-urllib3" ,python-urllib3)
8873 ("python-wheel" ,python-wheel)))
8874 (home-page "https://github.com/boto/botocore")
8875 (synopsis "Low-level interface to AWS")
8876 (description "Botocore is a Python library that provides a low-level
44d10b1f 8877interface to the Amazon Web Services (AWS) API.")
7bcf827c 8878 (license license:asl2.0)))
44d10b1f
RW
8879
8880(define-public python2-botocore
8881 (package-with-python2 python-botocore))
8882
8883(define-public python-xdo
8884 (package
8885 (name "python-xdo")
8886 (version "0.3")
8887 (source (origin
8888 (method url-fetch)
8889 (uri (string-append
8890 "http://http.debian.net/debian/pool/main/p/python-xdo/"
8891 "python-xdo_" version ".orig.tar.gz"))
8892 (sha256
8893 (base32
8894 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
8895 (build-system python-build-system)
8896 (arguments
8897 '(#:phases
8898 (modify-phases %standard-phases
8899 (add-before 'install 'patch-libxdo-path
8900 ;; Hardcode the path of dynamically loaded libxdo library.
8901 (lambda* (#:key inputs #:allow-other-keys)
8902 (let ((libxdo (string-append
8903 (assoc-ref inputs "xdotool")
8904 "/lib/libxdo.so")))
8905 (substitute* "xdo/_xdo.py"
8906 (("find_library\\(\"xdo\"\\)")
8907 (simple-format #f "\"~a\"" libxdo)))
8908 #t))))
8909 #:tests? #f)) ; no tests provided
8910 (propagated-inputs
8911 `(("python-six" ,python-six)))
8912 (inputs
8913 `(("xdotool" ,xdotool)
8914 ("libX11" ,libx11)))
8915 (home-page "https://tracker.debian.org/pkg/python-xdo")
8916 (synopsis "Python library for simulating X11 keyboard/mouse input")
8917 (description "Provides bindings to libxdo for manipulating X11 via simulated
8918input. (Note that this is mostly a legacy library; you may wish to look at
8919python-xdo for newer bindings.)")
8920 (license license:bsd-3)))
8921
8922(define-public python2-xdo
8923 (package-with-python2 python-xdo))
8924
8925(define-public python-mako
8926 (package
8927 (name "python-mako")
6bf53ad5 8928 (version "1.1.0")
44d10b1f
RW
8929 (source
8930 (origin
8931 (method url-fetch)
8932 (uri (pypi-uri "Mako" version))
8933 (sha256
8934 (base32
6bf53ad5 8935 "0jqa3qfpykyn4fmkn0kh6043sfls7br8i2bsdbccazcvk9cijsd3"))))
44d10b1f 8936 (build-system python-build-system)
6bf53ad5
MB
8937 (arguments
8938 `(#:phases (modify-phases %standard-phases
8939 (replace 'check
8940 (lambda _
8941 (invoke "pytest" "-vv"))))))
44d10b1f
RW
8942 (propagated-inputs
8943 `(("python-markupsafe" ,python-markupsafe)))
8944 (native-inputs
8945 `(("python-mock" ,python-mock)
44d10b1f 8946 ("python-pytest" ,python-pytest)))
7016e620 8947 (home-page "https://www.makotemplates.org/")
44d10b1f
RW
8948 (synopsis "Templating language for Python")
8949 (description "Mako is a templating language for Python that compiles
8950templates into Python modules.")
8951 (license license:expat)))
8952
8953(define-public python2-mako
8954 (package-with-python2 python-mako))
8955
8956(define-public python-waitress
8957 (package
8958 (name "python-waitress")
8959 (version "1.1.0")
8960 (source
8961 (origin
8962 (method url-fetch)
8963 (uri (pypi-uri "waitress" version))
8964 (patches (search-patches "python-waitress-fix-tests.patch"))
8965 (sha256
8966 (base32
8967 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
8968 (build-system python-build-system)
8969 (home-page "https://github.com/Pylons/waitress")
8970 (synopsis "Waitress WSGI server")
8971 (description "Waitress is meant to be a production-quality pure-Python WSGI
8972server with very acceptable performance.")
8973 (license license:zpl2.1)))
8974
8975(define-public python2-waitress
8976 (package-with-python2 python-waitress))
8977
b2b23d12
TLC
8978(define-public python-whichcraft
8979 (package
8980 (name "python-whichcraft")
8981 (version "0.6.1")
8982 (source
8983 (origin
8984 (method url-fetch)
8985 (uri (pypi-uri "whichcraft" version))
8986 (sha256
8987 (base32
8988 "11yfkzyplizdgndy34vyd5qlmr1n5mxis3a3svxmx8fnccdvknxc"))))
8989 (build-system python-build-system)
8990 (native-inputs
8991 `(("python-pytest" ,python-pytest)))
8992 (home-page "https://github.com/pydanny/whichcraft")
8993 (synopsis "Cross-platform cross-python shutil.which functionality")
8994 (description
8995 "This package provides a shim of the shutil.which function that's
8996designed to work across multiple versions of Python.")
8997 (license license:bsd-3)))
8998
1133ca44
TLC
8999(define-public python-cookiecutter
9000 (package
9001 (name "python-cookiecutter")
9002 (version "1.6.0")
9003 (source
9004 (origin
9005 (method url-fetch)
9006 (uri (pypi-uri "cookiecutter" version))
9007 (sha256
9008 (base32
9009 "0glsvaz8igi2wy1hsnhm9fkn6560vdvdixzvkq6dn20z3hpaa5hk"))))
9010 (build-system python-build-system)
9011 (native-inputs
9012 `(("python-freezegun" ,python-freezegun)
9013 ("python-pytest" ,python-pytest)
9014 ("python-pytest-catchlog" ,python-pytest-catchlog)
9015 ("python-pytest-cov" ,python-pytest-cov)
9016 ("python-pytest-mock" ,python-pytest-mock)))
9017 (propagated-inputs
9018 `(("python-binaryornot" ,python-binaryornot)
9019 ("python-click" ,python-click)
9020 ("python-future" ,python-future)
9021 ("python-jinja2" ,python-jinja2)
9022 ("python-jinja2-time" ,python-jinja2-time)
9023 ("python-poyo" ,python-poyo)
9024 ("python-requests" ,python-requests)
9025 ("python-whichcraft" ,python-whichcraft)))
9026 (home-page "https://github.com/audreyr/cookiecutter")
9027 (synopsis
9028 "Command-line utility that creates projects from project templates")
9029 (description
9030 "This package provides a command-line utility that creates projects from
9031project templates, e.g. creating a Python package project from a Python package
9032project template.")
9033 (license license:bsd-3)))
9034
44d10b1f
RW
9035(define-public python-pyquery
9036 (package
9037 (name "python-pyquery")
9038 (version "1.2.17")
9039 (source
9040 (origin
9041 (method url-fetch)
9042 (uri (pypi-uri "pyquery" version))
9043 (sha256
9044 (base32
9045 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
9046 (build-system python-build-system)
9047 (native-inputs
9048 `(("python-webob" ,python-webob)
9049 ("python-webtest" ,python-webtest)))
9050 (propagated-inputs
9051 `(("python-lxml" ,python-lxml)
9052 ("python-cssselect" ,python-cssselect)))
9053 (home-page "https://github.com/gawel/pyquery")
9054 (synopsis "Make jQuery-like queries on xml documents")
9055 (description "pyquery allows you to make jQuery queries on xml documents.
9056The API is as much as possible the similar to jQuery. pyquery uses lxml for
9057fast xml and html manipulation.")
9058 (license license:bsd-3)))
9059
44d10b1f
RW
9060(define-public python-anyjson
9061 (package
9062 (name "python-anyjson")
9063 (version "0.3.3")
9064 (source
9065 (origin
9066 (method url-fetch)
9067 (uri (pypi-uri "anyjson" version))
9068 (sha256
9069 (base32
9070 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
9071 (build-system python-build-system)
9072 (arguments
9073 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
9074 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
9075 ;; whatever) so this transformation needs to be done before the tests
9076 ;; can be run. Maybe we could add a build step to transform beforehand
9077 ;; but it could be annoying/difficult.
9078 ;; We can enable tests for the Python 2 version, though, and do below.
9079 #:tests? #f))
9080 (home-page "https://bitbucket.org/runeh/anyjson/")
9081 (synopsis
9082 "Wraps best available JSON implementation in a common interface")
9083 (description
9084 "Anyjson loads whichever is the fastest JSON module installed
9085and provides a uniform API regardless of which JSON implementation is used.")
9086 (license license:bsd-3)
9087 (properties `((python2-variant . ,(delay python2-anyjson))))))
9088
9089(define-public python2-anyjson
9090 (let ((anyjson (package-with-python2
9091 (strip-python2-variant python-anyjson))))
9092 (package
9093 (inherit anyjson)
9094 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
9095 #:tests? #t
9096 ,@(package-arguments anyjson)))
9097 (native-inputs `(("python2-nose" ,python2-nose))))))
9098
9099(define-public python-amqp
9100 (package
9101 (name "python-amqp")
9102 (version "2.3.2")
9103 (source
9104 (origin
9105 (method url-fetch)
9106 (uri (pypi-uri "amqp" version))
9107 (sha256
9108 (base32
9109 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
9110 (build-system python-build-system)
9111 (native-inputs
9112 `(("python-case" ,python-case)
9113 ("python-pytest-sugar" ,python-pytest-sugar)
9114 ("python-mock" ,python-mock)))
9115 (propagated-inputs
9116 `(("python-vine" ,python-vine)))
9117 (home-page "https://github.com/celery/py-amqp")
9118 (synopsis
9119 "Low-level AMQP client for Python (fork of amqplib)")
9120 (description
9121 "This is a fork of amqplib which was originally written by Barry Pederson.
9122It is maintained by the Celery project, and used by kombu as a pure python
9123alternative when librabbitmq is not available.")
9124 (license license:lgpl2.1+)
9125 (properties `((python2-variant . ,(delay python2-amqp))))))
9126
9127(define-public python2-amqp
9128 (let ((amqp (package-with-python2
9129 (strip-python2-variant python-amqp))))
9130 (package
9131 (inherit amqp)
9132 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
9133 ;; unmaintained. Weirdly, does not do this on the python 3
9134 ;; version?
9135 #:tests? #f
9136 ,@(package-arguments amqp))))))
9137
9138(define-public python-txamqp
9139 (package
9140 (name "python-txamqp")
9141 (version "0.8.2")
9142 (source
9143 (origin
9144 (method url-fetch)
9145 (uri (pypi-uri "txAMQP" version))
9146 (sha256
9147 (base32
9148 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
9149 (build-system python-build-system)
9150 (propagated-inputs
9151 `(("python-six" ,python-six)
9152 ("python-twisted" ,python-twisted)))
9153 (home-page "https://github.com/txamqp/txamqp")
9154 (synopsis "Communicate with AMQP peers and brokers using Twisted")
9155 (description
9156 "This package provides a Python library for communicating with AMQP peers
9157and brokers using the asynchronous networking framework Twisted. It contains
9158all the necessary code to connect, send and receive messages to/from an
9159AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
9160also includes support for using Thrift RPC over AMQP in Twisted
9161applications.")
9162 (license license:asl2.0)))
9163
9164(define-public python2-txamqp
9165 (package-with-python2 python-txamqp))
9166
9167(define-public python-kombu
9168 (package
9169 (name "python-kombu")
9170 (version "4.2.2")
9171 (source
9172 (origin
9173 (method url-fetch)
9174 (uri (pypi-uri "kombu" version))
9175 (sha256
9176 (base32
9177 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
9178 (build-system python-build-system)
9179 (native-inputs
9180 `(("python-mock" ,python-mock)
9181 ("python-case" ,python-case)
9182 ("python-pyro4" ,python-pyro4)
9183 ("python-pytest-sugar" ,python-pytest-sugar)
9184 ("python-pytz" ,python-pytz)))
9185 (propagated-inputs
9186 `(("python-anyjson" ,python-anyjson)
9187 ("python-amqp" ,python-amqp)
9188 ("python-redis" ,python-redis)))
9189 (home-page "https://kombu.readthedocs.io")
9190 (synopsis "Message passing library for Python")
9191 (description "The aim of Kombu is to make messaging in Python as easy as
9192possible by providing an idiomatic high-level interface for the AMQ protocol,
9193and also provide proven and tested solutions to common messaging problems.
9194AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
9195message orientation, queuing, routing, reliability and security, for which the
9196RabbitMQ messaging server is the most popular implementation.")
9197 (license license:bsd-3)
9198 (properties `((python2-variant . ,(delay python2-kombu))))))
9199
9200(define-public python2-kombu
9201 (let ((kombu (package-with-python2
9202 (strip-python2-variant python-kombu))))
9203 (package
9204 (inherit kombu)
9205 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
9206 ;; It works fine on the python3 variant.
9207 #:tests? #f
9208 ,@(package-arguments kombu)))
9209 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9210 ,@(package-native-inputs kombu))))))
9211
9212(define-public python-billiard
9213 (package
9214 (name "python-billiard")
9215 (version "3.5.0.5")
9216 (source
9217 (origin
9218 (method url-fetch)
9219 (uri (pypi-uri "billiard" version))
9220 (sha256
9221 (base32
9222 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
9223 (build-system python-build-system)
9224 (native-inputs
9225 `(("python-case" ,python-case)
9226 ("python-pytest" ,python-pytest)))
9227 (home-page "https://github.com/celery/billiard")
9228 (synopsis
9229 "Python multiprocessing fork with improvements and bugfixes")
9230 (description
9231 "Billiard is a fork of the Python 2.7 multiprocessing package. The
9232multiprocessing package itself is a renamed and updated version of R Oudkerk's
9233pyprocessing package. This standalone variant is intended to be compatible with
9234Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
9235 (license license:bsd-3)
9236 (properties `((python2-variant . ,(delay python2-billiard))))))
9237
9238(define-public python2-billiard
9239 (let ((billiard (package-with-python2
9240 (strip-python2-variant python-billiard))))
9241 (package
9242 (inherit billiard)
9243 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9244 ("python2-mock" ,python2-mock)
9245 ,@(package-native-inputs billiard))))))
9246
9247(define-public python-celery
9248 (package
9249 (name "python-celery")
9250 (version "4.2.1")
9251 (source
9252 (origin
9253 (method url-fetch)
9254 (uri (pypi-uri "celery" version))
9255 (sha256
9256 (base32
9257 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
9258 (build-system python-build-system)
9259 (arguments
9260 '(;; TODO The tests fail with Python 3.7
9261 ;; https://github.com/celery/celery/issues/4849
9262 #:tests? #f
9263 #:phases
9264 (modify-phases %standard-phases
9265 (add-after 'unpack 'patch-requirements
9266 (lambda _
9267 (substitute* "requirements/test.txt"
9268 (("pytest>=3\\.0,<3\\.3")
9269 "pytest>=3.0"))
9270 #t)))))
9271 (native-inputs
9272 `(("python-case" ,python-case)
9273 ("python-pytest" ,python-pytest)))
9274 (propagated-inputs
9275 `(("python-pytz" ,python-pytz)
9276 ("python-billiard" ,python-billiard)
9277 ("python-kombu" ,python-kombu)))
9278 (home-page "https://celeryproject.org")
9279 (synopsis "Distributed Task Queue")
9280 (description "Celery is an asynchronous task queue/job queue based on
9281distributed message passing. It is focused on real-time operation, but
9282supports scheduling as well. The execution units, called tasks, are executed
9283concurrently on a single or more worker servers using multiprocessing,
9284Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
9285synchronously (wait until ready).")
9286 (license license:bsd-3)
9287 (properties `((python2-variant . ,(delay python2-celery))))))
9288
9289(define-public python2-celery
9290 (let ((celery (package-with-python2
9291 (strip-python2-variant python-celery))))
9292 (package
9293 (inherit celery)
9294 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9295 ("python2-mock" ,python2-mock)
9296 ,@(package-native-inputs celery))))))
9297
9298(define-public python-translitcodec
9299 (package
9300 (name "python-translitcodec")
9301 (version "0.4.0")
9302 (source
9303 (origin
9304 (method url-fetch)
9305 (uri (pypi-uri "translitcodec" version))
9306 (sha256
9307 (base32
9308 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
9309 (build-system python-build-system)
9310 (arguments
9311 `(#:tests? #f)) ; no tests provided
9312 (home-page
9313 "https://github.com/claudep/translitcodec")
9314 (synopsis
9315 "Unicode to 8-bit charset transliteration codec")
9316 (description
9317 "This package contains codecs for transliterating ISO 10646 texts into
9318best-effort representations using smaller coded character sets (ASCII,
9319ISO 8859, etc.).")
9320 (license license:expat)))
9321
9322(define-public python2-translitcodec
9323 (package-with-python2 python-translitcodec))
9324
9325(define-public python-editor
9326 (package
9327 (name "python-editor")
9328 (version "0.5")
9329 (source
9330 (origin
9331 (method url-fetch)
9332 (uri (pypi-uri "python-editor" version))
9333 (sha256
9334 (base32
9335 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
9336 (build-system python-build-system)
9337 (home-page
9338 "https://github.com/fmoo/python-editor")
9339 (synopsis
9340 "Programmatically open an editor, capture the result")
9341 (description
9342 "python-editor is a library that provides the editor module for
9343programmatically interfacing with your system's $EDITOR.")
9344 (license license:asl2.0)))
9345
9346(define-public python2-editor
9347 (package-with-python2 python-editor))
9348
44d10b1f
RW
9349(define-public python-vobject
9350 (package
9351 (name "python-vobject")
9352 (version "0.9.5")
9353 (source (origin
9354 (method url-fetch)
9355 (uri (pypi-uri "vobject" version))
9356 (sha256
9357 (base32
9358 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
9359 (build-system python-build-system)
9360 (arguments
9361 '(;; The test suite relies on some non-portable Windows interfaces.
9362 #:tests? #f))
9363 (propagated-inputs
9364 `(("python-dateutil" ,python-dateutil)
9365 ("python-pyicu" ,python-pyicu)))
9366 (synopsis "Parse and generate vCard and vCalendar files")
9367 (description "Vobject is intended to be a full featured Python package for
9368parsing and generating vCard and vCalendar files. Currently, iCalendar files
9369are supported and well tested. vCard 3.0 files are supported, and all data
9370should be imported, but only a few components are understood in a sophisticated
9371way.")
9372 (home-page "http://eventable.github.io/vobject/")
9373 (license license:asl2.0)))
9374
9375(define-public python2-vobject
9376 (package-with-python2 python-vobject))
9377
9378(define-public python-munkres
9379 (package
9380 (name "python-munkres")
9381 (version "1.0.8")
9382 (source (origin
9383 (method url-fetch)
9384 (uri (pypi-uri "munkres" version))
9385 (sha256
9386 (base32
9387 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
9388 (build-system python-build-system)
9389 (arguments
9390 '(#:tests? #f)) ; no test suite
9391 (home-page "http://software.clapper.org/munkres/")
9392 (synopsis "Implementation of the Munkres algorithm")
9393 (description "The Munkres module provides an implementation of the Munkres
9394algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
9395useful for solving the Assignment Problem.")
9396 (license license:bsd-3)))
9397
9398(define-public python2-munkres
9399 (package-with-python2 python-munkres))
9400
9401(define-public python-whoosh
9402 (package
9403 (name "python-whoosh")
9404 (version "2.7.4")
9405 (source
9406 (origin
9407 (method url-fetch)
9408 (uri (pypi-uri "Whoosh" version))
9409 (sha256
9410 (base32
9411 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
9412 (build-system python-build-system)
2679d9a4 9413 (arguments '(#:tests? #f)) ; Test invocation is no longer supported by Python.
44d10b1f
RW
9414 (native-inputs
9415 `(("python-pytest" ,python-pytest)))
9416 (home-page "https://bitbucket.org/mchaput/whoosh")
9417 (synopsis "Full text indexing, search, and spell checking library")
9418 (description
9419 "Whoosh is a fast, pure-Python full text indexing, search, and spell
9420checking library.")
9421 (license license:bsd-2)))
9422
9423(define-public python2-whoosh
9424 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
9425 (package (inherit whoosh)
9426 (propagated-inputs
9427 `(("python2-backport-ssl-match-hostname"
9428 ,python2-backport-ssl-match-hostname)
9429 ,@(package-propagated-inputs whoosh))))))
9430
9431(define-public python-pathlib
9432 (package
9433 (name "python-pathlib")
9434 (version "1.0.1")
9435 (source (origin
9436 (method url-fetch)
9437 (uri (pypi-uri "pathlib" version))
9438 (sha256
9439 (base32
9440 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
9441 (build-system python-build-system)
9442 ;; The tests depend on the internal "test" module, which does not provide
9443 ;; a stable interface.
9444 (arguments `(#:tests? #f))
9445 (home-page "https://pathlib.readthedocs.org/")
9446 (synopsis "Object-oriented file system paths")
9447 (description "Pathlib offers a set of classes to handle file system paths.
9448It offers the following advantages over using string objects:
9449
9450@enumerate
9451@item No more cumbersome use of os and os.path functions. Everything can
9452be done easily through operators, attribute accesses, and method calls.
9453@item Embodies the semantics of different path types. For example,
9454comparing Windows paths ignores casing.
9455@item Well-defined semantics, eliminating any inconsistencies or
9456ambiguities (forward vs. backward slashes, etc.).
9457@end enumerate
9458
9459Note: In Python 3.4, pathlib is now part of the standard library. For other
9460Python versions please consider python-pathlib2 instead, which tracks the
9461standard library module. This module (python-pathlib) isn't maintained
9462anymore.")
9463 (license license:expat)))
9464
9465(define-public python2-pathlib
9466 (package-with-python2 python-pathlib))
9467
9468(define-public python2-pathlib2
9469 (package
9470 (name "python2-pathlib2")
54da6f9f 9471 (version "2.3.3")
44d10b1f
RW
9472 (source (origin
9473 (method url-fetch)
9474 (uri (pypi-uri "pathlib2" version))
9475 (sha256
9476 (base32
54da6f9f 9477 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
44d10b1f
RW
9478 (build-system python-build-system)
9479 ;; We only need the the Python 2 variant, since for Python 3 our minimum
9480 ;; version is 3.4 which already includes this package as part of the
9481 ;; standard library.
9482 (arguments
9483 `(#:python ,python-2))
9484 (propagated-inputs
9485 `(("python2-scandir" ,python2-scandir)
9486 ("python2-six" ,python2-six)))
9487 (home-page "https://pypi.python.org/pypi/pathlib2/")
9488 (synopsis "Object-oriented file system paths - backport of standard
9489pathlib module")
9490 (description "The goal of pathlib2 is to provide a backport of standard
9491pathlib module which tracks the standard library module, so all the newest
9492features of the standard pathlib can be used also on older Python versions.
9493
9494Pathlib offers a set of classes to handle file system paths. It offers the
9495following advantages over using string objects:
9496
9497@enumerate
9498@item No more cumbersome use of os and os.path functions. Everything can
9499be done easily through operators, attribute accesses, and method calls.
9500@item Embodies the semantics of different path types. For example,
9501comparing Windows paths ignores casing.
9502@item Well-defined semantics, eliminating any inconsistencies or
9503ambiguities (forward vs. backward slashes, etc.).
9504@end enumerate")
9505 (license license:expat)))
9506
9507(define-public python2-pathlib2-bootstrap
9508 (hidden-package
9509 (package
9510 (inherit python2-pathlib2)
9511 (name "python2-pathlib2-bootstrap")
9512 (propagated-inputs
9513 `(("python2-scandir" ,python2-scandir)
9514 ("python2-six" ,python2-six-bootstrap))))))
9515
9516(define-public python-jellyfish
9517 (package
9518 (name "python-jellyfish")
9519 (version "0.5.6")
9520 (source (origin
9521 (method url-fetch)
9522 (uri (pypi-uri "jellyfish" version))
9523 (sha256
9524 (base32
9525 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
9526 (build-system python-build-system)
9527 (native-inputs
9528 `(("python-pytest" ,python-pytest)))
9529 (home-page "https://github.com/jamesturk/jellyfish")
9530 (synopsis "Approximate and phonetic matching of strings")
9531 (description "Jellyfish uses a variety of string comparison and phonetic
9532encoding algorithms to do fuzzy string matching.")
9533 (license license:bsd-2)
9534 (properties `((python2-variant . ,(delay python2-jellyfish))))))
9535
9536(define-public python2-jellyfish
9537 (let ((jellyfish (package-with-python2
9538 (strip-python2-variant python-jellyfish))))
9539 (package (inherit jellyfish)
9540 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
9541 ,@(package-native-inputs jellyfish))))))
9542
9543(define-public python2-unicodecsv
9544 (package
9545 (name "python2-unicodecsv")
9546 (version "0.14.1")
9547 (source (origin
f711b71b 9548 (method git-fetch)
44d10b1f
RW
9549 ;; The test suite is not included in the PyPi release.
9550 ;; https://github.com/jdunck/python-unicodecsv/issues/19
f711b71b
EF
9551 (uri (git-reference
9552 (url "https://github.com/jdunck/python-unicodecsv")
9553 (commit version)))
9554 (file-name (git-file-name name version))
44d10b1f
RW
9555 (sha256
9556 (base32
f711b71b 9557 "15hx2k41a2lpv4hcml9zp4cvlx1171mnb5s4s13xc1pxkq3vgdjy"))))
44d10b1f
RW
9558 (build-system python-build-system)
9559 (arguments
9560 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
9561 #:python ,python-2))
9562 (native-inputs
9563 `(("python2-unittest2" ,python2-unittest2)))
9564 (home-page "https://github.com/jdunck/python-unicodecsv")
9565 (synopsis "Unicode CSV module for Python 2")
9566 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
9567module, adding support for Unicode strings.")
9568 (license license:bsd-2)))
9569
9570(define-public python-rarfile
9571 (package
9572 (name "python-rarfile")
9573 (version "2.8")
9574 (source (origin
9575 (method url-fetch)
9576 (uri (pypi-uri "rarfile" version))
9577 (sha256
9578 (base32
9579 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
9580 (build-system python-build-system)
9581 (arguments
9582 '(#:phases
9583 (modify-phases %standard-phases
9584 (replace 'check
9585 ;; Many tests fail, but the installation proceeds.
e59dd341 9586 (lambda _ (invoke "make" "-C" "test" "test"))))))
44d10b1f
RW
9587 (native-inputs
9588 `(("which" ,which))) ; required for tests
9589 (propagated-inputs
9590 `(("libarchive" ,libarchive)))
9591 (home-page "https://github.com/markokr/rarfile")
9592 (synopsis "RAR archive reader for Python")
9593 (description "This is Python module for RAR archive reading. The interface
9594is made as zipfile like as possible.")
9595 (license license:isc)))
9596
9597(define-public python2-rarfile
9598 (package-with-python2 python-rarfile))
9599
9600(define-public python-magic
9601 (package
9602 (name "python-magic")
9603 (version "0.4.15")
9604 (source
9605 (origin
9606 (method url-fetch)
9607 (uri (pypi-uri "python-magic" version))
9608 (sha256
9609 (base32
9610 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
9611 (file-name (string-append name "-" version "-checkout"))))
9612 (build-system python-build-system)
9613 (arguments
9614 ;; The tests are unreliable, so don't run them. The tests fail
9615 ;; under Python3 because they were written for Python2 and
9616 ;; contain import statements that do not work in Python3. One of
9617 ;; the tests fails under Python2 because its assertions are
9618 ;; overly stringent; it relies on comparing output strings which
9619 ;; are brittle and can change depending on the version of
9620 ;; libmagic being used and the system on which the test is
9621 ;; running. In my case, under GuixSD 0.10.0, only one test
9622 ;; failed, and it seems to have failed only because the version
9623 ;; of libmagic that is packaged in Guix outputs a slightly
9624 ;; different (but not wrong) string than the one that the test
9625 ;; expected.
9626 '(#:tests? #f
9627 #:phases (modify-phases %standard-phases
9628 ;; Replace a specific method call with a hard-coded
9629 ;; path to the necessary libmagic.so file in the
9630 ;; store. If we don't do this, then the method call
9631 ;; will fail to find the libmagic.so file, which in
9632 ;; turn will cause any application using
9633 ;; python-magic to fail.
9634 (add-before 'build 'hard-code-path-to-libmagic
9635 (lambda* (#:key inputs #:allow-other-keys)
9636 (let ((file (assoc-ref inputs "file")))
9637 (substitute* "magic.py"
9638 (("ctypes.util.find_library\\('magic'\\)")
9639 (string-append "'" file "/lib/libmagic.so'")))
9640 #t)))
9641 (add-before 'install 'disable-egg-compression
9642 (lambda _
9643 (let ((port (open-file "setup.cfg" "a")))
9644 (display "\n[easy_install]\nzip_ok = 0\n"
9645 port)
9646 (close-port port)
9647 #t))))))
9648 (inputs
9649 ;; python-magic needs to be able to find libmagic.so.
9650 `(("file" ,file)))
9651 (home-page
9652 "https://github.com/ahupp/python-magic")
9653 (synopsis
9654 "File type identification using libmagic")
9655 (description
9656 "This module uses ctypes to access the libmagic file type
9657identification library. It makes use of the local magic database and
9658supports both textual and MIME-type output. Note that this module and
9659the python-file module both provide a \"magic.py\" file; these two
9660modules, which are different and were developed separately, both serve
9661the same purpose: to provide Python bindings for libmagic.")
9662 (license license:expat)))
9663
9664(define-public python2-magic
9665 (package-with-python2 python-magic))
9666
9667(define-public python2-s3cmd
9668 (package
9669 (name "python2-s3cmd")
9670 (version "1.6.1")
9671 (source
9672 (origin
9673 (method url-fetch)
9674 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
9675 "s3cmd-" version ".tar.gz"))
9676 (sha256
9677 (base32
9678 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
9679 (build-system python-build-system)
9680 (arguments
9681 ;; s3cmd is written for python2 only and contains no tests.
9682 `(#:python ,python-2
9683 #:tests? #f))
9684 (propagated-inputs
9685 `(("python2-dateutil" ,python2-dateutil)
9686 ;; The python-file package also provides a magic.py module.
9687 ;; This is an unfortunate state of affairs; however, s3cmd
9688 ;; fails to install if it cannot find specifically the
9689 ;; python-magic package. Thus we include it, instead of using
9690 ;; python-file. Ironically, s3cmd sometimes works better
9691 ;; without libmagic bindings at all:
9692 ;; https://github.com/s3tools/s3cmd/issues/198
9693 ("python2-magic" ,python2-magic)))
9694 (home-page "http://s3tools.org/s3cmd")
9695 (synopsis "Command line tool for S3-compatible storage services")
9696 (description
9697 "S3cmd is a command line tool for uploading, retrieving and managing data
9698in storage services that are compatible with the Amazon Simple Storage
9699Service (S3) protocol, including S3 itself. It supports rsync-like backup,
9700GnuPG encryption, and more. It also supports management of Amazon's
9701CloudFront content delivery network.")
9702 (license license:gpl2+)))
9703
9704(define-public python-pkgconfig
9705 (package
9706 (name "python-pkgconfig")
9707 (version "1.3.1")
9708 (source
9709 (origin
9710 (method url-fetch)
9711 (uri (pypi-uri "pkgconfig" version))
9712 (sha256
9713 (base32
9714 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
9715 (build-system python-build-system)
9716 (native-inputs
9717 `(("python-nose" ,python-nose)))
9718 (inputs
9719 `(("pkg-config" ,pkg-config)))
9720 (arguments
9721 `(#:phases
9722 (modify-phases %standard-phases
9723 (add-before 'build 'patch
9724 ;; Hard-code the path to pkg-config.
9725 (lambda _
9726 (substitute* "pkgconfig/pkgconfig.py"
9727 (("cmd = 'pkg-config")
9728 (string-append "cmd = '" (which "pkg-config"))))
9729 #t))
9730 (replace 'check
9731 (lambda _
9732 (invoke "nosetests" "test.py"))))))
9733 (home-page "https://github.com/matze/pkgconfig")
9734 (synopsis "Python interface for pkg-config")
9735 (description "This module provides a Python interface to pkg-config. It
9736can be used to find all pkg-config packages, check if a package exists,
9737check if a package meets certain version requirements, query CFLAGS and
9738LDFLAGS and parse the output to build extensions with setup.py.")
9739 (license license:expat)))
9740
9741(define-public python2-pkgconfig
9742 (package-with-python2 python-pkgconfig))
9743
9744(define-public python-bz2file
9745 (package
9746 (name "python-bz2file")
9747 (version "0.98")
9748 (source
9749 (origin
9750 (method url-fetch)
9751 (uri (pypi-uri "bz2file" version))
9752 (sha256
9753 (base32
9754 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
9755 (build-system python-build-system)
9756 (arguments
9757 `(#:tests? #f)) ; Tests use deprecated python modules.
9758 (home-page "https://github.com/nvawda/bz2file")
9759 (synopsis "Read and write bzip2-compressed files")
9760 (description
9761 "Bz2file is a Python library for reading and writing bzip2-compressed
9762files. It contains a drop-in replacement for the I/O interface in the
9763standard library's @code{bz2} module, including features from the latest
9764development version of CPython that are not available in older releases.")
9765 (license license:asl2.0)))
9766
9767(define-public python2-bz2file
9768 (package-with-python2 python-bz2file))
9769
9770(define-public python-future
9771 (package
9772 (name "python-future")
d5d54030 9773 (version "0.17.1")
44d10b1f
RW
9774 (source
9775 (origin
9776 (method url-fetch)
9777 (uri (pypi-uri "future" version))
9778 (sha256
9779 (base32
d5d54030 9780 "1f2rlqn9rh7adgir52dlbqz69gsab44x0mlm8gf1cs7xvhv54137"))))
44d10b1f
RW
9781 (build-system python-build-system)
9782 ;; Many tests connect to the network or are otherwise flawed.
9783 ;; https://github.com/PythonCharmers/python-future/issues/210
9784 (arguments
9785 `(#:tests? #f))
9786 (home-page "http://python-future.org")
9787 (synopsis "Single-source support for Python 3 and 2")
9788 (description
9789 "@code{python-future} is the missing compatibility layer between Python 2 and
9790Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
9791to support both Python 2 and Python 3 with minimal overhead.")
9792 (license license:expat)))
9793
9794(define-public python2-future
9795 (package-with-python2 python-future))
9796
9797(define-public python-cysignals
9798 (package
9799 (name "python-cysignals")
8e3e51df 9800 (version "1.9.0")
44d10b1f
RW
9801 (source
9802 (origin
9803 (method url-fetch)
8e3e51df 9804 (uri (pypi-uri "cysignals" version))
44d10b1f
RW
9805 (sha256
9806 (base32
8e3e51df 9807 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
44d10b1f
RW
9808 (build-system python-build-system)
9809 (native-inputs
9810 `(("python-cython" ,python-cython)
9811 ("python-sphinx" ,python-sphinx)))
9812 (inputs
9813 `(("pari-gp" ,pari-gp)))
9814 (arguments
9815 `(#:modules ((guix build python-build-system)
9816 ((guix build gnu-build-system) #:prefix gnu:)
9817 (guix build utils))
9818 ;; FIXME: Tests are executed after installation and currently fail
9819 ;; when not installing into standard locations; the author is working
9820 ;; on a fix.
9821 #:tests? #f
9822 #:phases
9823 (modify-phases %standard-phases
9824 (add-before
9825 'build 'configure
9826 (assoc-ref gnu:%standard-phases 'configure)))))
9827 (home-page
9828 "https://github.com/sagemath/cysignals")
9829 (synopsis
9830 "Handling of interrupts and signals for Cython")
9831 (description
9832 "The cysignals package provides mechanisms to handle interrupts (and
9833other signals and errors) in Cython code, using two related approaches,
9834for mixed Cython/Python code or external C libraries and pure Cython code,
9835respectively.")
9836 (license license:lgpl3+)))
9837
9838(define-public python2-cysignals
9839 (package-with-python2 python-cysignals))
9840
9841(define-public python2-shedskin
9842 (package
9843 (name "python2-shedskin")
9844 (version "0.9.4")
9845 (source
9846 (origin
9847 (method url-fetch)
9848 (uri (string-append "https://github.com/shedskin/shedskin/"
9849 "releases/download/v" version
9850 "/shedskin-" version ".tgz"))
9851 (sha256
9852 (base32
9853 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
9854 (build-system python-build-system)
9855 (arguments
9856 `(#:python ,python-2
9857 #:phases (modify-phases %standard-phases
9858 (add-after 'unpack 'fix-resulting-include-libs
9859 (lambda* (#:key inputs #:allow-other-keys)
9860 (let ((libgc (assoc-ref inputs "libgc"))
9861 (pcre (assoc-ref inputs "pcre")))
9862 (substitute* "shedskin/makefile.py"
9863 (("variable == 'CCFLAGS':[ ]*")
9864 (string-append "variable == 'CCFLAGS':\n"
9865 " line += ' -I " pcre "/include"
9866 " -I " libgc "/include'"))
9867 (("variable == 'LFLAGS':[ ]*")
9868 (string-append "variable == 'LFLAGS':\n"
9869 " line += ' -L" pcre "/lib"
9870 " -L " libgc "/lib'")))
9871 #t))))))
9872 (inputs `(("pcre" ,pcre)
9873 ("libgc" ,libgc)))
9874 (home-page "https://shedskin.github.io/")
9875 (synopsis "Experimental Python-2 to C++ Compiler")
9876 (description (string-append "This is an experimental compiler for a subset of
9877Python. It generates C++ code and a Makefile."))
9878 (license (list license:gpl3 license:bsd-3 license:expat))))
9879
9880(define-public python2-rope
9881 (package
9882 (name "python2-rope")
a9ba0a31 9883 (version "0.11.0")
44d10b1f
RW
9884 (source
9885 (origin
9886 (method url-fetch)
9887 (uri (pypi-uri "rope" version))
9888 (sha256
9889 (base32
a9ba0a31 9890 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
44d10b1f 9891 (arguments
afb29715 9892 ;; Rope has only partial python3 support, see `python-rope'
44d10b1f
RW
9893 `(#:python ,python-2))
9894 (build-system python-build-system)
9895 (native-inputs
9896 `(("python2-unittest2" ,python2-unittest2)))
9897 (home-page "https://github.com/python-rope/rope")
9898 (synopsis "Refactoring library for Python")
9899 (description "Rope is a refactoring library for Python. It facilitates
9900the renaming, moving and extracting of attributes, functions, modules, fields
9901and parameters in Python 2 source code. These refactorings can also be applied
9902to occurrences in strings and comments.")
9903 (license license:gpl2)))
9904
2c880ef4
LC
9905(define-public python-rope
9906 (package
9907 (inherit python2-rope)
9908 (name "python-rope")
9909 (arguments `(#:python ,python-wrapper
9910 ;; XXX: Only partial python3 support, results in some failing
9911 ;; tests: <https://github.com/python-rope/rope/issues/247>.
9912 #:tests? #f))
9913 (properties `((python2-variant . ,(delay python2-rope))))))
9914
44d10b1f
RW
9915(define-public python-py3status
9916 (package
9917 (name "python-py3status")
ef68b35d 9918 (version "3.21")
44d10b1f
RW
9919 (source
9920 (origin
9921 (method url-fetch)
9922 (uri (pypi-uri "py3status" version))
9923 (sha256
ef68b35d 9924 (base32 "16z8zq83hxy48g6hh4xczbdz50qvxv9k1aahr4fqq7jis60cc262"))))
44d10b1f
RW
9925 (build-system python-build-system)
9926 (inputs
9927 `(("file" ,file)))
9928 (arguments
9929 '(#:phases
9930 (modify-phases %standard-phases
9931 ;; 'file' is used for detection of configuration file encoding
9932 ;; let's make link the dependency to particular input
9933 (add-before 'build 'patch-file-path
9934 (lambda* (#:key inputs #:allow-other-keys)
9935 (let ((file-path (assoc-ref inputs "file")))
9936 (substitute* "py3status/parse_config.py"
6a6b8a3f 9937 (("\\[\"file\", \"-b\"")
44d10b1f
RW
9938 (string-append "['" file-path "/bin/file', '-b'")))
9939 #t))))
9940 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
9941 (home-page "https://github.com/ultrabug/py3status")
9942 (synopsis "Extensible i3status wrapper written in Python")
9943 (description "py3status is an i3status wrapper which extends i3status
9944functionality in a modular way, allowing you to extend your panel with your
9945own code, responding to click events and updating clock every second.")
9946 (license license:bsd-3)))
9947
9948(define-public python-tblib
9949 (package
9950 (name "python-tblib")
9951 (version "1.3.2")
9952 (source (origin
9953 (method url-fetch)
9954 (uri (pypi-uri "tblib" version))
9955 (sha256 (base32
9956 "1rsg8h069kqgncyv8fgzyj6qflk6j10cb78pa5jk34ixwq044vj3"))))
9957 (build-system python-build-system)
9958 (arguments
9959 `(#:phases
9960 (modify-phases %standard-phases
9961 (add-before 'check 'adjust-tests
9962 (lambda _
9963 (when (which "python3")
9964 ;; Adjust the example output to match that of Python 3.7:
9965 ;; <https://github.com/ionelmc/python-tblib/issues/36>.
9966 (substitute* "README.rst"
9967 (("Exception\\('fail',") "Exception('fail'"))
9968 #t)))
9969 (replace 'check
9970 (lambda _
9971 ;; Upstream runs tests after installation and the package itself
9972 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
9973 ;; found.
9974 (setenv "PYTHONPATH"
9975 (string-append (getcwd) "/build/lib:"
9976 (getenv "PYTHONPATH")))
9977 (invoke "py.test" "-vv" "tests" "README.rst"))))))
9978 (native-inputs
9979 `(("python-pytest" ,python-pytest)
9980 ("python-six" ,python-six)))
9981 (home-page "https://github.com/ionelmc/python-tblib")
9982 (synopsis "Traceback serialization library")
9983 (description
9984 "Traceback serialization allows you to:
9985
9986@enumerate
9987@item Pickle tracebacks and raise exceptions with pickled tracebacks in
9988different processes. This allows better error handling when running code over
9989multiple processes (imagine multiprocessing, billiard, futures, celery etc).
9990
9991@item Parse traceback strings and raise with the parsed tracebacks.
9992@end enumerate\n")
9993 (license license:bsd-3)))
9994
9995(define-public python2-tblib
9996 (package-with-python2 python-tblib))
9997
9998(define-public python-greenlet
9999 (package
10000 (name "python-greenlet")
10001 (version "0.4.15")
10002 (source (origin
10003 (method url-fetch)
10004 (uri (pypi-uri "greenlet" version))
10005 (sha256
10006 (base32
10007 "1g4g1wwc472ds89zmqlpyan3fbnzpa8qm48z3z1y6mlk44z485ll"))))
10008 (build-system python-build-system)
10009 (home-page "https://greenlet.readthedocs.io/")
10010 (synopsis "Lightweight in-process concurrent programming")
10011 (description
10012 "Greenlet package is a spin-off of Stackless, a version of CPython
10013that supports micro-threads called \"tasklets\". Tasklets run
10014pseudo-concurrently (typically in a single or a few OS-level threads) and
10015are synchronized with data exchanges on \"channels\".")
10016 (license (list license:psfl license:expat))))
10017
10018(define-public python2-greenlet
10019 (package-with-python2 python-greenlet))
10020
10021(define-public python-objgraph
10022 (package
10023 (name "python-objgraph")
eebc03bb 10024 (version "3.4.1")
44d10b1f
RW
10025 (source
10026 (origin
10027 (method url-fetch)
10028 (uri (pypi-uri "objgraph" version))
10029 (sha256
10030 (base32
eebc03bb 10031 "19qmqsh984zq1rzzjy4vqnmviaqnymcyl8h7z99pnicbgwnm2adz"))))
44d10b1f
RW
10032 (build-system python-build-system)
10033 (propagated-inputs
10034 `(("python-graphviz" ,python-graphviz)))
10035 (native-inputs
10036 `(("python-mock" ,python-mock)
10037 ("graphviz" ,graphviz)))
10038 (home-page "https://mg.pov.lt/objgraph/")
10039 (synopsis "Draw Python object reference graphs with graphviz")
10040 (description
10041 "This package provides tools to draw Python object reference graphs with
10042graphviz.")
10043 (license license:expat)))
10044
ffe58d1d
MB
10045(define-public python2-objgraph
10046 (package-with-python2 python-objgraph))
10047
44d10b1f
RW
10048(define-public python-gevent
10049 (package
10050 (name "python-gevent")
10051 (version "1.3.7")
10052 (source (origin
10053 (method url-fetch)
10054 (uri (pypi-uri "gevent" version))
10055 (sha256
10056 (base32
10057 "0b0fr04qdk1p4sniv87fh8z5psac60x01pv054kpgi94520g81iz"))
10058 (modules '((guix build utils)))
10059 (snippet
10060 '(begin
10061 ;; unbunding libev and c-ares
10062 (delete-file-recursively "deps")
10063 #t))))
10064 (build-system python-build-system)
10065 (arguments
10066 `(#:modules ((ice-9 ftw)
10067 (ice-9 match)
10068 (srfi srfi-26)
10069 (guix build utils)
10070 (guix build python-build-system))
10071 #:phases (modify-phases %standard-phases
44d10b1f
RW
10072 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
10073 (lambda _
10074 (substitute* "src/gevent/subprocess.py"
10075 (("/bin/sh") (which "sh")))
10076 (for-each (lambda (file)
10077 (substitute* file
10078 (("/bin/sh") (which "sh"))
10079 (("/bin/true") (which "true"))))
10080 (find-files "src/greentest" "\\.py$"))
10081 #t))
10082 (add-before 'build 'do-not-use-bundled-sources
10083 (lambda* (#:key inputs #:allow-other-keys)
10084 (setenv "CONFIG_SHELL" (which "bash"))
10085 (setenv "LIBEV_EMBED" "false")
10086 (setenv "CARES_EMBED" "false")
10087 (setenv "EMBED" "false")
10088
b5b56b7f
MB
10089 ;; Prevent building bundled libev.
10090 (substitute* "setup.py"
10091 (("run_make=_BUILDING")
10092 "run_make=False"))
10093
44d10b1f
RW
10094 (let ((greenlet (string-append
10095 (assoc-ref inputs "python-greenlet")
10096 "/include")))
10097 (match (scandir greenlet
10098 (lambda (item)
10099 (string-prefix? "python" item)))
10100 ((python)
b5b56b7f 10101 (setenv "C_INCLUDE_PATH"
44d10b1f
RW
10102 (string-append greenlet "/" python)))))
10103 #t))
10104 (add-before 'check 'skip-timer-test
10105 (lambda _
10106 ;; XXX: Skip 'TestTimerResolution', which appears to be
10107 ;; unreliable.
10108 (substitute* "src/greentest/test__core_timer.py"
10109 (("not greentest.RUNNING_ON_CI") "False"))
10110 #t))
10111 (replace 'check
10112 (lambda _
10113 ;; Make sure the build directory is on PYTHONPATH.
10114 (setenv "PYTHONPATH"
10115 (string-append
10116 (getenv "PYTHONPATH") ":"
10117 (getcwd) "/build/"
10118 (car (scandir "build" (cut string-prefix? "lib." <>)))))
10119 (with-directory-excursion "src/greentest"
10120 ;; XXX: Many tests require network access. Instead we only
10121 ;; run known-good tests. Unfortunately we cannot use
10122 ;; recursion here since this directory also contains
10123 ;; Python-version-specific subfolders.
10124 (apply invoke "python" "testrunner.py" "--config"
10125 "known_failures.py"
10126 (scandir "." (cut regexp-exec
10127 (make-regexp "test_+(subprocess|core)")
10128 <>)))))))))
10129 (propagated-inputs
10130 `(("python-greenlet" ,python-greenlet)
10131 ("python-objgraph" ,python-objgraph)))
10132 (native-inputs
b5b56b7f 10133 `(("python-six" ,python-six)))
44d10b1f
RW
10134 (inputs
10135 `(("c-ares" ,c-ares)
10136 ("libev" ,libev)))
10137 (home-page "http://www.gevent.org/")
10138 (synopsis "Coroutine-based network library")
10139 (description
10140 "gevent is a coroutine-based Python networking library that uses greenlet
10141to provide a high-level synchronous API on top of the libev event loop.")
10142 (license license:expat)
10143 (properties `((python2-variant . ,(delay python2-gevent))))))
10144
10145(define-public python2-gevent
10146 (let ((base (package-with-python2
10147 (strip-python2-variant python-gevent))))
10148 (package
10149 (inherit base)
10150 (native-inputs `(,@(package-native-inputs python-gevent)
10151 ("python-mock" ,python2-mock))))))
10152
10153(define-public python-fastimport
10154 (package
10155 (name "python-fastimport")
10156 (version "0.9.6")
10157 (source
10158 (origin
10159 (method url-fetch)
10160 (uri (pypi-uri "fastimport" version))
10161 (sha256
10162 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
10163 (build-system python-build-system)
10164 (home-page "https://github.com/jelmer/python-fastimport")
10165 (synopsis "VCS fastimport parser and generator in Python")
10166 (description "This package provides a parser for and generator of the Git
10167@url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
10168format.")
10169 (license license:gpl2+)))
10170
10171(define-public python2-fastimport
10172 (package-with-python2 python-fastimport))
10173
10174(define-public python-twisted
10175 (package
10176 (name "python-twisted")
fdfad2fc 10177 (version "19.7.0")
44d10b1f
RW
10178 (source (origin
10179 (method url-fetch)
10180 (uri (pypi-uri "Twisted" version ".tar.bz2"))
10181 (sha256
10182 (base32
fdfad2fc 10183 "17d3hnxv9qndagzz63mdpyk99xj63p9gq586vjn0rxk8cl197nym"))))
44d10b1f
RW
10184 (build-system python-build-system)
10185 (arguments
0107c9b8 10186 '(#:tests? #f)) ; FIXME: some tests fail
44d10b1f
RW
10187 (propagated-inputs
10188 `(("python-zope-interface" ,python-zope-interface)
52ca1c4a 10189 ("python-pyhamcrest" ,python-pyhamcrest)
44d10b1f 10190 ("python-incremental" ,python-incremental)
e5ba2fe3 10191 ("python-hyperlink" ,python-hyperlink)
44d10b1f
RW
10192 ("python-constantly" ,python-constantly)
10193 ("python-automat" ,python-automat)))
10194 (home-page "https://twistedmatrix.com/")
10195 (synopsis "Asynchronous networking framework written in Python")
10196 (description
10197 "Twisted is an extensible framework for Python programming, with special
10198focus on event-based network programming and multiprotocol integration.")
10199 (license license:expat)))
10200
10201(define-public python2-twisted
10202 (package-with-python2 python-twisted))
10203
10204(define-public python-pika
10205 (package
10206 (name "python-pika")
10207 (version "0.12.0")
10208 (source
10209 (origin
10210 (method url-fetch)
10211 (uri (pypi-uri "pika" version))
10212 (sha256
10213 (base32
10214 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
10215 (build-system python-build-system)
10216 (native-inputs
10217 `(("python-pyev" ,python-pyev)
10218 ("python-tornado" ,python-tornado)
10219 ("python-twisted" ,python-twisted)))
10220 (home-page "https://pika.readthedocs.org")
10221 (synopsis "Pure Python AMQP Client Library")
10222 (description
10223 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
10224Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
10225network support library.")
10226 (license license:bsd-3)))
10227
10228(define-public python2-pika
10229 (package-with-python2 python-pika))
10230
10231(define-public python-ply
10232 (package
10233 (name "python-ply")
10234 (version "3.10")
10235 (source
10236 (origin
10237 (method url-fetch)
10238 (uri (pypi-uri "ply" version))
10239 (sha256
10240 (base32
10241 "1jxsr1d2f732r6ljhvm827113dckwl6qwakfvpbdhcbhvpvlmscn"))))
10242 (build-system python-build-system)
10243 (home-page "http://www.dabeaz.com/ply/")
10244 (synopsis "Python Lex & Yacc")
10245 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
10246It uses LR parsing and does extensive error checking.")
10247 (license license:bsd-3)))
10248
10249(define-public python2-ply
10250 (package-with-python2 python-ply))
10251
10252(define-public python-tabulate
10253 (package
10254 (name "python-tabulate")
10255 (version "0.7.7")
10256 (source (origin
10257 (method url-fetch)
10258 (uri (pypi-uri "tabulate" version))
10259 (sha256
10260 (base32
10261 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
10262 (build-system python-build-system)
10263 (arguments
10264 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
10265 ;; and the latest release is not tagged in the upstream repository.
10266 '(#:tests? #f))
10267 (home-page "https://bitbucket.org/astanin/python-tabulate")
10268 (synopsis "Pretty-print tabular data")
10269 (description
10270 "Tabulate is a library and command-line utility to pretty-print tabular
10271data in Python.")
10272 (license license:expat)))
10273
10274(define-public python2-tabulate
10275 (package-with-python2 python-tabulate))
10276
10277(define-public python-kazoo
10278 (package
10279 (name "python-kazoo")
10280 (version "2.4.0")
10281 (source
10282 (origin
10283 (method url-fetch)
10284 (uri (pypi-uri "kazoo" version))
10285 (sha256
10286 (base32
10287 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
10288 (build-system python-build-system)
10289 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
10290 (propagated-inputs
10291 `(("python-six" ,python-six)))
10292 (home-page "https://kazoo.readthedocs.org")
10293 (synopsis "High-level Zookeeper client library")
10294 (description
10295 "Kazoo is a Python client library for the Apache Zookeeper distributed
10296application service. It is designed to be easy to use and to avoid common
10297programming errors.")
10298 (license license:asl2.0)))
10299
10300(define-public python2-kazoo
10301 (package-with-python2 python-kazoo))
10302
10303(define-public python-pykafka
10304 (package
10305 (name "python-pykafka")
10306 (version "2.4.0")
10307 (source (origin
10308 (method url-fetch)
0ca1d040 10309 (uri (pypi-uri "pykafka" version))
44d10b1f
RW
10310 (sha256
10311 (base32
10312 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
10313 (build-system python-build-system)
10314 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
10315 (propagated-inputs
10316 `(("python-gevent" ,python-gevent)
10317 ("python-kazoo" ,python-kazoo)
10318 ("python-tabulate" ,python-tabulate)))
10319 (inputs
10320 `(("librdkafka" ,librdkafka)))
10321 (home-page "https://pykafka.readthedocs.io/")
10322 (synopsis "Apache Kafka client for Python")
10323 (description
10324 "PyKafka is a client for the Apache Kafka distributed messaging system.
10325It includes Python implementations of Kafka producers and consumers, which
10326are optionally backed by a C extension built on librdkafka.")
10327 (license license:asl2.0)))
10328
10329(define-public python2-pykafka
10330 (package-with-python2 python-pykafka))
10331
10332(define-public python-wcwidth
28ac442b
MB
10333 (package
10334 (name "python-wcwidth")
574a71a7 10335 (version "0.1.8")
28ac442b
MB
10336 (source (origin
10337 (method url-fetch)
10338 (uri (pypi-uri "wcwidth" version))
10339 (sha256
10340 (base32
574a71a7 10341 "1a1pzds3xzfylm5mnc5f6c1p8kiig0daqjc9gygd9rc3cj53x2zj"))))
28ac442b
MB
10342 (build-system python-build-system)
10343 (home-page "https://github.com/jquast/wcwidth")
10344 (synopsis "Measure number of terminal column cells of wide-character codes")
10345 (description "Wcwidth measures the number of terminal column cells of
44d10b1f
RW
10346wide-character codes. It is useful for those implementing a terminal emulator,
10347or programs that carefully produce output to be interpreted by one. It is a
10348Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
10349specified in POSIX.1-2001 and POSIX.1-2008.")
28ac442b 10350 (license license:expat)))
44d10b1f
RW
10351
10352(define-public python2-wcwidth
10353 (package-with-python2 python-wcwidth))
10354
10355(define-public python2-jsonrpclib
10356 (package
10357 (name "python2-jsonrpclib")
10358 (version "0.1.7")
10359 (source (origin
10360 (method url-fetch)
6571bba0 10361 (uri (pypi-uri "jsonrpclib" version))
44d10b1f
RW
10362 (sha256
10363 (base32
10364 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
10365 (build-system python-build-system)
10366 (arguments
10367 `(#:tests? #f
10368 #:python ,python-2))
10369 (home-page "https://github.com/joshmarshall/jsonrpclib/")
10370 (synopsis "Implementation of JSON-RPC specification for Python")
10371 (description
10372 "This library is an implementation of the JSON-RPC specification.
10373It supports both the original 1.0 specification, as well as the
10374new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
10375etc.")
10376 (license license:asl2.0)))
10377
10378(define-public python-chai
10379 (package
10380 (name "python-chai")
10381 (version "1.1.2")
10382 (source (origin
10383 (method url-fetch)
10384 (uri (pypi-uri "chai" version))
10385 (sha256
10386 (base32
10387 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
10388 (build-system python-build-system)
10389 (home-page "https://github.com/agoragames/chai")
10390 (synopsis "Mocking framework for Python")
10391 (description
10392 "Chai provides an api for mocking, stubbing and spying your python
10393objects, patterned after the Mocha library for Ruby.")
10394 (license license:bsd-3)))
10395
10396(define-public python2-chai
10397 (package-with-python2 python-chai))
10398
10399(define-public python-inflection
10400 (package
10401 (name "python-inflection")
10402 (version "0.3.1")
10403 (source
10404 (origin (method url-fetch)
10405 (uri (pypi-uri "inflection" version))
10406 (sha256
10407 (base32
10408 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
10409 (build-system python-build-system)
10410 (native-inputs
10411 `(("python-pytest" ,python-pytest)))
10412 (home-page "https://github.com/jpvanhal/inflection")
10413 (synopsis "Python string transformation library")
10414 (description
10415 "Inflection is a string transformation library. It singularizes
10416and pluralizes English words, and transforms strings from CamelCase to
10417underscored string.")
10418 (license license:expat)))
10419
10420(define-public python2-inflection
10421 (package-with-python2 python-inflection))
10422
10423(define-public python-pylev
10424 (package
10425 (name "python-pylev")
10426 (version "1.3.0")
10427 (source (origin
10428 (method url-fetch)
10429 (uri (pypi-uri "pylev" version))
10430 (sha256
10431 (base32
10432 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
10433 (build-system python-build-system)
10434 (home-page "https://github.com/toastdriven/pylev")
10435 (synopsis "Levenshtein distance implementation in Python")
10436 (description "Pure Python Levenshtein implementation, based off the
10437Wikipedia code samples at
10438@url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
10439 (license license:bsd-3)))
10440
10441(define-public python2-pylev
10442 (package-with-python2 python-pylev))
10443
10444(define-public python-cleo
10445 (package
10446 (name "python-cleo")
af2d3713 10447 (version "0.6.8")
44d10b1f
RW
10448 (source (origin
10449 (method url-fetch)
10450 (uri (pypi-uri "cleo" version))
10451 (sha256
10452 (base32
af2d3713 10453 "06zp695hq835rkaq6irr1ds1dp2qfzyf32v60vxpd8rcnxv319l5"))))
44d10b1f
RW
10454 (build-system python-build-system)
10455 (native-inputs
af2d3713 10456 `( ;; For testing
44d10b1f
RW
10457 ("python-mock" ,python-mock)
10458 ("python-pytest-mock" ,python-pytest-mock)
10459 ("python-pytest" ,python-pytest)))
10460 (propagated-inputs
10461 `(("python-backpack" ,python-backpack)
10462 ("python-pastel" ,python-pastel)
10463 ("python-pylev" ,python-pylev)))
10464 (home-page "https://github.com/sdispater/cleo")
10465 (synopsis "Command-line arguments library for Python")
10466 (description
10467 "Cleo allows you to create command-line commands with signature in
10468docstring and colored output.")
10469 (license license:expat)))
10470
10471(define-public python2-cleo
10472 (package-with-python2 python-cleo))
10473
2be85c45
TLC
10474(define-public python-tomlkit
10475 (package
10476 (name "python-tomlkit")
10477 (version "0.5.7")
10478 (source
10479 (origin
10480 (method url-fetch)
10481 (uri (pypi-uri "tomlkit" version))
10482 (sha256
10483 (base32
10484 "18820ga5z3if1w8dvykxrfm000akracq01ic402xrbljgbn5grn4"))))
10485 (build-system python-build-system)
10486 (native-inputs
10487 `(("python-pytest" ,python-pytest)))
10488 (home-page
10489 "https://github.com/sdispater/tomlkit")
10490 (synopsis "Style preserving TOML library")
10491 (description
10492 "TOML Kit is a 0.5.0-compliant TOML library. It includes a parser that
10493preserves all comments, indentations, whitespace and internal element ordering,
10494and makes them accessible and editable via an intuitive API. It can also
10495create new TOML documents from scratch using the provided helpers. Part of the
10496implementation as been adapted, improved and fixed from Molten.")
10497 (license license:expat)))
10498
0bb32201
TLC
10499(define-public python-shellingham
10500 (package
10501 (name "python-shellingham")
10502 (version "1.3.1")
10503 (source
10504 (origin
10505 (method url-fetch)
10506 (uri (pypi-uri "shellingham" version))
10507 (sha256
10508 (base32
10509 "1q7kws7w4x2hji3g7y0ni9ddk4sd676ylrb3db54gbpys6xj6nwq"))))
10510 (build-system python-build-system)
10511 (home-page
10512 "https://github.com/sarugaku/shellingham")
10513 (synopsis "Tool to detect surrounding shell")
10514 (description
10515 "Shellingham detects what shell the current Python executable is
10516running in.")
10517 (license license:isc)))
10518
aee92957
TLC
10519(define-public python-memcached
10520 (package
10521 (name "python-memcached")
10522 (version "1.59")
10523 (source
10524 (origin
10525 (method url-fetch)
10526 (uri (pypi-uri "python-memcached" version))
10527 (sha256
10528 (base32
10529 "0kvyapavbirk2x3n1jx4yb9nyigrj1s3x15nm3qhpvhkpqvqdqm2"))))
10530 (build-system python-build-system)
10531 (propagated-inputs `(("python-six" ,python-six)))
10532 (home-page
10533 "https://github.com/linsomniac/python-memcached")
10534 (synopsis "Pure python memcached client")
10535 (description
10536 "This software is a pure Python interface to the memcached memory cache
10537daemon. It is the client side software which allows storing values in one or
10538more, possibly remote, memcached servers.")
10539 (license license:psfl)))
10540
b2ac2508
TLC
10541(define-public python-clikit
10542 (package
10543 (name "python-clikit")
10544 (version "0.2.4")
10545 (source
10546 (origin
10547 (method url-fetch)
10548 (uri (pypi-uri "clikit" version))
10549 (sha256
10550 (base32
10551 "0dc8czib5f4j9px1ivcpqnmivnx2zjpc0xb00ldrhsqylks7r06n"))))
10552 (build-system python-build-system)
10553 (propagated-inputs
10554 `(("python-pastel" ,python-pastel)
10555 ("python-pylev" ,python-pylev)))
10556 (home-page "https://github.com/sdispater/clikit")
10557 (synopsis "Group of utilities to build command line interfaces")
10558 (description
10559 "CliKit is a group of utilities to build testable command line
10560interfaces.")
10561 (license license:expat)))
10562
c6f008d6
TLC
10563(define-public python-msgpack-python
10564 (package
10565 (name "python-msgpack-python")
10566 (version "0.5.6")
10567 (source
10568 (origin
10569 (method url-fetch)
10570 (uri (pypi-uri "msgpack-python" version))
10571 (sha256
10572 (base32
10573 "16wh8qgybmfh4pjp8vfv78mdlkxfmcasg78lzlnm6nslsfkci31p"))))
10574 (build-system python-build-system)
10575 (home-page "http://msgpack.org/")
10576 (synopsis "Package to deserialize messages in MessagePack binary format")
10577 (description
10578 "MessagePack is an efficient binary serialization format. It lets you
10579exchange data among multiple languages like JSON. But it's faster and
10580smaller. Small integers are encoded into a single byte, and typical short
10581strings require only one extra byte in addition to the strings themselves.")
10582 (license license:asl2.0)))
10583
badc1c63
TLC
10584(define-public python-cachy
10585 (package
10586 (name "python-cachy")
10587 (version "0.2.0")
10588 (source
10589 (origin
10590 (method url-fetch)
10591 (uri (pypi-uri "cachy" version))
10592 (sha256
10593 (base32
10594 "0v6mjyhgx6j7ya20bk69cr3gdzdkdf6psay0h090rscclgji65dp"))))
10595 (build-system python-build-system)
10596 (native-inputs
10597 `(("python-fakeredis" ,python-fakeredis)
10598 ("python-flexmock" ,python-flexmock)
10599 ("python-pytest" ,python-pytest)))
10600 (propagated-inputs
10601 `(("python-memcached" ,python-memcached)
10602 ("python-msgpack-python" ,python-msgpack-python)
10603 ("python-redis" ,python-redis)))
10604 (home-page "https://github.com/sdispater/cachy")
10605 (synopsis "Simple yet effective caching library")
10606 (description
10607 "Cachy provides a simple yet effective caching library. A simple but
10608powerful API: thread-safety; decorator syntax; support for memcached, redis,
10609database, file, dict stores. Cachy supports python versions 2.7+ and 3.2+.")
10610 (license license:expat)))
10611
617bb67b
TLC
10612(define-public poetry
10613 (package
10614 (name "poetry")
10615 (version "0.12.17")
10616 ;; Poetry can only be built from source with poetry.
10617 (source
10618 (origin
10619 (method url-fetch)
10620 (uri (pypi-uri "poetry" version))
10621 (sha256
10622 (base32
10623 "0gxwcd65qjmzqzppf53x51sic1rbcd9py6cdzx3aprppipimslvf"))))
10624 (build-system python-build-system)
10625 (arguments
10626 `(#:tests? #f ;; Pypi does not have tests.
10627 #:phases
10628 (modify-phases %standard-phases
10629 (replace 'build
10630 (lambda _
10631 ;; Bug in poetry https://github.com/sdispater/poetry/issues/866.
10632 (invoke "sed" "-i" "-e" "s/from distutils.core/from setuptools/"
10633 "setup.py")
10634 #t)))))
10635 (propagated-inputs
10636 `(("python-cachecontrol" ,python-cachecontrol)
10637 ("python-cachy" ,python-cachy)
10638 ("python-cleo" ,python-cleo)
10639 ("python-glob2" ,python-glob2)
10640 ("python-html5lib" ,python-html5lib)
10641 ("python-jsonschema" ,python-jsonschema)
10642 ("python-msgpack" ,python-msgpack)
617bb67b
TLC
10643 ("python-pkginfo" ,python-pkginfo)
10644 ("python-pyparsing" ,python-pyparsing)
10645 ("python-pyrsistent" ,python-pyrsistent)
10646 ("python-requests" ,python-requests)
10647 ("python-requests-toolbelt" ,python-requests-toolbelt)
10648 ("python-shellingham" ,python-shellingham)
10649 ("python-tomlkit" ,python-tomlkit)
10650 ("python-virtualenv" ,python-virtualenv)))
10651 (home-page "https://poetry.eustace.io/")
10652 (synopsis "Python dependency management and packaging made easy")
10653 (description "Poetry is a tool for dependency management and packaging
10654in Python. It allows you to declare the libraries your project depends on and
10655it will manage (install/update) them for you.")
10656 (license license:expat)))
10657
44d10b1f
RW
10658(define-public python-lazy-object-proxy
10659 (package
10660 (name "python-lazy-object-proxy")
7454078a 10661 (version "1.4.3")
44d10b1f
RW
10662 (source (origin
10663 (method url-fetch)
10664 (uri (pypi-uri "lazy-object-proxy" version))
10665 (sha256
10666 (base32
7454078a 10667 "1w1aaay424ciz8fz3fkzxb0pxzfxn184f2whpyn4fx72bn50x47k"))))
63d4873b
MO
10668 (native-inputs
10669 `(("python-setuptools-scm" ,python-setuptools-scm-3.3)))
44d10b1f
RW
10670 (build-system python-build-system)
10671 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
10672 (synopsis "Lazy object proxy for python")
10673 (description
10674 "Lazy object proxy is an object that wraps a callable but defers the call
10675until the object is actually required, and caches the result of said call.")
10676 (license license:bsd-2)))
10677
10678(define-public python2-lazy-object-proxy
10679 (package-with-python2 python-lazy-object-proxy))
10680
10681(define-public python-dnspython
10682 (package
10683 (name "python-dnspython")
10684 (version "1.15.0")
10685 (source (origin
10686 (method url-fetch)
10687 (uri (string-append "http://www.dnspython.org/kits/"
10688 version "/dnspython-" version ".tar.gz"))
10689 (sha256
10690 (base32
10691 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
10692 (build-system python-build-system)
10693 (arguments '(#:tests? #f)) ; XXX: requires internet access
10694 (home-page "http://www.dnspython.org")
10695 (synopsis "DNS toolkit for Python")
10696 (description
10697 "dnspython is a DNS toolkit for Python. It supports almost all record
10698types. It can be used for queries, zone transfers, and dynamic updates.
10699It supports TSIG authenticated messages and EDNS0.")
10700 (license license:expat)))
10701
10702(define-public python2-dnspython
10703 (package-with-python2 python-dnspython))
10704
10705(define-public python-email-validator
10706 (package
10707 (name "python-email-validator")
10708 (version "1.0.2")
10709 (source
10710 (origin (method url-fetch)
10711 (uri (pypi-uri "email_validator" version))
10712 (sha256
10713 (base32
10714 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
10715 (build-system python-build-system)
10716 (arguments
10717 '(#:phases
10718 (modify-phases %standard-phases
10719 (add-before 'build 'use-dnspython
10720 (lambda _
10721 (substitute* "setup.py"
10722 (("dnspython3") "dnspython"))
10723 #t)))))
10724 (propagated-inputs
10725 `(("python-dnspython" ,python-dnspython)
10726 ("python-idna" ,python-idna)))
10727 (home-page "https://github.com/JoshData/python-email-validator")
10728 (synopsis "Email address validation library for Python")
10729 (description
10730 "This library validates email address syntax and deliverability.")
10731 (license license:cc0)))
10732
10733(define-public python2-email-validator
10734 (package-with-python2 python-email-validator))
10735
10736(define-public python-ukpostcodeparser
10737 (package
10738 (name "python-ukpostcodeparser")
10739 (version "1.0.3")
10740 (source (origin
10741 (method url-fetch)
10742 (uri (pypi-uri "UkPostcodeParser" version))
10743 (sha256
10744 (base32
10745 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
10746 (build-system python-build-system)
10747 (home-page "https://github.com/hamstah/ukpostcodeparser")
10748 (synopsis "UK Postcode parser for Python")
10749 (description
10750 "This library provides the @code{parse_uk_postcode} function for
10751parsing UK postcodes.")
10752 (license license:expat)))
10753
10754(define-public python2-ukpostcodeparser
10755 (package-with-python2 python-ukpostcodeparser))
10756
10757(define-public python-faker
10758 (package
10759 (name "python-faker")
10760 (version "0.7.9")
10761 (source (origin
10762 (method url-fetch)
10763 (uri (pypi-uri "Faker" version))
10764 (sha256
10765 (base32
10766 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
10767 (patches
10768 (search-patches "python-faker-fix-build-32bit.patch"))
10769 (modules '((guix build utils)))
10770 (snippet
10771 '(begin
10772 (for-each delete-file (find-files "." "\\.pyc$"))
10773 #t))))
10774 (build-system python-build-system)
10775 (arguments
10776 '(#:phases
10777 (modify-phases %standard-phases
10778 (replace 'check
49ff8827 10779 (lambda _ (invoke "python" "-m" "unittest" "-v" "tests"))))))
44d10b1f
RW
10780 (native-inputs
10781 `(;; For testing
10782 ("python-email-validator" ,python-email-validator)
10783 ("python-mock" ,python-mock)
10784 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
10785 (propagated-inputs
10786 `(("python-dateutil" ,python-dateutil)
10787 ("python-six" ,python-six)))
10788 (home-page "https://github.com/joke2k/faker")
10789 (synopsis "Python package that generates fake data")
10790 (description
10791 "Faker is a Python package that generates fake data such as names,
10792addresses, and phone numbers.")
10793 (license license:expat)
10794 (properties `((python2-variant . ,(delay python2-faker))))))
10795
10796(define-public python2-faker
10797 (let ((base (package-with-python2 (strip-python2-variant
10798 python-faker))))
10799 (package
10800 (inherit base)
10801 (propagated-inputs
10802 `(("python2-ipaddress" ,python2-ipaddress)
10803 ,@(package-propagated-inputs base))))))
10804
10805(define-public python-pyaml
10806 (package
10807 (name "python-pyaml")
10808 (version "18.11.0")
10809 (source (origin
10810 (method url-fetch)
10811 (uri (pypi-uri "pyaml" version))
10812 (sha256
10813 (base32
10814 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
10815 (build-system python-build-system)
10816 (native-inputs
10817 `(("python-unidecode" ,python-unidecode)))
10818 (propagated-inputs
10819 `(("python-pyyaml" ,python-pyyaml)))
10820 (home-page "https://github.com/mk-fg/pretty-yaml")
10821 (synopsis "YAML pretty-print library for Python")
10822 (description
10823 "pyaml is a PyYAML based python module to produce pretty and readable
10824YAML-serialized data.")
492e3a7a 10825 (license license:wtfpl2)))
44d10b1f
RW
10826
10827(define-public python2-pyaml
10828 (package-with-python2 python-pyaml))
10829
10830(define-public python-backpack
10831 (package
10832 (name "python-backpack")
10833 (version "0.1")
10834 (source
10835 (origin
10836 (method url-fetch)
10837 (uri (pypi-uri "backpack" version))
10838 (sha256
10839 (base32
10840 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
10841 (build-system python-build-system)
10842 (native-inputs
10843 `(("python-pytest" ,python-pytest)
10844 ("python-nose" ,python-nose)))
10845 (propagated-inputs
10846 `(("python-simplejson" ,python-simplejson)))
10847 (home-page "https://github.com/sdispater/backpack")
10848 (synopsis "Utilities for working with Python collections")
10849 (description "Backpack provides some useful utilities for working with
10850collections of data.")
10851 (license license:expat)))
10852
10853(define-public python2-backpack
10854 (package-with-python2 python-backpack))
10855
10856(define-public python-prompt-toolkit
10857 (package
10858 (name "python-prompt-toolkit")
10859 (version "2.0.7")
10860 (source
10861 (origin
10862 (method url-fetch)
10863 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10864 (sha256
10865 (base32
10866 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
10867 (build-system python-build-system)
10868 (arguments
10869 `(#:phases
10870 (modify-phases %standard-phases
10871 (delete 'check)
10872 (add-after 'install 'post-install-check
10873 (lambda* (#:key inputs outputs #:allow-other-keys)
10874 ;; HOME is needed for the test
10875 ;; "test_pathcompleter_can_expanduser".
10876 (setenv "HOME" "/tmp")
10877 (add-installed-pythonpath inputs outputs)
10878 (invoke "py.test"))))))
10879 (propagated-inputs
10880 `(("python-wcwidth" ,python-wcwidth)
10881 ("python-six" ,python-six)
10882 ("python-pygments" ,python-pygments)))
10883 (native-inputs
10884 `(("python-pytest" ,python-pytest)))
10885 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
10886 (synopsis "Library for building command line interfaces in Python")
10887 (description
10888 "Prompt-Toolkit is a library for building interactive command line
10889interfaces in Python. It's like GNU Readline but it also features syntax
10890highlighting while typing, out-of-the-box multi-line input editing, advanced
10891code completion, incremental search, support for Chinese double-width
10892characters, mouse support, and auto suggestions.")
10893 (license license:bsd-3)))
10894
10895(define-public python2-prompt-toolkit
10896 (package-with-python2 python-prompt-toolkit))
10897
10898(define-public python-prompt-toolkit-1
10899 (package (inherit python-prompt-toolkit)
10900 (version "1.0.15")
10901 (source
10902 (origin
10903 (method url-fetch)
10904 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10905 (sha256
10906 (base32
10907 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
10908
10909(define-public python2-prompt-toolkit-1
10910 (package-with-python2 python-prompt-toolkit-1))
10911
10912(define-public python-jedi
10913 (package
10914 (name "python-jedi")
296e1aea 10915 (version "0.15.1")
44d10b1f
RW
10916 (source
10917 (origin
10918 (method url-fetch)
10919 (uri (pypi-uri "jedi" version))
10920 (sha256
10921 (base32
296e1aea 10922 "0bp4pxhsynaarbvzblsn5x32lzp29svy3sxfy8i6m5iwz9s9r1ds"))))
44d10b1f
RW
10923 (build-system python-build-system)
10924 (arguments
296e1aea 10925 `(#:phases
44d10b1f 10926 (modify-phases %standard-phases
296e1aea
MC
10927 (add-after 'unpack 'disable-file-completion-test
10928 ;; A single parameterized test currently fail (see:
10929 ;; https://github.com/davidhalter/jedi/issues/1395). Remove it.
10930 (lambda _
10931 (substitute* "test/test_api/test_completion.py"
10932 ((".*'example.py', 'rb\"' \\+ join\\('\\.\\.'.*") ""))
10933 #t))
44d10b1f 10934 (replace 'check
296e1aea
MC
10935 (lambda _
10936 (setenv "HOME" "/tmp")
10937 (invoke "python" "-m" "pytest"))))))
44d10b1f
RW
10938 (native-inputs
10939 `(("python-pytest" ,python-pytest)
10940 ("python-docopt" ,python-docopt)))
10941 (propagated-inputs
10942 `(("python-parso" ,python-parso)))
10943 (home-page "https://github.com/davidhalter/jedi")
10944 (synopsis "Autocompletion and static analysis library for Python")
10945 (description
10946 "Jedi is a static analysis tool for Python that can be used in Integrated
10947Development Environments (@dfn{IDE}s) and text editors. It understands Python
10948on a deeper level than many other static analysis frameworks for Python.
10949
10950Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
10951well.")
10952 (license license:expat)))
10953
10954(define-public python2-jedi
296e1aea 10955 (package-with-python2 python-jedi))
44d10b1f
RW
10956
10957(define-public ptpython
10958 (package
10959 (name "ptpython")
10960 (version "0.34")
10961 (source (origin
10962 (method url-fetch)
10963 (uri (pypi-uri "ptpython" version))
10964 (sha256
10965 (base32
10966 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
10967 (build-system python-build-system)
10968 (arguments
10969 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
10970 (propagated-inputs
10971 `(("python-docopt" ,python-docopt)
10972 ("python-jedi" ,python-jedi)
10973 ("python-prompt-toolkit" ,python-prompt-toolkit)
10974 ("python-pygments" ,python-pygments)))
10975 (home-page "https://github.com/jonathanslenders/ptpython")
10976 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
10977 (description
10978 "ptpython is a Python read-eval-print loop with IDE-like features.
10979It supports syntax highlighting, multiline editing, autocompletion, mouse,
10980color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
10981etc.")
10982 (license license:bsd-3)
10983 (properties `((python2-variant . ,(delay ptpython-2))))))
10984
10985(define-public ptpython-2
10986 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
10987 (package
10988 (inherit base)
10989 (name "ptpython2"))))
10990
10991(define-public python-stem
10992 (package
10993 (name "python-stem")
e746d1c3 10994 (version "1.7.1")
44d10b1f
RW
10995 (source
10996 (origin
10997 (method url-fetch)
10998 (uri (pypi-uri "stem" version))
10999 (sha256
11000 (base32
e746d1c3 11001 "18lc95pmc7i089nlsb06dsxyjl5wbhxfqgdxbjcia35ndh8z7sn9"))))
44d10b1f
RW
11002 (build-system python-build-system)
11003 (arguments
11004 `(#:phases
11005 (modify-phases %standard-phases
11006 (replace 'check
11007 (lambda _
11008 (invoke "./run_tests.py" "--unit")
11009 #t)))))
11010 (native-inputs
11011 `(("python-mock" ,python-mock)
11012 ("python-pycodestyle" ,python-pycodestyle)
11013 ("python-pyflakes" ,python-pyflakes)))
11014 (home-page "https://stem.torproject.org/")
11015 (synopsis
11016 "Python controller library that allows applications to interact with Tor")
11017 (description
11018 "Stem is a Python controller library for Tor. With it you can use Tor's
11019control protocol to script against the Tor process and read descriptor data
11020relays publish about themselves.")
11021 (license license:lgpl3)))
11022
11023(define-public python2-stem
11024 (package-with-python2 python-stem))
11025
11026(define-public python-pyserial
11027 (package
11028 (name "python-pyserial")
00d81f98 11029 (version "3.4")
44d10b1f
RW
11030 (source
11031 (origin
11032 (method url-fetch)
11033 (uri (pypi-uri "pyserial" version))
11034 (sha256
11035 (base32
00d81f98 11036 "09y68bczw324a4jb9a1cfwrbjhq179vnfkkkrybbksp0vqgl0bbf"))))
44d10b1f
RW
11037 (build-system python-build-system)
11038 (arguments
11039 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
11040 ;; #:phases
11041 ;; (modify-phases %standard-phases
11042 ;; (replace 'check
11043 ;; (lambda _
11044 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
11045 (home-page
11046 "https://github.com/pyserial/pyserial")
11047 (synopsis "Python Serial Port Bindings")
11048 (description "@code{pyserial} provide serial port bindings for Python. It
11049supports different byte sizes, stop bits, parity and flow control with RTS/CTS
11050and/or Xon/Xoff. The port is accessed in RAW mode.")
11051 (license license:bsd-3)))
11052
11053(define-public python2-pyserial
11054 (package-with-python2 python-pyserial))
11055
11056(define-public python-kivy
11057 (package
11058 (name "python-kivy")
11059 (version "1.10.1")
11060 (source
11061 (origin
11062 (method url-fetch)
11063 (uri (pypi-uri "Kivy" version))
11064 (file-name (string-append name "-" version ".tar.gz"))
11065 (sha256
11066 (base32
11067 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
11068 (build-system python-build-system)
11069 (arguments
11070 `(#:tests? #f ; Tests require many optional packages
11071 #:phases
11072 (modify-phases %standard-phases
11073 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
11074 (lambda* (#:key inputs #:allow-other-keys)
11075 (setenv "KIVY_SDL2_PATH"
11076 (string-append (assoc-ref inputs "sdl-union")
11077 "/include/SDL2"))
11078 #t)))))
11079 (native-inputs
11080 `(("git" ,git)
11081 ("pkg-config" ,pkg-config)
11082 ("python-cython" ,python-cython)))
11083 (inputs
11084 `(("gstreamer" ,gstreamer)
11085 ("mesa" ,mesa)
11086 ("sdl-union"
11087 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
11088 (home-page "http://kivy.org")
11089 (synopsis
11090 "Multitouch application framework")
11091 (description
11092 "A software library for rapid development of
11093hardware-accelerated multitouch applications.")
11094 (license license:expat)))
11095
11096(define-public python2-kivy
11097 (package-with-python2 python-kivy))
11098
11099(define-public python-kivy-next
11100 (deprecated-package "python-kivy-next" python-kivy))
11101
11102(define-public python2-kivy-next
11103 (deprecated-package "python2-kivy-next" python2-kivy))
11104
11105(define-public python-binaryornot
11106 (package
11107 (name "python-binaryornot")
11108 (version "0.4.4")
11109 (source (origin
11110 (method url-fetch)
11111 (uri (pypi-uri "binaryornot" version))
11112 (sha256
11113 (base32
11114 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
11115 (build-system python-build-system)
86723f98
DM
11116 (arguments
11117 `(#:phases
11118 (modify-phases %standard-phases
ee623903 11119 (add-after 'unpack 'patch-tests
86723f98
DM
11120 (lambda _
11121 ;; TypeError: binary() got an unexpected keyword argument
11122 ;; 'average_size'.
11123 (substitute* "tests/test_check.py"
11124 (("average_size=512") ""))
11125 #t)))))
44d10b1f
RW
11126 (propagated-inputs
11127 `(("python-chardet" ,python-chardet)
11128 ("python-hypothesis" ,python-hypothesis)))
11129 (home-page "https://github.com/audreyr/binaryornot")
11130 (synopsis "Package to check if a file is binary or text")
11131 (description "Ultra-lightweight pure Python package to check if a file is
11132binary or text.")
11133 (license license:bsd-3)
11134 (properties `((python2-variant . ,(delay python2-binaryornot))))))
11135
11136(define-public python2-binaryornot
11137 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
11138 (package (inherit base)
11139 (propagated-inputs
11140 `(("python2-enum34" ,python2-enum34)
11141 ,@(package-propagated-inputs base))))))
11142
f315673d
VC
11143(define-public python-binwalk
11144 (let ((commit "64201acfb5b0a9cdd9faa58c40a36dcff8612e29")
11145 (revision "0"))
11146 (package
11147 (name "python-binwalk")
11148 (version (git-version "2.1.1" revision commit))
11149 (source
11150 (origin
11151 (method git-fetch)
11152 (uri (git-reference
11153 (url "https://github.com/ReFirmLabs/binwalk")
11154 (commit commit)))
11155 (file-name (git-file-name name version))
11156 (sha256
11157 (base32
11158 "1z7ca6rfp887hw5jc3sb45mm4fa0xid4lsp2z8g4r590dr7k7w15"))))
11159 (build-system python-build-system)
11160 (arguments
11161 `(#:phases
11162 (modify-phases %standard-phases
11163 (add-before 'check 'set-pythonpath
11164 (lambda _
11165 (setenv "PYTHONPATH"
11166 (string-append
11167 (getcwd) "/src/"
11168 ":" (getenv "PYTHONPATH")))
11169 (setenv "HOME" "")
11170 #t)))))
11171 (native-inputs
11172 `(("python-coverage" ,python-coverage)
11173 ("python-nose" ,python-nose)))
11174 (home-page "https://github.com/ReFirmLabs/binwalk")
11175 (synopsis "Firmware analysis tool")
11176 (description "Binwalk is a tool for analyzing, reverse engineering, and extracting firmware images")
11177 (license license:expat))))
11178
44d10b1f
RW
11179(define-public python-nltk
11180 (package
11181 (name "python-nltk")
11182 (version "3.2.1")
11183 (source (origin
11184 (method url-fetch)
11185 (uri (pypi-uri "nltk" version))
11186 (sha256
11187 (base32
11188 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
11189 (build-system python-build-system)
11190 (arguments
11191 '(;; The tests require some extra resources to be downloaded.
11192 ;; TODO Try packaging these resources.
11193 #:tests? #f))
11194 (home-page "http://nltk.org/")
11195 (synopsis "Natural Language Toolkit")
11196 (description "It provides interfaces to over 50 corpora and lexical
11197resources such as WordNet, along with a suite of text processing libraries
11198for classification, tokenization, stemming, tagging, parsing, and semantic
11199reasoning, wrappers for natural language processing libraries.")
11200 (license license:asl2.0)))
11201
11202(define-public python2-nltk
11203 (package-with-python2 python-nltk))
11204
11205(define-public python-pymongo
11206 (package
11207 (name "python-pymongo")
11208 (version "3.7.2")
11209 (source (origin
11210 (method url-fetch)
11211 (uri (pypi-uri "pymongo" version))
11212 (sha256
11213 (base32
11214 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
11215 (build-system python-build-system)
11216 (propagated-inputs
11217 `(("python-certifi" ,python-certifi)))
11218 (home-page "https://github.com/mongodb/mongo-python-driver")
11219 (synopsis "Python driver for MongoDB")
11220 (description "Python driver for MongoDB.")
11221 (license license:asl2.0)))
11222
11223(define-public python2-pymongo
11224 (package-with-python2 python-pymongo))
11225
44d10b1f
RW
11226(define-public python-consul
11227 (package
11228 (name "python-consul")
11229 (version "0.6.1")
11230 (source
11231 (origin
11232 (method url-fetch)
11233 (uri (pypi-uri "python-consul" version))
11234 (sha256
11235 (base32
11236 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
11237 (build-system python-build-system)
11238 (arguments
11239 '(#:tests? #f)) ; The tests are not distributed
11240 (propagated-inputs
11241 `(("python-requests" ,python-requests)
11242 ("python-six" ,python-six)))
11243 (home-page "https://github.com/cablehead/python-consul")
11244 (synopsis "Python client for Consul")
11245 (description
11246 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
11247discovery, monitoring and configuration.")
11248 (license license:expat)))
11249
11250(define-public python2-consul
11251 (package-with-python2 python-consul))
11252
11253(define-public python-schematics
11254 (package
11255 (name "python-schematics")
11256 (version "1.1.1")
11257 (source
1961d187
TGR
11258 (origin
11259 (method git-fetch)
11260 (uri (git-reference
11261 (url "https://github.com/schematics/schematics.git")
11262 (commit (string-append "v" version))))
11263 (file-name (git-file-name name version))
11264 (sha256
11265 (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd"))))
44d10b1f
RW
11266 (build-system python-build-system)
11267 (propagated-inputs
11268 `(("python-six" ,python-six)))
11269 (arguments
1961d187
TGR
11270 ;; The tests require a bunch of not very nice packages with fixed
11271 ;; version requirements (e.g. python-coveralls).
11272 `(#:tests? #f))
44d10b1f
RW
11273 (home-page "https://github.com/schematics/schematics")
11274 (synopsis "Python Data Structures for Humans")
11275 (description "Python Data Structures for Humans.")
11276 (license license:bsd-3)))
11277
11278(define-public python2-schematics
11279 (package-with-python2 python-schematics))
11280
11281(define-public python-odfpy
11282 (package
11283 (name "python-odfpy")
11284 (version "1.3.3")
11285 (source (origin
11286 (method url-fetch)
11287 (uri (pypi-uri "odfpy" version))
11288 (sha256
11289 (base32
11290 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
11291 (arguments
11292 `(#:modules ((srfi srfi-1)
11293 (guix build python-build-system)
11294 (guix build utils))
11295 #:phases
11296 (modify-phases %standard-phases
11297 (replace 'check
11298 ;; The test runner invokes python2 and python3 for test*.py.
11299 ;; To avoid having both in inputs, we replicate it here.
11300 (lambda _
21ccc01d
RW
11301 (for-each (lambda (test-file) (invoke "python" test-file))
11302 (find-files "tests" "^test.*\\.py$"))
11303 #t)))))
44d10b1f
RW
11304 (build-system python-build-system)
11305 (home-page "https://github.com/eea/odfpy")
11306 (synopsis "Python API and tools to manipulate OpenDocument files")
11307 (description "Collection of libraries and utility programs written in
11308Python to manipulate OpenDocument 1.2 files.")
11309 (license
11310 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
11311 ;; number of files with other licenses.
11312 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
11313
11314(define-public python2-odfpy
11315 (package-with-python2 python-odfpy))
11316
11317(define-public python-natsort
11318 (package
11319 (name "python-natsort")
11320 (version "5.4.1")
11321 (source (origin
11322 (method url-fetch)
11323 (uri (pypi-uri "natsort" version))
11324 (sha256
11325 (base32
11326 "0i732amg6yzkx4g4c9j09jmqq39q377x9cl2nbkm5hax2c2v0wxf"))))
11327 (build-system python-build-system)
11328 (arguments
11329 `(#:modules ((guix build utils)
11330 (guix build python-build-system)
11331 (srfi srfi-1)
11332 (srfi srfi-26)
11333 (ice-9 ftw))
11334 #:phases
11335 (modify-phases %standard-phases
11336 (add-before 'check 'set-cachedir
11337 ;; Tests require write access to $HOME by default
11338 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
11339 (replace 'check
11340 (lambda _
11341 (let ((cwd (getcwd)))
11342 (setenv "PYTHONPATH"
11343 (string-append
11344 cwd "/build/"
11345 (find (cut string-prefix? "lib" <>)
11346 (scandir (string-append cwd "/build")))
11347 ":"
11348 (getenv "PYTHONPATH")))
11349 (invoke "pytest" "-v")))))))
11350 (native-inputs
11351 `(("python-hypothesis" ,python-hypothesis)
11352 ("python-pytest-cov" ,python-pytest-cov)
11353 ("python-pytest-mock" ,python-pytest-mock)
11354 ("python-pytest" ,python-pytest)))
11355 (propagated-inputs ; TODO: Add python-fastnumbers.
11356 `(("python-pyicu" ,python-pyicu)))
11357 (home-page "https://github.com/SethMMorton/natsort")
11358 (synopsis "Natural sorting for python and shell")
11359 (description
11360 "Natsort lets you apply natural sorting on lists instead of
11361lexicographical. If you use the built-in @code{sorted} method in python
36a4366d
EF
11362on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4},
11363@code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20},
11364@code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that
11365identifies numbers and sorts them separately from strings. It can also sort
11366version numbers, real numbers, mixed types and more, and comes with a shell
11367command @command{natsort} that exposes this functionality in the command line.")
44d10b1f
RW
11368 (license license:expat)
11369 (properties `((python2-variant . ,(delay python2-natsort))))))
11370
11371(define-public python2-natsort
11372 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
11373 (package (inherit base)
11374 (native-inputs
11375 `(("python2-pathlib" ,python2-pathlib)
11376 ,@(package-native-inputs base))))))
11377
11378(define-public python-glances
11379 (package
11380 (name "python-glances")
a4ac25df 11381 (version "3.1.2")
44d10b1f
RW
11382 (source
11383 (origin
11384 (method url-fetch)
11385 (uri (pypi-uri "Glances" version))
11386 (sha256
a4ac25df 11387 (base32 "15384pbvw9wj4sb8zgvd9v1812vrypbyjg0acicjf1hdb3p30fkk"))
15b4c911
TGR
11388 (modules '((guix build utils)))
11389 (snippet
11390 '(begin
11391 ;; Glances phones PyPI for weekly update checks by default.
11392 ;; Disable these. The user can re-enable them if desired.
11393 (substitute* "glances/outdated.py"
11394 (("^(.*)self\\.load_config\\(config\\)\n" line indentation)
11395 (string-append indentation
11396 "self.args.disable_check_update = True\n"
11397 line)))
11398 #t))))
44d10b1f
RW
11399 (build-system python-build-system)
11400 (propagated-inputs
9898a2d3
TGR
11401 `(("python-future" ,python-future)
11402 ("python-psutil" ,python-psutil)))
a4ac25df 11403 (home-page "https://github.com/nicolargo/glances")
bab94ffa 11404 (synopsis "Cross-platform curses-based monitoring tool")
44d10b1f
RW
11405 (description
11406 "Glances is a curses-based monitoring tool for a wide variety of platforms.
bab94ffa
TGR
11407Glances uses the PsUtil library to get information from your system. It
11408monitors CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
44d10b1f
RW
11409 (license license:lgpl3+)))
11410
11411(define-public python2-glances
11412 (package-with-python2 python-glances))
11413
11414(define-public python-graphql-core
11415 (package
11416 (name "python-graphql-core")
11417 (version "0.5.3")
11418 (source
11419 (origin
11420 (method url-fetch)
11421 (uri (pypi-uri "graphql-core" version))
11422 (sha256
11423 (base32
11424 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
11425 (build-system python-build-system)
11426 (arguments
11427 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
11428 #:phases
11429 (modify-phases %standard-phases
11430 (add-after 'unpack 'patch-hardcoded-version
11431 (lambda _ (substitute*
11432 "setup.py"
11433 (("'gevent==1.1rc1'") "'gevent'"))
11434 #t)))))
11435 (native-inputs
11436 `(("python-gevent" ,python-gevent)
11437 ("python-mock" ,python-mock)
11438 ("python-pytest-mock" ,python-pytest-mock)))
11439 (propagated-inputs
11440 `(("python-promise" ,python-promise)
11441 ("python-six" ,python-six)))
11442 (home-page "https://github.com/graphql-python/graphql-core")
11443 (synopsis "GraphQL implementation for Python")
11444 (description
11445 "GraphQL implementation for Python. GraphQL is a data query language and
11446runtime designed and used to request and deliver data to mobile and web apps.
11447This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
11448to Python.")
11449 (license license:expat)))
11450
11451(define-public python2-graphql-core
11452 (package-with-python2 python-graphql-core))
11453
11454(define-public python-graphql-relay
11455 (package
11456 (name "python-graphql-relay")
11457 (version "0.4.5")
11458 (source
11459 (origin
11460 (method url-fetch)
11461 (uri (pypi-uri "graphql-relay" version))
11462 (sha256
11463 (base32
11464 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
11465 (build-system python-build-system)
11466 (arguments
11467 '(#:tests? #f)) ; The tests are not distributed
11468 (propagated-inputs
11469 `(("python-graphql-core" ,python-graphql-core)
11470 ("python-promise" ,python-promise)
11471 ("python-six" ,python-six)))
11472 (home-page "https://github.com/graphql-python/graphql-relay-py")
11473 (synopsis "Relay implementation for Python")
11474 (description
11475 "This is a library to allow the easy creation of Relay-compliant servers
11476using the GraphQL Python reference implementation of a GraphQL server. It
11477should be noted that the code is a exact port of the original
11478@url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
11479from Facebook.")
11480 (license license:expat)))
11481
11482(define-public python2-graphql-relay
11483 (package-with-python2 python-graphql-relay))
11484
11485(define-public python-graphene
11486 (package
11487 (name "python-graphene")
11488 (version "0.10.2")
11489 (source
11490 (origin
11491 (method url-fetch)
11492 (uri (pypi-uri "graphene" version))
11493 (sha256
11494 (base32
11495 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
11496 (build-system python-build-system)
11497 (propagated-inputs
11498 `(("python-graphql-core" ,python-graphql-core)
11499 ("python-graphql-relay" ,python-graphql-relay)
11500 ("python-iso8601" ,python-iso8601)
11501 ("python-promise" ,python-promise)
11502 ("python-six" ,python-six)))
11503 (arguments
11504 `(#:tests? #f)) ; no tests/ in the PyPI tarball
11505 (home-page "http://graphene-python.org/")
11506 (synopsis "GraphQL Framework for Python")
11507 (description
11508 "Graphene is a Python library for building GraphQL schemas/types.
11509A GraphQL schema describes your data model, and provides a GraphQL server
11510with an associated set of resolve methods that know how to fetch data.")
11511 (properties `((python2-variant . ,(delay python2-graphene))))
11512 (license license:expat)))
11513
11514(define-public python2-graphene
11515 (let ((base (package-with-python2
11516 (strip-python2-variant python-graphene))))
11517 (package (inherit base)
11518 (native-inputs
11519 `(("python2-sqlalchemy" ,python2-sqlalchemy)
11520 ,@(package-native-inputs base))))))
11521
11522(define-public python-nautilus
11523 (package
11524 (name "python-nautilus")
11525 (version "0.4.9")
11526 (source
11527 (origin
11528 (method url-fetch)
11529 (uri (pypi-uri "nautilus" version))
11530 (sha256
11531 (base32
11532 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
11533 (build-system python-build-system)
11534 (arguments `(#:tests? #f)) ; fails to import test modules
11535 (propagated-inputs
11536 `(("python-bcrypt" ,python-bcrypt)
11537 ("python-click" ,python-click)
11538 ("python-consul" ,python-consul)
11539 ("python-graphene" ,python-graphene)
11540 ("python-jinja2" ,python-jinja2)
11541 ("python-peewee" ,python-peewee)
11542 ("python-pika" ,python-pika)
11543 ("python-tornado" ,python-tornado)
11544 ("python-wtforms" ,python-wtforms)))
11545 (native-inputs
11546 `(("python-nose2" ,python-nose2)))
11547 (home-page "https://github.com/AlecAivazis/nautilus")
11548 (synopsis "Library for creating microservice applications")
11549 (description
11550 "Nautilus is a framework for flux based microservices that looks to
11551provide extendible implementations of common aspects of a cloud so that you can
11552focus on building massively scalable web applications.")
11553 (license license:expat)))
11554
11555(define-public python-snowballstemmer
11556 (package
11557 (name "python-snowballstemmer")
11558 (version "1.2.1")
11559 (source (origin
11560 (method url-fetch)
11561 (uri (pypi-uri "snowballstemmer" version))
11562 (sha256
11563 (base32
11564 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
11565 (build-system python-build-system)
11566 (arguments
11567 `(;; No tests exist
11568 #:tests? #f))
11569 (home-page "https://github.com/shibukawa/snowball_py")
11570 (synopsis "Snowball stemming library collection for Python")
11571 (description "This package provides 16 word stemmer algorithms generated
11572from Snowball algorithms. It includes the 15 original ones plus the Poerter
11573English stemmer.")
11574 (license license:bsd-3)))
11575
11576(define-public python2-snowballstemmer
11577 (package-with-python2 python-snowballstemmer))
11578
44d10b1f
RW
11579(define-public python-setproctitle
11580(package
11581 (name "python-setproctitle")
11582 (version "1.1.10")
11583 (source
11584 (origin
11585 (method url-fetch)
11586 (uri (pypi-uri "setproctitle" version))
11587 (sha256
11588 (base32
11589 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
11590 (build-system python-build-system)
11591 (arguments
11592 '(#:phases
11593 (modify-phases %standard-phases
11594 (add-before 'check 'patch-Makefile
11595 ;; Stricly this is only required for the python2 variant.
11596 ;; But adding a phase in an inherited package seems to be
11597 ;; cumbersum. So we patch even for python3.
11598 (lambda _
11599 (let ((nose (assoc-ref %build-inputs "python2-nose")))
11600 (when nose
11601 (substitute* "Makefile"
11602 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
11603 (string-append nose "/bin/nosetests "))))
11604 #t)))
11605 (replace 'check
11606 (lambda _
11607 (setenv "PYTHON" (or (which "python3") (which "python")))
11608 (setenv "PYCONFIG" (or (which "python3-config")
11609 (which "python-config")))
11610 (setenv "CC" "gcc")
11611 ;; No need to extend PYTHONPATH to find the built package, since
11612 ;; the Makefile will build anyway
11613 (invoke "make" "check"))))))
11614 (native-inputs
11615 `(("procps" ,procps))) ; required for tests
11616 (home-page
11617 "https://github.com/dvarrazzo/py-setproctitle")
11618 (synopsis
11619 "Setproctitle implementation for Python to customize the process title")
11620 (description "The library allows a process to change its title (as displayed
11621by system tools such as ps and top).
11622
11623Changing the title is mostly useful in multi-process systems, for
11624example when a master process is forked: changing the children's title
11625allows to identify the task each process is busy with. The technique
11626is used by PostgreSQL and the OpenSSH Server for example.")
11627 (license license:bsd-3)
11628 (properties `((python2-variant . ,(delay python2-setproctitle))))))
11629
11630(define-public python2-setproctitle
11631 (let ((base (package-with-python2
11632 (strip-python2-variant python-setproctitle))))
11633 (package
11634 (inherit base)
11635 (native-inputs `(("python2-nose" ,python2-nose)
11636 ,@(package-native-inputs base))))))
11637
11638(define-public python-validictory
11639 (package
11640 (name "python-validictory")
11641 (version "1.0.1")
11642 (source
11643 (origin
11644 (method url-fetch)
11645 (uri (pypi-uri "validictory" version))
11646 (sha256
11647 (base32
11648 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
11649 (build-system python-build-system)
11650 (arguments
11651 '(#:phases
11652 (modify-phases %standard-phases
11653 (add-after 'unpack 'bootstrap
11654 ;; Move the tests out of the package directory to avoid
11655 ;; packaging them.
11656 (lambda* _
11657 (rename-file "validictory/tests" "tests")
11658 (delete-file "tests/__init__.py")))
11659 (replace 'check
11660 (lambda _
11661 ;; Extend PYTHONPATH so the built package will be found.
11662 (setenv "PYTHONPATH"
11663 (string-append (getcwd) "/build/lib:"
11664 (getenv "PYTHONPATH")))
6568bd5d 11665 (invoke "py.test" "-vv" ))))))
44d10b1f
RW
11666 (native-inputs
11667 `(("python-pytest" ,python-pytest)))
11668 (home-page
11669 "https://github.com/jamesturk/validictory")
11670 (synopsis "General purpose Python data validator")
11671 (description "It allows validation of arbitrary Python data structures.
11672
11673The schema format is based on the JSON Schema
11674proposal (http://json-schema.org), so combined with json the library is also
11675useful as a validator for JSON data.")
11676 (license license:expat)))
11677
11678(define-public python2-validictory
11679 (package-with-python2 python-validictory))
11680
11681(define-public python-pyelftools
11682 (package
11683 (name "python-pyelftools")
11684 (version "0.25")
11685 (source
11686 (origin
11687 (method url-fetch)
11688 (uri (pypi-uri "pyelftools" version))
11689 (sha256
11690 (base32
11691 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
11692 (build-system python-build-system)
11693 (arguments
11694 `(#:phases
11695 (modify-phases %standard-phases
11696 (add-before 'check 'set-pythonpath
11697 (lambda _
11698 (setenv "PYTHONPATH"
11699 (string-append
11700 (getcwd) "/test/"
11701 ":" (getenv "PYTHONPATH")))
11702 #t)))))
11703 (home-page
11704 "https://github.com/eliben/pyelftools")
11705 (synopsis
11706 "Analyze binary and library file information")
11707 (description "This Python library provides interfaces for parsing and
11708analyzing two binary and library file formats; the Executable and Linking
11709Format (ELF), and debugging information in the Debugging With Attributed
11710Record Format (DWARF).")
11711 (license license:public-domain)))
11712
11713(define-public python-pyev
11714 (package
11715 (name "python-pyev")
11716 (version "0.9.0")
11717 (source
11718 (origin
11719 (method url-fetch)
11720 (uri (pypi-uri "pyev" version))
11721 (sha256
11722 (base32
11723 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
11724 (build-system python-build-system)
11725 (arguments
11726 `(#:tests? #f ; no test suite
11727 #:phases
11728 (modify-phases %standard-phases
11729 (add-after 'unpack 'patch
11730 (lambda* (#:key inputs #:allow-other-keys)
11731 (let ((libev (string-append (assoc-ref inputs "libev")
11732 "/lib/libev.so.4")))
11733 (substitute* "setup.py"
11734 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
11735 (string-append "libev_dll_name = \"" libev "\"")))))))))
11736 (inputs
11737 `(("libev" ,libev)))
11738 (home-page "http://pythonhosted.org/pyev/")
11739 (synopsis "Python libev interface")
11740 (description "Pyev provides a Python interface to libev.")
11741 (license license:gpl3)))
11742
11743(define-public python2-pyev
11744 (package-with-python2 python-pyev))
11745
11746(define-public python-imagesize
11747 (package
11748 (name "python-imagesize")
11749 (version "1.1.0")
11750 (source
11751 (origin
11752 (method url-fetch)
11753 (uri (pypi-uri "imagesize" version))
11754 (sha256
11755 (base32
11756 "1dg3wn7qpwmhgqc0r9na2ding1wif9q5spz3j9zn2riwphc2k0zk"))))
11757 (build-system python-build-system)
11758 (home-page "https://github.com/shibukawa/imagesize_py")
11759 (synopsis "Gets image size of files in various formats in Python")
11760 (description
11761 "This package allows determination of image size from
11762PNG, JPEG, JPEG2000 and GIF files in pure Python.")
11763 (license license:expat)))
11764
11765(define-public python2-imagesize
11766 (package-with-python2 python-imagesize))
11767
11768(define-public python-termstyle
11769 (package
11770 (name "python-termstyle")
11771 (version "0.1.11")
11772 (source
11773 (origin
11774 (method url-fetch)
11775 (uri (pypi-uri "termstyle" version))
11776 (sha256
11777 (base32
11778 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
11779 (build-system python-build-system)
11780 (arguments
11781 '(#:phases
11782 (modify-phases %standard-phases
11783 (replace 'check
11784 (lambda _
831080a6 11785 (invoke "python" "test3.py"))))))
44d10b1f
RW
11786 (home-page "https://github.com/gfxmonk/termstyle")
11787 (synopsis "Console text coloring for Python")
11788 (description "This package provides console text coloring for Python.")
11789 (license license:bsd-3)))
11790
11791(define-public python-argcomplete
11792 (package
11793 (name "python-argcomplete")
98aecd3a 11794 (version "1.10.3")
44d10b1f 11795 (source
98aecd3a
RW
11796 (origin
11797 (method url-fetch)
11798 (uri (pypi-uri "argcomplete" version))
11799 (sha256
11800 (base32
11801 "02jkc44drb0yjz6x28lvg6rj607n8r2irdpdvyylm8xnycn54zx3"))))
44d10b1f 11802 (build-system python-build-system)
98aecd3a
RW
11803 (arguments
11804 `(#:phases
11805 (modify-phases %standard-phases
11806 (add-after 'unpack 'embed-tool-references
11807 (lambda _
11808 (substitute* "argcomplete/bash_completion.d/python-argcomplete.sh"
11809 ((" grep")
11810 (string-append " " (which "grep")))
11811 ((" egrep")
11812 (string-append " " (which "egrep")))
11813 (("elif which")
11814 (string-append "elif " (which "which")))
11815 (("\\$\\(which")
11816 (string-append "$(" (which "which"))))
11817 #t)))))
11818 (inputs
11819 `(("grep" ,grep)
11820 ("which" ,which)))
44d10b1f 11821 (native-inputs
98aecd3a
RW
11822 `(("python-coverage" ,python-coverage)
11823 ("python-flake8" ,python-flake8)
11824 ("python-pexpect" ,python-pexpect)
11825 ("python-wheel" ,python-wheel)
44d10b1f 11826 ("tcsh" ,tcsh)
98aecd3a
RW
11827 ("fish" ,fish)
11828 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
44d10b1f
RW
11829 (home-page "https://github.com/kislyuk/argcomplete")
11830 (synopsis "Shell tab completion for Python argparse")
11831 (description "argcomplete provides extensible command line tab completion
11832of arguments and options for Python scripts using @code{argparse}. It's
11833particularly useful for programs with many options or sub-parsers that can
11834dynamically suggest completions; for example, when browsing resources over the
11835network.")
11836 (license license:asl2.0)))
11837
11838(define-public python2-argcomplete
11839 (package-with-python2 python-argcomplete))
11840
11841(define-public python-xopen
11842 (package
11843 (name "python-xopen")
24d64989 11844 (version "0.5.0")
44d10b1f
RW
11845 (source
11846 (origin
11847 (method url-fetch)
11848 (uri (pypi-uri "xopen" version))
11849 (sha256
11850 (base32
24d64989 11851 "17xbrgi23l87yg6h0qcknssp2q812miiy33qw6v45v5gx0jwv5xh"))))
44d10b1f 11852 (build-system python-build-system)
24d64989
RW
11853 (propagated-inputs
11854 `(("python-setuptools-scm" ,python-setuptools-scm)))
44d10b1f
RW
11855 (home-page "https://github.com/marcelm/xopen/")
11856 (synopsis "Open compressed files transparently")
11857 (description "This module provides an @code{xopen} function that works like
11858Python's built-in @code{open} function, but can also deal with compressed files.
11859Supported compression formats are gzip, bzip2 and, xz, and are automatically
11860recognized by their file extensions. The focus is on being as efficient as
11861possible on all supported Python versions.")
11862 (license license:expat)))
11863
11864(define-public python2-xopen
11865 (let ((base (package-with-python2
11866 (strip-python2-variant python-xopen))))
11867 (package
11868 (inherit base)
11869 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
11870 ,@(package-propagated-inputs base))))))
11871
11872(define-public python-cheetah
11873 (package
11874 (name "python-cheetah")
11875 (version "3.1.0")
11876 (source
11877 (origin
11878 (method url-fetch)
11879 (uri (pypi-uri "Cheetah3" version))
11880 (sha256
11881 (base32
11882 "1ihag9cxll6b86fc8v5lkhmr3brdbi4yiz16zpgw79yylmv8fgr9"))))
11883 (build-system python-build-system)
11884 (arguments
11885 `(#:modules ((guix build utils)
11886 (guix build python-build-system)
11887 (ice-9 ftw)
11888 (srfi srfi-1)
11889 (srfi srfi-26))
11890 #:phases (modify-phases %standard-phases
11891 (add-after 'unpack 'use-absolute-python
11892 (lambda _
11893 (substitute* "Cheetah/CheetahWrapper.py"
11894 (("#!/usr/bin/env python")
11895 (string-append "#!" (which "python"))))
11896 #t))
11897 (replace 'check
11898 (lambda _
11899 (let ((cwd (getcwd)))
11900 (setenv "PYTHONPATH"
11901 (string-append
11902 cwd "/build/"
11903 (find (cut string-prefix? "lib" <>)
11904 (scandir (string-append cwd "/build")))
11905 ":" (getenv "PYTHONPATH")))
11906 (setenv "PATH"
11907 (string-append (getenv "PATH")
11908 ":" cwd "/bin"))
11909 (setenv "TMPDIR" "/tmp")
11910
11911 (substitute* "Cheetah/Tests/Test.py"
11912 (("unittest.TextTestRunner\\(\\)")
11913 "unittest.TextTestRunner(verbosity=2)"))
11914
11915 (invoke "python" "Cheetah/Tests/Test.py")))))))
11916 (propagated-inputs
11917 `(("python-markdown" ,python-markdown))) ;optional
11918 (home-page "http://cheetahtemplate.org/")
11919 (synopsis "Template engine")
11920 (description "Cheetah is a text-based template engine and Python code
11921generator.
11922
11923Cheetah can be used as a standalone templating utility or referenced as
11924a library from other Python applications. It has many potential uses,
11925but web developers looking for a viable alternative to ASP, JSP, PHP and
11926PSP are expected to be its principle user group.
11927
11928Features:
11929@enumerate
11930@item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
11931 text-based format.
11932@item Cleanly separates content, graphic design, and program code.
11933@item Blends the power and flexibility of Python with a simple template language
11934 that non-programmers can understand.
11935@item Gives template writers full access to any Python data structure, module,
11936 function, object, or method in their templates.
11937@item Makes code reuse easy by providing an object-orientated interface to
11938 templates that is accessible from Python code or other Cheetah templates.
11939 One template can subclass another and selectively reimplement sections of it.
11940@item Provides a simple, yet powerful, caching mechanism that can dramatically
11941 improve the performance of a dynamic website.
11942@item Compiles templates into optimized, yet readable, Python code.
11943@end enumerate")
11944 (license (license:x11-style "file://LICENSE"))))
11945
11946(define-public python2-cheetah
11947 (package-with-python2 python-cheetah))
11948
11949(define-public python-dulwich
11950 (package
11951 (name "python-dulwich")
11952 (version "0.18.6")
11953 (source
11954 (origin
11955 (method url-fetch)
11956 (uri (list (string-append "https://www.dulwich.io/releases/"
11957 "dulwich-" version ".tar.gz")
11958 (pypi-uri "dulwich" version)))
11959 (sha256
11960 (base32
11961 "1aa1xfrxkc3j9s4xi0llhf5gndyi9ryprcxsqfa5fcb8ph34981q"))))
11962 (build-system python-build-system)
11963 (arguments
11964 `(#:phases
11965 (modify-phases %standard-phases
11966 (add-before 'check 'fix-tests
11967 (lambda* (#:key inputs #:allow-other-keys)
11968 ;; The tests use Popen with a custom environment which doesn't
11969 ;; include PATH.
11970 (substitute* "dulwich/tests/compat/utils.py"
11971 (("'git'") (string-append "'"
11972 (which "git")
11973 "'")))
11974 (substitute* '("dulwich/tests/test_repository.py"
11975 "dulwich/tests/test_hooks.py")
11976 (("#!/bin/sh") (string-append "#!" (which "sh"))))
11977 (setenv "TEST_RUNNER" "unittest")
11978 (setenv "PYTHONHASHSEED" "random")
11979 #t)))))
11980 (propagated-inputs
11981 `(("python-fastimport" ,python-fastimport)))
11982 (native-inputs
11983 `(("python-mock" ,python-mock)
11984 ("python-geventhttpclient" ,python-geventhttpclient)
11985 ("git" ,git)))
11986 (home-page "https://www.dulwich.io/")
11987 (synopsis "Git implementation in Python")
11988 (description "Dulwich is an implementation of the Git file formats and
11989protocols written in pure Python.")
11990 ;; Can be used with either license.
11991 (license (list license:asl2.0 license:gpl2+))))
11992
11993(define-public python2-dulwich
11994 (package-with-python2 python-dulwich))
11995
11996(define-public python-pbkdf2
11997 (package
11998 (name "python-pbkdf2")
11999 (version "1.3")
12000 (source
12001 (origin
12002 (method url-fetch)
12003 (uri (pypi-uri "pbkdf2" version))
12004 (sha256
12005 (base32
12006 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
12007 (build-system python-build-system)
12008 (arguments
12009 '(#:phases
12010 (modify-phases %standard-phases
12011 (replace 'check
12012 (lambda _
12013 (setenv "PYTHONPATH"
12014 (string-append (getcwd) "/build/lib:"
12015 (getenv "PYTHONPATH")))
ee2bb944 12016 (invoke "python" "test/test_pbkdf2.py"))))))
44d10b1f
RW
12017 (propagated-inputs
12018 `(("python-pycrypto" ,python-pycrypto))) ; optional
12019 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
12020 (synopsis "Password-based key derivation")
12021 (description "This module implements the password-based key derivation
12022function, PBKDF2, specified in RSA PKCS#5 v2.0.
12023
12024PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
12025is part of the RSA Public Key Cryptography Standards series. The provided
12026implementation takes a password or a passphrase and a salt value (and
12027optionally a iteration count, a digest module, and a MAC module) and provides
12028a file-like object from which an arbitrarly-sized key can be read.")
12029 (license license:expat)))
12030
12031(define-public python2-pbkdf2
12032 (package-with-python2 python-pbkdf2))
12033
12034(define-public python-qrcode
12035 (package
12036 (name "python-qrcode")
217ea1a1 12037 (version "6.1")
44d10b1f
RW
12038 (source
12039 (origin
12040 (method url-fetch)
12041 (uri (pypi-uri "qrcode" version))
12042 (sha256
217ea1a1 12043 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
44d10b1f
RW
12044 (build-system python-build-system)
12045 (arguments
12046 ;; FIXME: Tests require packaging 'pymaging'.
12047 '(#:tests? #f))
12048 (propagated-inputs
12049 `(("python-lxml" ,python-lxml) ; for SVG output
12050 ("python-pillow" ,python-pillow) ; for PNG output
12051 ("python-six" ,python-six)))
44d10b1f
RW
12052 (home-page "https://github.com/lincolnloop/python-qrcode")
12053 (synopsis "QR Code image generator")
12054 (description "This package provides a pure Python QR Code generator
12055module. It uses the Python Imaging Library (PIL) to allow for the generation
12056of QR Codes.
12057
12058In addition this package provides a command line tool to generate QR codes and
12059either write these QR codes to a file or do the output as ascii art at the
12060console.")
12061 (license license:bsd-3)))
12062
12063(define-public python2-qrcode
12064 (package-with-python2 python-qrcode))
12065
12066(define-public python-rst2ansi
12067 (package
12068 (name "python-rst2ansi")
12069 (version "0.1.5")
12070 (source
12071 (origin
12072 (method url-fetch)
12073 (uri (pypi-uri "rst2ansi" version))
12074 (sha256
12075 (base32
12076 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
12077 (build-system python-build-system)
12078 (propagated-inputs
12079 `(("python-docutils" ,python-docutils)))
12080 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
12081 (synopsis "Convert RST to ANSI-decorated console output")
12082 (description
12083 "Python module dedicated to rendering RST (reStructuredText) documents
12084to ansi-escaped strings suitable for display in a terminal.")
12085 (license license:expat)))
12086
12087(define-public python-ansi2html
12088 (package
12089 (name "python-ansi2html")
12090 (version "1.2.0")
12091 (source
12092 (origin
12093 (method url-fetch)
12094 (uri (pypi-uri "ansi2html" version))
12095 (sha256
12096 (base32
12097 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
12098 (build-system python-build-system)
12099 (native-inputs
12100 `(("python-mock" ,python-mock)
12101 ("python-nose" ,python-nose)))
12102 (propagated-inputs
12103 `(("python-six" ,python-six)))
12104 (home-page "https://github.com/ralphbean/ansi2html")
12105 (synopsis "Convert ANSI-decorated console output to HTML")
12106 (description
12107 "@command{ansi2html} is a Python library and command line utility for
12108convering text with ANSI color codes to HTML or LaTeX.")
12109 (license license:gpl3+)))
12110
12111(define-public python2-ansi2html
12112 (package-with-python2 python-ansi2html))
12113
12114(define-public python-ddt
12115 (package
12116 (name "python-ddt")
12117 (version "1.1.3")
12118 (source
12119 (origin
12120 (method url-fetch)
12121 (uri (pypi-uri "ddt" version))
12122 (sha256
12123 (base32
12124 "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk"))))
12125 (build-system python-build-system)
12126 (native-inputs
12127 `(("python-mock" ,python-mock)
12128 ("python-nose" ,python-nose)))
12129 (propagated-inputs
12130 `(("python-six" ,python-six)
12131 ("python-pyyaml" ,python-pyyaml)))
12132 (home-page "https://github.com/txels/ddt")
12133 (synopsis "Data-Driven Tests")
12134 (description
12135 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
12136running it with different test data, and make it appear as multiple test
12137cases.")
12138 (license license:expat)))
12139
12140(define-public python2-ddt
12141 (package-with-python2 python-ddt))
12142
12143(define-public python-pycountry
12144 (package
12145 (name "python-pycountry")
12146 (version "18.5.26")
12147 (source
12148 (origin
12149 (method url-fetch)
12150 (uri (pypi-uri "pycountry" version))
12151 (sha256
12152 (base32
12153 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
12154 (build-system python-build-system)
12155 (home-page "https://bitbucket.org/flyingcircus/pycountry")
12156 (synopsis "ISO databases for languages, countries, currencies, etc.")
12157 (description
12158 "@code{pycountry} provides the ISO databases for the standards:
12159@enumerate
12160@item 639-3 (Languages)
12161@item 3166 (Countries)
12162@item 3166-3 (Deleted Countries)
12163@item 3166-2 (Subdivisions of countries)
12164@item 4217 (Currencies)
12165@item 15924 (Scripts)
12166@end enumerate
12167It includes a copy from Debian’s pkg-isocodes and makes the data accessible
12168through a Python API.")
12169 (license license:lgpl2.1+)))
12170
12171(define-public python2-pycountry
12172 (package-with-python2 python-pycountry))
12173
12174(define-public python-pycosat
12175 (package
12176 (name "python-pycosat")
12177 (version "0.6.1")
12178 (source
12179 (origin
12180 (method url-fetch)
12181 (uri (pypi-uri "pycosat" version))
12182 (sha256
12183 (base32
12184 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
12185 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
12186 (build-system python-build-system)
12187 (home-page "https://github.com/ContinuumIO/pycosat")
12188 (synopsis "Bindings to picosat (a SAT solver)")
12189 (description
12190 "This package provides efficient Python bindings to @code{picosat} on
12191the C level. When importing pycosat, the @code{picosat} solver becomes part
12192of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
12193Problem} (SAT) solver.")
12194 (license license:expat)))
12195
12196(define-public python2-pycosat
12197 (package-with-python2 python-pycosat))
12198
12199(define-public python2-ruamel.ordereddict
12200 (package
12201 (name "python2-ruamel.ordereddict")
12202 (version "0.4.9")
12203 (source
12204 (origin
12205 (method url-fetch)
12206 (uri (pypi-uri "ruamel.ordereddict" version))
12207 (sha256
12208 (base32
12209 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
12210 (build-system python-build-system)
12211 (arguments
12212 `(#:python ,python-2
12213 #:phases
12214 (modify-phases %standard-phases
12215 (delete 'check)
12216 (add-after 'install 'check
12217 (lambda* (#:key inputs outputs #:allow-other-keys)
12218 (add-installed-pythonpath inputs outputs)
f987ac30 12219 (invoke "python" "test/testordereddict.py"))))))
44d10b1f
RW
12220 (home-page "https://bitbucket.org/ruamel/ordereddict")
12221 (synopsis "Version of dict that keeps keys in insertion order")
12222 (description
12223 "This is an implementation of an ordered dictionary with @dfn{Key
12224Insertion Order} (KIO: updates of values do not affect the position of the
12225key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
12226removed and put at the back). The standard library module @code{OrderedDict},
12227implemented later, implements a subset of @code{ordereddict} functionality.
12228Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
12229Order} (KSO, no sorting function can be specified, but a transform can be
12230specified to apply on the key before comparison (e.g. @code{string.lower})).")
12231 (license license:expat)))
12232
12233(define-public python-pypeg2
12234 (package
12235 (name "python-pypeg2")
12236 (version "2.15.2")
12237 (source
12238 (origin
12239 (method url-fetch)
12240 (uri (pypi-uri "pyPEG2" version))
12241 (sha256
12242 (base32
12243 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
12244 (build-system python-build-system)
12245 (propagated-inputs `(("python-lxml" ,python-lxml)))
12246 (arguments
12247 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
12248 '(#:tests? #f))
12249 (home-page "https://fdik.org/pyPEG/")
12250 (synopsis "Parsering Expression Grammars in Python")
12251 (description "PyPEG is an intrinsic parser interpreter framework for
12252Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
12253parse many formal languages.")
12254 (license license:gpl2)))
12255
12256(define-public python-incremental
12257 (package
12258 (name "python-incremental")
12259 (version "17.5.0")
12260 (source
12261 (origin
12262 (method url-fetch)
12263 (uri (pypi-uri "incremental" version))
12264 (sha256
12265 (base32
12266 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
12267 (build-system python-build-system)
12268 (home-page "https://github.com/hawkowl/incremental")
12269 (synopsis "Library for versioning Python projects")
12270 (description "Incremental is a small library that versions your Python
12271projects.")
12272 (license license:expat)))
12273
12274(define-public python2-incremental
12275 (package-with-python2 python-incremental))
12276
12277(define-public python-invoke
12278 (package
12279 (name "python-invoke")
12280 (home-page "http://www.pyinvoke.org/")
a5662319 12281 (version "1.3.0")
44d10b1f
RW
12282 (source (origin
12283 (method url-fetch)
12284 (uri (pypi-uri "invoke" version))
12285 (sha256
12286 (base32
a5662319 12287 "1nn7gad0rvy492acpyhkrp01zsk86acf34qhsvq4xmm6x39788n5"))))
44d10b1f
RW
12288 (build-system python-build-system)
12289 (arguments
12290 ;; XXX: Requires many dependencies that are not yet in Guix.
12291 `(#:tests? #f))
12292 (synopsis "Pythonic task execution")
12293 (description
12294 "Invoke is a Python task execution tool and library, drawing inspiration
12295from various sources to arrive at a powerful and clean feature set. It is
12296evolved from the Fabric project, but focuses on local and abstract concerns
12297instead of servers and network commands.")
12298 (license license:bsd-3)))
12299
12300(define-public python2-invoke
12301 (package-with-python2 python-invoke))
12302
12303(define-public python-automat
12304 (package
12305 (name "python-automat")
919d80a0 12306 (version "0.7.0")
44d10b1f
RW
12307 (source (origin
12308 (method url-fetch)
12309 (uri (pypi-uri "Automat" version))
12310 (sha256
12311 (base32
919d80a0 12312 "03ivg70n3b1cbcd2zvjhk8y4kmqxcvhmili39lmgx09dza1qpmyb"))))
44d10b1f
RW
12313 (build-system python-build-system)
12314 ;; We disable the tests because they require python-twisted, while
12315 ;; python-twisted depends on python-automat. Twisted is optional, but the
12316 ;; tests fail if it is not available. Also see
12317 ;; <https://github.com/glyph/automat/issues/71>.
12318 (arguments '(#:tests? #f))
12319 (native-inputs
12320 `(("python-m2r" ,python-m2r)
12321 ("python-setuptools-scm" ,python-setuptools-scm)
12322 ("python-graphviz" ,python-graphviz)))
12323 (propagated-inputs
12324 `(("python-six" ,python-six)
12325 ("python-attrs" ,python-attrs)))
12326 (home-page "https://github.com/glyph/Automat")
12327 (synopsis "Self-service finite-state machines")
12328 (description "Automat is a library for concise, idiomatic Python
12329expression of finite-state automata (particularly deterministic finite-state
12330transducers).")
12331 (license license:expat)))
12332
12333(define-public python2-automat
12334 (package-with-python2 python-automat))
12335
12336(define-public python-m2r
12337 (package
12338 (name "python-m2r")
bcfb8fac 12339 (version "0.2.1")
44d10b1f
RW
12340 (source (origin
12341 (method url-fetch)
12342 (uri (pypi-uri "m2r" version))
12343 (sha256
12344 (base32
bcfb8fac 12345 "16gdm8i06jjmlpvckpfmlkr4693dh0vs192vgsqn84fsdkbbm45z"))))
44d10b1f
RW
12346 (build-system python-build-system)
12347 (propagated-inputs
12348 `(("python-docutils" ,python-docutils)
12349 ("python-mistune" ,python-mistune)))
12350 (native-inputs
12351 `(("python-pygments" ,python-pygments)
12352 ("python-mock" ,python-mock)))
12353 (home-page "https://github.com/miyakogi/m2r")
12354 (synopsis "Markdown to reStructuredText converter")
12355 (description "M2R converts a markdown file including reST markups to valid
12356reST format.")
12357 (license license:expat)))
12358
12359(define-public python2-m2r
12360 (package-with-python2 python-m2r))
12361
12362(define-public python-constantly
12363 (package
12364 (name "python-constantly")
12365 (version "15.1.0")
12366 (source (origin
12367 (method url-fetch)
12368 (uri (pypi-uri "constantly" version))
12369 (sha256
12370 (base32
12371 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
12372 (build-system python-build-system)
12373 (home-page "https://github.com/twisted/constantly")
12374 (synopsis "Symbolic constants in Python")
12375 (description "Constantly is a Python library that provides symbolic
12376constant support. It includes collections and constants with text, numeric,
12377and bit flag values.")
12378 (license license:expat)))
12379
12380(define-public python2-constantly
12381 (package-with-python2 python-constantly))
12382
12383(define-public python-attrs
12384 (package
12385 (name "python-attrs")
c41d5144 12386 (version "19.1.0")
44d10b1f
RW
12387 (source (origin
12388 (method url-fetch)
12389 (uri (pypi-uri "attrs" version))
12390 (sha256
12391 (base32
c41d5144 12392 "16g33zr5f449lqc5wgvzpknxryfzrfsxcr6kpgxwn7l5fkv71f7h"))))
44d10b1f
RW
12393 (build-system python-build-system)
12394 (arguments
12395 `(#:modules ((guix build utils)
12396 (guix build python-build-system)
12397 (ice-9 ftw)
12398 (srfi srfi-1)
12399 (srfi srfi-26))
12400 #:phases (modify-phases %standard-phases
12401 (replace 'check
12402 (lambda _
12403 (let ((cwd (getcwd)))
12404 (setenv "PYTHONPATH"
12405 (string-append
12406 cwd "/build/"
12407 (find (cut string-prefix? "lib" <>)
12408 (scandir (string-append cwd "/build")))
12409 ":"
12410 (getenv "PYTHONPATH")))
12411 (invoke "python" "-m" "pytest")))))))
12412 (native-inputs
12413 `(("python-coverage" ,python-coverage)
12414 ("python-hypothesis" ,python-hypothesis)
12415 ("python-pympler" ,python-pympler)
12416 ("python-pytest" ,python-pytest)
12417 ("python-six" ,python-six)
12418 ("python-sphinx" ,python-sphinx)
12419 ("python-zope-interface" ,python-zope-interface)))
12420 (home-page "https://github.com/python-attrs/attrs/")
12421 (synopsis "Attributes without boilerplate")
12422 (description "@code{attrs} is a Python package with class decorators that
12423ease the chores of implementing the most common attribute-related object
12424protocols.")
12425 (license license:expat)))
12426
12427(define-public python2-attrs
12428 (package-with-python2 python-attrs))
12429
12430(define-public python-attrs-bootstrap
12431 (package
12432 (inherit python-attrs)
12433 (name "python-attrs-bootstrap")
44d10b1f
RW
12434 (native-inputs `())
12435 (arguments `(#:tests? #f))))
12436
12437(define-public python2-attrs-bootstrap
12438 (package-with-python2 python-attrs-bootstrap))
12439
12440(define-public python2-cliapp
12441 (package
12442 (name "python2-cliapp")
9064b84e 12443 (version "1.20180812.1")
44d10b1f
RW
12444 (source
12445 (origin
12446 (method url-fetch)
12447 (uri (string-append
12448 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
12449 version ".tar.gz"))
12450 (sha256
12451 (base32
9064b84e 12452 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
44d10b1f
RW
12453 (build-system python-build-system)
12454 (arguments
12455 `(#:python ,python-2
12456 #:phases
12457 (modify-phases %standard-phases
12458 ;; check phase needs to be run before the build phase. If not,
12459 ;; coverage-test-runner looks for tests for the built source files,
12460 ;; and fails.
12461 (delete 'check)
12462 (add-before 'build 'check
12463 (lambda _
12464 ;; Disable python3 tests
12465 (substitute* "check"
12466 (("python3") "# python3"))
6c826d32 12467 (invoke "./check"))))))
44d10b1f
RW
12468 (native-inputs
12469 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
12470 ("python2-pep8" ,python2-pep8)))
12471 (propagated-inputs
12472 `(("python2-pyaml" ,python2-pyaml)))
12473 (home-page "https://liw.fi/cliapp/")
12474 (synopsis "Python framework for command line programs")
12475 (description "@code{python2-cliapp} is a python framework for
12476command line programs. It contains the typical stuff such programs
12477need to do, such as parsing the command line for options, and
12478iterating over input files.")
12479 (license license:gpl2+)))
12480
12481(define-public python2-ttystatus
12482 (package
12483 (name "python2-ttystatus")
e516a9c2 12484 (version "0.36")
44d10b1f
RW
12485 (source
12486 (origin
12487 (method url-fetch)
12488 (uri (string-append
12489 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
12490 version ".tar.gz"))
12491 (sha256
12492 (base32
e516a9c2 12493 "06mdk4d19zw2j3is54gndhzl396g3xc8k52m7i86z69s9hcz71by"))))
44d10b1f
RW
12494 (build-system python-build-system)
12495 (native-inputs
12496 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
12497 ("python2-pep8" ,python2-pep8)))
12498 (arguments
12499 `(#:python ,python-2
12500 #:phases
12501 (modify-phases %standard-phases
12502 ;; check phase needs to be run before the build phase. If not,
12503 ;; coverage-test-runner looks for tests for the built source files,
12504 ;; and fails.
12505 (delete 'check)
12506 (add-before 'build 'check
cbeee881 12507 (lambda _ (invoke "make" "check"))))))
44d10b1f
RW
12508 (home-page "https://liw.fi/ttystatus/")
12509 (synopsis "Python library for showing progress reporting and
12510status updates on terminals")
12511 (description "@code{python2-ttystatus} is a python library for
12512showing progress reporting and status updates on terminals, for
12513command line programs. Output is automatically adapted to the width
12514of the terminal: truncated if it does not fit, and resized if the
12515terminal size changes.")
12516 (license license:gpl3+)))
12517
12518(define-public python2-tracing
12519 (package
12520 (name "python2-tracing")
12521 (version "0.10")
12522 (source
12523 (origin
12524 (method url-fetch)
12525 (uri (string-append
12526 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
12527 version ".tar.gz"))
12528 (sha256
12529 (base32
12530 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
12531 (build-system python-build-system)
12532 (arguments
12533 `(#:python ,python-2))
12534 (home-page "https://liw.fi/tracing/")
12535 (synopsis "Python debug logging helper")
12536 (description "@code{python2-tracing} is a python library for
12537logging debug messages. It provides a way to turn debugging messages
12538on and off, based on the filename they occur in. It is much faster
12539than using @code{logging.Filter} to accomplish the same thing, which
12540matters when code is run in production mode. The actual logging still
12541happens using the @code{logging} library.")
12542 (license license:gpl3+)))
12543
12544(define-public python2-larch
12545 (package
12546 (name "python2-larch")
12547 (version "1.20151025")
12548 (source
12549 (origin
12550 (method url-fetch)
12551 (uri (string-append
12552 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
12553 version ".tar.gz"))
12554 (patches (search-patches
12555 "python2-larch-coverage-4.0a6-compatibility.patch"))
12556 (sha256
12557 (base32
12558 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
12559 (build-system python-build-system)
12560 (arguments
12561 `(#:python ,python-2
12562 #:phases
12563 (modify-phases %standard-phases
12564 ;; check phase needs to be run before the build phase. If not,
12565 ;; coverage-test-runner looks for tests for the built source files,
12566 ;; and fails.
12567 (delete 'check)
12568 (add-before 'build 'check
204ad455 12569 (lambda _ (invoke "make" "check"))))))
44d10b1f
RW
12570 (native-inputs
12571 `(("cmdtest" ,cmdtest)
12572 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
12573 (propagated-inputs
12574 `(("python2-tracing" ,python2-tracing)))
12575 (home-page "https://liw.fi/larch/")
12576 (synopsis "Python copy-on-write B-tree library")
12577 (description "@code{python2-larch} is an implementation of
12578particular kind of B-tree, based on research by Ohad Rodeh. See
12579@url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
12580on the data structure.
12581
12582The distinctive feature of this B-tree is that a node is never
12583(conceptually) modified. Instead, all updates are done by
12584copy-on-write. This makes it easy to clone a tree, and modify only the
12585clone, while other processes access the original tree.")
12586 (license license:gpl3+)))
12587
12588(define-public python-astroid
12589 (package
12590 (name "python-astroid")
1c43c698 12591 (version "2.3.3")
44d10b1f
RW
12592 (source
12593 (origin
12594 (method url-fetch)
12595 (uri (pypi-uri "astroid" version))
12596 (sha256
1c43c698 12597 (base32 "0fnibsl2cb5mvzbfm7sycj85smx48f8w8m7ks1sqlmpr9ps0gski"))))
44d10b1f
RW
12598 (build-system python-build-system)
12599 (propagated-inputs
12600 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
12601 ("python-six" ,python-six)
f0935460 12602 ("python-typed-ast" ,python-typed-ast)
44d10b1f
RW
12603 ("python-wrapt" ,python-wrapt)))
12604 (native-inputs
12605 `(("python-dateutil" ,python-dateutil)
12606 ("python-nose" ,python-nose)
12607 ("python-pytest" ,python-pytest)
12608 ("python-pytest-runner" ,python-pytest-runner)))
12609 (arguments
12610 `(#:phases
12611 (modify-phases %standard-phases
12612 (add-after 'unpack 'remove-spurious-test
12613 (lambda _
12614 ;; This can be removed after upgrading from python-3.7
12615 ;; https://github.com/PyCQA/astroid/issues/593
12616 ;; https://bugs.python.org/issue34056
12617 (delete-file "astroid/tests/unittest_modutils.py")
12618 #t))
12619 (replace 'check
12620 (lambda _
12621 (invoke "pytest" "astroid"))))))
12622 (home-page "https://github.com/PyCQA/astroid")
12623 (synopsis "Common base representation of python source code for pylint and
12624other projects")
12625 (description "@code{python-astroid} provides a common base representation
12626of python source code for projects such as pychecker, pyreverse, pylint, etc.
12627
12628It provides a compatible representation which comes from the _ast module. It
12629rebuilds the tree generated by the builtin _ast module by recursively walking
12630down the AST and building an extended ast. The new node classes have
12631additional methods and attributes for different usages. They include some
12632support for static inference and local name scopes. Furthermore, astroid
12633builds partial trees by inspecting living objects.")
12634 (license license:lgpl2.1+)
12635 (properties `((python2-variant . ,(delay python2-astroid))))))
12636
12637(define-public python2-astroid
12638 (let ((base (package-with-python2
12639 (strip-python2-variant python-astroid))))
12640 (package (inherit base)
12641 ;; Version 2.x removes python2 support.
12642 (version "1.6.5")
12643 (source
12644 (origin
12645 (method url-fetch)
12646 (uri (pypi-uri "astroid" version))
12647 (sha256
12648 (base32
12649 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
12650 (arguments
12651 (substitute-keyword-arguments (package-arguments base)
12652 ((#:phases phases)
12653 `(modify-phases ,phases
12654 (add-after 'unpack 'remove-spurious-test
12655 (lambda _
12656 ;; https://github.com/PyCQA/astroid/issues/276
12657 (delete-file "astroid/tests/unittest_brain.py")
12658 #t))
12659 (replace 'check
12660 (lambda _
12661 (invoke"python" "-m" "unittest" "discover"
12662 "-p" "unittest*.py")))))))
12663 (native-inputs `())
12664 (propagated-inputs
12665 `(("python2-backports-functools-lru-cache"
12666 ,python2-backports-functools-lru-cache)
12667 ("python2-enum34" ,python2-enum34)
12668 ("python2-singledispatch" ,python2-singledispatch)
741f98b3
MO
12669 ,@(alist-delete "python-typed-ast"
12670 (package-propagated-inputs base)))))))
44d10b1f
RW
12671
12672(define-public python-isort
12673 (package
12674 (name "python-isort")
e2227b6a 12675 (version "4.3.4")
44d10b1f
RW
12676 (source
12677 (origin
e2227b6a
EF
12678 (method git-fetch)
12679 (uri (git-reference
12680 ;; Tests pass only from the Github sources
12681 (url "https://github.com/timothycrosley/isort")
12682 (commit version)))
12683 (file-name (git-file-name name version))
44d10b1f
RW
12684 (sha256
12685 (base32
e2227b6a 12686 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
44d10b1f
RW
12687 (build-system python-build-system)
12688 (native-inputs
12689 `(("python-mock" ,python-mock)
12690 ("python-pytest" ,python-pytest)))
12691 (home-page "https://github.com/timothycrosley/isort")
12692 (synopsis "Python utility/library to sort python imports")
12693 (description "@code{python-isort} is a python utility/library to sort
12694imports alphabetically, and automatically separated into sections. It
12695provides a command line utility, a python library and plugins for various
12696editors.")
e2227b6a
EF
12697 (license license:expat)
12698 (properties `((python2-variant . ,(delay python2-isort))))))
44d10b1f
RW
12699
12700(define-public python2-isort
e2227b6a
EF
12701 (let ((base (package-with-python2
12702 (strip-python2-variant python-isort))))
12703 (package (inherit base)
12704 (native-inputs
12705 `(("python2-futures" ,python2-futures)
12706 ,@(package-native-inputs base))))))
44d10b1f
RW
12707
12708(define-public python2-backports-functools-lru-cache
12709 (package
12710 (name "python2-backports-functools-lru-cache")
12711 (version "1.5")
12712 (source
12713 (origin
12714 (method url-fetch)
12715 ;; only the pypi tarballs contain the necessary metadata
12716 (uri (pypi-uri "backports.functools_lru_cache" version))
12717 (sha256
12718 (base32
12719 "06jgv8gib4fhky0p5cmxdghvsgjyzcdgk48k8pxb1ccf11znk64x"))))
12720 (build-system python-build-system)
12721 (native-inputs
12722 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
12723 (arguments
12724 `(#:python ,python-2))
12725 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
12726 (synopsis "Backport of functools.lru_cache from Python 3.3")
12727 (description "@code{python2-backports-functools-lru-cache} is a backport
12728of @code{functools.lru_cache} from python 3.3.")
12729 (license license:expat)))
12730
12731(define-public python-configparser
12732 (package
12733 (name "python-configparser")
84127f8c 12734 (version "3.7.1")
44d10b1f
RW
12735 (source
12736 (origin
12737 (method url-fetch)
84127f8c 12738 (uri (pypi-uri "configparser" version))
44d10b1f
RW
12739 (sha256
12740 (base32
84127f8c 12741 "0cnz213il9lhgda6x70fw7mfqr8da43s3wm343lwzhqx94mgmmav"))))
44d10b1f 12742 (build-system python-build-system)
809f003f 12743 (home-page "https://github.com/jaraco/configparser/")
44d10b1f
RW
12744 (synopsis "Backport of configparser from python 3.5")
12745 (description "@code{python-configparser} is a backport of
12746@code{configparser} from Python 3.5 so that it can be used directly
12747in other versions.")
12748 (license license:expat)))
12749
12750(define-public python2-configparser
12751 (package-with-python2 python-configparser))
12752
12753(define-public python-mando
12754 (package
12755 (name "python-mando")
12756 (version "0.6.4")
12757 (source (origin
12758 (method url-fetch)
12759 (uri (pypi-uri "mando" version))
12760 (sha256
12761 (base32
12762 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
12763 (build-system python-build-system)
12764 (propagated-inputs
12765 `(("python-rst2ansi" ,python-rst2ansi)
12766 ("python-six" ,python-six)))
12767 (native-inputs
12768 `(("python-pytest" ,python-pytest)))
12769 (home-page "https://mando.readthedocs.org/")
12770 (synopsis
12771 "Wrapper around argparse, allowing creation of complete CLI applications")
12772 (description
12773 "This package is a wrapper around argparse, allowing you to write complete CLI
12774applications in seconds while maintaining all the flexibility.")
12775 (license license:expat)))
12776
12777(define-public python2-mando
12778 (package-with-python2 python-mando))
12779
70daf82f
RW
12780(define-public python2-argparse
12781 (package
12782 (name "python2-argparse")
12783 (version "1.4.0")
12784 (source
12785 (origin
12786 (method url-fetch)
12787 (uri (pypi-uri "argparse" version))
12788 (sha256
12789 (base32
12790 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
12791 (build-system python-build-system)
12792 (arguments
12793 `(#:python ,python-2))
12794 (home-page "https://github.com/ThomasWaldmann/argparse/")
12795 (synopsis "Python command-line parsing library")
12796 (description
12797 "This package is mostly for people who want to have @code{argparse} on
12798older Pythons because it was not part of the standard library back then.")
12799 (license license:psfl)))
12800
44d10b1f
RW
12801(define-public python-fudge
12802 (package
12803 (name "python-fudge")
12804 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
12805 ;; package, which is currently the only use of this package.
12806 (version "0.9.6")
12807 (source
12808 (origin
12809 (method url-fetch)
12810 (uri (pypi-uri "fudge" version))
12811 (sha256
12812 (base32
12813 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
12814 (build-system python-build-system)
12815 (arguments
12816 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
12817 (home-page "https://github.com/fudge-py/fudge")
12818 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
12819 (description
12820 "Fudge is a Python module for using fake objects (mocks and stubs) to
12821test real ones.
12822
12823In readable Python code, you declare the methods available on your fake object
12824and how they should be called. Then you inject that into your application and
12825start testing. This declarative approach means you don’t have to record and
12826playback actions and you don’t have to inspect your fakes after running code.
12827If the fake object was used incorrectly then you’ll see an informative
12828exception message with a traceback that points to the culprit.")
12829 (license license:expat)))
12830
12831(define-public python2-fudge
12832 (package-with-python2 python-fudge))
12833
12834(define-public python-mwclient
12835 (package
12836 (name "python-mwclient")
957c6833 12837 (version "0.10.0")
44d10b1f
RW
12838 (source
12839 (origin
957c6833 12840 (method git-fetch)
44d10b1f 12841 ;; The PyPI version wouldn't contain tests.
957c6833
EF
12842 (uri (git-reference
12843 (url "https://github.com/mwclient/mwclient")
12844 (commit (string-append "v" version))))
12845 (file-name (git-file-name name version))
44d10b1f
RW
12846 (sha256
12847 (base32
957c6833 12848 "1c3q6lwmb05yqywc4ya98ca7hsl15niili8rccl4n1yqp77c103v"))))
44d10b1f
RW
12849 (build-system python-build-system)
12850 (propagated-inputs
957c6833 12851 `(("python-requests-oauthlib" ,python-requests-oauthlib)
44d10b1f
RW
12852 ("python-six" ,python-six)))
12853 (native-inputs
12854 `(("python-mock" ,python-mock)
12855 ("python-pytest" ,python-pytest)
44d10b1f 12856 ("python-pytest-cov" ,python-pytest-cov)
957c6833 12857 ("python-pytest-runner" ,python-pytest-runner)
44d10b1f
RW
12858 ("python-responses" ,python-responses)))
12859 (home-page "https://github.com/btongminh/mwclient")
12860 (synopsis "MediaWiki API client")
12861 (description "This package provides a MediaWiki API client.")
12862 (license license:expat)))
12863
12864(define-public python2-mwclient
12865 (package-with-python2 python-mwclient))
12866
12867(define-public python-utils
12868 (package
12869 (name "python-utils")
12870 (version "2.1.0")
12871 (source (origin
12872 (method url-fetch)
12873 (uri (pypi-uri "python-utils" version))
12874 (sha256
12875 (base32
12876 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
12877 (build-system python-build-system)
12878 (native-inputs
12879 `(("pytest-runner" ,python-pytest-runner)
12880 ("pytest" ,python-pytest)
12881 ("six" ,python-six)))
12882 (home-page "https://github.com/WoLpH/python-utils")
12883 (synopsis "Convenient utilities not included with the standard Python install")
12884 (description
12885 "Python Utils is a collection of small Python functions and classes which
12886make common patterns shorter and easier.")
12887 (license license:bsd-2)))
12888
12889(define-public python2-utils
12890 (package-with-python2 python-utils))
12891
44d10b1f
RW
12892(define-public python-diff-match-patch
12893 (package
12894 (name "python-diff-match-patch")
12895 (version "20121119")
12896 (source
12897 (origin
12898 (method url-fetch)
12899 (uri (pypi-uri "diff-match-patch" version))
12900 (sha256
12901 (base32
12902 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
12903 (build-system python-build-system)
12904 (home-page "https://code.google.com/p/google-diff-match-patch")
12905 (synopsis "Synchronize plain text")
12906 (description "Diff Match and Patch libraries offer robust algorithms to
12907perform the operations required for synchronizing plain text.")
12908 (license license:asl2.0)))
12909
12910(define-public python2-diff-match-patch
12911 (package-with-python2 python-diff-match-patch))
12912
12913(define-public python-dirsync
12914 (package
12915 (name "python-dirsync")
12916 (version "2.2.3")
12917 (source
12918 (origin
12919 (method url-fetch)
12920 (uri (pypi-uri "dirsync" version))
12921 (sha256
12922 (base32
12923 "1r40fkanksagcszf1ag85mdr8w7rgc7196n6s1qlsk2abw6i7v0z"))))
12924 (build-system python-build-system)
12925 (propagated-inputs
12926 `(("six" ,python-six)))
12927 (home-page "https://bitbucket.org/tkhyn/dirsync")
12928 (synopsis "Advanced directory tree synchronisation tool")
12929 (description "Advanced directory tree synchronisation tool.")
12930 (license license:expat)))
12931
12932(define-public python2-dirsync
12933 (package-with-python2 python-dirsync))
12934
12935(define-public python-levenshtein
12936 (package
12937 (name "python-levenshtein")
12938 (version "0.12.0")
12939 (source
12940 (origin
12941 (method url-fetch)
12942 (uri (pypi-uri "python-Levenshtein" version))
12943 (sha256
12944 (base32
12945 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
12946 (build-system python-build-system)
12947 (home-page "https://github.com/ztane/python-Levenshtein")
12948 (synopsis "Fast computation of Levenshtein distance and string similarity")
12949 (description
12950 "The Levenshtein Python C extension module contains functions for fast computation of
12951@enumerate
12952@item Levenshtein (edit) distance, and edit operations
12953@item string similarity
12954@item approximate median strings, and generally string averaging
12955@item string sequence and set similarity
12956@end enumerate
12957It supports both normal and Unicode strings.")
12958 (license license:gpl2+)))
12959
12960(define-public python2-levenshtein
12961 (package-with-python2 python-levenshtein))
12962
12963(define-public python-scandir
12964 (package
12965 (name "python-scandir")
12966 (version "1.9.0")
12967 (source
12968 (origin
12969 (method url-fetch)
12970 (uri (pypi-uri "scandir" version))
12971 (sha256
12972 (base32 "0r3hvf1a9jm1rkqgx40gxkmccknkaiqjavs8lccgq9s8khh5x5s4"))))
12973 (build-system python-build-system)
12974 (arguments
12975 `(#:phases (modify-phases %standard-phases
12976 (replace 'check
12977 (lambda _
12978 (invoke "python" "test/run_tests.py"))))))
12979 (home-page "https://github.com/benhoyt/scandir")
12980 (synopsis "Directory iteration function")
12981 (description
12982 "Directory iteration function like os.listdir(), except that instead of
12983returning a list of bare filenames, it yields DirEntry objects that include
12984file type and stat information along with the name. Using scandir() increases
12985the speed of os.walk() by 2-20 times (depending on the platform and file
12986system) by avoiding unnecessary calls to os.stat() in most cases.
12987
12988This package is part of the Python standard library since version 3.5.")
12989 (license license:bsd-3)))
12990
12991(define-public python2-scandir
12992 (package-with-python2 python-scandir))
12993
12994(define-public python2-stemming
12995 (package
12996 (name "python2-stemming")
12997 (version "1.0.1")
12998 (source
12999 (origin
13000 (method url-fetch)
13001 (uri (pypi-uri "stemming" version))
13002 (sha256
13003 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
13004 (build-system python-build-system)
13005 (arguments
13006 `(#:python ,python-2))
13007 (home-page "https://bitbucket.org/mchaput/stemming/overview")
13008 (synopsis "Python implementations of various stemming algorithms")
13009 (description
13010 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
13011stemming algorithms for English. These implementations are straightforward and
13012efficient, unlike some Python versions of the same algorithms available on the
13013Web. This package is an extraction of the stemming code included in the Whoosh
13014search engine.")
13015 (license license:public-domain)))
13016
13017(define-public python-factory-boy
13018 (package
13019 (name "python-factory-boy")
13020 (version "2.8.1")
13021 (source
13022 (origin
13023 (method url-fetch)
13024 (uri (pypi-uri "factory_boy" version))
13025 (sha256
13026 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
13027 (build-system python-build-system)
13028 (arguments
13029 ;; Tests are not included in the tarball.
13030 `(#:tests? #f))
13031 (propagated-inputs
13032 `(("faker" ,python-faker)))
13033 (home-page "https://github.com/benhoyt/scandir")
13034 (synopsis "Versatile test fixtures replacement")
13035 (description
13036 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
13037
13038As a fixtures replacement tool, it aims to replace static, hard to maintain
13039fixtures with easy-to-use factories for complex object.
13040
13041Instead of building an exhaustive test setup with every possible combination
13042of corner cases, factory_boy allows you to use objects customized for the
13043current test, while only declaring the test-specific fields")
13044 (license license:expat)))
13045
13046(define-public python2-factory-boy
13047 (package-with-python2 python-factory-boy))
13048
13049(define-public python-translate-toolkit
13050 (package
13051 (name "python-translate-toolkit")
13052 (version "2.1.0")
13053 (source
13054 (origin
13055 (method url-fetch)
13056 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
13057 (sha256
13058 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
13059 (build-system python-build-system)
13060 (native-inputs
13061 `(("python-pytest" ,python-pytest)
13062 ("python-sphinx" ,python-sphinx)))
13063 (propagated-inputs
13064 `(("python-babel" ,python-babel)
13065 ("python-beautifulsoup4" ,python-beautifulsoup4)
13066 ("python-chardet" ,python-chardet)
13067 ("python-diff-match-patch" ,python-diff-match-patch)
13068 ("python-levenshtein" ,python-levenshtein)
13069 ("python-lxml" ,python-lxml)
13070 ("python-six" ,python-six)
13071 ("python-vobject" ,python-vobject)
13072 ("python-pyyaml" ,python-pyyaml)))
13073 (arguments
13074 ;; TODO: tests are not run, because they end with
13075 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
13076 ;; 'parse_funcs'
13077 ;; during test setup.
13078 `(#:tests? #f))
18919cf9 13079 (home-page "https://toolkit.translatehouse.org")
44d10b1f
RW
13080 (synopsis "Tools and API for translation and localization engineering")
13081 (description
13082 "Tools and API for translation and localization engineering. It contains
13083several utilities, as well as an API for building localization tools.")
13084 (license license:gpl2+)))
13085
13086(define-public python2-translate-toolkit
13087 (package-with-python2 python-translate-toolkit))
13088
13089(define-public python-packaging
13090 (package
13091 (name "python-packaging")
a72a1892 13092 (version "20.0")
44d10b1f
RW
13093 (source
13094 (origin
13095 (method url-fetch)
13096 (uri (pypi-uri "packaging" version))
20bf58bf
MB
13097 ;; XXX: The URL in the patch file is wrong, it should be
13098 ;; <https://github.com/pypa/packaging/pull/256>.
fdd0c369 13099 (patches (search-patches "python-packaging-test-arch.patch"))
44d10b1f
RW
13100 (sha256
13101 (base32
a72a1892 13102 "1y2ip3a4ykkpgnwgn85j6hkspcl0cg3mzms97f40mk57vwqq67gy"))))
44d10b1f
RW
13103 (build-system python-build-system)
13104 (arguments
13105 `(#:phases (modify-phases %standard-phases
13106 (replace 'check
13107 (lambda _ (invoke "py.test" "-vv"))))))
13108 (native-inputs
13109 `(("python-pretend" ,python-pretend)
13110 ("python-pytest" ,python-pytest)))
13111 (propagated-inputs
13112 `(("python-pyparsing" ,python-pyparsing)
13113 ("python-six" ,python-six)))
13114 (home-page "https://github.com/pypa/packaging")
13115 (synopsis "Core utilities for Python packages")
13116 (description "Packaging is a Python module for dealing with Python packages.
13117It offers an interface for working with package versions, names, and dependency
13118information.")
13119 ;; From 'LICENSE': This software is made available under the terms of
13120 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
13121 ;; Contributions to this software is made under the terms of *both* these
13122 ;; licenses.
13123 (license (list license:asl2.0 license:bsd-2))))
13124
13125(define-public python2-packaging
13126 (package-with-python2 python-packaging))
13127
13128(define-public python-relatorio
13129 (package
13130 (name "python-relatorio")
13131 (version "0.8.0")
13132 (source
13133 (origin
13134 (method url-fetch)
13135 (uri (pypi-uri "relatorio" version))
13136 (sha256
13137 (base32
13138 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
13139 (build-system python-build-system)
13140 (propagated-inputs
13141 `(("python-lxml" ,python-lxml)
13142 ("python-genshi" ,python-genshi)))
13143 (native-inputs
13144 `(("python-magic" ,python-magic)))
13145 (home-page "https://relatorio.tryton.org/")
13146 (synopsis "Templating library able to output ODT and PDF files")
13147 (description "Relatorio is a templating library which provides a way to
13148easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
13149for more filetypes can be easily added by creating plugins for them.")
13150 (license license:gpl3+)))
13151
13152(define-public python2-relatorio
13153 (package-with-python2 python-relatorio))
13154
13155(define-public python-radon
13156 (package
13157 (name "python-radon")
13158 (version "2.2.0")
13159 (source
13160 (origin
13161 (method url-fetch)
13162 (uri (pypi-uri "radon" version))
13163 (sha256
13164 (base32
13165 "07gq5hq4nrffxnlnksws9hrx7fd001gam63j62i82gyfr23gvdym"))))
13166 (build-system python-build-system)
13167 (arguments
13168 `(#:phases (modify-phases %standard-phases
13169 (replace 'check
13170 (lambda _
13171 (invoke "python" "radon/tests/run.py"))))))
13172 (propagated-inputs
13173 `(("python-colorama" ,python-colorama)
13174 ("python-flake8-polyfill" ,python-flake8-polyfill)
13175 ("python-mando" ,python-mando)))
13176 (native-inputs
13177 `(("python-pytest" ,python-pytest)
13178 ("python-pytest-mock" ,python-pytest-mock)))
13179 (home-page "https://radon.readthedocs.org/")
13180 (synopsis "Code Metrics in Python")
13181 (description "Radon is a Python tool which computes various code metrics.
13182Supported metrics are:
13183@itemize @bullet
13184@item raw metrics: SLOC, comment lines, blank lines, &c.
13185@item Cyclomatic Complexity (i.e. McCabe’s Complexity)
13186@item Halstead metrics (all of them)
13187@item the Maintainability Index (a Visual Studio metric)
13188@end itemize")
13189 (license license:expat)))
13190
13191(define-public python2-radon
13192 (package-with-python2 python-radon))
13193
13194(define-public python-sure
13195 (package
13196 (name "python-sure")
13197 (version "1.4.11")
13198 (source
13199 (origin
13200 (method url-fetch)
13201 (uri (pypi-uri "sure" version))
13202 (sha256
13203 (base32
13204 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
13205 (build-system python-build-system)
13206 (propagated-inputs
13207 `(("python-mock" ,python-mock)
13208 ("python-six" ,python-six)))
13209 (native-inputs
13210 `(("python-nose" ,python-nose)))
13211 (home-page "https://github.com/gabrielfalcao/sure")
13212 (synopsis "Automated testing library in python for python")
13213 (description
13214 "Sure is a python library that leverages a DSL for writing assertions.
13215Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
13216 (license license:gpl3+)))
13217
13218(define-public python2-sure
13219 (package-with-python2 python-sure))
13220
13221(define-public python2-couleur
13222 ;; This package does not seem to support python3 at all, hence,
13223 ;; only the python2 variant definition is provided.
13224 (package
13225 (name "python2-couleur")
13226 (version "0.6.2")
13227 (source
13228 (origin
13229 (method url-fetch)
13230 (uri (pypi-uri "couleur" version))
13231 (sha256
13232 (base32
13233 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
13234 (build-system python-build-system)
13235 (arguments
13236 `(#:python ,python-2))
13237 (home-page "https://github.com/gabrielfalcao/couleur")
13238 (synopsis
13239 "ANSI terminal tool for python, colored shell and other handy fancy features")
13240 (description
13241 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
13242terminal such as coloured output in the shell, overwriting output, indentation, etc.")
13243 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
13244 ;; https://github.com/gabrielfalcao/couleur/issues/11
13245 (license license:lgpl3+)))
13246
13247(define-public python-misaka
13248 (package
13249 (name "python-misaka")
0dcb3412 13250 (version "2.1.1")
44d10b1f
RW
13251 (source
13252 (origin
13253 (method url-fetch)
13254 (uri (pypi-uri "misaka" version))
13255 (sha256
13256 (base32
0dcb3412 13257 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
44d10b1f
RW
13258 (build-system python-build-system)
13259 (arguments
13260 `(;; Line 37 of setup.py calls self.run_command('develop')
13261 ;; in the 'check' phase. This command seems to be trying
13262 ;; to write to
13263 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
13264 ;; for which it does not have the permission to write.
13265 #:tests? #f))
13266 (propagated-inputs
13267 `(("python-cffi" ,python-cffi)))
13268 (home-page "https://github.com/FSX/misaka")
13269 (synopsis "Python binding for Hoedown")
13270 (description
13271 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
13272library written in C. It features a fast HTML renderer and functionality to make custom
13273renderers (e.g. man pages or LaTeX).")
13274 (license license:expat)))
13275
13276(define-public python2-misaka
13277 (package-with-python2 python-misaka))
13278
13279(define-public python2-steadymark
13280 ;; This is forced into being a python2 only variant
13281 ;; due to its dependence on couleur that has no support
13282 ;; for python3
13283 (package
13284 (name "python2-steadymark")
13285 (version "0.7.3")
13286 (source
13287 (origin
13288 (method url-fetch)
13289 (uri (pypi-uri "steadymark" version))
13290 (sha256
13291 (base32
13292 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
13293 (build-system python-build-system)
13294 (native-inputs
13295 `(("python-couleur" ,python2-couleur)
13296 ("python-sure" ,python2-sure)
13297 ("python-misaka" ,python2-misaka)))
13298 (arguments
13299 `(#:python ,python-2
13300 #:phases
13301 (modify-phases %standard-phases
13302 (add-before 'build 'patch-setup-py
13303 (lambda _
13304 ;; Update requirements from dependency==version
13305 ;; to dependency>=version
13306 (substitute* "setup.py"
13307 (("==") ">="))
13308 #t)))))
13309 (home-page "https://github.com/gabrielfalcao/steadymark")
13310 (synopsis "Markdown-based test runner for python")
13311 (description
13312 "@code{Steadymark} allows documentation to be written in github-flavoured
13313markdown. The documentation may contain snippets of code surrounded by python
13314code blocks and @code{Steadymark} will find these snippets and run them, making
13315sure that there are no old malfunctional examples in the documentation examples.")
13316 (license license:expat)))
13317
13318(define-public python-jsonpointer
13319 (package
13320 (name "python-jsonpointer")
13321 (version "1.10")
13322 (source
13323 (origin
13324 (method url-fetch)
13325 (uri (pypi-uri "jsonpointer" version))
13326 (sha256
13327 (base32
13328 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
13329 (build-system python-build-system)
13330 (home-page "https://github.com/stefankoegl/python-json-pointer")
13331 (synopsis "Identify specific nodes in a JSON document")
13332 (description "@code{jsonpointer} allows you to access specific nodes
13333by path in a JSON document (see RFC 6901).")
13334 (license license:bsd-3)))
13335
13336(define-public python2-jsonpointer
13337 (package-with-python2 python-jsonpointer))
13338
13339(define-public python-jsonpatch
13340 (package
13341 (name "python-jsonpatch")
13342 (version "1.16")
13343 (source
13344 (origin
854c5c95 13345 (method git-fetch)
44d10b1f 13346 ;; pypi version lacks tests.js
854c5c95
EF
13347 (uri (git-reference
13348 (url "https://github.com/stefankoegl/python-json-patch")
13349 (commit (string-append "v" version))))
13350 (file-name (git-file-name name version))
44d10b1f
RW
13351 (sha256
13352 (base32
854c5c95 13353 "0k9pff06lxama3nhsc7cdxbp83422bdy8ifs52i6xkas8hpyzfzr"))))
44d10b1f
RW
13354 (build-system python-build-system)
13355 (native-inputs
13356 `(("python-jsonpointer" ,python-jsonpointer)))
13357 (home-page "https://github.com/stefankoegl/python-json-patch")
13358 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
13359 (description "@code{jsonpatch} is a library and program that allows
13360applying JSON Patches according to RFC 6902.")
13361 (license license:bsd-3)))
13362
13363(define-public python2-jsonpatch
13364 (package-with-python2 python-jsonpatch))
13365
13366(define-public python-jsonpatch-0.4
13367 (package (inherit python-jsonpatch)
13368 (name "python-jsonpatch")
13369 (version "0.4")
13370 (source
13371 (origin
a9722d0d
EF
13372 (method git-fetch)
13373 (uri (git-reference
13374 (url "https://github.com/stefankoegl/python-json-patch")
13375 (commit (string-append "v" version))))
13376 (file-name (git-file-name name version))
44d10b1f
RW
13377 (sha256
13378 (base32
a9722d0d 13379 "1fq02y57kinyknxjcav0slcb0k9mwdffqw2hnlhdkpj7palh2mwk"))))))
44d10b1f
RW
13380
13381(define-public python2-jsonpatch-0.4
13382 (package-with-python2 python-jsonpatch-0.4))
13383
13384(define-public python-rfc3986
13385 (package
13386 (name "python-rfc3986")
13387 (version "1.1.0")
13388 (source (origin
13389 (method url-fetch)
13390 (uri (pypi-uri "rfc3986" version))
13391 (sha256
13392 (base32
13393 "06wlmysw83f75ff84zr1yr6n0shvc2xn1n1sb4iwzqap9hf5fn44"))))
13394 (build-system python-build-system)
13395 (arguments
13396 `(#:modules ((guix build utils)
13397 (guix build python-build-system)
13398 (ice-9 ftw)
13399 (srfi srfi-1)
13400 (srfi srfi-26))
13401 #:phases
13402 (modify-phases %standard-phases
13403 (replace 'check
13404 (lambda _
13405 (let ((cwd (getcwd)))
13406 (setenv "PYTHONPATH"
13407 (string-append cwd "/build/"
13408 (find (cut string-prefix? "lib" <>)
13409 (scandir (string-append cwd "/build")))
13410 ":"
13411 (getenv "PYTHONPATH")))
13412 (invoke "pytest" "-v")))))))
13413 (native-inputs
13414 `(("python-pytest" ,python-pytest)))
13415 (home-page "https://rfc3986.readthedocs.io/")
13416 (synopsis "Parse and validate URI references")
13417 (description
13418 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
13419validation and authority parsing. This module also supports RFC@tie{}6874
13420which adds support for zone identifiers to IPv6 addresses.")
13421 (license license:asl2.0)))
13422
13423(define-public python2-rfc3986
13424 (package-with-python2 python-rfc3986))
13425
13426(define-public python-rfc3987
13427 (package
13428 (name "python-rfc3987")
13429 (version "1.3.7")
13430 (source
13431 (origin
13432 (method url-fetch)
13433 (uri (pypi-uri "rfc3987" version))
13434 (sha256
13435 (base32
13436 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
13437 (build-system python-build-system)
13438 (home-page "https://pypi.python.org/pypi/rfc3987")
13439 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
13440 (description "@code{rfc3987} provides routines for parsing and
13441validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
13442 (license license:gpl3+)))
13443
13444(define-public python2-rfc3987
13445 (package-with-python2 python-rfc3987))
13446
13447(define-public python-validate-email
13448 (package
13449 (name "python-validate-email")
13450 (version "1.3")
13451 (source
13452 (origin
13453 (method url-fetch)
13454 (uri (pypi-uri "validate_email" version))
13455 (sha256
13456 (base32
13457 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
13458 (build-system python-build-system)
13459 (home-page "https://github.com/syrusakbary/validate_email")
13460 (synopsis "Verifies if an email address is valid and really exists")
13461 (description "@code{validate_email} can be used to verify if an email
13462address is valid and really exists.")
13463 (license license:lgpl3+)))
13464
13465(define-public python2-validate-email
13466 (package-with-python2 python-validate-email))
13467
13468(define-public python-flex
13469 (package
13470 (name "python-flex")
13471 (version "6.10.0")
13472 (source
13473 (origin
13474 (method url-fetch)
13475 (uri (pypi-uri "flex" version))
13476 (sha256
13477 (base32
13478 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
13479 (build-system python-build-system)
13480 (propagated-inputs
13481 `(("python-click" ,python-click)
13482 ("python-iso8601" ,python-iso8601)
13483 ("python-jsonpointer" ,python-jsonpointer)
13484 ("python-pyyaml" ,python-pyyaml)
13485 ("python-requests" ,python-requests)
13486 ("python-rfc3987" ,python-rfc3987)
13487 ("python-six" ,python-six)
13488 ("python-validate-email" ,python-validate-email)))
13489 (home-page "https://github.com/pipermerriam/flex")
13490 (synopsis "Validates Swagger schemata")
13491 (description "@code{flex} can be used to validate Swagger schemata.")
13492 (license license:bsd-3)))
13493
13494(define-public python2-flex
13495 (package-with-python2 python-flex))
13496
13497(define-public python-marshmallow
13498 (package
13499 (name "python-marshmallow")
13500 (version "3.0.0b14")
13501 (source
13502 (origin
13503 (method url-fetch)
13504 (uri (pypi-uri "marshmallow" version))
13505 (sha256
13506 (base32
13507 "1digk3f5cfk7wmlka65mc7bzsd96pbsgcsvp6pimd5b4ff9zb5p3"))))
13508 (build-system python-build-system)
13509 (propagated-inputs
13510 `(("python-dateutil" ,python-dateutil)
13511 ("python-simplejson" ,python-simplejson)))
13512 (native-inputs
13513 `(("python-pytest" ,python-pytest)
13514 ("python-pytz" ,python-pytz)))
13515 (home-page "https://github.com/marshmallow-code/marshmallow")
13516 (synopsis "Convert complex datatypes to and from native
13517Python datatypes.")
13518 (description "@code{marshmallow} provides a library for converting
13519complex datatypes to and from native Python datatypes.")
13520 (license license:expat)))
13521
13522(define-public python2-marshmallow
13523 (package-with-python2 python-marshmallow))
13524
13525(define-public python-apispec
13526 (package
13527 (name "python-apispec")
13528 (version "0.25.3")
13529 (source
13530 (origin
13531 (method url-fetch)
13532 (uri (pypi-uri "apispec" version))
13533 (sha256
13534 (base32
13535 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
13536 (build-system python-build-system)
13537 (propagated-inputs
13538 `(("python-pyyaml" ,python-pyyaml)))
13539 (native-inputs
13540 `(("python-pytest" ,python-pytest)
13541 ("python-flask" ,python-flask)
13542 ("python-marshmallow" ,python-marshmallow)
13543 ("python-tornado" ,python-tornado)
13544 ("python-bottle" ,python-bottle)
13545 ("python-mock" ,python-mock)))
13546 (home-page "https://github.com/marshmallow-code/apispec")
13547 (synopsis "Swagger 2.0 API specification generator")
13548 (description "@code{python-apispec} is a pluggable API specification
13549generator. Currently supports the OpenAPI specification (f.k.a.
13550Swagger 2.0).")
13551 (license license:expat)))
13552
13553(define-public python2-apispec
13554 (package-with-python2 python-apispec))
13555
13556(define-public python-flasgger
13557 (package
13558 (name "python-flasgger")
13559 (version "0.6.3")
13560 (source
13561 (origin
1a04d421
TGR
13562 (method git-fetch)
13563 (uri (git-reference
13564 (url "https://github.com/rochacbruno/flasgger.git")
13565 (commit version)))
13566 (file-name (git-file-name name version))
44d10b1f 13567 (sha256
1a04d421 13568 (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn"))))
44d10b1f
RW
13569 (build-system python-build-system)
13570 (arguments
13571 `(#:phases
13572 (modify-phases %standard-phases
13573 (replace 'check
13574 (lambda* (#:key inputs outputs #:allow-other-keys)
13575 (substitute* "Makefile"
13576 (("flake8 flasgger --ignore=F403")
13577 "flake8 flasgger --ignore=E731,F403"))
13578 (setenv "PYTHONPATH" (string-append (getcwd)
13579 ":"
13580 (getenv "PYTHONPATH")))
ac599a09 13581 (invoke "py.test"))))))
44d10b1f
RW
13582 (propagated-inputs
13583 `(("python-flask" ,python-flask)
13584 ("python-pyyaml" ,python-pyyaml)
13585 ("python-jsonschema" ,python-jsonschema)
13586 ("python-mistune" ,python-mistune)
13587 ("python-six" ,python-six)))
13588 (native-inputs
13589 `(("python-decorator" ,python-decorator)
13590 ("python-flake8" ,python-flake8)
13591 ("python-flask-restful" ,python-flask-restful)
13592 ("python-flex" ,python-flex)
13593 ("python-pytest" ,python-pytest)
13594 ("python-pytest-cov" ,python-pytest-cov)
13595 ("python-marshmallow" ,python-marshmallow)
13596 ("python-apispec" ,python-apispec)))
13597 (home-page "https://github.com/rochacbruno/flasgger/")
13598 (synopsis "Extract Swagger specs from your Flask project")
13599 (description "@code{python-flasgger} allows extracting Swagger specs
13600from your Flask project. It is a fork of Flask-Swagger.")
13601 (license license:expat)))
13602
13603(define-public python2-flasgger
13604 (package-with-python2 python-flasgger))
13605
13606(define-public python-swagger-spec-validator
13607 (package
13608 (name "python-swagger-spec-validator")
fe9c5b1d 13609 (version "2.4.3")
44d10b1f
RW
13610 (source
13611 (origin
13612 (method url-fetch)
13613 (uri (pypi-uri "swagger-spec-validator" version))
13614 (sha256
13615 (base32
fe9c5b1d 13616 "11g627icrsqwazsncwi0sdvprcj6hwaayw5xk3xsj8d97bmrzqjp"))))
44d10b1f
RW
13617 (build-system python-build-system)
13618 (propagated-inputs
13619 `(("python-jsonschema" ,python-jsonschema)
fe9c5b1d 13620 ("python-pyyaml" ,python-pyyaml)
44d10b1f
RW
13621 ("python-six" ,python-six)))
13622 (home-page
13623 "https://github.com/Yelp/swagger_spec_validator")
13624 (synopsis "Validation of Swagger specifications")
13625 (description "@code{swagger_spec_validator} provides a library for
13626validating Swagger API specifications.")
13627 (license license:asl2.0)))
13628
13629(define-public python2-swagger-spec-validator
13630 (package-with-python2 python-swagger-spec-validator))
13631
13632(define-public python-apache-libcloud
13633 (package
13634 (name "python-apache-libcloud")
13635 (version "2.4.0")
13636 (source
13637 (origin
13638 (method url-fetch)
13639 (uri (pypi-uri "apache-libcloud" version))
13640 (sha256
13641 (base32
13642 "0daj3mkzw79v5zin2r1s2wkrz1hplfc16bwj4ss68i5qjq4l2p0j"))))
13643 (build-system python-build-system)
13644 (arguments
13645 `(#:phases
13646 (modify-phases %standard-phases
13647 (add-after 'unpack 'patch-ssh
13648 (lambda* (#:key inputs #:allow-other-keys)
13649 (substitute* "libcloud/compute/ssh.py"
13650 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
13651 "/bin/ssh" "'")))
13652 #t))
13653 (add-after 'unpack 'patch-tests
13654 (lambda _
13655 (substitute* "./libcloud/test/test_file_fixtures.py"
13656 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
13657 (("def _ascii") "def _raw_data(self, method, url, body, headers):
13658 return (httplib.OK,
13659 \"1234abcd\",
13660 {\"test\": \"value\"},
13661 httplib.responses[httplib.OK])
13662 def _ascii"))
13663 (substitute* "libcloud/test/compute/test_ssh_client.py"
13664 (("class ShellOutSSHClientTests")
13665 "@unittest.skip(\"Guix container doesn't have ssh service\")
13666class ShellOutSSHClientTests")
13667 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
13668 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
13669 (("'.xF0', '.x90', '.x8D', '.x88'")
13670 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
13671 #t))
13672 (add-before 'check 'copy-secret
13673 (lambda _
13674 (copy-file "libcloud/test/secrets.py-dist"
13675 "libcloud/test/secrets.py")
13676 #t)))))
13677 (inputs
13678 `(("openssh" ,openssh)))
13679 (propagated-inputs
13680 `(("python-paramiko" ,python-paramiko)
13681 ("python-requests" ,python-requests)))
13682 (native-inputs
13683 `(("python-lockfile" ,python-lockfile)
13684 ("python-mock" ,python-mock)
13685 ("python-pytest" ,python-pytest)
13686 ("python-pytest-runner" ,python-pytest-runner)
13687 ("python-requests-mock" ,python-requests-mock)))
13688 (home-page "https://libcloud.apache.org/")
13689 (synopsis "Unified Cloud API")
13690 (description "@code{libcloud} is a Python library for interacting with
13691many of the popular cloud service providers using a unified API.")
13692 (license license:asl2.0)))
13693
13694(define-public python2-apache-libcloud
13695 (package-with-python2 python-apache-libcloud))
13696
13697(define-public python-smmap2
13698 (package
13699 (name "python-smmap2")
cd199a45 13700 (version "2.0.5")
44d10b1f
RW
13701 (source
13702 (origin
13703 (method url-fetch)
13704 (uri (pypi-uri "smmap2" version))
13705 (sha256
cd199a45 13706 (base32 "16k03pcnxd3lgzwgbd7nl4jwzm1wmahirvd09kljnzvy96hgza99"))))
44d10b1f
RW
13707 (build-system python-build-system)
13708 (native-inputs
13709 `(("python-nosexcover" ,python-nosexcover)))
13710 (home-page "https://github.com/Byron/smmap")
13711 (synopsis "Python sliding window memory map manager")
13712 (description "@code{smmap2} is a pure Python implementation of a sliding
13713window memory map manager.")
13714 (license license:bsd-3)))
13715
13716(define-public python2-smmap2
13717 (package-with-python2 python-smmap2))
13718
13719(define-public python-regex
13720 (package
13721 (name "python-regex")
c187c9d7 13722 (version "2019.04.14")
44d10b1f
RW
13723 (source (origin
13724 (method url-fetch)
13725 (uri (pypi-uri "regex" version))
13726 (sha256
13727 (base32
c187c9d7
BT
13728 "1a6hhfs6l6snr1z654ay6wzbmwdkmv282fzfkd5hk2d1n73y8v6m"))))
13729 ;; TODO: Fix and enable regex_test.py tests that complain about the
13730 ;; test.support module not existing.
44d10b1f
RW
13731 (build-system python-build-system)
13732 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
13733 (synopsis "Alternative regular expression module")
13734 (description "This regular expression implementation is backwards-
13735compatible with the standard @code{re} module, but offers additional
13736functionality like full case-folding for case-insensitive matches in Unicode.")
13737 (license license:psfl)))
13738
13739(define-public python2-regex
13740 (package-with-python2 python-regex))
13741
13742(define-public python2-pyopengl
13743 (package
13744 (name "python2-pyopengl")
13745 (version "3.1.0")
13746 (source
13747 (origin
13748 (method url-fetch)
13749 (uri (pypi-uri "PyOpenGL" version))
13750 (sha256
13751 (base32
13752 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
13753 (arguments
13754 `(#:python ,python-2))
13755 (build-system python-build-system)
13756 (home-page "http://pyopengl.sourceforge.net")
13757 (synopsis "Standard OpenGL bindings for Python")
13758 (description
13759 "PyOpenGL is the most common cross platform Python binding to OpenGL and
13760related APIs. The binding is created using the standard @code{ctypes}
13761library.")
13762 (license license:bsd-3)))
13763
13764(define-public python2-pyopengl-accelerate
13765 (package
13766 (inherit python2-pyopengl)
13767 (name "python2-pyopengl-accelerate")
13768 (version "3.1.0")
13769 (source
13770 (origin
13771 (method url-fetch)
13772 (uri (pypi-uri "PyOpenGL-accelerate" version))
13773 (sha256
13774 (base32
13775 "0464c1ifzk0k92lyndikmvzjgnx1y25r7bkkc8pnxm4kp1q4czwj"))))
13776 (synopsis "Acceleration code for PyOpenGL")
13777 (description
13778 "This is the Cython-coded accelerator module for PyOpenGL.")))
13779
13780(define-public python-rencode
13781 (package
13782 (name "python-rencode")
13783 (version "1.0.5")
13784 (source
13785 (origin
13786 (method url-fetch)
13787 (uri (pypi-uri "rencode" version))
13788 (sha256
13789 (base32
13790 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
13791 (build-system python-build-system)
13792 (arguments
13793 `(#:phases
13794 (modify-phases %standard-phases
13795 (add-before 'check 'delete-bogus-test
13796 ;; This test requires /home/aresch/Downloads, which is not provided by
13797 ;; the build environment.
13798 (lambda _
13799 (delete-file "rencode/t.py")
13800 #t)))))
13801 (native-inputs `(("pkg-config" ,pkg-config)
13802 ("python-cython" ,python-cython)))
13803 (home-page "https://github.com/aresch/rencode")
13804 (synopsis "Serialization of heterogeneous data structures")
13805 (description
13806 "The @code{rencode} module is a data structure serialization library,
13807similar to @code{bencode} from the BitTorrent project. For complex,
13808heterogeneous data structures with many small elements, r-encoding stake up
13809significantly less space than b-encodings. This version of rencode is a
13810complete rewrite in Cython to attempt to increase the performance over the
13811pure Python module.")
13812 (license license:bsd-3)))
13813
13814(define-public python2-rencode
13815 (package-with-python2 python-rencode))
13816
13817(define-public python-xenon
13818 (package
13819 (name "python-xenon")
13820 (version "0.5.4")
13821 (source
13822 (origin
13823 (method url-fetch)
13824 (uri (pypi-uri "xenon" version))
13825 (sha256
13826 (base32
13827 "029cbhysg2vr5n4jz8gpg2793f8wkwnqpr1qgv6c1dn685vy31mc"))))
13828 (build-system python-build-system)
13829 (native-inputs
13830 `(("python-pyyaml" ,python-pyyaml)
13831 ("python-radon" ,python-radon)
13832 ("python-requests" ,python-requests)
13833 ("python-flake8" ,python-flake8)
13834 ("python-tox" ,python-tox)))
13835 (arguments
13836 `(#:phases
13837 (modify-phases %standard-phases
13838 (add-before 'build 'patch-test-requirements
13839 (lambda _
13840 ;; Remove httpretty dependency for tests.
13841 (substitute* "setup.py"
13842 (("httpretty") ""))
13843 #t)))))
13844 (home-page "https://xenon.readthedocs.org/")
13845 (synopsis "Monitor code metrics for Python on your CI server")
13846 (description
13847 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
13848Ideally, @code{xenon} is run every time code is committed. Through command
13849line options, various thresholds can be set for the complexity of code. It
13850will fail (i.e. it will exit with a non-zero exit code) when any of these
13851requirements is not met.")
13852 (license license:expat)))
13853
13854(define-public python2-xenon
13855 (package-with-python2 python-xenon))
13856
13857(define-public python-pysocks
13858 (package
13859 (name "python-pysocks")
b8725cdf 13860 (version "1.7.0")
44d10b1f
RW
13861 (source
13862 (origin
13863 (method url-fetch)
13864 (uri (pypi-uri "PySocks" version))
13865 (sha256
13866 (base32
b8725cdf 13867 "0z4p31bpqm893cf87qqgb30k7nwd8kqfjwwjm5cvxb6zbyj1w0yr"))))
44d10b1f
RW
13868 (build-system python-build-system)
13869 (arguments `(#:tests? #f))
13870 (home-page "https://github.com/Anorov/PySocks")
13871 (synopsis "SOCKS client module")
13872 (description "@code{pysocks} is an updated and semi-actively maintained
13873version of @code{SocksiPy} with bug fixes and extra features.")
13874 (license license:bsd-3)))
13875
13876(define-public python2-pysocks
13877 (package-with-python2 python-pysocks))
13878
13879(define-public python-pydiff
13880 (package
13881 (name "python-pydiff")
13882 (version "0.2")
13883 (source
13884 (origin
13885 (method url-fetch)
13886 (uri (pypi-uri "pydiff" version))
13887 (sha256
13888 (base32
13889 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
13890 (build-system python-build-system)
13891 (home-page "https://github.com/myint/pydiff")
13892 (synopsis "Library to diff two Python files at the bytecode level")
13893 (description
13894 "@code{pydiff} makes it easy to look for actual code changes while
13895ignoring formatting changes.")
13896 (license license:expat)))
13897
13898(define-public python2-pydiff
13899 (package-with-python2 python-pydiff))
13900
13901(define-public python-tqdm
13902 (package
13903 (name "python-tqdm")
13904 (version "4.19.6")
13905 (source
13906 (origin
13907 (method url-fetch)
13908 (uri (pypi-uri "tqdm" version))
13909 (sha256
13910 (base32
13911 "1pw0ngm0zn9papdmkwipi3yih5c3di6d0w849bdmrraq4d2d9h2y"))))
13912 (build-system python-build-system)
13913 (native-inputs
13914 `(("python-flake8" ,python-flake8)
13915 ("python-nose" ,python-nose)
13916 ("python-coverage" ,python-coverage)))
13917 (home-page "https://github.com/tqdm/tqdm")
13918 (synopsis "Fast, extensible progress meter")
13919 (description
13920 "Make loops show a progress bar on the console by just wrapping any
13921iterable with @code{|tqdm(iterable)|}. Offers many options to define
13922design and layout.")
f875d76f
PL
13923 (license (list license:mpl2.0 license:expat))
13924 (properties `((python2-variant . ,(delay python2-tqdm))))))
44d10b1f
RW
13925
13926(define-public python2-tqdm
f875d76f
PL
13927 (let ((tqdm (package-with-python2
13928 (strip-python2-variant python-tqdm))))
13929 (package (inherit tqdm)
13930 (native-inputs `(("python2-functools32" ,python2-functools32)
13931 ,@(package-native-inputs tqdm))))))
44d10b1f
RW
13932
13933(define-public python-pkginfo
13934 (package
13935 (name "python-pkginfo")
13936 (version "1.4.2")
13937 (source
13938 (origin
13939 (method url-fetch)
13940 (uri (pypi-uri "pkginfo" version))
13941 (sha256
13942 (base32
13943 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
13944 (build-system python-build-system)
13945 (arguments
13946 ;; The tests are broken upstream.
13947 '(#:tests? #f))
13948 (home-page
13949 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
13950 (synopsis
13951 "Query metadatdata from sdists, bdists, and installed packages")
13952 (description
13953 "API to query the distutils metadata written in @file{PKG-INFO} inside a
13954source distriubtion (an sdist) or a binary distribution (e.g., created by
13955running bdist_egg). It can also query the EGG-INFO directory of an installed
13956distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
13957created by running @code{python setup.py develop}).")
13958 (license license:expat)))
13959
13960(define-public python2-pkginfo
13961 (package-with-python2 python-pkginfo))
13962
13963(define-public python-twine
13964 (package
13965 (name "python-twine")
13966 (version "1.9.1")
13967 (source
13968 (origin
13969 (method url-fetch)
13970 (uri (pypi-uri "twine" version))
13971 (sha256
13972 (base32
13973 "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a"))))
13974 (build-system python-build-system)
13975 (propagated-inputs
13976 `(("python-tqdm" ,python-tqdm)
13977 ("python-pkginfo" ,python-pkginfo)
13978 ("python-requests" ,python-requests)
13979 ("python-requests-toolbelt" ,python-requests-toolbelt)))
13980 (home-page "https://github.com/pypa/twine")
13981 (synopsis "Collection of utilities for interacting with PyPI")
13982 (description
13983 "@code{twine} currently supports registering projects and uploading
13984distributions. It authenticates the user over HTTPS, allows them to pre-sign
13985their files and supports any packaging format (including wheels).")
13986 (license license:asl2.0)))
13987
13988(define-public python2-twine
13989 (package-with-python2 python-twine))
13990
13991(define-public python-linecache2
13992 (package
13993 (name "python-linecache2")
13994 (version "1.0.0")
13995 (source
13996 (origin
13997 (method url-fetch)
13998 (uri (pypi-uri "linecache2" version))
13999 (sha256
14000 (base32
14001 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
14002 (build-system python-build-system)
14003 (arguments
14004 `(;; The tests depend on unittest2, and our version is a bit too old.
14005 #:tests? #f))
14006 (native-inputs
14007 `(("python-pbr" ,python-pbr-minimal)))
14008 (home-page
14009 "https://github.com/testing-cabal/linecache2")
14010 (synopsis "Backports of the linecache module")
14011 (description
14012 "The linecache module allows one to get any line from any file, while
14013attempting to optimize internally, using a cache, the common case where many
14014lines are read from a single file.")
14015 (license license:psfl)))
14016
14017(define-public python2-linecache2
14018 (package-with-python2 python-linecache2))
14019
14020(define-public python-traceback2
14021 (package
14022 (name "python-traceback2")
14023 (version "1.4.0")
14024 (source
14025 (origin
14026 (method url-fetch)
14027 (uri (pypi-uri "traceback2" version))
14028 (sha256
14029 (base32
14030 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
14031 (build-system python-build-system)
14032 (arguments
14033 `(;; python-traceback2 and python-unittest2 depend on one another.
14034 #:tests? #f))
14035 (native-inputs
14036 `(("python-pbr" ,python-pbr-minimal)))
14037 (propagated-inputs
14038 `(("python-linecache2" ,python-linecache2)))
14039 (home-page
14040 "https://github.com/testing-cabal/traceback2")
14041 (synopsis "Backports of the traceback module")
14042 (description
14043 "This module provides a standard interface to extract, format and print
14044stack traces of Python programs. It exactly mimics the behavior of the Python
14045interpreter when it prints a stack trace.")
14046 (license license:psfl)))
14047
14048(define-public python2-traceback2
14049 (package-with-python2 python-traceback2))
14050
14051(define-public python-ratelimiter
14052 (package
14053 (name "python-ratelimiter")
14054 (version "1.2.0")
14055 (source
14056 (origin
14057 (method url-fetch)
14058 (uri (pypi-uri "ratelimiter" version))
14059 (sha256
14060 (base32
14061 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
14062 (build-system python-build-system)
14063 (arguments
14064 '(#:tests? #f)) ; There are no tests in the pypi archive.
14065 (home-page "https://github.com/RazerM/ratelimiter")
14066 (synopsis "Simple rate limiting object")
14067 (description
14068 "The @code{ratelimiter} module ensures that an operation will not be
14069executed more than a given number of times during a given period.")
14070 (license license:asl2.0)))
14071
14072(define-public python2-ratelimiter
14073 (package-with-python2 python-ratelimiter))
14074
14075(define-public python-dukpy
14076 (package
14077 (name "python-dukpy")
14078 (version "0.3")
14079 (source
14080 (origin
5b77ebe1
TGR
14081 (method git-fetch)
14082 (uri (git-reference
14083 (url "https://github.com/kovidgoyal/dukpy.git")
14084 (commit (string-append "v" version))))
14085 (file-name (git-file-name name version))
44d10b1f 14086 (sha256
5b77ebe1 14087 (base32 "13h21nqzasv4zj32xs61brmc106pr2cx243672crcmwxxnjgaxls"))))
44d10b1f
RW
14088 (build-system python-build-system)
14089 (home-page "https://github.com/kovidgoyal/dukpy")
14090 (synopsis "Run JavaScript in python")
14091 (description
14092 "dukpy is a JavaScript runtime environment for Python using the duktape
14093embeddable JavaScript engine.")
14094 ;; Dukpy is licensed under MIT like the embedded duktape library,
14095 ;; with 'errors.c' as GPL3.
14096 (license (list license:expat license:gpl3))))
14097
14098(define-public python2-dukpy
14099 (package-with-python2 python-dukpy))
14100
14101(define-public python-jsonrpclib-pelix
14102 (package
14103 (name "python-jsonrpclib-pelix")
14104 (version "0.3.2")
14105 (source
14106 (origin
14107 (method url-fetch)
14108 (uri (pypi-uri "jsonrpclib-pelix" version))
14109 (sha256
14110 (base32
14111 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
14112 (build-system python-build-system)
14113 (arguments
14114 `(#:tests? #f)) ; no tests in PyPI tarball
14115 (home-page "https://github.com/tcalmant/jsonrpclib/")
14116 (synopsis "JSON-RPC 2.0 client library for Python")
14117 (description
14118 "This library implements the JSON-RPC v2.0
14119specification (backwards-compatible) as a client library for Python. This
14120version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
14121services.")
14122 (license license:asl2.0)))
14123
14124(define-public python2-jsonrpclib-pelix
14125 (package-with-python2 python-jsonrpclib-pelix))
14126
14127(define-public python-setuptools-scm-git-archive
14128 (package
14129 (name "python-setuptools-scm-git-archive")
14130 (version "1.0")
14131 (source
14132 (origin
14133 (method url-fetch)
14134 (uri (pypi-uri "setuptools_scm_git_archive" version))
14135 (sha256
14136 (base32
14137 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
14138 (build-system python-build-system)
14139 (native-inputs
14140 `(("python-pytest" ,python-pytest)))
14141 (propagated-inputs
14142 `(("python-setuptools-scm" ,python-setuptools-scm)))
14143 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
14144 (synopsis "Setuptools_scm plugin for git archives")
14145 (description
14146 "The setuptools_scm_git_archive package is a plugin to
14147setuptools_scm, which supports obtaining versions from git archives that
14148belong to tagged versions.")
14149 (license license:expat)))
14150
14151(define-public python2-setuptools-scm-git-archive
14152 (package-with-python2 python-setuptools-scm-git-archive))
14153
724a350c
RW
14154(define-public python-setuptools-git
14155 (package
14156 (name "python-setuptools-git")
14157 (version "1.2")
14158 (source
14159 (origin
14160 (method url-fetch)
14161 (uri (pypi-uri "setuptools-git" version))
14162 (sha256
14163 (base32
14164 "0i84qjwp5m0l9qagdjww2frdh63r37km1c48mrvbmaqsl1ni6r7z"))))
14165 (build-system python-build-system)
14166 (arguments
14167 `(#:phases
14168 (modify-phases %standard-phases
14169 ;; This is needed for tests.
14170 (add-after 'unpack 'configure-git
14171 (lambda _
14172 (setenv "HOME" "/tmp")
14173 (invoke "git" "config" "--global" "user.email" "guix")
14174 (invoke "git" "config" "--global" "user.name" "guix")
14175 #t)))))
14176 (native-inputs
14177 `(("git" ,git-minimal)))
14178 (home-page "https://github.com/msabramo/setuptools-git")
14179 (synopsis "Setuptools revision control system plugin for Git")
14180 (description
14181 "This package provides a plugin for Setuptools for revision control with
14182Git.")
14183 (license license:bsd-3)))
14184
44d10b1f
RW
14185(define-public python-pyclipper
14186 (package
14187 (name "python-pyclipper")
ff3d1b99 14188 (version "1.1.0.post3")
44d10b1f
RW
14189 (source
14190 (origin
14191 (method url-fetch)
14192 (uri (pypi-uri "pyclipper" version ".zip"))
14193 (sha256
ff3d1b99 14194 (base32 "164yksvqwqvwzh8f8lq92asg87hd8rvcy2xb5vm4y4ccvd5xgb7i"))
44d10b1f
RW
14195 (modules '((guix build utils)))
14196 (snippet
14197 '(begin
14198 ;; This file is generated by Cython.
14199 (delete-file "pyclipper/pyclipper.cpp") #t))))
14200 (build-system python-build-system)
14201 (arguments
14202 `(#:phases
14203 (modify-phases %standard-phases
14204 (add-before 'build 'cythonize-sources
14205 (lambda _
14206 (with-directory-excursion "pyclipper"
14207 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
14208 (propagated-inputs
14209 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
14210 (native-inputs
14211 `(("python-cython" ,python-cython)
14212 ("python-pytest" ,python-pytest)
14213 ("python-pytest-runner" ,python-pytest-runner)
14214 ("python-unittest2" ,python-unittest2)
14215 ("unzip" ,unzip)))
14216 (home-page "https://github.com/greginvm/pyclipper")
14217 (synopsis "Wrapper for Angus Johnson's Clipper library")
14218 (description
14219 "Pyclipper is a Cython wrapper for the C++ translation of the
14220Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
14221 (license license:expat)))
14222
14223(define-public python2-pyclipper
14224 (package-with-python2 python-pyclipper))
14225
14226(define-public python2-booleanoperations
14227 (package
14228 (name "python2-booleanoperations")
14229 (version "0.7.1")
14230 (source
14231 (origin
14232 (method url-fetch)
14233 (uri (pypi-uri "booleanOperations" version ".zip"))
14234 (sha256
14235 (base32
14236 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
14237 (build-system python-build-system)
14238 (arguments
14239 `(#:python ,python-2))
14240 (native-inputs
14241 `(("unzip" ,unzip)
14242 ("python2-pytest" ,python2-pytest)
14243 ("python2-pytest-runner" ,python2-pytest-runner)))
14244 (propagated-inputs
14245 `(("python-fonttools" ,python2-fonttools)
14246 ("python-pyclipper" ,python2-pyclipper)
14247 ("python-ufolib" ,python2-ufolib)))
14248 (home-page "https://github.com/typemytype/booleanOperations")
14249 (synopsis "Boolean operations on paths")
14250 (description
14251 "BooleanOperations provides a Python library that enables
14252boolean operations on paths.")
14253 (license license:expat)))
14254
14255(define-public python-tempdir
14256 (package
14257 (name "python-tempdir")
14258 (version "0.7.1")
14259 (source
14260 (origin
14261 (method url-fetch)
14262 (uri (pypi-uri "tempdir" version))
14263 (sha256
14264 (base32
14265 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
14266 (build-system python-build-system)
14267 (home-page "https://pypi.org/project/tempdir/")
14268 (arguments
14269 ;; the package has no tests
14270 '(#:tests? #f))
14271 (synopsis "Python library for managing temporary directories")
14272 (description
14273 "This library manages temporary directories that are automatically
14274deleted with all their contents when they are no longer needed. It is
14275particularly convenient for use in tests.")
14276 (license license:expat)))
14277
14278(define-public python2-tempdir
14279 (package-with-python2 python-tempdir))
14280
14281(define-public python-activepapers
14282 (package
14283 (name "python-activepapers")
14284 (version "0.2.2")
14285 (source
14286 (origin
14287 (method url-fetch)
14288 (uri (pypi-uri "ActivePapers.Py" version))
14289 (sha256
14290 (base32
14291 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
14292 (build-system python-build-system)
14293 (arguments
14294 `(#:modules ((ice-9 ftw)
14295 (srfi srfi-1)
14296 (guix build utils)
14297 (guix build python-build-system))
14298
14299 #:phases
14300 (modify-phases %standard-phases
14301 (add-after 'unpack 'delete-python2-code
14302 (lambda _
14303 (for-each delete-file
14304 '("lib/activepapers/builtins2.py"
14305 "lib/activepapers/standardlib2.py"
14306 "lib/activepapers/utility2.py"))))
14307 (replace 'check
14308 (lambda _
14309 ;; Deactivate the test cases that download files
14310 (setenv "NO_NETWORK_ACCESS" "1")
14311 ;; For some strange reason, some tests fail if nosetests runs all
14312 ;; test modules in a single execution. They pass if each test
14313 ;; module is run individually.
14314 (for-each (lambda (filename)
14315 (invoke "nosetests"
14316 (string-append "tests/" filename)))
14317 (scandir "tests"
14318 (lambda (filename)
14319 (string-suffix? ".py" filename)))))))))
14320 (native-inputs
14321 `(("python-tempdir" ,python-tempdir)
14322 ("python-nose" ,python-nose)))
14323 (propagated-inputs
14324 `(("python-h5py" ,python-h5py)))
14325 (home-page "http://www.activepapers.org/")
14326 (synopsis "Executable papers for scientific computing")
14327 (description
14328 "ActivePapers is a tool for working with executable papers, which
14329combine data, code, and documentation in single-file packages,
14330suitable for publication as supplementary material or on repositories
14331such as figshare or Zenodo.")
14332 (properties `((python2-variant . ,(delay python2-activepapers))))
14333 (license license:bsd-3)))
14334
14335(define-public python2-activepapers
14336 (let ((base (package-with-python2
14337 (strip-python2-variant python-activepapers))))
14338 (package
14339 (inherit base)
14340 (arguments
14341 (substitute-keyword-arguments (package-arguments base)
14342 ((#:phases phases)
14343 `(modify-phases ,phases
14344 (delete 'delete-python2-code)
14345 (add-after 'unpack 'delete-python3-code
14346 (lambda _
14347 (for-each delete-file
14348 '("lib/activepapers/builtins3.py"
14349 "lib/activepapers/standardlib3.py"
14350 "lib/activepapers/utility3.py")))))))))))
14351
14352(define-public python-semver
14353 (package
14354 (name "python-semver")
594280b1 14355 (version "2.9.0")
44d10b1f 14356 (source
2ecbba24
BG
14357 (origin
14358 (method url-fetch)
14359 (uri (pypi-uri "semver" version))
14360 (sha256
14361 (base32
14362 "183kg1rhzz3hqizvphkd8hlbf1zxfx8737zhfkmqzxi71jmdw7pd"))))
44d10b1f 14363 (build-system python-build-system)
44d10b1f
RW
14364 (native-inputs
14365 `(("python-tox" ,python-tox)
14366 ("python-virtualenv" ,python-virtualenv)))
14367 (home-page "https://github.com/k-bx/python-semver")
14368 (synopsis "Python helper for Semantic Versioning")
14369 (description "This package provides a Python library for
14370@url{Semantic Versioning, http://semver.org/}.")
14371 (license license:bsd-3)))
14372
14373(define-public python2-semver
14374 (package-with-python2 python-semver))
14375
14376(define-public python-pyro4
14377 (package
14378 (name "python-pyro4")
3ce91d44 14379 (version "4.77")
44d10b1f
RW
14380 (source
14381 (origin
14382 (method url-fetch)
14383 (uri (pypi-uri "Pyro4" version))
14384 (sha256
3ce91d44 14385 (base32 "0gsjg869y4gpy265s1gj1f2qy6jn5iz8r2bwwnq78r1r5yi15zib"))))
44d10b1f 14386 (build-system python-build-system)
3ce91d44
GL
14387 (arguments
14388 '(#:tests? #f)) ;FIXME: Some tests require network access.
14389 (native-inputs
14390 `(("python-cloudpickle" ,python-cloudpickle)
14391 ("python-dill" ,python-dill)
14392 ("python-msgpack" ,python-msgpack)))
44d10b1f
RW
14393 (propagated-inputs
14394 `(("python-serpent" ,python-serpent)))
14395 (home-page "https://pyro4.readthedocs.io")
14396 (synopsis "Distributed object middleware for Python")
14397 (description
14398 "Pyro enables you to build applications in which objects can talk to each
14399other over the network. You can just use normal Python method calls to call
14400objects on other machines, also known as remote procedure calls (RPC).")
14401 (license license:expat)))
14402
14403(define-public python2-pyro
14404 (package
14405 (name "python2-pyro")
14406 (version "3.16")
14407 (source
14408 (origin
14409 (method url-fetch)
14410 (uri (pypi-uri "Pyro" version))
14411 (file-name (string-append "Pyro-" version ".tar.gz"))
14412 (sha256
14413 (base32
14414 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
14415 (build-system python-build-system)
14416 (arguments
14417 ;; Pyro is not compatible with Python 3
14418 `(#:python ,python-2
14419 ;; Pyro has no test cases for automatic execution
14420 #:tests? #f))
14421 (home-page "http://pythonhosted.org/Pyro/")
14422 (synopsis "Distributed object manager for Python")
14423 (description "Pyro is a Distributed Object Technology system
14424written in Python that is designed to be easy to use. It resembles
14425Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
14426which is a system and language independent Distributed Object Technology
14427and has much more to offer than Pyro or RMI. Pyro 3.x is no
14428longer maintained. New projects should use Pyro4 instead, which
14429is the new Pyro version that is actively developed.")
14430 (license license:expat)))
14431
14432(define-public python2-scientific
14433 (package
14434 (name "python2-scientific")
14435 (version "2.9.4")
14436 (source
14437 (origin
c695f011
KH
14438 (method git-fetch)
14439 (uri (git-reference
14440 (url "https://github.com/khinsen/ScientificPython")
14441 (commit (string-append "rel" version))))
14442 (file-name (git-file-name name version))
44d10b1f
RW
14443 (sha256
14444 (base32
c695f011 14445 "16l48aj9fps9r7jyk8gpxppwrv0fqvlc13sayxskz28r5s6sjwbl"))))
44d10b1f
RW
14446 (build-system python-build-system)
14447 (inputs
14448 `(("netcdf" ,netcdf)))
14449 (propagated-inputs
14450 `(("python-numpy" ,python2-numpy-1.8)
14451 ("python-pyro" ,python2-pyro)))
14452 (arguments
14453 ;; ScientificPython is not compatible with Python 3
14454 `(#:python ,python-2
14455 #:tests? #f ; No test suite
14456 #:phases
14457 (modify-phases %standard-phases
14458 (replace 'build
14459 (lambda* (#:key inputs #:allow-other-keys)
77e61e25
RW
14460 (invoke "python" "setup.py" "build"
14461 (string-append "--netcdf_prefix="
14462 (assoc-ref inputs "netcdf"))))))))
c695f011 14463 (home-page "http://dirac.cnrs-orleans.fr/ScientificPython")
44d10b1f
RW
14464 (synopsis "Python modules for scientific computing")
14465 (description "ScientificPython is a collection of Python modules that are
14466useful for scientific computing. Most modules are rather general (Geometry,
14467physical units, automatic derivatives, ...) whereas others are more
14468domain-specific (e.g. netCDF and PDB support). The library is currently
14469not actively maintained and works only with Python 2 and NumPy < 1.9.")
14470 (license license:cecill-c)))
14471
14472(define-public python2-mmtk
14473 (package
14474 (name "python2-mmtk")
fe9b72c5 14475 (version "2.7.12")
44d10b1f
RW
14476 (source
14477 (origin
fe9b72c5
KH
14478 (method git-fetch)
14479 (uri (git-reference
14480 (url "https://github.com/khinsen/MMTK")
14481 (commit (string-append "rel" version))))
14482 (file-name (git-file-name name version))
44d10b1f
RW
14483 (sha256
14484 (base32
fe9b72c5 14485 "1fqwh3ba9jd42nigvn5shndgwb1zy7kh9520ncvqci7n8ffjr6p1"))))
44d10b1f
RW
14486 (build-system python-build-system)
14487 (native-inputs
14488 `(("netcdf" ,netcdf)))
14489 (propagated-inputs
14490 `(("python-scientific" ,python2-scientific)
14491 ("python-tkinter" ,python-2 "tk")))
14492 (arguments
14493 `(#:python ,python-2
14494 #:tests? #f
14495 #:phases
14496 (modify-phases %standard-phases
14497 (add-before 'build 'includes-from-scientific
14498 (lambda* (#:key inputs #:allow-other-keys)
14499 (mkdir-p "Include/Scientific")
14500 (copy-recursively
14501 (string-append
14502 (assoc-ref inputs "python-scientific")
14503 "/include/python2.7/Scientific")
14504 "Include/Scientific"))))))
14505 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
14506 (synopsis "Python library for molecular simulation")
14507 (description "MMTK is a library for molecular simulations with an emphasis
14508on biomolecules. It provides widely used methods such as Molecular Dynamics
14509and normal mode analysis, but also basic routines for implementing new methods
14510for simulation and analysis. The library is currently not actively maintained
14511and works only with Python 2 and NumPy < 1.9.")
14512 (license license:cecill-c)))
14513
14514(define-public python-phonenumbers
14515 (package
14516 (name "python-phonenumbers")
14517 (version "8.9.1")
14518 (source
14519 (origin
14520 (method url-fetch)
14521 (uri (pypi-uri "phonenumbers" version))
14522 (sha256
14523 (base32
14524 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
14525 (build-system python-build-system)
14526 (home-page
14527 "https://github.com/daviddrysdale/python-phonenumbers")
14528 (synopsis
14529 "Python library for dealing with international phone numbers")
14530 (description
14531 "This package provides a Python port of Google's libphonenumber library.")
14532 (license license:asl2.0)))
14533
14534(define-public python2-phonenumbers
14535 (package-with-python2 python-phonenumbers))
14536
14537(define-public python-send2trash
14538 (package
14539 (name "python-send2trash")
d9b0216b 14540 (version "1.5.0")
44d10b1f 14541 (source
d9b0216b 14542 (origin (method git-fetch)
44d10b1f 14543 ;; Source tarball on PyPI doesn't include tests.
d9b0216b
RW
14544 (uri (git-reference
14545 (url "https://github.com/hsoft/send2trash.git")
14546 (commit version)))
14547 (file-name (git-file-name name version))
44d10b1f
RW
14548 (sha256
14549 (base32
d9b0216b 14550 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
44d10b1f
RW
14551 (build-system python-build-system)
14552 (arguments
14553 '(#:phases
14554 (modify-phases %standard-phases
14555 (add-before 'check 'pre-check
14556 (lambda _
14557 (mkdir-p "/tmp/foo")
14558 (setenv "HOME" "/tmp/foo")
14559 #t)))))
14560 (home-page "https://github.com/hsoft/send2trash")
14561 (synopsis "Send files to the user's @file{~/Trash} directory")
14562 (description "This package provides a Python library to send files to the
14563user's @file{~/Trash} directory.")
20b3fde7 14564 (properties `((python2-variant . ,(delay python2-send2trash))))
44d10b1f
RW
14565 (license license:bsd-3)))
14566
14567(define-public python2-send2trash
14568 (package
f32164ab 14569 (inherit (package-with-python2 (strip-python2-variant python-send2trash)))
44d10b1f
RW
14570 (arguments
14571 (substitute-keyword-arguments (package-arguments python-send2trash)
14572 ((#:phases phases)
14573 `(modify-phases ,phases
14574 (add-before 'check 'setenv
14575 (lambda _
14576 (setenv "PYTHONPATH"
14577 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
4782a06f 14578 #t))))))))
44d10b1f
RW
14579
14580(define-public python-yapf
14581 (package
14582 (name "python-yapf")
19ba75dc 14583 (version "0.29.0")
44d10b1f
RW
14584 (source
14585 (origin
14586 (method url-fetch)
14587 (uri (pypi-uri "yapf" version))
14588 (sha256
14589 (base32
19ba75dc 14590 "1pj3xzblmbssshi889b6n9hwqbjpabw6j0fimlng2sshd3226bki"))))
44d10b1f
RW
14591 (build-system python-build-system)
14592 (home-page "https://github.com/google/yapf")
14593 (synopsis "Formatter for Python code")
14594 (description "YAPF is a formatter for Python code. It's based off of
14595@dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
14596takes the code and reformats it to the best formatting that conforms to the
14597style guide, even if the original code didn't violate the style guide.")
14598 (license license:asl2.0)))
14599
14600(define-public python2-yapf
14601 (package-with-python2 python-yapf))
14602
14603(define-public python-gyp
14604 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
14605 (revision "0"))
14606 (package
14607 (name "python-gyp")
14608 ;; Google does not release versions,
14609 ;; based on second most recent commit date.
14610 (version (git-version "0.0.0" revision commit))
14611 (source
14612 (origin
14613 ;; Google does not release tarballs,
14614 ;; git checkout is needed.
14615 (method git-fetch)
14616 (uri (git-reference
14617 (url "https://chromium.googlesource.com/external/gyp")
14618 (commit commit)))
14619 (file-name (git-file-name name version))
14620 (sha256
14621 (base32
14622 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
14623 (build-system python-build-system)
14624 (home-page "https://gyp.gsrc.io/")
14625 (synopsis "GYP is a Meta-Build system")
14626 (description
14627 "GYP builds build systems for large, cross platform applications.
14628It can be used to generate XCode projects, Visual Studio projects, Ninja build
14629files, and Makefiles.")
14630 (license license:bsd-3))))
14631
14632(define-public python2-gyp
14633 (package-with-python2 python-gyp))
14634
14635(define-public python-whatever
14636 (package
14637 (name "python-whatever")
97610a66 14638 (version "0.6")
44d10b1f
RW
14639 (source
14640 (origin
ac0ea38c
EF
14641 (method git-fetch)
14642 (uri (git-reference
14643 (url "https://github.com/Suor/whatever")
14644 (commit version)))
14645 (file-name (git-file-name name version))
44d10b1f 14646 (sha256
ac0ea38c 14647 (base32 "1q7ajgqjfivxqsqgnhp4lc4p6jxyh4zprcsdbpd6dw54inaf0av5"))))
44d10b1f
RW
14648 (build-system python-build-system)
14649 (arguments
14650 `(#:phases
14651 (modify-phases %standard-phases
14652 (replace 'check
14653 (lambda _
14654 (invoke "py.test"))))))
14655 (native-inputs
14656 `(("python-pytest" ,python-pytest)))
14657 (home-page "http://github.com/Suor/whatever")
14658 (synopsis "Make anonymous functions by partial application of operators")
14659 (description "@code{whatever} provides an easy way to make anonymous
14660functions by partial application of operators.")
14661 (license license:bsd-3)))
14662
14663(define-public python2-whatever
14664 (package-with-python2 python-whatever))
14665
14666(define-public python-funcy
14667 (package
14668 (name "python-funcy")
9e396ab8 14669 (version "1.11")
44d10b1f
RW
14670 (source
14671 (origin
a85c6027
TGR
14672 (method git-fetch)
14673 (uri (git-reference
14674 (url "https://github.com/Suor/funcy.git")
14675 (commit version)))
44d10b1f 14676 (sha256
a85c6027
TGR
14677 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
14678 (file-name (git-file-name name version))))
44d10b1f
RW
14679 (build-system python-build-system)
14680 (arguments
14681 `(#:phases
14682 (modify-phases %standard-phases
14683 (replace 'check
14684 (lambda _
14685 (invoke "py.test"))))))
14686 (native-inputs
14687 `(("python-pytest" ,python-pytest)
14688 ("python-whatever" ,python-whatever)))
14689 (home-page "http://github.com/Suor/funcy")
14690 (synopsis "Functional tools")
14691 (description "@code{funcy} is a library that provides functional tools.
14692Examples are:
14693@enumerate
14694@item merge - Merges collections of the same type
14695@item walk - Type-preserving map
14696@item select - Selects a part of a collection
14697@item take - Takes the first n items of a collection
14698@item first - Takes the first item of a collection
14699@item remove - Predicated-removes items of a collection
14700@item concat - Concatenates two collections
14701@item flatten - Flattens a collection with subcollections
14702@item distinct - Returns only distinct items
14703@item split - Predicated-splits a collection
14704@item split_at - Splits a collection at a given item
14705@item group_by - Groups items by group
14706@item pairwise - Pairs off adjacent items
14707@item partial - Partially-applies a function
14708@item curry - Curries a function
14709@item compose - Composes functions
14710@item complement - Complements a predicate
14711@item all_fn - \"all\" with predicate
14712@end enumerate")
14713 (license license:bsd-3)))
14714
14715(define-public python2-funcy
14716 (package-with-python2 python-funcy))
14717
14718(define-public python-isoweek
14719 (package
14720 (name "python-isoweek")
14721 (version "1.3.3")
14722 (source
14723 (origin
14724 (method url-fetch)
14725 (uri (pypi-uri "isoweek" version))
14726 (sha256
14727 (base32
14728 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
14729 (build-system python-build-system)
14730 (home-page "https://github.com/gisle/isoweek")
14731 (synopsis "Objects representing a week")
14732 (description "The @code{isoweek} module provide the class Week that
14733implements the week definition of ISO 8601. This standard also defines
14734a notation for identifying weeks; yyyyWww (where the W is a literal).
14735Week instances stringify to this form.")
14736 (license license:bsd-3)))
14737
14738(define-public python2-isoweek
14739 (package-with-python2 python-isoweek))
14740
14741(define-public python-tokenize-rt
14742 (package
14743 (name "python-tokenize-rt")
14744 (version "2.0.1")
14745 (source
14746 (origin
14747 (method url-fetch)
14748 (uri (pypi-uri "tokenize-rt" version))
14749 (sha256
14750 (base32
14751 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
14752 (build-system python-build-system)
14753 (home-page "https://github.com/asottile/tokenize-rt")
14754 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
14755 (description
14756 "This Python library is a wrapper around @code{tokenize} from the Python
14757standard library. It provides two additional tokens @code{ESCAPED_NL} and
14758@code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
14759and @code{tokens_to_src} to roundtrip.")
14760 (license license:expat)))
14761
14762(define-public python-future-fstrings
14763 (package
14764 (name "python-future-fstrings")
14765 (version "0.4.1")
14766 (source
14767 (origin
14768 (method url-fetch)
14769 (uri (pypi-uri "future_fstrings" version))
14770 (sha256
14771 (base32
14772 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
14773 (build-system python-build-system)
14774 (propagated-inputs
14775 `(("python-tokenize-rt" ,python-tokenize-rt)))
14776 (home-page "https://github.com/asottile/future-fstrings")
14777 (synopsis "Backport of fstrings to Python < 3.6")
14778 (description
14779 "This package provides a UTF-8 compatible encoding
14780@code{future_fstrings}, which performs source manipulation. It decodes the
14781source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
14782@code{f} strings.")
14783 (license license:expat)))
14784
dae2eb1c
MC
14785(define-public python-typed-ast
14786 (package
14787 (name "python-typed-ast")
bae89583 14788 (version "1.4.0")
dae2eb1c
MC
14789 (source
14790 (origin
bae89583
MO
14791 (method git-fetch)
14792 (uri (git-reference
14793 (url "https://github.com/python/typed_ast.git")
14794 (commit version)))
dae2eb1c 14795 (sha256
bae89583
MO
14796 (base32 "0l0hz809f7i356kmqkvfsaswiidb98j9hs9rrjnfawzqcbffzgyb"))
14797 (file-name (git-file-name name version))))
dae2eb1c
MC
14798 (build-system python-build-system)
14799 (arguments
14800 `(#:modules ((guix build utils)
14801 (guix build python-build-system)
14802 (ice-9 ftw)
14803 (srfi srfi-1)
14804 (srfi srfi-26))
14805 #:phases
14806 (modify-phases %standard-phases
14807 (replace 'check
14808 (lambda _
14809 (let ((cwd (getcwd)))
14810 (setenv "PYTHONPATH"
14811 (string-append cwd "/build/"
14812 (find (cut string-prefix? "lib" <>)
14813 (scandir (string-append cwd "/build")))
14814 ":"
14815 (getenv "PYTHONPATH"))))
14816 (invoke "pytest")
14817 #t)))))
14818 (native-inputs `(("python-pytest" ,python-pytest)))
14819 (home-page "https://github.com/python/typed_ast")
14820 (synopsis "Fork of Python @code{ast} modules with type comment support")
14821 (description "This package provides a parser similar to the standard
14822@code{ast} library. Unlike @code{ast}, the parsers in @code{typed_ast}
14823include PEP 484 type comments and are independent of the version of Python
14824under which they are run. The @code{typed_ast} parsers produce the standard
14825Python AST (plus type comments), and are both fast and correct, as they are
14826based on the CPython 2.7 and 3.7 parsers.")
14827 ;; See the file "LICENSE" for the details.
14828 (license (list license:psfl
14829 license:asl2.0
14830 license:expat)))) ;ast27/Parser/spark.py
14831
44d10b1f
RW
14832(define-public python-typing
14833 (package
14834 (name "python-typing")
14835 (version "3.6.6")
14836 (source
14837 (origin
14838 (method url-fetch)
14839 (uri (pypi-uri "typing" version))
14840 (sha256
14841 (base32
14842 "0ba9acs4awx15bf9v3nrs781msbd2nx826906nj6fqks2bvca9s0"))))
14843 (build-system python-build-system)
14844 (home-page "https://docs.python.org/3/library/typing.html")
14845 (synopsis "Type hints for Python")
14846 (description "This is a backport of the standard library @code{typing}
14847module to Python versions older than 3.5. Typing defines a standard notation
14848for Python function and variable type annotations. The notation can be used
14849for documenting code in a concise, standard format, and it has been designed
14850to also be used by static and runtime type checkers, static analyzers, IDEs
14851and other tools.")
14852 (license license:psfl)))
14853
14854(define-public python2-typing
14855 (package-with-python2 python-typing))
14856
f89d443b
VC
14857(define-public python-typing-extensions
14858 (package
14859 (name "python-typing-extensions")
14860 (version "3.7.2")
14861 (source
14862 (origin
14863 (method url-fetch)
14864 (uri (pypi-uri "typing_extensions" version))
14865 (sha256
14866 (base32
14867 "0wfsv71pvkyf2na938l579jh0v3kzl6g744ijgnahcwd4d9x0b7v"))))
14868 (build-system python-build-system)
14869 (home-page
14870 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
14871 (synopsis "Experimental type hints for Python")
14872 (description
14873 "The typing_extensions module contains additional @code{typing} hints not
14874yet present in the of the @code{typing} standard library.
14875Included are implementations of:
14876@enumerate
14877@item ClassVar
14878@item ContextManager
14879@item Counter
14880@item DefaultDict
14881@item Deque
14882@item NewType
14883@item NoReturn
14884@item overload
14885@item Protocol
14886@item runtime
14887@item Text
14888@item Type
14889@item TYPE_CHECKING
14890@item AsyncGenerator
14891@end enumerate\n")
14892 (license license:psfl)))
14893
44d10b1f
RW
14894(define-public bpython
14895 (package
14896 (name "bpython")
4de93b2f 14897 (version "0.18")
44d10b1f
RW
14898 (source
14899 (origin
14900 (method url-fetch)
14901 (uri (pypi-uri "bpython" version))
14902 (sha256
4de93b2f 14903 (base32 "1hl6frgvr2lqaxqczl8amg9xih32b3gzv429vs0qrjb8wpdj1k2n"))))
44d10b1f
RW
14904 (build-system python-build-system)
14905 (arguments
14906 `(#:phases
14907 (modify-phases %standard-phases
14908 (add-after 'unpack 'remove-failing-test
14909 (lambda _
14910 ;; Remove failing test. FIXME: make it pass
14911 (delete-file "bpython/test/test_args.py")
14912 #t))
14913 (add-after 'wrap 'add-aliases
14914 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
14915 (lambda* (#:key outputs #:allow-other-keys)
14916 (let ((out (assoc-ref outputs "out")))
14917 (for-each
14918 (lambda (old new)
14919 (symlink old (string-append out "/bin/" new)))
14920 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
14921 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
14922 #t)))))
14923 (propagated-inputs
14924 `(("python-pygments" ,python-pygments)
14925 ("python-requests" ,python-requests)
4de93b2f 14926 ("python-babel" ,python-babel) ; optional, for internationalization
44d10b1f
RW
14927 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
14928 ("python-greenlet" ,python-greenlet)
4de93b2f 14929 ("python-urwid" ,python-urwid) ; for bpython-urwid only
44d10b1f
RW
14930 ("python-six" ,python-six)))
14931 (native-inputs
14932 `(("python-sphinx" ,python-sphinx)
14933 ("python-mock" ,python-mock)))
14934 (home-page "https://bpython-interpreter.org/")
14935 (synopsis "Fancy interface to the Python interpreter")
14936 (description "Bpython is a fancy interface to the Python
14937interpreter. bpython's main features are
14938
14939@enumerate
14940@item in-line syntax highlighting,
14941@item readline-like autocomplete with suggestions displayed as you type,
14942@item expected parameter list for any Python function,
14943@item \"rewind\" function to pop the last line of code from memory and
14944 re-evaluate,
14945@item send the code you've entered off to a pastebin,
14946@item save the code you've entered to a file, and
14947@item auto-indentation.
14948@end enumerate")
14949 (license license:expat)))
14950
14951(define-public bpython2
14952 (let ((base (package-with-python2
14953 (strip-python2-variant bpython))))
14954 (package (inherit base)
14955 (name "bpython2")
14956 (arguments
14957 `(#:python ,python-2
14958 #:phases
14959 (modify-phases %standard-phases
14960 (add-after 'unpack 'remove-failing-test
14961 (lambda _
14962 ;; Remove failing test. FIXME: make it pass
14963 (delete-file "bpython/test/test_args.py")
14964 ;; Disable failing test-cases (renaming inhibits they are
14965 ;; discovered)
14966 (substitute* "bpython/test/test_curtsies_repl.py"
14967 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
14968 (string-append a "xxx_off_" b))
14969 (("^(\\s*def )(test_complex\\W)" _ a b)
14970 (string-append a "xxx_off_" b)))
14971 #t))
14972 (add-before 'build 'rename-scripts
14973 ;; rename the scripts to bypthon2, bpdb2, etc.
14974 (lambda _
14975 (substitute* "setup.py"
14976 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
14977 (string-append name "2" rest "\n"))
14978 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
14979 (string-append name "2" (or sub "") rest "\n")))
14980 #t))))))))
14981
14982(define-public python-pyinotify
14983 (package
14984 (name "python-pyinotify")
14985 (version "0.9.6")
14986 (source (origin
14987 (method url-fetch)
14988 (uri (pypi-uri "pyinotify" version))
14989 (sha256
14990 (base32
14991 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
14992 (build-system python-build-system)
14993 (arguments `(#:tests? #f)) ;no tests
14994 (home-page "https://github.com/seb-m/pyinotify")
14995 (synopsis "Python library for monitoring inotify events")
14996 (description
14997 "@code{pyinotify} provides a Python interface for monitoring
14998file system events on Linux.")
14999 (license license:expat)))
15000
15001(define-public python2-pyinotify
15002 (package-with-python2 python-pyinotify))
15003
15004;; Ada parser uses this version.
15005(define-public python2-quex-0.67.3
15006 (package
15007 (name "python2-quex")
15008 (version "0.67.3")
15009 (source
15010 (origin
15011 (method url-fetch)
15012 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
15013 (version-major+minor version)
15014 "/quex-" version ".zip"))
15015 (sha256
15016 (base32
15017 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
15018 (build-system python-build-system)
15019 (native-inputs
15020 `(("unzip" ,unzip)))
15021 (arguments
15022 `(#:python ,python-2
15023 #:tests? #f
15024 #:phases
15025 (modify-phases %standard-phases
15026 (delete 'configure)
15027 (delete 'build)
15028 (replace 'install
15029 (lambda* (#:key outputs #:allow-other-keys)
15030 (let* ((out (assoc-ref outputs "out"))
15031 (share/quex (string-append out "/share/quex"))
15032 (bin (string-append out "/bin")))
15033 (copy-recursively "." share/quex)
15034 (mkdir-p bin)
15035 (symlink (string-append share/quex "/quex-exe.py")
15036 (string-append bin "/quex"))
15037 #t))))))
15038 (native-search-paths
15039 (list (search-path-specification
15040 (variable "QUEX_PATH")
15041 (files '("share/quex")))))
15042 (home-page "http://quex.sourceforge.net/")
15043 (synopsis "Lexical analyzer generator in Python")
15044 (description "@code{quex} is a lexical analyzer generator in Python.")
15045 (license license:lgpl2.1+))) ; Non-military
15046
15047(define-public python2-quex
15048 (package (inherit python2-quex-0.67.3)
15049 (name "python2-quex")
15050 (version "0.68.1")
15051 (source
15052 (origin
15053 (method url-fetch)
15054 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
15055 (sha256
15056 (base32
15057 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
15058 (file-name (string-append name "-" version ".tar.gz"))))))
15059
15060(define-public python-more-itertools
15061 (package
15062 (name "python-more-itertools")
1b066827 15063 (version "7.1.0")
44d10b1f
RW
15064 (source
15065 (origin
15066 (method url-fetch)
15067 (uri (pypi-uri "more-itertools" version))
15068 (sha256
15069 (base32
1b066827 15070 "16phg2f2dvm6ci5wr49ncha5lmc0m2in3bsl33c61vzca4gkvd4b"))))
44d10b1f 15071 (build-system python-build-system)
44d10b1f
RW
15072 (home-page "https://github.com/erikrose/more-itertools")
15073 (synopsis "More routines for operating on iterables, beyond itertools")
15074 (description "Python's built-in @code{itertools} module implements a
15075number of iterator building blocks inspired by constructs from APL, Haskell,
15076and SML. @code{more-itertools} includes additional building blocks for
15077working with iterables.")
47f66348 15078 (properties `((python2-variant . ,(delay python2-more-itertools))))
44d10b1f
RW
15079 (license license:expat)))
15080
47f66348 15081;; The 5.x series are the last versions supporting Python 2.7.
44d10b1f 15082(define-public python2-more-itertools
47f66348
MB
15083 (package
15084 (inherit python-more-itertools)
15085 (name "python2-more-itertools")
15086 (version "5.0.0")
15087 (source (origin
15088 (method url-fetch)
15089 (uri (pypi-uri "more-itertools" version))
15090 (sha256
15091 (base32
15092 "1r12cm6mcdwdzz7d47a6g4l437xsvapdlgyhqay3i2nrlv03da9q"))))
15093 (arguments
15094 `(#:python ,python2-minimal))
15095 (propagated-inputs
15096 `(("python2-six" ,python2-six-bootstrap)))))
44d10b1f
RW
15097
15098(define-public python-latexcodec
15099 (package
15100 (name "python-latexcodec")
f3415ba5 15101 (version "1.0.7")
44d10b1f
RW
15102 (source
15103 (origin
15104 (method url-fetch)
15105 (uri (pypi-uri "latexcodec" version))
15106 (sha256
f3415ba5 15107 (base32 "0wnp3yqcgx0rpy8dz51vh75lbp2qif67da19zi7m3ca98n887hgb"))))
44d10b1f
RW
15108 (build-system python-build-system)
15109 (inputs
15110 `(("python-six" ,python-six)))
15111 (home-page "https://readthedocs.org/projects/latexcodec/")
15112 (synopsis "Work with LaTeX code in Python")
15113 (description "Lexer and codec to work with LaTeX code in Python.")
15114 (license license:expat)))
15115
15116(define-public python-pybtex
15117 (package
15118 (name "python-pybtex")
9441a9c1 15119 (version "0.22.2")
44d10b1f
RW
15120 (source
15121 (origin
15122 (method url-fetch)
15123 (uri (pypi-uri "pybtex" version))
15124 (sha256
9441a9c1 15125 (base32 "070wfcmxrd7xg1si421mi9150gmx2qwx431nwf69sq3hhmgnx080"))))
44d10b1f
RW
15126 (build-system python-build-system)
15127 (native-inputs
15128 `(("python-nose" ,python-nose)))
15129 (inputs
15130 `(("python-latexcodec" ,python-latexcodec)
15131 ("python-pyyaml" ,python-pyyaml)
15132 ("python-six" ,python-six)))
15133 (arguments
15134 `(#:test-target "nosetests"))
15135 (home-page "https://pybtex.org/")
15136 (synopsis "BibTeX-compatible bibliography processor")
15137 (description "Pybtex is a BibTeX-compatible bibliography processor written
15138in Python. You can simply type pybtex instead of bibtex.")
15139 (license license:expat)))
15140
15141(define-public python-onetimepass
15142 (package
15143 (name "python-onetimepass")
15144 (version "1.0.1")
15145 (source
15146 (origin
15147 (method url-fetch)
15148 (uri (pypi-uri "onetimepass" version))
15149 (sha256
15150 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
15151 (build-system python-build-system)
15152 (propagated-inputs `(("python-six" ,python-six)))
15153 (home-page "https://github.com/tadeck/onetimepass/")
15154 (synopsis "One-time password library")
15155 (description "Python one-time password library for HMAC-based (HOTP) and
15156time-based (TOTP) passwords.")
15157 (license license:expat)))
15158
15159(define-public python-parso
15160 (package
15161 (name "python-parso")
1475094a 15162 (version "0.5.1")
44d10b1f
RW
15163 (source
15164 (origin
15165 (method url-fetch)
15166 (uri (pypi-uri "parso" version))
15167 (sha256
15168 (base32
1475094a 15169 "171a9ivhxwsd52h1cgsz40zgzpgzscn7yqb7sdjhy8m1lzj0wsv6"))))
44d10b1f
RW
15170 (native-inputs
15171 `(("python-pytest" ,python-pytest)))
15172 (build-system python-build-system)
4eb97c25
MC
15173 (arguments
15174 `(#:phases (modify-phases %standard-phases
15175 (replace 'check
15176 (lambda _ (invoke "pytest" "-vv"))))))
44d10b1f
RW
15177 (home-page "https://github.com/davidhalter/parso")
15178 (synopsis "Python Parser")
15179 (description "Parso is a Python parser that supports error recovery and
15180round-trip parsing for different Python versions (in multiple Python versions).
15181Parso is also able to list multiple syntax errors in your Python file.")
15182 (license license:expat)))
15183
15184(define-public python2-parso
15185 (package-with-python2 python-parso))
15186
15187(define-public python-async-generator
15188 (package
15189 (name "python-async-generator")
94fcbf8d 15190 (version "1.10")
44d10b1f
RW
15191 (source
15192 (origin
15193 (method url-fetch)
15194 (uri (pypi-uri "async_generator" version))
15195 (sha256
15196 (base32
94fcbf8d 15197 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
44d10b1f
RW
15198 (build-system python-build-system)
15199 (native-inputs
15200 `(("python-pytest" ,python-pytest)))
15201 (home-page "https://github.com/python-trio/async_generator")
15202 (synopsis "Async generators and context managers for Python 3.5+")
15203 (description "@code{async_generator} back-ports Python 3.6's native async
15204generators and Python 3.7's context managers into Python 3.5.")
15205 ;; Dual licensed.
15206 (license (list license:expat license:asl2.0))))
15207
15208(define-public python-async-timeout
15209 (package
15210 (name "python-async-timeout")
15211 (version "3.0.1")
15212 (source
15213 (origin
15214 (method url-fetch)
15215 (uri (pypi-uri "async-timeout" version))
15216 (sha256
15217 (base32
15218 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
15219 (build-system python-build-system)
15220 (home-page "https://github.com/aio-libs/async_timeout/")
15221 (synopsis "Timeout context manager for asyncio programs")
15222 (description "@code{async-timeout} provides a timeout timeout context
15223manager compatible with @code{asyncio}.")
15224 (license license:asl2.0)))
15225
15226(define-public python-glob2
15227 (package
15228 (name "python-glob2")
4df49d19 15229 (version "0.7")
8fa2bcc7
TGR
15230 (source
15231 (origin
15232 (method git-fetch)
15233 (uri (git-reference
15234 (url "https://github.com/miracle2k/python-glob2.git")
4df49d19 15235 (commit (string-append "v" version))))
8fa2bcc7
TGR
15236 (file-name (git-file-name name version))
15237 (sha256
4df49d19 15238 (base32 "160nh2ay9lw2hi0rixpzb2k87r6ql56k0j2cm87lqz8xc8zbw919"))))
44d10b1f
RW
15239 (build-system python-build-system)
15240 (home-page "https://github.com/miracle2k/python-glob2/")
15241 (synopsis "Extended Version of the python buildin glob module")
15242 (description "This is an extended version of the Python
15243@url{http://docs.python.org/library/glob.html, built-in glob module} which
15244adds:
15245
15246@itemize
15247@item The ability to capture the text matched by glob patterns, and return
15248those matches alongside the file names.
15249@item A recursive @code{**} globbing syntax, akin for example to the
15250@code{globstar} option of Bash.
15251@item The ability to replace the file system functions used, in order to glob
15252on virtual file systems.
15253@item Compatible with Python 2 and Python 3 (tested with 3.3).
15254@end itemize
15255
15256Glob2 currently based on the glob code from Python 3.3.1.")
15257 (license license:bsd-2)))
15258
15259(define-public python2-glob2
15260 (package-with-python2 python-glob2))
15261
15262(define-public python-gipc
15263 (package
15264 (name "python-gipc")
15265 (version "0.6.0")
15266 (source
15267 (origin
15268 (method url-fetch)
15269 (uri (pypi-uri "gipc" version ".zip"))
15270 (sha256
15271 (base32
15272 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
15273 (build-system python-build-system)
15274 (native-inputs
15275 `(("unzip" ,unzip)))
15276 (propagated-inputs
15277 `(("python-gevent" ,python-gevent)))
15278 (home-page "http://gehrcke.de/gipc")
15279 (synopsis "Child process management in the context of gevent")
15280 (description "Usage of Python's multiprocessing package in a
15281gevent-powered application may raise problems. With @code{gipc},
15282process-based child processes can safely be created anywhere within a
15283gevent-powered application.")
15284 (license license:expat)))
15285
15286(define-public python2-gipc
15287 (package-with-python2 python-gipc))
15288
15289(define-public python-fusepy
15290 (package
15291 (name "python-fusepy")
15292 (version "2.0.4")
15293 (source
15294 (origin
15295 (method url-fetch)
15296 (uri (pypi-uri "fusepy" version))
15297 (sha256
15298 (base32
15299 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
15300 (build-system python-build-system)
15301 (arguments
15302 `(#:phases
15303 (modify-phases %standard-phases
15304 (add-before 'build 'set-library-file-name
15305 (lambda* (#:key inputs #:allow-other-keys)
15306 (let ((fuse (assoc-ref inputs "fuse")))
15307 (substitute* "fuse.py"
15308 (("find_library\\('fuse'\\)")
15309 (string-append "'" fuse "/lib/libfuse.so'")))
15310 #t))))))
15311 (propagated-inputs
15312 `(("fuse" ,fuse)))
15313 (home-page "https://github.com/fusepy/fusepy")
15314 (synopsis "Simple ctypes bindings for FUSE")
15315 (description "Python module that provides a simple interface to FUSE and
15316MacFUSE. The binding is created using the standard @code{ctypes} library.")
15317 (license license:isc)))
15318
15319(define-public python2-fusepy
15320 (package-with-python2 python-fusepy))
15321
15322(define-public python2-gdrivefs
15323 (package
15324 (name "python2-gdrivefs")
15325 (version "0.14.9")
15326 (source
15327 (origin
15328 (method url-fetch)
15329 (uri (pypi-uri "gdrivefs" version))
15330 (sha256
15331 (base32
15332 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
15333 (build-system python-build-system)
15334 (arguments
15335 `(#:python ,python-2
15336 #:phases
15337 (modify-phases %standard-phases
15338 (add-before 'build 'patch-setup-py
15339 (lambda _
15340 ;; Update requirements from dependency==version
15341 ;; to dependency>=version
15342 (substitute* "gdrivefs/resources/requirements.txt"
15343 (("==") ">="))
15344 #t)))))
15345 (native-inputs
15346 `(("python2-gipc" ,python2-gipc)
15347 ("python2-gevent" ,python2-gevent)
15348 ("python2-greenlet" ,python2-greenlet)
15349 ("python2-httplib2" ,python2-httplib2)
15350 ("python2-uritemplate" ,python2-uritemplate)
15351 ("python2-oauth2client" ,python2-oauth2client)
15352 ("python2-six" ,python2-six)))
15353 (propagated-inputs
15354 `(("python2-dateutil" ,python2-dateutil)
15355 ("python2-fusepy" ,python2-fusepy)
15356 ("python2-google-api-client" ,python2-google-api-client)))
15357 (home-page "https://github.com/dsoprea/GDriveFS")
15358 (synopsis "Mount Google Drive as a local file system")
15359 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
15360under Python 2.7.")
15361 (license license:gpl2)))
15362
15363(define-public pybind11
15364 (package
15365 (name "pybind11")
d478cc04 15366 (version "2.3.0")
44d10b1f
RW
15367 (source (origin
15368 (method git-fetch)
15369 (uri (git-reference
15370 (url "https://github.com/pybind/pybind11.git")
15371 (commit (string-append "v" version))))
15372 (sha256
15373 (base32
d478cc04 15374 "11b6dniri8m05spfd2a19irz82shf4sdca73566bniggrf3zclnf"))
44d10b1f
RW
15375 (file-name (git-file-name name version))))
15376 (build-system cmake-build-system)
15377 (native-inputs
15378 `(("python" ,python)
15379 ("python-pytest" ,python-pytest)))
15380 (arguments
15381 `(#:test-target "check"))
15382 (home-page "https://github.com/pybind/pybind11/")
15383 (synopsis "Seamless operability between C++11 and Python")
15384 (description "pybind11 is a lightweight header-only library that exposes
15385C++ types in Python and vice versa, mainly to create Python bindings of
15386existing C++ code. Its goals and syntax are similar to the excellent
15387Boost.Python library by David Abrahams: to minimize boilerplate code in
15388traditional extension modules by inferring type information using compile-time
15389introspection.")
15390 (license license:expat)))
15391
15392(define-public python-fasteners
15393 (package
15394 (name "python-fasteners")
15395 (version "0.14.1")
15396 (source
15397 (origin
15398 (method url-fetch)
15399 (uri (pypi-uri "fasteners" version))
15400 (sha256
15401 (base32
15402 "063y20kx01ihbz2mziapmjxi2cd0dq48jzg587xdsdp07xvpcz22"))))
15403 (build-system python-build-system)
15404 (propagated-inputs
15405 `(("python-monotonic" ,python-monotonic)
15406 ("python-six" ,python-six)
15407 ("python-testtools" ,python-testtools)))
15408 (home-page "https://github.com/harlowja/fasteners")
15409 (synopsis "Python package that provides useful locks")
15410 (description
15411 "This package provides a Python program that provides following locks:
15412
15413@itemize
15414@item Locking decorator
15415@item Reader-writer locks
15416@item Inter-process locks
15417@item Generic helpers
15418@end itemize\n")
15419 (properties `((python2-variant . ,(delay python2-fasteners))))
15420 (license license:asl2.0)))
15421
15422(define-public python2-fasteners
15423 (let ((base (package-with-python2 (strip-python2-variant python-fasteners))))
15424 (package
15425 (inherit base)
15426 (propagated-inputs
15427 `(("python2-futures" ,python2-futures)
15428 ,@(package-propagated-inputs base))))))
15429
15430(define-public python-requests-file
15431 (package
15432 (name "python-requests-file")
15433 (version "1.4.3")
15434 (source
15435 (origin
15436 (method url-fetch)
15437 (uri (pypi-uri "requests-file" version))
15438 (sha256
15439 (base32
15440 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
15441 (build-system python-build-system)
15442 (propagated-inputs
15443 `(("python-requests" ,python-requests)
15444 ("python-six" ,python-six)))
15445 (home-page
15446 "https://github.com/dashea/requests-file")
15447 (synopsis "File transport adapter for Requests")
15448 (description
15449 "Requests-File is a transport adapter for use with the Requests Python
52beae7b 15450library to allow local file system access via @code{file://} URLs.")
44d10b1f
RW
15451 (license license:asl2.0)))
15452
15453(define-public python2-requests-file
15454 (package-with-python2 python-requests-file))
15455
15456(define-public python-tldextract
15457 (package
15458 (name "python-tldextract")
15459 (version "2.2.0")
15460 (source
15461 (origin
15462 (method url-fetch)
15463 (uri (pypi-uri "tldextract" version))
15464 (sha256
15465 (base32
15466 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
15467 (build-system python-build-system)
15468 (native-inputs
15469 `(("python-pytest" ,python-pytest)
15470 ("python-responses" ,python-responses)))
15471 (propagated-inputs
15472 `(("python-idna" ,python-idna)
15473 ("python-requests" ,python-requests)
15474 ("python-requests-file" ,python-requests-file)))
15475 (home-page
15476 "https://github.com/john-kurkowski/tldextract")
15477 (synopsis
15478 "Separate the TLD from the registered domain and subdomains of a URL")
15479 (description
15480 "TLDExtract accurately separates the TLD from the registered domain and
15481subdomains of a URL, using the Public Suffix List. By default, this includes
15482the public ICANN TLDs and their exceptions. It can optionally support the
15483Public Suffix List's private domains as well.")
15484 (license license:bsd-3)))
15485
15486(define-public python2-tldextract
15487 (package-with-python2 python-tldextract))
15488
15489(define-public python-pynamecheap
15490 (package
15491 (name "python-pynamecheap")
15492 (version "0.0.3")
15493 (source
15494 (origin
15495 (method url-fetch)
15496 (uri (pypi-uri "PyNamecheap" version))
15497 (sha256
15498 (base32
15499 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
15500 (build-system python-build-system)
15501 (propagated-inputs
15502 `(("python-requests" ,python-requests)))
15503 (home-page
15504 "https://github.com/Bemmu/PyNamecheap")
15505 (synopsis
15506 "Namecheap API client in Python")
15507 (description
15508 "PyNamecheap is a Namecheap API client in Python.")
15509 (license license:expat)))
15510
15511(define-public python2-pynamecheap
15512 (package-with-python2 python-pynamecheap))
15513
15514(define-public python-dns-lexicon
15515 (package
15516 (name "python-dns-lexicon")
15517 (version "2.4.0")
15518 (source
15519 (origin
15520 (method url-fetch)
15521 (uri (pypi-uri "dns-lexicon" version))
15522 (sha256
15523 (base32
15524 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
15525 (build-system python-build-system)
15526 (arguments
15527 `(#:tests? #f)) ;requires internet access
15528 (propagated-inputs
15529 `(("python-future" ,python-future)
15530 ("python-pynamecheap" ,python-pynamecheap)
15531 ("python-requests" ,python-requests)
15532 ("python-tldextract" ,python-tldextract)
15533 ("python-urllib3" ,python-urllib3)))
15534 (home-page "https://github.com/AnalogJ/lexicon")
15535 (synopsis
15536 "Manipulate DNS records on various DNS providers")
15537 (description
15538 "Lexicon provides a way to manipulate DNS records on multiple DNS
15539providers in a standardized way. It has a CLI but it can also be used as a
15540Python library. It was designed to be used in automation, specifically with
15541Let's Encrypt.")
15542 (license license:expat)))
15543
15544(define-public python2-dns-lexicon
15545 (package-with-python2 python-dns-lexicon))
15546
15547(define-public python-commandlines
15548 (package
15549 (name "python-commandlines")
15550 (version "0.4.1")
15551 (source
15552 (origin
15553 (method url-fetch)
15554 (uri (pypi-uri "commandlines" version))
15555 (sha256
15556 (base32
15557 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
15558 (build-system python-build-system)
15559 (home-page "https://github.com/chrissimpkins/commandlines")
15560 (synopsis "Command line argument to object parsing library")
15561 (description
15562 "@code{Commandlines} is a Python library for command line application
15563development that supports command line argument parsing, command string
15564validation testing and application logic.")
15565 (license license:expat)))
15566
15567;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
15568;; python-numba. They have a very unflexible relationship.
15569(define-public python-numba
15570 (package
15571 (name "python-numba")
65f84096 15572 (version "0.46.0")
44d10b1f
RW
15573 (source
15574 (origin
15575 (method url-fetch)
15576 (uri (pypi-uri "numba" version))
15577 (sha256
15578 (base32
65f84096 15579 "1vnfzcq6fcnkmdms6114d49awvvj5181fl7z1wlha27qc2paxjy2"))))
44d10b1f
RW
15580 (build-system python-build-system)
15581 (arguments
15582 `(#:modules ((guix build utils)
15583 (guix build python-build-system)
15584 (ice-9 ftw)
15585 (srfi srfi-1)
15586 (srfi srfi-26))
15587 #:phases
15588 (modify-phases %standard-phases
15589 (add-after 'unpack 'disable-proprietary-features
15590 (lambda _
15591 (setenv "NUMBA_DISABLE_HSA" "1")
15592 (setenv "NUMBA_DISABLE_CUDA" "1")
15593 #t))
15594 (add-after 'unpack 'remove-failing-tests
15595 (lambda _
65f84096 15596 ;; FIXME: These tests fail for unknown reasons:
44d10b1f
RW
15597 ;; test_non_writable_pycache, test_non_creatable_pycache, and
15598 ;; test_frozen (all in numba.tests.test_dispatcher.TestCache).
15599 (substitute* "numba/tests/test_dispatcher.py"
15600 (("def test(_non_writable_pycache)" _ m)
15601 (string-append "def guix_skip" m))
15602 (("def test(_non_creatable_pycache)" _ m)
15603 (string-append "def guix_skip" m))
15604 (("def test(_frozen)" _ m)
15605 (string-append "def guix_skip" m)))
15606
15607 ;; These tests fail because we don't run the tests from the build
15608 ;; directory: test_setup_py_distutils, test_setup_py_setuptools
65f84096 15609 ;; They are in numba.tests.test_pycc.TestDistutilsSupport.
44d10b1f
RW
15610 (substitute* "numba/tests/test_pycc.py"
15611 (("def test(_setup_py_distutils|_setup_py_setuptools)" _ m)
15612 (string-append "def guix_skip" m)))
65f84096
BG
15613
15614 ;; These tests fail because our version of Python does not have
15615 ;; a recognizable front-end for the Numba distribution to use
15616 ;; to check against.
15617 (substitute* "numba/tests/test_entrypoints.py"
15618 (("def test(_init_entrypoint)" _ m)
15619 (string-append "def guix_skip" m)))
15620 (substitute* "numba/tests/test_jitclasses.py"
15621 (("def test(_jitclass_longlabel_not_truncated)" _ m)
15622 (string-append "def guix_skip" m)))
44d10b1f
RW
15623 #t))
15624 (replace 'check
15625 (lambda _
15626 (let ((cwd (getcwd)))
15627 (setenv "PYTHONPATH"
15628 (string-append cwd "/build/"
15629 (find (cut string-prefix? "lib" <>)
15630 (scandir (string-append cwd "/build")))
15631 ":"
15632 (getenv "PYTHONPATH")))
15633 ;; Something is wrong with the PYTHONPATH when running the
15634 ;; tests from the build directory, as it complains about not being
15635 ;; able to import certain modules.
15636 (with-directory-excursion "/tmp"
15637 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))
15638 #t)))))
15639 (propagated-inputs
15640 `(("python-llvmlite" ,python-llvmlite)
15641 ("python-numpy" ,python-numpy)
15642 ("python-singledispatch" ,python-singledispatch)))
15643 ;; Needed for tests.
15644 (inputs
15645 `(("python-jinja2" ,python-jinja2)
15646 ("python-pygments" ,python-pygments)))
15647 (home-page "https://numba.pydata.org")
15648 (synopsis "Compile Python code using LLVM")
15649 (description "Numba gives you the power to speed up your applications with
15650high performance functions written directly in Python. With a few
15651annotations, array-oriented and math-heavy Python code can be just-in-time
15652compiled to native machine instructions, similar in performance to C, C++ and
15653Fortran, without having to switch languages or Python interpreters.
15654
15655Numba works by generating optimized machine code using the LLVM compiler
15656infrastructure at import time, runtime, or statically (using the included pycc
15657tool).")
15658 (license license:bsd-3)))
15659
15660(define-public python-anndata
15661 (package
15662 (name "python-anndata")
8c9372c1 15663 (version "0.6.18")
44d10b1f
RW
15664 (source
15665 (origin
15666 (method url-fetch)
15667 (uri (pypi-uri "anndata" version))
15668 (sha256
15669 (base32
8c9372c1 15670 "03x83yjaccbqszj7x4fwwmpil0ai59yx64d1zmf2691za3j03w73"))))
44d10b1f
RW
15671 (build-system python-build-system)
15672 (propagated-inputs
15673 `(("python-h5py" ,python-h5py)
15674 ("python-natsort" ,python-natsort)
15675 ("python-pandas" ,python-pandas)
15676 ("python-scipy" ,python-scipy)))
15677 (home-page "https://github.com/theislab/anndata")
15678 (synopsis "Annotated data for data analysis pipelines")
15679 (description "Anndata is a package for simple (functional) high-level APIs
15680for data analysis pipelines. In this context, it provides an efficient,
15681scalable way of keeping track of data together with learned annotations and
15682reduces the code overhead typically encountered when using a mostly
15683object-oriented library such as @code{scikit-learn}.")
15684 (license license:bsd-3)))
15685
15686(define-public python-dill
15687 (package
15688 (name "python-dill")
32be3577 15689 (version "0.3.1.1")
44d10b1f
RW
15690 (source
15691 (origin
15692 (method url-fetch)
15693 (uri (pypi-uri "dill" version))
15694 (sha256
32be3577 15695 (base32 "1704g8z70d210ksgbccs2v545v9w0wc6lx15m296alb7jf0yzn22"))))
44d10b1f 15696 (build-system python-build-system)
32be3577
MIP
15697 (arguments
15698 `(#:phases
15699 (modify-phases %standard-phases
15700 (replace 'check
15701 (lambda _
15702 (with-directory-excursion "/tmp"
15703 (invoke "nosetests" "-v"))
15704 #t)))))
15705 (native-inputs
15706 `(("python-nose" ,python-nose)))
15707 (home-page "https://pypi.org/project/dill/")
44d10b1f
RW
15708 (synopsis "Serialize all of Python")
15709 (description "Dill extends Python's @code{pickle} module for serializing
15710and de-serializing Python objects to the majority of the built-in Python
15711types. Dill provides the user the same interface as the @code{pickle} module,
15712and also includes some additional features. In addition to pickling Python
15713objects, @code{dill} provides the ability to save the state of an interpreter
61985d65 15714session in a single command. Hence, it would be feasible to save a
44d10b1f
RW
15715interpreter session, close the interpreter, ship the pickled file to another
15716computer, open a new interpreter, unpickle the session and thus continue from
15717the saved state of the original interpreter session.")
15718 (license license:bsd-3)))
15719
15720(define-public python-multiprocess
15721 (package
15722 (name "python-multiprocess")
fcc4e9e7 15723 (version "0.70.9")
44d10b1f
RW
15724 (source
15725 (origin
15726 (method url-fetch)
15727 (uri (pypi-uri "multiprocess" version))
15728 (sha256
15729 (base32
fcc4e9e7 15730 "1r882nvd44xqwbrclwqx5rhs80l6809rcvpc7pkpgnij06cvvmcz"))))
44d10b1f 15731 (build-system python-build-system)
fcc4e9e7
MIP
15732 (arguments
15733 `(#:phases
15734 (modify-phases %standard-phases
15735 (add-after 'unpack 'disable-broken-tests
15736 (lambda _
15737 ;; This test is broken as there is no keyboard interrupt.
15738 (substitute* "py3.7/multiprocess/tests/__init__.py"
15739 (("^(.*)def test_wait_result"
15740 line indent)
15741 (string-append indent
15742 "@unittest.skip(\"Disabled by Guix\")\n"
15743 line)))
15744 #t))
15745 ;; Tests must be run after installation.
15746 (delete 'check)
15747 (add-after 'install 'check
15748 (lambda* (#:key inputs outputs #:allow-other-keys)
15749 (add-installed-pythonpath inputs outputs)
15750 (invoke "python" "-m" "multiprocess.tests")
15751 #t)))))
44d10b1f
RW
15752 (propagated-inputs
15753 `(("python-dill" ,python-dill)))
fcc4e9e7 15754 (home-page "https://pypi.org/project/multiprocess/")
44d10b1f
RW
15755 (synopsis "Multiprocessing and multithreading in Python")
15756 (description
15757 "This package is a fork of the multiprocessing Python package, a package
15758which supports the spawning of processes using the API of the standard
15759library's @code{threading} module.")
15760 (license license:bsd-3)))
15761
15762(define-public python-toolz
15763 (package
15764 (name "python-toolz")
15765 (version "0.9.0")
15766 (source
15767 (origin
15768 (method url-fetch)
15769 (uri (pypi-uri "toolz" version))
15770 (sha256
15771 (base32
15772 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
15773 (build-system python-build-system)
15774 ;; FIXME: tests cannot be computed: "Can't perform this operation for
15775 ;; unregistered loader type"
15776 (arguments '(#:tests? #f))
15777 (home-page "https://github.com/pytoolz/toolz/")
15778 (synopsis "List processing tools and functional utilities")
15779 (description
15780 "This package provides a set of utility functions for iterators,
15781functions, and dictionaries.")
15782 (license license:bsd-3)))
15783
15784(define-public python2-toolz
15785 (package-with-python2 python-toolz))
15786
15787(define-public python-cytoolz
15788 (package
15789 (name "python-cytoolz")
15790 (version "0.9.0.1")
15791 (source
15792 (origin
15793 (method url-fetch)
15794 (uri (pypi-uri "cytoolz" version))
15795 (sha256
15796 (base32
15797 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
15798 (build-system python-build-system)
15799 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
15800 ;; 'exceptions'"
15801 (arguments '(#:tests? #f))
15802 (propagated-inputs
15803 `(("python-toolz" ,python-toolz)))
15804 (native-inputs
15805 `(("python-cython" ,python-cython)))
15806 (home-page "https://github.com/pytoolz/cytoolz")
15807 (synopsis "High performance functional utilities")
15808 (description
15809 "The cytoolz package implements the same API as provided by toolz. The
15810main differences are that @code{cytoolz} is faster and cytoolz offers a C API
15811that is accessible to other projects developed in Cython.")
15812 (license license:bsd-3)))
15813
15814(define-public python-sortedcontainers
15815 (package
15816 (name "python-sortedcontainers")
b244f166 15817 (version "2.1.0")
44d10b1f
RW
15818 (source
15819 (origin
15820 (method url-fetch)
15821 (uri (pypi-uri "sortedcontainers" version))
15822 (sha256
15823 (base32
b244f166 15824 "0fm0w5id2yhqld95hg2m636vjgkz377rvgdfqaxc25vbylr9lklp"))))
44d10b1f
RW
15825 (build-system python-build-system)
15826 (native-inputs
15827 `(("python-tox" ,python-tox)))
15828 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
15829 (synopsis "Sorted List, Sorted Dict, Sorted Set")
15830 (description
15831 "This package provides a sorted collections library, written in
15832pure-Python.")
15833 (license license:asl2.0)))
15834
15835(define-public python-cloudpickle
15836 (package
15837 (name "python-cloudpickle")
15838 (version "0.6.1")
15839 (source
15840 (origin
15841 (method url-fetch)
15842 (uri (pypi-uri "cloudpickle" version))
15843 (sha256
15844 (base32
15845 "1wdw89mlm7fqa3fm3ymskx05jrys66n8m1z1a8s0mss0799ahsgi"))))
15846 (build-system python-build-system)
15847 ;; FIXME: there are 5 errors in 122 tests:
15848 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.CloudPickleTest)
15849 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.CloudPickleTest)
15850 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.Protocol2CloudPickleTest)
15851 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.Protocol2CloudPickleTest)
15852 ;; ERROR: test_temp_file (tests.cloudpickle_file_test.CloudPickleFileTests)
15853 ;; TypeError: cannot serialize '_io.BufferedRandom' object
15854 (arguments '(#:tests? #f))
15855 (native-inputs
15856 `(("python-pytest" ,python-pytest)
15857 ("python-mock" ,python-mock)
15858 ("python-tornado" ,python-tornado)))
15859 (home-page "https://github.com/cloudpipe/cloudpickle")
15860 (synopsis "Extended pickling support for Python objects")
15861 (description
15862 "Cloudpickle makes it possible to serialize Python constructs not
15863supported by the default pickle module from the Python standard library. It
15864is especially useful for cluster computing where Python expressions are
15865shipped over the network to execute on remote hosts, possibly close to the
15866data.")
15867 (license license:bsd-3)))
15868
15869(define-public python2-cloudpickle
15870 (package-with-python2 python-cloudpickle))
15871
15872(define-public python-locket
15873 (package
15874 (name "python-locket")
15875 (version "0.2.0")
15876 (source
15877 (origin
15878 (method url-fetch)
15879 (uri (pypi-uri "locket" version))
15880 (sha256
15881 (base32
15882 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
15883 (build-system python-build-system)
15884 (home-page "https://github.com/mwilliamson/locket.py")
15885 (synopsis "File-based locks for Python")
15886 (description
15887 "Locket implements a lock that can be used by multiple processes provided
15888they use the same path.")
15889 (license license:bsd-2)))
15890
15891(define-public python2-locket
15892 (package-with-python2 python-locket))
15893
15894(define-public python-blosc
15895 (package
15896 (name "python-blosc")
15897 (version "1.5.1")
15898 (source
15899 (origin
15900 (method url-fetch)
15901 (uri (pypi-uri "blosc" version))
15902 (sha256
15903 (base32
15904 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
15905 (build-system python-build-system)
15906 ;; FIXME: all tests pass, but then this error is printed:
15907 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
15908 (arguments '(#:tests? #f))
15909 (propagated-inputs
15910 `(("python-numpy" ,python-numpy)))
15911 (home-page "https://github.com/blosc/python-blosc")
15912 (synopsis "Python wrapper for the Blosc data compressor library")
15913 (description "Blosc is a high performance compressor optimized for binary
15914data. It has been designed to transmit data to the processor cache faster
15915than the traditional, non-compressed, direct memory fetch approach via a
15916@code{memcpy()} system call.
15917
15918Blosc works well for compressing numerical arrays that contains data with
15919relatively low entropy, like sparse data, time series, grids with
15920regular-spaced values, etc.
15921
15922This Python package wraps the Blosc library.")
15923 (license license:bsd-3)))
15924
15925(define-public python2-blosc
15926 (package-with-python2 python-blosc))
15927
15928(define-public python-partd
15929 (package
15930 (name "python-partd")
15931 (version "0.3.9")
15932 (source
15933 (origin
15934 (method url-fetch)
15935 (uri (pypi-uri "partd" version))
15936 (sha256
15937 (base32
15938 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
15939 (build-system python-build-system)
15940 (propagated-inputs
15941 `(("python-blosc" ,python-blosc)
15942 ("python-locket" ,python-locket)
15943 ("python-numpy" ,python-numpy)
15944 ("python-pandas" ,python-pandas)
15945 ("python-pyzmq" ,python-pyzmq)
15946 ("python-toolz" ,python-toolz)))
15947 (home-page "https://github.com/dask/partd/")
15948 (synopsis "Appendable key-value storage")
15949 (description "Partd stores key-value pairs. Values are raw bytes. We
15950append on old values. Partd excels at shuffling operations.")
15951 (license license:bsd-3)))
15952
15953(define-public python2-partd
15954 (package-with-python2 python-partd))
15955
c70a0191
RW
15956(define-public python-fsspec
15957 (package
15958 (name "python-fsspec")
15959 (version "0.6.1")
15960 (source
15961 (origin
15962 (method url-fetch)
15963 (uri (pypi-uri "fsspec" version))
15964 (sha256
15965 (base32
15966 "1g9ba8v04s1nrh7pvzfm2md7ivl2mrz3hcq3y9d1a44gd62h17zj"))))
15967 (build-system python-build-system)
15968 (arguments '(#:tests? #f)) ; there are none
15969 (home-page "https://github.com/intake/filesystem_spec")
15970 (synopsis "File-system specification")
15971 (description "The purpose of this package is to produce a template or
15972specification for a file-system interface, that specific implementations
15973should follow, so that applications making use of them can rely on a common
15974behavior and not have to worry about the specific internal implementation
15975decisions with any given backend.")
15976 (license license:bsd-3)))
15977
44d10b1f
RW
15978(define-public python-dask
15979 (package
15980 (name "python-dask")
86c7ca07 15981 (version "2.9.0")
44d10b1f
RW
15982 (source
15983 (origin
15984 (method url-fetch)
15985 (uri (pypi-uri "dask" version))
15986 (sha256
86c7ca07 15987 (base32 "1w1hqr8vyx6ygwflj2737dcy0mmgvrc0s602gnny8pzlcbs9m76b"))))
44d10b1f 15988 (build-system python-build-system)
44d10b1f
RW
15989 (arguments
15990 `(#:phases
15991 (modify-phases %standard-phases
86c7ca07 15992 (add-after 'unpack 'disable-broken-tests
44d10b1f 15993 (lambda _
86c7ca07 15994 ;; This test is marked as xfail when pytest-xdist is used.
44d10b1f
RW
15995 (substitute* "dask/tests/test_threaded.py"
15996 (("def test_interrupt\\(\\)" m)
15997 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
15998 m)))
86c7ca07
RW
15999 ;; This one fails with a type error:
16000 ;; TypeError: Already tz-aware, use tz_convert to convert.
16001 (substitute* "dask/dataframe/tests/test_shuffle.py"
16002 (("def test_set_index_timestamp\\(\\)" m)
16003 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
16004 m)))
44d10b1f
RW
16005 #t))
16006 (replace 'check
16007 (lambda _ (invoke "pytest" "-vv"))))))
16008 (propagated-inputs
16009 `(("python-cloudpickle" ,python-cloudpickle)
86c7ca07 16010 ("python-fsspec" ,python-fsspec)
44d10b1f 16011 ("python-numpy" ,python-numpy)
86c7ca07 16012 ("python-packaging" ,python-packaging)
44d10b1f
RW
16013 ("python-pandas" ,python-pandas)
16014 ("python-partd" ,python-partd)
16015 ("python-toolz" ,python-toolz)
16016 ("python-pyyaml" ,python-pyyaml)))
16017 (native-inputs
16018 `(("python-pytest" ,python-pytest)
16019 ("python-pytest-runner" ,python-pytest-runner)))
16020 (home-page "https://github.com/dask/dask/")
16021 (synopsis "Parallel computing with task scheduling")
16022 (description
16023 "Dask is a flexible parallel computing library for analytics. It
16024consists of two components: dynamic task scheduling optimized for computation,
16025and large data collections like parallel arrays, dataframes, and lists that
16026extend common interfaces like NumPy, Pandas, or Python iterators to
16027larger-than-memory or distributed environments. These parallel collections
16028run on top of the dynamic task schedulers. ")
16029 (license license:bsd-3)))
16030
44d10b1f
RW
16031(define-public python-ilinkedlist
16032 (package
16033 (name "python-ilinkedlist")
16034 (version "0.4.0")
16035 (source
16036 (origin
16037 (method url-fetch)
16038 (uri (pypi-uri "ilinkedlist" version))
16039 (sha256
16040 (base32
16041 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
16042 (build-system python-build-system)
16043 (native-inputs `(("python-pytest" ,python-pytest)))
16044 (inputs `(("python" ,python)))
16045 (home-page "https://github.com/luther9/ilinkedlist-py")
16046 (synopsis "Immutable linked list library")
16047 (description
16048 "This is a implementation of immutable linked lists for Python. It
16049contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
16050Since a linked list is treated as immutable, it is hashable, and its length
16051can be retrieved in constant time. Some of the terminology is inspired by
16052LISP. It is possible to create an improper list by creating a @code{Pair}
16053with a non-list @code{cdr}.")
16054 (license license:gpl3+)))
16055
16056(define-public python-readlike
16057 (package
16058 (name "python-readlike")
16059 (version "0.1.3")
16060 (source
16061 (origin
16062 (method url-fetch)
16063 (uri (pypi-uri "readlike" version))
16064 (sha256
16065 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
16066 (build-system python-build-system)
16067 (home-page "https://github.com/jangler/readlike")
16068 (synopsis "GNU Readline-like line editing module")
16069 (description
16070 "This Python module provides line editing functions similar to the default
16071Emacs-style ones of GNU Readline. Unlike the Python standard library's
16072@code{readline} package, this one allows access to those capabilties in settings
16073outside of a standard command-line interface. It is especially well-suited to
16074interfacing with Urwid, due to a shared syntax for describing key inputs.
16075
16076Currently, all stateless Readline commands are implemented. Yanking and history
16077are not supported.")
16078 (license license:expat)))
16079
16080(define-public python2-readlike
16081 (package-with-python2 python-readlike))
16082
16083(define-public python-reparser
16084 (package
16085 (name "python-reparser")
16086 (version "1.4.3")
16087 (source
16088 (origin
16089 (method url-fetch)
16090 (uri (pypi-uri "ReParser" version))
16091 (sha256
16092 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
16093 (build-system python-build-system)
16094 (home-page "https://github.com/xmikos/reparser")
16095 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
16096 (description
16097 "This Python library provides a simple lexer/parser for inline markup based
16098on regular expressions.")
16099 (license license:expat)))
16100
16101(define-public python2-reparser
16102 (let ((reparser (package-with-python2
16103 (strip-python2-variant python-reparser))))
16104 (package (inherit reparser)
16105 (propagated-inputs
16106 `(("python2-enum34" ,python2-enum34)
16107 ,@(package-propagated-inputs reparser))))))
16108
16109(define-public python-precis-i18n
16110 (package
16111 (name "python-precis-i18n")
16112 (version "1.0.0")
16113 (source
16114 (origin
16115 (method url-fetch)
16116 (uri (pypi-uri "precis_i18n" version))
16117 (sha256
16118 (base32
16119 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
16120 (build-system python-build-system)
16121 (home-page "https://github.com/byllyfish/precis_i18n")
16122 (synopsis "Implementation of the PRECIS framework")
16123 (description
16124 "This module implements the PRECIS Framework as described in RFC 8264,
16125RFC 8265 and RFC 8266.")
16126 (license license:expat)))
16127
d0446c4b
RW
16128(define-public python-absl-py
16129 (package
16130 (name "python-absl-py")
16131 (version "0.6.1")
16132 (source
16133 (origin
16134 (method url-fetch)
16135 (uri (pypi-uri "absl-py" version))
16136 (sha256
16137 (base32
16138 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
16139 (build-system python-build-system)
16140 (propagated-inputs
16141 `(("python-six" ,python-six)))
16142 (home-page "https://github.com/abseil/abseil-py")
16143 (synopsis "Abseil Python common libraries")
16144 (description
16145 "This package provides the Abseil Python Common Libraries, a collection
16146of Python libraries for building Python applications.")
16147 (license license:asl2.0)))
16148
81bed4e9
RW
16149(define-public python-astor
16150 (package
16151 (name "python-astor")
16152 (version "0.7.1")
16153 (source
16154 (origin
16155 (method url-fetch)
16156 (uri (pypi-uri "astor" version))
16157 (sha256
16158 (base32
16159 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
16160 (build-system python-build-system)
16161 ;; FIXME: There are two errors and two test failures.
16162 (arguments `(#:tests? #f))
16163 (home-page "https://github.com/berkerpeksag/astor")
39ee82ff 16164 (synopsis "Read and write Python ASTs")
81bed4e9 16165 (description "Astor is designed to allow easy manipulation of Python
39ee82ff 16166source via the Abstract Syntax Tree.")
81bed4e9
RW
16167 (license license:bsd-3)))
16168
39ee82ff
RW
16169(define-public python2-astor
16170 (package-with-python2 python-astor))
16171
22e623ae
RW
16172(define-public python-grpcio
16173 (package
16174 (name "python-grpcio")
16175 (version "1.17.1")
16176 (source
16177 (origin
16178 (method url-fetch)
16179 (uri (pypi-uri "grpcio" version))
16180 (sha256
16181 (base32
16182 "0qb9y6j83nxa6d4kc60i8yfgdm7a8ms7b54kncjzf5y7nsxp8rzx"))))
16183 (build-system python-build-system)
16184 (propagated-inputs
16185 `(("python-six" ,python-six)))
16186 (home-page "https://grpc.io")
16187 (synopsis "HTTP/2-based RPC framework")
16188 (description "This package provides a Python library for communicating
16189with the HTTP/2-based RPC framework gRPC.")
16190 (license license:asl2.0)))
16191
79869f80
RW
16192(define-public python-astunparse
16193 (package
16194 (name "python-astunparse")
47d79541 16195 (version "1.6.2")
79869f80
RW
16196 (source
16197 (origin
16198 (method url-fetch)
16199 (uri (pypi-uri "astunparse" version))
16200 (sha256
47d79541 16201 (base32 "0rzbc44xcvzjhhiy7wac96mgal5mcjz1mfq8rmvgswskf4kf9cys"))))
79869f80 16202 (build-system python-build-system)
47d79541 16203 (arguments '(#:tests? #f)) ; there are none
79869f80
RW
16204 (propagated-inputs
16205 `(("python-six" ,python-six)
16206 ("python-wheel" ,python-wheel)))
16207 (home-page "https://github.com/simonpercivall/astunparse")
16208 (synopsis "AST unparser for Python")
16209 (description "This package provides an AST unparser for Python. It is a
16210factored out version of @code{unparse} found in the Python source
16211distribution.")
16212 (license license:bsd-3)))
16213
2884aac0
RW
16214(define-public python-gast
16215 (package
16216 (name "python-gast")
bd300261 16217 (version "0.2.2")
2884aac0
RW
16218 (source
16219 (origin
16220 (method url-fetch)
16221 (uri (pypi-uri "gast" version))
16222 (sha256
bd300261 16223 (base32 "1w5dzdb3gpcfmd2s0b93d8gff40a1s41rv31458z14inb3s9v4zy"))))
2884aac0
RW
16224 (build-system python-build-system)
16225 (propagated-inputs
16226 `(("python-astunparse" ,python-astunparse)))
16227 (home-page "https://pypi.org/project/gast/")
16228 (synopsis "Generic Python AST that abstracts the underlying Python version")
16229 (description
16230 "GAST provides a compatibility layer between the AST of various Python
16231versions, as produced by @code{ast.parse} from the standard @code{ast}
16232module.")
16233 (license license:bsd-3)))
16234
44d10b1f
RW
16235(define-public python-wikidata
16236 (package
16237 (name "python-wikidata")
16238 (version "0.6.1")
16239 (source
16240 (origin
16241 (method url-fetch)
16242 (uri (pypi-uri "Wikidata" version))
16243 (sha256
16244 (base32
16245 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
16246 (build-system python-build-system)
16247 (propagated-inputs
16248 `(("python-babel" ,python-babel)))
16249 (home-page "https://github.com/dahlia/wikidata")
16250 (synopsis "Wikidata client library")
16251 (description
16252 "This package provides a Python interface to
16253@url{https://www.wikidata.org/, Wikidata}.")
16254 (properties '((upstream-name . "Wikidata")))
16255 (license license:gpl3+)))
16256
16257(define-public python-doctest-ignore-unicode
16258 (package
16259 (name "python-doctest-ignore-unicode")
16260 (version "0.1.2")
16261 (source
16262 (origin
16263 (method url-fetch)
16264 (uri (pypi-uri "doctest-ignore-unicode" version))
16265 (sha256
16266 (base32
16267 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
16268 (build-system python-build-system)
16269 (native-inputs
16270 `(("python-nose" ,python-nose)))
16271 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
16272 (synopsis "Ignore Unicode literal prefixes in doctests")
16273 (description
16274 "This package adds support for a flag to ignore Unicode literal prefixes
16275in doctests.")
16276 (license license:asl2.0)))
16277
16278(define-public python-attr
16279 (package
16280 (name "python-attr")
16281 (version "0.3.1")
16282 (source
16283 (origin
16284 (method url-fetch)
16285 (uri (pypi-uri "attr" version))
16286 (sha256
16287 (base32
16288 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
16289 (build-system python-build-system)
16290 (home-page "https://github.com/denis-ryzhkov/attr")
16291 (synopsis "Decorator for attributes of target function or class")
16292 (description "Simple decorator to set attributes of target function or
16293class in a @acronym{DRY, Don't Repeat Yourself} way.")
16294 (license license:expat)))
f98232a3
VC
16295
16296(define-public python-construct
16297 (package
16298 (name "python-construct")
16299 (version "2.9.45")
16300 (source
16301 (origin
16302 (method url-fetch)
16303 (uri (pypi-uri "construct" version))
16304 (sha256
16305 (base32
16306 "130iy05awzigm2xah2yvlmb08mac5bi4gzr5m3g7k1krs3ps0w92"))))
16307 (build-system python-build-system)
16308 (arguments
16309 `(#:tests? #f)) ; No tests exist.
16310 (propagated-inputs
16311 `(("python-extras" ,python-extras)
16312 ("python-arrow" ,python-arrow)
16313 ("python-numpy" ,python-numpy)
16314 ("python-ruamel.yaml" ,python-ruamel.yaml)))
16315 (home-page "http://construct.readthedocs.io")
16316 (synopsis "Declarative and symmetrical parser and builder for binary data")
16317 (description
16318 "This package provides both simple, atomic constructs (such as
16319integers of various sizes), as well as composite ones which allow you
16320form hierarchical and sequential structures of increasing complexity.
16321It features bit and byte granularity, easy debugging and testing, an
16322easy-to-extend subclass system, and lots of primitive constructs to
16323make your work easier.")
16324 (license license:expat)))
b742c006
LF
16325
16326(define-public python-humanize
16327 (package
16328 (name "python-humanize")
16329 (version "0.5.1")
16330 (source
16331 (origin
16332 (method url-fetch)
16333 (uri (pypi-uri "humanize" version))
16334 (sha256
16335 (base32
16336 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
16337 (arguments
16338 '(#:tests? #f)) ; tests not in pypi archive
16339 (build-system python-build-system)
16340 (home-page "https://github.com/jmoiron/humanize")
16341 (synopsis "Print numerical information in a human-readable form")
16342 (description "This package provides a Python module that displays numbers
16343and dates in \"human readable\" forms. For example, it would display
16344\"12345591313\" as \"12.3 billion\".")
16345 (license license:expat)))
d5bbf66d
LF
16346
16347(define-public python-txaio
16348 (package
16349 (name "python-txaio")
16350 (version "18.8.1")
16351 (source
16352 (origin
16353 (method url-fetch)
16354 (uri (pypi-uri "txaio" version))
16355 (sha256
16356 (base32
16357 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
16358 (build-system python-build-system)
16359 (propagated-inputs
16360 `(("python-twisted" ,python-twisted)
16361 ("python-six" ,python-six)))
16362 (home-page "https://github.com/crossbario/txaio")
16363 (synopsis "Compatibility layer between Python asyncio and Twisted")
16364 (description "Txaio provides a compatibility layer between the Python
16365@code{asyncio} module and @code{Twisted}.")
16366 (license license:expat)))
963dfd3a
RW
16367
16368(define-public python-toolshed
16369 (package
16370 (name "python-toolshed")
16371 (version "0.4.6")
16372 (source
16373 (origin
16374 (method url-fetch)
16375 (uri (pypi-uri "toolshed" version))
16376 (sha256
16377 (base32
16378 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
16379 (build-system python-build-system)
16380 (native-inputs
16381 `(("python-nose" ,python-nose)))
16382 (home-page "https://github.com/brentp/toolshed/")
16383 (synopsis "Collection of modules and functions for working with data")
16384 (description "This is a collection of well-tested, simple modules and
16385functions that aim to reduce boilerplate when working with data.")
16386 (license license:bsd-2)))
c91ecf2d
RW
16387
16388(define-public python-annoy
16389 (package
16390 (name "python-annoy")
16391 (version "1.15.1")
16392 (source
16393 (origin
16394 (method url-fetch)
16395 (uri (pypi-uri "annoy" version))
16396 (sha256
16397 (base32
16398 "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp"))))
16399 (build-system python-build-system)
16400 (native-inputs
16401 `(("python-nose" ,python-nose)))
16402 (home-page "https://github.com/spotify/annoy/")
16403 (synopsis "Approximate nearest neighbors library")
16404 (description
16405 "Annoy is a C++ library with Python bindings to search for points in
16406space that are close to a given query point. It also creates large read-only
16407file-based data structures that are @code{mmap}ped into memory so that many
16408processes may share the same data.")
16409 (license license:asl2.0)))
412342d1 16410
79bfa422 16411(define-public python-pylzma
412342d1 16412 (package
79bfa422
DM
16413 (name "python-pylzma")
16414 (version "0.5.0")
16415 (source
16416 (origin
16417 (method url-fetch)
16418 (uri (pypi-uri "pylzma" version))
16419 (sha256
16420 (base32
16421 "074anvhyjgsv2iby2ql1ixfvjgmhnvcwjbdz8gk70xzkzcm1fx5q"))))
412342d1 16422 (build-system python-build-system)
79bfa422
DM
16423 (home-page "http://www.joachim-bauch.de/projects/pylzma/")
16424 (synopsis "Python bindings for the LZMA library by Igor Pavlov.")
16425 (description "This package provides Python bindings for the LZMA library
16426by Igor Pavlov.")
16427 (license license:lgpl2.1+)))
16428
16429(define-public python2-pylzma
16430 (package-with-python2 python-pylzma))
f825e605 16431
6609ebe7
AG
16432(define-public python2-zeroconf
16433 (package
16434 (name "python2-zeroconf")
16435
16436 ;; This is the last version that supports Python 2.x.
16437 (version "0.19.1")
16438 (source
16439 (origin
16440 (method url-fetch)
16441 (uri (pypi-uri "zeroconf" version))
16442 (sha256
16443 (base32
16444 "0ykzg730n915qbrq9bn5pn06bv6rb5zawal4sqjyfnjjm66snkj3"))))
16445 (build-system python-build-system)
16446 (arguments
16447 `(#:python ,python-2
16448 #:phases
16449 (modify-phases %standard-phases
16450 (add-after 'unpack 'patch-requires
16451 (lambda* (#:key inputs #:allow-other-keys)
16452 (substitute* "setup.py"
16453 (("enum-compat")
16454 "enum34"))
16455 #t)))))
16456 (native-inputs
16457 `(("python2-six" ,python2-six)
16458 ("python2-enum32" ,python2-enum34)
16459 ("python2-netifaces" ,python2-netifaces)
16460 ("python2-typing" ,python2-typing)))
16461 (home-page "https://github.com/jstasiak/python-zeroconf")
16462 (synopsis "Pure Python mDNS service discovery")
16463 (description
16464 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
16465compatible).")
16466 (license license:lgpl2.1+)))
16467
f825e605
GLV
16468(define-public python-bsddb3
16469 (package
16470 (name "python-bsddb3")
16471 (version "6.2.6")
16472 (source
16473 (origin
16474 (method url-fetch)
16475 (uri (pypi-uri "bsddb3" version))
16476 (sha256
16477 (base32
16478 "019db2y6bfmiqbrgg9x9f6h72qjmqh05czdn2v5sy9bl0gs23mj2"))))
16479 (build-system python-build-system)
16480 (inputs
16481 `(("bdb" ,bdb)))
16482 (arguments
16483 '(#:phases
16484 (modify-phases %standard-phases
16485 (add-after 'unpack 'configure-locations
16486 (lambda* (#:key inputs #:allow-other-keys)
16487 (setenv "BERKELEYDB_DIR" (assoc-ref inputs "bdb"))
16488 (setenv "YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION" "1")
16489 #t))
16490 (replace 'check
16491 (lambda _
16492 (invoke "python3" "test3.py" "-v"))))))
16493 (home-page "https://www.jcea.es/programacion/pybsddb.htm")
16494 (synopsis "Python bindings for Oracle Berkeley DB")
16495 (description
16496 "This module provides a nearly complete wrapping of the Oracle/Sleepycat
16497C API for the Database Environment, Database, Cursor, Log Cursor, Sequence and
16498Transaction objects, and each of these is exposed as a Python type in the
16499bsddb3.db module. The database objects can use various access methods: btree,
16500hash, recno, and queue. Complete support of Berkeley DB distributed
16501transactions. Complete support for Berkeley DB Replication Manager.
16502Complete support for Berkeley DB Base Replication. Support for RPC.")
16503 (license license:bsd-3)))
edeb04bf
PL
16504
16505(define-public python-dbfread
16506 (package
16507 (name "python-dbfread")
16508 (version "2.0.7")
16509 (source (origin
16510 (method url-fetch)
16511 (uri (pypi-uri "dbfread" version))
16512 (sha256
16513 (base32
16514 "0gdpwdzf1fngsi6jrdyj4qdf6cr7gnnr3zp80dpkzbgz0spskj07"))))
16515 (build-system python-build-system)
16516 (native-inputs
16517 `(("python-pytest" ,python-pytest)))
16518 (home-page "https://dbfread.readthedocs.io")
16519 (synopsis "Read DBF Files with Python")
16520 (description
16521 "This library reads DBF files and returns the data as native Python data
16522types for further processing. It is primarily intended for batch jobs and
16523one-off scripts.")
16524 (license license:expat)))
e308b4f0
JM
16525
16526(define-public python-cached-property
16527 (package
16528 (name "python-cached-property")
16529 (version "1.5.1")
16530 (source
16531 (origin
16532 (method url-fetch)
16533 (uri (pypi-uri "cached-property" version))
16534 (sha256
16535 (base32
16536 "010m1bl380l2r3vwq24r5v14l6gwvgm9v0mqqjkjss552jgsa5wj"))))
16537 (build-system python-build-system)
16538 (arguments
16539 `(#:phases
16540 (modify-phases %standard-phases
16541 ;; https://github.com/pydanny/cached-property/issues/131
16542 ;; recent versions of freezegun break one test
16543 (add-after 'unpack 'disable-broken-test
16544 (lambda _
16545 (substitute* "tests/test_cached_property.py"
16546 (("def test_threads_ttl_expiry\\(self\\)" m)
16547 (string-append "@unittest.skip(\"Disabled by Guix\")\n"
16548 " " m)))
16549 #t)))))
16550 (native-inputs
16551 `(("python-freezegun" ,python-freezegun)))
16552 (home-page
16553 "https://github.com/pydanny/cached-property")
16554 (synopsis
16555 "Decorator for caching properties in classes")
16556 (description
16557 "This package provides a decorator which makes caching
16558time-or-computationally-expensive properties quick and easy and works in Python
165592 or 3.")
16560 (license license:bsd-3)))
dfe8a704
NG
16561
16562(define-public python-folium
16563 (package
16564 (name "python-folium")
d3bc1ea9 16565 (version "0.10.1")
dfe8a704
NG
16566 (source
16567 (origin
16568 (method url-fetch)
16569 (uri (pypi-uri "folium" version))
16570 (sha256
16571 (base32
d3bc1ea9 16572 "0gcc267wxwxr57ry86pqpbiyfvl0g48hfvgy0f2mz9s58g87kgzd"))))
dfe8a704
NG
16573 (build-system python-build-system)
16574 (propagated-inputs
16575 `(("python-branca" ,python-branca)
16576 ("python-jinja2" ,python-jinja2)
16577 ("python-numpy" ,python-numpy)
16578 ("python-requests" ,python-requests)))
16579 (native-inputs
16580 `(("python-pytest" ,python-pytest)))
16581 (home-page "https://github.com/python-visualization/folium")
16582 (synopsis "Make beautiful maps with Leaflet.js & Python")
16583 (description "@code{folium} makes it easy to visualize data that’s been
16584manipulated in Python on an interactive leaflet map. It enables both the
16585binding of data to a map for @code{choropleth} visualizations as well as
16586passing rich vector/raster/HTML visualizations as markers on the map.
16587
16588The library has a number of built-in tilesets from OpenStreetMap, Mapbox, and
16589Stamen, and supports custom tilesets with Mapbox or Cloudmade API keys. It
16590supports Image, Video, GeoJSON and TopoJSON overlays.")
16591 (license license:expat)))
9dd5f475
LC
16592
16593(define-public jube
16594 (package
16595 ;; This is a command-line tool, so no "python-" prefix.
16596 (name "jube")
16597 (version "2.2.2")
16598 (source (origin
16599 (method url-fetch)
16600 (uri (string-append
16601 "http://apps.fz-juelich.de/jsc/jube/jube2/download.php?version="
16602 version))
16603 (sha256
16604 (base32
16605 "0xq4k1q63s1p6swgyp61vahlrd1fqmgbm0gm5kpj8ikwy0yc0nqk"))
16606 (file-name (string-append "jube-" version ".tar.gz"))))
16607 (build-system python-build-system)
16608 (home-page "https://apps.fz-juelich.de/jsc/jube/jube2/docu/index.html")
16609 (synopsis "Benchmarking environment")
16610 (description
16611 "JUBE helps perform and analyze benchmarks in a systematic way. For each
16612benchmarked application, benchmark data is stored in a format that allows JUBE
16613to deduct the desired information. This data can be parsed by automatic pre-
16614and post-processing scripts that draw information and store it more densely
16615for manual interpretation.")
a9f33960 16616 (license license:gpl3+)))
66436424
NG
16617
16618(define-public python-pyroutelib3
16619 (package
16620 (name "python-pyroutelib3")
16621 (version "1.3.post1")
16622 (source
16623 (origin
16624 (method url-fetch)
16625 (uri (pypi-uri "pyroutelib3" version))
16626 (sha256
16627 (base32
16628 "1hpbydpn2alyswiajfbvhzq4c7f36vdmvxy91hgv8l1lb2g2vfrj"))))
16629 (build-system python-build-system)
16630 (propagated-inputs
16631 `(("python-dateutil" ,python-dateutil)))
16632 (home-page "https://github.com/MKuranowski/pyroutelib3")
16633 (synopsis "Library for simple routing on OSM data")
16634 (description "Library for simple routing on OSM data")
16635 (license license:gpl3+)))
30e7c03a 16636
c1bbef69
16637(define-public python-bibtexparser
16638 (package
16639 (name "python-bibtexparser")
16640 (version "1.1.0")
16641 (source
16642 (origin
16643 (method url-fetch)
16644 (uri (pypi-uri "bibtexparser" version))
16645 (sha256
16646 (base32
16647 "0zwhfkrzf3n5847dbnfng92k7ak199l9v6x6ax3dgdidfpm6d2fz"))))
16648 (build-system python-build-system)
16649 (propagated-inputs
16650 `(("python-pyparsing" ,python-pyparsing)))
16651 (native-inputs
16652 `(("python-future" ,python-future)))
16653 (home-page "https://github.com/sciunto-org/python-bibtexparser")
16654 (synopsis "Python library to parse BibTeX files")
16655 (description "BibtexParser is a Python library to parse BibTeX files.")
16656 (license (list license:bsd-3 license:lgpl3))))
8581b40d
HG
16657
16658(define-public python-distro
16659 (package
16660 (name "python-distro")
16661 (version "1.4.0")
16662 (source
16663 (origin
16664 (method url-fetch)
16665 (uri (pypi-uri "distro" version))
16666 (sha256
16667 (base32
16668 "0mrg75w4ap7mdzyga75yaid9n8bgb345ih5mwjp3plj6v1jxwb9n"))))
16669 (build-system python-build-system)
16670 (native-inputs
16671 `(("python-pytest" ,python-pytest)))
16672 (home-page "https://github.com/nir0s/distro")
16673 (synopsis
16674 "OS platform information API")
16675 (description
16676 "@code{distro} provides information about the OS distribution it runs on,
16677such as a reliable machine-readable ID, or version information.
16678
16679It is the recommended replacement for Python's original
16680`platform.linux_distribution` function (which will be removed in Python 3.8).
16681@code{distro} also provides a command-line interface to output the platform
16682information in various formats.")
16683 (license license:asl2.0)))
f2f41e1a
HG
16684
16685(define-public python-cairosvg
16686 (package
16687 (name "python-cairosvg")
16688 (version "2.4.2")
16689 (source
16690 (origin
16691 (method url-fetch)
16692 (uri (pypi-uri "CairoSVG" version))
16693 (sha256
16694 (base32 "1bb7irxbaxxb9ahm3z5wsx1q96mm5gzskc7b6q07h9ikcnb8yrjf"))))
16695 (build-system python-build-system)
16696 (arguments
16697 `(#:phases
16698 (modify-phases %standard-phases
16699 (replace 'check
16700 (lambda _ (invoke "pytest"))))))
16701 (propagated-inputs
16702 `(("python-cairocffi" ,python-cairocffi)
16703 ("python-cssselect2" ,python-cssselect2)
16704 ("python-defusedxml" ,python-defusedxml)
16705 ("python-pillow" ,python-pillow)
16706 ("python-tinycss2" ,python-tinycss2)))
16707 (native-inputs
16708 `(("python-pytest-flake8" ,python-pytest-flake8)
16709 ("python-pytest-isort" ,python-pytest-isort)
16710 ("python-pytest-runner" ,python-pytest-runner)))
16711 (home-page "https://cairosvg.org/")
16712 (synopsis "SVG to PDF/PS/PNG converter based on Cairo")
16713 (description "CairoSVG is a SVG converter based on Cairo. It can export
16714SVG files to PDF, PostScript and PNG files. The main part of CairoSVG is a
16715SVG parser, trying to follow the SVG 1.1 recommendation from the W3C. Once
16716parsed, the result is drawn to a Cairo surface that can be exported to
16717qvarious formats: PDF, PostScript, PNG and even SVG.")
16718 (license license:lgpl3+)))
ea1801e0
HG
16719
16720(define-public python-pyphen
16721 (package
16722 (name "python-pyphen")
16723 (version "0.9.5")
16724 (source
16725 (origin
16726 (method url-fetch)
16727 (uri (pypi-uri "Pyphen" version))
16728 (sha256
16729 (base32 "08c9y69ry9d6m4zalhnalg86lsp9v2j5n1ziw5vxfmiihx83lqrv"))))
16730 (build-system python-build-system)
16731 ;; TODO: Use the Guix system hyphenation packages hyphen-* rather than the
16732 ;; embedded set provided by upstream - like Debian does.
16733 (home-page "https://github.com/Kozea/Pyphen")
16734 (synopsis "Pure Python module to hyphenate text")
16735 (description "Pyphen is a pure Python module to hyphenate text using
16736existing Hunspell hyphenation dictionaries.")
16737 (license (list license:gpl2 license:lgpl2.1 license:mpl1.1))))
85cfb0e9
CL
16738
16739(define-public python-intelhex
16740 (package
16741 (name "python-intelhex")
16742 (version "2.2.1")
16743 (source
16744 (origin
16745 (method url-fetch)
16746 (uri (pypi-uri "intelhex" version))
16747 (sha256
16748 (base32
16749 "0ckqjbxd8gwcg98gfzpn4vq1qxzfvq3rdbrr1hikj1nmw08qb780"))))
16750 (build-system python-build-system)
16751 (arguments '(#:tests? #f)) ;issue with version
16752 (home-page "https://pypi.org/project/IntelHex/")
16753 (synopsis "Python library for Intel HEX files manipulations")
16754 (description "The Intel HEX file format is widely used in microprocessors
16755and microcontrollers area (embedded systems etc.) as the de facto standard for
16756representation of code to be programmed into microelectronic devices. This
16757package provides an intelhex Python library to read, write, create from
16758scratch and manipulate data from Intel HEX file format. It also includes
16759several convenience Python scripts, including \"classic\" hex2bin and bin2hex
16760converters and more, those based on the library itself.")
16761 (license license:bsd-3)))
34bf6869
CL
16762
16763(define-public python-pykwalify
16764 (package
16765 (name "python-pykwalify")
16766 (version "1.7.0")
16767 (source
16768 (origin
16769 (method url-fetch)
16770 (uri (pypi-uri "pykwalify" version))
16771 (sha256
16772 (base32
16773 "1cnfzkg1b01f825ikpw2fhjclf9c8akxjfrbd1vc22x1lg2kk2vy"))))
16774 (build-system python-build-system)
16775 (arguments '(#:tests? #f)) ;missing dependencies
16776 (propagated-inputs
16777 `(("python-dateutil" ,python-dateutil)
16778 ("python-docopt" ,python-docopt)
16779 ("python-pyyaml" ,python-pyyaml)))
16780 (home-page "https://github.com/grokzen/pykwalify")
16781 (synopsis
16782 "Python lib/cli for JSON/YAML schema validation")
16783 (description
16784 "This package provides a parser, schema validator, and data binding tool
16785for YAML and JSON.")
16786 (license license:expat)))
e2ebbbcc
KK
16787
16788(define-public python-dbusmock
16789 (package
022b0d5f
BG
16790 (name "python-dbusmock")
16791 (version "0.18.3")
16792 (source
16793 (origin
16794 (method url-fetch)
16795 (uri (pypi-uri "python-dbusmock" version))
16796 (sha256
e2ebbbcc 16797 (base32
022b0d5f
BG
16798 "0hp2kyac88nh9iv6l8hlmv7s1sa1s5f1a3wc2pmlmmxnd211fjlr"))))
16799 (build-system python-build-system)
16800 (arguments
16801 '(#:phases
16802 (modify-phases %standard-phases
16803 (add-after 'unpack 'patch-shell-path
16804 (lambda _
16805 (substitute* "tests/test_code.py"
16806 (("/bin/bash") (which "bash")))
16807 #t)))))
16808 (native-inputs
16809 `(;; For tests.
16810 ("dbus" ,dbus) ; for dbus-daemon
16811 ("python-nose" ,python-nose)
16812 ("which" ,which)))
16813 (propagated-inputs
16814 `(("python-dbus" ,python-dbus)
16815 ("python-pygobject" ,python-pygobject)))
16816 (home-page "https://github.com/martinpitt/python-dbusmock")
16817 (synopsis "Python library for mock D-Bus objects")
16818 (description "python-dbusmock allows for the easy creation of mock objects on
e2ebbbcc
KK
16819D-Bus. This is useful for writing tests for software which talks to D-Bus
16820services such as upower, systemd, logind, gnome-session or others, and it is
16821hard (or impossible without root privileges) to set the state of the real
16822services to what you expect in your tests.")
022b0d5f 16823 (license license:lgpl3+)))
b657b23f
BG
16824
16825(define-public python-ujson
16826 (package
16827 (name "python-ujson")
16828 (version "1.35")
16829 (source
16830 (origin
16831 (method url-fetch)
16832 (uri (pypi-uri "ujson" version))
16833 (sha256
16834 (base32
16835 "11jz5wi7mbgqcsz52iqhpyykiaasila4lq8cmc2d54bfa3jp6q7n"))))
16836 (build-system python-build-system)
16837 (home-page "http://www.esn.me")
16838 (synopsis
16839 "Ultra fast JSON encoder and decoder for Python")
16840 (description
16841 "UltraJSON is an ultra fast JSON encoder and decoder written in pure C with
16842 bindings for Python 2.5+ and 3.")
16843 (license license:bsd-3)))
16844
16845(define-public python2-ujson
16846 (package-with-python2 python-ujson))
dbcef44a
MIP
16847
16848(define-public python-iocapture
16849 ;; The latest release is more than a year older than this commit.
16850 (let ((commit "fdc021c431d0840303908dfc3ca8769db383595c")
16851 (revision "1"))
16852 (package
16853 (name "python-iocapture")
16854 (version "0.1.2")
16855 (source
16856 (origin
16857 (method git-fetch)
16858 (uri (git-reference
16859 (url "https://github.com/oinume/iocapture.git")
16860 (commit commit)))
16861 (file-name (git-file-name name version))
16862 (sha256
16863 (base32
16864 "1mkbhqibxvgwg0p7slr8dfraa3g2s6bsayladhax2jccwj4kcndz"))))
16865 (build-system python-build-system)
16866 (arguments
16867 `(#:phases
16868 (modify-phases %standard-phases
16869 (delete 'check)
16870 (add-after 'install 'check
16871 (lambda* (#:key inputs outputs #:allow-other-keys)
16872 (add-installed-pythonpath inputs outputs)
16873 (invoke "py.test" "-v" "tests")
16874 #t)))))
16875 (propagated-inputs
16876 `(("python-flexmock" ,python-flexmock)
16877 ("python-pytest" ,python-pytest)
16878 ("python-pytest-cov" ,python-pytest-cov)
16879 ("python-six" ,python-six)))
16880 (home-page "https://github.com/oinume/iocapture")
16881 (synopsis "Python capturing tool for stdout and stderr")
16882 (description
16883 "This package helps you to capture the standard out (stdout) and the
16884standard error channel (stderr) in your program.")
16885 (license license:expat))))
db6bd842
MIP
16886
16887(define-public python-argh
16888 ;; There are 21 commits since the latest release containing important
16889 ;; improvements.
16890 (let ((commit "dcd3253f2994400a6a58a700c118c53765bc50a4")
16891 (revision "1"))
16892 (package
16893 (name "python-argh")
16894 (version (git-version "0.26.2" revision commit))
16895 (source
16896 (origin
16897 (method git-fetch)
16898 (uri (git-reference
16899 (url "https://github.com/neithere/argh.git")
16900 (commit commit)))
16901 (file-name (git-file-name name version))
16902 (sha256
16903 (base32
16904 "1p5h3dnpbsjmqrvil96s71asc6i3gpinmbrabqmwnrsxprz7r3ns"))))
16905 (build-system python-build-system)
16906 (propagated-inputs
16907 `(("python-iocapture" ,python-iocapture)
16908 ("python-mock" ,python-mock)
16909 ("python-pytest" ,python-pytest)
16910 ("python-pytest-cov" ,python-pytest-cov)
16911 ("python-pytest-xdist" ,python-pytest-xdist)
16912 ("python-tox" ,python-tox)))
16913 (home-page "https://github.com/neithere/argh/")
16914 (synopsis "Argparse wrapper with natural syntax")
16915 (description
16916 "python-argh is a small library that provides several layers of
16917abstraction on top of @code{python-argparse}. The layers can be mixed. It is
16918always possible to declare a command with the highest possible (and least
16919flexible) layer and then tune the behaviour with any of the lower layers
16920including the native API of @code{python-argparse}.")
16921 (license license:lgpl3+))))
073723fa
MIP
16922
16923(define-public python-ppft
16924 (package
16925 (name "python-ppft")
16926 (version "1.6.6.1")
16927 (source
16928 (origin
16929 (method url-fetch)
16930 (uri (pypi-uri "ppft" version))
16931 (sha256
16932 (base32
16933 "1z1invkhszc5d2mvgr221v7cszzifcc77mz0pv3wjp6x5q2768cy"))))
16934 (build-system python-build-system)
16935 (arguments '(#:tests? #f)) ; there are none
16936 (propagated-inputs
16937 `(("python-six" ,python-six)))
16938 (home-page "https://pypi.org/project/ppft/")
16939 (synopsis "Fork of Parallel Python")
16940 (description
16941 "This package is a fork of Parallel Python. The Parallel Python
16942module (@code{pp}) provides an easy and efficient way to create
16943parallel-enabled applications for @dfn{symmetric multiprocessing} (SMP)
16944computers and clusters. It features cross-platform portability and dynamic
16945load balancing.")
16946 (license license:bsd-3)))
8451ea19
MIP
16947
16948(define-public python-pox
16949 (package
16950 (name "python-pox")
16951 (version "0.2.7")
16952 (source
16953 (origin
16954 (method url-fetch)
16955 (uri (pypi-uri "pox" version))
16956 (sha256
16957 (base32
16958 "0y17ckc2p6i6709s279sjdj4q459mpcc38ymg9zv9y6vl6jf3bq6"))))
16959 (build-system python-build-system)
16960 (arguments
16961 `(#:phases
16962 (modify-phases %standard-phases
16963 (replace 'check
16964 (lambda _
16965 (mkdir-p "/tmp/guix")
16966 (setenv "SHELL" "bash")
16967 (setenv "USERNAME" "guix")
16968 (setenv "HOME" "/tmp/guix") ; must end on USERNAME...
16969 (invoke "py.test" "-vv")
16970 #t)))))
16971 (native-inputs
16972 `(("python-pytest" ,python-pytest)
16973 ("which" ,which)))
16974 (home-page "https://pypi.org/project/pox/")
16975 (synopsis "Python utilities for filesystem exploration and automated builds")
16976 (description
16977 "Pox provides a collection of utilities for navigating and manipulating
16978filesystems. This module is designed to facilitate some of the low level
16979operating system interactions that are useful when exploring a filesystem on a
16980remote host. Pox provides Python equivalents of several shell commands such
16981as @command{which} and @command{find}. These commands allow automated
16982discovery of what has been installed on an operating system, and where the
16983essential tools are located.")
16984 (license license:bsd-3)))
7e476ae8
MIP
16985
16986(define-public python-pathos
16987 (package
16988 (name "python-pathos")
16989 (version "0.2.5")
16990 (source
16991 (origin
16992 (method url-fetch)
16993 (uri (pypi-uri "pathos" version))
16994 (sha256
16995 (base32
16996 "0in8hxdz7k081ijn6q94gr39ycy7363sx4zysmbwyvd7snqjrbi1"))))
16997 (build-system python-build-system)
8f82e7e3
EF
16998 (arguments
16999 '(#:phases
17000 (modify-phases %standard-phases
17001 (replace 'check
17002 (lambda _
17003 (setenv "PYTHONPATH"
17004 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
17005 (invoke "python" "./tests/__main__.py"))))))
7e476ae8
MIP
17006 (propagated-inputs
17007 `(("python-dill" ,python-dill)
17008 ("python-multiprocess" ,python-multiprocess)
17009 ("python-pox" ,python-pox)
17010 ("python-ppft" ,python-ppft)))
8f82e7e3
EF
17011 (native-inputs
17012 `(("python-pytest" ,python-pytest)))
7e476ae8
MIP
17013 (home-page "https://pypi.org/project/pathos/")
17014 (synopsis
17015 "Parallel graph management and execution in heterogeneous computing")
17016 (description
17017 "Python-pathos is a framework for heterogenous computing. It provides a
17018consistent high-level interface for configuring and launching parallel
17019computations across heterogenous resources. Python-pathos provides configurable
17020launchers for parallel and distributed computing, where each launcher contains
17021the syntactic logic to configure and launch jobs in an execution environment.")
17022 (license license:bsd-3)))
54e5ee5a
BG
17023
17024(define-public python-flit
17025 (package
17026 (name "python-flit")
17027 (version "2.1.0")
17028 (source
17029 (origin
17030 (method url-fetch)
17031 (uri (pypi-uri "flit" version))
17032 (sha256
17033 (base32
17034 "0h5vvmqinqzn97mr3ix7zx53af9ad4fimjjwqpx88yp8qhz4r5bc"))))
17035 (build-system python-build-system)
17036 (arguments
17037 `(#:tests? #f)) ; XXX: Check requires network access.
17038 (home-page "https://flit.readthedocs.io/")
17039 (synopsis
17040 "Simple packaging tool for simple packages")
17041 (description
17042 "Flit is a simple way to put Python packages and modules on PyPI. Flit
17043packages a single importable module or package at a time, using the import
17044name as the name on PyPI. All subpackages and data files within a package
17045are included automatically.")
17046 (license license:bsd-3)))
02139b42
BG
17047
17048(define-public python-pathtools
17049 (package
17050 (name "python-pathtools")
17051 (version "0.1.2")
17052 (source
17053 (origin
17054 (method url-fetch)
17055 (uri (pypi-uri "pathtools" version))
17056 (sha256
17057 (base32
17058 "1h7iam33vwxk8bvslfj4qlsdprdnwf8bvzhqh3jq5frr391cadbw"))))
17059 (build-system python-build-system)
17060 (home-page
17061 "https://github.com/gorakhargosh/pathtools")
17062 (synopsis "Path utilities for Python")
17063 (description "Pattern matching and various utilities for file systems
17064paths.")
17065 (license license:expat)))
6b520177
JG
17066
17067(define-public python-fastentrypoints
17068 (package
17069 (name "python-fastentrypoints")
17070 (version "0.12")
17071 (source
17072 (origin
17073 (method url-fetch)
17074 (uri (pypi-uri "fastentrypoints" version))
17075 (sha256
17076 (base32
17077 "02s1j8i2dzbpbwgq2a3fiqwm3cnmhii2qzc0k42l0rdxd4a4ya7z"))))
17078 (build-system python-build-system)
17079 (home-page
17080 "https://github.com/ninjaaron/fast-entry_points")
17081 (synopsis
17082 "Makes entry_points specified in setup.py load more quickly")
17083 (description
17084 "Using entry_points in your setup.py makes scripts that start really
17085slowly because it imports pkg_resources. This package allows such setup
17086scripts to load entry points more quickly.")
17087 (license license:bsd-3)))
c5eb8cf8
JG
17088
17089(define-public python-funcparserlib
17090 (package
17091 (name "python-funcparserlib")
17092 (version "0.3.6")
17093 (source
17094 (origin
17095 (method url-fetch)
17096 (uri (pypi-uri "funcparserlib" version))
17097 (sha256
17098 (base32
17099 "07f9cgjr3h4j2m67fhwapn8fja87vazl58zsj4yppf9y3an2x6dp"))))
17100 (native-inputs
17101 `(("python-tox" ,python-tox)))
17102 (arguments
17103 `(#:phases
17104 (modify-phases %standard-phases
17105 (replace 'check
17106 (lambda _
17107 (invoke "tox"))))))
17108 (build-system python-build-system)
17109 (home-page
17110 "https://github.com/vlasovskikh/funcparserlib")
17111 (synopsis
17112 "Recursive descent parsing library based on functional combinators")
17113 (description
11140cf1 17114 "This package is a recursive descent parsing library for Python based on
c5eb8cf8
JG
17115functional combinators. Parser combinators are just higher-order functions
17116that take parsers as their arguments and return them as result values.")
17117 (license license:expat)))
602f3b67
NG
17118
17119(define-public python-speg
17120 (package
17121 (name "python-speg")
17122 (version "0.3")
17123 (source
17124 (origin
17125 (method url-fetch)
17126 (uri (pypi-uri "speg" version ".zip"))
17127 (sha256
17128 (base32 "0w9y4jf4787dzhy6rvhwi0mpl0r8qkqmqmyv2hpwdpv8w53yzjqh"))))
17129 (arguments
17130 `(#:tests? #f)) ;FIXME: tests fail, not sure why
17131 (native-inputs
17132 `(("unzip" ,unzip)))
17133 (build-system python-build-system)
17134 (home-page "https://github.com/avakar/speg")
17135 (synopsis "PEG-based parser interpreter with memoization")
17136 (description "This package is a PEG-based parser and interpreter with
17137memoization.")
17138 (license license:expat)))
07c8177b
NG
17139
17140(define-public python-cson
17141 (package
17142 (name "python-cson")
17143 (version "0.8")
17144 (source
17145 (origin
17146 (method url-fetch)
17147 (uri (pypi-uri "cson" version))
17148 (sha256
17149 (base32 "00cyvigg4npbph39ghkg77xbxisa6plf75vii24igxfizik0337f"))))
17150 (build-system python-build-system)
17151 (propagated-inputs
17152 `(("python-speg" ,python-speg)))
17153 (home-page "https://github.com/avakar/pycson")
17154 (synopsis "Parser for Coffeescript Object Notation (CSON)")
17155 (description "This package is a parser for Coffeescript Object
17156Notation (CSON).")
17157 (license license:expat)))
e24c672e
LDB
17158
17159(define-public python-asynctest
17160 (package
17161 (name "python-asynctest")
17162 (version "0.13.0")
17163 (source
17164 (origin
17165 (method url-fetch)
17166 (uri (pypi-uri "asynctest" version))
17167 (sha256
17168 (base32
17169 "1b3zsy7p84gag6q8ai2ylyrhx213qdk2h2zb6im3xn0m5n264y62"))))
17170 (build-system python-build-system)
17171 (arguments
17172 '(#:phases
17173 (modify-phases %standard-phases
17174 (replace 'check
17175 (lambda _
17176 (invoke "python" "-X" "dev" "-m" "unittest" "-v" "test")))
17177 (add-after 'unpack 'disable-tests
17178 (lambda* _
17179 (substitute* "test/test_selector.py"
17180 ;; XXX: This test fails for unknown reason inside the build
17181 ;; environment.
17182 (("def test_events_watched_outside_test_are_ignored")
17183 "@unittest.skip('disabled by guix')
17184 def test_events_watched_outside_test_are_ignored")))))))
17185 (home-page "https://github.com/Martiusweb/asynctest")
17186 (synopsis "Extension of unittest for testing asyncio libraries")
17187 (description
17188 "The package asynctest is built on top of the standard unittest module
17189and cuts down boilerplate code when testing libraries for asyncio.")
17190 (license license:asl2.0)))
1cc9c38e
LDB
17191
17192(define-public python-aionotify
17193 (package
17194 (name "python-aionotify")
17195 (version "0.2.0")
17196 (source
17197 (origin
17198 ;; Source tarball on PyPi lacks tests
17199 (method git-fetch)
17200 (uri (git-reference
17201 (url "https://github.com/rbarrois/aionotify")
17202 (commit (string-append "v" version))))
17203 (file-name (git-file-name name version))
17204 (sha256
17205 (base32 "1sk9i8czxgsbrswsf1nlb4c82vgnlzi8zrvrxdip92w2z8hqh43y"))))
17206 (build-system python-build-system)
17207 (native-inputs `(("python-asynctest" ,python-asynctest)))
17208 (home-page "https://github.com/rbarrois/aionotify")
17209 (synopsis "Asyncio-powered inotify library")
17210 (description
17211 "@code{aionotify} is a simple, asyncio-based inotify library.")
17212 (license license:bsd-3)))
84efaa3b
LDB
17213
17214(define-public python-forbiddenfruit
17215 (package
17216 (name "python-forbiddenfruit")
17217 (version "0.1.3")
17218 (source
17219 (origin
17220 ;; Source tarball on PyPi lacks Makefile that builds and runs tests
17221 (method git-fetch)
17222 (uri (git-reference
17223 (url "https://github.com/clarete/forbiddenfruit")
17224 (commit version)))
17225 (file-name (git-file-name name version))
17226 (sha256
17227 (base32 "1fp2xvdqpi910j9r3q68x38phpxbm700gjdi2m2j5gs91xdnyyh2"))))
17228 (build-system python-build-system)
17229 (arguments
17230 '(#:phases
17231 (modify-phases %standard-phases
17232 (replace 'check
17233 (lambda _
17234 (invoke "make" "SKIP_DEPS=1"))))))
17235 (native-inputs
17236 `(("python-nose" ,python-nose)
17237 ("python-coverage" ,python-coverage)))
17238 (home-page "https://github.com/clarete/forbiddenfruit")
17239 (synopsis "Patch python built-in objects")
17240 (description "This project allows Python code to extend built-in types.")
17241 (license (list license:gpl3+ license:expat))))
9786258b
LDB
17242
17243(define-public python-shouldbe
17244 (package
17245 (name "python-shouldbe")
17246 (version "0.1.2")
17247 (source
17248 (origin
17249 (method url-fetch)
17250 (uri (pypi-uri "shouldbe" version))
17251 (sha256
17252 (base32
17253 "16zbvjxf71dl4yfbgcr6idyim3mdrfvix1dv8b95p0s9z07372pj"))))
17254 (build-system python-build-system)
17255 (propagated-inputs
17256 `(("python-forbiddenfruit" ,python-forbiddenfruit)))
17257 (native-inputs
17258 `(("python-nose" ,python-nose)))
17259 (home-page "https://github.com/directxman12/should_be")
17260 (synopsis "Python Assertion Helpers inspired by Shouldly")
17261 (description
17262 "Python Assertion Helpers inspired by Shouldly.")
17263 (license license:isc)))
72c2478a
LDB
17264
17265(define-public python-k5test
17266 (package
17267 (name "python-k5test")
17268 (version "0.9.2")
17269 (source
17270 (origin
17271 (method url-fetch)
17272 (uri (pypi-uri "k5test" version))
17273 (sha256
17274 (base32
17275 "1lqp3jgfngyhaxjgj3n230hn90wsylwilh120yjf62h7b1s02mh8"))))
17276 (build-system python-build-system)
17277 (propagated-inputs
17278 `(("python-six" ,python-six)
17279 ;; `which`, `kadmin.local` binaries called inside library
17280 ("which" ,which)
17281 ("mit-krb5" ,mit-krb5)))
17282 (native-inputs `(("mit-krb5" ,mit-krb5)))
17283 (arguments
17284 '(#:phases
17285 (modify-phases %standard-phases
17286 (add-after 'unpack 'patch-paths
17287 (lambda* _
17288 (substitute* "k5test/realm.py"
17289 (("'kadmin_local'") "'kadmin.local'")))))))
17290 (home-page "https://github.com/pythongssapi/k5test")
17291 (synopsis "Library for setting up self-contained Kerberos 5 environments")
17292 (description
17293 "@code{k5test} is a library for setting up self-contained Kerberos 5
17294environments, and running Python unit tests inside those environments. It is
17295based on the file of the same name found alongside the MIT Kerberos 5 unit
17296tests.")
17297 (license license:isc)))
a8ef4978
LDB
17298
17299(define-public python-gssapi
17300 (package
17301 (name "python-gssapi")
17302 (version "1.6.1")
17303 (source
17304 (origin
17305 (method url-fetch)
17306 (uri (pypi-uri "gssapi" version))
17307 (sha256
17308 (base32
17309 "1gymg4asvwrz7y13qpwp2s5g8qwq179d72gkj09q6bfcgs82l5wr"))))
17310 (build-system python-build-system)
17311 (propagated-inputs
17312 `(("python-decorator" ,python-decorator)
17313 ("python-six" ,python-six)))
17314 (inputs
17315 `(("mit-krb5" ,mit-krb5)))
17316 ;; for tests
17317 (native-inputs
17318 `(("python-shouldbe" ,python-shouldbe)
17319 ("python-parameterized" ,python-parameterized)
17320 ("python-k5test" ,python-k5test)
17321 ("python-nose" ,python-nose)))
17322 (home-page "https://github.com/pythongssapi/python-gssapi")
17323 (synopsis "Python GSSAPI Wrapper")
17324 (description
17325 "Python-GSSAPI provides both low-level and high level wrappers around the
17326GSSAPI C libraries. While it focuses on the Kerberos mechanism, it should
17327also be useable with other GSSAPI mechanisms.")
17328 (license license:isc)))