gnu: python-flask-principal: Update home page.
[jackhill/guix/guix.git] / gnu / packages / python-xyz.scm
CommitLineData
44d10b1f
RW
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
ae8db9ce 3;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
fa8ffaa0 4;;; Copyright © 2013, 2014, 2015, 2016, 2019 Andreas Enge <andreas@enge.fr>
44d10b1f
RW
5;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
6;;; Copyright © 2014, 2017 Eric Bavier <bavier@member.fsf.org>
7;;; Copyright © 2014, 2015 Federico Beffa <beffa@fbengineering.ch>
8;;; Copyright © 2015 Omar Radwan <toxemicsquire4@gmail.com>
9;;; Copyright © 2015 Pierre-Antoine Rault <par@rigelk.eu>
02422b3b 10;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 Ricardo Wurmus <rekado@elephly.net>
44d10b1f
RW
11;;; Copyright © 2015, 2016 Christopher Allan Webber <cwebber@dustycloud.org>
12;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
13;;; Copyright © 2015, 2016 David Thompson <davet@gnu.org>
b742c006 14;;; Copyright © 2015, 2016, 2017, 2019 Leo Famulari <leo@famulari.name>
44d10b1f
RW
15;;; Copyright © 2015, 2017 Ben Woodcroft <donttrustben@gmail.com>
16;;; Copyright © 2015, 2016 Erik Edrosa <erik.edrosa@gmail.com>
11e46326 17;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
44d10b1f
RW
18;;; Copyright © 2015, 2017 Kyle Meyer <kyle@kyleam.com>
19;;; Copyright © 2015, 2016 Chris Marusich <cmmarusich@gmail.com>
20;;; Copyright © 2016 Danny Milosavljevic <dannym+a@scratchpost.org>
21;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
8581b40d 22;;; Copyright © 2016, 2018-2019 Hartmut Goebel <h.goebel@crazy-compilers.com>
44d10b1f
RW
23;;; Copyright © 2016 Daniel Pimentel <d4n1@d4n1.org>
24;;; Copyright © 2016 Sou Bunnbu <iyzsong@gmail.com>
25;;; Copyright © 2016, 2017 Troy Sankey <sankeytms@gmail.com>
47956fa0 26;;; Copyright © 2016, 2017 ng0 <ng0@n0.is>
44d10b1f
RW
27;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
28;;; Copyright © 2016 David Craven <david@craven.ch>
fd5c264a 29;;; Copyright © 2016, 2017, 2018, 2019, 2020 Marius Bakke <mbakke@fastmail.com>
44d10b1f
RW
30;;; Copyright © 2016, 2017 Stefan Reichör <stefan@xsteve.at>
31;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
e746d1c3 32;;; Copyright © 2016, 2017, 2019 Alex Vong <alexvong1995@gmail.com>
44d10b1f 33;;; Copyright © 2016, 2017, 2018 Arun Isaac <arunisaac@systemreboot.net>
7261bdca 34;;; Copyright © 2016, 2017, 2018, 2020 Julien Lepiller <julien@lepiller.eu>
783d1d40 35;;; Copyright © 2016, 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
44d10b1f
RW
36;;; Copyright © 2016, 2017 Thomas Danckaert <post@thomasdanckaert.be>
37;;; Copyright © 2017 Carlo Zancanaro <carlo@zancanaro.id.au>
38;;; Copyright © 2017 Frederick M. Muriithi <fredmanglis@gmail.com>
39;;; Copyright © 2017, 2018 Adriano Peluso <catonano@gmail.com>
40;;; Copyright © 2017 Ben Sturmfels <ben@sturm.com.au>
a0b2accf 41;;; Copyright © 2017, 2018, 2019 Mathieu Othacehe <m.othacehe@gmail.com>
44d10b1f
RW
42;;; Copyright © 2017 José Miguel Sánchez García <jmi2k@openmailbox.org>
43;;; Copyright © 2017 Roel Janssen <roel@gnu.org>
e2ebbbcc 44;;; Copyright © 2017, 2018, 2019 Kei Kebreau <kkebreau@posteo.net>
44d10b1f
RW
45;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
46;;; Copyright © 2017 Muriithi Frederick Muriuki <fredmanglis@gmail.com>
dcfa0acd 47;;; Copyright © 2017, 2019 Brendan Tildesley <mail@brendan.scot>
44d10b1f
RW
48;;; Copyright © 2018 Ethan R. Jones <ethanrjones97@gmail.com
49;;; Copyright © 2018 Fis Trivial <ybbs.daans@hotmail.com>
50;;; Copyright © 2018 Vijayalakshmi Vedantham <vijimay12@gmail.com>
51;;; Copyright © 2018 Mathieu Lirzin <mthl@gnu.org>
52;;; Copyright © 2018 Adam Massmann <massmannak@gmail.com>
53;;; Copyright © 2016, 2018 Tomáš Čech <sleep_walker@gnu.org>
a2548a3b 54;;; Copyright © 2018, 2019, 2020 Nicolas Goaziou <mail@nicolasgoaziou.fr>
44d10b1f 55;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
85cfb0e9 56;;; Copyright © 2018, 2019 Clément Lassieur <clement@lassieur.org>
bd137055 57;;; Copyright © 2018, 2019, 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
44d10b1f
RW
58;;; Copyright © 2018 Luther Thompson <lutheroto@gmail.com>
59;;; Copyright © 2018 Vagrant Cascadian <vagrant@debian.org>
046dd621 60;;; Copyright © 2019, 2020 Brett Gilio <brettg@gnu.org>
a91f4eba 61;;; Copyright © 2019 Sam <smbaines8@gmail.com>
8c141421 62;;; Copyright © 2019 Jack Hill <jackhill@jackhill.us>
f825e605 63;;; Copyright © 2019 Guillaume Le Vaillant <glv@posteo.net>
fb236fdd 64;;; Copyright © 2019 Alex Griffin <a@ajgrf.com>
edeb04bf 65;;; Copyright © 2019 Pierre Langlois <pierre.langlois@gmx.com>
e308b4f0 66;;; Copyright © 2019 Jacob MacDonald <jaccarmac@gmail.com>
30e7c03a 67;;; Copyright © 2019 Giacomo Leidi <goodoldpaul@autistici.org>
c1bbef69 68;;; Copyright © 2019 Wiktor Żelazny <wzelazny@vurv.cz>
ba42a6bf 69;;; Copyright © 2019 Tanguy Le Carrour <tanguy@bioneland.org>
dbcef44a 70;;; Copyright © 2019 Mădălin Ionel Patrașcu <madalinionel.patrascu@mdc-berlin.de>
479f4013 71;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
da8ca4c3 72;;; Copyright © 2020 sirgazil <sirgazil@zoho.com>
44d10b1f
RW
73;;;
74;;; This file is part of GNU Guix.
75;;;
76;;; GNU Guix is free software; you can redistribute it and/or modify it
77;;; under the terms of the GNU General Public License as published by
78;;; the Free Software Foundation; either version 3 of the License, or (at
79;;; your option) any later version.
80;;;
81;;; GNU Guix is distributed in the hope that it will be useful, but
82;;; WITHOUT ANY WARRANTY; without even the implied warranty of
83;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
84;;; GNU General Public License for more details.
85;;;
86;;; You should have received a copy of the GNU General Public License
87;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
88
89(define-module (gnu packages python-xyz)
90 #:use-module ((guix licenses) #:prefix license:)
91 #:use-module (gnu packages)
92 #:use-module (gnu packages algebra)
93 #:use-module (gnu packages adns)
94 #:use-module (gnu packages attr)
95 #:use-module (gnu packages backup)
96 #:use-module (gnu packages bash)
97 #:use-module (gnu packages check)
98 #:use-module (gnu packages compression)
99 #:use-module (gnu packages crypto)
100 #:use-module (gnu packages databases)
f825e605 101 #:use-module (gnu packages dbm)
2cbede59 102 #:use-module (gnu packages enchant)
44d10b1f
RW
103 #:use-module (gnu packages file)
104 #:use-module (gnu packages fontutils)
105 #:use-module (gnu packages gcc)
106 #:use-module (gnu packages geo)
107 #:use-module (gnu packages ghostscript)
108 #:use-module (gnu packages gl)
109 #:use-module (gnu packages glib)
e2ebbbcc 110 #:use-module (gnu packages gnome)
44d10b1f
RW
111 #:use-module (gnu packages graphviz)
112 #:use-module (gnu packages graphics)
113 #:use-module (gnu packages gstreamer)
114 #:use-module (gnu packages gtk)
115 #:use-module (gnu packages icu4c)
116 #:use-module (gnu packages image)
117 #:use-module (gnu packages imagemagick)
72c2478a 118 #:use-module (gnu packages kerberos)
44d10b1f
RW
119 #:use-module (gnu packages libevent)
120 #:use-module (gnu packages libffi)
121 #:use-module (gnu packages linux)
122 #:use-module (gnu packages llvm)
123 #:use-module (gnu packages man)
124 #:use-module (gnu packages maths)
42f0b0c2 125 #:use-module (gnu packages monitoring)
44d10b1f
RW
126 #:use-module (gnu packages multiprecision)
127 #:use-module (gnu packages networking)
128 #:use-module (gnu packages ncurses)
129 #:use-module (gnu packages openstack)
130 #:use-module (gnu packages pcre)
131 #:use-module (gnu packages perl)
132 #:use-module (gnu packages pkg-config)
133 #:use-module (gnu packages python)
d362b11d 134 #:use-module (gnu packages python-check)
15b65617 135 #:use-module (gnu packages python-compression)
44d10b1f 136 #:use-module (gnu packages python-crypto)
ca7c3653 137 #:use-module (gnu packages python-science)
44d10b1f
RW
138 #:use-module (gnu packages python-web)
139 #:use-module (gnu packages qt)
140 #:use-module (gnu packages readline)
141 #:use-module (gnu packages sdl)
142 #:use-module (gnu packages search)
143 #:use-module (gnu packages shells)
9d0c291e 144 #:use-module (gnu packages sphinx)
44d10b1f
RW
145 #:use-module (gnu packages ssh)
146 #:use-module (gnu packages terminals)
147 #:use-module (gnu packages tex)
148 #:use-module (gnu packages texinfo)
149 #:use-module (gnu packages time)
150 #:use-module (gnu packages tls)
151 #:use-module (gnu packages version-control)
152 #:use-module (gnu packages video)
153 #:use-module (gnu packages web)
154 #:use-module (gnu packages base)
155 #:use-module (gnu packages xml)
156 #:use-module (gnu packages xorg)
157 #:use-module (gnu packages xdisorg)
158 #:use-module (gnu packages tcl)
159 #:use-module (gnu packages bdw-gc)
f98232a3 160 #:use-module (gnu packages serialization)
44d10b1f
RW
161 #:use-module (guix packages)
162 #:use-module (guix download)
163 #:use-module (guix git-download)
a042d348 164 #:use-module (guix hg-download)
44d10b1f
RW
165 #:use-module (guix utils)
166 #:use-module (guix build-system gnu)
167 #:use-module (guix build-system cmake)
168 #:use-module (guix build-system python)
169 #:use-module (guix build-system trivial)
170 #:use-module (srfi srfi-1)
171 #:use-module (srfi srfi-26))
172
173(define-public python-psutil
174 (package
175 (name "python-psutil")
e9119ac1 176 (version "5.6.5")
44d10b1f
RW
177 (source
178 (origin
179 (method url-fetch)
180 (uri (pypi-uri "psutil" version))
181 (sha256
e9119ac1 182 (base32 "0isil5jxwwd8awz54qk28rpgjg43i5l6yl70g40vxwa4r4m56lfh"))))
44d10b1f
RW
183 (build-system python-build-system)
184 (arguments
185 ;; FIXME: some tests does not return and times out.
186 '(#:tests? #f))
187 (home-page "https://www.github.com/giampaolo/psutil")
188 (synopsis "Library for retrieving information on running processes")
189 (description
190 "psutil (Python system and process utilities) is a library for retrieving
191information on running processes and system utilization (CPU, memory, disks,
192network) in Python. It is useful mainly for system monitoring, profiling and
193limiting process resources and management of running processes. It implements
194many functionalities offered by command line tools such as: ps, top, lsof,
195netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
196pidof, tty, taskset, pmap.")
197 (properties `((python2-variant . ,(delay python2-psutil))))
198 (license license:bsd-3)))
199
200(define-public python2-psutil
201 (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
202 (package
203 (inherit base)
204 (propagated-inputs
205 `(("python2-enum34" ,python2-enum34) ;optional
206 ,@(package-propagated-inputs base))))))
207
208(define-public python-shapely
209 (package
210 (name "python-shapely")
6d94465b 211 (version "1.6.4.post2")
44d10b1f
RW
212 (source
213 (origin
214 (method url-fetch)
215 (uri (pypi-uri "Shapely" version))
216 (sha256
217 (base32
6d94465b 218 "03r42fmd9alp6r3q95ad6rldq2f7n1wimrw53zy5kpn33yv7pf64"))))
44d10b1f
RW
219 (build-system python-build-system)
220 (native-inputs
221 `(("python-cython" ,python-cython)
222 ("python-matplotlib" ,python-matplotlib)
223 ("python-pytest" ,python-pytest)
224 ("python-pytest-cov" ,python-pytest-cov)))
225 (inputs
226 `(("geos" ,geos)))
227 (propagated-inputs
228 `(("python-numpy" ,python-numpy)))
229 (arguments
230 `(#:phases
231 (modify-phases %standard-phases
232 (add-after 'unpack 'patch-geos-path
233 (lambda* (#:key inputs #:allow-other-keys)
234 (let ((geos (assoc-ref inputs "geos"))
235 (glibc (assoc-ref inputs ,(if (%current-target-system)
236 "cross-libc" "libc"))))
237 (substitute* "shapely/geos.py"
238 (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)")
239 (string-append "_lgeos = load_dll('geos_c', fallbacks=['"
240 geos "/lib/libgeos_c.so'])"))
241 (("free = load_dll\\('c'\\)\\.free")
242 (string-append "free = load_dll('c', fallbacks=['"
243 glibc "/lib/libc.so.6']).free"))))
244 #t)))))
245 (home-page "https://github.com/Toblerity/Shapely")
246 (synopsis "Library for the manipulation and analysis of geometric objects")
247 (description "Shapely is a Python package for manipulation and analysis of
248planar geometric objects. It is based on the @code{GEOS} library.")
249 (license license:bsd-3)))
250
a91f4eba
S
251(define-public python-shortuuid
252 (package
253 (name "python-shortuuid")
254 (version "0.5.0")
255 (source
256 (origin
257 (method url-fetch)
258 (uri (pypi-uri "shortuuid" version))
259 (sha256
260 (base32
261 "1f8i4zwj5vmpzbz6b17bljy4399gx5aq7vsyw63sz2qgyjcd73yh"))))
262 (build-system python-build-system)
263 (native-inputs
264 `(("python-pep8" ,python-pep8)))
265 (home-page "https://github.com/skorokithakis/shortuuid")
266 (synopsis "Generator library for concise, unambiguous and URL-safe UUIDs")
267 (description
268 "@code{shortuuid} is a Python library for generating concise, unambiguous
269and URL-safe UUIDs. UUIDs are generated using the built-in Python @code{uuid}
270module and then similar looking characters are removed.")
271 (license license:bsd-3)))
272
44d10b1f
RW
273(define-public python-logwrap
274 (package
275 (name "python-logwrap")
276 (version "3.2.1")
277 (source
278 (origin
279 (method url-fetch)
280 (uri (pypi-uri "logwrap" version ".zip"))
281 (sha256
282 (base32
283 "1d2k0hvpbi51vl410y8fbs5m0nxnlh2k7gr2nrh3k81ibhzscsra"))))
284 (build-system python-build-system)
285 (propagated-inputs
286 `(("python-six" ,python-six)
287 ("python-typing" ,python-typing)))
288 (native-inputs
289 `(("unzip" ,unzip)
290 ("python-cython" ,python-cython)
291 ("python-pytest" ,python-pytest)
292 ("python-pytest-cov" ,python-pytest-cov)
293 ("python-pytest-runner" ,python-pytest-runner)))
294 (home-page "https://github.com/penguinolog/logwrap")
295 (synopsis "Decorator for logging function arguments")
296 (description "This package provides a decorator to log function arguments
297and function call return values in a human-readable way.")
298 (license license:asl2.0)))
299
300(define-public python2-shapely
301 (package-with-python2 python-shapely))
302
303(define-public python-clyent
304 (package
305 (name "python-clyent")
306 (version "1.2.1")
307 (source
308 (origin
309 (method url-fetch)
310 (uri (pypi-uri "clyent" version))
311 (sha256
312 (base32
313 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
314 (build-system python-build-system)
315 (native-inputs
316 `(("python-mock" ,python-mock)))
317 (home-page "https://github.com/binstar/clyent")
318 (synopsis "Command line client library")
319 (description "Clyent is a Python command line utiliy library. It is used
320by @code{binstar}, @code{binstar-build} and @code{chalmers}.")
321 (license license:bsd-3)))
322
323(define-public python2-clyent
324 (package-with-python2 python-clyent))
325
326(define-public python-babel
327 (package
328 (name "python-babel")
93253411 329 (version "2.7.0")
44d10b1f
RW
330 (source
331 (origin
332 (method url-fetch)
333 (uri (pypi-uri "Babel" version))
334 (sha256
335 (base32
93253411 336 "0a7wawx8vsg7igvz6p3x909fskhg4b2y1910xk4f4c8y22p3aqg8"))))
44d10b1f
RW
337 (build-system python-build-system)
338 (native-inputs
339 `(("python-freezegun" ,python-freezegun)
340 ("python-pytest" ,python-pytest)))
341 (propagated-inputs
342 `(("python-pytz" ,python-pytz)))
343 (arguments
344 `(#:phases (modify-phases %standard-phases
345 (replace 'check
8acd1e90
MB
346 (lambda _
347 (invoke "pytest" "-vv" "-k"
348 (string-append
349 ;; XXX: These tests fail when using Pytest 4.x and
350 ;; Babel 2.6.0. Try removing this for later versions.
351 "not test_no_inherit_metazone_marker_never_in_output"
352 " and not test_smoke_dates"
353 " and not test_smoke_numbers")))))))
44d10b1f
RW
354 (home-page "http://babel.pocoo.org/")
355 (synopsis
356 "Tools for internationalizing Python applications")
357 (description
358 "Babel is composed of two major parts:
359- tools to build and work with gettext message catalogs
360- a Python interface to the CLDR (Common Locale Data Repository), providing
361access to various locale display names, localized number and date formatting,
362etc. ")
363 (license license:bsd-3)))
364
365(define-public python2-babel
366 (package-with-python2 python-babel))
367
93253411
MB
368;; Sphinx < 2.0 requires this version. Remove once no longer needed.
369(define-public python2-babel-2.6
370 (package
371 (inherit python2-babel)
372 (version "2.6.0")
373 (source (origin
374 (method url-fetch)
375 (uri (pypi-uri "Babel" version))
376 (sha256
377 (base32
378 "08rxmbx2s4irp0w0gmn498vns5xy0fagm0fg33xa772jiks51flc"))))))
379
44d10b1f
RW
380(define-public python2-backport-ssl-match-hostname
381 (package
382 (name "python2-backport-ssl-match-hostname")
383 (version "3.5.0.1")
384 (source
385 (origin
386 (method url-fetch)
2c1f0d09 387 (uri (pypi-uri "backports.ssl_match_hostname" version))
44d10b1f
RW
388 (sha256
389 (base32
390 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
391 (build-system python-build-system)
392 (arguments
393 `(#:python ,python-2
394 #:tests? #f)) ; no test target
395 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
396 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
397 (description
398 "This backport brings the ssl.match_hostname() function to users of
399earlier versions of Python. The function checks the hostname in the
400certificate returned by the server to which a connection has been established,
401and verifies that it matches the intended target hostname.")
402 (license license:psfl)))
403
dc827867
TGR
404(define-public python-boolean.py
405 (package
406 (name "python-boolean.py")
407 (version "3.6")
408 (source
409 (origin
410 ;; There's no source tarball on PyPI.
411 (method git-fetch)
412 (uri (git-reference
413 (url "https://github.com/bastikr/boolean.py")
414 (commit (string-append "v" version))))
415 (file-name (git-file-name name version))
416 (sha256
417 (base32 "1wc89y73va58cj7dsx6c199zpxsy9q53dsffsdj6zmc90inqz6qs"))))
418 (build-system python-build-system)
419 (home-page "https://github.com/bastikr/boolean.py")
420 (synopsis "Boolean algebra in one Python module")
421 (description
422 "This is a small Python library that implements boolean algebra.
423It defines two base elements, @code{TRUE} and @code{FALSE}, and a
424@code{Symbol} class that can take on one of these two values. Calculations
425are done only in terms of @code{AND}, @code{OR}, and @code{NOT}---other
426compositions like @code{XOR} and @code{NAND} are emulated on top of them.
427Expressions are constructed from parsed strings or directly in Python.")
428 (license license:bsd-2)))
429
44d10b1f
RW
430(define-public python-hdf4
431 (package
432 (name "python-hdf4")
433 (version "0.9")
434 (source
435 (origin
436 (method url-fetch)
437 (uri (pypi-uri name version))
438 (sha256
439 (base32
440 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
441 (build-system python-build-system)
442 (native-inputs `(("nose" ,python-nose)))
443 (propagated-inputs `(("numpy" ,python-numpy)))
444 (inputs
445 `(("hdf4" ,hdf4)
446 ("libjpeg" ,libjpeg)
447 ("zlib" ,zlib)))
448 (arguments
449 `(#:phases
450 (modify-phases %standard-phases
451 (replace 'check
452 (lambda _
453 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
454 ;; on to import numpy. Somehow this works on their CI system.
455 ;; Let's just manage PYTHONPATH here instead.
456 (substitute* "runexamples.sh"
457 (("export PYTHONPATH=.*") ""))
458 (setenv "PYTHONPATH"
459 (string-append (getcwd) ":"
460 (getenv "PYTHONPATH")))
461 (invoke "./runexamples.sh")
462 (invoke "nosetests" "-v"))))))
463 (home-page "https://github.com/fhs/python-hdf4")
464 (synopsis "Python interface to the NCSA HDF4 library")
465 (description
466 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
467which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
468NetCDF files can also be read and modified. Python-HDF4 is a fork of
469@url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
470 (license license:expat)))
471
472(define-public python2-hdf4
473 (package-with-python2 python-hdf4))
474
475(define-public python-h5py
476 (package
477 (name "python-h5py")
478 (version "2.8.0")
479 (source
480 (origin
481 (method url-fetch)
482 (uri (pypi-uri "h5py" version))
483 (sha256
484 (base32
485 "0mdr6wrq02ac93m1aqx9kad0ppfzmm4imlxqgyy1x4l7hmdcc9p6"))))
486 (build-system python-build-system)
487 (arguments
488 `(#:tests? #f ; no test target
489 #:phases
490 (modify-phases %standard-phases
491 (add-after 'unpack 'fix-hdf5-paths
492 (lambda* (#:key inputs #:allow-other-keys)
493 (let ((prefix (assoc-ref inputs "hdf5")))
494 (substitute* "setup_build.py"
495 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
496 (string-append "['" prefix "/lib" "']"))
497 (("'/opt/local/include', '/usr/local/include'")
498 (string-append "'" prefix "/include" "'")))
499 (substitute* "setup_configure.py"
500 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
501 (string-append "['" prefix "/lib" "']")))
502 #t))))))
503 (propagated-inputs
504 `(("python-six" ,python-six)
505 ("python-numpy" ,python-numpy)))
506 (inputs
507 `(("hdf5" ,hdf5)))
508 (native-inputs
509 `(("python-cython" ,python-cython)
510 ("python-pkgconfig" ,python-pkgconfig)))
efc0a587 511 (home-page "https://www.h5py.org/")
44d10b1f
RW
512 (synopsis "Read and write HDF5 files from Python")
513 (description
514 "The h5py package provides both a high- and low-level interface to the
515HDF5 library from Python. The low-level interface is intended to be a
516complete wrapping of the HDF5 API, while the high-level component supports
517access to HDF5 files, datasets and groups using established Python and NumPy
518concepts.")
519 (license license:bsd-3)))
520
521(define-public python2-h5py
522 (package-with-python2 python-h5py))
523
8b89dedc
RW
524(define-public python-sh
525 (package
526 (name "python-sh")
527 (version "1.12.14")
528 (source
529 (origin
530 (method url-fetch)
531 (uri (pypi-uri "sh" version))
532 (sha256
533 (base32
534 "1z2hx357xp3v4cv44xmqp7lli3frndqpyfmpbxf7n76h7s1zaaxm"))))
535 (build-system python-build-system)
fd3638d8
EF
536 (arguments
537 '(#:phases
538 (modify-phases %standard-phases
539 (replace 'check
540 (lambda _
ca983a2f
NG
541 ;; XXX: A Python 2 test fails when HOME=/homeless-shelter.
542 (setenv "HOME" "/tmp")
fd3638d8
EF
543 (invoke "python" "sh.py" "test"))))))
544 (native-inputs
545 `(("python-coverage" ,python-coverage)))
8b89dedc
RW
546 (home-page "https://github.com/amoffat/sh")
547 (synopsis "Python subprocess replacement")
548 (description "This package provides a replacement for Python's
549@code{subprocess} feature.")
550 (license license:expat)))
551
3869effd
RW
552(define-public python2-sh
553 (package-with-python2 python-sh))
554
d362b11d
RW
555(define-public python-cftime
556 (package
557 (name "python-cftime")
da107cf5 558 (version "1.0.4.2")
d362b11d
RW
559 (source
560 (origin
561 (method url-fetch)
562 (uri (pypi-uri "cftime" version))
563 (sha256
da107cf5 564 (base32 "0w0gi6jnch38hiygl62j4xkcirv4y3dcwrvxl9p7bsk6j27lzihs"))))
d362b11d
RW
565 (build-system python-build-system)
566 (propagated-inputs
567 `(("python-numpy" ,python-numpy)))
568 (native-inputs
569 `(("python-coveralls" ,python-coveralls)
570 ("python-cython" ,python-cython)
571 ("python-pytest-cov" ,python-pytest-cov)))
572 (home-page "https://github.com/Unidata/cftime")
573 (synopsis "Library for time handling")
574 (description
575 "This package provides time-handling functionality that used to be part
576of the netcdf4 package before.")
577 ;; This package claims to include code under the GPLv3 but is released
578 ;; under ISC.
579 (license (list license:isc license:gpl3+))))
580
44d10b1f
RW
581(define-public python-netcdf4
582 (package
583 (name "python-netcdf4")
93e7b209 584 (version "1.4.2")
44d10b1f
RW
585 (source
586 (origin
587 (method url-fetch)
588 (uri (pypi-uri "netCDF4" version))
589 (sha256
590 (base32
93e7b209 591 "0c0sklgrmv15ygliin8qq0hp7vanmbi74m6zpi0r1ksr0hssyd5r"))))
44d10b1f 592 (build-system python-build-system)
93e7b209
RW
593 (arguments
594 '(#:phases
595 (modify-phases %standard-phases
596 (add-after 'unpack 'configure-locations
597 (lambda* (#:key inputs #:allow-other-keys)
598 (setenv "HDF5_DIR" (assoc-ref inputs "hdf5"))
599 #t)))))
44d10b1f
RW
600 (native-inputs
601 `(("python-cython" ,python-cython)))
602 (propagated-inputs
93e7b209
RW
603 `(("python-numpy" ,python-numpy)
604 ("python-cftime" ,python-cftime)))
44d10b1f
RW
605 (inputs
606 `(("netcdf" ,netcdf)
607 ("hdf4" ,hdf4)
608 ("hdf5" ,hdf5)))
93e7b209 609 (home-page "https://github.com/Unidata/netcdf4-python")
44d10b1f
RW
610 (synopsis "Python/numpy interface to the netCDF library")
611 (description "Netcdf4-python is a Python interface to the netCDF C
612library. netCDF version 4 has many features not found in earlier
613versions of the library and is implemented on top of HDF5. This module
614can read and write files in both the new netCDF 4 and the old netCDF 3
615format, and can create files that are readable by HDF5 clients. The
616API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
617to users of that module.")
618 ;; The software is mainly ISC, but includes some files covered
619 ;; by the Expat license.
620 (license (list license:isc license:expat))))
621
622(define-public python2-netcdf4
623 (package-with-python2 python-netcdf4))
624
d6803445
TGR
625(define-public python-license-expression
626 (package
627 (name "python-license-expression")
628 (version "0.999")
629 (source
630 (origin
631 (method url-fetch)
632 (uri (pypi-uri "license-expression" version))
633 (sha256
634 (base32 "08ppb0bxbrsxazy88sgpl9yffvdsabw6dkk1nc332wcz2mphwwyf"))))
635 (build-system python-build-system)
636 (propagated-inputs
637 `(("python-boolean.py" ,python-boolean.py)))
638 (home-page "https://github.com/nexB/license-expression")
639 (synopsis "Apply boolean logic to license expressions")
640 (description
641 "This Python module defines a tiny language to evaluate and compare
642license expressions using boolean logic. Logical combinations of licenses can
643be tested for equality, containment, and equivalence. They can be normalised
644and simplified. It supports SPDX license expressions as well as other naming
645conventions and aliases in the same expression.")
646 (license license:gpl2+)))
647
44d10b1f
RW
648(define-public python-lockfile
649 (package
650 (name "python-lockfile")
651 (version "0.12.2")
652 (source
653 (origin
654 (method url-fetch)
8318bf07 655 (uri (pypi-uri "lockfile" version))
44d10b1f
RW
656 (sha256
657 (base32
658 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
659 (build-system python-build-system)
660 (arguments '(#:test-target "check"))
661 (native-inputs
662 `(("python-pbr" ,python-pbr)))
663 (home-page "https://launchpad.net/pylockfile")
664 (synopsis "Platform-independent file locking module")
665 (description
666 "The lockfile package exports a LockFile class which provides a simple
667API for locking files.")
668 (license license:expat)))
669
670(define-public python2-lockfile
671 (package-with-python2 python-lockfile))
672
673(define-public python-semantic-version
674 (package
675 (name "python-semantic-version")
676 (version "2.6.0")
677 (source
678 (origin
679 (method url-fetch)
680 (uri (pypi-uri "semantic_version" version))
681 (sha256
682 (base32
683 "1h2l9xyg1zzsda6kjcmfcgycbvrafwci283vcr1v5sbk01l2hhra"))))
684 (build-system python-build-system)
685 (arguments
686 `(#:tests? #f)) ; PyPI tarball lacks tests
687 (home-page "https://github.com/rbarrois/python-semanticversion")
688 (synopsis "Semantic versioning module for Python")
689 (description
690 "The @code{semantic_version} class is a small library for handling
691@uref{https://semver.org/, semantic versioning} (@dfn{SemVer}) in Python.
692
693It can compare versions, generate a new version that represents a bump in one of
694the version levels, and check whether any given string is a proper semantic
695version identifier.")
696 (license license:bsd-3)))
697
698(define-public python2-semantic-version
699 (package-with-python2 python-semantic-version))
700
701(define-public python-serpent
702 (package
703 (name "python-serpent")
fa9d14ac 704 (version "1.28")
44d10b1f
RW
705 (source
706 (origin
707 (method url-fetch)
708 (uri (pypi-uri "serpent" version))
709 (sha256
fa9d14ac 710 (base32 "1arnckykpkvv2qrp49l1k7q5mr5pisswl0rvdx98x8wsl1n361pk"))))
44d10b1f 711 (build-system python-build-system)
fa9d14ac
TGR
712 (native-inputs
713 `(("python-attrs" ,python-attrs)
714 ("python-pytz" ,python-pytz)))
44d10b1f
RW
715 (home-page "https://github.com/irmen/Serpent")
716 (synopsis "Serializer for literal Python expressions")
717 (description
1d3c7803
TGR
718 "Serpent provides @code{ast.literal_eval()}-compatible object tree
719serialization. It serializes an object tree into bytes (an utf-8 encoded
720string) that can be decoded and then passed as-is to @code{ast.literal_eval()}
721to rebuild the original object tree.
722
723Because only safe literals are encoded, it is safe to send serpent data to
724other machines, such as over the network.")
44d10b1f
RW
725 (license license:expat)))
726
727(define-public python-setuptools
728 (package
729 (name "python-setuptools")
e39d4933 730 (version "41.0.1")
44d10b1f
RW
731 (source
732 (origin
733 (method url-fetch)
734 (uri (pypi-uri "setuptools" version ".zip"))
735 (sha256
736 (base32
e39d4933 737 "04sns22y2hhsrwfy1mha2lgslvpjsjsz8xws7h2rh5a7ylkd28m2"))
44d10b1f
RW
738 (modules '((guix build utils)))
739 (snippet
740 '(begin
741 ;; Remove included binaries which are used to build self-extracting
742 ;; installers for Windows.
743 ;; TODO: Find some way to build them ourself so we can include them.
744 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
745 #t))))
746 (build-system python-build-system)
747 ;; FIXME: Tests require pytest, which itself relies on setuptools.
748 ;; One could bootstrap with an internal untested setuptools.
749 (arguments
750 `(#:tests? #f))
751 (home-page "https://pypi.python.org/pypi/setuptools")
752 (synopsis
753 "Library designed to facilitate packaging Python projects")
754 (description
755 "Setuptools is a fully-featured, stable library designed to facilitate
756packaging Python projects, where packaging includes:
757Python package and module definitions,
758distribution package metadata,
759test hooks,
760project installation,
761platform-specific details,
762Python 3 support.")
763 ;; TODO: setuptools now bundles the following libraries:
764 ;; packaging, pyparsing, six and appdirs. How to unbundle?
765 (license (list license:psfl ; setuptools itself
766 license:expat ; six, appdirs, pyparsing
767 license:asl2.0 ; packaging is dual ASL2/BSD-2
768 license:bsd-2))))
769
770(define-public python2-setuptools
771 (package-with-python2 python-setuptools))
772
0fdec2a3
MB
773;; The setuptools provided by Python 3.7.4 is too new for Tensorflow.
774(define-public python-setuptools-for-tensorflow
775 (hidden-package
776 (package
777 (inherit python-setuptools)
778 (version "39.1.0")
779 (source (origin
780 (inherit (package-source python-setuptools))
781 (uri (pypi-uri "setuptools" version ".zip"))
782 (sha256
783 (base32
784 "1mzdhvfhnv4lggxa8rjl0dzqxvfx377gg5sqs57v89wrp09lwj65")))))))
785
44d10b1f
RW
786(define-public python-uniseg
787 (package
788 (name "python-uniseg")
789 (version "0.7.1")
790 (source
791 (origin
792 (method url-fetch)
793 (uri (pypi-uri "uniseg" version ".zip"))
794 (sha256
795 (base32
796 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
797 (build-system python-build-system)
798 (arguments
799 '(#:tests? #f)) ; The test suite requires network access.
800 (native-inputs
801 `(("unzip" ,unzip)))
802 (home-page
803 "https://bitbucket.org/emptypage/uniseg-python")
804 (synopsis
805 "Python library to determine Unicode text segmentations")
806 (description
807 "Uniseg is a Python package used to determine Unicode text segmentations.
808Supported segmentations include:
809@enumerate
810@item @dfn{Code point} (any value in the Unicode codespace)
811@item @dfn{Grapheme cluster} (user-perceived character made of a single or
812multiple Unicode code points, e.g. \"G\" + acute-accent)
813@item Word break
814@item Sentence break
815@item Line break
816@end enumerate")
817 (license license:expat)))
818
819(define-public python2-uniseg
820 (package-with-python2 python-uniseg))
821
822(define-public python-humanfriendly
823 (package
824 (name "python-humanfriendly")
825 (version "4.4.1")
826 (source
827 (origin
828 (method url-fetch)
829 (uri (pypi-uri "humanfriendly" version))
830 (sha256
831 (base32
832 "0pisgizjql86785jchfjv217g0lsgk114g2lja5j4y3lsc3b9szi"))))
833 (build-system python-build-system)
834 (arguments
835 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
836 #:tests? #f))
837 (propagated-inputs
838 `(("python-monotonic" ,python-monotonic)))
839 (home-page "https://humanfriendly.readthedocs.io")
840 (synopsis "Human-friendly input and output in Python")
841 (description
842 "The functions and classes in @code{humanfriendly} can be used to make
843text interfaces more user-friendly. It includes tools to parse and format
844numbers, file sizes, and timespans, timers for long-running operations, menus
845to allow the user to choose from a list of options, and terminal interaction
846helpers.")
847 (license license:expat)))
848
849(define-public python2-humanfriendly
850 (package-with-python2 python-humanfriendly))
851
852(define-public python-capturer
853 (package
854 (name "python-capturer")
855 (version "2.4")
856 (source
857 (origin
858 (method url-fetch)
859 (uri (pypi-uri "capturer" version))
860 (sha256
861 (base32
862 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
863 (build-system python-build-system)
864 (arguments
865 `(#:tests? #f))
866 (propagated-inputs
867 `(("python-humanfriendly" ,python-humanfriendly)))
868 (home-page "https://capturer.readthedocs.io")
869 (synopsis "Capture stdout and stderr streams of the current process")
870 (description
871 "The capturer package makes it easy to capture the stdout and stderr
872streams of the current process and subprocesses. Output can be relayed
873to the terminal in real time but is also available to the Python program
874for additional processing.")
875 (license license:expat)))
876
877(define-public python2-capturer
878 (package-with-python2 python-capturer))
879
880(define-public python-case
881 (package
882 (name "python-case")
883 (version "1.5.3")
884 (source
885 (origin
886 (method url-fetch)
887 (uri (pypi-uri "case" version))
888 (sha256
889 (base32
890 "1cagg06vfph864s6l5jb0zqliwxh647bki8j6lf4a4qrv40jnhs8"))))
891 (build-system python-build-system)
892 (propagated-inputs
893 `(("python-mock" ,python-mock)
894 ("python-nose" ,python-nose)
895 ("python-six" ,python-six)
896 ("python-unittest2" ,python-unittest2)))
897 (native-inputs
898 `(("python-coverage" ,python-coverage)))
899 (home-page "https://github.com/celery/case")
900 (synopsis "Unittest utilities and convenience methods")
901 (description
902 "The @code{case} package provides utilities on top of unittest, including
903some helpful Python 2 compatibility convenience methods.")
904 (license license:bsd-3)))
905
906(define-public python-verboselogs
907 (package
908 (name "python-verboselogs")
909 (version "1.7")
910 (source
911 (origin
912 (method url-fetch)
913 (uri (pypi-uri "verboselogs" version))
914 (sha256
915 (base32
916 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
917 (build-system python-build-system)
1760c970
MO
918 (arguments
919 `(#:phases
920 (modify-phases %standard-phases
921 (replace 'check
922 (lambda _
923 ;; Do not run pylint plugin test, as astroid is an old
924 ;; unsupported version.
925 (invoke "pytest" "-v" "-k" "not test_pylint_plugin"
926 "verboselogs/tests.py"))))))
44d10b1f
RW
927 (native-inputs
928 `(("python-mock" ,python-mock)
1760c970 929 ("python-pytest" ,python-pytest)))
44d10b1f
RW
930 (home-page "https://verboselogs.readthedocs.io")
931 (synopsis "Verbose logging level for Python's logging module")
932 (description
933 "The @code{verboselogs} package extends Python's @code{logging} module to
934add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
935 (license license:expat)))
936
937(define-public python2-verboselogs
938 (package-with-python2 python-verboselogs))
939
940(define-public python-coloredlogs
941 (package
942 (name "python-coloredlogs")
b2b8a39c 943 (version "10.0")
44d10b1f
RW
944 (source
945 (origin
946 (method url-fetch)
947 (uri (pypi-uri "coloredlogs" version))
948 (sha256
949 (base32
b2b8a39c 950 "0dkw6xp0r1dwgz4s2f58npx5nxfq51wf4l6qkm5ib27slgfs4sdq"))))
44d10b1f
RW
951 (build-system python-build-system)
952 (arguments
953 `(;Tests require some updated modules
954 #:tests? #f))
955 (propagated-inputs
956 `(("python-capturer" ,python-capturer)))
957 (home-page "https://coloredlogs.readthedocs.io")
958 (synopsis "Colored stream handler for Python's logging module")
959 (description
960 "The @code{coloredlogs} package enables colored terminal output for
961Python's logging module. The @code{ColoredFormatter} class inherits from
962@code{logging.Formatter} and uses ANSI escape sequences to render your logging
963messages in color.")
964 (license license:expat)))
965
966(define-public python2-coloredlogs
967 (package-with-python2 python-coloredlogs))
968
af760990
VC
969(define-public python-editorconfig
970 (package
971 (name "python-editorconfig")
972 (version "0.12.2")
973 (source
974 (origin
975 (method url-fetch)
976 (uri (pypi-uri "EditorConfig" version))
977 (sha256
978 (base32
979 "0v55z351p9qkyp3bbspwywwn28sbcknhirngjbj779n3z52z63hv"))))
980 (build-system python-build-system)
981 (home-page "https://editorconfig.org/")
982 (synopsis "EditorConfig bindings for python")
983 (description "The EditorConfig project consists of a file format for
984defining coding styles and a collection of text editor plugins that enable
985editors to read the file format and adhere to defined styles. EditorConfig
986files are easily readable and they work nicely with version control systems.")
987 ;; "fnmatch.py" and "ini.py" are licensed under psfl, the rest is bsd-2.
988 (license (list license:bsd-2 license:psfl))))
989
4caf37b0
MC
990(define-public python-et-xmlfile
991 (package
992 (name "python-et-xmlfile")
993 (version "1.0.1")
994 (source
995 (origin
996 (method url-fetch)
997 (uri (pypi-uri "et_xmlfile" version))
998 (sha256
999 (base32
1000 "0nrkhcb6jdrlb6pwkvd4rycw34y3s931hjf409ij9xkjsli9fkb1"))))
1001 (build-system python-build-system)
1002 (arguments
1003 `(#:phases (modify-phases %standard-phases
1004 (replace 'check
1005 (lambda _
1006 (invoke "pytest"))))))
1007 (native-inputs
1008 `(("python-pytest" ,python-pytest)
1009 ("python-lxml" ,python-lxml))) ;used for the tests
1010 (home-page "https://bitbucket.org/openpyxl/et_xmlfile")
1011 (synopsis "Low memory implementation of @code{lxml.xmlfile}")
1012 (description "This Python library is based upon the @code{xmlfile} module
1013from @code{lxml}. It aims to provide a low memory, compatible implementation
1014of @code{xmlfile}.")
1015 (license license:expat)))
1016
1017(define-public python2-et-xmlfile
1018 (package-with-python2 python-et-xmlfile))
1019
a042d348
MC
1020(define-public python-openpyxl
1021 (package
1022 (name "python-openpyxl")
441e6d93 1023 (version "2.6.2")
a042d348
MC
1024 (source
1025 (origin
1026 ;; We use the upstream repository, as the tests are not included in the
1027 ;; PyPI releases.
1028 (method hg-fetch)
1029 (uri (hg-reference
1030 (url "https://bitbucket.org/openpyxl/openpyxl")
1031 (changeset version)))
1032 (file-name (string-append name "-" version "-checkout"))
1033 (sha256
441e6d93 1034 (base32 "1qhij6kcvdxqjy4g6193nsv4q7fy8n4fwyd3c2z047idlm6s3j4w"))))
a042d348
MC
1035 (build-system python-build-system)
1036 (arguments
1037 `(#:phases (modify-phases %standard-phases
1038 (replace 'check
1039 (lambda _
1040 (invoke "pytest"))))))
1041 (native-inputs
1042 ;; For the test suite.
1043 `(("python-lxml" ,python-lxml)
1044 ("python-pillow" ,python-pillow)
1045 ("python-pytest" ,python-pytest)))
1046 (propagated-inputs
1047 `(("python-et-xmlfile" ,python-et-xmlfile)
1048 ("python-jdcal" ,python-jdcal)))
1049 (home-page "https://openpyxl.readthedocs.io")
1050 (synopsis "Python library to read/write Excel 2010 XLSX/XLSM files")
1051 (description "This Python library allows reading and writing to the Excel XLSX, XLSM,
1052XLTX and XLTM file formats that are defined by the Office Open XML (OOXML)
1053standard.")
1054 (license license:expat)))
1055
44d10b1f
RW
1056(define-public python-eventlet
1057 (package
1058 (name "python-eventlet")
c9876c9b 1059 (version "0.25.1")
44d10b1f
RW
1060 (source
1061 (origin
1062 (method url-fetch)
1063 (uri (pypi-uri "eventlet" version))
1064 (sha256
1065 (base32
c9876c9b 1066 "1hgz8jq19wlz8vwqj900ry8cjv578nz4scc91mlc8944yid6573c"))))
44d10b1f
RW
1067 (build-system python-build-system)
1068 (propagated-inputs
1069 `(("python-greenlet" ,python-greenlet)))
1070 (arguments
1071 ;; TODO: Requires unpackaged 'enum-compat'.
1072 '(#:tests? #f))
bff36617 1073 (home-page "https://eventlet.net")
44d10b1f
RW
1074 (synopsis "Concurrent networking library for Python")
1075 (description
1076 "Eventlet is a concurrent networking library for Python that
1077allows you to change how you run your code, not how you write it.
1078It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
1079Coroutines ensure that the developer uses a blocking style of programming
1080that is similar to threading, but provide the benefits of non-blocking I/O.
1081The event dispatch is implicit, which means you can easily use @code{Eventlet}
1082from the Python interpreter, or as a small part of a larger application.")
1083 (license license:expat)))
1084
1085(define-public python2-eventlet
1086 (let ((base (package-with-python2
1087 (strip-python2-variant python-eventlet))))
1088 (package (inherit base)
1089 (propagated-inputs
1090 `(("python2-enum34" ,python2-enum34)
1091 ,@(package-propagated-inputs base))))))
1092
1093(define-public python-six
1094 (package
1095 (name "python-six")
6c58a06e 1096 (version "1.12.0")
44d10b1f
RW
1097 (source
1098 (origin
1099 (method url-fetch)
1100 (uri (pypi-uri "six" version))
1101 (sha256
1102 (base32
6c58a06e 1103 "0wxs1q74v07ssjywbbm7x6h5v9qx209ld2yfsif4060sxi0h2sni"))))
44d10b1f
RW
1104 (build-system python-build-system)
1105 (arguments
1106 `(#:phases
1107 (modify-phases %standard-phases
1108 (replace 'check
1109 (lambda _
1110 (invoke "py.test" "-v"))))))
1111 (native-inputs
1112 `(("python-py" ,python-py)
1113 ("python-pytest" ,python-pytest-bootstrap)))
1114 (home-page "https://pypi.python.org/pypi/six/")
1115 (synopsis "Python 2 and 3 compatibility utilities")
1116 (description
1117 "Six is a Python 2 and 3 compatibility library. It provides utility
1118functions for smoothing over the differences between the Python versions with
1119the goal of writing Python code that is compatible on both Python versions.
1120Six supports every Python version since 2.5. It is contained in only one
1121Python file, so it can be easily copied into your project.")
1122 (license license:x11)))
1123
1124(define-public python2-six
1125 (package-with-python2 python-six))
1126
1127(define-public python-six-bootstrap
1128 (package
1129 (inherit python-six)
1130 (name "python-six-bootstrap")
1131 (native-inputs `())
1132 (arguments `(#:tests? #f))))
1133
1134(define-public python2-six-bootstrap
1135 (package-with-python2 python-six-bootstrap))
1136
1137(define-public python-schedule
1138 (package
1139 (name "python-schedule")
1140 (version "0.4.3")
1141 (source
1142 (origin
1143 (method url-fetch)
1144 (uri (pypi-uri "schedule" version))
1145 (sha256
1146 (base32
1147 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
1148 (build-system python-build-system)
1149 (native-inputs
1150 `(("python-pytest" ,python-pytest)
1151 ("python-mock" ,python-mock)))
1152 (home-page "https://github.com/dbader/schedule")
1153 (synopsis "Schedule periodic function calls in Python")
1154 (description
1155 "Schedule is an in-process scheduler for periodic jobs that uses the
1156builder pattern for configuration. Schedule lets you run Python functions (or
1157any other callable) periodically at pre-determined intervals using a simple,
1158human-friendly syntax.")
1159 (license license:expat)))
1160
1161(define-public python2-schedule
1162 (package-with-python2 python-schedule))
1163
44d10b1f
RW
1164(define-public python2-mechanize
1165 (package
1166 (name "python2-mechanize")
1167 (version "0.2.5")
1168 (source
1169 (origin
1170 (method url-fetch)
1cc184e6 1171 (uri (pypi-uri "mechanize" version))
44d10b1f
RW
1172 (sha256
1173 (base32
1174 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1175 (build-system python-build-system)
1176 (arguments
1177 `(#:python ,python-2 ; apparently incompatible with Python 3
1178 #:tests? #f))
1179 ;; test fails with message
1180 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1181 ;; (python-3.3.2) or
1182 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1183 ;; (python-2.7.5).
1184 ;; The source code is from March 2011 and probably not up-to-date
1185 ;; with respect to python unit tests.
1186 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1187 (synopsis
1188 "Stateful programmatic web browsing in Python")
1189 (description
1190 "Mechanize implements stateful programmatic web browsing in Python,
1191after Andy Lester’s Perl module WWW::Mechanize.")
1192 (license (license:non-copyleft
1193 "file://COPYING"
1194 "See COPYING in the distribution."))))
1195
1196
1197(define-public python-simplejson
1198 (package
1199 (name "python-simplejson")
1200 (version "3.14.0")
1201 (source
1202 (origin
1203 (method url-fetch)
1204 (uri (pypi-uri "simplejson" version))
1205 (sha256
1206 (base32
1207 "1lkv3xlf7ryzi69zqfdbkvpxdfy1rg1rq2yzcnxgf4km5m6difqy"))))
1208 (build-system python-build-system)
1209 (home-page "http://simplejson.readthedocs.org/en/latest/")
1210 (synopsis
1211 "Json library for Python")
1212 (description
1213 "JSON (JavaScript Object Notation) is a subset of JavaScript
1214syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1215format.
1216
1217Simplejson exposes an API familiar to users of the standard library marshal
1218and pickle modules. It is the externally maintained version of the json
1219library contained in Python 2.6, but maintains compatibility with Python 2.5
1220and (currently) has significant performance advantages, even without using
1221the optional C extension for speedups. Simplejson is also supported on
1222Python 3.3+.")
1223 (license license:x11)))
1224
1225(define-public python2-simplejson
1226 (package-with-python2 python-simplejson))
1227
1228
1229(define-public python-pyicu
1230 (package
1231 (name "python-pyicu")
dc23bb45 1232 (version "2.3.1")
44d10b1f
RW
1233 (source
1234 (origin
1235 (method url-fetch)
1236 (uri (pypi-uri "PyICU" version))
1237 (sha256
1238 (base32
dc23bb45 1239 "1x4w8m7ifki9z2a187pgjr33z6z0rp2fii9b73djak1vhm9v9cnx"))))
44d10b1f
RW
1240 (build-system python-build-system)
1241 (inputs
1242 `(("icu4c" ,icu4c)))
1243 (native-inputs
1244 `(("python-pytest" ,python-pytest)
1245 ("python-six" ,python-six)))
1246 (home-page "https://github.com/ovalhub/pyicu")
1247 (synopsis "Python extension wrapping the ICU C++ API")
1248 (description
1249 "PyICU is a python extension wrapping the ICU C++ API.")
1250 (properties `((python2-variant . ,(delay python2-pyicu))))
1251 (license license:x11)))
1252
1253(define-public python2-pyicu
1254 (let ((base (package-with-python2
1255 (strip-python2-variant python-pyicu))))
1256 (package
1257 (inherit base)
1258 (arguments
1259 `(,@(package-arguments base)
1260 #:phases
1261 (modify-phases %standard-phases
1262 (add-before 'check 'delete-failing-test
1263 (λ _
1264 ;; XXX: This fails due to Unicode issues unique to Python 2,
1265 ;; it seems: <https://github.com/ovalhub/pyicu/issues/61>.
1266 (delete-file "test/test_Script.py")
1267 #t))))))))
1268
1269(define-public python2-dogtail
1270 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1271 ;; spaces in indentation" with Python 3.
1272 (package
1273 (name "python2-dogtail")
1274 (version "0.9.9")
1275 (source (origin
1276 (method url-fetch)
1277 (uri (pypi-uri "dogtail" version))
1278 (sha256
1279 (base32
1280 "0p5wfssvzr9w0bvhllzbbd8fnp4cca2qxcpcsc33dchrmh5n552x"))))
1281 (build-system python-build-system)
1282 (arguments `(#:python ,python-2
1283 #:tests? #f)) ; invalid command "test"
1284 ;; Currently no offical homepage.
1285 (home-page "https://pypi.python.org/pypi/dogtail/")
1286 (synopsis "GUI test tool and automation framework written in Python")
1287 (description
1288 "Dogtail is a GUI test tool and automation framework written in Python.
1289It uses Accessibility (a11y) technologies to communicate with desktop
1290applications. dogtail scripts are written in Python and executed like any
1291other Python program.")
1292 (license license:gpl2+)))
1293
1294(define-public python-empy
1295 (package
1296 (name "python-empy")
0f6d5115 1297 (version "3.3.3")
44d10b1f
RW
1298 (source (origin
1299 (method url-fetch)
1300 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1301 version ".tar.gz"))
1302 (sha256
1303 (base32
0f6d5115 1304 "1mxfy5mgp473ga1pgz2nvm8ds6z4g3hdky8523z6jzvcs9ny6hcq"))))
44d10b1f
RW
1305 (build-system python-build-system)
1306 (arguments
0f6d5115 1307 `(#:tests? #f)) ; python2 only
44d10b1f
RW
1308 (home-page "http://www.alcyone.com/software/empy/")
1309 (synopsis "Templating system for Python")
1310 (description
1311 "EmPy is a system for embedding Python expressions and statements in
1312template text; it takes an EmPy source file, processes it, and produces
1313output. This is accomplished via expansions, which are special signals to the
1314EmPy system and are set off by a special prefix (by default the at sign, @@).
1315EmPy can expand arbitrary Python expressions and statements in this way, as
1316well as a variety of special forms. Textual data not explicitly delimited in
1317this way is sent unaffected to the output, allowing Python to be used in
1318effect as a markup language. Also supported are callbacks via hooks,
1319recording and playback via diversions, and dynamic, chainable filters. The
1320system is highly configurable via command line options and embedded
1321commands.")
1322 (license license:lgpl2.1+)))
1323
1324(define-public python2-empy
0f064242
TGR
1325 (let ((base (package-with-python2 (strip-python2-variant python-empy))))
1326 (package
1327 (inherit base)
1328 (arguments `(,@(package-arguments base)
1329 #:tests? #t)))))
44d10b1f
RW
1330
1331(define-public python2-element-tree
1332 (package
1333 (name "python2-element-tree")
1334 (version "1.2.6")
1335 (source (origin
1336 (method url-fetch)
1337 (uri (string-append
1338 "http://effbot.org/media/downloads/elementtree-"
1339 version "-20050316.tar.gz"))
1340 (sha256
1341 (base32
1342 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1343 (build-system python-build-system)
1344 (arguments
1345 `(#:python ,python-2 ; seems to be part of Python 3
1346 #:tests? #f)) ; no 'test' sub-command
1347 (synopsis "Toolkit for XML processing in Python")
1348 (description
1349 "ElementTree is a Python library supporting lightweight XML processing.")
1350 (home-page "http://effbot.org/zone/element-index.htm")
1351 (license (license:x11-style
1352 "http://docs.python.org/2/license.html"
1353 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1354
1355(define-public python2-pybugz
1356 (package
1357 (name "python2-pybugz")
1358 (version "0.6.11")
1359 (source (origin
1360 (method url-fetch)
1361 (uri (string-append
1362 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1363 version ".tar.gz"))
1364 (sha256
1365 (base32
1366 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1367 (patches (search-patches "pybugz-stty.patch"
1368 "pybugz-encode-error.patch"))))
1369 (build-system python-build-system)
1370 (arguments
1371 `(#:python ,python-2 ; SyntaxError with Python 3
1372 #:tests? #f)) ; no 'test' sub-command
1373 (propagated-inputs
1374 `(("element-tree" ,python2-element-tree)))
1375 (synopsis "Python and command-line interface to Bugzilla")
1376 (description
1377 "PyBugz is a Python library and command-line tool to query the Bugzilla
1378bug tracking system. It is meant as an aid to speed up interaction with the
1379bug tracker.")
1380 (home-page "http://www.liquidx.net/pybugz/")
1381 (license license:gpl2)))
1382
1383(define-public python2-enum
1384 (package
1385 (name "python2-enum")
1386 (version "0.4.6")
1387 (source (origin
1388 (method url-fetch)
1389 (uri (pypi-uri "enum" version))
1390 (sha256
1391 (base32
1392 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
1393 (build-system python-build-system)
1394 (arguments
1395 `(#:python ,python-2))
a1b867e4 1396 (home-page "https://pypi.python.org/pypi/enum/")
44d10b1f
RW
1397 (synopsis "Robust enumerated type support in Python")
1398 (description
1399 "This provides a module for robust enumerations in Python. It has
1400been superseded by the Python standard library and is provided only for
1401compatibility.")
1402 ;; Choice of either license.
1403 (license (list license:gpl3+ license:psfl))))
1404
1405(define-public python-enum34
1406 (package
1407 (name "python-enum34")
1408 (version "1.1.6")
1409 (source
1410 (origin
1411 (method url-fetch)
1412 (uri (pypi-uri "enum34" version))
1413 (sha256
1414 (base32
1415 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
1416 (build-system python-build-system)
1417 (home-page "https://pypi.python.org/pypi/enum34")
1418 (synopsis "Backported Python 3.4 Enum")
1419 (description
1420 "Enum34 is the new Python stdlib enum module available in Python 3.4
1421backported for previous versions of Python from 2.4 to 3.3.")
1422 (license license:bsd-3)))
1423
1424(define-public python2-enum34
1425 (package-with-python2 python-enum34))
1426
1427(define-public python-parse-type
1428 (package
1429 (name "python-parse-type")
1430 (version "0.4.2")
1431 (source
1432 (origin
1433 (method url-fetch)
1434 (uri (pypi-uri "parse_type" version))
1435 (sha256
1436 (base32
1437 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
1438 (build-system python-build-system)
1439 (propagated-inputs
1440 `(("python-six" ,python-six)
1441 ("python-parse" ,python-parse)))
1442 (native-inputs
1443 `(("python-pytest" ,python-pytest)
1444 ("python-pytest-runner" ,python-pytest-runner)))
1445 (home-page "https://github.com/jenisys/parse_type")
1446 (synopsis "Extended parse module")
1447 (description
1448 "Parse_type extends the python parse module.")
1449 (properties
1450 `((python2-variant . ,(delay python2-parse-type))))
1451 (license license:bsd-3)))
1452
1453(define-public python2-parse-type
1454 (let ((base (package-with-python2
1455 (strip-python2-variant python-parse-type))))
1456 (package (inherit base)
1457 (propagated-inputs
1458 `(("python2-enum34" ,python2-enum34)
1459 ,@(package-propagated-inputs base))))))
1460
1461(define-public python-parse
1462 (package
1463 (name "python-parse")
1464 (version "1.8.4")
1465 (source
1466 (origin
1467 (method url-fetch)
1468 (uri (pypi-uri "parse" version))
1469 (sha256
1470 (base32
1471 "0f8997xr8nq2nq35iiviq8ningd1zvy59fg503xfpbi2dwhgdkf3"))))
1472 (build-system python-build-system)
1473 (arguments
1474 `(#:phases
1475 (modify-phases %standard-phases
1476 (replace 'check
1477 (lambda _ (invoke "python" "test_parse.py"))))))
1478 (home-page "https://github.com/r1chardj0n3s/parse")
1479 (synopsis "Parse strings")
1480 (description
1481 "Parse strings using a specification based on the Python @code{format()}
1482syntax.")
1483 (license license:x11)))
1484
1485(define-public python-polib
1486 (package
1487 (name "python-polib")
1488 (version "1.0.8")
1489 (source (origin
1490 (method url-fetch)
1491 (uri (pypi-uri "polib" version))
1492 (sha256
1493 (base32
1494 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1495 (build-system python-build-system)
1496 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1497 (synopsis "Manipulate, create and modify gettext files")
1498 (description "Polib can manipulate any gettext format (po, pot and mo)
1499files. It can be used to create po files from scratch or to modify
1500existing ones.")
1501 (license license:expat)))
1502
1503(define-public python2-polib
1504 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1505 (package
1506 (inherit base)
1507 (arguments `(,@(package-arguments base)
1508 ;; Tests don't work with python2.
1509 #:tests? #f)))))
1510
6830120e
TLC
1511(define-public python-poyo
1512 (package
1513 (name "python-poyo")
1514 (version "0.5.0")
1515 (source
1516 (origin
1517 (method url-fetch)
1518 (uri (pypi-uri "poyo" version))
1519 (sha256
1520 (base32
1521 "1pflivs6j22frz0v3dqxnvc8yb8fb52g11lqr88z0i8cg2m5csg2"))))
1522 (build-system python-build-system)
1523 (home-page "https://github.com/hackebrot/poyo")
1524 (synopsis "Lightweight YAML Parser for Python")
1525 (description
1526 "This package provides a lightweight YAML Parser for Python. It supports
1527only a chosen subset of the YAML format that is required to parse cookiecutter
1528user configuration files. It does not have support for serializing into YAML
1529and is not compatible with JSON.")
1530 (license license:expat)))
1531
44d10b1f
RW
1532(define-public scons
1533 (package
1534 (name "scons")
05487ed8 1535 (version "3.0.4")
44d10b1f 1536 (source (origin
ad34338d
RW
1537 (method git-fetch)
1538 (uri (git-reference
1539 (url "https://github.com/SCons/scons.git")
1540 (commit version)))
1541 (file-name (git-file-name name version))
44d10b1f
RW
1542 (sha256
1543 (base32
05487ed8 1544 "1xy8jrwz87y589ihcld4hv7wn122sjbz914xn8h50ww77wbhk8hn"))))
44d10b1f
RW
1545 (build-system python-build-system)
1546 (arguments
1547 `(#:use-setuptools? #f ; still relies on distutils
ad34338d
RW
1548 #:tests? #f ; no 'python setup.py test' command
1549 #:phases
1550 (modify-phases %standard-phases
1551 (add-before 'build 'bootstrap
1552 (lambda _
1553 (substitute* "src/engine/SCons/compat/__init__.py"
1554 (("sys.modules\\[new\\] = imp.load_module\\(old, \\*imp.find_module\\(old\\)\\)")
1555 "sys.modules[new] = __import__(old)"))
05487ed8
RW
1556 (substitute* "src/engine/SCons/Platform/__init__.py"
1557 (("mod = imp.load_module\\(full_name, file, path, desc\\)")
1558 "mod = __import__(full_name)"))
ad34338d
RW
1559 (invoke "python" "bootstrap.py" "build/scons" "DEVELOPER=guix")
1560 (chdir "build/scons")
1561 #t)))))
3602de33 1562 (home-page "https://scons.org/")
44d10b1f
RW
1563 (synopsis "Software construction tool written in Python")
1564 (description
1565 "SCons is a software construction tool. Think of SCons as an improved,
1566cross-platform substitute for the classic Make utility with integrated
1567functionality similar to autoconf/automake and compiler caches such as ccache.
1568In short, SCons is an easier, more reliable and faster way to build
1569software.")
1570 (license license:x11)))
1571
1572(define-public scons-python2
1573 (package
1574 (inherit (package-with-python2 scons))
1575 (name "scons-python2")))
1576
1577(define-public python-extras
1578 (package
1579 (name "python-extras")
1580 (version "1.0.0")
1581 (source
1582 (origin
1583 (method url-fetch)
1584 (uri (pypi-uri "extras" version))
1585 (sha256
1586 (base32
1587 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
1588 (build-system python-build-system)
1589 (arguments
1590 ;; FIXME: Circular dependency on testtools.
1591 '(#:tests? #f))
1592 (home-page "https://github.com/testing-cabal/extras")
1593 (synopsis "Useful extensions to the Python standard library")
1594 (description
1595 "Extras is a set of extensions to the Python standard library.")
1596 (license license:expat)))
1597
1598(define-public python2-extras
1599 (package-with-python2 python-extras))
1600
1601(define-public python-mimeparse
1602 (package
1603 (name "python-mimeparse")
1604 (version "1.6.0")
1605 (source
1606 (origin
1607 (method url-fetch)
89bf667c 1608 (uri (pypi-uri "python-mimeparse" version))
44d10b1f
RW
1609 (sha256
1610 (base32
1611 "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n"))))
1612 (build-system python-build-system)
1613 (arguments
1614 '(#:phases
1615 (modify-phases %standard-phases
1616 (replace 'check
1617 (lambda _
1618 (invoke "./mimeparse_test.py"))))))
1619 (home-page
1620 "https://github.com/dbtsai/python-mimeparse")
1621 (synopsis "Python library for parsing MIME types")
1622 (description
1623 "Mimeparse provides basic functions for parsing MIME type names and
1624matching them against a list of media-ranges.")
1625 (license license:expat)))
1626
1627(define-public python2-mimeparse
1628 (package-with-python2 python-mimeparse))
1629
1630(define-public python-miniboa
1631 (package
1632 (name "python-miniboa")
1633 (version "1.0.7")
1634 (source
1635 (origin
1636 (method url-fetch)
1637 (uri (pypi-uri "miniboa" version))
1638 (sha256
1639 (base32
1640 "09jh3pn4rh7kh7jayanf8jzy6gp03791b5a193w6148cf3i6k9m3"))))
1641 (build-system python-build-system)
1642 (home-page "https://github.com/shmup/miniboa")
1643 (synopsis "Simple, single-threaded Telnet server")
1644 (description
1645 "Miniboa is a simple, asynchronous, single-threaded, poll-based Telnet
1646server.")
1647 (license license:asl2.0)))
1648
1649(define-public python2-miniboa
1650 (package-with-python2 python-miniboa))
1651
1652(define-public python-pafy
1653 (package
1654 (name "python-pafy")
1655 (version "0.5.3.1")
1656 (source
1657 (origin
1658 (method url-fetch)
1659 (uri (pypi-uri "pafy" version))
1660 (sha256
1661 (base32
1662 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
1663 (build-system python-build-system)
1664 (arguments
1665 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
1666 (propagated-inputs
1667 ;; Youtube-dl is a python package which is imported in the file
1668 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1669 `(("youtube-dl" ,youtube-dl)))
1670 (home-page "https://np1.github.io/pafy/")
1671 (synopsis "Retrieve YouTube content and metadata")
1672 (description
1673 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1674 (license license:lgpl3+)))
1675
1676(define-public python2-funcsigs
1677 (package
1678 (name "python2-funcsigs")
1679 (version "1.0.2")
1680 (source (origin
1681 (method url-fetch)
1682 (uri (pypi-uri "funcsigs" version))
1683 (sha256
1684 (base32
1685 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
1686 (build-system python-build-system)
1687 (arguments
1688 `(#:python ,python-2))
1689 (native-inputs
1690 `(("python2-unittest2" ,python2-unittest2)))
1691 (home-page "http://funcsigs.readthedocs.org")
1692 (synopsis "Python function signatures from PEP362")
1693 (description
1694 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
1695 (license license:asl2.0)))
1696
1697(define-public python2-funcsigs-bootstrap
1698 (package
1699 (inherit python2-funcsigs)
1700 (name "python2-funcsigs-bootstrap")
1701 (native-inputs `())
1702 (arguments
1703 `(#:tests? #f
1704 ,@(package-arguments python2-funcsigs)))))
1705
1706(define-public python-py
1707 (package
1708 (name "python-py")
08eba545 1709 (version "1.8.0")
44d10b1f
RW
1710 (source
1711 (origin
1712 (method url-fetch)
1713 (uri (pypi-uri "py" version))
1714 (sha256
1715 (base32
08eba545 1716 "0lsy1gajva083pzc7csj1cvbmminb7b4l6a0prdzyb3fd829nqyw"))))
44d10b1f
RW
1717 (build-system python-build-system)
1718 (arguments
1719 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1720 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1721 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1722 ;; Is this module globally installed?"
1723 '(#:tests? #f))
1724 (native-inputs
1725 `(("python-setuptools-scm" ,python-setuptools-scm)))
1726 (home-page "https://github.com/pytest-dev/py")
1727 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1728 (description
1729 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1730code introspection, and logging.")
1731 (license license:expat)))
1732
1733(define-public python2-py
1734 (package-with-python2 python-py))
1735
1736;; Recent versions of python-fixtures and python-testrepository need
1737;; python-pbr for packaging, which itself needs these two packages for
1738;; testing.
1739;; To fix this circular dependency, we use a build of python-pbr, based on the
1740;; same source, just without any test dependencies and with tests disabled.
1741;; python-pbr-minmal is then used to package python-fixtures and
1742;; python-testrepository.
1743;; Strictly speaking we currently could remove the test-requirements from the
1744;; normal python-pbr package (and save this package) since test are disabled
1745;; there anyway. But this may change in future.
1746(define-public python-pbr-minimal
1747 (package
1748 (name "python-pbr-minimal")
1749 (version "3.0.1")
1750 (source
1751 (origin
1752 (method url-fetch)
1753 (uri (pypi-uri "pbr" version))
1754 (sha256
1755 (base32
1756 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
1757 (build-system python-build-system)
1758 (arguments
1759 `(#:tests? #f))
1760 (home-page "http://docs.openstack.org/developer/pbr/")
1761 (synopsis "Minimal build of python-pbr used for bootstrapping")
1762 (description
1763 "Used only for bootstrapping python2-pbr, you should not need this.")
1764 (license license:asl2.0)))
1765
1766(define-public python2-pbr-minimal
1767 (package-with-python2 python-pbr-minimal))
1768
1769(define-public python-pbr
1770 (package
1771 (inherit python-pbr-minimal)
1772 (name "python-pbr")
1773 (arguments
1774 `(#:tests? #f)) ;; Most tests seem to use the Internet.
1775 (propagated-inputs
1776 `(("git" ,git))) ;; pbr actually uses the "git" binary.
1777 (native-inputs
1778 `(("python-fixtures" ,python-fixtures-bootstrap)
1779 ;; discover, coverage, hacking, subunit
1780 ("python-mock" ,python-mock)
1781 ("python-six" ,python-six)
1782 ("python-sphinx" ,python-sphinx)
1783 ("python-testrepository" ,python-testrepository-bootstrap)
1784 ("python-testresources" ,python-testresources-bootstrap)
1785 ("python-testscenarios" ,python-testscenarios-bootstrap)
1786 ("python-testtools" ,python-testtools-bootstrap)
1787 ("python-virtualenv" ,python-virtualenv)))
1788 (synopsis "Enhance the default behavior of Python’s setuptools")
1789 (description
1790 "Python Build Reasonableness (PBR) is a library that injects some useful
1791and sensible default behaviors into your setuptools run. It will set
1792versions, process requirements files and generate AUTHORS and ChangeLog file
1793from git information.
1794")))
1795
1796(define-public python2-pbr
1797 (package-with-python2 python-pbr))
1798
ea43f0d5
MB
1799(define-public python-pyrsistent
1800 (package
1801 (name "python-pyrsistent")
1802 (version "0.14.11")
1803 (home-page "https://github.com/tobgu/pyrsistent")
1804 (source (origin
1805 (method url-fetch)
1806 (uri (pypi-uri "pyrsistent" version))
1807 (sha256
1808 (base32
1809 "1qkh74bm296mp5g3r11lgsksr6bh4w1bf8pji4nmxdlfj542ga1w"))))
1810 (build-system python-build-system)
1811 (native-inputs
1812 `(("python-hypothesis" ,python-hypothesis)
1813 ("python-pytest" ,python-pytest)
1814 ("python-pytest-runner" ,python-pytest-runner)))
1815 (propagated-inputs
1816 `(("python-six" ,python-six)))
1817 (synopsis "Persistent data structures for Python")
1818 (description
1819 "Pyrsistent is a number of persistent collections (by some referred to as
1820functional data structures). Persistent in the sense that they are immutable.
1821
1822All methods on a data structure that would normally mutate it instead return a
1823new copy of the structure containing the requested updates. The original
1824structure is left untouched.")
1825 (license license:expat)))
1826
1827(define-public python2-pyrsistent
1828 (package-with-python2 python-pyrsistent))
1829
44d10b1f
RW
1830(define-public python-exif-read
1831 (package
1832 (name "python-exif-read")
1833 (version "2.1.2")
1834 (source (origin
1835 (method url-fetch)
1836 (uri (pypi-uri "ExifRead" version))
1837 (sha256
1838 (base32
1839 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
1840 (build-system python-build-system)
1841 (arguments `(#:tests? #f)) ; no tests
1842 (home-page "https://github.com/ianare/exif-py")
1843 (synopsis "Python library to extract EXIF data from image files")
1844 (description
1845 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
1846files.")
1847 (license license:bsd-3)))
1848
1849(define-public python2-exif-read
1850 (package-with-python2 python-exif-read))
1851
1852(define-public python-pyld
1853 (package
1854 (name "python-pyld")
6d4ed78d 1855 (version "1.0.5")
44d10b1f
RW
1856 (source (origin
1857 (method url-fetch)
1858 (uri (pypi-uri "PyLD" version))
1859 (sha256
1860 (base32
6d4ed78d 1861 "1ywbdbsrkg533qh8xn9ifjh2mvam6v5msrjyqq73jfpvcp89qvff"))))
44d10b1f
RW
1862 (build-system python-build-system)
1863 (home-page "https://github.com/digitalbazaar/pyld")
1864 (synopsis "Python implementation of the JSON-LD specification")
1865 (description
1866 "PyLD is an implementation of the JSON-LD specification.")
1867 (license license:bsd-3)))
1868
1869(define-public python2-pyld
1870 (package-with-python2 python-pyld))
1871
1872(define-public python-click
1873 (package
1874 (name "python-click")
61984855 1875 (version "7.0")
44d10b1f
RW
1876 (source
1877 (origin
1878 (method url-fetch)
1879 (uri (pypi-uri "click" version))
1880 (sha256
1881 (base32
61984855 1882 "1mzjixd4vjbjvzb6vylki9w1556a9qmdh35kzmq6cign46av952v"))))
44d10b1f
RW
1883 (build-system python-build-system)
1884 (arguments
8d7e7ca6 1885 `(#:phases
44d10b1f
RW
1886 (modify-phases %standard-phases
1887 (add-after 'unpack 'fix-paths
1888 (lambda* (#:key inputs #:allow-other-keys)
1889 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
1890 "cross-libc" "libc"))))
1891 (substitute* "click/_unicodefun.py"
1892 (("'locale'")
1893 (string-append "'" glibc "/bin/locale'"))))
8d7e7ca6
EF
1894 #t))
1895 (replace 'check
1896 (lambda _
1897 (invoke "python" "-m" "pytest"))))))
44d10b1f
RW
1898 (native-inputs
1899 `(("python-pytest" ,python-pytest)))
61984855 1900 (home-page "https://palletsprojects.com/p/click/")
44d10b1f
RW
1901 (synopsis "Command line library for Python")
1902 (description
1903 "Click is a Python package for creating command line interfaces in a
1904composable way with as little code as necessary. Its name stands for
1905\"Command Line Interface Creation Kit\". It's highly configurable but comes
1906with sensible defaults out of the box.")
1907 (license license:bsd-3)))
1908
1909(define-public python2-click
1910 (package-with-python2 python-click))
1911
1912(define-public python-wheel
1913 (package
1914 (name "python-wheel")
8f137daf 1915 (version "0.33.6")
44d10b1f
RW
1916 (source
1917 (origin
1918 (method url-fetch)
1919 (uri (pypi-uri "wheel" version))
1920 (sha256
1921 (base32
8f137daf 1922 "0ii6f34rvpjg3nmw4bc2h7fhdsy38y1h93hghncfs5akfrldmj8h"))))
44d10b1f 1923 (build-system python-build-system)
8f137daf
MB
1924 (arguments
1925 ;; FIXME: The test suite runs "python setup.py bdist_wheel", which in turn
1926 ;; fails to find the newly-built bdist_wheel library, even though it is
1927 ;; available on PYTHONPATH. What search path is consulted by setup.py?
1928 '(#:tests? #f))
44d10b1f
RW
1929 (home-page "https://bitbucket.org/pypa/wheel/")
1930 (synopsis "Format for built Python packages")
1931 (description
1932 "A wheel is a ZIP-format archive with a specially formatted filename and
1933the @code{.whl} extension. It is designed to contain all the files for a PEP
1934376 compatible install in a way that is very close to the on-disk format. Many
1935packages will be properly installed with only the @code{Unpack} step and the
1936unpacked archive preserves enough information to @code{Spread} (copy data and
1937scripts to their final locations) at any later time. Wheel files can be
1938installed with a newer @code{pip} or with wheel's own command line utility.")
8f137daf 1939 (license license:expat)))
44d10b1f
RW
1940
1941(define-public python2-wheel
8f137daf 1942 (package-with-python2 python-wheel))
44d10b1f
RW
1943
1944(define-public python-vcversioner
1945 (package
1946 (name "python-vcversioner")
1947 (version "2.16.0.0")
1948 (source
1949 (origin
1950 (method url-fetch)
1951 (uri (pypi-uri "vcversioner" version))
1952 (sha256
1953 (base32
1954 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
1955 (build-system python-build-system)
1956 (synopsis "Python library for version number discovery")
1957 (description "Vcversioner is a Python library that inspects tagging
1958information in a variety of version control systems in order to discover
1959version numbers.")
1960 (home-page "https://github.com/habnabit/vcversioner")
1961 (license license:isc)))
1962
1963(define-public python2-vcversioner
1964 (package-with-python2 python-vcversioner))
1965
5591fc4f
MC
1966(define-public python-jdcal
1967 (package
1968 (name "python-jdcal")
1969 (version "1.4")
1970 (source
1971 (origin
1972 (method url-fetch)
1973 (uri (pypi-uri "jdcal" version))
1974 (sha256
1975 (base32
1976 "1ja6j2xq97bsl6rv09mhdx7n0xnrsfx0mj5xqza0mxghqmkm02pa"))))
1977 (build-system python-build-system)
1978 (arguments
1979 `(#:phases (modify-phases %standard-phases
1980 (replace 'check
1981 (lambda _
1982 (invoke "pytest"))))))
1983 (native-inputs
1984 `(("python-pytest" ,python-pytest)))
1985 (home-page "https://github.com/phn/jdcal")
1986 (synopsis "Functions to convert between Julian dates Gregorian dates")
1987 (description "This Python library provides functions for converting
1988between Julian dates and Gregorian dates.")
1989 (license license:bsd-2)))
1990
1991(define-public python2-jdcal
1992 (package-with-python2 python-jdcal))
1993
06d41d8d
VC
1994(define-public python-jsondiff
1995 (package
1996 (name "python-jsondiff")
1997 (version "1.2.0")
1998 (source
1999 (origin
2000 (method url-fetch)
2001 (uri (pypi-uri "jsondiff" version))
2002 (sha256
2003 (base32
2004 "00v3689175aqzdscrxpffm712ylp8jvcpqdg51ca22ni6721p51l"))))
2005 (build-system python-build-system)
2006 (native-inputs
2007 `(("python-nose" ,python-nose)
2008 ("python-nose-random" ,python-nose-random)))
2009 (home-page
2010 "https://github.com/fzumstein/jsondiff")
2011 (synopsis "Compare JSON and JSON-like structures in Python")
2012 (description "@code{jsondiff} is a Python library which lets you
2013compare, diff, and patch JSON and JSON-like structures in Python.")
2014 (license license:expat)))
2015
44d10b1f
RW
2016(define-public python-jsonschema
2017 (package
2018 (name "python-jsonschema")
1adde06e 2019 (version "3.0.1")
44d10b1f
RW
2020 (source (origin
2021 (method url-fetch)
786ccb87 2022 (uri (pypi-uri "jsonschema" version))
44d10b1f
RW
2023 (sha256
2024 (base32
1adde06e 2025 "03g20i1xfg4qdlk4475pl4pp7y0h37g1fbgs5qhy678q9xb822hc"))))
44d10b1f
RW
2026 (build-system python-build-system)
2027 (arguments
2028 '(#:phases
2029 (modify-phases %standard-phases
1adde06e
MB
2030 (replace 'check
2031 (lambda _
2032 (setenv "PYTHONPATH" (string-append ".:" (getenv "PYTHONPATH")))
2033 (invoke "trial" "jsonschema"))))))
44d10b1f 2034 (native-inputs
1adde06e
MB
2035 `(("python-setuptools_scm" ,python-setuptools-scm)
2036 ("python-twisted" ,python-twisted)))
2037 (propagated-inputs
2038 `(("python-attrs" ,python-attrs)
2039 ("python-pyrsistent" ,python-pyrsistent)
2040 ("python-six" ,python-six)))
44d10b1f
RW
2041 (home-page "https://github.com/Julian/jsonschema")
2042 (synopsis "Implementation of JSON Schema for Python")
2043 (description
2044 "Jsonschema is an implementation of JSON Schema for Python.")
2045 (license license:expat)
2046 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2047
2048(define-public python2-jsonschema
2049 (let ((jsonschema (package-with-python2
2050 (strip-python2-variant python-jsonschema))))
2051 (package (inherit jsonschema)
44d10b1f 2052 (propagated-inputs
1adde06e
MB
2053 `(("python2-functools32" ,python2-functools32)
2054 ,@(package-propagated-inputs jsonschema))))))
44d10b1f 2055
914bba28
TGR
2056;; This old version is still required by docker-compose as of 1.24.0.
2057(define-public python-jsonschema-2.6
2058 (package
2059 (name "python-jsonschema")
2060 (version "2.6.0")
2061 (source (origin
2062 (method url-fetch)
2063 (uri (pypi-uri "jsonschema" version))
2064 (sha256
2065 (base32
2066 "00kf3zmpp9ya4sydffpifn0j0mzm342a2vzh82p6r0vh10cg7xbg"))))
2067 (build-system python-build-system)
2068 (arguments
2069 '(#:phases
2070 (modify-phases %standard-phases
2071 (replace 'check (lambda _ (invoke "nosetests"))))))
2072 (native-inputs
2073 `(("python-nose" ,python-nose)
2074 ("python-vcversioner" ,python-vcversioner)))
2075 (home-page "https://github.com/Julian/jsonschema")
2076 (synopsis "Implementation of JSON Schema for Python")
2077 (description
2078 "Jsonschema is an implementation of JSON Schema for Python.")
2079 (license license:expat)
2080 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2081
44d10b1f
RW
2082(define-public python-schema
2083 (package
2084 (name "python-schema")
2085 (version "0.6.6")
2086 (source
2087 (origin
2088 (method url-fetch)
2089 (uri (pypi-uri "schema" version))
2090 (sha256
2091 (base32
2092 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
2093 (build-system python-build-system)
2094 (native-inputs
2095 `(("python-pytest" ,python-pytest)))
2096 (home-page "https://github.com/keleshev/schema")
2097 (synopsis "Simple data validation library")
2098 (description
2099 "@code{python-schema} is a library for validating Python data
2100structures, such as those obtained from config-files, forms, external
2101services or command-line parsing, converted from JSON/YAML (or
2102something else) to Python data-types.")
2103 (license license:psfl)))
2104
2105(define-public python2-schema
2106 (package-with-python2 python-schema))
2107
2108(define-public python-schema-0.5
2109 (package (inherit python-schema)
2110 (version "0.5.0")
2111 (source
2112 (origin
2113 (method url-fetch)
2114 (uri (pypi-uri "schema" version))
2115 (sha256
2116 (base32
2117 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
2118
2119(define-public python2-schema-0.5
2120 (package-with-python2 python-schema-0.5))
2121
2122(define-public python-kitchen
2123 (package
2124 (name "python-kitchen")
2125 (version "1.2.5")
2126 (source
2127 (origin
2128 (method url-fetch)
2129 (uri (pypi-uri "kitchen" version))
2130 (sha256
2131 (base32
2132 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
2133 (build-system python-build-system)
2134 (propagated-inputs
2135 `(("python-chardet" ,python-chardet)))
2136 (home-page "https://github.com/fedora-infra/kitchen")
2137 (synopsis "Python API for snippets")
2138 (description "@code{kitchen} module provides a python API for all sorts of
2139little useful snippets of code that everybody ends up writing for their projects
2140but never seem big enough to build an independent release. Use kitchen and stop
2141cutting and pasting that code over and over.")
2142 (license (list license:lgpl2.1+
2143 ;; subprocess.py, test_subprocess.py,
2144 ;; kitchen/pycompat25/defaultdict.py:
2145 license:psfl))))
2146
2147(define-public python2-kitchen
2148 (package-with-python2 python-kitchen))
2149
2150(define-public python-unidecode
2151 (package
2152 (name "python-unidecode")
eb80a300 2153 (version "1.1.1")
44d10b1f
RW
2154 (source (origin
2155 (method url-fetch)
2156 (uri (pypi-uri "Unidecode" version))
2157 (sha256
2158 (base32
eb80a300 2159 "1s6cp2lv4m0f00hjckjz8p6m7d3n3v16jvg353llf5ia1iqsnsib"))))
44d10b1f
RW
2160 (build-system python-build-system)
2161 (home-page "https://pypi.python.org/pypi/Unidecode")
2162 (synopsis "ASCII transliterations of Unicode text")
2163 (description
2164 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2165useful when integrating with legacy code that doesn't support Unicode, or for
2166ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2167machine identifiers from human-readable Unicode strings that should still be
2168somewhat intelligible.")
2169 (license license:gpl2+)))
2170
2171(define-public python2-unidecode
2172 (package-with-python2 python-unidecode))
2173
2174(define-public python-pyjwt
2175 (package
2176 (name "python-pyjwt")
be6f2f56 2177 (version "1.7.1")
44d10b1f
RW
2178 (source
2179 (origin
2180 (method url-fetch)
2181 (uri (pypi-uri "PyJWT" version))
2182 (sha256
2183 (base32
be6f2f56 2184 "15hflax5qkw1v6nssk1r0wkj83jgghskcmn875m3wgvpzdvajncd"))
44d10b1f
RW
2185 (modules '((guix build utils)))
2186 (snippet
2187 '(begin
2188 (for-each delete-file-recursively
2189 (find-files "." "\\.pyc$"))
2190 #t))))
2191 (build-system python-build-system)
2192 (native-inputs
2193 `(("python-pytest" ,python-pytest)
2194 ("python-pytest-cov" ,python-pytest-cov)
2195 ("python-pytest-runner" ,python-pytest-runner)))
2196 (home-page "https://github.com/progrium/pyjwt")
2197 (synopsis "JSON Web Token implementation in Python")
2198 (description
2199 "PyJWT is a JSON Web Token implementation written in Python.")
2200 (license license:expat)))
2201
2202(define-public python2-pyjwt
2203 (package-with-python2 python-pyjwt))
2204
2205(define-public python-pykka
2206 (package
2207 (name "python-pykka")
2208 (version "1.2.1")
2209 (source
2210 (origin
2211 (method url-fetch)
2212 (uri (pypi-uri "Pykka" version))
2213 (sha256
2214 (base32
2215 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
2216 (build-system python-build-system)
2217 (native-inputs
2218 `(("python-mock" ,python-mock)
2219 ("python-nose" ,python-nose)
2220 ("python-gevent" ,python-gevent)
2221 ("python-eventlet" ,python-eventlet)))
2222 (home-page "https://www.pykka.org/")
2223 (synopsis "Pykka is a Python implementation of the actor model")
2224 (description
2225 "Pykka is a Python implementation of the actor model.
2226The actor model introduces some simple rules to control the sharing
2227of state and cooperation between execution units, which makes it
2228easier to build concurrent applications.")
2229 (license license:asl2.0)))
2230
2231(define-public python2-pykka
2232 (package-with-python2 python-pykka))
2233
8d22f7e3
VC
2234(define-public python-pymsgbox
2235 (package
2236 (name "python-pymsgbox")
2237 (version "1.0.6")
2238 (source
2239 (origin
2240 (method git-fetch)
2241 (uri (git-reference
2242 ;; LICENSE.txt is not present on pypi
2243 (url "https://github.com/asweigart/PyMsgBox")
2244 (commit "55926b55f46caa969c5ddb87990ebea2737bd66f")))
2245 (file-name (git-file-name name version))
2246 (sha256
2247 (base32
2248 "0zy7rjfpwlrd8b64j7jk2lb8m2npc21rnpwakpfvwgl4nxdy80rg"))))
2249 (arguments
2250 ;; Circular dependency to run tests:
2251 ;; Tests need pyautogui, which depends on pymsgbox.
2252 '(#:tests? #f))
2253 (build-system python-build-system)
2254 (home-page "https://github.com/asweigart/PyMsgBox")
2255 (synopsis "Python module for JavaScript-like message boxes")
2256 (description
2257 "PyMsgBox is a simple, cross-platform, pure Python module for
2258JavaScript-like message boxes. Types of dialog boxes include:
2259@enumerate
2260@item alert
2261@item confirm
2262@item prompt
2263@item password
2264@end enumerate
2265")
2266 (license license:bsd-3)))
2267
44d10b1f
RW
2268(define-public python-pympler
2269 (package
2270 (name "python-pympler")
2271 (home-page "https://pythonhosted.org/Pympler/")
6469af6f 2272 (version "0.8")
44d10b1f
RW
2273 (source (origin
2274 (method url-fetch)
2275 (uri (pypi-uri "Pympler" version))
2276 (sha256
2277 (base32
6469af6f 2278 "08mrpnb6cv2nvfncvr8a9a8bpwhnasa924anapnjvnaw5jcd4k7p"))))
44d10b1f
RW
2279 (build-system python-build-system)
2280 (arguments
2281 `(#:phases (modify-phases %standard-phases
2282 (delete 'check)
2283 (add-after 'install 'check
2284 (lambda* (#:key inputs outputs #:allow-other-keys)
2285 (add-installed-pythonpath inputs outputs)
2286 (invoke "python" "setup.py" "test"))))))
2287 (synopsis "Measure, monitor and analyze memory behavior")
2288 (description
2289 "Pympler is a development tool to measure, monitor and analyze
2290the memory behavior of Python objects in a running Python application.
2291
2292By pympling a Python application, detailed insight in the size and the
2293lifetime of Python objects can be obtained. Undesirable or unexpected
2294runtime behavior like memory bloat and other @samp{pymples} can easily
2295be identified.
2296
2297A web profiling frontend exposes process statistics, garbage
2298visualisation and class tracker statistics.")
2299 (license license:asl2.0)))
2300
2301(define-public python2-pympler
2302 (package-with-python2 python-pympler))
2303
2304(define-public python-itsdangerous
2305 (package
2306 (name "python-itsdangerous")
acfcf2ed 2307 (version "1.1.0")
44d10b1f
RW
2308 (source
2309 (origin
2310 (method url-fetch)
acfcf2ed 2311 (uri (pypi-uri "itsdangerous" version))
44d10b1f
RW
2312 (sha256
2313 (base32
acfcf2ed 2314 "068zpbksq5q2z4dckh2k1zbcq43ay74ylqn77rni797j0wyh66rj"))))
44d10b1f 2315 (build-system python-build-system)
acfcf2ed 2316 (home-page "https://palletsprojects.com/p/itsdangerous/")
44d10b1f
RW
2317 (synopsis "Python library for passing data to/from untrusted environments")
2318 (description
2319 "Itsdangerous provides various helpers to pass trusted data to untrusted
2320environments and back.")
2321 (license license:bsd-3)))
2322
2323(define-public python2-itsdangerous
2324 (package-with-python2 python-itsdangerous))
2325
2326(define-public python-pyyaml
2327 (package
2328 (name "python-pyyaml")
357af7f2 2329 (version "5.3")
44d10b1f
RW
2330 (source
2331 (origin
2332 (method url-fetch)
2333 (uri (pypi-uri "PyYAML" version))
2334 (sha256
2335 (base32
357af7f2 2336 "058nd4p8f25wwzy2aiwh18wcrdm6663cqbfdkgjp8y9cp7ampx79"))))
44d10b1f
RW
2337 (build-system python-build-system)
2338 (inputs
2339 `(("libyaml" ,libyaml)))
2340 (home-page "http://pyyaml.org/wiki/PyYAML")
2341 (synopsis "YAML parser and emitter for Python")
2342 (description
2343 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2344complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2345API, and sensible error messages. PyYAML supports standard YAML tags and
2346provides Python-specific tags that allow to represent an arbitrary Python
2347object.")
2348 (license license:expat)))
2349
2350(define-public python2-pyyaml
2351 (package-with-python2 python-pyyaml))
2352
2353(define-public python-vine
2354 (package
2355 (name "python-vine")
2356 (version "1.1.4")
2357 (source
2358 (origin
2359 (method url-fetch)
2360 (uri (pypi-uri "vine" version))
2361 (sha256
2362 (base32
2363 "0wkskb2hb494v9gixqnf4bl972p4ibcmxdykzpwjlfa5picns4aj"))))
2364 (build-system python-build-system)
2365 (native-inputs
2366 `(("python-pytest" ,python-pytest)
2367 ("python-case" ,python-case)))
2368 (home-page "https://github.com/celery/vine")
2369 (synopsis "Promises for Python")
2370 (description
2371 "@code{vine} provides a special implementation of promises in that it can
2372be used both for \"promise of a value\" and lazy evaluation. The biggest
2373upside for this is that everything in a promise can also be a promise,
2374e.g. filters, callbacks and errbacks can all be promises.")
2375 (license license:bsd-3)))
2376
2377(define-public python-virtualenv
2378 (package
2379 (name "python-virtualenv")
2782bd51 2380 (version "16.1.0")
44d10b1f
RW
2381 (source
2382 (origin
2383 (method url-fetch)
2384 (uri (pypi-uri "virtualenv" version))
2385 (sha256
2386 (base32
2782bd51 2387 "0242cg3hdq3qdvx5flyrki8lpwlgwf5k45c21ks5049fv7ygm6gq"))))
44d10b1f
RW
2388 (build-system python-build-system)
2389 (arguments
2390 `(#:phases
2391 (modify-phases %standard-phases
2782bd51 2392 (add-before 'check 'disable-failing-test
44d10b1f
RW
2393 (lambda _
2394 ;; Disable failing test. See upstream bug report
2395 ;; https://github.com/pypa/virtualenv/issues/957
2396 (substitute* "tests/test_virtualenv.py"
2397 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2782bd51 2398 #t)))))
44d10b1f
RW
2399 (native-inputs
2400 `(("python-mock" ,python-mock)
2401 ("python-pytest" ,python-pytest)))
2402 (home-page "https://virtualenv.pypa.io/")
2403 (synopsis "Virtual Python environment builder")
2404 (description
2405 "Virtualenv is a tool to create isolated Python environments.")
2406 (license license:expat)))
2407
2408(define-public python2-virtualenv
2409 (package-with-python2 python-virtualenv))
2410
2411(define-public python-markupsafe
2412 (package
2413 (name "python-markupsafe")
753eb411 2414 (version "1.1.1")
44d10b1f
RW
2415 (source
2416 (origin
2417 (method url-fetch)
5182927c 2418 (uri (pypi-uri "MarkupSafe" version))
44d10b1f
RW
2419 (sha256
2420 (base32
753eb411 2421 "0sqipg4fk7xbixqd8kq6rlkxj664d157bdwbh93farcphf92x1r9"))))
44d10b1f 2422 (build-system python-build-system)
753eb411
MB
2423 (arguments
2424 `(#:modules ((ice-9 ftw)
2425 (srfi srfi-1)
2426 (srfi srfi-26)
2427 (guix build utils)
2428 (guix build python-build-system))
2429 #:phases (modify-phases %standard-phases
2430 (replace 'check
2431 (lambda _
2432 (let ((cwd (getcwd))
2433 (libdir (find (cut string-prefix? "lib." <>)
2434 (scandir "build"))))
2435 (setenv "PYTHONPATH"
2436 (string-append cwd "/build/" libdir ":"
2437 (getenv "PYTHONPATH")))
2438 (invoke "pytest" "-vv")))))))
2439 (native-inputs
2440 `(("python-pytest" ,python-pytest)))
44d10b1f
RW
2441 (home-page "https://github.com/mitsuhiko/markupsafe")
2442 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2443 (description
2444 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2445for Python.")
2446 (license license:bsd-3)))
2447
2448(define-public python2-markupsafe
2449 (package-with-python2 python-markupsafe))
2450
2451(define-public python-jinja2
2452 (package
2453 (name "python-jinja2")
4a5c7934 2454 (version "2.10.1")
44d10b1f
RW
2455 (source
2456 (origin
2457 (method url-fetch)
2458 (uri (pypi-uri "Jinja2" version))
2459 (sha256
2460 (base32
4a5c7934 2461 "04shqrs56aj04ipyqykj512rw2l0zfammvj9krawzxz7xc14yp06"))))
44d10b1f
RW
2462 (build-system python-build-system)
2463 (propagated-inputs
2464 `(("python-markupsafe" ,python-markupsafe)))
2465 (home-page "http://jinja.pocoo.org/")
2466 (synopsis "Python template engine")
2467 (description
2468 "Jinja2 is a small but fast and easy to use stand-alone template engine
2469written in pure Python.")
2470 (license license:bsd-3)))
2471
2472(define-public python2-jinja2
2473 (package-with-python2 python-jinja2))
2474
ba42a6bf
TLC
2475(define-public python-jinja2-time
2476 (package
2477 (name "python-jinja2-time")
2478 (version "0.2.0")
2479 (source
2480 (origin
2481 (method url-fetch)
2482 (uri (pypi-uri "jinja2-time" version))
2483 (sha256
2484 (base32
2485 "0h0dr7cfpjnjj8bgl2vk9063a53649pn37wnlkd8hxjy656slkni"))))
2486 (build-system python-build-system)
2487 (propagated-inputs
2488 `(("python-arrow" ,python-arrow)
2489 ("python-jinja2" ,python-jinja2)))
2490 (home-page
2491 "https://github.com/hackebrot/jinja2-time")
2492 (synopsis "Jinja2 Extension for Dates and Times")
2493 (description
2494 "This package provides an extension for the template engine Jinja2. It
2495adds a 'now' tag providing a convenient access to the arrow.now() API from
2496templates. A format string can be provided to control the output.")
2497 (license license:expat)))
2498
44d10b1f
RW
2499(define-public python-pystache
2500 (package
2501 (name "python-pystache")
2502 (version "0.5.4")
2503 (source (origin
2504 (method url-fetch)
2505 (uri (pypi-uri "pystache" version))
2506 (sha256
2507 (base32
2508 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2509 (build-system python-build-system)
2510 (arguments
2511 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
2512 (home-page "http://defunkt.io/pystache/")
2513 (synopsis "Python logic-less template engine")
2514 (description
2515 "Pystache is a Python implementation of the framework agnostic,
2516logic-free templating system Mustache.")
2517 (license license:expat)
2518 (properties `((python2-variant . ,(delay python2-pystache))))))
2519
2520(define-public python2-pystache
2521 (package (inherit (package-with-python2
2522 (strip-python2-variant python-pystache)))
2523 (arguments
2524 `(#:python ,python-2
2525 #:phases
2526 (modify-phases %standard-phases
2527 (replace 'check
2528 (lambda _
dfafc29b 2529 (invoke "python" "test_pystache.py"))))))))
44d10b1f
RW
2530
2531(define-public python-joblib
2532 (package
2533 (name "python-joblib")
2534 (version "0.13.0")
2535 (source (origin
2536 (method url-fetch)
2537 (uri (pypi-uri "joblib" version))
2538 (sha256
2539 (base32
2540 "0612nazad8dxmn3xghfrmjax6456l4xy6hn9cngs7vydi14ds7v5"))))
2541 (build-system python-build-system)
2542 (arguments
2543 `(#:phases
2544 (modify-phases %standard-phases
2545 (replace 'check
2546 (lambda _ (invoke "pytest" "-v" "joblib"))))))
2547 (native-inputs
2548 `(("python-pytest" ,python-pytest)))
2549 (home-page "https://joblib.readthedocs.io/")
2550 (synopsis "Using Python functions as pipeline jobs")
2551 (description
2552 "Joblib is a set of tools to provide lightweight pipelining in Python.
2553In particular, joblib offers: transparent disk-caching of the output values
2554and lazy re-evaluation (memoize pattern), easy simple parallel computing
2555logging and tracing of the execution.")
2556 (license license:bsd-3)))
2557
2558(define-public python2-joblib
2559 (package-with-python2 python-joblib))
2560
a3363341
VC
2561(define-public python-daemon
2562 (package
2563 (name "python-daemon")
2564 (version "2.2.3")
2565 (source
2566 (origin
2567 (method url-fetch)
2568 (uri (pypi-uri "python-daemon" version))
2569 (sha256
2570 (base32
2571 "09fcjdjzk9ywmpnrj62iyxqgcygzdafsz41qlrk2dknzbagcmzmg"))))
2572 (build-system python-build-system)
2573 (arguments
2574 `(#:phases
2575 (modify-phases %standard-phases
2576 (add-before 'check 'disable-tests
2577 (lambda _
2578 ;; FIXME: Determine why test fails
2579 (substitute* "test/test_daemon.py"
2580 (("test_detaches_process_context")
2581 "skip_test_detaches_process_context"))
2582 #t)))))
2583 (propagated-inputs
2584 `(("python-lockfile" ,python-lockfile)))
2585 (native-inputs
2586 `(("python-unittest2" ,python-unittest2)
2587 ("python-testtools" ,python-testtools)
2588 ("python-testscenarios" ,python-testscenarios)
2589 ("python-mock" ,python-mock)
2590 ("python-docutils" ,python-docutils)))
2591 (home-page "https://pagure.io/python-daemon/")
2592 (synopsis "Python library for making a Unix daemon process")
2593 (description "Python-daemon is a library that assists a Python program to
2594turn itself into a well-behaved Unix daemon process, as specified in PEP 3143.
2595
2596This library provides a @code{DaemonContext} class that manages the following
2597important tasks for becoming a daemon process:
2598@enumerate
2599@item Detach the process into its own process group.
2600@item Set process environment appropriate for running inside a chroot.
2601@item Renounce suid and sgid privileges.
2602@item Close all open file descriptors.
2603@item Change the working directory, uid, gid, and umask.
2604@item Set appropriate signal handlers.
2605@item Open new file descriptors for stdin, stdout, and stderr.
2606@item Manage a specified PID lock file.
2607@item Register cleanup functions for at-exit processing.
2608@end enumerate")
2609 ;; Only setup.py is gpl3+, everything else is apache 2.0 licensed.
2610 (license (list license:asl2.0 license:gpl3+))))
2611
544ea9c2
MB
2612(define-public python-anytree
2613 (package
2614 (name "python-anytree")
2615 (version "2.8.0")
2616 (source (origin
2617 (method url-fetch)
2618 (uri (pypi-uri "anytree" version))
2619 (sha256
2620 (base32
2621 "1aycpc387wqz7h9w2p53qxn43qsh3m6by6ak4kkc66x9aprr63rz"))))
2622 (build-system python-build-system)
2623 (propagated-inputs
2624 `(("python-six" ,python-six)))
2625 (native-inputs
2626 `(;; For tests.
2627 ("graphviz" ,graphviz) ;for 'dot'
2628 ("python-nose" ,python-nose)))
2629 (home-page "https://github.com/c0fec0de/anytree")
2630 (synopsis "Lightweight tree data library")
2631 (description
2632 "@code{anytree} is a simple, lightweight, and extensible tree data
2633structure for Python.")
2634 (license license:asl2.0)))
2635
44d10b1f
RW
2636(define-public python-docutils
2637 (package
2638 (name "python-docutils")
2639 (version "0.14")
2640 (source
2641 (origin
2642 (method url-fetch)
2643 (uri (pypi-uri "docutils" version))
2644 (sha256
2645 (base32
2646 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))
2647 (build-system python-build-system)
2648 (arguments
2649 '(#:tests? #f)) ; no setup.py test command
2650 (home-page "http://docutils.sourceforge.net/")
2651 (synopsis "Python Documentation Utilities")
2652 (description
2653 "Docutils is a modular system for processing documentation into useful
2654formats, such as HTML, XML, and LaTeX. For input Docutils supports
2655reStructuredText.")
2656 ;; Most of the source code is public domain, but some source files are
2657 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
2658 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
2659
2660(define-public python2-docutils
2661 (package-with-python2 python-docutils))
2662
2663(define-public python-pygments
2664 (package
2665 (name "python-pygments")
69002b21 2666 (version "2.5.2")
44d10b1f
RW
2667 (source
2668 (origin
2669 (method url-fetch)
2670 (uri (pypi-uri "Pygments" version))
2671 (sha256
2672 (base32
69002b21 2673 "1zmhnswy0wxfn0xprs9aqsvx2c3kmzfn2wx14q8cv3vpkxdamj4q"))))
44d10b1f
RW
2674 (build-system python-build-system)
2675 (arguments
2676 ;; FIXME: Tests require sphinx, which depends on this.
2677 '(#:tests? #f))
69002b21 2678 (home-page "https://pygments.org/")
44d10b1f
RW
2679 (synopsis "Syntax highlighting")
2680 (description
2681 "Pygments is a syntax highlighting package written in Python.")
2682 (license license:bsd-2)))
2683
2684(define-public python2-pygments
2685 (package-with-python2 python-pygments))
2686
0f0a5ef9
MC
2687(define-public python-bumpversion
2688 (package
2689 (name "python-bumpversion")
2690 (version "0.5.3")
2691 (source
2692 (origin
2693 (method url-fetch)
2694 (uri (pypi-uri "bumpversion" version))
2695 (sha256
2696 (base32
2697 "0zn7694yfipxg35ikkfh7kvgl2fissha3dnqad2c5bvsvmrwhi37"))))
2698 (build-system python-build-system)
2699 (home-page "https://github.com/peritus/bumpversion")
2700 (synopsis "Tool to bump software version")
2701 (description "This tool provides a command-line interface (CLI) to bump a
2702software version simply.")
2703 (license license:expat)))
2704
b24fd2c2
MC
2705(define-public python-deprecated
2706 (package
2707 (name "python-deprecated")
2708 (version "1.2.5")
2709 (source
2710 (origin
2711 (method git-fetch)
2712 (uri (git-reference
2713 (url "https://github.com/tantale/deprecated.git")
2714 (commit (string-append "v" version))))
2715 (file-name (git-file-name name version))
2716 (sha256
2717 (base32
2718 "14909glxxwwc4b9qpz2b9jdriwzi5n65ichw85xqppap5f79wcwz"))))
2719 (build-system python-build-system)
2720 (arguments
2721 `(#:phases (modify-phases %standard-phases
2722 (replace 'check
2723 (lambda _
2724 (invoke "pytest"))))))
2725 (propagated-inputs
2726 `(("python-wrapt" ,python-wrapt)))
2727 (native-inputs
2728 `(("python-bumpversion" ,python-bumpversion)
2729 ("python-pytest" ,python-pytest)
2730 ("python-pytest-cov" ,python-pytest-cov)
2731 ("python-sphinx" ,python-sphinx)
2732 ("python-tox" ,python-tox)))
2733 (home-page "https://github.com/tantale/deprecated")
2734 (synopsis "Python decorator to deprecate classes, functions or methods")
2735 (description "The @code{deprecated} decorator provides a convenient way to deprecate
2736to deprecate classes, functions or methods.")
2737 (license license:expat)))
2738
d5a998fa
MC
2739(define-public python-pygithub
2740 (package
2741 (name "python-pygithub")
749e38d7 2742 (version "1.43.8")
d5a998fa
MC
2743 (source
2744 ;; We fetch from the Git repo because there are no tests in the PyPI
2745 ;; archive.
2746 (origin
2747 (method git-fetch)
2748 (uri (git-reference
2749 (url "https://github.com/PyGithub/PyGithub.git")
2750 (commit (string-append "v" version))))
2751 (file-name (git-file-name name version))
2752 (sha256
749e38d7 2753 (base32 "1625v558xga5mwhl9jqmibywy5qafmg1vqrirqz6zfq1la1d22mw"))))
d5a998fa
MC
2754 (build-system python-build-system)
2755 (arguments
2756 `(#:phases (modify-phases %standard-phases
2757 ;; Some tests rely on the network.
2758 (add-after 'unpack 'disable-failing-tests
2759 (lambda _
2760 (substitute* "tests/Issue142.py"
2761 (("testDecodeJson") "disabled_testDecodeJson"))
2762 #t))
2763 (add-before 'check 'prepare-for-tests
2764 (lambda _
2765 (for-each (lambda (f)
2766 (chmod f #o666))
2767 (find-files "./tests"))
2768 (system* "python" "-m" "lib2to3" "-w" "-n" "tests")
2769 (setenv "PYTHONPATH"
2770 (string-append "./tests:" (getenv "PYTHONPATH")))
2771 #t)))))
2772 (propagated-inputs
2773 `(("python-deprecated" ,python-deprecated)
2774 ("python-pyjwt" ,python-pyjwt)
2775 ("python-requests" ,python-requests)))
2776 (native-inputs `(("python-httpretty" ,python-httpretty)))
2777 (home-page "https://pygithub.readthedocs.io/en/latest/")
2778 (synopsis "Python library for the GitHub API")
2779 (description "This library allows managing GitHub resources such as
2780repositories, user profiles, and organizations in your Python applications,
2781using version 3 of the GitHub application programming interface (API).")
2782 (license license:lgpl3+)))
2783
c0c0bb38
MC
2784(define-public python-rellu
2785 (package
2786 (name "python-rellu")
2787 (version "0.7")
2788 (source
2789 (origin
2790 (method url-fetch)
2791 (uri (pypi-uri "rellu" version))
2792 (sha256
2793 (base32
2794 "1w0arpj1sm7vh29nrbnca4pnp8sx42l07r17inwqcjjf9bhng66x"))))
2795 (build-system python-build-system)
2796 (propagated-inputs
2797 `(("python-invoke" ,python-invoke)
2798 ("python-pygithub" ,python-pygithub)))
2799 (home-page "https://github.com/robotframework/rellu")
2800 (synopsis "Utilities to create PyPI releases")
2801 (description "This collection of utilities contains tooling and templates
2802to assist in creating releases on GitHub and publishing them on PyPI. It is
2803designed to be used by Robot Framework and tools and libraries in its
2804ecosystem, but can naturally be used also by other projects.")
2805 (license license:asl2.0)))
2806
b9790285
MC
2807(define-public python-robotframework
2808 (package
2809 (name "python-robotframework")
1710b8f8 2810 (version "3.1.2")
b9790285
MC
2811 ;; There are no tests in the PyPI archive.
2812 (source
2813 (origin
2814 (method git-fetch)
2815 (uri (git-reference
2816 (url "https://github.com/robotframework/robotframework.git")
2817 (commit (string-append "v" version))))
2818 (file-name (git-file-name name version))
2819 (sha256
1710b8f8 2820 (base32 "16gnxy0qinh8fhs0qvhff5z2xh49c3cqgm0d7bfjw120df6x7fym"))
b9790285
MC
2821 (patches (search-patches
2822 "python-robotframework-honor-source-date-epoch.patch"))))
2823 (build-system python-build-system)
2824 (arguments
2825 `(#:phases (modify-phases %standard-phases
2826 (add-before 'build 'build-and-install-doc
2827 (lambda* (#:key outputs #:allow-other-keys)
2828 (let* ((doc-output (assoc-ref outputs "doc"))
2829 (doc (string-append doc-output "/share/"
2830 ,name "-" ,version "/")))
2831 (invoke "invoke" "library-docs" "all")
2832 (mkdir-p doc)
2833 (copy-recursively "doc/libraries"
2834 (string-append doc "/libraries"))
2835 #t)))
2836 (replace 'check
2837 (lambda _
2838 (invoke "python" "utest/run.py"))))))
2839 (native-inputs
2840 `(("python-invoke" ,python-invoke)
2841 ("python-rellu" ,python-rellu)
2842 ("python:tk" ,python "tk"))) ;used when building the HTML doc
2843 (outputs '("out" "doc"))
2844 (home-page "https://robotframework.org")
2845 (synopsis "Generic automation framework")
2846 (description "Robot Framework is a generic automation framework for
2847acceptance testing, acceptance test driven development (ATDD), and robotic
2848process automation (RPA).")
2849 (license license:asl2.0)))
2850
5b84c120
MC
2851(define-public python-robotframework-lint
2852 ;; There is no properly tagged release; the commit below seems to correspond
2853 ;; to the 0.9 stable release available from PyPI. The tests are not
2854 ;; included in the PyPI archive, so we fetch the sources from the upstream
2855 ;; Git repo.
2856 (let ((commit "e851879bab1f63e4e53b34a4dc8a67ed95102830")
2857 (revision "1"))
2858 (package
2859 (name "python-robotframework-lint")
2860 (version (git-version "0.9.0" revision commit))
2861 (source
2862 (origin
2863 (method git-fetch)
2864 (uri (git-reference
2865 (url "https://github.com/boakley/robotframework-lint.git")
2866 (commit commit)))
2867 (file-name (git-file-name name version))
2868 (sha256
2869 (base32
2870 "1p6fknqg5sb9qz5857ji4a877657vgfjm5v3zn45994parx6ml1m"))))
2871 (build-system python-build-system)
2872 (arguments
2873 `(#:phases
2874 (modify-phases %standard-phases
2875 (replace 'check
2876 (lambda _
2877 (invoke "python" "-m" "robot" "-A"
2878 "tests/conf/default.args" "tests"))))))
2879 (propagated-inputs
2880 `(("python-robotframework" ,python-robotframework)))
2881 (home-page "https://github.com/boakley/robotframework-lint/")
2882 (synopsis "Static analysis tool (linter) for Robot Framework")
2883 (description "This package provides the @code{rflint} command-line
2884utility, a static analysis tool (linter) for Robot Framework source files.")
2885 (license license:asl2.0))))
2886
c0c64f17
MC
2887(define-public python-robotframework-sshlibrary
2888 (package
2889 (name "python-robotframework-sshlibrary")
2890 (version "3.3.0")
2891 ;; There are no tests in the PyPI archive.
2892 (source
2893 (origin
2894 (method git-fetch)
2895 (uri (git-reference
2896 (url "https://github.com/robotframework/SSHLibrary.git")
2897 (commit (string-append "v" version))))
2898 (file-name (git-file-name name version))
2899 (sha256
2900 (base32
2901 "1mk6dz2jqqndbx4yji09012q6rmadnqdywi7czvj62b0s07dr3r2"))))
2902 (build-system python-build-system)
2903 (arguments
2904 `(#:phases
2905 (modify-phases %standard-phases
2906 (add-before 'build 'build-and-install-doc
2907 (lambda* (#:key outputs #:allow-other-keys)
2908 (let* ((doc-output (assoc-ref outputs "doc"))
2909 (doc (string-append doc-output "/share/"
2910 ,name "-" ,version "/")))
2911 (invoke "chmod" "-R" "+w" "docs")
2912 (invoke "invoke" "kw-docs" "project-docs")
2913 (mkdir-p doc)
2914 (for-each delete-file (find-files "docs" "\\.rst"))
2915 (copy-recursively "docs" doc)
2916 #t)))
2917 (replace 'check
2918 (lambda _
2919 ;; Some tests require an SSH server; we remove them.
2920 (delete-file "utest/test_client_api.py")
2921 (delete-file "utest/test_scp.py")
2922 (invoke "python" "utest/run.py"))))))
2923 (propagated-inputs
2924 `(("python-robotframework" ,python-robotframework)
2925 ("python-paramiko" ,python-paramiko)
2926 ("python-scp" ,python-scp)))
2927 (native-inputs
2928 `(("openssh" ,openssh)
2929 ("which" ,which)
2930 ;; To generate the documentation
2931 ("python-docutils" ,python-docutils)
2932 ("python-invoke" ,python-invoke)
2933 ("python-pygments" ,python-pygments)
2934 ("python-rellu" ,python-rellu)))
2935 (outputs '("out" "doc"))
2936 (home-page "https://github.com/robotframework/SSHLibrary")
2937 (synopsis "Robot Framework library for SSH and SFTP")
2938 (description "SSHLibrary is a Robot Framework library providing support
2939for SSH and SFTP. It has the following main usages:
2940@itemize @bullet
2941@item Executing commands on the remote machine, either blocking or non-blocking.
2942@item Writing and reading in an interactive shell.
2943@item Transferring files and directories over SFTP.
2944@item Ensuring that files and directories exist on the remote machine.
2945@end itemize")
2946 (license license:asl2.0)))
2947
b1daba94
VC
2948(define-public python-rstr
2949 (package
2950 (name "python-rstr")
2951 (version "2.2.6")
2952 (source
2953 (origin
2954 (method url-fetch)
2955 (uri (pypi-uri "rstr" version))
2956 (sha256
2957 (base32
2958 "197dw8mbq0pjjz1l6h1ksi62vgn7x55d373ch74y06744qiq5sjx"))))
2959 (build-system python-build-system)
2960 (home-page
2961 "http://bitbucket.org/leapfrogdevelopment/rstr/overview")
2962 (synopsis "Generate random strings in Python")
2963 (description "This package provides a python module for generating
2964random strings of various types. It could be useful for fuzz testing,
2965generating dummy data, or other applications. It has no dependencies
2966outside the standard library.")
2967 (license license:bsd-3)))
2968
13d825fc
MC
2969(define-public python-scp
2970 (package
2971 (name "python-scp")
2972 (version "0.13.2")
2973 (source
2974 (origin
2975 (method url-fetch)
2976 (uri (pypi-uri "scp" version))
2977 (sha256
2978 (base32
2979 "1crlpw9lnn58fs1c1rmh7s7s9y5gkgpgjsqlvg9qa51kq1knx7gg"))))
2980 (build-system python-build-system)
2981 (arguments
2982 '(#:tests? #f)) ;tests require an SSH server
2983 (propagated-inputs
2984 `(("python-paramiko" ,python-paramiko)))
2985 (home-page "https://github.com/jbardin/scp.py")
2986 (synopsis "SCP protocol module for Python and Paramiko")
2987 (description "The scp module extends the Paramiko library to send and
2988receive files via the SCP1 protocol, as implemented by the OpenSSH
2989@command{scp} program.")
2990 (license license:gpl2+)))
2991
44d10b1f
RW
2992(define-public python-rst.linker
2993 (package
2994 (name "python-rst.linker")
d37e8e53 2995 (version "1.11")
44d10b1f
RW
2996 (source
2997 (origin
2998 (method url-fetch)
2999 (uri (pypi-uri "rst.linker" version))
3000 (sha256
d37e8e53 3001 (base32 "0pqsfqqx8h0pq21k8l3k62kznrgaj2ala93c64s4d9rpbr4mgkd2"))))
44d10b1f
RW
3002 (build-system python-build-system)
3003 (propagated-inputs
3004 `(("python-dateutil" ,python-dateutil)
3005 ("python-six" ,python-six)))
3006 (native-inputs
3007 `(("python-setuptools-scm" ,python-setuptools-scm)))
3008 ;; Test would require path.py, which would introduce a cyclic dependence.
3009 (arguments `(#:tests? #f))
3010 ;; Note: As of version 1.7 the documentation is not worth building.
3011 (home-page "https://github.com/jaraco/rst.linker")
3012 (synopsis "Sphinx plugin to add links and timestamps")
3013 (description "rst.linker allows to automatically replace text by a
3014reStructuredText external reference or timestamps. It's primary purpose is to
3015augment the changelog, but it can be used for other documents, too.")
3016 (license license:expat)))
3017
3018(define-public python2-rst.linker
3019 (package-with-python2 python-rst.linker))
3020
3021(define-public python-feedgenerator
3022 (package
3023 (name "python-feedgenerator")
3024 (version "1.9")
3025 (source
3026 (origin
3027 (method url-fetch)
3028 (uri (pypi-uri "feedgenerator" version))
3029 (sha256
3030 (base32
3031 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
3032 (modules '((guix build utils)))
3033 (snippet
3034 '(begin
3035 ;; Remove pre-compiled .pyc files from source.
3036 (for-each delete-file-recursively
3037 (find-files "." "__pycache__" #:directories? #t))
3038 (for-each delete-file (find-files "." "\\.pyc$"))
3039 #t))))
3040 (build-system python-build-system)
3041 (propagated-inputs
3042 `(("python-pytz" ,python-pytz)
3043 ("python-six" ,python-six)))
3044 (home-page "https://github.com/getpelican/feedgenerator")
3045 (synopsis
3046 "Standalone version of Django's Atom/RSS feed generator")
3047 (description
3048 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
3049which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
3050 (license license:bsd-3)))
3051
3052(define-public python2-feedgenerator
3053 (package-with-python2 python-feedgenerator))
3054
3055(define-public python-toml
3056 (package
3057 (name "python-toml")
3058 (version "0.9.4")
3059 (source
3060 (origin
3061 (method url-fetch)
3062 (uri (pypi-uri "toml" version))
3063 (sha256
3064 (base32
3065 "0bdbpbip67wdm6c7xwc6mmbmskyradj4cdxn1iibj4fcx1nbv1lf"))))
3066 (build-system python-build-system)
3067 (arguments
3068 `(#:tests? #f)) ;no tests suite in release
3069 (home-page "https://github.com/uiri/toml")
3070 (synopsis "Library for TOML")
3071 (description
3072 "@code{toml} is a library for parsing and creating Tom's Obvious, Minimal
3073Language (TOML) configuration files.")
3074 (license license:expat)))
3075
346c8752
BG
3076(define-public python-jsonrpc-server
3077 (package
3078 (name "python-jsonrpc-server")
d6cf4c6e 3079 (version "0.3.2")
346c8752
BG
3080 (source
3081 (origin
3082 (method url-fetch)
3083 (uri (pypi-uri "python-jsonrpc-server" version))
3084 (sha256
3085 (base32
d6cf4c6e 3086 "0ddgdp26dfxaz6isjbb12974b3rxavgsqrn2zrmck62cmipg5g05"))))
346c8752
BG
3087 (build-system python-build-system)
3088 (propagated-inputs
3089 `(("python-future" ,python-future)
3090 ("python-mock" ,python-mock)
d6cf4c6e
BG
3091 ("python-pytest" ,python-pytest)
3092 ("python-ujson" ,python-ujson)))
346c8752
BG
3093 (home-page
3094 "https://github.com/palantir/python-jsonrpc-server")
3095 (synopsis "JSON RPC 2.0 server library")
3096 (description
1df5407c 3097 "This package provides a JSON RPC 2.0 server library for Python.")
346c8752
BG
3098 (license license:expat)))
3099
56f4ad47
BG
3100(define-public python-pydocstyle
3101 (package
3102 (name "python-pydocstyle")
3103 (version "3.0.0")
3104 (source
3105 (origin
3106 (method url-fetch)
3107 (uri (pypi-uri "pydocstyle" version))
3108 (sha256
3109 (base32
3110 "1m1xv9clkg9lgzyza6dnj359z04vh5g0h49nhzghv7lg81gchhap"))))
3111 (build-system python-build-system)
3112 (propagated-inputs
3113 `(("python-six" ,python-six)
3114 ("python-snowballstemmer" ,python-snowballstemmer)))
3115 (home-page
3116 "https://github.com/PyCQA/pydocstyle/")
3117 (synopsis "Python docstring style checker")
3118 (description
3119 "This package provides a style checker for the Python Language
3120Server (PLS).")
3121 (license license:expat)))
3122
be4d840c 3123(define-public python-language-server
808dd2d0
BL
3124 (package
3125 (name "python-language-server")
a42f1420 3126 (version "0.31.7")
808dd2d0
BL
3127 (source
3128 (origin
3129 (method url-fetch)
3130 (uri (pypi-uri "python-language-server" version))
3131 (sha256
3132 (base32
a42f1420 3133 "0f8rljff4h2ay9m2n9ang7axai37nzd39zd7m6c90rci5wh8cmxh"))))
808dd2d0
BL
3134 (build-system python-build-system)
3135 (propagated-inputs
3136 `(("python-pluggy" ,python-pluggy)
3137 ("python-jsonrpc-server" ,python-jsonrpc-server)
3138 ("python-jedi" ,python-jedi)
3139 ("python-yapf" ,python-yapf)
3140 ("python-pyflakes" ,python-pyflakes)
3141 ("python-pydocstyle" ,python-pydocstyle)
3142 ("python-pycodestyle" ,python-pycodestyle)
3143 ("python-mccabe" ,python-mccabe)
3144 ("python-rope" ,python-rope)
3145 ("python-autopep8" ,python-autopep8)
3146 ("python-flake8" ,python-flake8)
3147 ("python-pylint" ,python-pylint)))
3148 (home-page "https://github.com/palantir/python-language-server")
3149 (synopsis "Python implementation of the Language Server Protocol")
3150 (description
3151 "The Python Language Server (pyls) is an implementation of the Python 3
be4d840c
BG
3152language specification for the Language Server Protocol (LSP). This tool is
3153used in text editing environments to provide a complete and integrated
3154feature-set for programming Python effectively.")
808dd2d0 3155 (license license:expat)))
be4d840c 3156
44d10b1f
RW
3157(define-public python-black
3158 (package
3159 (name "python-black")
3160 (version "18.6b4")
3161 (source
3162 (origin
3163 (method url-fetch)
3164 (uri (pypi-uri "black" version))
3165 (sha256
3166 (base32
3167 "0i4sfqgz6w15vd50kbhi7g7rifgqlf8yfr8y78rypd56q64qn592"))))
3168 (build-system python-build-system)
3169 (arguments
3170 `(#:phases
3171 (modify-phases %standard-phases
3172 (add-after 'patch-source-shebangs 'patch-extra-shebangs
3173 (lambda _
3174 (let ((python3 (which "python3")))
3175 (substitute* '("tests/data/fmtonoff.py"
3176 "tests/data/string_prefixes.py"
3177 "tests/data/function.py")
3178 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
3179 (string-append "#!" python3 (if (string? minor-version)
3180 minor-version
3181 ""))))))))))
3182 (propagated-inputs
3183 `(("python-click" ,python-click)
3184 ("python-attrs" ,python-attrs)
3185 ("python-appdirs" ,python-appdirs)
3186 ("python-toml" ,python-toml)))
3187 (home-page "https://github.com/ambv/black")
3188 (synopsis "The uncompromising code formatter")
3189 (description "Black is the uncompromising Python code formatter.")
3190 (license license:expat)))
3191
3192(define-public python-blinker
3193 (package
3194 (name "python-blinker")
3195 (version "1.4")
3196 (source
3197 (origin
3198 (method url-fetch)
3199 (uri (pypi-uri "blinker" version))
3200 (sha256
3201 (base32
3202 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
3203 (build-system python-build-system)
d46646d9 3204 (home-page "https://pythonhosted.org/blinker/")
44d10b1f
RW
3205 (synopsis "Fast, simple object-to-object and broadcast signaling")
3206 (description
3207 "Blinker provides a fast dispatching system that allows any number of
3208interested parties to subscribe to events, or \"signals\".")
3209 (license license:expat)))
3210
3211(define-public python2-blinker
3212 (package-with-python2 python-blinker))
3213
3214(define-public pelican
3215 (package
3216 (name "pelican")
fa9e3b5e 3217 (version "4.2.0")
44d10b1f
RW
3218 (source
3219 (origin
3220 (method url-fetch)
3221 (uri (pypi-uri "pelican" version))
3222 (sha256
3223 (base32
fa9e3b5e 3224 "0mp7hjyhs38ag1hyfcy882g400z0babqi72pnli46dqijfhajzmy"))))
44d10b1f
RW
3225 (build-system python-build-system)
3226 (propagated-inputs
fa9e3b5e
VC
3227 `(("python-blinker" ,python-blinker)
3228 ("python-dateutil" ,python-dateutil)
3229 ("python-docutils" ,python-docutils)
3230 ("python-feedgenerator" ,python-feedgenerator)
44d10b1f 3231 ("python-jinja2" ,python-jinja2)
fa9e3b5e 3232 ("python-markdown" ,python-markdown)
44d10b1f 3233 ("python-pygments" ,python-pygments)
44d10b1f 3234 ("python-pytz" ,python-pytz)
44d10b1f 3235 ("python-six" ,python-six)
fa9e3b5e 3236 ("python-unidecode" ,python-unidecode)))
44d10b1f
RW
3237 (home-page "https://getpelican.com/")
3238 (arguments
3239 `(;; XXX Requires a lot more packages to do unit tests :P
fa9e3b5e 3240 #:tests? #f))
44d10b1f
RW
3241 (synopsis "Python-based static site publishing system")
3242 (description
3243 "Pelican is a tool to generate a static blog from reStructuredText,
3244Markdown input files, and more. Pelican uses Jinja2 for templating
3245and is very extensible.")
3246 (license license:agpl3+)))
3247
8c141421
JH
3248(define-public mallard-ducktype
3249 (package
3250 (name "mallard-ducktype")
12cc3da5 3251 (version "1.0.2")
8c141421
JH
3252 (source
3253 (origin
3254 (method git-fetch)
12cc3da5
JH
3255 ;; git-reference because tests are not included in pypi source tarball
3256 ;; https://issues.guix.gnu.org/issue/36755#2
8c141421
JH
3257 (uri (git-reference
3258 (url "https://github.com/projectmallard/mallard-ducktype.git")
3259 (commit version)))
3260 (file-name (git-file-name name version))
3261 (sha256
3262 (base32
12cc3da5 3263 "1jk9bfz7g04ip78s03b0xak6d54rj4h9zpgadkziy1ji216g6y4c"))))
8c141421 3264 (build-system python-build-system)
5246655f
EF
3265 (arguments
3266 '(#:phases
3267 (modify-phases %standard-phases
3268 (replace 'check
3269 (lambda _
3270 (with-directory-excursion "tests"
3271 (invoke "sh" "runtests")))))))
8c141421
JH
3272 (home-page "http://projectmallard.org")
3273 (synopsis "Convert Ducktype to Mallard documentation markup")
3274 (description
3275 "Ducktype is a lightweight syntax that can represent all the semantics
3276of the Mallard XML documentation system. Ducktype files can be converted to
3277Mallard using the @command{ducktype} tool. The yelp-tools package
3278provides additional functionality on the produced Mallard documents.")
3279 (license license:expat)))
3280
44d10b1f
RW
3281(define-public python-cython
3282 (package
3283 (name "python-cython")
6fd27a71 3284 (version "0.29.13")
44d10b1f
RW
3285 (source
3286 (origin
3287 (method url-fetch)
3288 (uri (pypi-uri "Cython" version))
3289 (sha256
6fd27a71
TGR
3290 (base32
3291 "13k37lrcgagwwnzr5bzririsscb793vndj234d475x1h9ad0d7f2"))))
44d10b1f
RW
3292 (build-system python-build-system)
3293 ;; we need the full python package and not just the python-wrapper
3294 ;; because we need libpython3.3m.so
3295 (inputs
3296 `(("python" ,python)))
3297 (arguments
3298 `(#:phases
3299 (modify-phases %standard-phases
3300 (add-before 'check 'set-HOME
3301 ;; some tests require access to "$HOME/.cython"
3302 (lambda _ (setenv "HOME" "/tmp") #t))
3303
3304 ;; FIXME: These tests started failing on armhf after the 0.28 update
3305 ;; (commit c69d11c5930), both with an error such as this:
3306 ;; compiling (cpp) and running dictcomp ...
3307 ;; === C/C++ compiler error output: ===
3308 ;; ‘
3309 ;; dictcomp.cpp:5221: confused by earlier errors, bailing out
3310 ;; See <https://hydra.gnu.org/build/2948724> for logs.
3311 ,@(if (target-arm32?)
3312 `((add-before 'check 'disable-failing-tests
3313 (lambda _
3314 (let ((disabled-tests (open-file "tests/bugs.txt" "a")))
3315 (for-each (lambda (test)
3316 (format disabled-tests "~a\n" test))
3317 '("memslice" "dictcomp"))
3318 (close-port disabled-tests)))))
3319 '())
3320
3321 (replace 'check
3322 (lambda _
e9194eb0
MB
3323 ;; Disable compiler optimizations to greatly reduce the running
3324 ;; time of the test suite.
3325 (setenv "CFLAGS" "-O0")
3326
3327 (invoke "python" "runtests.py" "-vv"
3328 "-j" (number->string (parallel-job-count))))))))
f319409b 3329 (home-page "https://cython.org/")
44d10b1f
RW
3330 (synopsis "C extensions for Python")
3331 (description "Cython is an optimising static compiler for both the Python
3332programming language and the extended Cython programming language. It makes
3333writing C extensions for Python as easy as Python itself.")
3334 (license license:asl2.0)
3335 (properties `((python2-variant . ,(delay python2-cython))))))
3336
3337(define-public python2-cython
da460865
MB
3338 (let ((base (package-with-python2 (strip-python2-variant python-cython))))
3339 (package
3340 (inherit base)
3341 (name "python2-cython")
3342 (inputs
3343 `(("python-2" ,python-2))) ;this is not automatically changed
3344 (arguments
3345 (substitute-keyword-arguments (package-arguments base)
3346 ((#:phases phases)
3347 `(modify-phases ,phases
3348 (add-before 'check 'adjust-test_embed
3349 (lambda _
3350 (substitute* "runtests.py"
3351 ;; test_embed goes great lengths to find the static libpythonX.Y.a
3352 ;; so it can give the right -L flag to GCC when embedding static
3353 ;; builds of Python. It is unaware that the Python "config"
3354 ;; directory (where the static library lives) was renamed in
3355 ;; Python 3, and falls back to sysconfig.get_config_var('LIBDIR'),
3356 ;; which works fine, because that is where the shared library is.
3357 ;;
3358 ;; It also appears to be unaware that the Makefile in Demos/embed
3359 ;; already unconditionally pass the static library location to GCC,
3360 ;; after checking sysconfig.get_config_var('LIBPL).
3361 ;;
3362 ;; The effect is that the linker is unable to resolve libexpat
3363 ;; symbols when building for Python 2, because neither the Python 2
3364 ;; shared library nor Expat is available. To fix it, we can either
3365 ;; add Expat as an input and make it visible to the linker, or just
3366 ;; prevent it from overriding the Python shared library location.
3367 ;; The end result is identical, so we take the easy route.
3368 ((" or libname not in os\\.listdir\\(libdir\\)")
3369 ""))
3370 #t)))))))))
44d10b1f
RW
3371
3372;; The RPython toolchain currently does not support Python 3.
3373(define-public python2-rpython
3374 (package
3375 (name "python2-rpython")
3376 (version "0.2.1")
3377 (source
3378 (origin
3379 (method url-fetch)
3380 (uri (pypi-uri "rpython" version))
3381 (sha256
3382 (base32
3383 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
3384 (build-system python-build-system)
3385 (arguments `(#:python ,python-2))
3386 (native-inputs
3387 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
3388 (home-page "https://rpython.readthedocs.org")
3389 (synopsis "Framework for implementing interpreters and virtual machines")
3390 (description "RPython is a translation and support framework for
3391producing implementations of dynamic languages, emphasizing a clean separation
3392between language specification and implementation aspects.")
3393 (license license:expat)))
3394
3395;; NOTE: when upgrading numpy please make sure that python-pandas and
3396;; python-scipy still build, as these three packages are often used together.
3397(define-public python-numpy
3398 (package
3399 (name "python-numpy")
8e5fbd5d 3400 (version "1.17.3")
44d10b1f
RW
3401 (source
3402 (origin
3403 (method url-fetch)
3404 (uri (string-append
3405 "https://github.com/numpy/numpy/releases/download/v"
3406 version "/numpy-" version ".tar.gz"))
3407 (sha256
3408 (base32
8e5fbd5d 3409 "1ak9dmjja0q90a7fsxli51ypcwssh8c4pb6f8wkrsnf2xgdk6dy9"))))
44d10b1f
RW
3410 (build-system python-build-system)
3411 (inputs
3412 `(("openblas" ,openblas)
3413 ("lapack" ,lapack)))
3414 (native-inputs
3415 `(("python-cython" ,python-cython)
3416 ("python-pytest" ,python-pytest)
3417 ("gfortran" ,gfortran)))
3418 (arguments
3419 `(#:phases
3420 (modify-phases %standard-phases
3421 (add-before 'build 'configure-blas-lapack
3422 (lambda* (#:key inputs #:allow-other-keys)
3423 (call-with-output-file "site.cfg"
3424 (lambda (port)
3425 (format port
3426 "[openblas]
3427libraries = openblas
3428library_dirs = ~a/lib
3429include_dirs = ~a/include
3430
3431# backslash-n to make emacs happy
3432\n[lapack]
3433lapack_libs = lapack
3434library_dirs = ~a/lib
3435include_dirs = ~a/include
3436"
3437 (assoc-ref inputs "openblas")
3438 (assoc-ref inputs "openblas")
3439 (assoc-ref inputs "lapack")
3440 (assoc-ref inputs "lapack"))))
3441 #t))
3442 (add-before 'build 'fix-executable-paths
3443 (lambda* (#:key inputs #:allow-other-keys)
3444 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
3445 ;; instead of /bin/sh.
3446 (substitute* "numpy/distutils/exec_command.py"
3447 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
3448 (string-append match-start (assoc-ref inputs "bash") match-end)))
3449 ;; Use "gcc" executable, not "cc".
3450 (substitute* "numpy/distutils/system_info.py"
3451 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3452 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
3453 #t))
3454 ;; Tests can only be run after the library has been installed and not
3455 ;; within the source directory.
3456 (delete 'check)
3457 (add-after 'install 'check
3458 (lambda* (#:key outputs inputs #:allow-other-keys)
3459 ;; Make installed package available for running the tests
3460 (add-installed-pythonpath inputs outputs)
3461 ;; Make sure "f2py" etc is found.
3462 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
3463 ":" (getenv "PATH")))
3464 (with-directory-excursion "/tmp"
3465 (invoke "python" "-c"
3466 "import numpy; numpy.test(verbose=2)")))))))
28191bdc 3467 (home-page "https://numpy.org")
44d10b1f
RW
3468 (synopsis "Fundamental package for scientific computing with Python")
3469 (description "NumPy is the fundamental package for scientific computing
3470with Python. It contains among other things: a powerful N-dimensional array
3471object, sophisticated (broadcasting) functions, tools for integrating C/C++
3472and Fortran code, useful linear algebra, Fourier transform, and random number
3473capabilities.")
adb396ea 3474 (properties `((python2-variant . ,(delay python2-numpy))))
44d10b1f
RW
3475 (license license:bsd-3)))
3476
adb396ea 3477;; Numpy 1.16.x are the last versions that support Python 2.
44d10b1f 3478(define-public python2-numpy
adb396ea
MB
3479 (let ((numpy (package-with-python2
3480 (strip-python2-variant python-numpy))))
3481 (package/inherit
3482 numpy
3483 (version "1.16.5")
3484 (source (origin
3485 (method url-fetch)
3486 (uri (string-append
3487 "https://github.com/numpy/numpy/releases/download/v"
3488 version "/numpy-" version ".tar.gz"))
3489 (sha256
3490 (base32
3491 "0lg1cycxzi4rvvrd5zxinpdz0ni792fpx6xjd75z1923zcac8qrb")))))))
44d10b1f
RW
3492
3493;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
3494;; interest only for legacy code going back to NumPy's predecessor
3495;; Numeric.
3496(define-public python2-numpy-1.8
3497 (package (inherit python2-numpy)
3498 (version "1.8.2")
3499 (source
3500 (origin
6b61fc47
EF
3501 (method git-fetch)
3502 (uri (git-reference
3503 (url "https://github.com/numpy/numpy")
3504 (commit (string-append "v" version))))
3505 (file-name (git-file-name "numpy" version))
44d10b1f
RW
3506 (sha256
3507 (base32
6b61fc47 3508 "0ikgi15rsqwbkfsjjxrwh40lqyal2wvyp3923y6w6ch3dcr82sfk"))))
44d10b1f
RW
3509 (arguments
3510 (substitute-keyword-arguments (package-arguments python2-numpy)
3511 ((#:phases phases)
3512 `(modify-phases ,phases
3513 (replace 'configure-blas-lapack
3514 (lambda* (#:key inputs #:allow-other-keys)
3515 (call-with-output-file "site.cfg"
3516 (lambda (port)
3517 (format port
3518 "[openblas]
3519libraries = openblas,lapack
3520library_dirs = ~a/lib:~a/lib
3521include_dirs = ~a/include:~a/include
3522"
3523 (assoc-ref inputs "openblas")
3524 (assoc-ref inputs "lapack")
3525 (assoc-ref inputs "openblas")
3526 (assoc-ref inputs "lapack"))))
3527 #t))))))
3528 (native-inputs
3529 `(("python2-nose" ,python2-nose)))
3530 (description "NumPy is the fundamental package for scientific computing
3531with Python. It contains among other things: a powerful N-dimensional array
3532object, sophisticated (broadcasting) functions, tools for integrating C/C++
3533and Fortran code, useful linear algebra, Fourier transform, and random number
3534capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
3535that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
3536Numeric.")
3537 (license license:bsd-3)))
3538
3539(define-public python-munch
3540 (package
3541 (name "python-munch")
3542 (version "2.0.4")
3543 (source
3544 (origin
3545 (method url-fetch)
3546 (uri (pypi-uri "munch" version))
3547 (sha256
3548 (base32
3549 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3550 (build-system python-build-system)
3551 (home-page "https://github.com/Infinidat/munch")
3552 (synopsis "Dot-accessible dictionary")
3553 (description "Munch is a dot-accessible dictionary similar to JavaScript
3554objects.")
3555 (license license:expat)))
3556
3557(define-public python2-munch
3558 (package-with-python2 python-munch))
3559
3560(define-public python-colormath
3561 (package
3562 (name "python-colormath")
3563 (version "3.0.0")
3564 (source
3565 (origin
3566 (method url-fetch)
3567 (uri (pypi-uri "colormath" version))
3568 (sha256
3569 (base32
3570 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
3571 (build-system python-build-system)
3572 (propagated-inputs
3573 `(("python-networkx" ,python-networkx)
3574 ("python-numpy" ,python-numpy)))
3575 (home-page "https://github.com/gtaylor/python-colormath")
3576 (synopsis "Color math and conversion library")
3577 (description
3578 "This is a Python library for color math and conversions.")
3579 (license license:bsd-3)))
3580
3581(define-public python2-colormath
3582 (package-with-python2 python-colormath))
3583
3584(define-public python-spectra
3585 (package
3586 (name "python-spectra")
3587 (version "0.0.11")
3588 (source
3589 (origin
3590 (method url-fetch)
3591 (uri (pypi-uri "spectra" version))
3592 (sha256
3593 (base32
3594 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
3595 (build-system python-build-system)
3596 (arguments
3597 `(#:phases
3598 (modify-phases %standard-phases
3599 (replace 'check
38ec0f6a 3600 (lambda _ (invoke "nosetests" "-v"))))))
44d10b1f
RW
3601 (propagated-inputs
3602 `(("python-colormath" ,python-colormath)))
3603 (native-inputs
3604 `(("python-nose" ,python-nose)))
3605 (home-page "https://github.com/jsvine/spectra")
3606 (synopsis "Color scales and color conversion")
3607 (description
3608 "This package provides a Python library intended to make color math,
3609color scales, and color space conversion easy. It has support for:
3610
3611@enumerate
3612@item Color scales
3613@item Color ranges
3614@item Color blending
3615@item Brightening/darkening colors
3616@item Saturating/desaturating colors
3617@item Conversion to/from multiple color spaces.
3618@end enumerate\n")
3619 (license license:expat)))
3620
3621(define-public python2-spectra
3622 (package-with-python2 python-spectra))
3623
3624(define-public python-numpy-documentation
3625 (package
3626 (name "python-numpy-documentation")
3627 (version (package-version python-numpy))
3628 (source (package-source python-numpy))
3629 (build-system python-build-system)
3630 (native-inputs
3631 `(("python-matplotlib" ,python-matplotlib)
3632 ("python-numpy" ,python-numpy)
3633 ("pkg-config" ,pkg-config)
3634 ("python-sphinx" ,python-sphinx)
3635 ("python-numpydoc" ,python-numpydoc)
f75aa97f 3636 ("texlive" ,(texlive-union (list texlive-fonts-cm-super
44d10b1f
RW
3637 texlive-fonts-ec
3638 texlive-generic-ifxetex
3639 texlive-generic-pdftex
f75aa97f 3640 texlive-amsfonts
44d10b1f
RW
3641 texlive-latex-capt-of
3642 texlive-latex-cmap
3643 texlive-latex-environ
3644 texlive-latex-eqparbox
3645 texlive-latex-etoolbox
3646 texlive-latex-expdlist
3647 texlive-latex-fancyhdr
3648 texlive-latex-fancyvrb
3649 texlive-latex-fncychap
3650 texlive-latex-float
3651 texlive-latex-framed
3652 texlive-latex-geometry
3653 texlive-latex-graphics
3654 texlive-latex-hyperref
3655 texlive-latex-mdwtools
3656 texlive-latex-multirow
3657 texlive-latex-needspace
3658 texlive-latex-oberdiek
3659 texlive-latex-parskip
3660 texlive-latex-preview
3661 texlive-latex-tabulary
3662 texlive-latex-threeparttable
3663 texlive-latex-titlesec
3664 texlive-latex-trimspaces
3665 texlive-latex-ucs
3666 texlive-latex-upquote
3667 texlive-latex-url
3668 texlive-latex-varwidth
3669 texlive-latex-wrapfig)))
3670 ("texinfo" ,texinfo)
3671 ("perl" ,perl)
3672 ("scipy-sphinx-theme"
3673 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
3674 (method git-fetch)
3675 (uri (git-reference
3676 (url "https://github.com/scipy/scipy-sphinx-theme.git")
3677 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
3678 (sha256
3679 (base32
3680 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
3681 ,@(package-native-inputs python-numpy)))
3682 (arguments
3683 `(#:tests? #f ; we're only generating the documentation
3684 #:phases
3685 (modify-phases %standard-phases
3686 (delete 'build)
3687 (replace 'install
3688 (lambda* (#:key inputs outputs #:allow-other-keys)
3689 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3690 (doc (string-append
3691 data "/doc/" ,name "-"
3692 ,(package-version python-numpy)))
3693 (info-reader (string-append data "/info"))
3694 (html (string-append doc "/html"))
3695 (scipy-sphinx-theme "scipy-sphinx-theme")
3696 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
3697 (pyver ,(string-append "PYVER=")))
3698
3699 ;; FIXME: this is needed to for texlive-union to generate
3700 ;; fonts, which are not found.
3701 (setenv "HOME" "/tmp")
3702
3703 (with-directory-excursion "doc"
3704 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
3705 (mkdir-p html)
4fc898da
RW
3706 (invoke "make" "html" pyver)
3707 (invoke "make" "latex" "PAPER=a4" pyver)
3708 (invoke "make" "-C" "build/latex"
44d10b1f
RW
3709 "all-pdf" "PAPER=a4" pyver)
3710 ;; FIXME: Generation of the info file fails.
4fc898da 3711 ;; (invoke "make" "info" pyver)
44d10b1f
RW
3712 ;; (mkdir-p info)
3713 ;; (copy-file "build/texinfo/numpy.info"
3714 ;; (string-append info "/numpy.info"))
3715 (for-each (lambda (file)
3716 (copy-file (string-append "build/latex" file)
3717 (string-append doc file)))
3718 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3719 (with-directory-excursion "build/html"
3720 (for-each (lambda (file)
3721 (let* ((dir (dirname file))
3722 (tgt-dir (string-append html "/" dir)))
3723 (unless (equal? "." dir)
3724 (mkdir-p tgt-dir))
3725 (install-file file html)))
3726 (find-files "." ".*")))))
3727 #t)))))
3728 (home-page (package-home-page python-numpy))
3729 (synopsis "Documentation for the python-numpy package")
3730 (description (package-description python-numpy))
3731 (license (package-license python-numpy))))
3732
3733(define-public python2-numpy-documentation
3734 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
3735 (package
3736 (inherit numpy-documentation)
3737 (native-inputs `(("python2-functools32" ,python2-functools32)
3738 ,@(package-native-inputs numpy-documentation))))))
3739
3740(define-public python-pygit2
3741 (package
3742 (name "python-pygit2")
dac8b275 3743 (version "0.28.2")
44d10b1f
RW
3744 (source
3745 (origin
3746 (method url-fetch)
3747 (uri (pypi-uri "pygit2" version))
3748 (sha256
dac8b275 3749 (base32 "11kzj5mjkspvplnpdb6bj8dcj6rgmkk986k8hjcklyg5yaxkz32d"))))
44d10b1f
RW
3750 (build-system python-build-system)
3751 (arguments
c3ecab0d 3752 '(#:tests? #f)) ; tests don't run correctly in our environment
44d10b1f
RW
3753 (propagated-inputs
3754 `(("python-six" ,python-six)
3755 ("python-cffi" ,python-cffi)
3756 ("libgit2" ,libgit2)
3757 ("python-tox" ,python-tox)))
3758 (native-inputs
3759 `(("python-pytest" ,python-pytest)))
3760 (home-page "https://github.com/libgit2/pygit2")
3761 (synopsis "Python bindings for libgit2")
3762 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3763library, libgit2 implements Git plumbing.")
3764 ;; GPL2.0 only, with linking exception.
3765 (license license:gpl2)))
3766
3767(define-public python2-pygit2
3768 (package-with-python2 python-pygit2))
3769
3770(define-public python-pyparsing
3771 (package
3772 (name "python-pyparsing")
6d3cff5a 3773 (version "2.3.1")
44d10b1f
RW
3774 (source
3775 (origin
3776 (method url-fetch)
3777 (uri (pypi-uri "pyparsing" version))
3778 (sha256
6d3cff5a 3779 (base32 "0yk6xl885b91dmlhlsap7x78hk2rdr879fln9anbq6k4ca42djb6"))))
44d10b1f
RW
3780 (build-system python-build-system)
3781 (outputs '("out" "doc"))
3782 (arguments
3783 `(#:tests? #f ; no test target
3784 #:phases
3785 (modify-phases %standard-phases
3786 (add-after 'install 'install-doc
3787 (lambda* (#:key outputs #:allow-other-keys)
3788 (let* ((doc (string-append (assoc-ref outputs "doc")
3789 "/share/doc/" ,name "-" ,version))
3790 (html-doc (string-append doc "/html"))
3791 (examples (string-append doc "/examples")))
3792 (mkdir-p html-doc)
3793 (mkdir-p examples)
3794 (for-each
3795 (lambda (dir tgt)
3796 (map (lambda (file)
3797 (install-file file tgt))
3798 (find-files dir ".*")))
3799 (list "docs" "htmldoc" "examples")
3800 (list doc html-doc examples))
3801 #t))))))
3802 (home-page "https://github.com/pyparsing/pyparsing")
3803 (synopsis "Python parsing class library")
3804 (description
3805 "The pyparsing module is an alternative approach to creating and
3806executing simple grammars, vs. the traditional lex/yacc approach, or the use
3807of regular expressions. The pyparsing module provides a library of classes
3808that client code uses to construct the grammar directly in Python code.")
3809 (license license:expat)))
3810
3811(define-public python2-pyparsing
3812 (package-with-python2 python-pyparsing))
3813
3814(define-public python-numpydoc
3815 (package
3816 (name "python-numpydoc")
3817 (version "0.8.0")
3818 (source
3819 (origin
3820 (method url-fetch)
3821 (uri (pypi-uri "numpydoc" version))
3822 (sha256
3823 (base32
3824 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
3825 (build-system python-build-system)
3826 (propagated-inputs
3827 `(("python-sphinx" ,python-sphinx)))
3828 (native-inputs
3829 `(("python-nose" ,python-nose)))
3830 (home-page "https://pypi.python.org/pypi/numpydoc")
3831 (synopsis
3832 "Numpy's Sphinx extensions")
3833 (description
3834 "Sphinx extension to support docstrings in Numpy format.")
3835 (license license:bsd-2)))
3836
3837(define-public python2-numpydoc
3838 (package-with-python2 python-numpydoc))
3839
3840(define-public python-numexpr
3841 (package
3842 (name "python-numexpr")
3843 (version "2.6.5")
3844 (source
3845 (origin
3846 (method url-fetch)
3847 (uri (pypi-uri "numexpr" version))
3848 (sha256
3849 (base32
3850 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
3851 (build-system python-build-system)
3852 (arguments `(#:tests? #f)) ; no tests included
3853 (propagated-inputs
3854 `(("python-numpy" ,python-numpy)))
3855 (home-page "https://github.com/pydata/numexpr")
3856 (synopsis "Fast numerical expression evaluator for NumPy")
3857 (description
3858 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3859expressions that operate on arrays are accelerated and use less memory than
3860doing the same calculation in Python. In addition, its multi-threaded
3861capabilities can make use of all your cores, which may accelerate
3862computations, most specially if they are not memory-bounded (e.g. those using
3863transcendental functions).")
3864 (license license:expat)))
3865
3866(define-public python2-numexpr
3867 (package-with-python2 python-numexpr))
3868
3869(define-public python-cycler
3870 (package
3871 (name "python-cycler")
3872 (version "0.10.0")
3873 (source (origin
3874 (method url-fetch)
3875 (uri (pypi-uri "cycler" version))
3876 (sha256
3877 (base32
3878 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
3879 (build-system python-build-system)
3880 (arguments
3881 ;; XXX: The current version requires 'coveralls' which we don't have.
3882 ;; Enable this for the next release which uses 'python-pytest'.
3883 '(#:tests? #f))
3884 (propagated-inputs
3885 `(("python-six" ,python-six)))
3886 (home-page "http://matplotlib.org/cycler/")
3887 (synopsis "Composable keyword argument iterator")
3888 (description
3889 "When using @code{matplotlib} and plotting more than one line, it is
3890common to want to be able to want to be able to cycle over one or more artist
3891styles; but the plotting logic can quickly become involved.
3892To address this and enable easy cycling over arbitrary @code{kwargs}, the
3893@code{Cycler} class was developed.")
3894 (license license:bsd-3)))
3895
3896(define-public python2-cycler
3897 (package-with-python2 python-cycler))
3898
3899(define-public python-colorspacious
3900 (package
3901 (name "python-colorspacious")
53a3ebed 3902 (version "1.1.2")
44d10b1f 3903 (source
dee92e65
TGR
3904 (origin
3905 (method git-fetch)
3906 (uri (git-reference
3907 (url "https://github.com/njsmith/colorspacious.git")
3908 (commit (string-append "v" version))))
3909 (file-name (git-file-name name version))
3910 (sha256
53a3ebed 3911 (base32 "0x7nkphr6g5ql5fvgss8l56rgiyjgh6fm8zzs73i94ci9wzlm63w"))))
44d10b1f
RW
3912 (build-system python-build-system)
3913 (propagated-inputs
3914 `(("python-numpy" ,python-numpy)))
3915 (native-inputs
3916 `(("python-nose" ,python-nose)))
3917 (arguments
3918 `(#:phases
3919 (modify-phases %standard-phases
3920 (replace 'check
3921 (lambda _
c988afda 3922 (invoke "nosetests" "--all-modules" "-v" "colorspacious"))))))
44d10b1f
RW
3923 (home-page "https://github.com/njsmith/colorspacious")
3924 (synopsis "Python library for colorspace conversions")
3925 (description "@code{colorspacious} is a Python library that lets you
3926convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
3927 (license license:expat)))
3928
3929(define-public python2-colorspacious
3930 (package-with-python2 python-colorspacious))
3931
3932(define-public python-matplotlib
3933 (package
3934 (name "python-matplotlib")
9e7cb2f1 3935 (version "3.1.2")
44d10b1f
RW
3936 (source
3937 (origin
3938 (method url-fetch)
3939 (uri (pypi-uri "matplotlib" version))
3940 (sha256
3941 (base32
9e7cb2f1 3942 "1nmshfqh7wyg15i16hx1yiylcvzkws29ivn66n3i0wyqwcpjr3lf"))))
44d10b1f
RW
3943 (build-system python-build-system)
3944 (propagated-inputs ; the following packages are all needed at run time
3945 `(("python-cycler" ,python-cycler)
3946 ("python-kiwisolver" ,python-kiwisolver)
3947 ("python-pyparsing" ,python-pyparsing)
3948 ("python-pygobject" ,python-pygobject)
3949 ("gobject-introspection" ,gobject-introspection)
3950 ("python-tkinter" ,python "tk")
3951 ("python-dateutil" ,python-dateutil)
3952 ("python-numpy" ,python-numpy)
3953 ("python-pillow" ,python-pillow)
3954 ("python-pytz" ,python-pytz)
3955 ("python-six" ,python-six)
44d10b1f
RW
3956 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3957 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3958 ;; object. For this reason we need to import both libraries.
5ea654cf 3959 ;; https://cairocffi.readthedocs.io/en/stable/cffi_api.html#converting-pycairo-wrappers-to-cairocffi
44d10b1f 3960 ("python-pycairo" ,python-pycairo)
44d10b1f
RW
3961 ("python-cairocffi" ,python-cairocffi)))
3962 (inputs
3963 `(("libpng" ,libpng)
3964 ("imagemagick" ,imagemagick)
3965 ("freetype" ,freetype)
3966 ("cairo" ,cairo)
3967 ("glib" ,glib)
3968 ;; FIXME: Add backends when available.
3969 ;("python-wxpython" ,python-wxpython)
3970 ("tcl" ,tcl)
3971 ("tk" ,tk)))
3972 (native-inputs
3973 `(("pkg-config" ,pkg-config)
5ea654cf
RW
3974 ("python-pytest" ,python-pytest)
3975 ("python-mock" ,python-mock)
3976 ("unzip" ,unzip)
3977 ("jquery-ui"
3978 ,(origin
3979 (method url-fetch)
3980 (uri "https://jqueryui.com/resources/download/jquery-ui-1.12.1.zip")
3981 (sha256
3982 (base32
3983 "0kb21xf38diqgxcdi1z3s9ssq36pldvyqxy56hn6pcva6rs3c8zq"))))))
44d10b1f
RW
3984 (arguments
3985 `(#:phases
3986 (modify-phases %standard-phases
5ea654cf
RW
3987 ;; XXX We disable all image comparison tests because we're using a
3988 ;; newer version of FreeType than matplotlib expects. This leads to
3989 ;; minor differences throughout the tests.
3990 (add-after 'unpack 'fix-and-disable-failing-tests
3991 (lambda _
3992 (substitute* (append (find-files "lib/matplotlib/tests/"
3993 "test_.*\\.py$")
3994 (find-files "lib/mpl_toolkits/tests"
3995 "test_.*\\.py$"))
3996 (("^from matplotlib" match)
3997 (string-append "import pytest\n" match))
3998 (("( *)@image_comparison" match indent)
3999 (string-append indent
4000 "@pytest.mark.skip(reason=\"unknown minor image differences\")\n"
4001 match)))
4002 (substitute* "lib/matplotlib/tests/test_animation.py"
4003 (("/bin/sh") (which "sh")))
4004 (for-each delete-file
4005 ;; test_normal_axes, test_get_tightbbox_polar
4006 '("lib/matplotlib/tests/test_axes.py"
9e7cb2f1
RW
4007 ;; We don't use the webagg backend and this test forces it.
4008 "lib/matplotlib/tests/test_backend_webagg.py"
5ea654cf
RW
4009 ;; test_outward_ticks
4010 "lib/matplotlib/tests/test_tightlayout.py"
9e7cb2f1
RW
4011 ;; test_hidden_axes fails with minor extent
4012 ;; differences, possibly due to the use of a
4013 ;; different version of FreeType.
4014 "lib/matplotlib/tests/test_constrainedlayout.py"
5ea654cf
RW
4015 ;; Fontconfig returns no fonts.
4016 "lib/matplotlib/tests/test_font_manager.py"))
4017 #t))
4018 (add-before 'install 'install-jquery-ui
4019 (lambda* (#:key outputs inputs #:allow-other-keys)
4020 (let ((dir (string-append (assoc-ref outputs "out")
4021 "/lib/python3.7/site-packages/matplotlib/backends/web_backend/")))
4022 (mkdir-p dir)
4023 (invoke "unzip"
4024 (assoc-ref inputs "jquery-ui")
4025 "-d" dir))
4026 #t))
c09f598d 4027 (replace 'check
5ea654cf
RW
4028 (lambda* (#:key outputs inputs #:allow-other-keys)
4029 (add-installed-pythonpath inputs outputs)
4030 (invoke "python" "tests.py" "-v"
9e7cb2f1 4031 "-m" "not network and not webagg")))
44d10b1f
RW
4032 (add-before 'build 'configure-environment
4033 (lambda* (#:key outputs inputs #:allow-other-keys)
34c2a16b
RW
4034 (let ((cairo (assoc-ref inputs "cairo")))
4035 ;; Setting this directory in the 'basedirlist' of 'setup.cfg'
44d10b1f 4036 ;; has not effect.
34c2a16b 4037 (setenv "LD_LIBRARY_PATH" (string-append cairo "/lib"))
44d10b1f
RW
4038 (setenv "HOME" (getcwd))
4039 (call-with-output-file "setup.cfg"
4040 (lambda (port)
4041 (format port "[directories]~%
4042basedirlist = ~a,~a~%
5ea654cf
RW
4043[packages]~%
4044tests = True~%"
44d10b1f
RW
4045 (assoc-ref inputs "tcl")
4046 (assoc-ref inputs "tk")))))
4047 #t)))))
339b5828 4048 (home-page "https://matplotlib.org/")
44d10b1f
RW
4049 (synopsis "2D plotting library for Python")
4050 (description
4051 "Matplotlib is a Python 2D plotting library which produces publication
4052quality figures in a variety of hardcopy formats and interactive environments
4053across platforms. Matplotlib can be used in Python scripts, the python and
4054ipython shell, web application servers, and six graphical user interface
4055toolkits.")
4056 (license license:psfl)
4057 (properties `((python2-variant . ,(delay python2-matplotlib))))))
4058
4059(define-public python2-matplotlib
4060 (let ((matplotlib (package-with-python2
4061 (strip-python2-variant python-matplotlib))))
4062 (package (inherit matplotlib)
7380df73 4063 (version "2.2.4")
5ea654cf
RW
4064 (source
4065 (origin
4066 (method url-fetch)
4067 (uri (pypi-uri "matplotlib" version))
4068 (sha256
4069 (base32
7380df73 4070 "09i1gnrra1590brc1f8d5rh2zvnknmfgzp613ab0462qkrwj15h2"))))
5d484f42
EF
4071 (arguments
4072 (substitute-keyword-arguments (package-arguments matplotlib)
4073 ((#:phases phases)
4074 `(modify-phases ,phases
66a3c2db
EF
4075 (replace 'install-jquery-ui
4076 (lambda* (#:key outputs inputs #:allow-other-keys)
4077 (let ((dir (string-append (assoc-ref outputs "out")
4078 "/lib/python2.7/site-packages/"
4079 "matplotlib/backends/web_backend/")))
4080 (mkdir-p dir)
4081 (invoke "unzip"
4082 (assoc-ref inputs "jquery-ui")
4083 "-d" dir))
4084 #t))
38a404d5 4085 (delete 'fix-and-disable-failing-tests)
5d484f42 4086 (delete 'check))))) ; These tests weren't run the the past.
44d10b1f
RW
4087 ;; Make sure to use special packages for Python 2 instead
4088 ;; of those automatically rewritten by package-with-python2.
4089 (propagated-inputs
4090 `(("python2-pycairo" ,python2-pycairo)
4091 ("python2-backports-functools-lru-cache"
4092 ,python2-backports-functools-lru-cache)
4093 ("python2-functools32" ,python2-functools32)
4094 ("python2-pygobject-2" ,python2-pygobject-2)
4095 ("python2-subprocess32" ,python2-subprocess32)
4096 ("python2-tkinter" ,python-2 "tk")
4097 ,@(fold alist-delete (package-propagated-inputs matplotlib)
4098 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
4099
4100(define-public python-matplotlib-documentation
4101 (package
4102 (name "python-matplotlib-documentation")
4103 (version (package-version python-matplotlib))
4104 (source (package-source python-matplotlib))
4105 (build-system python-build-system)
4106 (native-inputs
4107 `(("python-matplotlib" ,python-matplotlib)
4108 ("python-colorspacious" ,python-colorspacious)
4109 ("python-sphinx" ,python-sphinx)
5ad0a452 4110 ("python-sphinx-copybutton" ,python-sphinx-copybutton)
44d10b1f
RW
4111 ("python-sphinx-gallery" ,python-sphinx-gallery)
4112 ("python-numpydoc" ,python-numpydoc)
4113 ("python-ipython" ,python-ipython)
e7a53914 4114 ("python-ipykernel" ,python-ipykernel)
44d10b1f
RW
4115 ("python-mock" ,python-mock)
4116 ("graphviz" ,graphviz)
f75aa97f 4117 ("texlive" ,(texlive-union (list texlive-amsfonts
e7a53914
RW
4118 texlive-latex-amsmath
4119 texlive-latex-enumitem
4120 texlive-latex-expdlist
4121 texlive-latex-geometry
4122 texlive-latex-preview
4123 texlive-latex-type1cm
4124 texlive-latex-ucs
4125
4126 texlive-generic-pdftex
4127
e7a53914
RW
4128 texlive-fonts-ec
4129 texlive-fonts-adobe-times
4130 texlive-fonts-txfonts)))
44d10b1f
RW
4131 ("texinfo" ,texinfo)
4132 ,@(package-native-inputs python-matplotlib)))
4133 (arguments
4134 `(#:tests? #f ; we're only generating documentation
4135 #:phases
4136 (modify-phases %standard-phases
5ea654cf
RW
4137 ;; The tests in python-matplotlib are run after the install phase, so
4138 ;; we need to delete the extra phase here.
4139 (delete 'check)
44d10b1f
RW
4140 (replace 'build
4141 (lambda _
4142 (chdir "doc")
e7a53914
RW
4143 (setenv "PYTHONPATH"
4144 (string-append (getenv "PYTHONPATH")
4145 ":" (getcwd) "/../examples/units"))
44d10b1f 4146 (substitute* "conf.py"
e7a53914
RW
4147 ;; Don't use git.
4148 (("^SHA = check_output.*")
4149 (string-append "SHA = \"" ,version "\"\n"))
4150 ;; Don't fetch intersphinx files from the Internet
4151 (("^explicit_order_folders" m)
4152 (string-append "intersphinx_mapping = {}\n" m))
4153 (("'sphinx.ext.intersphinx',") "")
4154 ;; Disable URL embedding which requires internet access.
4155 (("'https://docs.scipy.org/doc/numpy'") "None")
4156 (("'https://docs.scipy.org/doc/scipy/reference'") "None"))
4157 (invoke "make"
4158 "SPHINXBUILD=sphinx-build"
4159 "SPHINXOPTS=" ; don't abort on warnings
4160 "html" "texinfo")))
44d10b1f
RW
4161 (replace 'install
4162 (lambda* (#:key inputs outputs #:allow-other-keys)
4163 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
4164 (doc (string-append data "/doc/python-matplotlib-" ,version))
4165 (info (string-append data "/info"))
4166 (html (string-append doc "/html")))
4167 (mkdir-p html)
4168 (mkdir-p info)
4169 (copy-recursively "build/html" html)
4170 (symlink (string-append html "/_images")
4171 (string-append info "/matplotlib-figures"))
4172 (with-directory-excursion "build/texinfo"
4173 (substitute* "matplotlib.texi"
4174 (("@image\\{([^,]*)" all file)
4175 (string-append "@image{matplotlib-figures/" file)))
4176 (symlink (string-append html "/_images")
4177 "./matplotlib-figures")
e7a53914
RW
4178 (invoke "makeinfo" "--no-split"
4179 "-o" "matplotlib.info" "matplotlib.texi"))
4180 (install-file "build/texinfo/matplotlib.info" info))
44d10b1f
RW
4181 #t)))))
4182 (home-page (package-home-page python-matplotlib))
4183 (synopsis "Documentation for the python-matplotlib package")
4184 (description (package-description python-matplotlib))
4185 (license (package-license python-matplotlib))))
4186
4187(define-public python2-matplotlib-documentation
5ad0a452
RW
4188 (let ((parent (package-with-python2 python-matplotlib-documentation)))
4189 (package
4190 (inherit parent)
4191 (native-inputs
4192 (alist-delete "python-sphinx-copybutton"
4193 (package-native-inputs parent))))))
44d10b1f 4194
55dae98f
RW
4195(define-public python-matplotlib-venn
4196 (package
4197 (name "python-matplotlib-venn")
4198 (version "0.11.5")
4199 (source
4200 (origin
4201 (method url-fetch)
4202 (uri (pypi-uri "matplotlib-venn" version ".zip"))
4203 (sha256
4204 (base32
4205 "13w3i1wih0mij08hrgppzg0g9z50y54rc28l6gdi1r5w45l7l0dy"))))
4206 (build-system python-build-system)
4207 (arguments '(#:tests? #f)) ; tests are not included
4208 (propagated-inputs
4209 `(("python-matplotlib" ,python-matplotlib)
4210 ("python-numpy" ,python-numpy)
4211 ("python-scipy" ,python-scipy)))
4212 (native-inputs
4213 `(("unzip" ,unzip)))
4214 (home-page "https://github.com/konstantint/matplotlib-venn")
4215 (synopsis "Plot area-proportional Venn diagrams")
4216 (description
4217 "This package provides tools for plotting area-proportional two- and
4218three-way Venn diagrams in @code{matplotlib}.")
4219 (license license:expat)))
4220
44d10b1f
RW
4221(define-public python2-pysnptools
4222 (package
4223 (name "python2-pysnptools")
5d1ade85 4224 (version "0.3.13")
44d10b1f
RW
4225 (source
4226 (origin
4227 (method url-fetch)
5d1ade85 4228 (uri (pypi-uri "pysnptools" version))
44d10b1f
RW
4229 (sha256
4230 (base32
5d1ade85 4231 "0lnis5xsl7bi0hz4f7gbicahzi5zlxkc21nk3g374xv8fb5hb3qm"))))
44d10b1f
RW
4232 (build-system python-build-system)
4233 (arguments
5d1ade85
RW
4234 `(#:python ,python-2 ; only Python 2.7 is supported
4235 #:tests? #f)) ; test files (e.g. examples/toydata.bim) not included
44d10b1f
RW
4236 (propagated-inputs
4237 `(("python2-numpy" ,python2-numpy)
4238 ("python2-scipy" ,python2-scipy)
4239 ("python2-pandas" ,python2-pandas)))
44d10b1f 4240 (native-inputs
5d1ade85 4241 `(("python2-cython" ,python2-cython)))
1b66989b 4242 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
44d10b1f
RW
4243 (synopsis "Library for reading and manipulating genetic data")
4244 (description
4245 "PySnpTools is a library for reading and manipulating genetic data. It
4246can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
4247those files. It can also efficiently manipulate ranges of integers using set
4248operators such as union, intersection, and difference.")
4249 (license license:asl2.0)))
4250
44d10b1f
RW
4251(define-public python-socksipy-branch
4252 (package
4253 (name "python-socksipy-branch")
4254 (version "1.01")
4255 (source
4256 (origin
4257 (method url-fetch)
4258 (uri (pypi-uri "SocksiPy-branch" version))
4259 (sha256
4260 (base32
4261 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
4262 (build-system python-build-system)
4263 (arguments
4264 `(#:tests? #f)) ; There are no tests
4265 (home-page "https://code.google.com/archive/p/socksipy-branch/")
4266 (synopsis "Python SOCKS module")
4267 (description
4268 "SocksiPy - A Python SOCKS client module. It provides a
4269socket-like interface that supports connections to any TCP
4270service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
4271The original version was developed by Dan Haim, this is a
4272branch created by Mario Vilas to address some open issues,
4273as the original project seems to have been abandoned circa 2007.")
4274 (license license:bsd-3)))
4275
4276(define-public python2-socksipy-branch
4277 (package-with-python2 python-socksipy-branch))
4278
6fcceb23
AG
4279(define-public python-socksipychain
4280 (package
4281 (name "python-socksipychain")
d97cdff1 4282 (version "2.1.0")
6fcceb23
AG
4283 (source
4284 (origin
4285 (method git-fetch)
4286 (uri (git-reference
4287 (url "https://github.com/pagekite/PySocksipyChain.git")
4288 (commit (string-append "v" version))))
4289 (file-name (git-file-name name version))
4290 (sha256
4291 (base32
d97cdff1 4292 "0idm9a050rd2kbgbz2sk9ib9589kj4xh1xdnggs6xbq2v2y8f6zn"))))
6fcceb23
AG
4293 (build-system python-build-system)
4294 (arguments
4295 `(#:tests? #f)) ; Tests try to access the network.
4296 (home-page "http://pagekite.net/wiki/Floss/PySocksipyChain/")
4297 (synopsis "Python SOCKS module with chained proxies support")
4298 (description
4299 "SocksiPyChain is a modified version of the SocksiPy SOCKS module, which
4300adds support for arbitrary chaining of proxy servers and various modes of
4301TLS/SSL encryption. It was developed for use in PageKite, and also includes
4302a simple netcat replacement with chaining support.")
4303 (license license:bsd-3)))
4304
44d10b1f
RW
4305(define-public python-pycodestyle
4306 (package
4307 (name "python-pycodestyle")
d16ef28b 4308 (version "2.5.0")
44d10b1f 4309 (source
ba88eea2
RW
4310 (origin
4311 (method url-fetch)
4312 (uri (pypi-uri "pycodestyle" version))
4313 (sha256
4314 (base32
d16ef28b 4315 "0v4prb05n21bm8650v0a01k1nyqjdmkrsm3zycfxh2j5k9n962p4"))))
44d10b1f
RW
4316 (build-system python-build-system)
4317 (home-page "https://pycodestyle.readthedocs.io/")
4318 (synopsis "Python style guide checker")
4319 (description "@code{pycodestyle} (formerly pep8) is a tool to check
4320Python code against some of the style conventions in
4321@url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
4322 (license license:expat)))
4323
4324(define-public python2-pycodestyle
4325 (package-with-python2 python-pycodestyle))
4326
4327(define-public python-multidict
4328 (package
4329 (name "python-multidict")
4330 (version "4.2.0")
4331 (source
4332 (origin
4333 (method url-fetch)
4334 (uri (pypi-uri "multidict" version))
4335 (sha256
4336 (base32
4337 "1vf5bq8hn5a9rvhr5v4fwbmarfsp35hhr8gs74kqfijy34j2f194"))))
4338 (build-system python-build-system)
4339 (native-inputs
4340 `(("python-pytest" ,python-pytest)
4341 ("python-pytest-runner" ,python-pytest-runner)))
4342 (home-page "https://github.com/aio-libs/multidict/")
4343 (synopsis "Multidict implementation")
4344 (description "Multidict is dict-like collection of key-value pairs
4345where key might be occurred more than once in the container.")
4346 (license license:asl2.0)))
4347
4348(define-public python-orderedmultidict
4349 (package
4350 (name "python-orderedmultidict")
4351 (version "0.7.11")
4352 (source
4353 (origin
4354 (method url-fetch)
4355 (uri (pypi-uri "orderedmultidict" version))
4356 (sha256
4357 (base32
4358 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
4359 (build-system python-build-system)
4360 (arguments
4361 `(#:phases
4362 (modify-phases %standard-phases
4363 (add-after 'unpack 'fix-tests
4364 (lambda _
4365 ;; The package uses nosetest for running the tests.
4366 ;; Adding this initfile allows to run the test suite
4367 ;; without requiring nosetest.
d1c4f329
RW
4368 (with-output-to-file "tests/__init__.py" newline)
4369 #t)))))
44d10b1f
RW
4370 (propagated-inputs
4371 `(("python-six" ,python-six)))
4372 (native-inputs
4373 `(("python-pycodestyle" ,python-pycodestyle)))
4374 (home-page "https://github.com/gruns/orderedmultidict")
4375 (synopsis "Python Ordered Multivalue Dictionary - omdict")
4376 (description "This package contains a library for ordered multivalue
4377dictionaries. A multivalue dictionary is a dictionary that can store
4378multiple values for the same key. An ordered multivalue dictionary is a
4379multivalue dictionary that retains the order of insertions and deletions.")
4380 (license license:unlicense)))
4381
4382(define-public python2-orderedmultidict
4383 (package-with-python2 python-orderedmultidict))
4384
4385(define-public python-autopep8
4386 (package
4387 (name "python-autopep8")
4388 (version "1.3.5")
4389 (source
4390 (origin
4391 (method url-fetch)
4392 (uri (pypi-uri "autopep8" version))
4393 (sha256
4394 (base32
4395 "192bvhzi4d0claqxgzymvv7k3qnj627742bc8sgxpzjj42pd9112"))))
4396 (build-system python-build-system)
4397 (propagated-inputs
4398 `(("python-pycodestyle" ,python-pycodestyle)))
4399 (home-page "https://github.com/hhatto/autopep8")
4400 (synopsis "Format Python code according to the PEP 8 style guide")
4401 (description
4402 "@code{autopep8} automatically formats Python code to conform to
4403the PEP 8 style guide. It uses the pycodestyle utility to determine
4404what parts of the code needs to be formatted. @code{autopep8} is
4405capable of fixing most of the formatting issues that can be reported
4406by pycodestyle.")
4407 (license (license:non-copyleft
4408 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
4409
4410(define-public python2-autopep8
4411 (package-with-python2 python-autopep8))
4412
4413(define-public python-distutils-extra
4414 (package
4415 (name "python-distutils-extra")
4416 (version "2.38")
4417 (source
4418 (origin
4419 (method url-fetch)
4420 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4421 version "/+download/python-distutils-extra-"
4422 version ".tar.gz"))
4423 (sha256
4424 (base32
4425 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4426 (build-system python-build-system)
4427 (home-page "https://launchpad.net/python-distutils-extra/")
4428 (synopsis "Enhancements to Python's distutils")
4429 (description
4430 "The python-distutils-extra module enables you to easily integrate
4431gettext support, themed icons, and scrollkeeper-based documentation into
4432Python's distutils.")
4433 (license license:gpl2)))
4434
4435(define-public python2-distutils-extra
4436 (package-with-python2 python-distutils-extra))
4437
4438(define-public python2-elib.intl
4439 (package
4440 (name "python2-elib.intl")
4441 (version "0.0.3")
4442 (source
4443 (origin
4444 ;; This project doesn't tag releases or publish tarballs, so we take
4445 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4446 (method git-fetch)
4447 (uri (git-reference
4448 (url "https://github.com/dieterv/elib.intl.git")
4449 (commit "d09997cfef")))
4450 (file-name (string-append name "-" version "-checkout"))
4451 (sha256
4452 (base32
4453 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4454 (build-system python-build-system)
4455 (arguments
4456 ;; incompatible with Python 3 (exception syntax)
4457 `(#:python ,python-2
4458 #:tests? #f))
4459 (home-page "https://github.com/dieterv/elib.intl")
4460 (synopsis "Enhanced internationalization for Python")
4461 (description
4462 "The elib.intl module provides enhanced internationalization (I18N)
4463services for your Python modules and applications.")
4464 (license license:lgpl3+)))
4465
4466(define-public python-olefile
4467 (package
4468 (name "python-olefile")
5bef0f10 4469 (version "0.46")
44d10b1f
RW
4470 (source
4471 (origin
4472 (method url-fetch)
5bef0f10
MB
4473 (uri (string-append "https://github.com/decalage2/olefile/releases/"
4474 "download/v" version "/olefile-" version ".tar.gz"))
44d10b1f
RW
4475 (file-name (string-append name "-" version ".tar.gz"))
4476 (sha256
4477 (base32
5bef0f10 4478 "1kjxh4gr651hpqkjfv89cfzr40hyvf3vjlda7mifiail83j7j07m"))))
44d10b1f 4479 (build-system python-build-system)
5bef0f10 4480 (home-page "https://www.decalage.info/python/olefileio")
44d10b1f
RW
4481 (synopsis "Read and write Microsoft OLE2 files.")
4482 (description
4483 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
4484Storage or Compound Document, Microsoft Office). It is an improved version of
4485the OleFileIO module from PIL, the Python Image Library.")
4486 (license license:bsd-3)))
4487
4488(define-public python2-olefile
4489 (package-with-python2 python-olefile))
4490
4491(define-public python-pillow
4492 (package
4493 (name "python-pillow")
5fbdd917 4494 (version "6.2.1")
44d10b1f
RW
4495 (source
4496 (origin
4497 (method url-fetch)
4498 (uri (pypi-uri "Pillow" version))
4499 (sha256
4500 (base32
5fbdd917 4501 "1c8wkzc58f5wdh006jvmwdk3wxld1xgagcbdvj7iv17qi0m9fkmz"))))
44d10b1f
RW
4502 (build-system python-build-system)
4503 (native-inputs
4504 `(("python-pytest" ,python-pytest)))
4505 (inputs
4506 `(("freetype" ,freetype)
4507 ("lcms" ,lcms)
44d10b1f 4508 ("libjpeg" ,libjpeg)
44d10b1f 4509 ("libtiff" ,libtiff)
0c4e1c5f
EF
4510 ("libwebp" ,libwebp)
4511 ("openjpeg" ,openjpeg)
4512 ("zlib" ,zlib)))
44d10b1f
RW
4513 (propagated-inputs
4514 `(("python-olefile" ,python-olefile)))
4515 (arguments
4516 `(#:phases
4517 (modify-phases %standard-phases
4518 (add-after 'unpack 'patch-ldconfig
4519 (lambda _
4520 (substitute* "setup.py"
4521 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
61b77ff3 4522 (replace 'check
979d8464
EF
4523 (lambda* (#:key outputs inputs tests? #:allow-other-keys)
4524 (if tests?
4525 (begin
4526 (setenv "HOME" (getcwd))
4527 ;; Make installed package available for running the tests.
4528 (add-installed-pythonpath inputs outputs)
4529 (invoke "python" "selftest.py" "--installed")
4530 (invoke "python" "-m" "pytest" "-vv"))
4531 #t))))))
44d10b1f
RW
4532 (home-page "https://python-pillow.org")
4533 (synopsis "Fork of the Python Imaging Library")
4534 (description
4535 "The Python Imaging Library adds image processing capabilities to your
4536Python interpreter. This library provides extensive file format support, an
4537efficient internal representation, and fairly powerful image processing
4538capabilities. The core image library is designed for fast access to data
4539stored in a few basic pixel formats. It should provide a solid foundation for
4540a general image processing tool.")
4541 (license (license:x11-style
4542 "http://www.pythonware.com/products/pil/license.htm"
4543 "The PIL Software License"))))
4544
4545(define-public python2-pillow
4546 (package-with-python2 python-pillow))
4547
4548(define-public python-pycparser
4549 (package
4550 (name "python-pycparser")
c6c0940e 4551 (version "2.19")
44d10b1f
RW
4552 (source
4553 (origin
4554 (method url-fetch)
4555 (uri (pypi-uri "pycparser" version))
4556 (sha256
4557 (base32
c6c0940e 4558 "1cr5dcj9628lkz1qlwq3fv97c25363qppkmcayqvd05dpy573259"))))
44d10b1f
RW
4559 (outputs '("out" "doc"))
4560 (build-system python-build-system)
4561 (native-inputs
4562 `(("pkg-config" ,pkg-config)))
4563 (arguments
4564 `(#:phases
4565 (modify-phases %standard-phases
4566 (replace 'check
4567 (lambda _
4568 (with-directory-excursion "tests"
acb75c03
RW
4569 (invoke "python" "all_tests.py"))
4570 #t))
44d10b1f
RW
4571 (add-after 'install 'install-doc
4572 (lambda* (#:key outputs #:allow-other-keys)
4573 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4574 (doc (string-append data "/doc/" ,name "-" ,version))
4575 (examples (string-append doc "/examples")))
4576 (mkdir-p examples)
4577 (for-each (lambda (file)
4578 (copy-file (string-append "." file)
4579 (string-append doc file)))
4580 '("/README.rst" "/CHANGES" "/LICENSE"))
c6c0940e
MB
4581 (copy-recursively "examples" examples)
4582 #t))))))
44d10b1f
RW
4583 (home-page "https://github.com/eliben/pycparser")
4584 (synopsis "C parser in Python")
4585 (description
4586 "Pycparser is a complete parser of the C language, written in pure Python
4587using the PLY parsing library. It parses C code into an AST and can serve as
4588a front-end for C compilers or analysis tools.")
4589 (license license:bsd-3)))
4590
4591(define-public python2-pycparser
4592 (package-with-python2 python-pycparser))
4593
4594(define-public python-pywavelets
4595 (package
4596 (name "python-pywavelets")
4597 (version "1.0.1")
4598 (home-page "https://github.com/PyWavelets/pywt")
4599 (source (origin
4600 (method url-fetch)
4601 (uri (pypi-uri "PyWavelets" version))
4602 (sha256
4603 (base32
4604 "1p3qv2v66ghnqrb1f98wyyhp9dz71jwcd6kfpsax65sfdpiyqp1w"))))
4605 (build-system python-build-system)
4606 (arguments
4607 '(#:modules ((ice-9 ftw)
4608 (srfi srfi-1)
4609 (srfi srfi-26)
4610 (guix build utils)
4611 (guix build python-build-system))
4612 #:phases (modify-phases %standard-phases
4613 (replace 'check
4614 (lambda _
4615 (let ((cwd (getcwd))
4616 (libdir (find (cut string-prefix? "lib." <>)
4617 (scandir "build"))))
4618 (with-directory-excursion (string-append cwd "/build/" libdir)
4619 (invoke "nosetests" "-v" "."))))))))
4620 (native-inputs
4621 `(("python-matplotlib" ,python-matplotlib) ;for tests
4622 ("python-nose" ,python-nose)))
4623 (propagated-inputs
4624 `(("python-numpy" ,python-numpy)))
4625 (synopsis "Wavelet transforms in Python")
4626 (description
4627 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
4628mathematical basis functions that are localized in both time and frequency.
4629Wavelet transforms are time-frequency transforms employing wavelets. They are
4630similar to Fourier transforms, the difference being that Fourier transforms are
4631localized only in frequency instead of in time and frequency.")
4632 (license license:expat)))
4633
4634(define-public python2-pywavelets
4635 (package-with-python2 python-pywavelets))
4636
4637(define-public python-xcffib
4638 (package
4639 (name "python-xcffib")
4640 (version "0.6.0")
4641 (source
4642 (origin
4643 (method url-fetch)
4644 (uri (pypi-uri "xcffib" version))
4645 (sha256
4646 (base32
4647 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
4648 (build-system python-build-system)
4649 (inputs
4650 `(("libxcb" ,libxcb)))
4651 (propagated-inputs
4652 `(("python-cffi" ,python-cffi) ; used at run time
4653 ("python-six" ,python-six)))
4654 (arguments
4655 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
4656 #:tests? #f
4657 #:phases
4658 (modify-phases %standard-phases
4659 (add-after 'unpack 'fix-libxcb-path
4660 (lambda* (#:key inputs #:allow-other-keys)
4661 (let ((libxcb (assoc-ref inputs "libxcb")))
4662 (substitute* '("xcffib/__init__.py")
4663 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
4664 #t)))
4665 (add-after 'install 'install-doc
4666 (lambda* (#:key outputs #:allow-other-keys)
4667 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4668 "/doc/" ,name "-" ,version)))
4669 (mkdir-p doc)
4670 (copy-file "README.md"
4671 (string-append doc "/README.md"))
4672 #t))))))
4673 (home-page "https://github.com/tych0/xcffib")
4674 (synopsis "XCB Python bindings")
4675 (description
4676 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4677support for Python 3 and PyPy. It is based on cffi.")
4678 (license license:expat)))
4679
4680(define-public python2-xcffib
4681 (package-with-python2 python-xcffib))
4682
4683(define-public python-cairocffi
4684 (package
4685 (name "python-cairocffi")
4686 (version "0.9.0")
4687 (source
4688 (origin
4689 (method url-fetch)
4690 (uri (pypi-uri "cairocffi" version))
4691 (sha256
4692 (base32
4693 "0dq3k4zhqd8cwsf3nyjqvjqm8wkvrjn1wjf44rl3v0h8kqx6qf0m"))
4694 (patches (search-patches "python-cairocffi-dlopen-path.patch"))))
4695 (build-system python-build-system)
4696 (outputs '("out" "doc"))
4697 (inputs
4698 `(("glib" ,glib)
4699 ("gtk+" ,gtk+)
4700 ("gdk-pixbuf" ,gdk-pixbuf)
4701 ("cairo" ,cairo)
4702 ("pango" ,pango)))
4703 (native-inputs
4704 `(("pkg-config" ,pkg-config)
4705 ("python-pytest" ,python-pytest)
4706 ("python-pytest-cov" ,python-pytest-cov)
4707 ("python-pytest-runner" ,python-pytest-runner)
4708 ("python-sphinx" ,python-sphinx)
4709 ("python-docutils" ,python-docutils)))
4710 (propagated-inputs
4711 `(("python-xcffib" ,python-xcffib))) ; used at run time
4712 (arguments
4713 `(#:phases
4714 (modify-phases %standard-phases
4715 (add-after 'unpack 'patch-paths
4716 (lambda* (#:key inputs outputs #:allow-other-keys)
4717 (substitute* (find-files "." "\\.py$")
4718 (("dlopen\\(ffi, 'cairo'")
4719 (string-append "dlopen(ffi, '" (assoc-ref inputs "cairo")
4720 "/lib/libcairo.so.2'"))
4721 (("dlopen\\(ffi, 'gdk-3'")
4722 (string-append "dlopen(ffi, '" (assoc-ref inputs "gtk+")
4723 "/lib/libgtk-3.so.0'"))
4724 (("dlopen\\(ffi, 'gdk_pixbuf-2.0'")
4725 (string-append "dlopen(ffi, '" (assoc-ref inputs "gdk-pixbuf")
4726 "/lib/libgdk_pixbuf-2.0.so.0'"))
4727 (("dlopen\\(ffi, 'glib-2.0'")
4728 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4729 "/lib/libglib-2.0.so.0'"))
4730 (("dlopen\\(ffi, 'gobject-2.0'")
4731 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4732 "/lib/libgobject-2.0.so.0'"))
4733 (("dlopen\\(ffi, 'pangocairo-1.0'")
4734 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4735 "/lib/libpangocairo-1.0.so.0'"))
4736 (("dlopen\\(ffi, 'pango-1.0'")
4737 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4738 "/lib/libpango-1.0.so.0'")))
4739 #t))
4740 (add-after 'install 'install-doc
4741 (lambda* (#:key inputs outputs #:allow-other-keys)
4742 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4743 (doc (string-append data "/doc/" ,name "-" ,version))
4744 (html (string-append doc "/html")))
4745 (setenv "LD_LIBRARY_PATH"
4746 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4747 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4748 (setenv "LANG" "en_US.UTF-8")
4749 (mkdir-p html)
4750 (for-each (lambda (file)
4751 (copy-file (string-append "." file)
4752 (string-append doc file)))
4753 '("/README.rst" "/CHANGES" "/LICENSE"))
4754 (system* "python" "setup.py" "build_sphinx")
4755 (copy-recursively "docs/_build/html" html)
4756 #t))))))
4757 (home-page "https://github.com/Kozea/cairocffi")
4758 (synopsis "Python bindings and object-oriented API for Cairo")
4759 (description
4760 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4761Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4762graphics library with support for multiple backends including image buffers,
4763PNG, PostScript, PDF, and SVG file output.")
4764 (license license:bsd-3)))
4765
4766(define-public python2-cairocffi
4767 (package-with-python2 python-cairocffi))
4768
4769(define-public python-decorator
4770 (package
4771 (name "python-decorator")
4772 (version "4.3.0")
4773 (source
4774 (origin
4775 (method url-fetch)
4776 (uri (pypi-uri "decorator" version))
4777 (sha256
4778 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
4779 (build-system python-build-system)
4780 (home-page "https://pypi.python.org/pypi/decorator/")
4781 (synopsis "Python module to simplify usage of decorators")
4782 (description
4783 "The aim of the decorator module is to simplify the usage of decorators
4784for the average programmer, and to popularize decorators usage giving examples
4785of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4786etc. The core of this module is a decorator factory.")
4787 (license license:expat)))
4788
4789(define-public python2-decorator
4790 (package-with-python2 python-decorator))
4791
4792(define-public python-drmaa
4793 (package
4794 (name "python-drmaa")
4795 (version "0.7.7")
4796 (source
4797 (origin
4798 (method url-fetch)
4799 (uri (pypi-uri "drmaa" version))
4800 (sha256
4801 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
4802 (build-system python-build-system)
4803 ;; The test suite requires libdrmaa which is provided by the cluster
4804 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4805 ;; should be set to the path of the libdrmaa library.
4806 (arguments '(#:tests? #f))
4807 (native-inputs
4808 `(("python-nose" ,python-nose)))
4809 (home-page "https://pypi.python.org/pypi/drmaa")
4810 (synopsis "Python bindings for the DRMAA library")
4811 (description
4812 "A Python package for Distributed Resource Management (DRM) job
4813submission and control. This package is an implementation of the DRMAA 1.0
4814Python language binding specification.")
4815 (license license:bsd-3)))
4816
4817(define-public python2-drmaa
4818 (package-with-python2 python-drmaa))
4819
4820(define-public python-grako
4821 (package
4822 (name "python-grako")
4823 (version "3.99.9")
4824 (source
4825 (origin
4826 (method url-fetch)
4827 (uri
4828 (pypi-uri "grako" version ".zip"))
4829 (sha256
4830 (base32
4831 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
4832 (build-system python-build-system)
4833 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
4834 (native-inputs
4835 `(("unzip" ,unzip)
4836 ("python-pytest" ,python-pytest)
4837 ("python-pytest-runner" ,python-pytest-runner)))
4838 (home-page "https://bitbucket.org/neogeny/grako")
4839 (synopsis "EBNF parser generator")
4840 (description
4841 "Grako takes a grammar in a variation of EBNF as input, and outputs a
4842memoizing PEG/Packrat parser in Python.")
4843 (license license:bsd-3)))
4844
4845(define-public python2-grako
4846 (package-with-python2 python-grako))
4847
4848(define-public python-gridmap
4849 (package
4850 (name "python-gridmap")
4851 (version "0.13.0")
4852 (source
4853 (origin
768fea0f
TGR
4854 (method git-fetch)
4855 (uri (git-reference
4856 (url "https://github.com/pygridtools/gridmap.git")
4857 (commit (string-append "v" version))))
4858 (file-name (git-file-name name version))
44d10b1f 4859 (sha256
768fea0f 4860 (base32 "1478lbwsr1w24cii2x01m2910fvh8r43ghnb78nc972a96hqiknm"))))
44d10b1f
RW
4861 (build-system python-build-system)
4862 (arguments
4863 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
4864 (propagated-inputs
4865 `(("python-psutil" ,python-psutil)
4866 ("python-drmaa" ,python-drmaa)
4867 ("python-pyzmq" ,python-pyzmq)))
4868 (home-page "https://github.com/pygridtools/gridmap")
4869 (synopsis "Create jobs on a cluster directly from Python")
4870 (description
4871 "Gridmap is a Python package to allow you to easily create jobs on the
4872cluster directly from Python. You can directly map Python functions onto the
4873cluster without needing to write any wrapper code yourself.")
4874 (license license:gpl3+)))
4875
4876(define-public python2-gridmap
4877 (package-with-python2 python-gridmap))
4878
4879(define-public python-honcho
4880 (package
4881 (name "python-honcho")
4882 (version "1.0.1")
4883 (source
4884 (origin
8524d130
TGR
4885 (method git-fetch)
4886 (uri (git-reference
4887 (url "https://github.com/nickstenning/honcho.git")
4888 (commit (string-append "v" version))))
4889 (file-name (git-file-name name version))
44d10b1f 4890 (sha256
8524d130 4891 (base32 "11bd87474qpif20xdcn0ra1idj5k16ka51i658wfpxwc6nzsn92b"))))
44d10b1f
RW
4892 (build-system python-build-system)
4893 (native-inputs
4894 `(("python-pytest" ,python-pytest)
4895 ("python-mock" ,python-mock)
4896 ("python-tox" ,python-tox)
4897 ("which" ,which))) ;for tests
4898 (propagated-inputs
4899 `(("python-jinja2" ,python-jinja2)))
4900 (arguments
4901 `(#:phases
4902 (modify-phases %standard-phases
4903 (delete 'check)
4904 (add-after 'install 'check
4905 (lambda* (#:key outputs inputs #:allow-other-keys)
4906 ;; fix honcho path in testsuite
4907 (substitute* "tests/conftest.py"
4908 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
4909 "/bin/honcho" "'")))
4910 ;; It's easier to run tests after install.
4911 ;; Make installed package available for running the tests
4912 (add-installed-pythonpath inputs outputs)
95b707fb 4913 (invoke "py.test" "-v"))))))
44d10b1f
RW
4914 (home-page "https://github.com/nickstenning/honcho")
4915 (synopsis "Manage Procfile-based applications")
4916 (description
4917 "A Procfile is a file which describes how to run an application
50fceab0 4918consisting of several processes. honcho starts all listed processes.
44d10b1f
RW
4919The output of all running processes is collected by honcho and
4920displayed.")
4921 (license license:expat)))
4922
4923(define-public python2-honcho
4924 (package-with-python2 python-honcho))
4925
4926(define-public python-pexpect
4927 (package
4928 (name "python-pexpect")
4929 (version "4.6.0")
4930 (source
4931 (origin
4932 (method url-fetch)
4933 (uri (pypi-uri "pexpect" version))
4934 (sha256
4935 (base32 "1fla85g47iaxxpjhp9vkxdnv4pgc7rplfy6ja491smrrk0jqi3ia"))))
4936 (build-system python-build-system)
4937 (arguments
4938 `(#:phases
4939 (modify-phases %standard-phases
4940 (add-before 'check 'prepare-tests
4941 (lambda _
4942 (substitute* (find-files "tests")
4943 (("/bin/ls") (which "ls"))
4944 (("/bin/echo") (which "echo"))
4945 (("/bin/which") (which "which"))
4946 ;; Many tests try to use the /bin directory which
4947 ;; is not present in the build environment.
4948 ;; Use one that's non-empty and unlikely to change.
4949 (("/bin'") "/dev'"))
4950 ;; XXX: Socket connection test gets "Connection reset by peer".
4951 ;; Why does it not work? Delete for now.
4952 (delete-file "tests/test_socket.py")
4953 #t))
4954 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
4955 (native-inputs
4956 `(("python-nose" ,python-nose)
4957 ("python-pytest" ,python-pytest)
4958 ("man-db" ,man-db)
4959 ("which" ,which)
4960 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
4961 (propagated-inputs
4962 `(("python-ptyprocess" ,python-ptyprocess)))
4963 (home-page "http://pexpect.readthedocs.org/")
4964 (synopsis "Controlling interactive console applications")
4965 (description
4966 "Pexpect is a pure Python module for spawning child applications;
4967controlling them; and responding to expected patterns in their output.
4968Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4969child application and control it as if a human were typing commands.")
4970 (license license:isc)))
4971
4972(define-public python2-pexpect
4973 (package-with-python2 python-pexpect))
4974
4975(define-public python-setuptools-scm
4976 (package
4977 (name "python-setuptools-scm")
85092643 4978 (version "3.2.0")
44d10b1f
RW
4979 (source (origin
4980 (method url-fetch)
4981 (uri (pypi-uri "setuptools_scm" version))
4982 (sha256
4983 (base32
85092643 4984 "0n3knn3p1sqlx31k2lahn7z9bacvlv8nhlfidj77vz50bxqlgasj"))))
44d10b1f
RW
4985 (build-system python-build-system)
4986 (home-page "https://github.com/pypa/setuptools_scm/")
4987 (synopsis "Manage Python package versions in SCM metadata")
4988 (description
4989 "Setuptools_scm handles managing your Python package versions in
4990@dfn{software configuration management} (SCM) metadata instead of declaring
4991them as the version argument or in a SCM managed file.")
4992 (license license:expat)))
4993
a0b2accf
MO
4994;; Needed by python-lazy-object-proxy, remove on next update cycle.
4995(define-public python-setuptools-scm-3.3
4996 (package
4997 (inherit python-setuptools-scm)
4998 (version "3.3.3")
4999 (source (origin
5000 (method url-fetch)
5001 (uri (pypi-uri "setuptools_scm" version))
5002 (sha256
5003 (base32
5004 "19cyndx23xmpbhz4qrwmfwsmnnaczd0dw7qg977ksq2dbvxy29dx"))))))
5005
44d10b1f
RW
5006(define-public python2-setuptools-scm
5007 (package-with-python2 python-setuptools-scm))
5008
bb74ea09
RW
5009(define-public python-pathlib2
5010 (package
5011 (name "python-pathlib2")
5012 (version "2.3.3")
5013 (source
5014 (origin
5015 (method url-fetch)
5016 (uri (pypi-uri "pathlib2" version))
5017 (sha256
5018 (base32
5019 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
5020 (build-system python-build-system)
5021 (propagated-inputs
5022 `(("python-scandir" ,python-scandir)
5023 ("python-six" ,python-six)))
5024 (home-page "https://pypi.python.org/pypi/pathlib2/")
746d3384 5025 (synopsis "Object-oriented file system paths")
bb74ea09
RW
5026 (description "The goal of pathlib2 is to provide a backport of the
5027standard @code{pathlib} module which tracks the standard library module, so
5028all the newest features of the standard @code{pathlib} can be used also on
5029older Python versions.")
5030 (license license:expat)))
5031
fd5c264a
MB
5032(define-public python2-importlib-resources
5033 (package
5034 (name "python2-importlib-resources")
5035 (version "1.0.2")
5036 (source (origin
5037 (method url-fetch)
5038 (uri (pypi-uri "importlib_resources" version))
5039 (sha256
5040 (base32
5041 "0y3hg12iby1qyaspnbisz4s4vxax7syikk3skznwqizqyv89y9yk"))))
5042 (build-system python-build-system)
5043 (arguments
5044 `(#:python ,python-2))
5045 (native-inputs
5046 `(("python-wheel" ,python2-wheel)))
5047 (propagated-inputs
5048 `(("python-pathlib2" ,python2-pathlib2)
5049 ("python-typing" ,python2-typing)))
5050 (home-page "https://gitlab.com/python-devs/importlib_resources")
5051 (synopsis "Backport of @code{importlib.resources} from Python 3.7")
5052 (description
5053 "This package provides an implementation of @code{importlib.resources}
5054for older versions of Python.")
5055 (license license:asl2.0)))
5056
15b65617
RW
5057(define-public python-importlib-metadata
5058 (package
5059 (name "python-importlib-metadata")
4dc04d11 5060 (version "1.4.0")
15b65617
RW
5061 (source
5062 (origin
5063 (method url-fetch)
5064 (uri (pypi-uri "importlib_metadata" version))
5065 (sha256
4dc04d11 5066 (base32 "1n76444v7zn910xrhh8954jdn4byxbn9f1jck6b85a716mbh2z7i"))))
15b65617
RW
5067 (build-system python-build-system)
5068 (propagated-inputs
4dc04d11 5069 `(("python-zipp" ,python-zipp)))
15b65617
RW
5070 (native-inputs
5071 `(("python-setuptools-scm" ,python-setuptools-scm)
4dc04d11 5072 ("python-packaging" ,python-packaging)))
15b65617
RW
5073 (home-page "https://importlib-metadata.readthedocs.io/")
5074 (synopsis "Read metadata from Python packages")
5075 (description
5076 "@code{importlib_metadata} is a library which provides an API for
5077accessing an installed Python package's metadata, such as its entry points or
5078its top-level name. This functionality intends to replace most uses of
5079@code{pkg_resources} entry point API and metadata API. Along with
5080@code{importlib.resources} in Python 3.7 and newer, this can eliminate the
5081need to use the older and less efficient @code{pkg_resources} package.")
3dfb3d44 5082 (properties `((python2-variant . ,(delay python2-importlib-metadata))))
15b65617
RW
5083 (license license:asl2.0)))
5084
5efa04dd
MB
5085(define-public python2-importlib-metadata
5086 (let ((base (package-with-python2 (strip-python2-variant
5087 python-importlib-metadata))))
5088 (package/inherit
5089 base
5090 (name "python2-importlib-metadata")
5091 (propagated-inputs
5092 `(("python-configparser" ,python2-configparser)
5093 ("python-contextlib2" ,python2-contextlib2)
5094 ("python-importlib-resources" ,python2-importlib-resources)
5095 ("python-pathlib2" ,python2-pathlib2)
5096 ,@(package-propagated-inputs base))))))
5097
37c173d1
RW
5098(define-public python-jaraco-packaging
5099 (package
5100 (name "python-jaraco-packaging")
5101 (version "6.1")
5102 (source
5103 (origin
5104 (method url-fetch)
5105 (uri (pypi-uri "jaraco.packaging" version))
5106 (sha256
5107 (base32
5108 "0zimrnkh33b9g8ffw11mjh6kvs54cy5gcjw1h5cl1r7dc833dmkm"))))
5109 (build-system python-build-system)
5110 (propagated-inputs
5111 `(("python-pytest" ,python-pytest)
5112 ("python-pytest-checkdocs" ,python-pytest-checkdocs)
5113 ("python-pytest-flake8" ,python-pytest-flake8)
5114 ("python-rst.linker" ,python-rst.linker)
5115 ("python-setuptools" ,python-setuptools)
5116 ("python-setuptools-scm" ,python-setuptools-scm)
5117 ("python-six" ,python-six)
5118 ("python-sphinx" ,python-sphinx)))
5119 (home-page "https://github.com/jaraco/jaraco.packaging")
5120 (synopsis "Tools to supplement packaging Python releases")
5121 (description
5122 "This package provides various tools to supplement packaging Python
5123releases.")
5124 (license license:expat)))
5125
44d10b1f
RW
5126(define-public python-pathpy
5127 (package
5128 (name "python-pathpy")
a3dd8871 5129 (version "11.5.1")
44d10b1f
RW
5130 (source
5131 (origin
5132 (method url-fetch)
5133 (uri (pypi-uri "path.py" version))
5134 (sha256
a3dd8871 5135 (base32 "0ir9j1haq2jbi7aip6k2fa9l7q1l03k4hp1awxhjhcwzsnwp3ll8"))))
49ad11e9 5136 (outputs '("out" "doc"))
44d10b1f
RW
5137 (build-system python-build-system)
5138 (propagated-inputs
01a53e0b
MC
5139 `(("python-appdirs" ,python-appdirs)
5140 ("python-importlib-metadata" ,python-importlib-metadata)))
44d10b1f
RW
5141 (native-inputs
5142 `(("python-setuptools-scm" ,python-setuptools-scm)
5143 ("python-sphinx" ,python-sphinx)
5144 ("python-rst.linker" ,python-rst.linker)
5145 ("python-pytest" ,python-pytest)
49ad11e9
RW
5146 ("python-pytest-runner" ,python-pytest-runner)
5147 ("python-jaraco-packaging" ,python-jaraco-packaging)))
44d10b1f 5148 (arguments
49ad11e9
RW
5149 `(#:phases
5150 (modify-phases %standard-phases
5151 (add-after 'build 'build-doc
5152 (lambda _
5153 (setenv "LANG" "en_US.UTF-8")
5154 (invoke "python" "setup.py" "build_sphinx")))
5155 (add-after 'install 'install-doc
5156 (lambda* (#:key outputs #:allow-other-keys)
5157 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5158 (doc (string-append data "/doc/" ,name "-" ,version))
5159 (html (string-append doc "/html")))
5160 (mkdir-p html)
5161 (for-each (lambda (file)
5162 (copy-file file (string-append doc "/" file)))
5163 '("README.rst" "CHANGES.rst"))
5164 (copy-recursively "build/sphinx/html" html)
5165 #t)))
5166 (replace 'check
5167 (lambda _
5168 ;; The import time test aborts if an import takes longer than
5169 ;; 100ms. It may very well take a little longer than that.
5170 (invoke "pytest" "-v" "-k" "not test_import_time"))))))
44d10b1f
RW
5171 (home-page "https://github.com/jaraco/path.py")
5172 (synopsis "Python module wrapper for built-in os.path")
5173 (description
5174 "@code{path.py} implements path objects as first-class entities, allowing
5175common operations on files to be invoked on those path objects directly.")
5176 (license license:expat)))
5177
5178(define-public python2-pathpy
5179 (package-with-python2 python-pathpy))
5180
5181(define-public python-simplegeneric
5182 (package
5183 (name "python-simplegeneric")
5184 (version "0.8.1")
5185 (source
5186 (origin
5187 (method url-fetch)
6c8c3980 5188 (uri (pypi-uri "simplegeneric" version ".zip"))
44d10b1f
RW
5189 (sha256
5190 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
5191 (build-system python-build-system)
5192 (native-inputs
5193 `(("unzip" ,unzip)))
5194 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
5195 (synopsis "Python module for simple generic functions")
5196 (description
5197 "The simplegeneric module lets you define simple single-dispatch generic
5198functions, akin to Python’s built-in generic functions like @code{len()},
5199@code{iter()} and so on. However, instead of using specially-named methods,
5200these generic functions use simple lookup tables, akin to those used by
5201e.g. @code{pickle.dump()} and other generic functions found in the Python
5202standard library.")
5203 (license license:zpl2.1)))
5204
5205(define-public python2-simplegeneric
5206 (package-with-python2 python-simplegeneric))
5207
5208(define-public python-ipython-genutils
5209 ;; TODO: This package is retired, check if can be removed, see description.
5210 (package
5211 (name "python-ipython-genutils")
5212 (version "0.1.0")
5213 (source
5214 (origin
5215 (method url-fetch)
c9671d4b 5216 (uri (pypi-uri "ipython_genutils" version))
44d10b1f
RW
5217 (sha256
5218 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
5219 (build-system python-build-system)
5220 (arguments `(#:tests? #f)) ; no tests
5221 (home-page "https://ipython.org")
5222 (synopsis "Vestigial utilities from IPython")
5223 (description
5224 "This package provides retired utilities from IPython. No packages
5225outside IPython/Jupyter should depend on it.
5226
5227This package shouldn't exist. It contains some common utilities shared by
5228Jupyter and IPython projects during The Big Split. As soon as possible, those
5229packages will remove their dependency on this, and this package will go
5230away.")
5231 (license license:bsd-3)))
5232
5233(define-public python2-ipython-genutils
5234 (package-with-python2 python-ipython-genutils))
5235
5236(define-public python-traitlets
5237 (package
5238 (name "python-traitlets")
ac5e205a 5239 (version "4.3.3")
44d10b1f
RW
5240 (source
5241 (origin
5242 (method url-fetch)
5243 (uri (pypi-uri "traitlets" version))
5244 (sha256
5245 (base32
ac5e205a 5246 "1xsrwgivpkxlbr4dfndfsi098s29yqgswgjc1qqn69yxklvfw8yh"))))
44d10b1f
RW
5247 (build-system python-build-system)
5248 (arguments
5249 `(#:phases
5250 (modify-phases %standard-phases
5251 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
5252 (propagated-inputs
5253 `(("python-ipython-genutils" ,python-ipython-genutils)
ac5e205a 5254 ("python-decorator" ,python-decorator)))
44d10b1f
RW
5255 (native-inputs
5256 `(("python-pytest" ,python-pytest)))
5257 (properties `((python2-variant . ,(delay python2-traitlets))))
5258 (home-page "https://ipython.org")
5259 (synopsis "Configuration system for Python applications")
5260 (description
5261 "Traitlets is a framework that lets Python classes have attributes with
5262type checking, dynamically calculated default values, and ‘on change’
5263callbacks. The package also includes a mechanism to use traitlets for
5264configuration, loading values from files or from command line arguments. This
5265is a distinct layer on top of traitlets, so you can use traitlets in your code
5266without using the configuration machinery.")
5267 (license license:bsd-3)))
5268
5269(define-public python2-traitlets
5270 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
5271 (package
5272 (inherit traitlets)
5273 (propagated-inputs
5274 `(("python2-enum34" ,python2-enum34)
5275 ,@(package-propagated-inputs traitlets))))))
5276
5277(define-public python-jupyter-core
5278 (package
5279 (name "python-jupyter-core")
5280 (version "4.4.0")
5281 (source
5282 (origin
5283 (method url-fetch)
5284 (uri (string-append (pypi-uri "jupyter_core" version)))
5285 (sha256
5286 (base32
5287 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
5288 (build-system python-build-system)
5289 ;; FIXME: not sure how to run the tests
5290 (arguments `(#:tests? #f))
5291 (propagated-inputs
5292 `(("python-traitlets" ,python-traitlets)))
5293 (home-page "http://jupyter.org/")
5294 (synopsis "Jupyter base package")
5295 (description
5296 "Jupyter core is the base package on which Jupyter projects rely.")
5297 (license license:bsd-3)))
5298
5299(define-public python2-jupyter-core
5300 (package-with-python2 python-jupyter-core))
5301
5302(define-public python-jupyter-client
5303 (package
5304 (name "python-jupyter-client")
5305 (version "5.2.4")
5306 (source
5307 (origin
5308 (method url-fetch)
5309 (uri (pypi-uri "jupyter_client" version))
5310 (sha256
5311 (base32
5312 "0l9mh7ccrpl3lppym3dnky8n1nk7xarzzdcxf4q2s7aw203cpydm"))))
5313 (build-system python-build-system)
5314 ;; Tests fail because of missing native python kernel which I assume is
5315 ;; provided by the ipython package, which we cannot use because it would
5316 ;; cause a dependency cycle.
ddc586ea
LC
5317 (arguments
5318 `(#:tests? #f
5319
5320 #:phases (modify-phases %standard-phases
5321 (add-after 'unpack 'set-tool-file-names
5322 (lambda* (#:key inputs #:allow-other-keys)
5323 (let ((iproute (assoc-ref inputs "iproute")))
5324 (substitute* "jupyter_client/localinterfaces.py"
5325 (("'ip'")
5326 (string-append "'" iproute "/sbin/ip'")))
5327 #t))))))
5328 (inputs
5329 `(("iproute" ,iproute)))
44d10b1f
RW
5330 (propagated-inputs
5331 `(("python-pyzmq" ,python-pyzmq)
5332 ("python-traitlets" ,python-traitlets)
5333 ("python-jupyter-core" ,python-jupyter-core)))
5334 (home-page "http://jupyter.org/")
5335 (synopsis "Jupyter protocol implementation and client libraries")
5336 (description
5337 "The @code{jupyter_client} package contains the reference implementation
5338of the Jupyter protocol. It also provides client and kernel management APIs
5339for working with kernels, and the @code{jupyter kernelspec} entrypoint for
5340installing @code{kernelspec}s for use with Jupyter frontends.")
5341 (license license:bsd-3)))
5342
5343(define-public python2-jupyter-client
5344 (package-with-python2 python-jupyter-client))
5345
5346(define-public python-ipykernel
5347 (package
5348 (name "python-ipykernel")
08d0a355 5349 (version "5.1.3")
44d10b1f
RW
5350 (source
5351 (origin
5352 (method url-fetch)
5353 (uri (pypi-uri "ipykernel" version))
5354 (sha256
08d0a355 5355 (base32 "1a08y677lpn80qzvv7z0smgggmr5m5ayf0bs6vds47xpxl9sss5k"))))
44d10b1f
RW
5356 (build-system python-build-system)
5357 (arguments
5358 `(#:phases
5359 (modify-phases %standard-phases
5360 (replace 'check
5361 (lambda _
5362 (setenv "HOME" "/tmp")
5363 (invoke "pytest" "-v")
aa856d02
LC
5364 #t))
5365 (add-after 'install 'set-python-file-name
5366 (lambda* (#:key outputs #:allow-other-keys)
5367 ;; Record the absolute file name of the 'python' executable in
5368 ;; 'kernel.json'.
5369 (let ((out (assoc-ref outputs "out")))
5370 (substitute* (string-append out "/share/jupyter"
5371 "/kernels/python3/kernel.json")
5372 (("\"python\"")
5373 (string-append "\"" (which "python") "\"")))
5374 #t))))))
44d10b1f
RW
5375 (propagated-inputs
5376 `(("python-ipython" ,python-ipython)
5377 ;; imported at runtime during connect
5378 ("python-jupyter-client" ,python-jupyter-client)))
5379 (native-inputs
08d0a355
TGR
5380 `(("python-flaky" ,python-flaky)
5381 ("python-nose" ,python-nose)
5382 ("python-pytest" ,python-pytest)))
44d10b1f
RW
5383 (home-page "https://ipython.org")
5384 (synopsis "IPython Kernel for Jupyter")
5385 (description
5386 "This package provides the IPython kernel for Jupyter.")
5387 (license license:bsd-3)))
5388
0f378947 5389;; Version 5.1.1 and above no longer support Python 2.
44d10b1f 5390(define-public python2-ipykernel
0f378947
RW
5391 (package
5392 (name "python2-ipykernel")
5393 (version "5.1.0")
5394 (source
5395 (origin
5396 (method url-fetch)
5397 (uri (pypi-uri "ipykernel" version))
5398 (sha256
5399 (base32 "0br95qhrd5k65g10djngiy27hs0642301hlf2q142i8djabvzh0g"))))
5400 (build-system python-build-system)
5401 (arguments
5402 `(#:python ,python-2
5403 #:phases
5404 (modify-phases %standard-phases
5405 (replace 'check
5406 (lambda _
5407 (setenv "HOME" "/tmp")
5408 (invoke "pytest" "-v")
5409 #t)))))
5410 (propagated-inputs
5411 `(("python2-ipython" ,python2-ipython)
5412 ;; imported at runtime during connect
5413 ("python2-jupyter-client" ,python2-jupyter-client)))
5414 (native-inputs
5415 `(("python2-pytest" ,python2-pytest)
5416 ("python2-nose" ,python2-nose)))
5417 (home-page "https://ipython.org")
5418 (synopsis "IPython Kernel for Jupyter")
5419 (description
5420 "This package provides the IPython kernel for Jupyter.")
5421 (license license:bsd-3)))
44d10b1f 5422
966aa714
AE
5423(define-public python-pari-jupyter
5424 (package
5425 (name "python-pari-jupyter")
5426 (version "1.3.2")
5427 (source
5428 (origin
5429 (method url-fetch)
5430 (uri (pypi-uri "pari_jupyter" version))
5431 (sha256
5432 (base32
5433 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
5434 (build-system python-build-system)
5435 (propagated-inputs
5436 `(("python-ipykernel" ,python-ipykernel)))
5437 (inputs
5438 `(("pari-gp" ,pari-gp)
5439 ("readline" ,readline)))
5440 (arguments
5441 `(#:tests? #f)) ; no test suite
5442 (home-page
5443 "https://github.com/jdemeyer/pari_jupyter")
5444 (synopsis "A Jupyter kernel for PARI/GP")
5445 (description "The package provides a PARI/GP kernel for Jupyter.")
5446 (license license:gpl3+)))
5447
dede052a
RW
5448(define-public python-backcall
5449 (package
5450 (name "python-backcall")
5451 (version "0.1.0")
5452 (source
5453 (origin
5454 (method url-fetch)
5455 (uri (pypi-uri "backcall" version))
5456 (sha256
5457 (base32
5458 "1r01dqch3f8fdj3n6fviw8hxqrs6w5v0qw4izmvqzry1w9dxiv1q"))))
5459 (build-system python-build-system)
5460 (home-page "https://github.com/takluyver/backcall/")
5461 (synopsis "Specifications for callback functions passed in to an API")
5462 (description
5463 "If your code lets other people supply callback functions, it's important
5464to specify the function signature you expect, and check that functions support
5465that. Adding extra parameters later would break other peoples code unless
5466you're careful. The @code{backcall} package provides a way of specifying the
5467callback signature using a prototype function.")
5468 (license license:bsd-3)))
5469
44d10b1f
RW
5470;; This is the latest release of the LTS version of ipython with support for
5471;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
8b5f756c
RW
5472;; dropped support for Python 2.7.
5473(define-public python2-ipython
44d10b1f 5474 (package
8b5f756c 5475 (name "python2-ipython")
44d10b1f
RW
5476 (version "5.8.0")
5477 (source
5478 (origin
5479 (method url-fetch)
5480 (uri (pypi-uri "ipython" version ".tar.gz"))
5481 (sha256
5482 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
5483 (build-system python-build-system)
44d10b1f 5484 (propagated-inputs
8b5f756c
RW
5485 `(("python2-backports-shutil-get-terminal-size"
5486 ,python2-backports-shutil-get-terminal-size)
5487 ("python2-pathlib2" ,python2-pathlib2)
5488 ("python2-pyzmq" ,python2-pyzmq)
5489 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
5490 ("python2-terminado" ,python2-terminado)
5491 ("python2-matplotlib" ,python2-matplotlib)
5492 ("python2-numpy" ,python2-numpy)
5493 ("python2-numpydoc" ,python2-numpydoc)
5494 ("python2-jinja2" ,python2-jinja2)
5495 ("python2-mistune" ,python2-mistune)
5496 ("python2-pexpect" ,python2-pexpect)
5497 ("python2-pickleshare" ,python2-pickleshare)
5498 ("python2-simplegeneric" ,python2-simplegeneric)
5499 ("python2-jsonschema" ,python2-jsonschema)
5500 ("python2-traitlets" ,python2-traitlets)
5501 ("python2-nbformat" ,python2-nbformat)
5502 ("python2-pygments" ,python2-pygments)))
5503 (inputs
5504 `(("readline" ,readline)
5505 ("which" ,which)))
5506 (native-inputs
5507 `(("graphviz" ,graphviz)
5508 ("pkg-config" ,pkg-config)
5509 ("python2-requests" ,python2-requests) ;; for tests
5510 ("python2-testpath" ,python2-testpath)
5511 ("python2-mock" ,python2-mock)
5512 ("python2-nose" ,python2-nose)))
5513 (arguments
5514 `(#:python ,python-2
5515 #:phases
5516 (modify-phases %standard-phases
5517 (add-before 'check 'delete-broken-tests
5518 (lambda* (#:key inputs #:allow-other-keys)
5519 ;; These tests throw errors for unknown reasons.
5520 (delete-file "IPython/core/tests/test_profile.py")
5521 (delete-file "IPython/core/tests/test_interactiveshell.py")
5522 (delete-file "IPython/core/tests/test_magic.py")
5523 #t)))))
5524 (home-page "https://ipython.org")
5525 (synopsis "IPython is a tool for interactive computing in Python")
5526 (description
5527 "IPython provides a rich architecture for interactive computing with:
5528Powerful interactive shells, a browser-based notebook, support for interactive
5529data visualization, embeddable interpreters and tools for parallel
5530computing.")
5531 (license license:bsd-3)))
5532
5533(define-public python-ipython
5534 (package
5535 (name "python-ipython")
ee515773 5536 (version "7.9.0")
8b5f756c
RW
5537 (source
5538 (origin
5539 (method url-fetch)
5540 (uri (pypi-uri "ipython" version ".tar.gz"))
5541 (sha256
ee515773 5542 (base32 "103jkw18z7fnwdal1mdbijjxi1fndzn31g887lmj7ddpf2r07lyz"))))
8b5f756c
RW
5543 (build-system python-build-system)
5544 (propagated-inputs
5545 `(("python-backcall" ,python-backcall)
5546 ("python-pyzmq" ,python-pyzmq)
5547 ("python-prompt-toolkit" ,python-prompt-toolkit)
44d10b1f
RW
5548 ("python-terminado" ,python-terminado)
5549 ("python-matplotlib" ,python-matplotlib)
5550 ("python-numpy" ,python-numpy)
5551 ("python-numpydoc" ,python-numpydoc)
8b5f756c 5552 ("python-jedi" ,python-jedi)
44d10b1f
RW
5553 ("python-jinja2" ,python-jinja2)
5554 ("python-mistune" ,python-mistune)
5555 ("python-pexpect" ,python-pexpect)
5556 ("python-pickleshare" ,python-pickleshare)
5557 ("python-simplegeneric" ,python-simplegeneric)
5558 ("python-jsonschema" ,python-jsonschema)
5559 ("python-traitlets" ,python-traitlets)
5560 ("python-nbformat" ,python-nbformat)
5561 ("python-pygments" ,python-pygments)))
5562 (inputs
5563 `(("readline" ,readline)
5564 ("which" ,which)))
5565 (native-inputs
5566 `(("graphviz" ,graphviz)
5567 ("pkg-config" ,pkg-config)
5568 ("python-requests" ,python-requests) ;; for tests
5569 ("python-testpath" ,python-testpath)
8b5f756c 5570 ("python-nose" ,python-nose)))
44d10b1f
RW
5571 (arguments
5572 `(#:phases
5573 (modify-phases %standard-phases
0f272518
RW
5574 (add-after 'unpack 'make-docs-reproducible
5575 (lambda _
5576 (substitute* "IPython/sphinxext/ipython_directive.py"
5577 ((".*import datetime") "")
5578 ((".*datetime.datetime.now\\(\\)") "")
5579 (("%timeit") "# %timeit"))
5580 #t))
44d10b1f
RW
5581 ;; Tests can only be run after the library has been installed and not
5582 ;; within the source directory.
5583 (delete 'check)
5584 (add-after 'install 'check
5585 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5586 (if tests?
5587 (begin
5588 ;; Make installed package available for running the tests
5589 (add-installed-pythonpath inputs outputs)
5590 (setenv "HOME" "/tmp/") ;; required by a test
5591 ;; We only test the core because one of the other tests
5592 ;; tries to import ipykernel.
5593 (invoke "python" "IPython/testing/iptest.py"
5594 "-v" "IPython/core/tests"))
5595 #t)))
5596 (add-before 'check 'fix-tests
5597 (lambda* (#:key inputs #:allow-other-keys)
5598 (substitute* "./IPython/utils/_process_posix.py"
5599 (("/usr/bin/env', 'which") (which "which")))
5600 (substitute* "./IPython/core/tests/test_inputtransformer.py"
5601 (("#!/usr/bin/env python")
5602 (string-append "#!" (which "python"))))
44d10b1f
RW
5603 ;; This test introduces a circular dependency on ipykernel
5604 ;; (which depends on ipython).
5605 (delete-file "IPython/core/tests/test_display.py")
8b5f756c 5606 ;; AttributeError: module 'IPython.core' has no attribute 'formatters'
44d10b1f 5607 (delete-file "IPython/core/tests/test_interactiveshell.py")
44d10b1f
RW
5608 #t)))))
5609 (home-page "https://ipython.org")
5610 (synopsis "IPython is a tool for interactive computing in Python")
5611 (description
5612 "IPython provides a rich architecture for interactive computing with:
5613Powerful interactive shells, a browser-based notebook, support for interactive
5614data visualization, embeddable interpreters and tools for parallel
5615computing.")
8b5f756c 5616 (license license:bsd-3)))
44d10b1f 5617
8b5f756c
RW
5618(define-public python-ipython-documentation
5619 (package
5620 (inherit python-ipython)
5621 (name "python-ipython-documentation")
5622 (version (package-version python-ipython))
5623 (arguments
5624 `(#:phases
5625 (modify-phases %standard-phases
5626 (delete 'build)
5627 (delete 'check)
5628 (replace 'install
5629 (lambda* (#:key outputs #:allow-other-keys)
5630 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
5631 (doc (string-append data "/doc/" ,name "-" ,version))
5632 (html (string-append doc "/html"))
5633 (man1 (string-append data "/man/man1"))
5634 (info (string-append data "/info"))
5635 (examples (string-append doc "/examples"))
5636 (python-arg (string-append "PYTHON=" (which "python"))))
5637 (setenv "LANG" "en_US.utf8")
5638 (with-directory-excursion "docs"
5639 ;; FIXME: pdf fails to build
5640 ;;(system* "make" "pdf" "PAPER=a4")
5641 (system* "make" python-arg "html")
5642 ;; FIXME: the generated texi file contains ^@^@, which trips
5643 ;; up the parser.
5644 ;; (system* "make" python-arg "info")
5645 )
5646 (copy-recursively "docs/man" man1)
5647 (copy-recursively "examples" examples)
5648 (copy-recursively "docs/build/html" html)
5649 ;; (copy-file "docs/build/latex/ipython.pdf"
5650 ;; (string-append doc "/ipython.pdf"))
5651 (mkdir-p info)
5652 ;; (copy-file "docs/build/texinfo/ipython.info"
5653 ;; (string-append info "/ipython.info"))
5654 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
5655 #t)))))
5656 (inputs
5657 `(("python-ipython" ,python-ipython)
5658 ("python-ipykernel" ,python-ipykernel)))
5659 (native-inputs
5660 `(("python-sphinx" ,python-sphinx)
5661 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
5662 ;; FIXME: It's possible that a smaller union would work just as well.
f75aa97f 5663 ("texlive" ,(texlive-union (list texlive-amsfonts
8b5f756c
RW
5664 texlive-fonts-ec
5665 texlive-generic-ifxetex
5666 texlive-generic-pdftex
8b5f756c
RW
5667 texlive-latex-capt-of
5668 texlive-latex-cmap
5669 texlive-latex-environ
5670 texlive-latex-eqparbox
5671 texlive-latex-etoolbox
5672 texlive-latex-expdlist
5673 texlive-latex-fancyhdr
5674 texlive-latex-fancyvrb
5675 texlive-latex-fncychap
5676 texlive-latex-float
5677 texlive-latex-framed
5678 texlive-latex-geometry
5679 texlive-latex-graphics
5680 texlive-latex-hyperref
5681 texlive-latex-mdwtools
5682 texlive-latex-multirow
5683 texlive-latex-needspace
5684 texlive-latex-oberdiek
5685 texlive-latex-parskip
5686 texlive-latex-preview
5687 texlive-latex-tabulary
5688 texlive-latex-threeparttable
5689 texlive-latex-titlesec
5690 texlive-latex-trimspaces
5691 texlive-latex-ucs
5692 texlive-latex-upquote
5693 texlive-latex-url
5694 texlive-latex-varwidth
5695 texlive-latex-wrapfig)))
5696 ("texinfo" ,texinfo)))))
44d10b1f
RW
5697
5698(define-public python-urwid
5699 (package
5700 (name "python-urwid")
5701 (version "2.0.1")
5702 (source
5703 (origin
5704 (method url-fetch)
5705 (uri (pypi-uri "urwid" version))
5706 (sha256
5707 (base32
5708 "1g6cpicybvbananpjikmjk8npmjk4xvak1wjzji62wc600wkwkb4"))))
5709 (build-system python-build-system)
5710 (home-page "http://urwid.org")
5711 (synopsis "Console user interface library for Python")
5712 (description
5713 "Urwid is a curses-based UI/widget library for Python. It includes many
5714features useful for text console applications.")
5715 (license license:lgpl2.1+)))
5716
5717(define-public python2-urwid
5718 (package-with-python2 python-urwid))
5719
5720(define-public python-urwidtrees
5721 (package
5722 (name "python-urwidtrees")
5723 (version "1.0.2")
5724 (source
5725 (origin
c8364072 5726 (method git-fetch)
44d10b1f
RW
5727 ;; package author intends on distributing via github rather than pypi:
5728 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
c8364072
EF
5729 (uri (git-reference
5730 (url "https://github.com/pazz/urwidtrees")
5731 (commit version)))
5732 (file-name (git-file-name name version))
44d10b1f
RW
5733 (sha256
5734 (base32
c8364072 5735 "1n1kpidvkdnsqyb82vlvk78gmly96kh8351lqxn2pzgwwns6fml2"))))
44d10b1f
RW
5736 (build-system python-build-system)
5737 (arguments
26bb7fc6
EF
5738 '(#:use-setuptools? #f
5739 #:tests? #f)) ; no tests
44d10b1f
RW
5740 (propagated-inputs `(("python-urwid" ,python-urwid)))
5741 (home-page "https://github.com/pazz/urwidtrees")
5742 (synopsis "Tree widgets for urwid")
5743 (description "Urwidtrees is a Widget Container API for the @code{urwid}
5744toolkit. Use it to build trees of widgets.")
5745 (license license:gpl3+)))
5746
5747(define-public python2-urwidtrees
5748 (package-with-python2 python-urwidtrees))
5749
5750(define-public python-ua-parser
5751 (package
5752 (name "python-ua-parser")
5753 (version "0.8.0")
5754 (source
5755 (origin
5756 (method url-fetch)
5757 (uri (pypi-uri "ua-parser" version))
5758 (sha256
5759 (base32
5760 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
5761 (build-system python-build-system)
5762 (arguments
5763 `(#:tests? #f)) ;no test suite in release
5764 (native-inputs
5765 `(("python-pyyaml" ,python-pyyaml)))
5766 (home-page "https://github.com/ua-parser/uap-python")
5767 (synopsis "User agent parser")
5768 (description
5769 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
5770 (license license:asl2.0)))
5771
5772(define-public python2-ua-parser
5773 (package-with-python2 python-ua-parser))
5774
5775(define-public python-user-agents
5776 (package
5777 (name "python-user-agents")
5778 (version "1.1.0")
5779 (source
5780 (origin
5781 (method url-fetch)
5782 (uri (pypi-uri "user-agents" version))
5783 (sha256
5784 (base32
5785 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
5786 (build-system python-build-system)
5787 (arguments
5788 `(#:tests? #f)) ;missing devices.json test file in release
5789 (propagated-inputs
5790 `(("python-ua-parser" ,python-ua-parser)))
5791 (home-page "https://github.com/selwin/python-user-agents")
5792 (synopsis "User Agent strings parsing library")
5793 (description
5794 "A library to identify devices (phones, tablets) and their capabilities by
5795parsing (browser/HTTP) user agent strings.")
5796 (license license:expat)))
5797
5798(define-public python2-user-agents
5799 (package-with-python2 python-user-agents))
5800
5801(define-public python-dbus
5802 (package
5803 (name "python-dbus")
ba5ef999 5804 (version "1.2.14")
44d10b1f
RW
5805 (source
5806 (origin
5807 (method url-fetch)
5808 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
5809 "dbus-python-" version ".tar.gz"))
5810 (sha256
ba5ef999 5811 (base32 "0cdchkgnivlka4lf8q4qfk0yxq483i3r3aqickjf8hfn7nx0c0mi"))))
44d10b1f 5812 (build-system gnu-build-system)
44d10b1f
RW
5813 (native-inputs
5814 `(("pkg-config" ,pkg-config)))
5815 (inputs
5816 `(("python" ,python-wrapper)
5817 ("dbus-glib" ,dbus-glib)))
5818 (synopsis "Python bindings for D-bus")
5819 (description "python-dbus provides bindings for libdbus, the reference
5820implementation of D-Bus.")
5821 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
5822 (license license:expat)))
5823
5824(define-public python2-dbus
5825 (package (inherit python-dbus)
5826 (name "python2-dbus")
5827 (inputs `(("python" ,python-2)
5828 ,@(alist-delete "python"
5829 (package-inputs python-dbus)
ba5ef999 5830 equal?)))))
44d10b1f 5831
fb236fdd
AG
5832(define-public python-notify2
5833 (package
5834 (name "python-notify2")
5835 (version "0.3.1")
5836 (source
5837 (origin
5838 (method url-fetch)
5839 (uri (pypi-uri "notify2" version))
5840 (sha256
5841 (base32
5842 "0z8rrv9rsg1r2qgh2dxj3dfj5xnki98kgi3w839kqby4a26i1yik"))))
5843 (build-system python-build-system)
5844 (arguments `(#:tests? #f)) ; tests depend on system state
5845 (native-inputs
5846 `(("python-dbus" ,python-dbus)))
5847 (home-page "https://bitbucket.org/takluyver/pynotify2")
5848 (synopsis "Python interface to D-Bus notifications")
5849 (description
5850 "Pynotify2 provides a Python interface for sending D-Bus notifications.
5851It is a reimplementation of pynotify in pure Python, and an alternative to
5852the GObject Introspection bindings to libnotify for non-GTK applications.")
5853 (license (list license:bsd-2
5854 license:lgpl2.1+))))
5855
5856(define-public python2-notify2
5857 (package-with-python2 python-notify2))
5858
44d10b1f
RW
5859;; beautifulsoup4 has a totally different namespace than 3.x,
5860;; and pypi seems to put it under its own name, so I guess we should too
5861(define-public python-beautifulsoup4
5862 (package
5863 (name "python-beautifulsoup4")
abb53e6f 5864 (version "4.7.1")
44d10b1f
RW
5865 (source
5866 (origin
5867 (method url-fetch)
5868 (uri (pypi-uri "beautifulsoup4" version))
5869 (sha256
5870 (base32
abb53e6f 5871 "0j2kycz2dxgx68xzjm7rxg5xn6v61gq5ifvxyg99slmqkybnal4l"))))
44d10b1f
RW
5872 (build-system python-build-system)
5873 (arguments
5874 `(#:phases
5875 (modify-phases %standard-phases
5876 ;; The Python 2 source is the definitive source of beautifulsoup4. We
5877 ;; must use this conversion script when building with Python 3. The
5878 ;; conversion script also runs the tests.
5879 ;; For more information, see the file 'convert-py3k' in the source
5880 ;; distribution.
5881 (replace 'check
dff0197e 5882 (lambda _ (invoke "./convert-py3k"))))))
f83e10e4 5883 (propagated-inputs
abb53e6f 5884 `(("python-soupsieve" ,python-soupsieve)))
44d10b1f
RW
5885 (home-page
5886 "https://www.crummy.com/software/BeautifulSoup/bs4/")
5887 (synopsis
5888 "Python screen-scraping library")
5889 (description
5890 "Beautiful Soup is a Python library designed for rapidly setting up
5891screen-scraping projects. It offers Pythonic idioms for navigating,
5892searching, and modifying a parse tree, providing a toolkit for
5893dissecting a document and extracting what you need. It automatically
5894converts incoming documents to Unicode and outgoing documents to UTF-8.")
5895 (license license:expat)
5896 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
5897
5898(define-public python2-beautifulsoup4
5899 (package
5900 (inherit (package-with-python2
5901 (strip-python2-variant python-beautifulsoup4)))
5902 (arguments `(#:python ,python-2))))
5903
ad74978a
BT
5904(define-public python-soupsieve
5905 (package
5906 (name "python-soupsieve")
3367df31 5907 (version "1.9.5")
ad74978a
BT
5908 (source
5909 (origin
5910 (method url-fetch)
5911 (uri (pypi-uri "soupsieve" version))
5912 (sha256
5913 (base32
3367df31 5914 "1nhd0q0ifwva9wn645s6pn74p1rd97asn3qfg75nphx1wkgcbhg2"))))
ad74978a
BT
5915 (build-system python-build-system)
5916 (arguments `(#:tests? #f))
5917 ;;XXX: 2 tests fail currently despite claming they were to be
5918 ;;skipped. Also, beautifulsoup4 may depend on this in the future, so we
5919 ;;don't want to create a circular dependency.
5920 (home-page "https://github.com/facelessuser/soupsieve")
5921 (synopsis "CSS selector library")
5922 (description
5923 "Soup Sieve is a CSS selector library designed to be used with Beautiful
5924Soup 4. It aims to provide selecting, matching, and filtering using modern
5925CSS selectors. Soup Sieve currently provides selectors from the CSS level 1
5926specifications up through the latest CSS level 4 drafts and beyond (though
5927some are not yet implemented).")
d00b83fb 5928 (properties `((python2-variant . ,(delay python2-soupsieve))))
ad74978a
BT
5929 (license license:expat)))
5930
5931(define-public python2-soupsieve
d00b83fb 5932 (let ((base (package-with-python2 (strip-python2-variant python-soupsieve))))
ad74978a
BT
5933 (package
5934 (inherit base)
5935 (propagated-inputs
d00b83fb
MB
5936 `(("python2-backports-functools-lru-cache"
5937 ,python2-backports-functools-lru-cache)
5938 ,@(package-propagated-inputs base))))))
ad74978a 5939
44d10b1f
RW
5940(define-public python-netifaces
5941 (package
5942 (name "python-netifaces")
5943 (version "0.10.7")
5944 (source
5945 (origin
5946 (method url-fetch)
5947 (uri (pypi-uri "netifaces" version))
5948 (sha256
5949 (base32
5950 "1gccklrcplbbqh81g1mdgpa5y8na7kkf29cq2ka3f5a2fp5hyndx"))))
5951 (build-system python-build-system)
5952 (home-page "https://github.com/al45tair/netifaces")
5953 (synopsis
5954 "Python module for portable network interface information")
5955 (description
5956 "Netifaces is a Python module providing information on network
5957interfaces in an easy and portable manner.")
5958 (license license:expat)))
5959
5960(define-public python2-netifaces
5961 (package-with-python2 python-netifaces))
5962
5963(define-public python-networkx
5964 (package
5965 (name "python-networkx")
5966 (version "2.2")
5967 (source
5968 (origin
5969 (method url-fetch)
5970 (uri (pypi-uri "networkx" version ".zip"))
5971 (sha256
5972 (base32 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
5973 (build-system python-build-system)
5974 ;; python-decorator is needed at runtime.
5975 (propagated-inputs
5976 `(("python-decorator" ,python-decorator)))
5977 (native-inputs
5978 `(("python-nose" ,python-nose)
5979 ("unzip" ,unzip)))
5980 (home-page "https://networkx.github.io/")
5981 (synopsis "Python module for creating and manipulating graphs and networks")
5982 (description
5983 "NetworkX is a Python package for the creation, manipulation, and study
5984of the structure, dynamics, and functions of complex networks.")
5985 (license license:bsd-3)))
5986
5987(define-public python2-networkx
5988 (package-with-python2 python-networkx))
5989
5990(define-public python-datrie
5991 (package
5992 (name "python-datrie")
0b58cb42 5993 (version "0.8")
44d10b1f
RW
5994 (source
5995 (origin
5996 (method url-fetch)
5997 (uri (pypi-uri "datrie" version))
5998 (sha256
5999 (base32
0b58cb42 6000 "0338r8xgmpy78556jhms0h6qkvyjr10p8bpgdvcpqzm9lrmxmmdx"))))
44d10b1f 6001 (build-system python-build-system)
44d10b1f
RW
6002 (native-inputs
6003 `(("python-cython" ,python-cython)
6004 ("python-hypothesis" ,python-hypothesis)
6005 ("python-pytest" ,python-pytest)
6006 ("python-pytest-runner" ,python-pytest-runner)))
6007 (home-page "https://github.com/kmike/datrie")
6008 (synopsis "Fast, efficiently stored trie for Python")
6009 (description
6010 "This package provides a fast, efficiently stored trie implementation for
6011Python.")
6012 (license license:lgpl2.1+)))
6013
6014(define-public snakemake
6015 (package
6016 (name "snakemake")
93803c6b 6017 (version "5.7.1")
44d10b1f
RW
6018 (source
6019 (origin
6020 (method url-fetch)
6021 (uri (pypi-uri "snakemake" version))
6022 (sha256
93803c6b 6023 (base32 "1pnpvvn8n2a78cg360wz3ldmpqrsm2wzi0c0dmvki9fnsw6fxdas"))))
44d10b1f
RW
6024 (build-system python-build-system)
6025 (arguments
6026 ;; TODO: Package missing test dependencies.
6027 '(#:tests? #f
6028 #:phases
6029 (modify-phases %standard-phases
6030 ;; For cluster execution Snakemake will call Python. Since there is
6031 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
6032 ;; this by calling the snakemake wrapper instead.
6033 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
6034 (lambda* (#:key outputs #:allow-other-keys)
6035 (substitute* "snakemake/executors.py"
6036 (("\\{sys.executable\\} -m snakemake")
6037 (string-append (assoc-ref outputs "out")
6038 "/bin/snakemake")))
6039 #t)))))
6040 (propagated-inputs
8994ae34 6041 `(("python-appdirs" ,python-appdirs)
44d10b1f
RW
6042 ("python-configargparse" ,python-configargparse)
6043 ("python-datrie" ,python-datrie)
6044 ("python-docutils" ,python-docutils)
8994ae34 6045 ("python-gitpython" ,python-gitpython)
44d10b1f
RW
6046 ("python-jinja2" ,python-jinja2)
6047 ("python-jsonschema" ,python-jsonschema)
6048 ("python-networkx" ,python-networkx)
93803c6b 6049 ("python-psutil" ,python-psutil)
44d10b1f 6050 ("python-pyyaml" ,python-pyyaml)
8994ae34
TGR
6051 ("python-ratelimiter" ,python-ratelimiter)
6052 ("python-requests" ,python-requests)
6053 ("python-wrapt" ,python-wrapt)))
44d10b1f
RW
6054 (home-page "https://snakemake.readthedocs.io")
6055 (synopsis "Python-based execution environment for make-like workflows")
6056 (description
6057 "Snakemake aims to reduce the complexity of creating workflows by
6058providing a clean and modern domain specific specification language (DSL) in
6059Python style, together with a fast and comfortable execution environment.")
6060 (license license:expat)))
6061
44d10b1f
RW
6062(define-public python-pyqrcode
6063 (package
6064 (name "python-pyqrcode")
6065 (version "1.2.1")
6066 (source
6067 (origin
6068 (method url-fetch)
6069 (uri (pypi-uri "PyQRCode" version))
6070 (sha256
6071 (base32
6072 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
6073 (build-system python-build-system)
6074 (home-page
6075 "https://github.com/mnooner256/pyqrcode")
6076 (synopsis "QR code generator")
6077 (description
6078 "Pyqrcode is a QR code generator written purely in Python with
6079SVG, EPS, PNG and terminal output.")
6080 (license license:bsd-3)))
6081
6082(define-public python-seaborn
6083 (package
6084 (name "python-seaborn")
6085 (version "0.9.0")
6086 (source
6087 (origin
6088 (method url-fetch)
6089 (uri (pypi-uri "seaborn" version))
6090 (sha256
f9bd82e7
RW
6091 (base32 "0bqysi3fxfjl1866m5jq8z7mynhqbqnikim74dmzn8539iwkzj3n"))
6092 (patches
6093 (list (origin
6094 (method url-fetch)
6095 ;; This has already been merged, but there is no new
6096 ;; release including this patch. It fixes problems
6097 ;; with axis rotation that would lead to test
6098 ;; failures.
6099 (uri "https://patch-diff.githubusercontent.com/raw/mwaskom/seaborn/pull/1716.diff")
6100 (sha256
6101 (base32
6102 "1lm870z316n9ivsyr86hpk1gxaraw0mrjvq42lqsm0znhjdp9q9w"))
6103 (file-name "seaborn-0.9.0-axis-rotation.patch"))))))
44d10b1f
RW
6104 (build-system python-build-system)
6105 (arguments
6106 `(#:phases
6107 (modify-phases %standard-phases
6108 (add-before 'check 'start-xserver
6109 (lambda* (#:key inputs #:allow-other-keys)
6110 (let ((xorg-server (assoc-ref inputs "xorg-server")))
6111 ;; There must be a running X server and make check doesn't
6112 ;; start one. Therefore we must do it.
6113 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
6114 (setenv "DISPLAY" ":1")
6115 #t)))
a1322765
RW
6116 (add-after 'unpack 'fix-tests
6117 (lambda _
6118 ;; test_cbar_ticks fails probably because of matplotlib's
6119 ;; expectation of using an older version of FreeType.
6120 (delete-file "seaborn/tests/test_matrix.py")
6121 #t))
44d10b1f
RW
6122 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
6123 (propagated-inputs
6124 `(("python-pandas" ,python-pandas)
6125 ("python-matplotlib" ,python-matplotlib)
6126 ("python-numpy" ,python-numpy)
6127 ("python-scipy" ,python-scipy)))
6128 (native-inputs
6129 `(("python-pytest" ,python-pytest)
ff337525 6130 ("xorg-server" ,xorg-server-for-tests)))
d3d73bd6 6131 (home-page "https://seaborn.pydata.org/")
44d10b1f
RW
6132 (synopsis "Statistical data visualization")
6133 (description
6134 "Seaborn is a library for making attractive and informative statistical
6135graphics in Python. It is built on top of matplotlib and tightly integrated
6136with the PyData stack, including support for numpy and pandas data structures
6137and statistical routines from scipy and statsmodels.")
6138 (license license:bsd-3)))
6139
6140(define-public python2-seaborn
6141 (package-with-python2 python-seaborn))
6142
6143(define-public python-mpmath
6144 (package
6145 (name "python-mpmath")
6146 (version "0.19")
6147 (source (origin
6148 (method url-fetch)
6149 (uri (string-append "http://mpmath.org/files/mpmath-"
6150 version ".tar.gz"))
6151 (sha256
6152 (base32
6153 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
6154 (build-system python-build-system)
6155 (arguments
6156 '(#:phases
6157 (modify-phases %standard-phases
6158 (replace 'check
6159 (lambda _
5d7a6f1c 6160 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
44d10b1f
RW
6161 (home-page "http://mpmath.org")
6162 (synopsis "Arbitrary-precision floating-point arithmetic in python")
6163 (description
6164 "@code{mpmath} can be used as an arbitrary-precision substitute for
6165Python's float/complex types and math/cmath modules, but also does much
6166more advanced mathematics.")
6167 (license license:bsd-3)))
6168
6169(define-public python2-mpmath
6170 (package-with-python2 python-mpmath))
6171
6172(define-public python-bigfloat
6173 (package
6174 (name "python-bigfloat")
6175 (version "0.3.0")
6176 (source
6177 (origin
6178 (method url-fetch)
6179 (uri (pypi-uri "bigfloat" version))
6180 (sha256
6181 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
6182 (build-system python-build-system)
6183 (inputs
6184 `(("mpfr" ,mpfr)))
6185 (home-page "https://github.com/mdickinson/bigfloat")
6186 (synopsis "Arbitrary precision floating-point arithmetic for Python")
6187 (description
e36de31b 6188 "This package provides a Python interface to the MPFR library for
44d10b1f
RW
6189multiprecision arithmetic.")
6190 (license license:lgpl3+)))
6191
6192(define-public python2-bigfloat
6193 (package-with-python2 python-bigfloat))
6194
6195(define-public python-sympy
6196 (package
6197 (name "python-sympy")
6198 (version "1.1.1")
6199 (source
6200 (origin
6201 (method url-fetch)
6202 (uri (string-append
6203 "https://github.com/sympy/sympy/releases/download/sympy-"
6204 version "/sympy-" version ".tar.gz"))
6205 (sha256
6206 (base32 "190n29sppw7g8ihilc5451y7jlfcaw56crqiqbf1jff43dlmfnxc"))))
6207 (build-system python-build-system)
6208 (arguments
6209 `(#:phases
6210 (modify-phases %standard-phases
6211 ;; Run the core tests after installation. By default it would run
6212 ;; *all* tests, which take a very long time to complete and are known
6213 ;; to be flaky.
6214 (delete 'check)
6215 (add-after 'install 'check
6216 (lambda* (#:key outputs #:allow-other-keys)
6217 (invoke "python3" "-c" "import sympy; sympy.test(\"/core\")")
6218 #t)))))
6219 (propagated-inputs
6220 `(("python-mpmath" ,python-mpmath)))
2f35985c 6221 (home-page "https://www.sympy.org/")
44d10b1f
RW
6222 (synopsis "Python library for symbolic mathematics")
6223 (description
6224 "SymPy is a Python library for symbolic mathematics. It aims to become a
6225full-featured computer algebra system (CAS) while keeping the code as simple
6226as possible in order to be comprehensible and easily extensible.")
6227 (license license:bsd-3)))
6228
6229(define-public python2-sympy
6230 (package
6231 (inherit (package-with-python2 python-sympy))
6232 (arguments
6233 `(#:phases
6234 (modify-phases %standard-phases
6235 ;; Run the core tests after installation. By default it would run
6236 ;; *all* tests, which take a very long time to complete and are known
6237 ;; to be flaky.
6238 (delete 'check)
6239 (add-after 'install 'check
6240 (lambda* (#:key outputs #:allow-other-keys)
6241 (invoke "python" "-c" "import sympy; sympy.test(\"/core\")")
6242 #t)))))))
6243
6244(define-public python-q
6245 (package
6246 (name "python-q")
6247 (version "2.6")
6248 (source
6249 (origin
6250 (method url-fetch)
6251 (uri (pypi-uri "q" version))
6252 (sha256
6253 (base32
6254 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
6255 (build-system python-build-system)
6256 (home-page "https://github.com/zestyping/q")
6257 (synopsis "Quick-and-dirty debugging output for tired programmers")
6258 (description
6259 "q is a Python module for \"print\" style of debugging Python code. It
6260provides convenient short API for print out of values, tracebacks, and
6261falling into the Python interpreter.")
6262 (license license:asl2.0)))
6263
6264(define-public python2-q
6265 (package-with-python2 python-q))
6266
6267(define-public python2-xlib
6268 (package
6269 (name "python2-xlib")
6270 (version "0.14")
6271 (source (origin
6272 (method url-fetch)
6273 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
6274 "/" version "/"
6275 "python-xlib-" version ".tar.gz"))
6276 (sha256
6277 (base32
6278 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
6279 (build-system python-build-system)
6280 (arguments
6281 `(#:python ,python-2 ;Python 2 only
6282 #:tests? #f)) ;no tests
6283 (home-page "http://python-xlib.sourceforge.net/")
6284 (synopsis "Python X11 client library")
6285 (description
6286 "The Python X Library is intended to be a fully functional X client
6287library for Python programs. It is useful to implement low-level X clients.
6288It is written entirely in Python.")
6289 (license license:gpl2+)))
6290
6291(define-public python-singledispatch
6292 (package
6293 (name "python-singledispatch")
6294 (version "3.4.0.3")
6295 (source
6296 (origin
6297 (method url-fetch)
6298 (uri (pypi-uri "singledispatch" version))
6299 (sha256
6300 (base32
6301 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
6302 (build-system python-build-system)
6303 (native-inputs
6304 `(("python-six" ,python-six))) ; required for conversion, not at run-time
6305 (home-page
8680eff3 6306 "https://docs.python.org/3/library/functools.html#functools.singledispatch")
44d10b1f
RW
6307 (synopsis "Backport of singledispatch feature from Python 3.4")
6308 (description
6309 "This library brings functools.singledispatch from Python 3.4 to Python
63102.6-3.3.")
6311 (license license:expat)))
6312
6313(define-public python2-singledispatch
6314 (package-with-python2 python-singledispatch))
6315
6316;; the python- version can be removed with python-3.5
6317(define-public python-backports-abc
6318 (package
6319 (name "python-backports-abc")
6320 (version "0.5")
6321 (source
6322 (origin
6323 (method url-fetch)
6324 (uri (pypi-uri "backports_abc" version))
6325 (sha256
6326 (base32
6327 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
6328 (build-system python-build-system)
6329 (home-page "https://github.com/cython/backports_abc")
6330 (synopsis "Backport of additions to the 'collections.abc' module")
6331 (description
6332 "Python-backports-abc provides a backport of additions to the
36a4366d 6333@code{collections.abc} module in Python-3.5.")
44d10b1f
RW
6334 (license license:psfl)))
6335
6336(define-public python2-backports-abc
6337 (package-with-python2 python-backports-abc))
6338
6339(define-public python-backports-csv
6340 (package
6341 (name "python-backports-csv")
6342 (version "1.0.5")
6343 (source
6344 (origin
6345 (method url-fetch)
6346 (uri (pypi-uri "backports.csv" version))
6347 (sha256
6348 (base32
6349 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
6350 (build-system python-build-system)
6351 (home-page "https://github.com/ryanhiebert/backports.csv")
6352 (synopsis "Backport of Python 3's csv module for Python 2")
6353 (description
6354 "Provides a backport of Python 3's @code{csv} module for parsing
6355comma separated values. The API of the @code{csv} module in Python 2
6356is drastically different from the @code{csv} module in Python 3.
6357This is due, for the most part, to the difference between str in
6358Python 2 and Python 3.")
6359 (license license:psfl)))
6360
6361(define-public python2-backports-csv
6362 (package-with-python2 python-backports-csv))
6363
6364(define-public python2-backports-shutil-get-terminal-size
6365 (package
6366 (name "python2-backports-shutil-get-terminal-size")
6367 (version "1.0.0")
6368 (source
6369 (origin
6370 (method url-fetch)
6371 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
6372 (sha256
6373 (base32
6374 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
6375 (build-system python-build-system)
6376 (arguments
6377 `(#:python ,python-2
6378 #:phases
6379 (modify-phases %standard-phases
6380 (replace 'check
6381 (lambda _
4a4a7d9a 6382 (invoke "py.test" "-v"))))))
44d10b1f
RW
6383 (native-inputs
6384 `(("python2-pytest" ,python2-pytest)))
6385 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
6386 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
6387 (description
6388 "This package provides a backport of the @code{get_terminal_size
6389function} from Python 3.3's @code{shutil}.
6390Unlike the original version it is written in pure Python rather than C,
6391so it might be a tiny bit slower.")
6392 (license license:expat)))
6393
6394(define-public python-waf
6395 (package
6396 (name "python-waf")
6c2c11fa 6397 (version "2.0.19")
44d10b1f
RW
6398 (source (origin
6399 (method url-fetch)
6400 (uri (string-append "https://waf.io/"
6401 "waf-" version ".tar.bz2"))
6402 (sha256
6403 (base32
6c2c11fa 6404 "19dvqbsvxz7ch03dh1v0znklrwxlz6yzddc3k9smzrrgny4jch6q"))))
44d10b1f
RW
6405 (build-system python-build-system)
6406 (arguments
6407 '(#:phases
6408 (modify-phases %standard-phases
6409 (replace 'build
6410 (lambda _
633c8b71
MO
6411 ;; XXX: Find a way to add all extra tools.
6412 (let ((tools '("gccdeps"
6413 "clang_compilation_database")))
6414 (invoke "python" "waf-light" "configure" "build"
6415 (string-append "--tools="
6416 (string-join tools ","))))))
44d10b1f
RW
6417 (replace 'check
6418 (lambda _
6419 (invoke "python" "waf" "--version")))
6420 (replace 'install
6421 (lambda* (#:key outputs #:allow-other-keys)
6422 (let ((out (assoc-ref outputs "out")))
6423 (install-file "waf" (string-append out "/bin")))
6424 #t))
6425 ;; waf breaks when it is wrapped.
6426 (delete 'wrap))))
6427 (home-page "https://waf.io/")
6428 (synopsis "Python-based build system")
6429 (description
6430 "Waf is a Python-based framework for configuring, compiling and installing
6431applications.")
6432 (license license:bsd-3)))
6433
6434(define-public python2-waf
6435 (package-with-python2 python-waf))
6436
6437(define-public python-pyzmq
6438 (package
6439 (name "python-pyzmq")
6440 (version "17.1.2")
6441 (source
6442 (origin
6443 (method url-fetch)
6444 (uri (pypi-uri "pyzmq" version))
6445 (sha256
6446 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
6447 (build-system python-build-system)
6448 (arguments
6449 `(#:configure-flags
6450 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
6451 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
6452 ;; --inplace' for 'python setup.py test' to work.
6453 #:tests? #f))
6454 (inputs
6455 `(("zeromq" ,zeromq)))
6456 (native-inputs
6457 `(("pkg-config" ,pkg-config)
6458 ("python-nose" ,python-nose)))
6459 (home-page "https://github.com/zeromq/pyzmq")
6460 (synopsis "Python bindings for 0MQ")
6461 (description
6462 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
6463 (license license:bsd-4)))
6464
6465(define-public python2-pyzmq
6466 (package-with-python2 python-pyzmq))
6467
6468(define-public python-pep8
6469 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
6470 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
6471 ;; some dependents' test suites, and nothing more.
6472 (package
6473 (name "python-pep8")
6474 (version "1.7.0")
6475 (source
6476 (origin
6477 (method url-fetch)
6478 (uri (pypi-uri "pep8" version))
6479 (sha256
6480 (base32
2be878d8
CB
6481 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))
6482 (patches (search-patches "python-pep8-stdlib-tokenize-compat.patch"))))
44d10b1f
RW
6483 (build-system python-build-system)
6484 (home-page "https://pep8.readthedocs.org/")
6485 (synopsis "Python style guide checker")
6486 (description
6487 "This tools checks Python code against some of the style conventions in
6488PEP 8.")
6489 (license license:expat)))
6490
6491(define-public python2-pep8
6492 (package-with-python2 python-pep8))
6493
6494(define-public python-pyflakes
6495 (package
6496 (name "python-pyflakes")
d0cba11b 6497 (version "2.1.1")
44d10b1f
RW
6498 (source
6499 (origin
6500 (method url-fetch)
6501 (uri (pypi-uri "pyflakes" version))
6502 (sha256
6503 (base32
d0cba11b 6504 "18pq95a1xj2dgdd0m85gyfsn40jajj4xc3lp8wfv7igqhrc86xnr"))))
44d10b1f
RW
6505 (build-system python-build-system)
6506 (home-page
6507 "https://github.com/pyflakes/pyflakes")
6508 (synopsis "Passive checker of Python programs")
6509 (description
6510 "Pyflakes statically checks Python source code for common errors.")
6511 (license license:expat)))
6512
6513(define-public python2-pyflakes
6514 (package-with-python2 python-pyflakes))
6515
6516(define-public python-mccabe
6517 (package
6518 (name "python-mccabe")
6519 (version "0.6.1")
6520 (source
6521 (origin
6522 (method url-fetch)
6523 (uri (pypi-uri "mccabe" version))
6524 (sha256
6525 (base32
6526 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
6527 (build-system python-build-system)
6528 (native-inputs
6529 `(("python-pytest" ,python-pytest-bootstrap)
6530 ("python-pytest-runner" ,python-pytest-runner)))
6531 (home-page "https://github.com/flintwork/mccabe")
6532 (synopsis "McCabe checker, plugin for flake8")
6533 (description
6534 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
6535complexity of Python source code.")
6536 (license license:expat)))
6537
6538(define-public python2-mccabe
6539 (package-with-python2 python-mccabe))
6540
6541(define-public python-mccabe-0.2.1
6542 (package (inherit python-mccabe)
6543 (version "0.2.1")
6544 (source
6545 (origin
6546 (method url-fetch)
6547 (uri (pypi-uri "mccabe" version))
6548 (sha256
6549 (base32
6550 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
6551
6552(define-public python2-mccabe-0.2.1
6553 (package-with-python2 python-mccabe-0.2.1))
6554
6555;; Flake8 2.4.1 requires an older version of pep8.
6556;; This should be removed ASAP.
6557(define-public python-pep8-1.5.7
6558 (package (inherit python-pep8)
6559 (version "1.5.7")
6560 (source
f3576970
RW
6561 (origin
6562 (method url-fetch)
6563 (uri (pypi-uri "pep8" version))
6564 (sha256
6565 (base32
6566 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
44d10b1f
RW
6567 (arguments
6568 ;; XXX Tests not compatible with Python 3.5.
6569 '(#:tests? #f))))
6570
6571(define-public python2-pep8-1.5.7
6572 (package-with-python2 python-pep8-1.5.7))
6573
6574;; Flake8 2.4.1 requires an older version of pyflakes.
6575;; This should be removed ASAP.
6576(define-public python-pyflakes-0.8.1
6577 (package (inherit python-pyflakes)
6578 (version "0.8.1")
6579 (source
8c4dffb5
RW
6580 (origin
6581 (method url-fetch)
6582 (uri (pypi-uri "pyflakes" version))
6583 (sha256
6584 (base32
6585 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
44d10b1f
RW
6586 (arguments
6587 ;; XXX Tests not compatible with Python 3.5.
6588 '(#:tests? #f))))
6589
6590(define-public python2-pyflakes-0.8.1
6591 (package-with-python2 python-pyflakes-0.8.1))
6592
ac63cf0a 6593(define-public python-flake8
44d10b1f
RW
6594 (package
6595 (name "python-flake8")
beaff4a8 6596 (version "3.7.7")
ac63cf0a
MB
6597 (source (origin
6598 (method url-fetch)
6599 (uri (pypi-uri "flake8" version))
6600 (sha256
6601 (base32
beaff4a8 6602 "0qg6zggqigrd4k3gv88shd1a27d0cwgfql8vfiq2c7rl7w3rd6c5"))))
44d10b1f
RW
6603 (build-system python-build-system)
6604 (arguments
6605 `(#:phases
6606 (modify-phases %standard-phases
44d10b1f
RW
6607 (delete 'check)
6608 (add-after 'install 'check
6609 (lambda* (#:key inputs outputs #:allow-other-keys)
6610 (add-installed-pythonpath inputs outputs)
6611 (invoke "pytest" "-v")
6612 #t)))))
6613 (propagated-inputs
6614 `(("python-pycodestyle" ,python-pycodestyle)
beaff4a8 6615 ("python-entrypoints" ,python-entrypoints)
44d10b1f
RW
6616 ("python-pyflakes" ,python-pyflakes)
6617 ("python-mccabe" ,python-mccabe)))
6618 (native-inputs
6619 `(("python-mock" ,python-mock)
6620 ("python-pytest" ,python-pytest-bootstrap)
6621 ("python-pytest-runner" ,python-pytest-runner)))
6622 (home-page "https://gitlab.com/pycqa/flake8")
6623 (synopsis
6624 "The modular source code checker: pep8, pyflakes and co")
6625 (description
6626 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
ac63cf0a 6627 (properties `((python2-variant . ,(delay python2-flake8))))
44d10b1f
RW
6628 (license license:expat)))
6629
ac63cf0a
MB
6630(define-public python2-flake8
6631 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
44d10b1f
RW
6632 (package (inherit base)
6633 (propagated-inputs
6634 `(("python2-configparser" ,python2-configparser)
6635 ("python2-enum34" ,python2-enum34)
beaff4a8 6636 ("python2-typing" ,python2-typing)
44d10b1f
RW
6637 ,@(package-propagated-inputs base))))))
6638
44d10b1f
RW
6639;; python-hacking requires flake8 <2.6.0.
6640(define-public python-flake8-2.5
6641 (package
6642 (inherit python-flake8)
6643 (version "2.5.5")
6644 (source (origin
6645 (method url-fetch)
6646 (uri (pypi-uri "flake8" version))
6647 (sha256
6648 (base32
6649 "1snylqwbmrylbx3r1wpz8ggk98f6bcag4441ag8mm2l7wyn58sij"))))
6650 (propagated-inputs
6651 `(("python-pep8" ,python-pep8)
6652 ,@(package-propagated-inputs python-flake8)))
6653 (properties `((python2-variant . ,(delay python2-flake8-2.5))))))
6654
6655(define-public python2-flake8-2.5
6656 (package
6657 (inherit python2-flake8)
6658 (version (package-version python-flake8-2.5))
6659 (source (origin
6660 (inherit (package-source python-flake8-2.5))))
6661 (propagated-inputs
6662 `(("python2-pep8" ,python2-pep8)
6663 ,@(package-propagated-inputs python2-flake8)))))
6664
6665(define-public python-flake8-polyfill
6666 (package
6667 (name "python-flake8-polyfill")
6668 (version "1.0.2")
6669 (source
6670 (origin
6671 (method url-fetch)
6672 (uri (pypi-uri "flake8-polyfill" version))
6673 (sha256
6674 (base32
6675 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
6676 (build-system python-build-system)
6677 (arguments
6678 '(#:phases
6679 (modify-phases %standard-phases
6680 (replace 'check
6681 (lambda _
40a7153d
MB
6682 ;; Be compatible with Pytest 4:
6683 ;; https://gitlab.com/pycqa/flake8-polyfill/merge_requests/7
6684 (substitute* "setup.cfg"
6685 (("\\[pytest\\]")
6686 "[tool:pytest]"))
6687
44d10b1f
RW
6688 (setenv "PYTHONPATH"
6689 (string-append (getcwd) "/build/lib:"
6690 (getenv "PYTHONPATH")))
4f0a0894 6691 (invoke "py.test" "-v"))))))
44d10b1f
RW
6692 (native-inputs
6693 `(("python-flake8" ,python-flake8)
6694 ("python-mock" ,python-mock)
6695 ("python-pep8" ,python-pep8)
6696 ("python-pycodestyle" ,python-pycodestyle)
6697 ("python-pytest" ,python-pytest)))
6698 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
6699 (synopsis "Polyfill package for Flake8 plugins")
6700 (description
6701 "This package that provides some compatibility helpers for Flake8
6702plugins that intend to support Flake8 2.x and 3.x simultaneously.")
6703 (license license:expat)))
6704
6705(define-public python2-flake8-polyfill
6706 (package-with-python2 python-flake8-polyfill))
6707
6708(define-public python-mistune
6709 (package
6710 (name "python-mistune")
6711 (version "0.8.4")
6712 (source
6713 (origin
6714 (method url-fetch)
6715 (uri (pypi-uri "mistune" version))
6716 (sha256
6717 (base32
6718 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
6719 (build-system python-build-system)
6720 (native-inputs
6721 `(("python-nose" ,python-nose)
6722 ("python-cython" ,python-cython)))
6723 (home-page "https://github.com/lepture/mistune")
6724 (synopsis "Markdown parser in pure Python")
6725 (description "This package provides a fast markdown parser in pure
6726Python.")
6727 (license license:bsd-3)))
6728
6729(define-public python2-mistune
6730 (package-with-python2 python-mistune))
6731
6732(define-public python-markdown
6733 (package
6734 (name "python-markdown")
0d1d0a6e 6735 (version "3.2.1")
44d10b1f
RW
6736 (source
6737 (origin
6738 (method url-fetch)
6739 (uri (pypi-uri "Markdown" version))
6740 (sha256
6741 (base32
0d1d0a6e 6742 "00k91gwhxnm8jdnm2v5xjz9irj6dbi7afywz2hpakqdbxs1ydzlh"))))
44d10b1f
RW
6743 (build-system python-build-system)
6744 (native-inputs
6745 `(("python-nose" ,python-nose)
6746 ("python-pyyaml" ,python-pyyaml)))
6747 (home-page "https://python-markdown.github.io/")
6748 (synopsis "Python implementation of Markdown")
6749 (description
6750 "This package provides a Python implementation of John Gruber's
6751Markdown. The library features international input, various Markdown
6752extensions, and several HTML output formats. A command line wrapper
6753markdown_py is also provided to convert Markdown files to HTML.")
2537ce68 6754 (properties `((python2-variant . ,(delay python2-markdown))))
44d10b1f
RW
6755 (license license:bsd-3)))
6756
2537ce68 6757;; Markdown 3.2 dropped support for Python 2.
44d10b1f 6758(define-public python2-markdown
2537ce68
MB
6759 (let ((base (package-with-python2 (strip-python2-variant python-markdown))))
6760 (package/inherit
6761 base
6762 (version "3.1.1")
6763 (source (origin
6764 (method url-fetch)
6765 (uri (pypi-uri "Markdown" version))
6766 (sha256
6767 (base32
6768 "0yhylk4ffqqs7x086fav4pnfsl1021v7lghznzkififprmmqfl1f")))))))
44d10b1f
RW
6769
6770(define-public python-ptyprocess
6771 (package
6772 (name "python-ptyprocess")
6773 (version "0.5.2")
6774 (source
6775 (origin
6776 (method url-fetch)
6777 (uri (pypi-uri "ptyprocess" version))
6778 (sha256
6779 (base32
6780 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
6781 (build-system python-build-system)
6782 (native-inputs
6783 `(("python-nose" ,python-nose)))
6784 (arguments
6785 `(#:phases
6786 (modify-phases %standard-phases
6787 (replace 'check
7904d6fa 6788 (lambda _ (invoke "nosetests"))))))
44d10b1f
RW
6789 (home-page "https://github.com/pexpect/ptyprocess")
6790 (synopsis "Run a subprocess in a pseudo terminal")
6791 (description
6792 "This package provides a Python library used to launch a subprocess in a
6793pseudo terminal (pty), and interact with both the process and its pty.")
6794 (license license:isc)))
6795
6796(define-public python2-ptyprocess
6797 (package-with-python2 python-ptyprocess))
6798
6799(define-public python-cram
6800 (package
6801 (name "python-cram")
6802 (version "0.7")
6803 (home-page "https://bitheap.org/cram/")
6804 (source (origin
6805 (method url-fetch)
6806 (uri (list (string-append home-page "cram-"
6807 version ".tar.gz")
6808 (pypi-uri "cram" version)))
6809 (sha256
6810 (base32
6811 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
6812 (arguments
6813 '(#:phases
6814 (modify-phases %standard-phases
6815 (add-after 'unpack 'patch-source
6816 (lambda _
6817 (substitute* (find-files "cram" ".*\\.py$")
6818 ;; Replace default shell path.
6819 (("/bin/sh") (which "sh")))
6820 (substitute* (find-files "tests" ".*\\.t$")
6821 (("md5") "md5sum")
6822 (("/bin/bash") (which "bash"))
6823 (("/bin/sh") (which "sh")))
6824 (substitute* "cram/_test.py"
6825 ;; This hack works around a bug triggered by substituting
6826 ;; the /bin/sh paths. "tests/usage.t" compares the output of
6827 ;; "cram -h", which breaks the output at 80 characters. This
6828 ;; causes the line showing the default shell to break into two
6829 ;; lines, but the test expects a single line...
6830 (("env\\['COLUMNS'\\] = '80'")
6831 "env['COLUMNS'] = '160'"))
ff1e80d7
MB
6832
6833 (substitute* "Makefile"
6834 ;; Recent versions of python-coverage have caused the test
6835 ;; coverage to decrease (as of version 0.7). Allow that.
6836 (("--fail-under=100")
6837 "--fail-under=90"))
6838
44d10b1f 6839 #t))
ff1e80d7 6840 (replace 'check
44d10b1f 6841 ;; The test phase uses the built library and executable.
44d10b1f
RW
6842 (lambda* (#:key inputs outputs #:allow-other-keys)
6843 (add-installed-pythonpath inputs outputs)
6844 (setenv "PATH" (string-append (getenv "PATH") ":"
6845 (assoc-ref outputs "out") "/bin"))
2d7db192 6846 (invoke "make" "test"))))))
44d10b1f
RW
6847 (build-system python-build-system)
6848 (native-inputs
6849 `(("python-coverage" ,python-coverage)
6850 ("which" ,which)))
6851 (synopsis "Simple testing framework for command line applications")
6852 (description
6853 "Cram is a functional testing framework for command line applications.
6854Cram tests look like snippets of interactive shell sessions. Cram runs each
6855command and compares the command output in the test with the command’s actual
6856output.")
6857 (license license:gpl2+)))
6858
6859(define-public python2-cram
6860 (package-with-python2 python-cram))
6861
6862(define-public python-straight-plugin
6863 (package
6864 (name "python-straight-plugin")
6865 (version "1.4.1")
6866 (source
6867 (origin
6868 (method url-fetch)
6869 (uri (pypi-uri "straight.plugin" version))
6870 (sha256
6871 (base32
6872 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
6873 (build-system python-build-system)
6874 (home-page "https://github.com/ironfroggy/straight.plugin")
6875 (synopsis "Simple namespaced plugin facility")
6876 (description "Straight Plugin provides a type of plugin you can create from
6877almost any existing Python modules, and an easy way for outside developers to
6878add functionality and customization to your projects with their own plugins.")
6879 (license license:expat)))
6880
6881(define-public python2-straight-plugin
6882 (package-with-python2 python-straight-plugin))
6883
6884(define-public python-fonttools
6885 (package
6886 (name "python-fonttools")
1a4bb420 6887 (version "3.38.0")
44d10b1f
RW
6888 (source (origin
6889 (method url-fetch)
6890 (uri (pypi-uri "fonttools" version ".zip"))
6891 (sha256
6892 (base32
1a4bb420 6893 "12ripk3s7skgxr1bs9r8n13r94ym3s8iir7ivfixls9fa4dabmlh"))))
44d10b1f
RW
6894 (build-system python-build-system)
6895 (native-inputs
6896 `(("unzip" ,unzip)
6897 ("python-pytest" ,python-pytest)
6898 ("python-pytest-runner" ,python-pytest-runner)))
9d25a454 6899 (home-page "https://github.com/fonttools/fonttools")
44d10b1f
RW
6900 (synopsis "Tools to manipulate font files")
6901 (description
6902 "FontTools/TTX is a library to manipulate font files from Python. It
6903supports reading and writing of TrueType/OpenType fonts, reading and writing
6904of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
6905also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
6906from an XML-based format.")
6907 (license license:expat)))
6908
6909(define-public python2-fonttools
6910 (package-with-python2 python-fonttools))
6911
6912(define-public python-ly
6913 (package
6914 (name "python-ly")
6915 (version "0.9.5")
6916 (source
6917 (origin
6918 (method url-fetch)
6919 (uri (pypi-uri name version))
6920 (sha256
6921 (base32
6922 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
6923 (build-system python-build-system)
6924 (arguments
6925 ;; FIXME: Some tests need network access.
6926 '(#:tests? #f))
6927 (synopsis "Tool and library for manipulating LilyPond files")
6928 (description "This package provides a Python library to parse, manipulate
6929or create documents in LilyPond format. A command line program ly is also
6930provided that can be used to do various manipulations with LilyPond files.")
6931 (home-page "https://pypi.python.org/pypi/python-ly")
6932 (license license:gpl2+)))
6933
6934(define-public python-appdirs
6935 (package
6936 (name "python-appdirs")
6937 (version "1.4.3")
6938 (source
6939 (origin
6940 (method url-fetch)
6941 (uri (pypi-uri "appdirs" version))
6942 (sha256
6943 (base32
6944 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
6945 (build-system python-build-system)
6946 (home-page "https://github.com/ActiveState/appdirs")
6947 (synopsis
6948 "Determine platform-specific dirs, e.g. a \"user data dir\"")
6949 (description
6950 "This module provides a portable way of finding out where user data
6951should be stored on various operating systems.")
6952 (license license:expat)))
6953
6954(define-public python2-appdirs
6955 (package-with-python2 python-appdirs))
6956
6957(define-public python-llfuse
6958 (package
6959 (name "python-llfuse")
6960 (version "1.3.5")
6961 (source (origin
6962 (method url-fetch)
6963 (uri (pypi-uri "llfuse" version ".tar.bz2"))
6964 (sha256
6965 (base32
6966 "1n7a90jww3ly49fm7x27m3xw3la3qfrnykcakga654g6kcyjlhbf"))))
6967 (build-system python-build-system)
6968 (inputs
6969 `(("fuse" ,fuse)
6970 ("attr" ,attr)))
6971 (native-inputs
6972 `(("pkg-config" ,pkg-config)))
6973 (synopsis "Python bindings for FUSE")
6974 (description
6975 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
6976 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
6977 (license license:lgpl2.0+)
6978 (properties `((python2-variant . ,(delay python2-llfuse))))))
6979
6980(define-public python2-llfuse
6981 (package (inherit (package-with-python2
6982 (strip-python2-variant python-llfuse)))
6983 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
6984
6985;; For attic-0.16
6986(define-public python-llfuse-0.41
6987 (package (inherit python-llfuse)
6988 (version "0.41.1")
6989 (source (origin
6990 (method url-fetch)
6991 (uri (string-append
6992 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6993 "llfuse-" version ".tar.bz2"))
6994 (sha256
6995 (base32
6996 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
6997 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
6998 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
6999 (license (list license:expat license:lgpl2.0+))))
7000
7001(define-public python-msgpack
7002 (package
7003 (name "python-msgpack")
7004 (version "0.5.6")
7005 (source (origin
7006 (method url-fetch)
7007 (uri (pypi-uri "msgpack" version))
7008 (sha256
7009 (base32
7010 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
7011 (build-system python-build-system)
7012 (arguments
7013 `(#:modules ((guix build utils)
7014 (guix build python-build-system)
7015 (ice-9 ftw)
7016 (srfi srfi-1)
7017 (srfi srfi-26))
7018 #:phases
7019 (modify-phases %standard-phases
7020 (replace 'check
7021 (lambda _
7022 (let ((cwd (getcwd)))
7023 (setenv "PYTHONPATH"
7024 (string-append cwd "/build/"
7025 (find (cut string-prefix? "lib" <>)
7026 (scandir (string-append cwd "/build")))
7027 ":"
7028 (getenv "PYTHONPATH")))
7029 (invoke "pytest" "-v" "test")))))))
7030 (native-inputs
7031 `(("python-pytest" ,python-pytest)))
7032 (synopsis "MessagePack (de)serializer")
7033 (description "MessagePack is a fast, compact binary serialization format,
7034suitable for similar data to JSON. This package provides CPython bindings for
7035reading and writing MessagePack data.")
7036 (home-page "https://pypi.python.org/pypi/msgpack/")
7037 (license license:asl2.0)))
7038
7039;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
7040;; release 0.5. Some packages like borg still call it by the old name for now.
7041;; <https://bugs.gnu.org/30662>
7042(define-public python-msgpack-transitional
7043 (package
7044 (inherit python-msgpack)
7045 (name "python-msgpack-transitional")
7046 (arguments
7047 (substitute-keyword-arguments (package-arguments python-msgpack)
7048 ((#:phases phases)
7049 `(modify-phases ,phases
7050 (add-after 'unpack 'configure-transitional
7051 (lambda _
7052 ;; Keep using the old name.
7053 (substitute* "setup.py"
7054 (("TRANSITIONAL = False")
7055 "TRANSITIONAL = 1"))
7056 #t))))))))
7057
7058(define-public python2-msgpack
7059 (package-with-python2 python-msgpack))
7060
7061(define-public python-netaddr
7062 (package
7063 (name "python-netaddr")
7064 (version "0.7.19")
7065 (source
7066 (origin
7067 (method url-fetch)
7068 (uri (pypi-uri "netaddr" version))
7069 (sha256
7070 (base32
7071 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
7072 (build-system python-build-system)
7073 (arguments `(#:tests? #f)) ;; No tests.
7074 (home-page "https://github.com/drkjam/netaddr/")
7075 (synopsis "Pythonic manipulation of network addresses")
7076 (description
7077 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
7078and MAC network addresses.")
7079 (license license:bsd-3)))
7080
7081(define-public python2-netaddr
7082 (package-with-python2 python-netaddr))
7083
dd85eca0
AG
7084(define-public python2-pyroute2
7085 (package
7086 (name "python2-pyroute2")
7087 (version "0.5.6")
7088 (source
7089 (origin
7090 (method url-fetch)
7091 (uri (pypi-uri "pyroute2" version))
7092 (sha256
7093 (base32
7094 "1gmz4r1w0yzj6fjjypnalmfyy0lnfznydyn62gi3wk50j5hhxbny"))))
7095 (build-system python-build-system)
7096 (arguments
7097 `(#:python ,python-2)) ;Python 3.x is not supported
7098 (home-page "https://github.com/svinota/pyroute2")
7099 (synopsis "Python netlink library")
7100 (description
7101 "Pyroute2 is a pure Python netlink library with minimal dependencies.
7102Supported netlink families and protocols include:
7103@itemize
7104@item rtnl, network settings - addresses, routes, traffic controls
7105@item nfnetlink - netfilter API: ipset, nftables, ...
7106@item ipq - simplest userspace packet filtering, iptables QUEUE target
7107@item devlink - manage and monitor devlink-enabled hardware
7108@item generic - generic netlink families
7109 @itemize
7110 @item nl80211 - wireless functions API (basic support)
7111 @item taskstats - extended process statistics
7112 @item acpi_events - ACPI events monitoring
7113 @item thermal_events - thermal events monitoring
7114 @item VFS_DQUOT - disk quota events monitoring
7115 @end itemize
7116@end itemize")
7117 (license license:gpl2+)))
7118
44d10b1f
RW
7119(define-public python-wrapt
7120 (package
7121 (name "python-wrapt")
2271a1dc 7122 (version "1.11.2")
44d10b1f 7123 (source
2271a1dc
MB
7124 (origin
7125 (method url-fetch)
7126 (uri (pypi-uri "wrapt" version))
7127 (sha256
7128 (base32
7129 "1q81762dgsgrd12f8qc39zk8s5wll3m5xc32jdmlf6cls4gh4njn"))))
44d10b1f
RW
7130 (build-system python-build-system)
7131 (arguments
7132 ;; Tests are not included in the tarball, they are only available in the
7133 ;; git repository.
7134 `(#:tests? #f))
7135 (home-page "https://github.com/GrahamDumpleton/wrapt")
7136 (synopsis "Module for decorators, wrappers and monkey patching")
7137 (description
2271a1dc 7138 "The aim of the wrapt module is to provide a transparent object proxy for
44d10b1f
RW
7139 Python, which can be used as the basis for the construction of function
7140 wrappers and decorator functions.")
7141 (license license:bsd-2)))
7142
7143(define-public python2-wrapt
7144 (package-with-python2 python-wrapt))
7145
7146(define-public python-xlrd
7147 (package
7148 (name "python-xlrd")
3a2b1a3c 7149 (version "1.2.0")
44d10b1f
RW
7150 (source (origin
7151 (method url-fetch)
7152 (uri (pypi-uri "xlrd" version))
7153 (sha256
7154 (base32
3a2b1a3c 7155 "1ci93fda4n67qhdvfl16zasyxrpygzk53hs6m8z0rd4dxrnb6vjl"))))
44d10b1f
RW
7156 (build-system python-build-system)
7157 (arguments
7158 `(#:phases
7159 (modify-phases %standard-phases
3ccdd3a5
MO
7160 ;; Some tests depend on writing a temporary file to the user's home
7161 ;; directory.
3a2b1a3c
GL
7162 (add-after 'unpack 'fix-tests
7163 (lambda _
7164 (delete-file "tests/test_open_workbook.py")
7165 #t)))))
44d10b1f
RW
7166 (home-page "http://www.python-excel.org/")
7167 (synopsis "Library for extracting data from Excel files")
a0909286 7168 (description "This package provides a library to extract data from
44d10b1f
RW
7169spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
7170@samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
7171Unicode-aware. It is not intended as an end-user tool.")
7172 (license license:bsd-3)))
7173
7174(define-public python2-xlrd
7175 (package-with-python2 python-xlrd))
7176
7177(define-public python-prettytable
7178 (package
7179 (name "python-prettytable")
7180 (version "0.7.2")
7181 (source
7182 (origin
7183 (method url-fetch)
337c3a1e 7184 (uri (pypi-uri "prettytable" version ".tar.bz2"))
44d10b1f
RW
7185 (sha256
7186 (base32
7187 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
7188 (build-system python-build-system)
8be58b48 7189 (home-page "https://code.google.com/archive/p/prettytable/")
44d10b1f
RW
7190 (synopsis "Display tabular data in an ASCII table format")
7191 (description
7192 "A library designed to represent tabular data in visually appealing ASCII
7193tables. PrettyTable allows for selection of which columns are to be printed,
7194independent alignment of columns (left or right justified or centred) and
7195printing of sub-tables by specifying a row range.")
7196 (license license:bsd-3)))
7197
7198(define-public python2-prettytable
7199 (package-with-python2 python-prettytable))
7200
7201(define-public python-tables
7202 (package
7203 (name "python-tables")
7204 (version "3.4.4")
7205 (source
7206 (origin
7207 (method url-fetch)
7208 (uri (pypi-uri "tables" version))
7209 (sha256
7210 (base32
7211 "0affz7k8babh8wdmsgrz5jxrd569by2w8ffimcxs9wiaf5rw1idx"))
7212 (modules '((guix build utils)))
7213 (snippet
7214 '(begin
7215 ;; Remove pre-compiled .pyc files from source.
7216 (for-each delete-file-recursively
7217 (find-files "." "__pycache__" #:directories? #t))
7218 (for-each delete-file (find-files "." "\\.pyc$"))
7219 #t))))
7220 (build-system python-build-system)
7221 (arguments
7222 `(;; FIXME: python-build-system does not pass configure-flags to "build"
7223 ;; or "check", so we must override the build and check phases.
7224 #:phases
7225 (modify-phases %standard-phases
7226 (add-after 'unpack 'use-gcc
7227 (lambda _
7228 (substitute* "setup.py"
7229 (("compiler = new_compiler\\(\\)" line)
7230 (string-append line
7231 "\ncompiler.set_executables(compiler='gcc',"
7232 "compiler_so='gcc',"
7233 "linker_exe='gcc',"
7234 "linker_so='gcc -shared')")))
7235 #t))
7236 (replace 'build
7237 (lambda* (#:key inputs #:allow-other-keys)
35d79d61
RW
7238 (invoke "python" "setup.py" "build"
7239 (string-append "--hdf5="
7240 (assoc-ref inputs "hdf5")))))
44d10b1f
RW
7241 (replace 'check
7242 (lambda* (#:key inputs #:allow-other-keys)
35d79d61
RW
7243 (invoke "python" "setup.py" "check"
7244 (string-append "--hdf5="
7245 (assoc-ref inputs "hdf5"))))))))
44d10b1f
RW
7246 (propagated-inputs
7247 `(("python-numexpr" ,python-numexpr)
7248 ("python-numpy" ,python-numpy)))
7249 (native-inputs
7250 `(("python-cython" ,python-cython)
7251 ("pkg-config" ,pkg-config)))
7252 (inputs
7253 `(("hdf5" ,hdf5)
7254 ("bzip2" ,bzip2)
7255 ("zlib" ,zlib)))
7256 (home-page "http://www.pytables.org/")
7257 (synopsis "Hierarchical datasets for Python")
7258 (description "PyTables is a package for managing hierarchical datasets and
7259designed to efficiently cope with extremely large amounts of data.")
7260 (license license:bsd-3)))
7261
7262(define-public python2-tables
7263 (package-with-python2 python-tables))
7264
7265(define-public python-pyasn1
7266 (package
7267 (name "python-pyasn1")
7268 (version "0.4.3")
7269 (source
7270 (origin
7271 (method url-fetch)
7272 (uri (pypi-uri "pyasn1" version))
7273 (sha256
7274 (base32
7275 "1z5h38anjzzrxpraa9iq9llffyx2zs8gx0q6dc1g029miwnn50gv"))))
7276 (build-system python-build-system)
7277 (home-page "http://pyasn1.sourceforge.net/")
7278 (synopsis "ASN.1 types and codecs")
7279 (description
7280 "This is an implementation of ASN.1 types and codecs in Python. It is
7281suitable for a wide range of protocols based on the ASN.1 specification.")
7282 (license license:bsd-2)))
7283
7284(define-public python2-pyasn1
7285 (package-with-python2 python-pyasn1))
7286
7287(define-public python-pyasn1-modules
7288 (package
7289 (name "python-pyasn1-modules")
7290 (version "0.2.2")
7291 (source
7292 (origin
7293 (method url-fetch)
7294 (uri (pypi-uri "pyasn1-modules" version))
7295 (sha256
7296 (base32
7297 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
7298 (build-system python-build-system)
7299 (propagated-inputs
7300 `(("python-pyasn1" ,python-pyasn1)))
7301 (home-page "https://sourceforge.net/projects/pyasn1/")
7302 (synopsis "ASN.1 codec implementations")
7303 (description
7304 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
7305implementations of ASN.1-based codecs and protocols.")
7306 (license license:bsd-3)))
7307
7308(define-public python2-pyasn1-modules
7309 (package-with-python2 python-pyasn1-modules))
7310
7311(define-public python-ipaddress
7312 (package
7313 (name "python-ipaddress")
7314 (version "1.0.22")
7315 (source (origin
7316 (method url-fetch)
7317 (uri (pypi-uri "ipaddress" version))
7318 (sha256
7319 (base32
7320 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
7321 (build-system python-build-system)
7322 (home-page "https://github.com/phihag/ipaddress")
7323 (synopsis "IP address manipulation library")
7324 (description
7325 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
7326 in Python. This library is used to create, poke at, and manipulate IPv4 and
7327 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
7328 module to older versions of Python.")
7329 (license license:psfl)))
7330
7331(define-public python2-ipaddress
7332 (package-with-python2 python-ipaddress))
7333
7334(define-public python2-ipaddr
7335 (package
7336 (name "python2-ipaddr")
7337 (version "2.1.11")
7338 (source
7339 (origin
7340 (method url-fetch)
7341 (uri (pypi-uri "ipaddr" version))
7342 (sha256
7343 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
7344 (build-system python-build-system)
7345 (arguments
7346 `(#:python ,python-2 ;version 2 only
7347 #:phases
7348 (modify-phases %standard-phases
7349 (replace 'check
40b8c4e3 7350 (lambda _ (invoke "python" "ipaddr_test.py"))))))
44d10b1f
RW
7351 (home-page "https://github.com/google/ipaddr-py")
7352 (synopsis "IP address manipulation library")
7353 (description
7354 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
7355IPv6 addresses and networks.
7356
7357For new implementations you may prefer to use the standard module
7358@code{ipaddress}, which was introduced in Python 3.3 and backported to older
7359versions of Python.")
7360 (license license:asl2.0)))
7361
7362(define-public python-idna
7363 (package
7364 (name "python-idna")
e95c9837 7365 (version "2.8")
44d10b1f
RW
7366 (source
7367 (origin
7368 (method url-fetch)
7369 (uri (pypi-uri "idna" version))
7370 (sha256
7371 (base32
e95c9837 7372 "01rlkigdxg17sf9yar1jl8n18ls59367wqh59hnawlyg53vb6my3"))))
44d10b1f
RW
7373 (build-system python-build-system)
7374 (home-page "https://github.com/kjd/idna")
7375 (synopsis "Internationalized domain names in applications")
7376 (description
7377 "This is a library to support the Internationalised Domain Names in
7378Applications (IDNA) protocol as specified in RFC 5891. This version of the
7379protocol is often referred to as “IDNA2008” and can produce different results
7380from the earlier standard from 2003. The library is also intended to act as a
7381suitable drop-in replacement for the “encodings.idna” module that comes with
7382the Python standard library but currently only supports the older 2003
7383specification.")
7384 (license license:bsd-4)))
7385
a76e6a69
JM
7386(define-public python-idna-2.7
7387 (package (inherit python-idna)
7388 (version "2.7")
7389 (source (origin
7390 (method url-fetch)
7391 (uri (pypi-uri "idna" version))
7392 (sha256
7393 (base32
7394 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))))
7395
7396
44d10b1f
RW
7397(define-public python2-idna
7398 (package-with-python2 python-idna))
7399
7400(define-public python-idna-ssl
7401 (package
7402 (name "python-idna-ssl")
7403 (version "1.0.1")
7404 (source
7405 (origin
7406 (method url-fetch)
7407 (uri (pypi-uri "idna-ssl" version))
7408 (sha256
7409 (base32
7410 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
7411 (build-system python-build-system)
7412 (arguments
7413 `(#:tests? #f)) ;circular dependency with python-aiohttp
7414 (home-page "https://github.com/aio-libs/idna-ssl")
7415 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
7416 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
7417domains support.")
7418 (license license:expat)))
7419
7420(define-public python-pretend
7421 (package
7422 (name "python-pretend")
7423 (version "1.0.9")
7424 (source
7425 (origin
7426 (method url-fetch)
9f1f22ee 7427 (uri (pypi-uri "pretend" version))
44d10b1f
RW
7428 (sha256
7429 (base32
7430 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
7431 (build-system python-build-system)
7432 (home-page "https://github.com/alex/pretend")
7433 (synopsis "Library for stubbing in Python")
7434 (description
7435 "Pretend is a library to make stubbing with Python easier. Stubbing is a
7436technique for writing tests. You may hear the term mixed up with mocks,
7437fakes, or doubles. Basically, a stub is an object that returns pre-canned
7438responses, rather than doing any computation.")
7439 (license license:bsd-3)))
7440
7441(define-public python2-pretend
7442 (package-with-python2 python-pretend))
7443
7444(define-public python-pip
7445 (package
7446 (name "python-pip")
0a193d32 7447 (version "20.0.2")
44d10b1f
RW
7448 (source
7449 (origin
7450 (method url-fetch)
7451 (uri (pypi-uri "pip" version))
7452 (sha256
7453 (base32
0a193d32 7454 "0zwnlsjn6mb742cr995zfbk9v56ygxp8w3k49601r9by9kmcic3x"))))
44d10b1f
RW
7455 (build-system python-build-system)
7456 (arguments
7457 '(#:tests? #f)) ; there are no tests in the pypi archive.
7458 (home-page "https://pip.pypa.io/")
7459 (synopsis "Package manager for Python software")
7460 (description
7461 "Pip is a package manager for Python software, that finds packages on the
7462Python Package Index (PyPI).")
7463 (license license:expat)))
7464
7465(define-public python2-pip
7466 (package-with-python2 python-pip))
7467
7468(define-public python-tlsh
7469 (package
7470 (name "python-tlsh")
7471 (version "3.4.5")
7472 (home-page "https://github.com/trendmicro/tlsh")
3e3ff8ad
TGR
7473 (source
7474 (origin
7475 (method git-fetch)
7476 (uri (git-reference
7477 (url "https://github.com/trendmicro/tlsh.git")
7478 (commit (string-append "v" version))))
7479 (file-name (git-file-name name version))
7480 (sha256
7481 (base32 "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll"))))
44d10b1f
RW
7482 (build-system cmake-build-system)
7483 (arguments
7484 '(#:out-of-source? #f
7485 #:phases (modify-phases %standard-phases
7486 (replace
7487 'install
7488 (lambda* (#:key outputs #:allow-other-keys)
7489 ;; Build and install the Python bindings. The underlying
7490 ;; C++ library is apparently not meant to be installed.
7491 (let ((out (assoc-ref outputs "out")))
7492 (with-directory-excursion "py_ext"
7493 (and (system* "python" "setup.py" "build")
7494 (system* "python" "setup.py" "install"
7495 (string-append "--prefix=" out))))))))))
7496 (inputs `(("python" ,python-wrapper))) ;for the bindings
7497 (synopsis "Fuzzy matching library for Python")
7498 (description
7499 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
7500Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
7501value which can be used for similarity comparisons. Similar objects have
7502similar hash values, which allows for the detection of similar objects by
7503comparing their hash values. The byte stream should have a sufficient amount
7504of complexity; for example, a byte stream of identical bytes will not generate
7505a hash value.")
7506 (license license:asl2.0)))
7507
7508(define-public python2-tlsh
7509 (package
7510 (inherit python-tlsh)
7511 (name "python2-tlsh")
7512 (inputs `(("python" ,python-2)))))
7513
7514(define-public python-termcolor
7515 (package
7516 (name "python-termcolor")
7517 (version "1.1.0")
7518 (source
7519 (origin
7520 (method url-fetch)
7521 (uri (pypi-uri "termcolor" version))
7522 (sha256
7523 (base32
7524 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
7525 (build-system python-build-system)
7526 (arguments
7527 ;; There are no tests.
7528 `(#:tests? #f))
7529 (home-page "https://pypi.python.org/pypi/termcolor")
7530 (synopsis "ANSII Color formatting for terminal output")
7531 (description
7532 "This package provides ANSII Color formatting for output in terminals.")
7533 (license license:expat)))
7534
7535(define-public python2-termcolor
7536 (package-with-python2 python-termcolor))
7537
7538(define-public python-libarchive-c
7539 (package
7540 (name "python-libarchive-c")
f2774824 7541 (version "2.9")
44d10b1f
RW
7542 (source (origin
7543 (method url-fetch)
7544 (uri (pypi-uri "libarchive-c" version))
7545 (sha256
7546 (base32
f2774824 7547 "0q7g6a97110bk0j5x81555kajyxh4sybaabab6v5sgr0xi6386cr"))))
44d10b1f
RW
7548 (build-system python-build-system)
7549 (arguments
7550 '(#:phases (modify-phases %standard-phases
7551 (add-before
7552 'build 'reference-libarchive
7553 (lambda* (#:key inputs #:allow-other-keys)
7554 ;; Retain the absolute file name of libarchive.so.
7555 (let ((libarchive (assoc-ref inputs "libarchive")))
7556 (substitute* "libarchive/ffi.py"
7557 (("find_library\\('archive'\\)")
7558 (string-append "'" libarchive
7559 "/lib/libarchive.so'"))))))
7560 (replace 'check
7561 (lambda _ (invoke "pytest" "-vv"))))))
7562 (native-inputs
7563 `(("python-mock" ,python-mock)
7564 ("python-pytest" ,python-pytest)))
7565 (inputs
7566 `(("libarchive" ,libarchive)))
7567 (home-page "https://github.com/Changaco/python-libarchive-c")
7568 (synopsis "Python interface to libarchive")
7569 (description
7570 "This package provides Python bindings to libarchive, a C library to
7571access possibly compressed archives in many different formats. It uses
7572Python's @code{ctypes} foreign function interface (FFI).")
7573 (license license:lgpl2.0+)))
7574
7575(define-public python2-libarchive-c
7576 (package-with-python2 python-libarchive-c))
7577
7578(define-public python-file
7579 (package
7580 (inherit file)
7581 (name "python-file")
7582 (build-system python-build-system)
7583 (arguments
7584 '(#:tests? #f ;no tests
7585 #:configure-flags '("--single-version-externally-managed" "--root=/")
7586 #:phases (modify-phases %standard-phases
7587 (add-before 'build 'change-directory
7588 (lambda _
7589 (chdir "python")
7590 #t))
7591 (add-before 'build 'set-library-file-name
7592 (lambda* (#:key inputs #:allow-other-keys)
7593 (let ((file (assoc-ref inputs "file")))
7594 (substitute* "magic.py"
7595 (("find_library\\('magic'\\)")
7596 (string-append "'" file "/lib/libmagic.so'")))
7597 #t))))))
7598 (inputs `(("file" ,file)))
528ea990
LC
7599 (native-inputs (if (%current-target-system)
7600 `(("self" ,this-package))
7601 '()))
44d10b1f
RW
7602 (synopsis "Python bindings to the libmagic file type guesser. Note that
7603this module and the python-magic module both provide a \"magic.py\" file;
7604these two modules, which are different and were developed separately, both
7605serve the same purpose: provide Python bindings for libmagic.")))
7606
7607(define-public python2-file
7608 (package-with-python2 python-file))
7609
7610(define-public python-debian
7611 (package
7612 (name "python-debian")
7613 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
9f74bd31 7614 (version "0.1.36")
44d10b1f
RW
7615 (source
7616 (origin
9f74bd31
VC
7617 ;; Use git-fetch, as pypi doesn't include test suite.
7618 (method git-fetch)
7619 (uri (git-reference
7620 (url home-page)
7621 (commit version)))
7622 (file-name (git-file-name name version))
44d10b1f
RW
7623 (sha256
7624 (base32
9f74bd31 7625 "0qy6x28bj6yfikhjww932v5xq4mf5bm1iczl7acy4c7zm6mwhqfa"))))
44d10b1f 7626 (build-system python-build-system)
9f74bd31
VC
7627 (arguments
7628 `(#:phases (modify-phases %standard-phases
7629 (add-after 'unpack 'remove-debian-specific-tests
7630 ;; python-apt, apt and dpkg are not yet available in guix,
7631 ;; and these tests heavily depend on them.
7632 (lambda _
7633 (delete-file "lib/debian/tests/test_deb822.py")
7634 (delete-file "lib/debian/tests/test_debfile.py")
7635 #t)))))
44d10b1f 7636 (propagated-inputs
9f74bd31
VC
7637 `(("python-six" ,python-six)
7638 ("python-chardet" ,python-chardet)))
44d10b1f
RW
7639 (synopsis "Debian package related modules")
7640 (description
7641 ;; XXX: Use @enumerate instead of @itemize to work around
7642 ;; <http://bugs.gnu.org/21772>.
7643 "This package provides Python modules that abstract many formats of
7644Debian-related files, such as:
7645
7646@enumerate
7647@item Debtags information;
7648@item @file{debian/changelog} files;
7649@item packages files, pdiffs;
7650@item control files of single or multiple RFC822-style paragraphs---e.g.
7651 @file{debian/control}, @file{.changes}, @file{.dsc};
7652@item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
7653 contained files and meta-information.
7654@end enumerate\n")
7655
7656 ;; Modules are either GPLv2+ or GPLv3+.
7657 (license license:gpl3+)))
7658
44d10b1f
RW
7659(define-public python-nbformat
7660 (package
7661 (name "python-nbformat")
7662 (version "4.4.0")
7663 (source
7664 (origin
7665 (method url-fetch)
7666 (uri (pypi-uri "nbformat" version))
7667 (sha256
7668 (base32
7669 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
7670 (build-system python-build-system)
7671 (arguments `(#:tests? #f)) ; no test target
7672 (propagated-inputs
7673 `(("python-ipython-genutils" ,python-ipython-genutils)
7674 ("python-jsonschema" ,python-jsonschema)
7675 ("python-jupyter-core" ,python-jupyter-core)
7676 ("python-traitlets" ,python-traitlets)))
7677 (home-page "http://jupyter.org")
7678 (synopsis "Jupyter Notebook format")
7679 (description "This package provides the reference implementation of the
7680Jupyter Notebook format and Python APIs for working with notebooks.")
7681 (license license:bsd-3)))
7682
7683(define-public python2-nbformat
7684 (package-with-python2 python-nbformat))
7685
7686(define-public python-bleach
7687 (package
7688 (name "python-bleach")
e6daf515 7689 (version "3.1.1")
44d10b1f
RW
7690 (source
7691 (origin
7692 (method url-fetch)
7693 (uri (pypi-uri "bleach" version))
7694 (sha256
7695 (base32
e6daf515 7696 "0j4xlnw99m1xy0s7wxz9fk5f3c1n8r296fh75jn5p5j61w6qg2xa"))))
44d10b1f
RW
7697 (build-system python-build-system)
7698 (propagated-inputs
ff0efc8f 7699 `(("python-webencodings" ,python-webencodings)
44d10b1f
RW
7700 ("python-six" ,python-six)))
7701 (native-inputs
ff0efc8f
MB
7702 `(("python-pytest" ,python-pytest)
7703 ("python-pytest-runner" ,python-pytest-runner-2)))
44d10b1f
RW
7704 (home-page "https://github.com/jsocol/bleach")
7705 (synopsis "Whitelist-based HTML-sanitizing tool")
7706 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
7707 (license license:asl2.0)))
7708
7709(define-public python2-bleach
7710 (package-with-python2 python-bleach))
7711
7712(define-public python-entrypoints
7713 (package
7714 (name "python-entrypoints")
a7f1b718 7715 (version "0.3")
44d10b1f
RW
7716 (source
7717 (origin
7718 (method url-fetch)
a7f1b718 7719 (uri (pypi-uri "entrypoints" version))
44d10b1f
RW
7720 (sha256
7721 (base32
a7f1b718 7722 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
44d10b1f
RW
7723 (build-system python-build-system)
7724 ;; The package does not come with a setup.py file, so we have to generate
7725 ;; one ourselves.
7726 (arguments
7727 `(#:tests? #f
7728 #:phases
7729 (modify-phases %standard-phases
7730 (add-after 'unpack 'create-setup.py
7731 (lambda _
7732 (call-with-output-file "setup.py"
7733 (lambda (port)
7734 (format port "\
7735from setuptools import setup
7736setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
7737" ,version))))))))
7738 (home-page "https://github.com/takluyver/entrypoints")
7739 (synopsis "Discover and load entry points from installed Python packages")
7740 (description "Entry points are a way for Python packages to advertise
7741objects with some common interface. The most common examples are
7742@code{console_scripts} entry points, which define shell commands by
7743identifying a Python function to run. The @code{entrypoints} module contains
7744functions to find and load entry points.")
7745 (license license:expat)))
7746
7747(define-public python2-entrypoints
7748 (package-with-python2 python-entrypoints))
7749
7750(define-public python-nbconvert
7751 (package
7752 (name "python-nbconvert")
7753 (version "5.0.0b1")
7754 (source
7755 (origin
7756 (method url-fetch)
7757 (uri (pypi-uri "nbconvert" version))
7758 (sha256
7759 (base32
7760 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
7761 (build-system python-build-system)
7762 (arguments
7763 `(;; The "bdist_egg" target is disabled by default, causing the installation
7764 ;; to fail.
7765 #:configure-flags (list "bdist_egg")
7766 ;; FIXME: 5 failures, 40 errors.
7767 #:tests? #f))
7768 ;; #:phases
7769 ;; (modify-phases %standard-phases
7770 ;; (replace 'check
7771 ;; (lambda _
7772 ;; (zero? (system* "py.test" "-v")))))
7773 (native-inputs
7774 `(("python-pytest" ,python-pytest)))
7775 (propagated-inputs
7776 `(("python-bleach" ,python-bleach)
7777 ("python-entrypoints" ,python-entrypoints)
7778 ("python-jinja2" ,python-jinja2)
7779 ("python-jupyter-core" ,python-jupyter-core)
7780 ("python-mistune" ,python-mistune)
7781 ("python-nbformat" ,python-nbformat)
7782 ("python-pygments" ,python-pygments)
7783 ("python-traitlets" ,python-traitlets)))
7784 (home-page "http://jupyter.org")
7785 (synopsis "Converting Jupyter Notebooks")
7786 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
7787notebooks to various other formats via Jinja templates. It allows you to
7788convert an @code{.ipynb} notebook file into various static formats including:
7789
7790@enumerate
7791@item HTML
7792@item LaTeX
7793@item PDF
7794@item Reveal JS
7795@item Markdown (md)
7796@item ReStructured Text (rst)
7797@item executable script
7798@end enumerate\n")
7799 (license license:bsd-3)))
7800
7801(define-public python2-nbconvert
7802 (package-with-python2 python-nbconvert))
7803
44d10b1f
RW
7804(define-public python-notebook
7805 (package
7806 (name "python-notebook")
7807 (version "5.7.4")
7808 (source (origin
7809 (method url-fetch)
7810 (uri (pypi-uri "notebook" version))
7811 (sha256
7812 (base32
7813 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
7814 (build-system python-build-system)
7815 (arguments
7816 `(#:phases
7817 (modify-phases %standard-phases
7818 (replace 'check
7819 (lambda _
7820 ;; These tests require a browser
7821 (delete-file-recursively "notebook/tests/selenium")
7822 ;; Some tests need HOME
7823 (setenv "HOME" "/tmp")
7824 ;; This file contains "warningfilters", which are not supported
7825 ;; by this version of nose.
7826 (delete-file "setup.cfg")
7827 (with-directory-excursion "/tmp"
7828 (invoke "nosetests" "-v"))
7829 #t)))))
7830 (propagated-inputs
7831 `(("python-jupyter-core" ,python-jupyter-core)
7832 ("python-nbformat" ,python-nbformat)
7833 ("python-nbconvert" ,python-nbconvert)
7834 ("python-prometheus-client" ,python-prometheus-client)
7835 ("python-send2trash" ,python-send2trash)
7836 ("python-terminado" ,python-terminado)))
7837 (native-inputs
7838 `(("python-nose" ,python-nose)
7839 ("python-sphinx" ,python-sphinx)
7840 ("python-requests" ,python-requests)))
7841 (home-page "http://jupyter.org/")
7842 (synopsis "Web-based notebook environment for interactive computing")
7843 (description
7844 "The Jupyter HTML notebook is a web-based notebook environment for
7845interactive computing.")
7846 (properties `((python2-variant . ,(delay python2-notebook))))
7847 (license license:bsd-3)))
7848
7849(define-public python2-notebook
7850 (let ((base (package-with-python2
7851 (strip-python2-variant python-notebook))))
7852 (package (inherit base)
7853 (native-inputs
7854 `(("python2-mock" ,python2-mock)
7855 ,@(package-native-inputs base)))
7856 (arguments
7857 (substitute-keyword-arguments (package-arguments base)
7858 ((#:phases phases)
7859 `(modify-phases ,phases
7860 (add-before 'check 'disable-test-case
7861 ;; The test requires network access to localhost. Curiously it
7862 ;; fails with Python 2 only. Simply make the test-case return
7863 ;; immediately.
7864 (lambda _
7865 (substitute*
7866 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
7867 (("formats = self.nbconvert_api") "return #")))))))))))
7868
7869(define-public python-widgetsnbextension
7870 (package
7871 (name "python-widgetsnbextension")
7872 (version "3.4.2")
7873 (source
7874 (origin
7875 (method url-fetch)
7876 (uri (pypi-uri "widgetsnbextension" version))
7877 (sha256
7878 (base32
7879 "0rc2nivdy7k4m3vljx7wdh2jh11djapcgwhvzlbs0isl8gl8nqgs"))))
7880 (build-system python-build-system)
7881 (propagated-inputs
7882 `(("python-ipykernel" ,python-ipykernel)
7883 ("python-notebook" ,python-notebook)))
7884 (native-inputs
7885 `(("python-certifi" ,python-certifi)
7886 ("python-nose" ,python-nose)))
7887 (home-page "https://ipython.org")
7888 (synopsis "IPython HTML widgets for Jupyter")
7889 (description "This package provides interactive HTML widgets for Jupyter
7890notebooks.")
7891 (license license:bsd-3)))
7892
7893(define-public python2-widgetsnbextension
7894 (package-with-python2 python-widgetsnbextension))
7895
7896(define-public python-ipywidgets
7897 (package
7898 (name "python-ipywidgets")
7899 (version "5.2.2")
7900 (source
7901 (origin
7902 (method url-fetch)
7903 (uri (pypi-uri "ipywidgets" version))
7904 (sha256
7905 (base32
7906 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
7907 (build-system python-build-system)
7908 (propagated-inputs
7909 `(("python-ipython" ,python-ipython)
7910 ("python-traitlets" ,python-traitlets)
7911 ("python-widgetsnbextension" ,python-widgetsnbextension)))
7912 (native-inputs
7913 `(("python-nose" ,python-nose)
7914 ("python-pytest" ,python-pytest)))
7915 (home-page "https://ipython.org")
7916 (synopsis "IPython HTML widgets for Jupyter")
7917 (description "Ipywidgets are interactive HTML widgets for Jupyter
7918notebooks and the IPython kernel. Notebooks come alive when interactive
7919widgets are used. Users gain control of their data and can visualize changes
7920in the data.")
7921 (license license:bsd-3)))
7922
7923(define-public python2-ipywidgets
7924 (package-with-python2 python-ipywidgets))
7925
7926(define-public python-jupyter-console
7927 (package
7928 (name "python-jupyter-console")
becb9cbf 7929 (version "6.0.0")
44d10b1f
RW
7930 (source
7931 (origin
7932 (method url-fetch)
7933 (uri (pypi-uri "jupyter_console" version))
7934 (sha256
7935 (base32
becb9cbf 7936 "1xdjw11cppf1fxvwkw2bk13ckkwas3bdah8baingn9296mvfi31h"))))
44d10b1f 7937 (build-system python-build-system)
44d10b1f
RW
7938 (propagated-inputs
7939 `(("python-ipykernel" ,python-ipykernel)
7940 ("python-jupyter-client" ,python-jupyter-client)
becb9cbf 7941 ("python-prompt-toolkit" ,python-prompt-toolkit)
44d10b1f
RW
7942 ("python-pygments" ,python-pygments)))
7943 (native-inputs
7944 `(("python-nose" ,python-nose)))
7945 (home-page "https://jupyter.org")
7946 (synopsis "Jupyter terminal console")
7947 (description "This package provides a terminal-based console frontend for
7948Jupyter kernels. It also allows for console-based interaction with non-Python
7949Jupyter kernels such as IJulia and IRKernel.")
7950 (license license:bsd-3)))
7951
7952(define-public python2-jupyter-console
8e590c81
RW
7953 (package
7954 (name "python2-jupyter-console")
7955 (version "5.2.0")
7956 (source
7957 (origin
7958 (method url-fetch)
7959 (uri (pypi-uri "jupyter_console" version))
7960 (sha256
7961 (base32
7962 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
7963 (build-system python-build-system)
7964 ;; Tests only run in an TTY.
7965 (arguments `(#:tests? #f))
7966 (propagated-inputs
7967 `(("python2-ipykernel" ,python2-ipykernel)
7968 ("python2-jupyter-client" ,python2-jupyter-client)
7969 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
7970 ("python2-pygments" ,python2-pygments)))
7971 (native-inputs
7972 `(("python2-nose" ,python2-nose)))
7973 (home-page "https://jupyter.org")
7974 (synopsis "Jupyter terminal console")
7975 (description "This package provides a terminal-based console frontend for
7976Jupyter kernels. It also allows for console-based interaction with non-Python
7977Jupyter kernels such as IJulia and IRKernel.")
7978 (license license:bsd-3)))
44d10b1f
RW
7979
7980;; The python-ipython and python-jupyter-console require each other. To get
7981;; the functionality in both packages working, strip down the
7982;; python-jupyter-console package when using it as an input to python-ipython.
7983(define python-jupyter-console-minimal
7984 (package
7985 (inherit python-jupyter-console)
7986 (name "python-jupyter-console-minimal")
7987 (arguments
7988 (substitute-keyword-arguments
7989 (package-arguments python-jupyter-console)
7990 ((#:phases phases)
7991 `(modify-phases ,phases
7992 (add-after 'install 'delete-bin
7993 (lambda* (#:key outputs #:allow-other-keys)
7994 ;; Delete the bin files, to avoid conflicts in profiles
7995 ;; where python-ipython and python-jupyter-console are
7996 ;; both present.
7997 (delete-file-recursively
7998 (string-append
7999 (assoc-ref outputs "out") "/bin"))))))))
8000 ;; Remove the python-ipython propagated input, to avoid the cycle
8001 (propagated-inputs
8002 (alist-delete
8003 "python-ipython"
8004 (package-propagated-inputs python-jupyter-console)))))
8005
8006(define-public python-qtconsole
8007 (package
8008 (name "python-qtconsole")
8009 (version "4.4.3")
8010 (source
8011 (origin
8012 (method url-fetch)
8013 (uri (pypi-uri "qtconsole" version))
8014 (sha256
8015 (base32
8016 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
8017 (build-system python-build-system)
8018 (arguments
8019 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
8020 ;; but we only have the LTS version 5.x. This means that there might be
8021 ;; runtime errors, but since this is a dependency of the Jupyter package,
8022 ;; and Jupyter can be used without the qtconsole we can overlook this for
8023 ;; now.
8024 `(#:tests? #f
8025 #:phases
8026 (modify-phases %standard-phases
8027 (add-before 'check 'pre-check
8028 (lambda _
8029 (setenv "QT_QPA_PLATFORM" "offscreen")
8030 #t)))))
8031 (propagated-inputs
8032 `(("python-ipykernel" ,python-ipykernel)
8033 ("python-ipython" ,python-ipython)))
8034 (native-inputs
8035 `(("python-pytest" ,python-pytest)))
8036 (home-page "http://jupyter.org")
8037 (synopsis "Jupyter Qt console")
8038 (description "This package provides a Qt-based console for Jupyter with
8039support for rich media output.")
8040 (license license:bsd-3)))
8041
6ec87223
VC
8042(define-public python-jsbeautifier
8043 (package
8044 (name "python-jsbeautifier")
8045 (version "1.10.2")
8046 (home-page "https://github.com/beautify-web/js-beautify")
8047 (source (origin
8048 (method git-fetch)
8049 (uri (git-reference
8050 (url home-page)
8051 (commit (string-append "v" version))))
8052 (file-name (git-file-name name version))
8053 (sha256
8054 (base32
8055 "0wawb070ki1axb3jc9xvsrgpji52vcfif3zmjzc3z4g98m5xw4kg"))))
8056 (build-system python-build-system)
8057 (arguments
8058 `(#:phases (modify-phases %standard-phases
8059 (add-after 'unpack 'chdir
8060 (lambda _
8061 ;; The upstream Git repository contains all the code,
8062 ;; but this package only builds the python code.
8063 (chdir "python")
8064 #t))
8065 (add-after 'unpack 'patch-python-six-requirements
8066 (lambda _
8067 (substitute* "python/setup.py"
8068 (("six>=1.12.0")
8069 "six>=1.11.0"))
8070 #t)))))
8071 (propagated-inputs
8072 `(("python-editorconfig" ,python-editorconfig)
8073 ("python-six" ,python-six)))
8074 (native-inputs
8075 `(("python-pytest" ,python-pytest)))
8076 (synopsis "JavaScript unobfuscator and beautifier")
8077 (description "Beautify, unpack or deobfuscate JavaScript, leveraging
8078popular online obfuscators.")
8079 (license license:expat)))
8080
44d10b1f
RW
8081(define-public jupyter
8082 (package
8083 (name "jupyter")
8084 (version "1.0.0")
8085 (source
8086 (origin
8087 (method url-fetch)
8088 (uri (pypi-uri "jupyter" version))
8089 (sha256
8090 (base32
8091 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
8092 (build-system python-build-system)
8093 (arguments '(#:tests? #f)) ; there are none.
8094 (propagated-inputs
8095 `(("python-ipykernel" ,python-ipykernel)
8096 ("python-ipywidgets" ,python-ipywidgets)
8097 ("python-jupyter-console" ,python-jupyter-console)
8098 ("python-nbconvert" ,python-nbconvert)
8099 ("python-notebook" ,python-notebook)
8100 ("python-qtconsole" ,python-qtconsole)))
8101 (native-search-paths
8102 (list (search-path-specification
8103 (variable "JUPYTER_PATH")
8104 (files '("share/jupyter")))))
8105 (home-page "https://jupyter.org")
8106 (synopsis "Web application for interactive documents")
8107 (description
8108 "The Jupyter Notebook is a web application that allows you to create and
8109share documents that contain live code, equations, visualizations and
8110explanatory text. Uses include: data cleaning and transformation, numerical
8111simulation, statistical modeling, machine learning and much more.")
8112 (license license:bsd-3)))
8113
8114(define-public python-chardet
8115 (package
8116 (name "python-chardet")
8117 (version "3.0.4")
8118 (source
8119 (origin
8120 (method url-fetch)
8121 (uri (pypi-uri "chardet" version))
8122 (sha256
8123 (base32
8124 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
8125 (native-inputs
8126 `(("python-hypothesis" ,python-hypothesis)
8127 ("python-pytest" ,python-pytest)
8128 ("python-pytest-runner" ,python-pytest-runner)))
8129 (build-system python-build-system)
3d369407
MB
8130 ;; XXX: Incompatible with Pytest 4: <https://github.com/chardet/chardet/issues/173>.
8131 (arguments `(#:tests? #f))
44d10b1f
RW
8132 (home-page "https://github.com/chardet/chardet")
8133 (synopsis "Universal encoding detector for Python 2 and 3")
8134 (description
8135 "This package provides @code{chardet}, a Python module that can
8136automatically detect a wide range of file encodings.")
8137 (license license:lgpl2.1+)))
8138
8139(define-public python2-chardet
8140 (package-with-python2 python-chardet))
8141
8142(define-public python-docopt
8143 (package
8144 (name "python-docopt")
8145 (version "0.6.2")
8146 (source
8147 (origin
11e46326 8148 (method git-fetch)
44d10b1f 8149 ;; The release on PyPI does not include tests.
11e46326
EF
8150 (uri (git-reference
8151 (url "https://github.com/docopt/docopt")
8152 (commit version)))
8153 (file-name (git-file-name name version))
44d10b1f
RW
8154 (sha256
8155 (base32
11e46326 8156 "0aad9gbswnnhssin2q0m5lmpm0ahyf80ahs2zjigbn5y7fvljnd0"))))
44d10b1f
RW
8157 (build-system python-build-system)
8158 (native-inputs
8159 `(("python-pytest" ,python-pytest)))
8160 (arguments
8161 `(#:phases
8162 (modify-phases %standard-phases
8163 (replace 'check
8164 (lambda _ (invoke "py.test"))))))
8165 (home-page "http://docopt.org")
8166 (synopsis "Command-line interface description language for Python")
8167 (description "This library allows the user to define a command-line
8168interface from a program's help message rather than specifying it
4ca7207b 8169programmatically with command-line parsers like @code{getopt} and
44d10b1f
RW
8170@code{argparse}.")
8171 (license license:expat)))
8172
8173(define-public python2-docopt
8174 (package-with-python2 python-docopt))
8175
8176(define-public python-pythondialog
8177 (package
8178 (name "python-pythondialog")
8179 (version "3.4.0")
8180 (source
8181 (origin
8182 (method url-fetch)
8183 (uri (pypi-uri "pythondialog" version))
8184 (sha256
8185 (base32
8186 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
8187 (build-system python-build-system)
8188 (arguments
8189 `(#:phases
8190 (modify-phases %standard-phases
8191 (add-after 'unpack 'patch-path
8192 (lambda* (#:key inputs #:allow-other-keys)
8193 (let* ((dialog (assoc-ref inputs "dialog")))
8194 ;; Since this library really wants to grovel the search path, we
8195 ;; must hardcode dialog's store path into it.
8196 (substitute* "dialog.py"
8197 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
8198 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
8199 #t))))
8200 #:tests? #f)) ; no test suite
8201 (propagated-inputs
8202 `(("dialog" ,dialog)))
8203 (home-page "http://pythondialog.sourceforge.net/")
8204 (synopsis "Python interface to the UNIX dialog utility")
8205 (description "A Python wrapper for the dialog utility. Its purpose is to
8206provide an easy to use, pythonic and comprehensive Python interface to dialog.
8207This allows one to make simple text-mode user interfaces on Unix-like systems")
8208 (license license:lgpl2.1)
8209 (properties `((python2-variant . ,(delay python2-pythondialog))))))
8210
8211(define-public python2-pythondialog
8212 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
8213 (package
8214 (inherit base)
8215 (version (package-version python-pythondialog))
8216 (source (origin
8217 (method url-fetch)
8218 (uri (pypi-uri "python2-pythondialog" version))
8219 (sha256
8220 (base32
8221 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
8222
8223(define-public python-configobj
8224 (package
8225 (name "python-configobj")
8226 (version "5.0.6")
8227 (source (origin
8228 (method url-fetch)
b0758fbb 8229 (uri (pypi-uri "configobj" version))
44d10b1f
RW
8230 (sha256
8231 (base32
8232 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
8233 ;; Patch setup.py so it looks for python-setuptools, which is
8234 ;; required to parse the keyword 'install_requires' in setup.py.
8235 (patches (search-patches "python-configobj-setuptools.patch"))))
8236 (build-system python-build-system)
8237 (propagated-inputs
8238 `(("python-six" ,python-six)))
8239 (synopsis "Config file reading, writing and validation")
8240 (description "ConfigObj is a simple but powerful config file reader and
8241writer: an ini file round tripper. Its main feature is that it is very easy to
8242use, with a straightforward programmer’s interface and a simple syntax for
8243config files.")
8244 (home-page "https://github.com/DiffSK/configobj")
8245 (license license:bsd-3)))
8246
8247(define-public python2-configobj
8248 (package-with-python2 python-configobj))
8249
8250(define-public python-configargparse
8251 (package
8252 (name "python-configargparse")
86ae491f 8253 (version "0.14.0")
44d10b1f
RW
8254 (source (origin
8255 (method url-fetch)
8256 (uri (pypi-uri "ConfigArgParse" version))
8257 (sha256
8258 (base32
86ae491f 8259 "149fy4zya0rsnlkvxbbq43cyr8lscb5k4pj1m6n7f1grwcmzwbif"))))
44d10b1f
RW
8260 (build-system python-build-system)
8261 (native-inputs
8262 `(("python-pyyaml" ,python-pyyaml)))
8263 (arguments
8264 `(#:phases
8265 (modify-phases %standard-phases
8266 (replace 'check
8267 (lambda _
8268 ;; Bypass setuptools-shim because one test relies on "setup.py"
8269 ;; being the first argument passed to the python call.
8270 ;;
8271 ;; NOTE: Many tests do not run because they rely on Python's
8272 ;; built-in test.test_argparse, but we remove the unit tests from
8273 ;; our Python installation.
8274 (invoke "python" "setup.py" "test"))))))
8275 (synopsis "Replacement for argparse")
8276 (description "A drop-in replacement for argparse that allows options to also
8277be set via config files and/or environment variables.")
8278 (home-page "https://github.com/bw2/ConfigArgParse")
8279 (license license:expat)))
8280
8281(define-public python2-configargparse
8282 (package-with-python2 python-configargparse))
8283
8284(define-public python-argparse-manpage
8285 (package
8286 (name "python-argparse-manpage")
8287 (version "1.1")
8288 (source
8289 (origin
8290 (method url-fetch)
8291 (uri (pypi-uri "argparse-manpage" version))
8292 (sha256
8293 (base32
8294 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
8295 (build-system python-build-system)
8296 (home-page "https://github.com/praiskup/argparse-manpage")
8297 (synopsis "Build manual page from Python's ArgumentParser object")
8298 (description
8299 "This package provides tools to build manual pages from Python's
8300@code{ArgumentParser} object.")
8301 (license license:asl2.0)))
8302
3e8f76d8
RW
8303(define-public python-contextlib2
8304 (package
8305 (name "python-contextlib2")
8306 (version "0.5.5")
8307 (source
8308 (origin
8309 (method url-fetch)
8310 (uri (pypi-uri "contextlib2" version))
8311 (sha256
8312 (base32
8313 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
8314 (build-system python-build-system)
8315 (home-page "http://contextlib2.readthedocs.org/")
8316 (synopsis "Tools for decorators and context managers")
8317 (description "This module is primarily a backport of the Python
83183.2 contextlib to earlier Python versions. Like contextlib, it
8319provides utilities for common tasks involving decorators and context
8320managers. It also contains additional features that are not part of
8321the standard library.")
1e158ba1 8322 (properties `((python2-variant . ,(delay python2-contextlib2))))
3e8f76d8
RW
8323 (license license:psfl)))
8324
44d10b1f 8325(define-public python2-contextlib2
1e158ba1
EF
8326 (let ((base (package-with-python2
8327 (strip-python2-variant python-contextlib2))))
8328 (package
8329 (inherit base)
8330 (arguments
8331 (substitute-keyword-arguments (package-arguments base)
8332 ((#:phases phases)
8333 `(modify-phases ,phases
8334 (replace 'check
8335 (lambda _ (invoke "python" "test_contextlib2.py" "-v")))))))
8336 (native-inputs
8337 `(("python2-unittest2" ,python2-unittest2))))))
44d10b1f
RW
8338
8339(define-public python-texttable
8340 (package
8341 (name "python-texttable")
02422b3b 8342 (version "1.6.2")
44d10b1f
RW
8343 (source
8344 (origin
8345 (method url-fetch)
8346 (uri (pypi-uri "texttable" version))
8347 (sha256
8348 (base32
02422b3b 8349 "1x5l77akfc20x52jma9573qp8l8r07q103pm4l0pbizvh4vp1wzg"))))
44d10b1f 8350 (build-system python-build-system)
02422b3b
RW
8351 (arguments
8352 `(#:phases
8353 (modify-phases %standard-phases
8354 (replace 'check
8355 (lambda _ (invoke "pytest" "tests.py"))))))
8356 (native-inputs
8357 `(("python-pytest" ,python-pytest)))
44d10b1f
RW
8358 (home-page "https://github.com/foutaise/texttable/")
8359 (synopsis "Python module for creating simple ASCII tables")
8360 (description "Texttable is a Python module for creating simple ASCII
8361tables.")
02422b3b 8362 (license license:expat)))
44d10b1f
RW
8363
8364(define-public python2-texttable
8365 (package-with-python2 python-texttable))
8366
8367(define-public python-atomicwrites
8368 (package
8369 (name "python-atomicwrites")
14f10479 8370 (version "1.3.0")
44d10b1f
RW
8371 (source (origin
8372 (method url-fetch)
8373 (uri (pypi-uri "atomicwrites" version))
8374 (sha256
8375 (base32
14f10479 8376 "19ngcscdf3jsqmpcxn6zl5b6anmsajb6izp1smcd1n02midl9abm"))))
44d10b1f
RW
8377 (build-system python-build-system)
8378 (synopsis "Atomic file writes in Python")
8379 (description "Library for atomic file writes using platform dependent tools
8380for atomic file system operations.")
8381 (home-page "https://github.com/untitaker/python-atomicwrites")
8382 (license license:expat)))
8383
8384(define-public python2-atomicwrites
8385 (package-with-python2 python-atomicwrites))
8386
8387(define-public python-click-threading
8388 (package
8389 (name "python-click-threading")
8390 (version "0.4.4")
8391 (source (origin
8392 (method url-fetch)
8393 (uri (pypi-uri "click-threading" version))
8394 (sha256
8395 (base32
8396 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
8397 (build-system python-build-system)
8398 (propagated-inputs
8399 `(("python-click" ,python-click)))
8400 (synopsis "Utilities for multithreading in Click")
8401 (description "This package provides utilities for multithreading in Click
8402applications.")
8403 (home-page "https://github.com/click-contrib/click-threading")
8404 (license license:expat)))
8405
8406(define-public python-click-log
8407 (package
8408 (name "python-click-log")
8409 (version "0.3.2")
8410 (source (origin
8411 (method url-fetch)
8412 (uri (pypi-uri "click-log" version))
8413 (sha256
8414 (base32
8415 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
8416 (build-system python-build-system)
8417 (propagated-inputs
8418 `(("python-click" ,python-click)))
8419 (synopsis "Logging for click applications")
8420 (description "This package provides a Python library for logging Click
8421applications.")
8422 (home-page "https://github.com/click-contrib/click-log")
8423 (license license:expat)))
8424
8425(define-public python-apipkg
8426 (package
8427 (name "python-apipkg")
8428 (version "1.4")
8429 (source (origin
8430 (method url-fetch)
8431 (uri (pypi-uri "apipkg" version))
8432 (sha256
8433 (base32
8434 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
8435 (build-system python-build-system)
8436 (native-inputs
8437 `(("python-pytest" ,python-pytest)))
8438 (synopsis "Namespace control and lazy-import mechanism")
8439 (description "With apipkg you can control the exported namespace of a Python
8440package and greatly reduce the number of imports for your users. It is a small
8441pure Python module that works on virtually all Python versions.")
8442 (home-page "https://github.com/pytest-dev/apipkg")
8443 (license license:expat)))
8444
8445(define-public python2-apipkg
8446 (package-with-python2 python-apipkg))
8447
8448(define-public python-execnet
8449 (package
8450 (name "python-execnet")
8451 (version "1.4.1")
8452 (source (origin
8453 (method url-fetch)
8454 (uri (pypi-uri "execnet" version))
8455 (sha256
8456 (base32
8457 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
8458 (build-system python-build-system)
8459 (arguments
8460 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
8461 ;; The two test failures are caused by the lack of an `ssh` executable.
8462 ;; The test suite can be run with pytest after the 'install' phase.
8463 #:tests? #f))
8464 (native-inputs
8465 `(("python-pytest" ,python-pytest)
8466 ("python-setuptools-scm" ,python-setuptools-scm)))
8467 (propagated-inputs
8468 `(("python-apipkg" ,python-apipkg)))
8469 (synopsis "Rapid multi-Python deployment")
8470 (description "Execnet provides a share-nothing model with
8471channel-send/receive communication for distributing execution across many
8472Python interpreters across version, platform and network barriers. It has a
8473minimal and fast API targeting the following uses:
8474@enumerate
8475@item distribute tasks to (many) local or remote CPUs
8476@item write and deploy hybrid multi-process applications
8477@item write scripts to administer multiple environments
8478@end enumerate")
8479 (home-page "http://codespeak.net/execnet/")
8480 (license license:expat)))
8481
8482(define-public python2-execnet
8483 (package-with-python2 python-execnet))
8484
8485(define-public python-icalendar
8486 (package
8487 (name "python-icalendar")
43ae8f79 8488 (version "4.0.4")
44d10b1f
RW
8489 (source (origin
8490 (method url-fetch)
8491 (uri (pypi-uri "icalendar" version))
8492 (sha256
8493 (base32
43ae8f79 8494 "16gjvqv0n05jrb9g228pdjgzd3amz2pdhvcgsn1jypszjg5m2w9l"))))
44d10b1f
RW
8495 (build-system python-build-system)
8496 (propagated-inputs
8497 `(("python-dateutil" ,python-dateutil)
8498 ("python-pytz" ,python-pytz)))
8499 (synopsis "Python library for parsing iCalendar files")
8500 (description "The icalendar package is a parser/generator of iCalendar
8501files for use with Python.")
8502 (home-page "https://github.com/collective/icalendar")
8503 (license license:bsd-2)))
8504
44d10b1f
RW
8505(define-public python-args
8506 (package
8507 (name "python-args")
8508 (version "0.1.0")
8509 (source (origin
8510 (method url-fetch)
8511 (uri (pypi-uri "args" version))
8512 (sha256
8513 (base32
8514 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
8515 (build-system python-build-system)
8516 (home-page "https://github.com/kennethreitz/args")
8517 (synopsis "Command-line argument parser")
8518 (description
8519 "This library provides a Python module to parse command-line arguments.")
8520 (license license:bsd-3)))
8521
8522(define-public python2-args
8523 (package-with-python2 python-args))
8524
8525(define-public python-clint
8526 (package
8527 (name "python-clint")
8528 (version "0.5.1")
8529 (source (origin
8530 (method url-fetch)
8531 (uri (pypi-uri "clint" version))
8532 (sha256
8533 (base32
8534 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
8535 (build-system python-build-system)
8536 (arguments
8537 '(#:phases
8538 (modify-phases %standard-phases
8539 (replace 'check
8540 (lambda _ (invoke "py.test" "-v"))))))
8541 (native-inputs
8542 `(("python-pytest" ,python-pytest)))
8543 (propagated-inputs
8544 `(("python-args" ,python-args)))
8545 (home-page "https://github.com/kennethreitz/clint")
8546 (synopsis "Command-line interface tools")
8547 (description
8548 "Clint is a Python module filled with a set of tools for developing
8549command-line applications, including tools for colored and indented
8550output, progress bar display, and pipes.")
8551 (license license:isc)))
8552
8553(define-public python2-clint
8554 (package-with-python2 python-clint))
8555
44d10b1f
RW
8556(define-public python-rply
8557 (package
8558 (name "python-rply")
8559 (version "0.7.5")
8560 (source (origin
8561 (method url-fetch)
8562 (uri (pypi-uri "rply" version))
8563 (sha256
8564 (base32
8565 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
8566 (build-system python-build-system)
8567 (propagated-inputs
8568 `(("python-appdirs" ,python-appdirs)))
8569 (home-page "https://github.com/alex/rply")
8570 (synopsis "Parser generator for Python")
8571 (description
8572 "This package provides a pure Python based parser generator, that also
8573works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
8574with a new public API, and RPython support.")
8575 (license license:bsd-3)))
8576
8577(define-public python2-rply
8578 (package-with-python2 python-rply))
8579
8580(define-public python-hy
8581 (package
8582 (name "python-hy")
c215051d 8583 (version "0.17.0")
44d10b1f
RW
8584 (source (origin
8585 (method url-fetch)
8586 (uri (pypi-uri "hy" version))
8587 (sha256
8588 (base32
c215051d 8589 "1gdbqsirsdxj320wnp7my5awzs1kfs6m4fqmkzbd1zd47qzj0zfi"))))
44d10b1f
RW
8590 (build-system python-build-system)
8591 (arguments
8592 '(#:phases
8593 (modify-phases %standard-phases
6ba6a1c1
JG
8594 (add-before 'install 'set-HOME
8595 (lambda _
8596 (setenv "HOME" "/tmp")))
44d10b1f
RW
8597 (replace 'check
8598 (lambda _
8599 ;; Tests require write access to HOME.
8600 (setenv "HOME" "/tmp")
8601 (invoke "nosetests"))))))
8602 (native-inputs
8603 `(("python-coverage" ,python-coverage)
8604 ("python-nose" ,python-nose)))
8605 (propagated-inputs
8606 `(("python-astor" ,python-astor)
8607 ("python-clint" ,python-clint)
c215051d
JG
8608 ("python-rply" ,python-rply)
8609 ("python-fastentrypoints"
8610 ,python-fastentrypoints)
8611 ("python-funcparserlib"
8612 ,python-funcparserlib)))
44d10b1f
RW
8613 (home-page "http://hylang.org/")
8614 (synopsis "Lisp frontend to Python")
8615 (description
8616 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
8617its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
8618Python at your fingertips, in Lisp form.")
8619 (license license:expat)))
8620
8621(define-public python2-hy
8622 (package-with-python2 python-hy))
8623
8624(define-public python2-functools32
8625 (package
8626 (name "python2-functools32")
8627 (version "3.2.3-2")
8628 (source
8629 (origin
8630 (method url-fetch)
8631 (uri (pypi-uri "functools32" version))
8632 (sha256
8633 (base32
8634 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
8635 (build-system python-build-system)
8636 (arguments
8637 `(#:python ,python-2
8638 #:tests? #f)) ; no test target
8639 (home-page "https://github.com/MiCHiLU/python-functools32")
8640 (synopsis
8641 "Backport of the functools module from Python 3.2.3")
8642 (description
8643 "This package is a backport of the @code{functools} module from Python
86443.2.3 for use with older versions of Python and PyPy.")
8645 (license license:expat)))
8646
8647(define-public python2-subprocess32
8648 (package
8649 (name "python2-subprocess32")
8650 (version "3.2.7")
8651 (source (origin
8652 (method url-fetch)
8653 (uri (pypi-uri "subprocess32" version))
8654 (sha256
8655 (base32
8656 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
8657 (patches
8658 (search-patches "python2-subprocess32-disable-input-test.patch"))))
8659 (build-system python-build-system)
8660 (arguments
8661 `(#:python ,python-2
8662 ;; The test suite fails with Python > 2.7.13:
8663 ;; import test.support
8664 ;; ImportError: No module named support
8665 #:tests? #f
8666 #:phases
8667 (modify-phases %standard-phases
8668 (add-after 'unpack 'patch-/bin/sh
8669 (lambda _
8670 (substitute* '("subprocess32.py"
8671 "test_subprocess32.py")
8672 (("/bin/sh") (which "sh")))
8673 #t)))))
8674 (home-page "https://github.com/google/python-subprocess32")
8675 (synopsis "Backport of the subprocess module from Python 3.2")
8676 (description
8677 "This is a backport of the @code{subprocess} standard library module
8678from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
8679new features. On POSIX systems it is guaranteed to be reliable when used
8680in threaded applications. It includes timeout support from Python 3.3 but
8681otherwise matches 3.2’s API.")
8682 (license license:psfl)))
8683
8684(define-public python2-futures
8685 (package
8686 (name "python2-futures")
8687 (version "3.2.0")
8688 (source
8689 (origin
8690 (method url-fetch)
8691 (uri (pypi-uri "futures" version))
8692 (sha256
8693 (base32
8694 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
8695 (build-system python-build-system)
ba88eea2
RW
8696 (arguments
8697 `(#:python ,python-2
8698 #:phases
8699 (modify-phases %standard-phases
8700 (replace 'check
8701 (lambda _
8702 (invoke "python" "test_futures.py")
8703 #t)))))
44d10b1f
RW
8704 (home-page "https://github.com/agronholm/pythonfutures")
8705 (synopsis
8706 "Backport of the concurrent.futures package from Python 3.2")
8707 (description
8708 "The concurrent.futures module provides a high-level interface for
8709asynchronously executing callables. This package backports the
8710concurrent.futures package from Python 3.2")
8711 (license license:bsd-3)))
8712
8713(define-public python-promise
8714 (package
8715 (name "python-promise")
8716 (version "0.4.2")
8717 (source
8718 (origin
8719 (method url-fetch)
8720 (uri (pypi-uri "promise" version))
8721 (sha256
8722 (base32
8723 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
8724 (build-system python-build-system)
8725 ;; Tests wants python-futures, which is a python2 only program, and
8726 ;; can't be found by python-promise at test time.
8727 (arguments `(#:tests? #f))
8728 (home-page "https://github.com/syrusakbary/promise")
8729 (synopsis "Promises/A+ implementation for Python")
8730 (description
8731 "Promises/A+ implementation for Python")
8732 (properties `((python2-variant . ,(delay python2-promise))))
8733 (license license:expat)))
8734
8735(define-public python2-promise
8736 (let ((promise (package-with-python2
8737 (strip-python2-variant python-promise))))
8738 (package (inherit promise)
8739 (arguments (substitute-keyword-arguments (package-arguments promise)
8740 ((#:tests? _) #t)))
8741 (native-inputs
8742 `(("python2-futures" ,python2-futures)
8743 ("python2-pytest" ,python2-pytest)
8744 ,@(package-native-inputs promise))))))
8745
d71d85cd
RW
8746(define-public python-progressbar33
8747 (package
8748 (name "python-progressbar33")
8749 (version "2.4")
8750 (source
8751 (origin
8752 (method url-fetch)
8753 (uri (pypi-uri "progressbar33" version))
8754 (sha256
8755 (base32
8756 "1zvf6zs5hzrc03p9nfs4p16vhilqikycvv1yk0pxn8s07fdhvzji"))))
8757 (build-system python-build-system)
8758 (home-page "http://github.com/germangh/python-progressbar")
8759 (synopsis "Text progress bar library for Python")
8760 (description
8761 "This package provides a text progress bar library for Python. This
8762version only differs from the original @code{progressbar} package in that it
8763uses relative package imports instead of absolute imports, which is necessary
8764for the module to work under Python 3.3.")
8765 ;; Either or both of these licenses may be selected.
8766 (license (list license:lgpl2.1+ license:bsd-3))))
8767
44d10b1f
RW
8768(define-public python-colorama
8769 (package
8770 (name "python-colorama")
bd137055 8771 (version "0.4.3")
44d10b1f
RW
8772 (source
8773 (origin
8774 (method url-fetch)
8775 (uri (pypi-uri "colorama" version))
8776 (sha256
8777 (base32
bd137055 8778 "189n8hpijy14jfan4ha9f5n06mnl33cxz7ay92wjqgkr639s0vg9"))))
44d10b1f
RW
8779 (build-system python-build-system)
8780 (synopsis "Colored terminal text rendering for Python")
8781 (description "Colorama is a Python library for rendering colored terminal
8782text.")
8783 (home-page "https://pypi.python.org/pypi/colorama")
8784 (license license:bsd-3)))
8785
8786(define-public python2-colorama
8787 (package-with-python2 python-colorama))
8788
8789(define-public python-rsa
8790 (package
8791 (name "python-rsa")
8792 (version "3.4.2")
8793 (source
8794 (origin
8795 (method url-fetch)
8796 (uri (pypi-uri "rsa" version))
8797 (sha256
8798 (base32
8799 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
8800 (build-system python-build-system)
8801 (propagated-inputs
8802 `(("python-pyasn1" ,python-pyasn1)))
8803 (synopsis "Pure-Python RSA implementation")
8804 (description "Python-RSA is a pure-Python RSA implementation. It supports
8805encryption and decryption, signing and verifying signatures, and key
8806generation according to PKCS#1 version 1.5. It can be used as a Python
8807library as well as on the command line.")
8808 (home-page "https://stuvel.eu/rsa")
8809 (license license:asl2.0)))
8810
8811(define-public python2-rsa
8812 (package-with-python2 python-rsa))
8813
8814(define-public python-pluggy
8815 (package
8816 (name "python-pluggy")
e5731c03 8817 (version "0.11.0")
44d10b1f
RW
8818 (source
8819 (origin
8820 (method url-fetch)
8821 (uri (pypi-uri "pluggy" version))
8822 (sha256
8823 (base32
e5731c03 8824 "10511a54dvafw1jrk75mrhml53c7b7w4yaw7241696lc2hfvr895"))))
44d10b1f
RW
8825 (build-system python-build-system)
8826 (native-inputs
8827 `(("python-setuptools-scm" ,python-setuptools-scm)))
8828 (synopsis "Plugin and hook calling mechanism for Python")
8829 (description "Pluggy is an extraction of the plugin manager as used by
8830Pytest but stripped of Pytest specific details.")
8831 (home-page "https://pypi.python.org/pypi/pluggy")
8832 (license license:expat)))
8833
8834(define-public python2-pluggy
8835 (package-with-python2 python-pluggy))
8836
8837(define-public python-tox
8838 (package
8839 (name "python-tox")
8840 (version "2.8.1")
8841 (source
8842 (origin
8843 (method url-fetch)
8844 (uri (pypi-uri "tox" version))
8845 (sha256
8846 (base32
8847 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
8848 (build-system python-build-system)
8849 (arguments
8850 ;; FIXME: Tests require pytest-timeout, which itself requires
8851 ;; pytest>=2.8.0 for installation.
8852 '(#:tests? #f))
8853 (propagated-inputs
8854 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
8855 ("python-py" ,python-py)
8856 ("python-virtualenv" ,python-virtualenv)))
8857 (native-inputs
8858 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
8859 ("python-pytest" ,python-pytest) ; >= 2.3.5
8860 ("python-setuptools-scm" ,python-setuptools-scm)))
d81fb2ae 8861 (home-page "https://tox.readthedocs.io")
44d10b1f
RW
8862 (synopsis "Virtualenv-based automation of test activities")
8863 (description "Tox is a generic virtualenv management and test command line
8864tool. It can be used to check that a package installs correctly with
8865different Python versions and interpreters, or run tests in each type of
8866supported environment, or act as a frontend to continuous integration
8867servers.")
8868 (license license:expat)))
8869
8870(define-public python2-tox
8871 (package-with-python2 python-tox))
8872
8873(define-public python-jmespath
8874 (package
8875 (name "python-jmespath")
27fb781f 8876 (version "0.9.4")
44d10b1f
RW
8877 (source
8878 (origin
8879 (method url-fetch)
8880 (uri (pypi-uri "jmespath" version))
8881 (sha256
8882 (base32
27fb781f 8883 "0k0765x1mybcrzajh3hiqkl8sy9hs0bmn4900frxy0j3ykvaxqmx"))))
44d10b1f
RW
8884 (build-system python-build-system)
8885 (native-inputs
8886 `(("python-nose" ,python-nose)))
8887 (synopsis "JSON Matching Expressions")
8888 (description "JMESPath (pronounced “james path”) is a Python library that
8889allows one to declaratively specify how to extract elements from a JSON
8890document.")
8891 (home-page "https://github.com/jmespath/jmespath.py")
8892 (license license:expat)))
8893
8894(define-public python2-jmespath
8895 (package-with-python2 python-jmespath))
8896
8897(define-public python-botocore
8898 (package
7bcf827c
RW
8899 (name "python-botocore")
8900 (version "1.12.149")
8901 (source
8902 (origin
8903 (method url-fetch)
8904 (uri (pypi-uri "botocore" version))
8905 (sha256
8906 (base32
8907 "12597f74khp3ngwr282cb949w0gcqj20rkfc3x275dijavyy5cmf"))))
8908 (build-system python-build-system)
8909 (arguments
8910 ;; FIXME: Many tests are failing.
8911 '(#:tests? #f))
8912 (propagated-inputs
8913 `(("python-dateutil" ,python-dateutil)
8914 ("python-docutils" ,python-docutils)
8915 ("python-jmespath" ,python-jmespath)))
8916 (native-inputs
8917 `(("python-mock" ,python-mock)
8918 ("python-nose" ,python-nose)
8919 ("behave" ,behave)
8920 ("python-tox" ,python-tox)
8921 ("python-urllib3" ,python-urllib3)
8922 ("python-wheel" ,python-wheel)))
8923 (home-page "https://github.com/boto/botocore")
8924 (synopsis "Low-level interface to AWS")
8925 (description "Botocore is a Python library that provides a low-level
44d10b1f 8926interface to the Amazon Web Services (AWS) API.")
7bcf827c 8927 (license license:asl2.0)))
44d10b1f
RW
8928
8929(define-public python2-botocore
8930 (package-with-python2 python-botocore))
8931
8932(define-public python-xdo
8933 (package
8934 (name "python-xdo")
8935 (version "0.3")
8936 (source (origin
8937 (method url-fetch)
8938 (uri (string-append
8939 "http://http.debian.net/debian/pool/main/p/python-xdo/"
8940 "python-xdo_" version ".orig.tar.gz"))
8941 (sha256
8942 (base32
8943 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
8944 (build-system python-build-system)
8945 (arguments
8946 '(#:phases
8947 (modify-phases %standard-phases
8948 (add-before 'install 'patch-libxdo-path
8949 ;; Hardcode the path of dynamically loaded libxdo library.
8950 (lambda* (#:key inputs #:allow-other-keys)
8951 (let ((libxdo (string-append
8952 (assoc-ref inputs "xdotool")
8953 "/lib/libxdo.so")))
8954 (substitute* "xdo/_xdo.py"
8955 (("find_library\\(\"xdo\"\\)")
8956 (simple-format #f "\"~a\"" libxdo)))
8957 #t))))
8958 #:tests? #f)) ; no tests provided
8959 (propagated-inputs
8960 `(("python-six" ,python-six)))
8961 (inputs
8962 `(("xdotool" ,xdotool)
8963 ("libX11" ,libx11)))
8964 (home-page "https://tracker.debian.org/pkg/python-xdo")
8965 (synopsis "Python library for simulating X11 keyboard/mouse input")
8966 (description "Provides bindings to libxdo for manipulating X11 via simulated
8967input. (Note that this is mostly a legacy library; you may wish to look at
8968python-xdo for newer bindings.)")
8969 (license license:bsd-3)))
8970
8971(define-public python2-xdo
8972 (package-with-python2 python-xdo))
8973
8974(define-public python-mako
8975 (package
8976 (name "python-mako")
6bf53ad5 8977 (version "1.1.0")
44d10b1f
RW
8978 (source
8979 (origin
8980 (method url-fetch)
8981 (uri (pypi-uri "Mako" version))
8982 (sha256
8983 (base32
6bf53ad5 8984 "0jqa3qfpykyn4fmkn0kh6043sfls7br8i2bsdbccazcvk9cijsd3"))))
44d10b1f 8985 (build-system python-build-system)
6bf53ad5
MB
8986 (arguments
8987 `(#:phases (modify-phases %standard-phases
8988 (replace 'check
8989 (lambda _
8990 (invoke "pytest" "-vv"))))))
44d10b1f
RW
8991 (propagated-inputs
8992 `(("python-markupsafe" ,python-markupsafe)))
8993 (native-inputs
8994 `(("python-mock" ,python-mock)
44d10b1f 8995 ("python-pytest" ,python-pytest)))
7016e620 8996 (home-page "https://www.makotemplates.org/")
44d10b1f
RW
8997 (synopsis "Templating language for Python")
8998 (description "Mako is a templating language for Python that compiles
8999templates into Python modules.")
9000 (license license:expat)))
9001
9002(define-public python2-mako
9003 (package-with-python2 python-mako))
9004
9005(define-public python-waitress
9006 (package
9007 (name "python-waitress")
9008 (version "1.1.0")
9009 (source
9010 (origin
9011 (method url-fetch)
9012 (uri (pypi-uri "waitress" version))
9013 (patches (search-patches "python-waitress-fix-tests.patch"))
9014 (sha256
9015 (base32
9016 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
9017 (build-system python-build-system)
9018 (home-page "https://github.com/Pylons/waitress")
9019 (synopsis "Waitress WSGI server")
9020 (description "Waitress is meant to be a production-quality pure-Python WSGI
9021server with very acceptable performance.")
9022 (license license:zpl2.1)))
9023
9024(define-public python2-waitress
9025 (package-with-python2 python-waitress))
9026
b2b23d12
TLC
9027(define-public python-whichcraft
9028 (package
9029 (name "python-whichcraft")
9030 (version "0.6.1")
9031 (source
9032 (origin
9033 (method url-fetch)
9034 (uri (pypi-uri "whichcraft" version))
9035 (sha256
9036 (base32
9037 "11yfkzyplizdgndy34vyd5qlmr1n5mxis3a3svxmx8fnccdvknxc"))))
9038 (build-system python-build-system)
9039 (native-inputs
9040 `(("python-pytest" ,python-pytest)))
9041 (home-page "https://github.com/pydanny/whichcraft")
9042 (synopsis "Cross-platform cross-python shutil.which functionality")
9043 (description
9044 "This package provides a shim of the shutil.which function that's
9045designed to work across multiple versions of Python.")
9046 (license license:bsd-3)))
9047
1133ca44
TLC
9048(define-public python-cookiecutter
9049 (package
9050 (name "python-cookiecutter")
9051 (version "1.6.0")
9052 (source
9053 (origin
9054 (method url-fetch)
9055 (uri (pypi-uri "cookiecutter" version))
9056 (sha256
9057 (base32
9058 "0glsvaz8igi2wy1hsnhm9fkn6560vdvdixzvkq6dn20z3hpaa5hk"))))
9059 (build-system python-build-system)
9060 (native-inputs
9061 `(("python-freezegun" ,python-freezegun)
9062 ("python-pytest" ,python-pytest)
9063 ("python-pytest-catchlog" ,python-pytest-catchlog)
9064 ("python-pytest-cov" ,python-pytest-cov)
9065 ("python-pytest-mock" ,python-pytest-mock)))
9066 (propagated-inputs
9067 `(("python-binaryornot" ,python-binaryornot)
9068 ("python-click" ,python-click)
9069 ("python-future" ,python-future)
9070 ("python-jinja2" ,python-jinja2)
9071 ("python-jinja2-time" ,python-jinja2-time)
9072 ("python-poyo" ,python-poyo)
9073 ("python-requests" ,python-requests)
9074 ("python-whichcraft" ,python-whichcraft)))
9075 (home-page "https://github.com/audreyr/cookiecutter")
9076 (synopsis
9077 "Command-line utility that creates projects from project templates")
9078 (description
9079 "This package provides a command-line utility that creates projects from
9080project templates, e.g. creating a Python package project from a Python package
9081project template.")
9082 (license license:bsd-3)))
9083
44d10b1f
RW
9084(define-public python-pyquery
9085 (package
9086 (name "python-pyquery")
9087 (version "1.2.17")
9088 (source
9089 (origin
9090 (method url-fetch)
9091 (uri (pypi-uri "pyquery" version))
9092 (sha256
9093 (base32
9094 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
9095 (build-system python-build-system)
9096 (native-inputs
9097 `(("python-webob" ,python-webob)
9098 ("python-webtest" ,python-webtest)))
9099 (propagated-inputs
9100 `(("python-lxml" ,python-lxml)
9101 ("python-cssselect" ,python-cssselect)))
9102 (home-page "https://github.com/gawel/pyquery")
9103 (synopsis "Make jQuery-like queries on xml documents")
9104 (description "pyquery allows you to make jQuery queries on xml documents.
9105The API is as much as possible the similar to jQuery. pyquery uses lxml for
9106fast xml and html manipulation.")
9107 (license license:bsd-3)))
9108
44d10b1f
RW
9109(define-public python-anyjson
9110 (package
9111 (name "python-anyjson")
9112 (version "0.3.3")
9113 (source
9114 (origin
9115 (method url-fetch)
9116 (uri (pypi-uri "anyjson" version))
9117 (sha256
9118 (base32
9119 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
9120 (build-system python-build-system)
9121 (arguments
9122 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
9123 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
9124 ;; whatever) so this transformation needs to be done before the tests
9125 ;; can be run. Maybe we could add a build step to transform beforehand
9126 ;; but it could be annoying/difficult.
9127 ;; We can enable tests for the Python 2 version, though, and do below.
9128 #:tests? #f))
9129 (home-page "https://bitbucket.org/runeh/anyjson/")
9130 (synopsis
9131 "Wraps best available JSON implementation in a common interface")
9132 (description
9133 "Anyjson loads whichever is the fastest JSON module installed
9134and provides a uniform API regardless of which JSON implementation is used.")
9135 (license license:bsd-3)
9136 (properties `((python2-variant . ,(delay python2-anyjson))))))
9137
9138(define-public python2-anyjson
9139 (let ((anyjson (package-with-python2
9140 (strip-python2-variant python-anyjson))))
9141 (package
9142 (inherit anyjson)
9143 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
9144 #:tests? #t
9145 ,@(package-arguments anyjson)))
9146 (native-inputs `(("python2-nose" ,python2-nose))))))
9147
9148(define-public python-amqp
9149 (package
9150 (name "python-amqp")
9151 (version "2.3.2")
9152 (source
9153 (origin
9154 (method url-fetch)
9155 (uri (pypi-uri "amqp" version))
9156 (sha256
9157 (base32
9158 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
9159 (build-system python-build-system)
9160 (native-inputs
9161 `(("python-case" ,python-case)
9162 ("python-pytest-sugar" ,python-pytest-sugar)
9163 ("python-mock" ,python-mock)))
9164 (propagated-inputs
9165 `(("python-vine" ,python-vine)))
9166 (home-page "https://github.com/celery/py-amqp")
9167 (synopsis
9168 "Low-level AMQP client for Python (fork of amqplib)")
9169 (description
9170 "This is a fork of amqplib which was originally written by Barry Pederson.
9171It is maintained by the Celery project, and used by kombu as a pure python
9172alternative when librabbitmq is not available.")
9173 (license license:lgpl2.1+)
9174 (properties `((python2-variant . ,(delay python2-amqp))))))
9175
9176(define-public python2-amqp
9177 (let ((amqp (package-with-python2
9178 (strip-python2-variant python-amqp))))
9179 (package
9180 (inherit amqp)
9181 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
9182 ;; unmaintained. Weirdly, does not do this on the python 3
9183 ;; version?
9184 #:tests? #f
9185 ,@(package-arguments amqp))))))
9186
9187(define-public python-txamqp
9188 (package
9189 (name "python-txamqp")
9190 (version "0.8.2")
9191 (source
9192 (origin
9193 (method url-fetch)
9194 (uri (pypi-uri "txAMQP" version))
9195 (sha256
9196 (base32
9197 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
9198 (build-system python-build-system)
9199 (propagated-inputs
9200 `(("python-six" ,python-six)
9201 ("python-twisted" ,python-twisted)))
9202 (home-page "https://github.com/txamqp/txamqp")
9203 (synopsis "Communicate with AMQP peers and brokers using Twisted")
9204 (description
9205 "This package provides a Python library for communicating with AMQP peers
9206and brokers using the asynchronous networking framework Twisted. It contains
9207all the necessary code to connect, send and receive messages to/from an
9208AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
9209also includes support for using Thrift RPC over AMQP in Twisted
9210applications.")
9211 (license license:asl2.0)))
9212
9213(define-public python2-txamqp
9214 (package-with-python2 python-txamqp))
9215
9216(define-public python-kombu
9217 (package
9218 (name "python-kombu")
9219 (version "4.2.2")
9220 (source
9221 (origin
9222 (method url-fetch)
9223 (uri (pypi-uri "kombu" version))
9224 (sha256
9225 (base32
9226 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
9227 (build-system python-build-system)
9228 (native-inputs
9229 `(("python-mock" ,python-mock)
9230 ("python-case" ,python-case)
9231 ("python-pyro4" ,python-pyro4)
9232 ("python-pytest-sugar" ,python-pytest-sugar)
9233 ("python-pytz" ,python-pytz)))
9234 (propagated-inputs
9235 `(("python-anyjson" ,python-anyjson)
9236 ("python-amqp" ,python-amqp)
9237 ("python-redis" ,python-redis)))
9238 (home-page "https://kombu.readthedocs.io")
9239 (synopsis "Message passing library for Python")
9240 (description "The aim of Kombu is to make messaging in Python as easy as
9241possible by providing an idiomatic high-level interface for the AMQ protocol,
9242and also provide proven and tested solutions to common messaging problems.
9243AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
9244message orientation, queuing, routing, reliability and security, for which the
9245RabbitMQ messaging server is the most popular implementation.")
9246 (license license:bsd-3)
9247 (properties `((python2-variant . ,(delay python2-kombu))))))
9248
9249(define-public python2-kombu
9250 (let ((kombu (package-with-python2
9251 (strip-python2-variant python-kombu))))
9252 (package
9253 (inherit kombu)
9254 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
9255 ;; It works fine on the python3 variant.
9256 #:tests? #f
9257 ,@(package-arguments kombu)))
9258 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9259 ,@(package-native-inputs kombu))))))
9260
9261(define-public python-billiard
9262 (package
9263 (name "python-billiard")
9264 (version "3.5.0.5")
9265 (source
9266 (origin
9267 (method url-fetch)
9268 (uri (pypi-uri "billiard" version))
9269 (sha256
9270 (base32
9271 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
9272 (build-system python-build-system)
9273 (native-inputs
9274 `(("python-case" ,python-case)
9275 ("python-pytest" ,python-pytest)))
9276 (home-page "https://github.com/celery/billiard")
9277 (synopsis
9278 "Python multiprocessing fork with improvements and bugfixes")
9279 (description
9280 "Billiard is a fork of the Python 2.7 multiprocessing package. The
9281multiprocessing package itself is a renamed and updated version of R Oudkerk's
9282pyprocessing package. This standalone variant is intended to be compatible with
9283Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
9284 (license license:bsd-3)
9285 (properties `((python2-variant . ,(delay python2-billiard))))))
9286
9287(define-public python2-billiard
9288 (let ((billiard (package-with-python2
9289 (strip-python2-variant python-billiard))))
9290 (package
9291 (inherit billiard)
9292 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9293 ("python2-mock" ,python2-mock)
9294 ,@(package-native-inputs billiard))))))
9295
9296(define-public python-celery
9297 (package
9298 (name "python-celery")
9299 (version "4.2.1")
9300 (source
9301 (origin
9302 (method url-fetch)
9303 (uri (pypi-uri "celery" version))
9304 (sha256
9305 (base32
9306 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
9307 (build-system python-build-system)
9308 (arguments
9309 '(;; TODO The tests fail with Python 3.7
9310 ;; https://github.com/celery/celery/issues/4849
9311 #:tests? #f
9312 #:phases
9313 (modify-phases %standard-phases
9314 (add-after 'unpack 'patch-requirements
9315 (lambda _
9316 (substitute* "requirements/test.txt"
9317 (("pytest>=3\\.0,<3\\.3")
9318 "pytest>=3.0"))
9319 #t)))))
9320 (native-inputs
9321 `(("python-case" ,python-case)
9322 ("python-pytest" ,python-pytest)))
9323 (propagated-inputs
9324 `(("python-pytz" ,python-pytz)
9325 ("python-billiard" ,python-billiard)
9326 ("python-kombu" ,python-kombu)))
9327 (home-page "https://celeryproject.org")
9328 (synopsis "Distributed Task Queue")
9329 (description "Celery is an asynchronous task queue/job queue based on
9330distributed message passing. It is focused on real-time operation, but
9331supports scheduling as well. The execution units, called tasks, are executed
9332concurrently on a single or more worker servers using multiprocessing,
9333Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
9334synchronously (wait until ready).")
9335 (license license:bsd-3)
9336 (properties `((python2-variant . ,(delay python2-celery))))))
9337
9338(define-public python2-celery
9339 (let ((celery (package-with-python2
9340 (strip-python2-variant python-celery))))
9341 (package
9342 (inherit celery)
9343 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9344 ("python2-mock" ,python2-mock)
9345 ,@(package-native-inputs celery))))))
9346
9347(define-public python-translitcodec
9348 (package
9349 (name "python-translitcodec")
9350 (version "0.4.0")
9351 (source
9352 (origin
9353 (method url-fetch)
9354 (uri (pypi-uri "translitcodec" version))
9355 (sha256
9356 (base32
9357 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
9358 (build-system python-build-system)
9359 (arguments
9360 `(#:tests? #f)) ; no tests provided
9361 (home-page
9362 "https://github.com/claudep/translitcodec")
9363 (synopsis
9364 "Unicode to 8-bit charset transliteration codec")
9365 (description
9366 "This package contains codecs for transliterating ISO 10646 texts into
9367best-effort representations using smaller coded character sets (ASCII,
9368ISO 8859, etc.).")
9369 (license license:expat)))
9370
9371(define-public python2-translitcodec
9372 (package-with-python2 python-translitcodec))
9373
9374(define-public python-editor
9375 (package
9376 (name "python-editor")
9377 (version "0.5")
9378 (source
9379 (origin
9380 (method url-fetch)
9381 (uri (pypi-uri "python-editor" version))
9382 (sha256
9383 (base32
9384 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
9385 (build-system python-build-system)
9386 (home-page
9387 "https://github.com/fmoo/python-editor")
9388 (synopsis
9389 "Programmatically open an editor, capture the result")
9390 (description
9391 "python-editor is a library that provides the editor module for
9392programmatically interfacing with your system's $EDITOR.")
9393 (license license:asl2.0)))
9394
9395(define-public python2-editor
9396 (package-with-python2 python-editor))
9397
44d10b1f
RW
9398(define-public python-vobject
9399 (package
9400 (name "python-vobject")
9401 (version "0.9.5")
9402 (source (origin
9403 (method url-fetch)
9404 (uri (pypi-uri "vobject" version))
9405 (sha256
9406 (base32
9407 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
9408 (build-system python-build-system)
9409 (arguments
9410 '(;; The test suite relies on some non-portable Windows interfaces.
9411 #:tests? #f))
9412 (propagated-inputs
9413 `(("python-dateutil" ,python-dateutil)
9414 ("python-pyicu" ,python-pyicu)))
9415 (synopsis "Parse and generate vCard and vCalendar files")
9416 (description "Vobject is intended to be a full featured Python package for
9417parsing and generating vCard and vCalendar files. Currently, iCalendar files
9418are supported and well tested. vCard 3.0 files are supported, and all data
9419should be imported, but only a few components are understood in a sophisticated
9420way.")
5d6e7106 9421 (home-page "https://eventable.github.io/vobject/")
44d10b1f
RW
9422 (license license:asl2.0)))
9423
9424(define-public python2-vobject
9425 (package-with-python2 python-vobject))
9426
9427(define-public python-munkres
9428 (package
9429 (name "python-munkres")
9430 (version "1.0.8")
9431 (source (origin
9432 (method url-fetch)
9433 (uri (pypi-uri "munkres" version))
9434 (sha256
9435 (base32
9436 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
9437 (build-system python-build-system)
9438 (arguments
9439 '(#:tests? #f)) ; no test suite
78f8780e 9440 (home-page "https://software.clapper.org/munkres/")
44d10b1f
RW
9441 (synopsis "Implementation of the Munkres algorithm")
9442 (description "The Munkres module provides an implementation of the Munkres
9443algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
9444useful for solving the Assignment Problem.")
9445 (license license:bsd-3)))
9446
9447(define-public python2-munkres
9448 (package-with-python2 python-munkres))
9449
9450(define-public python-whoosh
9451 (package
9452 (name "python-whoosh")
9453 (version "2.7.4")
9454 (source
9455 (origin
9456 (method url-fetch)
9457 (uri (pypi-uri "Whoosh" version))
9458 (sha256
9459 (base32
9460 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
9461 (build-system python-build-system)
2679d9a4 9462 (arguments '(#:tests? #f)) ; Test invocation is no longer supported by Python.
44d10b1f
RW
9463 (native-inputs
9464 `(("python-pytest" ,python-pytest)))
9465 (home-page "https://bitbucket.org/mchaput/whoosh")
9466 (synopsis "Full text indexing, search, and spell checking library")
9467 (description
9468 "Whoosh is a fast, pure-Python full text indexing, search, and spell
9469checking library.")
9470 (license license:bsd-2)))
9471
9472(define-public python2-whoosh
9473 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
9474 (package (inherit whoosh)
9475 (propagated-inputs
9476 `(("python2-backport-ssl-match-hostname"
9477 ,python2-backport-ssl-match-hostname)
9478 ,@(package-propagated-inputs whoosh))))))
9479
9480(define-public python-pathlib
9481 (package
9482 (name "python-pathlib")
9483 (version "1.0.1")
9484 (source (origin
9485 (method url-fetch)
9486 (uri (pypi-uri "pathlib" version))
9487 (sha256
9488 (base32
9489 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
9490 (build-system python-build-system)
9491 ;; The tests depend on the internal "test" module, which does not provide
9492 ;; a stable interface.
9493 (arguments `(#:tests? #f))
9494 (home-page "https://pathlib.readthedocs.org/")
9495 (synopsis "Object-oriented file system paths")
9496 (description "Pathlib offers a set of classes to handle file system paths.
9497It offers the following advantages over using string objects:
9498
9499@enumerate
9500@item No more cumbersome use of os and os.path functions. Everything can
9501be done easily through operators, attribute accesses, and method calls.
9502@item Embodies the semantics of different path types. For example,
9503comparing Windows paths ignores casing.
9504@item Well-defined semantics, eliminating any inconsistencies or
9505ambiguities (forward vs. backward slashes, etc.).
9506@end enumerate
9507
9508Note: In Python 3.4, pathlib is now part of the standard library. For other
9509Python versions please consider python-pathlib2 instead, which tracks the
9510standard library module. This module (python-pathlib) isn't maintained
9511anymore.")
9512 (license license:expat)))
9513
9514(define-public python2-pathlib
9515 (package-with-python2 python-pathlib))
9516
9517(define-public python2-pathlib2
9518 (package
9519 (name "python2-pathlib2")
54da6f9f 9520 (version "2.3.3")
44d10b1f
RW
9521 (source (origin
9522 (method url-fetch)
9523 (uri (pypi-uri "pathlib2" version))
9524 (sha256
9525 (base32
54da6f9f 9526 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
44d10b1f
RW
9527 (build-system python-build-system)
9528 ;; We only need the the Python 2 variant, since for Python 3 our minimum
9529 ;; version is 3.4 which already includes this package as part of the
9530 ;; standard library.
9531 (arguments
9532 `(#:python ,python-2))
9533 (propagated-inputs
9534 `(("python2-scandir" ,python2-scandir)
9535 ("python2-six" ,python2-six)))
9536 (home-page "https://pypi.python.org/pypi/pathlib2/")
9537 (synopsis "Object-oriented file system paths - backport of standard
9538pathlib module")
9539 (description "The goal of pathlib2 is to provide a backport of standard
9540pathlib module which tracks the standard library module, so all the newest
9541features of the standard pathlib can be used also on older Python versions.
9542
9543Pathlib offers a set of classes to handle file system paths. It offers the
9544following advantages over using string objects:
9545
9546@enumerate
9547@item No more cumbersome use of os and os.path functions. Everything can
9548be done easily through operators, attribute accesses, and method calls.
9549@item Embodies the semantics of different path types. For example,
9550comparing Windows paths ignores casing.
9551@item Well-defined semantics, eliminating any inconsistencies or
9552ambiguities (forward vs. backward slashes, etc.).
9553@end enumerate")
9554 (license license:expat)))
9555
9556(define-public python2-pathlib2-bootstrap
9557 (hidden-package
9558 (package
9559 (inherit python2-pathlib2)
9560 (name "python2-pathlib2-bootstrap")
9561 (propagated-inputs
9562 `(("python2-scandir" ,python2-scandir)
9563 ("python2-six" ,python2-six-bootstrap))))))
9564
9565(define-public python-jellyfish
9566 (package
9567 (name "python-jellyfish")
9568 (version "0.5.6")
9569 (source (origin
9570 (method url-fetch)
9571 (uri (pypi-uri "jellyfish" version))
9572 (sha256
9573 (base32
9574 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
9575 (build-system python-build-system)
9576 (native-inputs
9577 `(("python-pytest" ,python-pytest)))
9578 (home-page "https://github.com/jamesturk/jellyfish")
9579 (synopsis "Approximate and phonetic matching of strings")
9580 (description "Jellyfish uses a variety of string comparison and phonetic
9581encoding algorithms to do fuzzy string matching.")
9582 (license license:bsd-2)
9583 (properties `((python2-variant . ,(delay python2-jellyfish))))))
9584
9585(define-public python2-jellyfish
9586 (let ((jellyfish (package-with-python2
9587 (strip-python2-variant python-jellyfish))))
9588 (package (inherit jellyfish)
9589 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
9590 ,@(package-native-inputs jellyfish))))))
9591
9592(define-public python2-unicodecsv
9593 (package
9594 (name "python2-unicodecsv")
9595 (version "0.14.1")
9596 (source (origin
f711b71b 9597 (method git-fetch)
44d10b1f
RW
9598 ;; The test suite is not included in the PyPi release.
9599 ;; https://github.com/jdunck/python-unicodecsv/issues/19
f711b71b
EF
9600 (uri (git-reference
9601 (url "https://github.com/jdunck/python-unicodecsv")
9602 (commit version)))
9603 (file-name (git-file-name name version))
44d10b1f
RW
9604 (sha256
9605 (base32
f711b71b 9606 "15hx2k41a2lpv4hcml9zp4cvlx1171mnb5s4s13xc1pxkq3vgdjy"))))
44d10b1f
RW
9607 (build-system python-build-system)
9608 (arguments
9609 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
9610 #:python ,python-2))
9611 (native-inputs
9612 `(("python2-unittest2" ,python2-unittest2)))
9613 (home-page "https://github.com/jdunck/python-unicodecsv")
9614 (synopsis "Unicode CSV module for Python 2")
9615 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
9616module, adding support for Unicode strings.")
9617 (license license:bsd-2)))
9618
9619(define-public python-rarfile
9620 (package
9621 (name "python-rarfile")
9622 (version "2.8")
9623 (source (origin
9624 (method url-fetch)
9625 (uri (pypi-uri "rarfile" version))
9626 (sha256
9627 (base32
9628 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
9629 (build-system python-build-system)
9630 (arguments
9631 '(#:phases
9632 (modify-phases %standard-phases
9633 (replace 'check
9634 ;; Many tests fail, but the installation proceeds.
e59dd341 9635 (lambda _ (invoke "make" "-C" "test" "test"))))))
44d10b1f
RW
9636 (native-inputs
9637 `(("which" ,which))) ; required for tests
9638 (propagated-inputs
9639 `(("libarchive" ,libarchive)))
9640 (home-page "https://github.com/markokr/rarfile")
9641 (synopsis "RAR archive reader for Python")
9642 (description "This is Python module for RAR archive reading. The interface
9643is made as zipfile like as possible.")
9644 (license license:isc)))
9645
9646(define-public python2-rarfile
9647 (package-with-python2 python-rarfile))
9648
9649(define-public python-magic
9650 (package
9651 (name "python-magic")
9652 (version "0.4.15")
9653 (source
9654 (origin
9655 (method url-fetch)
9656 (uri (pypi-uri "python-magic" version))
9657 (sha256
9658 (base32
9659 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
9660 (file-name (string-append name "-" version "-checkout"))))
9661 (build-system python-build-system)
9662 (arguments
9663 ;; The tests are unreliable, so don't run them. The tests fail
9664 ;; under Python3 because they were written for Python2 and
9665 ;; contain import statements that do not work in Python3. One of
9666 ;; the tests fails under Python2 because its assertions are
9667 ;; overly stringent; it relies on comparing output strings which
9668 ;; are brittle and can change depending on the version of
9669 ;; libmagic being used and the system on which the test is
9670 ;; running. In my case, under GuixSD 0.10.0, only one test
9671 ;; failed, and it seems to have failed only because the version
9672 ;; of libmagic that is packaged in Guix outputs a slightly
9673 ;; different (but not wrong) string than the one that the test
9674 ;; expected.
9675 '(#:tests? #f
9676 #:phases (modify-phases %standard-phases
9677 ;; Replace a specific method call with a hard-coded
9678 ;; path to the necessary libmagic.so file in the
9679 ;; store. If we don't do this, then the method call
9680 ;; will fail to find the libmagic.so file, which in
9681 ;; turn will cause any application using
9682 ;; python-magic to fail.
9683 (add-before 'build 'hard-code-path-to-libmagic
9684 (lambda* (#:key inputs #:allow-other-keys)
9685 (let ((file (assoc-ref inputs "file")))
9686 (substitute* "magic.py"
9687 (("ctypes.util.find_library\\('magic'\\)")
9688 (string-append "'" file "/lib/libmagic.so'")))
9689 #t)))
9690 (add-before 'install 'disable-egg-compression
9691 (lambda _
9692 (let ((port (open-file "setup.cfg" "a")))
9693 (display "\n[easy_install]\nzip_ok = 0\n"
9694 port)
9695 (close-port port)
9696 #t))))))
9697 (inputs
9698 ;; python-magic needs to be able to find libmagic.so.
9699 `(("file" ,file)))
9700 (home-page
9701 "https://github.com/ahupp/python-magic")
9702 (synopsis
9703 "File type identification using libmagic")
9704 (description
9705 "This module uses ctypes to access the libmagic file type
9706identification library. It makes use of the local magic database and
9707supports both textual and MIME-type output. Note that this module and
9708the python-file module both provide a \"magic.py\" file; these two
9709modules, which are different and were developed separately, both serve
9710the same purpose: to provide Python bindings for libmagic.")
9711 (license license:expat)))
9712
9713(define-public python2-magic
9714 (package-with-python2 python-magic))
9715
9716(define-public python2-s3cmd
9717 (package
9718 (name "python2-s3cmd")
9719 (version "1.6.1")
9720 (source
9721 (origin
9722 (method url-fetch)
9723 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
9724 "s3cmd-" version ".tar.gz"))
9725 (sha256
9726 (base32
9727 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
9728 (build-system python-build-system)
9729 (arguments
9730 ;; s3cmd is written for python2 only and contains no tests.
9731 `(#:python ,python-2
9732 #:tests? #f))
9733 (propagated-inputs
9734 `(("python2-dateutil" ,python2-dateutil)
9735 ;; The python-file package also provides a magic.py module.
9736 ;; This is an unfortunate state of affairs; however, s3cmd
9737 ;; fails to install if it cannot find specifically the
9738 ;; python-magic package. Thus we include it, instead of using
9739 ;; python-file. Ironically, s3cmd sometimes works better
9740 ;; without libmagic bindings at all:
9741 ;; https://github.com/s3tools/s3cmd/issues/198
9742 ("python2-magic" ,python2-magic)))
9743 (home-page "http://s3tools.org/s3cmd")
9744 (synopsis "Command line tool for S3-compatible storage services")
9745 (description
9746 "S3cmd is a command line tool for uploading, retrieving and managing data
9747in storage services that are compatible with the Amazon Simple Storage
9748Service (S3) protocol, including S3 itself. It supports rsync-like backup,
9749GnuPG encryption, and more. It also supports management of Amazon's
9750CloudFront content delivery network.")
9751 (license license:gpl2+)))
9752
9753(define-public python-pkgconfig
9754 (package
9755 (name "python-pkgconfig")
9756 (version "1.3.1")
9757 (source
9758 (origin
9759 (method url-fetch)
9760 (uri (pypi-uri "pkgconfig" version))
9761 (sha256
9762 (base32
9763 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
9764 (build-system python-build-system)
9765 (native-inputs
9766 `(("python-nose" ,python-nose)))
9767 (inputs
9768 `(("pkg-config" ,pkg-config)))
9769 (arguments
9770 `(#:phases
9771 (modify-phases %standard-phases
9772 (add-before 'build 'patch
9773 ;; Hard-code the path to pkg-config.
9774 (lambda _
9775 (substitute* "pkgconfig/pkgconfig.py"
9776 (("cmd = 'pkg-config")
9777 (string-append "cmd = '" (which "pkg-config"))))
9778 #t))
9779 (replace 'check
9780 (lambda _
9781 (invoke "nosetests" "test.py"))))))
9782 (home-page "https://github.com/matze/pkgconfig")
9783 (synopsis "Python interface for pkg-config")
9784 (description "This module provides a Python interface to pkg-config. It
9785can be used to find all pkg-config packages, check if a package exists,
9786check if a package meets certain version requirements, query CFLAGS and
9787LDFLAGS and parse the output to build extensions with setup.py.")
9788 (license license:expat)))
9789
9790(define-public python2-pkgconfig
9791 (package-with-python2 python-pkgconfig))
9792
9793(define-public python-bz2file
9794 (package
9795 (name "python-bz2file")
9796 (version "0.98")
9797 (source
9798 (origin
9799 (method url-fetch)
9800 (uri (pypi-uri "bz2file" version))
9801 (sha256
9802 (base32
9803 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
9804 (build-system python-build-system)
9805 (arguments
9806 `(#:tests? #f)) ; Tests use deprecated python modules.
9807 (home-page "https://github.com/nvawda/bz2file")
9808 (synopsis "Read and write bzip2-compressed files")
9809 (description
9810 "Bz2file is a Python library for reading and writing bzip2-compressed
9811files. It contains a drop-in replacement for the I/O interface in the
9812standard library's @code{bz2} module, including features from the latest
9813development version of CPython that are not available in older releases.")
9814 (license license:asl2.0)))
9815
9816(define-public python2-bz2file
9817 (package-with-python2 python-bz2file))
9818
9819(define-public python-future
9820 (package
9821 (name "python-future")
d5d54030 9822 (version "0.17.1")
44d10b1f
RW
9823 (source
9824 (origin
9825 (method url-fetch)
9826 (uri (pypi-uri "future" version))
9827 (sha256
9828 (base32
d5d54030 9829 "1f2rlqn9rh7adgir52dlbqz69gsab44x0mlm8gf1cs7xvhv54137"))))
44d10b1f
RW
9830 (build-system python-build-system)
9831 ;; Many tests connect to the network or are otherwise flawed.
9832 ;; https://github.com/PythonCharmers/python-future/issues/210
9833 (arguments
9834 `(#:tests? #f))
9835 (home-page "http://python-future.org")
9836 (synopsis "Single-source support for Python 3 and 2")
9837 (description
9838 "@code{python-future} is the missing compatibility layer between Python 2 and
9839Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
9840to support both Python 2 and Python 3 with minimal overhead.")
9841 (license license:expat)))
9842
9843(define-public python2-future
9844 (package-with-python2 python-future))
9845
9846(define-public python-cysignals
9847 (package
9848 (name "python-cysignals")
8e3e51df 9849 (version "1.9.0")
44d10b1f
RW
9850 (source
9851 (origin
9852 (method url-fetch)
8e3e51df 9853 (uri (pypi-uri "cysignals" version))
44d10b1f
RW
9854 (sha256
9855 (base32
8e3e51df 9856 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
44d10b1f
RW
9857 (build-system python-build-system)
9858 (native-inputs
9859 `(("python-cython" ,python-cython)
9860 ("python-sphinx" ,python-sphinx)))
9861 (inputs
9862 `(("pari-gp" ,pari-gp)))
9863 (arguments
9864 `(#:modules ((guix build python-build-system)
9865 ((guix build gnu-build-system) #:prefix gnu:)
9866 (guix build utils))
9867 ;; FIXME: Tests are executed after installation and currently fail
9868 ;; when not installing into standard locations; the author is working
9869 ;; on a fix.
9870 #:tests? #f
9871 #:phases
9872 (modify-phases %standard-phases
9873 (add-before
9874 'build 'configure
9875 (assoc-ref gnu:%standard-phases 'configure)))))
9876 (home-page
9877 "https://github.com/sagemath/cysignals")
9878 (synopsis
9879 "Handling of interrupts and signals for Cython")
9880 (description
9881 "The cysignals package provides mechanisms to handle interrupts (and
9882other signals and errors) in Cython code, using two related approaches,
9883for mixed Cython/Python code or external C libraries and pure Cython code,
9884respectively.")
9885 (license license:lgpl3+)))
9886
9887(define-public python2-cysignals
9888 (package-with-python2 python-cysignals))
9889
9890(define-public python2-shedskin
9891 (package
9892 (name "python2-shedskin")
9893 (version "0.9.4")
9894 (source
9895 (origin
9896 (method url-fetch)
9897 (uri (string-append "https://github.com/shedskin/shedskin/"
9898 "releases/download/v" version
9899 "/shedskin-" version ".tgz"))
9900 (sha256
9901 (base32
9902 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
9903 (build-system python-build-system)
9904 (arguments
9905 `(#:python ,python-2
9906 #:phases (modify-phases %standard-phases
9907 (add-after 'unpack 'fix-resulting-include-libs
9908 (lambda* (#:key inputs #:allow-other-keys)
9909 (let ((libgc (assoc-ref inputs "libgc"))
9910 (pcre (assoc-ref inputs "pcre")))
9911 (substitute* "shedskin/makefile.py"
9912 (("variable == 'CCFLAGS':[ ]*")
9913 (string-append "variable == 'CCFLAGS':\n"
9914 " line += ' -I " pcre "/include"
9915 " -I " libgc "/include'"))
9916 (("variable == 'LFLAGS':[ ]*")
9917 (string-append "variable == 'LFLAGS':\n"
9918 " line += ' -L" pcre "/lib"
9919 " -L " libgc "/lib'")))
9920 #t))))))
9921 (inputs `(("pcre" ,pcre)
9922 ("libgc" ,libgc)))
9923 (home-page "https://shedskin.github.io/")
9924 (synopsis "Experimental Python-2 to C++ Compiler")
9925 (description (string-append "This is an experimental compiler for a subset of
9926Python. It generates C++ code and a Makefile."))
9927 (license (list license:gpl3 license:bsd-3 license:expat))))
9928
9929(define-public python2-rope
9930 (package
9931 (name "python2-rope")
a9ba0a31 9932 (version "0.11.0")
44d10b1f
RW
9933 (source
9934 (origin
9935 (method url-fetch)
9936 (uri (pypi-uri "rope" version))
9937 (sha256
9938 (base32
a9ba0a31 9939 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
44d10b1f 9940 (arguments
afb29715 9941 ;; Rope has only partial python3 support, see `python-rope'
44d10b1f
RW
9942 `(#:python ,python-2))
9943 (build-system python-build-system)
9944 (native-inputs
9945 `(("python2-unittest2" ,python2-unittest2)))
9946 (home-page "https://github.com/python-rope/rope")
9947 (synopsis "Refactoring library for Python")
9948 (description "Rope is a refactoring library for Python. It facilitates
9949the renaming, moving and extracting of attributes, functions, modules, fields
9950and parameters in Python 2 source code. These refactorings can also be applied
9951to occurrences in strings and comments.")
9952 (license license:gpl2)))
9953
2c880ef4
LC
9954(define-public python-rope
9955 (package
9956 (inherit python2-rope)
9957 (name "python-rope")
9958 (arguments `(#:python ,python-wrapper
9959 ;; XXX: Only partial python3 support, results in some failing
9960 ;; tests: <https://github.com/python-rope/rope/issues/247>.
9961 #:tests? #f))
9962 (properties `((python2-variant . ,(delay python2-rope))))))
9963
44d10b1f
RW
9964(define-public python-py3status
9965 (package
9966 (name "python-py3status")
ef68b35d 9967 (version "3.21")
44d10b1f
RW
9968 (source
9969 (origin
9970 (method url-fetch)
9971 (uri (pypi-uri "py3status" version))
9972 (sha256
ef68b35d 9973 (base32 "16z8zq83hxy48g6hh4xczbdz50qvxv9k1aahr4fqq7jis60cc262"))))
44d10b1f
RW
9974 (build-system python-build-system)
9975 (inputs
9976 `(("file" ,file)))
9977 (arguments
9978 '(#:phases
9979 (modify-phases %standard-phases
9980 ;; 'file' is used for detection of configuration file encoding
9981 ;; let's make link the dependency to particular input
9982 (add-before 'build 'patch-file-path
9983 (lambda* (#:key inputs #:allow-other-keys)
9984 (let ((file-path (assoc-ref inputs "file")))
9985 (substitute* "py3status/parse_config.py"
6a6b8a3f 9986 (("\\[\"file\", \"-b\"")
44d10b1f
RW
9987 (string-append "['" file-path "/bin/file', '-b'")))
9988 #t))))
9989 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
9990 (home-page "https://github.com/ultrabug/py3status")
9991 (synopsis "Extensible i3status wrapper written in Python")
9992 (description "py3status is an i3status wrapper which extends i3status
9993functionality in a modular way, allowing you to extend your panel with your
9994own code, responding to click events and updating clock every second.")
9995 (license license:bsd-3)))
9996
9997(define-public python-tblib
9998 (package
9999 (name "python-tblib")
10000 (version "1.3.2")
10001 (source (origin
10002 (method url-fetch)
10003 (uri (pypi-uri "tblib" version))
10004 (sha256 (base32
10005 "1rsg8h069kqgncyv8fgzyj6qflk6j10cb78pa5jk34ixwq044vj3"))))
10006 (build-system python-build-system)
10007 (arguments
10008 `(#:phases
10009 (modify-phases %standard-phases
10010 (add-before 'check 'adjust-tests
10011 (lambda _
10012 (when (which "python3")
10013 ;; Adjust the example output to match that of Python 3.7:
10014 ;; <https://github.com/ionelmc/python-tblib/issues/36>.
10015 (substitute* "README.rst"
10016 (("Exception\\('fail',") "Exception('fail'"))
10017 #t)))
10018 (replace 'check
10019 (lambda _
10020 ;; Upstream runs tests after installation and the package itself
10021 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
10022 ;; found.
10023 (setenv "PYTHONPATH"
10024 (string-append (getcwd) "/build/lib:"
10025 (getenv "PYTHONPATH")))
10026 (invoke "py.test" "-vv" "tests" "README.rst"))))))
10027 (native-inputs
10028 `(("python-pytest" ,python-pytest)
10029 ("python-six" ,python-six)))
10030 (home-page "https://github.com/ionelmc/python-tblib")
10031 (synopsis "Traceback serialization library")
10032 (description
10033 "Traceback serialization allows you to:
10034
10035@enumerate
10036@item Pickle tracebacks and raise exceptions with pickled tracebacks in
10037different processes. This allows better error handling when running code over
10038multiple processes (imagine multiprocessing, billiard, futures, celery etc).
10039
10040@item Parse traceback strings and raise with the parsed tracebacks.
10041@end enumerate\n")
10042 (license license:bsd-3)))
10043
10044(define-public python2-tblib
10045 (package-with-python2 python-tblib))
10046
10047(define-public python-greenlet
10048 (package
10049 (name "python-greenlet")
10050 (version "0.4.15")
10051 (source (origin
10052 (method url-fetch)
10053 (uri (pypi-uri "greenlet" version))
10054 (sha256
10055 (base32
10056 "1g4g1wwc472ds89zmqlpyan3fbnzpa8qm48z3z1y6mlk44z485ll"))))
10057 (build-system python-build-system)
10058 (home-page "https://greenlet.readthedocs.io/")
10059 (synopsis "Lightweight in-process concurrent programming")
10060 (description
10061 "Greenlet package is a spin-off of Stackless, a version of CPython
10062that supports micro-threads called \"tasklets\". Tasklets run
10063pseudo-concurrently (typically in a single or a few OS-level threads) and
10064are synchronized with data exchanges on \"channels\".")
10065 (license (list license:psfl license:expat))))
10066
10067(define-public python2-greenlet
10068 (package-with-python2 python-greenlet))
10069
10070(define-public python-objgraph
10071 (package
10072 (name "python-objgraph")
eebc03bb 10073 (version "3.4.1")
44d10b1f
RW
10074 (source
10075 (origin
10076 (method url-fetch)
10077 (uri (pypi-uri "objgraph" version))
10078 (sha256
10079 (base32
eebc03bb 10080 "19qmqsh984zq1rzzjy4vqnmviaqnymcyl8h7z99pnicbgwnm2adz"))))
44d10b1f
RW
10081 (build-system python-build-system)
10082 (propagated-inputs
10083 `(("python-graphviz" ,python-graphviz)))
10084 (native-inputs
10085 `(("python-mock" ,python-mock)
10086 ("graphviz" ,graphviz)))
10087 (home-page "https://mg.pov.lt/objgraph/")
10088 (synopsis "Draw Python object reference graphs with graphviz")
10089 (description
10090 "This package provides tools to draw Python object reference graphs with
10091graphviz.")
10092 (license license:expat)))
10093
ffe58d1d
MB
10094(define-public python2-objgraph
10095 (package-with-python2 python-objgraph))
10096
44d10b1f
RW
10097(define-public python-gevent
10098 (package
10099 (name "python-gevent")
10100 (version "1.3.7")
10101 (source (origin
10102 (method url-fetch)
10103 (uri (pypi-uri "gevent" version))
10104 (sha256
10105 (base32
10106 "0b0fr04qdk1p4sniv87fh8z5psac60x01pv054kpgi94520g81iz"))
10107 (modules '((guix build utils)))
10108 (snippet
10109 '(begin
10110 ;; unbunding libev and c-ares
10111 (delete-file-recursively "deps")
10112 #t))))
10113 (build-system python-build-system)
10114 (arguments
10115 `(#:modules ((ice-9 ftw)
10116 (ice-9 match)
10117 (srfi srfi-26)
10118 (guix build utils)
10119 (guix build python-build-system))
10120 #:phases (modify-phases %standard-phases
44d10b1f
RW
10121 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
10122 (lambda _
10123 (substitute* "src/gevent/subprocess.py"
10124 (("/bin/sh") (which "sh")))
10125 (for-each (lambda (file)
10126 (substitute* file
10127 (("/bin/sh") (which "sh"))
10128 (("/bin/true") (which "true"))))
10129 (find-files "src/greentest" "\\.py$"))
10130 #t))
10131 (add-before 'build 'do-not-use-bundled-sources
10132 (lambda* (#:key inputs #:allow-other-keys)
10133 (setenv "CONFIG_SHELL" (which "bash"))
10134 (setenv "LIBEV_EMBED" "false")
10135 (setenv "CARES_EMBED" "false")
10136 (setenv "EMBED" "false")
10137
b5b56b7f
MB
10138 ;; Prevent building bundled libev.
10139 (substitute* "setup.py"
10140 (("run_make=_BUILDING")
10141 "run_make=False"))
10142
44d10b1f
RW
10143 (let ((greenlet (string-append
10144 (assoc-ref inputs "python-greenlet")
10145 "/include")))
10146 (match (scandir greenlet
10147 (lambda (item)
10148 (string-prefix? "python" item)))
10149 ((python)
b5b56b7f 10150 (setenv "C_INCLUDE_PATH"
44d10b1f
RW
10151 (string-append greenlet "/" python)))))
10152 #t))
10153 (add-before 'check 'skip-timer-test
10154 (lambda _
10155 ;; XXX: Skip 'TestTimerResolution', which appears to be
10156 ;; unreliable.
10157 (substitute* "src/greentest/test__core_timer.py"
10158 (("not greentest.RUNNING_ON_CI") "False"))
10159 #t))
10160 (replace 'check
10161 (lambda _
10162 ;; Make sure the build directory is on PYTHONPATH.
10163 (setenv "PYTHONPATH"
10164 (string-append
10165 (getenv "PYTHONPATH") ":"
10166 (getcwd) "/build/"
10167 (car (scandir "build" (cut string-prefix? "lib." <>)))))
10168 (with-directory-excursion "src/greentest"
10169 ;; XXX: Many tests require network access. Instead we only
10170 ;; run known-good tests. Unfortunately we cannot use
10171 ;; recursion here since this directory also contains
10172 ;; Python-version-specific subfolders.
10173 (apply invoke "python" "testrunner.py" "--config"
10174 "known_failures.py"
10175 (scandir "." (cut regexp-exec
10176 (make-regexp "test_+(subprocess|core)")
10177 <>)))))))))
10178 (propagated-inputs
10179 `(("python-greenlet" ,python-greenlet)
10180 ("python-objgraph" ,python-objgraph)))
10181 (native-inputs
b5b56b7f 10182 `(("python-six" ,python-six)))
44d10b1f
RW
10183 (inputs
10184 `(("c-ares" ,c-ares)
10185 ("libev" ,libev)))
10186 (home-page "http://www.gevent.org/")
10187 (synopsis "Coroutine-based network library")
10188 (description
10189 "gevent is a coroutine-based Python networking library that uses greenlet
10190to provide a high-level synchronous API on top of the libev event loop.")
10191 (license license:expat)
10192 (properties `((python2-variant . ,(delay python2-gevent))))))
10193
10194(define-public python2-gevent
10195 (let ((base (package-with-python2
10196 (strip-python2-variant python-gevent))))
10197 (package
10198 (inherit base)
10199 (native-inputs `(,@(package-native-inputs python-gevent)
10200 ("python-mock" ,python2-mock))))))
10201
10202(define-public python-fastimport
10203 (package
10204 (name "python-fastimport")
10205 (version "0.9.6")
10206 (source
10207 (origin
10208 (method url-fetch)
10209 (uri (pypi-uri "fastimport" version))
10210 (sha256
10211 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
10212 (build-system python-build-system)
10213 (home-page "https://github.com/jelmer/python-fastimport")
10214 (synopsis "VCS fastimport parser and generator in Python")
10215 (description "This package provides a parser for and generator of the Git
10216@url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
10217format.")
10218 (license license:gpl2+)))
10219
10220(define-public python2-fastimport
10221 (package-with-python2 python-fastimport))
10222
10223(define-public python-twisted
10224 (package
10225 (name "python-twisted")
fdfad2fc 10226 (version "19.7.0")
44d10b1f
RW
10227 (source (origin
10228 (method url-fetch)
10229 (uri (pypi-uri "Twisted" version ".tar.bz2"))
10230 (sha256
10231 (base32
fdfad2fc 10232 "17d3hnxv9qndagzz63mdpyk99xj63p9gq586vjn0rxk8cl197nym"))))
44d10b1f
RW
10233 (build-system python-build-system)
10234 (arguments
0107c9b8 10235 '(#:tests? #f)) ; FIXME: some tests fail
44d10b1f
RW
10236 (propagated-inputs
10237 `(("python-zope-interface" ,python-zope-interface)
52ca1c4a 10238 ("python-pyhamcrest" ,python-pyhamcrest)
44d10b1f 10239 ("python-incremental" ,python-incremental)
e5ba2fe3 10240 ("python-hyperlink" ,python-hyperlink)
44d10b1f
RW
10241 ("python-constantly" ,python-constantly)
10242 ("python-automat" ,python-automat)))
10243 (home-page "https://twistedmatrix.com/")
10244 (synopsis "Asynchronous networking framework written in Python")
10245 (description
10246 "Twisted is an extensible framework for Python programming, with special
10247focus on event-based network programming and multiprotocol integration.")
10248 (license license:expat)))
10249
10250(define-public python2-twisted
10251 (package-with-python2 python-twisted))
10252
10253(define-public python-pika
10254 (package
10255 (name "python-pika")
10256 (version "0.12.0")
10257 (source
10258 (origin
10259 (method url-fetch)
10260 (uri (pypi-uri "pika" version))
10261 (sha256
10262 (base32
10263 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
10264 (build-system python-build-system)
10265 (native-inputs
10266 `(("python-pyev" ,python-pyev)
10267 ("python-tornado" ,python-tornado)
10268 ("python-twisted" ,python-twisted)))
10269 (home-page "https://pika.readthedocs.org")
10270 (synopsis "Pure Python AMQP Client Library")
10271 (description
10272 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
10273Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
10274network support library.")
10275 (license license:bsd-3)))
10276
10277(define-public python2-pika
10278 (package-with-python2 python-pika))
10279
10280(define-public python-ply
10281 (package
10282 (name "python-ply")
10283 (version "3.10")
10284 (source
10285 (origin
10286 (method url-fetch)
10287 (uri (pypi-uri "ply" version))
10288 (sha256
10289 (base32
10290 "1jxsr1d2f732r6ljhvm827113dckwl6qwakfvpbdhcbhvpvlmscn"))))
10291 (build-system python-build-system)
10292 (home-page "http://www.dabeaz.com/ply/")
10293 (synopsis "Python Lex & Yacc")
10294 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
10295It uses LR parsing and does extensive error checking.")
10296 (license license:bsd-3)))
10297
10298(define-public python2-ply
10299 (package-with-python2 python-ply))
10300
10301(define-public python-tabulate
10302 (package
10303 (name "python-tabulate")
10304 (version "0.7.7")
10305 (source (origin
10306 (method url-fetch)
10307 (uri (pypi-uri "tabulate" version))
10308 (sha256
10309 (base32
10310 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
10311 (build-system python-build-system)
10312 (arguments
10313 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
10314 ;; and the latest release is not tagged in the upstream repository.
10315 '(#:tests? #f))
10316 (home-page "https://bitbucket.org/astanin/python-tabulate")
10317 (synopsis "Pretty-print tabular data")
10318 (description
10319 "Tabulate is a library and command-line utility to pretty-print tabular
10320data in Python.")
10321 (license license:expat)))
10322
10323(define-public python2-tabulate
10324 (package-with-python2 python-tabulate))
10325
10326(define-public python-kazoo
10327 (package
10328 (name "python-kazoo")
10329 (version "2.4.0")
10330 (source
10331 (origin
10332 (method url-fetch)
10333 (uri (pypi-uri "kazoo" version))
10334 (sha256
10335 (base32
10336 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
10337 (build-system python-build-system)
10338 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
10339 (propagated-inputs
10340 `(("python-six" ,python-six)))
10341 (home-page "https://kazoo.readthedocs.org")
10342 (synopsis "High-level Zookeeper client library")
10343 (description
10344 "Kazoo is a Python client library for the Apache Zookeeper distributed
10345application service. It is designed to be easy to use and to avoid common
10346programming errors.")
10347 (license license:asl2.0)))
10348
10349(define-public python2-kazoo
10350 (package-with-python2 python-kazoo))
10351
10352(define-public python-pykafka
10353 (package
10354 (name "python-pykafka")
10355 (version "2.4.0")
10356 (source (origin
10357 (method url-fetch)
0ca1d040 10358 (uri (pypi-uri "pykafka" version))
44d10b1f
RW
10359 (sha256
10360 (base32
10361 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
10362 (build-system python-build-system)
10363 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
10364 (propagated-inputs
10365 `(("python-gevent" ,python-gevent)
10366 ("python-kazoo" ,python-kazoo)
10367 ("python-tabulate" ,python-tabulate)))
10368 (inputs
10369 `(("librdkafka" ,librdkafka)))
10370 (home-page "https://pykafka.readthedocs.io/")
10371 (synopsis "Apache Kafka client for Python")
10372 (description
10373 "PyKafka is a client for the Apache Kafka distributed messaging system.
10374It includes Python implementations of Kafka producers and consumers, which
10375are optionally backed by a C extension built on librdkafka.")
10376 (license license:asl2.0)))
10377
10378(define-public python2-pykafka
10379 (package-with-python2 python-pykafka))
10380
10381(define-public python-wcwidth
28ac442b
MB
10382 (package
10383 (name "python-wcwidth")
574a71a7 10384 (version "0.1.8")
28ac442b
MB
10385 (source (origin
10386 (method url-fetch)
10387 (uri (pypi-uri "wcwidth" version))
10388 (sha256
10389 (base32
574a71a7 10390 "1a1pzds3xzfylm5mnc5f6c1p8kiig0daqjc9gygd9rc3cj53x2zj"))))
28ac442b
MB
10391 (build-system python-build-system)
10392 (home-page "https://github.com/jquast/wcwidth")
10393 (synopsis "Measure number of terminal column cells of wide-character codes")
10394 (description "Wcwidth measures the number of terminal column cells of
44d10b1f
RW
10395wide-character codes. It is useful for those implementing a terminal emulator,
10396or programs that carefully produce output to be interpreted by one. It is a
10397Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
10398specified in POSIX.1-2001 and POSIX.1-2008.")
28ac442b 10399 (license license:expat)))
44d10b1f
RW
10400
10401(define-public python2-wcwidth
10402 (package-with-python2 python-wcwidth))
10403
10404(define-public python2-jsonrpclib
10405 (package
10406 (name "python2-jsonrpclib")
10407 (version "0.1.7")
10408 (source (origin
10409 (method url-fetch)
6571bba0 10410 (uri (pypi-uri "jsonrpclib" version))
44d10b1f
RW
10411 (sha256
10412 (base32
10413 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
10414 (build-system python-build-system)
10415 (arguments
10416 `(#:tests? #f
10417 #:python ,python-2))
10418 (home-page "https://github.com/joshmarshall/jsonrpclib/")
10419 (synopsis "Implementation of JSON-RPC specification for Python")
10420 (description
10421 "This library is an implementation of the JSON-RPC specification.
10422It supports both the original 1.0 specification, as well as the
10423new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
10424etc.")
10425 (license license:asl2.0)))
10426
10427(define-public python-chai
10428 (package
10429 (name "python-chai")
10430 (version "1.1.2")
10431 (source (origin
10432 (method url-fetch)
10433 (uri (pypi-uri "chai" version))
10434 (sha256
10435 (base32
10436 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
10437 (build-system python-build-system)
10438 (home-page "https://github.com/agoragames/chai")
10439 (synopsis "Mocking framework for Python")
10440 (description
10441 "Chai provides an api for mocking, stubbing and spying your python
10442objects, patterned after the Mocha library for Ruby.")
10443 (license license:bsd-3)))
10444
10445(define-public python2-chai
10446 (package-with-python2 python-chai))
10447
10448(define-public python-inflection
10449 (package
10450 (name "python-inflection")
10451 (version "0.3.1")
10452 (source
10453 (origin (method url-fetch)
10454 (uri (pypi-uri "inflection" version))
10455 (sha256
10456 (base32
10457 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
10458 (build-system python-build-system)
10459 (native-inputs
10460 `(("python-pytest" ,python-pytest)))
10461 (home-page "https://github.com/jpvanhal/inflection")
10462 (synopsis "Python string transformation library")
10463 (description
10464 "Inflection is a string transformation library. It singularizes
10465and pluralizes English words, and transforms strings from CamelCase to
10466underscored string.")
10467 (license license:expat)))
10468
10469(define-public python2-inflection
10470 (package-with-python2 python-inflection))
10471
10472(define-public python-pylev
10473 (package
10474 (name "python-pylev")
10475 (version "1.3.0")
10476 (source (origin
10477 (method url-fetch)
10478 (uri (pypi-uri "pylev" version))
10479 (sha256
10480 (base32
10481 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
10482 (build-system python-build-system)
10483 (home-page "https://github.com/toastdriven/pylev")
10484 (synopsis "Levenshtein distance implementation in Python")
10485 (description "Pure Python Levenshtein implementation, based off the
10486Wikipedia code samples at
10487@url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
10488 (license license:bsd-3)))
10489
10490(define-public python2-pylev
10491 (package-with-python2 python-pylev))
10492
10493(define-public python-cleo
10494 (package
10495 (name "python-cleo")
0c101a04 10496 (version "0.7.6")
44d10b1f
RW
10497 (source (origin
10498 (method url-fetch)
10499 (uri (pypi-uri "cleo" version))
10500 (sha256
10501 (base32
0c101a04 10502 "02dlc0rn43zgvw0s5v4j80bca9n1jfpwy3r78gn9qjgk0qj39kwr"))))
44d10b1f
RW
10503 (build-system python-build-system)
10504 (native-inputs
af2d3713 10505 `( ;; For testing
44d10b1f
RW
10506 ("python-mock" ,python-mock)
10507 ("python-pytest-mock" ,python-pytest-mock)
10508 ("python-pytest" ,python-pytest)))
10509 (propagated-inputs
10510 `(("python-backpack" ,python-backpack)
0c101a04 10511 ("python-clikit" ,python-clikit)
44d10b1f
RW
10512 ("python-pastel" ,python-pastel)
10513 ("python-pylev" ,python-pylev)))
10514 (home-page "https://github.com/sdispater/cleo")
10515 (synopsis "Command-line arguments library for Python")
10516 (description
10517 "Cleo allows you to create command-line commands with signature in
10518docstring and colored output.")
10519 (license license:expat)))
10520
10521(define-public python2-cleo
10522 (package-with-python2 python-cleo))
10523
2be85c45
TLC
10524(define-public python-tomlkit
10525 (package
10526 (name "python-tomlkit")
20c9914e 10527 (version "0.5.8")
2be85c45
TLC
10528 (source
10529 (origin
10530 (method url-fetch)
10531 (uri (pypi-uri "tomlkit" version))
10532 (sha256
10533 (base32
20c9914e 10534 "0sf2a4q61kf344hjbw8kb6za1hlccl89j9lzqw0l2zpddp0hrh9j"))))
2be85c45
TLC
10535 (build-system python-build-system)
10536 (native-inputs
10537 `(("python-pytest" ,python-pytest)))
10538 (home-page
10539 "https://github.com/sdispater/tomlkit")
10540 (synopsis "Style preserving TOML library")
10541 (description
10542 "TOML Kit is a 0.5.0-compliant TOML library. It includes a parser that
10543preserves all comments, indentations, whitespace and internal element ordering,
10544and makes them accessible and editable via an intuitive API. It can also
10545create new TOML documents from scratch using the provided helpers. Part of the
10546implementation as been adapted, improved and fixed from Molten.")
10547 (license license:expat)))
10548
0bb32201
TLC
10549(define-public python-shellingham
10550 (package
10551 (name "python-shellingham")
10552 (version "1.3.1")
10553 (source
10554 (origin
10555 (method url-fetch)
10556 (uri (pypi-uri "shellingham" version))
10557 (sha256
10558 (base32
10559 "1q7kws7w4x2hji3g7y0ni9ddk4sd676ylrb3db54gbpys6xj6nwq"))))
10560 (build-system python-build-system)
10561 (home-page
10562 "https://github.com/sarugaku/shellingham")
10563 (synopsis "Tool to detect surrounding shell")
10564 (description
10565 "Shellingham detects what shell the current Python executable is
10566running in.")
10567 (license license:isc)))
10568
aee92957
TLC
10569(define-public python-memcached
10570 (package
10571 (name "python-memcached")
10572 (version "1.59")
10573 (source
10574 (origin
10575 (method url-fetch)
10576 (uri (pypi-uri "python-memcached" version))
10577 (sha256
10578 (base32
10579 "0kvyapavbirk2x3n1jx4yb9nyigrj1s3x15nm3qhpvhkpqvqdqm2"))))
10580 (build-system python-build-system)
10581 (propagated-inputs `(("python-six" ,python-six)))
10582 (home-page
10583 "https://github.com/linsomniac/python-memcached")
10584 (synopsis "Pure python memcached client")
10585 (description
10586 "This software is a pure Python interface to the memcached memory cache
10587daemon. It is the client side software which allows storing values in one or
10588more, possibly remote, memcached servers.")
10589 (license license:psfl)))
10590
b2ac2508
TLC
10591(define-public python-clikit
10592 (package
10593 (name "python-clikit")
4573b94d 10594 (version "0.4.1")
b2ac2508
TLC
10595 (source
10596 (origin
10597 (method url-fetch)
10598 (uri (pypi-uri "clikit" version))
10599 (sha256
10600 (base32
4573b94d 10601 "10gab65pq0jdf589n33sj2513pxal2lisl4xwf1ijysdjxmpdr4a"))))
b2ac2508
TLC
10602 (build-system python-build-system)
10603 (propagated-inputs
10604 `(("python-pastel" ,python-pastel)
10605 ("python-pylev" ,python-pylev)))
10606 (home-page "https://github.com/sdispater/clikit")
10607 (synopsis "Group of utilities to build command line interfaces")
10608 (description
10609 "CliKit is a group of utilities to build testable command line
10610interfaces.")
10611 (license license:expat)))
10612
c6f008d6
TLC
10613(define-public python-msgpack-python
10614 (package
10615 (name "python-msgpack-python")
10616 (version "0.5.6")
10617 (source
10618 (origin
10619 (method url-fetch)
10620 (uri (pypi-uri "msgpack-python" version))
10621 (sha256
10622 (base32
10623 "16wh8qgybmfh4pjp8vfv78mdlkxfmcasg78lzlnm6nslsfkci31p"))))
10624 (build-system python-build-system)
10625 (home-page "http://msgpack.org/")
10626 (synopsis "Package to deserialize messages in MessagePack binary format")
10627 (description
10628 "MessagePack is an efficient binary serialization format. It lets you
10629exchange data among multiple languages like JSON. But it's faster and
10630smaller. Small integers are encoded into a single byte, and typical short
10631strings require only one extra byte in addition to the strings themselves.")
10632 (license license:asl2.0)))
10633
badc1c63
TLC
10634(define-public python-cachy
10635 (package
10636 (name "python-cachy")
10637 (version "0.2.0")
10638 (source
10639 (origin
10640 (method url-fetch)
10641 (uri (pypi-uri "cachy" version))
10642 (sha256
10643 (base32
10644 "0v6mjyhgx6j7ya20bk69cr3gdzdkdf6psay0h090rscclgji65dp"))))
10645 (build-system python-build-system)
10646 (native-inputs
10647 `(("python-fakeredis" ,python-fakeredis)
10648 ("python-flexmock" ,python-flexmock)
10649 ("python-pytest" ,python-pytest)))
10650 (propagated-inputs
10651 `(("python-memcached" ,python-memcached)
10652 ("python-msgpack-python" ,python-msgpack-python)
10653 ("python-redis" ,python-redis)))
10654 (home-page "https://github.com/sdispater/cachy")
10655 (synopsis "Simple yet effective caching library")
10656 (description
10657 "Cachy provides a simple yet effective caching library. A simple but
10658powerful API: thread-safety; decorator syntax; support for memcached, redis,
10659database, file, dict stores. Cachy supports python versions 2.7+ and 3.2+.")
10660 (license license:expat)))
10661
617bb67b
TLC
10662(define-public poetry
10663 (package
10664 (name "poetry")
10665 (version "0.12.17")
10666 ;; Poetry can only be built from source with poetry.
10667 (source
10668 (origin
10669 (method url-fetch)
10670 (uri (pypi-uri "poetry" version))
10671 (sha256
10672 (base32
10673 "0gxwcd65qjmzqzppf53x51sic1rbcd9py6cdzx3aprppipimslvf"))))
10674 (build-system python-build-system)
10675 (arguments
10676 `(#:tests? #f ;; Pypi does not have tests.
10677 #:phases
10678 (modify-phases %standard-phases
10679 (replace 'build
10680 (lambda _
10681 ;; Bug in poetry https://github.com/sdispater/poetry/issues/866.
10682 (invoke "sed" "-i" "-e" "s/from distutils.core/from setuptools/"
10683 "setup.py")
10684 #t)))))
10685 (propagated-inputs
10686 `(("python-cachecontrol" ,python-cachecontrol)
10687 ("python-cachy" ,python-cachy)
10688 ("python-cleo" ,python-cleo)
10689 ("python-glob2" ,python-glob2)
10690 ("python-html5lib" ,python-html5lib)
10691 ("python-jsonschema" ,python-jsonschema)
10692 ("python-msgpack" ,python-msgpack)
617bb67b
TLC
10693 ("python-pkginfo" ,python-pkginfo)
10694 ("python-pyparsing" ,python-pyparsing)
10695 ("python-pyrsistent" ,python-pyrsistent)
10696 ("python-requests" ,python-requests)
10697 ("python-requests-toolbelt" ,python-requests-toolbelt)
10698 ("python-shellingham" ,python-shellingham)
10699 ("python-tomlkit" ,python-tomlkit)
10700 ("python-virtualenv" ,python-virtualenv)))
10701 (home-page "https://poetry.eustace.io/")
10702 (synopsis "Python dependency management and packaging made easy")
10703 (description "Poetry is a tool for dependency management and packaging
10704in Python. It allows you to declare the libraries your project depends on and
10705it will manage (install/update) them for you.")
10706 (license license:expat)))
10707
44d10b1f
RW
10708(define-public python-lazy-object-proxy
10709 (package
10710 (name "python-lazy-object-proxy")
7454078a 10711 (version "1.4.3")
44d10b1f
RW
10712 (source (origin
10713 (method url-fetch)
10714 (uri (pypi-uri "lazy-object-proxy" version))
10715 (sha256
10716 (base32
7454078a 10717 "1w1aaay424ciz8fz3fkzxb0pxzfxn184f2whpyn4fx72bn50x47k"))))
63d4873b
MO
10718 (native-inputs
10719 `(("python-setuptools-scm" ,python-setuptools-scm-3.3)))
44d10b1f
RW
10720 (build-system python-build-system)
10721 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
10722 (synopsis "Lazy object proxy for python")
10723 (description
10724 "Lazy object proxy is an object that wraps a callable but defers the call
10725until the object is actually required, and caches the result of said call.")
10726 (license license:bsd-2)))
10727
10728(define-public python2-lazy-object-proxy
10729 (package-with-python2 python-lazy-object-proxy))
10730
10731(define-public python-dnspython
10732 (package
10733 (name "python-dnspython")
10734 (version "1.15.0")
10735 (source (origin
10736 (method url-fetch)
10737 (uri (string-append "http://www.dnspython.org/kits/"
10738 version "/dnspython-" version ".tar.gz"))
10739 (sha256
10740 (base32
10741 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
10742 (build-system python-build-system)
10743 (arguments '(#:tests? #f)) ; XXX: requires internet access
10744 (home-page "http://www.dnspython.org")
10745 (synopsis "DNS toolkit for Python")
10746 (description
10747 "dnspython is a DNS toolkit for Python. It supports almost all record
10748types. It can be used for queries, zone transfers, and dynamic updates.
10749It supports TSIG authenticated messages and EDNS0.")
10750 (license license:expat)))
10751
10752(define-public python2-dnspython
10753 (package-with-python2 python-dnspython))
10754
10755(define-public python-email-validator
10756 (package
10757 (name "python-email-validator")
10758 (version "1.0.2")
10759 (source
10760 (origin (method url-fetch)
10761 (uri (pypi-uri "email_validator" version))
10762 (sha256
10763 (base32
10764 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
10765 (build-system python-build-system)
10766 (arguments
10767 '(#:phases
10768 (modify-phases %standard-phases
10769 (add-before 'build 'use-dnspython
10770 (lambda _
10771 (substitute* "setup.py"
10772 (("dnspython3") "dnspython"))
10773 #t)))))
10774 (propagated-inputs
10775 `(("python-dnspython" ,python-dnspython)
10776 ("python-idna" ,python-idna)))
10777 (home-page "https://github.com/JoshData/python-email-validator")
10778 (synopsis "Email address validation library for Python")
10779 (description
10780 "This library validates email address syntax and deliverability.")
10781 (license license:cc0)))
10782
10783(define-public python2-email-validator
10784 (package-with-python2 python-email-validator))
10785
10786(define-public python-ukpostcodeparser
10787 (package
10788 (name "python-ukpostcodeparser")
10789 (version "1.0.3")
10790 (source (origin
10791 (method url-fetch)
10792 (uri (pypi-uri "UkPostcodeParser" version))
10793 (sha256
10794 (base32
10795 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
10796 (build-system python-build-system)
10797 (home-page "https://github.com/hamstah/ukpostcodeparser")
10798 (synopsis "UK Postcode parser for Python")
10799 (description
10800 "This library provides the @code{parse_uk_postcode} function for
10801parsing UK postcodes.")
10802 (license license:expat)))
10803
10804(define-public python2-ukpostcodeparser
10805 (package-with-python2 python-ukpostcodeparser))
10806
10807(define-public python-faker
10808 (package
10809 (name "python-faker")
10810 (version "0.7.9")
10811 (source (origin
10812 (method url-fetch)
10813 (uri (pypi-uri "Faker" version))
10814 (sha256
10815 (base32
10816 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
10817 (patches
10818 (search-patches "python-faker-fix-build-32bit.patch"))
10819 (modules '((guix build utils)))
10820 (snippet
10821 '(begin
10822 (for-each delete-file (find-files "." "\\.pyc$"))
10823 #t))))
10824 (build-system python-build-system)
10825 (arguments
10826 '(#:phases
10827 (modify-phases %standard-phases
10828 (replace 'check
49ff8827 10829 (lambda _ (invoke "python" "-m" "unittest" "-v" "tests"))))))
44d10b1f
RW
10830 (native-inputs
10831 `(;; For testing
10832 ("python-email-validator" ,python-email-validator)
10833 ("python-mock" ,python-mock)
10834 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
10835 (propagated-inputs
10836 `(("python-dateutil" ,python-dateutil)
10837 ("python-six" ,python-six)))
10838 (home-page "https://github.com/joke2k/faker")
10839 (synopsis "Python package that generates fake data")
10840 (description
10841 "Faker is a Python package that generates fake data such as names,
10842addresses, and phone numbers.")
10843 (license license:expat)
10844 (properties `((python2-variant . ,(delay python2-faker))))))
10845
10846(define-public python2-faker
10847 (let ((base (package-with-python2 (strip-python2-variant
10848 python-faker))))
10849 (package
10850 (inherit base)
10851 (propagated-inputs
10852 `(("python2-ipaddress" ,python2-ipaddress)
10853 ,@(package-propagated-inputs base))))))
10854
10855(define-public python-pyaml
10856 (package
10857 (name "python-pyaml")
10858 (version "18.11.0")
10859 (source (origin
10860 (method url-fetch)
10861 (uri (pypi-uri "pyaml" version))
10862 (sha256
10863 (base32
10864 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
10865 (build-system python-build-system)
10866 (native-inputs
10867 `(("python-unidecode" ,python-unidecode)))
10868 (propagated-inputs
10869 `(("python-pyyaml" ,python-pyyaml)))
10870 (home-page "https://github.com/mk-fg/pretty-yaml")
10871 (synopsis "YAML pretty-print library for Python")
10872 (description
10873 "pyaml is a PyYAML based python module to produce pretty and readable
10874YAML-serialized data.")
492e3a7a 10875 (license license:wtfpl2)))
44d10b1f
RW
10876
10877(define-public python2-pyaml
10878 (package-with-python2 python-pyaml))
10879
10880(define-public python-backpack
10881 (package
10882 (name "python-backpack")
10883 (version "0.1")
10884 (source
10885 (origin
10886 (method url-fetch)
10887 (uri (pypi-uri "backpack" version))
10888 (sha256
10889 (base32
10890 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
10891 (build-system python-build-system)
10892 (native-inputs
10893 `(("python-pytest" ,python-pytest)
10894 ("python-nose" ,python-nose)))
10895 (propagated-inputs
10896 `(("python-simplejson" ,python-simplejson)))
10897 (home-page "https://github.com/sdispater/backpack")
10898 (synopsis "Utilities for working with Python collections")
10899 (description "Backpack provides some useful utilities for working with
10900collections of data.")
10901 (license license:expat)))
10902
10903(define-public python2-backpack
10904 (package-with-python2 python-backpack))
10905
10906(define-public python-prompt-toolkit
10907 (package
10908 (name "python-prompt-toolkit")
10909 (version "2.0.7")
10910 (source
10911 (origin
10912 (method url-fetch)
10913 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10914 (sha256
10915 (base32
10916 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
10917 (build-system python-build-system)
10918 (arguments
10919 `(#:phases
10920 (modify-phases %standard-phases
10921 (delete 'check)
10922 (add-after 'install 'post-install-check
10923 (lambda* (#:key inputs outputs #:allow-other-keys)
10924 ;; HOME is needed for the test
10925 ;; "test_pathcompleter_can_expanduser".
10926 (setenv "HOME" "/tmp")
10927 (add-installed-pythonpath inputs outputs)
10928 (invoke "py.test"))))))
10929 (propagated-inputs
10930 `(("python-wcwidth" ,python-wcwidth)
10931 ("python-six" ,python-six)
10932 ("python-pygments" ,python-pygments)))
10933 (native-inputs
10934 `(("python-pytest" ,python-pytest)))
10935 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
10936 (synopsis "Library for building command line interfaces in Python")
10937 (description
10938 "Prompt-Toolkit is a library for building interactive command line
10939interfaces in Python. It's like GNU Readline but it also features syntax
10940highlighting while typing, out-of-the-box multi-line input editing, advanced
10941code completion, incremental search, support for Chinese double-width
10942characters, mouse support, and auto suggestions.")
10943 (license license:bsd-3)))
10944
10945(define-public python2-prompt-toolkit
10946 (package-with-python2 python-prompt-toolkit))
10947
10948(define-public python-prompt-toolkit-1
10949 (package (inherit python-prompt-toolkit)
10950 (version "1.0.15")
10951 (source
10952 (origin
10953 (method url-fetch)
10954 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10955 (sha256
10956 (base32
10957 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
10958
10959(define-public python2-prompt-toolkit-1
10960 (package-with-python2 python-prompt-toolkit-1))
10961
10962(define-public python-jedi
10963 (package
10964 (name "python-jedi")
296e1aea 10965 (version "0.15.1")
44d10b1f
RW
10966 (source
10967 (origin
10968 (method url-fetch)
10969 (uri (pypi-uri "jedi" version))
10970 (sha256
10971 (base32
296e1aea 10972 "0bp4pxhsynaarbvzblsn5x32lzp29svy3sxfy8i6m5iwz9s9r1ds"))))
44d10b1f
RW
10973 (build-system python-build-system)
10974 (arguments
296e1aea 10975 `(#:phases
44d10b1f 10976 (modify-phases %standard-phases
296e1aea
MC
10977 (add-after 'unpack 'disable-file-completion-test
10978 ;; A single parameterized test currently fail (see:
10979 ;; https://github.com/davidhalter/jedi/issues/1395). Remove it.
10980 (lambda _
10981 (substitute* "test/test_api/test_completion.py"
10982 ((".*'example.py', 'rb\"' \\+ join\\('\\.\\.'.*") ""))
10983 #t))
44d10b1f 10984 (replace 'check
296e1aea
MC
10985 (lambda _
10986 (setenv "HOME" "/tmp")
10987 (invoke "python" "-m" "pytest"))))))
44d10b1f
RW
10988 (native-inputs
10989 `(("python-pytest" ,python-pytest)
10990 ("python-docopt" ,python-docopt)))
10991 (propagated-inputs
10992 `(("python-parso" ,python-parso)))
10993 (home-page "https://github.com/davidhalter/jedi")
10994 (synopsis "Autocompletion and static analysis library for Python")
10995 (description
10996 "Jedi is a static analysis tool for Python that can be used in Integrated
10997Development Environments (@dfn{IDE}s) and text editors. It understands Python
10998on a deeper level than many other static analysis frameworks for Python.
10999
11000Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
11001well.")
11002 (license license:expat)))
11003
11004(define-public python2-jedi
296e1aea 11005 (package-with-python2 python-jedi))
44d10b1f
RW
11006
11007(define-public ptpython
11008 (package
11009 (name "ptpython")
11010 (version "0.34")
11011 (source (origin
11012 (method url-fetch)
11013 (uri (pypi-uri "ptpython" version))
11014 (sha256
11015 (base32
11016 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
11017 (build-system python-build-system)
11018 (arguments
11019 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
11020 (propagated-inputs
11021 `(("python-docopt" ,python-docopt)
11022 ("python-jedi" ,python-jedi)
11023 ("python-prompt-toolkit" ,python-prompt-toolkit)
11024 ("python-pygments" ,python-pygments)))
11025 (home-page "https://github.com/jonathanslenders/ptpython")
11026 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
11027 (description
11028 "ptpython is a Python read-eval-print loop with IDE-like features.
11029It supports syntax highlighting, multiline editing, autocompletion, mouse,
11030color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
11031etc.")
11032 (license license:bsd-3)
11033 (properties `((python2-variant . ,(delay ptpython-2))))))
11034
11035(define-public ptpython-2
11036 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
11037 (package
11038 (inherit base)
11039 (name "ptpython2"))))
11040
11041(define-public python-stem
11042 (package
11043 (name "python-stem")
e746d1c3 11044 (version "1.7.1")
44d10b1f
RW
11045 (source
11046 (origin
11047 (method url-fetch)
11048 (uri (pypi-uri "stem" version))
11049 (sha256
11050 (base32
e746d1c3 11051 "18lc95pmc7i089nlsb06dsxyjl5wbhxfqgdxbjcia35ndh8z7sn9"))))
44d10b1f
RW
11052 (build-system python-build-system)
11053 (arguments
11054 `(#:phases
11055 (modify-phases %standard-phases
11056 (replace 'check
11057 (lambda _
11058 (invoke "./run_tests.py" "--unit")
11059 #t)))))
11060 (native-inputs
11061 `(("python-mock" ,python-mock)
11062 ("python-pycodestyle" ,python-pycodestyle)
11063 ("python-pyflakes" ,python-pyflakes)))
11064 (home-page "https://stem.torproject.org/")
11065 (synopsis
11066 "Python controller library that allows applications to interact with Tor")
11067 (description
11068 "Stem is a Python controller library for Tor. With it you can use Tor's
11069control protocol to script against the Tor process and read descriptor data
11070relays publish about themselves.")
11071 (license license:lgpl3)))
11072
11073(define-public python2-stem
11074 (package-with-python2 python-stem))
11075
11076(define-public python-pyserial
11077 (package
11078 (name "python-pyserial")
00d81f98 11079 (version "3.4")
44d10b1f
RW
11080 (source
11081 (origin
11082 (method url-fetch)
11083 (uri (pypi-uri "pyserial" version))
11084 (sha256
11085 (base32
00d81f98 11086 "09y68bczw324a4jb9a1cfwrbjhq179vnfkkkrybbksp0vqgl0bbf"))))
44d10b1f
RW
11087 (build-system python-build-system)
11088 (arguments
11089 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
11090 ;; #:phases
11091 ;; (modify-phases %standard-phases
11092 ;; (replace 'check
11093 ;; (lambda _
11094 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
11095 (home-page
11096 "https://github.com/pyserial/pyserial")
11097 (synopsis "Python Serial Port Bindings")
11098 (description "@code{pyserial} provide serial port bindings for Python. It
11099supports different byte sizes, stop bits, parity and flow control with RTS/CTS
11100and/or Xon/Xoff. The port is accessed in RAW mode.")
11101 (license license:bsd-3)))
11102
11103(define-public python2-pyserial
11104 (package-with-python2 python-pyserial))
11105
11106(define-public python-kivy
11107 (package
11108 (name "python-kivy")
11109 (version "1.10.1")
11110 (source
11111 (origin
11112 (method url-fetch)
11113 (uri (pypi-uri "Kivy" version))
11114 (file-name (string-append name "-" version ".tar.gz"))
11115 (sha256
11116 (base32
11117 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
11118 (build-system python-build-system)
11119 (arguments
11120 `(#:tests? #f ; Tests require many optional packages
11121 #:phases
11122 (modify-phases %standard-phases
11123 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
11124 (lambda* (#:key inputs #:allow-other-keys)
11125 (setenv "KIVY_SDL2_PATH"
11126 (string-append (assoc-ref inputs "sdl-union")
11127 "/include/SDL2"))
11128 #t)))))
11129 (native-inputs
11130 `(("git" ,git)
11131 ("pkg-config" ,pkg-config)
11132 ("python-cython" ,python-cython)))
11133 (inputs
11134 `(("gstreamer" ,gstreamer)
11135 ("mesa" ,mesa)
11136 ("sdl-union"
11137 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
11138 (home-page "http://kivy.org")
11139 (synopsis
11140 "Multitouch application framework")
11141 (description
11142 "A software library for rapid development of
11143hardware-accelerated multitouch applications.")
11144 (license license:expat)))
11145
11146(define-public python2-kivy
11147 (package-with-python2 python-kivy))
11148
11149(define-public python-kivy-next
11150 (deprecated-package "python-kivy-next" python-kivy))
11151
11152(define-public python2-kivy-next
11153 (deprecated-package "python2-kivy-next" python2-kivy))
11154
11155(define-public python-binaryornot
11156 (package
11157 (name "python-binaryornot")
11158 (version "0.4.4")
11159 (source (origin
11160 (method url-fetch)
11161 (uri (pypi-uri "binaryornot" version))
11162 (sha256
11163 (base32
11164 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
11165 (build-system python-build-system)
86723f98
DM
11166 (arguments
11167 `(#:phases
11168 (modify-phases %standard-phases
ee623903 11169 (add-after 'unpack 'patch-tests
86723f98
DM
11170 (lambda _
11171 ;; TypeError: binary() got an unexpected keyword argument
11172 ;; 'average_size'.
11173 (substitute* "tests/test_check.py"
11174 (("average_size=512") ""))
11175 #t)))))
44d10b1f
RW
11176 (propagated-inputs
11177 `(("python-chardet" ,python-chardet)
11178 ("python-hypothesis" ,python-hypothesis)))
11179 (home-page "https://github.com/audreyr/binaryornot")
11180 (synopsis "Package to check if a file is binary or text")
11181 (description "Ultra-lightweight pure Python package to check if a file is
11182binary or text.")
11183 (license license:bsd-3)
11184 (properties `((python2-variant . ,(delay python2-binaryornot))))))
11185
11186(define-public python2-binaryornot
11187 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
11188 (package (inherit base)
11189 (propagated-inputs
11190 `(("python2-enum34" ,python2-enum34)
11191 ,@(package-propagated-inputs base))))))
11192
f315673d 11193(define-public python-binwalk
9b9ab657
JK
11194 (package
11195 (name "python-binwalk")
11196 (version "2.2.0")
11197 (source
11198 (origin
11199 (method git-fetch)
11200 (uri (git-reference
11201 (url "https://github.com/ReFirmLabs/binwalk")
11202 (commit (string-append "v" version))))
11203 (file-name (git-file-name name version))
11204 (sha256
11205 (base32
11206 "1bxgj569fzwv6jhcbl864nmlsi9x1k1r20aywjxc8b9b1zgqrlvc"))))
11207 (build-system python-build-system)
11208 (arguments
11209 `(#:phases
11210 (modify-phases %standard-phases
11211 (add-before 'check 'set-pythonpath
11212 (lambda _
11213 (setenv "PYTHONPATH"
11214 (string-append
11215 (getcwd) "/src/"
11216 ":" (getenv "PYTHONPATH")))
11217 (setenv "HOME" "")
11218 #t)))))
11219 (native-inputs
11220 `(("python-coverage" ,python-coverage)
11221 ("python-nose" ,python-nose)))
11222 (home-page "https://github.com/ReFirmLabs/binwalk")
11223 (synopsis "Firmware analysis tool")
11224 (description "Binwalk is a tool for analyzing, reverse engineering, and
11225extracting firmware images")
11226 (license license:expat)))
f315673d 11227
44d10b1f
RW
11228(define-public python-nltk
11229 (package
11230 (name "python-nltk")
11231 (version "3.2.1")
11232 (source (origin
11233 (method url-fetch)
11234 (uri (pypi-uri "nltk" version))
11235 (sha256
11236 (base32
11237 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
11238 (build-system python-build-system)
11239 (arguments
11240 '(;; The tests require some extra resources to be downloaded.
11241 ;; TODO Try packaging these resources.
11242 #:tests? #f))
11243 (home-page "http://nltk.org/")
11244 (synopsis "Natural Language Toolkit")
11245 (description "It provides interfaces to over 50 corpora and lexical
11246resources such as WordNet, along with a suite of text processing libraries
11247for classification, tokenization, stemming, tagging, parsing, and semantic
11248reasoning, wrappers for natural language processing libraries.")
11249 (license license:asl2.0)))
11250
11251(define-public python2-nltk
11252 (package-with-python2 python-nltk))
11253
11254(define-public python-pymongo
11255 (package
11256 (name "python-pymongo")
11257 (version "3.7.2")
11258 (source (origin
11259 (method url-fetch)
11260 (uri (pypi-uri "pymongo" version))
11261 (sha256
11262 (base32
11263 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
11264 (build-system python-build-system)
11265 (propagated-inputs
11266 `(("python-certifi" ,python-certifi)))
11267 (home-page "https://github.com/mongodb/mongo-python-driver")
11268 (synopsis "Python driver for MongoDB")
11269 (description "Python driver for MongoDB.")
11270 (license license:asl2.0)))
11271
11272(define-public python2-pymongo
11273 (package-with-python2 python-pymongo))
11274
44d10b1f
RW
11275(define-public python-consul
11276 (package
11277 (name "python-consul")
11278 (version "0.6.1")
11279 (source
11280 (origin
11281 (method url-fetch)
11282 (uri (pypi-uri "python-consul" version))
11283 (sha256
11284 (base32
11285 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
11286 (build-system python-build-system)
11287 (arguments
11288 '(#:tests? #f)) ; The tests are not distributed
11289 (propagated-inputs
11290 `(("python-requests" ,python-requests)
11291 ("python-six" ,python-six)))
11292 (home-page "https://github.com/cablehead/python-consul")
11293 (synopsis "Python client for Consul")
11294 (description
11295 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
11296discovery, monitoring and configuration.")
11297 (license license:expat)))
11298
11299(define-public python2-consul
11300 (package-with-python2 python-consul))
11301
11302(define-public python-schematics
11303 (package
11304 (name "python-schematics")
11305 (version "1.1.1")
11306 (source
1961d187
TGR
11307 (origin
11308 (method git-fetch)
11309 (uri (git-reference
11310 (url "https://github.com/schematics/schematics.git")
11311 (commit (string-append "v" version))))
11312 (file-name (git-file-name name version))
11313 (sha256
11314 (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd"))))
44d10b1f
RW
11315 (build-system python-build-system)
11316 (propagated-inputs
11317 `(("python-six" ,python-six)))
11318 (arguments
1961d187
TGR
11319 ;; The tests require a bunch of not very nice packages with fixed
11320 ;; version requirements (e.g. python-coveralls).
11321 `(#:tests? #f))
44d10b1f
RW
11322 (home-page "https://github.com/schematics/schematics")
11323 (synopsis "Python Data Structures for Humans")
11324 (description "Python Data Structures for Humans.")
11325 (license license:bsd-3)))
11326
11327(define-public python2-schematics
11328 (package-with-python2 python-schematics))
11329
11330(define-public python-odfpy
11331 (package
11332 (name "python-odfpy")
11333 (version "1.3.3")
11334 (source (origin
11335 (method url-fetch)
11336 (uri (pypi-uri "odfpy" version))
11337 (sha256
11338 (base32
11339 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
11340 (arguments
11341 `(#:modules ((srfi srfi-1)
11342 (guix build python-build-system)
11343 (guix build utils))
11344 #:phases
11345 (modify-phases %standard-phases
11346 (replace 'check
11347 ;; The test runner invokes python2 and python3 for test*.py.
11348 ;; To avoid having both in inputs, we replicate it here.
11349 (lambda _
21ccc01d
RW
11350 (for-each (lambda (test-file) (invoke "python" test-file))
11351 (find-files "tests" "^test.*\\.py$"))
11352 #t)))))
44d10b1f
RW
11353 (build-system python-build-system)
11354 (home-page "https://github.com/eea/odfpy")
11355 (synopsis "Python API and tools to manipulate OpenDocument files")
11356 (description "Collection of libraries and utility programs written in
11357Python to manipulate OpenDocument 1.2 files.")
11358 (license
11359 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
11360 ;; number of files with other licenses.
11361 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
11362
11363(define-public python2-odfpy
11364 (package-with-python2 python-odfpy))
11365
11366(define-public python-natsort
11367 (package
11368 (name "python-natsort")
11369 (version "5.4.1")
11370 (source (origin
11371 (method url-fetch)
11372 (uri (pypi-uri "natsort" version))
11373 (sha256
11374 (base32
11375 "0i732amg6yzkx4g4c9j09jmqq39q377x9cl2nbkm5hax2c2v0wxf"))))
11376 (build-system python-build-system)
11377 (arguments
11378 `(#:modules ((guix build utils)
11379 (guix build python-build-system)
11380 (srfi srfi-1)
11381 (srfi srfi-26)
11382 (ice-9 ftw))
11383 #:phases
11384 (modify-phases %standard-phases
11385 (add-before 'check 'set-cachedir
11386 ;; Tests require write access to $HOME by default
11387 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
11388 (replace 'check
11389 (lambda _
11390 (let ((cwd (getcwd)))
11391 (setenv "PYTHONPATH"
11392 (string-append
11393 cwd "/build/"
11394 (find (cut string-prefix? "lib" <>)
11395 (scandir (string-append cwd "/build")))
11396 ":"
11397 (getenv "PYTHONPATH")))
11398 (invoke "pytest" "-v")))))))
11399 (native-inputs
11400 `(("python-hypothesis" ,python-hypothesis)
11401 ("python-pytest-cov" ,python-pytest-cov)
11402 ("python-pytest-mock" ,python-pytest-mock)
11403 ("python-pytest" ,python-pytest)))
11404 (propagated-inputs ; TODO: Add python-fastnumbers.
11405 `(("python-pyicu" ,python-pyicu)))
11406 (home-page "https://github.com/SethMMorton/natsort")
11407 (synopsis "Natural sorting for python and shell")
11408 (description
11409 "Natsort lets you apply natural sorting on lists instead of
11410lexicographical. If you use the built-in @code{sorted} method in python
36a4366d
EF
11411on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4},
11412@code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20},
11413@code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that
11414identifies numbers and sorts them separately from strings. It can also sort
11415version numbers, real numbers, mixed types and more, and comes with a shell
11416command @command{natsort} that exposes this functionality in the command line.")
44d10b1f
RW
11417 (license license:expat)
11418 (properties `((python2-variant . ,(delay python2-natsort))))))
11419
11420(define-public python2-natsort
11421 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
11422 (package (inherit base)
11423 (native-inputs
11424 `(("python2-pathlib" ,python2-pathlib)
11425 ,@(package-native-inputs base))))))
11426
11427(define-public python-glances
11428 (package
11429 (name "python-glances")
a4ac25df 11430 (version "3.1.2")
44d10b1f
RW
11431 (source
11432 (origin
11433 (method url-fetch)
11434 (uri (pypi-uri "Glances" version))
11435 (sha256
a4ac25df 11436 (base32 "15384pbvw9wj4sb8zgvd9v1812vrypbyjg0acicjf1hdb3p30fkk"))
15b4c911
TGR
11437 (modules '((guix build utils)))
11438 (snippet
11439 '(begin
11440 ;; Glances phones PyPI for weekly update checks by default.
11441 ;; Disable these. The user can re-enable them if desired.
11442 (substitute* "glances/outdated.py"
11443 (("^(.*)self\\.load_config\\(config\\)\n" line indentation)
11444 (string-append indentation
11445 "self.args.disable_check_update = True\n"
11446 line)))
11447 #t))))
44d10b1f
RW
11448 (build-system python-build-system)
11449 (propagated-inputs
9898a2d3
TGR
11450 `(("python-future" ,python-future)
11451 ("python-psutil" ,python-psutil)))
a4ac25df 11452 (home-page "https://github.com/nicolargo/glances")
bab94ffa 11453 (synopsis "Cross-platform curses-based monitoring tool")
44d10b1f
RW
11454 (description
11455 "Glances is a curses-based monitoring tool for a wide variety of platforms.
bab94ffa
TGR
11456Glances uses the PsUtil library to get information from your system. It
11457monitors CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
44d10b1f
RW
11458 (license license:lgpl3+)))
11459
11460(define-public python2-glances
11461 (package-with-python2 python-glances))
11462
11463(define-public python-graphql-core
11464 (package
11465 (name "python-graphql-core")
11466 (version "0.5.3")
11467 (source
11468 (origin
11469 (method url-fetch)
11470 (uri (pypi-uri "graphql-core" version))
11471 (sha256
11472 (base32
11473 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
11474 (build-system python-build-system)
11475 (arguments
11476 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
11477 #:phases
11478 (modify-phases %standard-phases
11479 (add-after 'unpack 'patch-hardcoded-version
11480 (lambda _ (substitute*
11481 "setup.py"
11482 (("'gevent==1.1rc1'") "'gevent'"))
11483 #t)))))
11484 (native-inputs
11485 `(("python-gevent" ,python-gevent)
11486 ("python-mock" ,python-mock)
11487 ("python-pytest-mock" ,python-pytest-mock)))
11488 (propagated-inputs
11489 `(("python-promise" ,python-promise)
11490 ("python-six" ,python-six)))
11491 (home-page "https://github.com/graphql-python/graphql-core")
11492 (synopsis "GraphQL implementation for Python")
11493 (description
11494 "GraphQL implementation for Python. GraphQL is a data query language and
11495runtime designed and used to request and deliver data to mobile and web apps.
11496This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
11497to Python.")
11498 (license license:expat)))
11499
11500(define-public python2-graphql-core
11501 (package-with-python2 python-graphql-core))
11502
11503(define-public python-graphql-relay
11504 (package
11505 (name "python-graphql-relay")
11506 (version "0.4.5")
11507 (source
11508 (origin
11509 (method url-fetch)
11510 (uri (pypi-uri "graphql-relay" version))
11511 (sha256
11512 (base32
11513 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
11514 (build-system python-build-system)
11515 (arguments
11516 '(#:tests? #f)) ; The tests are not distributed
11517 (propagated-inputs
11518 `(("python-graphql-core" ,python-graphql-core)
11519 ("python-promise" ,python-promise)
11520 ("python-six" ,python-six)))
11521 (home-page "https://github.com/graphql-python/graphql-relay-py")
11522 (synopsis "Relay implementation for Python")
11523 (description
11524 "This is a library to allow the easy creation of Relay-compliant servers
11525using the GraphQL Python reference implementation of a GraphQL server. It
11526should be noted that the code is a exact port of the original
11527@url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
11528from Facebook.")
11529 (license license:expat)))
11530
11531(define-public python2-graphql-relay
11532 (package-with-python2 python-graphql-relay))
11533
11534(define-public python-graphene
11535 (package
11536 (name "python-graphene")
11537 (version "0.10.2")
11538 (source
11539 (origin
11540 (method url-fetch)
11541 (uri (pypi-uri "graphene" version))
11542 (sha256
11543 (base32
11544 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
11545 (build-system python-build-system)
11546 (propagated-inputs
11547 `(("python-graphql-core" ,python-graphql-core)
11548 ("python-graphql-relay" ,python-graphql-relay)
11549 ("python-iso8601" ,python-iso8601)
11550 ("python-promise" ,python-promise)
11551 ("python-six" ,python-six)))
11552 (arguments
11553 `(#:tests? #f)) ; no tests/ in the PyPI tarball
3dd74c8d 11554 (home-page "https://graphene-python.org/")
44d10b1f
RW
11555 (synopsis "GraphQL Framework for Python")
11556 (description
11557 "Graphene is a Python library for building GraphQL schemas/types.
11558A GraphQL schema describes your data model, and provides a GraphQL server
11559with an associated set of resolve methods that know how to fetch data.")
11560 (properties `((python2-variant . ,(delay python2-graphene))))
11561 (license license:expat)))
11562
11563(define-public python2-graphene
11564 (let ((base (package-with-python2
11565 (strip-python2-variant python-graphene))))
11566 (package (inherit base)
11567 (native-inputs
11568 `(("python2-sqlalchemy" ,python2-sqlalchemy)
11569 ,@(package-native-inputs base))))))
11570
11571(define-public python-nautilus
11572 (package
11573 (name "python-nautilus")
11574 (version "0.4.9")
11575 (source
11576 (origin
11577 (method url-fetch)
11578 (uri (pypi-uri "nautilus" version))
11579 (sha256
11580 (base32
11581 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
11582 (build-system python-build-system)
11583 (arguments `(#:tests? #f)) ; fails to import test modules
11584 (propagated-inputs
11585 `(("python-bcrypt" ,python-bcrypt)
11586 ("python-click" ,python-click)
11587 ("python-consul" ,python-consul)
11588 ("python-graphene" ,python-graphene)
11589 ("python-jinja2" ,python-jinja2)
11590 ("python-peewee" ,python-peewee)
11591 ("python-pika" ,python-pika)
11592 ("python-tornado" ,python-tornado)
11593 ("python-wtforms" ,python-wtforms)))
11594 (native-inputs
11595 `(("python-nose2" ,python-nose2)))
11596 (home-page "https://github.com/AlecAivazis/nautilus")
11597 (synopsis "Library for creating microservice applications")
11598 (description
11599 "Nautilus is a framework for flux based microservices that looks to
11600provide extendible implementations of common aspects of a cloud so that you can
11601focus on building massively scalable web applications.")
11602 (license license:expat)))
11603
11604(define-public python-snowballstemmer
11605 (package
11606 (name "python-snowballstemmer")
11607 (version "1.2.1")
11608 (source (origin
11609 (method url-fetch)
11610 (uri (pypi-uri "snowballstemmer" version))
11611 (sha256
11612 (base32
11613 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
11614 (build-system python-build-system)
11615 (arguments
11616 `(;; No tests exist
11617 #:tests? #f))
11618 (home-page "https://github.com/shibukawa/snowball_py")
11619 (synopsis "Snowball stemming library collection for Python")
11620 (description "This package provides 16 word stemmer algorithms generated
11621from Snowball algorithms. It includes the 15 original ones plus the Poerter
11622English stemmer.")
11623 (license license:bsd-3)))
11624
11625(define-public python2-snowballstemmer
11626 (package-with-python2 python-snowballstemmer))
11627
44d10b1f
RW
11628(define-public python-setproctitle
11629(package
11630 (name "python-setproctitle")
11631 (version "1.1.10")
11632 (source
11633 (origin
11634 (method url-fetch)
11635 (uri (pypi-uri "setproctitle" version))
11636 (sha256
11637 (base32
11638 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
11639 (build-system python-build-system)
11640 (arguments
11641 '(#:phases
11642 (modify-phases %standard-phases
11643 (add-before 'check 'patch-Makefile
11644 ;; Stricly this is only required for the python2 variant.
11645 ;; But adding a phase in an inherited package seems to be
11646 ;; cumbersum. So we patch even for python3.
11647 (lambda _
11648 (let ((nose (assoc-ref %build-inputs "python2-nose")))
11649 (when nose
11650 (substitute* "Makefile"
11651 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
11652 (string-append nose "/bin/nosetests "))))
11653 #t)))
11654 (replace 'check
11655 (lambda _
11656 (setenv "PYTHON" (or (which "python3") (which "python")))
11657 (setenv "PYCONFIG" (or (which "python3-config")
11658 (which "python-config")))
11659 (setenv "CC" "gcc")
11660 ;; No need to extend PYTHONPATH to find the built package, since
11661 ;; the Makefile will build anyway
11662 (invoke "make" "check"))))))
11663 (native-inputs
11664 `(("procps" ,procps))) ; required for tests
11665 (home-page
11666 "https://github.com/dvarrazzo/py-setproctitle")
11667 (synopsis
11668 "Setproctitle implementation for Python to customize the process title")
11669 (description "The library allows a process to change its title (as displayed
11670by system tools such as ps and top).
11671
11672Changing the title is mostly useful in multi-process systems, for
11673example when a master process is forked: changing the children's title
11674allows to identify the task each process is busy with. The technique
11675is used by PostgreSQL and the OpenSSH Server for example.")
11676 (license license:bsd-3)
11677 (properties `((python2-variant . ,(delay python2-setproctitle))))))
11678
11679(define-public python2-setproctitle
11680 (let ((base (package-with-python2
11681 (strip-python2-variant python-setproctitle))))
11682 (package
11683 (inherit base)
11684 (native-inputs `(("python2-nose" ,python2-nose)
11685 ,@(package-native-inputs base))))))
11686
11687(define-public python-validictory
11688 (package
11689 (name "python-validictory")
11690 (version "1.0.1")
11691 (source
11692 (origin
11693 (method url-fetch)
11694 (uri (pypi-uri "validictory" version))
11695 (sha256
11696 (base32
11697 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
11698 (build-system python-build-system)
11699 (arguments
11700 '(#:phases
11701 (modify-phases %standard-phases
11702 (add-after 'unpack 'bootstrap
11703 ;; Move the tests out of the package directory to avoid
11704 ;; packaging them.
11705 (lambda* _
11706 (rename-file "validictory/tests" "tests")
11707 (delete-file "tests/__init__.py")))
11708 (replace 'check
11709 (lambda _
11710 ;; Extend PYTHONPATH so the built package will be found.
11711 (setenv "PYTHONPATH"
11712 (string-append (getcwd) "/build/lib:"
11713 (getenv "PYTHONPATH")))
6568bd5d 11714 (invoke "py.test" "-vv" ))))))
44d10b1f
RW
11715 (native-inputs
11716 `(("python-pytest" ,python-pytest)))
11717 (home-page
11718 "https://github.com/jamesturk/validictory")
11719 (synopsis "General purpose Python data validator")
11720 (description "It allows validation of arbitrary Python data structures.
11721
11722The schema format is based on the JSON Schema
11723proposal (http://json-schema.org), so combined with json the library is also
11724useful as a validator for JSON data.")
11725 (license license:expat)))
11726
11727(define-public python2-validictory
11728 (package-with-python2 python-validictory))
11729
11730(define-public python-pyelftools
11731 (package
11732 (name "python-pyelftools")
11733 (version "0.25")
11734 (source
11735 (origin
11736 (method url-fetch)
11737 (uri (pypi-uri "pyelftools" version))
11738 (sha256
11739 (base32
11740 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
11741 (build-system python-build-system)
11742 (arguments
11743 `(#:phases
11744 (modify-phases %standard-phases
11745 (add-before 'check 'set-pythonpath
11746 (lambda _
11747 (setenv "PYTHONPATH"
11748 (string-append
11749 (getcwd) "/test/"
11750 ":" (getenv "PYTHONPATH")))
11751 #t)))))
11752 (home-page
11753 "https://github.com/eliben/pyelftools")
11754 (synopsis
11755 "Analyze binary and library file information")
11756 (description "This Python library provides interfaces for parsing and
11757analyzing two binary and library file formats; the Executable and Linking
11758Format (ELF), and debugging information in the Debugging With Attributed
11759Record Format (DWARF).")
11760 (license license:public-domain)))
11761
11762(define-public python-pyev
11763 (package
11764 (name "python-pyev")
11765 (version "0.9.0")
11766 (source
11767 (origin
11768 (method url-fetch)
11769 (uri (pypi-uri "pyev" version))
11770 (sha256
11771 (base32
11772 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
11773 (build-system python-build-system)
11774 (arguments
11775 `(#:tests? #f ; no test suite
11776 #:phases
11777 (modify-phases %standard-phases
11778 (add-after 'unpack 'patch
11779 (lambda* (#:key inputs #:allow-other-keys)
11780 (let ((libev (string-append (assoc-ref inputs "libev")
11781 "/lib/libev.so.4")))
11782 (substitute* "setup.py"
11783 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
11784 (string-append "libev_dll_name = \"" libev "\"")))))))))
11785 (inputs
11786 `(("libev" ,libev)))
11787 (home-page "http://pythonhosted.org/pyev/")
11788 (synopsis "Python libev interface")
11789 (description "Pyev provides a Python interface to libev.")
11790 (license license:gpl3)))
11791
11792(define-public python2-pyev
11793 (package-with-python2 python-pyev))
11794
11795(define-public python-imagesize
11796 (package
11797 (name "python-imagesize")
11798 (version "1.1.0")
11799 (source
11800 (origin
11801 (method url-fetch)
11802 (uri (pypi-uri "imagesize" version))
11803 (sha256
11804 (base32
11805 "1dg3wn7qpwmhgqc0r9na2ding1wif9q5spz3j9zn2riwphc2k0zk"))))
11806 (build-system python-build-system)
11807 (home-page "https://github.com/shibukawa/imagesize_py")
11808 (synopsis "Gets image size of files in various formats in Python")
11809 (description
11810 "This package allows determination of image size from
11811PNG, JPEG, JPEG2000 and GIF files in pure Python.")
11812 (license license:expat)))
11813
11814(define-public python2-imagesize
11815 (package-with-python2 python-imagesize))
11816
11817(define-public python-termstyle
11818 (package
11819 (name "python-termstyle")
11820 (version "0.1.11")
11821 (source
11822 (origin
11823 (method url-fetch)
11824 (uri (pypi-uri "termstyle" version))
11825 (sha256
11826 (base32
11827 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
11828 (build-system python-build-system)
11829 (arguments
11830 '(#:phases
11831 (modify-phases %standard-phases
11832 (replace 'check
11833 (lambda _
831080a6 11834 (invoke "python" "test3.py"))))))
44d10b1f
RW
11835 (home-page "https://github.com/gfxmonk/termstyle")
11836 (synopsis "Console text coloring for Python")
11837 (description "This package provides console text coloring for Python.")
11838 (license license:bsd-3)))
11839
11840(define-public python-argcomplete
11841 (package
11842 (name "python-argcomplete")
98aecd3a 11843 (version "1.10.3")
44d10b1f 11844 (source
98aecd3a
RW
11845 (origin
11846 (method url-fetch)
11847 (uri (pypi-uri "argcomplete" version))
11848 (sha256
11849 (base32
11850 "02jkc44drb0yjz6x28lvg6rj607n8r2irdpdvyylm8xnycn54zx3"))))
44d10b1f 11851 (build-system python-build-system)
98aecd3a
RW
11852 (arguments
11853 `(#:phases
11854 (modify-phases %standard-phases
11855 (add-after 'unpack 'embed-tool-references
11856 (lambda _
11857 (substitute* "argcomplete/bash_completion.d/python-argcomplete.sh"
11858 ((" grep")
11859 (string-append " " (which "grep")))
11860 ((" egrep")
11861 (string-append " " (which "egrep")))
11862 (("elif which")
11863 (string-append "elif " (which "which")))
11864 (("\\$\\(which")
11865 (string-append "$(" (which "which"))))
11866 #t)))))
11867 (inputs
11868 `(("grep" ,grep)
11869 ("which" ,which)))
44d10b1f 11870 (native-inputs
98aecd3a
RW
11871 `(("python-coverage" ,python-coverage)
11872 ("python-flake8" ,python-flake8)
11873 ("python-pexpect" ,python-pexpect)
11874 ("python-wheel" ,python-wheel)
44d10b1f 11875 ("tcsh" ,tcsh)
98aecd3a
RW
11876 ("fish" ,fish)
11877 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
44d10b1f
RW
11878 (home-page "https://github.com/kislyuk/argcomplete")
11879 (synopsis "Shell tab completion for Python argparse")
11880 (description "argcomplete provides extensible command line tab completion
11881of arguments and options for Python scripts using @code{argparse}. It's
11882particularly useful for programs with many options or sub-parsers that can
11883dynamically suggest completions; for example, when browsing resources over the
11884network.")
11885 (license license:asl2.0)))
11886
11887(define-public python2-argcomplete
11888 (package-with-python2 python-argcomplete))
11889
11890(define-public python-xopen
11891 (package
11892 (name "python-xopen")
24d64989 11893 (version "0.5.0")
44d10b1f
RW
11894 (source
11895 (origin
11896 (method url-fetch)
11897 (uri (pypi-uri "xopen" version))
11898 (sha256
11899 (base32
24d64989 11900 "17xbrgi23l87yg6h0qcknssp2q812miiy33qw6v45v5gx0jwv5xh"))))
44d10b1f 11901 (build-system python-build-system)
24d64989
RW
11902 (propagated-inputs
11903 `(("python-setuptools-scm" ,python-setuptools-scm)))
44d10b1f
RW
11904 (home-page "https://github.com/marcelm/xopen/")
11905 (synopsis "Open compressed files transparently")
11906 (description "This module provides an @code{xopen} function that works like
11907Python's built-in @code{open} function, but can also deal with compressed files.
11908Supported compression formats are gzip, bzip2 and, xz, and are automatically
11909recognized by their file extensions. The focus is on being as efficient as
11910possible on all supported Python versions.")
11911 (license license:expat)))
11912
11913(define-public python2-xopen
11914 (let ((base (package-with-python2
11915 (strip-python2-variant python-xopen))))
11916 (package
11917 (inherit base)
11918 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
11919 ,@(package-propagated-inputs base))))))
11920
11921(define-public python-cheetah
11922 (package
11923 (name "python-cheetah")
11924 (version "3.1.0")
11925 (source
11926 (origin
11927 (method url-fetch)
11928 (uri (pypi-uri "Cheetah3" version))
11929 (sha256
11930 (base32
11931 "1ihag9cxll6b86fc8v5lkhmr3brdbi4yiz16zpgw79yylmv8fgr9"))))
11932 (build-system python-build-system)
11933 (arguments
11934 `(#:modules ((guix build utils)
11935 (guix build python-build-system)
11936 (ice-9 ftw)
11937 (srfi srfi-1)
11938 (srfi srfi-26))
11939 #:phases (modify-phases %standard-phases
11940 (add-after 'unpack 'use-absolute-python
11941 (lambda _
11942 (substitute* "Cheetah/CheetahWrapper.py"
11943 (("#!/usr/bin/env python")
11944 (string-append "#!" (which "python"))))
11945 #t))
11946 (replace 'check
11947 (lambda _
11948 (let ((cwd (getcwd)))
11949 (setenv "PYTHONPATH"
11950 (string-append
11951 cwd "/build/"
11952 (find (cut string-prefix? "lib" <>)
11953 (scandir (string-append cwd "/build")))
11954 ":" (getenv "PYTHONPATH")))
11955 (setenv "PATH"
11956 (string-append (getenv "PATH")
11957 ":" cwd "/bin"))
11958 (setenv "TMPDIR" "/tmp")
11959
11960 (substitute* "Cheetah/Tests/Test.py"
11961 (("unittest.TextTestRunner\\(\\)")
11962 "unittest.TextTestRunner(verbosity=2)"))
11963
11964 (invoke "python" "Cheetah/Tests/Test.py")))))))
11965 (propagated-inputs
11966 `(("python-markdown" ,python-markdown))) ;optional
11967 (home-page "http://cheetahtemplate.org/")
11968 (synopsis "Template engine")
11969 (description "Cheetah is a text-based template engine and Python code
11970generator.
11971
11972Cheetah can be used as a standalone templating utility or referenced as
11973a library from other Python applications. It has many potential uses,
11974but web developers looking for a viable alternative to ASP, JSP, PHP and
11975PSP are expected to be its principle user group.
11976
11977Features:
11978@enumerate
11979@item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
11980 text-based format.
11981@item Cleanly separates content, graphic design, and program code.
11982@item Blends the power and flexibility of Python with a simple template language
11983 that non-programmers can understand.
11984@item Gives template writers full access to any Python data structure, module,
11985 function, object, or method in their templates.
11986@item Makes code reuse easy by providing an object-orientated interface to
11987 templates that is accessible from Python code or other Cheetah templates.
11988 One template can subclass another and selectively reimplement sections of it.
11989@item Provides a simple, yet powerful, caching mechanism that can dramatically
11990 improve the performance of a dynamic website.
11991@item Compiles templates into optimized, yet readable, Python code.
11992@end enumerate")
11993 (license (license:x11-style "file://LICENSE"))))
11994
11995(define-public python2-cheetah
11996 (package-with-python2 python-cheetah))
11997
11998(define-public python-dulwich
11999 (package
12000 (name "python-dulwich")
12001 (version "0.18.6")
12002 (source
12003 (origin
12004 (method url-fetch)
12005 (uri (list (string-append "https://www.dulwich.io/releases/"
12006 "dulwich-" version ".tar.gz")
12007 (pypi-uri "dulwich" version)))
12008 (sha256
12009 (base32
12010 "1aa1xfrxkc3j9s4xi0llhf5gndyi9ryprcxsqfa5fcb8ph34981q"))))
12011 (build-system python-build-system)
12012 (arguments
12013 `(#:phases
12014 (modify-phases %standard-phases
12015 (add-before 'check 'fix-tests
12016 (lambda* (#:key inputs #:allow-other-keys)
12017 ;; The tests use Popen with a custom environment which doesn't
12018 ;; include PATH.
12019 (substitute* "dulwich/tests/compat/utils.py"
12020 (("'git'") (string-append "'"
12021 (which "git")
12022 "'")))
12023 (substitute* '("dulwich/tests/test_repository.py"
12024 "dulwich/tests/test_hooks.py")
12025 (("#!/bin/sh") (string-append "#!" (which "sh"))))
12026 (setenv "TEST_RUNNER" "unittest")
12027 (setenv "PYTHONHASHSEED" "random")
12028 #t)))))
12029 (propagated-inputs
12030 `(("python-fastimport" ,python-fastimport)))
12031 (native-inputs
12032 `(("python-mock" ,python-mock)
12033 ("python-geventhttpclient" ,python-geventhttpclient)
12034 ("git" ,git)))
12035 (home-page "https://www.dulwich.io/")
12036 (synopsis "Git implementation in Python")
12037 (description "Dulwich is an implementation of the Git file formats and
12038protocols written in pure Python.")
12039 ;; Can be used with either license.
12040 (license (list license:asl2.0 license:gpl2+))))
12041
12042(define-public python2-dulwich
12043 (package-with-python2 python-dulwich))
12044
12045(define-public python-pbkdf2
12046 (package
12047 (name "python-pbkdf2")
12048 (version "1.3")
12049 (source
12050 (origin
12051 (method url-fetch)
12052 (uri (pypi-uri "pbkdf2" version))
12053 (sha256
12054 (base32
12055 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
12056 (build-system python-build-system)
12057 (arguments
12058 '(#:phases
12059 (modify-phases %standard-phases
12060 (replace 'check
12061 (lambda _
12062 (setenv "PYTHONPATH"
12063 (string-append (getcwd) "/build/lib:"
12064 (getenv "PYTHONPATH")))
ee2bb944 12065 (invoke "python" "test/test_pbkdf2.py"))))))
44d10b1f
RW
12066 (propagated-inputs
12067 `(("python-pycrypto" ,python-pycrypto))) ; optional
12068 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
12069 (synopsis "Password-based key derivation")
12070 (description "This module implements the password-based key derivation
12071function, PBKDF2, specified in RSA PKCS#5 v2.0.
12072
12073PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
12074is part of the RSA Public Key Cryptography Standards series. The provided
12075implementation takes a password or a passphrase and a salt value (and
12076optionally a iteration count, a digest module, and a MAC module) and provides
12077a file-like object from which an arbitrarly-sized key can be read.")
12078 (license license:expat)))
12079
12080(define-public python2-pbkdf2
12081 (package-with-python2 python-pbkdf2))
12082
12083(define-public python-qrcode
12084 (package
12085 (name "python-qrcode")
217ea1a1 12086 (version "6.1")
44d10b1f
RW
12087 (source
12088 (origin
12089 (method url-fetch)
12090 (uri (pypi-uri "qrcode" version))
12091 (sha256
217ea1a1 12092 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
44d10b1f
RW
12093 (build-system python-build-system)
12094 (arguments
12095 ;; FIXME: Tests require packaging 'pymaging'.
12096 '(#:tests? #f))
12097 (propagated-inputs
12098 `(("python-lxml" ,python-lxml) ; for SVG output
12099 ("python-pillow" ,python-pillow) ; for PNG output
12100 ("python-six" ,python-six)))
44d10b1f
RW
12101 (home-page "https://github.com/lincolnloop/python-qrcode")
12102 (synopsis "QR Code image generator")
12103 (description "This package provides a pure Python QR Code generator
12104module. It uses the Python Imaging Library (PIL) to allow for the generation
12105of QR Codes.
12106
12107In addition this package provides a command line tool to generate QR codes and
12108either write these QR codes to a file or do the output as ascii art at the
12109console.")
12110 (license license:bsd-3)))
12111
12112(define-public python2-qrcode
12113 (package-with-python2 python-qrcode))
12114
12115(define-public python-rst2ansi
12116 (package
12117 (name "python-rst2ansi")
12118 (version "0.1.5")
12119 (source
12120 (origin
12121 (method url-fetch)
12122 (uri (pypi-uri "rst2ansi" version))
12123 (sha256
12124 (base32
12125 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
12126 (build-system python-build-system)
12127 (propagated-inputs
12128 `(("python-docutils" ,python-docutils)))
12129 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
12130 (synopsis "Convert RST to ANSI-decorated console output")
12131 (description
12132 "Python module dedicated to rendering RST (reStructuredText) documents
12133to ansi-escaped strings suitable for display in a terminal.")
12134 (license license:expat)))
12135
12136(define-public python-ansi2html
12137 (package
12138 (name "python-ansi2html")
12139 (version "1.2.0")
12140 (source
12141 (origin
12142 (method url-fetch)
12143 (uri (pypi-uri "ansi2html" version))
12144 (sha256
12145 (base32
12146 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
12147 (build-system python-build-system)
12148 (native-inputs
12149 `(("python-mock" ,python-mock)
12150 ("python-nose" ,python-nose)))
12151 (propagated-inputs
12152 `(("python-six" ,python-six)))
12153 (home-page "https://github.com/ralphbean/ansi2html")
12154 (synopsis "Convert ANSI-decorated console output to HTML")
12155 (description
12156 "@command{ansi2html} is a Python library and command line utility for
12157convering text with ANSI color codes to HTML or LaTeX.")
12158 (license license:gpl3+)))
12159
12160(define-public python2-ansi2html
12161 (package-with-python2 python-ansi2html))
12162
12163(define-public python-ddt
12164 (package
12165 (name "python-ddt")
12166 (version "1.1.3")
12167 (source
12168 (origin
12169 (method url-fetch)
12170 (uri (pypi-uri "ddt" version))
12171 (sha256
12172 (base32
12173 "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk"))))
12174 (build-system python-build-system)
12175 (native-inputs
12176 `(("python-mock" ,python-mock)
12177 ("python-nose" ,python-nose)))
12178 (propagated-inputs
12179 `(("python-six" ,python-six)
12180 ("python-pyyaml" ,python-pyyaml)))
12181 (home-page "https://github.com/txels/ddt")
12182 (synopsis "Data-Driven Tests")
12183 (description
12184 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
12185running it with different test data, and make it appear as multiple test
12186cases.")
12187 (license license:expat)))
12188
12189(define-public python2-ddt
12190 (package-with-python2 python-ddt))
12191
12192(define-public python-pycountry
12193 (package
12194 (name "python-pycountry")
12195 (version "18.5.26")
12196 (source
12197 (origin
12198 (method url-fetch)
12199 (uri (pypi-uri "pycountry" version))
12200 (sha256
12201 (base32
12202 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
12203 (build-system python-build-system)
12204 (home-page "https://bitbucket.org/flyingcircus/pycountry")
12205 (synopsis "ISO databases for languages, countries, currencies, etc.")
12206 (description
12207 "@code{pycountry} provides the ISO databases for the standards:
12208@enumerate
12209@item 639-3 (Languages)
12210@item 3166 (Countries)
12211@item 3166-3 (Deleted Countries)
12212@item 3166-2 (Subdivisions of countries)
12213@item 4217 (Currencies)
12214@item 15924 (Scripts)
12215@end enumerate
12216It includes a copy from Debian’s pkg-isocodes and makes the data accessible
12217through a Python API.")
12218 (license license:lgpl2.1+)))
12219
12220(define-public python2-pycountry
12221 (package-with-python2 python-pycountry))
12222
12223(define-public python-pycosat
12224 (package
12225 (name "python-pycosat")
12226 (version "0.6.1")
12227 (source
12228 (origin
12229 (method url-fetch)
12230 (uri (pypi-uri "pycosat" version))
12231 (sha256
12232 (base32
12233 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
12234 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
12235 (build-system python-build-system)
12236 (home-page "https://github.com/ContinuumIO/pycosat")
12237 (synopsis "Bindings to picosat (a SAT solver)")
12238 (description
12239 "This package provides efficient Python bindings to @code{picosat} on
12240the C level. When importing pycosat, the @code{picosat} solver becomes part
12241of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
12242Problem} (SAT) solver.")
12243 (license license:expat)))
12244
12245(define-public python2-pycosat
12246 (package-with-python2 python-pycosat))
12247
12248(define-public python2-ruamel.ordereddict
12249 (package
12250 (name "python2-ruamel.ordereddict")
12251 (version "0.4.9")
12252 (source
12253 (origin
12254 (method url-fetch)
12255 (uri (pypi-uri "ruamel.ordereddict" version))
12256 (sha256
12257 (base32
12258 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
12259 (build-system python-build-system)
12260 (arguments
12261 `(#:python ,python-2
12262 #:phases
12263 (modify-phases %standard-phases
12264 (delete 'check)
12265 (add-after 'install 'check
12266 (lambda* (#:key inputs outputs #:allow-other-keys)
12267 (add-installed-pythonpath inputs outputs)
f987ac30 12268 (invoke "python" "test/testordereddict.py"))))))
44d10b1f
RW
12269 (home-page "https://bitbucket.org/ruamel/ordereddict")
12270 (synopsis "Version of dict that keeps keys in insertion order")
12271 (description
12272 "This is an implementation of an ordered dictionary with @dfn{Key
12273Insertion Order} (KIO: updates of values do not affect the position of the
12274key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
12275removed and put at the back). The standard library module @code{OrderedDict},
12276implemented later, implements a subset of @code{ordereddict} functionality.
12277Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
12278Order} (KSO, no sorting function can be specified, but a transform can be
12279specified to apply on the key before comparison (e.g. @code{string.lower})).")
12280 (license license:expat)))
12281
12282(define-public python-pypeg2
12283 (package
12284 (name "python-pypeg2")
12285 (version "2.15.2")
12286 (source
12287 (origin
12288 (method url-fetch)
12289 (uri (pypi-uri "pyPEG2" version))
12290 (sha256
12291 (base32
12292 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
12293 (build-system python-build-system)
12294 (propagated-inputs `(("python-lxml" ,python-lxml)))
12295 (arguments
12296 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
12297 '(#:tests? #f))
12298 (home-page "https://fdik.org/pyPEG/")
12299 (synopsis "Parsering Expression Grammars in Python")
12300 (description "PyPEG is an intrinsic parser interpreter framework for
12301Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
12302parse many formal languages.")
12303 (license license:gpl2)))
12304
12305(define-public python-incremental
12306 (package
12307 (name "python-incremental")
12308 (version "17.5.0")
12309 (source
12310 (origin
12311 (method url-fetch)
12312 (uri (pypi-uri "incremental" version))
12313 (sha256
12314 (base32
12315 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
12316 (build-system python-build-system)
12317 (home-page "https://github.com/hawkowl/incremental")
12318 (synopsis "Library for versioning Python projects")
12319 (description "Incremental is a small library that versions your Python
12320projects.")
12321 (license license:expat)))
12322
12323(define-public python2-incremental
12324 (package-with-python2 python-incremental))
12325
12326(define-public python-invoke
12327 (package
12328 (name "python-invoke")
12329 (home-page "http://www.pyinvoke.org/")
a5662319 12330 (version "1.3.0")
44d10b1f
RW
12331 (source (origin
12332 (method url-fetch)
12333 (uri (pypi-uri "invoke" version))
12334 (sha256
12335 (base32
a5662319 12336 "1nn7gad0rvy492acpyhkrp01zsk86acf34qhsvq4xmm6x39788n5"))))
44d10b1f
RW
12337 (build-system python-build-system)
12338 (arguments
12339 ;; XXX: Requires many dependencies that are not yet in Guix.
12340 `(#:tests? #f))
12341 (synopsis "Pythonic task execution")
12342 (description
12343 "Invoke is a Python task execution tool and library, drawing inspiration
12344from various sources to arrive at a powerful and clean feature set. It is
12345evolved from the Fabric project, but focuses on local and abstract concerns
12346instead of servers and network commands.")
12347 (license license:bsd-3)))
12348
12349(define-public python2-invoke
12350 (package-with-python2 python-invoke))
12351
12352(define-public python-automat
12353 (package
12354 (name "python-automat")
919d80a0 12355 (version "0.7.0")
44d10b1f
RW
12356 (source (origin
12357 (method url-fetch)
12358 (uri (pypi-uri "Automat" version))
12359 (sha256
12360 (base32
919d80a0 12361 "03ivg70n3b1cbcd2zvjhk8y4kmqxcvhmili39lmgx09dza1qpmyb"))))
44d10b1f
RW
12362 (build-system python-build-system)
12363 ;; We disable the tests because they require python-twisted, while
12364 ;; python-twisted depends on python-automat. Twisted is optional, but the
12365 ;; tests fail if it is not available. Also see
12366 ;; <https://github.com/glyph/automat/issues/71>.
12367 (arguments '(#:tests? #f))
12368 (native-inputs
12369 `(("python-m2r" ,python-m2r)
12370 ("python-setuptools-scm" ,python-setuptools-scm)
12371 ("python-graphviz" ,python-graphviz)))
12372 (propagated-inputs
12373 `(("python-six" ,python-six)
12374 ("python-attrs" ,python-attrs)))
12375 (home-page "https://github.com/glyph/Automat")
12376 (synopsis "Self-service finite-state machines")
12377 (description "Automat is a library for concise, idiomatic Python
12378expression of finite-state automata (particularly deterministic finite-state
12379transducers).")
12380 (license license:expat)))
12381
12382(define-public python2-automat
12383 (package-with-python2 python-automat))
12384
12385(define-public python-m2r
12386 (package
12387 (name "python-m2r")
bcfb8fac 12388 (version "0.2.1")
44d10b1f
RW
12389 (source (origin
12390 (method url-fetch)
12391 (uri (pypi-uri "m2r" version))
12392 (sha256
12393 (base32
bcfb8fac 12394 "16gdm8i06jjmlpvckpfmlkr4693dh0vs192vgsqn84fsdkbbm45z"))))
44d10b1f
RW
12395 (build-system python-build-system)
12396 (propagated-inputs
12397 `(("python-docutils" ,python-docutils)
12398 ("python-mistune" ,python-mistune)))
12399 (native-inputs
12400 `(("python-pygments" ,python-pygments)
12401 ("python-mock" ,python-mock)))
12402 (home-page "https://github.com/miyakogi/m2r")
12403 (synopsis "Markdown to reStructuredText converter")
12404 (description "M2R converts a markdown file including reST markups to valid
12405reST format.")
12406 (license license:expat)))
12407
12408(define-public python2-m2r
12409 (package-with-python2 python-m2r))
12410
12411(define-public python-constantly
12412 (package
12413 (name "python-constantly")
12414 (version "15.1.0")
12415 (source (origin
12416 (method url-fetch)
12417 (uri (pypi-uri "constantly" version))
12418 (sha256
12419 (base32
12420 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
12421 (build-system python-build-system)
12422 (home-page "https://github.com/twisted/constantly")
12423 (synopsis "Symbolic constants in Python")
12424 (description "Constantly is a Python library that provides symbolic
12425constant support. It includes collections and constants with text, numeric,
12426and bit flag values.")
12427 (license license:expat)))
12428
12429(define-public python2-constantly
12430 (package-with-python2 python-constantly))
12431
12432(define-public python-attrs
12433 (package
12434 (name "python-attrs")
c41d5144 12435 (version "19.1.0")
44d10b1f
RW
12436 (source (origin
12437 (method url-fetch)
12438 (uri (pypi-uri "attrs" version))
12439 (sha256
12440 (base32
c41d5144 12441 "16g33zr5f449lqc5wgvzpknxryfzrfsxcr6kpgxwn7l5fkv71f7h"))))
44d10b1f
RW
12442 (build-system python-build-system)
12443 (arguments
12444 `(#:modules ((guix build utils)
12445 (guix build python-build-system)
12446 (ice-9 ftw)
12447 (srfi srfi-1)
12448 (srfi srfi-26))
12449 #:phases (modify-phases %standard-phases
12450 (replace 'check
12451 (lambda _
12452 (let ((cwd (getcwd)))
12453 (setenv "PYTHONPATH"
12454 (string-append
12455 cwd "/build/"
12456 (find (cut string-prefix? "lib" <>)
12457 (scandir (string-append cwd "/build")))
12458 ":"
12459 (getenv "PYTHONPATH")))
12460 (invoke "python" "-m" "pytest")))))))
12461 (native-inputs
12462 `(("python-coverage" ,python-coverage)
12463 ("python-hypothesis" ,python-hypothesis)
12464 ("python-pympler" ,python-pympler)
12465 ("python-pytest" ,python-pytest)
12466 ("python-six" ,python-six)
12467 ("python-sphinx" ,python-sphinx)
12468 ("python-zope-interface" ,python-zope-interface)))
12469 (home-page "https://github.com/python-attrs/attrs/")
12470 (synopsis "Attributes without boilerplate")
12471 (description "@code{attrs} is a Python package with class decorators that
12472ease the chores of implementing the most common attribute-related object
12473protocols.")
12474 (license license:expat)))
12475
12476(define-public python2-attrs
12477 (package-with-python2 python-attrs))
12478
12479(define-public python-attrs-bootstrap
12480 (package
12481 (inherit python-attrs)
12482 (name "python-attrs-bootstrap")
44d10b1f
RW
12483 (native-inputs `())
12484 (arguments `(#:tests? #f))))
12485
12486(define-public python2-attrs-bootstrap
12487 (package-with-python2 python-attrs-bootstrap))
12488
12489(define-public python2-cliapp
12490 (package
12491 (name "python2-cliapp")
9064b84e 12492 (version "1.20180812.1")
44d10b1f
RW
12493 (source
12494 (origin
12495 (method url-fetch)
12496 (uri (string-append
12497 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
12498 version ".tar.gz"))
12499 (sha256
12500 (base32
9064b84e 12501 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
44d10b1f
RW
12502 (build-system python-build-system)
12503 (arguments
12504 `(#:python ,python-2
12505 #:phases
12506 (modify-phases %standard-phases
12507 ;; check phase needs to be run before the build phase. If not,
12508 ;; coverage-test-runner looks for tests for the built source files,
12509 ;; and fails.
12510 (delete 'check)
12511 (add-before 'build 'check
12512 (lambda _
12513 ;; Disable python3 tests
12514 (substitute* "check"
12515 (("python3") "# python3"))
6c826d32 12516 (invoke "./check"))))))
44d10b1f
RW
12517 (native-inputs
12518 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
12519 ("python2-pep8" ,python2-pep8)))
12520 (propagated-inputs
12521 `(("python2-pyaml" ,python2-pyaml)))
12522 (home-page "https://liw.fi/cliapp/")
12523 (synopsis "Python framework for command line programs")
12524 (description "@code{python2-cliapp} is a python framework for
12525command line programs. It contains the typical stuff such programs
12526need to do, such as parsing the command line for options, and
12527iterating over input files.")
12528 (license license:gpl2+)))
12529
12530(define-public python2-ttystatus
12531 (package
12532 (name "python2-ttystatus")
e516a9c2 12533 (version "0.36")
44d10b1f
RW
12534 (source
12535 (origin
12536 (method url-fetch)
12537 (uri (string-append
12538 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
12539 version ".tar.gz"))
12540 (sha256
12541 (base32
e516a9c2 12542 "06mdk4d19zw2j3is54gndhzl396g3xc8k52m7i86z69s9hcz71by"))))
44d10b1f
RW
12543 (build-system python-build-system)
12544 (native-inputs
12545 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
12546 ("python2-pep8" ,python2-pep8)))
12547 (arguments
12548 `(#:python ,python-2
12549 #:phases
12550 (modify-phases %standard-phases
12551 ;; check phase needs to be run before the build phase. If not,
12552 ;; coverage-test-runner looks for tests for the built source files,
12553 ;; and fails.
12554 (delete 'check)
12555 (add-before 'build 'check
cbeee881 12556 (lambda _ (invoke "make" "check"))))))
44d10b1f
RW
12557 (home-page "https://liw.fi/ttystatus/")
12558 (synopsis "Python library for showing progress reporting and
12559status updates on terminals")
12560 (description "@code{python2-ttystatus} is a python library for
12561showing progress reporting and status updates on terminals, for
12562command line programs. Output is automatically adapted to the width
12563of the terminal: truncated if it does not fit, and resized if the
12564terminal size changes.")
12565 (license license:gpl3+)))
12566
12567(define-public python2-tracing
12568 (package
12569 (name "python2-tracing")
12570 (version "0.10")
12571 (source
12572 (origin
12573 (method url-fetch)
12574 (uri (string-append
12575 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
12576 version ".tar.gz"))
12577 (sha256
12578 (base32
12579 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
12580 (build-system python-build-system)
12581 (arguments
12582 `(#:python ,python-2))
12583 (home-page "https://liw.fi/tracing/")
12584 (synopsis "Python debug logging helper")
12585 (description "@code{python2-tracing} is a python library for
12586logging debug messages. It provides a way to turn debugging messages
12587on and off, based on the filename they occur in. It is much faster
12588than using @code{logging.Filter} to accomplish the same thing, which
12589matters when code is run in production mode. The actual logging still
12590happens using the @code{logging} library.")
12591 (license license:gpl3+)))
12592
12593(define-public python2-larch
12594 (package
12595 (name "python2-larch")
12596 (version "1.20151025")
12597 (source
12598 (origin
12599 (method url-fetch)
12600 (uri (string-append
12601 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
12602 version ".tar.gz"))
12603 (patches (search-patches
12604 "python2-larch-coverage-4.0a6-compatibility.patch"))
12605 (sha256
12606 (base32
12607 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
12608 (build-system python-build-system)
12609 (arguments
12610 `(#:python ,python-2
12611 #:phases
12612 (modify-phases %standard-phases
12613 ;; check phase needs to be run before the build phase. If not,
12614 ;; coverage-test-runner looks for tests for the built source files,
12615 ;; and fails.
12616 (delete 'check)
12617 (add-before 'build 'check
204ad455 12618 (lambda _ (invoke "make" "check"))))))
44d10b1f
RW
12619 (native-inputs
12620 `(("cmdtest" ,cmdtest)
12621 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
12622 (propagated-inputs
12623 `(("python2-tracing" ,python2-tracing)))
12624 (home-page "https://liw.fi/larch/")
12625 (synopsis "Python copy-on-write B-tree library")
12626 (description "@code{python2-larch} is an implementation of
12627particular kind of B-tree, based on research by Ohad Rodeh. See
12628@url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
12629on the data structure.
12630
12631The distinctive feature of this B-tree is that a node is never
12632(conceptually) modified. Instead, all updates are done by
12633copy-on-write. This makes it easy to clone a tree, and modify only the
12634clone, while other processes access the original tree.")
12635 (license license:gpl3+)))
12636
12637(define-public python-astroid
12638 (package
12639 (name "python-astroid")
1c43c698 12640 (version "2.3.3")
44d10b1f
RW
12641 (source
12642 (origin
12643 (method url-fetch)
12644 (uri (pypi-uri "astroid" version))
12645 (sha256
1c43c698 12646 (base32 "0fnibsl2cb5mvzbfm7sycj85smx48f8w8m7ks1sqlmpr9ps0gski"))))
44d10b1f
RW
12647 (build-system python-build-system)
12648 (propagated-inputs
12649 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
12650 ("python-six" ,python-six)
f0935460 12651 ("python-typed-ast" ,python-typed-ast)
44d10b1f
RW
12652 ("python-wrapt" ,python-wrapt)))
12653 (native-inputs
12654 `(("python-dateutil" ,python-dateutil)
12655 ("python-nose" ,python-nose)
12656 ("python-pytest" ,python-pytest)
12657 ("python-pytest-runner" ,python-pytest-runner)))
12658 (arguments
12659 `(#:phases
12660 (modify-phases %standard-phases
12661 (add-after 'unpack 'remove-spurious-test
12662 (lambda _
12663 ;; This can be removed after upgrading from python-3.7
12664 ;; https://github.com/PyCQA/astroid/issues/593
12665 ;; https://bugs.python.org/issue34056
12666 (delete-file "astroid/tests/unittest_modutils.py")
12667 #t))
12668 (replace 'check
12669 (lambda _
12670 (invoke "pytest" "astroid"))))))
12671 (home-page "https://github.com/PyCQA/astroid")
12672 (synopsis "Common base representation of python source code for pylint and
12673other projects")
12674 (description "@code{python-astroid} provides a common base representation
12675of python source code for projects such as pychecker, pyreverse, pylint, etc.
12676
12677It provides a compatible representation which comes from the _ast module. It
12678rebuilds the tree generated by the builtin _ast module by recursively walking
12679down the AST and building an extended ast. The new node classes have
12680additional methods and attributes for different usages. They include some
12681support for static inference and local name scopes. Furthermore, astroid
12682builds partial trees by inspecting living objects.")
12683 (license license:lgpl2.1+)
12684 (properties `((python2-variant . ,(delay python2-astroid))))))
12685
12686(define-public python2-astroid
12687 (let ((base (package-with-python2
12688 (strip-python2-variant python-astroid))))
12689 (package (inherit base)
12690 ;; Version 2.x removes python2 support.
12691 (version "1.6.5")
12692 (source
12693 (origin
12694 (method url-fetch)
12695 (uri (pypi-uri "astroid" version))
12696 (sha256
12697 (base32
12698 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
12699 (arguments
12700 (substitute-keyword-arguments (package-arguments base)
12701 ((#:phases phases)
12702 `(modify-phases ,phases
12703 (add-after 'unpack 'remove-spurious-test
12704 (lambda _
12705 ;; https://github.com/PyCQA/astroid/issues/276
12706 (delete-file "astroid/tests/unittest_brain.py")
12707 #t))
12708 (replace 'check
12709 (lambda _
12710 (invoke"python" "-m" "unittest" "discover"
12711 "-p" "unittest*.py")))))))
12712 (native-inputs `())
12713 (propagated-inputs
12714 `(("python2-backports-functools-lru-cache"
12715 ,python2-backports-functools-lru-cache)
12716 ("python2-enum34" ,python2-enum34)
12717 ("python2-singledispatch" ,python2-singledispatch)
741f98b3
MO
12718 ,@(alist-delete "python-typed-ast"
12719 (package-propagated-inputs base)))))))
44d10b1f
RW
12720
12721(define-public python-isort
12722 (package
12723 (name "python-isort")
e2227b6a 12724 (version "4.3.4")
44d10b1f
RW
12725 (source
12726 (origin
e2227b6a
EF
12727 (method git-fetch)
12728 (uri (git-reference
12729 ;; Tests pass only from the Github sources
12730 (url "https://github.com/timothycrosley/isort")
12731 (commit version)))
12732 (file-name (git-file-name name version))
44d10b1f
RW
12733 (sha256
12734 (base32
e2227b6a 12735 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
44d10b1f
RW
12736 (build-system python-build-system)
12737 (native-inputs
12738 `(("python-mock" ,python-mock)
12739 ("python-pytest" ,python-pytest)))
12740 (home-page "https://github.com/timothycrosley/isort")
12741 (synopsis "Python utility/library to sort python imports")
12742 (description "@code{python-isort} is a python utility/library to sort
12743imports alphabetically, and automatically separated into sections. It
12744provides a command line utility, a python library and plugins for various
12745editors.")
e2227b6a
EF
12746 (license license:expat)
12747 (properties `((python2-variant . ,(delay python2-isort))))))
44d10b1f
RW
12748
12749(define-public python2-isort
e2227b6a
EF
12750 (let ((base (package-with-python2
12751 (strip-python2-variant python-isort))))
12752 (package (inherit base)
12753 (native-inputs
12754 `(("python2-futures" ,python2-futures)
12755 ,@(package-native-inputs base))))))
44d10b1f
RW
12756
12757(define-public python2-backports-functools-lru-cache
12758 (package
12759 (name "python2-backports-functools-lru-cache")
12760 (version "1.5")
12761 (source
12762 (origin
12763 (method url-fetch)
12764 ;; only the pypi tarballs contain the necessary metadata
12765 (uri (pypi-uri "backports.functools_lru_cache" version))
12766 (sha256
12767 (base32
12768 "06jgv8gib4fhky0p5cmxdghvsgjyzcdgk48k8pxb1ccf11znk64x"))))
12769 (build-system python-build-system)
12770 (native-inputs
12771 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
12772 (arguments
12773 `(#:python ,python-2))
12774 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
12775 (synopsis "Backport of functools.lru_cache from Python 3.3")
12776 (description "@code{python2-backports-functools-lru-cache} is a backport
12777of @code{functools.lru_cache} from python 3.3.")
12778 (license license:expat)))
12779
12780(define-public python-configparser
12781 (package
12782 (name "python-configparser")
84127f8c 12783 (version "3.7.1")
44d10b1f
RW
12784 (source
12785 (origin
12786 (method url-fetch)
84127f8c 12787 (uri (pypi-uri "configparser" version))
44d10b1f
RW
12788 (sha256
12789 (base32
84127f8c 12790 "0cnz213il9lhgda6x70fw7mfqr8da43s3wm343lwzhqx94mgmmav"))))
44d10b1f 12791 (build-system python-build-system)
809f003f 12792 (home-page "https://github.com/jaraco/configparser/")
44d10b1f
RW
12793 (synopsis "Backport of configparser from python 3.5")
12794 (description "@code{python-configparser} is a backport of
12795@code{configparser} from Python 3.5 so that it can be used directly
12796in other versions.")
12797 (license license:expat)))
12798
12799(define-public python2-configparser
12800 (package-with-python2 python-configparser))
12801
12802(define-public python-mando
12803 (package
12804 (name "python-mando")
12805 (version "0.6.4")
12806 (source (origin
12807 (method url-fetch)
12808 (uri (pypi-uri "mando" version))
12809 (sha256
12810 (base32
12811 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
12812 (build-system python-build-system)
12813 (propagated-inputs
12814 `(("python-rst2ansi" ,python-rst2ansi)
12815 ("python-six" ,python-six)))
12816 (native-inputs
12817 `(("python-pytest" ,python-pytest)))
12818 (home-page "https://mando.readthedocs.org/")
12819 (synopsis
12820 "Wrapper around argparse, allowing creation of complete CLI applications")
12821 (description
12822 "This package is a wrapper around argparse, allowing you to write complete CLI
12823applications in seconds while maintaining all the flexibility.")
12824 (license license:expat)))
12825
12826(define-public python2-mando
12827 (package-with-python2 python-mando))
12828
70daf82f
RW
12829(define-public python2-argparse
12830 (package
12831 (name "python2-argparse")
12832 (version "1.4.0")
12833 (source
12834 (origin
12835 (method url-fetch)
12836 (uri (pypi-uri "argparse" version))
12837 (sha256
12838 (base32
12839 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
12840 (build-system python-build-system)
12841 (arguments
12842 `(#:python ,python-2))
12843 (home-page "https://github.com/ThomasWaldmann/argparse/")
12844 (synopsis "Python command-line parsing library")
12845 (description
12846 "This package is mostly for people who want to have @code{argparse} on
12847older Pythons because it was not part of the standard library back then.")
12848 (license license:psfl)))
12849
44d10b1f
RW
12850(define-public python-fudge
12851 (package
12852 (name "python-fudge")
12853 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
12854 ;; package, which is currently the only use of this package.
12855 (version "0.9.6")
12856 (source
12857 (origin
12858 (method url-fetch)
12859 (uri (pypi-uri "fudge" version))
12860 (sha256
12861 (base32
12862 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
12863 (build-system python-build-system)
12864 (arguments
12865 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
12866 (home-page "https://github.com/fudge-py/fudge")
12867 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
12868 (description
12869 "Fudge is a Python module for using fake objects (mocks and stubs) to
12870test real ones.
12871
12872In readable Python code, you declare the methods available on your fake object
12873and how they should be called. Then you inject that into your application and
12874start testing. This declarative approach means you don’t have to record and
12875playback actions and you don’t have to inspect your fakes after running code.
12876If the fake object was used incorrectly then you’ll see an informative
12877exception message with a traceback that points to the culprit.")
12878 (license license:expat)))
12879
12880(define-public python2-fudge
12881 (package-with-python2 python-fudge))
12882
12883(define-public python-mwclient
12884 (package
12885 (name "python-mwclient")
957c6833 12886 (version "0.10.0")
44d10b1f
RW
12887 (source
12888 (origin
957c6833 12889 (method git-fetch)
44d10b1f 12890 ;; The PyPI version wouldn't contain tests.
957c6833
EF
12891 (uri (git-reference
12892 (url "https://github.com/mwclient/mwclient")
12893 (commit (string-append "v" version))))
12894 (file-name (git-file-name name version))
44d10b1f
RW
12895 (sha256
12896 (base32
957c6833 12897 "1c3q6lwmb05yqywc4ya98ca7hsl15niili8rccl4n1yqp77c103v"))))
44d10b1f
RW
12898 (build-system python-build-system)
12899 (propagated-inputs
957c6833 12900 `(("python-requests-oauthlib" ,python-requests-oauthlib)
44d10b1f
RW
12901 ("python-six" ,python-six)))
12902 (native-inputs
12903 `(("python-mock" ,python-mock)
12904 ("python-pytest" ,python-pytest)
44d10b1f 12905 ("python-pytest-cov" ,python-pytest-cov)
957c6833 12906 ("python-pytest-runner" ,python-pytest-runner)
44d10b1f
RW
12907 ("python-responses" ,python-responses)))
12908 (home-page "https://github.com/btongminh/mwclient")
12909 (synopsis "MediaWiki API client")
12910 (description "This package provides a MediaWiki API client.")
12911 (license license:expat)))
12912
12913(define-public python2-mwclient
12914 (package-with-python2 python-mwclient))
12915
12916(define-public python-utils
12917 (package
12918 (name "python-utils")
12919 (version "2.1.0")
12920 (source (origin
12921 (method url-fetch)
12922 (uri (pypi-uri "python-utils" version))
12923 (sha256
12924 (base32
12925 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
12926 (build-system python-build-system)
12927 (native-inputs
12928 `(("pytest-runner" ,python-pytest-runner)
12929 ("pytest" ,python-pytest)
12930 ("six" ,python-six)))
12931 (home-page "https://github.com/WoLpH/python-utils")
12932 (synopsis "Convenient utilities not included with the standard Python install")
12933 (description
12934 "Python Utils is a collection of small Python functions and classes which
12935make common patterns shorter and easier.")
12936 (license license:bsd-2)))
12937
12938(define-public python2-utils
12939 (package-with-python2 python-utils))
12940
44d10b1f
RW
12941(define-public python-diff-match-patch
12942 (package
12943 (name "python-diff-match-patch")
12944 (version "20121119")
12945 (source
12946 (origin
12947 (method url-fetch)
12948 (uri (pypi-uri "diff-match-patch" version))
12949 (sha256
12950 (base32
12951 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
12952 (build-system python-build-system)
12953 (home-page "https://code.google.com/p/google-diff-match-patch")
12954 (synopsis "Synchronize plain text")
12955 (description "Diff Match and Patch libraries offer robust algorithms to
12956perform the operations required for synchronizing plain text.")
12957 (license license:asl2.0)))
12958
12959(define-public python2-diff-match-patch
12960 (package-with-python2 python-diff-match-patch))
12961
12962(define-public python-dirsync
12963 (package
12964 (name "python-dirsync")
12965 (version "2.2.3")
12966 (source
12967 (origin
12968 (method url-fetch)
12969 (uri (pypi-uri "dirsync" version))
12970 (sha256
12971 (base32
12972 "1r40fkanksagcszf1ag85mdr8w7rgc7196n6s1qlsk2abw6i7v0z"))))
12973 (build-system python-build-system)
12974 (propagated-inputs
12975 `(("six" ,python-six)))
12976 (home-page "https://bitbucket.org/tkhyn/dirsync")
12977 (synopsis "Advanced directory tree synchronisation tool")
12978 (description "Advanced directory tree synchronisation tool.")
12979 (license license:expat)))
12980
12981(define-public python2-dirsync
12982 (package-with-python2 python-dirsync))
12983
12984(define-public python-levenshtein
12985 (package
12986 (name "python-levenshtein")
12987 (version "0.12.0")
12988 (source
12989 (origin
12990 (method url-fetch)
12991 (uri (pypi-uri "python-Levenshtein" version))
12992 (sha256
12993 (base32
12994 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
12995 (build-system python-build-system)
12996 (home-page "https://github.com/ztane/python-Levenshtein")
12997 (synopsis "Fast computation of Levenshtein distance and string similarity")
12998 (description
12999 "The Levenshtein Python C extension module contains functions for fast computation of
13000@enumerate
13001@item Levenshtein (edit) distance, and edit operations
13002@item string similarity
13003@item approximate median strings, and generally string averaging
13004@item string sequence and set similarity
13005@end enumerate
13006It supports both normal and Unicode strings.")
13007 (license license:gpl2+)))
13008
13009(define-public python2-levenshtein
13010 (package-with-python2 python-levenshtein))
13011
13012(define-public python-scandir
13013 (package
13014 (name "python-scandir")
13015 (version "1.9.0")
13016 (source
13017 (origin
13018 (method url-fetch)
13019 (uri (pypi-uri "scandir" version))
13020 (sha256
13021 (base32 "0r3hvf1a9jm1rkqgx40gxkmccknkaiqjavs8lccgq9s8khh5x5s4"))))
13022 (build-system python-build-system)
13023 (arguments
13024 `(#:phases (modify-phases %standard-phases
13025 (replace 'check
13026 (lambda _
13027 (invoke "python" "test/run_tests.py"))))))
13028 (home-page "https://github.com/benhoyt/scandir")
13029 (synopsis "Directory iteration function")
13030 (description
13031 "Directory iteration function like os.listdir(), except that instead of
13032returning a list of bare filenames, it yields DirEntry objects that include
13033file type and stat information along with the name. Using scandir() increases
13034the speed of os.walk() by 2-20 times (depending on the platform and file
13035system) by avoiding unnecessary calls to os.stat() in most cases.
13036
13037This package is part of the Python standard library since version 3.5.")
13038 (license license:bsd-3)))
13039
13040(define-public python2-scandir
13041 (package-with-python2 python-scandir))
13042
13043(define-public python2-stemming
13044 (package
13045 (name "python2-stemming")
13046 (version "1.0.1")
13047 (source
13048 (origin
13049 (method url-fetch)
13050 (uri (pypi-uri "stemming" version))
13051 (sha256
13052 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
13053 (build-system python-build-system)
13054 (arguments
13055 `(#:python ,python-2))
13056 (home-page "https://bitbucket.org/mchaput/stemming/overview")
13057 (synopsis "Python implementations of various stemming algorithms")
13058 (description
13059 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
13060stemming algorithms for English. These implementations are straightforward and
13061efficient, unlike some Python versions of the same algorithms available on the
13062Web. This package is an extraction of the stemming code included in the Whoosh
13063search engine.")
13064 (license license:public-domain)))
13065
13066(define-public python-factory-boy
13067 (package
13068 (name "python-factory-boy")
13069 (version "2.8.1")
13070 (source
13071 (origin
13072 (method url-fetch)
13073 (uri (pypi-uri "factory_boy" version))
13074 (sha256
13075 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
13076 (build-system python-build-system)
13077 (arguments
13078 ;; Tests are not included in the tarball.
13079 `(#:tests? #f))
13080 (propagated-inputs
13081 `(("faker" ,python-faker)))
13082 (home-page "https://github.com/benhoyt/scandir")
13083 (synopsis "Versatile test fixtures replacement")
13084 (description
13085 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
13086
13087As a fixtures replacement tool, it aims to replace static, hard to maintain
13088fixtures with easy-to-use factories for complex object.
13089
13090Instead of building an exhaustive test setup with every possible combination
13091of corner cases, factory_boy allows you to use objects customized for the
13092current test, while only declaring the test-specific fields")
13093 (license license:expat)))
13094
13095(define-public python2-factory-boy
13096 (package-with-python2 python-factory-boy))
13097
13098(define-public python-translate-toolkit
13099 (package
13100 (name "python-translate-toolkit")
13101 (version "2.1.0")
13102 (source
13103 (origin
13104 (method url-fetch)
13105 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
13106 (sha256
13107 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
13108 (build-system python-build-system)
13109 (native-inputs
13110 `(("python-pytest" ,python-pytest)
13111 ("python-sphinx" ,python-sphinx)))
13112 (propagated-inputs
13113 `(("python-babel" ,python-babel)
13114 ("python-beautifulsoup4" ,python-beautifulsoup4)
13115 ("python-chardet" ,python-chardet)
13116 ("python-diff-match-patch" ,python-diff-match-patch)
13117 ("python-levenshtein" ,python-levenshtein)
13118 ("python-lxml" ,python-lxml)
13119 ("python-six" ,python-six)
13120 ("python-vobject" ,python-vobject)
13121 ("python-pyyaml" ,python-pyyaml)))
13122 (arguments
13123 ;; TODO: tests are not run, because they end with
13124 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
13125 ;; 'parse_funcs'
13126 ;; during test setup.
13127 `(#:tests? #f))
18919cf9 13128 (home-page "https://toolkit.translatehouse.org")
44d10b1f
RW
13129 (synopsis "Tools and API for translation and localization engineering")
13130 (description
13131 "Tools and API for translation and localization engineering. It contains
13132several utilities, as well as an API for building localization tools.")
13133 (license license:gpl2+)))
13134
13135(define-public python2-translate-toolkit
13136 (package-with-python2 python-translate-toolkit))
13137
13138(define-public python-packaging
13139 (package
13140 (name "python-packaging")
a72a1892 13141 (version "20.0")
44d10b1f
RW
13142 (source
13143 (origin
13144 (method url-fetch)
13145 (uri (pypi-uri "packaging" version))
20bf58bf
MB
13146 ;; XXX: The URL in the patch file is wrong, it should be
13147 ;; <https://github.com/pypa/packaging/pull/256>.
fdd0c369 13148 (patches (search-patches "python-packaging-test-arch.patch"))
44d10b1f
RW
13149 (sha256
13150 (base32
a72a1892 13151 "1y2ip3a4ykkpgnwgn85j6hkspcl0cg3mzms97f40mk57vwqq67gy"))))
44d10b1f
RW
13152 (build-system python-build-system)
13153 (arguments
13154 `(#:phases (modify-phases %standard-phases
13155 (replace 'check
13156 (lambda _ (invoke "py.test" "-vv"))))))
13157 (native-inputs
13158 `(("python-pretend" ,python-pretend)
13159 ("python-pytest" ,python-pytest)))
13160 (propagated-inputs
13161 `(("python-pyparsing" ,python-pyparsing)
13162 ("python-six" ,python-six)))
13163 (home-page "https://github.com/pypa/packaging")
13164 (synopsis "Core utilities for Python packages")
13165 (description "Packaging is a Python module for dealing with Python packages.
13166It offers an interface for working with package versions, names, and dependency
13167information.")
13168 ;; From 'LICENSE': This software is made available under the terms of
13169 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
13170 ;; Contributions to this software is made under the terms of *both* these
13171 ;; licenses.
13172 (license (list license:asl2.0 license:bsd-2))))
13173
13174(define-public python2-packaging
13175 (package-with-python2 python-packaging))
13176
13177(define-public python-relatorio
13178 (package
13179 (name "python-relatorio")
13180 (version "0.8.0")
13181 (source
13182 (origin
13183 (method url-fetch)
13184 (uri (pypi-uri "relatorio" version))
13185 (sha256
13186 (base32
13187 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
13188 (build-system python-build-system)
13189 (propagated-inputs
13190 `(("python-lxml" ,python-lxml)
13191 ("python-genshi" ,python-genshi)))
13192 (native-inputs
13193 `(("python-magic" ,python-magic)))
13194 (home-page "https://relatorio.tryton.org/")
13195 (synopsis "Templating library able to output ODT and PDF files")
13196 (description "Relatorio is a templating library which provides a way to
13197easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
13198for more filetypes can be easily added by creating plugins for them.")
13199 (license license:gpl3+)))
13200
13201(define-public python2-relatorio
13202 (package-with-python2 python-relatorio))
13203
13204(define-public python-radon
13205 (package
13206 (name "python-radon")
f675ab4f 13207 (version "4.1.0")
44d10b1f
RW
13208 (source
13209 (origin
13210 (method url-fetch)
13211 (uri (pypi-uri "radon" version))
13212 (sha256
13213 (base32
f675ab4f 13214 "0vfxxzbnz5lxfvp0yxp35g6c8qqnnbhi4dm7shkm1d3d4192q22n"))))
44d10b1f
RW
13215 (build-system python-build-system)
13216 (arguments
13217 `(#:phases (modify-phases %standard-phases
13218 (replace 'check
13219 (lambda _
13220 (invoke "python" "radon/tests/run.py"))))))
13221 (propagated-inputs
13222 `(("python-colorama" ,python-colorama)
13223 ("python-flake8-polyfill" ,python-flake8-polyfill)
13224 ("python-mando" ,python-mando)))
13225 (native-inputs
13226 `(("python-pytest" ,python-pytest)
13227 ("python-pytest-mock" ,python-pytest-mock)))
13228 (home-page "https://radon.readthedocs.org/")
13229 (synopsis "Code Metrics in Python")
13230 (description "Radon is a Python tool which computes various code metrics.
13231Supported metrics are:
13232@itemize @bullet
13233@item raw metrics: SLOC, comment lines, blank lines, &c.
13234@item Cyclomatic Complexity (i.e. McCabe’s Complexity)
13235@item Halstead metrics (all of them)
13236@item the Maintainability Index (a Visual Studio metric)
13237@end itemize")
13238 (license license:expat)))
13239
13240(define-public python2-radon
13241 (package-with-python2 python-radon))
13242
13243(define-public python-sure
13244 (package
13245 (name "python-sure")
13246 (version "1.4.11")
13247 (source
13248 (origin
13249 (method url-fetch)
13250 (uri (pypi-uri "sure" version))
13251 (sha256
13252 (base32
13253 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
13254 (build-system python-build-system)
13255 (propagated-inputs
13256 `(("python-mock" ,python-mock)
13257 ("python-six" ,python-six)))
13258 (native-inputs
13259 `(("python-nose" ,python-nose)))
13260 (home-page "https://github.com/gabrielfalcao/sure")
13261 (synopsis "Automated testing library in python for python")
13262 (description
13263 "Sure is a python library that leverages a DSL for writing assertions.
13264Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
13265 (license license:gpl3+)))
13266
13267(define-public python2-sure
13268 (package-with-python2 python-sure))
13269
13270(define-public python2-couleur
13271 ;; This package does not seem to support python3 at all, hence,
13272 ;; only the python2 variant definition is provided.
13273 (package
13274 (name "python2-couleur")
13275 (version "0.6.2")
13276 (source
13277 (origin
13278 (method url-fetch)
13279 (uri (pypi-uri "couleur" version))
13280 (sha256
13281 (base32
13282 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
13283 (build-system python-build-system)
13284 (arguments
13285 `(#:python ,python-2))
13286 (home-page "https://github.com/gabrielfalcao/couleur")
13287 (synopsis
13288 "ANSI terminal tool for python, colored shell and other handy fancy features")
13289 (description
13290 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
13291terminal such as coloured output in the shell, overwriting output, indentation, etc.")
13292 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
13293 ;; https://github.com/gabrielfalcao/couleur/issues/11
13294 (license license:lgpl3+)))
13295
13296(define-public python-misaka
13297 (package
13298 (name "python-misaka")
0dcb3412 13299 (version "2.1.1")
44d10b1f
RW
13300 (source
13301 (origin
13302 (method url-fetch)
13303 (uri (pypi-uri "misaka" version))
13304 (sha256
13305 (base32
0dcb3412 13306 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
44d10b1f
RW
13307 (build-system python-build-system)
13308 (arguments
13309 `(;; Line 37 of setup.py calls self.run_command('develop')
13310 ;; in the 'check' phase. This command seems to be trying
13311 ;; to write to
13312 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
13313 ;; for which it does not have the permission to write.
13314 #:tests? #f))
13315 (propagated-inputs
13316 `(("python-cffi" ,python-cffi)))
13317 (home-page "https://github.com/FSX/misaka")
13318 (synopsis "Python binding for Hoedown")
13319 (description
13320 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
13321library written in C. It features a fast HTML renderer and functionality to make custom
13322renderers (e.g. man pages or LaTeX).")
13323 (license license:expat)))
13324
13325(define-public python2-misaka
13326 (package-with-python2 python-misaka))
13327
13328(define-public python2-steadymark
13329 ;; This is forced into being a python2 only variant
13330 ;; due to its dependence on couleur that has no support
13331 ;; for python3
13332 (package
13333 (name "python2-steadymark")
13334 (version "0.7.3")
13335 (source
13336 (origin
13337 (method url-fetch)
13338 (uri (pypi-uri "steadymark" version))
13339 (sha256
13340 (base32
13341 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
13342 (build-system python-build-system)
13343 (native-inputs
13344 `(("python-couleur" ,python2-couleur)
13345 ("python-sure" ,python2-sure)
13346 ("python-misaka" ,python2-misaka)))
13347 (arguments
13348 `(#:python ,python-2
13349 #:phases
13350 (modify-phases %standard-phases
13351 (add-before 'build 'patch-setup-py
13352 (lambda _
13353 ;; Update requirements from dependency==version
13354 ;; to dependency>=version
13355 (substitute* "setup.py"
13356 (("==") ">="))
13357 #t)))))
13358 (home-page "https://github.com/gabrielfalcao/steadymark")
13359 (synopsis "Markdown-based test runner for python")
13360 (description
13361 "@code{Steadymark} allows documentation to be written in github-flavoured
13362markdown. The documentation may contain snippets of code surrounded by python
13363code blocks and @code{Steadymark} will find these snippets and run them, making
13364sure that there are no old malfunctional examples in the documentation examples.")
13365 (license license:expat)))
13366
13367(define-public python-jsonpointer
13368 (package
13369 (name "python-jsonpointer")
13370 (version "1.10")
13371 (source
13372 (origin
13373 (method url-fetch)
13374 (uri (pypi-uri "jsonpointer" version))
13375 (sha256
13376 (base32
13377 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
13378 (build-system python-build-system)
13379 (home-page "https://github.com/stefankoegl/python-json-pointer")
13380 (synopsis "Identify specific nodes in a JSON document")
13381 (description "@code{jsonpointer} allows you to access specific nodes
13382by path in a JSON document (see RFC 6901).")
13383 (license license:bsd-3)))
13384
13385(define-public python2-jsonpointer
13386 (package-with-python2 python-jsonpointer))
13387
13388(define-public python-jsonpatch
13389 (package
13390 (name "python-jsonpatch")
13391 (version "1.16")
13392 (source
13393 (origin
854c5c95 13394 (method git-fetch)
44d10b1f 13395 ;; pypi version lacks tests.js
854c5c95
EF
13396 (uri (git-reference
13397 (url "https://github.com/stefankoegl/python-json-patch")
13398 (commit (string-append "v" version))))
13399 (file-name (git-file-name name version))
44d10b1f
RW
13400 (sha256
13401 (base32
854c5c95 13402 "0k9pff06lxama3nhsc7cdxbp83422bdy8ifs52i6xkas8hpyzfzr"))))
44d10b1f
RW
13403 (build-system python-build-system)
13404 (native-inputs
13405 `(("python-jsonpointer" ,python-jsonpointer)))
13406 (home-page "https://github.com/stefankoegl/python-json-patch")
13407 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
13408 (description "@code{jsonpatch} is a library and program that allows
13409applying JSON Patches according to RFC 6902.")
13410 (license license:bsd-3)))
13411
13412(define-public python2-jsonpatch
13413 (package-with-python2 python-jsonpatch))
13414
13415(define-public python-jsonpatch-0.4
13416 (package (inherit python-jsonpatch)
13417 (name "python-jsonpatch")
13418 (version "0.4")
13419 (source
13420 (origin
a9722d0d
EF
13421 (method git-fetch)
13422 (uri (git-reference
13423 (url "https://github.com/stefankoegl/python-json-patch")
13424 (commit (string-append "v" version))))
13425 (file-name (git-file-name name version))
44d10b1f
RW
13426 (sha256
13427 (base32
a9722d0d 13428 "1fq02y57kinyknxjcav0slcb0k9mwdffqw2hnlhdkpj7palh2mwk"))))))
44d10b1f
RW
13429
13430(define-public python2-jsonpatch-0.4
13431 (package-with-python2 python-jsonpatch-0.4))
13432
13433(define-public python-rfc3986
13434 (package
13435 (name "python-rfc3986")
13436 (version "1.1.0")
13437 (source (origin
13438 (method url-fetch)
13439 (uri (pypi-uri "rfc3986" version))
13440 (sha256
13441 (base32
13442 "06wlmysw83f75ff84zr1yr6n0shvc2xn1n1sb4iwzqap9hf5fn44"))))
13443 (build-system python-build-system)
13444 (arguments
13445 `(#:modules ((guix build utils)
13446 (guix build python-build-system)
13447 (ice-9 ftw)
13448 (srfi srfi-1)
13449 (srfi srfi-26))
13450 #:phases
13451 (modify-phases %standard-phases
13452 (replace 'check
13453 (lambda _
13454 (let ((cwd (getcwd)))
13455 (setenv "PYTHONPATH"
13456 (string-append cwd "/build/"
13457 (find (cut string-prefix? "lib" <>)
13458 (scandir (string-append cwd "/build")))
13459 ":"
13460 (getenv "PYTHONPATH")))
13461 (invoke "pytest" "-v")))))))
13462 (native-inputs
13463 `(("python-pytest" ,python-pytest)))
13464 (home-page "https://rfc3986.readthedocs.io/")
13465 (synopsis "Parse and validate URI references")
13466 (description
13467 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
13468validation and authority parsing. This module also supports RFC@tie{}6874
13469which adds support for zone identifiers to IPv6 addresses.")
13470 (license license:asl2.0)))
13471
13472(define-public python2-rfc3986
13473 (package-with-python2 python-rfc3986))
13474
13475(define-public python-rfc3987
13476 (package
13477 (name "python-rfc3987")
13478 (version "1.3.7")
13479 (source
13480 (origin
13481 (method url-fetch)
13482 (uri (pypi-uri "rfc3987" version))
13483 (sha256
13484 (base32
13485 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
13486 (build-system python-build-system)
13487 (home-page "https://pypi.python.org/pypi/rfc3987")
13488 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
13489 (description "@code{rfc3987} provides routines for parsing and
13490validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
13491 (license license:gpl3+)))
13492
13493(define-public python2-rfc3987
13494 (package-with-python2 python-rfc3987))
13495
13496(define-public python-validate-email
13497 (package
13498 (name "python-validate-email")
13499 (version "1.3")
13500 (source
13501 (origin
13502 (method url-fetch)
13503 (uri (pypi-uri "validate_email" version))
13504 (sha256
13505 (base32
13506 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
13507 (build-system python-build-system)
13508 (home-page "https://github.com/syrusakbary/validate_email")
13509 (synopsis "Verifies if an email address is valid and really exists")
13510 (description "@code{validate_email} can be used to verify if an email
13511address is valid and really exists.")
13512 (license license:lgpl3+)))
13513
13514(define-public python2-validate-email
13515 (package-with-python2 python-validate-email))
13516
13517(define-public python-flex
13518 (package
13519 (name "python-flex")
13520 (version "6.10.0")
13521 (source
13522 (origin
13523 (method url-fetch)
13524 (uri (pypi-uri "flex" version))
13525 (sha256
13526 (base32
13527 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
13528 (build-system python-build-system)
13529 (propagated-inputs
13530 `(("python-click" ,python-click)
13531 ("python-iso8601" ,python-iso8601)
13532 ("python-jsonpointer" ,python-jsonpointer)
13533 ("python-pyyaml" ,python-pyyaml)
13534 ("python-requests" ,python-requests)
13535 ("python-rfc3987" ,python-rfc3987)
13536 ("python-six" ,python-six)
13537 ("python-validate-email" ,python-validate-email)))
13538 (home-page "https://github.com/pipermerriam/flex")
13539 (synopsis "Validates Swagger schemata")
13540 (description "@code{flex} can be used to validate Swagger schemata.")
13541 (license license:bsd-3)))
13542
13543(define-public python2-flex
13544 (package-with-python2 python-flex))
13545
13546(define-public python-marshmallow
13547 (package
13548 (name "python-marshmallow")
13549 (version "3.0.0b14")
13550 (source
13551 (origin
13552 (method url-fetch)
13553 (uri (pypi-uri "marshmallow" version))
13554 (sha256
13555 (base32
13556 "1digk3f5cfk7wmlka65mc7bzsd96pbsgcsvp6pimd5b4ff9zb5p3"))))
13557 (build-system python-build-system)
13558 (propagated-inputs
13559 `(("python-dateutil" ,python-dateutil)
13560 ("python-simplejson" ,python-simplejson)))
13561 (native-inputs
13562 `(("python-pytest" ,python-pytest)
13563 ("python-pytz" ,python-pytz)))
13564 (home-page "https://github.com/marshmallow-code/marshmallow")
13565 (synopsis "Convert complex datatypes to and from native
13566Python datatypes.")
13567 (description "@code{marshmallow} provides a library for converting
13568complex datatypes to and from native Python datatypes.")
13569 (license license:expat)))
13570
13571(define-public python2-marshmallow
13572 (package-with-python2 python-marshmallow))
13573
13574(define-public python-apispec
13575 (package
13576 (name "python-apispec")
13577 (version "0.25.3")
13578 (source
13579 (origin
13580 (method url-fetch)
13581 (uri (pypi-uri "apispec" version))
13582 (sha256
13583 (base32
13584 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
13585 (build-system python-build-system)
13586 (propagated-inputs
13587 `(("python-pyyaml" ,python-pyyaml)))
13588 (native-inputs
13589 `(("python-pytest" ,python-pytest)
13590 ("python-flask" ,python-flask)
13591 ("python-marshmallow" ,python-marshmallow)
13592 ("python-tornado" ,python-tornado)
13593 ("python-bottle" ,python-bottle)
13594 ("python-mock" ,python-mock)))
13595 (home-page "https://github.com/marshmallow-code/apispec")
13596 (synopsis "Swagger 2.0 API specification generator")
13597 (description "@code{python-apispec} is a pluggable API specification
13598generator. Currently supports the OpenAPI specification (f.k.a.
13599Swagger 2.0).")
13600 (license license:expat)))
13601
13602(define-public python2-apispec
13603 (package-with-python2 python-apispec))
13604
13605(define-public python-flasgger
13606 (package
13607 (name "python-flasgger")
13608 (version "0.6.3")
13609 (source
13610 (origin
1a04d421
TGR
13611 (method git-fetch)
13612 (uri (git-reference
13613 (url "https://github.com/rochacbruno/flasgger.git")
13614 (commit version)))
13615 (file-name (git-file-name name version))
44d10b1f 13616 (sha256
1a04d421 13617 (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn"))))
44d10b1f
RW
13618 (build-system python-build-system)
13619 (arguments
13620 `(#:phases
13621 (modify-phases %standard-phases
13622 (replace 'check
13623 (lambda* (#:key inputs outputs #:allow-other-keys)
13624 (substitute* "Makefile"
13625 (("flake8 flasgger --ignore=F403")
13626 "flake8 flasgger --ignore=E731,F403"))
13627 (setenv "PYTHONPATH" (string-append (getcwd)
13628 ":"
13629 (getenv "PYTHONPATH")))
ac599a09 13630 (invoke "py.test"))))))
44d10b1f
RW
13631 (propagated-inputs
13632 `(("python-flask" ,python-flask)
13633 ("python-pyyaml" ,python-pyyaml)
13634 ("python-jsonschema" ,python-jsonschema)
13635 ("python-mistune" ,python-mistune)
13636 ("python-six" ,python-six)))
13637 (native-inputs
13638 `(("python-decorator" ,python-decorator)
13639 ("python-flake8" ,python-flake8)
13640 ("python-flask-restful" ,python-flask-restful)
13641 ("python-flex" ,python-flex)
13642 ("python-pytest" ,python-pytest)
13643 ("python-pytest-cov" ,python-pytest-cov)
13644 ("python-marshmallow" ,python-marshmallow)
13645 ("python-apispec" ,python-apispec)))
13646 (home-page "https://github.com/rochacbruno/flasgger/")
13647 (synopsis "Extract Swagger specs from your Flask project")
13648 (description "@code{python-flasgger} allows extracting Swagger specs
13649from your Flask project. It is a fork of Flask-Swagger.")
13650 (license license:expat)))
13651
13652(define-public python2-flasgger
13653 (package-with-python2 python-flasgger))
13654
13655(define-public python-swagger-spec-validator
13656 (package
13657 (name "python-swagger-spec-validator")
fe9c5b1d 13658 (version "2.4.3")
44d10b1f
RW
13659 (source
13660 (origin
13661 (method url-fetch)
13662 (uri (pypi-uri "swagger-spec-validator" version))
13663 (sha256
13664 (base32
fe9c5b1d 13665 "11g627icrsqwazsncwi0sdvprcj6hwaayw5xk3xsj8d97bmrzqjp"))))
44d10b1f
RW
13666 (build-system python-build-system)
13667 (propagated-inputs
13668 `(("python-jsonschema" ,python-jsonschema)
fe9c5b1d 13669 ("python-pyyaml" ,python-pyyaml)
44d10b1f
RW
13670 ("python-six" ,python-six)))
13671 (home-page
13672 "https://github.com/Yelp/swagger_spec_validator")
13673 (synopsis "Validation of Swagger specifications")
13674 (description "@code{swagger_spec_validator} provides a library for
13675validating Swagger API specifications.")
13676 (license license:asl2.0)))
13677
13678(define-public python2-swagger-spec-validator
13679 (package-with-python2 python-swagger-spec-validator))
13680
13681(define-public python-apache-libcloud
13682 (package
13683 (name "python-apache-libcloud")
13684 (version "2.4.0")
13685 (source
13686 (origin
13687 (method url-fetch)
13688 (uri (pypi-uri "apache-libcloud" version))
13689 (sha256
13690 (base32
13691 "0daj3mkzw79v5zin2r1s2wkrz1hplfc16bwj4ss68i5qjq4l2p0j"))))
13692 (build-system python-build-system)
13693 (arguments
13694 `(#:phases
13695 (modify-phases %standard-phases
13696 (add-after 'unpack 'patch-ssh
13697 (lambda* (#:key inputs #:allow-other-keys)
13698 (substitute* "libcloud/compute/ssh.py"
13699 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
13700 "/bin/ssh" "'")))
13701 #t))
13702 (add-after 'unpack 'patch-tests
13703 (lambda _
13704 (substitute* "./libcloud/test/test_file_fixtures.py"
13705 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
13706 (("def _ascii") "def _raw_data(self, method, url, body, headers):
13707 return (httplib.OK,
13708 \"1234abcd\",
13709 {\"test\": \"value\"},
13710 httplib.responses[httplib.OK])
13711 def _ascii"))
13712 (substitute* "libcloud/test/compute/test_ssh_client.py"
13713 (("class ShellOutSSHClientTests")
13714 "@unittest.skip(\"Guix container doesn't have ssh service\")
13715class ShellOutSSHClientTests")
13716 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
13717 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
13718 (("'.xF0', '.x90', '.x8D', '.x88'")
13719 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
13720 #t))
13721 (add-before 'check 'copy-secret
13722 (lambda _
13723 (copy-file "libcloud/test/secrets.py-dist"
13724 "libcloud/test/secrets.py")
13725 #t)))))
13726 (inputs
13727 `(("openssh" ,openssh)))
13728 (propagated-inputs
13729 `(("python-paramiko" ,python-paramiko)
13730 ("python-requests" ,python-requests)))
13731 (native-inputs
13732 `(("python-lockfile" ,python-lockfile)
13733 ("python-mock" ,python-mock)
13734 ("python-pytest" ,python-pytest)
13735 ("python-pytest-runner" ,python-pytest-runner)
13736 ("python-requests-mock" ,python-requests-mock)))
13737 (home-page "https://libcloud.apache.org/")
13738 (synopsis "Unified Cloud API")
13739 (description "@code{libcloud} is a Python library for interacting with
13740many of the popular cloud service providers using a unified API.")
13741 (license license:asl2.0)))
13742
13743(define-public python2-apache-libcloud
13744 (package-with-python2 python-apache-libcloud))
13745
1639e0b7 13746(define-public python-smmap
44d10b1f 13747 (package
1639e0b7
MC
13748 (name "python-smmap")
13749 (version "3.0.1")
44d10b1f
RW
13750 (source
13751 (origin
13752 (method url-fetch)
1639e0b7 13753 (uri (pypi-uri "smmap" version))
44d10b1f 13754 (sha256
1639e0b7 13755 (base32 "0ijlnv60y8f41py1wnn5n1a1i81cxd9dfpdhr0k3cgkrcbz8850p"))))
44d10b1f
RW
13756 (build-system python-build-system)
13757 (native-inputs
13758 `(("python-nosexcover" ,python-nosexcover)))
13759 (home-page "https://github.com/Byron/smmap")
13760 (synopsis "Python sliding window memory map manager")
1639e0b7 13761 (description "@code{smmap} is a pure Python implementation of a sliding
44d10b1f
RW
13762window memory map manager.")
13763 (license license:bsd-3)))
13764
1639e0b7
MC
13765(define-public python-smmap2
13766 (deprecated-package "python-smmap2" python-smmap))
13767
13768(define-public python2-smmap
13769 (package-with-python2 python-smmap))
13770
44d10b1f 13771(define-public python2-smmap2
1639e0b7 13772 (deprecated-package "python2-smmap2" python2-smmap))
44d10b1f
RW
13773
13774(define-public python-regex
13775 (package
13776 (name "python-regex")
c187c9d7 13777 (version "2019.04.14")
44d10b1f
RW
13778 (source (origin
13779 (method url-fetch)
13780 (uri (pypi-uri "regex" version))
13781 (sha256
13782 (base32
c187c9d7
BT
13783 "1a6hhfs6l6snr1z654ay6wzbmwdkmv282fzfkd5hk2d1n73y8v6m"))))
13784 ;; TODO: Fix and enable regex_test.py tests that complain about the
13785 ;; test.support module not existing.
44d10b1f
RW
13786 (build-system python-build-system)
13787 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
13788 (synopsis "Alternative regular expression module")
13789 (description "This regular expression implementation is backwards-
13790compatible with the standard @code{re} module, but offers additional
13791functionality like full case-folding for case-insensitive matches in Unicode.")
13792 (license license:psfl)))
13793
13794(define-public python2-regex
13795 (package-with-python2 python-regex))
13796
13797(define-public python2-pyopengl
13798 (package
13799 (name "python2-pyopengl")
13800 (version "3.1.0")
13801 (source
13802 (origin
13803 (method url-fetch)
13804 (uri (pypi-uri "PyOpenGL" version))
13805 (sha256
13806 (base32
13807 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
13808 (arguments
13809 `(#:python ,python-2))
13810 (build-system python-build-system)
13811 (home-page "http://pyopengl.sourceforge.net")
13812 (synopsis "Standard OpenGL bindings for Python")
13813 (description
13814 "PyOpenGL is the most common cross platform Python binding to OpenGL and
13815related APIs. The binding is created using the standard @code{ctypes}
13816library.")
13817 (license license:bsd-3)))
13818
13819(define-public python2-pyopengl-accelerate
13820 (package
13821 (inherit python2-pyopengl)
13822 (name "python2-pyopengl-accelerate")
13823 (version "3.1.0")
13824 (source
13825 (origin
13826 (method url-fetch)
13827 (uri (pypi-uri "PyOpenGL-accelerate" version))
13828 (sha256
13829 (base32
13830 "0464c1ifzk0k92lyndikmvzjgnx1y25r7bkkc8pnxm4kp1q4czwj"))))
13831 (synopsis "Acceleration code for PyOpenGL")
13832 (description
13833 "This is the Cython-coded accelerator module for PyOpenGL.")))
13834
13835(define-public python-rencode
13836 (package
13837 (name "python-rencode")
13838 (version "1.0.5")
13839 (source
13840 (origin
13841 (method url-fetch)
13842 (uri (pypi-uri "rencode" version))
13843 (sha256
13844 (base32
13845 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
13846 (build-system python-build-system)
13847 (arguments
13848 `(#:phases
13849 (modify-phases %standard-phases
13850 (add-before 'check 'delete-bogus-test
13851 ;; This test requires /home/aresch/Downloads, which is not provided by
13852 ;; the build environment.
13853 (lambda _
13854 (delete-file "rencode/t.py")
13855 #t)))))
13856 (native-inputs `(("pkg-config" ,pkg-config)
13857 ("python-cython" ,python-cython)))
13858 (home-page "https://github.com/aresch/rencode")
13859 (synopsis "Serialization of heterogeneous data structures")
13860 (description
13861 "The @code{rencode} module is a data structure serialization library,
13862similar to @code{bencode} from the BitTorrent project. For complex,
13863heterogeneous data structures with many small elements, r-encoding stake up
13864significantly less space than b-encodings. This version of rencode is a
13865complete rewrite in Cython to attempt to increase the performance over the
13866pure Python module.")
13867 (license license:bsd-3)))
13868
13869(define-public python2-rencode
13870 (package-with-python2 python-rencode))
13871
13872(define-public python-xenon
13873 (package
13874 (name "python-xenon")
8c06d6d8 13875 (version "0.7.0")
44d10b1f
RW
13876 (source
13877 (origin
13878 (method url-fetch)
13879 (uri (pypi-uri "xenon" version))
13880 (sha256
13881 (base32
8c06d6d8 13882 "0nv207ql2wmh9q62503np056c4vf1c1hlsi5cvv5p5kx574k6r2y"))))
44d10b1f
RW
13883 (build-system python-build-system)
13884 (native-inputs
13885 `(("python-pyyaml" ,python-pyyaml)
13886 ("python-radon" ,python-radon)
13887 ("python-requests" ,python-requests)
13888 ("python-flake8" ,python-flake8)
13889 ("python-tox" ,python-tox)))
13890 (arguments
8c06d6d8
MC
13891 `(#:tests? #f ;test suite not shipped with the PyPI archive
13892 #:phases
44d10b1f
RW
13893 (modify-phases %standard-phases
13894 (add-before 'build 'patch-test-requirements
13895 (lambda _
13896 ;; Remove httpretty dependency for tests.
13897 (substitute* "setup.py"
13898 (("httpretty") ""))
13899 #t)))))
13900 (home-page "https://xenon.readthedocs.org/")
13901 (synopsis "Monitor code metrics for Python on your CI server")
13902 (description
13903 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
13904Ideally, @code{xenon} is run every time code is committed. Through command
13905line options, various thresholds can be set for the complexity of code. It
13906will fail (i.e. it will exit with a non-zero exit code) when any of these
13907requirements is not met.")
13908 (license license:expat)))
13909
13910(define-public python2-xenon
13911 (package-with-python2 python-xenon))
13912
13913(define-public python-pysocks
13914 (package
13915 (name "python-pysocks")
b8725cdf 13916 (version "1.7.0")
44d10b1f
RW
13917 (source
13918 (origin
13919 (method url-fetch)
13920 (uri (pypi-uri "PySocks" version))
13921 (sha256
13922 (base32
b8725cdf 13923 "0z4p31bpqm893cf87qqgb30k7nwd8kqfjwwjm5cvxb6zbyj1w0yr"))))
44d10b1f
RW
13924 (build-system python-build-system)
13925 (arguments `(#:tests? #f))
13926 (home-page "https://github.com/Anorov/PySocks")
13927 (synopsis "SOCKS client module")
13928 (description "@code{pysocks} is an updated and semi-actively maintained
13929version of @code{SocksiPy} with bug fixes and extra features.")
13930 (license license:bsd-3)))
13931
13932(define-public python2-pysocks
13933 (package-with-python2 python-pysocks))
13934
13935(define-public python-pydiff
13936 (package
13937 (name "python-pydiff")
13938 (version "0.2")
13939 (source
13940 (origin
13941 (method url-fetch)
13942 (uri (pypi-uri "pydiff" version))
13943 (sha256
13944 (base32
13945 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
13946 (build-system python-build-system)
13947 (home-page "https://github.com/myint/pydiff")
13948 (synopsis "Library to diff two Python files at the bytecode level")
13949 (description
13950 "@code{pydiff} makes it easy to look for actual code changes while
13951ignoring formatting changes.")
13952 (license license:expat)))
13953
13954(define-public python2-pydiff
13955 (package-with-python2 python-pydiff))
13956
13957(define-public python-tqdm
13958 (package
13959 (name "python-tqdm")
13960 (version "4.19.6")
13961 (source
13962 (origin
13963 (method url-fetch)
13964 (uri (pypi-uri "tqdm" version))
13965 (sha256
13966 (base32
13967 "1pw0ngm0zn9papdmkwipi3yih5c3di6d0w849bdmrraq4d2d9h2y"))))
13968 (build-system python-build-system)
13969 (native-inputs
13970 `(("python-flake8" ,python-flake8)
13971 ("python-nose" ,python-nose)
13972 ("python-coverage" ,python-coverage)))
13973 (home-page "https://github.com/tqdm/tqdm")
13974 (synopsis "Fast, extensible progress meter")
13975 (description
13976 "Make loops show a progress bar on the console by just wrapping any
13977iterable with @code{|tqdm(iterable)|}. Offers many options to define
13978design and layout.")
f875d76f
PL
13979 (license (list license:mpl2.0 license:expat))
13980 (properties `((python2-variant . ,(delay python2-tqdm))))))
44d10b1f
RW
13981
13982(define-public python2-tqdm
f875d76f
PL
13983 (let ((tqdm (package-with-python2
13984 (strip-python2-variant python-tqdm))))
13985 (package (inherit tqdm)
13986 (native-inputs `(("python2-functools32" ,python2-functools32)
13987 ,@(package-native-inputs tqdm))))))
44d10b1f
RW
13988
13989(define-public python-pkginfo
13990 (package
13991 (name "python-pkginfo")
13992 (version "1.4.2")
13993 (source
13994 (origin
13995 (method url-fetch)
13996 (uri (pypi-uri "pkginfo" version))
13997 (sha256
13998 (base32
13999 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
14000 (build-system python-build-system)
14001 (arguments
14002 ;; The tests are broken upstream.
14003 '(#:tests? #f))
14004 (home-page
14005 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
14006 (synopsis
14007 "Query metadatdata from sdists, bdists, and installed packages")
14008 (description
14009 "API to query the distutils metadata written in @file{PKG-INFO} inside a
14010source distriubtion (an sdist) or a binary distribution (e.g., created by
14011running bdist_egg). It can also query the EGG-INFO directory of an installed
14012distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
14013created by running @code{python setup.py develop}).")
14014 (license license:expat)))
14015
14016(define-public python2-pkginfo
14017 (package-with-python2 python-pkginfo))
14018
14019(define-public python-twine
14020 (package
14021 (name "python-twine")
14022 (version "1.9.1")
14023 (source
14024 (origin
14025 (method url-fetch)
14026 (uri (pypi-uri "twine" version))
14027 (sha256
14028 (base32
14029 "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a"))))
14030 (build-system python-build-system)
14031 (propagated-inputs
14032 `(("python-tqdm" ,python-tqdm)
14033 ("python-pkginfo" ,python-pkginfo)
14034 ("python-requests" ,python-requests)
14035 ("python-requests-toolbelt" ,python-requests-toolbelt)))
14036 (home-page "https://github.com/pypa/twine")
14037 (synopsis "Collection of utilities for interacting with PyPI")
14038 (description
14039 "@code{twine} currently supports registering projects and uploading
14040distributions. It authenticates the user over HTTPS, allows them to pre-sign
14041their files and supports any packaging format (including wheels).")
14042 (license license:asl2.0)))
14043
14044(define-public python2-twine
14045 (package-with-python2 python-twine))
14046
14047(define-public python-linecache2
14048 (package
14049 (name "python-linecache2")
14050 (version "1.0.0")
14051 (source
14052 (origin
14053 (method url-fetch)
14054 (uri (pypi-uri "linecache2" version))
14055 (sha256
14056 (base32
14057 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
14058 (build-system python-build-system)
14059 (arguments
14060 `(;; The tests depend on unittest2, and our version is a bit too old.
14061 #:tests? #f))
14062 (native-inputs
14063 `(("python-pbr" ,python-pbr-minimal)))
14064 (home-page
14065 "https://github.com/testing-cabal/linecache2")
14066 (synopsis "Backports of the linecache module")
14067 (description
14068 "The linecache module allows one to get any line from any file, while
14069attempting to optimize internally, using a cache, the common case where many
14070lines are read from a single file.")
14071 (license license:psfl)))
14072
14073(define-public python2-linecache2
14074 (package-with-python2 python-linecache2))
14075
14076(define-public python-traceback2
14077 (package
14078 (name "python-traceback2")
14079 (version "1.4.0")
14080 (source
14081 (origin
14082 (method url-fetch)
14083 (uri (pypi-uri "traceback2" version))
14084 (sha256
14085 (base32
14086 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
14087 (build-system python-build-system)
14088 (arguments
14089 `(;; python-traceback2 and python-unittest2 depend on one another.
14090 #:tests? #f))
14091 (native-inputs
14092 `(("python-pbr" ,python-pbr-minimal)))
14093 (propagated-inputs
14094 `(("python-linecache2" ,python-linecache2)))
14095 (home-page
14096 "https://github.com/testing-cabal/traceback2")
14097 (synopsis "Backports of the traceback module")
14098 (description
14099 "This module provides a standard interface to extract, format and print
14100stack traces of Python programs. It exactly mimics the behavior of the Python
14101interpreter when it prints a stack trace.")
14102 (license license:psfl)))
14103
14104(define-public python2-traceback2
14105 (package-with-python2 python-traceback2))
14106
14107(define-public python-ratelimiter
14108 (package
14109 (name "python-ratelimiter")
14110 (version "1.2.0")
14111 (source
14112 (origin
14113 (method url-fetch)
14114 (uri (pypi-uri "ratelimiter" version))
14115 (sha256
14116 (base32
14117 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
14118 (build-system python-build-system)
14119 (arguments
14120 '(#:tests? #f)) ; There are no tests in the pypi archive.
14121 (home-page "https://github.com/RazerM/ratelimiter")
14122 (synopsis "Simple rate limiting object")
14123 (description
14124 "The @code{ratelimiter} module ensures that an operation will not be
14125executed more than a given number of times during a given period.")
14126 (license license:asl2.0)))
14127
14128(define-public python2-ratelimiter
14129 (package-with-python2 python-ratelimiter))
14130
14131(define-public python-dukpy
14132 (package
14133 (name "python-dukpy")
14134 (version "0.3")
14135 (source
14136 (origin
5b77ebe1
TGR
14137 (method git-fetch)
14138 (uri (git-reference
14139 (url "https://github.com/kovidgoyal/dukpy.git")
14140 (commit (string-append "v" version))))
14141 (file-name (git-file-name name version))
44d10b1f 14142 (sha256
5b77ebe1 14143 (base32 "13h21nqzasv4zj32xs61brmc106pr2cx243672crcmwxxnjgaxls"))))
44d10b1f
RW
14144 (build-system python-build-system)
14145 (home-page "https://github.com/kovidgoyal/dukpy")
14146 (synopsis "Run JavaScript in python")
14147 (description
14148 "dukpy is a JavaScript runtime environment for Python using the duktape
14149embeddable JavaScript engine.")
14150 ;; Dukpy is licensed under MIT like the embedded duktape library,
14151 ;; with 'errors.c' as GPL3.
14152 (license (list license:expat license:gpl3))))
14153
14154(define-public python2-dukpy
14155 (package-with-python2 python-dukpy))
14156
14157(define-public python-jsonrpclib-pelix
14158 (package
14159 (name "python-jsonrpclib-pelix")
14160 (version "0.3.2")
14161 (source
14162 (origin
14163 (method url-fetch)
14164 (uri (pypi-uri "jsonrpclib-pelix" version))
14165 (sha256
14166 (base32
14167 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
14168 (build-system python-build-system)
14169 (arguments
14170 `(#:tests? #f)) ; no tests in PyPI tarball
14171 (home-page "https://github.com/tcalmant/jsonrpclib/")
14172 (synopsis "JSON-RPC 2.0 client library for Python")
14173 (description
14174 "This library implements the JSON-RPC v2.0
14175specification (backwards-compatible) as a client library for Python. This
14176version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
14177services.")
14178 (license license:asl2.0)))
14179
14180(define-public python2-jsonrpclib-pelix
14181 (package-with-python2 python-jsonrpclib-pelix))
14182
14183(define-public python-setuptools-scm-git-archive
14184 (package
14185 (name "python-setuptools-scm-git-archive")
14186 (version "1.0")
14187 (source
14188 (origin
14189 (method url-fetch)
14190 (uri (pypi-uri "setuptools_scm_git_archive" version))
14191 (sha256
14192 (base32
14193 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
14194 (build-system python-build-system)
14195 (native-inputs
14196 `(("python-pytest" ,python-pytest)))
14197 (propagated-inputs
14198 `(("python-setuptools-scm" ,python-setuptools-scm)))
14199 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
14200 (synopsis "Setuptools_scm plugin for git archives")
14201 (description
14202 "The setuptools_scm_git_archive package is a plugin to
14203setuptools_scm, which supports obtaining versions from git archives that
14204belong to tagged versions.")
14205 (license license:expat)))
14206
14207(define-public python2-setuptools-scm-git-archive
14208 (package-with-python2 python-setuptools-scm-git-archive))
14209
724a350c
RW
14210(define-public python-setuptools-git
14211 (package
14212 (name "python-setuptools-git")
14213 (version "1.2")
14214 (source
14215 (origin
14216 (method url-fetch)
14217 (uri (pypi-uri "setuptools-git" version))
14218 (sha256
14219 (base32
14220 "0i84qjwp5m0l9qagdjww2frdh63r37km1c48mrvbmaqsl1ni6r7z"))))
14221 (build-system python-build-system)
14222 (arguments
14223 `(#:phases
14224 (modify-phases %standard-phases
14225 ;; This is needed for tests.
14226 (add-after 'unpack 'configure-git
14227 (lambda _
14228 (setenv "HOME" "/tmp")
14229 (invoke "git" "config" "--global" "user.email" "guix")
14230 (invoke "git" "config" "--global" "user.name" "guix")
14231 #t)))))
14232 (native-inputs
14233 `(("git" ,git-minimal)))
14234 (home-page "https://github.com/msabramo/setuptools-git")
14235 (synopsis "Setuptools revision control system plugin for Git")
14236 (description
14237 "This package provides a plugin for Setuptools for revision control with
14238Git.")
14239 (license license:bsd-3)))
14240
44d10b1f
RW
14241(define-public python-pyclipper
14242 (package
14243 (name "python-pyclipper")
ff3d1b99 14244 (version "1.1.0.post3")
44d10b1f
RW
14245 (source
14246 (origin
14247 (method url-fetch)
14248 (uri (pypi-uri "pyclipper" version ".zip"))
14249 (sha256
ff3d1b99 14250 (base32 "164yksvqwqvwzh8f8lq92asg87hd8rvcy2xb5vm4y4ccvd5xgb7i"))
44d10b1f
RW
14251 (modules '((guix build utils)))
14252 (snippet
14253 '(begin
14254 ;; This file is generated by Cython.
14255 (delete-file "pyclipper/pyclipper.cpp") #t))))
14256 (build-system python-build-system)
14257 (arguments
14258 `(#:phases
14259 (modify-phases %standard-phases
14260 (add-before 'build 'cythonize-sources
14261 (lambda _
14262 (with-directory-excursion "pyclipper"
14263 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
14264 (propagated-inputs
14265 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
14266 (native-inputs
14267 `(("python-cython" ,python-cython)
14268 ("python-pytest" ,python-pytest)
14269 ("python-pytest-runner" ,python-pytest-runner)
14270 ("python-unittest2" ,python-unittest2)
14271 ("unzip" ,unzip)))
14272 (home-page "https://github.com/greginvm/pyclipper")
14273 (synopsis "Wrapper for Angus Johnson's Clipper library")
14274 (description
14275 "Pyclipper is a Cython wrapper for the C++ translation of the
14276Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
14277 (license license:expat)))
14278
14279(define-public python2-pyclipper
14280 (package-with-python2 python-pyclipper))
14281
14282(define-public python2-booleanoperations
14283 (package
14284 (name "python2-booleanoperations")
14285 (version "0.7.1")
14286 (source
14287 (origin
14288 (method url-fetch)
14289 (uri (pypi-uri "booleanOperations" version ".zip"))
14290 (sha256
14291 (base32
14292 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
14293 (build-system python-build-system)
14294 (arguments
14295 `(#:python ,python-2))
14296 (native-inputs
14297 `(("unzip" ,unzip)
14298 ("python2-pytest" ,python2-pytest)
14299 ("python2-pytest-runner" ,python2-pytest-runner)))
14300 (propagated-inputs
14301 `(("python-fonttools" ,python2-fonttools)
14302 ("python-pyclipper" ,python2-pyclipper)
14303 ("python-ufolib" ,python2-ufolib)))
14304 (home-page "https://github.com/typemytype/booleanOperations")
14305 (synopsis "Boolean operations on paths")
14306 (description
14307 "BooleanOperations provides a Python library that enables
14308boolean operations on paths.")
14309 (license license:expat)))
14310
14311(define-public python-tempdir
14312 (package
14313 (name "python-tempdir")
14314 (version "0.7.1")
14315 (source
14316 (origin
14317 (method url-fetch)
14318 (uri (pypi-uri "tempdir" version))
14319 (sha256
14320 (base32
14321 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
14322 (build-system python-build-system)
14323 (home-page "https://pypi.org/project/tempdir/")
14324 (arguments
14325 ;; the package has no tests
14326 '(#:tests? #f))
14327 (synopsis "Python library for managing temporary directories")
14328 (description
14329 "This library manages temporary directories that are automatically
14330deleted with all their contents when they are no longer needed. It is
14331particularly convenient for use in tests.")
14332 (license license:expat)))
14333
14334(define-public python2-tempdir
14335 (package-with-python2 python-tempdir))
14336
14337(define-public python-activepapers
14338 (package
14339 (name "python-activepapers")
14340 (version "0.2.2")
14341 (source
14342 (origin
14343 (method url-fetch)
14344 (uri (pypi-uri "ActivePapers.Py" version))
14345 (sha256
14346 (base32
14347 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
14348 (build-system python-build-system)
14349 (arguments
14350 `(#:modules ((ice-9 ftw)
14351 (srfi srfi-1)
14352 (guix build utils)
14353 (guix build python-build-system))
14354
14355 #:phases
14356 (modify-phases %standard-phases
14357 (add-after 'unpack 'delete-python2-code
14358 (lambda _
14359 (for-each delete-file
14360 '("lib/activepapers/builtins2.py"
14361 "lib/activepapers/standardlib2.py"
14362 "lib/activepapers/utility2.py"))))
14363 (replace 'check
14364 (lambda _
14365 ;; Deactivate the test cases that download files
14366 (setenv "NO_NETWORK_ACCESS" "1")
14367 ;; For some strange reason, some tests fail if nosetests runs all
14368 ;; test modules in a single execution. They pass if each test
14369 ;; module is run individually.
14370 (for-each (lambda (filename)
14371 (invoke "nosetests"
14372 (string-append "tests/" filename)))
14373 (scandir "tests"
14374 (lambda (filename)
14375 (string-suffix? ".py" filename)))))))))
14376 (native-inputs
14377 `(("python-tempdir" ,python-tempdir)
14378 ("python-nose" ,python-nose)))
14379 (propagated-inputs
14380 `(("python-h5py" ,python-h5py)))
26827dfe 14381 (home-page "https://www.activepapers.org/")
44d10b1f
RW
14382 (synopsis "Executable papers for scientific computing")
14383 (description
14384 "ActivePapers is a tool for working with executable papers, which
14385combine data, code, and documentation in single-file packages,
14386suitable for publication as supplementary material or on repositories
14387such as figshare or Zenodo.")
14388 (properties `((python2-variant . ,(delay python2-activepapers))))
14389 (license license:bsd-3)))
14390
14391(define-public python2-activepapers
14392 (let ((base (package-with-python2
14393 (strip-python2-variant python-activepapers))))
14394 (package
14395 (inherit base)
14396 (arguments
14397 (substitute-keyword-arguments (package-arguments base)
14398 ((#:phases phases)
14399 `(modify-phases ,phases
14400 (delete 'delete-python2-code)
14401 (add-after 'unpack 'delete-python3-code
14402 (lambda _
14403 (for-each delete-file
14404 '("lib/activepapers/builtins3.py"
14405 "lib/activepapers/standardlib3.py"
14406 "lib/activepapers/utility3.py")))))))))))
14407
14408(define-public python-semver
14409 (package
14410 (name "python-semver")
594280b1 14411 (version "2.9.0")
44d10b1f 14412 (source
2ecbba24
BG
14413 (origin
14414 (method url-fetch)
14415 (uri (pypi-uri "semver" version))
14416 (sha256
14417 (base32
14418 "183kg1rhzz3hqizvphkd8hlbf1zxfx8737zhfkmqzxi71jmdw7pd"))))
44d10b1f 14419 (build-system python-build-system)
44d10b1f
RW
14420 (native-inputs
14421 `(("python-tox" ,python-tox)
14422 ("python-virtualenv" ,python-virtualenv)))
14423 (home-page "https://github.com/k-bx/python-semver")
14424 (synopsis "Python helper for Semantic Versioning")
14425 (description "This package provides a Python library for
14426@url{Semantic Versioning, http://semver.org/}.")
14427 (license license:bsd-3)))
14428
14429(define-public python2-semver
14430 (package-with-python2 python-semver))
14431
14432(define-public python-pyro4
14433 (package
14434 (name "python-pyro4")
3ce91d44 14435 (version "4.77")
44d10b1f
RW
14436 (source
14437 (origin
14438 (method url-fetch)
14439 (uri (pypi-uri "Pyro4" version))
14440 (sha256
3ce91d44 14441 (base32 "0gsjg869y4gpy265s1gj1f2qy6jn5iz8r2bwwnq78r1r5yi15zib"))))
44d10b1f 14442 (build-system python-build-system)
3ce91d44
GL
14443 (arguments
14444 '(#:tests? #f)) ;FIXME: Some tests require network access.
14445 (native-inputs
14446 `(("python-cloudpickle" ,python-cloudpickle)
14447 ("python-dill" ,python-dill)
14448 ("python-msgpack" ,python-msgpack)))
44d10b1f
RW
14449 (propagated-inputs
14450 `(("python-serpent" ,python-serpent)))
14451 (home-page "https://pyro4.readthedocs.io")
14452 (synopsis "Distributed object middleware for Python")
14453 (description
14454 "Pyro enables you to build applications in which objects can talk to each
14455other over the network. You can just use normal Python method calls to call
14456objects on other machines, also known as remote procedure calls (RPC).")
14457 (license license:expat)))
14458
14459(define-public python2-pyro
14460 (package
14461 (name "python2-pyro")
14462 (version "3.16")
14463 (source
14464 (origin
14465 (method url-fetch)
14466 (uri (pypi-uri "Pyro" version))
14467 (file-name (string-append "Pyro-" version ".tar.gz"))
14468 (sha256
14469 (base32
14470 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
14471 (build-system python-build-system)
14472 (arguments
14473 ;; Pyro is not compatible with Python 3
14474 `(#:python ,python-2
14475 ;; Pyro has no test cases for automatic execution
14476 #:tests? #f))
14477 (home-page "http://pythonhosted.org/Pyro/")
14478 (synopsis "Distributed object manager for Python")
14479 (description "Pyro is a Distributed Object Technology system
14480written in Python that is designed to be easy to use. It resembles
14481Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
14482which is a system and language independent Distributed Object Technology
14483and has much more to offer than Pyro or RMI. Pyro 3.x is no
14484longer maintained. New projects should use Pyro4 instead, which
14485is the new Pyro version that is actively developed.")
14486 (license license:expat)))
14487
14488(define-public python2-scientific
14489 (package
14490 (name "python2-scientific")
14491 (version "2.9.4")
14492 (source
14493 (origin
c695f011
KH
14494 (method git-fetch)
14495 (uri (git-reference
14496 (url "https://github.com/khinsen/ScientificPython")
14497 (commit (string-append "rel" version))))
14498 (file-name (git-file-name name version))
44d10b1f
RW
14499 (sha256
14500 (base32
c695f011 14501 "16l48aj9fps9r7jyk8gpxppwrv0fqvlc13sayxskz28r5s6sjwbl"))))
44d10b1f
RW
14502 (build-system python-build-system)
14503 (inputs
14504 `(("netcdf" ,netcdf)))
14505 (propagated-inputs
14506 `(("python-numpy" ,python2-numpy-1.8)
14507 ("python-pyro" ,python2-pyro)))
14508 (arguments
14509 ;; ScientificPython is not compatible with Python 3
14510 `(#:python ,python-2
14511 #:tests? #f ; No test suite
14512 #:phases
14513 (modify-phases %standard-phases
14514 (replace 'build
14515 (lambda* (#:key inputs #:allow-other-keys)
77e61e25
RW
14516 (invoke "python" "setup.py" "build"
14517 (string-append "--netcdf_prefix="
14518 (assoc-ref inputs "netcdf"))))))))
c695f011 14519 (home-page "http://dirac.cnrs-orleans.fr/ScientificPython")
44d10b1f
RW
14520 (synopsis "Python modules for scientific computing")
14521 (description "ScientificPython is a collection of Python modules that are
14522useful for scientific computing. Most modules are rather general (Geometry,
14523physical units, automatic derivatives, ...) whereas others are more
14524domain-specific (e.g. netCDF and PDB support). The library is currently
14525not actively maintained and works only with Python 2 and NumPy < 1.9.")
14526 (license license:cecill-c)))
14527
14528(define-public python2-mmtk
14529 (package
14530 (name "python2-mmtk")
fe9b72c5 14531 (version "2.7.12")
44d10b1f
RW
14532 (source
14533 (origin
fe9b72c5
KH
14534 (method git-fetch)
14535 (uri (git-reference
14536 (url "https://github.com/khinsen/MMTK")
14537 (commit (string-append "rel" version))))
14538 (file-name (git-file-name name version))
44d10b1f
RW
14539 (sha256
14540 (base32
fe9b72c5 14541 "1fqwh3ba9jd42nigvn5shndgwb1zy7kh9520ncvqci7n8ffjr6p1"))))
44d10b1f
RW
14542 (build-system python-build-system)
14543 (native-inputs
14544 `(("netcdf" ,netcdf)))
14545 (propagated-inputs
14546 `(("python-scientific" ,python2-scientific)
14547 ("python-tkinter" ,python-2 "tk")))
14548 (arguments
14549 `(#:python ,python-2
14550 #:tests? #f
14551 #:phases
14552 (modify-phases %standard-phases
14553 (add-before 'build 'includes-from-scientific
14554 (lambda* (#:key inputs #:allow-other-keys)
14555 (mkdir-p "Include/Scientific")
14556 (copy-recursively
14557 (string-append
14558 (assoc-ref inputs "python-scientific")
14559 "/include/python2.7/Scientific")
14560 "Include/Scientific"))))))
14561 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
14562 (synopsis "Python library for molecular simulation")
14563 (description "MMTK is a library for molecular simulations with an emphasis
14564on biomolecules. It provides widely used methods such as Molecular Dynamics
14565and normal mode analysis, but also basic routines for implementing new methods
14566for simulation and analysis. The library is currently not actively maintained
14567and works only with Python 2 and NumPy < 1.9.")
14568 (license license:cecill-c)))
14569
14570(define-public python-phonenumbers
14571 (package
14572 (name "python-phonenumbers")
14573 (version "8.9.1")
14574 (source
14575 (origin
14576 (method url-fetch)
14577 (uri (pypi-uri "phonenumbers" version))
14578 (sha256
14579 (base32
14580 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
14581 (build-system python-build-system)
14582 (home-page
14583 "https://github.com/daviddrysdale/python-phonenumbers")
14584 (synopsis
14585 "Python library for dealing with international phone numbers")
14586 (description
14587 "This package provides a Python port of Google's libphonenumber library.")
14588 (license license:asl2.0)))
14589
14590(define-public python2-phonenumbers
14591 (package-with-python2 python-phonenumbers))
14592
14593(define-public python-send2trash
14594 (package
14595 (name "python-send2trash")
d9b0216b 14596 (version "1.5.0")
44d10b1f 14597 (source
d9b0216b 14598 (origin (method git-fetch)
44d10b1f 14599 ;; Source tarball on PyPI doesn't include tests.
d9b0216b
RW
14600 (uri (git-reference
14601 (url "https://github.com/hsoft/send2trash.git")
14602 (commit version)))
14603 (file-name (git-file-name name version))
44d10b1f
RW
14604 (sha256
14605 (base32
d9b0216b 14606 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
44d10b1f
RW
14607 (build-system python-build-system)
14608 (arguments
14609 '(#:phases
14610 (modify-phases %standard-phases
14611 (add-before 'check 'pre-check
14612 (lambda _
14613 (mkdir-p "/tmp/foo")
14614 (setenv "HOME" "/tmp/foo")
14615 #t)))))
14616 (home-page "https://github.com/hsoft/send2trash")
14617 (synopsis "Send files to the user's @file{~/Trash} directory")
14618 (description "This package provides a Python library to send files to the
14619user's @file{~/Trash} directory.")
20b3fde7 14620 (properties `((python2-variant . ,(delay python2-send2trash))))
44d10b1f
RW
14621 (license license:bsd-3)))
14622
14623(define-public python2-send2trash
14624 (package
f32164ab 14625 (inherit (package-with-python2 (strip-python2-variant python-send2trash)))
44d10b1f
RW
14626 (arguments
14627 (substitute-keyword-arguments (package-arguments python-send2trash)
14628 ((#:phases phases)
14629 `(modify-phases ,phases
14630 (add-before 'check 'setenv
14631 (lambda _
14632 (setenv "PYTHONPATH"
14633 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
4782a06f 14634 #t))))))))
44d10b1f
RW
14635
14636(define-public python-yapf
14637 (package
14638 (name "python-yapf")
19ba75dc 14639 (version "0.29.0")
44d10b1f
RW
14640 (source
14641 (origin
14642 (method url-fetch)
14643 (uri (pypi-uri "yapf" version))
14644 (sha256
14645 (base32
19ba75dc 14646 "1pj3xzblmbssshi889b6n9hwqbjpabw6j0fimlng2sshd3226bki"))))
44d10b1f
RW
14647 (build-system python-build-system)
14648 (home-page "https://github.com/google/yapf")
14649 (synopsis "Formatter for Python code")
14650 (description "YAPF is a formatter for Python code. It's based off of
14651@dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
14652takes the code and reformats it to the best formatting that conforms to the
14653style guide, even if the original code didn't violate the style guide.")
14654 (license license:asl2.0)))
14655
14656(define-public python2-yapf
14657 (package-with-python2 python-yapf))
14658
14659(define-public python-gyp
14660 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
14661 (revision "0"))
14662 (package
14663 (name "python-gyp")
14664 ;; Google does not release versions,
14665 ;; based on second most recent commit date.
14666 (version (git-version "0.0.0" revision commit))
14667 (source
14668 (origin
14669 ;; Google does not release tarballs,
14670 ;; git checkout is needed.
14671 (method git-fetch)
14672 (uri (git-reference
14673 (url "https://chromium.googlesource.com/external/gyp")
14674 (commit commit)))
14675 (file-name (git-file-name name version))
14676 (sha256
14677 (base32
14678 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
14679 (build-system python-build-system)
14680 (home-page "https://gyp.gsrc.io/")
14681 (synopsis "GYP is a Meta-Build system")
14682 (description
14683 "GYP builds build systems for large, cross platform applications.
14684It can be used to generate XCode projects, Visual Studio projects, Ninja build
14685files, and Makefiles.")
14686 (license license:bsd-3))))
14687
14688(define-public python2-gyp
14689 (package-with-python2 python-gyp))
14690
14691(define-public python-whatever
14692 (package
14693 (name "python-whatever")
97610a66 14694 (version "0.6")
44d10b1f
RW
14695 (source
14696 (origin
ac0ea38c
EF
14697 (method git-fetch)
14698 (uri (git-reference
14699 (url "https://github.com/Suor/whatever")
14700 (commit version)))
14701 (file-name (git-file-name name version))
44d10b1f 14702 (sha256
ac0ea38c 14703 (base32 "1q7ajgqjfivxqsqgnhp4lc4p6jxyh4zprcsdbpd6dw54inaf0av5"))))
44d10b1f
RW
14704 (build-system python-build-system)
14705 (arguments
14706 `(#:phases
14707 (modify-phases %standard-phases
14708 (replace 'check
14709 (lambda _
14710 (invoke "py.test"))))))
14711 (native-inputs
14712 `(("python-pytest" ,python-pytest)))
14713 (home-page "http://github.com/Suor/whatever")
14714 (synopsis "Make anonymous functions by partial application of operators")
14715 (description "@code{whatever} provides an easy way to make anonymous
14716functions by partial application of operators.")
14717 (license license:bsd-3)))
14718
14719(define-public python2-whatever
14720 (package-with-python2 python-whatever))
14721
14722(define-public python-funcy
14723 (package
14724 (name "python-funcy")
9e396ab8 14725 (version "1.11")
44d10b1f
RW
14726 (source
14727 (origin
a85c6027
TGR
14728 (method git-fetch)
14729 (uri (git-reference
14730 (url "https://github.com/Suor/funcy.git")
14731 (commit version)))
44d10b1f 14732 (sha256
a85c6027
TGR
14733 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
14734 (file-name (git-file-name name version))))
44d10b1f
RW
14735 (build-system python-build-system)
14736 (arguments
14737 `(#:phases
14738 (modify-phases %standard-phases
14739 (replace 'check
14740 (lambda _
14741 (invoke "py.test"))))))
14742 (native-inputs
14743 `(("python-pytest" ,python-pytest)
14744 ("python-whatever" ,python-whatever)))
14745 (home-page "http://github.com/Suor/funcy")
14746 (synopsis "Functional tools")
14747 (description "@code{funcy} is a library that provides functional tools.
14748Examples are:
14749@enumerate
14750@item merge - Merges collections of the same type
14751@item walk - Type-preserving map
14752@item select - Selects a part of a collection
14753@item take - Takes the first n items of a collection
14754@item first - Takes the first item of a collection
14755@item remove - Predicated-removes items of a collection
14756@item concat - Concatenates two collections
14757@item flatten - Flattens a collection with subcollections
14758@item distinct - Returns only distinct items
14759@item split - Predicated-splits a collection
14760@item split_at - Splits a collection at a given item
14761@item group_by - Groups items by group
14762@item pairwise - Pairs off adjacent items
14763@item partial - Partially-applies a function
14764@item curry - Curries a function
14765@item compose - Composes functions
14766@item complement - Complements a predicate
14767@item all_fn - \"all\" with predicate
14768@end enumerate")
14769 (license license:bsd-3)))
14770
14771(define-public python2-funcy
14772 (package-with-python2 python-funcy))
14773
14774(define-public python-isoweek
14775 (package
14776 (name "python-isoweek")
14777 (version "1.3.3")
14778 (source
14779 (origin
14780 (method url-fetch)
14781 (uri (pypi-uri "isoweek" version))
14782 (sha256
14783 (base32
14784 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
14785 (build-system python-build-system)
14786 (home-page "https://github.com/gisle/isoweek")
14787 (synopsis "Objects representing a week")
14788 (description "The @code{isoweek} module provide the class Week that
14789implements the week definition of ISO 8601. This standard also defines
14790a notation for identifying weeks; yyyyWww (where the W is a literal).
14791Week instances stringify to this form.")
14792 (license license:bsd-3)))
14793
14794(define-public python2-isoweek
14795 (package-with-python2 python-isoweek))
14796
14797(define-public python-tokenize-rt
14798 (package
14799 (name "python-tokenize-rt")
14800 (version "2.0.1")
14801 (source
14802 (origin
14803 (method url-fetch)
14804 (uri (pypi-uri "tokenize-rt" version))
14805 (sha256
14806 (base32
14807 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
14808 (build-system python-build-system)
14809 (home-page "https://github.com/asottile/tokenize-rt")
14810 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
14811 (description
14812 "This Python library is a wrapper around @code{tokenize} from the Python
14813standard library. It provides two additional tokens @code{ESCAPED_NL} and
14814@code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
14815and @code{tokens_to_src} to roundtrip.")
14816 (license license:expat)))
14817
14818(define-public python-future-fstrings
14819 (package
14820 (name "python-future-fstrings")
14821 (version "0.4.1")
14822 (source
14823 (origin
14824 (method url-fetch)
14825 (uri (pypi-uri "future_fstrings" version))
14826 (sha256
14827 (base32
14828 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
14829 (build-system python-build-system)
14830 (propagated-inputs
14831 `(("python-tokenize-rt" ,python-tokenize-rt)))
14832 (home-page "https://github.com/asottile/future-fstrings")
14833 (synopsis "Backport of fstrings to Python < 3.6")
14834 (description
14835 "This package provides a UTF-8 compatible encoding
14836@code{future_fstrings}, which performs source manipulation. It decodes the
14837source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
14838@code{f} strings.")
14839 (license license:expat)))
14840
dae2eb1c
MC
14841(define-public python-typed-ast
14842 (package
14843 (name "python-typed-ast")
bae89583 14844 (version "1.4.0")
dae2eb1c
MC
14845 (source
14846 (origin
bae89583
MO
14847 (method git-fetch)
14848 (uri (git-reference
14849 (url "https://github.com/python/typed_ast.git")
14850 (commit version)))
dae2eb1c 14851 (sha256
bae89583
MO
14852 (base32 "0l0hz809f7i356kmqkvfsaswiidb98j9hs9rrjnfawzqcbffzgyb"))
14853 (file-name (git-file-name name version))))
dae2eb1c
MC
14854 (build-system python-build-system)
14855 (arguments
14856 `(#:modules ((guix build utils)
14857 (guix build python-build-system)
14858 (ice-9 ftw)
14859 (srfi srfi-1)
14860 (srfi srfi-26))
14861 #:phases
14862 (modify-phases %standard-phases
14863 (replace 'check
14864 (lambda _
14865 (let ((cwd (getcwd)))
14866 (setenv "PYTHONPATH"
14867 (string-append cwd "/build/"
14868 (find (cut string-prefix? "lib" <>)
14869 (scandir (string-append cwd "/build")))
14870 ":"
14871 (getenv "PYTHONPATH"))))
14872 (invoke "pytest")
14873 #t)))))
14874 (native-inputs `(("python-pytest" ,python-pytest)))
14875 (home-page "https://github.com/python/typed_ast")
14876 (synopsis "Fork of Python @code{ast} modules with type comment support")
14877 (description "This package provides a parser similar to the standard
14878@code{ast} library. Unlike @code{ast}, the parsers in @code{typed_ast}
14879include PEP 484 type comments and are independent of the version of Python
14880under which they are run. The @code{typed_ast} parsers produce the standard
14881Python AST (plus type comments), and are both fast and correct, as they are
14882based on the CPython 2.7 and 3.7 parsers.")
14883 ;; See the file "LICENSE" for the details.
14884 (license (list license:psfl
14885 license:asl2.0
14886 license:expat)))) ;ast27/Parser/spark.py
14887
44d10b1f
RW
14888(define-public python-typing
14889 (package
14890 (name "python-typing")
14891 (version "3.6.6")
14892 (source
14893 (origin
14894 (method url-fetch)
14895 (uri (pypi-uri "typing" version))
14896 (sha256
14897 (base32
14898 "0ba9acs4awx15bf9v3nrs781msbd2nx826906nj6fqks2bvca9s0"))))
14899 (build-system python-build-system)
14900 (home-page "https://docs.python.org/3/library/typing.html")
14901 (synopsis "Type hints for Python")
14902 (description "This is a backport of the standard library @code{typing}
14903module to Python versions older than 3.5. Typing defines a standard notation
14904for Python function and variable type annotations. The notation can be used
14905for documenting code in a concise, standard format, and it has been designed
14906to also be used by static and runtime type checkers, static analyzers, IDEs
14907and other tools.")
14908 (license license:psfl)))
14909
14910(define-public python2-typing
14911 (package-with-python2 python-typing))
14912
f89d443b
VC
14913(define-public python-typing-extensions
14914 (package
14915 (name "python-typing-extensions")
14916 (version "3.7.2")
14917 (source
14918 (origin
14919 (method url-fetch)
14920 (uri (pypi-uri "typing_extensions" version))
14921 (sha256
14922 (base32
14923 "0wfsv71pvkyf2na938l579jh0v3kzl6g744ijgnahcwd4d9x0b7v"))))
14924 (build-system python-build-system)
14925 (home-page
14926 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
14927 (synopsis "Experimental type hints for Python")
14928 (description
14929 "The typing_extensions module contains additional @code{typing} hints not
14930yet present in the of the @code{typing} standard library.
14931Included are implementations of:
14932@enumerate
14933@item ClassVar
14934@item ContextManager
14935@item Counter
14936@item DefaultDict
14937@item Deque
14938@item NewType
14939@item NoReturn
14940@item overload
14941@item Protocol
14942@item runtime
14943@item Text
14944@item Type
14945@item TYPE_CHECKING
14946@item AsyncGenerator
14947@end enumerate\n")
14948 (license license:psfl)))
14949
44d10b1f
RW
14950(define-public bpython
14951 (package
14952 (name "bpython")
4de93b2f 14953 (version "0.18")
44d10b1f
RW
14954 (source
14955 (origin
14956 (method url-fetch)
14957 (uri (pypi-uri "bpython" version))
14958 (sha256
4de93b2f 14959 (base32 "1hl6frgvr2lqaxqczl8amg9xih32b3gzv429vs0qrjb8wpdj1k2n"))))
44d10b1f
RW
14960 (build-system python-build-system)
14961 (arguments
14962 `(#:phases
14963 (modify-phases %standard-phases
14964 (add-after 'unpack 'remove-failing-test
14965 (lambda _
14966 ;; Remove failing test. FIXME: make it pass
14967 (delete-file "bpython/test/test_args.py")
14968 #t))
14969 (add-after 'wrap 'add-aliases
14970 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
14971 (lambda* (#:key outputs #:allow-other-keys)
14972 (let ((out (assoc-ref outputs "out")))
14973 (for-each
14974 (lambda (old new)
14975 (symlink old (string-append out "/bin/" new)))
14976 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
14977 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
14978 #t)))))
14979 (propagated-inputs
14980 `(("python-pygments" ,python-pygments)
14981 ("python-requests" ,python-requests)
4de93b2f 14982 ("python-babel" ,python-babel) ; optional, for internationalization
44d10b1f
RW
14983 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
14984 ("python-greenlet" ,python-greenlet)
4de93b2f 14985 ("python-urwid" ,python-urwid) ; for bpython-urwid only
44d10b1f
RW
14986 ("python-six" ,python-six)))
14987 (native-inputs
14988 `(("python-sphinx" ,python-sphinx)
14989 ("python-mock" ,python-mock)))
14990 (home-page "https://bpython-interpreter.org/")
14991 (synopsis "Fancy interface to the Python interpreter")
14992 (description "Bpython is a fancy interface to the Python
14993interpreter. bpython's main features are
14994
14995@enumerate
14996@item in-line syntax highlighting,
14997@item readline-like autocomplete with suggestions displayed as you type,
14998@item expected parameter list for any Python function,
14999@item \"rewind\" function to pop the last line of code from memory and
15000 re-evaluate,
15001@item send the code you've entered off to a pastebin,
15002@item save the code you've entered to a file, and
15003@item auto-indentation.
15004@end enumerate")
15005 (license license:expat)))
15006
15007(define-public bpython2
15008 (let ((base (package-with-python2
15009 (strip-python2-variant bpython))))
15010 (package (inherit base)
15011 (name "bpython2")
15012 (arguments
15013 `(#:python ,python-2
15014 #:phases
15015 (modify-phases %standard-phases
15016 (add-after 'unpack 'remove-failing-test
15017 (lambda _
15018 ;; Remove failing test. FIXME: make it pass
15019 (delete-file "bpython/test/test_args.py")
15020 ;; Disable failing test-cases (renaming inhibits they are
15021 ;; discovered)
15022 (substitute* "bpython/test/test_curtsies_repl.py"
15023 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
15024 (string-append a "xxx_off_" b))
15025 (("^(\\s*def )(test_complex\\W)" _ a b)
15026 (string-append a "xxx_off_" b)))
15027 #t))
15028 (add-before 'build 'rename-scripts
15029 ;; rename the scripts to bypthon2, bpdb2, etc.
15030 (lambda _
15031 (substitute* "setup.py"
15032 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
15033 (string-append name "2" rest "\n"))
15034 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
15035 (string-append name "2" (or sub "") rest "\n")))
15036 #t))))))))
15037
15038(define-public python-pyinotify
15039 (package
15040 (name "python-pyinotify")
15041 (version "0.9.6")
15042 (source (origin
15043 (method url-fetch)
15044 (uri (pypi-uri "pyinotify" version))
15045 (sha256
15046 (base32
15047 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
15048 (build-system python-build-system)
15049 (arguments `(#:tests? #f)) ;no tests
15050 (home-page "https://github.com/seb-m/pyinotify")
15051 (synopsis "Python library for monitoring inotify events")
15052 (description
15053 "@code{pyinotify} provides a Python interface for monitoring
15054file system events on Linux.")
15055 (license license:expat)))
15056
15057(define-public python2-pyinotify
15058 (package-with-python2 python-pyinotify))
15059
15060;; Ada parser uses this version.
15061(define-public python2-quex-0.67.3
15062 (package
15063 (name "python2-quex")
15064 (version "0.67.3")
15065 (source
15066 (origin
15067 (method url-fetch)
15068 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
15069 (version-major+minor version)
15070 "/quex-" version ".zip"))
15071 (sha256
15072 (base32
15073 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
15074 (build-system python-build-system)
15075 (native-inputs
15076 `(("unzip" ,unzip)))
15077 (arguments
15078 `(#:python ,python-2
15079 #:tests? #f
15080 #:phases
15081 (modify-phases %standard-phases
15082 (delete 'configure)
15083 (delete 'build)
15084 (replace 'install
15085 (lambda* (#:key outputs #:allow-other-keys)
15086 (let* ((out (assoc-ref outputs "out"))
15087 (share/quex (string-append out "/share/quex"))
15088 (bin (string-append out "/bin")))
15089 (copy-recursively "." share/quex)
15090 (mkdir-p bin)
15091 (symlink (string-append share/quex "/quex-exe.py")
15092 (string-append bin "/quex"))
15093 #t))))))
15094 (native-search-paths
15095 (list (search-path-specification
15096 (variable "QUEX_PATH")
15097 (files '("share/quex")))))
15098 (home-page "http://quex.sourceforge.net/")
15099 (synopsis "Lexical analyzer generator in Python")
15100 (description "@code{quex} is a lexical analyzer generator in Python.")
15101 (license license:lgpl2.1+))) ; Non-military
15102
15103(define-public python2-quex
15104 (package (inherit python2-quex-0.67.3)
15105 (name "python2-quex")
15106 (version "0.68.1")
15107 (source
15108 (origin
15109 (method url-fetch)
15110 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
15111 (sha256
15112 (base32
15113 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
15114 (file-name (string-append name "-" version ".tar.gz"))))))
15115
15116(define-public python-more-itertools
15117 (package
15118 (name "python-more-itertools")
1b066827 15119 (version "7.1.0")
44d10b1f
RW
15120 (source
15121 (origin
15122 (method url-fetch)
15123 (uri (pypi-uri "more-itertools" version))
15124 (sha256
15125 (base32
1b066827 15126 "16phg2f2dvm6ci5wr49ncha5lmc0m2in3bsl33c61vzca4gkvd4b"))))
44d10b1f 15127 (build-system python-build-system)
44d10b1f
RW
15128 (home-page "https://github.com/erikrose/more-itertools")
15129 (synopsis "More routines for operating on iterables, beyond itertools")
15130 (description "Python's built-in @code{itertools} module implements a
15131number of iterator building blocks inspired by constructs from APL, Haskell,
15132and SML. @code{more-itertools} includes additional building blocks for
15133working with iterables.")
47f66348 15134 (properties `((python2-variant . ,(delay python2-more-itertools))))
44d10b1f
RW
15135 (license license:expat)))
15136
47f66348 15137;; The 5.x series are the last versions supporting Python 2.7.
44d10b1f 15138(define-public python2-more-itertools
47f66348
MB
15139 (package
15140 (inherit python-more-itertools)
15141 (name "python2-more-itertools")
15142 (version "5.0.0")
15143 (source (origin
15144 (method url-fetch)
15145 (uri (pypi-uri "more-itertools" version))
15146 (sha256
15147 (base32
15148 "1r12cm6mcdwdzz7d47a6g4l437xsvapdlgyhqay3i2nrlv03da9q"))))
15149 (arguments
15150 `(#:python ,python2-minimal))
15151 (propagated-inputs
15152 `(("python2-six" ,python2-six-bootstrap)))))
44d10b1f
RW
15153
15154(define-public python-latexcodec
15155 (package
15156 (name "python-latexcodec")
f3415ba5 15157 (version "1.0.7")
44d10b1f
RW
15158 (source
15159 (origin
15160 (method url-fetch)
15161 (uri (pypi-uri "latexcodec" version))
15162 (sha256
f3415ba5 15163 (base32 "0wnp3yqcgx0rpy8dz51vh75lbp2qif67da19zi7m3ca98n887hgb"))))
44d10b1f
RW
15164 (build-system python-build-system)
15165 (inputs
15166 `(("python-six" ,python-six)))
15167 (home-page "https://readthedocs.org/projects/latexcodec/")
15168 (synopsis "Work with LaTeX code in Python")
15169 (description "Lexer and codec to work with LaTeX code in Python.")
15170 (license license:expat)))
15171
15172(define-public python-pybtex
15173 (package
15174 (name "python-pybtex")
9441a9c1 15175 (version "0.22.2")
44d10b1f
RW
15176 (source
15177 (origin
15178 (method url-fetch)
15179 (uri (pypi-uri "pybtex" version))
15180 (sha256
9441a9c1 15181 (base32 "070wfcmxrd7xg1si421mi9150gmx2qwx431nwf69sq3hhmgnx080"))))
44d10b1f
RW
15182 (build-system python-build-system)
15183 (native-inputs
15184 `(("python-nose" ,python-nose)))
15185 (inputs
15186 `(("python-latexcodec" ,python-latexcodec)
15187 ("python-pyyaml" ,python-pyyaml)
15188 ("python-six" ,python-six)))
15189 (arguments
15190 `(#:test-target "nosetests"))
15191 (home-page "https://pybtex.org/")
15192 (synopsis "BibTeX-compatible bibliography processor")
15193 (description "Pybtex is a BibTeX-compatible bibliography processor written
15194in Python. You can simply type pybtex instead of bibtex.")
15195 (license license:expat)))
15196
15197(define-public python-onetimepass
15198 (package
15199 (name "python-onetimepass")
15200 (version "1.0.1")
15201 (source
15202 (origin
15203 (method url-fetch)
15204 (uri (pypi-uri "onetimepass" version))
15205 (sha256
15206 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
15207 (build-system python-build-system)
15208 (propagated-inputs `(("python-six" ,python-six)))
15209 (home-page "https://github.com/tadeck/onetimepass/")
15210 (synopsis "One-time password library")
15211 (description "Python one-time password library for HMAC-based (HOTP) and
15212time-based (TOTP) passwords.")
15213 (license license:expat)))
15214
15215(define-public python-parso
15216 (package
15217 (name "python-parso")
170d5844 15218 (version "0.5.2")
44d10b1f
RW
15219 (source
15220 (origin
15221 (method url-fetch)
15222 (uri (pypi-uri "parso" version))
15223 (sha256
15224 (base32
170d5844 15225 "1qgvrkpma7vylrk047mxxvqd66nwqk978n3ig2w8iz9m3bgjbksm"))))
44d10b1f
RW
15226 (native-inputs
15227 `(("python-pytest" ,python-pytest)))
15228 (build-system python-build-system)
4eb97c25
MC
15229 (arguments
15230 `(#:phases (modify-phases %standard-phases
15231 (replace 'check
15232 (lambda _ (invoke "pytest" "-vv"))))))
44d10b1f
RW
15233 (home-page "https://github.com/davidhalter/parso")
15234 (synopsis "Python Parser")
15235 (description "Parso is a Python parser that supports error recovery and
15236round-trip parsing for different Python versions (in multiple Python versions).
15237Parso is also able to list multiple syntax errors in your Python file.")
15238 (license license:expat)))
15239
15240(define-public python2-parso
15241 (package-with-python2 python-parso))
15242
15243(define-public python-async-generator
15244 (package
15245 (name "python-async-generator")
94fcbf8d 15246 (version "1.10")
44d10b1f
RW
15247 (source
15248 (origin
15249 (method url-fetch)
15250 (uri (pypi-uri "async_generator" version))
15251 (sha256
15252 (base32
94fcbf8d 15253 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
44d10b1f
RW
15254 (build-system python-build-system)
15255 (native-inputs
15256 `(("python-pytest" ,python-pytest)))
15257 (home-page "https://github.com/python-trio/async_generator")
15258 (synopsis "Async generators and context managers for Python 3.5+")
15259 (description "@code{async_generator} back-ports Python 3.6's native async
15260generators and Python 3.7's context managers into Python 3.5.")
15261 ;; Dual licensed.
15262 (license (list license:expat license:asl2.0))))
15263
15264(define-public python-async-timeout
15265 (package
15266 (name "python-async-timeout")
15267 (version "3.0.1")
15268 (source
15269 (origin
15270 (method url-fetch)
15271 (uri (pypi-uri "async-timeout" version))
15272 (sha256
15273 (base32
15274 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
15275 (build-system python-build-system)
15276 (home-page "https://github.com/aio-libs/async_timeout/")
15277 (synopsis "Timeout context manager for asyncio programs")
15278 (description "@code{async-timeout} provides a timeout timeout context
15279manager compatible with @code{asyncio}.")
15280 (license license:asl2.0)))
15281
15282(define-public python-glob2
15283 (package
15284 (name "python-glob2")
4df49d19 15285 (version "0.7")
8fa2bcc7
TGR
15286 (source
15287 (origin
15288 (method git-fetch)
15289 (uri (git-reference
15290 (url "https://github.com/miracle2k/python-glob2.git")
4df49d19 15291 (commit (string-append "v" version))))
8fa2bcc7
TGR
15292 (file-name (git-file-name name version))
15293 (sha256
4df49d19 15294 (base32 "160nh2ay9lw2hi0rixpzb2k87r6ql56k0j2cm87lqz8xc8zbw919"))))
44d10b1f
RW
15295 (build-system python-build-system)
15296 (home-page "https://github.com/miracle2k/python-glob2/")
15297 (synopsis "Extended Version of the python buildin glob module")
15298 (description "This is an extended version of the Python
15299@url{http://docs.python.org/library/glob.html, built-in glob module} which
15300adds:
15301
15302@itemize
15303@item The ability to capture the text matched by glob patterns, and return
15304those matches alongside the file names.
15305@item A recursive @code{**} globbing syntax, akin for example to the
15306@code{globstar} option of Bash.
15307@item The ability to replace the file system functions used, in order to glob
15308on virtual file systems.
15309@item Compatible with Python 2 and Python 3 (tested with 3.3).
15310@end itemize
15311
15312Glob2 currently based on the glob code from Python 3.3.1.")
15313 (license license:bsd-2)))
15314
15315(define-public python2-glob2
15316 (package-with-python2 python-glob2))
15317
15318(define-public python-gipc
15319 (package
15320 (name "python-gipc")
15321 (version "0.6.0")
15322 (source
15323 (origin
15324 (method url-fetch)
15325 (uri (pypi-uri "gipc" version ".zip"))
15326 (sha256
15327 (base32
15328 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
15329 (build-system python-build-system)
15330 (native-inputs
15331 `(("unzip" ,unzip)))
15332 (propagated-inputs
15333 `(("python-gevent" ,python-gevent)))
fd3ae040 15334 (home-page "https://gehrcke.de/gipc/")
44d10b1f
RW
15335 (synopsis "Child process management in the context of gevent")
15336 (description "Usage of Python's multiprocessing package in a
15337gevent-powered application may raise problems. With @code{gipc},
15338process-based child processes can safely be created anywhere within a
15339gevent-powered application.")
15340 (license license:expat)))
15341
15342(define-public python2-gipc
15343 (package-with-python2 python-gipc))
15344
15345(define-public python-fusepy
15346 (package
15347 (name "python-fusepy")
15348 (version "2.0.4")
15349 (source
15350 (origin
15351 (method url-fetch)
15352 (uri (pypi-uri "fusepy" version))
15353 (sha256
15354 (base32
15355 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
15356 (build-system python-build-system)
15357 (arguments
15358 `(#:phases
15359 (modify-phases %standard-phases
15360 (add-before 'build 'set-library-file-name
15361 (lambda* (#:key inputs #:allow-other-keys)
15362 (let ((fuse (assoc-ref inputs "fuse")))
15363 (substitute* "fuse.py"
15364 (("find_library\\('fuse'\\)")
15365 (string-append "'" fuse "/lib/libfuse.so'")))
15366 #t))))))
15367 (propagated-inputs
15368 `(("fuse" ,fuse)))
15369 (home-page "https://github.com/fusepy/fusepy")
15370 (synopsis "Simple ctypes bindings for FUSE")
15371 (description "Python module that provides a simple interface to FUSE and
15372MacFUSE. The binding is created using the standard @code{ctypes} library.")
15373 (license license:isc)))
15374
15375(define-public python2-fusepy
15376 (package-with-python2 python-fusepy))
15377
15378(define-public python2-gdrivefs
15379 (package
15380 (name "python2-gdrivefs")
15381 (version "0.14.9")
15382 (source
15383 (origin
15384 (method url-fetch)
15385 (uri (pypi-uri "gdrivefs" version))
15386 (sha256
15387 (base32
15388 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
15389 (build-system python-build-system)
15390 (arguments
15391 `(#:python ,python-2
15392 #:phases
15393 (modify-phases %standard-phases
15394 (add-before 'build 'patch-setup-py
15395 (lambda _
15396 ;; Update requirements from dependency==version
15397 ;; to dependency>=version
15398 (substitute* "gdrivefs/resources/requirements.txt"
15399 (("==") ">="))
15400 #t)))))
15401 (native-inputs
15402 `(("python2-gipc" ,python2-gipc)
15403 ("python2-gevent" ,python2-gevent)
15404 ("python2-greenlet" ,python2-greenlet)
15405 ("python2-httplib2" ,python2-httplib2)
15406 ("python2-uritemplate" ,python2-uritemplate)
15407 ("python2-oauth2client" ,python2-oauth2client)
15408 ("python2-six" ,python2-six)))
15409 (propagated-inputs
15410 `(("python2-dateutil" ,python2-dateutil)
15411 ("python2-fusepy" ,python2-fusepy)
15412 ("python2-google-api-client" ,python2-google-api-client)))
15413 (home-page "https://github.com/dsoprea/GDriveFS")
15414 (synopsis "Mount Google Drive as a local file system")
15415 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
15416under Python 2.7.")
15417 (license license:gpl2)))
15418
15419(define-public pybind11
15420 (package
15421 (name "pybind11")
0690f324 15422 (version "2.4.3")
44d10b1f
RW
15423 (source (origin
15424 (method git-fetch)
15425 (uri (git-reference
15426 (url "https://github.com/pybind/pybind11.git")
15427 (commit (string-append "v" version))))
15428 (sha256
15429 (base32
0690f324 15430 "0k89w4bsfbpzw963ykg1cyszi3h3nk393qd31m6y46pcfxkqh4rd"))
44d10b1f
RW
15431 (file-name (git-file-name name version))))
15432 (build-system cmake-build-system)
15433 (native-inputs
3cf579e9 15434 `(("python" ,python-wrapper)
ae8db9ce
LC
15435
15436 ;; The following dependencies are used for tests.
15437 ("python-pytest" ,python-pytest)
15438 ("catch" ,catch-framework2-1)
15439 ("eigen" ,eigen)))
44d10b1f 15440 (arguments
ae8db9ce
LC
15441 `(#:configure-flags
15442 (list (string-append "-DCATCH_INCLUDE_DIR="
15443 (assoc-ref %build-inputs "catch")
15444 "/include/catch"))
15445
3cf579e9
LC
15446 #:phases (modify-phases %standard-phases
15447 (add-after 'install 'install-python
15448 (lambda* (#:key outputs #:allow-other-keys)
15449 (let ((out (assoc-ref outputs "out")))
15450 (with-directory-excursion "../source"
15451 (setenv "PYBIND11_USE_CMAKE" "yes")
15452 (invoke "python" "setup.py" "install"
15453 "--single-version-externally-managed"
15454 "--root=/"
15455 (string-append "--prefix=" out)))))))
15456
ae8db9ce 15457 #:test-target "check"))
44d10b1f
RW
15458 (home-page "https://github.com/pybind/pybind11/")
15459 (synopsis "Seamless operability between C++11 and Python")
ab17297a
LC
15460 (description
15461 "@code{pybind11} is a lightweight header-only library that exposes C++
15462types in Python and vice versa, mainly to create Python bindings of existing
15463C++ code. Its goals and syntax are similar to the @code{Boost.Python}
15464library: to minimize boilerplate code in traditional extension modules by
15465inferring type information using compile-time introspection.")
65eada58 15466 (license license:bsd-3)))
44d10b1f
RW
15467
15468(define-public python-fasteners
15469 (package
15470 (name "python-fasteners")
15471 (version "0.14.1")
15472 (source
15473 (origin
15474 (method url-fetch)
15475 (uri (pypi-uri "fasteners" version))
15476 (sha256
15477 (base32
15478 "063y20kx01ihbz2mziapmjxi2cd0dq48jzg587xdsdp07xvpcz22"))))
15479 (build-system python-build-system)
15480 (propagated-inputs
15481 `(("python-monotonic" ,python-monotonic)
15482 ("python-six" ,python-six)
15483 ("python-testtools" ,python-testtools)))
15484 (home-page "https://github.com/harlowja/fasteners")
15485 (synopsis "Python package that provides useful locks")
15486 (description
15487 "This package provides a Python program that provides following locks:
15488
15489@itemize
15490@item Locking decorator
15491@item Reader-writer locks
15492@item Inter-process locks
15493@item Generic helpers
15494@end itemize\n")
15495 (properties `((python2-variant . ,(delay python2-fasteners))))
15496 (license license:asl2.0)))
15497
15498(define-public python2-fasteners
15499 (let ((base (package-with-python2 (strip-python2-variant python-fasteners))))
15500 (package
15501 (inherit base)
15502 (propagated-inputs
15503 `(("python2-futures" ,python2-futures)
15504 ,@(package-propagated-inputs base))))))
15505
15506(define-public python-requests-file
15507 (package
15508 (name "python-requests-file")
15509 (version "1.4.3")
15510 (source
15511 (origin
15512 (method url-fetch)
15513 (uri (pypi-uri "requests-file" version))
15514 (sha256
15515 (base32
15516 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
15517 (build-system python-build-system)
15518 (propagated-inputs
15519 `(("python-requests" ,python-requests)
15520 ("python-six" ,python-six)))
15521 (home-page
15522 "https://github.com/dashea/requests-file")
15523 (synopsis "File transport adapter for Requests")
15524 (description
15525 "Requests-File is a transport adapter for use with the Requests Python
52beae7b 15526library to allow local file system access via @code{file://} URLs.")
44d10b1f
RW
15527 (license license:asl2.0)))
15528
15529(define-public python2-requests-file
15530 (package-with-python2 python-requests-file))
15531
15532(define-public python-tldextract
15533 (package
15534 (name "python-tldextract")
15535 (version "2.2.0")
15536 (source
15537 (origin
15538 (method url-fetch)
15539 (uri (pypi-uri "tldextract" version))
15540 (sha256
15541 (base32
15542 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
15543 (build-system python-build-system)
15544 (native-inputs
15545 `(("python-pytest" ,python-pytest)
15546 ("python-responses" ,python-responses)))
15547 (propagated-inputs
15548 `(("python-idna" ,python-idna)
15549 ("python-requests" ,python-requests)
15550 ("python-requests-file" ,python-requests-file)))
15551 (home-page
15552 "https://github.com/john-kurkowski/tldextract")
15553 (synopsis
15554 "Separate the TLD from the registered domain and subdomains of a URL")
15555 (description
15556 "TLDExtract accurately separates the TLD from the registered domain and
15557subdomains of a URL, using the Public Suffix List. By default, this includes
15558the public ICANN TLDs and their exceptions. It can optionally support the
15559Public Suffix List's private domains as well.")
15560 (license license:bsd-3)))
15561
15562(define-public python2-tldextract
15563 (package-with-python2 python-tldextract))
15564
15565(define-public python-pynamecheap
15566 (package
15567 (name "python-pynamecheap")
15568 (version "0.0.3")
15569 (source
15570 (origin
15571 (method url-fetch)
15572 (uri (pypi-uri "PyNamecheap" version))
15573 (sha256
15574 (base32
15575 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
15576 (build-system python-build-system)
15577 (propagated-inputs
15578 `(("python-requests" ,python-requests)))
15579 (home-page
15580 "https://github.com/Bemmu/PyNamecheap")
15581 (synopsis
15582 "Namecheap API client in Python")
15583 (description
15584 "PyNamecheap is a Namecheap API client in Python.")
15585 (license license:expat)))
15586
15587(define-public python2-pynamecheap
15588 (package-with-python2 python-pynamecheap))
15589
15590(define-public python-dns-lexicon
15591 (package
15592 (name "python-dns-lexicon")
15593 (version "2.4.0")
15594 (source
15595 (origin
15596 (method url-fetch)
15597 (uri (pypi-uri "dns-lexicon" version))
15598 (sha256
15599 (base32
15600 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
15601 (build-system python-build-system)
15602 (arguments
15603 `(#:tests? #f)) ;requires internet access
15604 (propagated-inputs
15605 `(("python-future" ,python-future)
15606 ("python-pynamecheap" ,python-pynamecheap)
15607 ("python-requests" ,python-requests)
15608 ("python-tldextract" ,python-tldextract)
15609 ("python-urllib3" ,python-urllib3)))
15610 (home-page "https://github.com/AnalogJ/lexicon")
15611 (synopsis
15612 "Manipulate DNS records on various DNS providers")
15613 (description
15614 "Lexicon provides a way to manipulate DNS records on multiple DNS
15615providers in a standardized way. It has a CLI but it can also be used as a
15616Python library. It was designed to be used in automation, specifically with
15617Let's Encrypt.")
15618 (license license:expat)))
15619
15620(define-public python2-dns-lexicon
15621 (package-with-python2 python-dns-lexicon))
15622
15623(define-public python-commandlines
15624 (package
15625 (name "python-commandlines")
15626 (version "0.4.1")
15627 (source
15628 (origin
15629 (method url-fetch)
15630 (uri (pypi-uri "commandlines" version))
15631 (sha256
15632 (base32
15633 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
15634 (build-system python-build-system)
15635 (home-page "https://github.com/chrissimpkins/commandlines")
15636 (synopsis "Command line argument to object parsing library")
15637 (description
15638 "@code{Commandlines} is a Python library for command line application
15639development that supports command line argument parsing, command string
15640validation testing and application logic.")
15641 (license license:expat)))
15642
15643;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
15644;; python-numba. They have a very unflexible relationship.
15645(define-public python-numba
15646 (package
15647 (name "python-numba")
65f84096 15648 (version "0.46.0")
44d10b1f
RW
15649 (source
15650 (origin
15651 (method url-fetch)
15652 (uri (pypi-uri "numba" version))
15653 (sha256
15654 (base32
65f84096 15655 "1vnfzcq6fcnkmdms6114d49awvvj5181fl7z1wlha27qc2paxjy2"))))
44d10b1f
RW
15656 (build-system python-build-system)
15657 (arguments
15658 `(#:modules ((guix build utils)
15659 (guix build python-build-system)
15660 (ice-9 ftw)
15661 (srfi srfi-1)
15662 (srfi srfi-26))
15663 #:phases
15664 (modify-phases %standard-phases
15665 (add-after 'unpack 'disable-proprietary-features
15666 (lambda _
15667 (setenv "NUMBA_DISABLE_HSA" "1")
15668 (setenv "NUMBA_DISABLE_CUDA" "1")
15669 #t))
15670 (add-after 'unpack 'remove-failing-tests
15671 (lambda _
65f84096 15672 ;; FIXME: These tests fail for unknown reasons:
44d10b1f
RW
15673 ;; test_non_writable_pycache, test_non_creatable_pycache, and
15674 ;; test_frozen (all in numba.tests.test_dispatcher.TestCache).
15675 (substitute* "numba/tests/test_dispatcher.py"
15676 (("def test(_non_writable_pycache)" _ m)
15677 (string-append "def guix_skip" m))
15678 (("def test(_non_creatable_pycache)" _ m)
15679 (string-append "def guix_skip" m))
15680 (("def test(_frozen)" _ m)
15681 (string-append "def guix_skip" m)))
15682
15683 ;; These tests fail because we don't run the tests from the build
15684 ;; directory: test_setup_py_distutils, test_setup_py_setuptools
65f84096 15685 ;; They are in numba.tests.test_pycc.TestDistutilsSupport.
44d10b1f
RW
15686 (substitute* "numba/tests/test_pycc.py"
15687 (("def test(_setup_py_distutils|_setup_py_setuptools)" _ m)
15688 (string-append "def guix_skip" m)))
65f84096
BG
15689
15690 ;; These tests fail because our version of Python does not have
15691 ;; a recognizable front-end for the Numba distribution to use
15692 ;; to check against.
15693 (substitute* "numba/tests/test_entrypoints.py"
15694 (("def test(_init_entrypoint)" _ m)
15695 (string-append "def guix_skip" m)))
15696 (substitute* "numba/tests/test_jitclasses.py"
15697 (("def test(_jitclass_longlabel_not_truncated)" _ m)
15698 (string-append "def guix_skip" m)))
44d10b1f
RW
15699 #t))
15700 (replace 'check
15701 (lambda _
15702 (let ((cwd (getcwd)))
15703 (setenv "PYTHONPATH"
15704 (string-append cwd "/build/"
15705 (find (cut string-prefix? "lib" <>)
15706 (scandir (string-append cwd "/build")))
15707 ":"
15708 (getenv "PYTHONPATH")))
15709 ;; Something is wrong with the PYTHONPATH when running the
15710 ;; tests from the build directory, as it complains about not being
15711 ;; able to import certain modules.
15712 (with-directory-excursion "/tmp"
15713 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))
15714 #t)))))
15715 (propagated-inputs
15716 `(("python-llvmlite" ,python-llvmlite)
15717 ("python-numpy" ,python-numpy)
15718 ("python-singledispatch" ,python-singledispatch)))
15719 ;; Needed for tests.
15720 (inputs
15721 `(("python-jinja2" ,python-jinja2)
15722 ("python-pygments" ,python-pygments)))
15723 (home-page "https://numba.pydata.org")
15724 (synopsis "Compile Python code using LLVM")
15725 (description "Numba gives you the power to speed up your applications with
15726high performance functions written directly in Python. With a few
15727annotations, array-oriented and math-heavy Python code can be just-in-time
15728compiled to native machine instructions, similar in performance to C, C++ and
15729Fortran, without having to switch languages or Python interpreters.
15730
15731Numba works by generating optimized machine code using the LLVM compiler
15732infrastructure at import time, runtime, or statically (using the included pycc
15733tool).")
15734 (license license:bsd-3)))
15735
15736(define-public python-anndata
15737 (package
15738 (name "python-anndata")
8c9372c1 15739 (version "0.6.18")
44d10b1f
RW
15740 (source
15741 (origin
15742 (method url-fetch)
15743 (uri (pypi-uri "anndata" version))
15744 (sha256
15745 (base32
8c9372c1 15746 "03x83yjaccbqszj7x4fwwmpil0ai59yx64d1zmf2691za3j03w73"))))
44d10b1f
RW
15747 (build-system python-build-system)
15748 (propagated-inputs
15749 `(("python-h5py" ,python-h5py)
15750 ("python-natsort" ,python-natsort)
15751 ("python-pandas" ,python-pandas)
15752 ("python-scipy" ,python-scipy)))
15753 (home-page "https://github.com/theislab/anndata")
15754 (synopsis "Annotated data for data analysis pipelines")
15755 (description "Anndata is a package for simple (functional) high-level APIs
15756for data analysis pipelines. In this context, it provides an efficient,
15757scalable way of keeping track of data together with learned annotations and
15758reduces the code overhead typically encountered when using a mostly
15759object-oriented library such as @code{scikit-learn}.")
15760 (license license:bsd-3)))
15761
15762(define-public python-dill
15763 (package
15764 (name "python-dill")
32be3577 15765 (version "0.3.1.1")
44d10b1f
RW
15766 (source
15767 (origin
15768 (method url-fetch)
15769 (uri (pypi-uri "dill" version))
15770 (sha256
32be3577 15771 (base32 "1704g8z70d210ksgbccs2v545v9w0wc6lx15m296alb7jf0yzn22"))))
44d10b1f 15772 (build-system python-build-system)
32be3577
MIP
15773 (arguments
15774 `(#:phases
15775 (modify-phases %standard-phases
15776 (replace 'check
15777 (lambda _
15778 (with-directory-excursion "/tmp"
15779 (invoke "nosetests" "-v"))
15780 #t)))))
15781 (native-inputs
15782 `(("python-nose" ,python-nose)))
15783 (home-page "https://pypi.org/project/dill/")
44d10b1f
RW
15784 (synopsis "Serialize all of Python")
15785 (description "Dill extends Python's @code{pickle} module for serializing
15786and de-serializing Python objects to the majority of the built-in Python
15787types. Dill provides the user the same interface as the @code{pickle} module,
15788and also includes some additional features. In addition to pickling Python
15789objects, @code{dill} provides the ability to save the state of an interpreter
61985d65 15790session in a single command. Hence, it would be feasible to save a
44d10b1f
RW
15791interpreter session, close the interpreter, ship the pickled file to another
15792computer, open a new interpreter, unpickle the session and thus continue from
15793the saved state of the original interpreter session.")
15794 (license license:bsd-3)))
15795
15796(define-public python-multiprocess
15797 (package
15798 (name "python-multiprocess")
fcc4e9e7 15799 (version "0.70.9")
44d10b1f
RW
15800 (source
15801 (origin
15802 (method url-fetch)
15803 (uri (pypi-uri "multiprocess" version))
15804 (sha256
15805 (base32
fcc4e9e7 15806 "1r882nvd44xqwbrclwqx5rhs80l6809rcvpc7pkpgnij06cvvmcz"))))
44d10b1f 15807 (build-system python-build-system)
fcc4e9e7
MIP
15808 (arguments
15809 `(#:phases
15810 (modify-phases %standard-phases
15811 (add-after 'unpack 'disable-broken-tests
15812 (lambda _
15813 ;; This test is broken as there is no keyboard interrupt.
15814 (substitute* "py3.7/multiprocess/tests/__init__.py"
15815 (("^(.*)def test_wait_result"
15816 line indent)
15817 (string-append indent
15818 "@unittest.skip(\"Disabled by Guix\")\n"
15819 line)))
15820 #t))
15821 ;; Tests must be run after installation.
15822 (delete 'check)
15823 (add-after 'install 'check
15824 (lambda* (#:key inputs outputs #:allow-other-keys)
15825 (add-installed-pythonpath inputs outputs)
15826 (invoke "python" "-m" "multiprocess.tests")
15827 #t)))))
44d10b1f
RW
15828 (propagated-inputs
15829 `(("python-dill" ,python-dill)))
fcc4e9e7 15830 (home-page "https://pypi.org/project/multiprocess/")
44d10b1f
RW
15831 (synopsis "Multiprocessing and multithreading in Python")
15832 (description
15833 "This package is a fork of the multiprocessing Python package, a package
15834which supports the spawning of processes using the API of the standard
15835library's @code{threading} module.")
15836 (license license:bsd-3)))
15837
15838(define-public python-toolz
15839 (package
15840 (name "python-toolz")
15841 (version "0.9.0")
15842 (source
15843 (origin
15844 (method url-fetch)
15845 (uri (pypi-uri "toolz" version))
15846 (sha256
15847 (base32
15848 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
15849 (build-system python-build-system)
15850 ;; FIXME: tests cannot be computed: "Can't perform this operation for
15851 ;; unregistered loader type"
15852 (arguments '(#:tests? #f))
15853 (home-page "https://github.com/pytoolz/toolz/")
15854 (synopsis "List processing tools and functional utilities")
15855 (description
15856 "This package provides a set of utility functions for iterators,
15857functions, and dictionaries.")
15858 (license license:bsd-3)))
15859
15860(define-public python2-toolz
15861 (package-with-python2 python-toolz))
15862
15863(define-public python-cytoolz
15864 (package
15865 (name "python-cytoolz")
15866 (version "0.9.0.1")
15867 (source
15868 (origin
15869 (method url-fetch)
15870 (uri (pypi-uri "cytoolz" version))
15871 (sha256
15872 (base32
15873 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
15874 (build-system python-build-system)
15875 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
15876 ;; 'exceptions'"
15877 (arguments '(#:tests? #f))
15878 (propagated-inputs
15879 `(("python-toolz" ,python-toolz)))
15880 (native-inputs
15881 `(("python-cython" ,python-cython)))
15882 (home-page "https://github.com/pytoolz/cytoolz")
15883 (synopsis "High performance functional utilities")
15884 (description
15885 "The cytoolz package implements the same API as provided by toolz. The
15886main differences are that @code{cytoolz} is faster and cytoolz offers a C API
15887that is accessible to other projects developed in Cython.")
15888 (license license:bsd-3)))
15889
15890(define-public python-sortedcontainers
15891 (package
15892 (name "python-sortedcontainers")
b244f166 15893 (version "2.1.0")
44d10b1f
RW
15894 (source
15895 (origin
15896 (method url-fetch)
15897 (uri (pypi-uri "sortedcontainers" version))
15898 (sha256
15899 (base32
b244f166 15900 "0fm0w5id2yhqld95hg2m636vjgkz377rvgdfqaxc25vbylr9lklp"))))
44d10b1f
RW
15901 (build-system python-build-system)
15902 (native-inputs
15903 `(("python-tox" ,python-tox)))
15904 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
15905 (synopsis "Sorted List, Sorted Dict, Sorted Set")
15906 (description
15907 "This package provides a sorted collections library, written in
15908pure-Python.")
15909 (license license:asl2.0)))
15910
15911(define-public python-cloudpickle
15912 (package
15913 (name "python-cloudpickle")
15914 (version "0.6.1")
15915 (source
15916 (origin
15917 (method url-fetch)
15918 (uri (pypi-uri "cloudpickle" version))
15919 (sha256
15920 (base32
15921 "1wdw89mlm7fqa3fm3ymskx05jrys66n8m1z1a8s0mss0799ahsgi"))))
15922 (build-system python-build-system)
15923 ;; FIXME: there are 5 errors in 122 tests:
15924 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.CloudPickleTest)
15925 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.CloudPickleTest)
15926 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.Protocol2CloudPickleTest)
15927 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.Protocol2CloudPickleTest)
15928 ;; ERROR: test_temp_file (tests.cloudpickle_file_test.CloudPickleFileTests)
15929 ;; TypeError: cannot serialize '_io.BufferedRandom' object
15930 (arguments '(#:tests? #f))
15931 (native-inputs
15932 `(("python-pytest" ,python-pytest)
15933 ("python-mock" ,python-mock)
15934 ("python-tornado" ,python-tornado)))
15935 (home-page "https://github.com/cloudpipe/cloudpickle")
15936 (synopsis "Extended pickling support for Python objects")
15937 (description
15938 "Cloudpickle makes it possible to serialize Python constructs not
15939supported by the default pickle module from the Python standard library. It
15940is especially useful for cluster computing where Python expressions are
15941shipped over the network to execute on remote hosts, possibly close to the
15942data.")
15943 (license license:bsd-3)))
15944
15945(define-public python2-cloudpickle
15946 (package-with-python2 python-cloudpickle))
15947
15948(define-public python-locket
15949 (package
15950 (name "python-locket")
15951 (version "0.2.0")
15952 (source
15953 (origin
15954 (method url-fetch)
15955 (uri (pypi-uri "locket" version))
15956 (sha256
15957 (base32
15958 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
15959 (build-system python-build-system)
15960 (home-page "https://github.com/mwilliamson/locket.py")
15961 (synopsis "File-based locks for Python")
15962 (description
15963 "Locket implements a lock that can be used by multiple processes provided
15964they use the same path.")
15965 (license license:bsd-2)))
15966
15967(define-public python2-locket
15968 (package-with-python2 python-locket))
15969
15970(define-public python-blosc
15971 (package
15972 (name "python-blosc")
15973 (version "1.5.1")
15974 (source
15975 (origin
15976 (method url-fetch)
15977 (uri (pypi-uri "blosc" version))
15978 (sha256
15979 (base32
15980 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
15981 (build-system python-build-system)
15982 ;; FIXME: all tests pass, but then this error is printed:
15983 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
15984 (arguments '(#:tests? #f))
15985 (propagated-inputs
15986 `(("python-numpy" ,python-numpy)))
15987 (home-page "https://github.com/blosc/python-blosc")
15988 (synopsis "Python wrapper for the Blosc data compressor library")
15989 (description "Blosc is a high performance compressor optimized for binary
15990data. It has been designed to transmit data to the processor cache faster
15991than the traditional, non-compressed, direct memory fetch approach via a
15992@code{memcpy()} system call.
15993
15994Blosc works well for compressing numerical arrays that contains data with
15995relatively low entropy, like sparse data, time series, grids with
15996regular-spaced values, etc.
15997
15998This Python package wraps the Blosc library.")
15999 (license license:bsd-3)))
16000
16001(define-public python2-blosc
16002 (package-with-python2 python-blosc))
16003
16004(define-public python-partd
16005 (package
16006 (name "python-partd")
16007 (version "0.3.9")
16008 (source
16009 (origin
16010 (method url-fetch)
16011 (uri (pypi-uri "partd" version))
16012 (sha256
16013 (base32
16014 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
16015 (build-system python-build-system)
16016 (propagated-inputs
16017 `(("python-blosc" ,python-blosc)
16018 ("python-locket" ,python-locket)
16019 ("python-numpy" ,python-numpy)
16020 ("python-pandas" ,python-pandas)
16021 ("python-pyzmq" ,python-pyzmq)
16022 ("python-toolz" ,python-toolz)))
16023 (home-page "https://github.com/dask/partd/")
16024 (synopsis "Appendable key-value storage")
16025 (description "Partd stores key-value pairs. Values are raw bytes. We
16026append on old values. Partd excels at shuffling operations.")
16027 (license license:bsd-3)))
16028
16029(define-public python2-partd
16030 (package-with-python2 python-partd))
16031
c70a0191
RW
16032(define-public python-fsspec
16033 (package
16034 (name "python-fsspec")
16035 (version "0.6.1")
16036 (source
16037 (origin
16038 (method url-fetch)
16039 (uri (pypi-uri "fsspec" version))
16040 (sha256
16041 (base32
16042 "1g9ba8v04s1nrh7pvzfm2md7ivl2mrz3hcq3y9d1a44gd62h17zj"))))
16043 (build-system python-build-system)
16044 (arguments '(#:tests? #f)) ; there are none
16045 (home-page "https://github.com/intake/filesystem_spec")
16046 (synopsis "File-system specification")
16047 (description "The purpose of this package is to produce a template or
16048specification for a file-system interface, that specific implementations
16049should follow, so that applications making use of them can rely on a common
16050behavior and not have to worry about the specific internal implementation
16051decisions with any given backend.")
16052 (license license:bsd-3)))
16053
44d10b1f
RW
16054(define-public python-dask
16055 (package
16056 (name "python-dask")
86c7ca07 16057 (version "2.9.0")
44d10b1f
RW
16058 (source
16059 (origin
16060 (method url-fetch)
16061 (uri (pypi-uri "dask" version))
16062 (sha256
86c7ca07 16063 (base32 "1w1hqr8vyx6ygwflj2737dcy0mmgvrc0s602gnny8pzlcbs9m76b"))))
44d10b1f 16064 (build-system python-build-system)
44d10b1f
RW
16065 (arguments
16066 `(#:phases
16067 (modify-phases %standard-phases
86c7ca07 16068 (add-after 'unpack 'disable-broken-tests
44d10b1f 16069 (lambda _
86c7ca07 16070 ;; This test is marked as xfail when pytest-xdist is used.
44d10b1f
RW
16071 (substitute* "dask/tests/test_threaded.py"
16072 (("def test_interrupt\\(\\)" m)
16073 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
16074 m)))
86c7ca07
RW
16075 ;; This one fails with a type error:
16076 ;; TypeError: Already tz-aware, use tz_convert to convert.
16077 (substitute* "dask/dataframe/tests/test_shuffle.py"
16078 (("def test_set_index_timestamp\\(\\)" m)
16079 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
16080 m)))
44d10b1f
RW
16081 #t))
16082 (replace 'check
16083 (lambda _ (invoke "pytest" "-vv"))))))
16084 (propagated-inputs
16085 `(("python-cloudpickle" ,python-cloudpickle)
86c7ca07 16086 ("python-fsspec" ,python-fsspec)
44d10b1f 16087 ("python-numpy" ,python-numpy)
86c7ca07 16088 ("python-packaging" ,python-packaging)
44d10b1f
RW
16089 ("python-pandas" ,python-pandas)
16090 ("python-partd" ,python-partd)
16091 ("python-toolz" ,python-toolz)
16092 ("python-pyyaml" ,python-pyyaml)))
16093 (native-inputs
16094 `(("python-pytest" ,python-pytest)
16095 ("python-pytest-runner" ,python-pytest-runner)))
16096 (home-page "https://github.com/dask/dask/")
16097 (synopsis "Parallel computing with task scheduling")
16098 (description
16099 "Dask is a flexible parallel computing library for analytics. It
16100consists of two components: dynamic task scheduling optimized for computation,
16101and large data collections like parallel arrays, dataframes, and lists that
16102extend common interfaces like NumPy, Pandas, or Python iterators to
16103larger-than-memory or distributed environments. These parallel collections
16104run on top of the dynamic task schedulers. ")
16105 (license license:bsd-3)))
16106
44d10b1f
RW
16107(define-public python-ilinkedlist
16108 (package
16109 (name "python-ilinkedlist")
16110 (version "0.4.0")
16111 (source
16112 (origin
16113 (method url-fetch)
16114 (uri (pypi-uri "ilinkedlist" version))
16115 (sha256
16116 (base32
16117 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
16118 (build-system python-build-system)
16119 (native-inputs `(("python-pytest" ,python-pytest)))
16120 (inputs `(("python" ,python)))
16121 (home-page "https://github.com/luther9/ilinkedlist-py")
16122 (synopsis "Immutable linked list library")
16123 (description
16124 "This is a implementation of immutable linked lists for Python. It
16125contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
16126Since a linked list is treated as immutable, it is hashable, and its length
16127can be retrieved in constant time. Some of the terminology is inspired by
16128LISP. It is possible to create an improper list by creating a @code{Pair}
16129with a non-list @code{cdr}.")
16130 (license license:gpl3+)))
16131
16132(define-public python-readlike
16133 (package
16134 (name "python-readlike")
16135 (version "0.1.3")
16136 (source
16137 (origin
16138 (method url-fetch)
16139 (uri (pypi-uri "readlike" version))
16140 (sha256
16141 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
16142 (build-system python-build-system)
16143 (home-page "https://github.com/jangler/readlike")
16144 (synopsis "GNU Readline-like line editing module")
16145 (description
16146 "This Python module provides line editing functions similar to the default
16147Emacs-style ones of GNU Readline. Unlike the Python standard library's
16148@code{readline} package, this one allows access to those capabilties in settings
16149outside of a standard command-line interface. It is especially well-suited to
16150interfacing with Urwid, due to a shared syntax for describing key inputs.
16151
16152Currently, all stateless Readline commands are implemented. Yanking and history
16153are not supported.")
16154 (license license:expat)))
16155
16156(define-public python2-readlike
16157 (package-with-python2 python-readlike))
16158
16159(define-public python-reparser
16160 (package
16161 (name "python-reparser")
16162 (version "1.4.3")
16163 (source
16164 (origin
16165 (method url-fetch)
16166 (uri (pypi-uri "ReParser" version))
16167 (sha256
16168 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
16169 (build-system python-build-system)
16170 (home-page "https://github.com/xmikos/reparser")
16171 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
16172 (description
16173 "This Python library provides a simple lexer/parser for inline markup based
16174on regular expressions.")
16175 (license license:expat)))
16176
16177(define-public python2-reparser
16178 (let ((reparser (package-with-python2
16179 (strip-python2-variant python-reparser))))
16180 (package (inherit reparser)
16181 (propagated-inputs
16182 `(("python2-enum34" ,python2-enum34)
16183 ,@(package-propagated-inputs reparser))))))
16184
16185(define-public python-precis-i18n
16186 (package
16187 (name "python-precis-i18n")
16188 (version "1.0.0")
16189 (source
16190 (origin
16191 (method url-fetch)
16192 (uri (pypi-uri "precis_i18n" version))
16193 (sha256
16194 (base32
16195 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
16196 (build-system python-build-system)
16197 (home-page "https://github.com/byllyfish/precis_i18n")
16198 (synopsis "Implementation of the PRECIS framework")
16199 (description
16200 "This module implements the PRECIS Framework as described in RFC 8264,
16201RFC 8265 and RFC 8266.")
16202 (license license:expat)))
16203
d0446c4b
RW
16204(define-public python-absl-py
16205 (package
16206 (name "python-absl-py")
16207 (version "0.6.1")
16208 (source
16209 (origin
16210 (method url-fetch)
16211 (uri (pypi-uri "absl-py" version))
16212 (sha256
16213 (base32
16214 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
16215 (build-system python-build-system)
16216 (propagated-inputs
16217 `(("python-six" ,python-six)))
16218 (home-page "https://github.com/abseil/abseil-py")
16219 (synopsis "Abseil Python common libraries")
16220 (description
16221 "This package provides the Abseil Python Common Libraries, a collection
16222of Python libraries for building Python applications.")
16223 (license license:asl2.0)))
16224
81bed4e9
RW
16225(define-public python-astor
16226 (package
16227 (name "python-astor")
16228 (version "0.7.1")
16229 (source
16230 (origin
16231 (method url-fetch)
16232 (uri (pypi-uri "astor" version))
16233 (sha256
16234 (base32
16235 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
16236 (build-system python-build-system)
16237 ;; FIXME: There are two errors and two test failures.
16238 (arguments `(#:tests? #f))
16239 (home-page "https://github.com/berkerpeksag/astor")
39ee82ff 16240 (synopsis "Read and write Python ASTs")
81bed4e9 16241 (description "Astor is designed to allow easy manipulation of Python
39ee82ff 16242source via the Abstract Syntax Tree.")
81bed4e9
RW
16243 (license license:bsd-3)))
16244
39ee82ff
RW
16245(define-public python2-astor
16246 (package-with-python2 python-astor))
16247
22e623ae
RW
16248(define-public python-grpcio
16249 (package
16250 (name "python-grpcio")
16251 (version "1.17.1")
16252 (source
16253 (origin
16254 (method url-fetch)
16255 (uri (pypi-uri "grpcio" version))
16256 (sha256
16257 (base32
16258 "0qb9y6j83nxa6d4kc60i8yfgdm7a8ms7b54kncjzf5y7nsxp8rzx"))))
16259 (build-system python-build-system)
16260 (propagated-inputs
16261 `(("python-six" ,python-six)))
16262 (home-page "https://grpc.io")
16263 (synopsis "HTTP/2-based RPC framework")
16264 (description "This package provides a Python library for communicating
16265with the HTTP/2-based RPC framework gRPC.")
16266 (license license:asl2.0)))
16267
79869f80
RW
16268(define-public python-astunparse
16269 (package
16270 (name "python-astunparse")
47d79541 16271 (version "1.6.2")
79869f80
RW
16272 (source
16273 (origin
16274 (method url-fetch)
16275 (uri (pypi-uri "astunparse" version))
16276 (sha256
47d79541 16277 (base32 "0rzbc44xcvzjhhiy7wac96mgal5mcjz1mfq8rmvgswskf4kf9cys"))))
79869f80 16278 (build-system python-build-system)
47d79541 16279 (arguments '(#:tests? #f)) ; there are none
79869f80
RW
16280 (propagated-inputs
16281 `(("python-six" ,python-six)
16282 ("python-wheel" ,python-wheel)))
16283 (home-page "https://github.com/simonpercivall/astunparse")
16284 (synopsis "AST unparser for Python")
16285 (description "This package provides an AST unparser for Python. It is a
16286factored out version of @code{unparse} found in the Python source
16287distribution.")
16288 (license license:bsd-3)))
16289
2884aac0
RW
16290(define-public python-gast
16291 (package
16292 (name "python-gast")
bd300261 16293 (version "0.2.2")
2884aac0
RW
16294 (source
16295 (origin
16296 (method url-fetch)
16297 (uri (pypi-uri "gast" version))
16298 (sha256
bd300261 16299 (base32 "1w5dzdb3gpcfmd2s0b93d8gff40a1s41rv31458z14inb3s9v4zy"))))
2884aac0
RW
16300 (build-system python-build-system)
16301 (propagated-inputs
16302 `(("python-astunparse" ,python-astunparse)))
16303 (home-page "https://pypi.org/project/gast/")
16304 (synopsis "Generic Python AST that abstracts the underlying Python version")
16305 (description
16306 "GAST provides a compatibility layer between the AST of various Python
16307versions, as produced by @code{ast.parse} from the standard @code{ast}
16308module.")
16309 (license license:bsd-3)))
16310
44d10b1f
RW
16311(define-public python-wikidata
16312 (package
16313 (name "python-wikidata")
16314 (version "0.6.1")
16315 (source
16316 (origin
16317 (method url-fetch)
16318 (uri (pypi-uri "Wikidata" version))
16319 (sha256
16320 (base32
16321 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
16322 (build-system python-build-system)
16323 (propagated-inputs
16324 `(("python-babel" ,python-babel)))
16325 (home-page "https://github.com/dahlia/wikidata")
16326 (synopsis "Wikidata client library")
16327 (description
16328 "This package provides a Python interface to
16329@url{https://www.wikidata.org/, Wikidata}.")
16330 (properties '((upstream-name . "Wikidata")))
16331 (license license:gpl3+)))
16332
16333(define-public python-doctest-ignore-unicode
16334 (package
16335 (name "python-doctest-ignore-unicode")
16336 (version "0.1.2")
16337 (source
16338 (origin
16339 (method url-fetch)
16340 (uri (pypi-uri "doctest-ignore-unicode" version))
16341 (sha256
16342 (base32
16343 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
16344 (build-system python-build-system)
16345 (native-inputs
16346 `(("python-nose" ,python-nose)))
16347 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
16348 (synopsis "Ignore Unicode literal prefixes in doctests")
16349 (description
16350 "This package adds support for a flag to ignore Unicode literal prefixes
16351in doctests.")
16352 (license license:asl2.0)))
16353
16354(define-public python-attr
16355 (package
16356 (name "python-attr")
16357 (version "0.3.1")
16358 (source
16359 (origin
16360 (method url-fetch)
16361 (uri (pypi-uri "attr" version))
16362 (sha256
16363 (base32
16364 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
16365 (build-system python-build-system)
16366 (home-page "https://github.com/denis-ryzhkov/attr")
16367 (synopsis "Decorator for attributes of target function or class")
16368 (description "Simple decorator to set attributes of target function or
16369class in a @acronym{DRY, Don't Repeat Yourself} way.")
16370 (license license:expat)))
f98232a3
VC
16371
16372(define-public python-construct
16373 (package
16374 (name "python-construct")
d854ab15 16375 (version "2.10.56")
f98232a3
VC
16376 (source
16377 (origin
16378 (method url-fetch)
16379 (uri (pypi-uri "construct" version))
16380 (sha256
16381 (base32
d854ab15 16382 "0q86jjzsvy835h3c8pjj4619vbp7ihfg8njmyw86ym4qrpni7flp"))))
f98232a3
VC
16383 (build-system python-build-system)
16384 (arguments
16385 `(#:tests? #f)) ; No tests exist.
16386 (propagated-inputs
16387 `(("python-extras" ,python-extras)
16388 ("python-arrow" ,python-arrow)
16389 ("python-numpy" ,python-numpy)
16390 ("python-ruamel.yaml" ,python-ruamel.yaml)))
aabc8954 16391 (home-page "https://construct.readthedocs.io")
f98232a3
VC
16392 (synopsis "Declarative and symmetrical parser and builder for binary data")
16393 (description
16394 "This package provides both simple, atomic constructs (such as
16395integers of various sizes), as well as composite ones which allow you
16396form hierarchical and sequential structures of increasing complexity.
16397It features bit and byte granularity, easy debugging and testing, an
16398easy-to-extend subclass system, and lots of primitive constructs to
16399make your work easier.")
16400 (license license:expat)))
b742c006
LF
16401
16402(define-public python-humanize
16403 (package
16404 (name "python-humanize")
16405 (version "0.5.1")
16406 (source
16407 (origin
16408 (method url-fetch)
16409 (uri (pypi-uri "humanize" version))
16410 (sha256
16411 (base32
16412 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
16413 (arguments
16414 '(#:tests? #f)) ; tests not in pypi archive
16415 (build-system python-build-system)
16416 (home-page "https://github.com/jmoiron/humanize")
16417 (synopsis "Print numerical information in a human-readable form")
16418 (description "This package provides a Python module that displays numbers
16419and dates in \"human readable\" forms. For example, it would display
16420\"12345591313\" as \"12.3 billion\".")
16421 (license license:expat)))
d5bbf66d
LF
16422
16423(define-public python-txaio
16424 (package
16425 (name "python-txaio")
16426 (version "18.8.1")
16427 (source
16428 (origin
16429 (method url-fetch)
16430 (uri (pypi-uri "txaio" version))
16431 (sha256
16432 (base32
16433 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
16434 (build-system python-build-system)
16435 (propagated-inputs
16436 `(("python-twisted" ,python-twisted)
16437 ("python-six" ,python-six)))
16438 (home-page "https://github.com/crossbario/txaio")
16439 (synopsis "Compatibility layer between Python asyncio and Twisted")
16440 (description "Txaio provides a compatibility layer between the Python
16441@code{asyncio} module and @code{Twisted}.")
16442 (license license:expat)))
963dfd3a
RW
16443
16444(define-public python-toolshed
16445 (package
16446 (name "python-toolshed")
16447 (version "0.4.6")
16448 (source
16449 (origin
16450 (method url-fetch)
16451 (uri (pypi-uri "toolshed" version))
16452 (sha256
16453 (base32
16454 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
16455 (build-system python-build-system)
16456 (native-inputs
16457 `(("python-nose" ,python-nose)))
16458 (home-page "https://github.com/brentp/toolshed/")
16459 (synopsis "Collection of modules and functions for working with data")
16460 (description "This is a collection of well-tested, simple modules and
16461functions that aim to reduce boilerplate when working with data.")
16462 (license license:bsd-2)))
c91ecf2d
RW
16463
16464(define-public python-annoy
16465 (package
16466 (name "python-annoy")
16467 (version "1.15.1")
16468 (source
16469 (origin
16470 (method url-fetch)
16471 (uri (pypi-uri "annoy" version))
16472 (sha256
16473 (base32
16474 "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp"))))
16475 (build-system python-build-system)
16476 (native-inputs
16477 `(("python-nose" ,python-nose)))
16478 (home-page "https://github.com/spotify/annoy/")
16479 (synopsis "Approximate nearest neighbors library")
16480 (description
16481 "Annoy is a C++ library with Python bindings to search for points in
16482space that are close to a given query point. It also creates large read-only
16483file-based data structures that are @code{mmap}ped into memory so that many
16484processes may share the same data.")
16485 (license license:asl2.0)))
412342d1 16486
79bfa422 16487(define-public python-pylzma
412342d1 16488 (package
79bfa422
DM
16489 (name "python-pylzma")
16490 (version "0.5.0")
16491 (source
16492 (origin
16493 (method url-fetch)
16494 (uri (pypi-uri "pylzma" version))
16495 (sha256
16496 (base32
16497 "074anvhyjgsv2iby2ql1ixfvjgmhnvcwjbdz8gk70xzkzcm1fx5q"))))
412342d1 16498 (build-system python-build-system)
79bfa422
DM
16499 (home-page "http://www.joachim-bauch.de/projects/pylzma/")
16500 (synopsis "Python bindings for the LZMA library by Igor Pavlov.")
16501 (description "This package provides Python bindings for the LZMA library
16502by Igor Pavlov.")
16503 (license license:lgpl2.1+)))
16504
16505(define-public python2-pylzma
16506 (package-with-python2 python-pylzma))
f825e605 16507
6609ebe7
AG
16508(define-public python2-zeroconf
16509 (package
16510 (name "python2-zeroconf")
16511
16512 ;; This is the last version that supports Python 2.x.
16513 (version "0.19.1")
16514 (source
16515 (origin
16516 (method url-fetch)
16517 (uri (pypi-uri "zeroconf" version))
16518 (sha256
16519 (base32
16520 "0ykzg730n915qbrq9bn5pn06bv6rb5zawal4sqjyfnjjm66snkj3"))))
16521 (build-system python-build-system)
16522 (arguments
16523 `(#:python ,python-2
16524 #:phases
16525 (modify-phases %standard-phases
16526 (add-after 'unpack 'patch-requires
16527 (lambda* (#:key inputs #:allow-other-keys)
16528 (substitute* "setup.py"
16529 (("enum-compat")
16530 "enum34"))
16531 #t)))))
16532 (native-inputs
16533 `(("python2-six" ,python2-six)
16534 ("python2-enum32" ,python2-enum34)
16535 ("python2-netifaces" ,python2-netifaces)
16536 ("python2-typing" ,python2-typing)))
16537 (home-page "https://github.com/jstasiak/python-zeroconf")
16538 (synopsis "Pure Python mDNS service discovery")
16539 (description
16540 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
16541compatible).")
16542 (license license:lgpl2.1+)))
16543
f825e605
GLV
16544(define-public python-bsddb3
16545 (package
16546 (name "python-bsddb3")
16547 (version "6.2.6")
16548 (source
16549 (origin
16550 (method url-fetch)
16551 (uri (pypi-uri "bsddb3" version))
16552 (sha256
16553 (base32
16554 "019db2y6bfmiqbrgg9x9f6h72qjmqh05czdn2v5sy9bl0gs23mj2"))))
16555 (build-system python-build-system)
16556 (inputs
16557 `(("bdb" ,bdb)))
16558 (arguments
16559 '(#:phases
16560 (modify-phases %standard-phases
16561 (add-after 'unpack 'configure-locations
16562 (lambda* (#:key inputs #:allow-other-keys)
16563 (setenv "BERKELEYDB_DIR" (assoc-ref inputs "bdb"))
16564 (setenv "YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION" "1")
16565 #t))
16566 (replace 'check
16567 (lambda _
16568 (invoke "python3" "test3.py" "-v"))))))
16569 (home-page "https://www.jcea.es/programacion/pybsddb.htm")
16570 (synopsis "Python bindings for Oracle Berkeley DB")
16571 (description
16572 "This module provides a nearly complete wrapping of the Oracle/Sleepycat
16573C API for the Database Environment, Database, Cursor, Log Cursor, Sequence and
16574Transaction objects, and each of these is exposed as a Python type in the
16575bsddb3.db module. The database objects can use various access methods: btree,
16576hash, recno, and queue. Complete support of Berkeley DB distributed
16577transactions. Complete support for Berkeley DB Replication Manager.
16578Complete support for Berkeley DB Base Replication. Support for RPC.")
16579 (license license:bsd-3)))
edeb04bf
PL
16580
16581(define-public python-dbfread
16582 (package
16583 (name "python-dbfread")
16584 (version "2.0.7")
16585 (source (origin
16586 (method url-fetch)
16587 (uri (pypi-uri "dbfread" version))
16588 (sha256
16589 (base32
16590 "0gdpwdzf1fngsi6jrdyj4qdf6cr7gnnr3zp80dpkzbgz0spskj07"))))
16591 (build-system python-build-system)
16592 (native-inputs
16593 `(("python-pytest" ,python-pytest)))
16594 (home-page "https://dbfread.readthedocs.io")
16595 (synopsis "Read DBF Files with Python")
16596 (description
16597 "This library reads DBF files and returns the data as native Python data
16598types for further processing. It is primarily intended for batch jobs and
16599one-off scripts.")
16600 (license license:expat)))
e308b4f0
JM
16601
16602(define-public python-cached-property
16603 (package
16604 (name "python-cached-property")
16605 (version "1.5.1")
16606 (source
16607 (origin
16608 (method url-fetch)
16609 (uri (pypi-uri "cached-property" version))
16610 (sha256
16611 (base32
16612 "010m1bl380l2r3vwq24r5v14l6gwvgm9v0mqqjkjss552jgsa5wj"))))
16613 (build-system python-build-system)
16614 (arguments
16615 `(#:phases
16616 (modify-phases %standard-phases
16617 ;; https://github.com/pydanny/cached-property/issues/131
16618 ;; recent versions of freezegun break one test
16619 (add-after 'unpack 'disable-broken-test
16620 (lambda _
16621 (substitute* "tests/test_cached_property.py"
16622 (("def test_threads_ttl_expiry\\(self\\)" m)
16623 (string-append "@unittest.skip(\"Disabled by Guix\")\n"
16624 " " m)))
16625 #t)))))
16626 (native-inputs
16627 `(("python-freezegun" ,python-freezegun)))
16628 (home-page
16629 "https://github.com/pydanny/cached-property")
16630 (synopsis
16631 "Decorator for caching properties in classes")
16632 (description
16633 "This package provides a decorator which makes caching
16634time-or-computationally-expensive properties quick and easy and works in Python
166352 or 3.")
16636 (license license:bsd-3)))
dfe8a704
NG
16637
16638(define-public python-folium
16639 (package
16640 (name "python-folium")
d3bc1ea9 16641 (version "0.10.1")
dfe8a704
NG
16642 (source
16643 (origin
16644 (method url-fetch)
16645 (uri (pypi-uri "folium" version))
16646 (sha256
16647 (base32
d3bc1ea9 16648 "0gcc267wxwxr57ry86pqpbiyfvl0g48hfvgy0f2mz9s58g87kgzd"))))
dfe8a704
NG
16649 (build-system python-build-system)
16650 (propagated-inputs
16651 `(("python-branca" ,python-branca)
16652 ("python-jinja2" ,python-jinja2)
16653 ("python-numpy" ,python-numpy)
16654 ("python-requests" ,python-requests)))
16655 (native-inputs
16656 `(("python-pytest" ,python-pytest)))
16657 (home-page "https://github.com/python-visualization/folium")
16658 (synopsis "Make beautiful maps with Leaflet.js & Python")
16659 (description "@code{folium} makes it easy to visualize data that’s been
16660manipulated in Python on an interactive leaflet map. It enables both the
16661binding of data to a map for @code{choropleth} visualizations as well as
16662passing rich vector/raster/HTML visualizations as markers on the map.
16663
16664The library has a number of built-in tilesets from OpenStreetMap, Mapbox, and
16665Stamen, and supports custom tilesets with Mapbox or Cloudmade API keys. It
16666supports Image, Video, GeoJSON and TopoJSON overlays.")
16667 (license license:expat)))
9dd5f475
LC
16668
16669(define-public jube
16670 (package
16671 ;; This is a command-line tool, so no "python-" prefix.
16672 (name "jube")
16673 (version "2.2.2")
16674 (source (origin
16675 (method url-fetch)
16676 (uri (string-append
16677 "http://apps.fz-juelich.de/jsc/jube/jube2/download.php?version="
16678 version))
16679 (sha256
16680 (base32
16681 "0xq4k1q63s1p6swgyp61vahlrd1fqmgbm0gm5kpj8ikwy0yc0nqk"))
16682 (file-name (string-append "jube-" version ".tar.gz"))))
16683 (build-system python-build-system)
16684 (home-page "https://apps.fz-juelich.de/jsc/jube/jube2/docu/index.html")
16685 (synopsis "Benchmarking environment")
16686 (description
16687 "JUBE helps perform and analyze benchmarks in a systematic way. For each
16688benchmarked application, benchmark data is stored in a format that allows JUBE
16689to deduct the desired information. This data can be parsed by automatic pre-
16690and post-processing scripts that draw information and store it more densely
16691for manual interpretation.")
a9f33960 16692 (license license:gpl3+)))
66436424
NG
16693
16694(define-public python-pyroutelib3
16695 (package
16696 (name "python-pyroutelib3")
16697 (version "1.3.post1")
16698 (source
16699 (origin
16700 (method url-fetch)
16701 (uri (pypi-uri "pyroutelib3" version))
16702 (sha256
16703 (base32
16704 "1hpbydpn2alyswiajfbvhzq4c7f36vdmvxy91hgv8l1lb2g2vfrj"))))
16705 (build-system python-build-system)
16706 (propagated-inputs
16707 `(("python-dateutil" ,python-dateutil)))
16708 (home-page "https://github.com/MKuranowski/pyroutelib3")
16709 (synopsis "Library for simple routing on OSM data")
16710 (description "Library for simple routing on OSM data")
16711 (license license:gpl3+)))
30e7c03a 16712
c1bbef69
16713(define-public python-bibtexparser
16714 (package
16715 (name "python-bibtexparser")
16716 (version "1.1.0")
16717 (source
16718 (origin
16719 (method url-fetch)
16720 (uri (pypi-uri "bibtexparser" version))
16721 (sha256
16722 (base32
16723 "0zwhfkrzf3n5847dbnfng92k7ak199l9v6x6ax3dgdidfpm6d2fz"))))
16724 (build-system python-build-system)
16725 (propagated-inputs
16726 `(("python-pyparsing" ,python-pyparsing)))
16727 (native-inputs
16728 `(("python-future" ,python-future)))
16729 (home-page "https://github.com/sciunto-org/python-bibtexparser")
16730 (synopsis "Python library to parse BibTeX files")
16731 (description "BibtexParser is a Python library to parse BibTeX files.")
16732 (license (list license:bsd-3 license:lgpl3))))
8581b40d
HG
16733
16734(define-public python-distro
16735 (package
16736 (name "python-distro")
16737 (version "1.4.0")
16738 (source
16739 (origin
16740 (method url-fetch)
16741 (uri (pypi-uri "distro" version))
16742 (sha256
16743 (base32
16744 "0mrg75w4ap7mdzyga75yaid9n8bgb345ih5mwjp3plj6v1jxwb9n"))))
16745 (build-system python-build-system)
16746 (native-inputs
16747 `(("python-pytest" ,python-pytest)))
16748 (home-page "https://github.com/nir0s/distro")
16749 (synopsis
16750 "OS platform information API")
16751 (description
16752 "@code{distro} provides information about the OS distribution it runs on,
16753such as a reliable machine-readable ID, or version information.
16754
16755It is the recommended replacement for Python's original
16756`platform.linux_distribution` function (which will be removed in Python 3.8).
16757@code{distro} also provides a command-line interface to output the platform
16758information in various formats.")
16759 (license license:asl2.0)))
f2f41e1a
HG
16760
16761(define-public python-cairosvg
16762 (package
16763 (name "python-cairosvg")
16764 (version "2.4.2")
16765 (source
16766 (origin
16767 (method url-fetch)
16768 (uri (pypi-uri "CairoSVG" version))
16769 (sha256
16770 (base32 "1bb7irxbaxxb9ahm3z5wsx1q96mm5gzskc7b6q07h9ikcnb8yrjf"))))
16771 (build-system python-build-system)
16772 (arguments
16773 `(#:phases
16774 (modify-phases %standard-phases
16775 (replace 'check
16776 (lambda _ (invoke "pytest"))))))
16777 (propagated-inputs
16778 `(("python-cairocffi" ,python-cairocffi)
16779 ("python-cssselect2" ,python-cssselect2)
16780 ("python-defusedxml" ,python-defusedxml)
16781 ("python-pillow" ,python-pillow)
16782 ("python-tinycss2" ,python-tinycss2)))
16783 (native-inputs
16784 `(("python-pytest-flake8" ,python-pytest-flake8)
16785 ("python-pytest-isort" ,python-pytest-isort)
16786 ("python-pytest-runner" ,python-pytest-runner)))
16787 (home-page "https://cairosvg.org/")
16788 (synopsis "SVG to PDF/PS/PNG converter based on Cairo")
16789 (description "CairoSVG is a SVG converter based on Cairo. It can export
16790SVG files to PDF, PostScript and PNG files. The main part of CairoSVG is a
16791SVG parser, trying to follow the SVG 1.1 recommendation from the W3C. Once
16792parsed, the result is drawn to a Cairo surface that can be exported to
16793qvarious formats: PDF, PostScript, PNG and even SVG.")
16794 (license license:lgpl3+)))
ea1801e0
HG
16795
16796(define-public python-pyphen
16797 (package
16798 (name "python-pyphen")
16799 (version "0.9.5")
16800 (source
16801 (origin
16802 (method url-fetch)
16803 (uri (pypi-uri "Pyphen" version))
16804 (sha256
16805 (base32 "08c9y69ry9d6m4zalhnalg86lsp9v2j5n1ziw5vxfmiihx83lqrv"))))
16806 (build-system python-build-system)
16807 ;; TODO: Use the Guix system hyphenation packages hyphen-* rather than the
16808 ;; embedded set provided by upstream - like Debian does.
16809 (home-page "https://github.com/Kozea/Pyphen")
16810 (synopsis "Pure Python module to hyphenate text")
16811 (description "Pyphen is a pure Python module to hyphenate text using
16812existing Hunspell hyphenation dictionaries.")
16813 (license (list license:gpl2 license:lgpl2.1 license:mpl1.1))))
85cfb0e9
CL
16814
16815(define-public python-intelhex
16816 (package
16817 (name "python-intelhex")
16818 (version "2.2.1")
16819 (source
16820 (origin
16821 (method url-fetch)
16822 (uri (pypi-uri "intelhex" version))
16823 (sha256
16824 (base32
16825 "0ckqjbxd8gwcg98gfzpn4vq1qxzfvq3rdbrr1hikj1nmw08qb780"))))
16826 (build-system python-build-system)
16827 (arguments '(#:tests? #f)) ;issue with version
16828 (home-page "https://pypi.org/project/IntelHex/")
16829 (synopsis "Python library for Intel HEX files manipulations")
16830 (description "The Intel HEX file format is widely used in microprocessors
16831and microcontrollers area (embedded systems etc.) as the de facto standard for
16832representation of code to be programmed into microelectronic devices. This
16833package provides an intelhex Python library to read, write, create from
16834scratch and manipulate data from Intel HEX file format. It also includes
16835several convenience Python scripts, including \"classic\" hex2bin and bin2hex
16836converters and more, those based on the library itself.")
16837 (license license:bsd-3)))
34bf6869
CL
16838
16839(define-public python-pykwalify
16840 (package
16841 (name "python-pykwalify")
16842 (version "1.7.0")
16843 (source
16844 (origin
16845 (method url-fetch)
16846 (uri (pypi-uri "pykwalify" version))
16847 (sha256
16848 (base32
16849 "1cnfzkg1b01f825ikpw2fhjclf9c8akxjfrbd1vc22x1lg2kk2vy"))))
16850 (build-system python-build-system)
16851 (arguments '(#:tests? #f)) ;missing dependencies
16852 (propagated-inputs
16853 `(("python-dateutil" ,python-dateutil)
16854 ("python-docopt" ,python-docopt)
16855 ("python-pyyaml" ,python-pyyaml)))
16856 (home-page "https://github.com/grokzen/pykwalify")
16857 (synopsis
16858 "Python lib/cli for JSON/YAML schema validation")
16859 (description
16860 "This package provides a parser, schema validator, and data binding tool
16861for YAML and JSON.")
16862 (license license:expat)))
e2ebbbcc
KK
16863
16864(define-public python-dbusmock
16865 (package
022b0d5f
BG
16866 (name "python-dbusmock")
16867 (version "0.18.3")
16868 (source
16869 (origin
16870 (method url-fetch)
16871 (uri (pypi-uri "python-dbusmock" version))
16872 (sha256
e2ebbbcc 16873 (base32
022b0d5f
BG
16874 "0hp2kyac88nh9iv6l8hlmv7s1sa1s5f1a3wc2pmlmmxnd211fjlr"))))
16875 (build-system python-build-system)
16876 (arguments
16877 '(#:phases
16878 (modify-phases %standard-phases
16879 (add-after 'unpack 'patch-shell-path
16880 (lambda _
16881 (substitute* "tests/test_code.py"
16882 (("/bin/bash") (which "bash")))
16883 #t)))))
16884 (native-inputs
16885 `(;; For tests.
16886 ("dbus" ,dbus) ; for dbus-daemon
16887 ("python-nose" ,python-nose)
16888 ("which" ,which)))
16889 (propagated-inputs
16890 `(("python-dbus" ,python-dbus)
16891 ("python-pygobject" ,python-pygobject)))
16892 (home-page "https://github.com/martinpitt/python-dbusmock")
16893 (synopsis "Python library for mock D-Bus objects")
16894 (description "python-dbusmock allows for the easy creation of mock objects on
e2ebbbcc
KK
16895D-Bus. This is useful for writing tests for software which talks to D-Bus
16896services such as upower, systemd, logind, gnome-session or others, and it is
16897hard (or impossible without root privileges) to set the state of the real
16898services to what you expect in your tests.")
022b0d5f 16899 (license license:lgpl3+)))
b657b23f
BG
16900
16901(define-public python-ujson
16902 (package
16903 (name "python-ujson")
16904 (version "1.35")
16905 (source
16906 (origin
16907 (method url-fetch)
16908 (uri (pypi-uri "ujson" version))
16909 (sha256
16910 (base32
16911 "11jz5wi7mbgqcsz52iqhpyykiaasila4lq8cmc2d54bfa3jp6q7n"))))
16912 (build-system python-build-system)
16913 (home-page "http://www.esn.me")
16914 (synopsis
16915 "Ultra fast JSON encoder and decoder for Python")
16916 (description
16917 "UltraJSON is an ultra fast JSON encoder and decoder written in pure C with
16918 bindings for Python 2.5+ and 3.")
16919 (license license:bsd-3)))
16920
16921(define-public python2-ujson
16922 (package-with-python2 python-ujson))
dbcef44a
MIP
16923
16924(define-public python-iocapture
16925 ;; The latest release is more than a year older than this commit.
16926 (let ((commit "fdc021c431d0840303908dfc3ca8769db383595c")
16927 (revision "1"))
16928 (package
16929 (name "python-iocapture")
16930 (version "0.1.2")
16931 (source
16932 (origin
16933 (method git-fetch)
16934 (uri (git-reference
16935 (url "https://github.com/oinume/iocapture.git")
16936 (commit commit)))
16937 (file-name (git-file-name name version))
16938 (sha256
16939 (base32
16940 "1mkbhqibxvgwg0p7slr8dfraa3g2s6bsayladhax2jccwj4kcndz"))))
16941 (build-system python-build-system)
16942 (arguments
16943 `(#:phases
16944 (modify-phases %standard-phases
16945 (delete 'check)
16946 (add-after 'install 'check
16947 (lambda* (#:key inputs outputs #:allow-other-keys)
16948 (add-installed-pythonpath inputs outputs)
16949 (invoke "py.test" "-v" "tests")
16950 #t)))))
16951 (propagated-inputs
16952 `(("python-flexmock" ,python-flexmock)
16953 ("python-pytest" ,python-pytest)
16954 ("python-pytest-cov" ,python-pytest-cov)
16955 ("python-six" ,python-six)))
16956 (home-page "https://github.com/oinume/iocapture")
16957 (synopsis "Python capturing tool for stdout and stderr")
16958 (description
16959 "This package helps you to capture the standard out (stdout) and the
16960standard error channel (stderr) in your program.")
16961 (license license:expat))))
db6bd842
MIP
16962
16963(define-public python-argh
16964 ;; There are 21 commits since the latest release containing important
16965 ;; improvements.
16966 (let ((commit "dcd3253f2994400a6a58a700c118c53765bc50a4")
16967 (revision "1"))
16968 (package
16969 (name "python-argh")
16970 (version (git-version "0.26.2" revision commit))
16971 (source
16972 (origin
16973 (method git-fetch)
16974 (uri (git-reference
16975 (url "https://github.com/neithere/argh.git")
16976 (commit commit)))
16977 (file-name (git-file-name name version))
16978 (sha256
16979 (base32
16980 "1p5h3dnpbsjmqrvil96s71asc6i3gpinmbrabqmwnrsxprz7r3ns"))))
16981 (build-system python-build-system)
16982 (propagated-inputs
16983 `(("python-iocapture" ,python-iocapture)
16984 ("python-mock" ,python-mock)
16985 ("python-pytest" ,python-pytest)
16986 ("python-pytest-cov" ,python-pytest-cov)
16987 ("python-pytest-xdist" ,python-pytest-xdist)
16988 ("python-tox" ,python-tox)))
16989 (home-page "https://github.com/neithere/argh/")
16990 (synopsis "Argparse wrapper with natural syntax")
16991 (description
16992 "python-argh is a small library that provides several layers of
16993abstraction on top of @code{python-argparse}. The layers can be mixed. It is
16994always possible to declare a command with the highest possible (and least
16995flexible) layer and then tune the behaviour with any of the lower layers
16996including the native API of @code{python-argparse}.")
16997 (license license:lgpl3+))))
073723fa
MIP
16998
16999(define-public python-ppft
17000 (package
17001 (name "python-ppft")
17002 (version "1.6.6.1")
17003 (source
17004 (origin
17005 (method url-fetch)
17006 (uri (pypi-uri "ppft" version))
17007 (sha256
17008 (base32
17009 "1z1invkhszc5d2mvgr221v7cszzifcc77mz0pv3wjp6x5q2768cy"))))
17010 (build-system python-build-system)
17011 (arguments '(#:tests? #f)) ; there are none
17012 (propagated-inputs
17013 `(("python-six" ,python-six)))
17014 (home-page "https://pypi.org/project/ppft/")
17015 (synopsis "Fork of Parallel Python")
17016 (description
17017 "This package is a fork of Parallel Python. The Parallel Python
17018module (@code{pp}) provides an easy and efficient way to create
17019parallel-enabled applications for @dfn{symmetric multiprocessing} (SMP)
17020computers and clusters. It features cross-platform portability and dynamic
17021load balancing.")
17022 (license license:bsd-3)))
8451ea19
MIP
17023
17024(define-public python-pox
17025 (package
17026 (name "python-pox")
17027 (version "0.2.7")
17028 (source
17029 (origin
17030 (method url-fetch)
17031 (uri (pypi-uri "pox" version))
17032 (sha256
17033 (base32
17034 "0y17ckc2p6i6709s279sjdj4q459mpcc38ymg9zv9y6vl6jf3bq6"))))
17035 (build-system python-build-system)
17036 (arguments
17037 `(#:phases
17038 (modify-phases %standard-phases
17039 (replace 'check
17040 (lambda _
17041 (mkdir-p "/tmp/guix")
17042 (setenv "SHELL" "bash")
17043 (setenv "USERNAME" "guix")
17044 (setenv "HOME" "/tmp/guix") ; must end on USERNAME...
17045 (invoke "py.test" "-vv")
17046 #t)))))
17047 (native-inputs
17048 `(("python-pytest" ,python-pytest)
17049 ("which" ,which)))
17050 (home-page "https://pypi.org/project/pox/")
17051 (synopsis "Python utilities for filesystem exploration and automated builds")
17052 (description
17053 "Pox provides a collection of utilities for navigating and manipulating
17054filesystems. This module is designed to facilitate some of the low level
17055operating system interactions that are useful when exploring a filesystem on a
17056remote host. Pox provides Python equivalents of several shell commands such
17057as @command{which} and @command{find}. These commands allow automated
17058discovery of what has been installed on an operating system, and where the
17059essential tools are located.")
17060 (license license:bsd-3)))
7e476ae8
MIP
17061
17062(define-public python-pathos
17063 (package
17064 (name "python-pathos")
17065 (version "0.2.5")
17066 (source
17067 (origin
17068 (method url-fetch)
17069 (uri (pypi-uri "pathos" version))
17070 (sha256
17071 (base32
17072 "0in8hxdz7k081ijn6q94gr39ycy7363sx4zysmbwyvd7snqjrbi1"))))
17073 (build-system python-build-system)
8f82e7e3
EF
17074 (arguments
17075 '(#:phases
17076 (modify-phases %standard-phases
17077 (replace 'check
17078 (lambda _
17079 (setenv "PYTHONPATH"
17080 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
17081 (invoke "python" "./tests/__main__.py"))))))
7e476ae8
MIP
17082 (propagated-inputs
17083 `(("python-dill" ,python-dill)
17084 ("python-multiprocess" ,python-multiprocess)
17085 ("python-pox" ,python-pox)
17086 ("python-ppft" ,python-ppft)))
8f82e7e3
EF
17087 (native-inputs
17088 `(("python-pytest" ,python-pytest)))
7e476ae8
MIP
17089 (home-page "https://pypi.org/project/pathos/")
17090 (synopsis
17091 "Parallel graph management and execution in heterogeneous computing")
17092 (description
17093 "Python-pathos is a framework for heterogenous computing. It provides a
17094consistent high-level interface for configuring and launching parallel
17095computations across heterogenous resources. Python-pathos provides configurable
17096launchers for parallel and distributed computing, where each launcher contains
17097the syntactic logic to configure and launch jobs in an execution environment.")
17098 (license license:bsd-3)))
54e5ee5a
BG
17099
17100(define-public python-flit
17101 (package
17102 (name "python-flit")
17103 (version "2.1.0")
17104 (source
17105 (origin
17106 (method url-fetch)
17107 (uri (pypi-uri "flit" version))
17108 (sha256
17109 (base32
17110 "0h5vvmqinqzn97mr3ix7zx53af9ad4fimjjwqpx88yp8qhz4r5bc"))))
17111 (build-system python-build-system)
17112 (arguments
17113 `(#:tests? #f)) ; XXX: Check requires network access.
17114 (home-page "https://flit.readthedocs.io/")
17115 (synopsis
17116 "Simple packaging tool for simple packages")
17117 (description
17118 "Flit is a simple way to put Python packages and modules on PyPI. Flit
17119packages a single importable module or package at a time, using the import
17120name as the name on PyPI. All subpackages and data files within a package
17121are included automatically.")
17122 (license license:bsd-3)))
02139b42
BG
17123
17124(define-public python-pathtools
17125 (package
17126 (name "python-pathtools")
17127 (version "0.1.2")
17128 (source
17129 (origin
17130 (method url-fetch)
17131 (uri (pypi-uri "pathtools" version))
17132 (sha256
17133 (base32
17134 "1h7iam33vwxk8bvslfj4qlsdprdnwf8bvzhqh3jq5frr391cadbw"))))
17135 (build-system python-build-system)
17136 (home-page
17137 "https://github.com/gorakhargosh/pathtools")
17138 (synopsis "Path utilities for Python")
17139 (description "Pattern matching and various utilities for file systems
17140paths.")
17141 (license license:expat)))
6b520177
JG
17142
17143(define-public python-fastentrypoints
17144 (package
17145 (name "python-fastentrypoints")
17146 (version "0.12")
17147 (source
17148 (origin
17149 (method url-fetch)
17150 (uri (pypi-uri "fastentrypoints" version))
17151 (sha256
17152 (base32
17153 "02s1j8i2dzbpbwgq2a3fiqwm3cnmhii2qzc0k42l0rdxd4a4ya7z"))))
17154 (build-system python-build-system)
17155 (home-page
17156 "https://github.com/ninjaaron/fast-entry_points")
17157 (synopsis
17158 "Makes entry_points specified in setup.py load more quickly")
17159 (description
17160 "Using entry_points in your setup.py makes scripts that start really
17161slowly because it imports pkg_resources. This package allows such setup
17162scripts to load entry points more quickly.")
17163 (license license:bsd-3)))
c5eb8cf8
JG
17164
17165(define-public python-funcparserlib
17166 (package
17167 (name "python-funcparserlib")
17168 (version "0.3.6")
17169 (source
17170 (origin
17171 (method url-fetch)
17172 (uri (pypi-uri "funcparserlib" version))
17173 (sha256
17174 (base32
17175 "07f9cgjr3h4j2m67fhwapn8fja87vazl58zsj4yppf9y3an2x6dp"))))
17176 (native-inputs
17177 `(("python-tox" ,python-tox)))
17178 (arguments
17179 `(#:phases
17180 (modify-phases %standard-phases
17181 (replace 'check
17182 (lambda _
17183 (invoke "tox"))))))
17184 (build-system python-build-system)
17185 (home-page
17186 "https://github.com/vlasovskikh/funcparserlib")
17187 (synopsis
17188 "Recursive descent parsing library based on functional combinators")
17189 (description
11140cf1 17190 "This package is a recursive descent parsing library for Python based on
c5eb8cf8
JG
17191functional combinators. Parser combinators are just higher-order functions
17192that take parsers as their arguments and return them as result values.")
17193 (license license:expat)))
602f3b67
NG
17194
17195(define-public python-speg
17196 (package
17197 (name "python-speg")
17198 (version "0.3")
17199 (source
17200 (origin
17201 (method url-fetch)
17202 (uri (pypi-uri "speg" version ".zip"))
17203 (sha256
17204 (base32 "0w9y4jf4787dzhy6rvhwi0mpl0r8qkqmqmyv2hpwdpv8w53yzjqh"))))
17205 (arguments
17206 `(#:tests? #f)) ;FIXME: tests fail, not sure why
17207 (native-inputs
17208 `(("unzip" ,unzip)))
17209 (build-system python-build-system)
17210 (home-page "https://github.com/avakar/speg")
17211 (synopsis "PEG-based parser interpreter with memoization")
17212 (description "This package is a PEG-based parser and interpreter with
17213memoization.")
17214 (license license:expat)))
07c8177b
NG
17215
17216(define-public python-cson
17217 (package
17218 (name "python-cson")
17219 (version "0.8")
17220 (source
17221 (origin
17222 (method url-fetch)
17223 (uri (pypi-uri "cson" version))
17224 (sha256
17225 (base32 "00cyvigg4npbph39ghkg77xbxisa6plf75vii24igxfizik0337f"))))
17226 (build-system python-build-system)
17227 (propagated-inputs
17228 `(("python-speg" ,python-speg)))
17229 (home-page "https://github.com/avakar/pycson")
17230 (synopsis "Parser for Coffeescript Object Notation (CSON)")
17231 (description "This package is a parser for Coffeescript Object
17232Notation (CSON).")
17233 (license license:expat)))
e24c672e
LDB
17234
17235(define-public python-asynctest
17236 (package
17237 (name "python-asynctest")
17238 (version "0.13.0")
17239 (source
17240 (origin
17241 (method url-fetch)
17242 (uri (pypi-uri "asynctest" version))
17243 (sha256
17244 (base32
17245 "1b3zsy7p84gag6q8ai2ylyrhx213qdk2h2zb6im3xn0m5n264y62"))))
17246 (build-system python-build-system)
17247 (arguments
17248 '(#:phases
17249 (modify-phases %standard-phases
17250 (replace 'check
17251 (lambda _
17252 (invoke "python" "-X" "dev" "-m" "unittest" "-v" "test")))
17253 (add-after 'unpack 'disable-tests
17254 (lambda* _
17255 (substitute* "test/test_selector.py"
17256 ;; XXX: This test fails for unknown reason inside the build
17257 ;; environment.
17258 (("def test_events_watched_outside_test_are_ignored")
17259 "@unittest.skip('disabled by guix')
17260 def test_events_watched_outside_test_are_ignored")))))))
17261 (home-page "https://github.com/Martiusweb/asynctest")
17262 (synopsis "Extension of unittest for testing asyncio libraries")
17263 (description
17264 "The package asynctest is built on top of the standard unittest module
17265and cuts down boilerplate code when testing libraries for asyncio.")
17266 (license license:asl2.0)))
1cc9c38e
LDB
17267
17268(define-public python-aionotify
17269 (package
17270 (name "python-aionotify")
17271 (version "0.2.0")
17272 (source
17273 (origin
17274 ;; Source tarball on PyPi lacks tests
17275 (method git-fetch)
17276 (uri (git-reference
17277 (url "https://github.com/rbarrois/aionotify")
17278 (commit (string-append "v" version))))
17279 (file-name (git-file-name name version))
17280 (sha256
17281 (base32 "1sk9i8czxgsbrswsf1nlb4c82vgnlzi8zrvrxdip92w2z8hqh43y"))))
17282 (build-system python-build-system)
17283 (native-inputs `(("python-asynctest" ,python-asynctest)))
17284 (home-page "https://github.com/rbarrois/aionotify")
17285 (synopsis "Asyncio-powered inotify library")
17286 (description
17287 "@code{aionotify} is a simple, asyncio-based inotify library.")
17288 (license license:bsd-3)))
84efaa3b
LDB
17289
17290(define-public python-forbiddenfruit
17291 (package
17292 (name "python-forbiddenfruit")
17293 (version "0.1.3")
17294 (source
17295 (origin
17296 ;; Source tarball on PyPi lacks Makefile that builds and runs tests
17297 (method git-fetch)
17298 (uri (git-reference
17299 (url "https://github.com/clarete/forbiddenfruit")
17300 (commit version)))
17301 (file-name (git-file-name name version))
17302 (sha256
17303 (base32 "1fp2xvdqpi910j9r3q68x38phpxbm700gjdi2m2j5gs91xdnyyh2"))))
17304 (build-system python-build-system)
17305 (arguments
17306 '(#:phases
17307 (modify-phases %standard-phases
17308 (replace 'check
17309 (lambda _
17310 (invoke "make" "SKIP_DEPS=1"))))))
17311 (native-inputs
17312 `(("python-nose" ,python-nose)
17313 ("python-coverage" ,python-coverage)))
17314 (home-page "https://github.com/clarete/forbiddenfruit")
17315 (synopsis "Patch python built-in objects")
17316 (description "This project allows Python code to extend built-in types.")
17317 (license (list license:gpl3+ license:expat))))
9786258b
LDB
17318
17319(define-public python-shouldbe
17320 (package
17321 (name "python-shouldbe")
17322 (version "0.1.2")
17323 (source
17324 (origin
17325 (method url-fetch)
17326 (uri (pypi-uri "shouldbe" version))
17327 (sha256
17328 (base32
17329 "16zbvjxf71dl4yfbgcr6idyim3mdrfvix1dv8b95p0s9z07372pj"))))
17330 (build-system python-build-system)
17331 (propagated-inputs
17332 `(("python-forbiddenfruit" ,python-forbiddenfruit)))
17333 (native-inputs
17334 `(("python-nose" ,python-nose)))
17335 (home-page "https://github.com/directxman12/should_be")
17336 (synopsis "Python Assertion Helpers inspired by Shouldly")
17337 (description
17338 "Python Assertion Helpers inspired by Shouldly.")
17339 (license license:isc)))
72c2478a
LDB
17340
17341(define-public python-k5test
17342 (package
17343 (name "python-k5test")
17344 (version "0.9.2")
17345 (source
17346 (origin
17347 (method url-fetch)
17348 (uri (pypi-uri "k5test" version))
17349 (sha256
17350 (base32
17351 "1lqp3jgfngyhaxjgj3n230hn90wsylwilh120yjf62h7b1s02mh8"))))
17352 (build-system python-build-system)
17353 (propagated-inputs
17354 `(("python-six" ,python-six)
17355 ;; `which`, `kadmin.local` binaries called inside library
17356 ("which" ,which)
17357 ("mit-krb5" ,mit-krb5)))
17358 (native-inputs `(("mit-krb5" ,mit-krb5)))
17359 (arguments
17360 '(#:phases
17361 (modify-phases %standard-phases
17362 (add-after 'unpack 'patch-paths
17363 (lambda* _
17364 (substitute* "k5test/realm.py"
17365 (("'kadmin_local'") "'kadmin.local'")))))))
17366 (home-page "https://github.com/pythongssapi/k5test")
17367 (synopsis "Library for setting up self-contained Kerberos 5 environments")
17368 (description
17369 "@code{k5test} is a library for setting up self-contained Kerberos 5
17370environments, and running Python unit tests inside those environments. It is
17371based on the file of the same name found alongside the MIT Kerberos 5 unit
17372tests.")
17373 (license license:isc)))
a8ef4978
LDB
17374
17375(define-public python-gssapi
17376 (package
17377 (name "python-gssapi")
17378 (version "1.6.1")
17379 (source
17380 (origin
17381 (method url-fetch)
17382 (uri (pypi-uri "gssapi" version))
17383 (sha256
17384 (base32
17385 "1gymg4asvwrz7y13qpwp2s5g8qwq179d72gkj09q6bfcgs82l5wr"))))
17386 (build-system python-build-system)
17387 (propagated-inputs
17388 `(("python-decorator" ,python-decorator)
17389 ("python-six" ,python-six)))
17390 (inputs
17391 `(("mit-krb5" ,mit-krb5)))
17392 ;; for tests
17393 (native-inputs
17394 `(("python-shouldbe" ,python-shouldbe)
17395 ("python-parameterized" ,python-parameterized)
17396 ("python-k5test" ,python-k5test)
17397 ("python-nose" ,python-nose)))
17398 (home-page "https://github.com/pythongssapi/python-gssapi")
17399 (synopsis "Python GSSAPI Wrapper")
17400 (description
17401 "Python-GSSAPI provides both low-level and high level wrappers around the
17402GSSAPI C libraries. While it focuses on the Kerberos mechanism, it should
17403also be useable with other GSSAPI mechanisms.")
17404 (license license:isc)))
7261bdca
JL
17405
17406(define-public python-check-manifest
17407 (package
17408 (name "python-check-manifest")
17409 (version "0.37")
17410 (source
17411 (origin
17412 (method url-fetch)
17413 (uri (pypi-uri "check-manifest" version))
17414 (sha256
17415 (base32
17416 "0lk45ifdv2cpkl6ayfyix7jwmnxa1rha7xvb0ih5999k115wzqs4"))))
17417 (build-system python-build-system)
17418 (native-inputs
17419 `(("python-mock" ,python-mock)
17420 ("git" ,git)))
17421 (home-page "https://github.com/mgedmin/check-manifest")
17422 (synopsis "Check MANIFEST.in in a Python source package for completeness")
17423 (description "Python package can include a MANIFEST.in file to help with
17424sending package files to the Python Package Index. This package checks that
17425file to ensure it completely and accurately describes your project.")
17426 (license license:expat)))
b487b7b5
JL
17427
17428(define-public python-android-stringslib
17429 (package
17430 (name "python-android-stringslib")
17431 (version "0.1.2")
17432 (source
17433 (origin
17434 (method git-fetch)
17435 (uri (git-reference
17436 (url "https://framagit.org/tyreunom/python-android-strings-lib")
17437 (commit (string-append "v" version))))
17438 (file-name (git-file-name name version))
17439 (sha256
17440 (base32
17441 "0gij55qzzq1h83kfpvhai1vf78kkhyvxa6l17m2nl24454lhfin4"))))
17442 (build-system python-build-system)
17443 (arguments
17444 `(#:tests? #f))
17445 (home-page "https://framagit.org/tyreunom/python-android-strings-lib")
17446 (synopsis "Android strings.xml support")
17447 (description "Android Strings Lib provides support for android's strings.xml
17448files. These files are used to translate strings in android apps.")
17449 (license license:expat)))
87435943 17450
7dec888f
JL
17451(define-public python-watchdog
17452 (package
17453 (name "python-watchdog")
17454 (version "0.9.0")
17455 (source
17456 (origin
17457 (method url-fetch)
17458 (uri (pypi-uri "watchdog" version))
17459 (sha256
17460 (base32
17461 "07cnvvlpif7a6cg4rav39zq8fxa5pfqawchr46433pij0y6napwn"))))
17462 (build-system python-build-system)
17463 (arguments
17464 `(#:phases
17465 (modify-phases %standard-phases
17466 (add-before 'check 'remove-failing
17467 (lambda _
17468 (delete-file "tests/test_inotify_buffer.py")
17469 (delete-file "tests/test_snapshot_diff.py")
17470 #t)))))
17471 (propagated-inputs
17472 `(("python-argh" ,python-argh)
17473 ("python-pathtools" ,python-pathtools)
17474 ("python-pyyaml" ,python-pyyaml)))
17475 (native-inputs
17476 `(("python-pytest-cov" ,python-pytest-cov)
17477 ("python-pytest-timeout" ,python-pytest-timeout)))
17478 (home-page "https://github.com/gorakhargosh/watchdog")
17479 (synopsis "Filesystem events monitoring")
17480 (description "This package provides a way to monitor filesystem events
17481such as a file modification and trigger an action. This is similar to inotify,
17482but portable.")
17483 (license license:asl2.0)))
2cbede59 17484
9c9704a9
MC
17485(define-public python-wget
17486 (package
17487 (name "python-wget")
17488 (version "3.2")
17489 (source
17490 (origin
17491 (method url-fetch)
17492 (uri (pypi-uri "wget" version ".zip"))
17493 (sha256
17494 (base32
17495 "0qb0y7ipby42m4m7h0ipazpdyc3bn9xi46lvifcwwl5albn31rim"))))
17496 (build-system python-build-system)
17497 (native-inputs `(("unzip" ,unzip)))
17498 (home-page "https://bitbucket.org/techtonik/python-wget/")
17499 (synopsis "Pure Python download utility")
17500 (description "The python-wget library provides an API to download files
17501with features similar to the @command{wget} utility.")
17502 (license license:unlicense)))
17503
2cbede59
JL
17504(define-public offlate
17505 (package
17506 (name "offlate")
17507 (version "0.5")
17508 (source
17509 (origin
17510 (method git-fetch)
17511 (uri (git-reference
17512 (url "https://framagit.org/tyreunom/offlate")
17513 (commit version)))
17514 (file-name (git-file-name name version))
17515 (sha256
17516 (base32
17517 "13pqnbl05wcyldfvl75fp89vjgwsvxyc69vhnb17kkha2rc2k1h7"))))
17518 (build-system python-build-system)
17519 (arguments
17520 ;; No tests
17521 `(#:tests? #f))
17522 (propagated-inputs
17523 `(("python-android-stringslib" ,python-android-stringslib)
17524 ("python-dateutil" ,python-dateutil)
17525 ("python-gitlab" ,python-gitlab)
17526 ("python-lxml" ,python-lxml)
17527 ("python-polib" ,python-polib)
17528 ("python-pyenchant" ,python-pyenchant)
17529 ("python-pygit2" ,python-pygit2)
17530 ("python-pygithub" ,python-pygithub)
17531 ("python-pyqt" ,python-pyqt)
17532 ("python-requests" ,python-requests)
17533 ("python-ruamel.yaml" ,python-ruamel.yaml)
17534 ("python-translation-finder" ,python-translation-finder)
17535 ("python-watchdog" ,python-watchdog)))
17536 (native-inputs
17537 `(("qttools" ,qttools)))
17538 (home-page "https://framagit.org/tyreunom/offlate")
17539 (synopsis "Offline translation interface for online translation tools")
17540 (description "Offlate offers a unified interface for different translation
17541file formats, as well as many different online translation platforms. You can
17542use it to get work from online platforms, specialized such as the Translation
17543Project, or not such a gitlab instance when your upstream doesn't use any
17544dedicated platform. The tool proposes a unified interface for any format and
17545an upload option to send your work back to the platform.")
17546 (license license:gpl3+)))
479f4013
JK
17547
17548(define-public python-pypng
17549 (package
17550 (name "python-pypng")
17551 (version "0.0.20")
17552 (source
17553 (origin
17554 (method url-fetch)
17555 (uri (pypi-uri "pypng" version))
17556 (sha256
17557 (base32 "02qpa22ls41vwsrzw9r9qhj1nhq05p03hb5473pay6y980s86chh"))))
17558 (build-system python-build-system)
17559 (home-page "https://github.com/drj11/pypng")
17560 (synopsis "Pure Python PNG image encoder/decoder")
17561 (description
17562 "The PyPNG module implements support for PNG images. It reads and writes
17563PNG files with all allowable bit depths (1/2/4/8/16/24/32/48/64 bits per
17564pixel) and colour combinations: greyscale (1/2/4/8/16 bit); RGB, RGBA,
17565LA (greyscale with alpha) with 8/16 bits per channel; colour mapped
17566images (1/2/4/8 bit). Adam7 interlacing is supported for reading and writing.
17567A number of optional chunks can be specified (when writing) and
17568understood (when reading): tRNS, bKGD, gAMA.
17569
17570PyPNG is not a high level toolkit for image processing (like PIL) and does not
17571aim at being a replacement or competitor. Its strength lies in fine-grained
17572extensive support of PNG features. It can also read and write Netpbm PAM
17573files, with a focus on its use as an intermediate format for implementing
17574custom PNG processing.")
17575 (license license:expat)))
da8ca4c3 17576
17577(define-public python-fuzzywuzzy
17578 (package
17579 (name "python-fuzzywuzzy")
17580 (version "0.18.0")
17581 (source
17582 (origin
17583 (method url-fetch)
17584 (uri (pypi-uri "fuzzywuzzy" version))
17585 (sha256
17586 (base32
17587 "1s00zn75y2dkxgnbw8kl8dw4p1mc77cv78fwfa4yb0274s96w0a5"))))
17588 (build-system python-build-system)
17589 (native-inputs
17590 `(("python-hypothesis" ,python-hypothesis)
17591 ("python-pycodestyle" ,python-pycodestyle)
17592 ("python-pytest" ,python-pytest)))
17593 (propagated-inputs
17594 `(("python-levenshtein" ,python-levenshtein)))
17595 (home-page "https://github.com/seatgeek/fuzzywuzzy")
7d9f8db2 17596 (synopsis "Fuzzy string matching in Python")
da8ca4c3 17597 (description "Approximate string matching using
17598@emph{Levenshtein Distance} to calculate the differences between
17599sequences.")
17600 (license license:gpl2)))
17601
17602(define-public python2-fuzzywuzzy
17603 (package-with-python2 python-fuzzywuzzy))