gnu: python2-importlib-resources: Drop 'wheel' dependency.
[jackhill/guix/guix.git] / gnu / packages / python-xyz.scm
CommitLineData
44d10b1f
RW
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
2d040763 3;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
fa8ffaa0 4;;; Copyright © 2013, 2014, 2015, 2016, 2019 Andreas Enge <andreas@enge.fr>
44d10b1f
RW
5;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
6;;; Copyright © 2014, 2017 Eric Bavier <bavier@member.fsf.org>
7;;; Copyright © 2014, 2015 Federico Beffa <beffa@fbengineering.ch>
8;;; Copyright © 2015 Omar Radwan <toxemicsquire4@gmail.com>
9;;; Copyright © 2015 Pierre-Antoine Rault <par@rigelk.eu>
10;;; Copyright © 2015, 2016, 2017, 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
11;;; Copyright © 2015, 2016 Christopher Allan Webber <cwebber@dustycloud.org>
12;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
13;;; Copyright © 2015, 2016 David Thompson <davet@gnu.org>
b742c006 14;;; Copyright © 2015, 2016, 2017, 2019 Leo Famulari <leo@famulari.name>
44d10b1f
RW
15;;; Copyright © 2015, 2017 Ben Woodcroft <donttrustben@gmail.com>
16;;; Copyright © 2015, 2016 Erik Edrosa <erik.edrosa@gmail.com>
11e46326 17;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
44d10b1f
RW
18;;; Copyright © 2015, 2017 Kyle Meyer <kyle@kyleam.com>
19;;; Copyright © 2015, 2016 Chris Marusich <cmmarusich@gmail.com>
20;;; Copyright © 2016 Danny Milosavljevic <dannym+a@scratchpost.org>
21;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
8581b40d 22;;; Copyright © 2016, 2018-2019 Hartmut Goebel <h.goebel@crazy-compilers.com>
44d10b1f
RW
23;;; Copyright © 2016 Daniel Pimentel <d4n1@d4n1.org>
24;;; Copyright © 2016 Sou Bunnbu <iyzsong@gmail.com>
25;;; Copyright © 2016, 2017 Troy Sankey <sankeytms@gmail.com>
47956fa0 26;;; Copyright © 2016, 2017 ng0 <ng0@n0.is>
44d10b1f
RW
27;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
28;;; Copyright © 2016 David Craven <david@craven.ch>
fd5c264a 29;;; Copyright © 2016, 2017, 2018, 2019, 2020 Marius Bakke <mbakke@fastmail.com>
44d10b1f
RW
30;;; Copyright © 2016, 2017 Stefan Reichör <stefan@xsteve.at>
31;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
e746d1c3 32;;; Copyright © 2016, 2017, 2019 Alex Vong <alexvong1995@gmail.com>
44d10b1f
RW
33;;; Copyright © 2016, 2017, 2018 Arun Isaac <arunisaac@systemreboot.net>
34;;; Copyright © 2016, 2017, 2018 Julien Lepiller <julien@lepiller.eu>
783d1d40 35;;; Copyright © 2016, 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
44d10b1f
RW
36;;; Copyright © 2016, 2017 Thomas Danckaert <post@thomasdanckaert.be>
37;;; Copyright © 2017 Carlo Zancanaro <carlo@zancanaro.id.au>
38;;; Copyright © 2017 Frederick M. Muriithi <fredmanglis@gmail.com>
39;;; Copyright © 2017, 2018 Adriano Peluso <catonano@gmail.com>
40;;; Copyright © 2017 Ben Sturmfels <ben@sturm.com.au>
a0b2accf 41;;; Copyright © 2017, 2018, 2019 Mathieu Othacehe <m.othacehe@gmail.com>
44d10b1f
RW
42;;; Copyright © 2017 José Miguel Sánchez García <jmi2k@openmailbox.org>
43;;; Copyright © 2017 Roel Janssen <roel@gnu.org>
e2ebbbcc 44;;; Copyright © 2017, 2018, 2019 Kei Kebreau <kkebreau@posteo.net>
44d10b1f
RW
45;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
46;;; Copyright © 2017 Muriithi Frederick Muriuki <fredmanglis@gmail.com>
dcfa0acd 47;;; Copyright © 2017, 2019 Brendan Tildesley <mail@brendan.scot>
44d10b1f
RW
48;;; Copyright © 2018 Ethan R. Jones <ethanrjones97@gmail.com
49;;; Copyright © 2018 Fis Trivial <ybbs.daans@hotmail.com>
50;;; Copyright © 2018 Vijayalakshmi Vedantham <vijimay12@gmail.com>
51;;; Copyright © 2018 Mathieu Lirzin <mthl@gnu.org>
52;;; Copyright © 2018 Adam Massmann <massmannak@gmail.com>
53;;; Copyright © 2016, 2018 Tomáš Čech <sleep_walker@gnu.org>
a2548a3b 54;;; Copyright © 2018, 2019, 2020 Nicolas Goaziou <mail@nicolasgoaziou.fr>
44d10b1f 55;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
85cfb0e9 56;;; Copyright © 2018, 2019 Clément Lassieur <clement@lassieur.org>
4caf37b0 57;;; Copyright © 2018, 2019 Maxim Cournoyer <maxim.cournoyer@gmail.com>
44d10b1f
RW
58;;; Copyright © 2018 Luther Thompson <lutheroto@gmail.com>
59;;; Copyright © 2018 Vagrant Cascadian <vagrant@debian.org>
046dd621 60;;; Copyright © 2019, 2020 Brett Gilio <brettg@gnu.org>
a91f4eba 61;;; Copyright © 2019 Sam <smbaines8@gmail.com>
8c141421 62;;; Copyright © 2019 Jack Hill <jackhill@jackhill.us>
f825e605 63;;; Copyright © 2019 Guillaume Le Vaillant <glv@posteo.net>
fb236fdd 64;;; Copyright © 2019 Alex Griffin <a@ajgrf.com>
edeb04bf 65;;; Copyright © 2019 Pierre Langlois <pierre.langlois@gmx.com>
e308b4f0 66;;; Copyright © 2019 Jacob MacDonald <jaccarmac@gmail.com>
30e7c03a 67;;; Copyright © 2019 Giacomo Leidi <goodoldpaul@autistici.org>
c1bbef69 68;;; Copyright © 2019 Wiktor Żelazny <wzelazny@vurv.cz>
ba42a6bf 69;;; Copyright © 2019 Tanguy Le Carrour <tanguy@bioneland.org>
dbcef44a 70;;; Copyright © 2019 Mădălin Ionel Patrașcu <madalinionel.patrascu@mdc-berlin.de>
3963fc70 71;;; Copyright © 2020 Riku Viitanen <riku.viitanen@protonmail.com>
44d10b1f
RW
72;;;
73;;; This file is part of GNU Guix.
74;;;
75;;; GNU Guix is free software; you can redistribute it and/or modify it
76;;; under the terms of the GNU General Public License as published by
77;;; the Free Software Foundation; either version 3 of the License, or (at
78;;; your option) any later version.
79;;;
80;;; GNU Guix is distributed in the hope that it will be useful, but
81;;; WITHOUT ANY WARRANTY; without even the implied warranty of
82;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
83;;; GNU General Public License for more details.
84;;;
85;;; You should have received a copy of the GNU General Public License
86;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
87
88(define-module (gnu packages python-xyz)
89 #:use-module ((guix licenses) #:prefix license:)
90 #:use-module (gnu packages)
91 #:use-module (gnu packages algebra)
92 #:use-module (gnu packages adns)
93 #:use-module (gnu packages attr)
94 #:use-module (gnu packages backup)
95 #:use-module (gnu packages bash)
96 #:use-module (gnu packages check)
97 #:use-module (gnu packages compression)
98 #:use-module (gnu packages crypto)
99 #:use-module (gnu packages databases)
f825e605 100 #:use-module (gnu packages dbm)
44d10b1f
RW
101 #:use-module (gnu packages file)
102 #:use-module (gnu packages fontutils)
103 #:use-module (gnu packages gcc)
104 #:use-module (gnu packages geo)
105 #:use-module (gnu packages ghostscript)
106 #:use-module (gnu packages gl)
107 #:use-module (gnu packages glib)
e2ebbbcc 108 #:use-module (gnu packages gnome)
44d10b1f
RW
109 #:use-module (gnu packages graphviz)
110 #:use-module (gnu packages graphics)
111 #:use-module (gnu packages gstreamer)
112 #:use-module (gnu packages gtk)
113 #:use-module (gnu packages icu4c)
114 #:use-module (gnu packages image)
115 #:use-module (gnu packages imagemagick)
72c2478a 116 #:use-module (gnu packages kerberos)
44d10b1f
RW
117 #:use-module (gnu packages libevent)
118 #:use-module (gnu packages libffi)
119 #:use-module (gnu packages linux)
120 #:use-module (gnu packages llvm)
121 #:use-module (gnu packages man)
122 #:use-module (gnu packages maths)
42f0b0c2 123 #:use-module (gnu packages monitoring)
44d10b1f
RW
124 #:use-module (gnu packages multiprecision)
125 #:use-module (gnu packages networking)
126 #:use-module (gnu packages ncurses)
127 #:use-module (gnu packages openstack)
128 #:use-module (gnu packages pcre)
129 #:use-module (gnu packages perl)
130 #:use-module (gnu packages pkg-config)
131 #:use-module (gnu packages python)
d362b11d 132 #:use-module (gnu packages python-check)
15b65617 133 #:use-module (gnu packages python-compression)
44d10b1f 134 #:use-module (gnu packages python-crypto)
ca7c3653 135 #:use-module (gnu packages python-science)
44d10b1f
RW
136 #:use-module (gnu packages python-web)
137 #:use-module (gnu packages qt)
138 #:use-module (gnu packages readline)
139 #:use-module (gnu packages sdl)
140 #:use-module (gnu packages search)
141 #:use-module (gnu packages shells)
9d0c291e 142 #:use-module (gnu packages sphinx)
44d10b1f
RW
143 #:use-module (gnu packages ssh)
144 #:use-module (gnu packages terminals)
145 #:use-module (gnu packages tex)
146 #:use-module (gnu packages texinfo)
147 #:use-module (gnu packages time)
148 #:use-module (gnu packages tls)
149 #:use-module (gnu packages version-control)
150 #:use-module (gnu packages video)
151 #:use-module (gnu packages web)
152 #:use-module (gnu packages base)
153 #:use-module (gnu packages xml)
154 #:use-module (gnu packages xorg)
155 #:use-module (gnu packages xdisorg)
156 #:use-module (gnu packages tcl)
157 #:use-module (gnu packages bdw-gc)
f98232a3 158 #:use-module (gnu packages serialization)
44d10b1f
RW
159 #:use-module (guix packages)
160 #:use-module (guix download)
161 #:use-module (guix git-download)
a042d348 162 #:use-module (guix hg-download)
44d10b1f
RW
163 #:use-module (guix utils)
164 #:use-module (guix build-system gnu)
165 #:use-module (guix build-system cmake)
166 #:use-module (guix build-system python)
167 #:use-module (guix build-system trivial)
168 #:use-module (srfi srfi-1)
169 #:use-module (srfi srfi-26))
170
171(define-public python-psutil
172 (package
173 (name "python-psutil")
e9119ac1 174 (version "5.6.5")
44d10b1f
RW
175 (source
176 (origin
177 (method url-fetch)
178 (uri (pypi-uri "psutil" version))
179 (sha256
e9119ac1 180 (base32 "0isil5jxwwd8awz54qk28rpgjg43i5l6yl70g40vxwa4r4m56lfh"))))
44d10b1f
RW
181 (build-system python-build-system)
182 (arguments
183 ;; FIXME: some tests does not return and times out.
184 '(#:tests? #f))
185 (home-page "https://www.github.com/giampaolo/psutil")
186 (synopsis "Library for retrieving information on running processes")
187 (description
188 "psutil (Python system and process utilities) is a library for retrieving
189information on running processes and system utilization (CPU, memory, disks,
190network) in Python. It is useful mainly for system monitoring, profiling and
191limiting process resources and management of running processes. It implements
192many functionalities offered by command line tools such as: ps, top, lsof,
193netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
194pidof, tty, taskset, pmap.")
195 (properties `((python2-variant . ,(delay python2-psutil))))
196 (license license:bsd-3)))
197
198(define-public python2-psutil
199 (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
200 (package
201 (inherit base)
202 (propagated-inputs
203 `(("python2-enum34" ,python2-enum34) ;optional
204 ,@(package-propagated-inputs base))))))
205
206(define-public python-shapely
207 (package
208 (name "python-shapely")
6d94465b 209 (version "1.6.4.post2")
44d10b1f
RW
210 (source
211 (origin
212 (method url-fetch)
213 (uri (pypi-uri "Shapely" version))
214 (sha256
215 (base32
6d94465b 216 "03r42fmd9alp6r3q95ad6rldq2f7n1wimrw53zy5kpn33yv7pf64"))))
44d10b1f
RW
217 (build-system python-build-system)
218 (native-inputs
219 `(("python-cython" ,python-cython)
220 ("python-matplotlib" ,python-matplotlib)
221 ("python-pytest" ,python-pytest)
222 ("python-pytest-cov" ,python-pytest-cov)))
223 (inputs
224 `(("geos" ,geos)))
225 (propagated-inputs
226 `(("python-numpy" ,python-numpy)))
227 (arguments
228 `(#:phases
229 (modify-phases %standard-phases
230 (add-after 'unpack 'patch-geos-path
231 (lambda* (#:key inputs #:allow-other-keys)
232 (let ((geos (assoc-ref inputs "geos"))
233 (glibc (assoc-ref inputs ,(if (%current-target-system)
234 "cross-libc" "libc"))))
235 (substitute* "shapely/geos.py"
236 (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)")
237 (string-append "_lgeos = load_dll('geos_c', fallbacks=['"
238 geos "/lib/libgeos_c.so'])"))
239 (("free = load_dll\\('c'\\)\\.free")
240 (string-append "free = load_dll('c', fallbacks=['"
241 glibc "/lib/libc.so.6']).free"))))
242 #t)))))
243 (home-page "https://github.com/Toblerity/Shapely")
244 (synopsis "Library for the manipulation and analysis of geometric objects")
245 (description "Shapely is a Python package for manipulation and analysis of
246planar geometric objects. It is based on the @code{GEOS} library.")
247 (license license:bsd-3)))
248
a91f4eba
S
249(define-public python-shortuuid
250 (package
251 (name "python-shortuuid")
252 (version "0.5.0")
253 (source
254 (origin
255 (method url-fetch)
256 (uri (pypi-uri "shortuuid" version))
257 (sha256
258 (base32
259 "1f8i4zwj5vmpzbz6b17bljy4399gx5aq7vsyw63sz2qgyjcd73yh"))))
260 (build-system python-build-system)
261 (native-inputs
262 `(("python-pep8" ,python-pep8)))
263 (home-page "https://github.com/skorokithakis/shortuuid")
264 (synopsis "Generator library for concise, unambiguous and URL-safe UUIDs")
265 (description
266 "@code{shortuuid} is a Python library for generating concise, unambiguous
267and URL-safe UUIDs. UUIDs are generated using the built-in Python @code{uuid}
268module and then similar looking characters are removed.")
269 (license license:bsd-3)))
270
44d10b1f
RW
271(define-public python-logwrap
272 (package
273 (name "python-logwrap")
274 (version "3.2.1")
275 (source
276 (origin
277 (method url-fetch)
278 (uri (pypi-uri "logwrap" version ".zip"))
279 (sha256
280 (base32
281 "1d2k0hvpbi51vl410y8fbs5m0nxnlh2k7gr2nrh3k81ibhzscsra"))))
282 (build-system python-build-system)
283 (propagated-inputs
284 `(("python-six" ,python-six)
285 ("python-typing" ,python-typing)))
286 (native-inputs
287 `(("unzip" ,unzip)
288 ("python-cython" ,python-cython)
289 ("python-pytest" ,python-pytest)
290 ("python-pytest-cov" ,python-pytest-cov)
291 ("python-pytest-runner" ,python-pytest-runner)))
292 (home-page "https://github.com/penguinolog/logwrap")
293 (synopsis "Decorator for logging function arguments")
294 (description "This package provides a decorator to log function arguments
295and function call return values in a human-readable way.")
296 (license license:asl2.0)))
297
298(define-public python2-shapely
299 (package-with-python2 python-shapely))
300
301(define-public python-clyent
302 (package
303 (name "python-clyent")
304 (version "1.2.1")
305 (source
306 (origin
307 (method url-fetch)
308 (uri (pypi-uri "clyent" version))
309 (sha256
310 (base32
311 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
312 (build-system python-build-system)
313 (native-inputs
314 `(("python-mock" ,python-mock)))
315 (home-page "https://github.com/binstar/clyent")
316 (synopsis "Command line client library")
317 (description "Clyent is a Python command line utiliy library. It is used
318by @code{binstar}, @code{binstar-build} and @code{chalmers}.")
319 (license license:bsd-3)))
320
321(define-public python2-clyent
322 (package-with-python2 python-clyent))
323
324(define-public python-babel
325 (package
326 (name "python-babel")
93253411 327 (version "2.7.0")
44d10b1f
RW
328 (source
329 (origin
330 (method url-fetch)
331 (uri (pypi-uri "Babel" version))
332 (sha256
333 (base32
93253411 334 "0a7wawx8vsg7igvz6p3x909fskhg4b2y1910xk4f4c8y22p3aqg8"))))
44d10b1f
RW
335 (build-system python-build-system)
336 (native-inputs
337 `(("python-freezegun" ,python-freezegun)
338 ("python-pytest" ,python-pytest)))
339 (propagated-inputs
340 `(("python-pytz" ,python-pytz)))
341 (arguments
342 `(#:phases (modify-phases %standard-phases
343 (replace 'check
8acd1e90
MB
344 (lambda _
345 (invoke "pytest" "-vv" "-k"
346 (string-append
347 ;; XXX: These tests fail when using Pytest 4.x and
348 ;; Babel 2.6.0. Try removing this for later versions.
349 "not test_no_inherit_metazone_marker_never_in_output"
350 " and not test_smoke_dates"
351 " and not test_smoke_numbers")))))))
44d10b1f
RW
352 (home-page "http://babel.pocoo.org/")
353 (synopsis
354 "Tools for internationalizing Python applications")
355 (description
356 "Babel is composed of two major parts:
357- tools to build and work with gettext message catalogs
358- a Python interface to the CLDR (Common Locale Data Repository), providing
359access to various locale display names, localized number and date formatting,
360etc. ")
361 (license license:bsd-3)))
362
363(define-public python2-babel
364 (package-with-python2 python-babel))
365
93253411
MB
366;; Sphinx < 2.0 requires this version. Remove once no longer needed.
367(define-public python2-babel-2.6
368 (package
369 (inherit python2-babel)
370 (version "2.6.0")
371 (source (origin
372 (method url-fetch)
373 (uri (pypi-uri "Babel" version))
374 (sha256
375 (base32
376 "08rxmbx2s4irp0w0gmn498vns5xy0fagm0fg33xa772jiks51flc"))))))
377
44d10b1f
RW
378(define-public python2-backport-ssl-match-hostname
379 (package
380 (name "python2-backport-ssl-match-hostname")
381 (version "3.5.0.1")
382 (source
383 (origin
384 (method url-fetch)
2c1f0d09 385 (uri (pypi-uri "backports.ssl_match_hostname" version))
44d10b1f
RW
386 (sha256
387 (base32
388 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
389 (build-system python-build-system)
390 (arguments
391 `(#:python ,python-2
392 #:tests? #f)) ; no test target
393 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
394 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
395 (description
396 "This backport brings the ssl.match_hostname() function to users of
397earlier versions of Python. The function checks the hostname in the
398certificate returned by the server to which a connection has been established,
399and verifies that it matches the intended target hostname.")
400 (license license:psfl)))
401
dc827867
TGR
402(define-public python-boolean.py
403 (package
404 (name "python-boolean.py")
405 (version "3.6")
406 (source
407 (origin
408 ;; There's no source tarball on PyPI.
409 (method git-fetch)
410 (uri (git-reference
411 (url "https://github.com/bastikr/boolean.py")
412 (commit (string-append "v" version))))
413 (file-name (git-file-name name version))
414 (sha256
415 (base32 "1wc89y73va58cj7dsx6c199zpxsy9q53dsffsdj6zmc90inqz6qs"))))
416 (build-system python-build-system)
417 (home-page "https://github.com/bastikr/boolean.py")
418 (synopsis "Boolean algebra in one Python module")
419 (description
420 "This is a small Python library that implements boolean algebra.
421It defines two base elements, @code{TRUE} and @code{FALSE}, and a
422@code{Symbol} class that can take on one of these two values. Calculations
423are done only in terms of @code{AND}, @code{OR}, and @code{NOT}---other
424compositions like @code{XOR} and @code{NAND} are emulated on top of them.
425Expressions are constructed from parsed strings or directly in Python.")
426 (license license:bsd-2)))
427
44d10b1f
RW
428(define-public python-hdf4
429 (package
430 (name "python-hdf4")
431 (version "0.9")
432 (source
433 (origin
434 (method url-fetch)
435 (uri (pypi-uri name version))
436 (sha256
437 (base32
438 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
439 (build-system python-build-system)
440 (native-inputs `(("nose" ,python-nose)))
441 (propagated-inputs `(("numpy" ,python-numpy)))
442 (inputs
443 `(("hdf4" ,hdf4)
4bd428a7 444 ("libjpeg" ,libjpeg-turbo)
44d10b1f
RW
445 ("zlib" ,zlib)))
446 (arguments
447 `(#:phases
448 (modify-phases %standard-phases
449 (replace 'check
450 (lambda _
451 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
452 ;; on to import numpy. Somehow this works on their CI system.
453 ;; Let's just manage PYTHONPATH here instead.
454 (substitute* "runexamples.sh"
455 (("export PYTHONPATH=.*") ""))
456 (setenv "PYTHONPATH"
457 (string-append (getcwd) ":"
458 (getenv "PYTHONPATH")))
459 (invoke "./runexamples.sh")
460 (invoke "nosetests" "-v"))))))
461 (home-page "https://github.com/fhs/python-hdf4")
462 (synopsis "Python interface to the NCSA HDF4 library")
463 (description
464 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
465which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
466NetCDF files can also be read and modified. Python-HDF4 is a fork of
467@url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
468 (license license:expat)))
469
470(define-public python2-hdf4
471 (package-with-python2 python-hdf4))
472
473(define-public python-h5py
474 (package
475 (name "python-h5py")
476 (version "2.8.0")
477 (source
478 (origin
479 (method url-fetch)
480 (uri (pypi-uri "h5py" version))
481 (sha256
482 (base32
483 "0mdr6wrq02ac93m1aqx9kad0ppfzmm4imlxqgyy1x4l7hmdcc9p6"))))
484 (build-system python-build-system)
485 (arguments
486 `(#:tests? #f ; no test target
487 #:phases
488 (modify-phases %standard-phases
489 (add-after 'unpack 'fix-hdf5-paths
490 (lambda* (#:key inputs #:allow-other-keys)
491 (let ((prefix (assoc-ref inputs "hdf5")))
492 (substitute* "setup_build.py"
493 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
494 (string-append "['" prefix "/lib" "']"))
495 (("'/opt/local/include', '/usr/local/include'")
496 (string-append "'" prefix "/include" "'")))
497 (substitute* "setup_configure.py"
498 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
499 (string-append "['" prefix "/lib" "']")))
500 #t))))))
501 (propagated-inputs
502 `(("python-six" ,python-six)
503 ("python-numpy" ,python-numpy)))
504 (inputs
505 `(("hdf5" ,hdf5)))
506 (native-inputs
507 `(("python-cython" ,python-cython)
508 ("python-pkgconfig" ,python-pkgconfig)))
509 (home-page "http://www.h5py.org/")
510 (synopsis "Read and write HDF5 files from Python")
511 (description
512 "The h5py package provides both a high- and low-level interface to the
513HDF5 library from Python. The low-level interface is intended to be a
514complete wrapping of the HDF5 API, while the high-level component supports
515access to HDF5 files, datasets and groups using established Python and NumPy
516concepts.")
517 (license license:bsd-3)))
518
519(define-public python2-h5py
520 (package-with-python2 python-h5py))
521
8b89dedc
RW
522(define-public python-sh
523 (package
524 (name "python-sh")
525 (version "1.12.14")
526 (source
527 (origin
528 (method url-fetch)
529 (uri (pypi-uri "sh" version))
530 (sha256
531 (base32
532 "1z2hx357xp3v4cv44xmqp7lli3frndqpyfmpbxf7n76h7s1zaaxm"))))
533 (build-system python-build-system)
fd3638d8
EF
534 (arguments
535 '(#:phases
536 (modify-phases %standard-phases
537 (replace 'check
538 (lambda _
ca983a2f
NG
539 ;; XXX: A Python 2 test fails when HOME=/homeless-shelter.
540 (setenv "HOME" "/tmp")
fd3638d8
EF
541 (invoke "python" "sh.py" "test"))))))
542 (native-inputs
543 `(("python-coverage" ,python-coverage)))
8b89dedc
RW
544 (home-page "https://github.com/amoffat/sh")
545 (synopsis "Python subprocess replacement")
546 (description "This package provides a replacement for Python's
547@code{subprocess} feature.")
548 (license license:expat)))
549
3869effd
RW
550(define-public python2-sh
551 (package-with-python2 python-sh))
552
d362b11d
RW
553(define-public python-cftime
554 (package
555 (name "python-cftime")
da107cf5 556 (version "1.0.4.2")
d362b11d
RW
557 (source
558 (origin
559 (method url-fetch)
560 (uri (pypi-uri "cftime" version))
561 (sha256
da107cf5 562 (base32 "0w0gi6jnch38hiygl62j4xkcirv4y3dcwrvxl9p7bsk6j27lzihs"))))
d362b11d
RW
563 (build-system python-build-system)
564 (propagated-inputs
565 `(("python-numpy" ,python-numpy)))
566 (native-inputs
567 `(("python-coveralls" ,python-coveralls)
568 ("python-cython" ,python-cython)
569 ("python-pytest-cov" ,python-pytest-cov)))
570 (home-page "https://github.com/Unidata/cftime")
571 (synopsis "Library for time handling")
572 (description
573 "This package provides time-handling functionality that used to be part
574of the netcdf4 package before.")
575 ;; This package claims to include code under the GPLv3 but is released
576 ;; under ISC.
577 (license (list license:isc license:gpl3+))))
578
44d10b1f
RW
579(define-public python-netcdf4
580 (package
581 (name "python-netcdf4")
93e7b209 582 (version "1.4.2")
44d10b1f
RW
583 (source
584 (origin
585 (method url-fetch)
586 (uri (pypi-uri "netCDF4" version))
587 (sha256
588 (base32
93e7b209 589 "0c0sklgrmv15ygliin8qq0hp7vanmbi74m6zpi0r1ksr0hssyd5r"))))
44d10b1f 590 (build-system python-build-system)
93e7b209
RW
591 (arguments
592 '(#:phases
593 (modify-phases %standard-phases
594 (add-after 'unpack 'configure-locations
595 (lambda* (#:key inputs #:allow-other-keys)
596 (setenv "HDF5_DIR" (assoc-ref inputs "hdf5"))
597 #t)))))
44d10b1f
RW
598 (native-inputs
599 `(("python-cython" ,python-cython)))
600 (propagated-inputs
93e7b209
RW
601 `(("python-numpy" ,python-numpy)
602 ("python-cftime" ,python-cftime)))
44d10b1f
RW
603 (inputs
604 `(("netcdf" ,netcdf)
605 ("hdf4" ,hdf4)
606 ("hdf5" ,hdf5)))
93e7b209 607 (home-page "https://github.com/Unidata/netcdf4-python")
44d10b1f
RW
608 (synopsis "Python/numpy interface to the netCDF library")
609 (description "Netcdf4-python is a Python interface to the netCDF C
610library. netCDF version 4 has many features not found in earlier
611versions of the library and is implemented on top of HDF5. This module
612can read and write files in both the new netCDF 4 and the old netCDF 3
613format, and can create files that are readable by HDF5 clients. The
614API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
615to users of that module.")
616 ;; The software is mainly ISC, but includes some files covered
617 ;; by the Expat license.
618 (license (list license:isc license:expat))))
619
620(define-public python2-netcdf4
621 (package-with-python2 python-netcdf4))
622
d6803445
TGR
623(define-public python-license-expression
624 (package
625 (name "python-license-expression")
626 (version "0.999")
627 (source
628 (origin
629 (method url-fetch)
630 (uri (pypi-uri "license-expression" version))
631 (sha256
632 (base32 "08ppb0bxbrsxazy88sgpl9yffvdsabw6dkk1nc332wcz2mphwwyf"))))
633 (build-system python-build-system)
634 (propagated-inputs
635 `(("python-boolean.py" ,python-boolean.py)))
636 (home-page "https://github.com/nexB/license-expression")
637 (synopsis "Apply boolean logic to license expressions")
638 (description
639 "This Python module defines a tiny language to evaluate and compare
640license expressions using boolean logic. Logical combinations of licenses can
641be tested for equality, containment, and equivalence. They can be normalised
642and simplified. It supports SPDX license expressions as well as other naming
643conventions and aliases in the same expression.")
644 (license license:gpl2+)))
645
44d10b1f
RW
646(define-public python-lockfile
647 (package
648 (name "python-lockfile")
649 (version "0.12.2")
650 (source
651 (origin
652 (method url-fetch)
8318bf07 653 (uri (pypi-uri "lockfile" version))
44d10b1f
RW
654 (sha256
655 (base32
656 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
657 (build-system python-build-system)
658 (arguments '(#:test-target "check"))
659 (native-inputs
660 `(("python-pbr" ,python-pbr)))
661 (home-page "https://launchpad.net/pylockfile")
662 (synopsis "Platform-independent file locking module")
663 (description
664 "The lockfile package exports a LockFile class which provides a simple
665API for locking files.")
666 (license license:expat)))
667
668(define-public python2-lockfile
669 (package-with-python2 python-lockfile))
670
671(define-public python-semantic-version
672 (package
673 (name "python-semantic-version")
674 (version "2.6.0")
675 (source
676 (origin
677 (method url-fetch)
678 (uri (pypi-uri "semantic_version" version))
679 (sha256
680 (base32
681 "1h2l9xyg1zzsda6kjcmfcgycbvrafwci283vcr1v5sbk01l2hhra"))))
682 (build-system python-build-system)
683 (arguments
684 `(#:tests? #f)) ; PyPI tarball lacks tests
685 (home-page "https://github.com/rbarrois/python-semanticversion")
686 (synopsis "Semantic versioning module for Python")
687 (description
688 "The @code{semantic_version} class is a small library for handling
689@uref{https://semver.org/, semantic versioning} (@dfn{SemVer}) in Python.
690
691It can compare versions, generate a new version that represents a bump in one of
692the version levels, and check whether any given string is a proper semantic
693version identifier.")
694 (license license:bsd-3)))
695
696(define-public python2-semantic-version
697 (package-with-python2 python-semantic-version))
698
699(define-public python-serpent
700 (package
701 (name "python-serpent")
fa9d14ac 702 (version "1.28")
44d10b1f
RW
703 (source
704 (origin
705 (method url-fetch)
706 (uri (pypi-uri "serpent" version))
707 (sha256
fa9d14ac 708 (base32 "1arnckykpkvv2qrp49l1k7q5mr5pisswl0rvdx98x8wsl1n361pk"))))
44d10b1f 709 (build-system python-build-system)
fa9d14ac
TGR
710 (native-inputs
711 `(("python-attrs" ,python-attrs)
712 ("python-pytz" ,python-pytz)))
44d10b1f
RW
713 (home-page "https://github.com/irmen/Serpent")
714 (synopsis "Serializer for literal Python expressions")
715 (description
1d3c7803
TGR
716 "Serpent provides @code{ast.literal_eval()}-compatible object tree
717serialization. It serializes an object tree into bytes (an utf-8 encoded
718string) that can be decoded and then passed as-is to @code{ast.literal_eval()}
719to rebuild the original object tree.
720
721Because only safe literals are encoded, it is safe to send serpent data to
722other machines, such as over the network.")
44d10b1f
RW
723 (license license:expat)))
724
725(define-public python-setuptools
726 (package
727 (name "python-setuptools")
e39d4933 728 (version "41.0.1")
44d10b1f
RW
729 (source
730 (origin
731 (method url-fetch)
732 (uri (pypi-uri "setuptools" version ".zip"))
733 (sha256
734 (base32
e39d4933 735 "04sns22y2hhsrwfy1mha2lgslvpjsjsz8xws7h2rh5a7ylkd28m2"))
44d10b1f
RW
736 (modules '((guix build utils)))
737 (snippet
738 '(begin
739 ;; Remove included binaries which are used to build self-extracting
740 ;; installers for Windows.
741 ;; TODO: Find some way to build them ourself so we can include them.
742 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
743 #t))))
744 (build-system python-build-system)
745 ;; FIXME: Tests require pytest, which itself relies on setuptools.
746 ;; One could bootstrap with an internal untested setuptools.
747 (arguments
748 `(#:tests? #f))
749 (home-page "https://pypi.python.org/pypi/setuptools")
750 (synopsis
751 "Library designed to facilitate packaging Python projects")
752 (description
753 "Setuptools is a fully-featured, stable library designed to facilitate
754packaging Python projects, where packaging includes:
755Python package and module definitions,
756distribution package metadata,
757test hooks,
758project installation,
759platform-specific details,
760Python 3 support.")
761 ;; TODO: setuptools now bundles the following libraries:
762 ;; packaging, pyparsing, six and appdirs. How to unbundle?
763 (license (list license:psfl ; setuptools itself
764 license:expat ; six, appdirs, pyparsing
765 license:asl2.0 ; packaging is dual ASL2/BSD-2
766 license:bsd-2))))
767
768(define-public python2-setuptools
769 (package-with-python2 python-setuptools))
770
0fdec2a3
MB
771;; The setuptools provided by Python 3.7.4 is too new for Tensorflow.
772(define-public python-setuptools-for-tensorflow
773 (hidden-package
774 (package
775 (inherit python-setuptools)
776 (version "39.1.0")
777 (source (origin
778 (inherit (package-source python-setuptools))
779 (uri (pypi-uri "setuptools" version ".zip"))
780 (sha256
781 (base32
782 "1mzdhvfhnv4lggxa8rjl0dzqxvfx377gg5sqs57v89wrp09lwj65")))))))
783
44d10b1f
RW
784(define-public python-uniseg
785 (package
786 (name "python-uniseg")
787 (version "0.7.1")
788 (source
789 (origin
790 (method url-fetch)
791 (uri (pypi-uri "uniseg" version ".zip"))
792 (sha256
793 (base32
794 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
795 (build-system python-build-system)
796 (arguments
797 '(#:tests? #f)) ; The test suite requires network access.
798 (native-inputs
799 `(("unzip" ,unzip)))
800 (home-page
801 "https://bitbucket.org/emptypage/uniseg-python")
802 (synopsis
803 "Python library to determine Unicode text segmentations")
804 (description
805 "Uniseg is a Python package used to determine Unicode text segmentations.
806Supported segmentations include:
807@enumerate
808@item @dfn{Code point} (any value in the Unicode codespace)
809@item @dfn{Grapheme cluster} (user-perceived character made of a single or
810multiple Unicode code points, e.g. \"G\" + acute-accent)
811@item Word break
812@item Sentence break
813@item Line break
814@end enumerate")
815 (license license:expat)))
816
817(define-public python2-uniseg
818 (package-with-python2 python-uniseg))
819
820(define-public python-humanfriendly
821 (package
822 (name "python-humanfriendly")
823 (version "4.4.1")
824 (source
825 (origin
826 (method url-fetch)
827 (uri (pypi-uri "humanfriendly" version))
828 (sha256
829 (base32
830 "0pisgizjql86785jchfjv217g0lsgk114g2lja5j4y3lsc3b9szi"))))
831 (build-system python-build-system)
832 (arguments
833 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
834 #:tests? #f))
835 (propagated-inputs
836 `(("python-monotonic" ,python-monotonic)))
837 (home-page "https://humanfriendly.readthedocs.io")
838 (synopsis "Human-friendly input and output in Python")
839 (description
840 "The functions and classes in @code{humanfriendly} can be used to make
841text interfaces more user-friendly. It includes tools to parse and format
842numbers, file sizes, and timespans, timers for long-running operations, menus
843to allow the user to choose from a list of options, and terminal interaction
844helpers.")
845 (license license:expat)))
846
847(define-public python2-humanfriendly
848 (package-with-python2 python-humanfriendly))
849
850(define-public python-capturer
851 (package
852 (name "python-capturer")
853 (version "2.4")
854 (source
855 (origin
856 (method url-fetch)
857 (uri (pypi-uri "capturer" version))
858 (sha256
859 (base32
860 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
861 (build-system python-build-system)
862 (arguments
863 `(#:tests? #f))
864 (propagated-inputs
865 `(("python-humanfriendly" ,python-humanfriendly)))
866 (home-page "https://capturer.readthedocs.io")
867 (synopsis "Capture stdout and stderr streams of the current process")
868 (description
869 "The capturer package makes it easy to capture the stdout and stderr
870streams of the current process and subprocesses. Output can be relayed
871to the terminal in real time but is also available to the Python program
872for additional processing.")
873 (license license:expat)))
874
875(define-public python2-capturer
876 (package-with-python2 python-capturer))
877
878(define-public python-case
879 (package
880 (name "python-case")
881 (version "1.5.3")
882 (source
883 (origin
884 (method url-fetch)
885 (uri (pypi-uri "case" version))
886 (sha256
887 (base32
888 "1cagg06vfph864s6l5jb0zqliwxh647bki8j6lf4a4qrv40jnhs8"))))
889 (build-system python-build-system)
890 (propagated-inputs
891 `(("python-mock" ,python-mock)
892 ("python-nose" ,python-nose)
893 ("python-six" ,python-six)
894 ("python-unittest2" ,python-unittest2)))
895 (native-inputs
896 `(("python-coverage" ,python-coverage)))
897 (home-page "https://github.com/celery/case")
898 (synopsis "Unittest utilities and convenience methods")
899 (description
900 "The @code{case} package provides utilities on top of unittest, including
901some helpful Python 2 compatibility convenience methods.")
902 (license license:bsd-3)))
903
904(define-public python-verboselogs
905 (package
906 (name "python-verboselogs")
907 (version "1.7")
908 (source
909 (origin
910 (method url-fetch)
911 (uri (pypi-uri "verboselogs" version))
912 (sha256
913 (base32
914 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
915 (build-system python-build-system)
1760c970
MO
916 (arguments
917 `(#:phases
918 (modify-phases %standard-phases
919 (replace 'check
920 (lambda _
921 ;; Do not run pylint plugin test, as astroid is an old
922 ;; unsupported version.
923 (invoke "pytest" "-v" "-k" "not test_pylint_plugin"
924 "verboselogs/tests.py"))))))
44d10b1f
RW
925 (native-inputs
926 `(("python-mock" ,python-mock)
1760c970 927 ("python-pytest" ,python-pytest)))
44d10b1f
RW
928 (home-page "https://verboselogs.readthedocs.io")
929 (synopsis "Verbose logging level for Python's logging module")
930 (description
931 "The @code{verboselogs} package extends Python's @code{logging} module to
932add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
933 (license license:expat)))
934
935(define-public python2-verboselogs
936 (package-with-python2 python-verboselogs))
937
938(define-public python-coloredlogs
939 (package
940 (name "python-coloredlogs")
b2b8a39c 941 (version "10.0")
44d10b1f
RW
942 (source
943 (origin
944 (method url-fetch)
945 (uri (pypi-uri "coloredlogs" version))
946 (sha256
947 (base32
b2b8a39c 948 "0dkw6xp0r1dwgz4s2f58npx5nxfq51wf4l6qkm5ib27slgfs4sdq"))))
44d10b1f
RW
949 (build-system python-build-system)
950 (arguments
951 `(;Tests require some updated modules
952 #:tests? #f))
953 (propagated-inputs
954 `(("python-capturer" ,python-capturer)))
955 (home-page "https://coloredlogs.readthedocs.io")
956 (synopsis "Colored stream handler for Python's logging module")
957 (description
958 "The @code{coloredlogs} package enables colored terminal output for
959Python's logging module. The @code{ColoredFormatter} class inherits from
960@code{logging.Formatter} and uses ANSI escape sequences to render your logging
961messages in color.")
962 (license license:expat)))
963
964(define-public python2-coloredlogs
965 (package-with-python2 python-coloredlogs))
966
af760990
VC
967(define-public python-editorconfig
968 (package
969 (name "python-editorconfig")
970 (version "0.12.2")
971 (source
972 (origin
973 (method url-fetch)
974 (uri (pypi-uri "EditorConfig" version))
975 (sha256
976 (base32
977 "0v55z351p9qkyp3bbspwywwn28sbcknhirngjbj779n3z52z63hv"))))
978 (build-system python-build-system)
979 (home-page "https://editorconfig.org/")
980 (synopsis "EditorConfig bindings for python")
981 (description "The EditorConfig project consists of a file format for
982defining coding styles and a collection of text editor plugins that enable
983editors to read the file format and adhere to defined styles. EditorConfig
984files are easily readable and they work nicely with version control systems.")
985 ;; "fnmatch.py" and "ini.py" are licensed under psfl, the rest is bsd-2.
986 (license (list license:bsd-2 license:psfl))))
987
4caf37b0
MC
988(define-public python-et-xmlfile
989 (package
990 (name "python-et-xmlfile")
991 (version "1.0.1")
992 (source
993 (origin
994 (method url-fetch)
995 (uri (pypi-uri "et_xmlfile" version))
996 (sha256
997 (base32
998 "0nrkhcb6jdrlb6pwkvd4rycw34y3s931hjf409ij9xkjsli9fkb1"))))
999 (build-system python-build-system)
1000 (arguments
1001 `(#:phases (modify-phases %standard-phases
1002 (replace 'check
1003 (lambda _
1004 (invoke "pytest"))))))
1005 (native-inputs
1006 `(("python-pytest" ,python-pytest)
1007 ("python-lxml" ,python-lxml))) ;used for the tests
1008 (home-page "https://bitbucket.org/openpyxl/et_xmlfile")
1009 (synopsis "Low memory implementation of @code{lxml.xmlfile}")
1010 (description "This Python library is based upon the @code{xmlfile} module
1011from @code{lxml}. It aims to provide a low memory, compatible implementation
1012of @code{xmlfile}.")
1013 (license license:expat)))
1014
1015(define-public python2-et-xmlfile
1016 (package-with-python2 python-et-xmlfile))
1017
a042d348
MC
1018(define-public python-openpyxl
1019 (package
1020 (name "python-openpyxl")
441e6d93 1021 (version "2.6.2")
a042d348
MC
1022 (source
1023 (origin
1024 ;; We use the upstream repository, as the tests are not included in the
1025 ;; PyPI releases.
1026 (method hg-fetch)
1027 (uri (hg-reference
1028 (url "https://bitbucket.org/openpyxl/openpyxl")
1029 (changeset version)))
1030 (file-name (string-append name "-" version "-checkout"))
1031 (sha256
441e6d93 1032 (base32 "1qhij6kcvdxqjy4g6193nsv4q7fy8n4fwyd3c2z047idlm6s3j4w"))))
a042d348
MC
1033 (build-system python-build-system)
1034 (arguments
1035 `(#:phases (modify-phases %standard-phases
1036 (replace 'check
1037 (lambda _
1038 (invoke "pytest"))))))
1039 (native-inputs
1040 ;; For the test suite.
1041 `(("python-lxml" ,python-lxml)
1042 ("python-pillow" ,python-pillow)
1043 ("python-pytest" ,python-pytest)))
1044 (propagated-inputs
1045 `(("python-et-xmlfile" ,python-et-xmlfile)
1046 ("python-jdcal" ,python-jdcal)))
1047 (home-page "https://openpyxl.readthedocs.io")
1048 (synopsis "Python library to read/write Excel 2010 XLSX/XLSM files")
1049 (description "This Python library allows reading and writing to the Excel XLSX, XLSM,
1050XLTX and XLTM file formats that are defined by the Office Open XML (OOXML)
1051standard.")
1052 (license license:expat)))
1053
44d10b1f
RW
1054(define-public python-eventlet
1055 (package
1056 (name "python-eventlet")
c9876c9b 1057 (version "0.25.1")
44d10b1f
RW
1058 (source
1059 (origin
1060 (method url-fetch)
1061 (uri (pypi-uri "eventlet" version))
1062 (sha256
1063 (base32
c9876c9b 1064 "1hgz8jq19wlz8vwqj900ry8cjv578nz4scc91mlc8944yid6573c"))))
44d10b1f
RW
1065 (build-system python-build-system)
1066 (propagated-inputs
1067 `(("python-greenlet" ,python-greenlet)))
1068 (arguments
1069 ;; TODO: Requires unpackaged 'enum-compat'.
1070 '(#:tests? #f))
bff36617 1071 (home-page "https://eventlet.net")
44d10b1f
RW
1072 (synopsis "Concurrent networking library for Python")
1073 (description
1074 "Eventlet is a concurrent networking library for Python that
1075allows you to change how you run your code, not how you write it.
1076It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
1077Coroutines ensure that the developer uses a blocking style of programming
1078that is similar to threading, but provide the benefits of non-blocking I/O.
1079The event dispatch is implicit, which means you can easily use @code{Eventlet}
1080from the Python interpreter, or as a small part of a larger application.")
1081 (license license:expat)))
1082
1083(define-public python2-eventlet
1084 (let ((base (package-with-python2
1085 (strip-python2-variant python-eventlet))))
1086 (package (inherit base)
1087 (propagated-inputs
1088 `(("python2-enum34" ,python2-enum34)
1089 ,@(package-propagated-inputs base))))))
1090
1091(define-public python-six
1092 (package
1093 (name "python-six")
f00722b4 1094 (version "1.13.0")
44d10b1f
RW
1095 (source
1096 (origin
1097 (method url-fetch)
1098 (uri (pypi-uri "six" version))
1099 (sha256
1100 (base32
f00722b4 1101 "0rkby0kxlxj0kk2m6q5mh73ka5rk608p886vnv57h9cbkqki1xih"))))
44d10b1f
RW
1102 (build-system python-build-system)
1103 (arguments
1104 `(#:phases
1105 (modify-phases %standard-phases
1106 (replace 'check
1107 (lambda _
1108 (invoke "py.test" "-v"))))))
1109 (native-inputs
f00722b4 1110 `(("python-pytest" ,python-pytest-bootstrap)))
44d10b1f
RW
1111 (home-page "https://pypi.python.org/pypi/six/")
1112 (synopsis "Python 2 and 3 compatibility utilities")
1113 (description
1114 "Six is a Python 2 and 3 compatibility library. It provides utility
1115functions for smoothing over the differences between the Python versions with
1116the goal of writing Python code that is compatible on both Python versions.
1117Six supports every Python version since 2.5. It is contained in only one
1118Python file, so it can be easily copied into your project.")
1119 (license license:x11)))
1120
1121(define-public python2-six
1122 (package-with-python2 python-six))
1123
1124(define-public python-six-bootstrap
1125 (package
1126 (inherit python-six)
1127 (name "python-six-bootstrap")
1128 (native-inputs `())
1129 (arguments `(#:tests? #f))))
1130
1131(define-public python2-six-bootstrap
1132 (package-with-python2 python-six-bootstrap))
1133
1134(define-public python-schedule
1135 (package
1136 (name "python-schedule")
1137 (version "0.4.3")
1138 (source
1139 (origin
1140 (method url-fetch)
1141 (uri (pypi-uri "schedule" version))
1142 (sha256
1143 (base32
1144 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
1145 (build-system python-build-system)
1146 (native-inputs
1147 `(("python-pytest" ,python-pytest)
1148 ("python-mock" ,python-mock)))
1149 (home-page "https://github.com/dbader/schedule")
1150 (synopsis "Schedule periodic function calls in Python")
1151 (description
1152 "Schedule is an in-process scheduler for periodic jobs that uses the
1153builder pattern for configuration. Schedule lets you run Python functions (or
1154any other callable) periodically at pre-determined intervals using a simple,
1155human-friendly syntax.")
1156 (license license:expat)))
1157
1158(define-public python2-schedule
1159 (package-with-python2 python-schedule))
1160
44d10b1f
RW
1161(define-public python2-mechanize
1162 (package
1163 (name "python2-mechanize")
1164 (version "0.2.5")
1165 (source
1166 (origin
1167 (method url-fetch)
1cc184e6 1168 (uri (pypi-uri "mechanize" version))
44d10b1f
RW
1169 (sha256
1170 (base32
1171 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1172 (build-system python-build-system)
1173 (arguments
1174 `(#:python ,python-2 ; apparently incompatible with Python 3
1175 #:tests? #f))
1176 ;; test fails with message
1177 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1178 ;; (python-3.3.2) or
1179 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1180 ;; (python-2.7.5).
1181 ;; The source code is from March 2011 and probably not up-to-date
1182 ;; with respect to python unit tests.
1183 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1184 (synopsis
1185 "Stateful programmatic web browsing in Python")
1186 (description
1187 "Mechanize implements stateful programmatic web browsing in Python,
1188after Andy Lester’s Perl module WWW::Mechanize.")
1189 (license (license:non-copyleft
1190 "file://COPYING"
1191 "See COPYING in the distribution."))))
1192
1193
1194(define-public python-simplejson
1195 (package
1196 (name "python-simplejson")
1197 (version "3.14.0")
1198 (source
1199 (origin
1200 (method url-fetch)
1201 (uri (pypi-uri "simplejson" version))
1202 (sha256
1203 (base32
1204 "1lkv3xlf7ryzi69zqfdbkvpxdfy1rg1rq2yzcnxgf4km5m6difqy"))))
1205 (build-system python-build-system)
1206 (home-page "http://simplejson.readthedocs.org/en/latest/")
1207 (synopsis
1208 "Json library for Python")
1209 (description
1210 "JSON (JavaScript Object Notation) is a subset of JavaScript
1211syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1212format.
1213
1214Simplejson exposes an API familiar to users of the standard library marshal
1215and pickle modules. It is the externally maintained version of the json
1216library contained in Python 2.6, but maintains compatibility with Python 2.5
1217and (currently) has significant performance advantages, even without using
1218the optional C extension for speedups. Simplejson is also supported on
1219Python 3.3+.")
1220 (license license:x11)))
1221
1222(define-public python2-simplejson
1223 (package-with-python2 python-simplejson))
1224
1225
1226(define-public python-pyicu
1227 (package
1228 (name "python-pyicu")
dc23bb45 1229 (version "2.3.1")
44d10b1f
RW
1230 (source
1231 (origin
1232 (method url-fetch)
1233 (uri (pypi-uri "PyICU" version))
1234 (sha256
1235 (base32
dc23bb45 1236 "1x4w8m7ifki9z2a187pgjr33z6z0rp2fii9b73djak1vhm9v9cnx"))))
44d10b1f
RW
1237 (build-system python-build-system)
1238 (inputs
1239 `(("icu4c" ,icu4c)))
1240 (native-inputs
1241 `(("python-pytest" ,python-pytest)
1242 ("python-six" ,python-six)))
1243 (home-page "https://github.com/ovalhub/pyicu")
1244 (synopsis "Python extension wrapping the ICU C++ API")
1245 (description
1246 "PyICU is a python extension wrapping the ICU C++ API.")
1247 (properties `((python2-variant . ,(delay python2-pyicu))))
1248 (license license:x11)))
1249
1250(define-public python2-pyicu
1251 (let ((base (package-with-python2
1252 (strip-python2-variant python-pyicu))))
1253 (package
1254 (inherit base)
1255 (arguments
1256 `(,@(package-arguments base)
1257 #:phases
1258 (modify-phases %standard-phases
1259 (add-before 'check 'delete-failing-test
1260 (λ _
1261 ;; XXX: This fails due to Unicode issues unique to Python 2,
1262 ;; it seems: <https://github.com/ovalhub/pyicu/issues/61>.
1263 (delete-file "test/test_Script.py")
1264 #t))))))))
1265
1266(define-public python2-dogtail
1267 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1268 ;; spaces in indentation" with Python 3.
1269 (package
1270 (name "python2-dogtail")
1271 (version "0.9.9")
1272 (source (origin
1273 (method url-fetch)
1274 (uri (pypi-uri "dogtail" version))
1275 (sha256
1276 (base32
1277 "0p5wfssvzr9w0bvhllzbbd8fnp4cca2qxcpcsc33dchrmh5n552x"))))
1278 (build-system python-build-system)
1279 (arguments `(#:python ,python-2
1280 #:tests? #f)) ; invalid command "test"
1281 ;; Currently no offical homepage.
1282 (home-page "https://pypi.python.org/pypi/dogtail/")
1283 (synopsis "GUI test tool and automation framework written in Python")
1284 (description
1285 "Dogtail is a GUI test tool and automation framework written in Python.
1286It uses Accessibility (a11y) technologies to communicate with desktop
1287applications. dogtail scripts are written in Python and executed like any
1288other Python program.")
1289 (license license:gpl2+)))
1290
1291(define-public python-empy
1292 (package
1293 (name "python-empy")
0f6d5115 1294 (version "3.3.3")
44d10b1f
RW
1295 (source (origin
1296 (method url-fetch)
1297 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1298 version ".tar.gz"))
1299 (sha256
1300 (base32
0f6d5115 1301 "1mxfy5mgp473ga1pgz2nvm8ds6z4g3hdky8523z6jzvcs9ny6hcq"))))
44d10b1f
RW
1302 (build-system python-build-system)
1303 (arguments
0f6d5115 1304 `(#:tests? #f)) ; python2 only
44d10b1f
RW
1305 (home-page "http://www.alcyone.com/software/empy/")
1306 (synopsis "Templating system for Python")
1307 (description
1308 "EmPy is a system for embedding Python expressions and statements in
1309template text; it takes an EmPy source file, processes it, and produces
1310output. This is accomplished via expansions, which are special signals to the
1311EmPy system and are set off by a special prefix (by default the at sign, @@).
1312EmPy can expand arbitrary Python expressions and statements in this way, as
1313well as a variety of special forms. Textual data not explicitly delimited in
1314this way is sent unaffected to the output, allowing Python to be used in
1315effect as a markup language. Also supported are callbacks via hooks,
1316recording and playback via diversions, and dynamic, chainable filters. The
1317system is highly configurable via command line options and embedded
1318commands.")
1319 (license license:lgpl2.1+)))
1320
1321(define-public python2-empy
0f064242
TGR
1322 (let ((base (package-with-python2 (strip-python2-variant python-empy))))
1323 (package
1324 (inherit base)
1325 (arguments `(,@(package-arguments base)
1326 #:tests? #t)))))
44d10b1f
RW
1327
1328(define-public python2-element-tree
1329 (package
1330 (name "python2-element-tree")
1331 (version "1.2.6")
1332 (source (origin
1333 (method url-fetch)
1334 (uri (string-append
1335 "http://effbot.org/media/downloads/elementtree-"
1336 version "-20050316.tar.gz"))
1337 (sha256
1338 (base32
1339 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1340 (build-system python-build-system)
1341 (arguments
1342 `(#:python ,python-2 ; seems to be part of Python 3
1343 #:tests? #f)) ; no 'test' sub-command
1344 (synopsis "Toolkit for XML processing in Python")
1345 (description
1346 "ElementTree is a Python library supporting lightweight XML processing.")
1347 (home-page "http://effbot.org/zone/element-index.htm")
1348 (license (license:x11-style
1349 "http://docs.python.org/2/license.html"
1350 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1351
1352(define-public python2-pybugz
1353 (package
1354 (name "python2-pybugz")
1355 (version "0.6.11")
1356 (source (origin
1357 (method url-fetch)
1358 (uri (string-append
1359 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1360 version ".tar.gz"))
1361 (sha256
1362 (base32
1363 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1364 (patches (search-patches "pybugz-stty.patch"
1365 "pybugz-encode-error.patch"))))
1366 (build-system python-build-system)
1367 (arguments
1368 `(#:python ,python-2 ; SyntaxError with Python 3
1369 #:tests? #f)) ; no 'test' sub-command
1370 (propagated-inputs
1371 `(("element-tree" ,python2-element-tree)))
1372 (synopsis "Python and command-line interface to Bugzilla")
1373 (description
1374 "PyBugz is a Python library and command-line tool to query the Bugzilla
1375bug tracking system. It is meant as an aid to speed up interaction with the
1376bug tracker.")
1377 (home-page "http://www.liquidx.net/pybugz/")
1378 (license license:gpl2)))
1379
1380(define-public python2-enum
1381 (package
1382 (name "python2-enum")
1383 (version "0.4.6")
1384 (source (origin
1385 (method url-fetch)
1386 (uri (pypi-uri "enum" version))
1387 (sha256
1388 (base32
1389 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
1390 (build-system python-build-system)
1391 (arguments
1392 `(#:python ,python-2))
1393 (home-page "http://pypi.python.org/pypi/enum/")
1394 (synopsis "Robust enumerated type support in Python")
1395 (description
1396 "This provides a module for robust enumerations in Python. It has
1397been superseded by the Python standard library and is provided only for
1398compatibility.")
1399 ;; Choice of either license.
1400 (license (list license:gpl3+ license:psfl))))
1401
1402(define-public python-enum34
1403 (package
1404 (name "python-enum34")
1405 (version "1.1.6")
1406 (source
1407 (origin
1408 (method url-fetch)
1409 (uri (pypi-uri "enum34" version))
1410 (sha256
1411 (base32
1412 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
1413 (build-system python-build-system)
1414 (home-page "https://pypi.python.org/pypi/enum34")
1415 (synopsis "Backported Python 3.4 Enum")
1416 (description
1417 "Enum34 is the new Python stdlib enum module available in Python 3.4
1418backported for previous versions of Python from 2.4 to 3.3.")
1419 (license license:bsd-3)))
1420
1421(define-public python2-enum34
1422 (package-with-python2 python-enum34))
1423
1424(define-public python-parse-type
1425 (package
1426 (name "python-parse-type")
1427 (version "0.4.2")
1428 (source
1429 (origin
1430 (method url-fetch)
1431 (uri (pypi-uri "parse_type" version))
1432 (sha256
1433 (base32
1434 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
1435 (build-system python-build-system)
1436 (propagated-inputs
1437 `(("python-six" ,python-six)
1438 ("python-parse" ,python-parse)))
1439 (native-inputs
1440 `(("python-pytest" ,python-pytest)
1441 ("python-pytest-runner" ,python-pytest-runner)))
1442 (home-page "https://github.com/jenisys/parse_type")
1443 (synopsis "Extended parse module")
1444 (description
1445 "Parse_type extends the python parse module.")
1446 (properties
1447 `((python2-variant . ,(delay python2-parse-type))))
1448 (license license:bsd-3)))
1449
1450(define-public python2-parse-type
1451 (let ((base (package-with-python2
1452 (strip-python2-variant python-parse-type))))
1453 (package (inherit base)
1454 (propagated-inputs
1455 `(("python2-enum34" ,python2-enum34)
1456 ,@(package-propagated-inputs base))))))
1457
1458(define-public python-parse
1459 (package
1460 (name "python-parse")
1461 (version "1.8.4")
1462 (source
1463 (origin
1464 (method url-fetch)
1465 (uri (pypi-uri "parse" version))
1466 (sha256
1467 (base32
1468 "0f8997xr8nq2nq35iiviq8ningd1zvy59fg503xfpbi2dwhgdkf3"))))
1469 (build-system python-build-system)
1470 (arguments
1471 `(#:phases
1472 (modify-phases %standard-phases
1473 (replace 'check
1474 (lambda _ (invoke "python" "test_parse.py"))))))
1475 (home-page "https://github.com/r1chardj0n3s/parse")
1476 (synopsis "Parse strings")
1477 (description
1478 "Parse strings using a specification based on the Python @code{format()}
1479syntax.")
1480 (license license:x11)))
1481
1482(define-public python-polib
1483 (package
1484 (name "python-polib")
1485 (version "1.0.8")
1486 (source (origin
1487 (method url-fetch)
1488 (uri (pypi-uri "polib" version))
1489 (sha256
1490 (base32
1491 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1492 (build-system python-build-system)
1493 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1494 (synopsis "Manipulate, create and modify gettext files")
1495 (description "Polib can manipulate any gettext format (po, pot and mo)
1496files. It can be used to create po files from scratch or to modify
1497existing ones.")
1498 (license license:expat)))
1499
1500(define-public python2-polib
1501 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1502 (package
1503 (inherit base)
1504 (arguments `(,@(package-arguments base)
1505 ;; Tests don't work with python2.
1506 #:tests? #f)))))
1507
6830120e
TLC
1508(define-public python-poyo
1509 (package
1510 (name "python-poyo")
1511 (version "0.5.0")
1512 (source
1513 (origin
1514 (method url-fetch)
1515 (uri (pypi-uri "poyo" version))
1516 (sha256
1517 (base32
1518 "1pflivs6j22frz0v3dqxnvc8yb8fb52g11lqr88z0i8cg2m5csg2"))))
1519 (build-system python-build-system)
1520 (home-page "https://github.com/hackebrot/poyo")
1521 (synopsis "Lightweight YAML Parser for Python")
1522 (description
1523 "This package provides a lightweight YAML Parser for Python. It supports
1524only a chosen subset of the YAML format that is required to parse cookiecutter
1525user configuration files. It does not have support for serializing into YAML
1526and is not compatible with JSON.")
1527 (license license:expat)))
1528
44d10b1f
RW
1529(define-public scons
1530 (package
1531 (name "scons")
05487ed8 1532 (version "3.0.4")
44d10b1f 1533 (source (origin
ad34338d
RW
1534 (method git-fetch)
1535 (uri (git-reference
1536 (url "https://github.com/SCons/scons.git")
1537 (commit version)))
1538 (file-name (git-file-name name version))
44d10b1f
RW
1539 (sha256
1540 (base32
05487ed8 1541 "1xy8jrwz87y589ihcld4hv7wn122sjbz914xn8h50ww77wbhk8hn"))))
44d10b1f
RW
1542 (build-system python-build-system)
1543 (arguments
1544 `(#:use-setuptools? #f ; still relies on distutils
ad34338d
RW
1545 #:tests? #f ; no 'python setup.py test' command
1546 #:phases
1547 (modify-phases %standard-phases
1548 (add-before 'build 'bootstrap
1549 (lambda _
1550 (substitute* "src/engine/SCons/compat/__init__.py"
1551 (("sys.modules\\[new\\] = imp.load_module\\(old, \\*imp.find_module\\(old\\)\\)")
1552 "sys.modules[new] = __import__(old)"))
05487ed8
RW
1553 (substitute* "src/engine/SCons/Platform/__init__.py"
1554 (("mod = imp.load_module\\(full_name, file, path, desc\\)")
1555 "mod = __import__(full_name)"))
ad34338d
RW
1556 (invoke "python" "bootstrap.py" "build/scons" "DEVELOPER=guix")
1557 (chdir "build/scons")
1558 #t)))))
44d10b1f
RW
1559 (home-page "http://scons.org/")
1560 (synopsis "Software construction tool written in Python")
1561 (description
1562 "SCons is a software construction tool. Think of SCons as an improved,
1563cross-platform substitute for the classic Make utility with integrated
1564functionality similar to autoconf/automake and compiler caches such as ccache.
1565In short, SCons is an easier, more reliable and faster way to build
1566software.")
1567 (license license:x11)))
1568
1569(define-public scons-python2
1570 (package
1571 (inherit (package-with-python2 scons))
1572 (name "scons-python2")))
1573
1574(define-public python-extras
1575 (package
1576 (name "python-extras")
1577 (version "1.0.0")
1578 (source
1579 (origin
1580 (method url-fetch)
1581 (uri (pypi-uri "extras" version))
1582 (sha256
1583 (base32
1584 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
1585 (build-system python-build-system)
1586 (arguments
1587 ;; FIXME: Circular dependency on testtools.
1588 '(#:tests? #f))
1589 (home-page "https://github.com/testing-cabal/extras")
1590 (synopsis "Useful extensions to the Python standard library")
1591 (description
1592 "Extras is a set of extensions to the Python standard library.")
1593 (license license:expat)))
1594
1595(define-public python2-extras
1596 (package-with-python2 python-extras))
1597
1598(define-public python-mimeparse
1599 (package
1600 (name "python-mimeparse")
1601 (version "1.6.0")
1602 (source
1603 (origin
1604 (method url-fetch)
89bf667c 1605 (uri (pypi-uri "python-mimeparse" version))
44d10b1f
RW
1606 (sha256
1607 (base32
1608 "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n"))))
1609 (build-system python-build-system)
1610 (arguments
1611 '(#:phases
1612 (modify-phases %standard-phases
1613 (replace 'check
1614 (lambda _
1615 (invoke "./mimeparse_test.py"))))))
1616 (home-page
1617 "https://github.com/dbtsai/python-mimeparse")
1618 (synopsis "Python library for parsing MIME types")
1619 (description
1620 "Mimeparse provides basic functions for parsing MIME type names and
1621matching them against a list of media-ranges.")
1622 (license license:expat)))
1623
1624(define-public python2-mimeparse
1625 (package-with-python2 python-mimeparse))
1626
1627(define-public python-miniboa
1628 (package
1629 (name "python-miniboa")
1630 (version "1.0.7")
1631 (source
1632 (origin
1633 (method url-fetch)
1634 (uri (pypi-uri "miniboa" version))
1635 (sha256
1636 (base32
1637 "09jh3pn4rh7kh7jayanf8jzy6gp03791b5a193w6148cf3i6k9m3"))))
1638 (build-system python-build-system)
1639 (home-page "https://github.com/shmup/miniboa")
1640 (synopsis "Simple, single-threaded Telnet server")
1641 (description
1642 "Miniboa is a simple, asynchronous, single-threaded, poll-based Telnet
1643server.")
1644 (license license:asl2.0)))
1645
1646(define-public python2-miniboa
1647 (package-with-python2 python-miniboa))
1648
1649(define-public python-pafy
1650 (package
1651 (name "python-pafy")
1652 (version "0.5.3.1")
1653 (source
1654 (origin
1655 (method url-fetch)
1656 (uri (pypi-uri "pafy" version))
1657 (sha256
1658 (base32
1659 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
1660 (build-system python-build-system)
1661 (arguments
1662 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
1663 (propagated-inputs
1664 ;; Youtube-dl is a python package which is imported in the file
1665 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1666 `(("youtube-dl" ,youtube-dl)))
1667 (home-page "https://np1.github.io/pafy/")
1668 (synopsis "Retrieve YouTube content and metadata")
1669 (description
1670 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1671 (license license:lgpl3+)))
1672
1673(define-public python2-funcsigs
1674 (package
1675 (name "python2-funcsigs")
1676 (version "1.0.2")
1677 (source (origin
1678 (method url-fetch)
1679 (uri (pypi-uri "funcsigs" version))
1680 (sha256
1681 (base32
1682 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
1683 (build-system python-build-system)
1684 (arguments
1685 `(#:python ,python-2))
1686 (native-inputs
1687 `(("python2-unittest2" ,python2-unittest2)))
1688 (home-page "http://funcsigs.readthedocs.org")
1689 (synopsis "Python function signatures from PEP362")
1690 (description
1691 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
1692 (license license:asl2.0)))
1693
1694(define-public python2-funcsigs-bootstrap
1695 (package
1696 (inherit python2-funcsigs)
1697 (name "python2-funcsigs-bootstrap")
1698 (native-inputs `())
1699 (arguments
1700 `(#:tests? #f
1701 ,@(package-arguments python2-funcsigs)))))
1702
1703(define-public python-py
1704 (package
1705 (name "python-py")
23d5d859 1706 (version "1.8.1")
44d10b1f
RW
1707 (source
1708 (origin
1709 (method url-fetch)
1710 (uri (pypi-uri "py" version))
1711 (sha256
1712 (base32
23d5d859 1713 "1ajjazg3913n0sp3vjyva9c2qh5anx8ziryng935f89604a0h9sy"))))
44d10b1f
RW
1714 (build-system python-build-system)
1715 (arguments
1716 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1717 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1718 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1719 ;; Is this module globally installed?"
1720 '(#:tests? #f))
1721 (native-inputs
1722 `(("python-setuptools-scm" ,python-setuptools-scm)))
1723 (home-page "https://github.com/pytest-dev/py")
1724 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1725 (description
1726 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1727code introspection, and logging.")
1728 (license license:expat)))
1729
1730(define-public python2-py
1731 (package-with-python2 python-py))
1732
1733;; Recent versions of python-fixtures and python-testrepository need
1734;; python-pbr for packaging, which itself needs these two packages for
1735;; testing.
1736;; To fix this circular dependency, we use a build of python-pbr, based on the
1737;; same source, just without any test dependencies and with tests disabled.
1738;; python-pbr-minmal is then used to package python-fixtures and
1739;; python-testrepository.
1740;; Strictly speaking we currently could remove the test-requirements from the
1741;; normal python-pbr package (and save this package) since test are disabled
1742;; there anyway. But this may change in future.
1743(define-public python-pbr-minimal
1744 (package
1745 (name "python-pbr-minimal")
1746 (version "3.0.1")
1747 (source
1748 (origin
1749 (method url-fetch)
1750 (uri (pypi-uri "pbr" version))
1751 (sha256
1752 (base32
1753 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
1754 (build-system python-build-system)
1755 (arguments
1756 `(#:tests? #f))
1757 (home-page "http://docs.openstack.org/developer/pbr/")
1758 (synopsis "Minimal build of python-pbr used for bootstrapping")
1759 (description
1760 "Used only for bootstrapping python2-pbr, you should not need this.")
1761 (license license:asl2.0)))
1762
1763(define-public python2-pbr-minimal
1764 (package-with-python2 python-pbr-minimal))
1765
1766(define-public python-pbr
1767 (package
1768 (inherit python-pbr-minimal)
1769 (name "python-pbr")
1770 (arguments
1771 `(#:tests? #f)) ;; Most tests seem to use the Internet.
1772 (propagated-inputs
1773 `(("git" ,git))) ;; pbr actually uses the "git" binary.
1774 (native-inputs
1775 `(("python-fixtures" ,python-fixtures-bootstrap)
1776 ;; discover, coverage, hacking, subunit
1777 ("python-mock" ,python-mock)
1778 ("python-six" ,python-six)
1779 ("python-sphinx" ,python-sphinx)
1780 ("python-testrepository" ,python-testrepository-bootstrap)
1781 ("python-testresources" ,python-testresources-bootstrap)
1782 ("python-testscenarios" ,python-testscenarios-bootstrap)
1783 ("python-testtools" ,python-testtools-bootstrap)
1784 ("python-virtualenv" ,python-virtualenv)))
1785 (synopsis "Enhance the default behavior of Python’s setuptools")
1786 (description
1787 "Python Build Reasonableness (PBR) is a library that injects some useful
1788and sensible default behaviors into your setuptools run. It will set
1789versions, process requirements files and generate AUTHORS and ChangeLog file
1790from git information.
1791")))
1792
1793(define-public python2-pbr
1794 (package-with-python2 python-pbr))
1795
ea43f0d5
MB
1796(define-public python-pyrsistent
1797 (package
1798 (name "python-pyrsistent")
1799 (version "0.14.11")
1800 (home-page "https://github.com/tobgu/pyrsistent")
1801 (source (origin
1802 (method url-fetch)
1803 (uri (pypi-uri "pyrsistent" version))
1804 (sha256
1805 (base32
1806 "1qkh74bm296mp5g3r11lgsksr6bh4w1bf8pji4nmxdlfj542ga1w"))))
1807 (build-system python-build-system)
1808 (native-inputs
1809 `(("python-hypothesis" ,python-hypothesis)
1810 ("python-pytest" ,python-pytest)
1811 ("python-pytest-runner" ,python-pytest-runner)))
1812 (propagated-inputs
1813 `(("python-six" ,python-six)))
1814 (synopsis "Persistent data structures for Python")
1815 (description
1816 "Pyrsistent is a number of persistent collections (by some referred to as
1817functional data structures). Persistent in the sense that they are immutable.
1818
1819All methods on a data structure that would normally mutate it instead return a
1820new copy of the structure containing the requested updates. The original
1821structure is left untouched.")
1822 (license license:expat)))
1823
1824(define-public python2-pyrsistent
1825 (package-with-python2 python-pyrsistent))
1826
44d10b1f
RW
1827(define-public python-exif-read
1828 (package
1829 (name "python-exif-read")
1830 (version "2.1.2")
1831 (source (origin
1832 (method url-fetch)
1833 (uri (pypi-uri "ExifRead" version))
1834 (sha256
1835 (base32
1836 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
1837 (build-system python-build-system)
1838 (arguments `(#:tests? #f)) ; no tests
1839 (home-page "https://github.com/ianare/exif-py")
1840 (synopsis "Python library to extract EXIF data from image files")
1841 (description
1842 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
1843files.")
1844 (license license:bsd-3)))
1845
1846(define-public python2-exif-read
1847 (package-with-python2 python-exif-read))
1848
1849(define-public python-pyld
1850 (package
1851 (name "python-pyld")
6d4ed78d 1852 (version "1.0.5")
44d10b1f
RW
1853 (source (origin
1854 (method url-fetch)
1855 (uri (pypi-uri "PyLD" version))
1856 (sha256
1857 (base32
6d4ed78d 1858 "1ywbdbsrkg533qh8xn9ifjh2mvam6v5msrjyqq73jfpvcp89qvff"))))
44d10b1f
RW
1859 (build-system python-build-system)
1860 (home-page "https://github.com/digitalbazaar/pyld")
1861 (synopsis "Python implementation of the JSON-LD specification")
1862 (description
1863 "PyLD is an implementation of the JSON-LD specification.")
1864 (license license:bsd-3)))
1865
1866(define-public python2-pyld
1867 (package-with-python2 python-pyld))
1868
1869(define-public python-click
1870 (package
1871 (name "python-click")
61984855 1872 (version "7.0")
44d10b1f
RW
1873 (source
1874 (origin
1875 (method url-fetch)
1876 (uri (pypi-uri "click" version))
1877 (sha256
1878 (base32
61984855 1879 "1mzjixd4vjbjvzb6vylki9w1556a9qmdh35kzmq6cign46av952v"))))
44d10b1f
RW
1880 (build-system python-build-system)
1881 (arguments
8d7e7ca6 1882 `(#:phases
44d10b1f
RW
1883 (modify-phases %standard-phases
1884 (add-after 'unpack 'fix-paths
1885 (lambda* (#:key inputs #:allow-other-keys)
1886 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
1887 "cross-libc" "libc"))))
1888 (substitute* "click/_unicodefun.py"
1889 (("'locale'")
1890 (string-append "'" glibc "/bin/locale'"))))
8d7e7ca6
EF
1891 #t))
1892 (replace 'check
1893 (lambda _
1894 (invoke "python" "-m" "pytest"))))))
44d10b1f
RW
1895 (native-inputs
1896 `(("python-pytest" ,python-pytest)))
61984855 1897 (home-page "https://palletsprojects.com/p/click/")
44d10b1f
RW
1898 (synopsis "Command line library for Python")
1899 (description
1900 "Click is a Python package for creating command line interfaces in a
1901composable way with as little code as necessary. Its name stands for
1902\"Command Line Interface Creation Kit\". It's highly configurable but comes
1903with sensible defaults out of the box.")
1904 (license license:bsd-3)))
1905
1906(define-public python2-click
1907 (package-with-python2 python-click))
1908
1909(define-public python-wheel
1910 (package
1911 (name "python-wheel")
8f137daf 1912 (version "0.33.6")
44d10b1f
RW
1913 (source
1914 (origin
1915 (method url-fetch)
1916 (uri (pypi-uri "wheel" version))
1917 (sha256
1918 (base32
8f137daf 1919 "0ii6f34rvpjg3nmw4bc2h7fhdsy38y1h93hghncfs5akfrldmj8h"))))
44d10b1f 1920 (build-system python-build-system)
8f137daf
MB
1921 (arguments
1922 ;; FIXME: The test suite runs "python setup.py bdist_wheel", which in turn
1923 ;; fails to find the newly-built bdist_wheel library, even though it is
1924 ;; available on PYTHONPATH. What search path is consulted by setup.py?
1925 '(#:tests? #f))
44d10b1f
RW
1926 (home-page "https://bitbucket.org/pypa/wheel/")
1927 (synopsis "Format for built Python packages")
1928 (description
1929 "A wheel is a ZIP-format archive with a specially formatted filename and
1930the @code{.whl} extension. It is designed to contain all the files for a PEP
1931376 compatible install in a way that is very close to the on-disk format. Many
1932packages will be properly installed with only the @code{Unpack} step and the
1933unpacked archive preserves enough information to @code{Spread} (copy data and
1934scripts to their final locations) at any later time. Wheel files can be
1935installed with a newer @code{pip} or with wheel's own command line utility.")
8f137daf 1936 (license license:expat)))
44d10b1f
RW
1937
1938(define-public python2-wheel
8f137daf 1939 (package-with-python2 python-wheel))
44d10b1f
RW
1940
1941(define-public python-vcversioner
1942 (package
1943 (name "python-vcversioner")
1944 (version "2.16.0.0")
1945 (source
1946 (origin
1947 (method url-fetch)
1948 (uri (pypi-uri "vcversioner" version))
1949 (sha256
1950 (base32
1951 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
1952 (build-system python-build-system)
1953 (synopsis "Python library for version number discovery")
1954 (description "Vcversioner is a Python library that inspects tagging
1955information in a variety of version control systems in order to discover
1956version numbers.")
1957 (home-page "https://github.com/habnabit/vcversioner")
1958 (license license:isc)))
1959
1960(define-public python2-vcversioner
1961 (package-with-python2 python-vcversioner))
1962
5591fc4f
MC
1963(define-public python-jdcal
1964 (package
1965 (name "python-jdcal")
1966 (version "1.4")
1967 (source
1968 (origin
1969 (method url-fetch)
1970 (uri (pypi-uri "jdcal" version))
1971 (sha256
1972 (base32
1973 "1ja6j2xq97bsl6rv09mhdx7n0xnrsfx0mj5xqza0mxghqmkm02pa"))))
1974 (build-system python-build-system)
1975 (arguments
1976 `(#:phases (modify-phases %standard-phases
1977 (replace 'check
1978 (lambda _
1979 (invoke "pytest"))))))
1980 (native-inputs
1981 `(("python-pytest" ,python-pytest)))
1982 (home-page "https://github.com/phn/jdcal")
1983 (synopsis "Functions to convert between Julian dates Gregorian dates")
1984 (description "This Python library provides functions for converting
1985between Julian dates and Gregorian dates.")
1986 (license license:bsd-2)))
1987
1988(define-public python2-jdcal
1989 (package-with-python2 python-jdcal))
1990
44d10b1f
RW
1991(define-public python-jsonschema
1992 (package
1993 (name "python-jsonschema")
1adde06e 1994 (version "3.0.1")
44d10b1f
RW
1995 (source (origin
1996 (method url-fetch)
786ccb87 1997 (uri (pypi-uri "jsonschema" version))
44d10b1f
RW
1998 (sha256
1999 (base32
1adde06e 2000 "03g20i1xfg4qdlk4475pl4pp7y0h37g1fbgs5qhy678q9xb822hc"))))
44d10b1f
RW
2001 (build-system python-build-system)
2002 (arguments
2003 '(#:phases
2004 (modify-phases %standard-phases
1adde06e
MB
2005 (replace 'check
2006 (lambda _
2007 (setenv "PYTHONPATH" (string-append ".:" (getenv "PYTHONPATH")))
2008 (invoke "trial" "jsonschema"))))))
44d10b1f 2009 (native-inputs
1adde06e
MB
2010 `(("python-setuptools_scm" ,python-setuptools-scm)
2011 ("python-twisted" ,python-twisted)))
2012 (propagated-inputs
2013 `(("python-attrs" ,python-attrs)
2014 ("python-pyrsistent" ,python-pyrsistent)
2015 ("python-six" ,python-six)))
44d10b1f
RW
2016 (home-page "https://github.com/Julian/jsonschema")
2017 (synopsis "Implementation of JSON Schema for Python")
2018 (description
2019 "Jsonschema is an implementation of JSON Schema for Python.")
2020 (license license:expat)
2021 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2022
2023(define-public python2-jsonschema
2024 (let ((jsonschema (package-with-python2
2025 (strip-python2-variant python-jsonschema))))
2026 (package (inherit jsonschema)
44d10b1f 2027 (propagated-inputs
1adde06e
MB
2028 `(("python2-functools32" ,python2-functools32)
2029 ,@(package-propagated-inputs jsonschema))))))
44d10b1f 2030
914bba28
TGR
2031;; This old version is still required by docker-compose as of 1.24.0.
2032(define-public python-jsonschema-2.6
2033 (package
2034 (name "python-jsonschema")
2035 (version "2.6.0")
2036 (source (origin
2037 (method url-fetch)
2038 (uri (pypi-uri "jsonschema" version))
2039 (sha256
2040 (base32
2041 "00kf3zmpp9ya4sydffpifn0j0mzm342a2vzh82p6r0vh10cg7xbg"))))
2042 (build-system python-build-system)
2043 (arguments
2044 '(#:phases
2045 (modify-phases %standard-phases
2046 (replace 'check (lambda _ (invoke "nosetests"))))))
2047 (native-inputs
2048 `(("python-nose" ,python-nose)
2049 ("python-vcversioner" ,python-vcversioner)))
2050 (home-page "https://github.com/Julian/jsonschema")
2051 (synopsis "Implementation of JSON Schema for Python")
2052 (description
2053 "Jsonschema is an implementation of JSON Schema for Python.")
2054 (license license:expat)
2055 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2056
44d10b1f
RW
2057(define-public python-schema
2058 (package
2059 (name "python-schema")
2060 (version "0.6.6")
2061 (source
2062 (origin
2063 (method url-fetch)
2064 (uri (pypi-uri "schema" version))
2065 (sha256
2066 (base32
2067 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
2068 (build-system python-build-system)
2069 (native-inputs
2070 `(("python-pytest" ,python-pytest)))
2071 (home-page "https://github.com/keleshev/schema")
2072 (synopsis "Simple data validation library")
2073 (description
2074 "@code{python-schema} is a library for validating Python data
2075structures, such as those obtained from config-files, forms, external
2076services or command-line parsing, converted from JSON/YAML (or
2077something else) to Python data-types.")
2078 (license license:psfl)))
2079
2080(define-public python2-schema
2081 (package-with-python2 python-schema))
2082
2083(define-public python-schema-0.5
2084 (package (inherit python-schema)
2085 (version "0.5.0")
2086 (source
2087 (origin
2088 (method url-fetch)
2089 (uri (pypi-uri "schema" version))
2090 (sha256
2091 (base32
2092 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
2093
2094(define-public python2-schema-0.5
2095 (package-with-python2 python-schema-0.5))
2096
2097(define-public python-kitchen
2098 (package
2099 (name "python-kitchen")
2100 (version "1.2.5")
2101 (source
2102 (origin
2103 (method url-fetch)
2104 (uri (pypi-uri "kitchen" version))
2105 (sha256
2106 (base32
2107 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
2108 (build-system python-build-system)
2109 (propagated-inputs
2110 `(("python-chardet" ,python-chardet)))
2111 (home-page "https://github.com/fedora-infra/kitchen")
2112 (synopsis "Python API for snippets")
2113 (description "@code{kitchen} module provides a python API for all sorts of
2114little useful snippets of code that everybody ends up writing for their projects
2115but never seem big enough to build an independent release. Use kitchen and stop
2116cutting and pasting that code over and over.")
2117 (license (list license:lgpl2.1+
2118 ;; subprocess.py, test_subprocess.py,
2119 ;; kitchen/pycompat25/defaultdict.py:
2120 license:psfl))))
2121
2122(define-public python2-kitchen
2123 (package-with-python2 python-kitchen))
2124
2125(define-public python-unidecode
2126 (package
2127 (name "python-unidecode")
eb80a300 2128 (version "1.1.1")
44d10b1f
RW
2129 (source (origin
2130 (method url-fetch)
2131 (uri (pypi-uri "Unidecode" version))
2132 (sha256
2133 (base32
eb80a300 2134 "1s6cp2lv4m0f00hjckjz8p6m7d3n3v16jvg353llf5ia1iqsnsib"))))
44d10b1f
RW
2135 (build-system python-build-system)
2136 (home-page "https://pypi.python.org/pypi/Unidecode")
2137 (synopsis "ASCII transliterations of Unicode text")
2138 (description
2139 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2140useful when integrating with legacy code that doesn't support Unicode, or for
2141ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2142machine identifiers from human-readable Unicode strings that should still be
2143somewhat intelligible.")
2144 (license license:gpl2+)))
2145
2146(define-public python2-unidecode
2147 (package-with-python2 python-unidecode))
2148
2149(define-public python-pyjwt
2150 (package
2151 (name "python-pyjwt")
be6f2f56 2152 (version "1.7.1")
44d10b1f
RW
2153 (source
2154 (origin
2155 (method url-fetch)
2156 (uri (pypi-uri "PyJWT" version))
2157 (sha256
2158 (base32
be6f2f56 2159 "15hflax5qkw1v6nssk1r0wkj83jgghskcmn875m3wgvpzdvajncd"))
44d10b1f
RW
2160 (modules '((guix build utils)))
2161 (snippet
2162 '(begin
2163 (for-each delete-file-recursively
2164 (find-files "." "\\.pyc$"))
2165 #t))))
2166 (build-system python-build-system)
2167 (native-inputs
2168 `(("python-pytest" ,python-pytest)
2169 ("python-pytest-cov" ,python-pytest-cov)
2170 ("python-pytest-runner" ,python-pytest-runner)))
2171 (home-page "https://github.com/progrium/pyjwt")
2172 (synopsis "JSON Web Token implementation in Python")
2173 (description
2174 "PyJWT is a JSON Web Token implementation written in Python.")
2175 (license license:expat)))
2176
2177(define-public python2-pyjwt
2178 (package-with-python2 python-pyjwt))
2179
2180(define-public python-pykka
2181 (package
2182 (name "python-pykka")
2183 (version "1.2.1")
2184 (source
2185 (origin
2186 (method url-fetch)
2187 (uri (pypi-uri "Pykka" version))
2188 (sha256
2189 (base32
2190 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
2191 (build-system python-build-system)
2192 (native-inputs
2193 `(("python-mock" ,python-mock)
2194 ("python-nose" ,python-nose)
2195 ("python-gevent" ,python-gevent)
2196 ("python-eventlet" ,python-eventlet)))
2197 (home-page "https://www.pykka.org/")
2198 (synopsis "Pykka is a Python implementation of the actor model")
2199 (description
2200 "Pykka is a Python implementation of the actor model.
2201The actor model introduces some simple rules to control the sharing
2202of state and cooperation between execution units, which makes it
2203easier to build concurrent applications.")
2204 (license license:asl2.0)))
2205
2206(define-public python2-pykka
2207 (package-with-python2 python-pykka))
2208
8d22f7e3
VC
2209(define-public python-pymsgbox
2210 (package
2211 (name "python-pymsgbox")
2212 (version "1.0.6")
2213 (source
2214 (origin
2215 (method git-fetch)
2216 (uri (git-reference
2217 ;; LICENSE.txt is not present on pypi
2218 (url "https://github.com/asweigart/PyMsgBox")
2219 (commit "55926b55f46caa969c5ddb87990ebea2737bd66f")))
2220 (file-name (git-file-name name version))
2221 (sha256
2222 (base32
2223 "0zy7rjfpwlrd8b64j7jk2lb8m2npc21rnpwakpfvwgl4nxdy80rg"))))
2224 (arguments
2225 ;; Circular dependency to run tests:
2226 ;; Tests need pyautogui, which depends on pymsgbox.
2227 '(#:tests? #f))
2228 (build-system python-build-system)
2229 (home-page "https://github.com/asweigart/PyMsgBox")
2230 (synopsis "Python module for JavaScript-like message boxes")
2231 (description
2232 "PyMsgBox is a simple, cross-platform, pure Python module for
2233JavaScript-like message boxes. Types of dialog boxes include:
2234@enumerate
2235@item alert
2236@item confirm
2237@item prompt
2238@item password
2239@end enumerate
2240")
2241 (license license:bsd-3)))
2242
44d10b1f
RW
2243(define-public python-pympler
2244 (package
2245 (name "python-pympler")
2246 (home-page "https://pythonhosted.org/Pympler/")
c498a07e 2247 (version "0.7")
44d10b1f
RW
2248 (source (origin
2249 (method url-fetch)
2250 (uri (pypi-uri "Pympler" version))
2251 (sha256
2252 (base32
c498a07e 2253 "0ki7bqp1h9l1xc2k1h4vjyzsgs20i8ingvcdhszyi72s28wyf4bs"))))
44d10b1f
RW
2254 (build-system python-build-system)
2255 (arguments
2256 `(#:phases (modify-phases %standard-phases
2257 (delete 'check)
2258 (add-after 'install 'check
2259 (lambda* (#:key inputs outputs #:allow-other-keys)
2260 (add-installed-pythonpath inputs outputs)
2261 (invoke "python" "setup.py" "test"))))))
2262 (synopsis "Measure, monitor and analyze memory behavior")
2263 (description
2264 "Pympler is a development tool to measure, monitor and analyze
2265the memory behavior of Python objects in a running Python application.
2266
2267By pympling a Python application, detailed insight in the size and the
2268lifetime of Python objects can be obtained. Undesirable or unexpected
2269runtime behavior like memory bloat and other @samp{pymples} can easily
2270be identified.
2271
2272A web profiling frontend exposes process statistics, garbage
2273visualisation and class tracker statistics.")
2274 (license license:asl2.0)))
2275
2276(define-public python2-pympler
2277 (package-with-python2 python-pympler))
2278
2279(define-public python-itsdangerous
2280 (package
2281 (name "python-itsdangerous")
acfcf2ed 2282 (version "1.1.0")
44d10b1f
RW
2283 (source
2284 (origin
2285 (method url-fetch)
acfcf2ed 2286 (uri (pypi-uri "itsdangerous" version))
44d10b1f
RW
2287 (sha256
2288 (base32
acfcf2ed 2289 "068zpbksq5q2z4dckh2k1zbcq43ay74ylqn77rni797j0wyh66rj"))))
44d10b1f 2290 (build-system python-build-system)
acfcf2ed 2291 (home-page "https://palletsprojects.com/p/itsdangerous/")
44d10b1f
RW
2292 (synopsis "Python library for passing data to/from untrusted environments")
2293 (description
2294 "Itsdangerous provides various helpers to pass trusted data to untrusted
2295environments and back.")
2296 (license license:bsd-3)))
2297
2298(define-public python2-itsdangerous
2299 (package-with-python2 python-itsdangerous))
2300
2301(define-public python-pyyaml
2302 (package
2303 (name "python-pyyaml")
2304 (version "3.13")
2305 (source
2306 (origin
2307 (method url-fetch)
2308 (uri (pypi-uri "PyYAML" version))
2309 (sha256
2310 (base32
2311 "1gx603g484z46cb74j9rzr6sjlh2vndxayicvlyhxdz98lhhkwry"))))
2312 (build-system python-build-system)
2313 (inputs
2314 `(("libyaml" ,libyaml)))
2315 (home-page "http://pyyaml.org/wiki/PyYAML")
2316 (synopsis "YAML parser and emitter for Python")
2317 (description
2318 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2319complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2320API, and sensible error messages. PyYAML supports standard YAML tags and
2321provides Python-specific tags that allow to represent an arbitrary Python
2322object.")
2323 (license license:expat)))
2324
2325(define-public python2-pyyaml
2326 (package-with-python2 python-pyyaml))
2327
2328(define-public python-vine
2329 (package
2330 (name "python-vine")
2331 (version "1.1.4")
2332 (source
2333 (origin
2334 (method url-fetch)
2335 (uri (pypi-uri "vine" version))
2336 (sha256
2337 (base32
2338 "0wkskb2hb494v9gixqnf4bl972p4ibcmxdykzpwjlfa5picns4aj"))))
2339 (build-system python-build-system)
2340 (native-inputs
2341 `(("python-pytest" ,python-pytest)
2342 ("python-case" ,python-case)))
2343 (home-page "https://github.com/celery/vine")
2344 (synopsis "Promises for Python")
2345 (description
2346 "@code{vine} provides a special implementation of promises in that it can
2347be used both for \"promise of a value\" and lazy evaluation. The biggest
2348upside for this is that everything in a promise can also be a promise,
2349e.g. filters, callbacks and errbacks can all be promises.")
2350 (license license:bsd-3)))
2351
2352(define-public python-virtualenv
2353 (package
2354 (name "python-virtualenv")
2782bd51 2355 (version "16.1.0")
44d10b1f
RW
2356 (source
2357 (origin
2358 (method url-fetch)
2359 (uri (pypi-uri "virtualenv" version))
2360 (sha256
2361 (base32
2782bd51 2362 "0242cg3hdq3qdvx5flyrki8lpwlgwf5k45c21ks5049fv7ygm6gq"))))
44d10b1f
RW
2363 (build-system python-build-system)
2364 (arguments
2365 `(#:phases
2366 (modify-phases %standard-phases
2782bd51 2367 (add-before 'check 'disable-failing-test
44d10b1f
RW
2368 (lambda _
2369 ;; Disable failing test. See upstream bug report
2370 ;; https://github.com/pypa/virtualenv/issues/957
2371 (substitute* "tests/test_virtualenv.py"
2372 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2782bd51 2373 #t)))))
44d10b1f
RW
2374 (native-inputs
2375 `(("python-mock" ,python-mock)
2376 ("python-pytest" ,python-pytest)))
2377 (home-page "https://virtualenv.pypa.io/")
2378 (synopsis "Virtual Python environment builder")
2379 (description
2380 "Virtualenv is a tool to create isolated Python environments.")
2381 (license license:expat)))
2382
2383(define-public python2-virtualenv
2384 (package-with-python2 python-virtualenv))
2385
2386(define-public python-markupsafe
2387 (package
2388 (name "python-markupsafe")
753eb411 2389 (version "1.1.1")
44d10b1f
RW
2390 (source
2391 (origin
2392 (method url-fetch)
5182927c 2393 (uri (pypi-uri "MarkupSafe" version))
44d10b1f
RW
2394 (sha256
2395 (base32
753eb411 2396 "0sqipg4fk7xbixqd8kq6rlkxj664d157bdwbh93farcphf92x1r9"))))
44d10b1f 2397 (build-system python-build-system)
753eb411
MB
2398 (arguments
2399 `(#:modules ((ice-9 ftw)
2400 (srfi srfi-1)
2401 (srfi srfi-26)
2402 (guix build utils)
2403 (guix build python-build-system))
2404 #:phases (modify-phases %standard-phases
2405 (replace 'check
2406 (lambda _
2407 (let ((cwd (getcwd))
2408 (libdir (find (cut string-prefix? "lib." <>)
2409 (scandir "build"))))
2410 (setenv "PYTHONPATH"
2411 (string-append cwd "/build/" libdir ":"
2412 (getenv "PYTHONPATH")))
2413 (invoke "pytest" "-vv")))))))
2414 (native-inputs
2415 `(("python-pytest" ,python-pytest)))
44d10b1f
RW
2416 (home-page "https://github.com/mitsuhiko/markupsafe")
2417 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2418 (description
2419 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2420for Python.")
2421 (license license:bsd-3)))
2422
2423(define-public python2-markupsafe
2424 (package-with-python2 python-markupsafe))
2425
2426(define-public python-jinja2
2427 (package
2428 (name "python-jinja2")
4a5c7934 2429 (version "2.10.1")
44d10b1f
RW
2430 (source
2431 (origin
2432 (method url-fetch)
2433 (uri (pypi-uri "Jinja2" version))
2434 (sha256
2435 (base32
4a5c7934 2436 "04shqrs56aj04ipyqykj512rw2l0zfammvj9krawzxz7xc14yp06"))))
44d10b1f
RW
2437 (build-system python-build-system)
2438 (propagated-inputs
2439 `(("python-markupsafe" ,python-markupsafe)))
2440 (home-page "http://jinja.pocoo.org/")
2441 (synopsis "Python template engine")
2442 (description
2443 "Jinja2 is a small but fast and easy to use stand-alone template engine
2444written in pure Python.")
2445 (license license:bsd-3)))
2446
2447(define-public python2-jinja2
2448 (package-with-python2 python-jinja2))
2449
ba42a6bf
TLC
2450(define-public python-jinja2-time
2451 (package
2452 (name "python-jinja2-time")
2453 (version "0.2.0")
2454 (source
2455 (origin
2456 (method url-fetch)
2457 (uri (pypi-uri "jinja2-time" version))
2458 (sha256
2459 (base32
2460 "0h0dr7cfpjnjj8bgl2vk9063a53649pn37wnlkd8hxjy656slkni"))))
2461 (build-system python-build-system)
2462 (propagated-inputs
2463 `(("python-arrow" ,python-arrow)
2464 ("python-jinja2" ,python-jinja2)))
2465 (home-page
2466 "https://github.com/hackebrot/jinja2-time")
2467 (synopsis "Jinja2 Extension for Dates and Times")
2468 (description
2469 "This package provides an extension for the template engine Jinja2. It
2470adds a 'now' tag providing a convenient access to the arrow.now() API from
2471templates. A format string can be provided to control the output.")
2472 (license license:expat)))
2473
44d10b1f
RW
2474(define-public python-pystache
2475 (package
2476 (name "python-pystache")
2477 (version "0.5.4")
2478 (source (origin
2479 (method url-fetch)
2480 (uri (pypi-uri "pystache" version))
2481 (sha256
2482 (base32
2483 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2484 (build-system python-build-system)
2485 (arguments
2486 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
2487 (home-page "http://defunkt.io/pystache/")
2488 (synopsis "Python logic-less template engine")
2489 (description
2490 "Pystache is a Python implementation of the framework agnostic,
2491logic-free templating system Mustache.")
2492 (license license:expat)
2493 (properties `((python2-variant . ,(delay python2-pystache))))))
2494
2495(define-public python2-pystache
2496 (package (inherit (package-with-python2
2497 (strip-python2-variant python-pystache)))
2498 (arguments
2499 `(#:python ,python-2
2500 #:phases
2501 (modify-phases %standard-phases
2502 (replace 'check
2503 (lambda _
dfafc29b 2504 (invoke "python" "test_pystache.py"))))))))
44d10b1f
RW
2505
2506(define-public python-joblib
2507 (package
2508 (name "python-joblib")
2509 (version "0.13.0")
2510 (source (origin
2511 (method url-fetch)
2512 (uri (pypi-uri "joblib" version))
2513 (sha256
2514 (base32
2515 "0612nazad8dxmn3xghfrmjax6456l4xy6hn9cngs7vydi14ds7v5"))))
2516 (build-system python-build-system)
2517 (arguments
2518 `(#:phases
2519 (modify-phases %standard-phases
2520 (replace 'check
2521 (lambda _ (invoke "pytest" "-v" "joblib"))))))
2522 (native-inputs
2523 `(("python-pytest" ,python-pytest)))
2524 (home-page "https://joblib.readthedocs.io/")
2525 (synopsis "Using Python functions as pipeline jobs")
2526 (description
2527 "Joblib is a set of tools to provide lightweight pipelining in Python.
2528In particular, joblib offers: transparent disk-caching of the output values
2529and lazy re-evaluation (memoize pattern), easy simple parallel computing
2530logging and tracing of the execution.")
2531 (license license:bsd-3)))
2532
2533(define-public python2-joblib
2534 (package-with-python2 python-joblib))
2535
a3363341
VC
2536(define-public python-daemon
2537 (package
2538 (name "python-daemon")
2539 (version "2.2.3")
2540 (source
2541 (origin
2542 (method url-fetch)
2543 (uri (pypi-uri "python-daemon" version))
2544 (sha256
2545 (base32
2546 "09fcjdjzk9ywmpnrj62iyxqgcygzdafsz41qlrk2dknzbagcmzmg"))))
2547 (build-system python-build-system)
2548 (arguments
2549 `(#:phases
2550 (modify-phases %standard-phases
2551 (add-before 'check 'disable-tests
2552 (lambda _
2553 ;; FIXME: Determine why test fails
2554 (substitute* "test/test_daemon.py"
2555 (("test_detaches_process_context")
2556 "skip_test_detaches_process_context"))
2557 #t)))))
2558 (propagated-inputs
2559 `(("python-lockfile" ,python-lockfile)))
2560 (native-inputs
2561 `(("python-unittest2" ,python-unittest2)
2562 ("python-testtools" ,python-testtools)
2563 ("python-testscenarios" ,python-testscenarios)
2564 ("python-mock" ,python-mock)
2565 ("python-docutils" ,python-docutils)))
2566 (home-page "https://pagure.io/python-daemon/")
2567 (synopsis "Python library for making a Unix daemon process")
2568 (description "Python-daemon is a library that assists a Python program to
2569turn itself into a well-behaved Unix daemon process, as specified in PEP 3143.
2570
2571This library provides a @code{DaemonContext} class that manages the following
2572important tasks for becoming a daemon process:
2573@enumerate
2574@item Detach the process into its own process group.
2575@item Set process environment appropriate for running inside a chroot.
2576@item Renounce suid and sgid privileges.
2577@item Close all open file descriptors.
2578@item Change the working directory, uid, gid, and umask.
2579@item Set appropriate signal handlers.
2580@item Open new file descriptors for stdin, stdout, and stderr.
2581@item Manage a specified PID lock file.
2582@item Register cleanup functions for at-exit processing.
2583@end enumerate")
2584 ;; Only setup.py is gpl3+, everything else is apache 2.0 licensed.
2585 (license (list license:asl2.0 license:gpl3+))))
2586
544ea9c2
MB
2587(define-public python-anytree
2588 (package
2589 (name "python-anytree")
2590 (version "2.8.0")
2591 (source (origin
2592 (method url-fetch)
2593 (uri (pypi-uri "anytree" version))
2594 (sha256
2595 (base32
2596 "1aycpc387wqz7h9w2p53qxn43qsh3m6by6ak4kkc66x9aprr63rz"))))
2597 (build-system python-build-system)
2598 (propagated-inputs
2599 `(("python-six" ,python-six)))
2600 (native-inputs
2601 `(;; For tests.
2602 ("graphviz" ,graphviz) ;for 'dot'
2603 ("python-nose" ,python-nose)))
2604 (home-page "https://github.com/c0fec0de/anytree")
2605 (synopsis "Lightweight tree data library")
2606 (description
2607 "@code{anytree} is a simple, lightweight, and extensible tree data
2608structure for Python.")
2609 (license license:asl2.0)))
2610
44d10b1f
RW
2611(define-public python-docutils
2612 (package
2613 (name "python-docutils")
2614 (version "0.14")
2615 (source
2616 (origin
2617 (method url-fetch)
2618 (uri (pypi-uri "docutils" version))
2619 (sha256
2620 (base32
2621 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))
2622 (build-system python-build-system)
2623 (arguments
2624 '(#:tests? #f)) ; no setup.py test command
2625 (home-page "http://docutils.sourceforge.net/")
2626 (synopsis "Python Documentation Utilities")
2627 (description
2628 "Docutils is a modular system for processing documentation into useful
2629formats, such as HTML, XML, and LaTeX. For input Docutils supports
2630reStructuredText.")
2631 ;; Most of the source code is public domain, but some source files are
2632 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
2633 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
2634
2635(define-public python2-docutils
2636 (package-with-python2 python-docutils))
2637
2638(define-public python-pygments
2639 (package
2640 (name "python-pygments")
2daded5a 2641 (version "2.5.2")
44d10b1f
RW
2642 (source
2643 (origin
2644 (method url-fetch)
2645 (uri (pypi-uri "Pygments" version))
2646 (sha256
2647 (base32
2daded5a 2648 "1zmhnswy0wxfn0xprs9aqsvx2c3kmzfn2wx14q8cv3vpkxdamj4q"))))
44d10b1f
RW
2649 (build-system python-build-system)
2650 (arguments
2651 ;; FIXME: Tests require sphinx, which depends on this.
2652 '(#:tests? #f))
2653 (home-page "http://pygments.org/")
2654 (synopsis "Syntax highlighting")
2655 (description
2656 "Pygments is a syntax highlighting package written in Python.")
2657 (license license:bsd-2)))
2658
2659(define-public python2-pygments
2660 (package-with-python2 python-pygments))
2661
0f0a5ef9
MC
2662(define-public python-bumpversion
2663 (package
2664 (name "python-bumpversion")
2665 (version "0.5.3")
2666 (source
2667 (origin
2668 (method url-fetch)
2669 (uri (pypi-uri "bumpversion" version))
2670 (sha256
2671 (base32
2672 "0zn7694yfipxg35ikkfh7kvgl2fissha3dnqad2c5bvsvmrwhi37"))))
2673 (build-system python-build-system)
2674 (home-page "https://github.com/peritus/bumpversion")
2675 (synopsis "Tool to bump software version")
2676 (description "This tool provides a command-line interface (CLI) to bump a
2677software version simply.")
2678 (license license:expat)))
2679
b24fd2c2
MC
2680(define-public python-deprecated
2681 (package
2682 (name "python-deprecated")
2683 (version "1.2.5")
2684 (source
2685 (origin
2686 (method git-fetch)
2687 (uri (git-reference
2688 (url "https://github.com/tantale/deprecated.git")
2689 (commit (string-append "v" version))))
2690 (file-name (git-file-name name version))
2691 (sha256
2692 (base32
2693 "14909glxxwwc4b9qpz2b9jdriwzi5n65ichw85xqppap5f79wcwz"))))
2694 (build-system python-build-system)
2695 (arguments
2696 `(#:phases (modify-phases %standard-phases
2697 (replace 'check
2698 (lambda _
2699 (invoke "pytest"))))))
2700 (propagated-inputs
2701 `(("python-wrapt" ,python-wrapt)))
2702 (native-inputs
2703 `(("python-bumpversion" ,python-bumpversion)
2704 ("python-pytest" ,python-pytest)
2705 ("python-pytest-cov" ,python-pytest-cov)
2706 ("python-sphinx" ,python-sphinx)
2707 ("python-tox" ,python-tox)))
2708 (home-page "https://github.com/tantale/deprecated")
2709 (synopsis "Python decorator to deprecate classes, functions or methods")
2710 (description "The @code{deprecated} decorator provides a convenient way to deprecate
2711to deprecate classes, functions or methods.")
2712 (license license:expat)))
2713
d5a998fa
MC
2714(define-public python-pygithub
2715 (package
2716 (name "python-pygithub")
749e38d7 2717 (version "1.43.8")
d5a998fa
MC
2718 (source
2719 ;; We fetch from the Git repo because there are no tests in the PyPI
2720 ;; archive.
2721 (origin
2722 (method git-fetch)
2723 (uri (git-reference
2724 (url "https://github.com/PyGithub/PyGithub.git")
2725 (commit (string-append "v" version))))
2726 (file-name (git-file-name name version))
2727 (sha256
749e38d7 2728 (base32 "1625v558xga5mwhl9jqmibywy5qafmg1vqrirqz6zfq1la1d22mw"))))
d5a998fa
MC
2729 (build-system python-build-system)
2730 (arguments
2731 `(#:phases (modify-phases %standard-phases
2732 ;; Some tests rely on the network.
2733 (add-after 'unpack 'disable-failing-tests
2734 (lambda _
2735 (substitute* "tests/Issue142.py"
2736 (("testDecodeJson") "disabled_testDecodeJson"))
2737 #t))
2738 (add-before 'check 'prepare-for-tests
2739 (lambda _
2740 (for-each (lambda (f)
2741 (chmod f #o666))
2742 (find-files "./tests"))
2743 (system* "python" "-m" "lib2to3" "-w" "-n" "tests")
2744 (setenv "PYTHONPATH"
2745 (string-append "./tests:" (getenv "PYTHONPATH")))
2746 #t)))))
2747 (propagated-inputs
2748 `(("python-deprecated" ,python-deprecated)
2749 ("python-pyjwt" ,python-pyjwt)
2750 ("python-requests" ,python-requests)))
2751 (native-inputs `(("python-httpretty" ,python-httpretty)))
2752 (home-page "https://pygithub.readthedocs.io/en/latest/")
2753 (synopsis "Python library for the GitHub API")
2754 (description "This library allows managing GitHub resources such as
2755repositories, user profiles, and organizations in your Python applications,
2756using version 3 of the GitHub application programming interface (API).")
2757 (license license:lgpl3+)))
2758
c0c0bb38
MC
2759(define-public python-rellu
2760 (package
2761 (name "python-rellu")
2762 (version "0.7")
2763 (source
2764 (origin
2765 (method url-fetch)
2766 (uri (pypi-uri "rellu" version))
2767 (sha256
2768 (base32
2769 "1w0arpj1sm7vh29nrbnca4pnp8sx42l07r17inwqcjjf9bhng66x"))))
2770 (build-system python-build-system)
2771 (propagated-inputs
2772 `(("python-invoke" ,python-invoke)
2773 ("python-pygithub" ,python-pygithub)))
2774 (home-page "https://github.com/robotframework/rellu")
2775 (synopsis "Utilities to create PyPI releases")
2776 (description "This collection of utilities contains tooling and templates
2777to assist in creating releases on GitHub and publishing them on PyPI. It is
2778designed to be used by Robot Framework and tools and libraries in its
2779ecosystem, but can naturally be used also by other projects.")
2780 (license license:asl2.0)))
2781
b9790285
MC
2782(define-public python-robotframework
2783 (package
2784 (name "python-robotframework")
1710b8f8 2785 (version "3.1.2")
b9790285
MC
2786 ;; There are no tests in the PyPI archive.
2787 (source
2788 (origin
2789 (method git-fetch)
2790 (uri (git-reference
2791 (url "https://github.com/robotframework/robotframework.git")
2792 (commit (string-append "v" version))))
2793 (file-name (git-file-name name version))
2794 (sha256
1710b8f8 2795 (base32 "16gnxy0qinh8fhs0qvhff5z2xh49c3cqgm0d7bfjw120df6x7fym"))
b9790285
MC
2796 (patches (search-patches
2797 "python-robotframework-honor-source-date-epoch.patch"))))
2798 (build-system python-build-system)
2799 (arguments
2800 `(#:phases (modify-phases %standard-phases
2801 (add-before 'build 'build-and-install-doc
2802 (lambda* (#:key outputs #:allow-other-keys)
2803 (let* ((doc-output (assoc-ref outputs "doc"))
2804 (doc (string-append doc-output "/share/"
2805 ,name "-" ,version "/")))
2806 (invoke "invoke" "library-docs" "all")
2807 (mkdir-p doc)
2808 (copy-recursively "doc/libraries"
2809 (string-append doc "/libraries"))
2810 #t)))
2811 (replace 'check
2812 (lambda _
2813 (invoke "python" "utest/run.py"))))))
2814 (native-inputs
2815 `(("python-invoke" ,python-invoke)
2816 ("python-rellu" ,python-rellu)
2817 ("python:tk" ,python "tk"))) ;used when building the HTML doc
2818 (outputs '("out" "doc"))
2819 (home-page "https://robotframework.org")
2820 (synopsis "Generic automation framework")
2821 (description "Robot Framework is a generic automation framework for
2822acceptance testing, acceptance test driven development (ATDD), and robotic
2823process automation (RPA).")
2824 (license license:asl2.0)))
2825
5b84c120
MC
2826(define-public python-robotframework-lint
2827 ;; There is no properly tagged release; the commit below seems to correspond
2828 ;; to the 0.9 stable release available from PyPI. The tests are not
2829 ;; included in the PyPI archive, so we fetch the sources from the upstream
2830 ;; Git repo.
2831 (let ((commit "e851879bab1f63e4e53b34a4dc8a67ed95102830")
2832 (revision "1"))
2833 (package
2834 (name "python-robotframework-lint")
2835 (version (git-version "0.9.0" revision commit))
2836 (source
2837 (origin
2838 (method git-fetch)
2839 (uri (git-reference
2840 (url "https://github.com/boakley/robotframework-lint.git")
2841 (commit commit)))
2842 (file-name (git-file-name name version))
2843 (sha256
2844 (base32
2845 "1p6fknqg5sb9qz5857ji4a877657vgfjm5v3zn45994parx6ml1m"))))
2846 (build-system python-build-system)
2847 (arguments
2848 `(#:phases
2849 (modify-phases %standard-phases
2850 (replace 'check
2851 (lambda _
2852 (invoke "python" "-m" "robot" "-A"
2853 "tests/conf/default.args" "tests"))))))
2854 (propagated-inputs
2855 `(("python-robotframework" ,python-robotframework)))
2856 (home-page "https://github.com/boakley/robotframework-lint/")
2857 (synopsis "Static analysis tool (linter) for Robot Framework")
2858 (description "This package provides the @code{rflint} command-line
2859utility, a static analysis tool (linter) for Robot Framework source files.")
2860 (license license:asl2.0))))
2861
c0c64f17
MC
2862(define-public python-robotframework-sshlibrary
2863 (package
2864 (name "python-robotframework-sshlibrary")
2865 (version "3.3.0")
2866 ;; There are no tests in the PyPI archive.
2867 (source
2868 (origin
2869 (method git-fetch)
2870 (uri (git-reference
2871 (url "https://github.com/robotframework/SSHLibrary.git")
2872 (commit (string-append "v" version))))
2873 (file-name (git-file-name name version))
2874 (sha256
2875 (base32
2876 "1mk6dz2jqqndbx4yji09012q6rmadnqdywi7czvj62b0s07dr3r2"))))
2877 (build-system python-build-system)
2878 (arguments
2879 `(#:phases
2880 (modify-phases %standard-phases
2881 (add-before 'build 'build-and-install-doc
2882 (lambda* (#:key outputs #:allow-other-keys)
2883 (let* ((doc-output (assoc-ref outputs "doc"))
2884 (doc (string-append doc-output "/share/"
2885 ,name "-" ,version "/")))
2886 (invoke "chmod" "-R" "+w" "docs")
2887 (invoke "invoke" "kw-docs" "project-docs")
2888 (mkdir-p doc)
2889 (for-each delete-file (find-files "docs" "\\.rst"))
2890 (copy-recursively "docs" doc)
2891 #t)))
2892 (replace 'check
2893 (lambda _
2894 ;; Some tests require an SSH server; we remove them.
2895 (delete-file "utest/test_client_api.py")
2896 (delete-file "utest/test_scp.py")
2897 (invoke "python" "utest/run.py"))))))
2898 (propagated-inputs
2899 `(("python-robotframework" ,python-robotframework)
2900 ("python-paramiko" ,python-paramiko)
2901 ("python-scp" ,python-scp)))
2902 (native-inputs
2903 `(("openssh" ,openssh)
2904 ("which" ,which)
2905 ;; To generate the documentation
2906 ("python-docutils" ,python-docutils)
2907 ("python-invoke" ,python-invoke)
2908 ("python-pygments" ,python-pygments)
2909 ("python-rellu" ,python-rellu)))
2910 (outputs '("out" "doc"))
2911 (home-page "https://github.com/robotframework/SSHLibrary")
2912 (synopsis "Robot Framework library for SSH and SFTP")
2913 (description "SSHLibrary is a Robot Framework library providing support
2914for SSH and SFTP. It has the following main usages:
2915@itemize @bullet
2916@item Executing commands on the remote machine, either blocking or non-blocking.
2917@item Writing and reading in an interactive shell.
2918@item Transferring files and directories over SFTP.
2919@item Ensuring that files and directories exist on the remote machine.
2920@end itemize")
2921 (license license:asl2.0)))
2922
13d825fc
MC
2923(define-public python-scp
2924 (package
2925 (name "python-scp")
2926 (version "0.13.2")
2927 (source
2928 (origin
2929 (method url-fetch)
2930 (uri (pypi-uri "scp" version))
2931 (sha256
2932 (base32
2933 "1crlpw9lnn58fs1c1rmh7s7s9y5gkgpgjsqlvg9qa51kq1knx7gg"))))
2934 (build-system python-build-system)
2935 (arguments
2936 '(#:tests? #f)) ;tests require an SSH server
2937 (propagated-inputs
2938 `(("python-paramiko" ,python-paramiko)))
2939 (home-page "https://github.com/jbardin/scp.py")
2940 (synopsis "SCP protocol module for Python and Paramiko")
2941 (description "The scp module extends the Paramiko library to send and
2942receive files via the SCP1 protocol, as implemented by the OpenSSH
2943@command{scp} program.")
2944 (license license:gpl2+)))
2945
44d10b1f
RW
2946(define-public python-rst.linker
2947 (package
2948 (name "python-rst.linker")
d37e8e53 2949 (version "1.11")
44d10b1f
RW
2950 (source
2951 (origin
2952 (method url-fetch)
2953 (uri (pypi-uri "rst.linker" version))
2954 (sha256
d37e8e53 2955 (base32 "0pqsfqqx8h0pq21k8l3k62kznrgaj2ala93c64s4d9rpbr4mgkd2"))))
44d10b1f
RW
2956 (build-system python-build-system)
2957 (propagated-inputs
2958 `(("python-dateutil" ,python-dateutil)
2959 ("python-six" ,python-six)))
2960 (native-inputs
2961 `(("python-setuptools-scm" ,python-setuptools-scm)))
2962 ;; Test would require path.py, which would introduce a cyclic dependence.
2963 (arguments `(#:tests? #f))
2964 ;; Note: As of version 1.7 the documentation is not worth building.
2965 (home-page "https://github.com/jaraco/rst.linker")
2966 (synopsis "Sphinx plugin to add links and timestamps")
2967 (description "rst.linker allows to automatically replace text by a
2968reStructuredText external reference or timestamps. It's primary purpose is to
2969augment the changelog, but it can be used for other documents, too.")
2970 (license license:expat)))
2971
2972(define-public python2-rst.linker
2973 (package-with-python2 python-rst.linker))
2974
2975(define-public python-feedgenerator
2976 (package
2977 (name "python-feedgenerator")
2978 (version "1.9")
2979 (source
2980 (origin
2981 (method url-fetch)
2982 (uri (pypi-uri "feedgenerator" version))
2983 (sha256
2984 (base32
2985 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
2986 (modules '((guix build utils)))
2987 (snippet
2988 '(begin
2989 ;; Remove pre-compiled .pyc files from source.
2990 (for-each delete-file-recursively
2991 (find-files "." "__pycache__" #:directories? #t))
2992 (for-each delete-file (find-files "." "\\.pyc$"))
2993 #t))))
2994 (build-system python-build-system)
2995 (propagated-inputs
2996 `(("python-pytz" ,python-pytz)
2997 ("python-six" ,python-six)))
2998 (home-page "https://github.com/getpelican/feedgenerator")
2999 (synopsis
3000 "Standalone version of Django's Atom/RSS feed generator")
3001 (description
3002 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
3003which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
3004 (license license:bsd-3)))
3005
3006(define-public python2-feedgenerator
3007 (package-with-python2 python-feedgenerator))
3008
3009(define-public python-toml
3010 (package
3011 (name "python-toml")
3012 (version "0.9.4")
3013 (source
3014 (origin
3015 (method url-fetch)
3016 (uri (pypi-uri "toml" version))
3017 (sha256
3018 (base32
3019 "0bdbpbip67wdm6c7xwc6mmbmskyradj4cdxn1iibj4fcx1nbv1lf"))))
3020 (build-system python-build-system)
3021 (arguments
3022 `(#:tests? #f)) ;no tests suite in release
3023 (home-page "https://github.com/uiri/toml")
3024 (synopsis "Library for TOML")
3025 (description
3026 "@code{toml} is a library for parsing and creating Tom's Obvious, Minimal
3027Language (TOML) configuration files.")
3028 (license license:expat)))
3029
346c8752
BG
3030(define-public python-jsonrpc-server
3031 (package
3032 (name "python-jsonrpc-server")
d6cf4c6e 3033 (version "0.3.2")
346c8752
BG
3034 (source
3035 (origin
3036 (method url-fetch)
3037 (uri (pypi-uri "python-jsonrpc-server" version))
3038 (sha256
3039 (base32
d6cf4c6e 3040 "0ddgdp26dfxaz6isjbb12974b3rxavgsqrn2zrmck62cmipg5g05"))))
346c8752
BG
3041 (build-system python-build-system)
3042 (propagated-inputs
3043 `(("python-future" ,python-future)
3044 ("python-mock" ,python-mock)
d6cf4c6e
BG
3045 ("python-pytest" ,python-pytest)
3046 ("python-ujson" ,python-ujson)))
346c8752
BG
3047 (home-page
3048 "https://github.com/palantir/python-jsonrpc-server")
3049 (synopsis "JSON RPC 2.0 server library")
3050 (description
1df5407c 3051 "This package provides a JSON RPC 2.0 server library for Python.")
346c8752
BG
3052 (license license:expat)))
3053
56f4ad47
BG
3054(define-public python-pydocstyle
3055 (package
3056 (name "python-pydocstyle")
3057 (version "3.0.0")
3058 (source
3059 (origin
3060 (method url-fetch)
3061 (uri (pypi-uri "pydocstyle" version))
3062 (sha256
3063 (base32
3064 "1m1xv9clkg9lgzyza6dnj359z04vh5g0h49nhzghv7lg81gchhap"))))
3065 (build-system python-build-system)
3066 (propagated-inputs
3067 `(("python-six" ,python-six)
3068 ("python-snowballstemmer" ,python-snowballstemmer)))
3069 (home-page
3070 "https://github.com/PyCQA/pydocstyle/")
3071 (synopsis "Python docstring style checker")
3072 (description
3073 "This package provides a style checker for the Python Language
3074Server (PLS).")
3075 (license license:expat)))
3076
be4d840c 3077(define-public python-language-server
808dd2d0
BL
3078 (package
3079 (name "python-language-server")
81e3ba03 3080 (version "0.31.6")
808dd2d0
BL
3081 (source
3082 (origin
3083 (method url-fetch)
3084 (uri (pypi-uri "python-language-server" version))
3085 (sha256
3086 (base32
81e3ba03 3087 "0cqrffd5272p2hifa35rf1h1g6dss741jmjkwa43jninifmbz0df"))))
808dd2d0
BL
3088 (build-system python-build-system)
3089 (propagated-inputs
3090 `(("python-pluggy" ,python-pluggy)
3091 ("python-jsonrpc-server" ,python-jsonrpc-server)
3092 ("python-jedi" ,python-jedi)
3093 ("python-yapf" ,python-yapf)
3094 ("python-pyflakes" ,python-pyflakes)
3095 ("python-pydocstyle" ,python-pydocstyle)
3096 ("python-pycodestyle" ,python-pycodestyle)
3097 ("python-mccabe" ,python-mccabe)
3098 ("python-rope" ,python-rope)
3099 ("python-autopep8" ,python-autopep8)
3100 ("python-flake8" ,python-flake8)
3101 ("python-pylint" ,python-pylint)))
3102 (home-page "https://github.com/palantir/python-language-server")
3103 (synopsis "Python implementation of the Language Server Protocol")
3104 (description
3105 "The Python Language Server (pyls) is an implementation of the Python 3
be4d840c
BG
3106language specification for the Language Server Protocol (LSP). This tool is
3107used in text editing environments to provide a complete and integrated
3108feature-set for programming Python effectively.")
808dd2d0 3109 (license license:expat)))
be4d840c 3110
44d10b1f
RW
3111(define-public python-black
3112 (package
3113 (name "python-black")
3114 (version "18.6b4")
3115 (source
3116 (origin
3117 (method url-fetch)
3118 (uri (pypi-uri "black" version))
3119 (sha256
3120 (base32
3121 "0i4sfqgz6w15vd50kbhi7g7rifgqlf8yfr8y78rypd56q64qn592"))))
3122 (build-system python-build-system)
3123 (arguments
3124 `(#:phases
3125 (modify-phases %standard-phases
3126 (add-after 'patch-source-shebangs 'patch-extra-shebangs
3127 (lambda _
3128 (let ((python3 (which "python3")))
3129 (substitute* '("tests/data/fmtonoff.py"
3130 "tests/data/string_prefixes.py"
3131 "tests/data/function.py")
3132 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
3133 (string-append "#!" python3 (if (string? minor-version)
3134 minor-version
3135 ""))))))))))
3136 (propagated-inputs
3137 `(("python-click" ,python-click)
3138 ("python-attrs" ,python-attrs)
3139 ("python-appdirs" ,python-appdirs)
3140 ("python-toml" ,python-toml)))
3141 (home-page "https://github.com/ambv/black")
3142 (synopsis "The uncompromising code formatter")
3143 (description "Black is the uncompromising Python code formatter.")
3144 (license license:expat)))
3145
3146(define-public python-blinker
3147 (package
3148 (name "python-blinker")
3149 (version "1.4")
3150 (source
3151 (origin
3152 (method url-fetch)
3153 (uri (pypi-uri "blinker" version))
3154 (sha256
3155 (base32
3156 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
3157 (build-system python-build-system)
3158 (home-page "http://pythonhosted.org/blinker/")
3159 (synopsis "Fast, simple object-to-object and broadcast signaling")
3160 (description
3161 "Blinker provides a fast dispatching system that allows any number of
3162interested parties to subscribe to events, or \"signals\".")
3163 (license license:expat)))
3164
3165(define-public python2-blinker
3166 (package-with-python2 python-blinker))
3167
3168(define-public pelican
3169 (package
3170 (name "pelican")
fa9e3b5e 3171 (version "4.2.0")
44d10b1f
RW
3172 (source
3173 (origin
3174 (method url-fetch)
3175 (uri (pypi-uri "pelican" version))
3176 (sha256
3177 (base32
fa9e3b5e 3178 "0mp7hjyhs38ag1hyfcy882g400z0babqi72pnli46dqijfhajzmy"))))
44d10b1f
RW
3179 (build-system python-build-system)
3180 (propagated-inputs
fa9e3b5e
VC
3181 `(("python-blinker" ,python-blinker)
3182 ("python-dateutil" ,python-dateutil)
3183 ("python-docutils" ,python-docutils)
3184 ("python-feedgenerator" ,python-feedgenerator)
44d10b1f 3185 ("python-jinja2" ,python-jinja2)
fa9e3b5e 3186 ("python-markdown" ,python-markdown)
44d10b1f 3187 ("python-pygments" ,python-pygments)
44d10b1f 3188 ("python-pytz" ,python-pytz)
44d10b1f 3189 ("python-six" ,python-six)
fa9e3b5e 3190 ("python-unidecode" ,python-unidecode)))
44d10b1f
RW
3191 (home-page "https://getpelican.com/")
3192 (arguments
3193 `(;; XXX Requires a lot more packages to do unit tests :P
fa9e3b5e 3194 #:tests? #f))
44d10b1f
RW
3195 (synopsis "Python-based static site publishing system")
3196 (description
3197 "Pelican is a tool to generate a static blog from reStructuredText,
3198Markdown input files, and more. Pelican uses Jinja2 for templating
3199and is very extensible.")
3200 (license license:agpl3+)))
3201
8c141421
JH
3202(define-public mallard-ducktype
3203 (package
3204 (name "mallard-ducktype")
12cc3da5 3205 (version "1.0.2")
8c141421
JH
3206 (source
3207 (origin
3208 (method git-fetch)
12cc3da5
JH
3209 ;; git-reference because tests are not included in pypi source tarball
3210 ;; https://issues.guix.gnu.org/issue/36755#2
8c141421
JH
3211 (uri (git-reference
3212 (url "https://github.com/projectmallard/mallard-ducktype.git")
3213 (commit version)))
3214 (file-name (git-file-name name version))
3215 (sha256
3216 (base32
12cc3da5 3217 "1jk9bfz7g04ip78s03b0xak6d54rj4h9zpgadkziy1ji216g6y4c"))))
8c141421 3218 (build-system python-build-system)
5246655f
EF
3219 (arguments
3220 '(#:phases
3221 (modify-phases %standard-phases
3222 (replace 'check
3223 (lambda _
3224 (with-directory-excursion "tests"
3225 (invoke "sh" "runtests")))))))
8c141421
JH
3226 (home-page "http://projectmallard.org")
3227 (synopsis "Convert Ducktype to Mallard documentation markup")
3228 (description
3229 "Ducktype is a lightweight syntax that can represent all the semantics
3230of the Mallard XML documentation system. Ducktype files can be converted to
3231Mallard using the @command{ducktype} tool. The yelp-tools package
3232provides additional functionality on the produced Mallard documents.")
3233 (license license:expat)))
3234
44d10b1f
RW
3235(define-public python-cython
3236 (package
3237 (name "python-cython")
6fd27a71 3238 (version "0.29.13")
44d10b1f
RW
3239 (source
3240 (origin
3241 (method url-fetch)
3242 (uri (pypi-uri "Cython" version))
3243 (sha256
6fd27a71
TGR
3244 (base32
3245 "13k37lrcgagwwnzr5bzririsscb793vndj234d475x1h9ad0d7f2"))))
44d10b1f
RW
3246 (build-system python-build-system)
3247 ;; we need the full python package and not just the python-wrapper
3248 ;; because we need libpython3.3m.so
3249 (inputs
3250 `(("python" ,python)))
3251 (arguments
3252 `(#:phases
3253 (modify-phases %standard-phases
3254 (add-before 'check 'set-HOME
3255 ;; some tests require access to "$HOME/.cython"
3256 (lambda _ (setenv "HOME" "/tmp") #t))
3257
3258 ;; FIXME: These tests started failing on armhf after the 0.28 update
3259 ;; (commit c69d11c5930), both with an error such as this:
3260 ;; compiling (cpp) and running dictcomp ...
3261 ;; === C/C++ compiler error output: ===
3262 ;; ‘
3263 ;; dictcomp.cpp:5221: confused by earlier errors, bailing out
3264 ;; See <https://hydra.gnu.org/build/2948724> for logs.
3265 ,@(if (target-arm32?)
3266 `((add-before 'check 'disable-failing-tests
3267 (lambda _
3268 (let ((disabled-tests (open-file "tests/bugs.txt" "a")))
3269 (for-each (lambda (test)
3270 (format disabled-tests "~a\n" test))
3271 '("memslice" "dictcomp"))
3272 (close-port disabled-tests)))))
3273 '())
3274
3275 (replace 'check
3276 (lambda _
e9194eb0
MB
3277 ;; Disable compiler optimizations to greatly reduce the running
3278 ;; time of the test suite.
3279 (setenv "CFLAGS" "-O0")
3280
3281 (invoke "python" "runtests.py" "-vv"
3282 "-j" (number->string (parallel-job-count))))))))
f319409b 3283 (home-page "https://cython.org/")
44d10b1f
RW
3284 (synopsis "C extensions for Python")
3285 (description "Cython is an optimising static compiler for both the Python
3286programming language and the extended Cython programming language. It makes
3287writing C extensions for Python as easy as Python itself.")
3288 (license license:asl2.0)
3289 (properties `((python2-variant . ,(delay python2-cython))))))
3290
3291(define-public python2-cython
da460865
MB
3292 (let ((base (package-with-python2 (strip-python2-variant python-cython))))
3293 (package
3294 (inherit base)
3295 (name "python2-cython")
3296 (inputs
3297 `(("python-2" ,python-2))) ;this is not automatically changed
3298 (arguments
3299 (substitute-keyword-arguments (package-arguments base)
3300 ((#:phases phases)
3301 `(modify-phases ,phases
3302 (add-before 'check 'adjust-test_embed
3303 (lambda _
3304 (substitute* "runtests.py"
3305 ;; test_embed goes great lengths to find the static libpythonX.Y.a
3306 ;; so it can give the right -L flag to GCC when embedding static
3307 ;; builds of Python. It is unaware that the Python "config"
3308 ;; directory (where the static library lives) was renamed in
3309 ;; Python 3, and falls back to sysconfig.get_config_var('LIBDIR'),
3310 ;; which works fine, because that is where the shared library is.
3311 ;;
3312 ;; It also appears to be unaware that the Makefile in Demos/embed
3313 ;; already unconditionally pass the static library location to GCC,
3314 ;; after checking sysconfig.get_config_var('LIBPL).
3315 ;;
3316 ;; The effect is that the linker is unable to resolve libexpat
3317 ;; symbols when building for Python 2, because neither the Python 2
3318 ;; shared library nor Expat is available. To fix it, we can either
3319 ;; add Expat as an input and make it visible to the linker, or just
3320 ;; prevent it from overriding the Python shared library location.
3321 ;; The end result is identical, so we take the easy route.
3322 ((" or libname not in os\\.listdir\\(libdir\\)")
3323 ""))
3324 #t)))))))))
44d10b1f
RW
3325
3326;; The RPython toolchain currently does not support Python 3.
3327(define-public python2-rpython
3328 (package
3329 (name "python2-rpython")
3330 (version "0.2.1")
3331 (source
3332 (origin
3333 (method url-fetch)
3334 (uri (pypi-uri "rpython" version))
3335 (sha256
3336 (base32
3337 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
3338 (build-system python-build-system)
3339 (arguments `(#:python ,python-2))
3340 (native-inputs
3341 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
3342 (home-page "https://rpython.readthedocs.org")
3343 (synopsis "Framework for implementing interpreters and virtual machines")
3344 (description "RPython is a translation and support framework for
3345producing implementations of dynamic languages, emphasizing a clean separation
3346between language specification and implementation aspects.")
3347 (license license:expat)))
3348
3349;; NOTE: when upgrading numpy please make sure that python-pandas and
3350;; python-scipy still build, as these three packages are often used together.
3351(define-public python-numpy
3352 (package
3353 (name "python-numpy")
8e5fbd5d 3354 (version "1.17.3")
44d10b1f
RW
3355 (source
3356 (origin
3357 (method url-fetch)
3358 (uri (string-append
3359 "https://github.com/numpy/numpy/releases/download/v"
3360 version "/numpy-" version ".tar.gz"))
3361 (sha256
3362 (base32
8e5fbd5d 3363 "1ak9dmjja0q90a7fsxli51ypcwssh8c4pb6f8wkrsnf2xgdk6dy9"))))
44d10b1f
RW
3364 (build-system python-build-system)
3365 (inputs
3366 `(("openblas" ,openblas)
3367 ("lapack" ,lapack)))
3368 (native-inputs
3369 `(("python-cython" ,python-cython)
3370 ("python-pytest" ,python-pytest)
3371 ("gfortran" ,gfortran)))
3372 (arguments
3373 `(#:phases
3374 (modify-phases %standard-phases
3375 (add-before 'build 'configure-blas-lapack
3376 (lambda* (#:key inputs #:allow-other-keys)
3377 (call-with-output-file "site.cfg"
3378 (lambda (port)
3379 (format port
3380 "[openblas]
3381libraries = openblas
3382library_dirs = ~a/lib
3383include_dirs = ~a/include
3384
3385# backslash-n to make emacs happy
3386\n[lapack]
3387lapack_libs = lapack
3388library_dirs = ~a/lib
3389include_dirs = ~a/include
3390"
3391 (assoc-ref inputs "openblas")
3392 (assoc-ref inputs "openblas")
3393 (assoc-ref inputs "lapack")
3394 (assoc-ref inputs "lapack"))))
3395 #t))
3396 (add-before 'build 'fix-executable-paths
3397 (lambda* (#:key inputs #:allow-other-keys)
3398 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
3399 ;; instead of /bin/sh.
3400 (substitute* "numpy/distutils/exec_command.py"
3401 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
3402 (string-append match-start (assoc-ref inputs "bash") match-end)))
3403 ;; Use "gcc" executable, not "cc".
3404 (substitute* "numpy/distutils/system_info.py"
3405 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3406 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
3407 #t))
3408 ;; Tests can only be run after the library has been installed and not
3409 ;; within the source directory.
3410 (delete 'check)
3411 (add-after 'install 'check
3412 (lambda* (#:key outputs inputs #:allow-other-keys)
3413 ;; Make installed package available for running the tests
3414 (add-installed-pythonpath inputs outputs)
3415 ;; Make sure "f2py" etc is found.
3416 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
3417 ":" (getenv "PATH")))
3418 (with-directory-excursion "/tmp"
3419 (invoke "python" "-c"
3420 "import numpy; numpy.test(verbose=2)")))))))
3421 (home-page "http://www.numpy.org/")
3422 (synopsis "Fundamental package for scientific computing with Python")
3423 (description "NumPy is the fundamental package for scientific computing
3424with Python. It contains among other things: a powerful N-dimensional array
3425object, sophisticated (broadcasting) functions, tools for integrating C/C++
3426and Fortran code, useful linear algebra, Fourier transform, and random number
3427capabilities.")
adb396ea 3428 (properties `((python2-variant . ,(delay python2-numpy))))
44d10b1f
RW
3429 (license license:bsd-3)))
3430
adb396ea 3431;; Numpy 1.16.x are the last versions that support Python 2.
44d10b1f 3432(define-public python2-numpy
adb396ea
MB
3433 (let ((numpy (package-with-python2
3434 (strip-python2-variant python-numpy))))
3435 (package/inherit
3436 numpy
3437 (version "1.16.5")
3438 (source (origin
3439 (method url-fetch)
3440 (uri (string-append
3441 "https://github.com/numpy/numpy/releases/download/v"
3442 version "/numpy-" version ".tar.gz"))
3443 (sha256
3444 (base32
3445 "0lg1cycxzi4rvvrd5zxinpdz0ni792fpx6xjd75z1923zcac8qrb")))))))
44d10b1f
RW
3446
3447;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
3448;; interest only for legacy code going back to NumPy's predecessor
3449;; Numeric.
3450(define-public python2-numpy-1.8
3451 (package (inherit python2-numpy)
3452 (version "1.8.2")
3453 (source
3454 (origin
6b61fc47
EF
3455 (method git-fetch)
3456 (uri (git-reference
3457 (url "https://github.com/numpy/numpy")
3458 (commit (string-append "v" version))))
3459 (file-name (git-file-name "numpy" version))
44d10b1f
RW
3460 (sha256
3461 (base32
6b61fc47 3462 "0ikgi15rsqwbkfsjjxrwh40lqyal2wvyp3923y6w6ch3dcr82sfk"))))
44d10b1f
RW
3463 (arguments
3464 (substitute-keyword-arguments (package-arguments python2-numpy)
3465 ((#:phases phases)
3466 `(modify-phases ,phases
3467 (replace 'configure-blas-lapack
3468 (lambda* (#:key inputs #:allow-other-keys)
3469 (call-with-output-file "site.cfg"
3470 (lambda (port)
3471 (format port
3472 "[openblas]
3473libraries = openblas,lapack
3474library_dirs = ~a/lib:~a/lib
3475include_dirs = ~a/include:~a/include
3476"
3477 (assoc-ref inputs "openblas")
3478 (assoc-ref inputs "lapack")
3479 (assoc-ref inputs "openblas")
3480 (assoc-ref inputs "lapack"))))
3481 #t))))))
3482 (native-inputs
3483 `(("python2-nose" ,python2-nose)))
3484 (description "NumPy is the fundamental package for scientific computing
3485with Python. It contains among other things: a powerful N-dimensional array
3486object, sophisticated (broadcasting) functions, tools for integrating C/C++
3487and Fortran code, useful linear algebra, Fourier transform, and random number
3488capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
3489that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
3490Numeric.")
3491 (license license:bsd-3)))
3492
3493(define-public python-munch
3494 (package
3495 (name "python-munch")
3496 (version "2.0.4")
3497 (source
3498 (origin
3499 (method url-fetch)
3500 (uri (pypi-uri "munch" version))
3501 (sha256
3502 (base32
3503 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3504 (build-system python-build-system)
3505 (home-page "https://github.com/Infinidat/munch")
3506 (synopsis "Dot-accessible dictionary")
3507 (description "Munch is a dot-accessible dictionary similar to JavaScript
3508objects.")
3509 (license license:expat)))
3510
3511(define-public python2-munch
3512 (package-with-python2 python-munch))
3513
3514(define-public python-colormath
3515 (package
3516 (name "python-colormath")
3517 (version "3.0.0")
3518 (source
3519 (origin
3520 (method url-fetch)
3521 (uri (pypi-uri "colormath" version))
3522 (sha256
3523 (base32
3524 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
3525 (build-system python-build-system)
3526 (propagated-inputs
3527 `(("python-networkx" ,python-networkx)
3528 ("python-numpy" ,python-numpy)))
3529 (home-page "https://github.com/gtaylor/python-colormath")
3530 (synopsis "Color math and conversion library")
3531 (description
3532 "This is a Python library for color math and conversions.")
3533 (license license:bsd-3)))
3534
3535(define-public python2-colormath
3536 (package-with-python2 python-colormath))
3537
3538(define-public python-spectra
3539 (package
3540 (name "python-spectra")
3541 (version "0.0.11")
3542 (source
3543 (origin
3544 (method url-fetch)
3545 (uri (pypi-uri "spectra" version))
3546 (sha256
3547 (base32
3548 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
3549 (build-system python-build-system)
3550 (arguments
3551 `(#:phases
3552 (modify-phases %standard-phases
3553 (replace 'check
38ec0f6a 3554 (lambda _ (invoke "nosetests" "-v"))))))
44d10b1f
RW
3555 (propagated-inputs
3556 `(("python-colormath" ,python-colormath)))
3557 (native-inputs
3558 `(("python-nose" ,python-nose)))
3559 (home-page "https://github.com/jsvine/spectra")
3560 (synopsis "Color scales and color conversion")
3561 (description
3562 "This package provides a Python library intended to make color math,
3563color scales, and color space conversion easy. It has support for:
3564
3565@enumerate
3566@item Color scales
3567@item Color ranges
3568@item Color blending
3569@item Brightening/darkening colors
3570@item Saturating/desaturating colors
3571@item Conversion to/from multiple color spaces.
3572@end enumerate\n")
3573 (license license:expat)))
3574
3575(define-public python2-spectra
3576 (package-with-python2 python-spectra))
3577
3578(define-public python-numpy-documentation
3579 (package
3580 (name "python-numpy-documentation")
3581 (version (package-version python-numpy))
3582 (source (package-source python-numpy))
3583 (build-system python-build-system)
3584 (native-inputs
3585 `(("python-matplotlib" ,python-matplotlib)
3586 ("python-numpy" ,python-numpy)
3587 ("pkg-config" ,pkg-config)
3588 ("python-sphinx" ,python-sphinx)
3589 ("python-numpydoc" ,python-numpydoc)
f75aa97f 3590 ("texlive" ,(texlive-union (list texlive-fonts-cm-super
44d10b1f
RW
3591 texlive-fonts-ec
3592 texlive-generic-ifxetex
3593 texlive-generic-pdftex
f75aa97f 3594 texlive-amsfonts
44d10b1f
RW
3595 texlive-latex-capt-of
3596 texlive-latex-cmap
3597 texlive-latex-environ
3598 texlive-latex-eqparbox
3599 texlive-latex-etoolbox
3600 texlive-latex-expdlist
3601 texlive-latex-fancyhdr
3602 texlive-latex-fancyvrb
3603 texlive-latex-fncychap
3604 texlive-latex-float
3605 texlive-latex-framed
3606 texlive-latex-geometry
3607 texlive-latex-graphics
3608 texlive-latex-hyperref
3609 texlive-latex-mdwtools
3610 texlive-latex-multirow
3611 texlive-latex-needspace
3612 texlive-latex-oberdiek
3613 texlive-latex-parskip
3614 texlive-latex-preview
3615 texlive-latex-tabulary
3616 texlive-latex-threeparttable
3617 texlive-latex-titlesec
3618 texlive-latex-trimspaces
3619 texlive-latex-ucs
3620 texlive-latex-upquote
3621 texlive-latex-url
3622 texlive-latex-varwidth
3623 texlive-latex-wrapfig)))
3624 ("texinfo" ,texinfo)
3625 ("perl" ,perl)
3626 ("scipy-sphinx-theme"
3627 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
3628 (method git-fetch)
3629 (uri (git-reference
3630 (url "https://github.com/scipy/scipy-sphinx-theme.git")
3631 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
3632 (sha256
3633 (base32
3634 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
3635 ,@(package-native-inputs python-numpy)))
3636 (arguments
3637 `(#:tests? #f ; we're only generating the documentation
3638 #:phases
3639 (modify-phases %standard-phases
3640 (delete 'build)
3641 (replace 'install
3642 (lambda* (#:key inputs outputs #:allow-other-keys)
3643 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3644 (doc (string-append
3645 data "/doc/" ,name "-"
3646 ,(package-version python-numpy)))
3647 (info-reader (string-append data "/info"))
3648 (html (string-append doc "/html"))
3649 (scipy-sphinx-theme "scipy-sphinx-theme")
3650 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
3651 (pyver ,(string-append "PYVER=")))
3652
3653 ;; FIXME: this is needed to for texlive-union to generate
3654 ;; fonts, which are not found.
3655 (setenv "HOME" "/tmp")
3656
3657 (with-directory-excursion "doc"
3658 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
3659 (mkdir-p html)
4fc898da
RW
3660 (invoke "make" "html" pyver)
3661 (invoke "make" "latex" "PAPER=a4" pyver)
3662 (invoke "make" "-C" "build/latex"
44d10b1f
RW
3663 "all-pdf" "PAPER=a4" pyver)
3664 ;; FIXME: Generation of the info file fails.
4fc898da 3665 ;; (invoke "make" "info" pyver)
44d10b1f
RW
3666 ;; (mkdir-p info)
3667 ;; (copy-file "build/texinfo/numpy.info"
3668 ;; (string-append info "/numpy.info"))
3669 (for-each (lambda (file)
3670 (copy-file (string-append "build/latex" file)
3671 (string-append doc file)))
3672 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3673 (with-directory-excursion "build/html"
3674 (for-each (lambda (file)
3675 (let* ((dir (dirname file))
3676 (tgt-dir (string-append html "/" dir)))
3677 (unless (equal? "." dir)
3678 (mkdir-p tgt-dir))
3679 (install-file file html)))
3680 (find-files "." ".*")))))
3681 #t)))))
3682 (home-page (package-home-page python-numpy))
3683 (synopsis "Documentation for the python-numpy package")
3684 (description (package-description python-numpy))
3685 (license (package-license python-numpy))))
3686
3687(define-public python2-numpy-documentation
3688 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
3689 (package
3690 (inherit numpy-documentation)
3691 (native-inputs `(("python2-functools32" ,python2-functools32)
3692 ,@(package-native-inputs numpy-documentation))))))
3693
3694(define-public python-pygit2
3695 (package
3696 (name "python-pygit2")
dac8b275 3697 (version "0.28.2")
44d10b1f
RW
3698 (source
3699 (origin
3700 (method url-fetch)
3701 (uri (pypi-uri "pygit2" version))
3702 (sha256
dac8b275 3703 (base32 "11kzj5mjkspvplnpdb6bj8dcj6rgmkk986k8hjcklyg5yaxkz32d"))))
44d10b1f
RW
3704 (build-system python-build-system)
3705 (arguments
c3ecab0d 3706 '(#:tests? #f)) ; tests don't run correctly in our environment
44d10b1f
RW
3707 (propagated-inputs
3708 `(("python-six" ,python-six)
3709 ("python-cffi" ,python-cffi)
3710 ("libgit2" ,libgit2)
3711 ("python-tox" ,python-tox)))
3712 (native-inputs
3713 `(("python-pytest" ,python-pytest)))
3714 (home-page "https://github.com/libgit2/pygit2")
3715 (synopsis "Python bindings for libgit2")
3716 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3717library, libgit2 implements Git plumbing.")
3718 ;; GPL2.0 only, with linking exception.
3719 (license license:gpl2)))
3720
3721(define-public python2-pygit2
3722 (package-with-python2 python-pygit2))
3723
3724(define-public python-pyparsing
3725 (package
3726 (name "python-pyparsing")
11c28af1 3727 (version "2.4.6")
44d10b1f
RW
3728 (source
3729 (origin
3730 (method url-fetch)
3731 (uri (pypi-uri "pyparsing" version))
3732 (sha256
11c28af1 3733 (base32 "17wn5zlijc9m9zj26gy3f541y7smpj8rfhl51d025c2gm210b0sc"))))
44d10b1f
RW
3734 (build-system python-build-system)
3735 (outputs '("out" "doc"))
3736 (arguments
3737 `(#:tests? #f ; no test target
3738 #:phases
3739 (modify-phases %standard-phases
3740 (add-after 'install 'install-doc
3741 (lambda* (#:key outputs #:allow-other-keys)
3742 (let* ((doc (string-append (assoc-ref outputs "doc")
3743 "/share/doc/" ,name "-" ,version))
3744 (html-doc (string-append doc "/html"))
3745 (examples (string-append doc "/examples")))
3746 (mkdir-p html-doc)
3747 (mkdir-p examples)
3748 (for-each
3749 (lambda (dir tgt)
3750 (map (lambda (file)
3751 (install-file file tgt))
3752 (find-files dir ".*")))
3753 (list "docs" "htmldoc" "examples")
3754 (list doc html-doc examples))
3755 #t))))))
3756 (home-page "https://github.com/pyparsing/pyparsing")
3757 (synopsis "Python parsing class library")
3758 (description
3759 "The pyparsing module is an alternative approach to creating and
3760executing simple grammars, vs. the traditional lex/yacc approach, or the use
3761of regular expressions. The pyparsing module provides a library of classes
3762that client code uses to construct the grammar directly in Python code.")
3763 (license license:expat)))
3764
3765(define-public python2-pyparsing
3766 (package-with-python2 python-pyparsing))
3767
3768(define-public python-numpydoc
3769 (package
3770 (name "python-numpydoc")
3771 (version "0.8.0")
3772 (source
3773 (origin
3774 (method url-fetch)
3775 (uri (pypi-uri "numpydoc" version))
3776 (sha256
3777 (base32
3778 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
3779 (build-system python-build-system)
3780 (propagated-inputs
3781 `(("python-sphinx" ,python-sphinx)))
3782 (native-inputs
3783 `(("python-nose" ,python-nose)))
3784 (home-page "https://pypi.python.org/pypi/numpydoc")
3785 (synopsis
3786 "Numpy's Sphinx extensions")
3787 (description
3788 "Sphinx extension to support docstrings in Numpy format.")
3789 (license license:bsd-2)))
3790
3791(define-public python2-numpydoc
3792 (package-with-python2 python-numpydoc))
3793
3794(define-public python-numexpr
3795 (package
3796 (name "python-numexpr")
3797 (version "2.6.5")
3798 (source
3799 (origin
3800 (method url-fetch)
3801 (uri (pypi-uri "numexpr" version))
3802 (sha256
3803 (base32
3804 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
3805 (build-system python-build-system)
3806 (arguments `(#:tests? #f)) ; no tests included
3807 (propagated-inputs
3808 `(("python-numpy" ,python-numpy)))
3809 (home-page "https://github.com/pydata/numexpr")
3810 (synopsis "Fast numerical expression evaluator for NumPy")
3811 (description
3812 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3813expressions that operate on arrays are accelerated and use less memory than
3814doing the same calculation in Python. In addition, its multi-threaded
3815capabilities can make use of all your cores, which may accelerate
3816computations, most specially if they are not memory-bounded (e.g. those using
3817transcendental functions).")
3818 (license license:expat)))
3819
3820(define-public python2-numexpr
3821 (package-with-python2 python-numexpr))
3822
3823(define-public python-cycler
3824 (package
3825 (name "python-cycler")
3826 (version "0.10.0")
3827 (source (origin
3828 (method url-fetch)
3829 (uri (pypi-uri "cycler" version))
3830 (sha256
3831 (base32
3832 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
3833 (build-system python-build-system)
3834 (arguments
3835 ;; XXX: The current version requires 'coveralls' which we don't have.
3836 ;; Enable this for the next release which uses 'python-pytest'.
3837 '(#:tests? #f))
3838 (propagated-inputs
3839 `(("python-six" ,python-six)))
3840 (home-page "http://matplotlib.org/cycler/")
3841 (synopsis "Composable keyword argument iterator")
3842 (description
3843 "When using @code{matplotlib} and plotting more than one line, it is
3844common to want to be able to want to be able to cycle over one or more artist
3845styles; but the plotting logic can quickly become involved.
3846To address this and enable easy cycling over arbitrary @code{kwargs}, the
3847@code{Cycler} class was developed.")
3848 (license license:bsd-3)))
3849
3850(define-public python2-cycler
3851 (package-with-python2 python-cycler))
3852
3853(define-public python-colorspacious
3854 (package
3855 (name "python-colorspacious")
53a3ebed 3856 (version "1.1.2")
44d10b1f 3857 (source
dee92e65
TGR
3858 (origin
3859 (method git-fetch)
3860 (uri (git-reference
3861 (url "https://github.com/njsmith/colorspacious.git")
3862 (commit (string-append "v" version))))
3863 (file-name (git-file-name name version))
3864 (sha256
53a3ebed 3865 (base32 "0x7nkphr6g5ql5fvgss8l56rgiyjgh6fm8zzs73i94ci9wzlm63w"))))
44d10b1f
RW
3866 (build-system python-build-system)
3867 (propagated-inputs
3868 `(("python-numpy" ,python-numpy)))
3869 (native-inputs
3870 `(("python-nose" ,python-nose)))
3871 (arguments
3872 `(#:phases
3873 (modify-phases %standard-phases
3874 (replace 'check
3875 (lambda _
c988afda 3876 (invoke "nosetests" "--all-modules" "-v" "colorspacious"))))))
44d10b1f
RW
3877 (home-page "https://github.com/njsmith/colorspacious")
3878 (synopsis "Python library for colorspace conversions")
3879 (description "@code{colorspacious} is a Python library that lets you
3880convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
3881 (license license:expat)))
3882
3883(define-public python2-colorspacious
3884 (package-with-python2 python-colorspacious))
3885
3886(define-public python-matplotlib
3887 (package
3888 (name "python-matplotlib")
9e7cb2f1 3889 (version "3.1.2")
44d10b1f
RW
3890 (source
3891 (origin
3892 (method url-fetch)
3893 (uri (pypi-uri "matplotlib" version))
3894 (sha256
3895 (base32
9e7cb2f1 3896 "1nmshfqh7wyg15i16hx1yiylcvzkws29ivn66n3i0wyqwcpjr3lf"))))
44d10b1f
RW
3897 (build-system python-build-system)
3898 (propagated-inputs ; the following packages are all needed at run time
3899 `(("python-cycler" ,python-cycler)
3900 ("python-kiwisolver" ,python-kiwisolver)
3901 ("python-pyparsing" ,python-pyparsing)
3902 ("python-pygobject" ,python-pygobject)
3903 ("gobject-introspection" ,gobject-introspection)
3904 ("python-tkinter" ,python "tk")
3905 ("python-dateutil" ,python-dateutil)
3906 ("python-numpy" ,python-numpy)
3907 ("python-pillow" ,python-pillow)
3908 ("python-pytz" ,python-pytz)
3909 ("python-six" ,python-six)
44d10b1f
RW
3910 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3911 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3912 ;; object. For this reason we need to import both libraries.
5ea654cf 3913 ;; https://cairocffi.readthedocs.io/en/stable/cffi_api.html#converting-pycairo-wrappers-to-cairocffi
44d10b1f 3914 ("python-pycairo" ,python-pycairo)
44d10b1f
RW
3915 ("python-cairocffi" ,python-cairocffi)))
3916 (inputs
3917 `(("libpng" ,libpng)
3918 ("imagemagick" ,imagemagick)
3919 ("freetype" ,freetype)
3920 ("cairo" ,cairo)
3921 ("glib" ,glib)
3922 ;; FIXME: Add backends when available.
3923 ;("python-wxpython" ,python-wxpython)
3924 ("tcl" ,tcl)
3925 ("tk" ,tk)))
3926 (native-inputs
3927 `(("pkg-config" ,pkg-config)
5ea654cf
RW
3928 ("python-pytest" ,python-pytest)
3929 ("python-mock" ,python-mock)
3930 ("unzip" ,unzip)
3931 ("jquery-ui"
3932 ,(origin
3933 (method url-fetch)
3934 (uri "https://jqueryui.com/resources/download/jquery-ui-1.12.1.zip")
3935 (sha256
3936 (base32
3937 "0kb21xf38diqgxcdi1z3s9ssq36pldvyqxy56hn6pcva6rs3c8zq"))))))
44d10b1f
RW
3938 (arguments
3939 `(#:phases
3940 (modify-phases %standard-phases
5ea654cf
RW
3941 ;; XXX We disable all image comparison tests because we're using a
3942 ;; newer version of FreeType than matplotlib expects. This leads to
3943 ;; minor differences throughout the tests.
3944 (add-after 'unpack 'fix-and-disable-failing-tests
3945 (lambda _
3946 (substitute* (append (find-files "lib/matplotlib/tests/"
3947 "test_.*\\.py$")
3948 (find-files "lib/mpl_toolkits/tests"
3949 "test_.*\\.py$"))
3950 (("^from matplotlib" match)
3951 (string-append "import pytest\n" match))
3952 (("( *)@image_comparison" match indent)
3953 (string-append indent
3954 "@pytest.mark.skip(reason=\"unknown minor image differences\")\n"
3955 match)))
3956 (substitute* "lib/matplotlib/tests/test_animation.py"
3957 (("/bin/sh") (which "sh")))
3958 (for-each delete-file
3959 ;; test_normal_axes, test_get_tightbbox_polar
3960 '("lib/matplotlib/tests/test_axes.py"
9e7cb2f1
RW
3961 ;; We don't use the webagg backend and this test forces it.
3962 "lib/matplotlib/tests/test_backend_webagg.py"
5ea654cf
RW
3963 ;; test_outward_ticks
3964 "lib/matplotlib/tests/test_tightlayout.py"
9e7cb2f1
RW
3965 ;; test_hidden_axes fails with minor extent
3966 ;; differences, possibly due to the use of a
3967 ;; different version of FreeType.
3968 "lib/matplotlib/tests/test_constrainedlayout.py"
5ea654cf
RW
3969 ;; Fontconfig returns no fonts.
3970 "lib/matplotlib/tests/test_font_manager.py"))
3971 #t))
3972 (add-before 'install 'install-jquery-ui
3973 (lambda* (#:key outputs inputs #:allow-other-keys)
3974 (let ((dir (string-append (assoc-ref outputs "out")
3975 "/lib/python3.7/site-packages/matplotlib/backends/web_backend/")))
3976 (mkdir-p dir)
3977 (invoke "unzip"
3978 (assoc-ref inputs "jquery-ui")
3979 "-d" dir))
3980 #t))
c09f598d 3981 (replace 'check
5ea654cf
RW
3982 (lambda* (#:key outputs inputs #:allow-other-keys)
3983 (add-installed-pythonpath inputs outputs)
3984 (invoke "python" "tests.py" "-v"
9e7cb2f1 3985 "-m" "not network and not webagg")))
44d10b1f
RW
3986 (add-before 'build 'configure-environment
3987 (lambda* (#:key outputs inputs #:allow-other-keys)
34c2a16b
RW
3988 (let ((cairo (assoc-ref inputs "cairo")))
3989 ;; Setting this directory in the 'basedirlist' of 'setup.cfg'
44d10b1f 3990 ;; has not effect.
34c2a16b 3991 (setenv "LD_LIBRARY_PATH" (string-append cairo "/lib"))
44d10b1f
RW
3992 (setenv "HOME" (getcwd))
3993 (call-with-output-file "setup.cfg"
3994 (lambda (port)
3995 (format port "[directories]~%
3996basedirlist = ~a,~a~%
5ea654cf
RW
3997[packages]~%
3998tests = True~%"
44d10b1f
RW
3999 (assoc-ref inputs "tcl")
4000 (assoc-ref inputs "tk")))))
4001 #t)))))
339b5828 4002 (home-page "https://matplotlib.org/")
44d10b1f
RW
4003 (synopsis "2D plotting library for Python")
4004 (description
4005 "Matplotlib is a Python 2D plotting library which produces publication
4006quality figures in a variety of hardcopy formats and interactive environments
4007across platforms. Matplotlib can be used in Python scripts, the python and
4008ipython shell, web application servers, and six graphical user interface
4009toolkits.")
4010 (license license:psfl)
4011 (properties `((python2-variant . ,(delay python2-matplotlib))))))
4012
4013(define-public python2-matplotlib
4014 (let ((matplotlib (package-with-python2
4015 (strip-python2-variant python-matplotlib))))
4016 (package (inherit matplotlib)
7380df73 4017 (version "2.2.4")
5ea654cf
RW
4018 (source
4019 (origin
4020 (method url-fetch)
4021 (uri (pypi-uri "matplotlib" version))
4022 (sha256
4023 (base32
7380df73 4024 "09i1gnrra1590brc1f8d5rh2zvnknmfgzp613ab0462qkrwj15h2"))))
5d484f42
EF
4025 (arguments
4026 (substitute-keyword-arguments (package-arguments matplotlib)
4027 ((#:phases phases)
4028 `(modify-phases ,phases
66a3c2db
EF
4029 (replace 'install-jquery-ui
4030 (lambda* (#:key outputs inputs #:allow-other-keys)
4031 (let ((dir (string-append (assoc-ref outputs "out")
4032 "/lib/python2.7/site-packages/"
4033 "matplotlib/backends/web_backend/")))
4034 (mkdir-p dir)
4035 (invoke "unzip"
4036 (assoc-ref inputs "jquery-ui")
4037 "-d" dir))
4038 #t))
38a404d5 4039 (delete 'fix-and-disable-failing-tests)
5d484f42 4040 (delete 'check))))) ; These tests weren't run the the past.
44d10b1f
RW
4041 ;; Make sure to use special packages for Python 2 instead
4042 ;; of those automatically rewritten by package-with-python2.
4043 (propagated-inputs
4044 `(("python2-pycairo" ,python2-pycairo)
4045 ("python2-backports-functools-lru-cache"
4046 ,python2-backports-functools-lru-cache)
4047 ("python2-functools32" ,python2-functools32)
4048 ("python2-pygobject-2" ,python2-pygobject-2)
4049 ("python2-subprocess32" ,python2-subprocess32)
4050 ("python2-tkinter" ,python-2 "tk")
4051 ,@(fold alist-delete (package-propagated-inputs matplotlib)
4052 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
4053
4054(define-public python-matplotlib-documentation
4055 (package
4056 (name "python-matplotlib-documentation")
4057 (version (package-version python-matplotlib))
4058 (source (package-source python-matplotlib))
4059 (build-system python-build-system)
4060 (native-inputs
4061 `(("python-matplotlib" ,python-matplotlib)
4062 ("python-colorspacious" ,python-colorspacious)
4063 ("python-sphinx" ,python-sphinx)
5ad0a452 4064 ("python-sphinx-copybutton" ,python-sphinx-copybutton)
44d10b1f
RW
4065 ("python-sphinx-gallery" ,python-sphinx-gallery)
4066 ("python-numpydoc" ,python-numpydoc)
4067 ("python-ipython" ,python-ipython)
e7a53914 4068 ("python-ipykernel" ,python-ipykernel)
44d10b1f
RW
4069 ("python-mock" ,python-mock)
4070 ("graphviz" ,graphviz)
f75aa97f 4071 ("texlive" ,(texlive-union (list texlive-amsfonts
e7a53914
RW
4072 texlive-latex-amsmath
4073 texlive-latex-enumitem
4074 texlive-latex-expdlist
4075 texlive-latex-geometry
4076 texlive-latex-preview
4077 texlive-latex-type1cm
4078 texlive-latex-ucs
4079
4080 texlive-generic-pdftex
4081
e7a53914
RW
4082 texlive-fonts-ec
4083 texlive-fonts-adobe-times
4084 texlive-fonts-txfonts)))
44d10b1f
RW
4085 ("texinfo" ,texinfo)
4086 ,@(package-native-inputs python-matplotlib)))
4087 (arguments
4088 `(#:tests? #f ; we're only generating documentation
4089 #:phases
4090 (modify-phases %standard-phases
5ea654cf
RW
4091 ;; The tests in python-matplotlib are run after the install phase, so
4092 ;; we need to delete the extra phase here.
4093 (delete 'check)
44d10b1f
RW
4094 (replace 'build
4095 (lambda _
4096 (chdir "doc")
e7a53914
RW
4097 (setenv "PYTHONPATH"
4098 (string-append (getenv "PYTHONPATH")
4099 ":" (getcwd) "/../examples/units"))
44d10b1f 4100 (substitute* "conf.py"
e7a53914
RW
4101 ;; Don't use git.
4102 (("^SHA = check_output.*")
4103 (string-append "SHA = \"" ,version "\"\n"))
4104 ;; Don't fetch intersphinx files from the Internet
4105 (("^explicit_order_folders" m)
4106 (string-append "intersphinx_mapping = {}\n" m))
4107 (("'sphinx.ext.intersphinx',") "")
4108 ;; Disable URL embedding which requires internet access.
4109 (("'https://docs.scipy.org/doc/numpy'") "None")
4110 (("'https://docs.scipy.org/doc/scipy/reference'") "None"))
4111 (invoke "make"
4112 "SPHINXBUILD=sphinx-build"
4113 "SPHINXOPTS=" ; don't abort on warnings
4114 "html" "texinfo")))
44d10b1f
RW
4115 (replace 'install
4116 (lambda* (#:key inputs outputs #:allow-other-keys)
4117 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
4118 (doc (string-append data "/doc/python-matplotlib-" ,version))
4119 (info (string-append data "/info"))
4120 (html (string-append doc "/html")))
4121 (mkdir-p html)
4122 (mkdir-p info)
4123 (copy-recursively "build/html" html)
4124 (symlink (string-append html "/_images")
4125 (string-append info "/matplotlib-figures"))
4126 (with-directory-excursion "build/texinfo"
4127 (substitute* "matplotlib.texi"
4128 (("@image\\{([^,]*)" all file)
4129 (string-append "@image{matplotlib-figures/" file)))
4130 (symlink (string-append html "/_images")
4131 "./matplotlib-figures")
e7a53914
RW
4132 (invoke "makeinfo" "--no-split"
4133 "-o" "matplotlib.info" "matplotlib.texi"))
4134 (install-file "build/texinfo/matplotlib.info" info))
44d10b1f
RW
4135 #t)))))
4136 (home-page (package-home-page python-matplotlib))
4137 (synopsis "Documentation for the python-matplotlib package")
4138 (description (package-description python-matplotlib))
4139 (license (package-license python-matplotlib))))
4140
4141(define-public python2-matplotlib-documentation
5ad0a452
RW
4142 (let ((parent (package-with-python2 python-matplotlib-documentation)))
4143 (package
4144 (inherit parent)
4145 (native-inputs
4146 (alist-delete "python-sphinx-copybutton"
4147 (package-native-inputs parent))))))
44d10b1f 4148
55dae98f
RW
4149(define-public python-matplotlib-venn
4150 (package
4151 (name "python-matplotlib-venn")
4152 (version "0.11.5")
4153 (source
4154 (origin
4155 (method url-fetch)
4156 (uri (pypi-uri "matplotlib-venn" version ".zip"))
4157 (sha256
4158 (base32
4159 "13w3i1wih0mij08hrgppzg0g9z50y54rc28l6gdi1r5w45l7l0dy"))))
4160 (build-system python-build-system)
4161 (arguments '(#:tests? #f)) ; tests are not included
4162 (propagated-inputs
4163 `(("python-matplotlib" ,python-matplotlib)
4164 ("python-numpy" ,python-numpy)
4165 ("python-scipy" ,python-scipy)))
4166 (native-inputs
4167 `(("unzip" ,unzip)))
4168 (home-page "https://github.com/konstantint/matplotlib-venn")
4169 (synopsis "Plot area-proportional Venn diagrams")
4170 (description
4171 "This package provides tools for plotting area-proportional two- and
4172three-way Venn diagrams in @code{matplotlib}.")
4173 (license license:expat)))
4174
44d10b1f
RW
4175(define-public python2-pysnptools
4176 (package
4177 (name "python2-pysnptools")
5d1ade85 4178 (version "0.3.13")
44d10b1f
RW
4179 (source
4180 (origin
4181 (method url-fetch)
5d1ade85 4182 (uri (pypi-uri "pysnptools" version))
44d10b1f
RW
4183 (sha256
4184 (base32
5d1ade85 4185 "0lnis5xsl7bi0hz4f7gbicahzi5zlxkc21nk3g374xv8fb5hb3qm"))))
44d10b1f
RW
4186 (build-system python-build-system)
4187 (arguments
5d1ade85
RW
4188 `(#:python ,python-2 ; only Python 2.7 is supported
4189 #:tests? #f)) ; test files (e.g. examples/toydata.bim) not included
44d10b1f
RW
4190 (propagated-inputs
4191 `(("python2-numpy" ,python2-numpy)
4192 ("python2-scipy" ,python2-scipy)
4193 ("python2-pandas" ,python2-pandas)))
44d10b1f 4194 (native-inputs
5d1ade85 4195 `(("python2-cython" ,python2-cython)))
1b66989b 4196 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
44d10b1f
RW
4197 (synopsis "Library for reading and manipulating genetic data")
4198 (description
4199 "PySnpTools is a library for reading and manipulating genetic data. It
4200can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
4201those files. It can also efficiently manipulate ranges of integers using set
4202operators such as union, intersection, and difference.")
4203 (license license:asl2.0)))
4204
44d10b1f
RW
4205(define-public python-socksipy-branch
4206 (package
4207 (name "python-socksipy-branch")
4208 (version "1.01")
4209 (source
4210 (origin
4211 (method url-fetch)
4212 (uri (pypi-uri "SocksiPy-branch" version))
4213 (sha256
4214 (base32
4215 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
4216 (build-system python-build-system)
4217 (arguments
4218 `(#:tests? #f)) ; There are no tests
4219 (home-page "https://code.google.com/archive/p/socksipy-branch/")
4220 (synopsis "Python SOCKS module")
4221 (description
4222 "SocksiPy - A Python SOCKS client module. It provides a
4223socket-like interface that supports connections to any TCP
4224service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
4225The original version was developed by Dan Haim, this is a
4226branch created by Mario Vilas to address some open issues,
4227as the original project seems to have been abandoned circa 2007.")
4228 (license license:bsd-3)))
4229
4230(define-public python2-socksipy-branch
4231 (package-with-python2 python-socksipy-branch))
4232
6fcceb23
AG
4233(define-public python-socksipychain
4234 (package
4235 (name "python-socksipychain")
d97cdff1 4236 (version "2.1.0")
6fcceb23
AG
4237 (source
4238 (origin
4239 (method git-fetch)
4240 (uri (git-reference
4241 (url "https://github.com/pagekite/PySocksipyChain.git")
4242 (commit (string-append "v" version))))
4243 (file-name (git-file-name name version))
4244 (sha256
4245 (base32
d97cdff1 4246 "0idm9a050rd2kbgbz2sk9ib9589kj4xh1xdnggs6xbq2v2y8f6zn"))))
6fcceb23
AG
4247 (build-system python-build-system)
4248 (arguments
4249 `(#:tests? #f)) ; Tests try to access the network.
4250 (home-page "http://pagekite.net/wiki/Floss/PySocksipyChain/")
4251 (synopsis "Python SOCKS module with chained proxies support")
4252 (description
4253 "SocksiPyChain is a modified version of the SocksiPy SOCKS module, which
4254adds support for arbitrary chaining of proxy servers and various modes of
4255TLS/SSL encryption. It was developed for use in PageKite, and also includes
4256a simple netcat replacement with chaining support.")
4257 (license license:bsd-3)))
4258
44d10b1f
RW
4259(define-public python-pycodestyle
4260 (package
4261 (name "python-pycodestyle")
d16ef28b 4262 (version "2.5.0")
44d10b1f 4263 (source
ba88eea2
RW
4264 (origin
4265 (method url-fetch)
4266 (uri (pypi-uri "pycodestyle" version))
4267 (sha256
4268 (base32
d16ef28b 4269 "0v4prb05n21bm8650v0a01k1nyqjdmkrsm3zycfxh2j5k9n962p4"))))
44d10b1f
RW
4270 (build-system python-build-system)
4271 (home-page "https://pycodestyle.readthedocs.io/")
4272 (synopsis "Python style guide checker")
4273 (description "@code{pycodestyle} (formerly pep8) is a tool to check
4274Python code against some of the style conventions in
4275@url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
4276 (license license:expat)))
4277
4278(define-public python2-pycodestyle
4279 (package-with-python2 python-pycodestyle))
4280
4281(define-public python-multidict
4282 (package
4283 (name "python-multidict")
4284 (version "4.2.0")
4285 (source
4286 (origin
4287 (method url-fetch)
4288 (uri (pypi-uri "multidict" version))
4289 (sha256
4290 (base32
4291 "1vf5bq8hn5a9rvhr5v4fwbmarfsp35hhr8gs74kqfijy34j2f194"))))
4292 (build-system python-build-system)
4293 (native-inputs
4294 `(("python-pytest" ,python-pytest)
4295 ("python-pytest-runner" ,python-pytest-runner)))
4296 (home-page "https://github.com/aio-libs/multidict/")
4297 (synopsis "Multidict implementation")
4298 (description "Multidict is dict-like collection of key-value pairs
4299where key might be occurred more than once in the container.")
4300 (license license:asl2.0)))
4301
4302(define-public python-orderedmultidict
4303 (package
4304 (name "python-orderedmultidict")
4305 (version "0.7.11")
4306 (source
4307 (origin
4308 (method url-fetch)
4309 (uri (pypi-uri "orderedmultidict" version))
4310 (sha256
4311 (base32
4312 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
4313 (build-system python-build-system)
4314 (arguments
4315 `(#:phases
4316 (modify-phases %standard-phases
4317 (add-after 'unpack 'fix-tests
4318 (lambda _
4319 ;; The package uses nosetest for running the tests.
4320 ;; Adding this initfile allows to run the test suite
4321 ;; without requiring nosetest.
d1c4f329
RW
4322 (with-output-to-file "tests/__init__.py" newline)
4323 #t)))))
44d10b1f
RW
4324 (propagated-inputs
4325 `(("python-six" ,python-six)))
4326 (native-inputs
4327 `(("python-pycodestyle" ,python-pycodestyle)))
4328 (home-page "https://github.com/gruns/orderedmultidict")
4329 (synopsis "Python Ordered Multivalue Dictionary - omdict")
4330 (description "This package contains a library for ordered multivalue
4331dictionaries. A multivalue dictionary is a dictionary that can store
4332multiple values for the same key. An ordered multivalue dictionary is a
4333multivalue dictionary that retains the order of insertions and deletions.")
4334 (license license:unlicense)))
4335
4336(define-public python2-orderedmultidict
4337 (package-with-python2 python-orderedmultidict))
4338
4339(define-public python-autopep8
4340 (package
4341 (name "python-autopep8")
4342 (version "1.3.5")
4343 (source
4344 (origin
4345 (method url-fetch)
4346 (uri (pypi-uri "autopep8" version))
4347 (sha256
4348 (base32
4349 "192bvhzi4d0claqxgzymvv7k3qnj627742bc8sgxpzjj42pd9112"))))
4350 (build-system python-build-system)
4351 (propagated-inputs
4352 `(("python-pycodestyle" ,python-pycodestyle)))
4353 (home-page "https://github.com/hhatto/autopep8")
4354 (synopsis "Format Python code according to the PEP 8 style guide")
4355 (description
4356 "@code{autopep8} automatically formats Python code to conform to
4357the PEP 8 style guide. It uses the pycodestyle utility to determine
4358what parts of the code needs to be formatted. @code{autopep8} is
4359capable of fixing most of the formatting issues that can be reported
4360by pycodestyle.")
4361 (license (license:non-copyleft
4362 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
4363
4364(define-public python2-autopep8
4365 (package-with-python2 python-autopep8))
4366
4367(define-public python-distutils-extra
4368 (package
4369 (name "python-distutils-extra")
4370 (version "2.38")
4371 (source
4372 (origin
4373 (method url-fetch)
4374 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4375 version "/+download/python-distutils-extra-"
4376 version ".tar.gz"))
4377 (sha256
4378 (base32
4379 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4380 (build-system python-build-system)
4381 (home-page "https://launchpad.net/python-distutils-extra/")
4382 (synopsis "Enhancements to Python's distutils")
4383 (description
4384 "The python-distutils-extra module enables you to easily integrate
4385gettext support, themed icons, and scrollkeeper-based documentation into
4386Python's distutils.")
4387 (license license:gpl2)))
4388
4389(define-public python2-distutils-extra
4390 (package-with-python2 python-distutils-extra))
4391
4392(define-public python2-elib.intl
4393 (package
4394 (name "python2-elib.intl")
4395 (version "0.0.3")
4396 (source
4397 (origin
4398 ;; This project doesn't tag releases or publish tarballs, so we take
4399 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4400 (method git-fetch)
4401 (uri (git-reference
4402 (url "https://github.com/dieterv/elib.intl.git")
4403 (commit "d09997cfef")))
4404 (file-name (string-append name "-" version "-checkout"))
4405 (sha256
4406 (base32
4407 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4408 (build-system python-build-system)
4409 (arguments
4410 ;; incompatible with Python 3 (exception syntax)
4411 `(#:python ,python-2
4412 #:tests? #f))
4413 (home-page "https://github.com/dieterv/elib.intl")
4414 (synopsis "Enhanced internationalization for Python")
4415 (description
4416 "The elib.intl module provides enhanced internationalization (I18N)
4417services for your Python modules and applications.")
4418 (license license:lgpl3+)))
4419
4420(define-public python-olefile
4421 (package
4422 (name "python-olefile")
5bef0f10 4423 (version "0.46")
44d10b1f
RW
4424 (source
4425 (origin
4426 (method url-fetch)
5bef0f10
MB
4427 (uri (string-append "https://github.com/decalage2/olefile/releases/"
4428 "download/v" version "/olefile-" version ".tar.gz"))
44d10b1f
RW
4429 (file-name (string-append name "-" version ".tar.gz"))
4430 (sha256
4431 (base32
5bef0f10 4432 "1kjxh4gr651hpqkjfv89cfzr40hyvf3vjlda7mifiail83j7j07m"))))
44d10b1f 4433 (build-system python-build-system)
5bef0f10 4434 (home-page "https://www.decalage.info/python/olefileio")
44d10b1f
RW
4435 (synopsis "Read and write Microsoft OLE2 files.")
4436 (description
4437 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
4438Storage or Compound Document, Microsoft Office). It is an improved version of
4439the OleFileIO module from PIL, the Python Image Library.")
4440 (license license:bsd-3)))
4441
4442(define-public python2-olefile
4443 (package-with-python2 python-olefile))
4444
4445(define-public python-pillow
4446 (package
4447 (name "python-pillow")
5fbdd917 4448 (version "6.2.1")
44d10b1f
RW
4449 (source
4450 (origin
4451 (method url-fetch)
4452 (uri (pypi-uri "Pillow" version))
4453 (sha256
4454 (base32
5fbdd917 4455 "1c8wkzc58f5wdh006jvmwdk3wxld1xgagcbdvj7iv17qi0m9fkmz"))))
44d10b1f
RW
4456 (build-system python-build-system)
4457 (native-inputs
4458 `(("python-pytest" ,python-pytest)))
4459 (inputs
4460 `(("freetype" ,freetype)
4461 ("lcms" ,lcms)
4bd428a7 4462 ("libjpeg" ,libjpeg-turbo)
44d10b1f 4463 ("libtiff" ,libtiff)
0c4e1c5f
EF
4464 ("libwebp" ,libwebp)
4465 ("openjpeg" ,openjpeg)
4466 ("zlib" ,zlib)))
44d10b1f
RW
4467 (propagated-inputs
4468 `(("python-olefile" ,python-olefile)))
4469 (arguments
4470 `(#:phases
4471 (modify-phases %standard-phases
4472 (add-after 'unpack 'patch-ldconfig
4473 (lambda _
4474 (substitute* "setup.py"
4475 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
61b77ff3 4476 (replace 'check
979d8464
EF
4477 (lambda* (#:key outputs inputs tests? #:allow-other-keys)
4478 (if tests?
4479 (begin
4480 (setenv "HOME" (getcwd))
4481 ;; Make installed package available for running the tests.
4482 (add-installed-pythonpath inputs outputs)
4483 (invoke "python" "selftest.py" "--installed")
4484 (invoke "python" "-m" "pytest" "-vv"))
4485 #t))))))
44d10b1f
RW
4486 (home-page "https://python-pillow.org")
4487 (synopsis "Fork of the Python Imaging Library")
4488 (description
4489 "The Python Imaging Library adds image processing capabilities to your
4490Python interpreter. This library provides extensive file format support, an
4491efficient internal representation, and fairly powerful image processing
4492capabilities. The core image library is designed for fast access to data
4493stored in a few basic pixel formats. It should provide a solid foundation for
4494a general image processing tool.")
4495 (license (license:x11-style
4496 "http://www.pythonware.com/products/pil/license.htm"
4497 "The PIL Software License"))))
4498
4499(define-public python2-pillow
4500 (package-with-python2 python-pillow))
4501
4502(define-public python-pycparser
4503 (package
4504 (name "python-pycparser")
c6c0940e 4505 (version "2.19")
44d10b1f
RW
4506 (source
4507 (origin
4508 (method url-fetch)
4509 (uri (pypi-uri "pycparser" version))
4510 (sha256
4511 (base32
c6c0940e 4512 "1cr5dcj9628lkz1qlwq3fv97c25363qppkmcayqvd05dpy573259"))))
44d10b1f
RW
4513 (outputs '("out" "doc"))
4514 (build-system python-build-system)
4515 (native-inputs
4516 `(("pkg-config" ,pkg-config)))
4517 (arguments
4518 `(#:phases
4519 (modify-phases %standard-phases
4520 (replace 'check
4521 (lambda _
4522 (with-directory-excursion "tests"
acb75c03
RW
4523 (invoke "python" "all_tests.py"))
4524 #t))
44d10b1f
RW
4525 (add-after 'install 'install-doc
4526 (lambda* (#:key outputs #:allow-other-keys)
4527 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4528 (doc (string-append data "/doc/" ,name "-" ,version))
4529 (examples (string-append doc "/examples")))
4530 (mkdir-p examples)
4531 (for-each (lambda (file)
4532 (copy-file (string-append "." file)
4533 (string-append doc file)))
4534 '("/README.rst" "/CHANGES" "/LICENSE"))
c6c0940e
MB
4535 (copy-recursively "examples" examples)
4536 #t))))))
44d10b1f
RW
4537 (home-page "https://github.com/eliben/pycparser")
4538 (synopsis "C parser in Python")
4539 (description
4540 "Pycparser is a complete parser of the C language, written in pure Python
4541using the PLY parsing library. It parses C code into an AST and can serve as
4542a front-end for C compilers or analysis tools.")
4543 (license license:bsd-3)))
4544
4545(define-public python2-pycparser
4546 (package-with-python2 python-pycparser))
4547
4548(define-public python-pywavelets
4549 (package
4550 (name "python-pywavelets")
4551 (version "1.0.1")
4552 (home-page "https://github.com/PyWavelets/pywt")
4553 (source (origin
4554 (method url-fetch)
4555 (uri (pypi-uri "PyWavelets" version))
4556 (sha256
4557 (base32
4558 "1p3qv2v66ghnqrb1f98wyyhp9dz71jwcd6kfpsax65sfdpiyqp1w"))))
4559 (build-system python-build-system)
4560 (arguments
4561 '(#:modules ((ice-9 ftw)
4562 (srfi srfi-1)
4563 (srfi srfi-26)
4564 (guix build utils)
4565 (guix build python-build-system))
4566 #:phases (modify-phases %standard-phases
4567 (replace 'check
4568 (lambda _
4569 (let ((cwd (getcwd))
4570 (libdir (find (cut string-prefix? "lib." <>)
4571 (scandir "build"))))
4572 (with-directory-excursion (string-append cwd "/build/" libdir)
4573 (invoke "nosetests" "-v" "."))))))))
4574 (native-inputs
4575 `(("python-matplotlib" ,python-matplotlib) ;for tests
4576 ("python-nose" ,python-nose)))
4577 (propagated-inputs
4578 `(("python-numpy" ,python-numpy)))
4579 (synopsis "Wavelet transforms in Python")
4580 (description
4581 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
4582mathematical basis functions that are localized in both time and frequency.
4583Wavelet transforms are time-frequency transforms employing wavelets. They are
4584similar to Fourier transforms, the difference being that Fourier transforms are
4585localized only in frequency instead of in time and frequency.")
4586 (license license:expat)))
4587
4588(define-public python2-pywavelets
4589 (package-with-python2 python-pywavelets))
4590
4591(define-public python-xcffib
4592 (package
4593 (name "python-xcffib")
4594 (version "0.6.0")
4595 (source
4596 (origin
4597 (method url-fetch)
4598 (uri (pypi-uri "xcffib" version))
4599 (sha256
4600 (base32
4601 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
4602 (build-system python-build-system)
4603 (inputs
4604 `(("libxcb" ,libxcb)))
4605 (propagated-inputs
4606 `(("python-cffi" ,python-cffi) ; used at run time
4607 ("python-six" ,python-six)))
4608 (arguments
4609 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
4610 #:tests? #f
4611 #:phases
4612 (modify-phases %standard-phases
4613 (add-after 'unpack 'fix-libxcb-path
4614 (lambda* (#:key inputs #:allow-other-keys)
4615 (let ((libxcb (assoc-ref inputs "libxcb")))
4616 (substitute* '("xcffib/__init__.py")
4617 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
4618 #t)))
4619 (add-after 'install 'install-doc
4620 (lambda* (#:key outputs #:allow-other-keys)
4621 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4622 "/doc/" ,name "-" ,version)))
4623 (mkdir-p doc)
4624 (copy-file "README.md"
4625 (string-append doc "/README.md"))
4626 #t))))))
4627 (home-page "https://github.com/tych0/xcffib")
4628 (synopsis "XCB Python bindings")
4629 (description
4630 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4631support for Python 3 and PyPy. It is based on cffi.")
4632 (license license:expat)))
4633
4634(define-public python2-xcffib
4635 (package-with-python2 python-xcffib))
4636
4637(define-public python-cairocffi
4638 (package
4639 (name "python-cairocffi")
4640 (version "0.9.0")
4641 (source
4642 (origin
4643 (method url-fetch)
4644 (uri (pypi-uri "cairocffi" version))
4645 (sha256
4646 (base32
4647 "0dq3k4zhqd8cwsf3nyjqvjqm8wkvrjn1wjf44rl3v0h8kqx6qf0m"))
4648 (patches (search-patches "python-cairocffi-dlopen-path.patch"))))
4649 (build-system python-build-system)
4650 (outputs '("out" "doc"))
4651 (inputs
4652 `(("glib" ,glib)
4653 ("gtk+" ,gtk+)
4654 ("gdk-pixbuf" ,gdk-pixbuf)
4655 ("cairo" ,cairo)
4656 ("pango" ,pango)))
4657 (native-inputs
4658 `(("pkg-config" ,pkg-config)
4659 ("python-pytest" ,python-pytest)
4660 ("python-pytest-cov" ,python-pytest-cov)
4661 ("python-pytest-runner" ,python-pytest-runner)
4662 ("python-sphinx" ,python-sphinx)
4663 ("python-docutils" ,python-docutils)))
4664 (propagated-inputs
4665 `(("python-xcffib" ,python-xcffib))) ; used at run time
4666 (arguments
4667 `(#:phases
4668 (modify-phases %standard-phases
4669 (add-after 'unpack 'patch-paths
4670 (lambda* (#:key inputs outputs #:allow-other-keys)
4671 (substitute* (find-files "." "\\.py$")
4672 (("dlopen\\(ffi, 'cairo'")
4673 (string-append "dlopen(ffi, '" (assoc-ref inputs "cairo")
4674 "/lib/libcairo.so.2'"))
4675 (("dlopen\\(ffi, 'gdk-3'")
4676 (string-append "dlopen(ffi, '" (assoc-ref inputs "gtk+")
4677 "/lib/libgtk-3.so.0'"))
4678 (("dlopen\\(ffi, 'gdk_pixbuf-2.0'")
4679 (string-append "dlopen(ffi, '" (assoc-ref inputs "gdk-pixbuf")
4680 "/lib/libgdk_pixbuf-2.0.so.0'"))
4681 (("dlopen\\(ffi, 'glib-2.0'")
4682 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4683 "/lib/libglib-2.0.so.0'"))
4684 (("dlopen\\(ffi, 'gobject-2.0'")
4685 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4686 "/lib/libgobject-2.0.so.0'"))
4687 (("dlopen\\(ffi, 'pangocairo-1.0'")
4688 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4689 "/lib/libpangocairo-1.0.so.0'"))
4690 (("dlopen\\(ffi, 'pango-1.0'")
4691 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4692 "/lib/libpango-1.0.so.0'")))
4693 #t))
4694 (add-after 'install 'install-doc
4695 (lambda* (#:key inputs outputs #:allow-other-keys)
4696 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4697 (doc (string-append data "/doc/" ,name "-" ,version))
4698 (html (string-append doc "/html")))
4699 (setenv "LD_LIBRARY_PATH"
4700 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4701 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4702 (setenv "LANG" "en_US.UTF-8")
4703 (mkdir-p html)
4704 (for-each (lambda (file)
4705 (copy-file (string-append "." file)
4706 (string-append doc file)))
4707 '("/README.rst" "/CHANGES" "/LICENSE"))
4708 (system* "python" "setup.py" "build_sphinx")
4709 (copy-recursively "docs/_build/html" html)
4710 #t))))))
4711 (home-page "https://github.com/Kozea/cairocffi")
4712 (synopsis "Python bindings and object-oriented API for Cairo")
4713 (description
4714 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4715Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4716graphics library with support for multiple backends including image buffers,
4717PNG, PostScript, PDF, and SVG file output.")
4718 (license license:bsd-3)))
4719
4720(define-public python2-cairocffi
4721 (package-with-python2 python-cairocffi))
4722
4723(define-public python-decorator
4724 (package
4725 (name "python-decorator")
4726 (version "4.3.0")
4727 (source
4728 (origin
4729 (method url-fetch)
4730 (uri (pypi-uri "decorator" version))
4731 (sha256
4732 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
4733 (build-system python-build-system)
4734 (home-page "https://pypi.python.org/pypi/decorator/")
4735 (synopsis "Python module to simplify usage of decorators")
4736 (description
4737 "The aim of the decorator module is to simplify the usage of decorators
4738for the average programmer, and to popularize decorators usage giving examples
4739of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4740etc. The core of this module is a decorator factory.")
4741 (license license:expat)))
4742
4743(define-public python2-decorator
4744 (package-with-python2 python-decorator))
4745
4746(define-public python-drmaa
4747 (package
4748 (name "python-drmaa")
4749 (version "0.7.7")
4750 (source
4751 (origin
4752 (method url-fetch)
4753 (uri (pypi-uri "drmaa" version))
4754 (sha256
4755 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
4756 (build-system python-build-system)
4757 ;; The test suite requires libdrmaa which is provided by the cluster
4758 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4759 ;; should be set to the path of the libdrmaa library.
4760 (arguments '(#:tests? #f))
4761 (native-inputs
4762 `(("python-nose" ,python-nose)))
4763 (home-page "https://pypi.python.org/pypi/drmaa")
4764 (synopsis "Python bindings for the DRMAA library")
4765 (description
4766 "A Python package for Distributed Resource Management (DRM) job
4767submission and control. This package is an implementation of the DRMAA 1.0
4768Python language binding specification.")
4769 (license license:bsd-3)))
4770
4771(define-public python2-drmaa
4772 (package-with-python2 python-drmaa))
4773
4774(define-public python-grako
4775 (package
4776 (name "python-grako")
4777 (version "3.99.9")
4778 (source
4779 (origin
4780 (method url-fetch)
4781 (uri
4782 (pypi-uri "grako" version ".zip"))
4783 (sha256
4784 (base32
4785 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
4786 (build-system python-build-system)
4787 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
4788 (native-inputs
4789 `(("unzip" ,unzip)
4790 ("python-pytest" ,python-pytest)
4791 ("python-pytest-runner" ,python-pytest-runner)))
4792 (home-page "https://bitbucket.org/neogeny/grako")
4793 (synopsis "EBNF parser generator")
4794 (description
4795 "Grako takes a grammar in a variation of EBNF as input, and outputs a
4796memoizing PEG/Packrat parser in Python.")
4797 (license license:bsd-3)))
4798
4799(define-public python2-grako
4800 (package-with-python2 python-grako))
4801
4802(define-public python-gridmap
4803 (package
4804 (name "python-gridmap")
4805 (version "0.13.0")
4806 (source
4807 (origin
768fea0f
TGR
4808 (method git-fetch)
4809 (uri (git-reference
4810 (url "https://github.com/pygridtools/gridmap.git")
4811 (commit (string-append "v" version))))
4812 (file-name (git-file-name name version))
44d10b1f 4813 (sha256
768fea0f 4814 (base32 "1478lbwsr1w24cii2x01m2910fvh8r43ghnb78nc972a96hqiknm"))))
44d10b1f
RW
4815 (build-system python-build-system)
4816 (arguments
4817 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
4818 (propagated-inputs
4819 `(("python-psutil" ,python-psutil)
4820 ("python-drmaa" ,python-drmaa)
4821 ("python-pyzmq" ,python-pyzmq)))
4822 (home-page "https://github.com/pygridtools/gridmap")
4823 (synopsis "Create jobs on a cluster directly from Python")
4824 (description
4825 "Gridmap is a Python package to allow you to easily create jobs on the
4826cluster directly from Python. You can directly map Python functions onto the
4827cluster without needing to write any wrapper code yourself.")
4828 (license license:gpl3+)))
4829
4830(define-public python2-gridmap
4831 (package-with-python2 python-gridmap))
4832
4833(define-public python-honcho
4834 (package
4835 (name "python-honcho")
4836 (version "1.0.1")
4837 (source
4838 (origin
8524d130
TGR
4839 (method git-fetch)
4840 (uri (git-reference
4841 (url "https://github.com/nickstenning/honcho.git")
4842 (commit (string-append "v" version))))
4843 (file-name (git-file-name name version))
44d10b1f 4844 (sha256
8524d130 4845 (base32 "11bd87474qpif20xdcn0ra1idj5k16ka51i658wfpxwc6nzsn92b"))))
44d10b1f
RW
4846 (build-system python-build-system)
4847 (native-inputs
4848 `(("python-pytest" ,python-pytest)
4849 ("python-mock" ,python-mock)
4850 ("python-tox" ,python-tox)
4851 ("which" ,which))) ;for tests
4852 (propagated-inputs
4853 `(("python-jinja2" ,python-jinja2)))
4854 (arguments
4855 `(#:phases
4856 (modify-phases %standard-phases
4857 (delete 'check)
4858 (add-after 'install 'check
4859 (lambda* (#:key outputs inputs #:allow-other-keys)
4860 ;; fix honcho path in testsuite
4861 (substitute* "tests/conftest.py"
4862 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
4863 "/bin/honcho" "'")))
4864 ;; It's easier to run tests after install.
4865 ;; Make installed package available for running the tests
4866 (add-installed-pythonpath inputs outputs)
95b707fb 4867 (invoke "py.test" "-v"))))))
44d10b1f
RW
4868 (home-page "https://github.com/nickstenning/honcho")
4869 (synopsis "Manage Procfile-based applications")
4870 (description
4871 "A Procfile is a file which describes how to run an application
50fceab0 4872consisting of several processes. honcho starts all listed processes.
44d10b1f
RW
4873The output of all running processes is collected by honcho and
4874displayed.")
4875 (license license:expat)))
4876
4877(define-public python2-honcho
4878 (package-with-python2 python-honcho))
4879
4880(define-public python-pexpect
4881 (package
4882 (name "python-pexpect")
4883 (version "4.6.0")
4884 (source
4885 (origin
4886 (method url-fetch)
4887 (uri (pypi-uri "pexpect" version))
4888 (sha256
4889 (base32 "1fla85g47iaxxpjhp9vkxdnv4pgc7rplfy6ja491smrrk0jqi3ia"))))
4890 (build-system python-build-system)
4891 (arguments
4892 `(#:phases
4893 (modify-phases %standard-phases
4894 (add-before 'check 'prepare-tests
4895 (lambda _
4896 (substitute* (find-files "tests")
4897 (("/bin/ls") (which "ls"))
4898 (("/bin/echo") (which "echo"))
4899 (("/bin/which") (which "which"))
4900 ;; Many tests try to use the /bin directory which
4901 ;; is not present in the build environment.
4902 ;; Use one that's non-empty and unlikely to change.
4903 (("/bin'") "/dev'"))
4904 ;; XXX: Socket connection test gets "Connection reset by peer".
4905 ;; Why does it not work? Delete for now.
4906 (delete-file "tests/test_socket.py")
4907 #t))
4908 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
4909 (native-inputs
4910 `(("python-nose" ,python-nose)
4911 ("python-pytest" ,python-pytest)
4912 ("man-db" ,man-db)
4913 ("which" ,which)
4914 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
4915 (propagated-inputs
4916 `(("python-ptyprocess" ,python-ptyprocess)))
4917 (home-page "http://pexpect.readthedocs.org/")
4918 (synopsis "Controlling interactive console applications")
4919 (description
4920 "Pexpect is a pure Python module for spawning child applications;
4921controlling them; and responding to expected patterns in their output.
4922Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4923child application and control it as if a human were typing commands.")
4924 (license license:isc)))
4925
4926(define-public python2-pexpect
4927 (package-with-python2 python-pexpect))
4928
4929(define-public python-setuptools-scm
4930 (package
4931 (name "python-setuptools-scm")
1c4746ee 4932 (version "3.3.3")
44d10b1f
RW
4933 (source (origin
4934 (method url-fetch)
4935 (uri (pypi-uri "setuptools_scm" version))
4936 (sha256
4937 (base32
1c4746ee 4938 "19cyndx23xmpbhz4qrwmfwsmnnaczd0dw7qg977ksq2dbvxy29dx"))))
44d10b1f
RW
4939 (build-system python-build-system)
4940 (home-page "https://github.com/pypa/setuptools_scm/")
4941 (synopsis "Manage Python package versions in SCM metadata")
4942 (description
4943 "Setuptools_scm handles managing your Python package versions in
4944@dfn{software configuration management} (SCM) metadata instead of declaring
4945them as the version argument or in a SCM managed file.")
4946 (license license:expat)))
4947
4948(define-public python2-setuptools-scm
4949 (package-with-python2 python-setuptools-scm))
4950
bb74ea09
RW
4951(define-public python-pathlib2
4952 (package
4953 (name "python-pathlib2")
4954 (version "2.3.3")
4955 (source
4956 (origin
4957 (method url-fetch)
4958 (uri (pypi-uri "pathlib2" version))
4959 (sha256
4960 (base32
4961 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
4962 (build-system python-build-system)
4963 (propagated-inputs
4964 `(("python-scandir" ,python-scandir)
4965 ("python-six" ,python-six)))
4966 (home-page "https://pypi.python.org/pypi/pathlib2/")
746d3384 4967 (synopsis "Object-oriented file system paths")
bb74ea09
RW
4968 (description "The goal of pathlib2 is to provide a backport of the
4969standard @code{pathlib} module which tracks the standard library module, so
4970all the newest features of the standard @code{pathlib} can be used also on
4971older Python versions.")
4972 (license license:expat)))
4973
fd5c264a
MB
4974(define-public python2-importlib-resources
4975 (package
4976 (name "python2-importlib-resources")
4977 (version "1.0.2")
4978 (source (origin
4979 (method url-fetch)
4980 (uri (pypi-uri "importlib_resources" version))
4981 (sha256
4982 (base32
4983 "0y3hg12iby1qyaspnbisz4s4vxax7syikk3skznwqizqyv89y9yk"))))
4984 (build-system python-build-system)
4985 (arguments
5e7202bb
MB
4986 `(#:python ,python-2
4987 #:phases (modify-phases %standard-phases
4988 ;; The build system tests for python-wheel, but it is
4989 ;; not required for Guix nor the test suite. Just drop
4990 ;; it to make bootstrapping pytest easier.
4991 (add-after 'unpack 'drop-wheel-dependency
4992 (lambda _
4993 (substitute* "setup.cfg"
4994 (("^[[:blank:]]+wheel")
4995 ""))
4996 #t)))))
fd5c264a
MB
4997 (propagated-inputs
4998 `(("python-pathlib2" ,python2-pathlib2)
4999 ("python-typing" ,python2-typing)))
5000 (home-page "https://gitlab.com/python-devs/importlib_resources")
5001 (synopsis "Backport of @code{importlib.resources} from Python 3.7")
5002 (description
5003 "This package provides an implementation of @code{importlib.resources}
5004for older versions of Python.")
5005 (license license:asl2.0)))
5006
15b65617
RW
5007(define-public python-importlib-metadata
5008 (package
5009 (name "python-importlib-metadata")
4dc04d11 5010 (version "1.4.0")
15b65617
RW
5011 (source
5012 (origin
5013 (method url-fetch)
5014 (uri (pypi-uri "importlib_metadata" version))
5015 (sha256
4dc04d11 5016 (base32 "1n76444v7zn910xrhh8954jdn4byxbn9f1jck6b85a716mbh2z7i"))))
15b65617
RW
5017 (build-system python-build-system)
5018 (propagated-inputs
4dc04d11 5019 `(("python-zipp" ,python-zipp)))
15b65617
RW
5020 (native-inputs
5021 `(("python-setuptools-scm" ,python-setuptools-scm)
4dc04d11 5022 ("python-packaging" ,python-packaging)))
15b65617
RW
5023 (home-page "https://importlib-metadata.readthedocs.io/")
5024 (synopsis "Read metadata from Python packages")
5025 (description
5026 "@code{importlib_metadata} is a library which provides an API for
5027accessing an installed Python package's metadata, such as its entry points or
5028its top-level name. This functionality intends to replace most uses of
5029@code{pkg_resources} entry point API and metadata API. Along with
5030@code{importlib.resources} in Python 3.7 and newer, this can eliminate the
5031need to use the older and less efficient @code{pkg_resources} package.")
3dfb3d44 5032 (properties `((python2-variant . ,(delay python2-importlib-metadata))))
15b65617
RW
5033 (license license:asl2.0)))
5034
5efa04dd
MB
5035(define-public python2-importlib-metadata
5036 (let ((base (package-with-python2 (strip-python2-variant
5037 python-importlib-metadata))))
5038 (package/inherit
5039 base
5040 (name "python2-importlib-metadata")
5041 (propagated-inputs
5042 `(("python-configparser" ,python2-configparser)
5043 ("python-contextlib2" ,python2-contextlib2)
5044 ("python-importlib-resources" ,python2-importlib-resources)
5045 ("python-pathlib2" ,python2-pathlib2)
5046 ,@(package-propagated-inputs base))))))
5047
37c173d1
RW
5048(define-public python-jaraco-packaging
5049 (package
5050 (name "python-jaraco-packaging")
5051 (version "6.1")
5052 (source
5053 (origin
5054 (method url-fetch)
5055 (uri (pypi-uri "jaraco.packaging" version))
5056 (sha256
5057 (base32
5058 "0zimrnkh33b9g8ffw11mjh6kvs54cy5gcjw1h5cl1r7dc833dmkm"))))
5059 (build-system python-build-system)
5060 (propagated-inputs
5061 `(("python-pytest" ,python-pytest)
5062 ("python-pytest-checkdocs" ,python-pytest-checkdocs)
5063 ("python-pytest-flake8" ,python-pytest-flake8)
5064 ("python-rst.linker" ,python-rst.linker)
5065 ("python-setuptools" ,python-setuptools)
5066 ("python-setuptools-scm" ,python-setuptools-scm)
5067 ("python-six" ,python-six)
5068 ("python-sphinx" ,python-sphinx)))
5069 (home-page "https://github.com/jaraco/jaraco.packaging")
5070 (synopsis "Tools to supplement packaging Python releases")
5071 (description
5072 "This package provides various tools to supplement packaging Python
5073releases.")
5074 (license license:expat)))
5075
44d10b1f
RW
5076(define-public python-pathpy
5077 (package
5078 (name "python-pathpy")
a3dd8871 5079 (version "11.5.1")
44d10b1f
RW
5080 (source
5081 (origin
5082 (method url-fetch)
5083 (uri (pypi-uri "path.py" version))
5084 (sha256
a3dd8871 5085 (base32 "0ir9j1haq2jbi7aip6k2fa9l7q1l03k4hp1awxhjhcwzsnwp3ll8"))))
49ad11e9 5086 (outputs '("out" "doc"))
44d10b1f
RW
5087 (build-system python-build-system)
5088 (propagated-inputs
01a53e0b
MC
5089 `(("python-appdirs" ,python-appdirs)
5090 ("python-importlib-metadata" ,python-importlib-metadata)))
44d10b1f
RW
5091 (native-inputs
5092 `(("python-setuptools-scm" ,python-setuptools-scm)
5093 ("python-sphinx" ,python-sphinx)
5094 ("python-rst.linker" ,python-rst.linker)
5095 ("python-pytest" ,python-pytest)
49ad11e9
RW
5096 ("python-pytest-runner" ,python-pytest-runner)
5097 ("python-jaraco-packaging" ,python-jaraco-packaging)))
44d10b1f 5098 (arguments
49ad11e9
RW
5099 `(#:phases
5100 (modify-phases %standard-phases
5101 (add-after 'build 'build-doc
5102 (lambda _
5103 (setenv "LANG" "en_US.UTF-8")
5104 (invoke "python" "setup.py" "build_sphinx")))
5105 (add-after 'install 'install-doc
5106 (lambda* (#:key outputs #:allow-other-keys)
5107 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5108 (doc (string-append data "/doc/" ,name "-" ,version))
5109 (html (string-append doc "/html")))
5110 (mkdir-p html)
5111 (for-each (lambda (file)
5112 (copy-file file (string-append doc "/" file)))
5113 '("README.rst" "CHANGES.rst"))
5114 (copy-recursively "build/sphinx/html" html)
5115 #t)))
5116 (replace 'check
5117 (lambda _
5118 ;; The import time test aborts if an import takes longer than
5119 ;; 100ms. It may very well take a little longer than that.
5120 (invoke "pytest" "-v" "-k" "not test_import_time"))))))
44d10b1f
RW
5121 (home-page "https://github.com/jaraco/path.py")
5122 (synopsis "Python module wrapper for built-in os.path")
5123 (description
5124 "@code{path.py} implements path objects as first-class entities, allowing
5125common operations on files to be invoked on those path objects directly.")
5126 (license license:expat)))
5127
5128(define-public python2-pathpy
5129 (package-with-python2 python-pathpy))
5130
5131(define-public python-simplegeneric
5132 (package
5133 (name "python-simplegeneric")
5134 (version "0.8.1")
5135 (source
5136 (origin
5137 (method url-fetch)
6c8c3980 5138 (uri (pypi-uri "simplegeneric" version ".zip"))
44d10b1f
RW
5139 (sha256
5140 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
5141 (build-system python-build-system)
5142 (native-inputs
5143 `(("unzip" ,unzip)))
5144 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
5145 (synopsis "Python module for simple generic functions")
5146 (description
5147 "The simplegeneric module lets you define simple single-dispatch generic
5148functions, akin to Python’s built-in generic functions like @code{len()},
5149@code{iter()} and so on. However, instead of using specially-named methods,
5150these generic functions use simple lookup tables, akin to those used by
5151e.g. @code{pickle.dump()} and other generic functions found in the Python
5152standard library.")
5153 (license license:zpl2.1)))
5154
5155(define-public python2-simplegeneric
5156 (package-with-python2 python-simplegeneric))
5157
5158(define-public python-ipython-genutils
5159 ;; TODO: This package is retired, check if can be removed, see description.
5160 (package
5161 (name "python-ipython-genutils")
5162 (version "0.1.0")
5163 (source
5164 (origin
5165 (method url-fetch)
c9671d4b 5166 (uri (pypi-uri "ipython_genutils" version))
44d10b1f
RW
5167 (sha256
5168 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
5169 (build-system python-build-system)
5170 (arguments `(#:tests? #f)) ; no tests
5171 (home-page "https://ipython.org")
5172 (synopsis "Vestigial utilities from IPython")
5173 (description
5174 "This package provides retired utilities from IPython. No packages
5175outside IPython/Jupyter should depend on it.
5176
5177This package shouldn't exist. It contains some common utilities shared by
5178Jupyter and IPython projects during The Big Split. As soon as possible, those
5179packages will remove their dependency on this, and this package will go
5180away.")
5181 (license license:bsd-3)))
5182
5183(define-public python2-ipython-genutils
5184 (package-with-python2 python-ipython-genutils))
5185
5186(define-public python-traitlets
5187 (package
5188 (name "python-traitlets")
ac5e205a 5189 (version "4.3.3")
44d10b1f
RW
5190 (source
5191 (origin
5192 (method url-fetch)
5193 (uri (pypi-uri "traitlets" version))
5194 (sha256
5195 (base32
ac5e205a 5196 "1xsrwgivpkxlbr4dfndfsi098s29yqgswgjc1qqn69yxklvfw8yh"))))
44d10b1f
RW
5197 (build-system python-build-system)
5198 (arguments
5199 `(#:phases
5200 (modify-phases %standard-phases
5201 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
5202 (propagated-inputs
5203 `(("python-ipython-genutils" ,python-ipython-genutils)
ac5e205a 5204 ("python-decorator" ,python-decorator)))
44d10b1f
RW
5205 (native-inputs
5206 `(("python-pytest" ,python-pytest)))
5207 (properties `((python2-variant . ,(delay python2-traitlets))))
5208 (home-page "https://ipython.org")
5209 (synopsis "Configuration system for Python applications")
5210 (description
5211 "Traitlets is a framework that lets Python classes have attributes with
5212type checking, dynamically calculated default values, and ‘on change’
5213callbacks. The package also includes a mechanism to use traitlets for
5214configuration, loading values from files or from command line arguments. This
5215is a distinct layer on top of traitlets, so you can use traitlets in your code
5216without using the configuration machinery.")
5217 (license license:bsd-3)))
5218
5219(define-public python2-traitlets
5220 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
5221 (package
5222 (inherit traitlets)
5223 (propagated-inputs
5224 `(("python2-enum34" ,python2-enum34)
5225 ,@(package-propagated-inputs traitlets))))))
5226
5227(define-public python-jupyter-core
5228 (package
5229 (name "python-jupyter-core")
5230 (version "4.4.0")
5231 (source
5232 (origin
5233 (method url-fetch)
5234 (uri (string-append (pypi-uri "jupyter_core" version)))
5235 (sha256
5236 (base32
5237 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
5238 (build-system python-build-system)
5239 ;; FIXME: not sure how to run the tests
5240 (arguments `(#:tests? #f))
5241 (propagated-inputs
5242 `(("python-traitlets" ,python-traitlets)))
5243 (home-page "http://jupyter.org/")
5244 (synopsis "Jupyter base package")
5245 (description
5246 "Jupyter core is the base package on which Jupyter projects rely.")
5247 (license license:bsd-3)))
5248
5249(define-public python2-jupyter-core
5250 (package-with-python2 python-jupyter-core))
5251
5252(define-public python-jupyter-client
5253 (package
5254 (name "python-jupyter-client")
5255 (version "5.2.4")
5256 (source
5257 (origin
5258 (method url-fetch)
5259 (uri (pypi-uri "jupyter_client" version))
5260 (sha256
5261 (base32
5262 "0l9mh7ccrpl3lppym3dnky8n1nk7xarzzdcxf4q2s7aw203cpydm"))))
5263 (build-system python-build-system)
5264 ;; Tests fail because of missing native python kernel which I assume is
5265 ;; provided by the ipython package, which we cannot use because it would
5266 ;; cause a dependency cycle.
ddc586ea
LC
5267 (arguments
5268 `(#:tests? #f
5269
5270 #:phases (modify-phases %standard-phases
5271 (add-after 'unpack 'set-tool-file-names
5272 (lambda* (#:key inputs #:allow-other-keys)
5273 (let ((iproute (assoc-ref inputs "iproute")))
5274 (substitute* "jupyter_client/localinterfaces.py"
5275 (("'ip'")
5276 (string-append "'" iproute "/sbin/ip'")))
5277 #t))))))
5278 (inputs
5279 `(("iproute" ,iproute)))
44d10b1f
RW
5280 (propagated-inputs
5281 `(("python-pyzmq" ,python-pyzmq)
5282 ("python-traitlets" ,python-traitlets)
5283 ("python-jupyter-core" ,python-jupyter-core)))
5284 (home-page "http://jupyter.org/")
5285 (synopsis "Jupyter protocol implementation and client libraries")
5286 (description
5287 "The @code{jupyter_client} package contains the reference implementation
5288of the Jupyter protocol. It also provides client and kernel management APIs
5289for working with kernels, and the @code{jupyter kernelspec} entrypoint for
5290installing @code{kernelspec}s for use with Jupyter frontends.")
5291 (license license:bsd-3)))
5292
5293(define-public python2-jupyter-client
5294 (package-with-python2 python-jupyter-client))
5295
5296(define-public python-ipykernel
5297 (package
5298 (name "python-ipykernel")
08d0a355 5299 (version "5.1.3")
44d10b1f
RW
5300 (source
5301 (origin
5302 (method url-fetch)
5303 (uri (pypi-uri "ipykernel" version))
5304 (sha256
08d0a355 5305 (base32 "1a08y677lpn80qzvv7z0smgggmr5m5ayf0bs6vds47xpxl9sss5k"))))
44d10b1f
RW
5306 (build-system python-build-system)
5307 (arguments
5308 `(#:phases
5309 (modify-phases %standard-phases
5310 (replace 'check
5311 (lambda _
5312 (setenv "HOME" "/tmp")
5313 (invoke "pytest" "-v")
aa856d02
LC
5314 #t))
5315 (add-after 'install 'set-python-file-name
5316 (lambda* (#:key outputs #:allow-other-keys)
5317 ;; Record the absolute file name of the 'python' executable in
5318 ;; 'kernel.json'.
5319 (let ((out (assoc-ref outputs "out")))
5320 (substitute* (string-append out "/share/jupyter"
5321 "/kernels/python3/kernel.json")
5322 (("\"python\"")
5323 (string-append "\"" (which "python") "\"")))
5324 #t))))))
44d10b1f
RW
5325 (propagated-inputs
5326 `(("python-ipython" ,python-ipython)
5327 ;; imported at runtime during connect
5328 ("python-jupyter-client" ,python-jupyter-client)))
5329 (native-inputs
08d0a355
TGR
5330 `(("python-flaky" ,python-flaky)
5331 ("python-nose" ,python-nose)
5332 ("python-pytest" ,python-pytest)))
44d10b1f
RW
5333 (home-page "https://ipython.org")
5334 (synopsis "IPython Kernel for Jupyter")
5335 (description
5336 "This package provides the IPython kernel for Jupyter.")
5337 (license license:bsd-3)))
5338
0f378947 5339;; Version 5.1.1 and above no longer support Python 2.
44d10b1f 5340(define-public python2-ipykernel
0f378947
RW
5341 (package
5342 (name "python2-ipykernel")
5343 (version "5.1.0")
5344 (source
5345 (origin
5346 (method url-fetch)
5347 (uri (pypi-uri "ipykernel" version))
5348 (sha256
5349 (base32 "0br95qhrd5k65g10djngiy27hs0642301hlf2q142i8djabvzh0g"))))
5350 (build-system python-build-system)
5351 (arguments
5352 `(#:python ,python-2
5353 #:phases
5354 (modify-phases %standard-phases
5355 (replace 'check
5356 (lambda _
5357 (setenv "HOME" "/tmp")
5358 (invoke "pytest" "-v")
5359 #t)))))
5360 (propagated-inputs
5361 `(("python2-ipython" ,python2-ipython)
5362 ;; imported at runtime during connect
5363 ("python2-jupyter-client" ,python2-jupyter-client)))
5364 (native-inputs
5365 `(("python2-pytest" ,python2-pytest)
5366 ("python2-nose" ,python2-nose)))
5367 (home-page "https://ipython.org")
5368 (synopsis "IPython Kernel for Jupyter")
5369 (description
5370 "This package provides the IPython kernel for Jupyter.")
5371 (license license:bsd-3)))
44d10b1f 5372
966aa714
AE
5373(define-public python-pari-jupyter
5374 (package
5375 (name "python-pari-jupyter")
5376 (version "1.3.2")
5377 (source
5378 (origin
5379 (method url-fetch)
5380 (uri (pypi-uri "pari_jupyter" version))
5381 (sha256
5382 (base32
5383 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
5384 (build-system python-build-system)
5385 (propagated-inputs
5386 `(("python-ipykernel" ,python-ipykernel)))
5387 (inputs
5388 `(("pari-gp" ,pari-gp)
5389 ("readline" ,readline)))
5390 (arguments
5391 `(#:tests? #f)) ; no test suite
5392 (home-page
5393 "https://github.com/jdemeyer/pari_jupyter")
5394 (synopsis "A Jupyter kernel for PARI/GP")
5395 (description "The package provides a PARI/GP kernel for Jupyter.")
5396 (license license:gpl3+)))
5397
dede052a
RW
5398(define-public python-backcall
5399 (package
5400 (name "python-backcall")
5401 (version "0.1.0")
5402 (source
5403 (origin
5404 (method url-fetch)
5405 (uri (pypi-uri "backcall" version))
5406 (sha256
5407 (base32
5408 "1r01dqch3f8fdj3n6fviw8hxqrs6w5v0qw4izmvqzry1w9dxiv1q"))))
5409 (build-system python-build-system)
5410 (home-page "https://github.com/takluyver/backcall/")
5411 (synopsis "Specifications for callback functions passed in to an API")
5412 (description
5413 "If your code lets other people supply callback functions, it's important
5414to specify the function signature you expect, and check that functions support
5415that. Adding extra parameters later would break other peoples code unless
5416you're careful. The @code{backcall} package provides a way of specifying the
5417callback signature using a prototype function.")
5418 (license license:bsd-3)))
5419
44d10b1f
RW
5420;; This is the latest release of the LTS version of ipython with support for
5421;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
8b5f756c
RW
5422;; dropped support for Python 2.7.
5423(define-public python2-ipython
44d10b1f 5424 (package
8b5f756c 5425 (name "python2-ipython")
44d10b1f
RW
5426 (version "5.8.0")
5427 (source
5428 (origin
5429 (method url-fetch)
5430 (uri (pypi-uri "ipython" version ".tar.gz"))
5431 (sha256
5432 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
5433 (build-system python-build-system)
44d10b1f 5434 (propagated-inputs
8b5f756c
RW
5435 `(("python2-backports-shutil-get-terminal-size"
5436 ,python2-backports-shutil-get-terminal-size)
5437 ("python2-pathlib2" ,python2-pathlib2)
5438 ("python2-pyzmq" ,python2-pyzmq)
5439 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
5440 ("python2-terminado" ,python2-terminado)
5441 ("python2-matplotlib" ,python2-matplotlib)
5442 ("python2-numpy" ,python2-numpy)
5443 ("python2-numpydoc" ,python2-numpydoc)
5444 ("python2-jinja2" ,python2-jinja2)
5445 ("python2-mistune" ,python2-mistune)
5446 ("python2-pexpect" ,python2-pexpect)
5447 ("python2-pickleshare" ,python2-pickleshare)
5448 ("python2-simplegeneric" ,python2-simplegeneric)
5449 ("python2-jsonschema" ,python2-jsonschema)
5450 ("python2-traitlets" ,python2-traitlets)
5451 ("python2-nbformat" ,python2-nbformat)
5452 ("python2-pygments" ,python2-pygments)))
5453 (inputs
5454 `(("readline" ,readline)
5455 ("which" ,which)))
5456 (native-inputs
5457 `(("graphviz" ,graphviz)
5458 ("pkg-config" ,pkg-config)
5459 ("python2-requests" ,python2-requests) ;; for tests
5460 ("python2-testpath" ,python2-testpath)
5461 ("python2-mock" ,python2-mock)
5462 ("python2-nose" ,python2-nose)))
5463 (arguments
5464 `(#:python ,python-2
5465 #:phases
5466 (modify-phases %standard-phases
5467 (add-before 'check 'delete-broken-tests
5468 (lambda* (#:key inputs #:allow-other-keys)
5469 ;; These tests throw errors for unknown reasons.
5470 (delete-file "IPython/core/tests/test_profile.py")
5471 (delete-file "IPython/core/tests/test_interactiveshell.py")
5472 (delete-file "IPython/core/tests/test_magic.py")
5473 #t)))))
5474 (home-page "https://ipython.org")
5475 (synopsis "IPython is a tool for interactive computing in Python")
5476 (description
5477 "IPython provides a rich architecture for interactive computing with:
5478Powerful interactive shells, a browser-based notebook, support for interactive
5479data visualization, embeddable interpreters and tools for parallel
5480computing.")
5481 (license license:bsd-3)))
5482
5483(define-public python-ipython
5484 (package
5485 (name "python-ipython")
ee515773 5486 (version "7.9.0")
8b5f756c
RW
5487 (source
5488 (origin
5489 (method url-fetch)
5490 (uri (pypi-uri "ipython" version ".tar.gz"))
5491 (sha256
ee515773 5492 (base32 "103jkw18z7fnwdal1mdbijjxi1fndzn31g887lmj7ddpf2r07lyz"))))
8b5f756c
RW
5493 (build-system python-build-system)
5494 (propagated-inputs
5495 `(("python-backcall" ,python-backcall)
5496 ("python-pyzmq" ,python-pyzmq)
5497 ("python-prompt-toolkit" ,python-prompt-toolkit)
44d10b1f
RW
5498 ("python-terminado" ,python-terminado)
5499 ("python-matplotlib" ,python-matplotlib)
5500 ("python-numpy" ,python-numpy)
5501 ("python-numpydoc" ,python-numpydoc)
8b5f756c 5502 ("python-jedi" ,python-jedi)
44d10b1f
RW
5503 ("python-jinja2" ,python-jinja2)
5504 ("python-mistune" ,python-mistune)
5505 ("python-pexpect" ,python-pexpect)
5506 ("python-pickleshare" ,python-pickleshare)
5507 ("python-simplegeneric" ,python-simplegeneric)
5508 ("python-jsonschema" ,python-jsonschema)
5509 ("python-traitlets" ,python-traitlets)
5510 ("python-nbformat" ,python-nbformat)
5511 ("python-pygments" ,python-pygments)))
5512 (inputs
5513 `(("readline" ,readline)
5514 ("which" ,which)))
5515 (native-inputs
5516 `(("graphviz" ,graphviz)
5517 ("pkg-config" ,pkg-config)
5518 ("python-requests" ,python-requests) ;; for tests
5519 ("python-testpath" ,python-testpath)
8b5f756c 5520 ("python-nose" ,python-nose)))
44d10b1f
RW
5521 (arguments
5522 `(#:phases
5523 (modify-phases %standard-phases
0f272518
RW
5524 (add-after 'unpack 'make-docs-reproducible
5525 (lambda _
5526 (substitute* "IPython/sphinxext/ipython_directive.py"
5527 ((".*import datetime") "")
5528 ((".*datetime.datetime.now\\(\\)") "")
5529 (("%timeit") "# %timeit"))
5530 #t))
44d10b1f
RW
5531 ;; Tests can only be run after the library has been installed and not
5532 ;; within the source directory.
5533 (delete 'check)
5534 (add-after 'install 'check
5535 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5536 (if tests?
5537 (begin
5538 ;; Make installed package available for running the tests
5539 (add-installed-pythonpath inputs outputs)
5540 (setenv "HOME" "/tmp/") ;; required by a test
5541 ;; We only test the core because one of the other tests
5542 ;; tries to import ipykernel.
5543 (invoke "python" "IPython/testing/iptest.py"
5544 "-v" "IPython/core/tests"))
5545 #t)))
5546 (add-before 'check 'fix-tests
5547 (lambda* (#:key inputs #:allow-other-keys)
5548 (substitute* "./IPython/utils/_process_posix.py"
5549 (("/usr/bin/env', 'which") (which "which")))
5550 (substitute* "./IPython/core/tests/test_inputtransformer.py"
5551 (("#!/usr/bin/env python")
5552 (string-append "#!" (which "python"))))
44d10b1f
RW
5553 ;; This test introduces a circular dependency on ipykernel
5554 ;; (which depends on ipython).
5555 (delete-file "IPython/core/tests/test_display.py")
8b5f756c 5556 ;; AttributeError: module 'IPython.core' has no attribute 'formatters'
44d10b1f 5557 (delete-file "IPython/core/tests/test_interactiveshell.py")
44d10b1f
RW
5558 #t)))))
5559 (home-page "https://ipython.org")
5560 (synopsis "IPython is a tool for interactive computing in Python")
5561 (description
5562 "IPython provides a rich architecture for interactive computing with:
5563Powerful interactive shells, a browser-based notebook, support for interactive
5564data visualization, embeddable interpreters and tools for parallel
5565computing.")
8b5f756c 5566 (license license:bsd-3)))
44d10b1f 5567
8b5f756c
RW
5568(define-public python-ipython-documentation
5569 (package
5570 (inherit python-ipython)
5571 (name "python-ipython-documentation")
5572 (version (package-version python-ipython))
5573 (arguments
5574 `(#:phases
5575 (modify-phases %standard-phases
5576 (delete 'build)
5577 (delete 'check)
5578 (replace 'install
5579 (lambda* (#:key outputs #:allow-other-keys)
5580 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
5581 (doc (string-append data "/doc/" ,name "-" ,version))
5582 (html (string-append doc "/html"))
5583 (man1 (string-append data "/man/man1"))
5584 (info (string-append data "/info"))
5585 (examples (string-append doc "/examples"))
5586 (python-arg (string-append "PYTHON=" (which "python"))))
5587 (setenv "LANG" "en_US.utf8")
5588 (with-directory-excursion "docs"
5589 ;; FIXME: pdf fails to build
5590 ;;(system* "make" "pdf" "PAPER=a4")
5591 (system* "make" python-arg "html")
5592 ;; FIXME: the generated texi file contains ^@^@, which trips
5593 ;; up the parser.
5594 ;; (system* "make" python-arg "info")
5595 )
5596 (copy-recursively "docs/man" man1)
5597 (copy-recursively "examples" examples)
5598 (copy-recursively "docs/build/html" html)
5599 ;; (copy-file "docs/build/latex/ipython.pdf"
5600 ;; (string-append doc "/ipython.pdf"))
5601 (mkdir-p info)
5602 ;; (copy-file "docs/build/texinfo/ipython.info"
5603 ;; (string-append info "/ipython.info"))
5604 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
5605 #t)))))
5606 (inputs
5607 `(("python-ipython" ,python-ipython)
5608 ("python-ipykernel" ,python-ipykernel)))
5609 (native-inputs
5610 `(("python-sphinx" ,python-sphinx)
5611 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
5612 ;; FIXME: It's possible that a smaller union would work just as well.
f75aa97f 5613 ("texlive" ,(texlive-union (list texlive-amsfonts
8b5f756c
RW
5614 texlive-fonts-ec
5615 texlive-generic-ifxetex
5616 texlive-generic-pdftex
8b5f756c
RW
5617 texlive-latex-capt-of
5618 texlive-latex-cmap
5619 texlive-latex-environ
5620 texlive-latex-eqparbox
5621 texlive-latex-etoolbox
5622 texlive-latex-expdlist
5623 texlive-latex-fancyhdr
5624 texlive-latex-fancyvrb
5625 texlive-latex-fncychap
5626 texlive-latex-float
5627 texlive-latex-framed
5628 texlive-latex-geometry
5629 texlive-latex-graphics
5630 texlive-latex-hyperref
5631 texlive-latex-mdwtools
5632 texlive-latex-multirow
5633 texlive-latex-needspace
5634 texlive-latex-oberdiek
5635 texlive-latex-parskip
5636 texlive-latex-preview
5637 texlive-latex-tabulary
5638 texlive-latex-threeparttable
5639 texlive-latex-titlesec
5640 texlive-latex-trimspaces
5641 texlive-latex-ucs
5642 texlive-latex-upquote
5643 texlive-latex-url
5644 texlive-latex-varwidth
5645 texlive-latex-wrapfig)))
5646 ("texinfo" ,texinfo)))))
44d10b1f
RW
5647
5648(define-public python-urwid
5649 (package
5650 (name "python-urwid")
5651 (version "2.0.1")
5652 (source
5653 (origin
5654 (method url-fetch)
5655 (uri (pypi-uri "urwid" version))
5656 (sha256
5657 (base32
5658 "1g6cpicybvbananpjikmjk8npmjk4xvak1wjzji62wc600wkwkb4"))))
5659 (build-system python-build-system)
5660 (home-page "http://urwid.org")
5661 (synopsis "Console user interface library for Python")
5662 (description
5663 "Urwid is a curses-based UI/widget library for Python. It includes many
5664features useful for text console applications.")
5665 (license license:lgpl2.1+)))
5666
5667(define-public python2-urwid
5668 (package-with-python2 python-urwid))
5669
5670(define-public python-urwidtrees
5671 (package
5672 (name "python-urwidtrees")
5673 (version "1.0.2")
5674 (source
5675 (origin
c8364072 5676 (method git-fetch)
44d10b1f
RW
5677 ;; package author intends on distributing via github rather than pypi:
5678 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
c8364072
EF
5679 (uri (git-reference
5680 (url "https://github.com/pazz/urwidtrees")
5681 (commit version)))
5682 (file-name (git-file-name name version))
44d10b1f
RW
5683 (sha256
5684 (base32
c8364072 5685 "1n1kpidvkdnsqyb82vlvk78gmly96kh8351lqxn2pzgwwns6fml2"))))
44d10b1f
RW
5686 (build-system python-build-system)
5687 (arguments
26bb7fc6
EF
5688 '(#:use-setuptools? #f
5689 #:tests? #f)) ; no tests
44d10b1f
RW
5690 (propagated-inputs `(("python-urwid" ,python-urwid)))
5691 (home-page "https://github.com/pazz/urwidtrees")
5692 (synopsis "Tree widgets for urwid")
5693 (description "Urwidtrees is a Widget Container API for the @code{urwid}
5694toolkit. Use it to build trees of widgets.")
5695 (license license:gpl3+)))
5696
5697(define-public python2-urwidtrees
5698 (package-with-python2 python-urwidtrees))
5699
5700(define-public python-ua-parser
5701 (package
5702 (name "python-ua-parser")
5703 (version "0.8.0")
5704 (source
5705 (origin
5706 (method url-fetch)
5707 (uri (pypi-uri "ua-parser" version))
5708 (sha256
5709 (base32
5710 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
5711 (build-system python-build-system)
5712 (arguments
5713 `(#:tests? #f)) ;no test suite in release
5714 (native-inputs
5715 `(("python-pyyaml" ,python-pyyaml)))
5716 (home-page "https://github.com/ua-parser/uap-python")
5717 (synopsis "User agent parser")
5718 (description
5719 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
5720 (license license:asl2.0)))
5721
5722(define-public python2-ua-parser
5723 (package-with-python2 python-ua-parser))
5724
5725(define-public python-user-agents
5726 (package
5727 (name "python-user-agents")
5728 (version "1.1.0")
5729 (source
5730 (origin
5731 (method url-fetch)
5732 (uri (pypi-uri "user-agents" version))
5733 (sha256
5734 (base32
5735 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
5736 (build-system python-build-system)
5737 (arguments
5738 `(#:tests? #f)) ;missing devices.json test file in release
5739 (propagated-inputs
5740 `(("python-ua-parser" ,python-ua-parser)))
5741 (home-page "https://github.com/selwin/python-user-agents")
5742 (synopsis "User Agent strings parsing library")
5743 (description
5744 "A library to identify devices (phones, tablets) and their capabilities by
5745parsing (browser/HTTP) user agent strings.")
5746 (license license:expat)))
5747
5748(define-public python2-user-agents
5749 (package-with-python2 python-user-agents))
5750
5751(define-public python-dbus
5752 (package
5753 (name "python-dbus")
ba5ef999 5754 (version "1.2.14")
44d10b1f
RW
5755 (source
5756 (origin
5757 (method url-fetch)
5758 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
5759 "dbus-python-" version ".tar.gz"))
5760 (sha256
ba5ef999 5761 (base32 "0cdchkgnivlka4lf8q4qfk0yxq483i3r3aqickjf8hfn7nx0c0mi"))))
44d10b1f 5762 (build-system gnu-build-system)
44d10b1f
RW
5763 (native-inputs
5764 `(("pkg-config" ,pkg-config)))
5765 (inputs
5766 `(("python" ,python-wrapper)
5767 ("dbus-glib" ,dbus-glib)))
5768 (synopsis "Python bindings for D-bus")
5769 (description "python-dbus provides bindings for libdbus, the reference
5770implementation of D-Bus.")
5771 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
5772 (license license:expat)))
5773
5774(define-public python2-dbus
5775 (package (inherit python-dbus)
5776 (name "python2-dbus")
5777 (inputs `(("python" ,python-2)
5778 ,@(alist-delete "python"
5779 (package-inputs python-dbus)
ba5ef999 5780 equal?)))))
44d10b1f 5781
fb236fdd
AG
5782(define-public python-notify2
5783 (package
5784 (name "python-notify2")
5785 (version "0.3.1")
5786 (source
5787 (origin
5788 (method url-fetch)
5789 (uri (pypi-uri "notify2" version))
5790 (sha256
5791 (base32
5792 "0z8rrv9rsg1r2qgh2dxj3dfj5xnki98kgi3w839kqby4a26i1yik"))))
5793 (build-system python-build-system)
5794 (arguments `(#:tests? #f)) ; tests depend on system state
5795 (native-inputs
5796 `(("python-dbus" ,python-dbus)))
5797 (home-page "https://bitbucket.org/takluyver/pynotify2")
5798 (synopsis "Python interface to D-Bus notifications")
5799 (description
5800 "Pynotify2 provides a Python interface for sending D-Bus notifications.
5801It is a reimplementation of pynotify in pure Python, and an alternative to
5802the GObject Introspection bindings to libnotify for non-GTK applications.")
5803 (license (list license:bsd-2
5804 license:lgpl2.1+))))
5805
5806(define-public python2-notify2
5807 (package-with-python2 python-notify2))
5808
44d10b1f
RW
5809;; beautifulsoup4 has a totally different namespace than 3.x,
5810;; and pypi seems to put it under its own name, so I guess we should too
5811(define-public python-beautifulsoup4
5812 (package
5813 (name "python-beautifulsoup4")
abb53e6f 5814 (version "4.7.1")
44d10b1f
RW
5815 (source
5816 (origin
5817 (method url-fetch)
5818 (uri (pypi-uri "beautifulsoup4" version))
5819 (sha256
5820 (base32
abb53e6f 5821 "0j2kycz2dxgx68xzjm7rxg5xn6v61gq5ifvxyg99slmqkybnal4l"))))
44d10b1f
RW
5822 (build-system python-build-system)
5823 (arguments
5824 `(#:phases
5825 (modify-phases %standard-phases
5826 ;; The Python 2 source is the definitive source of beautifulsoup4. We
5827 ;; must use this conversion script when building with Python 3. The
5828 ;; conversion script also runs the tests.
5829 ;; For more information, see the file 'convert-py3k' in the source
5830 ;; distribution.
5831 (replace 'check
dff0197e 5832 (lambda _ (invoke "./convert-py3k"))))))
f83e10e4 5833 (propagated-inputs
abb53e6f 5834 `(("python-soupsieve" ,python-soupsieve)))
44d10b1f
RW
5835 (home-page
5836 "https://www.crummy.com/software/BeautifulSoup/bs4/")
5837 (synopsis
5838 "Python screen-scraping library")
5839 (description
5840 "Beautiful Soup is a Python library designed for rapidly setting up
5841screen-scraping projects. It offers Pythonic idioms for navigating,
5842searching, and modifying a parse tree, providing a toolkit for
5843dissecting a document and extracting what you need. It automatically
5844converts incoming documents to Unicode and outgoing documents to UTF-8.")
5845 (license license:expat)
5846 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
5847
5848(define-public python2-beautifulsoup4
5849 (package
5850 (inherit (package-with-python2
5851 (strip-python2-variant python-beautifulsoup4)))
5852 (arguments `(#:python ,python-2))))
5853
ad74978a
BT
5854(define-public python-soupsieve
5855 (package
5856 (name "python-soupsieve")
3367df31 5857 (version "1.9.5")
ad74978a
BT
5858 (source
5859 (origin
5860 (method url-fetch)
5861 (uri (pypi-uri "soupsieve" version))
5862 (sha256
5863 (base32
3367df31 5864 "1nhd0q0ifwva9wn645s6pn74p1rd97asn3qfg75nphx1wkgcbhg2"))))
ad74978a
BT
5865 (build-system python-build-system)
5866 (arguments `(#:tests? #f))
5867 ;;XXX: 2 tests fail currently despite claming they were to be
5868 ;;skipped. Also, beautifulsoup4 may depend on this in the future, so we
5869 ;;don't want to create a circular dependency.
5870 (home-page "https://github.com/facelessuser/soupsieve")
5871 (synopsis "CSS selector library")
5872 (description
5873 "Soup Sieve is a CSS selector library designed to be used with Beautiful
5874Soup 4. It aims to provide selecting, matching, and filtering using modern
5875CSS selectors. Soup Sieve currently provides selectors from the CSS level 1
5876specifications up through the latest CSS level 4 drafts and beyond (though
5877some are not yet implemented).")
d00b83fb 5878 (properties `((python2-variant . ,(delay python2-soupsieve))))
ad74978a
BT
5879 (license license:expat)))
5880
5881(define-public python2-soupsieve
d00b83fb 5882 (let ((base (package-with-python2 (strip-python2-variant python-soupsieve))))
ad74978a
BT
5883 (package
5884 (inherit base)
5885 (propagated-inputs
d00b83fb
MB
5886 `(("python2-backports-functools-lru-cache"
5887 ,python2-backports-functools-lru-cache)
5888 ,@(package-propagated-inputs base))))))
ad74978a 5889
44d10b1f
RW
5890(define-public python-netifaces
5891 (package
5892 (name "python-netifaces")
5893 (version "0.10.7")
5894 (source
5895 (origin
5896 (method url-fetch)
5897 (uri (pypi-uri "netifaces" version))
5898 (sha256
5899 (base32
5900 "1gccklrcplbbqh81g1mdgpa5y8na7kkf29cq2ka3f5a2fp5hyndx"))))
5901 (build-system python-build-system)
5902 (home-page "https://github.com/al45tair/netifaces")
5903 (synopsis
5904 "Python module for portable network interface information")
5905 (description
5906 "Netifaces is a Python module providing information on network
5907interfaces in an easy and portable manner.")
5908 (license license:expat)))
5909
5910(define-public python2-netifaces
5911 (package-with-python2 python-netifaces))
5912
5913(define-public python-networkx
5914 (package
5915 (name "python-networkx")
5916 (version "2.2")
5917 (source
5918 (origin
5919 (method url-fetch)
5920 (uri (pypi-uri "networkx" version ".zip"))
5921 (sha256
5922 (base32 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
5923 (build-system python-build-system)
5924 ;; python-decorator is needed at runtime.
5925 (propagated-inputs
5926 `(("python-decorator" ,python-decorator)))
5927 (native-inputs
5928 `(("python-nose" ,python-nose)
5929 ("unzip" ,unzip)))
5930 (home-page "https://networkx.github.io/")
5931 (synopsis "Python module for creating and manipulating graphs and networks")
5932 (description
5933 "NetworkX is a Python package for the creation, manipulation, and study
5934of the structure, dynamics, and functions of complex networks.")
5935 (license license:bsd-3)))
5936
5937(define-public python2-networkx
5938 (package-with-python2 python-networkx))
5939
5940(define-public python-datrie
5941 (package
5942 (name "python-datrie")
0b58cb42 5943 (version "0.8")
44d10b1f
RW
5944 (source
5945 (origin
5946 (method url-fetch)
5947 (uri (pypi-uri "datrie" version))
5948 (sha256
5949 (base32
0b58cb42 5950 "0338r8xgmpy78556jhms0h6qkvyjr10p8bpgdvcpqzm9lrmxmmdx"))))
44d10b1f 5951 (build-system python-build-system)
44d10b1f
RW
5952 (native-inputs
5953 `(("python-cython" ,python-cython)
5954 ("python-hypothesis" ,python-hypothesis)
5955 ("python-pytest" ,python-pytest)
5956 ("python-pytest-runner" ,python-pytest-runner)))
5957 (home-page "https://github.com/kmike/datrie")
5958 (synopsis "Fast, efficiently stored trie for Python")
5959 (description
5960 "This package provides a fast, efficiently stored trie implementation for
5961Python.")
5962 (license license:lgpl2.1+)))
5963
5964(define-public snakemake
5965 (package
5966 (name "snakemake")
93803c6b 5967 (version "5.7.1")
44d10b1f
RW
5968 (source
5969 (origin
5970 (method url-fetch)
5971 (uri (pypi-uri "snakemake" version))
5972 (sha256
93803c6b 5973 (base32 "1pnpvvn8n2a78cg360wz3ldmpqrsm2wzi0c0dmvki9fnsw6fxdas"))))
44d10b1f
RW
5974 (build-system python-build-system)
5975 (arguments
5976 ;; TODO: Package missing test dependencies.
5977 '(#:tests? #f
5978 #:phases
5979 (modify-phases %standard-phases
5980 ;; For cluster execution Snakemake will call Python. Since there is
5981 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
5982 ;; this by calling the snakemake wrapper instead.
5983 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
5984 (lambda* (#:key outputs #:allow-other-keys)
5985 (substitute* "snakemake/executors.py"
5986 (("\\{sys.executable\\} -m snakemake")
5987 (string-append (assoc-ref outputs "out")
5988 "/bin/snakemake")))
5989 #t)))))
5990 (propagated-inputs
8994ae34 5991 `(("python-appdirs" ,python-appdirs)
44d10b1f
RW
5992 ("python-configargparse" ,python-configargparse)
5993 ("python-datrie" ,python-datrie)
5994 ("python-docutils" ,python-docutils)
8994ae34 5995 ("python-gitpython" ,python-gitpython)
44d10b1f
RW
5996 ("python-jinja2" ,python-jinja2)
5997 ("python-jsonschema" ,python-jsonschema)
5998 ("python-networkx" ,python-networkx)
93803c6b 5999 ("python-psutil" ,python-psutil)
44d10b1f 6000 ("python-pyyaml" ,python-pyyaml)
8994ae34
TGR
6001 ("python-ratelimiter" ,python-ratelimiter)
6002 ("python-requests" ,python-requests)
6003 ("python-wrapt" ,python-wrapt)))
44d10b1f
RW
6004 (home-page "https://snakemake.readthedocs.io")
6005 (synopsis "Python-based execution environment for make-like workflows")
6006 (description
6007 "Snakemake aims to reduce the complexity of creating workflows by
6008providing a clean and modern domain specific specification language (DSL) in
6009Python style, together with a fast and comfortable execution environment.")
6010 (license license:expat)))
6011
44d10b1f
RW
6012(define-public python-pyqrcode
6013 (package
6014 (name "python-pyqrcode")
6015 (version "1.2.1")
6016 (source
6017 (origin
6018 (method url-fetch)
6019 (uri (pypi-uri "PyQRCode" version))
6020 (sha256
6021 (base32
6022 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
6023 (build-system python-build-system)
6024 (home-page
6025 "https://github.com/mnooner256/pyqrcode")
6026 (synopsis "QR code generator")
6027 (description
6028 "Pyqrcode is a QR code generator written purely in Python with
6029SVG, EPS, PNG and terminal output.")
6030 (license license:bsd-3)))
6031
6032(define-public python-seaborn
6033 (package
6034 (name "python-seaborn")
6035 (version "0.9.0")
6036 (source
6037 (origin
6038 (method url-fetch)
6039 (uri (pypi-uri "seaborn" version))
6040 (sha256
f9bd82e7
RW
6041 (base32 "0bqysi3fxfjl1866m5jq8z7mynhqbqnikim74dmzn8539iwkzj3n"))
6042 (patches
6043 (list (origin
6044 (method url-fetch)
6045 ;; This has already been merged, but there is no new
6046 ;; release including this patch. It fixes problems
6047 ;; with axis rotation that would lead to test
6048 ;; failures.
6049 (uri "https://patch-diff.githubusercontent.com/raw/mwaskom/seaborn/pull/1716.diff")
6050 (sha256
6051 (base32
6052 "1lm870z316n9ivsyr86hpk1gxaraw0mrjvq42lqsm0znhjdp9q9w"))
6053 (file-name "seaborn-0.9.0-axis-rotation.patch"))))))
44d10b1f
RW
6054 (build-system python-build-system)
6055 (arguments
6056 `(#:phases
6057 (modify-phases %standard-phases
6058 (add-before 'check 'start-xserver
6059 (lambda* (#:key inputs #:allow-other-keys)
6060 (let ((xorg-server (assoc-ref inputs "xorg-server")))
6061 ;; There must be a running X server and make check doesn't
6062 ;; start one. Therefore we must do it.
6063 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
6064 (setenv "DISPLAY" ":1")
6065 #t)))
a1322765
RW
6066 (add-after 'unpack 'fix-tests
6067 (lambda _
6068 ;; test_cbar_ticks fails probably because of matplotlib's
6069 ;; expectation of using an older version of FreeType.
6070 (delete-file "seaborn/tests/test_matrix.py")
6071 #t))
44d10b1f
RW
6072 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
6073 (propagated-inputs
6074 `(("python-pandas" ,python-pandas)
6075 ("python-matplotlib" ,python-matplotlib)
6076 ("python-numpy" ,python-numpy)
6077 ("python-scipy" ,python-scipy)))
6078 (native-inputs
6079 `(("python-pytest" ,python-pytest)
ff337525 6080 ("xorg-server" ,xorg-server-for-tests)))
44d10b1f
RW
6081 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
6082 (synopsis "Statistical data visualization")
6083 (description
6084 "Seaborn is a library for making attractive and informative statistical
6085graphics in Python. It is built on top of matplotlib and tightly integrated
6086with the PyData stack, including support for numpy and pandas data structures
6087and statistical routines from scipy and statsmodels.")
6088 (license license:bsd-3)))
6089
6090(define-public python2-seaborn
6091 (package-with-python2 python-seaborn))
6092
6093(define-public python-mpmath
6094 (package
6095 (name "python-mpmath")
6096 (version "0.19")
6097 (source (origin
6098 (method url-fetch)
6099 (uri (string-append "http://mpmath.org/files/mpmath-"
6100 version ".tar.gz"))
6101 (sha256
6102 (base32
6103 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
6104 (build-system python-build-system)
6105 (arguments
6106 '(#:phases
6107 (modify-phases %standard-phases
6108 (replace 'check
6109 (lambda _
5d7a6f1c 6110 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
44d10b1f
RW
6111 (home-page "http://mpmath.org")
6112 (synopsis "Arbitrary-precision floating-point arithmetic in python")
6113 (description
6114 "@code{mpmath} can be used as an arbitrary-precision substitute for
6115Python's float/complex types and math/cmath modules, but also does much
6116more advanced mathematics.")
6117 (license license:bsd-3)))
6118
6119(define-public python2-mpmath
6120 (package-with-python2 python-mpmath))
6121
6122(define-public python-bigfloat
6123 (package
6124 (name "python-bigfloat")
6125 (version "0.3.0")
6126 (source
6127 (origin
6128 (method url-fetch)
6129 (uri (pypi-uri "bigfloat" version))
6130 (sha256
6131 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
6132 (build-system python-build-system)
6133 (inputs
6134 `(("mpfr" ,mpfr)))
6135 (home-page "https://github.com/mdickinson/bigfloat")
6136 (synopsis "Arbitrary precision floating-point arithmetic for Python")
6137 (description
e36de31b 6138 "This package provides a Python interface to the MPFR library for
44d10b1f
RW
6139multiprecision arithmetic.")
6140 (license license:lgpl3+)))
6141
6142(define-public python2-bigfloat
6143 (package-with-python2 python-bigfloat))
6144
6145(define-public python-sympy
6146 (package
6147 (name "python-sympy")
6148 (version "1.1.1")
6149 (source
6150 (origin
6151 (method url-fetch)
6152 (uri (string-append
6153 "https://github.com/sympy/sympy/releases/download/sympy-"
6154 version "/sympy-" version ".tar.gz"))
6155 (sha256
6156 (base32 "190n29sppw7g8ihilc5451y7jlfcaw56crqiqbf1jff43dlmfnxc"))))
6157 (build-system python-build-system)
6158 (arguments
6159 `(#:phases
6160 (modify-phases %standard-phases
6161 ;; Run the core tests after installation. By default it would run
6162 ;; *all* tests, which take a very long time to complete and are known
6163 ;; to be flaky.
6164 (delete 'check)
6165 (add-after 'install 'check
6166 (lambda* (#:key outputs #:allow-other-keys)
6167 (invoke "python3" "-c" "import sympy; sympy.test(\"/core\")")
6168 #t)))))
6169 (propagated-inputs
6170 `(("python-mpmath" ,python-mpmath)))
6171 (home-page "http://www.sympy.org/")
6172 (synopsis "Python library for symbolic mathematics")
6173 (description
6174 "SymPy is a Python library for symbolic mathematics. It aims to become a
6175full-featured computer algebra system (CAS) while keeping the code as simple
6176as possible in order to be comprehensible and easily extensible.")
6177 (license license:bsd-3)))
6178
6179(define-public python2-sympy
6180 (package
6181 (inherit (package-with-python2 python-sympy))
6182 (arguments
6183 `(#:phases
6184 (modify-phases %standard-phases
6185 ;; Run the core tests after installation. By default it would run
6186 ;; *all* tests, which take a very long time to complete and are known
6187 ;; to be flaky.
6188 (delete 'check)
6189 (add-after 'install 'check
6190 (lambda* (#:key outputs #:allow-other-keys)
6191 (invoke "python" "-c" "import sympy; sympy.test(\"/core\")")
6192 #t)))))))
6193
6194(define-public python-q
6195 (package
6196 (name "python-q")
6197 (version "2.6")
6198 (source
6199 (origin
6200 (method url-fetch)
6201 (uri (pypi-uri "q" version))
6202 (sha256
6203 (base32
6204 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
6205 (build-system python-build-system)
6206 (home-page "https://github.com/zestyping/q")
6207 (synopsis "Quick-and-dirty debugging output for tired programmers")
6208 (description
6209 "q is a Python module for \"print\" style of debugging Python code. It
6210provides convenient short API for print out of values, tracebacks, and
6211falling into the Python interpreter.")
6212 (license license:asl2.0)))
6213
6214(define-public python2-q
6215 (package-with-python2 python-q))
6216
6217(define-public python2-xlib
6218 (package
6219 (name "python2-xlib")
6220 (version "0.14")
6221 (source (origin
6222 (method url-fetch)
6223 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
6224 "/" version "/"
6225 "python-xlib-" version ".tar.gz"))
6226 (sha256
6227 (base32
6228 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
6229 (build-system python-build-system)
6230 (arguments
6231 `(#:python ,python-2 ;Python 2 only
6232 #:tests? #f)) ;no tests
6233 (home-page "http://python-xlib.sourceforge.net/")
6234 (synopsis "Python X11 client library")
6235 (description
6236 "The Python X Library is intended to be a fully functional X client
6237library for Python programs. It is useful to implement low-level X clients.
6238It is written entirely in Python.")
6239 (license license:gpl2+)))
6240
6241(define-public python-singledispatch
6242 (package
6243 (name "python-singledispatch")
6244 (version "3.4.0.3")
6245 (source
6246 (origin
6247 (method url-fetch)
6248 (uri (pypi-uri "singledispatch" version))
6249 (sha256
6250 (base32
6251 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
6252 (build-system python-build-system)
6253 (native-inputs
6254 `(("python-six" ,python-six))) ; required for conversion, not at run-time
6255 (home-page
6256 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
6257 (synopsis "Backport of singledispatch feature from Python 3.4")
6258 (description
6259 "This library brings functools.singledispatch from Python 3.4 to Python
62602.6-3.3.")
6261 (license license:expat)))
6262
6263(define-public python2-singledispatch
6264 (package-with-python2 python-singledispatch))
6265
6266;; the python- version can be removed with python-3.5
6267(define-public python-backports-abc
6268 (package
6269 (name "python-backports-abc")
6270 (version "0.5")
6271 (source
6272 (origin
6273 (method url-fetch)
6274 (uri (pypi-uri "backports_abc" version))
6275 (sha256
6276 (base32
6277 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
6278 (build-system python-build-system)
6279 (home-page "https://github.com/cython/backports_abc")
6280 (synopsis "Backport of additions to the 'collections.abc' module")
6281 (description
6282 "Python-backports-abc provides a backport of additions to the
36a4366d 6283@code{collections.abc} module in Python-3.5.")
44d10b1f
RW
6284 (license license:psfl)))
6285
6286(define-public python2-backports-abc
6287 (package-with-python2 python-backports-abc))
6288
6289(define-public python-backports-csv
6290 (package
6291 (name "python-backports-csv")
6292 (version "1.0.5")
6293 (source
6294 (origin
6295 (method url-fetch)
6296 (uri (pypi-uri "backports.csv" version))
6297 (sha256
6298 (base32
6299 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
6300 (build-system python-build-system)
6301 (home-page "https://github.com/ryanhiebert/backports.csv")
6302 (synopsis "Backport of Python 3's csv module for Python 2")
6303 (description
6304 "Provides a backport of Python 3's @code{csv} module for parsing
6305comma separated values. The API of the @code{csv} module in Python 2
6306is drastically different from the @code{csv} module in Python 3.
6307This is due, for the most part, to the difference between str in
6308Python 2 and Python 3.")
6309 (license license:psfl)))
6310
6311(define-public python2-backports-csv
6312 (package-with-python2 python-backports-csv))
6313
6314(define-public python2-backports-shutil-get-terminal-size
6315 (package
6316 (name "python2-backports-shutil-get-terminal-size")
6317 (version "1.0.0")
6318 (source
6319 (origin
6320 (method url-fetch)
6321 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
6322 (sha256
6323 (base32
6324 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
6325 (build-system python-build-system)
6326 (arguments
6327 `(#:python ,python-2
6328 #:phases
6329 (modify-phases %standard-phases
6330 (replace 'check
6331 (lambda _
4a4a7d9a 6332 (invoke "py.test" "-v"))))))
44d10b1f
RW
6333 (native-inputs
6334 `(("python2-pytest" ,python2-pytest)))
6335 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
6336 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
6337 (description
6338 "This package provides a backport of the @code{get_terminal_size
6339function} from Python 3.3's @code{shutil}.
6340Unlike the original version it is written in pure Python rather than C,
6341so it might be a tiny bit slower.")
6342 (license license:expat)))
6343
6344(define-public python-waf
6345 (package
6346 (name "python-waf")
6c2c11fa 6347 (version "2.0.19")
44d10b1f
RW
6348 (source (origin
6349 (method url-fetch)
6350 (uri (string-append "https://waf.io/"
6351 "waf-" version ".tar.bz2"))
6352 (sha256
6353 (base32
6c2c11fa 6354 "19dvqbsvxz7ch03dh1v0znklrwxlz6yzddc3k9smzrrgny4jch6q"))))
44d10b1f
RW
6355 (build-system python-build-system)
6356 (arguments
6357 '(#:phases
6358 (modify-phases %standard-phases
6359 (replace 'build
6360 (lambda _
633c8b71
MO
6361 ;; XXX: Find a way to add all extra tools.
6362 (let ((tools '("gccdeps"
6363 "clang_compilation_database")))
6364 (invoke "python" "waf-light" "configure" "build"
6365 (string-append "--tools="
6366 (string-join tools ","))))))
44d10b1f
RW
6367 (replace 'check
6368 (lambda _
6369 (invoke "python" "waf" "--version")))
6370 (replace 'install
6371 (lambda* (#:key outputs #:allow-other-keys)
6372 (let ((out (assoc-ref outputs "out")))
6373 (install-file "waf" (string-append out "/bin")))
6374 #t))
6375 ;; waf breaks when it is wrapped.
6376 (delete 'wrap))))
6377 (home-page "https://waf.io/")
6378 (synopsis "Python-based build system")
6379 (description
6380 "Waf is a Python-based framework for configuring, compiling and installing
6381applications.")
6382 (license license:bsd-3)))
6383
6384(define-public python2-waf
6385 (package-with-python2 python-waf))
6386
6387(define-public python-pyzmq
6388 (package
6389 (name "python-pyzmq")
6390 (version "17.1.2")
6391 (source
6392 (origin
6393 (method url-fetch)
6394 (uri (pypi-uri "pyzmq" version))
6395 (sha256
6396 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
6397 (build-system python-build-system)
6398 (arguments
6399 `(#:configure-flags
6400 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
6401 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
6402 ;; --inplace' for 'python setup.py test' to work.
6403 #:tests? #f))
6404 (inputs
6405 `(("zeromq" ,zeromq)))
6406 (native-inputs
6407 `(("pkg-config" ,pkg-config)
6408 ("python-nose" ,python-nose)))
6409 (home-page "https://github.com/zeromq/pyzmq")
6410 (synopsis "Python bindings for 0MQ")
6411 (description
6412 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
6413 (license license:bsd-4)))
6414
6415(define-public python2-pyzmq
6416 (package-with-python2 python-pyzmq))
6417
6418(define-public python-pep8
6419 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
6420 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
6421 ;; some dependents' test suites, and nothing more.
6422 (package
6423 (name "python-pep8")
6424 (version "1.7.0")
6425 (source
6426 (origin
6427 (method url-fetch)
6428 (uri (pypi-uri "pep8" version))
6429 (sha256
6430 (base32
2be878d8
CB
6431 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))
6432 (patches (search-patches "python-pep8-stdlib-tokenize-compat.patch"))))
44d10b1f
RW
6433 (build-system python-build-system)
6434 (home-page "https://pep8.readthedocs.org/")
6435 (synopsis "Python style guide checker")
6436 (description
6437 "This tools checks Python code against some of the style conventions in
6438PEP 8.")
6439 (license license:expat)))
6440
6441(define-public python2-pep8
6442 (package-with-python2 python-pep8))
6443
6444(define-public python-pyflakes
6445 (package
6446 (name "python-pyflakes")
d0cba11b 6447 (version "2.1.1")
44d10b1f
RW
6448 (source
6449 (origin
6450 (method url-fetch)
6451 (uri (pypi-uri "pyflakes" version))
6452 (sha256
6453 (base32
d0cba11b 6454 "18pq95a1xj2dgdd0m85gyfsn40jajj4xc3lp8wfv7igqhrc86xnr"))))
44d10b1f
RW
6455 (build-system python-build-system)
6456 (home-page
6457 "https://github.com/pyflakes/pyflakes")
6458 (synopsis "Passive checker of Python programs")
6459 (description
6460 "Pyflakes statically checks Python source code for common errors.")
6461 (license license:expat)))
6462
6463(define-public python2-pyflakes
6464 (package-with-python2 python-pyflakes))
6465
6466(define-public python-mccabe
6467 (package
6468 (name "python-mccabe")
6469 (version "0.6.1")
6470 (source
6471 (origin
6472 (method url-fetch)
6473 (uri (pypi-uri "mccabe" version))
6474 (sha256
6475 (base32
6476 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
6477 (build-system python-build-system)
6478 (native-inputs
6479 `(("python-pytest" ,python-pytest-bootstrap)
6480 ("python-pytest-runner" ,python-pytest-runner)))
6481 (home-page "https://github.com/flintwork/mccabe")
6482 (synopsis "McCabe checker, plugin for flake8")
6483 (description
6484 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
6485complexity of Python source code.")
6486 (license license:expat)))
6487
6488(define-public python2-mccabe
6489 (package-with-python2 python-mccabe))
6490
6491(define-public python-mccabe-0.2.1
6492 (package (inherit python-mccabe)
6493 (version "0.2.1")
6494 (source
6495 (origin
6496 (method url-fetch)
6497 (uri (pypi-uri "mccabe" version))
6498 (sha256
6499 (base32
6500 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
6501
6502(define-public python2-mccabe-0.2.1
6503 (package-with-python2 python-mccabe-0.2.1))
6504
6505;; Flake8 2.4.1 requires an older version of pep8.
6506;; This should be removed ASAP.
6507(define-public python-pep8-1.5.7
6508 (package (inherit python-pep8)
6509 (version "1.5.7")
6510 (source
f3576970
RW
6511 (origin
6512 (method url-fetch)
6513 (uri (pypi-uri "pep8" version))
6514 (sha256
6515 (base32
6516 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
44d10b1f
RW
6517 (arguments
6518 ;; XXX Tests not compatible with Python 3.5.
6519 '(#:tests? #f))))
6520
6521(define-public python2-pep8-1.5.7
6522 (package-with-python2 python-pep8-1.5.7))
6523
6524;; Flake8 2.4.1 requires an older version of pyflakes.
6525;; This should be removed ASAP.
6526(define-public python-pyflakes-0.8.1
6527 (package (inherit python-pyflakes)
6528 (version "0.8.1")
6529 (source
8c4dffb5
RW
6530 (origin
6531 (method url-fetch)
6532 (uri (pypi-uri "pyflakes" version))
6533 (sha256
6534 (base32
6535 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
44d10b1f
RW
6536 (arguments
6537 ;; XXX Tests not compatible with Python 3.5.
6538 '(#:tests? #f))))
6539
6540(define-public python2-pyflakes-0.8.1
6541 (package-with-python2 python-pyflakes-0.8.1))
6542
ac63cf0a 6543(define-public python-flake8
44d10b1f
RW
6544 (package
6545 (name "python-flake8")
fb7686a9 6546 (version "3.7.9")
ac63cf0a
MB
6547 (source (origin
6548 (method url-fetch)
6549 (uri (pypi-uri "flake8" version))
6550 (sha256
6551 (base32
fb7686a9 6552 "1yscj6avirm6m12bjh4fn2lfgxaamqsjh9pirdqfi0fcgq8ils25"))))
44d10b1f
RW
6553 (build-system python-build-system)
6554 (arguments
6555 `(#:phases
6556 (modify-phases %standard-phases
44d10b1f
RW
6557 (delete 'check)
6558 (add-after 'install 'check
6559 (lambda* (#:key inputs outputs #:allow-other-keys)
6560 (add-installed-pythonpath inputs outputs)
6561 (invoke "pytest" "-v")
6562 #t)))))
6563 (propagated-inputs
6564 `(("python-pycodestyle" ,python-pycodestyle)
beaff4a8 6565 ("python-entrypoints" ,python-entrypoints)
44d10b1f
RW
6566 ("python-pyflakes" ,python-pyflakes)
6567 ("python-mccabe" ,python-mccabe)))
6568 (native-inputs
6569 `(("python-mock" ,python-mock)
fb7686a9 6570 ("python-pytest" ,python-pytest-bootstrap)))
44d10b1f
RW
6571 (home-page "https://gitlab.com/pycqa/flake8")
6572 (synopsis
6573 "The modular source code checker: pep8, pyflakes and co")
6574 (description
6575 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
ac63cf0a 6576 (properties `((python2-variant . ,(delay python2-flake8))))
44d10b1f
RW
6577 (license license:expat)))
6578
ac63cf0a
MB
6579(define-public python2-flake8
6580 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
44d10b1f
RW
6581 (package (inherit base)
6582 (propagated-inputs
6583 `(("python2-configparser" ,python2-configparser)
6584 ("python2-enum34" ,python2-enum34)
94fa51e1 6585 ("python2-functools32" ,python2-functools32)
beaff4a8 6586 ("python2-typing" ,python2-typing)
44d10b1f
RW
6587 ,@(package-propagated-inputs base))))))
6588
44d10b1f
RW
6589;; python-hacking requires flake8 <2.6.0.
6590(define-public python-flake8-2.5
6591 (package
6592 (inherit python-flake8)
6593 (version "2.5.5")
6594 (source (origin
6595 (method url-fetch)
6596 (uri (pypi-uri "flake8" version))
6597 (sha256
6598 (base32
6599 "1snylqwbmrylbx3r1wpz8ggk98f6bcag4441ag8mm2l7wyn58sij"))))
6600 (propagated-inputs
6601 `(("python-pep8" ,python-pep8)
6602 ,@(package-propagated-inputs python-flake8)))
6603 (properties `((python2-variant . ,(delay python2-flake8-2.5))))))
6604
6605(define-public python2-flake8-2.5
6606 (package
6607 (inherit python2-flake8)
6608 (version (package-version python-flake8-2.5))
6609 (source (origin
6610 (inherit (package-source python-flake8-2.5))))
6611 (propagated-inputs
6612 `(("python2-pep8" ,python2-pep8)
6613 ,@(package-propagated-inputs python2-flake8)))))
6614
6615(define-public python-flake8-polyfill
6616 (package
6617 (name "python-flake8-polyfill")
6618 (version "1.0.2")
6619 (source
6620 (origin
6621 (method url-fetch)
6622 (uri (pypi-uri "flake8-polyfill" version))
6623 (sha256
6624 (base32
6625 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
6626 (build-system python-build-system)
6627 (arguments
6628 '(#:phases
6629 (modify-phases %standard-phases
6630 (replace 'check
6631 (lambda _
40a7153d
MB
6632 ;; Be compatible with Pytest 4:
6633 ;; https://gitlab.com/pycqa/flake8-polyfill/merge_requests/7
6634 (substitute* "setup.cfg"
6635 (("\\[pytest\\]")
6636 "[tool:pytest]"))
6637
44d10b1f
RW
6638 (setenv "PYTHONPATH"
6639 (string-append (getcwd) "/build/lib:"
6640 (getenv "PYTHONPATH")))
4f0a0894 6641 (invoke "py.test" "-v"))))))
44d10b1f
RW
6642 (native-inputs
6643 `(("python-flake8" ,python-flake8)
6644 ("python-mock" ,python-mock)
6645 ("python-pep8" ,python-pep8)
6646 ("python-pycodestyle" ,python-pycodestyle)
6647 ("python-pytest" ,python-pytest)))
6648 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
6649 (synopsis "Polyfill package for Flake8 plugins")
6650 (description
6651 "This package that provides some compatibility helpers for Flake8
6652plugins that intend to support Flake8 2.x and 3.x simultaneously.")
6653 (license license:expat)))
6654
6655(define-public python2-flake8-polyfill
6656 (package-with-python2 python-flake8-polyfill))
6657
6658(define-public python-mistune
6659 (package
6660 (name "python-mistune")
6661 (version "0.8.4")
6662 (source
6663 (origin
6664 (method url-fetch)
6665 (uri (pypi-uri "mistune" version))
6666 (sha256
6667 (base32
6668 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
6669 (build-system python-build-system)
6670 (native-inputs
6671 `(("python-nose" ,python-nose)
6672 ("python-cython" ,python-cython)))
6673 (home-page "https://github.com/lepture/mistune")
6674 (synopsis "Markdown parser in pure Python")
6675 (description "This package provides a fast markdown parser in pure
6676Python.")
6677 (license license:bsd-3)))
6678
6679(define-public python2-mistune
6680 (package-with-python2 python-mistune))
6681
6682(define-public python-markdown
6683 (package
6684 (name "python-markdown")
ceb1936a 6685 (version "3.1.1")
44d10b1f
RW
6686 (source
6687 (origin
6688 (method url-fetch)
6689 (uri (pypi-uri "Markdown" version))
6690 (sha256
6691 (base32
ceb1936a 6692 "0yhylk4ffqqs7x086fav4pnfsl1021v7lghznzkififprmmqfl1f"))))
44d10b1f
RW
6693 (build-system python-build-system)
6694 (native-inputs
6695 `(("python-nose" ,python-nose)
6696 ("python-pyyaml" ,python-pyyaml)))
6697 (home-page "https://python-markdown.github.io/")
6698 (synopsis "Python implementation of Markdown")
6699 (description
6700 "This package provides a Python implementation of John Gruber's
6701Markdown. The library features international input, various Markdown
6702extensions, and several HTML output formats. A command line wrapper
6703markdown_py is also provided to convert Markdown files to HTML.")
6704 (license license:bsd-3)))
6705
6706(define-public python2-markdown
6707 (package-with-python2 python-markdown))
6708
6709(define-public python-ptyprocess
6710 (package
6711 (name "python-ptyprocess")
6712 (version "0.5.2")
6713 (source
6714 (origin
6715 (method url-fetch)
6716 (uri (pypi-uri "ptyprocess" version))
6717 (sha256
6718 (base32
6719 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
6720 (build-system python-build-system)
6721 (native-inputs
6722 `(("python-nose" ,python-nose)))
6723 (arguments
6724 `(#:phases
6725 (modify-phases %standard-phases
6726 (replace 'check
7904d6fa 6727 (lambda _ (invoke "nosetests"))))))
44d10b1f
RW
6728 (home-page "https://github.com/pexpect/ptyprocess")
6729 (synopsis "Run a subprocess in a pseudo terminal")
6730 (description
6731 "This package provides a Python library used to launch a subprocess in a
6732pseudo terminal (pty), and interact with both the process and its pty.")
6733 (license license:isc)))
6734
6735(define-public python2-ptyprocess
6736 (package-with-python2 python-ptyprocess))
6737
6738(define-public python-cram
6739 (package
6740 (name "python-cram")
6741 (version "0.7")
6742 (home-page "https://bitheap.org/cram/")
6743 (source (origin
6744 (method url-fetch)
6745 (uri (list (string-append home-page "cram-"
6746 version ".tar.gz")
6747 (pypi-uri "cram" version)))
6748 (sha256
6749 (base32
6750 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
6751 (arguments
6752 '(#:phases
6753 (modify-phases %standard-phases
6754 (add-after 'unpack 'patch-source
6755 (lambda _
6756 (substitute* (find-files "cram" ".*\\.py$")
6757 ;; Replace default shell path.
6758 (("/bin/sh") (which "sh")))
6759 (substitute* (find-files "tests" ".*\\.t$")
6760 (("md5") "md5sum")
6761 (("/bin/bash") (which "bash"))
6762 (("/bin/sh") (which "sh")))
6763 (substitute* "cram/_test.py"
6764 ;; This hack works around a bug triggered by substituting
6765 ;; the /bin/sh paths. "tests/usage.t" compares the output of
6766 ;; "cram -h", which breaks the output at 80 characters. This
6767 ;; causes the line showing the default shell to break into two
6768 ;; lines, but the test expects a single line...
6769 (("env\\['COLUMNS'\\] = '80'")
6770 "env['COLUMNS'] = '160'"))
ff1e80d7
MB
6771
6772 (substitute* "Makefile"
6773 ;; Recent versions of python-coverage have caused the test
6774 ;; coverage to decrease (as of version 0.7). Allow that.
6775 (("--fail-under=100")
6776 "--fail-under=90"))
6777
44d10b1f 6778 #t))
ff1e80d7 6779 (replace 'check
44d10b1f 6780 ;; The test phase uses the built library and executable.
44d10b1f
RW
6781 (lambda* (#:key inputs outputs #:allow-other-keys)
6782 (add-installed-pythonpath inputs outputs)
6783 (setenv "PATH" (string-append (getenv "PATH") ":"
6784 (assoc-ref outputs "out") "/bin"))
2d7db192 6785 (invoke "make" "test"))))))
44d10b1f
RW
6786 (build-system python-build-system)
6787 (native-inputs
6788 `(("python-coverage" ,python-coverage)
6789 ("which" ,which)))
6790 (synopsis "Simple testing framework for command line applications")
6791 (description
6792 "Cram is a functional testing framework for command line applications.
6793Cram tests look like snippets of interactive shell sessions. Cram runs each
6794command and compares the command output in the test with the command’s actual
6795output.")
6796 (license license:gpl2+)))
6797
6798(define-public python2-cram
6799 (package-with-python2 python-cram))
6800
6801(define-public python-straight-plugin
6802 (package
6803 (name "python-straight-plugin")
6804 (version "1.4.1")
6805 (source
6806 (origin
6807 (method url-fetch)
6808 (uri (pypi-uri "straight.plugin" version))
6809 (sha256
6810 (base32
6811 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
6812 (build-system python-build-system)
6813 (home-page "https://github.com/ironfroggy/straight.plugin")
6814 (synopsis "Simple namespaced plugin facility")
6815 (description "Straight Plugin provides a type of plugin you can create from
6816almost any existing Python modules, and an easy way for outside developers to
6817add functionality and customization to your projects with their own plugins.")
6818 (license license:expat)))
6819
6820(define-public python2-straight-plugin
6821 (package-with-python2 python-straight-plugin))
6822
6823(define-public python-fonttools
6824 (package
6825 (name "python-fonttools")
3963fc70 6826 (version "4.2.2")
44d10b1f
RW
6827 (source (origin
6828 (method url-fetch)
6829 (uri (pypi-uri "fonttools" version ".zip"))
6830 (sha256
6831 (base32
3963fc70 6832 "012qqspnwdl4vy8qgzzpfglkk5dgzxiw0fak2jq74ngygvz3vfv6"))))
44d10b1f
RW
6833 (build-system python-build-system)
6834 (native-inputs
6835 `(("unzip" ,unzip)
6836 ("python-pytest" ,python-pytest)
6837 ("python-pytest-runner" ,python-pytest-runner)))
9d25a454 6838 (home-page "https://github.com/fonttools/fonttools")
44d10b1f
RW
6839 (synopsis "Tools to manipulate font files")
6840 (description
6841 "FontTools/TTX is a library to manipulate font files from Python. It
6842supports reading and writing of TrueType/OpenType fonts, reading and writing
6843of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
6844also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
6845from an XML-based format.")
6846 (license license:expat)))
6847
7a039449 6848;; Fonttools 4.x dropped support for Python 2, so stick with 3.x here.
44d10b1f 6849(define-public python2-fonttools
7a039449
MB
6850 (let ((base (package-with-python2 (strip-python2-variant python-fonttools))))
6851 (package/inherit
6852 base
8057faf0 6853 (version "3.44.0")
7a039449
MB
6854 (source (origin
6855 (method url-fetch)
6856 (uri (pypi-uri "fonttools" version ".zip"))
6857 (sha256
6858 (base32
8057faf0 6859 "0v6399g755f2hn1ry62i5b6gdinf2fpx2966v3bxh6bjw1accb5p")))))))
44d10b1f
RW
6860
6861(define-public python-ly
6862 (package
6863 (name "python-ly")
6864 (version "0.9.5")
6865 (source
6866 (origin
6867 (method url-fetch)
6868 (uri (pypi-uri name version))
6869 (sha256
6870 (base32
6871 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
6872 (build-system python-build-system)
6873 (arguments
6874 ;; FIXME: Some tests need network access.
6875 '(#:tests? #f))
6876 (synopsis "Tool and library for manipulating LilyPond files")
6877 (description "This package provides a Python library to parse, manipulate
6878or create documents in LilyPond format. A command line program ly is also
6879provided that can be used to do various manipulations with LilyPond files.")
6880 (home-page "https://pypi.python.org/pypi/python-ly")
6881 (license license:gpl2+)))
6882
6883(define-public python-appdirs
6884 (package
6885 (name "python-appdirs")
6886 (version "1.4.3")
6887 (source
6888 (origin
6889 (method url-fetch)
6890 (uri (pypi-uri "appdirs" version))
6891 (sha256
6892 (base32
6893 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
6894 (build-system python-build-system)
6895 (home-page "https://github.com/ActiveState/appdirs")
6896 (synopsis
6897 "Determine platform-specific dirs, e.g. a \"user data dir\"")
6898 (description
6899 "This module provides a portable way of finding out where user data
6900should be stored on various operating systems.")
6901 (license license:expat)))
6902
6903(define-public python2-appdirs
6904 (package-with-python2 python-appdirs))
6905
6906(define-public python-llfuse
6907 (package
6908 (name "python-llfuse")
6909 (version "1.3.5")
6910 (source (origin
6911 (method url-fetch)
6912 (uri (pypi-uri "llfuse" version ".tar.bz2"))
6913 (sha256
6914 (base32
6915 "1n7a90jww3ly49fm7x27m3xw3la3qfrnykcakga654g6kcyjlhbf"))))
6916 (build-system python-build-system)
6917 (inputs
6918 `(("fuse" ,fuse)
6919 ("attr" ,attr)))
6920 (native-inputs
6921 `(("pkg-config" ,pkg-config)))
6922 (synopsis "Python bindings for FUSE")
6923 (description
6924 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
6925 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
6926 (license license:lgpl2.0+)
6927 (properties `((python2-variant . ,(delay python2-llfuse))))))
6928
6929(define-public python2-llfuse
6930 (package (inherit (package-with-python2
6931 (strip-python2-variant python-llfuse)))
6932 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
6933
6934;; For attic-0.16
6935(define-public python-llfuse-0.41
6936 (package (inherit python-llfuse)
6937 (version "0.41.1")
6938 (source (origin
6939 (method url-fetch)
6940 (uri (string-append
6941 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6942 "llfuse-" version ".tar.bz2"))
6943 (sha256
6944 (base32
6945 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
6946 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
6947 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
6948 (license (list license:expat license:lgpl2.0+))))
6949
6950(define-public python-msgpack
6951 (package
6952 (name "python-msgpack")
6953 (version "0.5.6")
6954 (source (origin
6955 (method url-fetch)
6956 (uri (pypi-uri "msgpack" version))
6957 (sha256
6958 (base32
6959 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
6960 (build-system python-build-system)
6961 (arguments
6962 `(#:modules ((guix build utils)
6963 (guix build python-build-system)
6964 (ice-9 ftw)
6965 (srfi srfi-1)
6966 (srfi srfi-26))
6967 #:phases
6968 (modify-phases %standard-phases
6969 (replace 'check
6970 (lambda _
6971 (let ((cwd (getcwd)))
6972 (setenv "PYTHONPATH"
6973 (string-append cwd "/build/"
6974 (find (cut string-prefix? "lib" <>)
6975 (scandir (string-append cwd "/build")))
6976 ":"
6977 (getenv "PYTHONPATH")))
6978 (invoke "pytest" "-v" "test")))))))
6979 (native-inputs
6980 `(("python-pytest" ,python-pytest)))
6981 (synopsis "MessagePack (de)serializer")
6982 (description "MessagePack is a fast, compact binary serialization format,
6983suitable for similar data to JSON. This package provides CPython bindings for
6984reading and writing MessagePack data.")
6985 (home-page "https://pypi.python.org/pypi/msgpack/")
6986 (license license:asl2.0)))
6987
6988;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
6989;; release 0.5. Some packages like borg still call it by the old name for now.
6990;; <https://bugs.gnu.org/30662>
6991(define-public python-msgpack-transitional
6992 (package
6993 (inherit python-msgpack)
6994 (name "python-msgpack-transitional")
6995 (arguments
6996 (substitute-keyword-arguments (package-arguments python-msgpack)
6997 ((#:phases phases)
6998 `(modify-phases ,phases
6999 (add-after 'unpack 'configure-transitional
7000 (lambda _
7001 ;; Keep using the old name.
7002 (substitute* "setup.py"
7003 (("TRANSITIONAL = False")
7004 "TRANSITIONAL = 1"))
7005 #t))))))))
7006
7007(define-public python2-msgpack
7008 (package-with-python2 python-msgpack))
7009
7010(define-public python-netaddr
7011 (package
7012 (name "python-netaddr")
7013 (version "0.7.19")
7014 (source
7015 (origin
7016 (method url-fetch)
7017 (uri (pypi-uri "netaddr" version))
7018 (sha256
7019 (base32
7020 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
7021 (build-system python-build-system)
7022 (arguments `(#:tests? #f)) ;; No tests.
7023 (home-page "https://github.com/drkjam/netaddr/")
7024 (synopsis "Pythonic manipulation of network addresses")
7025 (description
7026 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
7027and MAC network addresses.")
7028 (license license:bsd-3)))
7029
7030(define-public python2-netaddr
7031 (package-with-python2 python-netaddr))
7032
dd85eca0
AG
7033(define-public python2-pyroute2
7034 (package
7035 (name "python2-pyroute2")
7036 (version "0.5.6")
7037 (source
7038 (origin
7039 (method url-fetch)
7040 (uri (pypi-uri "pyroute2" version))
7041 (sha256
7042 (base32
7043 "1gmz4r1w0yzj6fjjypnalmfyy0lnfznydyn62gi3wk50j5hhxbny"))))
7044 (build-system python-build-system)
7045 (arguments
7046 `(#:python ,python-2)) ;Python 3.x is not supported
7047 (home-page "https://github.com/svinota/pyroute2")
7048 (synopsis "Python netlink library")
7049 (description
7050 "Pyroute2 is a pure Python netlink library with minimal dependencies.
7051Supported netlink families and protocols include:
7052@itemize
7053@item rtnl, network settings - addresses, routes, traffic controls
7054@item nfnetlink - netfilter API: ipset, nftables, ...
7055@item ipq - simplest userspace packet filtering, iptables QUEUE target
7056@item devlink - manage and monitor devlink-enabled hardware
7057@item generic - generic netlink families
7058 @itemize
7059 @item nl80211 - wireless functions API (basic support)
7060 @item taskstats - extended process statistics
7061 @item acpi_events - ACPI events monitoring
7062 @item thermal_events - thermal events monitoring
7063 @item VFS_DQUOT - disk quota events monitoring
7064 @end itemize
7065@end itemize")
7066 (license license:gpl2+)))
7067
44d10b1f
RW
7068(define-public python-wrapt
7069 (package
7070 (name "python-wrapt")
2271a1dc 7071 (version "1.11.2")
44d10b1f 7072 (source
2271a1dc
MB
7073 (origin
7074 (method url-fetch)
7075 (uri (pypi-uri "wrapt" version))
7076 (sha256
7077 (base32
7078 "1q81762dgsgrd12f8qc39zk8s5wll3m5xc32jdmlf6cls4gh4njn"))))
44d10b1f
RW
7079 (build-system python-build-system)
7080 (arguments
7081 ;; Tests are not included in the tarball, they are only available in the
7082 ;; git repository.
7083 `(#:tests? #f))
7084 (home-page "https://github.com/GrahamDumpleton/wrapt")
7085 (synopsis "Module for decorators, wrappers and monkey patching")
7086 (description
2271a1dc 7087 "The aim of the wrapt module is to provide a transparent object proxy for
44d10b1f
RW
7088 Python, which can be used as the basis for the construction of function
7089 wrappers and decorator functions.")
7090 (license license:bsd-2)))
7091
7092(define-public python2-wrapt
7093 (package-with-python2 python-wrapt))
7094
7095(define-public python-xlrd
7096 (package
7097 (name "python-xlrd")
3a2b1a3c 7098 (version "1.2.0")
44d10b1f
RW
7099 (source (origin
7100 (method url-fetch)
7101 (uri (pypi-uri "xlrd" version))
7102 (sha256
7103 (base32
3a2b1a3c 7104 "1ci93fda4n67qhdvfl16zasyxrpygzk53hs6m8z0rd4dxrnb6vjl"))))
44d10b1f
RW
7105 (build-system python-build-system)
7106 (arguments
7107 `(#:phases
7108 (modify-phases %standard-phases
3ccdd3a5
MO
7109 ;; Some tests depend on writing a temporary file to the user's home
7110 ;; directory.
3a2b1a3c
GL
7111 (add-after 'unpack 'fix-tests
7112 (lambda _
7113 (delete-file "tests/test_open_workbook.py")
7114 #t)))))
44d10b1f
RW
7115 (home-page "http://www.python-excel.org/")
7116 (synopsis "Library for extracting data from Excel files")
a0909286 7117 (description "This package provides a library to extract data from
44d10b1f
RW
7118spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
7119@samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
7120Unicode-aware. It is not intended as an end-user tool.")
7121 (license license:bsd-3)))
7122
7123(define-public python2-xlrd
7124 (package-with-python2 python-xlrd))
7125
7126(define-public python-prettytable
7127 (package
7128 (name "python-prettytable")
7129 (version "0.7.2")
7130 (source
7131 (origin
7132 (method url-fetch)
337c3a1e 7133 (uri (pypi-uri "prettytable" version ".tar.bz2"))
44d10b1f
RW
7134 (sha256
7135 (base32
7136 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
7137 (build-system python-build-system)
7138 (home-page "http://code.google.com/p/prettytable/")
7139 (synopsis "Display tabular data in an ASCII table format")
7140 (description
7141 "A library designed to represent tabular data in visually appealing ASCII
7142tables. PrettyTable allows for selection of which columns are to be printed,
7143independent alignment of columns (left or right justified or centred) and
7144printing of sub-tables by specifying a row range.")
7145 (license license:bsd-3)))
7146
7147(define-public python2-prettytable
7148 (package-with-python2 python-prettytable))
7149
7150(define-public python-tables
7151 (package
7152 (name "python-tables")
7153 (version "3.4.4")
7154 (source
7155 (origin
7156 (method url-fetch)
7157 (uri (pypi-uri "tables" version))
7158 (sha256
7159 (base32
7160 "0affz7k8babh8wdmsgrz5jxrd569by2w8ffimcxs9wiaf5rw1idx"))
7161 (modules '((guix build utils)))
7162 (snippet
7163 '(begin
7164 ;; Remove pre-compiled .pyc files from source.
7165 (for-each delete-file-recursively
7166 (find-files "." "__pycache__" #:directories? #t))
7167 (for-each delete-file (find-files "." "\\.pyc$"))
7168 #t))))
7169 (build-system python-build-system)
7170 (arguments
7171 `(;; FIXME: python-build-system does not pass configure-flags to "build"
7172 ;; or "check", so we must override the build and check phases.
7173 #:phases
7174 (modify-phases %standard-phases
7175 (add-after 'unpack 'use-gcc
7176 (lambda _
7177 (substitute* "setup.py"
7178 (("compiler = new_compiler\\(\\)" line)
7179 (string-append line
7180 "\ncompiler.set_executables(compiler='gcc',"
7181 "compiler_so='gcc',"
7182 "linker_exe='gcc',"
7183 "linker_so='gcc -shared')")))
7184 #t))
7185 (replace 'build
7186 (lambda* (#:key inputs #:allow-other-keys)
35d79d61
RW
7187 (invoke "python" "setup.py" "build"
7188 (string-append "--hdf5="
7189 (assoc-ref inputs "hdf5")))))
44d10b1f
RW
7190 (replace 'check
7191 (lambda* (#:key inputs #:allow-other-keys)
35d79d61
RW
7192 (invoke "python" "setup.py" "check"
7193 (string-append "--hdf5="
7194 (assoc-ref inputs "hdf5"))))))))
44d10b1f
RW
7195 (propagated-inputs
7196 `(("python-numexpr" ,python-numexpr)
7197 ("python-numpy" ,python-numpy)))
7198 (native-inputs
7199 `(("python-cython" ,python-cython)
7200 ("pkg-config" ,pkg-config)))
7201 (inputs
7202 `(("hdf5" ,hdf5)
7203 ("bzip2" ,bzip2)
7204 ("zlib" ,zlib)))
7205 (home-page "http://www.pytables.org/")
7206 (synopsis "Hierarchical datasets for Python")
7207 (description "PyTables is a package for managing hierarchical datasets and
7208designed to efficiently cope with extremely large amounts of data.")
7209 (license license:bsd-3)))
7210
7211(define-public python2-tables
7212 (package-with-python2 python-tables))
7213
7214(define-public python-pyasn1
7215 (package
7216 (name "python-pyasn1")
7217 (version "0.4.3")
7218 (source
7219 (origin
7220 (method url-fetch)
7221 (uri (pypi-uri "pyasn1" version))
7222 (sha256
7223 (base32
7224 "1z5h38anjzzrxpraa9iq9llffyx2zs8gx0q6dc1g029miwnn50gv"))))
7225 (build-system python-build-system)
7226 (home-page "http://pyasn1.sourceforge.net/")
7227 (synopsis "ASN.1 types and codecs")
7228 (description
7229 "This is an implementation of ASN.1 types and codecs in Python. It is
7230suitable for a wide range of protocols based on the ASN.1 specification.")
7231 (license license:bsd-2)))
7232
7233(define-public python2-pyasn1
7234 (package-with-python2 python-pyasn1))
7235
7236(define-public python-pyasn1-modules
7237 (package
7238 (name "python-pyasn1-modules")
7239 (version "0.2.2")
7240 (source
7241 (origin
7242 (method url-fetch)
7243 (uri (pypi-uri "pyasn1-modules" version))
7244 (sha256
7245 (base32
7246 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
7247 (build-system python-build-system)
7248 (propagated-inputs
7249 `(("python-pyasn1" ,python-pyasn1)))
7250 (home-page "https://sourceforge.net/projects/pyasn1/")
7251 (synopsis "ASN.1 codec implementations")
7252 (description
7253 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
7254implementations of ASN.1-based codecs and protocols.")
7255 (license license:bsd-3)))
7256
7257(define-public python2-pyasn1-modules
7258 (package-with-python2 python-pyasn1-modules))
7259
7260(define-public python-ipaddress
7261 (package
7262 (name "python-ipaddress")
7263 (version "1.0.22")
7264 (source (origin
7265 (method url-fetch)
7266 (uri (pypi-uri "ipaddress" version))
7267 (sha256
7268 (base32
7269 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
7270 (build-system python-build-system)
7271 (home-page "https://github.com/phihag/ipaddress")
7272 (synopsis "IP address manipulation library")
7273 (description
7274 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
7275 in Python. This library is used to create, poke at, and manipulate IPv4 and
7276 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
7277 module to older versions of Python.")
7278 (license license:psfl)))
7279
7280(define-public python2-ipaddress
7281 (package-with-python2 python-ipaddress))
7282
7283(define-public python2-ipaddr
7284 (package
7285 (name "python2-ipaddr")
7286 (version "2.1.11")
7287 (source
7288 (origin
7289 (method url-fetch)
7290 (uri (pypi-uri "ipaddr" version))
7291 (sha256
7292 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
7293 (build-system python-build-system)
7294 (arguments
7295 `(#:python ,python-2 ;version 2 only
7296 #:phases
7297 (modify-phases %standard-phases
7298 (replace 'check
40b8c4e3 7299 (lambda _ (invoke "python" "ipaddr_test.py"))))))
44d10b1f
RW
7300 (home-page "https://github.com/google/ipaddr-py")
7301 (synopsis "IP address manipulation library")
7302 (description
7303 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
7304IPv6 addresses and networks.
7305
7306For new implementations you may prefer to use the standard module
7307@code{ipaddress}, which was introduced in Python 3.3 and backported to older
7308versions of Python.")
7309 (license license:asl2.0)))
7310
7311(define-public python-idna
7312 (package
7313 (name "python-idna")
e95c9837 7314 (version "2.8")
44d10b1f
RW
7315 (source
7316 (origin
7317 (method url-fetch)
7318 (uri (pypi-uri "idna" version))
7319 (sha256
7320 (base32
e95c9837 7321 "01rlkigdxg17sf9yar1jl8n18ls59367wqh59hnawlyg53vb6my3"))))
44d10b1f
RW
7322 (build-system python-build-system)
7323 (home-page "https://github.com/kjd/idna")
7324 (synopsis "Internationalized domain names in applications")
7325 (description
7326 "This is a library to support the Internationalised Domain Names in
7327Applications (IDNA) protocol as specified in RFC 5891. This version of the
7328protocol is often referred to as “IDNA2008” and can produce different results
7329from the earlier standard from 2003. The library is also intended to act as a
7330suitable drop-in replacement for the “encodings.idna” module that comes with
7331the Python standard library but currently only supports the older 2003
7332specification.")
7333 (license license:bsd-4)))
7334
a76e6a69
JM
7335(define-public python-idna-2.7
7336 (package (inherit python-idna)
7337 (version "2.7")
7338 (source (origin
7339 (method url-fetch)
7340 (uri (pypi-uri "idna" version))
7341 (sha256
7342 (base32
7343 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))))
7344
7345
44d10b1f
RW
7346(define-public python2-idna
7347 (package-with-python2 python-idna))
7348
7349(define-public python-idna-ssl
7350 (package
7351 (name "python-idna-ssl")
7352 (version "1.0.1")
7353 (source
7354 (origin
7355 (method url-fetch)
7356 (uri (pypi-uri "idna-ssl" version))
7357 (sha256
7358 (base32
7359 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
7360 (build-system python-build-system)
7361 (arguments
7362 `(#:tests? #f)) ;circular dependency with python-aiohttp
7363 (home-page "https://github.com/aio-libs/idna-ssl")
7364 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
7365 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
7366domains support.")
7367 (license license:expat)))
7368
7369(define-public python-pretend
7370 (package
7371 (name "python-pretend")
7372 (version "1.0.9")
7373 (source
7374 (origin
7375 (method url-fetch)
9f1f22ee 7376 (uri (pypi-uri "pretend" version))
44d10b1f
RW
7377 (sha256
7378 (base32
7379 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
7380 (build-system python-build-system)
7381 (home-page "https://github.com/alex/pretend")
7382 (synopsis "Library for stubbing in Python")
7383 (description
7384 "Pretend is a library to make stubbing with Python easier. Stubbing is a
7385technique for writing tests. You may hear the term mixed up with mocks,
7386fakes, or doubles. Basically, a stub is an object that returns pre-canned
7387responses, rather than doing any computation.")
7388 (license license:bsd-3)))
7389
7390(define-public python2-pretend
7391 (package-with-python2 python-pretend))
7392
7393(define-public python-pip
7394 (package
7395 (name "python-pip")
523ba4b1 7396 (version "19.2.1")
44d10b1f
RW
7397 (source
7398 (origin
7399 (method url-fetch)
7400 (uri (pypi-uri "pip" version))
7401 (sha256
7402 (base32
523ba4b1 7403 "100sd12ss4mbdj5lf3wawad29cm573b27765mq098x6xhcj71395"))))
44d10b1f
RW
7404 (build-system python-build-system)
7405 (arguments
7406 '(#:tests? #f)) ; there are no tests in the pypi archive.
7407 (home-page "https://pip.pypa.io/")
7408 (synopsis "Package manager for Python software")
7409 (description
7410 "Pip is a package manager for Python software, that finds packages on the
7411Python Package Index (PyPI).")
7412 (license license:expat)))
7413
7414(define-public python2-pip
7415 (package-with-python2 python-pip))
7416
7417(define-public python-tlsh
7418 (package
7419 (name "python-tlsh")
7420 (version "3.4.5")
7421 (home-page "https://github.com/trendmicro/tlsh")
3e3ff8ad
TGR
7422 (source
7423 (origin
7424 (method git-fetch)
7425 (uri (git-reference
7426 (url "https://github.com/trendmicro/tlsh.git")
7427 (commit (string-append "v" version))))
7428 (file-name (git-file-name name version))
7429 (sha256
7430 (base32 "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll"))))
44d10b1f
RW
7431 (build-system cmake-build-system)
7432 (arguments
7433 '(#:out-of-source? #f
7434 #:phases (modify-phases %standard-phases
7435 (replace
7436 'install
7437 (lambda* (#:key outputs #:allow-other-keys)
7438 ;; Build and install the Python bindings. The underlying
7439 ;; C++ library is apparently not meant to be installed.
7440 (let ((out (assoc-ref outputs "out")))
7441 (with-directory-excursion "py_ext"
7442 (and (system* "python" "setup.py" "build")
7443 (system* "python" "setup.py" "install"
7444 (string-append "--prefix=" out))))))))))
7445 (inputs `(("python" ,python-wrapper))) ;for the bindings
7446 (synopsis "Fuzzy matching library for Python")
7447 (description
7448 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
7449Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
7450value which can be used for similarity comparisons. Similar objects have
7451similar hash values, which allows for the detection of similar objects by
7452comparing their hash values. The byte stream should have a sufficient amount
7453of complexity; for example, a byte stream of identical bytes will not generate
7454a hash value.")
7455 (license license:asl2.0)))
7456
7457(define-public python2-tlsh
7458 (package
7459 (inherit python-tlsh)
7460 (name "python2-tlsh")
7461 (inputs `(("python" ,python-2)))))
7462
7463(define-public python-termcolor
7464 (package
7465 (name "python-termcolor")
7466 (version "1.1.0")
7467 (source
7468 (origin
7469 (method url-fetch)
7470 (uri (pypi-uri "termcolor" version))
7471 (sha256
7472 (base32
7473 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
7474 (build-system python-build-system)
7475 (arguments
7476 ;; There are no tests.
7477 `(#:tests? #f))
7478 (home-page "https://pypi.python.org/pypi/termcolor")
7479 (synopsis "ANSII Color formatting for terminal output")
7480 (description
7481 "This package provides ANSII Color formatting for output in terminals.")
7482 (license license:expat)))
7483
7484(define-public python2-termcolor
7485 (package-with-python2 python-termcolor))
7486
7487(define-public python-libarchive-c
7488 (package
7489 (name "python-libarchive-c")
7490 (version "2.8")
7491 (source (origin
7492 (method url-fetch)
7493 (uri (pypi-uri "libarchive-c" version))
7494 (sha256
7495 (base32
7496 "0qg0v1s9c1xdk9philhnv8k6c6nicvnvfwlc0j9srg90jmdlvm06"))))
7497 (build-system python-build-system)
7498 (arguments
7499 '(#:phases (modify-phases %standard-phases
7500 (add-before
7501 'build 'reference-libarchive
7502 (lambda* (#:key inputs #:allow-other-keys)
7503 ;; Retain the absolute file name of libarchive.so.
7504 (let ((libarchive (assoc-ref inputs "libarchive")))
7505 (substitute* "libarchive/ffi.py"
7506 (("find_library\\('archive'\\)")
7507 (string-append "'" libarchive
7508 "/lib/libarchive.so'"))))))
7509 (replace 'check
7510 (lambda _ (invoke "pytest" "-vv"))))))
7511 (native-inputs
7512 `(("python-mock" ,python-mock)
7513 ("python-pytest" ,python-pytest)))
7514 (inputs
7515 `(("libarchive" ,libarchive)))
7516 (home-page "https://github.com/Changaco/python-libarchive-c")
7517 (synopsis "Python interface to libarchive")
7518 (description
7519 "This package provides Python bindings to libarchive, a C library to
7520access possibly compressed archives in many different formats. It uses
7521Python's @code{ctypes} foreign function interface (FFI).")
7522 (license license:lgpl2.0+)))
7523
7524(define-public python2-libarchive-c
7525 (package-with-python2 python-libarchive-c))
7526
7527(define-public python-file
7528 (package
7529 (inherit file)
7530 (name "python-file")
7531 (build-system python-build-system)
7532 (arguments
7533 '(#:tests? #f ;no tests
7534 #:configure-flags '("--single-version-externally-managed" "--root=/")
7535 #:phases (modify-phases %standard-phases
7536 (add-before 'build 'change-directory
7537 (lambda _
7538 (chdir "python")
7539 #t))
7540 (add-before 'build 'set-library-file-name
7541 (lambda* (#:key inputs #:allow-other-keys)
7542 (let ((file (assoc-ref inputs "file")))
7543 (substitute* "magic.py"
7544 (("find_library\\('magic'\\)")
7545 (string-append "'" file "/lib/libmagic.so'")))
7546 #t))))))
7547 (inputs `(("file" ,file)))
528ea990
LC
7548 (native-inputs (if (%current-target-system)
7549 `(("self" ,this-package))
7550 '()))
44d10b1f
RW
7551 (synopsis "Python bindings to the libmagic file type guesser. Note that
7552this module and the python-magic module both provide a \"magic.py\" file;
7553these two modules, which are different and were developed separately, both
7554serve the same purpose: provide Python bindings for libmagic.")))
7555
7556(define-public python2-file
7557 (package-with-python2 python-file))
7558
7559(define-public python-debian
7560 (package
7561 (name "python-debian")
7562 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
9f74bd31 7563 (version "0.1.36")
44d10b1f
RW
7564 (source
7565 (origin
9f74bd31
VC
7566 ;; Use git-fetch, as pypi doesn't include test suite.
7567 (method git-fetch)
7568 (uri (git-reference
7569 (url home-page)
7570 (commit version)))
7571 (file-name (git-file-name name version))
44d10b1f
RW
7572 (sha256
7573 (base32
9f74bd31 7574 "0qy6x28bj6yfikhjww932v5xq4mf5bm1iczl7acy4c7zm6mwhqfa"))))
44d10b1f 7575 (build-system python-build-system)
9f74bd31
VC
7576 (arguments
7577 `(#:phases (modify-phases %standard-phases
7578 (add-after 'unpack 'remove-debian-specific-tests
7579 ;; python-apt, apt and dpkg are not yet available in guix,
7580 ;; and these tests heavily depend on them.
7581 (lambda _
7582 (delete-file "lib/debian/tests/test_deb822.py")
7583 (delete-file "lib/debian/tests/test_debfile.py")
7584 #t)))))
44d10b1f 7585 (propagated-inputs
9f74bd31
VC
7586 `(("python-six" ,python-six)
7587 ("python-chardet" ,python-chardet)))
44d10b1f
RW
7588 (synopsis "Debian package related modules")
7589 (description
7590 ;; XXX: Use @enumerate instead of @itemize to work around
7591 ;; <http://bugs.gnu.org/21772>.
7592 "This package provides Python modules that abstract many formats of
7593Debian-related files, such as:
7594
7595@enumerate
7596@item Debtags information;
7597@item @file{debian/changelog} files;
7598@item packages files, pdiffs;
7599@item control files of single or multiple RFC822-style paragraphs---e.g.
7600 @file{debian/control}, @file{.changes}, @file{.dsc};
7601@item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
7602 contained files and meta-information.
7603@end enumerate\n")
7604
7605 ;; Modules are either GPLv2+ or GPLv3+.
7606 (license license:gpl3+)))
7607
7608(define-public python2-debian
7609 (package-with-python2 python-debian))
7610
7611(define-public python-nbformat
7612 (package
7613 (name "python-nbformat")
7614 (version "4.4.0")
7615 (source
7616 (origin
7617 (method url-fetch)
7618 (uri (pypi-uri "nbformat" version))
7619 (sha256
7620 (base32
7621 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
7622 (build-system python-build-system)
7623 (arguments `(#:tests? #f)) ; no test target
7624 (propagated-inputs
7625 `(("python-ipython-genutils" ,python-ipython-genutils)
7626 ("python-jsonschema" ,python-jsonschema)
7627 ("python-jupyter-core" ,python-jupyter-core)
7628 ("python-traitlets" ,python-traitlets)))
7629 (home-page "http://jupyter.org")
7630 (synopsis "Jupyter Notebook format")
7631 (description "This package provides the reference implementation of the
7632Jupyter Notebook format and Python APIs for working with notebooks.")
7633 (license license:bsd-3)))
7634
7635(define-public python2-nbformat
7636 (package-with-python2 python-nbformat))
7637
7638(define-public python-bleach
7639 (package
7640 (name "python-bleach")
ff0efc8f 7641 (version "3.1.0")
44d10b1f
RW
7642 (source
7643 (origin
7644 (method url-fetch)
7645 (uri (pypi-uri "bleach" version))
7646 (sha256
7647 (base32
ff0efc8f 7648 "1yhrgrhkln8bd6gn3imj69g1h4xqah9gaz9q26crqr6gmmvpzprz"))))
44d10b1f
RW
7649 (build-system python-build-system)
7650 (propagated-inputs
ff0efc8f 7651 `(("python-webencodings" ,python-webencodings)
44d10b1f
RW
7652 ("python-six" ,python-six)))
7653 (native-inputs
ff0efc8f
MB
7654 `(("python-pytest" ,python-pytest)
7655 ("python-pytest-runner" ,python-pytest-runner-2)))
44d10b1f
RW
7656 (home-page "https://github.com/jsocol/bleach")
7657 (synopsis "Whitelist-based HTML-sanitizing tool")
7658 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
7659 (license license:asl2.0)))
7660
7661(define-public python2-bleach
7662 (package-with-python2 python-bleach))
7663
7664(define-public python-entrypoints
7665 (package
7666 (name "python-entrypoints")
a7f1b718 7667 (version "0.3")
44d10b1f
RW
7668 (source
7669 (origin
7670 (method url-fetch)
a7f1b718 7671 (uri (pypi-uri "entrypoints" version))
44d10b1f
RW
7672 (sha256
7673 (base32
a7f1b718 7674 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
44d10b1f
RW
7675 (build-system python-build-system)
7676 ;; The package does not come with a setup.py file, so we have to generate
7677 ;; one ourselves.
7678 (arguments
7679 `(#:tests? #f
7680 #:phases
7681 (modify-phases %standard-phases
7682 (add-after 'unpack 'create-setup.py
7683 (lambda _
7684 (call-with-output-file "setup.py"
7685 (lambda (port)
7686 (format port "\
7687from setuptools import setup
7688setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
7689" ,version))))))))
7690 (home-page "https://github.com/takluyver/entrypoints")
7691 (synopsis "Discover and load entry points from installed Python packages")
7692 (description "Entry points are a way for Python packages to advertise
7693objects with some common interface. The most common examples are
7694@code{console_scripts} entry points, which define shell commands by
7695identifying a Python function to run. The @code{entrypoints} module contains
7696functions to find and load entry points.")
7697 (license license:expat)))
7698
7699(define-public python2-entrypoints
7700 (package-with-python2 python-entrypoints))
7701
7702(define-public python-nbconvert
7703 (package
7704 (name "python-nbconvert")
7705 (version "5.0.0b1")
7706 (source
7707 (origin
7708 (method url-fetch)
7709 (uri (pypi-uri "nbconvert" version))
7710 (sha256
7711 (base32
7712 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
7713 (build-system python-build-system)
7714 (arguments
7715 `(;; The "bdist_egg" target is disabled by default, causing the installation
7716 ;; to fail.
7717 #:configure-flags (list "bdist_egg")
7718 ;; FIXME: 5 failures, 40 errors.
7719 #:tests? #f))
7720 ;; #:phases
7721 ;; (modify-phases %standard-phases
7722 ;; (replace 'check
7723 ;; (lambda _
7724 ;; (zero? (system* "py.test" "-v")))))
7725 (native-inputs
7726 `(("python-pytest" ,python-pytest)))
7727 (propagated-inputs
7728 `(("python-bleach" ,python-bleach)
7729 ("python-entrypoints" ,python-entrypoints)
7730 ("python-jinja2" ,python-jinja2)
7731 ("python-jupyter-core" ,python-jupyter-core)
7732 ("python-mistune" ,python-mistune)
7733 ("python-nbformat" ,python-nbformat)
7734 ("python-pygments" ,python-pygments)
7735 ("python-traitlets" ,python-traitlets)))
7736 (home-page "http://jupyter.org")
7737 (synopsis "Converting Jupyter Notebooks")
7738 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
7739notebooks to various other formats via Jinja templates. It allows you to
7740convert an @code{.ipynb} notebook file into various static formats including:
7741
7742@enumerate
7743@item HTML
7744@item LaTeX
7745@item PDF
7746@item Reveal JS
7747@item Markdown (md)
7748@item ReStructured Text (rst)
7749@item executable script
7750@end enumerate\n")
7751 (license license:bsd-3)))
7752
7753(define-public python2-nbconvert
7754 (package-with-python2 python-nbconvert))
7755
44d10b1f
RW
7756(define-public python-notebook
7757 (package
7758 (name "python-notebook")
7759 (version "5.7.4")
7760 (source (origin
7761 (method url-fetch)
7762 (uri (pypi-uri "notebook" version))
7763 (sha256
7764 (base32
7765 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
7766 (build-system python-build-system)
7767 (arguments
7768 `(#:phases
7769 (modify-phases %standard-phases
7770 (replace 'check
7771 (lambda _
7772 ;; These tests require a browser
7773 (delete-file-recursively "notebook/tests/selenium")
7774 ;; Some tests need HOME
7775 (setenv "HOME" "/tmp")
7776 ;; This file contains "warningfilters", which are not supported
7777 ;; by this version of nose.
7778 (delete-file "setup.cfg")
7779 (with-directory-excursion "/tmp"
7780 (invoke "nosetests" "-v"))
7781 #t)))))
7782 (propagated-inputs
7783 `(("python-jupyter-core" ,python-jupyter-core)
7784 ("python-nbformat" ,python-nbformat)
7785 ("python-nbconvert" ,python-nbconvert)
7786 ("python-prometheus-client" ,python-prometheus-client)
7787 ("python-send2trash" ,python-send2trash)
7788 ("python-terminado" ,python-terminado)))
7789 (native-inputs
7790 `(("python-nose" ,python-nose)
7791 ("python-sphinx" ,python-sphinx)
7792 ("python-requests" ,python-requests)))
7793 (home-page "http://jupyter.org/")
7794 (synopsis "Web-based notebook environment for interactive computing")
7795 (description
7796 "The Jupyter HTML notebook is a web-based notebook environment for
7797interactive computing.")
7798 (properties `((python2-variant . ,(delay python2-notebook))))
7799 (license license:bsd-3)))
7800
7801(define-public python2-notebook
7802 (let ((base (package-with-python2
7803 (strip-python2-variant python-notebook))))
7804 (package (inherit base)
7805 (native-inputs
7806 `(("python2-mock" ,python2-mock)
7807 ,@(package-native-inputs base)))
7808 (arguments
7809 (substitute-keyword-arguments (package-arguments base)
7810 ((#:phases phases)
7811 `(modify-phases ,phases
7812 (add-before 'check 'disable-test-case
7813 ;; The test requires network access to localhost. Curiously it
7814 ;; fails with Python 2 only. Simply make the test-case return
7815 ;; immediately.
7816 (lambda _
7817 (substitute*
7818 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
7819 (("formats = self.nbconvert_api") "return #")))))))))))
7820
7821(define-public python-widgetsnbextension
7822 (package
7823 (name "python-widgetsnbextension")
7824 (version "3.4.2")
7825 (source
7826 (origin
7827 (method url-fetch)
7828 (uri (pypi-uri "widgetsnbextension" version))
7829 (sha256
7830 (base32
7831 "0rc2nivdy7k4m3vljx7wdh2jh11djapcgwhvzlbs0isl8gl8nqgs"))))
7832 (build-system python-build-system)
7833 (propagated-inputs
7834 `(("python-ipykernel" ,python-ipykernel)
7835 ("python-notebook" ,python-notebook)))
7836 (native-inputs
7837 `(("python-certifi" ,python-certifi)
7838 ("python-nose" ,python-nose)))
7839 (home-page "https://ipython.org")
7840 (synopsis "IPython HTML widgets for Jupyter")
7841 (description "This package provides interactive HTML widgets for Jupyter
7842notebooks.")
7843 (license license:bsd-3)))
7844
7845(define-public python2-widgetsnbextension
7846 (package-with-python2 python-widgetsnbextension))
7847
7848(define-public python-ipywidgets
7849 (package
7850 (name "python-ipywidgets")
7851 (version "5.2.2")
7852 (source
7853 (origin
7854 (method url-fetch)
7855 (uri (pypi-uri "ipywidgets" version))
7856 (sha256
7857 (base32
7858 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
7859 (build-system python-build-system)
7860 (propagated-inputs
7861 `(("python-ipython" ,python-ipython)
7862 ("python-traitlets" ,python-traitlets)
7863 ("python-widgetsnbextension" ,python-widgetsnbextension)))
7864 (native-inputs
7865 `(("python-nose" ,python-nose)
7866 ("python-pytest" ,python-pytest)))
7867 (home-page "https://ipython.org")
7868 (synopsis "IPython HTML widgets for Jupyter")
7869 (description "Ipywidgets are interactive HTML widgets for Jupyter
7870notebooks and the IPython kernel. Notebooks come alive when interactive
7871widgets are used. Users gain control of their data and can visualize changes
7872in the data.")
7873 (license license:bsd-3)))
7874
7875(define-public python2-ipywidgets
7876 (package-with-python2 python-ipywidgets))
7877
7878(define-public python-jupyter-console
7879 (package
7880 (name "python-jupyter-console")
becb9cbf 7881 (version "6.0.0")
44d10b1f
RW
7882 (source
7883 (origin
7884 (method url-fetch)
7885 (uri (pypi-uri "jupyter_console" version))
7886 (sha256
7887 (base32
becb9cbf 7888 "1xdjw11cppf1fxvwkw2bk13ckkwas3bdah8baingn9296mvfi31h"))))
44d10b1f 7889 (build-system python-build-system)
44d10b1f
RW
7890 (propagated-inputs
7891 `(("python-ipykernel" ,python-ipykernel)
7892 ("python-jupyter-client" ,python-jupyter-client)
becb9cbf 7893 ("python-prompt-toolkit" ,python-prompt-toolkit)
44d10b1f
RW
7894 ("python-pygments" ,python-pygments)))
7895 (native-inputs
7896 `(("python-nose" ,python-nose)))
7897 (home-page "https://jupyter.org")
7898 (synopsis "Jupyter terminal console")
7899 (description "This package provides a terminal-based console frontend for
7900Jupyter kernels. It also allows for console-based interaction with non-Python
7901Jupyter kernels such as IJulia and IRKernel.")
7902 (license license:bsd-3)))
7903
7904(define-public python2-jupyter-console
8e590c81
RW
7905 (package
7906 (name "python2-jupyter-console")
7907 (version "5.2.0")
7908 (source
7909 (origin
7910 (method url-fetch)
7911 (uri (pypi-uri "jupyter_console" version))
7912 (sha256
7913 (base32
7914 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
7915 (build-system python-build-system)
7916 ;; Tests only run in an TTY.
7917 (arguments `(#:tests? #f))
7918 (propagated-inputs
7919 `(("python2-ipykernel" ,python2-ipykernel)
7920 ("python2-jupyter-client" ,python2-jupyter-client)
7921 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
7922 ("python2-pygments" ,python2-pygments)))
7923 (native-inputs
7924 `(("python2-nose" ,python2-nose)))
7925 (home-page "https://jupyter.org")
7926 (synopsis "Jupyter terminal console")
7927 (description "This package provides a terminal-based console frontend for
7928Jupyter kernels. It also allows for console-based interaction with non-Python
7929Jupyter kernels such as IJulia and IRKernel.")
7930 (license license:bsd-3)))
44d10b1f
RW
7931
7932;; The python-ipython and python-jupyter-console require each other. To get
7933;; the functionality in both packages working, strip down the
7934;; python-jupyter-console package when using it as an input to python-ipython.
7935(define python-jupyter-console-minimal
7936 (package
7937 (inherit python-jupyter-console)
7938 (name "python-jupyter-console-minimal")
7939 (arguments
7940 (substitute-keyword-arguments
7941 (package-arguments python-jupyter-console)
7942 ((#:phases phases)
7943 `(modify-phases ,phases
7944 (add-after 'install 'delete-bin
7945 (lambda* (#:key outputs #:allow-other-keys)
7946 ;; Delete the bin files, to avoid conflicts in profiles
7947 ;; where python-ipython and python-jupyter-console are
7948 ;; both present.
7949 (delete-file-recursively
7950 (string-append
7951 (assoc-ref outputs "out") "/bin"))))))))
7952 ;; Remove the python-ipython propagated input, to avoid the cycle
7953 (propagated-inputs
7954 (alist-delete
7955 "python-ipython"
7956 (package-propagated-inputs python-jupyter-console)))))
7957
7958(define-public python-qtconsole
7959 (package
7960 (name "python-qtconsole")
7961 (version "4.4.3")
7962 (source
7963 (origin
7964 (method url-fetch)
7965 (uri (pypi-uri "qtconsole" version))
7966 (sha256
7967 (base32
7968 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
7969 (build-system python-build-system)
7970 (arguments
7971 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
7972 ;; but we only have the LTS version 5.x. This means that there might be
7973 ;; runtime errors, but since this is a dependency of the Jupyter package,
7974 ;; and Jupyter can be used without the qtconsole we can overlook this for
7975 ;; now.
7976 `(#:tests? #f
7977 #:phases
7978 (modify-phases %standard-phases
7979 (add-before 'check 'pre-check
7980 (lambda _
7981 (setenv "QT_QPA_PLATFORM" "offscreen")
7982 #t)))))
7983 (propagated-inputs
7984 `(("python-ipykernel" ,python-ipykernel)
7985 ("python-ipython" ,python-ipython)))
7986 (native-inputs
7987 `(("python-pytest" ,python-pytest)))
7988 (home-page "http://jupyter.org")
7989 (synopsis "Jupyter Qt console")
7990 (description "This package provides a Qt-based console for Jupyter with
7991support for rich media output.")
7992 (license license:bsd-3)))
7993
6ec87223
VC
7994(define-public python-jsbeautifier
7995 (package
7996 (name "python-jsbeautifier")
7997 (version "1.10.2")
7998 (home-page "https://github.com/beautify-web/js-beautify")
7999 (source (origin
8000 (method git-fetch)
8001 (uri (git-reference
8002 (url home-page)
8003 (commit (string-append "v" version))))
8004 (file-name (git-file-name name version))
8005 (sha256
8006 (base32
8007 "0wawb070ki1axb3jc9xvsrgpji52vcfif3zmjzc3z4g98m5xw4kg"))))
8008 (build-system python-build-system)
8009 (arguments
8010 `(#:phases (modify-phases %standard-phases
8011 (add-after 'unpack 'chdir
8012 (lambda _
8013 ;; The upstream Git repository contains all the code,
8014 ;; but this package only builds the python code.
8015 (chdir "python")
8016 #t))
8017 (add-after 'unpack 'patch-python-six-requirements
8018 (lambda _
8019 (substitute* "python/setup.py"
8020 (("six>=1.12.0")
8021 "six>=1.11.0"))
8022 #t)))))
8023 (propagated-inputs
8024 `(("python-editorconfig" ,python-editorconfig)
8025 ("python-six" ,python-six)))
8026 (native-inputs
8027 `(("python-pytest" ,python-pytest)))
8028 (synopsis "JavaScript unobfuscator and beautifier")
8029 (description "Beautify, unpack or deobfuscate JavaScript, leveraging
8030popular online obfuscators.")
8031 (license license:expat)))
8032
44d10b1f
RW
8033(define-public jupyter
8034 (package
8035 (name "jupyter")
8036 (version "1.0.0")
8037 (source
8038 (origin
8039 (method url-fetch)
8040 (uri (pypi-uri "jupyter" version))
8041 (sha256
8042 (base32
8043 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
8044 (build-system python-build-system)
8045 (arguments '(#:tests? #f)) ; there are none.
8046 (propagated-inputs
8047 `(("python-ipykernel" ,python-ipykernel)
8048 ("python-ipywidgets" ,python-ipywidgets)
8049 ("python-jupyter-console" ,python-jupyter-console)
8050 ("python-nbconvert" ,python-nbconvert)
8051 ("python-notebook" ,python-notebook)
8052 ("python-qtconsole" ,python-qtconsole)))
8053 (native-search-paths
8054 (list (search-path-specification
8055 (variable "JUPYTER_PATH")
8056 (files '("share/jupyter")))))
8057 (home-page "https://jupyter.org")
8058 (synopsis "Web application for interactive documents")
8059 (description
8060 "The Jupyter Notebook is a web application that allows you to create and
8061share documents that contain live code, equations, visualizations and
8062explanatory text. Uses include: data cleaning and transformation, numerical
8063simulation, statistical modeling, machine learning and much more.")
8064 (license license:bsd-3)))
8065
8066(define-public python-chardet
8067 (package
8068 (name "python-chardet")
8069 (version "3.0.4")
8070 (source
8071 (origin
8072 (method url-fetch)
8073 (uri (pypi-uri "chardet" version))
8074 (sha256
8075 (base32
8076 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
8077 (native-inputs
8078 `(("python-hypothesis" ,python-hypothesis)
8079 ("python-pytest" ,python-pytest)
8080 ("python-pytest-runner" ,python-pytest-runner)))
8081 (build-system python-build-system)
3d369407
MB
8082 ;; XXX: Incompatible with Pytest 4: <https://github.com/chardet/chardet/issues/173>.
8083 (arguments `(#:tests? #f))
44d10b1f
RW
8084 (home-page "https://github.com/chardet/chardet")
8085 (synopsis "Universal encoding detector for Python 2 and 3")
8086 (description
8087 "This package provides @code{chardet}, a Python module that can
8088automatically detect a wide range of file encodings.")
8089 (license license:lgpl2.1+)))
8090
8091(define-public python2-chardet
8092 (package-with-python2 python-chardet))
8093
8094(define-public python-docopt
8095 (package
8096 (name "python-docopt")
8097 (version "0.6.2")
8098 (source
8099 (origin
11e46326 8100 (method git-fetch)
44d10b1f 8101 ;; The release on PyPI does not include tests.
11e46326
EF
8102 (uri (git-reference
8103 (url "https://github.com/docopt/docopt")
8104 (commit version)))
8105 (file-name (git-file-name name version))
44d10b1f
RW
8106 (sha256
8107 (base32
11e46326 8108 "0aad9gbswnnhssin2q0m5lmpm0ahyf80ahs2zjigbn5y7fvljnd0"))))
44d10b1f
RW
8109 (build-system python-build-system)
8110 (native-inputs
8111 `(("python-pytest" ,python-pytest)))
8112 (arguments
8113 `(#:phases
8114 (modify-phases %standard-phases
8115 (replace 'check
8116 (lambda _ (invoke "py.test"))))))
8117 (home-page "http://docopt.org")
8118 (synopsis "Command-line interface description language for Python")
8119 (description "This library allows the user to define a command-line
8120interface from a program's help message rather than specifying it
4ca7207b 8121programmatically with command-line parsers like @code{getopt} and
44d10b1f
RW
8122@code{argparse}.")
8123 (license license:expat)))
8124
8125(define-public python2-docopt
8126 (package-with-python2 python-docopt))
8127
8128(define-public python-pythondialog
8129 (package
8130 (name "python-pythondialog")
8131 (version "3.4.0")
8132 (source
8133 (origin
8134 (method url-fetch)
8135 (uri (pypi-uri "pythondialog" version))
8136 (sha256
8137 (base32
8138 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
8139 (build-system python-build-system)
8140 (arguments
8141 `(#:phases
8142 (modify-phases %standard-phases
8143 (add-after 'unpack 'patch-path
8144 (lambda* (#:key inputs #:allow-other-keys)
8145 (let* ((dialog (assoc-ref inputs "dialog")))
8146 ;; Since this library really wants to grovel the search path, we
8147 ;; must hardcode dialog's store path into it.
8148 (substitute* "dialog.py"
8149 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
8150 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
8151 #t))))
8152 #:tests? #f)) ; no test suite
8153 (propagated-inputs
8154 `(("dialog" ,dialog)))
8155 (home-page "http://pythondialog.sourceforge.net/")
8156 (synopsis "Python interface to the UNIX dialog utility")
8157 (description "A Python wrapper for the dialog utility. Its purpose is to
8158provide an easy to use, pythonic and comprehensive Python interface to dialog.
8159This allows one to make simple text-mode user interfaces on Unix-like systems")
8160 (license license:lgpl2.1)
8161 (properties `((python2-variant . ,(delay python2-pythondialog))))))
8162
8163(define-public python2-pythondialog
8164 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
8165 (package
8166 (inherit base)
8167 (version (package-version python-pythondialog))
8168 (source (origin
8169 (method url-fetch)
8170 (uri (pypi-uri "python2-pythondialog" version))
8171 (sha256
8172 (base32
8173 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
8174
8175(define-public python-configobj
8176 (package
8177 (name "python-configobj")
8178 (version "5.0.6")
8179 (source (origin
8180 (method url-fetch)
b0758fbb 8181 (uri (pypi-uri "configobj" version))
44d10b1f
RW
8182 (sha256
8183 (base32
8184 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
8185 ;; Patch setup.py so it looks for python-setuptools, which is
8186 ;; required to parse the keyword 'install_requires' in setup.py.
8187 (patches (search-patches "python-configobj-setuptools.patch"))))
8188 (build-system python-build-system)
8189 (propagated-inputs
8190 `(("python-six" ,python-six)))
8191 (synopsis "Config file reading, writing and validation")
8192 (description "ConfigObj is a simple but powerful config file reader and
8193writer: an ini file round tripper. Its main feature is that it is very easy to
8194use, with a straightforward programmer’s interface and a simple syntax for
8195config files.")
8196 (home-page "https://github.com/DiffSK/configobj")
8197 (license license:bsd-3)))
8198
8199(define-public python2-configobj
8200 (package-with-python2 python-configobj))
8201
8202(define-public python-configargparse
8203 (package
8204 (name "python-configargparse")
86ae491f 8205 (version "0.14.0")
44d10b1f
RW
8206 (source (origin
8207 (method url-fetch)
8208 (uri (pypi-uri "ConfigArgParse" version))
8209 (sha256
8210 (base32
86ae491f 8211 "149fy4zya0rsnlkvxbbq43cyr8lscb5k4pj1m6n7f1grwcmzwbif"))))
44d10b1f
RW
8212 (build-system python-build-system)
8213 (native-inputs
8214 `(("python-pyyaml" ,python-pyyaml)))
8215 (arguments
8216 `(#:phases
8217 (modify-phases %standard-phases
8218 (replace 'check
8219 (lambda _
8220 ;; Bypass setuptools-shim because one test relies on "setup.py"
8221 ;; being the first argument passed to the python call.
8222 ;;
8223 ;; NOTE: Many tests do not run because they rely on Python's
8224 ;; built-in test.test_argparse, but we remove the unit tests from
8225 ;; our Python installation.
8226 (invoke "python" "setup.py" "test"))))))
8227 (synopsis "Replacement for argparse")
8228 (description "A drop-in replacement for argparse that allows options to also
8229be set via config files and/or environment variables.")
8230 (home-page "https://github.com/bw2/ConfigArgParse")
8231 (license license:expat)))
8232
8233(define-public python2-configargparse
8234 (package-with-python2 python-configargparse))
8235
8236(define-public python-argparse-manpage
8237 (package
8238 (name "python-argparse-manpage")
8239 (version "1.1")
8240 (source
8241 (origin
8242 (method url-fetch)
8243 (uri (pypi-uri "argparse-manpage" version))
8244 (sha256
8245 (base32
8246 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
8247 (build-system python-build-system)
8248 (home-page "https://github.com/praiskup/argparse-manpage")
8249 (synopsis "Build manual page from Python's ArgumentParser object")
8250 (description
8251 "This package provides tools to build manual pages from Python's
8252@code{ArgumentParser} object.")
8253 (license license:asl2.0)))
8254
3e8f76d8
RW
8255(define-public python-contextlib2
8256 (package
8257 (name "python-contextlib2")
8258 (version "0.5.5")
8259 (source
8260 (origin
8261 (method url-fetch)
8262 (uri (pypi-uri "contextlib2" version))
8263 (sha256
8264 (base32
8265 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
8266 (build-system python-build-system)
8267 (home-page "http://contextlib2.readthedocs.org/")
8268 (synopsis "Tools for decorators and context managers")
8269 (description "This module is primarily a backport of the Python
82703.2 contextlib to earlier Python versions. Like contextlib, it
8271provides utilities for common tasks involving decorators and context
8272managers. It also contains additional features that are not part of
8273the standard library.")
1e158ba1 8274 (properties `((python2-variant . ,(delay python2-contextlib2))))
3e8f76d8
RW
8275 (license license:psfl)))
8276
44d10b1f 8277(define-public python2-contextlib2
1e158ba1
EF
8278 (let ((base (package-with-python2
8279 (strip-python2-variant python-contextlib2))))
8280 (package
8281 (inherit base)
8282 (arguments
8283 (substitute-keyword-arguments (package-arguments base)
8284 ((#:phases phases)
8285 `(modify-phases ,phases
8286 (replace 'check
8287 (lambda _ (invoke "python" "test_contextlib2.py" "-v")))))))
8288 (native-inputs
8289 `(("python2-unittest2" ,python2-unittest2))))))
44d10b1f
RW
8290
8291(define-public python-texttable
8292 (package
8293 (name "python-texttable")
52cc4892 8294 (version "0.9.1")
44d10b1f
RW
8295 (source
8296 (origin
8297 (method url-fetch)
8298 (uri (pypi-uri "texttable" version))
8299 (sha256
8300 (base32
52cc4892 8301 "0yawv64c0zbawwv6zz84whb32fnb2n9jylwjcfsrcdgh7xvl340i"))))
44d10b1f
RW
8302 (build-system python-build-system)
8303 (arguments '(#:tests? #f)) ; no tests
8304 (home-page "https://github.com/foutaise/texttable/")
8305 (synopsis "Python module for creating simple ASCII tables")
8306 (description "Texttable is a Python module for creating simple ASCII
8307tables.")
8308 (license license:lgpl2.1+)))
8309
8310(define-public python2-texttable
8311 (package-with-python2 python-texttable))
8312
8313(define-public python-atomicwrites
8314 (package
8315 (name "python-atomicwrites")
14f10479 8316 (version "1.3.0")
44d10b1f
RW
8317 (source (origin
8318 (method url-fetch)
8319 (uri (pypi-uri "atomicwrites" version))
8320 (sha256
8321 (base32
14f10479 8322 "19ngcscdf3jsqmpcxn6zl5b6anmsajb6izp1smcd1n02midl9abm"))))
44d10b1f
RW
8323 (build-system python-build-system)
8324 (synopsis "Atomic file writes in Python")
8325 (description "Library for atomic file writes using platform dependent tools
8326for atomic file system operations.")
8327 (home-page "https://github.com/untitaker/python-atomicwrites")
8328 (license license:expat)))
8329
8330(define-public python2-atomicwrites
8331 (package-with-python2 python-atomicwrites))
8332
8333(define-public python-click-threading
8334 (package
8335 (name "python-click-threading")
8336 (version "0.4.4")
8337 (source (origin
8338 (method url-fetch)
8339 (uri (pypi-uri "click-threading" version))
8340 (sha256
8341 (base32
8342 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
8343 (build-system python-build-system)
8344 (propagated-inputs
8345 `(("python-click" ,python-click)))
8346 (synopsis "Utilities for multithreading in Click")
8347 (description "This package provides utilities for multithreading in Click
8348applications.")
8349 (home-page "https://github.com/click-contrib/click-threading")
8350 (license license:expat)))
8351
8352(define-public python-click-log
8353 (package
8354 (name "python-click-log")
8355 (version "0.3.2")
8356 (source (origin
8357 (method url-fetch)
8358 (uri (pypi-uri "click-log" version))
8359 (sha256
8360 (base32
8361 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
8362 (build-system python-build-system)
8363 (propagated-inputs
8364 `(("python-click" ,python-click)))
8365 (synopsis "Logging for click applications")
8366 (description "This package provides a Python library for logging Click
8367applications.")
8368 (home-page "https://github.com/click-contrib/click-log")
8369 (license license:expat)))
8370
8371(define-public python-apipkg
8372 (package
8373 (name "python-apipkg")
8374 (version "1.4")
8375 (source (origin
8376 (method url-fetch)
8377 (uri (pypi-uri "apipkg" version))
8378 (sha256
8379 (base32
8380 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
8381 (build-system python-build-system)
8382 (native-inputs
8383 `(("python-pytest" ,python-pytest)))
8384 (synopsis "Namespace control and lazy-import mechanism")
8385 (description "With apipkg you can control the exported namespace of a Python
8386package and greatly reduce the number of imports for your users. It is a small
8387pure Python module that works on virtually all Python versions.")
8388 (home-page "https://github.com/pytest-dev/apipkg")
8389 (license license:expat)))
8390
8391(define-public python2-apipkg
8392 (package-with-python2 python-apipkg))
8393
8394(define-public python-execnet
8395 (package
8396 (name "python-execnet")
8397 (version "1.4.1")
8398 (source (origin
8399 (method url-fetch)
8400 (uri (pypi-uri "execnet" version))
8401 (sha256
8402 (base32
8403 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
8404 (build-system python-build-system)
8405 (arguments
8406 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
8407 ;; The two test failures are caused by the lack of an `ssh` executable.
8408 ;; The test suite can be run with pytest after the 'install' phase.
8409 #:tests? #f))
8410 (native-inputs
8411 `(("python-pytest" ,python-pytest)
8412 ("python-setuptools-scm" ,python-setuptools-scm)))
8413 (propagated-inputs
8414 `(("python-apipkg" ,python-apipkg)))
8415 (synopsis "Rapid multi-Python deployment")
8416 (description "Execnet provides a share-nothing model with
8417channel-send/receive communication for distributing execution across many
8418Python interpreters across version, platform and network barriers. It has a
8419minimal and fast API targeting the following uses:
8420@enumerate
8421@item distribute tasks to (many) local or remote CPUs
8422@item write and deploy hybrid multi-process applications
8423@item write scripts to administer multiple environments
8424@end enumerate")
8425 (home-page "http://codespeak.net/execnet/")
8426 (license license:expat)))
8427
8428(define-public python2-execnet
8429 (package-with-python2 python-execnet))
8430
8431(define-public python-icalendar
8432 (package
8433 (name "python-icalendar")
43ae8f79 8434 (version "4.0.4")
44d10b1f
RW
8435 (source (origin
8436 (method url-fetch)
8437 (uri (pypi-uri "icalendar" version))
8438 (sha256
8439 (base32
43ae8f79 8440 "16gjvqv0n05jrb9g228pdjgzd3amz2pdhvcgsn1jypszjg5m2w9l"))))
44d10b1f
RW
8441 (build-system python-build-system)
8442 (propagated-inputs
8443 `(("python-dateutil" ,python-dateutil)
8444 ("python-pytz" ,python-pytz)))
8445 (synopsis "Python library for parsing iCalendar files")
8446 (description "The icalendar package is a parser/generator of iCalendar
8447files for use with Python.")
8448 (home-page "https://github.com/collective/icalendar")
8449 (license license:bsd-2)))
8450
44d10b1f
RW
8451(define-public python-args
8452 (package
8453 (name "python-args")
8454 (version "0.1.0")
8455 (source (origin
8456 (method url-fetch)
8457 (uri (pypi-uri "args" version))
8458 (sha256
8459 (base32
8460 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
8461 (build-system python-build-system)
8462 (home-page "https://github.com/kennethreitz/args")
8463 (synopsis "Command-line argument parser")
8464 (description
8465 "This library provides a Python module to parse command-line arguments.")
8466 (license license:bsd-3)))
8467
8468(define-public python2-args
8469 (package-with-python2 python-args))
8470
8471(define-public python-clint
8472 (package
8473 (name "python-clint")
8474 (version "0.5.1")
8475 (source (origin
8476 (method url-fetch)
8477 (uri (pypi-uri "clint" version))
8478 (sha256
8479 (base32
8480 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
8481 (build-system python-build-system)
8482 (arguments
8483 '(#:phases
8484 (modify-phases %standard-phases
8485 (replace 'check
8486 (lambda _ (invoke "py.test" "-v"))))))
8487 (native-inputs
8488 `(("python-pytest" ,python-pytest)))
8489 (propagated-inputs
8490 `(("python-args" ,python-args)))
8491 (home-page "https://github.com/kennethreitz/clint")
8492 (synopsis "Command-line interface tools")
8493 (description
8494 "Clint is a Python module filled with a set of tools for developing
8495command-line applications, including tools for colored and indented
8496output, progress bar display, and pipes.")
8497 (license license:isc)))
8498
8499(define-public python2-clint
8500 (package-with-python2 python-clint))
8501
44d10b1f
RW
8502(define-public python-rply
8503 (package
8504 (name "python-rply")
8505 (version "0.7.5")
8506 (source (origin
8507 (method url-fetch)
8508 (uri (pypi-uri "rply" version))
8509 (sha256
8510 (base32
8511 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
8512 (build-system python-build-system)
8513 (propagated-inputs
8514 `(("python-appdirs" ,python-appdirs)))
8515 (home-page "https://github.com/alex/rply")
8516 (synopsis "Parser generator for Python")
8517 (description
8518 "This package provides a pure Python based parser generator, that also
8519works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
8520with a new public API, and RPython support.")
8521 (license license:bsd-3)))
8522
8523(define-public python2-rply
8524 (package-with-python2 python-rply))
8525
8526(define-public python-hy
8527 (package
8528 (name "python-hy")
c215051d 8529 (version "0.17.0")
44d10b1f
RW
8530 (source (origin
8531 (method url-fetch)
8532 (uri (pypi-uri "hy" version))
8533 (sha256
8534 (base32
c215051d 8535 "1gdbqsirsdxj320wnp7my5awzs1kfs6m4fqmkzbd1zd47qzj0zfi"))))
44d10b1f
RW
8536 (build-system python-build-system)
8537 (arguments
8538 '(#:phases
8539 (modify-phases %standard-phases
6ba6a1c1
JG
8540 (add-before 'install 'set-HOME
8541 (lambda _
8542 (setenv "HOME" "/tmp")))
44d10b1f
RW
8543 (replace 'check
8544 (lambda _
8545 ;; Tests require write access to HOME.
8546 (setenv "HOME" "/tmp")
8547 (invoke "nosetests"))))))
8548 (native-inputs
8549 `(("python-coverage" ,python-coverage)
8550 ("python-nose" ,python-nose)))
8551 (propagated-inputs
8552 `(("python-astor" ,python-astor)
8553 ("python-clint" ,python-clint)
c215051d
JG
8554 ("python-rply" ,python-rply)
8555 ("python-fastentrypoints"
8556 ,python-fastentrypoints)
8557 ("python-funcparserlib"
8558 ,python-funcparserlib)))
44d10b1f
RW
8559 (home-page "http://hylang.org/")
8560 (synopsis "Lisp frontend to Python")
8561 (description
8562 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
8563its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
8564Python at your fingertips, in Lisp form.")
8565 (license license:expat)))
8566
8567(define-public python2-hy
8568 (package-with-python2 python-hy))
8569
8570(define-public python2-functools32
8571 (package
8572 (name "python2-functools32")
8573 (version "3.2.3-2")
8574 (source
8575 (origin
8576 (method url-fetch)
8577 (uri (pypi-uri "functools32" version))
8578 (sha256
8579 (base32
8580 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
8581 (build-system python-build-system)
8582 (arguments
8583 `(#:python ,python-2
8584 #:tests? #f)) ; no test target
8585 (home-page "https://github.com/MiCHiLU/python-functools32")
8586 (synopsis
8587 "Backport of the functools module from Python 3.2.3")
8588 (description
8589 "This package is a backport of the @code{functools} module from Python
85903.2.3 for use with older versions of Python and PyPy.")
8591 (license license:expat)))
8592
8593(define-public python2-subprocess32
8594 (package
8595 (name "python2-subprocess32")
8596 (version "3.2.7")
8597 (source (origin
8598 (method url-fetch)
8599 (uri (pypi-uri "subprocess32" version))
8600 (sha256
8601 (base32
8602 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
8603 (patches
8604 (search-patches "python2-subprocess32-disable-input-test.patch"))))
8605 (build-system python-build-system)
8606 (arguments
8607 `(#:python ,python-2
8608 ;; The test suite fails with Python > 2.7.13:
8609 ;; import test.support
8610 ;; ImportError: No module named support
8611 #:tests? #f
8612 #:phases
8613 (modify-phases %standard-phases
8614 (add-after 'unpack 'patch-/bin/sh
8615 (lambda _
8616 (substitute* '("subprocess32.py"
8617 "test_subprocess32.py")
8618 (("/bin/sh") (which "sh")))
8619 #t)))))
8620 (home-page "https://github.com/google/python-subprocess32")
8621 (synopsis "Backport of the subprocess module from Python 3.2")
8622 (description
8623 "This is a backport of the @code{subprocess} standard library module
8624from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
8625new features. On POSIX systems it is guaranteed to be reliable when used
8626in threaded applications. It includes timeout support from Python 3.3 but
8627otherwise matches 3.2’s API.")
8628 (license license:psfl)))
8629
8630(define-public python2-futures
8631 (package
8632 (name "python2-futures")
8633 (version "3.2.0")
8634 (source
8635 (origin
8636 (method url-fetch)
8637 (uri (pypi-uri "futures" version))
8638 (sha256
8639 (base32
8640 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
8641 (build-system python-build-system)
ba88eea2
RW
8642 (arguments
8643 `(#:python ,python-2
8644 #:phases
8645 (modify-phases %standard-phases
8646 (replace 'check
8647 (lambda _
8648 (invoke "python" "test_futures.py")
8649 #t)))))
44d10b1f
RW
8650 (home-page "https://github.com/agronholm/pythonfutures")
8651 (synopsis
8652 "Backport of the concurrent.futures package from Python 3.2")
8653 (description
8654 "The concurrent.futures module provides a high-level interface for
8655asynchronously executing callables. This package backports the
8656concurrent.futures package from Python 3.2")
8657 (license license:bsd-3)))
8658
8659(define-public python-promise
8660 (package
8661 (name "python-promise")
8662 (version "0.4.2")
8663 (source
8664 (origin
8665 (method url-fetch)
8666 (uri (pypi-uri "promise" version))
8667 (sha256
8668 (base32
8669 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
8670 (build-system python-build-system)
8671 ;; Tests wants python-futures, which is a python2 only program, and
8672 ;; can't be found by python-promise at test time.
8673 (arguments `(#:tests? #f))
8674 (home-page "https://github.com/syrusakbary/promise")
8675 (synopsis "Promises/A+ implementation for Python")
8676 (description
8677 "Promises/A+ implementation for Python")
8678 (properties `((python2-variant . ,(delay python2-promise))))
8679 (license license:expat)))
8680
8681(define-public python2-promise
8682 (let ((promise (package-with-python2
8683 (strip-python2-variant python-promise))))
8684 (package (inherit promise)
8685 (arguments (substitute-keyword-arguments (package-arguments promise)
8686 ((#:tests? _) #t)))
8687 (native-inputs
8688 `(("python2-futures" ,python2-futures)
8689 ("python2-pytest" ,python2-pytest)
8690 ,@(package-native-inputs promise))))))
8691
d71d85cd
RW
8692(define-public python-progressbar33
8693 (package
8694 (name "python-progressbar33")
8695 (version "2.4")
8696 (source
8697 (origin
8698 (method url-fetch)
8699 (uri (pypi-uri "progressbar33" version))
8700 (sha256
8701 (base32
8702 "1zvf6zs5hzrc03p9nfs4p16vhilqikycvv1yk0pxn8s07fdhvzji"))))
8703 (build-system python-build-system)
8704 (home-page "http://github.com/germangh/python-progressbar")
8705 (synopsis "Text progress bar library for Python")
8706 (description
8707 "This package provides a text progress bar library for Python. This
8708version only differs from the original @code{progressbar} package in that it
8709uses relative package imports instead of absolute imports, which is necessary
8710for the module to work under Python 3.3.")
8711 ;; Either or both of these licenses may be selected.
8712 (license (list license:lgpl2.1+ license:bsd-3))))
8713
44d10b1f
RW
8714(define-public python-colorama
8715 (package
8716 (name "python-colorama")
8717 (version "0.3.9")
8718 (source
8719 (origin
8720 (method url-fetch)
8721 (uri (pypi-uri "colorama" version))
8722 (sha256
8723 (base32
8724 "1wd1szk0z3073ghx26ynw43gnc140ibln1safgsis6s6z3s25ss8"))))
8725 (build-system python-build-system)
8726 (synopsis "Colored terminal text rendering for Python")
8727 (description "Colorama is a Python library for rendering colored terminal
8728text.")
8729 (home-page "https://pypi.python.org/pypi/colorama")
8730 (license license:bsd-3)))
8731
8732(define-public python2-colorama
8733 (package-with-python2 python-colorama))
8734
8735(define-public python-rsa
8736 (package
8737 (name "python-rsa")
8738 (version "3.4.2")
8739 (source
8740 (origin
8741 (method url-fetch)
8742 (uri (pypi-uri "rsa" version))
8743 (sha256
8744 (base32
8745 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
8746 (build-system python-build-system)
8747 (propagated-inputs
8748 `(("python-pyasn1" ,python-pyasn1)))
8749 (synopsis "Pure-Python RSA implementation")
8750 (description "Python-RSA is a pure-Python RSA implementation. It supports
8751encryption and decryption, signing and verifying signatures, and key
8752generation according to PKCS#1 version 1.5. It can be used as a Python
8753library as well as on the command line.")
8754 (home-page "https://stuvel.eu/rsa")
8755 (license license:asl2.0)))
8756
8757(define-public python2-rsa
8758 (package-with-python2 python-rsa))
8759
8760(define-public python-pluggy
8761 (package
8762 (name "python-pluggy")
17263ef5 8763 (version "0.13.1")
44d10b1f
RW
8764 (source
8765 (origin
8766 (method url-fetch)
8767 (uri (pypi-uri "pluggy" version))
8768 (sha256
8769 (base32
17263ef5 8770 "1c35qyhvy27q9ih9n899f3h4sdnpgq027dbiilly2qb5cvgarchm"))))
44d10b1f
RW
8771 (build-system python-build-system)
8772 (native-inputs
8773 `(("python-setuptools-scm" ,python-setuptools-scm)))
8774 (synopsis "Plugin and hook calling mechanism for Python")
8775 (description "Pluggy is an extraction of the plugin manager as used by
8776Pytest but stripped of Pytest specific details.")
8777 (home-page "https://pypi.python.org/pypi/pluggy")
17263ef5 8778 (properties `((python2-variant . ,(delay python2-pluggy))))
44d10b1f
RW
8779 (license license:expat)))
8780
8781(define-public python2-pluggy
17263ef5
MB
8782 (let ((base (package-with-python2 (strip-python2-variant
8783 python-pluggy))))
8784 (package/inherit
8785 base
8786 (version "0.11.0")
8787 (source (origin
8788 (method url-fetch)
8789 (uri (pypi-uri "pluggy" version))
8790 (sha256
8791 (base32
8792 "10511a54dvafw1jrk75mrhml53c7b7w4yaw7241696lc2hfvr895")))))))
44d10b1f
RW
8793
8794(define-public python-tox
8795 (package
8796 (name "python-tox")
8797 (version "2.8.1")
8798 (source
8799 (origin
8800 (method url-fetch)
8801 (uri (pypi-uri "tox" version))
8802 (sha256
8803 (base32
8804 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
8805 (build-system python-build-system)
8806 (arguments
8807 ;; FIXME: Tests require pytest-timeout, which itself requires
8808 ;; pytest>=2.8.0 for installation.
8809 '(#:tests? #f))
8810 (propagated-inputs
8811 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
8812 ("python-py" ,python-py)
8813 ("python-virtualenv" ,python-virtualenv)))
8814 (native-inputs
8815 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
8816 ("python-pytest" ,python-pytest) ; >= 2.3.5
8817 ("python-setuptools-scm" ,python-setuptools-scm)))
8818 (home-page "http://tox.testrun.org/")
8819 (synopsis "Virtualenv-based automation of test activities")
8820 (description "Tox is a generic virtualenv management and test command line
8821tool. It can be used to check that a package installs correctly with
8822different Python versions and interpreters, or run tests in each type of
8823supported environment, or act as a frontend to continuous integration
8824servers.")
8825 (license license:expat)))
8826
8827(define-public python2-tox
8828 (package-with-python2 python-tox))
8829
8830(define-public python-jmespath
8831 (package
8832 (name "python-jmespath")
27fb781f 8833 (version "0.9.4")
44d10b1f
RW
8834 (source
8835 (origin
8836 (method url-fetch)
8837 (uri (pypi-uri "jmespath" version))
8838 (sha256
8839 (base32
27fb781f 8840 "0k0765x1mybcrzajh3hiqkl8sy9hs0bmn4900frxy0j3ykvaxqmx"))))
44d10b1f
RW
8841 (build-system python-build-system)
8842 (native-inputs
8843 `(("python-nose" ,python-nose)))
8844 (synopsis "JSON Matching Expressions")
8845 (description "JMESPath (pronounced “james path”) is a Python library that
8846allows one to declaratively specify how to extract elements from a JSON
8847document.")
8848 (home-page "https://github.com/jmespath/jmespath.py")
8849 (license license:expat)))
8850
8851(define-public python2-jmespath
8852 (package-with-python2 python-jmespath))
8853
8854(define-public python-botocore
8855 (package
7bcf827c
RW
8856 (name "python-botocore")
8857 (version "1.12.149")
8858 (source
8859 (origin
8860 (method url-fetch)
8861 (uri (pypi-uri "botocore" version))
8862 (sha256
8863 (base32
8864 "12597f74khp3ngwr282cb949w0gcqj20rkfc3x275dijavyy5cmf"))))
8865 (build-system python-build-system)
8866 (arguments
8867 ;; FIXME: Many tests are failing.
8868 '(#:tests? #f))
8869 (propagated-inputs
8870 `(("python-dateutil" ,python-dateutil)
8871 ("python-docutils" ,python-docutils)
8872 ("python-jmespath" ,python-jmespath)))
8873 (native-inputs
8874 `(("python-mock" ,python-mock)
8875 ("python-nose" ,python-nose)
8876 ("behave" ,behave)
8877 ("python-tox" ,python-tox)
8878 ("python-urllib3" ,python-urllib3)
8879 ("python-wheel" ,python-wheel)))
8880 (home-page "https://github.com/boto/botocore")
8881 (synopsis "Low-level interface to AWS")
8882 (description "Botocore is a Python library that provides a low-level
44d10b1f 8883interface to the Amazon Web Services (AWS) API.")
7bcf827c 8884 (license license:asl2.0)))
44d10b1f
RW
8885
8886(define-public python2-botocore
8887 (package-with-python2 python-botocore))
8888
8889(define-public python-xdo
8890 (package
8891 (name "python-xdo")
8892 (version "0.3")
8893 (source (origin
8894 (method url-fetch)
8895 (uri (string-append
8896 "http://http.debian.net/debian/pool/main/p/python-xdo/"
8897 "python-xdo_" version ".orig.tar.gz"))
8898 (sha256
8899 (base32
8900 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
8901 (build-system python-build-system)
8902 (arguments
8903 '(#:phases
8904 (modify-phases %standard-phases
8905 (add-before 'install 'patch-libxdo-path
8906 ;; Hardcode the path of dynamically loaded libxdo library.
8907 (lambda* (#:key inputs #:allow-other-keys)
8908 (let ((libxdo (string-append
8909 (assoc-ref inputs "xdotool")
8910 "/lib/libxdo.so")))
8911 (substitute* "xdo/_xdo.py"
8912 (("find_library\\(\"xdo\"\\)")
8913 (simple-format #f "\"~a\"" libxdo)))
8914 #t))))
8915 #:tests? #f)) ; no tests provided
8916 (propagated-inputs
8917 `(("python-six" ,python-six)))
8918 (inputs
8919 `(("xdotool" ,xdotool)
8920 ("libX11" ,libx11)))
8921 (home-page "https://tracker.debian.org/pkg/python-xdo")
8922 (synopsis "Python library for simulating X11 keyboard/mouse input")
8923 (description "Provides bindings to libxdo for manipulating X11 via simulated
8924input. (Note that this is mostly a legacy library; you may wish to look at
8925python-xdo for newer bindings.)")
8926 (license license:bsd-3)))
8927
8928(define-public python2-xdo
8929 (package-with-python2 python-xdo))
8930
8931(define-public python-mako
8932 (package
8933 (name "python-mako")
6bf53ad5 8934 (version "1.1.0")
44d10b1f
RW
8935 (source
8936 (origin
8937 (method url-fetch)
8938 (uri (pypi-uri "Mako" version))
8939 (sha256
8940 (base32
6bf53ad5 8941 "0jqa3qfpykyn4fmkn0kh6043sfls7br8i2bsdbccazcvk9cijsd3"))))
44d10b1f 8942 (build-system python-build-system)
6bf53ad5
MB
8943 (arguments
8944 `(#:phases (modify-phases %standard-phases
8945 (replace 'check
8946 (lambda _
8947 (invoke "pytest" "-vv"))))))
44d10b1f
RW
8948 (propagated-inputs
8949 `(("python-markupsafe" ,python-markupsafe)))
8950 (native-inputs
8951 `(("python-mock" ,python-mock)
44d10b1f 8952 ("python-pytest" ,python-pytest)))
7016e620 8953 (home-page "https://www.makotemplates.org/")
44d10b1f
RW
8954 (synopsis "Templating language for Python")
8955 (description "Mako is a templating language for Python that compiles
8956templates into Python modules.")
8957 (license license:expat)))
8958
8959(define-public python2-mako
8960 (package-with-python2 python-mako))
8961
8962(define-public python-waitress
8963 (package
8964 (name "python-waitress")
8965 (version "1.1.0")
8966 (source
8967 (origin
8968 (method url-fetch)
8969 (uri (pypi-uri "waitress" version))
8970 (patches (search-patches "python-waitress-fix-tests.patch"))
8971 (sha256
8972 (base32
8973 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
8974 (build-system python-build-system)
8975 (home-page "https://github.com/Pylons/waitress")
8976 (synopsis "Waitress WSGI server")
8977 (description "Waitress is meant to be a production-quality pure-Python WSGI
8978server with very acceptable performance.")
8979 (license license:zpl2.1)))
8980
8981(define-public python2-waitress
8982 (package-with-python2 python-waitress))
8983
b2b23d12
TLC
8984(define-public python-whichcraft
8985 (package
8986 (name "python-whichcraft")
8987 (version "0.6.1")
8988 (source
8989 (origin
8990 (method url-fetch)
8991 (uri (pypi-uri "whichcraft" version))
8992 (sha256
8993 (base32
8994 "11yfkzyplizdgndy34vyd5qlmr1n5mxis3a3svxmx8fnccdvknxc"))))
8995 (build-system python-build-system)
8996 (native-inputs
8997 `(("python-pytest" ,python-pytest)))
8998 (home-page "https://github.com/pydanny/whichcraft")
8999 (synopsis "Cross-platform cross-python shutil.which functionality")
9000 (description
9001 "This package provides a shim of the shutil.which function that's
9002designed to work across multiple versions of Python.")
9003 (license license:bsd-3)))
9004
1133ca44
TLC
9005(define-public python-cookiecutter
9006 (package
9007 (name "python-cookiecutter")
9008 (version "1.6.0")
9009 (source
9010 (origin
9011 (method url-fetch)
9012 (uri (pypi-uri "cookiecutter" version))
9013 (sha256
9014 (base32
9015 "0glsvaz8igi2wy1hsnhm9fkn6560vdvdixzvkq6dn20z3hpaa5hk"))))
9016 (build-system python-build-system)
9017 (native-inputs
9018 `(("python-freezegun" ,python-freezegun)
9019 ("python-pytest" ,python-pytest)
9020 ("python-pytest-catchlog" ,python-pytest-catchlog)
9021 ("python-pytest-cov" ,python-pytest-cov)
9022 ("python-pytest-mock" ,python-pytest-mock)))
9023 (propagated-inputs
9024 `(("python-binaryornot" ,python-binaryornot)
9025 ("python-click" ,python-click)
9026 ("python-future" ,python-future)
9027 ("python-jinja2" ,python-jinja2)
9028 ("python-jinja2-time" ,python-jinja2-time)
9029 ("python-poyo" ,python-poyo)
9030 ("python-requests" ,python-requests)
9031 ("python-whichcraft" ,python-whichcraft)))
9032 (home-page "https://github.com/audreyr/cookiecutter")
9033 (synopsis
9034 "Command-line utility that creates projects from project templates")
9035 (description
9036 "This package provides a command-line utility that creates projects from
9037project templates, e.g. creating a Python package project from a Python package
9038project template.")
9039 (license license:bsd-3)))
9040
44d10b1f
RW
9041(define-public python-pyquery
9042 (package
9043 (name "python-pyquery")
9044 (version "1.2.17")
9045 (source
9046 (origin
9047 (method url-fetch)
9048 (uri (pypi-uri "pyquery" version))
9049 (sha256
9050 (base32
9051 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
9052 (build-system python-build-system)
9053 (native-inputs
9054 `(("python-webob" ,python-webob)
9055 ("python-webtest" ,python-webtest)))
9056 (propagated-inputs
9057 `(("python-lxml" ,python-lxml)
9058 ("python-cssselect" ,python-cssselect)))
9059 (home-page "https://github.com/gawel/pyquery")
9060 (synopsis "Make jQuery-like queries on xml documents")
9061 (description "pyquery allows you to make jQuery queries on xml documents.
9062The API is as much as possible the similar to jQuery. pyquery uses lxml for
9063fast xml and html manipulation.")
9064 (license license:bsd-3)))
9065
44d10b1f
RW
9066(define-public python-anyjson
9067 (package
9068 (name "python-anyjson")
9069 (version "0.3.3")
9070 (source
9071 (origin
9072 (method url-fetch)
9073 (uri (pypi-uri "anyjson" version))
9074 (sha256
9075 (base32
9076 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
9077 (build-system python-build-system)
9078 (arguments
9079 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
9080 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
9081 ;; whatever) so this transformation needs to be done before the tests
9082 ;; can be run. Maybe we could add a build step to transform beforehand
9083 ;; but it could be annoying/difficult.
9084 ;; We can enable tests for the Python 2 version, though, and do below.
9085 #:tests? #f))
9086 (home-page "https://bitbucket.org/runeh/anyjson/")
9087 (synopsis
9088 "Wraps best available JSON implementation in a common interface")
9089 (description
9090 "Anyjson loads whichever is the fastest JSON module installed
9091and provides a uniform API regardless of which JSON implementation is used.")
9092 (license license:bsd-3)
9093 (properties `((python2-variant . ,(delay python2-anyjson))))))
9094
9095(define-public python2-anyjson
9096 (let ((anyjson (package-with-python2
9097 (strip-python2-variant python-anyjson))))
9098 (package
9099 (inherit anyjson)
9100 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
9101 #:tests? #t
9102 ,@(package-arguments anyjson)))
9103 (native-inputs `(("python2-nose" ,python2-nose))))))
9104
9105(define-public python-amqp
9106 (package
9107 (name "python-amqp")
9108 (version "2.3.2")
9109 (source
9110 (origin
9111 (method url-fetch)
9112 (uri (pypi-uri "amqp" version))
9113 (sha256
9114 (base32
9115 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
9116 (build-system python-build-system)
9117 (native-inputs
9118 `(("python-case" ,python-case)
9119 ("python-pytest-sugar" ,python-pytest-sugar)
9120 ("python-mock" ,python-mock)))
9121 (propagated-inputs
9122 `(("python-vine" ,python-vine)))
9123 (home-page "https://github.com/celery/py-amqp")
9124 (synopsis
9125 "Low-level AMQP client for Python (fork of amqplib)")
9126 (description
9127 "This is a fork of amqplib which was originally written by Barry Pederson.
9128It is maintained by the Celery project, and used by kombu as a pure python
9129alternative when librabbitmq is not available.")
9130 (license license:lgpl2.1+)
9131 (properties `((python2-variant . ,(delay python2-amqp))))))
9132
9133(define-public python2-amqp
9134 (let ((amqp (package-with-python2
9135 (strip-python2-variant python-amqp))))
9136 (package
9137 (inherit amqp)
9138 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
9139 ;; unmaintained. Weirdly, does not do this on the python 3
9140 ;; version?
9141 #:tests? #f
9142 ,@(package-arguments amqp))))))
9143
9144(define-public python-txamqp
9145 (package
9146 (name "python-txamqp")
9147 (version "0.8.2")
9148 (source
9149 (origin
9150 (method url-fetch)
9151 (uri (pypi-uri "txAMQP" version))
9152 (sha256
9153 (base32
9154 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
9155 (build-system python-build-system)
9156 (propagated-inputs
9157 `(("python-six" ,python-six)
9158 ("python-twisted" ,python-twisted)))
9159 (home-page "https://github.com/txamqp/txamqp")
9160 (synopsis "Communicate with AMQP peers and brokers using Twisted")
9161 (description
9162 "This package provides a Python library for communicating with AMQP peers
9163and brokers using the asynchronous networking framework Twisted. It contains
9164all the necessary code to connect, send and receive messages to/from an
9165AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
9166also includes support for using Thrift RPC over AMQP in Twisted
9167applications.")
9168 (license license:asl2.0)))
9169
9170(define-public python2-txamqp
9171 (package-with-python2 python-txamqp))
9172
9173(define-public python-kombu
9174 (package
9175 (name "python-kombu")
9176 (version "4.2.2")
9177 (source
9178 (origin
9179 (method url-fetch)
9180 (uri (pypi-uri "kombu" version))
9181 (sha256
9182 (base32
9183 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
9184 (build-system python-build-system)
9185 (native-inputs
9186 `(("python-mock" ,python-mock)
9187 ("python-case" ,python-case)
9188 ("python-pyro4" ,python-pyro4)
9189 ("python-pytest-sugar" ,python-pytest-sugar)
9190 ("python-pytz" ,python-pytz)))
9191 (propagated-inputs
9192 `(("python-anyjson" ,python-anyjson)
9193 ("python-amqp" ,python-amqp)
9194 ("python-redis" ,python-redis)))
9195 (home-page "https://kombu.readthedocs.io")
9196 (synopsis "Message passing library for Python")
9197 (description "The aim of Kombu is to make messaging in Python as easy as
9198possible by providing an idiomatic high-level interface for the AMQ protocol,
9199and also provide proven and tested solutions to common messaging problems.
9200AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
9201message orientation, queuing, routing, reliability and security, for which the
9202RabbitMQ messaging server is the most popular implementation.")
9203 (license license:bsd-3)
9204 (properties `((python2-variant . ,(delay python2-kombu))))))
9205
9206(define-public python2-kombu
9207 (let ((kombu (package-with-python2
9208 (strip-python2-variant python-kombu))))
9209 (package
9210 (inherit kombu)
9211 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
9212 ;; It works fine on the python3 variant.
9213 #:tests? #f
9214 ,@(package-arguments kombu)))
9215 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9216 ,@(package-native-inputs kombu))))))
9217
9218(define-public python-billiard
9219 (package
9220 (name "python-billiard")
9221 (version "3.5.0.5")
9222 (source
9223 (origin
9224 (method url-fetch)
9225 (uri (pypi-uri "billiard" version))
9226 (sha256
9227 (base32
9228 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
9229 (build-system python-build-system)
9230 (native-inputs
9231 `(("python-case" ,python-case)
9232 ("python-pytest" ,python-pytest)))
9233 (home-page "https://github.com/celery/billiard")
9234 (synopsis
9235 "Python multiprocessing fork with improvements and bugfixes")
9236 (description
9237 "Billiard is a fork of the Python 2.7 multiprocessing package. The
9238multiprocessing package itself is a renamed and updated version of R Oudkerk's
9239pyprocessing package. This standalone variant is intended to be compatible with
9240Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
9241 (license license:bsd-3)
9242 (properties `((python2-variant . ,(delay python2-billiard))))))
9243
9244(define-public python2-billiard
9245 (let ((billiard (package-with-python2
9246 (strip-python2-variant python-billiard))))
9247 (package
9248 (inherit billiard)
9249 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9250 ("python2-mock" ,python2-mock)
9251 ,@(package-native-inputs billiard))))))
9252
9253(define-public python-celery
9254 (package
9255 (name "python-celery")
9256 (version "4.2.1")
9257 (source
9258 (origin
9259 (method url-fetch)
9260 (uri (pypi-uri "celery" version))
9261 (sha256
9262 (base32
9263 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
9264 (build-system python-build-system)
9265 (arguments
9266 '(;; TODO The tests fail with Python 3.7
9267 ;; https://github.com/celery/celery/issues/4849
9268 #:tests? #f
9269 #:phases
9270 (modify-phases %standard-phases
9271 (add-after 'unpack 'patch-requirements
9272 (lambda _
9273 (substitute* "requirements/test.txt"
9274 (("pytest>=3\\.0,<3\\.3")
9275 "pytest>=3.0"))
9276 #t)))))
9277 (native-inputs
9278 `(("python-case" ,python-case)
9279 ("python-pytest" ,python-pytest)))
9280 (propagated-inputs
9281 `(("python-pytz" ,python-pytz)
9282 ("python-billiard" ,python-billiard)
9283 ("python-kombu" ,python-kombu)))
9284 (home-page "https://celeryproject.org")
9285 (synopsis "Distributed Task Queue")
9286 (description "Celery is an asynchronous task queue/job queue based on
9287distributed message passing. It is focused on real-time operation, but
9288supports scheduling as well. The execution units, called tasks, are executed
9289concurrently on a single or more worker servers using multiprocessing,
9290Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
9291synchronously (wait until ready).")
9292 (license license:bsd-3)
9293 (properties `((python2-variant . ,(delay python2-celery))))))
9294
9295(define-public python2-celery
9296 (let ((celery (package-with-python2
9297 (strip-python2-variant python-celery))))
9298 (package
9299 (inherit celery)
9300 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9301 ("python2-mock" ,python2-mock)
9302 ,@(package-native-inputs celery))))))
9303
9304(define-public python-translitcodec
9305 (package
9306 (name "python-translitcodec")
9307 (version "0.4.0")
9308 (source
9309 (origin
9310 (method url-fetch)
9311 (uri (pypi-uri "translitcodec" version))
9312 (sha256
9313 (base32
9314 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
9315 (build-system python-build-system)
9316 (arguments
9317 `(#:tests? #f)) ; no tests provided
9318 (home-page
9319 "https://github.com/claudep/translitcodec")
9320 (synopsis
9321 "Unicode to 8-bit charset transliteration codec")
9322 (description
9323 "This package contains codecs for transliterating ISO 10646 texts into
9324best-effort representations using smaller coded character sets (ASCII,
9325ISO 8859, etc.).")
9326 (license license:expat)))
9327
9328(define-public python2-translitcodec
9329 (package-with-python2 python-translitcodec))
9330
9331(define-public python-editor
9332 (package
9333 (name "python-editor")
9334 (version "0.5")
9335 (source
9336 (origin
9337 (method url-fetch)
9338 (uri (pypi-uri "python-editor" version))
9339 (sha256
9340 (base32
9341 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
9342 (build-system python-build-system)
9343 (home-page
9344 "https://github.com/fmoo/python-editor")
9345 (synopsis
9346 "Programmatically open an editor, capture the result")
9347 (description
9348 "python-editor is a library that provides the editor module for
9349programmatically interfacing with your system's $EDITOR.")
9350 (license license:asl2.0)))
9351
9352(define-public python2-editor
9353 (package-with-python2 python-editor))
9354
44d10b1f
RW
9355(define-public python-vobject
9356 (package
9357 (name "python-vobject")
9358 (version "0.9.5")
9359 (source (origin
9360 (method url-fetch)
9361 (uri (pypi-uri "vobject" version))
9362 (sha256
9363 (base32
9364 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
9365 (build-system python-build-system)
9366 (arguments
9367 '(;; The test suite relies on some non-portable Windows interfaces.
9368 #:tests? #f))
9369 (propagated-inputs
9370 `(("python-dateutil" ,python-dateutil)
9371 ("python-pyicu" ,python-pyicu)))
9372 (synopsis "Parse and generate vCard and vCalendar files")
9373 (description "Vobject is intended to be a full featured Python package for
9374parsing and generating vCard and vCalendar files. Currently, iCalendar files
9375are supported and well tested. vCard 3.0 files are supported, and all data
9376should be imported, but only a few components are understood in a sophisticated
9377way.")
9378 (home-page "http://eventable.github.io/vobject/")
9379 (license license:asl2.0)))
9380
9381(define-public python2-vobject
9382 (package-with-python2 python-vobject))
9383
9384(define-public python-munkres
9385 (package
9386 (name "python-munkres")
9387 (version "1.0.8")
9388 (source (origin
9389 (method url-fetch)
9390 (uri (pypi-uri "munkres" version))
9391 (sha256
9392 (base32
9393 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
9394 (build-system python-build-system)
9395 (arguments
9396 '(#:tests? #f)) ; no test suite
9397 (home-page "http://software.clapper.org/munkres/")
9398 (synopsis "Implementation of the Munkres algorithm")
9399 (description "The Munkres module provides an implementation of the Munkres
9400algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
9401useful for solving the Assignment Problem.")
9402 (license license:bsd-3)))
9403
9404(define-public python2-munkres
9405 (package-with-python2 python-munkres))
9406
9407(define-public python-whoosh
9408 (package
9409 (name "python-whoosh")
9410 (version "2.7.4")
9411 (source
9412 (origin
9413 (method url-fetch)
9414 (uri (pypi-uri "Whoosh" version))
9415 (sha256
9416 (base32
9417 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
9418 (build-system python-build-system)
2679d9a4 9419 (arguments '(#:tests? #f)) ; Test invocation is no longer supported by Python.
44d10b1f
RW
9420 (native-inputs
9421 `(("python-pytest" ,python-pytest)))
9422 (home-page "https://bitbucket.org/mchaput/whoosh")
9423 (synopsis "Full text indexing, search, and spell checking library")
9424 (description
9425 "Whoosh is a fast, pure-Python full text indexing, search, and spell
9426checking library.")
9427 (license license:bsd-2)))
9428
9429(define-public python2-whoosh
9430 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
9431 (package (inherit whoosh)
9432 (propagated-inputs
9433 `(("python2-backport-ssl-match-hostname"
9434 ,python2-backport-ssl-match-hostname)
9435 ,@(package-propagated-inputs whoosh))))))
9436
9437(define-public python-pathlib
9438 (package
9439 (name "python-pathlib")
9440 (version "1.0.1")
9441 (source (origin
9442 (method url-fetch)
9443 (uri (pypi-uri "pathlib" version))
9444 (sha256
9445 (base32
9446 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
9447 (build-system python-build-system)
9448 ;; The tests depend on the internal "test" module, which does not provide
9449 ;; a stable interface.
9450 (arguments `(#:tests? #f))
9451 (home-page "https://pathlib.readthedocs.org/")
9452 (synopsis "Object-oriented file system paths")
9453 (description "Pathlib offers a set of classes to handle file system paths.
9454It offers the following advantages over using string objects:
9455
9456@enumerate
9457@item No more cumbersome use of os and os.path functions. Everything can
9458be done easily through operators, attribute accesses, and method calls.
9459@item Embodies the semantics of different path types. For example,
9460comparing Windows paths ignores casing.
9461@item Well-defined semantics, eliminating any inconsistencies or
9462ambiguities (forward vs. backward slashes, etc.).
9463@end enumerate
9464
9465Note: In Python 3.4, pathlib is now part of the standard library. For other
9466Python versions please consider python-pathlib2 instead, which tracks the
9467standard library module. This module (python-pathlib) isn't maintained
9468anymore.")
9469 (license license:expat)))
9470
9471(define-public python2-pathlib
9472 (package-with-python2 python-pathlib))
9473
9474(define-public python2-pathlib2
9475 (package
9476 (name "python2-pathlib2")
87a49025 9477 (version "2.3.5")
44d10b1f
RW
9478 (source (origin
9479 (method url-fetch)
9480 (uri (pypi-uri "pathlib2" version))
9481 (sha256
9482 (base32
87a49025 9483 "0s4qa8c082fdkb17izh4mfgwrjd1n5pya18wvrbwqdvvb5xs9nbc"))))
44d10b1f
RW
9484 (build-system python-build-system)
9485 ;; We only need the the Python 2 variant, since for Python 3 our minimum
9486 ;; version is 3.4 which already includes this package as part of the
9487 ;; standard library.
9488 (arguments
9489 `(#:python ,python-2))
9490 (propagated-inputs
9491 `(("python2-scandir" ,python2-scandir)
9492 ("python2-six" ,python2-six)))
9493 (home-page "https://pypi.python.org/pypi/pathlib2/")
9494 (synopsis "Object-oriented file system paths - backport of standard
9495pathlib module")
9496 (description "The goal of pathlib2 is to provide a backport of standard
9497pathlib module which tracks the standard library module, so all the newest
9498features of the standard pathlib can be used also on older Python versions.
9499
9500Pathlib offers a set of classes to handle file system paths. It offers the
9501following advantages over using string objects:
9502
9503@enumerate
9504@item No more cumbersome use of os and os.path functions. Everything can
9505be done easily through operators, attribute accesses, and method calls.
9506@item Embodies the semantics of different path types. For example,
9507comparing Windows paths ignores casing.
9508@item Well-defined semantics, eliminating any inconsistencies or
9509ambiguities (forward vs. backward slashes, etc.).
9510@end enumerate")
9511 (license license:expat)))
9512
9513(define-public python2-pathlib2-bootstrap
9514 (hidden-package
9515 (package
9516 (inherit python2-pathlib2)
9517 (name "python2-pathlib2-bootstrap")
9518 (propagated-inputs
9519 `(("python2-scandir" ,python2-scandir)
9520 ("python2-six" ,python2-six-bootstrap))))))
9521
9522(define-public python-jellyfish
9523 (package
9524 (name "python-jellyfish")
9525 (version "0.5.6")
9526 (source (origin
9527 (method url-fetch)
9528 (uri (pypi-uri "jellyfish" version))
9529 (sha256
9530 (base32
9531 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
9532 (build-system python-build-system)
9533 (native-inputs
9534 `(("python-pytest" ,python-pytest)))
9535 (home-page "https://github.com/jamesturk/jellyfish")
9536 (synopsis "Approximate and phonetic matching of strings")
9537 (description "Jellyfish uses a variety of string comparison and phonetic
9538encoding algorithms to do fuzzy string matching.")
9539 (license license:bsd-2)
9540 (properties `((python2-variant . ,(delay python2-jellyfish))))))
9541
9542(define-public python2-jellyfish
9543 (let ((jellyfish (package-with-python2
9544 (strip-python2-variant python-jellyfish))))
9545 (package (inherit jellyfish)
9546 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
9547 ,@(package-native-inputs jellyfish))))))
9548
9549(define-public python2-unicodecsv
9550 (package
9551 (name "python2-unicodecsv")
9552 (version "0.14.1")
9553 (source (origin
f711b71b 9554 (method git-fetch)
44d10b1f
RW
9555 ;; The test suite is not included in the PyPi release.
9556 ;; https://github.com/jdunck/python-unicodecsv/issues/19
f711b71b
EF
9557 (uri (git-reference
9558 (url "https://github.com/jdunck/python-unicodecsv")
9559 (commit version)))
9560 (file-name (git-file-name name version))
44d10b1f
RW
9561 (sha256
9562 (base32
f711b71b 9563 "15hx2k41a2lpv4hcml9zp4cvlx1171mnb5s4s13xc1pxkq3vgdjy"))))
44d10b1f
RW
9564 (build-system python-build-system)
9565 (arguments
9566 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
9567 #:python ,python-2))
9568 (native-inputs
9569 `(("python2-unittest2" ,python2-unittest2)))
9570 (home-page "https://github.com/jdunck/python-unicodecsv")
9571 (synopsis "Unicode CSV module for Python 2")
9572 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
9573module, adding support for Unicode strings.")
9574 (license license:bsd-2)))
9575
9576(define-public python-rarfile
9577 (package
9578 (name "python-rarfile")
9579 (version "2.8")
9580 (source (origin
9581 (method url-fetch)
9582 (uri (pypi-uri "rarfile" version))
9583 (sha256
9584 (base32
9585 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
9586 (build-system python-build-system)
9587 (arguments
9588 '(#:phases
9589 (modify-phases %standard-phases
9590 (replace 'check
9591 ;; Many tests fail, but the installation proceeds.
e59dd341 9592 (lambda _ (invoke "make" "-C" "test" "test"))))))
44d10b1f
RW
9593 (native-inputs
9594 `(("which" ,which))) ; required for tests
9595 (propagated-inputs
9596 `(("libarchive" ,libarchive)))
9597 (home-page "https://github.com/markokr/rarfile")
9598 (synopsis "RAR archive reader for Python")
9599 (description "This is Python module for RAR archive reading. The interface
9600is made as zipfile like as possible.")
9601 (license license:isc)))
9602
9603(define-public python2-rarfile
9604 (package-with-python2 python-rarfile))
9605
9606(define-public python-magic
9607 (package
9608 (name "python-magic")
9609 (version "0.4.15")
9610 (source
9611 (origin
9612 (method url-fetch)
9613 (uri (pypi-uri "python-magic" version))
9614 (sha256
9615 (base32
9616 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
9617 (file-name (string-append name "-" version "-checkout"))))
9618 (build-system python-build-system)
9619 (arguments
9620 ;; The tests are unreliable, so don't run them. The tests fail
9621 ;; under Python3 because they were written for Python2 and
9622 ;; contain import statements that do not work in Python3. One of
9623 ;; the tests fails under Python2 because its assertions are
9624 ;; overly stringent; it relies on comparing output strings which
9625 ;; are brittle and can change depending on the version of
9626 ;; libmagic being used and the system on which the test is
9627 ;; running. In my case, under GuixSD 0.10.0, only one test
9628 ;; failed, and it seems to have failed only because the version
9629 ;; of libmagic that is packaged in Guix outputs a slightly
9630 ;; different (but not wrong) string than the one that the test
9631 ;; expected.
9632 '(#:tests? #f
9633 #:phases (modify-phases %standard-phases
9634 ;; Replace a specific method call with a hard-coded
9635 ;; path to the necessary libmagic.so file in the
9636 ;; store. If we don't do this, then the method call
9637 ;; will fail to find the libmagic.so file, which in
9638 ;; turn will cause any application using
9639 ;; python-magic to fail.
9640 (add-before 'build 'hard-code-path-to-libmagic
9641 (lambda* (#:key inputs #:allow-other-keys)
9642 (let ((file (assoc-ref inputs "file")))
9643 (substitute* "magic.py"
9644 (("ctypes.util.find_library\\('magic'\\)")
9645 (string-append "'" file "/lib/libmagic.so'")))
9646 #t)))
9647 (add-before 'install 'disable-egg-compression
9648 (lambda _
9649 (let ((port (open-file "setup.cfg" "a")))
9650 (display "\n[easy_install]\nzip_ok = 0\n"
9651 port)
9652 (close-port port)
9653 #t))))))
9654 (inputs
9655 ;; python-magic needs to be able to find libmagic.so.
9656 `(("file" ,file)))
9657 (home-page
9658 "https://github.com/ahupp/python-magic")
9659 (synopsis
9660 "File type identification using libmagic")
9661 (description
9662 "This module uses ctypes to access the libmagic file type
9663identification library. It makes use of the local magic database and
9664supports both textual and MIME-type output. Note that this module and
9665the python-file module both provide a \"magic.py\" file; these two
9666modules, which are different and were developed separately, both serve
9667the same purpose: to provide Python bindings for libmagic.")
9668 (license license:expat)))
9669
9670(define-public python2-magic
9671 (package-with-python2 python-magic))
9672
9673(define-public python2-s3cmd
9674 (package
9675 (name "python2-s3cmd")
9676 (version "1.6.1")
9677 (source
9678 (origin
9679 (method url-fetch)
9680 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
9681 "s3cmd-" version ".tar.gz"))
9682 (sha256
9683 (base32
9684 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
9685 (build-system python-build-system)
9686 (arguments
9687 ;; s3cmd is written for python2 only and contains no tests.
9688 `(#:python ,python-2
9689 #:tests? #f))
9690 (propagated-inputs
9691 `(("python2-dateutil" ,python2-dateutil)
9692 ;; The python-file package also provides a magic.py module.
9693 ;; This is an unfortunate state of affairs; however, s3cmd
9694 ;; fails to install if it cannot find specifically the
9695 ;; python-magic package. Thus we include it, instead of using
9696 ;; python-file. Ironically, s3cmd sometimes works better
9697 ;; without libmagic bindings at all:
9698 ;; https://github.com/s3tools/s3cmd/issues/198
9699 ("python2-magic" ,python2-magic)))
9700 (home-page "http://s3tools.org/s3cmd")
9701 (synopsis "Command line tool for S3-compatible storage services")
9702 (description
9703 "S3cmd is a command line tool for uploading, retrieving and managing data
9704in storage services that are compatible with the Amazon Simple Storage
9705Service (S3) protocol, including S3 itself. It supports rsync-like backup,
9706GnuPG encryption, and more. It also supports management of Amazon's
9707CloudFront content delivery network.")
9708 (license license:gpl2+)))
9709
9710(define-public python-pkgconfig
9711 (package
9712 (name "python-pkgconfig")
9713 (version "1.3.1")
9714 (source
9715 (origin
9716 (method url-fetch)
9717 (uri (pypi-uri "pkgconfig" version))
9718 (sha256
9719 (base32
9720 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
9721 (build-system python-build-system)
9722 (native-inputs
9723 `(("python-nose" ,python-nose)))
9724 (inputs
9725 `(("pkg-config" ,pkg-config)))
9726 (arguments
9727 `(#:phases
9728 (modify-phases %standard-phases
9729 (add-before 'build 'patch
9730 ;; Hard-code the path to pkg-config.
9731 (lambda _
9732 (substitute* "pkgconfig/pkgconfig.py"
9733 (("cmd = 'pkg-config")
9734 (string-append "cmd = '" (which "pkg-config"))))
9735 #t))
9736 (replace 'check
9737 (lambda _
9738 (invoke "nosetests" "test.py"))))))
9739 (home-page "https://github.com/matze/pkgconfig")
9740 (synopsis "Python interface for pkg-config")
9741 (description "This module provides a Python interface to pkg-config. It
9742can be used to find all pkg-config packages, check if a package exists,
9743check if a package meets certain version requirements, query CFLAGS and
9744LDFLAGS and parse the output to build extensions with setup.py.")
9745 (license license:expat)))
9746
9747(define-public python2-pkgconfig
9748 (package-with-python2 python-pkgconfig))
9749
9750(define-public python-bz2file
9751 (package
9752 (name "python-bz2file")
9753 (version "0.98")
9754 (source
9755 (origin
9756 (method url-fetch)
9757 (uri (pypi-uri "bz2file" version))
9758 (sha256
9759 (base32
9760 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
9761 (build-system python-build-system)
9762 (arguments
9763 `(#:tests? #f)) ; Tests use deprecated python modules.
9764 (home-page "https://github.com/nvawda/bz2file")
9765 (synopsis "Read and write bzip2-compressed files")
9766 (description
9767 "Bz2file is a Python library for reading and writing bzip2-compressed
9768files. It contains a drop-in replacement for the I/O interface in the
9769standard library's @code{bz2} module, including features from the latest
9770development version of CPython that are not available in older releases.")
9771 (license license:asl2.0)))
9772
9773(define-public python2-bz2file
9774 (package-with-python2 python-bz2file))
9775
9776(define-public python-future
9777 (package
9778 (name "python-future")
d5d54030 9779 (version "0.17.1")
44d10b1f
RW
9780 (source
9781 (origin
9782 (method url-fetch)
9783 (uri (pypi-uri "future" version))
9784 (sha256
9785 (base32
d5d54030 9786 "1f2rlqn9rh7adgir52dlbqz69gsab44x0mlm8gf1cs7xvhv54137"))))
44d10b1f
RW
9787 (build-system python-build-system)
9788 ;; Many tests connect to the network or are otherwise flawed.
9789 ;; https://github.com/PythonCharmers/python-future/issues/210
9790 (arguments
9791 `(#:tests? #f))
9792 (home-page "http://python-future.org")
9793 (synopsis "Single-source support for Python 3 and 2")
9794 (description
9795 "@code{python-future} is the missing compatibility layer between Python 2 and
9796Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
9797to support both Python 2 and Python 3 with minimal overhead.")
9798 (license license:expat)))
9799
9800(define-public python2-future
9801 (package-with-python2 python-future))
9802
9803(define-public python-cysignals
9804 (package
9805 (name "python-cysignals")
8e3e51df 9806 (version "1.9.0")
44d10b1f
RW
9807 (source
9808 (origin
9809 (method url-fetch)
8e3e51df 9810 (uri (pypi-uri "cysignals" version))
44d10b1f
RW
9811 (sha256
9812 (base32
8e3e51df 9813 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
44d10b1f
RW
9814 (build-system python-build-system)
9815 (native-inputs
9816 `(("python-cython" ,python-cython)
9817 ("python-sphinx" ,python-sphinx)))
9818 (inputs
9819 `(("pari-gp" ,pari-gp)))
9820 (arguments
9821 `(#:modules ((guix build python-build-system)
9822 ((guix build gnu-build-system) #:prefix gnu:)
9823 (guix build utils))
9824 ;; FIXME: Tests are executed after installation and currently fail
9825 ;; when not installing into standard locations; the author is working
9826 ;; on a fix.
9827 #:tests? #f
9828 #:phases
9829 (modify-phases %standard-phases
9830 (add-before
9831 'build 'configure
9832 (assoc-ref gnu:%standard-phases 'configure)))))
9833 (home-page
9834 "https://github.com/sagemath/cysignals")
9835 (synopsis
9836 "Handling of interrupts and signals for Cython")
9837 (description
9838 "The cysignals package provides mechanisms to handle interrupts (and
9839other signals and errors) in Cython code, using two related approaches,
9840for mixed Cython/Python code or external C libraries and pure Cython code,
9841respectively.")
9842 (license license:lgpl3+)))
9843
9844(define-public python2-cysignals
9845 (package-with-python2 python-cysignals))
9846
9847(define-public python2-shedskin
9848 (package
9849 (name "python2-shedskin")
9850 (version "0.9.4")
9851 (source
9852 (origin
9853 (method url-fetch)
9854 (uri (string-append "https://github.com/shedskin/shedskin/"
9855 "releases/download/v" version
9856 "/shedskin-" version ".tgz"))
9857 (sha256
9858 (base32
9859 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
9860 (build-system python-build-system)
9861 (arguments
9862 `(#:python ,python-2
9863 #:phases (modify-phases %standard-phases
9864 (add-after 'unpack 'fix-resulting-include-libs
9865 (lambda* (#:key inputs #:allow-other-keys)
9866 (let ((libgc (assoc-ref inputs "libgc"))
9867 (pcre (assoc-ref inputs "pcre")))
9868 (substitute* "shedskin/makefile.py"
9869 (("variable == 'CCFLAGS':[ ]*")
9870 (string-append "variable == 'CCFLAGS':\n"
9871 " line += ' -I " pcre "/include"
9872 " -I " libgc "/include'"))
9873 (("variable == 'LFLAGS':[ ]*")
9874 (string-append "variable == 'LFLAGS':\n"
9875 " line += ' -L" pcre "/lib"
9876 " -L " libgc "/lib'")))
9877 #t))))))
9878 (inputs `(("pcre" ,pcre)
9879 ("libgc" ,libgc)))
9880 (home-page "https://shedskin.github.io/")
9881 (synopsis "Experimental Python-2 to C++ Compiler")
9882 (description (string-append "This is an experimental compiler for a subset of
9883Python. It generates C++ code and a Makefile."))
9884 (license (list license:gpl3 license:bsd-3 license:expat))))
9885
9886(define-public python2-rope
9887 (package
9888 (name "python2-rope")
a9ba0a31 9889 (version "0.11.0")
44d10b1f
RW
9890 (source
9891 (origin
9892 (method url-fetch)
9893 (uri (pypi-uri "rope" version))
9894 (sha256
9895 (base32
a9ba0a31 9896 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
44d10b1f 9897 (arguments
afb29715 9898 ;; Rope has only partial python3 support, see `python-rope'
44d10b1f
RW
9899 `(#:python ,python-2))
9900 (build-system python-build-system)
9901 (native-inputs
9902 `(("python2-unittest2" ,python2-unittest2)))
9903 (home-page "https://github.com/python-rope/rope")
9904 (synopsis "Refactoring library for Python")
9905 (description "Rope is a refactoring library for Python. It facilitates
9906the renaming, moving and extracting of attributes, functions, modules, fields
9907and parameters in Python 2 source code. These refactorings can also be applied
9908to occurrences in strings and comments.")
9909 (license license:gpl2)))
9910
2c880ef4
LC
9911(define-public python-rope
9912 (package
9913 (inherit python2-rope)
9914 (name "python-rope")
9915 (arguments `(#:python ,python-wrapper
9916 ;; XXX: Only partial python3 support, results in some failing
9917 ;; tests: <https://github.com/python-rope/rope/issues/247>.
9918 #:tests? #f))
9919 (properties `((python2-variant . ,(delay python2-rope))))))
9920
44d10b1f
RW
9921(define-public python-py3status
9922 (package
9923 (name "python-py3status")
ef68b35d 9924 (version "3.21")
44d10b1f
RW
9925 (source
9926 (origin
9927 (method url-fetch)
9928 (uri (pypi-uri "py3status" version))
9929 (sha256
ef68b35d 9930 (base32 "16z8zq83hxy48g6hh4xczbdz50qvxv9k1aahr4fqq7jis60cc262"))))
44d10b1f
RW
9931 (build-system python-build-system)
9932 (inputs
9933 `(("file" ,file)))
9934 (arguments
9935 '(#:phases
9936 (modify-phases %standard-phases
9937 ;; 'file' is used for detection of configuration file encoding
9938 ;; let's make link the dependency to particular input
9939 (add-before 'build 'patch-file-path
9940 (lambda* (#:key inputs #:allow-other-keys)
9941 (let ((file-path (assoc-ref inputs "file")))
9942 (substitute* "py3status/parse_config.py"
6a6b8a3f 9943 (("\\[\"file\", \"-b\"")
44d10b1f
RW
9944 (string-append "['" file-path "/bin/file', '-b'")))
9945 #t))))
9946 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
9947 (home-page "https://github.com/ultrabug/py3status")
9948 (synopsis "Extensible i3status wrapper written in Python")
9949 (description "py3status is an i3status wrapper which extends i3status
9950functionality in a modular way, allowing you to extend your panel with your
9951own code, responding to click events and updating clock every second.")
9952 (license license:bsd-3)))
9953
9954(define-public python-tblib
9955 (package
9956 (name "python-tblib")
9957 (version "1.3.2")
9958 (source (origin
9959 (method url-fetch)
9960 (uri (pypi-uri "tblib" version))
9961 (sha256 (base32
9962 "1rsg8h069kqgncyv8fgzyj6qflk6j10cb78pa5jk34ixwq044vj3"))))
9963 (build-system python-build-system)
9964 (arguments
9965 `(#:phases
9966 (modify-phases %standard-phases
9967 (add-before 'check 'adjust-tests
9968 (lambda _
9969 (when (which "python3")
9970 ;; Adjust the example output to match that of Python 3.7:
9971 ;; <https://github.com/ionelmc/python-tblib/issues/36>.
9972 (substitute* "README.rst"
9973 (("Exception\\('fail',") "Exception('fail'"))
9974 #t)))
9975 (replace 'check
9976 (lambda _
9977 ;; Upstream runs tests after installation and the package itself
9978 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
9979 ;; found.
9980 (setenv "PYTHONPATH"
9981 (string-append (getcwd) "/build/lib:"
9982 (getenv "PYTHONPATH")))
9983 (invoke "py.test" "-vv" "tests" "README.rst"))))))
9984 (native-inputs
9985 `(("python-pytest" ,python-pytest)
9986 ("python-six" ,python-six)))
9987 (home-page "https://github.com/ionelmc/python-tblib")
9988 (synopsis "Traceback serialization library")
9989 (description
9990 "Traceback serialization allows you to:
9991
9992@enumerate
9993@item Pickle tracebacks and raise exceptions with pickled tracebacks in
9994different processes. This allows better error handling when running code over
9995multiple processes (imagine multiprocessing, billiard, futures, celery etc).
9996
9997@item Parse traceback strings and raise with the parsed tracebacks.
9998@end enumerate\n")
9999 (license license:bsd-3)))
10000
10001(define-public python2-tblib
10002 (package-with-python2 python-tblib))
10003
10004(define-public python-greenlet
10005 (package
10006 (name "python-greenlet")
10007 (version "0.4.15")
10008 (source (origin
10009 (method url-fetch)
10010 (uri (pypi-uri "greenlet" version))
10011 (sha256
10012 (base32
10013 "1g4g1wwc472ds89zmqlpyan3fbnzpa8qm48z3z1y6mlk44z485ll"))))
10014 (build-system python-build-system)
10015 (home-page "https://greenlet.readthedocs.io/")
10016 (synopsis "Lightweight in-process concurrent programming")
10017 (description
10018 "Greenlet package is a spin-off of Stackless, a version of CPython
10019that supports micro-threads called \"tasklets\". Tasklets run
10020pseudo-concurrently (typically in a single or a few OS-level threads) and
10021are synchronized with data exchanges on \"channels\".")
10022 (license (list license:psfl license:expat))))
10023
10024(define-public python2-greenlet
10025 (package-with-python2 python-greenlet))
10026
10027(define-public python-objgraph
10028 (package
10029 (name "python-objgraph")
eebc03bb 10030 (version "3.4.1")
44d10b1f
RW
10031 (source
10032 (origin
10033 (method url-fetch)
10034 (uri (pypi-uri "objgraph" version))
10035 (sha256
10036 (base32
eebc03bb 10037 "19qmqsh984zq1rzzjy4vqnmviaqnymcyl8h7z99pnicbgwnm2adz"))))
44d10b1f
RW
10038 (build-system python-build-system)
10039 (propagated-inputs
10040 `(("python-graphviz" ,python-graphviz)))
10041 (native-inputs
10042 `(("python-mock" ,python-mock)
10043 ("graphviz" ,graphviz)))
10044 (home-page "https://mg.pov.lt/objgraph/")
10045 (synopsis "Draw Python object reference graphs with graphviz")
10046 (description
10047 "This package provides tools to draw Python object reference graphs with
10048graphviz.")
10049 (license license:expat)))
10050
ffe58d1d
MB
10051(define-public python2-objgraph
10052 (package-with-python2 python-objgraph))
10053
44d10b1f
RW
10054(define-public python-gevent
10055 (package
10056 (name "python-gevent")
10057 (version "1.3.7")
10058 (source (origin
10059 (method url-fetch)
10060 (uri (pypi-uri "gevent" version))
10061 (sha256
10062 (base32
10063 "0b0fr04qdk1p4sniv87fh8z5psac60x01pv054kpgi94520g81iz"))
10064 (modules '((guix build utils)))
10065 (snippet
10066 '(begin
10067 ;; unbunding libev and c-ares
10068 (delete-file-recursively "deps")
10069 #t))))
10070 (build-system python-build-system)
10071 (arguments
10072 `(#:modules ((ice-9 ftw)
10073 (ice-9 match)
10074 (srfi srfi-26)
10075 (guix build utils)
10076 (guix build python-build-system))
10077 #:phases (modify-phases %standard-phases
44d10b1f
RW
10078 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
10079 (lambda _
10080 (substitute* "src/gevent/subprocess.py"
10081 (("/bin/sh") (which "sh")))
10082 (for-each (lambda (file)
10083 (substitute* file
10084 (("/bin/sh") (which "sh"))
10085 (("/bin/true") (which "true"))))
10086 (find-files "src/greentest" "\\.py$"))
10087 #t))
10088 (add-before 'build 'do-not-use-bundled-sources
10089 (lambda* (#:key inputs #:allow-other-keys)
10090 (setenv "CONFIG_SHELL" (which "bash"))
10091 (setenv "LIBEV_EMBED" "false")
10092 (setenv "CARES_EMBED" "false")
10093 (setenv "EMBED" "false")
10094
b5b56b7f
MB
10095 ;; Prevent building bundled libev.
10096 (substitute* "setup.py"
10097 (("run_make=_BUILDING")
10098 "run_make=False"))
10099
44d10b1f
RW
10100 (let ((greenlet (string-append
10101 (assoc-ref inputs "python-greenlet")
10102 "/include")))
10103 (match (scandir greenlet
10104 (lambda (item)
10105 (string-prefix? "python" item)))
10106 ((python)
b5b56b7f 10107 (setenv "C_INCLUDE_PATH"
44d10b1f
RW
10108 (string-append greenlet "/" python)))))
10109 #t))
10110 (add-before 'check 'skip-timer-test
10111 (lambda _
10112 ;; XXX: Skip 'TestTimerResolution', which appears to be
10113 ;; unreliable.
10114 (substitute* "src/greentest/test__core_timer.py"
10115 (("not greentest.RUNNING_ON_CI") "False"))
10116 #t))
10117 (replace 'check
10118 (lambda _
10119 ;; Make sure the build directory is on PYTHONPATH.
10120 (setenv "PYTHONPATH"
10121 (string-append
10122 (getenv "PYTHONPATH") ":"
10123 (getcwd) "/build/"
10124 (car (scandir "build" (cut string-prefix? "lib." <>)))))
10125 (with-directory-excursion "src/greentest"
10126 ;; XXX: Many tests require network access. Instead we only
10127 ;; run known-good tests. Unfortunately we cannot use
10128 ;; recursion here since this directory also contains
10129 ;; Python-version-specific subfolders.
10130 (apply invoke "python" "testrunner.py" "--config"
10131 "known_failures.py"
10132 (scandir "." (cut regexp-exec
10133 (make-regexp "test_+(subprocess|core)")
10134 <>)))))))))
10135 (propagated-inputs
10136 `(("python-greenlet" ,python-greenlet)
10137 ("python-objgraph" ,python-objgraph)))
10138 (native-inputs
b5b56b7f 10139 `(("python-six" ,python-six)))
44d10b1f
RW
10140 (inputs
10141 `(("c-ares" ,c-ares)
10142 ("libev" ,libev)))
10143 (home-page "http://www.gevent.org/")
10144 (synopsis "Coroutine-based network library")
10145 (description
10146 "gevent is a coroutine-based Python networking library that uses greenlet
10147to provide a high-level synchronous API on top of the libev event loop.")
10148 (license license:expat)
10149 (properties `((python2-variant . ,(delay python2-gevent))))))
10150
10151(define-public python2-gevent
10152 (let ((base (package-with-python2
10153 (strip-python2-variant python-gevent))))
10154 (package
10155 (inherit base)
10156 (native-inputs `(,@(package-native-inputs python-gevent)
10157 ("python-mock" ,python2-mock))))))
10158
10159(define-public python-fastimport
10160 (package
10161 (name "python-fastimport")
10162 (version "0.9.6")
10163 (source
10164 (origin
10165 (method url-fetch)
10166 (uri (pypi-uri "fastimport" version))
10167 (sha256
10168 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
10169 (build-system python-build-system)
10170 (home-page "https://github.com/jelmer/python-fastimport")
10171 (synopsis "VCS fastimport parser and generator in Python")
10172 (description "This package provides a parser for and generator of the Git
10173@url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
10174format.")
10175 (license license:gpl2+)))
10176
10177(define-public python2-fastimport
10178 (package-with-python2 python-fastimport))
10179
10180(define-public python-twisted
10181 (package
10182 (name "python-twisted")
fdfad2fc 10183 (version "19.7.0")
44d10b1f
RW
10184 (source (origin
10185 (method url-fetch)
10186 (uri (pypi-uri "Twisted" version ".tar.bz2"))
10187 (sha256
10188 (base32
fdfad2fc 10189 "17d3hnxv9qndagzz63mdpyk99xj63p9gq586vjn0rxk8cl197nym"))))
44d10b1f
RW
10190 (build-system python-build-system)
10191 (arguments
0107c9b8 10192 '(#:tests? #f)) ; FIXME: some tests fail
44d10b1f
RW
10193 (propagated-inputs
10194 `(("python-zope-interface" ,python-zope-interface)
52ca1c4a 10195 ("python-pyhamcrest" ,python-pyhamcrest)
44d10b1f 10196 ("python-incremental" ,python-incremental)
e5ba2fe3 10197 ("python-hyperlink" ,python-hyperlink)
44d10b1f
RW
10198 ("python-constantly" ,python-constantly)
10199 ("python-automat" ,python-automat)))
10200 (home-page "https://twistedmatrix.com/")
10201 (synopsis "Asynchronous networking framework written in Python")
10202 (description
10203 "Twisted is an extensible framework for Python programming, with special
10204focus on event-based network programming and multiprotocol integration.")
10205 (license license:expat)))
10206
10207(define-public python2-twisted
10208 (package-with-python2 python-twisted))
10209
10210(define-public python-pika
10211 (package
10212 (name "python-pika")
10213 (version "0.12.0")
10214 (source
10215 (origin
10216 (method url-fetch)
10217 (uri (pypi-uri "pika" version))
10218 (sha256
10219 (base32
10220 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
10221 (build-system python-build-system)
10222 (native-inputs
10223 `(("python-pyev" ,python-pyev)
10224 ("python-tornado" ,python-tornado)
10225 ("python-twisted" ,python-twisted)))
10226 (home-page "https://pika.readthedocs.org")
10227 (synopsis "Pure Python AMQP Client Library")
10228 (description
10229 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
10230Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
10231network support library.")
10232 (license license:bsd-3)))
10233
10234(define-public python2-pika
10235 (package-with-python2 python-pika))
10236
10237(define-public python-ply
10238 (package
10239 (name "python-ply")
10240 (version "3.10")
10241 (source
10242 (origin
10243 (method url-fetch)
10244 (uri (pypi-uri "ply" version))
10245 (sha256
10246 (base32
10247 "1jxsr1d2f732r6ljhvm827113dckwl6qwakfvpbdhcbhvpvlmscn"))))
10248 (build-system python-build-system)
10249 (home-page "http://www.dabeaz.com/ply/")
10250 (synopsis "Python Lex & Yacc")
10251 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
10252It uses LR parsing and does extensive error checking.")
10253 (license license:bsd-3)))
10254
10255(define-public python2-ply
10256 (package-with-python2 python-ply))
10257
10258(define-public python-tabulate
10259 (package
10260 (name "python-tabulate")
10261 (version "0.7.7")
10262 (source (origin
10263 (method url-fetch)
10264 (uri (pypi-uri "tabulate" version))
10265 (sha256
10266 (base32
10267 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
10268 (build-system python-build-system)
10269 (arguments
10270 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
10271 ;; and the latest release is not tagged in the upstream repository.
10272 '(#:tests? #f))
10273 (home-page "https://bitbucket.org/astanin/python-tabulate")
10274 (synopsis "Pretty-print tabular data")
10275 (description
10276 "Tabulate is a library and command-line utility to pretty-print tabular
10277data in Python.")
10278 (license license:expat)))
10279
10280(define-public python2-tabulate
10281 (package-with-python2 python-tabulate))
10282
10283(define-public python-kazoo
10284 (package
10285 (name "python-kazoo")
10286 (version "2.4.0")
10287 (source
10288 (origin
10289 (method url-fetch)
10290 (uri (pypi-uri "kazoo" version))
10291 (sha256
10292 (base32
10293 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
10294 (build-system python-build-system)
10295 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
10296 (propagated-inputs
10297 `(("python-six" ,python-six)))
10298 (home-page "https://kazoo.readthedocs.org")
10299 (synopsis "High-level Zookeeper client library")
10300 (description
10301 "Kazoo is a Python client library for the Apache Zookeeper distributed
10302application service. It is designed to be easy to use and to avoid common
10303programming errors.")
10304 (license license:asl2.0)))
10305
10306(define-public python2-kazoo
10307 (package-with-python2 python-kazoo))
10308
10309(define-public python-pykafka
10310 (package
10311 (name "python-pykafka")
10312 (version "2.4.0")
10313 (source (origin
10314 (method url-fetch)
0ca1d040 10315 (uri (pypi-uri "pykafka" version))
44d10b1f
RW
10316 (sha256
10317 (base32
10318 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
10319 (build-system python-build-system)
10320 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
10321 (propagated-inputs
10322 `(("python-gevent" ,python-gevent)
10323 ("python-kazoo" ,python-kazoo)
10324 ("python-tabulate" ,python-tabulate)))
10325 (inputs
10326 `(("librdkafka" ,librdkafka)))
10327 (home-page "https://pykafka.readthedocs.io/")
10328 (synopsis "Apache Kafka client for Python")
10329 (description
10330 "PyKafka is a client for the Apache Kafka distributed messaging system.
10331It includes Python implementations of Kafka producers and consumers, which
10332are optionally backed by a C extension built on librdkafka.")
10333 (license license:asl2.0)))
10334
10335(define-public python2-pykafka
10336 (package-with-python2 python-pykafka))
10337
10338(define-public python-wcwidth
28ac442b
MB
10339 (package
10340 (name "python-wcwidth")
574a71a7 10341 (version "0.1.8")
28ac442b
MB
10342 (source (origin
10343 (method url-fetch)
10344 (uri (pypi-uri "wcwidth" version))
10345 (sha256
10346 (base32
574a71a7 10347 "1a1pzds3xzfylm5mnc5f6c1p8kiig0daqjc9gygd9rc3cj53x2zj"))))
28ac442b
MB
10348 (build-system python-build-system)
10349 (home-page "https://github.com/jquast/wcwidth")
10350 (synopsis "Measure number of terminal column cells of wide-character codes")
10351 (description "Wcwidth measures the number of terminal column cells of
44d10b1f
RW
10352wide-character codes. It is useful for those implementing a terminal emulator,
10353or programs that carefully produce output to be interpreted by one. It is a
10354Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
10355specified in POSIX.1-2001 and POSIX.1-2008.")
28ac442b 10356 (license license:expat)))
44d10b1f
RW
10357
10358(define-public python2-wcwidth
10359 (package-with-python2 python-wcwidth))
10360
10361(define-public python2-jsonrpclib
10362 (package
10363 (name "python2-jsonrpclib")
10364 (version "0.1.7")
10365 (source (origin
10366 (method url-fetch)
6571bba0 10367 (uri (pypi-uri "jsonrpclib" version))
44d10b1f
RW
10368 (sha256
10369 (base32
10370 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
10371 (build-system python-build-system)
10372 (arguments
10373 `(#:tests? #f
10374 #:python ,python-2))
10375 (home-page "https://github.com/joshmarshall/jsonrpclib/")
10376 (synopsis "Implementation of JSON-RPC specification for Python")
10377 (description
10378 "This library is an implementation of the JSON-RPC specification.
10379It supports both the original 1.0 specification, as well as the
10380new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
10381etc.")
10382 (license license:asl2.0)))
10383
10384(define-public python-chai
10385 (package
10386 (name "python-chai")
10387 (version "1.1.2")
10388 (source (origin
10389 (method url-fetch)
10390 (uri (pypi-uri "chai" version))
10391 (sha256
10392 (base32
10393 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
10394 (build-system python-build-system)
10395 (home-page "https://github.com/agoragames/chai")
10396 (synopsis "Mocking framework for Python")
10397 (description
10398 "Chai provides an api for mocking, stubbing and spying your python
10399objects, patterned after the Mocha library for Ruby.")
10400 (license license:bsd-3)))
10401
10402(define-public python2-chai
10403 (package-with-python2 python-chai))
10404
10405(define-public python-inflection
10406 (package
10407 (name "python-inflection")
10408 (version "0.3.1")
10409 (source
10410 (origin (method url-fetch)
10411 (uri (pypi-uri "inflection" version))
10412 (sha256
10413 (base32
10414 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
10415 (build-system python-build-system)
10416 (native-inputs
10417 `(("python-pytest" ,python-pytest)))
10418 (home-page "https://github.com/jpvanhal/inflection")
10419 (synopsis "Python string transformation library")
10420 (description
10421 "Inflection is a string transformation library. It singularizes
10422and pluralizes English words, and transforms strings from CamelCase to
10423underscored string.")
10424 (license license:expat)))
10425
10426(define-public python2-inflection
10427 (package-with-python2 python-inflection))
10428
10429(define-public python-pylev
10430 (package
10431 (name "python-pylev")
10432 (version "1.3.0")
10433 (source (origin
10434 (method url-fetch)
10435 (uri (pypi-uri "pylev" version))
10436 (sha256
10437 (base32
10438 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
10439 (build-system python-build-system)
10440 (home-page "https://github.com/toastdriven/pylev")
10441 (synopsis "Levenshtein distance implementation in Python")
10442 (description "Pure Python Levenshtein implementation, based off the
10443Wikipedia code samples at
10444@url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
10445 (license license:bsd-3)))
10446
10447(define-public python2-pylev
10448 (package-with-python2 python-pylev))
10449
10450(define-public python-cleo
10451 (package
10452 (name "python-cleo")
af2d3713 10453 (version "0.6.8")
44d10b1f
RW
10454 (source (origin
10455 (method url-fetch)
10456 (uri (pypi-uri "cleo" version))
10457 (sha256
10458 (base32
af2d3713 10459 "06zp695hq835rkaq6irr1ds1dp2qfzyf32v60vxpd8rcnxv319l5"))))
44d10b1f
RW
10460 (build-system python-build-system)
10461 (native-inputs
af2d3713 10462 `( ;; For testing
44d10b1f
RW
10463 ("python-mock" ,python-mock)
10464 ("python-pytest-mock" ,python-pytest-mock)
10465 ("python-pytest" ,python-pytest)))
10466 (propagated-inputs
10467 `(("python-backpack" ,python-backpack)
10468 ("python-pastel" ,python-pastel)
10469 ("python-pylev" ,python-pylev)))
10470 (home-page "https://github.com/sdispater/cleo")
10471 (synopsis "Command-line arguments library for Python")
10472 (description
10473 "Cleo allows you to create command-line commands with signature in
10474docstring and colored output.")
10475 (license license:expat)))
10476
10477(define-public python2-cleo
10478 (package-with-python2 python-cleo))
10479
2be85c45
TLC
10480(define-public python-tomlkit
10481 (package
10482 (name "python-tomlkit")
10483 (version "0.5.7")
10484 (source
10485 (origin
10486 (method url-fetch)
10487 (uri (pypi-uri "tomlkit" version))
10488 (sha256
10489 (base32
10490 "18820ga5z3if1w8dvykxrfm000akracq01ic402xrbljgbn5grn4"))))
10491 (build-system python-build-system)
10492 (native-inputs
10493 `(("python-pytest" ,python-pytest)))
10494 (home-page
10495 "https://github.com/sdispater/tomlkit")
10496 (synopsis "Style preserving TOML library")
10497 (description
10498 "TOML Kit is a 0.5.0-compliant TOML library. It includes a parser that
10499preserves all comments, indentations, whitespace and internal element ordering,
10500and makes them accessible and editable via an intuitive API. It can also
10501create new TOML documents from scratch using the provided helpers. Part of the
10502implementation as been adapted, improved and fixed from Molten.")
10503 (license license:expat)))
10504
0bb32201
TLC
10505(define-public python-shellingham
10506 (package
10507 (name "python-shellingham")
10508 (version "1.3.1")
10509 (source
10510 (origin
10511 (method url-fetch)
10512 (uri (pypi-uri "shellingham" version))
10513 (sha256
10514 (base32
10515 "1q7kws7w4x2hji3g7y0ni9ddk4sd676ylrb3db54gbpys6xj6nwq"))))
10516 (build-system python-build-system)
10517 (home-page
10518 "https://github.com/sarugaku/shellingham")
10519 (synopsis "Tool to detect surrounding shell")
10520 (description
10521 "Shellingham detects what shell the current Python executable is
10522running in.")
10523 (license license:isc)))
10524
aee92957
TLC
10525(define-public python-memcached
10526 (package
10527 (name "python-memcached")
10528 (version "1.59")
10529 (source
10530 (origin
10531 (method url-fetch)
10532 (uri (pypi-uri "python-memcached" version))
10533 (sha256
10534 (base32
10535 "0kvyapavbirk2x3n1jx4yb9nyigrj1s3x15nm3qhpvhkpqvqdqm2"))))
10536 (build-system python-build-system)
10537 (propagated-inputs `(("python-six" ,python-six)))
10538 (home-page
10539 "https://github.com/linsomniac/python-memcached")
10540 (synopsis "Pure python memcached client")
10541 (description
10542 "This software is a pure Python interface to the memcached memory cache
10543daemon. It is the client side software which allows storing values in one or
10544more, possibly remote, memcached servers.")
10545 (license license:psfl)))
10546
b2ac2508
TLC
10547(define-public python-clikit
10548 (package
10549 (name "python-clikit")
10550 (version "0.2.4")
10551 (source
10552 (origin
10553 (method url-fetch)
10554 (uri (pypi-uri "clikit" version))
10555 (sha256
10556 (base32
10557 "0dc8czib5f4j9px1ivcpqnmivnx2zjpc0xb00ldrhsqylks7r06n"))))
10558 (build-system python-build-system)
10559 (propagated-inputs
10560 `(("python-pastel" ,python-pastel)
10561 ("python-pylev" ,python-pylev)))
10562 (home-page "https://github.com/sdispater/clikit")
10563 (synopsis "Group of utilities to build command line interfaces")
10564 (description
10565 "CliKit is a group of utilities to build testable command line
10566interfaces.")
10567 (license license:expat)))
10568
c6f008d6
TLC
10569(define-public python-msgpack-python
10570 (package
10571 (name "python-msgpack-python")
10572 (version "0.5.6")
10573 (source
10574 (origin
10575 (method url-fetch)
10576 (uri (pypi-uri "msgpack-python" version))
10577 (sha256
10578 (base32
10579 "16wh8qgybmfh4pjp8vfv78mdlkxfmcasg78lzlnm6nslsfkci31p"))))
10580 (build-system python-build-system)
10581 (home-page "http://msgpack.org/")
10582 (synopsis "Package to deserialize messages in MessagePack binary format")
10583 (description
10584 "MessagePack is an efficient binary serialization format. It lets you
10585exchange data among multiple languages like JSON. But it's faster and
10586smaller. Small integers are encoded into a single byte, and typical short
10587strings require only one extra byte in addition to the strings themselves.")
10588 (license license:asl2.0)))
10589
badc1c63
TLC
10590(define-public python-cachy
10591 (package
10592 (name "python-cachy")
10593 (version "0.2.0")
10594 (source
10595 (origin
10596 (method url-fetch)
10597 (uri (pypi-uri "cachy" version))
10598 (sha256
10599 (base32
10600 "0v6mjyhgx6j7ya20bk69cr3gdzdkdf6psay0h090rscclgji65dp"))))
10601 (build-system python-build-system)
10602 (native-inputs
10603 `(("python-fakeredis" ,python-fakeredis)
10604 ("python-flexmock" ,python-flexmock)
10605 ("python-pytest" ,python-pytest)))
10606 (propagated-inputs
10607 `(("python-memcached" ,python-memcached)
10608 ("python-msgpack-python" ,python-msgpack-python)
10609 ("python-redis" ,python-redis)))
10610 (home-page "https://github.com/sdispater/cachy")
10611 (synopsis "Simple yet effective caching library")
10612 (description
10613 "Cachy provides a simple yet effective caching library. A simple but
10614powerful API: thread-safety; decorator syntax; support for memcached, redis,
10615database, file, dict stores. Cachy supports python versions 2.7+ and 3.2+.")
10616 (license license:expat)))
10617
617bb67b
TLC
10618(define-public poetry
10619 (package
10620 (name "poetry")
10621 (version "0.12.17")
10622 ;; Poetry can only be built from source with poetry.
10623 (source
10624 (origin
10625 (method url-fetch)
10626 (uri (pypi-uri "poetry" version))
10627 (sha256
10628 (base32
10629 "0gxwcd65qjmzqzppf53x51sic1rbcd9py6cdzx3aprppipimslvf"))))
10630 (build-system python-build-system)
10631 (arguments
10632 `(#:tests? #f ;; Pypi does not have tests.
10633 #:phases
10634 (modify-phases %standard-phases
10635 (replace 'build
10636 (lambda _
10637 ;; Bug in poetry https://github.com/sdispater/poetry/issues/866.
10638 (invoke "sed" "-i" "-e" "s/from distutils.core/from setuptools/"
10639 "setup.py")
10640 #t)))))
10641 (propagated-inputs
10642 `(("python-cachecontrol" ,python-cachecontrol)
10643 ("python-cachy" ,python-cachy)
10644 ("python-cleo" ,python-cleo)
10645 ("python-glob2" ,python-glob2)
10646 ("python-html5lib" ,python-html5lib)
10647 ("python-jsonschema" ,python-jsonschema)
10648 ("python-msgpack" ,python-msgpack)
617bb67b
TLC
10649 ("python-pkginfo" ,python-pkginfo)
10650 ("python-pyparsing" ,python-pyparsing)
10651 ("python-pyrsistent" ,python-pyrsistent)
10652 ("python-requests" ,python-requests)
10653 ("python-requests-toolbelt" ,python-requests-toolbelt)
10654 ("python-shellingham" ,python-shellingham)
10655 ("python-tomlkit" ,python-tomlkit)
10656 ("python-virtualenv" ,python-virtualenv)))
10657 (home-page "https://poetry.eustace.io/")
10658 (synopsis "Python dependency management and packaging made easy")
10659 (description "Poetry is a tool for dependency management and packaging
10660in Python. It allows you to declare the libraries your project depends on and
10661it will manage (install/update) them for you.")
10662 (license license:expat)))
10663
44d10b1f
RW
10664(define-public python-lazy-object-proxy
10665 (package
10666 (name "python-lazy-object-proxy")
7454078a 10667 (version "1.4.3")
44d10b1f
RW
10668 (source (origin
10669 (method url-fetch)
10670 (uri (pypi-uri "lazy-object-proxy" version))
10671 (sha256
10672 (base32
7454078a 10673 "1w1aaay424ciz8fz3fkzxb0pxzfxn184f2whpyn4fx72bn50x47k"))))
63d4873b 10674 (native-inputs
1c4746ee 10675 `(("python-setuptools-scm" ,python-setuptools-scm)))
44d10b1f
RW
10676 (build-system python-build-system)
10677 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
10678 (synopsis "Lazy object proxy for python")
10679 (description
10680 "Lazy object proxy is an object that wraps a callable but defers the call
10681until the object is actually required, and caches the result of said call.")
10682 (license license:bsd-2)))
10683
10684(define-public python2-lazy-object-proxy
10685 (package-with-python2 python-lazy-object-proxy))
10686
10687(define-public python-dnspython
10688 (package
10689 (name "python-dnspython")
10690 (version "1.15.0")
10691 (source (origin
10692 (method url-fetch)
10693 (uri (string-append "http://www.dnspython.org/kits/"
10694 version "/dnspython-" version ".tar.gz"))
10695 (sha256
10696 (base32
10697 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
10698 (build-system python-build-system)
10699 (arguments '(#:tests? #f)) ; XXX: requires internet access
10700 (home-page "http://www.dnspython.org")
10701 (synopsis "DNS toolkit for Python")
10702 (description
10703 "dnspython is a DNS toolkit for Python. It supports almost all record
10704types. It can be used for queries, zone transfers, and dynamic updates.
10705It supports TSIG authenticated messages and EDNS0.")
10706 (license license:expat)))
10707
10708(define-public python2-dnspython
10709 (package-with-python2 python-dnspython))
10710
10711(define-public python-email-validator
10712 (package
10713 (name "python-email-validator")
10714 (version "1.0.2")
10715 (source
10716 (origin (method url-fetch)
10717 (uri (pypi-uri "email_validator" version))
10718 (sha256
10719 (base32
10720 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
10721 (build-system python-build-system)
10722 (arguments
10723 '(#:phases
10724 (modify-phases %standard-phases
10725 (add-before 'build 'use-dnspython
10726 (lambda _
10727 (substitute* "setup.py"
10728 (("dnspython3") "dnspython"))
10729 #t)))))
10730 (propagated-inputs
10731 `(("python-dnspython" ,python-dnspython)
10732 ("python-idna" ,python-idna)))
10733 (home-page "https://github.com/JoshData/python-email-validator")
10734 (synopsis "Email address validation library for Python")
10735 (description
10736 "This library validates email address syntax and deliverability.")
10737 (license license:cc0)))
10738
10739(define-public python2-email-validator
10740 (package-with-python2 python-email-validator))
10741
10742(define-public python-ukpostcodeparser
10743 (package
10744 (name "python-ukpostcodeparser")
10745 (version "1.0.3")
10746 (source (origin
10747 (method url-fetch)
10748 (uri (pypi-uri "UkPostcodeParser" version))
10749 (sha256
10750 (base32
10751 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
10752 (build-system python-build-system)
10753 (home-page "https://github.com/hamstah/ukpostcodeparser")
10754 (synopsis "UK Postcode parser for Python")
10755 (description
10756 "This library provides the @code{parse_uk_postcode} function for
10757parsing UK postcodes.")
10758 (license license:expat)))
10759
10760(define-public python2-ukpostcodeparser
10761 (package-with-python2 python-ukpostcodeparser))
10762
10763(define-public python-faker
10764 (package
10765 (name "python-faker")
10766 (version "0.7.9")
10767 (source (origin
10768 (method url-fetch)
10769 (uri (pypi-uri "Faker" version))
10770 (sha256
10771 (base32
10772 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
10773 (patches
10774 (search-patches "python-faker-fix-build-32bit.patch"))
10775 (modules '((guix build utils)))
10776 (snippet
10777 '(begin
10778 (for-each delete-file (find-files "." "\\.pyc$"))
10779 #t))))
10780 (build-system python-build-system)
10781 (arguments
10782 '(#:phases
10783 (modify-phases %standard-phases
10784 (replace 'check
49ff8827 10785 (lambda _ (invoke "python" "-m" "unittest" "-v" "tests"))))))
44d10b1f
RW
10786 (native-inputs
10787 `(;; For testing
10788 ("python-email-validator" ,python-email-validator)
10789 ("python-mock" ,python-mock)
10790 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
10791 (propagated-inputs
10792 `(("python-dateutil" ,python-dateutil)
10793 ("python-six" ,python-six)))
10794 (home-page "https://github.com/joke2k/faker")
10795 (synopsis "Python package that generates fake data")
10796 (description
10797 "Faker is a Python package that generates fake data such as names,
10798addresses, and phone numbers.")
10799 (license license:expat)
10800 (properties `((python2-variant . ,(delay python2-faker))))))
10801
10802(define-public python2-faker
10803 (let ((base (package-with-python2 (strip-python2-variant
10804 python-faker))))
10805 (package
10806 (inherit base)
10807 (propagated-inputs
10808 `(("python2-ipaddress" ,python2-ipaddress)
10809 ,@(package-propagated-inputs base))))))
10810
10811(define-public python-pyaml
10812 (package
10813 (name "python-pyaml")
10814 (version "18.11.0")
10815 (source (origin
10816 (method url-fetch)
10817 (uri (pypi-uri "pyaml" version))
10818 (sha256
10819 (base32
10820 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
10821 (build-system python-build-system)
10822 (native-inputs
10823 `(("python-unidecode" ,python-unidecode)))
10824 (propagated-inputs
10825 `(("python-pyyaml" ,python-pyyaml)))
10826 (home-page "https://github.com/mk-fg/pretty-yaml")
10827 (synopsis "YAML pretty-print library for Python")
10828 (description
10829 "pyaml is a PyYAML based python module to produce pretty and readable
10830YAML-serialized data.")
492e3a7a 10831 (license license:wtfpl2)))
44d10b1f
RW
10832
10833(define-public python2-pyaml
10834 (package-with-python2 python-pyaml))
10835
10836(define-public python-backpack
10837 (package
10838 (name "python-backpack")
10839 (version "0.1")
10840 (source
10841 (origin
10842 (method url-fetch)
10843 (uri (pypi-uri "backpack" version))
10844 (sha256
10845 (base32
10846 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
10847 (build-system python-build-system)
10848 (native-inputs
10849 `(("python-pytest" ,python-pytest)
10850 ("python-nose" ,python-nose)))
10851 (propagated-inputs
10852 `(("python-simplejson" ,python-simplejson)))
10853 (home-page "https://github.com/sdispater/backpack")
10854 (synopsis "Utilities for working with Python collections")
10855 (description "Backpack provides some useful utilities for working with
10856collections of data.")
10857 (license license:expat)))
10858
10859(define-public python2-backpack
10860 (package-with-python2 python-backpack))
10861
10862(define-public python-prompt-toolkit
10863 (package
10864 (name "python-prompt-toolkit")
10865 (version "2.0.7")
10866 (source
10867 (origin
10868 (method url-fetch)
10869 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10870 (sha256
10871 (base32
10872 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
10873 (build-system python-build-system)
10874 (arguments
10875 `(#:phases
10876 (modify-phases %standard-phases
10877 (delete 'check)
10878 (add-after 'install 'post-install-check
10879 (lambda* (#:key inputs outputs #:allow-other-keys)
10880 ;; HOME is needed for the test
10881 ;; "test_pathcompleter_can_expanduser".
10882 (setenv "HOME" "/tmp")
10883 (add-installed-pythonpath inputs outputs)
10884 (invoke "py.test"))))))
10885 (propagated-inputs
10886 `(("python-wcwidth" ,python-wcwidth)
10887 ("python-six" ,python-six)
10888 ("python-pygments" ,python-pygments)))
10889 (native-inputs
10890 `(("python-pytest" ,python-pytest)))
10891 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
10892 (synopsis "Library for building command line interfaces in Python")
10893 (description
10894 "Prompt-Toolkit is a library for building interactive command line
10895interfaces in Python. It's like GNU Readline but it also features syntax
10896highlighting while typing, out-of-the-box multi-line input editing, advanced
10897code completion, incremental search, support for Chinese double-width
10898characters, mouse support, and auto suggestions.")
10899 (license license:bsd-3)))
10900
10901(define-public python2-prompt-toolkit
10902 (package-with-python2 python-prompt-toolkit))
10903
10904(define-public python-prompt-toolkit-1
10905 (package (inherit python-prompt-toolkit)
10906 (version "1.0.15")
10907 (source
10908 (origin
10909 (method url-fetch)
10910 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10911 (sha256
10912 (base32
10913 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
10914
10915(define-public python2-prompt-toolkit-1
10916 (package-with-python2 python-prompt-toolkit-1))
10917
10918(define-public python-jedi
10919 (package
10920 (name "python-jedi")
296e1aea 10921 (version "0.15.1")
44d10b1f
RW
10922 (source
10923 (origin
10924 (method url-fetch)
10925 (uri (pypi-uri "jedi" version))
10926 (sha256
10927 (base32
296e1aea 10928 "0bp4pxhsynaarbvzblsn5x32lzp29svy3sxfy8i6m5iwz9s9r1ds"))))
44d10b1f
RW
10929 (build-system python-build-system)
10930 (arguments
296e1aea 10931 `(#:phases
44d10b1f 10932 (modify-phases %standard-phases
296e1aea
MC
10933 (add-after 'unpack 'disable-file-completion-test
10934 ;; A single parameterized test currently fail (see:
10935 ;; https://github.com/davidhalter/jedi/issues/1395). Remove it.
10936 (lambda _
10937 (substitute* "test/test_api/test_completion.py"
10938 ((".*'example.py', 'rb\"' \\+ join\\('\\.\\.'.*") ""))
10939 #t))
44d10b1f 10940 (replace 'check
296e1aea
MC
10941 (lambda _
10942 (setenv "HOME" "/tmp")
10943 (invoke "python" "-m" "pytest"))))))
44d10b1f
RW
10944 (native-inputs
10945 `(("python-pytest" ,python-pytest)
10946 ("python-docopt" ,python-docopt)))
10947 (propagated-inputs
10948 `(("python-parso" ,python-parso)))
10949 (home-page "https://github.com/davidhalter/jedi")
10950 (synopsis "Autocompletion and static analysis library for Python")
10951 (description
10952 "Jedi is a static analysis tool for Python that can be used in Integrated
10953Development Environments (@dfn{IDE}s) and text editors. It understands Python
10954on a deeper level than many other static analysis frameworks for Python.
10955
10956Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
10957well.")
10958 (license license:expat)))
10959
10960(define-public python2-jedi
296e1aea 10961 (package-with-python2 python-jedi))
44d10b1f
RW
10962
10963(define-public ptpython
10964 (package
10965 (name "ptpython")
10966 (version "0.34")
10967 (source (origin
10968 (method url-fetch)
10969 (uri (pypi-uri "ptpython" version))
10970 (sha256
10971 (base32
10972 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
10973 (build-system python-build-system)
10974 (arguments
10975 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
10976 (propagated-inputs
10977 `(("python-docopt" ,python-docopt)
10978 ("python-jedi" ,python-jedi)
10979 ("python-prompt-toolkit" ,python-prompt-toolkit)
10980 ("python-pygments" ,python-pygments)))
10981 (home-page "https://github.com/jonathanslenders/ptpython")
10982 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
10983 (description
10984 "ptpython is a Python read-eval-print loop with IDE-like features.
10985It supports syntax highlighting, multiline editing, autocompletion, mouse,
10986color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
10987etc.")
10988 (license license:bsd-3)
10989 (properties `((python2-variant . ,(delay ptpython-2))))))
10990
10991(define-public ptpython-2
10992 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
10993 (package
10994 (inherit base)
10995 (name "ptpython2"))))
10996
10997(define-public python-stem
10998 (package
10999 (name "python-stem")
e746d1c3 11000 (version "1.7.1")
44d10b1f
RW
11001 (source
11002 (origin
11003 (method url-fetch)
11004 (uri (pypi-uri "stem" version))
11005 (sha256
11006 (base32
e746d1c3 11007 "18lc95pmc7i089nlsb06dsxyjl5wbhxfqgdxbjcia35ndh8z7sn9"))))
44d10b1f
RW
11008 (build-system python-build-system)
11009 (arguments
11010 `(#:phases
11011 (modify-phases %standard-phases
11012 (replace 'check
11013 (lambda _
11014 (invoke "./run_tests.py" "--unit")
11015 #t)))))
11016 (native-inputs
11017 `(("python-mock" ,python-mock)
11018 ("python-pycodestyle" ,python-pycodestyle)
11019 ("python-pyflakes" ,python-pyflakes)))
11020 (home-page "https://stem.torproject.org/")
11021 (synopsis
11022 "Python controller library that allows applications to interact with Tor")
11023 (description
11024 "Stem is a Python controller library for Tor. With it you can use Tor's
11025control protocol to script against the Tor process and read descriptor data
11026relays publish about themselves.")
11027 (license license:lgpl3)))
11028
11029(define-public python2-stem
11030 (package-with-python2 python-stem))
11031
11032(define-public python-pyserial
11033 (package
11034 (name "python-pyserial")
00d81f98 11035 (version "3.4")
44d10b1f
RW
11036 (source
11037 (origin
11038 (method url-fetch)
11039 (uri (pypi-uri "pyserial" version))
11040 (sha256
11041 (base32
00d81f98 11042 "09y68bczw324a4jb9a1cfwrbjhq179vnfkkkrybbksp0vqgl0bbf"))))
44d10b1f
RW
11043 (build-system python-build-system)
11044 (arguments
11045 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
11046 ;; #:phases
11047 ;; (modify-phases %standard-phases
11048 ;; (replace 'check
11049 ;; (lambda _
11050 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
11051 (home-page
11052 "https://github.com/pyserial/pyserial")
11053 (synopsis "Python Serial Port Bindings")
11054 (description "@code{pyserial} provide serial port bindings for Python. It
11055supports different byte sizes, stop bits, parity and flow control with RTS/CTS
11056and/or Xon/Xoff. The port is accessed in RAW mode.")
11057 (license license:bsd-3)))
11058
11059(define-public python2-pyserial
11060 (package-with-python2 python-pyserial))
11061
11062(define-public python-kivy
11063 (package
11064 (name "python-kivy")
11065 (version "1.10.1")
11066 (source
11067 (origin
11068 (method url-fetch)
11069 (uri (pypi-uri "Kivy" version))
11070 (file-name (string-append name "-" version ".tar.gz"))
11071 (sha256
11072 (base32
11073 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
11074 (build-system python-build-system)
11075 (arguments
11076 `(#:tests? #f ; Tests require many optional packages
11077 #:phases
11078 (modify-phases %standard-phases
11079 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
11080 (lambda* (#:key inputs #:allow-other-keys)
11081 (setenv "KIVY_SDL2_PATH"
11082 (string-append (assoc-ref inputs "sdl-union")
11083 "/include/SDL2"))
11084 #t)))))
11085 (native-inputs
11086 `(("git" ,git)
11087 ("pkg-config" ,pkg-config)
11088 ("python-cython" ,python-cython)))
11089 (inputs
11090 `(("gstreamer" ,gstreamer)
11091 ("mesa" ,mesa)
11092 ("sdl-union"
11093 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
11094 (home-page "http://kivy.org")
11095 (synopsis
11096 "Multitouch application framework")
11097 (description
11098 "A software library for rapid development of
11099hardware-accelerated multitouch applications.")
11100 (license license:expat)))
11101
11102(define-public python2-kivy
11103 (package-with-python2 python-kivy))
11104
11105(define-public python-kivy-next
11106 (deprecated-package "python-kivy-next" python-kivy))
11107
11108(define-public python2-kivy-next
11109 (deprecated-package "python2-kivy-next" python2-kivy))
11110
11111(define-public python-binaryornot
11112 (package
11113 (name "python-binaryornot")
11114 (version "0.4.4")
11115 (source (origin
11116 (method url-fetch)
11117 (uri (pypi-uri "binaryornot" version))
11118 (sha256
11119 (base32
11120 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
11121 (build-system python-build-system)
86723f98
DM
11122 (arguments
11123 `(#:phases
11124 (modify-phases %standard-phases
ee623903 11125 (add-after 'unpack 'patch-tests
86723f98
DM
11126 (lambda _
11127 ;; TypeError: binary() got an unexpected keyword argument
11128 ;; 'average_size'.
11129 (substitute* "tests/test_check.py"
11130 (("average_size=512") ""))
11131 #t)))))
44d10b1f
RW
11132 (propagated-inputs
11133 `(("python-chardet" ,python-chardet)
11134 ("python-hypothesis" ,python-hypothesis)))
11135 (home-page "https://github.com/audreyr/binaryornot")
11136 (synopsis "Package to check if a file is binary or text")
11137 (description "Ultra-lightweight pure Python package to check if a file is
11138binary or text.")
11139 (license license:bsd-3)
11140 (properties `((python2-variant . ,(delay python2-binaryornot))))))
11141
11142(define-public python2-binaryornot
11143 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
11144 (package (inherit base)
11145 (propagated-inputs
11146 `(("python2-enum34" ,python2-enum34)
11147 ,@(package-propagated-inputs base))))))
11148
f315673d
VC
11149(define-public python-binwalk
11150 (let ((commit "64201acfb5b0a9cdd9faa58c40a36dcff8612e29")
11151 (revision "0"))
11152 (package
11153 (name "python-binwalk")
11154 (version (git-version "2.1.1" revision commit))
11155 (source
11156 (origin
11157 (method git-fetch)
11158 (uri (git-reference
11159 (url "https://github.com/ReFirmLabs/binwalk")
11160 (commit commit)))
11161 (file-name (git-file-name name version))
11162 (sha256
11163 (base32
11164 "1z7ca6rfp887hw5jc3sb45mm4fa0xid4lsp2z8g4r590dr7k7w15"))))
11165 (build-system python-build-system)
11166 (arguments
11167 `(#:phases
11168 (modify-phases %standard-phases
11169 (add-before 'check 'set-pythonpath
11170 (lambda _
11171 (setenv "PYTHONPATH"
11172 (string-append
11173 (getcwd) "/src/"
11174 ":" (getenv "PYTHONPATH")))
11175 (setenv "HOME" "")
11176 #t)))))
11177 (native-inputs
11178 `(("python-coverage" ,python-coverage)
11179 ("python-nose" ,python-nose)))
11180 (home-page "https://github.com/ReFirmLabs/binwalk")
11181 (synopsis "Firmware analysis tool")
11182 (description "Binwalk is a tool for analyzing, reverse engineering, and extracting firmware images")
11183 (license license:expat))))
11184
44d10b1f
RW
11185(define-public python-nltk
11186 (package
11187 (name "python-nltk")
11188 (version "3.2.1")
11189 (source (origin
11190 (method url-fetch)
11191 (uri (pypi-uri "nltk" version))
11192 (sha256
11193 (base32
11194 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
11195 (build-system python-build-system)
11196 (arguments
11197 '(;; The tests require some extra resources to be downloaded.
11198 ;; TODO Try packaging these resources.
11199 #:tests? #f))
11200 (home-page "http://nltk.org/")
11201 (synopsis "Natural Language Toolkit")
11202 (description "It provides interfaces to over 50 corpora and lexical
11203resources such as WordNet, along with a suite of text processing libraries
11204for classification, tokenization, stemming, tagging, parsing, and semantic
11205reasoning, wrappers for natural language processing libraries.")
11206 (license license:asl2.0)))
11207
11208(define-public python2-nltk
11209 (package-with-python2 python-nltk))
11210
11211(define-public python-pymongo
11212 (package
11213 (name "python-pymongo")
11214 (version "3.7.2")
11215 (source (origin
11216 (method url-fetch)
11217 (uri (pypi-uri "pymongo" version))
11218 (sha256
11219 (base32
11220 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
11221 (build-system python-build-system)
11222 (propagated-inputs
11223 `(("python-certifi" ,python-certifi)))
11224 (home-page "https://github.com/mongodb/mongo-python-driver")
11225 (synopsis "Python driver for MongoDB")
11226 (description "Python driver for MongoDB.")
11227 (license license:asl2.0)))
11228
11229(define-public python2-pymongo
11230 (package-with-python2 python-pymongo))
11231
44d10b1f
RW
11232(define-public python-consul
11233 (package
11234 (name "python-consul")
11235 (version "0.6.1")
11236 (source
11237 (origin
11238 (method url-fetch)
11239 (uri (pypi-uri "python-consul" version))
11240 (sha256
11241 (base32
11242 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
11243 (build-system python-build-system)
11244 (arguments
11245 '(#:tests? #f)) ; The tests are not distributed
11246 (propagated-inputs
11247 `(("python-requests" ,python-requests)
11248 ("python-six" ,python-six)))
11249 (home-page "https://github.com/cablehead/python-consul")
11250 (synopsis "Python client for Consul")
11251 (description
11252 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
11253discovery, monitoring and configuration.")
11254 (license license:expat)))
11255
11256(define-public python2-consul
11257 (package-with-python2 python-consul))
11258
11259(define-public python-schematics
11260 (package
11261 (name "python-schematics")
11262 (version "1.1.1")
11263 (source
1961d187
TGR
11264 (origin
11265 (method git-fetch)
11266 (uri (git-reference
11267 (url "https://github.com/schematics/schematics.git")
11268 (commit (string-append "v" version))))
11269 (file-name (git-file-name name version))
11270 (sha256
11271 (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd"))))
44d10b1f
RW
11272 (build-system python-build-system)
11273 (propagated-inputs
11274 `(("python-six" ,python-six)))
11275 (arguments
1961d187
TGR
11276 ;; The tests require a bunch of not very nice packages with fixed
11277 ;; version requirements (e.g. python-coveralls).
11278 `(#:tests? #f))
44d10b1f
RW
11279 (home-page "https://github.com/schematics/schematics")
11280 (synopsis "Python Data Structures for Humans")
11281 (description "Python Data Structures for Humans.")
11282 (license license:bsd-3)))
11283
11284(define-public python2-schematics
11285 (package-with-python2 python-schematics))
11286
11287(define-public python-odfpy
11288 (package
11289 (name "python-odfpy")
11290 (version "1.3.3")
11291 (source (origin
11292 (method url-fetch)
11293 (uri (pypi-uri "odfpy" version))
11294 (sha256
11295 (base32
11296 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
11297 (arguments
11298 `(#:modules ((srfi srfi-1)
11299 (guix build python-build-system)
11300 (guix build utils))
11301 #:phases
11302 (modify-phases %standard-phases
11303 (replace 'check
11304 ;; The test runner invokes python2 and python3 for test*.py.
11305 ;; To avoid having both in inputs, we replicate it here.
11306 (lambda _
21ccc01d
RW
11307 (for-each (lambda (test-file) (invoke "python" test-file))
11308 (find-files "tests" "^test.*\\.py$"))
11309 #t)))))
44d10b1f
RW
11310 (build-system python-build-system)
11311 (home-page "https://github.com/eea/odfpy")
11312 (synopsis "Python API and tools to manipulate OpenDocument files")
11313 (description "Collection of libraries and utility programs written in
11314Python to manipulate OpenDocument 1.2 files.")
11315 (license
11316 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
11317 ;; number of files with other licenses.
11318 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
11319
11320(define-public python2-odfpy
11321 (package-with-python2 python-odfpy))
11322
11323(define-public python-natsort
11324 (package
11325 (name "python-natsort")
11326 (version "5.4.1")
11327 (source (origin
11328 (method url-fetch)
11329 (uri (pypi-uri "natsort" version))
11330 (sha256
11331 (base32
11332 "0i732amg6yzkx4g4c9j09jmqq39q377x9cl2nbkm5hax2c2v0wxf"))))
11333 (build-system python-build-system)
11334 (arguments
11335 `(#:modules ((guix build utils)
11336 (guix build python-build-system)
11337 (srfi srfi-1)
11338 (srfi srfi-26)
11339 (ice-9 ftw))
11340 #:phases
11341 (modify-phases %standard-phases
11342 (add-before 'check 'set-cachedir
11343 ;; Tests require write access to $HOME by default
11344 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
11345 (replace 'check
11346 (lambda _
11347 (let ((cwd (getcwd)))
11348 (setenv "PYTHONPATH"
11349 (string-append
11350 cwd "/build/"
11351 (find (cut string-prefix? "lib" <>)
11352 (scandir (string-append cwd "/build")))
11353 ":"
11354 (getenv "PYTHONPATH")))
11355 (invoke "pytest" "-v")))))))
11356 (native-inputs
11357 `(("python-hypothesis" ,python-hypothesis)
11358 ("python-pytest-cov" ,python-pytest-cov)
11359 ("python-pytest-mock" ,python-pytest-mock)
11360 ("python-pytest" ,python-pytest)))
11361 (propagated-inputs ; TODO: Add python-fastnumbers.
11362 `(("python-pyicu" ,python-pyicu)))
11363 (home-page "https://github.com/SethMMorton/natsort")
11364 (synopsis "Natural sorting for python and shell")
11365 (description
11366 "Natsort lets you apply natural sorting on lists instead of
11367lexicographical. If you use the built-in @code{sorted} method in python
36a4366d
EF
11368on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4},
11369@code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20},
11370@code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that
11371identifies numbers and sorts them separately from strings. It can also sort
11372version numbers, real numbers, mixed types and more, and comes with a shell
11373command @command{natsort} that exposes this functionality in the command line.")
44d10b1f
RW
11374 (license license:expat)
11375 (properties `((python2-variant . ,(delay python2-natsort))))))
11376
11377(define-public python2-natsort
11378 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
11379 (package (inherit base)
11380 (native-inputs
11381 `(("python2-pathlib" ,python2-pathlib)
11382 ,@(package-native-inputs base))))))
11383
11384(define-public python-glances
11385 (package
11386 (name "python-glances")
a4ac25df 11387 (version "3.1.2")
44d10b1f
RW
11388 (source
11389 (origin
11390 (method url-fetch)
11391 (uri (pypi-uri "Glances" version))
11392 (sha256
a4ac25df 11393 (base32 "15384pbvw9wj4sb8zgvd9v1812vrypbyjg0acicjf1hdb3p30fkk"))
15b4c911
TGR
11394 (modules '((guix build utils)))
11395 (snippet
11396 '(begin
11397 ;; Glances phones PyPI for weekly update checks by default.
11398 ;; Disable these. The user can re-enable them if desired.
11399 (substitute* "glances/outdated.py"
11400 (("^(.*)self\\.load_config\\(config\\)\n" line indentation)
11401 (string-append indentation
11402 "self.args.disable_check_update = True\n"
11403 line)))
11404 #t))))
44d10b1f
RW
11405 (build-system python-build-system)
11406 (propagated-inputs
9898a2d3
TGR
11407 `(("python-future" ,python-future)
11408 ("python-psutil" ,python-psutil)))
a4ac25df 11409 (home-page "https://github.com/nicolargo/glances")
bab94ffa 11410 (synopsis "Cross-platform curses-based monitoring tool")
44d10b1f
RW
11411 (description
11412 "Glances is a curses-based monitoring tool for a wide variety of platforms.
bab94ffa
TGR
11413Glances uses the PsUtil library to get information from your system. It
11414monitors CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
44d10b1f
RW
11415 (license license:lgpl3+)))
11416
11417(define-public python2-glances
11418 (package-with-python2 python-glances))
11419
11420(define-public python-graphql-core
11421 (package
11422 (name "python-graphql-core")
11423 (version "0.5.3")
11424 (source
11425 (origin
11426 (method url-fetch)
11427 (uri (pypi-uri "graphql-core" version))
11428 (sha256
11429 (base32
11430 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
11431 (build-system python-build-system)
11432 (arguments
11433 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
11434 #:phases
11435 (modify-phases %standard-phases
11436 (add-after 'unpack 'patch-hardcoded-version
11437 (lambda _ (substitute*
11438 "setup.py"
11439 (("'gevent==1.1rc1'") "'gevent'"))
11440 #t)))))
11441 (native-inputs
11442 `(("python-gevent" ,python-gevent)
11443 ("python-mock" ,python-mock)
11444 ("python-pytest-mock" ,python-pytest-mock)))
11445 (propagated-inputs
11446 `(("python-promise" ,python-promise)
11447 ("python-six" ,python-six)))
11448 (home-page "https://github.com/graphql-python/graphql-core")
11449 (synopsis "GraphQL implementation for Python")
11450 (description
11451 "GraphQL implementation for Python. GraphQL is a data query language and
11452runtime designed and used to request and deliver data to mobile and web apps.
11453This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
11454to Python.")
11455 (license license:expat)))
11456
11457(define-public python2-graphql-core
11458 (package-with-python2 python-graphql-core))
11459
11460(define-public python-graphql-relay
11461 (package
11462 (name "python-graphql-relay")
11463 (version "0.4.5")
11464 (source
11465 (origin
11466 (method url-fetch)
11467 (uri (pypi-uri "graphql-relay" version))
11468 (sha256
11469 (base32
11470 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
11471 (build-system python-build-system)
11472 (arguments
11473 '(#:tests? #f)) ; The tests are not distributed
11474 (propagated-inputs
11475 `(("python-graphql-core" ,python-graphql-core)
11476 ("python-promise" ,python-promise)
11477 ("python-six" ,python-six)))
11478 (home-page "https://github.com/graphql-python/graphql-relay-py")
11479 (synopsis "Relay implementation for Python")
11480 (description
11481 "This is a library to allow the easy creation of Relay-compliant servers
11482using the GraphQL Python reference implementation of a GraphQL server. It
11483should be noted that the code is a exact port of the original
11484@url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
11485from Facebook.")
11486 (license license:expat)))
11487
11488(define-public python2-graphql-relay
11489 (package-with-python2 python-graphql-relay))
11490
11491(define-public python-graphene
11492 (package
11493 (name "python-graphene")
11494 (version "0.10.2")
11495 (source
11496 (origin
11497 (method url-fetch)
11498 (uri (pypi-uri "graphene" version))
11499 (sha256
11500 (base32
11501 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
11502 (build-system python-build-system)
11503 (propagated-inputs
11504 `(("python-graphql-core" ,python-graphql-core)
11505 ("python-graphql-relay" ,python-graphql-relay)
11506 ("python-iso8601" ,python-iso8601)
11507 ("python-promise" ,python-promise)
11508 ("python-six" ,python-six)))
11509 (arguments
11510 `(#:tests? #f)) ; no tests/ in the PyPI tarball
11511 (home-page "http://graphene-python.org/")
11512 (synopsis "GraphQL Framework for Python")
11513 (description
11514 "Graphene is a Python library for building GraphQL schemas/types.
11515A GraphQL schema describes your data model, and provides a GraphQL server
11516with an associated set of resolve methods that know how to fetch data.")
11517 (properties `((python2-variant . ,(delay python2-graphene))))
11518 (license license:expat)))
11519
11520(define-public python2-graphene
11521 (let ((base (package-with-python2
11522 (strip-python2-variant python-graphene))))
11523 (package (inherit base)
11524 (native-inputs
11525 `(("python2-sqlalchemy" ,python2-sqlalchemy)
11526 ,@(package-native-inputs base))))))
11527
11528(define-public python-nautilus
11529 (package
11530 (name "python-nautilus")
11531 (version "0.4.9")
11532 (source
11533 (origin
11534 (method url-fetch)
11535 (uri (pypi-uri "nautilus" version))
11536 (sha256
11537 (base32
11538 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
11539 (build-system python-build-system)
11540 (arguments `(#:tests? #f)) ; fails to import test modules
11541 (propagated-inputs
11542 `(("python-bcrypt" ,python-bcrypt)
11543 ("python-click" ,python-click)
11544 ("python-consul" ,python-consul)
11545 ("python-graphene" ,python-graphene)
11546 ("python-jinja2" ,python-jinja2)
11547 ("python-peewee" ,python-peewee)
11548 ("python-pika" ,python-pika)
11549 ("python-tornado" ,python-tornado)
11550 ("python-wtforms" ,python-wtforms)))
11551 (native-inputs
11552 `(("python-nose2" ,python-nose2)))
11553 (home-page "https://github.com/AlecAivazis/nautilus")
11554 (synopsis "Library for creating microservice applications")
11555 (description
11556 "Nautilus is a framework for flux based microservices that looks to
11557provide extendible implementations of common aspects of a cloud so that you can
11558focus on building massively scalable web applications.")
11559 (license license:expat)))
11560
11561(define-public python-snowballstemmer
11562 (package
11563 (name "python-snowballstemmer")
11564 (version "1.2.1")
11565 (source (origin
11566 (method url-fetch)
11567 (uri (pypi-uri "snowballstemmer" version))
11568 (sha256
11569 (base32
11570 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
11571 (build-system python-build-system)
11572 (arguments
11573 `(;; No tests exist
11574 #:tests? #f))
11575 (home-page "https://github.com/shibukawa/snowball_py")
11576 (synopsis "Snowball stemming library collection for Python")
11577 (description "This package provides 16 word stemmer algorithms generated
11578from Snowball algorithms. It includes the 15 original ones plus the Poerter
11579English stemmer.")
11580 (license license:bsd-3)))
11581
11582(define-public python2-snowballstemmer
11583 (package-with-python2 python-snowballstemmer))
11584
44d10b1f
RW
11585(define-public python-setproctitle
11586(package
11587 (name "python-setproctitle")
11588 (version "1.1.10")
11589 (source
11590 (origin
11591 (method url-fetch)
11592 (uri (pypi-uri "setproctitle" version))
11593 (sha256
11594 (base32
11595 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
11596 (build-system python-build-system)
11597 (arguments
11598 '(#:phases
11599 (modify-phases %standard-phases
11600 (add-before 'check 'patch-Makefile
11601 ;; Stricly this is only required for the python2 variant.
11602 ;; But adding a phase in an inherited package seems to be
11603 ;; cumbersum. So we patch even for python3.
11604 (lambda _
11605 (let ((nose (assoc-ref %build-inputs "python2-nose")))
11606 (when nose
11607 (substitute* "Makefile"
11608 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
11609 (string-append nose "/bin/nosetests "))))
11610 #t)))
11611 (replace 'check
11612 (lambda _
11613 (setenv "PYTHON" (or (which "python3") (which "python")))
11614 (setenv "PYCONFIG" (or (which "python3-config")
11615 (which "python-config")))
11616 (setenv "CC" "gcc")
11617 ;; No need to extend PYTHONPATH to find the built package, since
11618 ;; the Makefile will build anyway
11619 (invoke "make" "check"))))))
11620 (native-inputs
11621 `(("procps" ,procps))) ; required for tests
11622 (home-page
11623 "https://github.com/dvarrazzo/py-setproctitle")
11624 (synopsis
11625 "Setproctitle implementation for Python to customize the process title")
11626 (description "The library allows a process to change its title (as displayed
11627by system tools such as ps and top).
11628
11629Changing the title is mostly useful in multi-process systems, for
11630example when a master process is forked: changing the children's title
11631allows to identify the task each process is busy with. The technique
11632is used by PostgreSQL and the OpenSSH Server for example.")
11633 (license license:bsd-3)
11634 (properties `((python2-variant . ,(delay python2-setproctitle))))))
11635
11636(define-public python2-setproctitle
11637 (let ((base (package-with-python2
11638 (strip-python2-variant python-setproctitle))))
11639 (package
11640 (inherit base)
11641 (native-inputs `(("python2-nose" ,python2-nose)
11642 ,@(package-native-inputs base))))))
11643
11644(define-public python-validictory
11645 (package
11646 (name "python-validictory")
11647 (version "1.0.1")
11648 (source
11649 (origin
11650 (method url-fetch)
11651 (uri (pypi-uri "validictory" version))
11652 (sha256
11653 (base32
11654 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
11655 (build-system python-build-system)
11656 (arguments
11657 '(#:phases
11658 (modify-phases %standard-phases
11659 (add-after 'unpack 'bootstrap
11660 ;; Move the tests out of the package directory to avoid
11661 ;; packaging them.
11662 (lambda* _
11663 (rename-file "validictory/tests" "tests")
11664 (delete-file "tests/__init__.py")))
11665 (replace 'check
11666 (lambda _
11667 ;; Extend PYTHONPATH so the built package will be found.
11668 (setenv "PYTHONPATH"
11669 (string-append (getcwd) "/build/lib:"
11670 (getenv "PYTHONPATH")))
6568bd5d 11671 (invoke "py.test" "-vv" ))))))
44d10b1f
RW
11672 (native-inputs
11673 `(("python-pytest" ,python-pytest)))
11674 (home-page
11675 "https://github.com/jamesturk/validictory")
11676 (synopsis "General purpose Python data validator")
11677 (description "It allows validation of arbitrary Python data structures.
11678
11679The schema format is based on the JSON Schema
11680proposal (http://json-schema.org), so combined with json the library is also
11681useful as a validator for JSON data.")
11682 (license license:expat)))
11683
11684(define-public python2-validictory
11685 (package-with-python2 python-validictory))
11686
11687(define-public python-pyelftools
11688 (package
11689 (name "python-pyelftools")
11690 (version "0.25")
11691 (source
11692 (origin
11693 (method url-fetch)
11694 (uri (pypi-uri "pyelftools" version))
11695 (sha256
11696 (base32
11697 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
11698 (build-system python-build-system)
11699 (arguments
11700 `(#:phases
11701 (modify-phases %standard-phases
11702 (add-before 'check 'set-pythonpath
11703 (lambda _
11704 (setenv "PYTHONPATH"
11705 (string-append
11706 (getcwd) "/test/"
11707 ":" (getenv "PYTHONPATH")))
11708 #t)))))
11709 (home-page
11710 "https://github.com/eliben/pyelftools")
11711 (synopsis
11712 "Analyze binary and library file information")
11713 (description "This Python library provides interfaces for parsing and
11714analyzing two binary and library file formats; the Executable and Linking
11715Format (ELF), and debugging information in the Debugging With Attributed
11716Record Format (DWARF).")
11717 (license license:public-domain)))
11718
11719(define-public python-pyev
11720 (package
11721 (name "python-pyev")
11722 (version "0.9.0")
11723 (source
11724 (origin
11725 (method url-fetch)
11726 (uri (pypi-uri "pyev" version))
11727 (sha256
11728 (base32
11729 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
11730 (build-system python-build-system)
11731 (arguments
11732 `(#:tests? #f ; no test suite
11733 #:phases
11734 (modify-phases %standard-phases
11735 (add-after 'unpack 'patch
11736 (lambda* (#:key inputs #:allow-other-keys)
11737 (let ((libev (string-append (assoc-ref inputs "libev")
11738 "/lib/libev.so.4")))
11739 (substitute* "setup.py"
11740 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
11741 (string-append "libev_dll_name = \"" libev "\"")))))))))
11742 (inputs
11743 `(("libev" ,libev)))
11744 (home-page "http://pythonhosted.org/pyev/")
11745 (synopsis "Python libev interface")
11746 (description "Pyev provides a Python interface to libev.")
11747 (license license:gpl3)))
11748
11749(define-public python2-pyev
11750 (package-with-python2 python-pyev))
11751
11752(define-public python-imagesize
11753 (package
11754 (name "python-imagesize")
11755 (version "1.1.0")
11756 (source
11757 (origin
11758 (method url-fetch)
11759 (uri (pypi-uri "imagesize" version))
11760 (sha256
11761 (base32
11762 "1dg3wn7qpwmhgqc0r9na2ding1wif9q5spz3j9zn2riwphc2k0zk"))))
11763 (build-system python-build-system)
11764 (home-page "https://github.com/shibukawa/imagesize_py")
11765 (synopsis "Gets image size of files in various formats in Python")
11766 (description
11767 "This package allows determination of image size from
11768PNG, JPEG, JPEG2000 and GIF files in pure Python.")
11769 (license license:expat)))
11770
11771(define-public python2-imagesize
11772 (package-with-python2 python-imagesize))
11773
11774(define-public python-termstyle
11775 (package
11776 (name "python-termstyle")
11777 (version "0.1.11")
11778 (source
11779 (origin
11780 (method url-fetch)
11781 (uri (pypi-uri "termstyle" version))
11782 (sha256
11783 (base32
11784 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
11785 (build-system python-build-system)
11786 (arguments
11787 '(#:phases
11788 (modify-phases %standard-phases
11789 (replace 'check
11790 (lambda _
831080a6 11791 (invoke "python" "test3.py"))))))
44d10b1f
RW
11792 (home-page "https://github.com/gfxmonk/termstyle")
11793 (synopsis "Console text coloring for Python")
11794 (description "This package provides console text coloring for Python.")
11795 (license license:bsd-3)))
11796
11797(define-public python-argcomplete
11798 (package
11799 (name "python-argcomplete")
98aecd3a 11800 (version "1.10.3")
44d10b1f 11801 (source
98aecd3a
RW
11802 (origin
11803 (method url-fetch)
11804 (uri (pypi-uri "argcomplete" version))
11805 (sha256
11806 (base32
11807 "02jkc44drb0yjz6x28lvg6rj607n8r2irdpdvyylm8xnycn54zx3"))))
44d10b1f 11808 (build-system python-build-system)
98aecd3a
RW
11809 (arguments
11810 `(#:phases
11811 (modify-phases %standard-phases
11812 (add-after 'unpack 'embed-tool-references
11813 (lambda _
11814 (substitute* "argcomplete/bash_completion.d/python-argcomplete.sh"
11815 ((" grep")
11816 (string-append " " (which "grep")))
11817 ((" egrep")
11818 (string-append " " (which "egrep")))
11819 (("elif which")
11820 (string-append "elif " (which "which")))
11821 (("\\$\\(which")
11822 (string-append "$(" (which "which"))))
11823 #t)))))
11824 (inputs
11825 `(("grep" ,grep)
11826 ("which" ,which)))
44d10b1f 11827 (native-inputs
98aecd3a
RW
11828 `(("python-coverage" ,python-coverage)
11829 ("python-flake8" ,python-flake8)
11830 ("python-pexpect" ,python-pexpect)
11831 ("python-wheel" ,python-wheel)
44d10b1f 11832 ("tcsh" ,tcsh)
98aecd3a
RW
11833 ("fish" ,fish)
11834 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
44d10b1f
RW
11835 (home-page "https://github.com/kislyuk/argcomplete")
11836 (synopsis "Shell tab completion for Python argparse")
11837 (description "argcomplete provides extensible command line tab completion
11838of arguments and options for Python scripts using @code{argparse}. It's
11839particularly useful for programs with many options or sub-parsers that can
11840dynamically suggest completions; for example, when browsing resources over the
11841network.")
11842 (license license:asl2.0)))
11843
11844(define-public python2-argcomplete
11845 (package-with-python2 python-argcomplete))
11846
11847(define-public python-xopen
11848 (package
11849 (name "python-xopen")
24d64989 11850 (version "0.5.0")
44d10b1f
RW
11851 (source
11852 (origin
11853 (method url-fetch)
11854 (uri (pypi-uri "xopen" version))
11855 (sha256
11856 (base32
24d64989 11857 "17xbrgi23l87yg6h0qcknssp2q812miiy33qw6v45v5gx0jwv5xh"))))
44d10b1f 11858 (build-system python-build-system)
24d64989
RW
11859 (propagated-inputs
11860 `(("python-setuptools-scm" ,python-setuptools-scm)))
44d10b1f
RW
11861 (home-page "https://github.com/marcelm/xopen/")
11862 (synopsis "Open compressed files transparently")
11863 (description "This module provides an @code{xopen} function that works like
11864Python's built-in @code{open} function, but can also deal with compressed files.
11865Supported compression formats are gzip, bzip2 and, xz, and are automatically
11866recognized by their file extensions. The focus is on being as efficient as
11867possible on all supported Python versions.")
11868 (license license:expat)))
11869
11870(define-public python2-xopen
11871 (let ((base (package-with-python2
11872 (strip-python2-variant python-xopen))))
11873 (package
11874 (inherit base)
11875 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
11876 ,@(package-propagated-inputs base))))))
11877
11878(define-public python-cheetah
11879 (package
11880 (name "python-cheetah")
11881 (version "3.1.0")
11882 (source
11883 (origin
11884 (method url-fetch)
11885 (uri (pypi-uri "Cheetah3" version))
11886 (sha256
11887 (base32
11888 "1ihag9cxll6b86fc8v5lkhmr3brdbi4yiz16zpgw79yylmv8fgr9"))))
11889 (build-system python-build-system)
11890 (arguments
11891 `(#:modules ((guix build utils)
11892 (guix build python-build-system)
11893 (ice-9 ftw)
11894 (srfi srfi-1)
11895 (srfi srfi-26))
11896 #:phases (modify-phases %standard-phases
11897 (add-after 'unpack 'use-absolute-python
11898 (lambda _
11899 (substitute* "Cheetah/CheetahWrapper.py"
11900 (("#!/usr/bin/env python")
11901 (string-append "#!" (which "python"))))
11902 #t))
11903 (replace 'check
11904 (lambda _
11905 (let ((cwd (getcwd)))
11906 (setenv "PYTHONPATH"
11907 (string-append
11908 cwd "/build/"
11909 (find (cut string-prefix? "lib" <>)
11910 (scandir (string-append cwd "/build")))
11911 ":" (getenv "PYTHONPATH")))
11912 (setenv "PATH"
11913 (string-append (getenv "PATH")
11914 ":" cwd "/bin"))
11915 (setenv "TMPDIR" "/tmp")
11916
11917 (substitute* "Cheetah/Tests/Test.py"
11918 (("unittest.TextTestRunner\\(\\)")
11919 "unittest.TextTestRunner(verbosity=2)"))
11920
11921 (invoke "python" "Cheetah/Tests/Test.py")))))))
11922 (propagated-inputs
11923 `(("python-markdown" ,python-markdown))) ;optional
11924 (home-page "http://cheetahtemplate.org/")
11925 (synopsis "Template engine")
11926 (description "Cheetah is a text-based template engine and Python code
11927generator.
11928
11929Cheetah can be used as a standalone templating utility or referenced as
11930a library from other Python applications. It has many potential uses,
11931but web developers looking for a viable alternative to ASP, JSP, PHP and
11932PSP are expected to be its principle user group.
11933
11934Features:
11935@enumerate
11936@item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
11937 text-based format.
11938@item Cleanly separates content, graphic design, and program code.
11939@item Blends the power and flexibility of Python with a simple template language
11940 that non-programmers can understand.
11941@item Gives template writers full access to any Python data structure, module,
11942 function, object, or method in their templates.
11943@item Makes code reuse easy by providing an object-orientated interface to
11944 templates that is accessible from Python code or other Cheetah templates.
11945 One template can subclass another and selectively reimplement sections of it.
11946@item Provides a simple, yet powerful, caching mechanism that can dramatically
11947 improve the performance of a dynamic website.
11948@item Compiles templates into optimized, yet readable, Python code.
11949@end enumerate")
11950 (license (license:x11-style "file://LICENSE"))))
11951
11952(define-public python2-cheetah
11953 (package-with-python2 python-cheetah))
11954
11955(define-public python-dulwich
11956 (package
11957 (name "python-dulwich")
11958 (version "0.18.6")
11959 (source
11960 (origin
11961 (method url-fetch)
11962 (uri (list (string-append "https://www.dulwich.io/releases/"
11963 "dulwich-" version ".tar.gz")
11964 (pypi-uri "dulwich" version)))
11965 (sha256
11966 (base32
11967 "1aa1xfrxkc3j9s4xi0llhf5gndyi9ryprcxsqfa5fcb8ph34981q"))))
11968 (build-system python-build-system)
11969 (arguments
11970 `(#:phases
11971 (modify-phases %standard-phases
11972 (add-before 'check 'fix-tests
11973 (lambda* (#:key inputs #:allow-other-keys)
11974 ;; The tests use Popen with a custom environment which doesn't
11975 ;; include PATH.
11976 (substitute* "dulwich/tests/compat/utils.py"
11977 (("'git'") (string-append "'"
11978 (which "git")
11979 "'")))
11980 (substitute* '("dulwich/tests/test_repository.py"
11981 "dulwich/tests/test_hooks.py")
11982 (("#!/bin/sh") (string-append "#!" (which "sh"))))
11983 (setenv "TEST_RUNNER" "unittest")
11984 (setenv "PYTHONHASHSEED" "random")
11985 #t)))))
11986 (propagated-inputs
11987 `(("python-fastimport" ,python-fastimport)))
11988 (native-inputs
11989 `(("python-mock" ,python-mock)
11990 ("python-geventhttpclient" ,python-geventhttpclient)
11991 ("git" ,git)))
11992 (home-page "https://www.dulwich.io/")
11993 (synopsis "Git implementation in Python")
11994 (description "Dulwich is an implementation of the Git file formats and
11995protocols written in pure Python.")
11996 ;; Can be used with either license.
11997 (license (list license:asl2.0 license:gpl2+))))
11998
11999(define-public python2-dulwich
12000 (package-with-python2 python-dulwich))
12001
12002(define-public python-pbkdf2
12003 (package
12004 (name "python-pbkdf2")
12005 (version "1.3")
12006 (source
12007 (origin
12008 (method url-fetch)
12009 (uri (pypi-uri "pbkdf2" version))
12010 (sha256
12011 (base32
12012 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
12013 (build-system python-build-system)
12014 (arguments
12015 '(#:phases
12016 (modify-phases %standard-phases
12017 (replace 'check
12018 (lambda _
12019 (setenv "PYTHONPATH"
12020 (string-append (getcwd) "/build/lib:"
12021 (getenv "PYTHONPATH")))
ee2bb944 12022 (invoke "python" "test/test_pbkdf2.py"))))))
44d10b1f
RW
12023 (propagated-inputs
12024 `(("python-pycrypto" ,python-pycrypto))) ; optional
12025 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
12026 (synopsis "Password-based key derivation")
12027 (description "This module implements the password-based key derivation
12028function, PBKDF2, specified in RSA PKCS#5 v2.0.
12029
12030PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
12031is part of the RSA Public Key Cryptography Standards series. The provided
12032implementation takes a password or a passphrase and a salt value (and
12033optionally a iteration count, a digest module, and a MAC module) and provides
12034a file-like object from which an arbitrarly-sized key can be read.")
12035 (license license:expat)))
12036
12037(define-public python2-pbkdf2
12038 (package-with-python2 python-pbkdf2))
12039
12040(define-public python-qrcode
12041 (package
12042 (name "python-qrcode")
217ea1a1 12043 (version "6.1")
44d10b1f
RW
12044 (source
12045 (origin
12046 (method url-fetch)
12047 (uri (pypi-uri "qrcode" version))
12048 (sha256
217ea1a1 12049 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
44d10b1f
RW
12050 (build-system python-build-system)
12051 (arguments
12052 ;; FIXME: Tests require packaging 'pymaging'.
12053 '(#:tests? #f))
12054 (propagated-inputs
12055 `(("python-lxml" ,python-lxml) ; for SVG output
12056 ("python-pillow" ,python-pillow) ; for PNG output
12057 ("python-six" ,python-six)))
44d10b1f
RW
12058 (home-page "https://github.com/lincolnloop/python-qrcode")
12059 (synopsis "QR Code image generator")
12060 (description "This package provides a pure Python QR Code generator
12061module. It uses the Python Imaging Library (PIL) to allow for the generation
12062of QR Codes.
12063
12064In addition this package provides a command line tool to generate QR codes and
12065either write these QR codes to a file or do the output as ascii art at the
12066console.")
12067 (license license:bsd-3)))
12068
12069(define-public python2-qrcode
12070 (package-with-python2 python-qrcode))
12071
12072(define-public python-rst2ansi
12073 (package
12074 (name "python-rst2ansi")
12075 (version "0.1.5")
12076 (source
12077 (origin
12078 (method url-fetch)
12079 (uri (pypi-uri "rst2ansi" version))
12080 (sha256
12081 (base32
12082 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
12083 (build-system python-build-system)
12084 (propagated-inputs
12085 `(("python-docutils" ,python-docutils)))
12086 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
12087 (synopsis "Convert RST to ANSI-decorated console output")
12088 (description
12089 "Python module dedicated to rendering RST (reStructuredText) documents
12090to ansi-escaped strings suitable for display in a terminal.")
12091 (license license:expat)))
12092
12093(define-public python-ansi2html
12094 (package
12095 (name "python-ansi2html")
12096 (version "1.2.0")
12097 (source
12098 (origin
12099 (method url-fetch)
12100 (uri (pypi-uri "ansi2html" version))
12101 (sha256
12102 (base32
12103 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
12104 (build-system python-build-system)
12105 (native-inputs
12106 `(("python-mock" ,python-mock)
12107 ("python-nose" ,python-nose)))
12108 (propagated-inputs
12109 `(("python-six" ,python-six)))
12110 (home-page "https://github.com/ralphbean/ansi2html")
12111 (synopsis "Convert ANSI-decorated console output to HTML")
12112 (description
12113 "@command{ansi2html} is a Python library and command line utility for
12114convering text with ANSI color codes to HTML or LaTeX.")
12115 (license license:gpl3+)))
12116
12117(define-public python2-ansi2html
12118 (package-with-python2 python-ansi2html))
12119
12120(define-public python-ddt
12121 (package
12122 (name "python-ddt")
12123 (version "1.1.3")
12124 (source
12125 (origin
12126 (method url-fetch)
12127 (uri (pypi-uri "ddt" version))
12128 (sha256
12129 (base32
12130 "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk"))))
12131 (build-system python-build-system)
12132 (native-inputs
12133 `(("python-mock" ,python-mock)
12134 ("python-nose" ,python-nose)))
12135 (propagated-inputs
12136 `(("python-six" ,python-six)
12137 ("python-pyyaml" ,python-pyyaml)))
12138 (home-page "https://github.com/txels/ddt")
12139 (synopsis "Data-Driven Tests")
12140 (description
12141 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
12142running it with different test data, and make it appear as multiple test
12143cases.")
12144 (license license:expat)))
12145
12146(define-public python2-ddt
12147 (package-with-python2 python-ddt))
12148
12149(define-public python-pycountry
12150 (package
12151 (name "python-pycountry")
12152 (version "18.5.26")
12153 (source
12154 (origin
12155 (method url-fetch)
12156 (uri (pypi-uri "pycountry" version))
12157 (sha256
12158 (base32
12159 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
12160 (build-system python-build-system)
12161 (home-page "https://bitbucket.org/flyingcircus/pycountry")
12162 (synopsis "ISO databases for languages, countries, currencies, etc.")
12163 (description
12164 "@code{pycountry} provides the ISO databases for the standards:
12165@enumerate
12166@item 639-3 (Languages)
12167@item 3166 (Countries)
12168@item 3166-3 (Deleted Countries)
12169@item 3166-2 (Subdivisions of countries)
12170@item 4217 (Currencies)
12171@item 15924 (Scripts)
12172@end enumerate
12173It includes a copy from Debian’s pkg-isocodes and makes the data accessible
12174through a Python API.")
12175 (license license:lgpl2.1+)))
12176
12177(define-public python2-pycountry
12178 (package-with-python2 python-pycountry))
12179
12180(define-public python-pycosat
12181 (package
12182 (name "python-pycosat")
12183 (version "0.6.1")
12184 (source
12185 (origin
12186 (method url-fetch)
12187 (uri (pypi-uri "pycosat" version))
12188 (sha256
12189 (base32
12190 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
12191 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
12192 (build-system python-build-system)
12193 (home-page "https://github.com/ContinuumIO/pycosat")
12194 (synopsis "Bindings to picosat (a SAT solver)")
12195 (description
12196 "This package provides efficient Python bindings to @code{picosat} on
12197the C level. When importing pycosat, the @code{picosat} solver becomes part
12198of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
12199Problem} (SAT) solver.")
12200 (license license:expat)))
12201
12202(define-public python2-pycosat
12203 (package-with-python2 python-pycosat))
12204
12205(define-public python2-ruamel.ordereddict
12206 (package
12207 (name "python2-ruamel.ordereddict")
12208 (version "0.4.9")
12209 (source
12210 (origin
12211 (method url-fetch)
12212 (uri (pypi-uri "ruamel.ordereddict" version))
12213 (sha256
12214 (base32
12215 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
12216 (build-system python-build-system)
12217 (arguments
12218 `(#:python ,python-2
12219 #:phases
12220 (modify-phases %standard-phases
12221 (delete 'check)
12222 (add-after 'install 'check
12223 (lambda* (#:key inputs outputs #:allow-other-keys)
12224 (add-installed-pythonpath inputs outputs)
f987ac30 12225 (invoke "python" "test/testordereddict.py"))))))
44d10b1f
RW
12226 (home-page "https://bitbucket.org/ruamel/ordereddict")
12227 (synopsis "Version of dict that keeps keys in insertion order")
12228 (description
12229 "This is an implementation of an ordered dictionary with @dfn{Key
12230Insertion Order} (KIO: updates of values do not affect the position of the
12231key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
12232removed and put at the back). The standard library module @code{OrderedDict},
12233implemented later, implements a subset of @code{ordereddict} functionality.
12234Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
12235Order} (KSO, no sorting function can be specified, but a transform can be
12236specified to apply on the key before comparison (e.g. @code{string.lower})).")
12237 (license license:expat)))
12238
12239(define-public python-pypeg2
12240 (package
12241 (name "python-pypeg2")
12242 (version "2.15.2")
12243 (source
12244 (origin
12245 (method url-fetch)
12246 (uri (pypi-uri "pyPEG2" version))
12247 (sha256
12248 (base32
12249 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
12250 (build-system python-build-system)
12251 (propagated-inputs `(("python-lxml" ,python-lxml)))
12252 (arguments
12253 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
12254 '(#:tests? #f))
12255 (home-page "https://fdik.org/pyPEG/")
12256 (synopsis "Parsering Expression Grammars in Python")
12257 (description "PyPEG is an intrinsic parser interpreter framework for
12258Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
12259parse many formal languages.")
12260 (license license:gpl2)))
12261
12262(define-public python-incremental
12263 (package
12264 (name "python-incremental")
12265 (version "17.5.0")
12266 (source
12267 (origin
12268 (method url-fetch)
12269 (uri (pypi-uri "incremental" version))
12270 (sha256
12271 (base32
12272 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
12273 (build-system python-build-system)
12274 (home-page "https://github.com/hawkowl/incremental")
12275 (synopsis "Library for versioning Python projects")
12276 (description "Incremental is a small library that versions your Python
12277projects.")
12278 (license license:expat)))
12279
12280(define-public python2-incremental
12281 (package-with-python2 python-incremental))
12282
12283(define-public python-invoke
12284 (package
12285 (name "python-invoke")
12286 (home-page "http://www.pyinvoke.org/")
a5662319 12287 (version "1.3.0")
44d10b1f
RW
12288 (source (origin
12289 (method url-fetch)
12290 (uri (pypi-uri "invoke" version))
12291 (sha256
12292 (base32
a5662319 12293 "1nn7gad0rvy492acpyhkrp01zsk86acf34qhsvq4xmm6x39788n5"))))
44d10b1f
RW
12294 (build-system python-build-system)
12295 (arguments
12296 ;; XXX: Requires many dependencies that are not yet in Guix.
12297 `(#:tests? #f))
12298 (synopsis "Pythonic task execution")
12299 (description
12300 "Invoke is a Python task execution tool and library, drawing inspiration
12301from various sources to arrive at a powerful and clean feature set. It is
12302evolved from the Fabric project, but focuses on local and abstract concerns
12303instead of servers and network commands.")
12304 (license license:bsd-3)))
12305
12306(define-public python2-invoke
12307 (package-with-python2 python-invoke))
12308
12309(define-public python-automat
12310 (package
12311 (name "python-automat")
919d80a0 12312 (version "0.7.0")
44d10b1f
RW
12313 (source (origin
12314 (method url-fetch)
12315 (uri (pypi-uri "Automat" version))
12316 (sha256
12317 (base32
919d80a0 12318 "03ivg70n3b1cbcd2zvjhk8y4kmqxcvhmili39lmgx09dza1qpmyb"))))
44d10b1f
RW
12319 (build-system python-build-system)
12320 ;; We disable the tests because they require python-twisted, while
12321 ;; python-twisted depends on python-automat. Twisted is optional, but the
12322 ;; tests fail if it is not available. Also see
12323 ;; <https://github.com/glyph/automat/issues/71>.
12324 (arguments '(#:tests? #f))
12325 (native-inputs
12326 `(("python-m2r" ,python-m2r)
12327 ("python-setuptools-scm" ,python-setuptools-scm)
12328 ("python-graphviz" ,python-graphviz)))
12329 (propagated-inputs
12330 `(("python-six" ,python-six)
12331 ("python-attrs" ,python-attrs)))
12332 (home-page "https://github.com/glyph/Automat")
12333 (synopsis "Self-service finite-state machines")
12334 (description "Automat is a library for concise, idiomatic Python
12335expression of finite-state automata (particularly deterministic finite-state
12336transducers).")
12337 (license license:expat)))
12338
12339(define-public python2-automat
12340 (package-with-python2 python-automat))
12341
12342(define-public python-m2r
12343 (package
12344 (name "python-m2r")
bcfb8fac 12345 (version "0.2.1")
44d10b1f
RW
12346 (source (origin
12347 (method url-fetch)
12348 (uri (pypi-uri "m2r" version))
12349 (sha256
12350 (base32
bcfb8fac 12351 "16gdm8i06jjmlpvckpfmlkr4693dh0vs192vgsqn84fsdkbbm45z"))))
44d10b1f
RW
12352 (build-system python-build-system)
12353 (propagated-inputs
12354 `(("python-docutils" ,python-docutils)
12355 ("python-mistune" ,python-mistune)))
12356 (native-inputs
12357 `(("python-pygments" ,python-pygments)
12358 ("python-mock" ,python-mock)))
12359 (home-page "https://github.com/miyakogi/m2r")
12360 (synopsis "Markdown to reStructuredText converter")
12361 (description "M2R converts a markdown file including reST markups to valid
12362reST format.")
12363 (license license:expat)))
12364
12365(define-public python2-m2r
12366 (package-with-python2 python-m2r))
12367
12368(define-public python-constantly
12369 (package
12370 (name "python-constantly")
12371 (version "15.1.0")
12372 (source (origin
12373 (method url-fetch)
12374 (uri (pypi-uri "constantly" version))
12375 (sha256
12376 (base32
12377 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
12378 (build-system python-build-system)
12379 (home-page "https://github.com/twisted/constantly")
12380 (synopsis "Symbolic constants in Python")
12381 (description "Constantly is a Python library that provides symbolic
12382constant support. It includes collections and constants with text, numeric,
12383and bit flag values.")
12384 (license license:expat)))
12385
12386(define-public python2-constantly
12387 (package-with-python2 python-constantly))
12388
12389(define-public python-attrs
12390 (package
12391 (name "python-attrs")
8aed0895 12392 (version "19.3.0")
44d10b1f
RW
12393 (source (origin
12394 (method url-fetch)
12395 (uri (pypi-uri "attrs" version))
12396 (sha256
12397 (base32
8aed0895 12398 "0wky4h28n7xnr6xv69p9z6kv8bzn50d10c3drmd9ds8gawbcxdzp"))))
44d10b1f
RW
12399 (build-system python-build-system)
12400 (arguments
12401 `(#:modules ((guix build utils)
12402 (guix build python-build-system)
12403 (ice-9 ftw)
12404 (srfi srfi-1)
12405 (srfi srfi-26))
12406 #:phases (modify-phases %standard-phases
12407 (replace 'check
12408 (lambda _
12409 (let ((cwd (getcwd)))
12410 (setenv "PYTHONPATH"
12411 (string-append
12412 cwd "/build/"
12413 (find (cut string-prefix? "lib" <>)
12414 (scandir (string-append cwd "/build")))
12415 ":"
12416 (getenv "PYTHONPATH")))
12417 (invoke "python" "-m" "pytest")))))))
12418 (native-inputs
12419 `(("python-coverage" ,python-coverage)
12420 ("python-hypothesis" ,python-hypothesis)
12421 ("python-pympler" ,python-pympler)
12422 ("python-pytest" ,python-pytest)
12423 ("python-six" ,python-six)
12424 ("python-sphinx" ,python-sphinx)
12425 ("python-zope-interface" ,python-zope-interface)))
12426 (home-page "https://github.com/python-attrs/attrs/")
12427 (synopsis "Attributes without boilerplate")
12428 (description "@code{attrs} is a Python package with class decorators that
12429ease the chores of implementing the most common attribute-related object
12430protocols.")
12431 (license license:expat)))
12432
12433(define-public python2-attrs
12434 (package-with-python2 python-attrs))
12435
12436(define-public python-attrs-bootstrap
12437 (package
12438 (inherit python-attrs)
12439 (name "python-attrs-bootstrap")
44d10b1f
RW
12440 (native-inputs `())
12441 (arguments `(#:tests? #f))))
12442
12443(define-public python2-attrs-bootstrap
12444 (package-with-python2 python-attrs-bootstrap))
12445
12446(define-public python2-cliapp
12447 (package
12448 (name "python2-cliapp")
9064b84e 12449 (version "1.20180812.1")
44d10b1f
RW
12450 (source
12451 (origin
12452 (method url-fetch)
12453 (uri (string-append
12454 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
12455 version ".tar.gz"))
12456 (sha256
12457 (base32
9064b84e 12458 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
44d10b1f
RW
12459 (build-system python-build-system)
12460 (arguments
12461 `(#:python ,python-2
12462 #:phases
12463 (modify-phases %standard-phases
12464 ;; check phase needs to be run before the build phase. If not,
12465 ;; coverage-test-runner looks for tests for the built source files,
12466 ;; and fails.
12467 (delete 'check)
12468 (add-before 'build 'check
12469 (lambda _
12470 ;; Disable python3 tests
12471 (substitute* "check"
12472 (("python3") "# python3"))
6c826d32 12473 (invoke "./check"))))))
44d10b1f
RW
12474 (native-inputs
12475 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
12476 ("python2-pep8" ,python2-pep8)))
12477 (propagated-inputs
12478 `(("python2-pyaml" ,python2-pyaml)))
12479 (home-page "https://liw.fi/cliapp/")
12480 (synopsis "Python framework for command line programs")
12481 (description "@code{python2-cliapp} is a python framework for
12482command line programs. It contains the typical stuff such programs
12483need to do, such as parsing the command line for options, and
12484iterating over input files.")
12485 (license license:gpl2+)))
12486
12487(define-public python2-ttystatus
12488 (package
12489 (name "python2-ttystatus")
e516a9c2 12490 (version "0.36")
44d10b1f
RW
12491 (source
12492 (origin
12493 (method url-fetch)
12494 (uri (string-append
12495 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
12496 version ".tar.gz"))
12497 (sha256
12498 (base32
e516a9c2 12499 "06mdk4d19zw2j3is54gndhzl396g3xc8k52m7i86z69s9hcz71by"))))
44d10b1f
RW
12500 (build-system python-build-system)
12501 (native-inputs
12502 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
12503 ("python2-pep8" ,python2-pep8)))
12504 (arguments
12505 `(#:python ,python-2
12506 #:phases
12507 (modify-phases %standard-phases
12508 ;; check phase needs to be run before the build phase. If not,
12509 ;; coverage-test-runner looks for tests for the built source files,
12510 ;; and fails.
12511 (delete 'check)
12512 (add-before 'build 'check
cbeee881 12513 (lambda _ (invoke "make" "check"))))))
44d10b1f
RW
12514 (home-page "https://liw.fi/ttystatus/")
12515 (synopsis "Python library for showing progress reporting and
12516status updates on terminals")
12517 (description "@code{python2-ttystatus} is a python library for
12518showing progress reporting and status updates on terminals, for
12519command line programs. Output is automatically adapted to the width
12520of the terminal: truncated if it does not fit, and resized if the
12521terminal size changes.")
12522 (license license:gpl3+)))
12523
12524(define-public python2-tracing
12525 (package
12526 (name "python2-tracing")
12527 (version "0.10")
12528 (source
12529 (origin
12530 (method url-fetch)
12531 (uri (string-append
12532 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
12533 version ".tar.gz"))
12534 (sha256
12535 (base32
12536 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
12537 (build-system python-build-system)
12538 (arguments
12539 `(#:python ,python-2))
12540 (home-page "https://liw.fi/tracing/")
12541 (synopsis "Python debug logging helper")
12542 (description "@code{python2-tracing} is a python library for
12543logging debug messages. It provides a way to turn debugging messages
12544on and off, based on the filename they occur in. It is much faster
12545than using @code{logging.Filter} to accomplish the same thing, which
12546matters when code is run in production mode. The actual logging still
12547happens using the @code{logging} library.")
12548 (license license:gpl3+)))
12549
12550(define-public python2-larch
12551 (package
12552 (name "python2-larch")
12553 (version "1.20151025")
12554 (source
12555 (origin
12556 (method url-fetch)
12557 (uri (string-append
12558 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
12559 version ".tar.gz"))
12560 (patches (search-patches
12561 "python2-larch-coverage-4.0a6-compatibility.patch"))
12562 (sha256
12563 (base32
12564 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
12565 (build-system python-build-system)
12566 (arguments
12567 `(#:python ,python-2
12568 #:phases
12569 (modify-phases %standard-phases
12570 ;; check phase needs to be run before the build phase. If not,
12571 ;; coverage-test-runner looks for tests for the built source files,
12572 ;; and fails.
12573 (delete 'check)
12574 (add-before 'build 'check
204ad455 12575 (lambda _ (invoke "make" "check"))))))
44d10b1f
RW
12576 (native-inputs
12577 `(("cmdtest" ,cmdtest)
12578 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
12579 (propagated-inputs
12580 `(("python2-tracing" ,python2-tracing)))
12581 (home-page "https://liw.fi/larch/")
12582 (synopsis "Python copy-on-write B-tree library")
12583 (description "@code{python2-larch} is an implementation of
12584particular kind of B-tree, based on research by Ohad Rodeh. See
12585@url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
12586on the data structure.
12587
12588The distinctive feature of this B-tree is that a node is never
12589(conceptually) modified. Instead, all updates are done by
12590copy-on-write. This makes it easy to clone a tree, and modify only the
12591clone, while other processes access the original tree.")
12592 (license license:gpl3+)))
12593
12594(define-public python-astroid
12595 (package
12596 (name "python-astroid")
1c43c698 12597 (version "2.3.3")
44d10b1f
RW
12598 (source
12599 (origin
12600 (method url-fetch)
12601 (uri (pypi-uri "astroid" version))
12602 (sha256
1c43c698 12603 (base32 "0fnibsl2cb5mvzbfm7sycj85smx48f8w8m7ks1sqlmpr9ps0gski"))))
44d10b1f
RW
12604 (build-system python-build-system)
12605 (propagated-inputs
12606 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
12607 ("python-six" ,python-six)
f0935460 12608 ("python-typed-ast" ,python-typed-ast)
44d10b1f
RW
12609 ("python-wrapt" ,python-wrapt)))
12610 (native-inputs
12611 `(("python-dateutil" ,python-dateutil)
12612 ("python-nose" ,python-nose)
12613 ("python-pytest" ,python-pytest)
12614 ("python-pytest-runner" ,python-pytest-runner)))
12615 (arguments
12616 `(#:phases
12617 (modify-phases %standard-phases
12618 (add-after 'unpack 'remove-spurious-test
12619 (lambda _
12620 ;; This can be removed after upgrading from python-3.7
12621 ;; https://github.com/PyCQA/astroid/issues/593
12622 ;; https://bugs.python.org/issue34056
12623 (delete-file "astroid/tests/unittest_modutils.py")
12624 #t))
12625 (replace 'check
12626 (lambda _
12627 (invoke "pytest" "astroid"))))))
12628 (home-page "https://github.com/PyCQA/astroid")
12629 (synopsis "Common base representation of python source code for pylint and
12630other projects")
12631 (description "@code{python-astroid} provides a common base representation
12632of python source code for projects such as pychecker, pyreverse, pylint, etc.
12633
12634It provides a compatible representation which comes from the _ast module. It
12635rebuilds the tree generated by the builtin _ast module by recursively walking
12636down the AST and building an extended ast. The new node classes have
12637additional methods and attributes for different usages. They include some
12638support for static inference and local name scopes. Furthermore, astroid
12639builds partial trees by inspecting living objects.")
12640 (license license:lgpl2.1+)
12641 (properties `((python2-variant . ,(delay python2-astroid))))))
12642
12643(define-public python2-astroid
12644 (let ((base (package-with-python2
12645 (strip-python2-variant python-astroid))))
12646 (package (inherit base)
12647 ;; Version 2.x removes python2 support.
12648 (version "1.6.5")
12649 (source
12650 (origin
12651 (method url-fetch)
12652 (uri (pypi-uri "astroid" version))
12653 (sha256
12654 (base32
12655 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
12656 (arguments
12657 (substitute-keyword-arguments (package-arguments base)
12658 ((#:phases phases)
12659 `(modify-phases ,phases
12660 (add-after 'unpack 'remove-spurious-test
12661 (lambda _
12662 ;; https://github.com/PyCQA/astroid/issues/276
12663 (delete-file "astroid/tests/unittest_brain.py")
12664 #t))
12665 (replace 'check
12666 (lambda _
12667 (invoke"python" "-m" "unittest" "discover"
12668 "-p" "unittest*.py")))))))
12669 (native-inputs `())
12670 (propagated-inputs
12671 `(("python2-backports-functools-lru-cache"
12672 ,python2-backports-functools-lru-cache)
12673 ("python2-enum34" ,python2-enum34)
12674 ("python2-singledispatch" ,python2-singledispatch)
741f98b3
MO
12675 ,@(alist-delete "python-typed-ast"
12676 (package-propagated-inputs base)))))))
44d10b1f
RW
12677
12678(define-public python-isort
12679 (package
12680 (name "python-isort")
e2227b6a 12681 (version "4.3.4")
44d10b1f
RW
12682 (source
12683 (origin
e2227b6a
EF
12684 (method git-fetch)
12685 (uri (git-reference
12686 ;; Tests pass only from the Github sources
12687 (url "https://github.com/timothycrosley/isort")
12688 (commit version)))
12689 (file-name (git-file-name name version))
44d10b1f
RW
12690 (sha256
12691 (base32
e2227b6a 12692 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
44d10b1f
RW
12693 (build-system python-build-system)
12694 (native-inputs
12695 `(("python-mock" ,python-mock)
12696 ("python-pytest" ,python-pytest)))
12697 (home-page "https://github.com/timothycrosley/isort")
12698 (synopsis "Python utility/library to sort python imports")
12699 (description "@code{python-isort} is a python utility/library to sort
12700imports alphabetically, and automatically separated into sections. It
12701provides a command line utility, a python library and plugins for various
12702editors.")
e2227b6a
EF
12703 (license license:expat)
12704 (properties `((python2-variant . ,(delay python2-isort))))))
44d10b1f
RW
12705
12706(define-public python2-isort
e2227b6a
EF
12707 (let ((base (package-with-python2
12708 (strip-python2-variant python-isort))))
12709 (package (inherit base)
12710 (native-inputs
12711 `(("python2-futures" ,python2-futures)
12712 ,@(package-native-inputs base))))))
44d10b1f
RW
12713
12714(define-public python2-backports-functools-lru-cache
12715 (package
12716 (name "python2-backports-functools-lru-cache")
12717 (version "1.5")
12718 (source
12719 (origin
12720 (method url-fetch)
12721 ;; only the pypi tarballs contain the necessary metadata
12722 (uri (pypi-uri "backports.functools_lru_cache" version))
12723 (sha256
12724 (base32
12725 "06jgv8gib4fhky0p5cmxdghvsgjyzcdgk48k8pxb1ccf11znk64x"))))
12726 (build-system python-build-system)
12727 (native-inputs
12728 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
12729 (arguments
12730 `(#:python ,python-2))
12731 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
12732 (synopsis "Backport of functools.lru_cache from Python 3.3")
12733 (description "@code{python2-backports-functools-lru-cache} is a backport
12734of @code{functools.lru_cache} from python 3.3.")
12735 (license license:expat)))
12736
12737(define-public python-configparser
12738 (package
12739 (name "python-configparser")
c6bc3529 12740 (version "4.0.2")
44d10b1f
RW
12741 (source
12742 (origin
12743 (method url-fetch)
84127f8c 12744 (uri (pypi-uri "configparser" version))
44d10b1f
RW
12745 (sha256
12746 (base32
c6bc3529
MB
12747 "1priacxym85yjcf68hh38w55nqswaxp71ryjyfdk222kg9l85ln7"))))
12748 (native-inputs
12749 `(("python-setuptools_scm" ,python-setuptools-scm)))
44d10b1f 12750 (build-system python-build-system)
809f003f 12751 (home-page "https://github.com/jaraco/configparser/")
44d10b1f
RW
12752 (synopsis "Backport of configparser from python 3.5")
12753 (description "@code{python-configparser} is a backport of
12754@code{configparser} from Python 3.5 so that it can be used directly
12755in other versions.")
12756 (license license:expat)))
12757
12758(define-public python2-configparser
12759 (package-with-python2 python-configparser))
12760
12761(define-public python-mando
12762 (package
12763 (name "python-mando")
12764 (version "0.6.4")
12765 (source (origin
12766 (method url-fetch)
12767 (uri (pypi-uri "mando" version))
12768 (sha256
12769 (base32
12770 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
12771 (build-system python-build-system)
12772 (propagated-inputs
12773 `(("python-rst2ansi" ,python-rst2ansi)
12774 ("python-six" ,python-six)))
12775 (native-inputs
12776 `(("python-pytest" ,python-pytest)))
12777 (home-page "https://mando.readthedocs.org/")
12778 (synopsis
12779 "Wrapper around argparse, allowing creation of complete CLI applications")
12780 (description
12781 "This package is a wrapper around argparse, allowing you to write complete CLI
12782applications in seconds while maintaining all the flexibility.")
12783 (license license:expat)))
12784
12785(define-public python2-mando
12786 (package-with-python2 python-mando))
12787
70daf82f
RW
12788(define-public python2-argparse
12789 (package
12790 (name "python2-argparse")
12791 (version "1.4.0")
12792 (source
12793 (origin
12794 (method url-fetch)
12795 (uri (pypi-uri "argparse" version))
12796 (sha256
12797 (base32
12798 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
12799 (build-system python-build-system)
12800 (arguments
12801 `(#:python ,python-2))
12802 (home-page "https://github.com/ThomasWaldmann/argparse/")
12803 (synopsis "Python command-line parsing library")
12804 (description
12805 "This package is mostly for people who want to have @code{argparse} on
12806older Pythons because it was not part of the standard library back then.")
12807 (license license:psfl)))
12808
44d10b1f
RW
12809(define-public python-fudge
12810 (package
12811 (name "python-fudge")
12812 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
12813 ;; package, which is currently the only use of this package.
12814 (version "0.9.6")
12815 (source
12816 (origin
12817 (method url-fetch)
12818 (uri (pypi-uri "fudge" version))
12819 (sha256
12820 (base32
12821 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
12822 (build-system python-build-system)
12823 (arguments
12824 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
12825 (home-page "https://github.com/fudge-py/fudge")
12826 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
12827 (description
12828 "Fudge is a Python module for using fake objects (mocks and stubs) to
12829test real ones.
12830
12831In readable Python code, you declare the methods available on your fake object
12832and how they should be called. Then you inject that into your application and
12833start testing. This declarative approach means you don’t have to record and
12834playback actions and you don’t have to inspect your fakes after running code.
12835If the fake object was used incorrectly then you’ll see an informative
12836exception message with a traceback that points to the culprit.")
12837 (license license:expat)))
12838
12839(define-public python2-fudge
12840 (package-with-python2 python-fudge))
12841
12842(define-public python-mwclient
12843 (package
12844 (name "python-mwclient")
957c6833 12845 (version "0.10.0")
44d10b1f
RW
12846 (source
12847 (origin
957c6833 12848 (method git-fetch)
44d10b1f 12849 ;; The PyPI version wouldn't contain tests.
957c6833
EF
12850 (uri (git-reference
12851 (url "https://github.com/mwclient/mwclient")
12852 (commit (string-append "v" version))))
12853 (file-name (git-file-name name version))
44d10b1f
RW
12854 (sha256
12855 (base32
957c6833 12856 "1c3q6lwmb05yqywc4ya98ca7hsl15niili8rccl4n1yqp77c103v"))))
44d10b1f
RW
12857 (build-system python-build-system)
12858 (propagated-inputs
957c6833 12859 `(("python-requests-oauthlib" ,python-requests-oauthlib)
44d10b1f
RW
12860 ("python-six" ,python-six)))
12861 (native-inputs
12862 `(("python-mock" ,python-mock)
12863 ("python-pytest" ,python-pytest)
44d10b1f 12864 ("python-pytest-cov" ,python-pytest-cov)
957c6833 12865 ("python-pytest-runner" ,python-pytest-runner)
44d10b1f
RW
12866 ("python-responses" ,python-responses)))
12867 (home-page "https://github.com/btongminh/mwclient")
12868 (synopsis "MediaWiki API client")
12869 (description "This package provides a MediaWiki API client.")
12870 (license license:expat)))
12871
12872(define-public python2-mwclient
12873 (package-with-python2 python-mwclient))
12874
12875(define-public python-utils
12876 (package
12877 (name "python-utils")
12878 (version "2.1.0")
12879 (source (origin
12880 (method url-fetch)
12881 (uri (pypi-uri "python-utils" version))
12882 (sha256
12883 (base32
12884 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
12885 (build-system python-build-system)
12886 (native-inputs
12887 `(("pytest-runner" ,python-pytest-runner)
12888 ("pytest" ,python-pytest)
12889 ("six" ,python-six)))
12890 (home-page "https://github.com/WoLpH/python-utils")
12891 (synopsis "Convenient utilities not included with the standard Python install")
12892 (description
12893 "Python Utils is a collection of small Python functions and classes which
12894make common patterns shorter and easier.")
12895 (license license:bsd-2)))
12896
12897(define-public python2-utils
12898 (package-with-python2 python-utils))
12899
44d10b1f
RW
12900(define-public python-diff-match-patch
12901 (package
12902 (name "python-diff-match-patch")
12903 (version "20121119")
12904 (source
12905 (origin
12906 (method url-fetch)
12907 (uri (pypi-uri "diff-match-patch" version))
12908 (sha256
12909 (base32
12910 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
12911 (build-system python-build-system)
12912 (home-page "https://code.google.com/p/google-diff-match-patch")
12913 (synopsis "Synchronize plain text")
12914 (description "Diff Match and Patch libraries offer robust algorithms to
12915perform the operations required for synchronizing plain text.")
12916 (license license:asl2.0)))
12917
12918(define-public python2-diff-match-patch
12919 (package-with-python2 python-diff-match-patch))
12920
12921(define-public python-dirsync
12922 (package
12923 (name "python-dirsync")
12924 (version "2.2.3")
12925 (source
12926 (origin
12927 (method url-fetch)
12928 (uri (pypi-uri "dirsync" version))
12929 (sha256
12930 (base32
12931 "1r40fkanksagcszf1ag85mdr8w7rgc7196n6s1qlsk2abw6i7v0z"))))
12932 (build-system python-build-system)
12933 (propagated-inputs
12934 `(("six" ,python-six)))
12935 (home-page "https://bitbucket.org/tkhyn/dirsync")
12936 (synopsis "Advanced directory tree synchronisation tool")
12937 (description "Advanced directory tree synchronisation tool.")
12938 (license license:expat)))
12939
12940(define-public python2-dirsync
12941 (package-with-python2 python-dirsync))
12942
12943(define-public python-levenshtein
12944 (package
12945 (name "python-levenshtein")
12946 (version "0.12.0")
12947 (source
12948 (origin
12949 (method url-fetch)
12950 (uri (pypi-uri "python-Levenshtein" version))
12951 (sha256
12952 (base32
12953 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
12954 (build-system python-build-system)
12955 (home-page "https://github.com/ztane/python-Levenshtein")
12956 (synopsis "Fast computation of Levenshtein distance and string similarity")
12957 (description
12958 "The Levenshtein Python C extension module contains functions for fast computation of
12959@enumerate
12960@item Levenshtein (edit) distance, and edit operations
12961@item string similarity
12962@item approximate median strings, and generally string averaging
12963@item string sequence and set similarity
12964@end enumerate
12965It supports both normal and Unicode strings.")
12966 (license license:gpl2+)))
12967
12968(define-public python2-levenshtein
12969 (package-with-python2 python-levenshtein))
12970
12971(define-public python-scandir
12972 (package
12973 (name "python-scandir")
b8f5aa6f 12974 (version "1.10.0")
44d10b1f
RW
12975 (source
12976 (origin
12977 (method url-fetch)
12978 (uri (pypi-uri "scandir" version))
12979 (sha256
b8f5aa6f 12980 (base32 "1bkqwmf056pkchf05ywbnf659wqlp6lljcdb0y88wr9f0vv32ijd"))))
44d10b1f
RW
12981 (build-system python-build-system)
12982 (arguments
12983 `(#:phases (modify-phases %standard-phases
12984 (replace 'check
12985 (lambda _
12986 (invoke "python" "test/run_tests.py"))))))
12987 (home-page "https://github.com/benhoyt/scandir")
12988 (synopsis "Directory iteration function")
12989 (description
12990 "Directory iteration function like os.listdir(), except that instead of
12991returning a list of bare filenames, it yields DirEntry objects that include
12992file type and stat information along with the name. Using scandir() increases
12993the speed of os.walk() by 2-20 times (depending on the platform and file
12994system) by avoiding unnecessary calls to os.stat() in most cases.
12995
12996This package is part of the Python standard library since version 3.5.")
12997 (license license:bsd-3)))
12998
12999(define-public python2-scandir
13000 (package-with-python2 python-scandir))
13001
13002(define-public python2-stemming
13003 (package
13004 (name "python2-stemming")
13005 (version "1.0.1")
13006 (source
13007 (origin
13008 (method url-fetch)
13009 (uri (pypi-uri "stemming" version))
13010 (sha256
13011 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
13012 (build-system python-build-system)
13013 (arguments
13014 `(#:python ,python-2))
13015 (home-page "https://bitbucket.org/mchaput/stemming/overview")
13016 (synopsis "Python implementations of various stemming algorithms")
13017 (description
13018 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
13019stemming algorithms for English. These implementations are straightforward and
13020efficient, unlike some Python versions of the same algorithms available on the
13021Web. This package is an extraction of the stemming code included in the Whoosh
13022search engine.")
13023 (license license:public-domain)))
13024
13025(define-public python-factory-boy
13026 (package
13027 (name "python-factory-boy")
13028 (version "2.8.1")
13029 (source
13030 (origin
13031 (method url-fetch)
13032 (uri (pypi-uri "factory_boy" version))
13033 (sha256
13034 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
13035 (build-system python-build-system)
13036 (arguments
13037 ;; Tests are not included in the tarball.
13038 `(#:tests? #f))
13039 (propagated-inputs
13040 `(("faker" ,python-faker)))
13041 (home-page "https://github.com/benhoyt/scandir")
13042 (synopsis "Versatile test fixtures replacement")
13043 (description
13044 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
13045
13046As a fixtures replacement tool, it aims to replace static, hard to maintain
13047fixtures with easy-to-use factories for complex object.
13048
13049Instead of building an exhaustive test setup with every possible combination
13050of corner cases, factory_boy allows you to use objects customized for the
13051current test, while only declaring the test-specific fields")
13052 (license license:expat)))
13053
13054(define-public python2-factory-boy
13055 (package-with-python2 python-factory-boy))
13056
13057(define-public python-translate-toolkit
13058 (package
13059 (name "python-translate-toolkit")
13060 (version "2.1.0")
13061 (source
13062 (origin
13063 (method url-fetch)
13064 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
13065 (sha256
13066 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
13067 (build-system python-build-system)
13068 (native-inputs
13069 `(("python-pytest" ,python-pytest)
13070 ("python-sphinx" ,python-sphinx)))
13071 (propagated-inputs
13072 `(("python-babel" ,python-babel)
13073 ("python-beautifulsoup4" ,python-beautifulsoup4)
13074 ("python-chardet" ,python-chardet)
13075 ("python-diff-match-patch" ,python-diff-match-patch)
13076 ("python-levenshtein" ,python-levenshtein)
13077 ("python-lxml" ,python-lxml)
13078 ("python-six" ,python-six)
13079 ("python-vobject" ,python-vobject)
13080 ("python-pyyaml" ,python-pyyaml)))
13081 (arguments
13082 ;; TODO: tests are not run, because they end with
13083 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
13084 ;; 'parse_funcs'
13085 ;; during test setup.
13086 `(#:tests? #f))
18919cf9 13087 (home-page "https://toolkit.translatehouse.org")
44d10b1f
RW
13088 (synopsis "Tools and API for translation and localization engineering")
13089 (description
13090 "Tools and API for translation and localization engineering. It contains
13091several utilities, as well as an API for building localization tools.")
13092 (license license:gpl2+)))
13093
13094(define-public python2-translate-toolkit
13095 (package-with-python2 python-translate-toolkit))
13096
13097(define-public python-packaging
13098 (package
13099 (name "python-packaging")
a72a1892 13100 (version "20.0")
44d10b1f
RW
13101 (source
13102 (origin
13103 (method url-fetch)
13104 (uri (pypi-uri "packaging" version))
20bf58bf
MB
13105 ;; XXX: The URL in the patch file is wrong, it should be
13106 ;; <https://github.com/pypa/packaging/pull/256>.
fdd0c369 13107 (patches (search-patches "python-packaging-test-arch.patch"))
44d10b1f
RW
13108 (sha256
13109 (base32
a72a1892 13110 "1y2ip3a4ykkpgnwgn85j6hkspcl0cg3mzms97f40mk57vwqq67gy"))))
44d10b1f
RW
13111 (build-system python-build-system)
13112 (arguments
13113 `(#:phases (modify-phases %standard-phases
13114 (replace 'check
13115 (lambda _ (invoke "py.test" "-vv"))))))
13116 (native-inputs
13117 `(("python-pretend" ,python-pretend)
13118 ("python-pytest" ,python-pytest)))
13119 (propagated-inputs
13120 `(("python-pyparsing" ,python-pyparsing)
13121 ("python-six" ,python-six)))
13122 (home-page "https://github.com/pypa/packaging")
13123 (synopsis "Core utilities for Python packages")
13124 (description "Packaging is a Python module for dealing with Python packages.
13125It offers an interface for working with package versions, names, and dependency
13126information.")
13127 ;; From 'LICENSE': This software is made available under the terms of
13128 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
13129 ;; Contributions to this software is made under the terms of *both* these
13130 ;; licenses.
13131 (license (list license:asl2.0 license:bsd-2))))
13132
c5d39909
MB
13133;; A variant with minimal dependencies, for bootstrapping Pytest.
13134(define-public python-packaging-bootstrap
13135 (hidden-package
13136 (package/inherit
13137 python-packaging
13138 (name "python-packaging-bootstrap")
13139 (native-inputs '())
13140 (propagated-inputs
13141 `(("python-pyparsing" ,python-pyparsing)))
13142 (arguments '(#:tests? #f)))))
13143
44d10b1f
RW
13144(define-public python2-packaging
13145 (package-with-python2 python-packaging))
13146
13147(define-public python-relatorio
13148 (package
13149 (name "python-relatorio")
13150 (version "0.8.0")
13151 (source
13152 (origin
13153 (method url-fetch)
13154 (uri (pypi-uri "relatorio" version))
13155 (sha256
13156 (base32
13157 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
13158 (build-system python-build-system)
13159 (propagated-inputs
13160 `(("python-lxml" ,python-lxml)
13161 ("python-genshi" ,python-genshi)))
13162 (native-inputs
13163 `(("python-magic" ,python-magic)))
13164 (home-page "https://relatorio.tryton.org/")
13165 (synopsis "Templating library able to output ODT and PDF files")
13166 (description "Relatorio is a templating library which provides a way to
13167easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
13168for more filetypes can be easily added by creating plugins for them.")
13169 (license license:gpl3+)))
13170
13171(define-public python2-relatorio
13172 (package-with-python2 python-relatorio))
13173
13174(define-public python-radon
13175 (package
13176 (name "python-radon")
13177 (version "2.2.0")
13178 (source
13179 (origin
13180 (method url-fetch)
13181 (uri (pypi-uri "radon" version))
13182 (sha256
13183 (base32
13184 "07gq5hq4nrffxnlnksws9hrx7fd001gam63j62i82gyfr23gvdym"))))
13185 (build-system python-build-system)
13186 (arguments
13187 `(#:phases (modify-phases %standard-phases
13188 (replace 'check
13189 (lambda _
13190 (invoke "python" "radon/tests/run.py"))))))
13191 (propagated-inputs
13192 `(("python-colorama" ,python-colorama)
13193 ("python-flake8-polyfill" ,python-flake8-polyfill)
13194 ("python-mando" ,python-mando)))
13195 (native-inputs
13196 `(("python-pytest" ,python-pytest)
13197 ("python-pytest-mock" ,python-pytest-mock)))
13198 (home-page "https://radon.readthedocs.org/")
13199 (synopsis "Code Metrics in Python")
13200 (description "Radon is a Python tool which computes various code metrics.
13201Supported metrics are:
13202@itemize @bullet
13203@item raw metrics: SLOC, comment lines, blank lines, &c.
13204@item Cyclomatic Complexity (i.e. McCabe’s Complexity)
13205@item Halstead metrics (all of them)
13206@item the Maintainability Index (a Visual Studio metric)
13207@end itemize")
13208 (license license:expat)))
13209
13210(define-public python2-radon
13211 (package-with-python2 python-radon))
13212
13213(define-public python-sure
13214 (package
13215 (name "python-sure")
13216 (version "1.4.11")
13217 (source
13218 (origin
13219 (method url-fetch)
13220 (uri (pypi-uri "sure" version))
13221 (sha256
13222 (base32
13223 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
13224 (build-system python-build-system)
13225 (propagated-inputs
13226 `(("python-mock" ,python-mock)
13227 ("python-six" ,python-six)))
13228 (native-inputs
13229 `(("python-nose" ,python-nose)))
13230 (home-page "https://github.com/gabrielfalcao/sure")
13231 (synopsis "Automated testing library in python for python")
13232 (description
13233 "Sure is a python library that leverages a DSL for writing assertions.
13234Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
13235 (license license:gpl3+)))
13236
13237(define-public python2-sure
13238 (package-with-python2 python-sure))
13239
13240(define-public python2-couleur
13241 ;; This package does not seem to support python3 at all, hence,
13242 ;; only the python2 variant definition is provided.
13243 (package
13244 (name "python2-couleur")
13245 (version "0.6.2")
13246 (source
13247 (origin
13248 (method url-fetch)
13249 (uri (pypi-uri "couleur" version))
13250 (sha256
13251 (base32
13252 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
13253 (build-system python-build-system)
13254 (arguments
13255 `(#:python ,python-2))
13256 (home-page "https://github.com/gabrielfalcao/couleur")
13257 (synopsis
13258 "ANSI terminal tool for python, colored shell and other handy fancy features")
13259 (description
13260 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
13261terminal such as coloured output in the shell, overwriting output, indentation, etc.")
13262 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
13263 ;; https://github.com/gabrielfalcao/couleur/issues/11
13264 (license license:lgpl3+)))
13265
13266(define-public python-misaka
13267 (package
13268 (name "python-misaka")
0dcb3412 13269 (version "2.1.1")
44d10b1f
RW
13270 (source
13271 (origin
13272 (method url-fetch)
13273 (uri (pypi-uri "misaka" version))
13274 (sha256
13275 (base32
0dcb3412 13276 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
44d10b1f
RW
13277 (build-system python-build-system)
13278 (arguments
13279 `(;; Line 37 of setup.py calls self.run_command('develop')
13280 ;; in the 'check' phase. This command seems to be trying
13281 ;; to write to
13282 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
13283 ;; for which it does not have the permission to write.
13284 #:tests? #f))
13285 (propagated-inputs
13286 `(("python-cffi" ,python-cffi)))
13287 (home-page "https://github.com/FSX/misaka")
13288 (synopsis "Python binding for Hoedown")
13289 (description
13290 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
13291library written in C. It features a fast HTML renderer and functionality to make custom
13292renderers (e.g. man pages or LaTeX).")
13293 (license license:expat)))
13294
13295(define-public python2-misaka
13296 (package-with-python2 python-misaka))
13297
13298(define-public python2-steadymark
13299 ;; This is forced into being a python2 only variant
13300 ;; due to its dependence on couleur that has no support
13301 ;; for python3
13302 (package
13303 (name "python2-steadymark")
13304 (version "0.7.3")
13305 (source
13306 (origin
13307 (method url-fetch)
13308 (uri (pypi-uri "steadymark" version))
13309 (sha256
13310 (base32
13311 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
13312 (build-system python-build-system)
13313 (native-inputs
13314 `(("python-couleur" ,python2-couleur)
13315 ("python-sure" ,python2-sure)
13316 ("python-misaka" ,python2-misaka)))
13317 (arguments
13318 `(#:python ,python-2
13319 #:phases
13320 (modify-phases %standard-phases
13321 (add-before 'build 'patch-setup-py
13322 (lambda _
13323 ;; Update requirements from dependency==version
13324 ;; to dependency>=version
13325 (substitute* "setup.py"
13326 (("==") ">="))
13327 #t)))))
13328 (home-page "https://github.com/gabrielfalcao/steadymark")
13329 (synopsis "Markdown-based test runner for python")
13330 (description
13331 "@code{Steadymark} allows documentation to be written in github-flavoured
13332markdown. The documentation may contain snippets of code surrounded by python
13333code blocks and @code{Steadymark} will find these snippets and run them, making
13334sure that there are no old malfunctional examples in the documentation examples.")
13335 (license license:expat)))
13336
13337(define-public python-jsonpointer
13338 (package
13339 (name "python-jsonpointer")
13340 (version "1.10")
13341 (source
13342 (origin
13343 (method url-fetch)
13344 (uri (pypi-uri "jsonpointer" version))
13345 (sha256
13346 (base32
13347 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
13348 (build-system python-build-system)
13349 (home-page "https://github.com/stefankoegl/python-json-pointer")
13350 (synopsis "Identify specific nodes in a JSON document")
13351 (description "@code{jsonpointer} allows you to access specific nodes
13352by path in a JSON document (see RFC 6901).")
13353 (license license:bsd-3)))
13354
13355(define-public python2-jsonpointer
13356 (package-with-python2 python-jsonpointer))
13357
13358(define-public python-jsonpatch
13359 (package
13360 (name "python-jsonpatch")
13361 (version "1.16")
13362 (source
13363 (origin
854c5c95 13364 (method git-fetch)
44d10b1f 13365 ;; pypi version lacks tests.js
854c5c95
EF
13366 (uri (git-reference
13367 (url "https://github.com/stefankoegl/python-json-patch")
13368 (commit (string-append "v" version))))
13369 (file-name (git-file-name name version))
44d10b1f
RW
13370 (sha256
13371 (base32
854c5c95 13372 "0k9pff06lxama3nhsc7cdxbp83422bdy8ifs52i6xkas8hpyzfzr"))))
44d10b1f
RW
13373 (build-system python-build-system)
13374 (native-inputs
13375 `(("python-jsonpointer" ,python-jsonpointer)))
13376 (home-page "https://github.com/stefankoegl/python-json-patch")
13377 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
13378 (description "@code{jsonpatch} is a library and program that allows
13379applying JSON Patches according to RFC 6902.")
13380 (license license:bsd-3)))
13381
13382(define-public python2-jsonpatch
13383 (package-with-python2 python-jsonpatch))
13384
13385(define-public python-jsonpatch-0.4
13386 (package (inherit python-jsonpatch)
13387 (name "python-jsonpatch")
13388 (version "0.4")
13389 (source
13390 (origin
a9722d0d
EF
13391 (method git-fetch)
13392 (uri (git-reference
13393 (url "https://github.com/stefankoegl/python-json-patch")
13394 (commit (string-append "v" version))))
13395 (file-name (git-file-name name version))
44d10b1f
RW
13396 (sha256
13397 (base32
a9722d0d 13398 "1fq02y57kinyknxjcav0slcb0k9mwdffqw2hnlhdkpj7palh2mwk"))))))
44d10b1f
RW
13399
13400(define-public python2-jsonpatch-0.4
13401 (package-with-python2 python-jsonpatch-0.4))
13402
13403(define-public python-rfc3986
13404 (package
13405 (name "python-rfc3986")
13406 (version "1.1.0")
13407 (source (origin
13408 (method url-fetch)
13409 (uri (pypi-uri "rfc3986" version))
13410 (sha256
13411 (base32
13412 "06wlmysw83f75ff84zr1yr6n0shvc2xn1n1sb4iwzqap9hf5fn44"))))
13413 (build-system python-build-system)
13414 (arguments
13415 `(#:modules ((guix build utils)
13416 (guix build python-build-system)
13417 (ice-9 ftw)
13418 (srfi srfi-1)
13419 (srfi srfi-26))
13420 #:phases
13421 (modify-phases %standard-phases
13422 (replace 'check
13423 (lambda _
13424 (let ((cwd (getcwd)))
13425 (setenv "PYTHONPATH"
13426 (string-append cwd "/build/"
13427 (find (cut string-prefix? "lib" <>)
13428 (scandir (string-append cwd "/build")))
13429 ":"
13430 (getenv "PYTHONPATH")))
13431 (invoke "pytest" "-v")))))))
13432 (native-inputs
13433 `(("python-pytest" ,python-pytest)))
13434 (home-page "https://rfc3986.readthedocs.io/")
13435 (synopsis "Parse and validate URI references")
13436 (description
13437 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
13438validation and authority parsing. This module also supports RFC@tie{}6874
13439which adds support for zone identifiers to IPv6 addresses.")
13440 (license license:asl2.0)))
13441
13442(define-public python2-rfc3986
13443 (package-with-python2 python-rfc3986))
13444
13445(define-public python-rfc3987
13446 (package
13447 (name "python-rfc3987")
13448 (version "1.3.7")
13449 (source
13450 (origin
13451 (method url-fetch)
13452 (uri (pypi-uri "rfc3987" version))
13453 (sha256
13454 (base32
13455 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
13456 (build-system python-build-system)
13457 (home-page "https://pypi.python.org/pypi/rfc3987")
13458 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
13459 (description "@code{rfc3987} provides routines for parsing and
13460validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
13461 (license license:gpl3+)))
13462
13463(define-public python2-rfc3987
13464 (package-with-python2 python-rfc3987))
13465
13466(define-public python-validate-email
13467 (package
13468 (name "python-validate-email")
13469 (version "1.3")
13470 (source
13471 (origin
13472 (method url-fetch)
13473 (uri (pypi-uri "validate_email" version))
13474 (sha256
13475 (base32
13476 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
13477 (build-system python-build-system)
13478 (home-page "https://github.com/syrusakbary/validate_email")
13479 (synopsis "Verifies if an email address is valid and really exists")
13480 (description "@code{validate_email} can be used to verify if an email
13481address is valid and really exists.")
13482 (license license:lgpl3+)))
13483
13484(define-public python2-validate-email
13485 (package-with-python2 python-validate-email))
13486
13487(define-public python-flex
13488 (package
13489 (name "python-flex")
13490 (version "6.10.0")
13491 (source
13492 (origin
13493 (method url-fetch)
13494 (uri (pypi-uri "flex" version))
13495 (sha256
13496 (base32
13497 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
13498 (build-system python-build-system)
13499 (propagated-inputs
13500 `(("python-click" ,python-click)
13501 ("python-iso8601" ,python-iso8601)
13502 ("python-jsonpointer" ,python-jsonpointer)
13503 ("python-pyyaml" ,python-pyyaml)
13504 ("python-requests" ,python-requests)
13505 ("python-rfc3987" ,python-rfc3987)
13506 ("python-six" ,python-six)
13507 ("python-validate-email" ,python-validate-email)))
13508 (home-page "https://github.com/pipermerriam/flex")
13509 (synopsis "Validates Swagger schemata")
13510 (description "@code{flex} can be used to validate Swagger schemata.")
13511 (license license:bsd-3)))
13512
13513(define-public python2-flex
13514 (package-with-python2 python-flex))
13515
13516(define-public python-marshmallow
13517 (package
13518 (name "python-marshmallow")
13519 (version "3.0.0b14")
13520 (source
13521 (origin
13522 (method url-fetch)
13523 (uri (pypi-uri "marshmallow" version))
13524 (sha256
13525 (base32
13526 "1digk3f5cfk7wmlka65mc7bzsd96pbsgcsvp6pimd5b4ff9zb5p3"))))
13527 (build-system python-build-system)
13528 (propagated-inputs
13529 `(("python-dateutil" ,python-dateutil)
13530 ("python-simplejson" ,python-simplejson)))
13531 (native-inputs
13532 `(("python-pytest" ,python-pytest)
13533 ("python-pytz" ,python-pytz)))
13534 (home-page "https://github.com/marshmallow-code/marshmallow")
13535 (synopsis "Convert complex datatypes to and from native
13536Python datatypes.")
13537 (description "@code{marshmallow} provides a library for converting
13538complex datatypes to and from native Python datatypes.")
13539 (license license:expat)))
13540
13541(define-public python2-marshmallow
13542 (package-with-python2 python-marshmallow))
13543
13544(define-public python-apispec
13545 (package
13546 (name "python-apispec")
13547 (version "0.25.3")
13548 (source
13549 (origin
13550 (method url-fetch)
13551 (uri (pypi-uri "apispec" version))
13552 (sha256
13553 (base32
13554 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
13555 (build-system python-build-system)
13556 (propagated-inputs
13557 `(("python-pyyaml" ,python-pyyaml)))
13558 (native-inputs
13559 `(("python-pytest" ,python-pytest)
13560 ("python-flask" ,python-flask)
13561 ("python-marshmallow" ,python-marshmallow)
13562 ("python-tornado" ,python-tornado)
13563 ("python-bottle" ,python-bottle)
13564 ("python-mock" ,python-mock)))
13565 (home-page "https://github.com/marshmallow-code/apispec")
13566 (synopsis "Swagger 2.0 API specification generator")
13567 (description "@code{python-apispec} is a pluggable API specification
13568generator. Currently supports the OpenAPI specification (f.k.a.
13569Swagger 2.0).")
13570 (license license:expat)))
13571
13572(define-public python2-apispec
13573 (package-with-python2 python-apispec))
13574
13575(define-public python-flasgger
13576 (package
13577 (name "python-flasgger")
13578 (version "0.6.3")
13579 (source
13580 (origin
1a04d421
TGR
13581 (method git-fetch)
13582 (uri (git-reference
13583 (url "https://github.com/rochacbruno/flasgger.git")
13584 (commit version)))
13585 (file-name (git-file-name name version))
44d10b1f 13586 (sha256
1a04d421 13587 (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn"))))
44d10b1f
RW
13588 (build-system python-build-system)
13589 (arguments
13590 `(#:phases
13591 (modify-phases %standard-phases
13592 (replace 'check
13593 (lambda* (#:key inputs outputs #:allow-other-keys)
13594 (substitute* "Makefile"
13595 (("flake8 flasgger --ignore=F403")
13596 "flake8 flasgger --ignore=E731,F403"))
13597 (setenv "PYTHONPATH" (string-append (getcwd)
13598 ":"
13599 (getenv "PYTHONPATH")))
ac599a09 13600 (invoke "py.test"))))))
44d10b1f
RW
13601 (propagated-inputs
13602 `(("python-flask" ,python-flask)
13603 ("python-pyyaml" ,python-pyyaml)
13604 ("python-jsonschema" ,python-jsonschema)
13605 ("python-mistune" ,python-mistune)
13606 ("python-six" ,python-six)))
13607 (native-inputs
13608 `(("python-decorator" ,python-decorator)
13609 ("python-flake8" ,python-flake8)
13610 ("python-flask-restful" ,python-flask-restful)
13611 ("python-flex" ,python-flex)
13612 ("python-pytest" ,python-pytest)
13613 ("python-pytest-cov" ,python-pytest-cov)
13614 ("python-marshmallow" ,python-marshmallow)
13615 ("python-apispec" ,python-apispec)))
13616 (home-page "https://github.com/rochacbruno/flasgger/")
13617 (synopsis "Extract Swagger specs from your Flask project")
13618 (description "@code{python-flasgger} allows extracting Swagger specs
13619from your Flask project. It is a fork of Flask-Swagger.")
13620 (license license:expat)))
13621
13622(define-public python2-flasgger
13623 (package-with-python2 python-flasgger))
13624
13625(define-public python-swagger-spec-validator
13626 (package
13627 (name "python-swagger-spec-validator")
fe9c5b1d 13628 (version "2.4.3")
44d10b1f
RW
13629 (source
13630 (origin
13631 (method url-fetch)
13632 (uri (pypi-uri "swagger-spec-validator" version))
13633 (sha256
13634 (base32
fe9c5b1d 13635 "11g627icrsqwazsncwi0sdvprcj6hwaayw5xk3xsj8d97bmrzqjp"))))
44d10b1f
RW
13636 (build-system python-build-system)
13637 (propagated-inputs
13638 `(("python-jsonschema" ,python-jsonschema)
fe9c5b1d 13639 ("python-pyyaml" ,python-pyyaml)
44d10b1f
RW
13640 ("python-six" ,python-six)))
13641 (home-page
13642 "https://github.com/Yelp/swagger_spec_validator")
13643 (synopsis "Validation of Swagger specifications")
13644 (description "@code{swagger_spec_validator} provides a library for
13645validating Swagger API specifications.")
13646 (license license:asl2.0)))
13647
13648(define-public python2-swagger-spec-validator
13649 (package-with-python2 python-swagger-spec-validator))
13650
13651(define-public python-apache-libcloud
13652 (package
13653 (name "python-apache-libcloud")
13654 (version "2.4.0")
13655 (source
13656 (origin
13657 (method url-fetch)
13658 (uri (pypi-uri "apache-libcloud" version))
13659 (sha256
13660 (base32
13661 "0daj3mkzw79v5zin2r1s2wkrz1hplfc16bwj4ss68i5qjq4l2p0j"))))
13662 (build-system python-build-system)
13663 (arguments
13664 `(#:phases
13665 (modify-phases %standard-phases
13666 (add-after 'unpack 'patch-ssh
13667 (lambda* (#:key inputs #:allow-other-keys)
13668 (substitute* "libcloud/compute/ssh.py"
13669 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
13670 "/bin/ssh" "'")))
13671 #t))
13672 (add-after 'unpack 'patch-tests
13673 (lambda _
13674 (substitute* "./libcloud/test/test_file_fixtures.py"
13675 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
13676 (("def _ascii") "def _raw_data(self, method, url, body, headers):
13677 return (httplib.OK,
13678 \"1234abcd\",
13679 {\"test\": \"value\"},
13680 httplib.responses[httplib.OK])
13681 def _ascii"))
13682 (substitute* "libcloud/test/compute/test_ssh_client.py"
13683 (("class ShellOutSSHClientTests")
13684 "@unittest.skip(\"Guix container doesn't have ssh service\")
13685class ShellOutSSHClientTests")
13686 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
13687 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
13688 (("'.xF0', '.x90', '.x8D', '.x88'")
13689 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
13690 #t))
13691 (add-before 'check 'copy-secret
13692 (lambda _
13693 (copy-file "libcloud/test/secrets.py-dist"
13694 "libcloud/test/secrets.py")
13695 #t)))))
13696 (inputs
13697 `(("openssh" ,openssh)))
13698 (propagated-inputs
13699 `(("python-paramiko" ,python-paramiko)
13700 ("python-requests" ,python-requests)))
13701 (native-inputs
13702 `(("python-lockfile" ,python-lockfile)
13703 ("python-mock" ,python-mock)
13704 ("python-pytest" ,python-pytest)
13705 ("python-pytest-runner" ,python-pytest-runner)
13706 ("python-requests-mock" ,python-requests-mock)))
13707 (home-page "https://libcloud.apache.org/")
13708 (synopsis "Unified Cloud API")
13709 (description "@code{libcloud} is a Python library for interacting with
13710many of the popular cloud service providers using a unified API.")
13711 (license license:asl2.0)))
13712
13713(define-public python2-apache-libcloud
13714 (package-with-python2 python-apache-libcloud))
13715
13716(define-public python-smmap2
13717 (package
13718 (name "python-smmap2")
cd199a45 13719 (version "2.0.5")
44d10b1f
RW
13720 (source
13721 (origin
13722 (method url-fetch)
13723 (uri (pypi-uri "smmap2" version))
13724 (sha256
cd199a45 13725 (base32 "16k03pcnxd3lgzwgbd7nl4jwzm1wmahirvd09kljnzvy96hgza99"))))
44d10b1f
RW
13726 (build-system python-build-system)
13727 (native-inputs
13728 `(("python-nosexcover" ,python-nosexcover)))
13729 (home-page "https://github.com/Byron/smmap")
13730 (synopsis "Python sliding window memory map manager")
13731 (description "@code{smmap2} is a pure Python implementation of a sliding
13732window memory map manager.")
13733 (license license:bsd-3)))
13734
13735(define-public python2-smmap2
13736 (package-with-python2 python-smmap2))
13737
13738(define-public python-regex
13739 (package
13740 (name "python-regex")
c187c9d7 13741 (version "2019.04.14")
44d10b1f
RW
13742 (source (origin
13743 (method url-fetch)
13744 (uri (pypi-uri "regex" version))
13745 (sha256
13746 (base32
c187c9d7
BT
13747 "1a6hhfs6l6snr1z654ay6wzbmwdkmv282fzfkd5hk2d1n73y8v6m"))))
13748 ;; TODO: Fix and enable regex_test.py tests that complain about the
13749 ;; test.support module not existing.
44d10b1f
RW
13750 (build-system python-build-system)
13751 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
13752 (synopsis "Alternative regular expression module")
13753 (description "This regular expression implementation is backwards-
13754compatible with the standard @code{re} module, but offers additional
13755functionality like full case-folding for case-insensitive matches in Unicode.")
13756 (license license:psfl)))
13757
13758(define-public python2-regex
13759 (package-with-python2 python-regex))
13760
13761(define-public python2-pyopengl
13762 (package
13763 (name "python2-pyopengl")
13764 (version "3.1.0")
13765 (source
13766 (origin
13767 (method url-fetch)
13768 (uri (pypi-uri "PyOpenGL" version))
13769 (sha256
13770 (base32
13771 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
13772 (arguments
13773 `(#:python ,python-2))
13774 (build-system python-build-system)
13775 (home-page "http://pyopengl.sourceforge.net")
13776 (synopsis "Standard OpenGL bindings for Python")
13777 (description
13778 "PyOpenGL is the most common cross platform Python binding to OpenGL and
13779related APIs. The binding is created using the standard @code{ctypes}
13780library.")
13781 (license license:bsd-3)))
13782
13783(define-public python2-pyopengl-accelerate
13784 (package
13785 (inherit python2-pyopengl)
13786 (name "python2-pyopengl-accelerate")
13787 (version "3.1.0")
13788 (source
13789 (origin
13790 (method url-fetch)
13791 (uri (pypi-uri "PyOpenGL-accelerate" version))
13792 (sha256
13793 (base32
13794 "0464c1ifzk0k92lyndikmvzjgnx1y25r7bkkc8pnxm4kp1q4czwj"))))
13795 (synopsis "Acceleration code for PyOpenGL")
13796 (description
13797 "This is the Cython-coded accelerator module for PyOpenGL.")))
13798
13799(define-public python-rencode
13800 (package
13801 (name "python-rencode")
13802 (version "1.0.5")
13803 (source
13804 (origin
13805 (method url-fetch)
13806 (uri (pypi-uri "rencode" version))
13807 (sha256
13808 (base32
13809 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
13810 (build-system python-build-system)
13811 (arguments
13812 `(#:phases
13813 (modify-phases %standard-phases
13814 (add-before 'check 'delete-bogus-test
13815 ;; This test requires /home/aresch/Downloads, which is not provided by
13816 ;; the build environment.
13817 (lambda _
13818 (delete-file "rencode/t.py")
13819 #t)))))
13820 (native-inputs `(("pkg-config" ,pkg-config)
13821 ("python-cython" ,python-cython)))
13822 (home-page "https://github.com/aresch/rencode")
13823 (synopsis "Serialization of heterogeneous data structures")
13824 (description
13825 "The @code{rencode} module is a data structure serialization library,
13826similar to @code{bencode} from the BitTorrent project. For complex,
13827heterogeneous data structures with many small elements, r-encoding stake up
13828significantly less space than b-encodings. This version of rencode is a
13829complete rewrite in Cython to attempt to increase the performance over the
13830pure Python module.")
13831 (license license:bsd-3)))
13832
13833(define-public python2-rencode
13834 (package-with-python2 python-rencode))
13835
13836(define-public python-xenon
13837 (package
13838 (name "python-xenon")
13839 (version "0.5.4")
13840 (source
13841 (origin
13842 (method url-fetch)
13843 (uri (pypi-uri "xenon" version))
13844 (sha256
13845 (base32
13846 "029cbhysg2vr5n4jz8gpg2793f8wkwnqpr1qgv6c1dn685vy31mc"))))
13847 (build-system python-build-system)
13848 (native-inputs
13849 `(("python-pyyaml" ,python-pyyaml)
13850 ("python-radon" ,python-radon)
13851 ("python-requests" ,python-requests)
13852 ("python-flake8" ,python-flake8)
13853 ("python-tox" ,python-tox)))
13854 (arguments
13855 `(#:phases
13856 (modify-phases %standard-phases
13857 (add-before 'build 'patch-test-requirements
13858 (lambda _
13859 ;; Remove httpretty dependency for tests.
13860 (substitute* "setup.py"
13861 (("httpretty") ""))
13862 #t)))))
13863 (home-page "https://xenon.readthedocs.org/")
13864 (synopsis "Monitor code metrics for Python on your CI server")
13865 (description
13866 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
13867Ideally, @code{xenon} is run every time code is committed. Through command
13868line options, various thresholds can be set for the complexity of code. It
13869will fail (i.e. it will exit with a non-zero exit code) when any of these
13870requirements is not met.")
13871 (license license:expat)))
13872
13873(define-public python2-xenon
13874 (package-with-python2 python-xenon))
13875
13876(define-public python-pysocks
13877 (package
13878 (name "python-pysocks")
b8725cdf 13879 (version "1.7.0")
44d10b1f
RW
13880 (source
13881 (origin
13882 (method url-fetch)
13883 (uri (pypi-uri "PySocks" version))
13884 (sha256
13885 (base32
b8725cdf 13886 "0z4p31bpqm893cf87qqgb30k7nwd8kqfjwwjm5cvxb6zbyj1w0yr"))))
44d10b1f
RW
13887 (build-system python-build-system)
13888 (arguments `(#:tests? #f))
13889 (home-page "https://github.com/Anorov/PySocks")
13890 (synopsis "SOCKS client module")
13891 (description "@code{pysocks} is an updated and semi-actively maintained
13892version of @code{SocksiPy} with bug fixes and extra features.")
13893 (license license:bsd-3)))
13894
13895(define-public python2-pysocks
13896 (package-with-python2 python-pysocks))
13897
13898(define-public python-pydiff
13899 (package
13900 (name "python-pydiff")
13901 (version "0.2")
13902 (source
13903 (origin
13904 (method url-fetch)
13905 (uri (pypi-uri "pydiff" version))
13906 (sha256
13907 (base32
13908 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
13909 (build-system python-build-system)
13910 (home-page "https://github.com/myint/pydiff")
13911 (synopsis "Library to diff two Python files at the bytecode level")
13912 (description
13913 "@code{pydiff} makes it easy to look for actual code changes while
13914ignoring formatting changes.")
13915 (license license:expat)))
13916
13917(define-public python2-pydiff
13918 (package-with-python2 python-pydiff))
13919
13920(define-public python-tqdm
13921 (package
13922 (name "python-tqdm")
13923 (version "4.19.6")
13924 (source
13925 (origin
13926 (method url-fetch)
13927 (uri (pypi-uri "tqdm" version))
13928 (sha256
13929 (base32
13930 "1pw0ngm0zn9papdmkwipi3yih5c3di6d0w849bdmrraq4d2d9h2y"))))
13931 (build-system python-build-system)
13932 (native-inputs
13933 `(("python-flake8" ,python-flake8)
13934 ("python-nose" ,python-nose)
13935 ("python-coverage" ,python-coverage)))
13936 (home-page "https://github.com/tqdm/tqdm")
13937 (synopsis "Fast, extensible progress meter")
13938 (description
13939 "Make loops show a progress bar on the console by just wrapping any
13940iterable with @code{|tqdm(iterable)|}. Offers many options to define
13941design and layout.")
f875d76f
PL
13942 (license (list license:mpl2.0 license:expat))
13943 (properties `((python2-variant . ,(delay python2-tqdm))))))
44d10b1f
RW
13944
13945(define-public python2-tqdm
f875d76f
PL
13946 (let ((tqdm (package-with-python2
13947 (strip-python2-variant python-tqdm))))
13948 (package (inherit tqdm)
13949 (native-inputs `(("python2-functools32" ,python2-functools32)
13950 ,@(package-native-inputs tqdm))))))
44d10b1f
RW
13951
13952(define-public python-pkginfo
13953 (package
13954 (name "python-pkginfo")
13955 (version "1.4.2")
13956 (source
13957 (origin
13958 (method url-fetch)
13959 (uri (pypi-uri "pkginfo" version))
13960 (sha256
13961 (base32
13962 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
13963 (build-system python-build-system)
13964 (arguments
13965 ;; The tests are broken upstream.
13966 '(#:tests? #f))
13967 (home-page
13968 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
13969 (synopsis
13970 "Query metadatdata from sdists, bdists, and installed packages")
13971 (description
13972 "API to query the distutils metadata written in @file{PKG-INFO} inside a
13973source distriubtion (an sdist) or a binary distribution (e.g., created by
13974running bdist_egg). It can also query the EGG-INFO directory of an installed
13975distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
13976created by running @code{python setup.py develop}).")
13977 (license license:expat)))
13978
13979(define-public python2-pkginfo
13980 (package-with-python2 python-pkginfo))
13981
13982(define-public python-twine
13983 (package
13984 (name "python-twine")
13985 (version "1.9.1")
13986 (source
13987 (origin
13988 (method url-fetch)
13989 (uri (pypi-uri "twine" version))
13990 (sha256
13991 (base32
13992 "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a"))))
13993 (build-system python-build-system)
13994 (propagated-inputs
13995 `(("python-tqdm" ,python-tqdm)
13996 ("python-pkginfo" ,python-pkginfo)
13997 ("python-requests" ,python-requests)
13998 ("python-requests-toolbelt" ,python-requests-toolbelt)))
13999 (home-page "https://github.com/pypa/twine")
14000 (synopsis "Collection of utilities for interacting with PyPI")
14001 (description
14002 "@code{twine} currently supports registering projects and uploading
14003distributions. It authenticates the user over HTTPS, allows them to pre-sign
14004their files and supports any packaging format (including wheels).")
14005 (license license:asl2.0)))
14006
14007(define-public python2-twine
14008 (package-with-python2 python-twine))
14009
14010(define-public python-linecache2
14011 (package
14012 (name "python-linecache2")
14013 (version "1.0.0")
14014 (source
14015 (origin
14016 (method url-fetch)
14017 (uri (pypi-uri "linecache2" version))
14018 (sha256
14019 (base32
14020 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
14021 (build-system python-build-system)
14022 (arguments
14023 `(;; The tests depend on unittest2, and our version is a bit too old.
14024 #:tests? #f))
14025 (native-inputs
14026 `(("python-pbr" ,python-pbr-minimal)))
14027 (home-page
14028 "https://github.com/testing-cabal/linecache2")
14029 (synopsis "Backports of the linecache module")
14030 (description
14031 "The linecache module allows one to get any line from any file, while
14032attempting to optimize internally, using a cache, the common case where many
14033lines are read from a single file.")
14034 (license license:psfl)))
14035
14036(define-public python2-linecache2
14037 (package-with-python2 python-linecache2))
14038
14039(define-public python-traceback2
14040 (package
14041 (name "python-traceback2")
14042 (version "1.4.0")
14043 (source
14044 (origin
14045 (method url-fetch)
14046 (uri (pypi-uri "traceback2" version))
14047 (sha256
14048 (base32
14049 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
14050 (build-system python-build-system)
14051 (arguments
14052 `(;; python-traceback2 and python-unittest2 depend on one another.
14053 #:tests? #f))
14054 (native-inputs
14055 `(("python-pbr" ,python-pbr-minimal)))
14056 (propagated-inputs
14057 `(("python-linecache2" ,python-linecache2)))
14058 (home-page
14059 "https://github.com/testing-cabal/traceback2")
14060 (synopsis "Backports of the traceback module")
14061 (description
14062 "This module provides a standard interface to extract, format and print
14063stack traces of Python programs. It exactly mimics the behavior of the Python
14064interpreter when it prints a stack trace.")
14065 (license license:psfl)))
14066
14067(define-public python2-traceback2
14068 (package-with-python2 python-traceback2))
14069
14070(define-public python-ratelimiter
14071 (package
14072 (name "python-ratelimiter")
14073 (version "1.2.0")
14074 (source
14075 (origin
14076 (method url-fetch)
14077 (uri (pypi-uri "ratelimiter" version))
14078 (sha256
14079 (base32
14080 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
14081 (build-system python-build-system)
14082 (arguments
14083 '(#:tests? #f)) ; There are no tests in the pypi archive.
14084 (home-page "https://github.com/RazerM/ratelimiter")
14085 (synopsis "Simple rate limiting object")
14086 (description
14087 "The @code{ratelimiter} module ensures that an operation will not be
14088executed more than a given number of times during a given period.")
14089 (license license:asl2.0)))
14090
14091(define-public python2-ratelimiter
14092 (package-with-python2 python-ratelimiter))
14093
14094(define-public python-dukpy
14095 (package
14096 (name "python-dukpy")
14097 (version "0.3")
14098 (source
14099 (origin
5b77ebe1
TGR
14100 (method git-fetch)
14101 (uri (git-reference
14102 (url "https://github.com/kovidgoyal/dukpy.git")
14103 (commit (string-append "v" version))))
14104 (file-name (git-file-name name version))
44d10b1f 14105 (sha256
5b77ebe1 14106 (base32 "13h21nqzasv4zj32xs61brmc106pr2cx243672crcmwxxnjgaxls"))))
44d10b1f
RW
14107 (build-system python-build-system)
14108 (home-page "https://github.com/kovidgoyal/dukpy")
14109 (synopsis "Run JavaScript in python")
14110 (description
14111 "dukpy is a JavaScript runtime environment for Python using the duktape
14112embeddable JavaScript engine.")
14113 ;; Dukpy is licensed under MIT like the embedded duktape library,
14114 ;; with 'errors.c' as GPL3.
14115 (license (list license:expat license:gpl3))))
14116
14117(define-public python2-dukpy
14118 (package-with-python2 python-dukpy))
14119
14120(define-public python-jsonrpclib-pelix
14121 (package
14122 (name "python-jsonrpclib-pelix")
14123 (version "0.3.2")
14124 (source
14125 (origin
14126 (method url-fetch)
14127 (uri (pypi-uri "jsonrpclib-pelix" version))
14128 (sha256
14129 (base32
14130 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
14131 (build-system python-build-system)
14132 (arguments
14133 `(#:tests? #f)) ; no tests in PyPI tarball
14134 (home-page "https://github.com/tcalmant/jsonrpclib/")
14135 (synopsis "JSON-RPC 2.0 client library for Python")
14136 (description
14137 "This library implements the JSON-RPC v2.0
14138specification (backwards-compatible) as a client library for Python. This
14139version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
14140services.")
14141 (license license:asl2.0)))
14142
14143(define-public python2-jsonrpclib-pelix
14144 (package-with-python2 python-jsonrpclib-pelix))
14145
14146(define-public python-setuptools-scm-git-archive
14147 (package
14148 (name "python-setuptools-scm-git-archive")
14149 (version "1.0")
14150 (source
14151 (origin
14152 (method url-fetch)
14153 (uri (pypi-uri "setuptools_scm_git_archive" version))
14154 (sha256
14155 (base32
14156 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
14157 (build-system python-build-system)
14158 (native-inputs
14159 `(("python-pytest" ,python-pytest)))
14160 (propagated-inputs
14161 `(("python-setuptools-scm" ,python-setuptools-scm)))
14162 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
14163 (synopsis "Setuptools_scm plugin for git archives")
14164 (description
14165 "The setuptools_scm_git_archive package is a plugin to
14166setuptools_scm, which supports obtaining versions from git archives that
14167belong to tagged versions.")
14168 (license license:expat)))
14169
14170(define-public python2-setuptools-scm-git-archive
14171 (package-with-python2 python-setuptools-scm-git-archive))
14172
724a350c
RW
14173(define-public python-setuptools-git
14174 (package
14175 (name "python-setuptools-git")
14176 (version "1.2")
14177 (source
14178 (origin
14179 (method url-fetch)
14180 (uri (pypi-uri "setuptools-git" version))
14181 (sha256
14182 (base32
14183 "0i84qjwp5m0l9qagdjww2frdh63r37km1c48mrvbmaqsl1ni6r7z"))))
14184 (build-system python-build-system)
14185 (arguments
14186 `(#:phases
14187 (modify-phases %standard-phases
14188 ;; This is needed for tests.
14189 (add-after 'unpack 'configure-git
14190 (lambda _
14191 (setenv "HOME" "/tmp")
14192 (invoke "git" "config" "--global" "user.email" "guix")
14193 (invoke "git" "config" "--global" "user.name" "guix")
14194 #t)))))
14195 (native-inputs
14196 `(("git" ,git-minimal)))
14197 (home-page "https://github.com/msabramo/setuptools-git")
14198 (synopsis "Setuptools revision control system plugin for Git")
14199 (description
14200 "This package provides a plugin for Setuptools for revision control with
14201Git.")
14202 (license license:bsd-3)))
14203
44d10b1f
RW
14204(define-public python-pyclipper
14205 (package
14206 (name "python-pyclipper")
ff3d1b99 14207 (version "1.1.0.post3")
44d10b1f
RW
14208 (source
14209 (origin
14210 (method url-fetch)
14211 (uri (pypi-uri "pyclipper" version ".zip"))
14212 (sha256
ff3d1b99 14213 (base32 "164yksvqwqvwzh8f8lq92asg87hd8rvcy2xb5vm4y4ccvd5xgb7i"))
44d10b1f
RW
14214 (modules '((guix build utils)))
14215 (snippet
14216 '(begin
14217 ;; This file is generated by Cython.
14218 (delete-file "pyclipper/pyclipper.cpp") #t))))
14219 (build-system python-build-system)
14220 (arguments
14221 `(#:phases
14222 (modify-phases %standard-phases
14223 (add-before 'build 'cythonize-sources
14224 (lambda _
14225 (with-directory-excursion "pyclipper"
14226 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
14227 (propagated-inputs
14228 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
14229 (native-inputs
14230 `(("python-cython" ,python-cython)
14231 ("python-pytest" ,python-pytest)
14232 ("python-pytest-runner" ,python-pytest-runner)
14233 ("python-unittest2" ,python-unittest2)
14234 ("unzip" ,unzip)))
14235 (home-page "https://github.com/greginvm/pyclipper")
14236 (synopsis "Wrapper for Angus Johnson's Clipper library")
14237 (description
14238 "Pyclipper is a Cython wrapper for the C++ translation of the
14239Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
14240 (license license:expat)))
14241
14242(define-public python2-pyclipper
14243 (package-with-python2 python-pyclipper))
14244
14245(define-public python2-booleanoperations
14246 (package
14247 (name "python2-booleanoperations")
14248 (version "0.7.1")
14249 (source
14250 (origin
14251 (method url-fetch)
14252 (uri (pypi-uri "booleanOperations" version ".zip"))
14253 (sha256
14254 (base32
14255 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
14256 (build-system python-build-system)
14257 (arguments
14258 `(#:python ,python-2))
14259 (native-inputs
14260 `(("unzip" ,unzip)
14261 ("python2-pytest" ,python2-pytest)
14262 ("python2-pytest-runner" ,python2-pytest-runner)))
14263 (propagated-inputs
14264 `(("python-fonttools" ,python2-fonttools)
14265 ("python-pyclipper" ,python2-pyclipper)
14266 ("python-ufolib" ,python2-ufolib)))
14267 (home-page "https://github.com/typemytype/booleanOperations")
14268 (synopsis "Boolean operations on paths")
14269 (description
14270 "BooleanOperations provides a Python library that enables
14271boolean operations on paths.")
14272 (license license:expat)))
14273
14274(define-public python-tempdir
14275 (package
14276 (name "python-tempdir")
14277 (version "0.7.1")
14278 (source
14279 (origin
14280 (method url-fetch)
14281 (uri (pypi-uri "tempdir" version))
14282 (sha256
14283 (base32
14284 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
14285 (build-system python-build-system)
14286 (home-page "https://pypi.org/project/tempdir/")
14287 (arguments
14288 ;; the package has no tests
14289 '(#:tests? #f))
14290 (synopsis "Python library for managing temporary directories")
14291 (description
14292 "This library manages temporary directories that are automatically
14293deleted with all their contents when they are no longer needed. It is
14294particularly convenient for use in tests.")
14295 (license license:expat)))
14296
14297(define-public python2-tempdir
14298 (package-with-python2 python-tempdir))
14299
14300(define-public python-activepapers
14301 (package
14302 (name "python-activepapers")
14303 (version "0.2.2")
14304 (source
14305 (origin
14306 (method url-fetch)
14307 (uri (pypi-uri "ActivePapers.Py" version))
14308 (sha256
14309 (base32
14310 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
14311 (build-system python-build-system)
14312 (arguments
14313 `(#:modules ((ice-9 ftw)
14314 (srfi srfi-1)
14315 (guix build utils)
14316 (guix build python-build-system))
14317
14318 #:phases
14319 (modify-phases %standard-phases
14320 (add-after 'unpack 'delete-python2-code
14321 (lambda _
14322 (for-each delete-file
14323 '("lib/activepapers/builtins2.py"
14324 "lib/activepapers/standardlib2.py"
14325 "lib/activepapers/utility2.py"))))
14326 (replace 'check
14327 (lambda _
14328 ;; Deactivate the test cases that download files
14329 (setenv "NO_NETWORK_ACCESS" "1")
14330 ;; For some strange reason, some tests fail if nosetests runs all
14331 ;; test modules in a single execution. They pass if each test
14332 ;; module is run individually.
14333 (for-each (lambda (filename)
14334 (invoke "nosetests"
14335 (string-append "tests/" filename)))
14336 (scandir "tests"
14337 (lambda (filename)
14338 (string-suffix? ".py" filename)))))))))
14339 (native-inputs
14340 `(("python-tempdir" ,python-tempdir)
14341 ("python-nose" ,python-nose)))
14342 (propagated-inputs
14343 `(("python-h5py" ,python-h5py)))
14344 (home-page "http://www.activepapers.org/")
14345 (synopsis "Executable papers for scientific computing")
14346 (description
14347 "ActivePapers is a tool for working with executable papers, which
14348combine data, code, and documentation in single-file packages,
14349suitable for publication as supplementary material or on repositories
14350such as figshare or Zenodo.")
14351 (properties `((python2-variant . ,(delay python2-activepapers))))
14352 (license license:bsd-3)))
14353
14354(define-public python2-activepapers
14355 (let ((base (package-with-python2
14356 (strip-python2-variant python-activepapers))))
14357 (package
14358 (inherit base)
14359 (arguments
14360 (substitute-keyword-arguments (package-arguments base)
14361 ((#:phases phases)
14362 `(modify-phases ,phases
14363 (delete 'delete-python2-code)
14364 (add-after 'unpack 'delete-python3-code
14365 (lambda _
14366 (for-each delete-file
14367 '("lib/activepapers/builtins3.py"
14368 "lib/activepapers/standardlib3.py"
14369 "lib/activepapers/utility3.py")))))))))))
14370
14371(define-public python-semver
14372 (package
14373 (name "python-semver")
594280b1 14374 (version "2.9.0")
44d10b1f 14375 (source
2ecbba24
BG
14376 (origin
14377 (method url-fetch)
14378 (uri (pypi-uri "semver" version))
14379 (sha256
14380 (base32
14381 "183kg1rhzz3hqizvphkd8hlbf1zxfx8737zhfkmqzxi71jmdw7pd"))))
44d10b1f 14382 (build-system python-build-system)
44d10b1f
RW
14383 (native-inputs
14384 `(("python-tox" ,python-tox)
14385 ("python-virtualenv" ,python-virtualenv)))
14386 (home-page "https://github.com/k-bx/python-semver")
14387 (synopsis "Python helper for Semantic Versioning")
14388 (description "This package provides a Python library for
14389@url{Semantic Versioning, http://semver.org/}.")
14390 (license license:bsd-3)))
14391
14392(define-public python2-semver
14393 (package-with-python2 python-semver))
14394
14395(define-public python-pyro4
14396 (package
14397 (name "python-pyro4")
3ce91d44 14398 (version "4.77")
44d10b1f
RW
14399 (source
14400 (origin
14401 (method url-fetch)
14402 (uri (pypi-uri "Pyro4" version))
14403 (sha256
3ce91d44 14404 (base32 "0gsjg869y4gpy265s1gj1f2qy6jn5iz8r2bwwnq78r1r5yi15zib"))))
44d10b1f 14405 (build-system python-build-system)
3ce91d44
GL
14406 (arguments
14407 '(#:tests? #f)) ;FIXME: Some tests require network access.
14408 (native-inputs
14409 `(("python-cloudpickle" ,python-cloudpickle)
14410 ("python-dill" ,python-dill)
14411 ("python-msgpack" ,python-msgpack)))
44d10b1f
RW
14412 (propagated-inputs
14413 `(("python-serpent" ,python-serpent)))
14414 (home-page "https://pyro4.readthedocs.io")
14415 (synopsis "Distributed object middleware for Python")
14416 (description
14417 "Pyro enables you to build applications in which objects can talk to each
14418other over the network. You can just use normal Python method calls to call
14419objects on other machines, also known as remote procedure calls (RPC).")
14420 (license license:expat)))
14421
14422(define-public python2-pyro
14423 (package
14424 (name "python2-pyro")
14425 (version "3.16")
14426 (source
14427 (origin
14428 (method url-fetch)
14429 (uri (pypi-uri "Pyro" version))
14430 (file-name (string-append "Pyro-" version ".tar.gz"))
14431 (sha256
14432 (base32
14433 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
14434 (build-system python-build-system)
14435 (arguments
14436 ;; Pyro is not compatible with Python 3
14437 `(#:python ,python-2
14438 ;; Pyro has no test cases for automatic execution
14439 #:tests? #f))
14440 (home-page "http://pythonhosted.org/Pyro/")
14441 (synopsis "Distributed object manager for Python")
14442 (description "Pyro is a Distributed Object Technology system
14443written in Python that is designed to be easy to use. It resembles
14444Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
14445which is a system and language independent Distributed Object Technology
14446and has much more to offer than Pyro or RMI. Pyro 3.x is no
14447longer maintained. New projects should use Pyro4 instead, which
14448is the new Pyro version that is actively developed.")
14449 (license license:expat)))
14450
14451(define-public python2-scientific
14452 (package
14453 (name "python2-scientific")
14454 (version "2.9.4")
14455 (source
14456 (origin
c695f011
KH
14457 (method git-fetch)
14458 (uri (git-reference
14459 (url "https://github.com/khinsen/ScientificPython")
14460 (commit (string-append "rel" version))))
14461 (file-name (git-file-name name version))
44d10b1f
RW
14462 (sha256
14463 (base32
c695f011 14464 "16l48aj9fps9r7jyk8gpxppwrv0fqvlc13sayxskz28r5s6sjwbl"))))
44d10b1f
RW
14465 (build-system python-build-system)
14466 (inputs
14467 `(("netcdf" ,netcdf)))
14468 (propagated-inputs
14469 `(("python-numpy" ,python2-numpy-1.8)
14470 ("python-pyro" ,python2-pyro)))
14471 (arguments
14472 ;; ScientificPython is not compatible with Python 3
14473 `(#:python ,python-2
14474 #:tests? #f ; No test suite
14475 #:phases
14476 (modify-phases %standard-phases
14477 (replace 'build
14478 (lambda* (#:key inputs #:allow-other-keys)
77e61e25
RW
14479 (invoke "python" "setup.py" "build"
14480 (string-append "--netcdf_prefix="
14481 (assoc-ref inputs "netcdf"))))))))
c695f011 14482 (home-page "http://dirac.cnrs-orleans.fr/ScientificPython")
44d10b1f
RW
14483 (synopsis "Python modules for scientific computing")
14484 (description "ScientificPython is a collection of Python modules that are
14485useful for scientific computing. Most modules are rather general (Geometry,
14486physical units, automatic derivatives, ...) whereas others are more
14487domain-specific (e.g. netCDF and PDB support). The library is currently
14488not actively maintained and works only with Python 2 and NumPy < 1.9.")
14489 (license license:cecill-c)))
14490
14491(define-public python2-mmtk
14492 (package
14493 (name "python2-mmtk")
fe9b72c5 14494 (version "2.7.12")
44d10b1f
RW
14495 (source
14496 (origin
fe9b72c5
KH
14497 (method git-fetch)
14498 (uri (git-reference
14499 (url "https://github.com/khinsen/MMTK")
14500 (commit (string-append "rel" version))))
14501 (file-name (git-file-name name version))
44d10b1f
RW
14502 (sha256
14503 (base32
fe9b72c5 14504 "1fqwh3ba9jd42nigvn5shndgwb1zy7kh9520ncvqci7n8ffjr6p1"))))
44d10b1f
RW
14505 (build-system python-build-system)
14506 (native-inputs
14507 `(("netcdf" ,netcdf)))
14508 (propagated-inputs
14509 `(("python-scientific" ,python2-scientific)
14510 ("python-tkinter" ,python-2 "tk")))
14511 (arguments
14512 `(#:python ,python-2
14513 #:tests? #f
14514 #:phases
14515 (modify-phases %standard-phases
14516 (add-before 'build 'includes-from-scientific
14517 (lambda* (#:key inputs #:allow-other-keys)
14518 (mkdir-p "Include/Scientific")
14519 (copy-recursively
14520 (string-append
14521 (assoc-ref inputs "python-scientific")
14522 "/include/python2.7/Scientific")
14523 "Include/Scientific"))))))
14524 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
14525 (synopsis "Python library for molecular simulation")
14526 (description "MMTK is a library for molecular simulations with an emphasis
14527on biomolecules. It provides widely used methods such as Molecular Dynamics
14528and normal mode analysis, but also basic routines for implementing new methods
14529for simulation and analysis. The library is currently not actively maintained
14530and works only with Python 2 and NumPy < 1.9.")
14531 (license license:cecill-c)))
14532
14533(define-public python-phonenumbers
14534 (package
14535 (name "python-phonenumbers")
14536 (version "8.9.1")
14537 (source
14538 (origin
14539 (method url-fetch)
14540 (uri (pypi-uri "phonenumbers" version))
14541 (sha256
14542 (base32
14543 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
14544 (build-system python-build-system)
14545 (home-page
14546 "https://github.com/daviddrysdale/python-phonenumbers")
14547 (synopsis
14548 "Python library for dealing with international phone numbers")
14549 (description
14550 "This package provides a Python port of Google's libphonenumber library.")
14551 (license license:asl2.0)))
14552
14553(define-public python2-phonenumbers
14554 (package-with-python2 python-phonenumbers))
14555
14556(define-public python-send2trash
14557 (package
14558 (name "python-send2trash")
d9b0216b 14559 (version "1.5.0")
44d10b1f 14560 (source
d9b0216b 14561 (origin (method git-fetch)
44d10b1f 14562 ;; Source tarball on PyPI doesn't include tests.
d9b0216b
RW
14563 (uri (git-reference
14564 (url "https://github.com/hsoft/send2trash.git")
14565 (commit version)))
14566 (file-name (git-file-name name version))
44d10b1f
RW
14567 (sha256
14568 (base32
d9b0216b 14569 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
44d10b1f
RW
14570 (build-system python-build-system)
14571 (arguments
14572 '(#:phases
14573 (modify-phases %standard-phases
14574 (add-before 'check 'pre-check
14575 (lambda _
14576 (mkdir-p "/tmp/foo")
14577 (setenv "HOME" "/tmp/foo")
14578 #t)))))
14579 (home-page "https://github.com/hsoft/send2trash")
14580 (synopsis "Send files to the user's @file{~/Trash} directory")
14581 (description "This package provides a Python library to send files to the
14582user's @file{~/Trash} directory.")
20b3fde7 14583 (properties `((python2-variant . ,(delay python2-send2trash))))
44d10b1f
RW
14584 (license license:bsd-3)))
14585
14586(define-public python2-send2trash
14587 (package
f32164ab 14588 (inherit (package-with-python2 (strip-python2-variant python-send2trash)))
44d10b1f
RW
14589 (arguments
14590 (substitute-keyword-arguments (package-arguments python-send2trash)
14591 ((#:phases phases)
14592 `(modify-phases ,phases
14593 (add-before 'check 'setenv
14594 (lambda _
14595 (setenv "PYTHONPATH"
14596 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
4782a06f 14597 #t))))))))
44d10b1f
RW
14598
14599(define-public python-yapf
14600 (package
14601 (name "python-yapf")
19ba75dc 14602 (version "0.29.0")
44d10b1f
RW
14603 (source
14604 (origin
14605 (method url-fetch)
14606 (uri (pypi-uri "yapf" version))
14607 (sha256
14608 (base32
19ba75dc 14609 "1pj3xzblmbssshi889b6n9hwqbjpabw6j0fimlng2sshd3226bki"))))
44d10b1f
RW
14610 (build-system python-build-system)
14611 (home-page "https://github.com/google/yapf")
14612 (synopsis "Formatter for Python code")
14613 (description "YAPF is a formatter for Python code. It's based off of
14614@dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
14615takes the code and reformats it to the best formatting that conforms to the
14616style guide, even if the original code didn't violate the style guide.")
14617 (license license:asl2.0)))
14618
14619(define-public python2-yapf
14620 (package-with-python2 python-yapf))
14621
14622(define-public python-gyp
14623 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
14624 (revision "0"))
14625 (package
14626 (name "python-gyp")
14627 ;; Google does not release versions,
14628 ;; based on second most recent commit date.
14629 (version (git-version "0.0.0" revision commit))
14630 (source
14631 (origin
14632 ;; Google does not release tarballs,
14633 ;; git checkout is needed.
14634 (method git-fetch)
14635 (uri (git-reference
14636 (url "https://chromium.googlesource.com/external/gyp")
14637 (commit commit)))
14638 (file-name (git-file-name name version))
14639 (sha256
14640 (base32
14641 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
14642 (build-system python-build-system)
14643 (home-page "https://gyp.gsrc.io/")
14644 (synopsis "GYP is a Meta-Build system")
14645 (description
14646 "GYP builds build systems for large, cross platform applications.
14647It can be used to generate XCode projects, Visual Studio projects, Ninja build
14648files, and Makefiles.")
14649 (license license:bsd-3))))
14650
14651(define-public python2-gyp
14652 (package-with-python2 python-gyp))
14653
14654(define-public python-whatever
14655 (package
14656 (name "python-whatever")
97610a66 14657 (version "0.6")
44d10b1f
RW
14658 (source
14659 (origin
ac0ea38c
EF
14660 (method git-fetch)
14661 (uri (git-reference
14662 (url "https://github.com/Suor/whatever")
14663 (commit version)))
14664 (file-name (git-file-name name version))
44d10b1f 14665 (sha256
ac0ea38c 14666 (base32 "1q7ajgqjfivxqsqgnhp4lc4p6jxyh4zprcsdbpd6dw54inaf0av5"))))
44d10b1f
RW
14667 (build-system python-build-system)
14668 (arguments
14669 `(#:phases
14670 (modify-phases %standard-phases
14671 (replace 'check
14672 (lambda _
14673 (invoke "py.test"))))))
14674 (native-inputs
14675 `(("python-pytest" ,python-pytest)))
14676 (home-page "http://github.com/Suor/whatever")
14677 (synopsis "Make anonymous functions by partial application of operators")
14678 (description "@code{whatever} provides an easy way to make anonymous
14679functions by partial application of operators.")
14680 (license license:bsd-3)))
14681
14682(define-public python2-whatever
14683 (package-with-python2 python-whatever))
14684
14685(define-public python-funcy
14686 (package
14687 (name "python-funcy")
9e396ab8 14688 (version "1.11")
44d10b1f
RW
14689 (source
14690 (origin
a85c6027
TGR
14691 (method git-fetch)
14692 (uri (git-reference
14693 (url "https://github.com/Suor/funcy.git")
14694 (commit version)))
44d10b1f 14695 (sha256
a85c6027
TGR
14696 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
14697 (file-name (git-file-name name version))))
44d10b1f
RW
14698 (build-system python-build-system)
14699 (arguments
14700 `(#:phases
14701 (modify-phases %standard-phases
14702 (replace 'check
14703 (lambda _
14704 (invoke "py.test"))))))
14705 (native-inputs
14706 `(("python-pytest" ,python-pytest)
14707 ("python-whatever" ,python-whatever)))
14708 (home-page "http://github.com/Suor/funcy")
14709 (synopsis "Functional tools")
14710 (description "@code{funcy} is a library that provides functional tools.
14711Examples are:
14712@enumerate
14713@item merge - Merges collections of the same type
14714@item walk - Type-preserving map
14715@item select - Selects a part of a collection
14716@item take - Takes the first n items of a collection
14717@item first - Takes the first item of a collection
14718@item remove - Predicated-removes items of a collection
14719@item concat - Concatenates two collections
14720@item flatten - Flattens a collection with subcollections
14721@item distinct - Returns only distinct items
14722@item split - Predicated-splits a collection
14723@item split_at - Splits a collection at a given item
14724@item group_by - Groups items by group
14725@item pairwise - Pairs off adjacent items
14726@item partial - Partially-applies a function
14727@item curry - Curries a function
14728@item compose - Composes functions
14729@item complement - Complements a predicate
14730@item all_fn - \"all\" with predicate
14731@end enumerate")
14732 (license license:bsd-3)))
14733
14734(define-public python2-funcy
14735 (package-with-python2 python-funcy))
14736
14737(define-public python-isoweek
14738 (package
14739 (name "python-isoweek")
14740 (version "1.3.3")
14741 (source
14742 (origin
14743 (method url-fetch)
14744 (uri (pypi-uri "isoweek" version))
14745 (sha256
14746 (base32
14747 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
14748 (build-system python-build-system)
14749 (home-page "https://github.com/gisle/isoweek")
14750 (synopsis "Objects representing a week")
14751 (description "The @code{isoweek} module provide the class Week that
14752implements the week definition of ISO 8601. This standard also defines
14753a notation for identifying weeks; yyyyWww (where the W is a literal).
14754Week instances stringify to this form.")
14755 (license license:bsd-3)))
14756
14757(define-public python2-isoweek
14758 (package-with-python2 python-isoweek))
14759
14760(define-public python-tokenize-rt
14761 (package
14762 (name "python-tokenize-rt")
14763 (version "2.0.1")
14764 (source
14765 (origin
14766 (method url-fetch)
14767 (uri (pypi-uri "tokenize-rt" version))
14768 (sha256
14769 (base32
14770 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
14771 (build-system python-build-system)
14772 (home-page "https://github.com/asottile/tokenize-rt")
14773 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
14774 (description
14775 "This Python library is a wrapper around @code{tokenize} from the Python
14776standard library. It provides two additional tokens @code{ESCAPED_NL} and
14777@code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
14778and @code{tokens_to_src} to roundtrip.")
14779 (license license:expat)))
14780
14781(define-public python-future-fstrings
14782 (package
14783 (name "python-future-fstrings")
14784 (version "0.4.1")
14785 (source
14786 (origin
14787 (method url-fetch)
14788 (uri (pypi-uri "future_fstrings" version))
14789 (sha256
14790 (base32
14791 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
14792 (build-system python-build-system)
14793 (propagated-inputs
14794 `(("python-tokenize-rt" ,python-tokenize-rt)))
14795 (home-page "https://github.com/asottile/future-fstrings")
14796 (synopsis "Backport of fstrings to Python < 3.6")
14797 (description
14798 "This package provides a UTF-8 compatible encoding
14799@code{future_fstrings}, which performs source manipulation. It decodes the
14800source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
14801@code{f} strings.")
14802 (license license:expat)))
14803
dae2eb1c
MC
14804(define-public python-typed-ast
14805 (package
14806 (name "python-typed-ast")
bae89583 14807 (version "1.4.0")
dae2eb1c
MC
14808 (source
14809 (origin
bae89583
MO
14810 (method git-fetch)
14811 (uri (git-reference
14812 (url "https://github.com/python/typed_ast.git")
14813 (commit version)))
dae2eb1c 14814 (sha256
bae89583
MO
14815 (base32 "0l0hz809f7i356kmqkvfsaswiidb98j9hs9rrjnfawzqcbffzgyb"))
14816 (file-name (git-file-name name version))))
dae2eb1c
MC
14817 (build-system python-build-system)
14818 (arguments
14819 `(#:modules ((guix build utils)
14820 (guix build python-build-system)
14821 (ice-9 ftw)
14822 (srfi srfi-1)
14823 (srfi srfi-26))
14824 #:phases
14825 (modify-phases %standard-phases
14826 (replace 'check
14827 (lambda _
14828 (let ((cwd (getcwd)))
14829 (setenv "PYTHONPATH"
14830 (string-append cwd "/build/"
14831 (find (cut string-prefix? "lib" <>)
14832 (scandir (string-append cwd "/build")))
14833 ":"
14834 (getenv "PYTHONPATH"))))
14835 (invoke "pytest")
14836 #t)))))
14837 (native-inputs `(("python-pytest" ,python-pytest)))
14838 (home-page "https://github.com/python/typed_ast")
14839 (synopsis "Fork of Python @code{ast} modules with type comment support")
14840 (description "This package provides a parser similar to the standard
14841@code{ast} library. Unlike @code{ast}, the parsers in @code{typed_ast}
14842include PEP 484 type comments and are independent of the version of Python
14843under which they are run. The @code{typed_ast} parsers produce the standard
14844Python AST (plus type comments), and are both fast and correct, as they are
14845based on the CPython 2.7 and 3.7 parsers.")
14846 ;; See the file "LICENSE" for the details.
14847 (license (list license:psfl
14848 license:asl2.0
14849 license:expat)))) ;ast27/Parser/spark.py
14850
44d10b1f
RW
14851(define-public python-typing
14852 (package
14853 (name "python-typing")
559f5799 14854 (version "3.7.4.1")
44d10b1f
RW
14855 (source
14856 (origin
14857 (method url-fetch)
14858 (uri (pypi-uri "typing" version))
14859 (sha256
14860 (base32
559f5799 14861 "08xs7s5pyq99hbrzw23inczmidz90krvpv9q5p1qrvh6yzrydpwi"))))
44d10b1f
RW
14862 (build-system python-build-system)
14863 (home-page "https://docs.python.org/3/library/typing.html")
14864 (synopsis "Type hints for Python")
14865 (description "This is a backport of the standard library @code{typing}
14866module to Python versions older than 3.5. Typing defines a standard notation
14867for Python function and variable type annotations. The notation can be used
14868for documenting code in a concise, standard format, and it has been designed
14869to also be used by static and runtime type checkers, static analyzers, IDEs
14870and other tools.")
14871 (license license:psfl)))
14872
14873(define-public python2-typing
14874 (package-with-python2 python-typing))
14875
f89d443b
VC
14876(define-public python-typing-extensions
14877 (package
14878 (name "python-typing-extensions")
14879 (version "3.7.2")
14880 (source
14881 (origin
14882 (method url-fetch)
14883 (uri (pypi-uri "typing_extensions" version))
14884 (sha256
14885 (base32
14886 "0wfsv71pvkyf2na938l579jh0v3kzl6g744ijgnahcwd4d9x0b7v"))))
14887 (build-system python-build-system)
14888 (home-page
14889 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
14890 (synopsis "Experimental type hints for Python")
14891 (description
14892 "The typing_extensions module contains additional @code{typing} hints not
14893yet present in the of the @code{typing} standard library.
14894Included are implementations of:
14895@enumerate
14896@item ClassVar
14897@item ContextManager
14898@item Counter
14899@item DefaultDict
14900@item Deque
14901@item NewType
14902@item NoReturn
14903@item overload
14904@item Protocol
14905@item runtime
14906@item Text
14907@item Type
14908@item TYPE_CHECKING
14909@item AsyncGenerator
14910@end enumerate\n")
14911 (license license:psfl)))
14912
44d10b1f
RW
14913(define-public bpython
14914 (package
14915 (name "bpython")
4de93b2f 14916 (version "0.18")
44d10b1f
RW
14917 (source
14918 (origin
14919 (method url-fetch)
14920 (uri (pypi-uri "bpython" version))
14921 (sha256
4de93b2f 14922 (base32 "1hl6frgvr2lqaxqczl8amg9xih32b3gzv429vs0qrjb8wpdj1k2n"))))
44d10b1f
RW
14923 (build-system python-build-system)
14924 (arguments
14925 `(#:phases
14926 (modify-phases %standard-phases
14927 (add-after 'unpack 'remove-failing-test
14928 (lambda _
14929 ;; Remove failing test. FIXME: make it pass
14930 (delete-file "bpython/test/test_args.py")
14931 #t))
14932 (add-after 'wrap 'add-aliases
14933 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
14934 (lambda* (#:key outputs #:allow-other-keys)
14935 (let ((out (assoc-ref outputs "out")))
14936 (for-each
14937 (lambda (old new)
14938 (symlink old (string-append out "/bin/" new)))
14939 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
14940 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
14941 #t)))))
14942 (propagated-inputs
14943 `(("python-pygments" ,python-pygments)
14944 ("python-requests" ,python-requests)
4de93b2f 14945 ("python-babel" ,python-babel) ; optional, for internationalization
44d10b1f
RW
14946 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
14947 ("python-greenlet" ,python-greenlet)
4de93b2f 14948 ("python-urwid" ,python-urwid) ; for bpython-urwid only
44d10b1f
RW
14949 ("python-six" ,python-six)))
14950 (native-inputs
14951 `(("python-sphinx" ,python-sphinx)
14952 ("python-mock" ,python-mock)))
14953 (home-page "https://bpython-interpreter.org/")
14954 (synopsis "Fancy interface to the Python interpreter")
14955 (description "Bpython is a fancy interface to the Python
14956interpreter. bpython's main features are
14957
14958@enumerate
14959@item in-line syntax highlighting,
14960@item readline-like autocomplete with suggestions displayed as you type,
14961@item expected parameter list for any Python function,
14962@item \"rewind\" function to pop the last line of code from memory and
14963 re-evaluate,
14964@item send the code you've entered off to a pastebin,
14965@item save the code you've entered to a file, and
14966@item auto-indentation.
14967@end enumerate")
14968 (license license:expat)))
14969
14970(define-public bpython2
14971 (let ((base (package-with-python2
14972 (strip-python2-variant bpython))))
14973 (package (inherit base)
14974 (name "bpython2")
14975 (arguments
14976 `(#:python ,python-2
14977 #:phases
14978 (modify-phases %standard-phases
14979 (add-after 'unpack 'remove-failing-test
14980 (lambda _
14981 ;; Remove failing test. FIXME: make it pass
14982 (delete-file "bpython/test/test_args.py")
14983 ;; Disable failing test-cases (renaming inhibits they are
14984 ;; discovered)
14985 (substitute* "bpython/test/test_curtsies_repl.py"
14986 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
14987 (string-append a "xxx_off_" b))
14988 (("^(\\s*def )(test_complex\\W)" _ a b)
14989 (string-append a "xxx_off_" b)))
14990 #t))
14991 (add-before 'build 'rename-scripts
14992 ;; rename the scripts to bypthon2, bpdb2, etc.
14993 (lambda _
14994 (substitute* "setup.py"
14995 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
14996 (string-append name "2" rest "\n"))
14997 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
14998 (string-append name "2" (or sub "") rest "\n")))
14999 #t))))))))
15000
15001(define-public python-pyinotify
15002 (package
15003 (name "python-pyinotify")
15004 (version "0.9.6")
15005 (source (origin
15006 (method url-fetch)
15007 (uri (pypi-uri "pyinotify" version))
15008 (sha256
15009 (base32
15010 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
15011 (build-system python-build-system)
15012 (arguments `(#:tests? #f)) ;no tests
15013 (home-page "https://github.com/seb-m/pyinotify")
15014 (synopsis "Python library for monitoring inotify events")
15015 (description
15016 "@code{pyinotify} provides a Python interface for monitoring
15017file system events on Linux.")
15018 (license license:expat)))
15019
15020(define-public python2-pyinotify
15021 (package-with-python2 python-pyinotify))
15022
15023;; Ada parser uses this version.
15024(define-public python2-quex-0.67.3
15025 (package
15026 (name "python2-quex")
15027 (version "0.67.3")
15028 (source
15029 (origin
15030 (method url-fetch)
15031 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
15032 (version-major+minor version)
15033 "/quex-" version ".zip"))
15034 (sha256
15035 (base32
15036 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
15037 (build-system python-build-system)
15038 (native-inputs
15039 `(("unzip" ,unzip)))
15040 (arguments
15041 `(#:python ,python-2
15042 #:tests? #f
15043 #:phases
15044 (modify-phases %standard-phases
15045 (delete 'configure)
15046 (delete 'build)
15047 (replace 'install
15048 (lambda* (#:key outputs #:allow-other-keys)
15049 (let* ((out (assoc-ref outputs "out"))
15050 (share/quex (string-append out "/share/quex"))
15051 (bin (string-append out "/bin")))
15052 (copy-recursively "." share/quex)
15053 (mkdir-p bin)
15054 (symlink (string-append share/quex "/quex-exe.py")
15055 (string-append bin "/quex"))
15056 #t))))))
15057 (native-search-paths
15058 (list (search-path-specification
15059 (variable "QUEX_PATH")
15060 (files '("share/quex")))))
15061 (home-page "http://quex.sourceforge.net/")
15062 (synopsis "Lexical analyzer generator in Python")
15063 (description "@code{quex} is a lexical analyzer generator in Python.")
15064 (license license:lgpl2.1+))) ; Non-military
15065
15066(define-public python2-quex
15067 (package (inherit python2-quex-0.67.3)
15068 (name "python2-quex")
15069 (version "0.68.1")
15070 (source
15071 (origin
15072 (method url-fetch)
15073 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
15074 (sha256
15075 (base32
15076 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
15077 (file-name (string-append name "-" version ".tar.gz"))))))
15078
15079(define-public python-more-itertools
15080 (package
15081 (name "python-more-itertools")
a9d1da17 15082 (version "8.1.0")
44d10b1f
RW
15083 (source
15084 (origin
15085 (method url-fetch)
15086 (uri (pypi-uri "more-itertools" version))
15087 (sha256
15088 (base32
a9d1da17 15089 "121j5nsz017r8ry2vabx4wb13srlvfjvhk0i38lbd043aznass64"))))
44d10b1f 15090 (build-system python-build-system)
44d10b1f
RW
15091 (home-page "https://github.com/erikrose/more-itertools")
15092 (synopsis "More routines for operating on iterables, beyond itertools")
15093 (description "Python's built-in @code{itertools} module implements a
15094number of iterator building blocks inspired by constructs from APL, Haskell,
15095and SML. @code{more-itertools} includes additional building blocks for
15096working with iterables.")
47f66348 15097 (properties `((python2-variant . ,(delay python2-more-itertools))))
44d10b1f
RW
15098 (license license:expat)))
15099
47f66348 15100;; The 5.x series are the last versions supporting Python 2.7.
44d10b1f 15101(define-public python2-more-itertools
47f66348
MB
15102 (package
15103 (inherit python-more-itertools)
15104 (name "python2-more-itertools")
15105 (version "5.0.0")
15106 (source (origin
15107 (method url-fetch)
15108 (uri (pypi-uri "more-itertools" version))
15109 (sha256
15110 (base32
15111 "1r12cm6mcdwdzz7d47a6g4l437xsvapdlgyhqay3i2nrlv03da9q"))))
15112 (arguments
15113 `(#:python ,python2-minimal))
15114 (propagated-inputs
15115 `(("python2-six" ,python2-six-bootstrap)))))
44d10b1f
RW
15116
15117(define-public python-latexcodec
15118 (package
15119 (name "python-latexcodec")
f3415ba5 15120 (version "1.0.7")
44d10b1f
RW
15121 (source
15122 (origin
15123 (method url-fetch)
15124 (uri (pypi-uri "latexcodec" version))
15125 (sha256
f3415ba5 15126 (base32 "0wnp3yqcgx0rpy8dz51vh75lbp2qif67da19zi7m3ca98n887hgb"))))
44d10b1f
RW
15127 (build-system python-build-system)
15128 (inputs
15129 `(("python-six" ,python-six)))
15130 (home-page "https://readthedocs.org/projects/latexcodec/")
15131 (synopsis "Work with LaTeX code in Python")
15132 (description "Lexer and codec to work with LaTeX code in Python.")
15133 (license license:expat)))
15134
15135(define-public python-pybtex
15136 (package
15137 (name "python-pybtex")
9441a9c1 15138 (version "0.22.2")
44d10b1f
RW
15139 (source
15140 (origin
15141 (method url-fetch)
15142 (uri (pypi-uri "pybtex" version))
15143 (sha256
9441a9c1 15144 (base32 "070wfcmxrd7xg1si421mi9150gmx2qwx431nwf69sq3hhmgnx080"))))
44d10b1f
RW
15145 (build-system python-build-system)
15146 (native-inputs
15147 `(("python-nose" ,python-nose)))
15148 (inputs
15149 `(("python-latexcodec" ,python-latexcodec)
15150 ("python-pyyaml" ,python-pyyaml)
15151 ("python-six" ,python-six)))
15152 (arguments
15153 `(#:test-target "nosetests"))
15154 (home-page "https://pybtex.org/")
15155 (synopsis "BibTeX-compatible bibliography processor")
15156 (description "Pybtex is a BibTeX-compatible bibliography processor written
15157in Python. You can simply type pybtex instead of bibtex.")
15158 (license license:expat)))
15159
15160(define-public python-onetimepass
15161 (package
15162 (name "python-onetimepass")
15163 (version "1.0.1")
15164 (source
15165 (origin
15166 (method url-fetch)
15167 (uri (pypi-uri "onetimepass" version))
15168 (sha256
15169 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
15170 (build-system python-build-system)
15171 (propagated-inputs `(("python-six" ,python-six)))
15172 (home-page "https://github.com/tadeck/onetimepass/")
15173 (synopsis "One-time password library")
15174 (description "Python one-time password library for HMAC-based (HOTP) and
15175time-based (TOTP) passwords.")
15176 (license license:expat)))
15177
15178(define-public python-parso
15179 (package
15180 (name "python-parso")
1475094a 15181 (version "0.5.1")
44d10b1f
RW
15182 (source
15183 (origin
15184 (method url-fetch)
15185 (uri (pypi-uri "parso" version))
15186 (sha256
15187 (base32
1475094a 15188 "171a9ivhxwsd52h1cgsz40zgzpgzscn7yqb7sdjhy8m1lzj0wsv6"))))
44d10b1f
RW
15189 (native-inputs
15190 `(("python-pytest" ,python-pytest)))
15191 (build-system python-build-system)
4eb97c25
MC
15192 (arguments
15193 `(#:phases (modify-phases %standard-phases
15194 (replace 'check
15195 (lambda _ (invoke "pytest" "-vv"))))))
44d10b1f
RW
15196 (home-page "https://github.com/davidhalter/parso")
15197 (synopsis "Python Parser")
15198 (description "Parso is a Python parser that supports error recovery and
15199round-trip parsing for different Python versions (in multiple Python versions).
15200Parso is also able to list multiple syntax errors in your Python file.")
15201 (license license:expat)))
15202
15203(define-public python2-parso
15204 (package-with-python2 python-parso))
15205
15206(define-public python-async-generator
15207 (package
15208 (name "python-async-generator")
94fcbf8d 15209 (version "1.10")
44d10b1f
RW
15210 (source
15211 (origin
15212 (method url-fetch)
15213 (uri (pypi-uri "async_generator" version))
15214 (sha256
15215 (base32
94fcbf8d 15216 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
44d10b1f
RW
15217 (build-system python-build-system)
15218 (native-inputs
15219 `(("python-pytest" ,python-pytest)))
15220 (home-page "https://github.com/python-trio/async_generator")
15221 (synopsis "Async generators and context managers for Python 3.5+")
15222 (description "@code{async_generator} back-ports Python 3.6's native async
15223generators and Python 3.7's context managers into Python 3.5.")
15224 ;; Dual licensed.
15225 (license (list license:expat license:asl2.0))))
15226
15227(define-public python-async-timeout
15228 (package
15229 (name "python-async-timeout")
15230 (version "3.0.1")
15231 (source
15232 (origin
15233 (method url-fetch)
15234 (uri (pypi-uri "async-timeout" version))
15235 (sha256
15236 (base32
15237 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
15238 (build-system python-build-system)
15239 (home-page "https://github.com/aio-libs/async_timeout/")
15240 (synopsis "Timeout context manager for asyncio programs")
15241 (description "@code{async-timeout} provides a timeout timeout context
15242manager compatible with @code{asyncio}.")
15243 (license license:asl2.0)))
15244
15245(define-public python-glob2
15246 (package
15247 (name "python-glob2")
4df49d19 15248 (version "0.7")
8fa2bcc7
TGR
15249 (source
15250 (origin
15251 (method git-fetch)
15252 (uri (git-reference
15253 (url "https://github.com/miracle2k/python-glob2.git")
4df49d19 15254 (commit (string-append "v" version))))
8fa2bcc7
TGR
15255 (file-name (git-file-name name version))
15256 (sha256
4df49d19 15257 (base32 "160nh2ay9lw2hi0rixpzb2k87r6ql56k0j2cm87lqz8xc8zbw919"))))
44d10b1f
RW
15258 (build-system python-build-system)
15259 (home-page "https://github.com/miracle2k/python-glob2/")
15260 (synopsis "Extended Version of the python buildin glob module")
15261 (description "This is an extended version of the Python
15262@url{http://docs.python.org/library/glob.html, built-in glob module} which
15263adds:
15264
15265@itemize
15266@item The ability to capture the text matched by glob patterns, and return
15267those matches alongside the file names.
15268@item A recursive @code{**} globbing syntax, akin for example to the
15269@code{globstar} option of Bash.
15270@item The ability to replace the file system functions used, in order to glob
15271on virtual file systems.
15272@item Compatible with Python 2 and Python 3 (tested with 3.3).
15273@end itemize
15274
15275Glob2 currently based on the glob code from Python 3.3.1.")
15276 (license license:bsd-2)))
15277
15278(define-public python2-glob2
15279 (package-with-python2 python-glob2))
15280
15281(define-public python-gipc
15282 (package
15283 (name "python-gipc")
15284 (version "0.6.0")
15285 (source
15286 (origin
15287 (method url-fetch)
15288 (uri (pypi-uri "gipc" version ".zip"))
15289 (sha256
15290 (base32
15291 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
15292 (build-system python-build-system)
15293 (native-inputs
15294 `(("unzip" ,unzip)))
15295 (propagated-inputs
15296 `(("python-gevent" ,python-gevent)))
15297 (home-page "http://gehrcke.de/gipc")
15298 (synopsis "Child process management in the context of gevent")
15299 (description "Usage of Python's multiprocessing package in a
15300gevent-powered application may raise problems. With @code{gipc},
15301process-based child processes can safely be created anywhere within a
15302gevent-powered application.")
15303 (license license:expat)))
15304
15305(define-public python2-gipc
15306 (package-with-python2 python-gipc))
15307
15308(define-public python-fusepy
15309 (package
15310 (name "python-fusepy")
15311 (version "2.0.4")
15312 (source
15313 (origin
15314 (method url-fetch)
15315 (uri (pypi-uri "fusepy" version))
15316 (sha256
15317 (base32
15318 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
15319 (build-system python-build-system)
15320 (arguments
15321 `(#:phases
15322 (modify-phases %standard-phases
15323 (add-before 'build 'set-library-file-name
15324 (lambda* (#:key inputs #:allow-other-keys)
15325 (let ((fuse (assoc-ref inputs "fuse")))
15326 (substitute* "fuse.py"
15327 (("find_library\\('fuse'\\)")
15328 (string-append "'" fuse "/lib/libfuse.so'")))
15329 #t))))))
15330 (propagated-inputs
15331 `(("fuse" ,fuse)))
15332 (home-page "https://github.com/fusepy/fusepy")
15333 (synopsis "Simple ctypes bindings for FUSE")
15334 (description "Python module that provides a simple interface to FUSE and
15335MacFUSE. The binding is created using the standard @code{ctypes} library.")
15336 (license license:isc)))
15337
15338(define-public python2-fusepy
15339 (package-with-python2 python-fusepy))
15340
15341(define-public python2-gdrivefs
15342 (package
15343 (name "python2-gdrivefs")
15344 (version "0.14.9")
15345 (source
15346 (origin
15347 (method url-fetch)
15348 (uri (pypi-uri "gdrivefs" version))
15349 (sha256
15350 (base32
15351 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
15352 (build-system python-build-system)
15353 (arguments
15354 `(#:python ,python-2
15355 #:phases
15356 (modify-phases %standard-phases
15357 (add-before 'build 'patch-setup-py
15358 (lambda _
15359 ;; Update requirements from dependency==version
15360 ;; to dependency>=version
15361 (substitute* "gdrivefs/resources/requirements.txt"
15362 (("==") ">="))
15363 #t)))))
15364 (native-inputs
15365 `(("python2-gipc" ,python2-gipc)
15366 ("python2-gevent" ,python2-gevent)
15367 ("python2-greenlet" ,python2-greenlet)
15368 ("python2-httplib2" ,python2-httplib2)
15369 ("python2-uritemplate" ,python2-uritemplate)
15370 ("python2-oauth2client" ,python2-oauth2client)
15371 ("python2-six" ,python2-six)))
15372 (propagated-inputs
15373 `(("python2-dateutil" ,python2-dateutil)
15374 ("python2-fusepy" ,python2-fusepy)
15375 ("python2-google-api-client" ,python2-google-api-client)))
15376 (home-page "https://github.com/dsoprea/GDriveFS")
15377 (synopsis "Mount Google Drive as a local file system")
15378 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
15379under Python 2.7.")
15380 (license license:gpl2)))
15381
15382(define-public pybind11
15383 (package
15384 (name "pybind11")
d478cc04 15385 (version "2.3.0")
44d10b1f
RW
15386 (source (origin
15387 (method git-fetch)
15388 (uri (git-reference
15389 (url "https://github.com/pybind/pybind11.git")
15390 (commit (string-append "v" version))))
15391 (sha256
15392 (base32
d478cc04 15393 "11b6dniri8m05spfd2a19irz82shf4sdca73566bniggrf3zclnf"))
44d10b1f
RW
15394 (file-name (git-file-name name version))))
15395 (build-system cmake-build-system)
15396 (native-inputs
15397 `(("python" ,python)
15398 ("python-pytest" ,python-pytest)))
15399 (arguments
15400 `(#:test-target "check"))
15401 (home-page "https://github.com/pybind/pybind11/")
15402 (synopsis "Seamless operability between C++11 and Python")
15403 (description "pybind11 is a lightweight header-only library that exposes
15404C++ types in Python and vice versa, mainly to create Python bindings of
15405existing C++ code. Its goals and syntax are similar to the excellent
15406Boost.Python library by David Abrahams: to minimize boilerplate code in
15407traditional extension modules by inferring type information using compile-time
15408introspection.")
15409 (license license:expat)))
15410
15411(define-public python-fasteners
15412 (package
15413 (name "python-fasteners")
15414 (version "0.14.1")
15415 (source
15416 (origin
15417 (method url-fetch)
15418 (uri (pypi-uri "fasteners" version))
15419 (sha256
15420 (base32
15421 "063y20kx01ihbz2mziapmjxi2cd0dq48jzg587xdsdp07xvpcz22"))))
15422 (build-system python-build-system)
15423 (propagated-inputs
15424 `(("python-monotonic" ,python-monotonic)
15425 ("python-six" ,python-six)
15426 ("python-testtools" ,python-testtools)))
15427 (home-page "https://github.com/harlowja/fasteners")
15428 (synopsis "Python package that provides useful locks")
15429 (description
15430 "This package provides a Python program that provides following locks:
15431
15432@itemize
15433@item Locking decorator
15434@item Reader-writer locks
15435@item Inter-process locks
15436@item Generic helpers
15437@end itemize\n")
15438 (properties `((python2-variant . ,(delay python2-fasteners))))
15439 (license license:asl2.0)))
15440
15441(define-public python2-fasteners
15442 (let ((base (package-with-python2 (strip-python2-variant python-fasteners))))
15443 (package
15444 (inherit base)
15445 (propagated-inputs
15446 `(("python2-futures" ,python2-futures)
15447 ,@(package-propagated-inputs base))))))
15448
15449(define-public python-requests-file
15450 (package
15451 (name "python-requests-file")
15452 (version "1.4.3")
15453 (source
15454 (origin
15455 (method url-fetch)
15456 (uri (pypi-uri "requests-file" version))
15457 (sha256
15458 (base32
15459 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
15460 (build-system python-build-system)
15461 (propagated-inputs
15462 `(("python-requests" ,python-requests)
15463 ("python-six" ,python-six)))
15464 (home-page
15465 "https://github.com/dashea/requests-file")
15466 (synopsis "File transport adapter for Requests")
15467 (description
15468 "Requests-File is a transport adapter for use with the Requests Python
52beae7b 15469library to allow local file system access via @code{file://} URLs.")
44d10b1f
RW
15470 (license license:asl2.0)))
15471
15472(define-public python2-requests-file
15473 (package-with-python2 python-requests-file))
15474
15475(define-public python-tldextract
15476 (package
15477 (name "python-tldextract")
15478 (version "2.2.0")
15479 (source
15480 (origin
15481 (method url-fetch)
15482 (uri (pypi-uri "tldextract" version))
15483 (sha256
15484 (base32
15485 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
15486 (build-system python-build-system)
15487 (native-inputs
15488 `(("python-pytest" ,python-pytest)
15489 ("python-responses" ,python-responses)))
15490 (propagated-inputs
15491 `(("python-idna" ,python-idna)
15492 ("python-requests" ,python-requests)
15493 ("python-requests-file" ,python-requests-file)))
15494 (home-page
15495 "https://github.com/john-kurkowski/tldextract")
15496 (synopsis
15497 "Separate the TLD from the registered domain and subdomains of a URL")
15498 (description
15499 "TLDExtract accurately separates the TLD from the registered domain and
15500subdomains of a URL, using the Public Suffix List. By default, this includes
15501the public ICANN TLDs and their exceptions. It can optionally support the
15502Public Suffix List's private domains as well.")
15503 (license license:bsd-3)))
15504
15505(define-public python2-tldextract
15506 (package-with-python2 python-tldextract))
15507
15508(define-public python-pynamecheap
15509 (package
15510 (name "python-pynamecheap")
15511 (version "0.0.3")
15512 (source
15513 (origin
15514 (method url-fetch)
15515 (uri (pypi-uri "PyNamecheap" version))
15516 (sha256
15517 (base32
15518 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
15519 (build-system python-build-system)
15520 (propagated-inputs
15521 `(("python-requests" ,python-requests)))
15522 (home-page
15523 "https://github.com/Bemmu/PyNamecheap")
15524 (synopsis
15525 "Namecheap API client in Python")
15526 (description
15527 "PyNamecheap is a Namecheap API client in Python.")
15528 (license license:expat)))
15529
15530(define-public python2-pynamecheap
15531 (package-with-python2 python-pynamecheap))
15532
15533(define-public python-dns-lexicon
15534 (package
15535 (name "python-dns-lexicon")
15536 (version "2.4.0")
15537 (source
15538 (origin
15539 (method url-fetch)
15540 (uri (pypi-uri "dns-lexicon" version))
15541 (sha256
15542 (base32
15543 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
15544 (build-system python-build-system)
15545 (arguments
15546 `(#:tests? #f)) ;requires internet access
15547 (propagated-inputs
15548 `(("python-future" ,python-future)
15549 ("python-pynamecheap" ,python-pynamecheap)
15550 ("python-requests" ,python-requests)
15551 ("python-tldextract" ,python-tldextract)
15552 ("python-urllib3" ,python-urllib3)))
15553 (home-page "https://github.com/AnalogJ/lexicon")
15554 (synopsis
15555 "Manipulate DNS records on various DNS providers")
15556 (description
15557 "Lexicon provides a way to manipulate DNS records on multiple DNS
15558providers in a standardized way. It has a CLI but it can also be used as a
15559Python library. It was designed to be used in automation, specifically with
15560Let's Encrypt.")
15561 (license license:expat)))
15562
15563(define-public python2-dns-lexicon
15564 (package-with-python2 python-dns-lexicon))
15565
15566(define-public python-commandlines
15567 (package
15568 (name "python-commandlines")
15569 (version "0.4.1")
15570 (source
15571 (origin
15572 (method url-fetch)
15573 (uri (pypi-uri "commandlines" version))
15574 (sha256
15575 (base32
15576 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
15577 (build-system python-build-system)
15578 (home-page "https://github.com/chrissimpkins/commandlines")
15579 (synopsis "Command line argument to object parsing library")
15580 (description
15581 "@code{Commandlines} is a Python library for command line application
15582development that supports command line argument parsing, command string
15583validation testing and application logic.")
15584 (license license:expat)))
15585
15586;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
15587;; python-numba. They have a very unflexible relationship.
15588(define-public python-numba
15589 (package
15590 (name "python-numba")
65f84096 15591 (version "0.46.0")
44d10b1f
RW
15592 (source
15593 (origin
15594 (method url-fetch)
15595 (uri (pypi-uri "numba" version))
15596 (sha256
15597 (base32
65f84096 15598 "1vnfzcq6fcnkmdms6114d49awvvj5181fl7z1wlha27qc2paxjy2"))))
44d10b1f
RW
15599 (build-system python-build-system)
15600 (arguments
15601 `(#:modules ((guix build utils)
15602 (guix build python-build-system)
15603 (ice-9 ftw)
15604 (srfi srfi-1)
15605 (srfi srfi-26))
15606 #:phases
15607 (modify-phases %standard-phases
15608 (add-after 'unpack 'disable-proprietary-features
15609 (lambda _
15610 (setenv "NUMBA_DISABLE_HSA" "1")
15611 (setenv "NUMBA_DISABLE_CUDA" "1")
15612 #t))
15613 (add-after 'unpack 'remove-failing-tests
15614 (lambda _
65f84096 15615 ;; FIXME: These tests fail for unknown reasons:
44d10b1f
RW
15616 ;; test_non_writable_pycache, test_non_creatable_pycache, and
15617 ;; test_frozen (all in numba.tests.test_dispatcher.TestCache).
15618 (substitute* "numba/tests/test_dispatcher.py"
15619 (("def test(_non_writable_pycache)" _ m)
15620 (string-append "def guix_skip" m))
15621 (("def test(_non_creatable_pycache)" _ m)
15622 (string-append "def guix_skip" m))
15623 (("def test(_frozen)" _ m)
15624 (string-append "def guix_skip" m)))
15625
15626 ;; These tests fail because we don't run the tests from the build
15627 ;; directory: test_setup_py_distutils, test_setup_py_setuptools
65f84096 15628 ;; They are in numba.tests.test_pycc.TestDistutilsSupport.
44d10b1f
RW
15629 (substitute* "numba/tests/test_pycc.py"
15630 (("def test(_setup_py_distutils|_setup_py_setuptools)" _ m)
15631 (string-append "def guix_skip" m)))
65f84096
BG
15632
15633 ;; These tests fail because our version of Python does not have
15634 ;; a recognizable front-end for the Numba distribution to use
15635 ;; to check against.
15636 (substitute* "numba/tests/test_entrypoints.py"
15637 (("def test(_init_entrypoint)" _ m)
15638 (string-append "def guix_skip" m)))
15639 (substitute* "numba/tests/test_jitclasses.py"
15640 (("def test(_jitclass_longlabel_not_truncated)" _ m)
15641 (string-append "def guix_skip" m)))
44d10b1f
RW
15642 #t))
15643 (replace 'check
15644 (lambda _
15645 (let ((cwd (getcwd)))
15646 (setenv "PYTHONPATH"
15647 (string-append cwd "/build/"
15648 (find (cut string-prefix? "lib" <>)
15649 (scandir (string-append cwd "/build")))
15650 ":"
15651 (getenv "PYTHONPATH")))
15652 ;; Something is wrong with the PYTHONPATH when running the
15653 ;; tests from the build directory, as it complains about not being
15654 ;; able to import certain modules.
15655 (with-directory-excursion "/tmp"
15656 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))
15657 #t)))))
15658 (propagated-inputs
15659 `(("python-llvmlite" ,python-llvmlite)
15660 ("python-numpy" ,python-numpy)
15661 ("python-singledispatch" ,python-singledispatch)))
15662 ;; Needed for tests.
15663 (inputs
15664 `(("python-jinja2" ,python-jinja2)
15665 ("python-pygments" ,python-pygments)))
15666 (home-page "https://numba.pydata.org")
15667 (synopsis "Compile Python code using LLVM")
15668 (description "Numba gives you the power to speed up your applications with
15669high performance functions written directly in Python. With a few
15670annotations, array-oriented and math-heavy Python code can be just-in-time
15671compiled to native machine instructions, similar in performance to C, C++ and
15672Fortran, without having to switch languages or Python interpreters.
15673
15674Numba works by generating optimized machine code using the LLVM compiler
15675infrastructure at import time, runtime, or statically (using the included pycc
15676tool).")
15677 (license license:bsd-3)))
15678
15679(define-public python-anndata
15680 (package
15681 (name "python-anndata")
8c9372c1 15682 (version "0.6.18")
44d10b1f
RW
15683 (source
15684 (origin
15685 (method url-fetch)
15686 (uri (pypi-uri "anndata" version))
15687 (sha256
15688 (base32
8c9372c1 15689 "03x83yjaccbqszj7x4fwwmpil0ai59yx64d1zmf2691za3j03w73"))))
44d10b1f
RW
15690 (build-system python-build-system)
15691 (propagated-inputs
15692 `(("python-h5py" ,python-h5py)
15693 ("python-natsort" ,python-natsort)
15694 ("python-pandas" ,python-pandas)
15695 ("python-scipy" ,python-scipy)))
15696 (home-page "https://github.com/theislab/anndata")
15697 (synopsis "Annotated data for data analysis pipelines")
15698 (description "Anndata is a package for simple (functional) high-level APIs
15699for data analysis pipelines. In this context, it provides an efficient,
15700scalable way of keeping track of data together with learned annotations and
15701reduces the code overhead typically encountered when using a mostly
15702object-oriented library such as @code{scikit-learn}.")
15703 (license license:bsd-3)))
15704
15705(define-public python-dill
15706 (package
15707 (name "python-dill")
32be3577 15708 (version "0.3.1.1")
44d10b1f
RW
15709 (source
15710 (origin
15711 (method url-fetch)
15712 (uri (pypi-uri "dill" version))
15713 (sha256
32be3577 15714 (base32 "1704g8z70d210ksgbccs2v545v9w0wc6lx15m296alb7jf0yzn22"))))
44d10b1f 15715 (build-system python-build-system)
32be3577
MIP
15716 (arguments
15717 `(#:phases
15718 (modify-phases %standard-phases
15719 (replace 'check
15720 (lambda _
15721 (with-directory-excursion "/tmp"
15722 (invoke "nosetests" "-v"))
15723 #t)))))
15724 (native-inputs
15725 `(("python-nose" ,python-nose)))
15726 (home-page "https://pypi.org/project/dill/")
44d10b1f
RW
15727 (synopsis "Serialize all of Python")
15728 (description "Dill extends Python's @code{pickle} module for serializing
15729and de-serializing Python objects to the majority of the built-in Python
15730types. Dill provides the user the same interface as the @code{pickle} module,
15731and also includes some additional features. In addition to pickling Python
15732objects, @code{dill} provides the ability to save the state of an interpreter
61985d65 15733session in a single command. Hence, it would be feasible to save a
44d10b1f
RW
15734interpreter session, close the interpreter, ship the pickled file to another
15735computer, open a new interpreter, unpickle the session and thus continue from
15736the saved state of the original interpreter session.")
15737 (license license:bsd-3)))
15738
15739(define-public python-multiprocess
15740 (package
15741 (name "python-multiprocess")
fcc4e9e7 15742 (version "0.70.9")
44d10b1f
RW
15743 (source
15744 (origin
15745 (method url-fetch)
15746 (uri (pypi-uri "multiprocess" version))
15747 (sha256
15748 (base32
fcc4e9e7 15749 "1r882nvd44xqwbrclwqx5rhs80l6809rcvpc7pkpgnij06cvvmcz"))))
44d10b1f 15750 (build-system python-build-system)
fcc4e9e7
MIP
15751 (arguments
15752 `(#:phases
15753 (modify-phases %standard-phases
15754 (add-after 'unpack 'disable-broken-tests
15755 (lambda _
15756 ;; This test is broken as there is no keyboard interrupt.
15757 (substitute* "py3.7/multiprocess/tests/__init__.py"
15758 (("^(.*)def test_wait_result"
15759 line indent)
15760 (string-append indent
15761 "@unittest.skip(\"Disabled by Guix\")\n"
15762 line)))
15763 #t))
15764 ;; Tests must be run after installation.
15765 (delete 'check)
15766 (add-after 'install 'check
15767 (lambda* (#:key inputs outputs #:allow-other-keys)
15768 (add-installed-pythonpath inputs outputs)
15769 (invoke "python" "-m" "multiprocess.tests")
15770 #t)))))
44d10b1f
RW
15771 (propagated-inputs
15772 `(("python-dill" ,python-dill)))
fcc4e9e7 15773 (home-page "https://pypi.org/project/multiprocess/")
44d10b1f
RW
15774 (synopsis "Multiprocessing and multithreading in Python")
15775 (description
15776 "This package is a fork of the multiprocessing Python package, a package
15777which supports the spawning of processes using the API of the standard
15778library's @code{threading} module.")
15779 (license license:bsd-3)))
15780
15781(define-public python-toolz
15782 (package
15783 (name "python-toolz")
15784 (version "0.9.0")
15785 (source
15786 (origin
15787 (method url-fetch)
15788 (uri (pypi-uri "toolz" version))
15789 (sha256
15790 (base32
15791 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
15792 (build-system python-build-system)
15793 ;; FIXME: tests cannot be computed: "Can't perform this operation for
15794 ;; unregistered loader type"
15795 (arguments '(#:tests? #f))
15796 (home-page "https://github.com/pytoolz/toolz/")
15797 (synopsis "List processing tools and functional utilities")
15798 (description
15799 "This package provides a set of utility functions for iterators,
15800functions, and dictionaries.")
15801 (license license:bsd-3)))
15802
15803(define-public python2-toolz
15804 (package-with-python2 python-toolz))
15805
15806(define-public python-cytoolz
15807 (package
15808 (name "python-cytoolz")
15809 (version "0.9.0.1")
15810 (source
15811 (origin
15812 (method url-fetch)
15813 (uri (pypi-uri "cytoolz" version))
15814 (sha256
15815 (base32
15816 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
15817 (build-system python-build-system)
15818 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
15819 ;; 'exceptions'"
15820 (arguments '(#:tests? #f))
15821 (propagated-inputs
15822 `(("python-toolz" ,python-toolz)))
15823 (native-inputs
15824 `(("python-cython" ,python-cython)))
15825 (home-page "https://github.com/pytoolz/cytoolz")
15826 (synopsis "High performance functional utilities")
15827 (description
15828 "The cytoolz package implements the same API as provided by toolz. The
15829main differences are that @code{cytoolz} is faster and cytoolz offers a C API
15830that is accessible to other projects developed in Cython.")
15831 (license license:bsd-3)))
15832
15833(define-public python-sortedcontainers
15834 (package
15835 (name "python-sortedcontainers")
b244f166 15836 (version "2.1.0")
44d10b1f
RW
15837 (source
15838 (origin
15839 (method url-fetch)
15840 (uri (pypi-uri "sortedcontainers" version))
15841 (sha256
15842 (base32
b244f166 15843 "0fm0w5id2yhqld95hg2m636vjgkz377rvgdfqaxc25vbylr9lklp"))))
44d10b1f 15844 (build-system python-build-system)
4c2530af
MB
15845 (arguments
15846 ;; FIXME: Tests require many extra dependencies, and would introduce
15847 ;; a circular dependency on hypothesis, which uses this package.
15848 '(#:tests? #f))
44d10b1f
RW
15849 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
15850 (synopsis "Sorted List, Sorted Dict, Sorted Set")
15851 (description
15852 "This package provides a sorted collections library, written in
15853pure-Python.")
15854 (license license:asl2.0)))
15855
aadef9c8
MB
15856(define-public python2-sortedcontainers
15857 (package-with-python2 python-sortedcontainers))
15858
44d10b1f
RW
15859(define-public python-cloudpickle
15860 (package
15861 (name "python-cloudpickle")
15862 (version "0.6.1")
15863 (source
15864 (origin
15865 (method url-fetch)
15866 (uri (pypi-uri "cloudpickle" version))
15867 (sha256
15868 (base32
15869 "1wdw89mlm7fqa3fm3ymskx05jrys66n8m1z1a8s0mss0799ahsgi"))))
15870 (build-system python-build-system)
15871 ;; FIXME: there are 5 errors in 122 tests:
15872 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.CloudPickleTest)
15873 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.CloudPickleTest)
15874 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.Protocol2CloudPickleTest)
15875 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.Protocol2CloudPickleTest)
15876 ;; ERROR: test_temp_file (tests.cloudpickle_file_test.CloudPickleFileTests)
15877 ;; TypeError: cannot serialize '_io.BufferedRandom' object
15878 (arguments '(#:tests? #f))
15879 (native-inputs
15880 `(("python-pytest" ,python-pytest)
15881 ("python-mock" ,python-mock)
15882 ("python-tornado" ,python-tornado)))
15883 (home-page "https://github.com/cloudpipe/cloudpickle")
15884 (synopsis "Extended pickling support for Python objects")
15885 (description
15886 "Cloudpickle makes it possible to serialize Python constructs not
15887supported by the default pickle module from the Python standard library. It
15888is especially useful for cluster computing where Python expressions are
15889shipped over the network to execute on remote hosts, possibly close to the
15890data.")
15891 (license license:bsd-3)))
15892
15893(define-public python2-cloudpickle
15894 (package-with-python2 python-cloudpickle))
15895
15896(define-public python-locket
15897 (package
15898 (name "python-locket")
15899 (version "0.2.0")
15900 (source
15901 (origin
15902 (method url-fetch)
15903 (uri (pypi-uri "locket" version))
15904 (sha256
15905 (base32
15906 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
15907 (build-system python-build-system)
15908 (home-page "https://github.com/mwilliamson/locket.py")
15909 (synopsis "File-based locks for Python")
15910 (description
15911 "Locket implements a lock that can be used by multiple processes provided
15912they use the same path.")
15913 (license license:bsd-2)))
15914
15915(define-public python2-locket
15916 (package-with-python2 python-locket))
15917
15918(define-public python-blosc
15919 (package
15920 (name "python-blosc")
15921 (version "1.5.1")
15922 (source
15923 (origin
15924 (method url-fetch)
15925 (uri (pypi-uri "blosc" version))
15926 (sha256
15927 (base32
15928 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
15929 (build-system python-build-system)
15930 ;; FIXME: all tests pass, but then this error is printed:
15931 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
15932 (arguments '(#:tests? #f))
15933 (propagated-inputs
15934 `(("python-numpy" ,python-numpy)))
15935 (home-page "https://github.com/blosc/python-blosc")
15936 (synopsis "Python wrapper for the Blosc data compressor library")
15937 (description "Blosc is a high performance compressor optimized for binary
15938data. It has been designed to transmit data to the processor cache faster
15939than the traditional, non-compressed, direct memory fetch approach via a
15940@code{memcpy()} system call.
15941
15942Blosc works well for compressing numerical arrays that contains data with
15943relatively low entropy, like sparse data, time series, grids with
15944regular-spaced values, etc.
15945
15946This Python package wraps the Blosc library.")
15947 (license license:bsd-3)))
15948
15949(define-public python2-blosc
15950 (package-with-python2 python-blosc))
15951
15952(define-public python-partd
15953 (package
15954 (name "python-partd")
15955 (version "0.3.9")
15956 (source
15957 (origin
15958 (method url-fetch)
15959 (uri (pypi-uri "partd" version))
15960 (sha256
15961 (base32
15962 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
15963 (build-system python-build-system)
15964 (propagated-inputs
15965 `(("python-blosc" ,python-blosc)
15966 ("python-locket" ,python-locket)
15967 ("python-numpy" ,python-numpy)
15968 ("python-pandas" ,python-pandas)
15969 ("python-pyzmq" ,python-pyzmq)
15970 ("python-toolz" ,python-toolz)))
15971 (home-page "https://github.com/dask/partd/")
15972 (synopsis "Appendable key-value storage")
15973 (description "Partd stores key-value pairs. Values are raw bytes. We
15974append on old values. Partd excels at shuffling operations.")
15975 (license license:bsd-3)))
15976
15977(define-public python2-partd
15978 (package-with-python2 python-partd))
15979
c70a0191
RW
15980(define-public python-fsspec
15981 (package
15982 (name "python-fsspec")
15983 (version "0.6.1")
15984 (source
15985 (origin
15986 (method url-fetch)
15987 (uri (pypi-uri "fsspec" version))
15988 (sha256
15989 (base32
15990 "1g9ba8v04s1nrh7pvzfm2md7ivl2mrz3hcq3y9d1a44gd62h17zj"))))
15991 (build-system python-build-system)
15992 (arguments '(#:tests? #f)) ; there are none
15993 (home-page "https://github.com/intake/filesystem_spec")
15994 (synopsis "File-system specification")
15995 (description "The purpose of this package is to produce a template or
15996specification for a file-system interface, that specific implementations
15997should follow, so that applications making use of them can rely on a common
15998behavior and not have to worry about the specific internal implementation
15999decisions with any given backend.")
16000 (license license:bsd-3)))
16001
44d10b1f
RW
16002(define-public python-dask
16003 (package
16004 (name "python-dask")
86c7ca07 16005 (version "2.9.0")
44d10b1f
RW
16006 (source
16007 (origin
16008 (method url-fetch)
16009 (uri (pypi-uri "dask" version))
16010 (sha256
86c7ca07 16011 (base32 "1w1hqr8vyx6ygwflj2737dcy0mmgvrc0s602gnny8pzlcbs9m76b"))))
44d10b1f 16012 (build-system python-build-system)
44d10b1f
RW
16013 (arguments
16014 `(#:phases
16015 (modify-phases %standard-phases
86c7ca07 16016 (add-after 'unpack 'disable-broken-tests
44d10b1f 16017 (lambda _
86c7ca07 16018 ;; This test is marked as xfail when pytest-xdist is used.
44d10b1f
RW
16019 (substitute* "dask/tests/test_threaded.py"
16020 (("def test_interrupt\\(\\)" m)
16021 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
16022 m)))
86c7ca07
RW
16023 ;; This one fails with a type error:
16024 ;; TypeError: Already tz-aware, use tz_convert to convert.
16025 (substitute* "dask/dataframe/tests/test_shuffle.py"
16026 (("def test_set_index_timestamp\\(\\)" m)
16027 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
16028 m)))
44d10b1f
RW
16029 #t))
16030 (replace 'check
16031 (lambda _ (invoke "pytest" "-vv"))))))
16032 (propagated-inputs
16033 `(("python-cloudpickle" ,python-cloudpickle)
86c7ca07 16034 ("python-fsspec" ,python-fsspec)
44d10b1f 16035 ("python-numpy" ,python-numpy)
86c7ca07 16036 ("python-packaging" ,python-packaging)
44d10b1f
RW
16037 ("python-pandas" ,python-pandas)
16038 ("python-partd" ,python-partd)
16039 ("python-toolz" ,python-toolz)
16040 ("python-pyyaml" ,python-pyyaml)))
16041 (native-inputs
16042 `(("python-pytest" ,python-pytest)
16043 ("python-pytest-runner" ,python-pytest-runner)))
16044 (home-page "https://github.com/dask/dask/")
16045 (synopsis "Parallel computing with task scheduling")
16046 (description
16047 "Dask is a flexible parallel computing library for analytics. It
16048consists of two components: dynamic task scheduling optimized for computation,
16049and large data collections like parallel arrays, dataframes, and lists that
16050extend common interfaces like NumPy, Pandas, or Python iterators to
16051larger-than-memory or distributed environments. These parallel collections
16052run on top of the dynamic task schedulers. ")
16053 (license license:bsd-3)))
16054
44d10b1f
RW
16055(define-public python-ilinkedlist
16056 (package
16057 (name "python-ilinkedlist")
16058 (version "0.4.0")
16059 (source
16060 (origin
16061 (method url-fetch)
16062 (uri (pypi-uri "ilinkedlist" version))
16063 (sha256
16064 (base32
16065 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
16066 (build-system python-build-system)
16067 (native-inputs `(("python-pytest" ,python-pytest)))
16068 (inputs `(("python" ,python)))
16069 (home-page "https://github.com/luther9/ilinkedlist-py")
16070 (synopsis "Immutable linked list library")
16071 (description
16072 "This is a implementation of immutable linked lists for Python. It
16073contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
16074Since a linked list is treated as immutable, it is hashable, and its length
16075can be retrieved in constant time. Some of the terminology is inspired by
16076LISP. It is possible to create an improper list by creating a @code{Pair}
16077with a non-list @code{cdr}.")
16078 (license license:gpl3+)))
16079
16080(define-public python-readlike
16081 (package
16082 (name "python-readlike")
16083 (version "0.1.3")
16084 (source
16085 (origin
16086 (method url-fetch)
16087 (uri (pypi-uri "readlike" version))
16088 (sha256
16089 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
16090 (build-system python-build-system)
16091 (home-page "https://github.com/jangler/readlike")
16092 (synopsis "GNU Readline-like line editing module")
16093 (description
16094 "This Python module provides line editing functions similar to the default
16095Emacs-style ones of GNU Readline. Unlike the Python standard library's
16096@code{readline} package, this one allows access to those capabilties in settings
16097outside of a standard command-line interface. It is especially well-suited to
16098interfacing with Urwid, due to a shared syntax for describing key inputs.
16099
16100Currently, all stateless Readline commands are implemented. Yanking and history
16101are not supported.")
16102 (license license:expat)))
16103
16104(define-public python2-readlike
16105 (package-with-python2 python-readlike))
16106
16107(define-public python-reparser
16108 (package
16109 (name "python-reparser")
16110 (version "1.4.3")
16111 (source
16112 (origin
16113 (method url-fetch)
16114 (uri (pypi-uri "ReParser" version))
16115 (sha256
16116 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
16117 (build-system python-build-system)
16118 (home-page "https://github.com/xmikos/reparser")
16119 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
16120 (description
16121 "This Python library provides a simple lexer/parser for inline markup based
16122on regular expressions.")
16123 (license license:expat)))
16124
16125(define-public python2-reparser
16126 (let ((reparser (package-with-python2
16127 (strip-python2-variant python-reparser))))
16128 (package (inherit reparser)
16129 (propagated-inputs
16130 `(("python2-enum34" ,python2-enum34)
16131 ,@(package-propagated-inputs reparser))))))
16132
16133(define-public python-precis-i18n
16134 (package
16135 (name "python-precis-i18n")
16136 (version "1.0.0")
16137 (source
16138 (origin
16139 (method url-fetch)
16140 (uri (pypi-uri "precis_i18n" version))
16141 (sha256
16142 (base32
16143 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
16144 (build-system python-build-system)
16145 (home-page "https://github.com/byllyfish/precis_i18n")
16146 (synopsis "Implementation of the PRECIS framework")
16147 (description
16148 "This module implements the PRECIS Framework as described in RFC 8264,
16149RFC 8265 and RFC 8266.")
16150 (license license:expat)))
16151
d0446c4b
RW
16152(define-public python-absl-py
16153 (package
16154 (name "python-absl-py")
16155 (version "0.6.1")
16156 (source
16157 (origin
16158 (method url-fetch)
16159 (uri (pypi-uri "absl-py" version))
16160 (sha256
16161 (base32
16162 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
16163 (build-system python-build-system)
16164 (propagated-inputs
16165 `(("python-six" ,python-six)))
16166 (home-page "https://github.com/abseil/abseil-py")
16167 (synopsis "Abseil Python common libraries")
16168 (description
16169 "This package provides the Abseil Python Common Libraries, a collection
16170of Python libraries for building Python applications.")
16171 (license license:asl2.0)))
16172
81bed4e9
RW
16173(define-public python-astor
16174 (package
16175 (name "python-astor")
16176 (version "0.7.1")
16177 (source
16178 (origin
16179 (method url-fetch)
16180 (uri (pypi-uri "astor" version))
16181 (sha256
16182 (base32
16183 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
16184 (build-system python-build-system)
16185 ;; FIXME: There are two errors and two test failures.
16186 (arguments `(#:tests? #f))
16187 (home-page "https://github.com/berkerpeksag/astor")
39ee82ff 16188 (synopsis "Read and write Python ASTs")
81bed4e9 16189 (description "Astor is designed to allow easy manipulation of Python
39ee82ff 16190source via the Abstract Syntax Tree.")
81bed4e9
RW
16191 (license license:bsd-3)))
16192
39ee82ff
RW
16193(define-public python2-astor
16194 (package-with-python2 python-astor))
16195
22e623ae
RW
16196(define-public python-grpcio
16197 (package
16198 (name "python-grpcio")
16199 (version "1.17.1")
16200 (source
16201 (origin
16202 (method url-fetch)
16203 (uri (pypi-uri "grpcio" version))
16204 (sha256
16205 (base32
16206 "0qb9y6j83nxa6d4kc60i8yfgdm7a8ms7b54kncjzf5y7nsxp8rzx"))))
16207 (build-system python-build-system)
16208 (propagated-inputs
16209 `(("python-six" ,python-six)))
16210 (home-page "https://grpc.io")
16211 (synopsis "HTTP/2-based RPC framework")
16212 (description "This package provides a Python library for communicating
16213with the HTTP/2-based RPC framework gRPC.")
16214 (license license:asl2.0)))
16215
79869f80
RW
16216(define-public python-astunparse
16217 (package
16218 (name "python-astunparse")
47d79541 16219 (version "1.6.2")
79869f80
RW
16220 (source
16221 (origin
16222 (method url-fetch)
16223 (uri (pypi-uri "astunparse" version))
16224 (sha256
47d79541 16225 (base32 "0rzbc44xcvzjhhiy7wac96mgal5mcjz1mfq8rmvgswskf4kf9cys"))))
79869f80 16226 (build-system python-build-system)
47d79541 16227 (arguments '(#:tests? #f)) ; there are none
79869f80
RW
16228 (propagated-inputs
16229 `(("python-six" ,python-six)
16230 ("python-wheel" ,python-wheel)))
16231 (home-page "https://github.com/simonpercivall/astunparse")
16232 (synopsis "AST unparser for Python")
16233 (description "This package provides an AST unparser for Python. It is a
16234factored out version of @code{unparse} found in the Python source
16235distribution.")
16236 (license license:bsd-3)))
16237
2884aac0
RW
16238(define-public python-gast
16239 (package
16240 (name "python-gast")
bd300261 16241 (version "0.2.2")
2884aac0
RW
16242 (source
16243 (origin
16244 (method url-fetch)
16245 (uri (pypi-uri "gast" version))
16246 (sha256
bd300261 16247 (base32 "1w5dzdb3gpcfmd2s0b93d8gff40a1s41rv31458z14inb3s9v4zy"))))
2884aac0
RW
16248 (build-system python-build-system)
16249 (propagated-inputs
16250 `(("python-astunparse" ,python-astunparse)))
16251 (home-page "https://pypi.org/project/gast/")
16252 (synopsis "Generic Python AST that abstracts the underlying Python version")
16253 (description
16254 "GAST provides a compatibility layer between the AST of various Python
16255versions, as produced by @code{ast.parse} from the standard @code{ast}
16256module.")
16257 (license license:bsd-3)))
16258
44d10b1f
RW
16259(define-public python-wikidata
16260 (package
16261 (name "python-wikidata")
16262 (version "0.6.1")
16263 (source
16264 (origin
16265 (method url-fetch)
16266 (uri (pypi-uri "Wikidata" version))
16267 (sha256
16268 (base32
16269 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
16270 (build-system python-build-system)
16271 (propagated-inputs
16272 `(("python-babel" ,python-babel)))
16273 (home-page "https://github.com/dahlia/wikidata")
16274 (synopsis "Wikidata client library")
16275 (description
16276 "This package provides a Python interface to
16277@url{https://www.wikidata.org/, Wikidata}.")
16278 (properties '((upstream-name . "Wikidata")))
16279 (license license:gpl3+)))
16280
16281(define-public python-doctest-ignore-unicode
16282 (package
16283 (name "python-doctest-ignore-unicode")
16284 (version "0.1.2")
16285 (source
16286 (origin
16287 (method url-fetch)
16288 (uri (pypi-uri "doctest-ignore-unicode" version))
16289 (sha256
16290 (base32
16291 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
16292 (build-system python-build-system)
16293 (native-inputs
16294 `(("python-nose" ,python-nose)))
16295 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
16296 (synopsis "Ignore Unicode literal prefixes in doctests")
16297 (description
16298 "This package adds support for a flag to ignore Unicode literal prefixes
16299in doctests.")
16300 (license license:asl2.0)))
16301
16302(define-public python-attr
16303 (package
16304 (name "python-attr")
16305 (version "0.3.1")
16306 (source
16307 (origin
16308 (method url-fetch)
16309 (uri (pypi-uri "attr" version))
16310 (sha256
16311 (base32
16312 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
16313 (build-system python-build-system)
16314 (home-page "https://github.com/denis-ryzhkov/attr")
16315 (synopsis "Decorator for attributes of target function or class")
16316 (description "Simple decorator to set attributes of target function or
16317class in a @acronym{DRY, Don't Repeat Yourself} way.")
16318 (license license:expat)))
f98232a3
VC
16319
16320(define-public python-construct
16321 (package
16322 (name "python-construct")
16323 (version "2.9.45")
16324 (source
16325 (origin
16326 (method url-fetch)
16327 (uri (pypi-uri "construct" version))
16328 (sha256
16329 (base32
16330 "130iy05awzigm2xah2yvlmb08mac5bi4gzr5m3g7k1krs3ps0w92"))))
16331 (build-system python-build-system)
16332 (arguments
16333 `(#:tests? #f)) ; No tests exist.
16334 (propagated-inputs
16335 `(("python-extras" ,python-extras)
16336 ("python-arrow" ,python-arrow)
16337 ("python-numpy" ,python-numpy)
16338 ("python-ruamel.yaml" ,python-ruamel.yaml)))
16339 (home-page "http://construct.readthedocs.io")
16340 (synopsis "Declarative and symmetrical parser and builder for binary data")
16341 (description
16342 "This package provides both simple, atomic constructs (such as
16343integers of various sizes), as well as composite ones which allow you
16344form hierarchical and sequential structures of increasing complexity.
16345It features bit and byte granularity, easy debugging and testing, an
16346easy-to-extend subclass system, and lots of primitive constructs to
16347make your work easier.")
16348 (license license:expat)))
b742c006
LF
16349
16350(define-public python-humanize
16351 (package
16352 (name "python-humanize")
16353 (version "0.5.1")
16354 (source
16355 (origin
16356 (method url-fetch)
16357 (uri (pypi-uri "humanize" version))
16358 (sha256
16359 (base32
16360 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
16361 (arguments
16362 '(#:tests? #f)) ; tests not in pypi archive
16363 (build-system python-build-system)
16364 (home-page "https://github.com/jmoiron/humanize")
16365 (synopsis "Print numerical information in a human-readable form")
16366 (description "This package provides a Python module that displays numbers
16367and dates in \"human readable\" forms. For example, it would display
16368\"12345591313\" as \"12.3 billion\".")
16369 (license license:expat)))
d5bbf66d
LF
16370
16371(define-public python-txaio
16372 (package
16373 (name "python-txaio")
16374 (version "18.8.1")
16375 (source
16376 (origin
16377 (method url-fetch)
16378 (uri (pypi-uri "txaio" version))
16379 (sha256
16380 (base32
16381 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
16382 (build-system python-build-system)
16383 (propagated-inputs
16384 `(("python-twisted" ,python-twisted)
16385 ("python-six" ,python-six)))
16386 (home-page "https://github.com/crossbario/txaio")
16387 (synopsis "Compatibility layer between Python asyncio and Twisted")
16388 (description "Txaio provides a compatibility layer between the Python
16389@code{asyncio} module and @code{Twisted}.")
16390 (license license:expat)))
963dfd3a
RW
16391
16392(define-public python-toolshed
16393 (package
16394 (name "python-toolshed")
16395 (version "0.4.6")
16396 (source
16397 (origin
16398 (method url-fetch)
16399 (uri (pypi-uri "toolshed" version))
16400 (sha256
16401 (base32
16402 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
16403 (build-system python-build-system)
16404 (native-inputs
16405 `(("python-nose" ,python-nose)))
16406 (home-page "https://github.com/brentp/toolshed/")
16407 (synopsis "Collection of modules and functions for working with data")
16408 (description "This is a collection of well-tested, simple modules and
16409functions that aim to reduce boilerplate when working with data.")
16410 (license license:bsd-2)))
c91ecf2d
RW
16411
16412(define-public python-annoy
16413 (package
16414 (name "python-annoy")
16415 (version "1.15.1")
16416 (source
16417 (origin
16418 (method url-fetch)
16419 (uri (pypi-uri "annoy" version))
16420 (sha256
16421 (base32
16422 "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp"))))
16423 (build-system python-build-system)
16424 (native-inputs
16425 `(("python-nose" ,python-nose)))
16426 (home-page "https://github.com/spotify/annoy/")
16427 (synopsis "Approximate nearest neighbors library")
16428 (description
16429 "Annoy is a C++ library with Python bindings to search for points in
16430space that are close to a given query point. It also creates large read-only
16431file-based data structures that are @code{mmap}ped into memory so that many
16432processes may share the same data.")
16433 (license license:asl2.0)))
412342d1 16434
79bfa422 16435(define-public python-pylzma
412342d1 16436 (package
79bfa422
DM
16437 (name "python-pylzma")
16438 (version "0.5.0")
16439 (source
16440 (origin
16441 (method url-fetch)
16442 (uri (pypi-uri "pylzma" version))
16443 (sha256
16444 (base32
16445 "074anvhyjgsv2iby2ql1ixfvjgmhnvcwjbdz8gk70xzkzcm1fx5q"))))
412342d1 16446 (build-system python-build-system)
79bfa422
DM
16447 (home-page "http://www.joachim-bauch.de/projects/pylzma/")
16448 (synopsis "Python bindings for the LZMA library by Igor Pavlov.")
16449 (description "This package provides Python bindings for the LZMA library
16450by Igor Pavlov.")
16451 (license license:lgpl2.1+)))
16452
16453(define-public python2-pylzma
16454 (package-with-python2 python-pylzma))
f825e605 16455
6609ebe7
AG
16456(define-public python2-zeroconf
16457 (package
16458 (name "python2-zeroconf")
16459
16460 ;; This is the last version that supports Python 2.x.
16461 (version "0.19.1")
16462 (source
16463 (origin
16464 (method url-fetch)
16465 (uri (pypi-uri "zeroconf" version))
16466 (sha256
16467 (base32
16468 "0ykzg730n915qbrq9bn5pn06bv6rb5zawal4sqjyfnjjm66snkj3"))))
16469 (build-system python-build-system)
16470 (arguments
16471 `(#:python ,python-2
16472 #:phases
16473 (modify-phases %standard-phases
16474 (add-after 'unpack 'patch-requires
16475 (lambda* (#:key inputs #:allow-other-keys)
16476 (substitute* "setup.py"
16477 (("enum-compat")
16478 "enum34"))
16479 #t)))))
16480 (native-inputs
16481 `(("python2-six" ,python2-six)
16482 ("python2-enum32" ,python2-enum34)
16483 ("python2-netifaces" ,python2-netifaces)
16484 ("python2-typing" ,python2-typing)))
16485 (home-page "https://github.com/jstasiak/python-zeroconf")
16486 (synopsis "Pure Python mDNS service discovery")
16487 (description
16488 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
16489compatible).")
16490 (license license:lgpl2.1+)))
16491
f825e605
GLV
16492(define-public python-bsddb3
16493 (package
16494 (name "python-bsddb3")
16495 (version "6.2.6")
16496 (source
16497 (origin
16498 (method url-fetch)
16499 (uri (pypi-uri "bsddb3" version))
16500 (sha256
16501 (base32
16502 "019db2y6bfmiqbrgg9x9f6h72qjmqh05czdn2v5sy9bl0gs23mj2"))))
16503 (build-system python-build-system)
16504 (inputs
16505 `(("bdb" ,bdb)))
16506 (arguments
16507 '(#:phases
16508 (modify-phases %standard-phases
16509 (add-after 'unpack 'configure-locations
16510 (lambda* (#:key inputs #:allow-other-keys)
16511 (setenv "BERKELEYDB_DIR" (assoc-ref inputs "bdb"))
16512 (setenv "YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION" "1")
16513 #t))
16514 (replace 'check
16515 (lambda _
16516 (invoke "python3" "test3.py" "-v"))))))
16517 (home-page "https://www.jcea.es/programacion/pybsddb.htm")
16518 (synopsis "Python bindings for Oracle Berkeley DB")
16519 (description
16520 "This module provides a nearly complete wrapping of the Oracle/Sleepycat
16521C API for the Database Environment, Database, Cursor, Log Cursor, Sequence and
16522Transaction objects, and each of these is exposed as a Python type in the
16523bsddb3.db module. The database objects can use various access methods: btree,
16524hash, recno, and queue. Complete support of Berkeley DB distributed
16525transactions. Complete support for Berkeley DB Replication Manager.
16526Complete support for Berkeley DB Base Replication. Support for RPC.")
16527 (license license:bsd-3)))
edeb04bf
PL
16528
16529(define-public python-dbfread
16530 (package
16531 (name "python-dbfread")
16532 (version "2.0.7")
16533 (source (origin
16534 (method url-fetch)
16535 (uri (pypi-uri "dbfread" version))
16536 (sha256
16537 (base32
16538 "0gdpwdzf1fngsi6jrdyj4qdf6cr7gnnr3zp80dpkzbgz0spskj07"))))
16539 (build-system python-build-system)
16540 (native-inputs
16541 `(("python-pytest" ,python-pytest)))
16542 (home-page "https://dbfread.readthedocs.io")
16543 (synopsis "Read DBF Files with Python")
16544 (description
16545 "This library reads DBF files and returns the data as native Python data
16546types for further processing. It is primarily intended for batch jobs and
16547one-off scripts.")
16548 (license license:expat)))
e308b4f0
JM
16549
16550(define-public python-cached-property
16551 (package
16552 (name "python-cached-property")
16553 (version "1.5.1")
16554 (source
16555 (origin
16556 (method url-fetch)
16557 (uri (pypi-uri "cached-property" version))
16558 (sha256
16559 (base32
16560 "010m1bl380l2r3vwq24r5v14l6gwvgm9v0mqqjkjss552jgsa5wj"))))
16561 (build-system python-build-system)
16562 (arguments
16563 `(#:phases
16564 (modify-phases %standard-phases
16565 ;; https://github.com/pydanny/cached-property/issues/131
16566 ;; recent versions of freezegun break one test
16567 (add-after 'unpack 'disable-broken-test
16568 (lambda _
16569 (substitute* "tests/test_cached_property.py"
16570 (("def test_threads_ttl_expiry\\(self\\)" m)
16571 (string-append "@unittest.skip(\"Disabled by Guix\")\n"
16572 " " m)))
16573 #t)))))
16574 (native-inputs
16575 `(("python-freezegun" ,python-freezegun)))
16576 (home-page
16577 "https://github.com/pydanny/cached-property")
16578 (synopsis
16579 "Decorator for caching properties in classes")
16580 (description
16581 "This package provides a decorator which makes caching
16582time-or-computationally-expensive properties quick and easy and works in Python
165832 or 3.")
16584 (license license:bsd-3)))
dfe8a704
NG
16585
16586(define-public python-folium
16587 (package
16588 (name "python-folium")
d3bc1ea9 16589 (version "0.10.1")
dfe8a704
NG
16590 (source
16591 (origin
16592 (method url-fetch)
16593 (uri (pypi-uri "folium" version))
16594 (sha256
16595 (base32
d3bc1ea9 16596 "0gcc267wxwxr57ry86pqpbiyfvl0g48hfvgy0f2mz9s58g87kgzd"))))
dfe8a704
NG
16597 (build-system python-build-system)
16598 (propagated-inputs
16599 `(("python-branca" ,python-branca)
16600 ("python-jinja2" ,python-jinja2)
16601 ("python-numpy" ,python-numpy)
16602 ("python-requests" ,python-requests)))
16603 (native-inputs
16604 `(("python-pytest" ,python-pytest)))
16605 (home-page "https://github.com/python-visualization/folium")
16606 (synopsis "Make beautiful maps with Leaflet.js & Python")
16607 (description "@code{folium} makes it easy to visualize data that’s been
16608manipulated in Python on an interactive leaflet map. It enables both the
16609binding of data to a map for @code{choropleth} visualizations as well as
16610passing rich vector/raster/HTML visualizations as markers on the map.
16611
16612The library has a number of built-in tilesets from OpenStreetMap, Mapbox, and
16613Stamen, and supports custom tilesets with Mapbox or Cloudmade API keys. It
16614supports Image, Video, GeoJSON and TopoJSON overlays.")
16615 (license license:expat)))
9dd5f475
LC
16616
16617(define-public jube
16618 (package
16619 ;; This is a command-line tool, so no "python-" prefix.
16620 (name "jube")
16621 (version "2.2.2")
16622 (source (origin
16623 (method url-fetch)
16624 (uri (string-append
16625 "http://apps.fz-juelich.de/jsc/jube/jube2/download.php?version="
16626 version))
16627 (sha256
16628 (base32
16629 "0xq4k1q63s1p6swgyp61vahlrd1fqmgbm0gm5kpj8ikwy0yc0nqk"))
16630 (file-name (string-append "jube-" version ".tar.gz"))))
16631 (build-system python-build-system)
16632 (home-page "https://apps.fz-juelich.de/jsc/jube/jube2/docu/index.html")
16633 (synopsis "Benchmarking environment")
16634 (description
16635 "JUBE helps perform and analyze benchmarks in a systematic way. For each
16636benchmarked application, benchmark data is stored in a format that allows JUBE
16637to deduct the desired information. This data can be parsed by automatic pre-
16638and post-processing scripts that draw information and store it more densely
16639for manual interpretation.")
a9f33960 16640 (license license:gpl3+)))
66436424
NG
16641
16642(define-public python-pyroutelib3
16643 (package
16644 (name "python-pyroutelib3")
16645 (version "1.3.post1")
16646 (source
16647 (origin
16648 (method url-fetch)
16649 (uri (pypi-uri "pyroutelib3" version))
16650 (sha256
16651 (base32
16652 "1hpbydpn2alyswiajfbvhzq4c7f36vdmvxy91hgv8l1lb2g2vfrj"))))
16653 (build-system python-build-system)
16654 (propagated-inputs
16655 `(("python-dateutil" ,python-dateutil)))
16656 (home-page "https://github.com/MKuranowski/pyroutelib3")
16657 (synopsis "Library for simple routing on OSM data")
16658 (description "Library for simple routing on OSM data")
16659 (license license:gpl3+)))
30e7c03a 16660
c1bbef69
16661(define-public python-bibtexparser
16662 (package
16663 (name "python-bibtexparser")
16664 (version "1.1.0")
16665 (source
16666 (origin
16667 (method url-fetch)
16668 (uri (pypi-uri "bibtexparser" version))
16669 (sha256
16670 (base32
16671 "0zwhfkrzf3n5847dbnfng92k7ak199l9v6x6ax3dgdidfpm6d2fz"))))
16672 (build-system python-build-system)
16673 (propagated-inputs
16674 `(("python-pyparsing" ,python-pyparsing)))
16675 (native-inputs
16676 `(("python-future" ,python-future)))
16677 (home-page "https://github.com/sciunto-org/python-bibtexparser")
16678 (synopsis "Python library to parse BibTeX files")
16679 (description "BibtexParser is a Python library to parse BibTeX files.")
16680 (license (list license:bsd-3 license:lgpl3))))
8581b40d
HG
16681
16682(define-public python-distro
16683 (package
16684 (name "python-distro")
16685 (version "1.4.0")
16686 (source
16687 (origin
16688 (method url-fetch)
16689 (uri (pypi-uri "distro" version))
16690 (sha256
16691 (base32
16692 "0mrg75w4ap7mdzyga75yaid9n8bgb345ih5mwjp3plj6v1jxwb9n"))))
16693 (build-system python-build-system)
16694 (native-inputs
16695 `(("python-pytest" ,python-pytest)))
16696 (home-page "https://github.com/nir0s/distro")
16697 (synopsis
16698 "OS platform information API")
16699 (description
16700 "@code{distro} provides information about the OS distribution it runs on,
16701such as a reliable machine-readable ID, or version information.
16702
16703It is the recommended replacement for Python's original
16704`platform.linux_distribution` function (which will be removed in Python 3.8).
16705@code{distro} also provides a command-line interface to output the platform
16706information in various formats.")
16707 (license license:asl2.0)))
f2f41e1a
HG
16708
16709(define-public python-cairosvg
16710 (package
16711 (name "python-cairosvg")
16712 (version "2.4.2")
16713 (source
16714 (origin
16715 (method url-fetch)
16716 (uri (pypi-uri "CairoSVG" version))
16717 (sha256
16718 (base32 "1bb7irxbaxxb9ahm3z5wsx1q96mm5gzskc7b6q07h9ikcnb8yrjf"))))
16719 (build-system python-build-system)
16720 (arguments
16721 `(#:phases
16722 (modify-phases %standard-phases
16723 (replace 'check
16724 (lambda _ (invoke "pytest"))))))
16725 (propagated-inputs
16726 `(("python-cairocffi" ,python-cairocffi)
16727 ("python-cssselect2" ,python-cssselect2)
16728 ("python-defusedxml" ,python-defusedxml)
16729 ("python-pillow" ,python-pillow)
16730 ("python-tinycss2" ,python-tinycss2)))
16731 (native-inputs
16732 `(("python-pytest-flake8" ,python-pytest-flake8)
16733 ("python-pytest-isort" ,python-pytest-isort)
16734 ("python-pytest-runner" ,python-pytest-runner)))
16735 (home-page "https://cairosvg.org/")
16736 (synopsis "SVG to PDF/PS/PNG converter based on Cairo")
16737 (description "CairoSVG is a SVG converter based on Cairo. It can export
16738SVG files to PDF, PostScript and PNG files. The main part of CairoSVG is a
16739SVG parser, trying to follow the SVG 1.1 recommendation from the W3C. Once
16740parsed, the result is drawn to a Cairo surface that can be exported to
16741qvarious formats: PDF, PostScript, PNG and even SVG.")
16742 (license license:lgpl3+)))
ea1801e0
HG
16743
16744(define-public python-pyphen
16745 (package
16746 (name "python-pyphen")
16747 (version "0.9.5")
16748 (source
16749 (origin
16750 (method url-fetch)
16751 (uri (pypi-uri "Pyphen" version))
16752 (sha256
16753 (base32 "08c9y69ry9d6m4zalhnalg86lsp9v2j5n1ziw5vxfmiihx83lqrv"))))
16754 (build-system python-build-system)
16755 ;; TODO: Use the Guix system hyphenation packages hyphen-* rather than the
16756 ;; embedded set provided by upstream - like Debian does.
16757 (home-page "https://github.com/Kozea/Pyphen")
16758 (synopsis "Pure Python module to hyphenate text")
16759 (description "Pyphen is a pure Python module to hyphenate text using
16760existing Hunspell hyphenation dictionaries.")
16761 (license (list license:gpl2 license:lgpl2.1 license:mpl1.1))))
85cfb0e9
CL
16762
16763(define-public python-intelhex
16764 (package
16765 (name "python-intelhex")
16766 (version "2.2.1")
16767 (source
16768 (origin
16769 (method url-fetch)
16770 (uri (pypi-uri "intelhex" version))
16771 (sha256
16772 (base32
16773 "0ckqjbxd8gwcg98gfzpn4vq1qxzfvq3rdbrr1hikj1nmw08qb780"))))
16774 (build-system python-build-system)
16775 (arguments '(#:tests? #f)) ;issue with version
16776 (home-page "https://pypi.org/project/IntelHex/")
16777 (synopsis "Python library for Intel HEX files manipulations")
16778 (description "The Intel HEX file format is widely used in microprocessors
16779and microcontrollers area (embedded systems etc.) as the de facto standard for
16780representation of code to be programmed into microelectronic devices. This
16781package provides an intelhex Python library to read, write, create from
16782scratch and manipulate data from Intel HEX file format. It also includes
16783several convenience Python scripts, including \"classic\" hex2bin and bin2hex
16784converters and more, those based on the library itself.")
16785 (license license:bsd-3)))
34bf6869
CL
16786
16787(define-public python-pykwalify
16788 (package
16789 (name "python-pykwalify")
16790 (version "1.7.0")
16791 (source
16792 (origin
16793 (method url-fetch)
16794 (uri (pypi-uri "pykwalify" version))
16795 (sha256
16796 (base32
16797 "1cnfzkg1b01f825ikpw2fhjclf9c8akxjfrbd1vc22x1lg2kk2vy"))))
16798 (build-system python-build-system)
16799 (arguments '(#:tests? #f)) ;missing dependencies
16800 (propagated-inputs
16801 `(("python-dateutil" ,python-dateutil)
16802 ("python-docopt" ,python-docopt)
16803 ("python-pyyaml" ,python-pyyaml)))
16804 (home-page "https://github.com/grokzen/pykwalify")
16805 (synopsis
16806 "Python lib/cli for JSON/YAML schema validation")
16807 (description
16808 "This package provides a parser, schema validator, and data binding tool
16809for YAML and JSON.")
16810 (license license:expat)))
e2ebbbcc
KK
16811
16812(define-public python-dbusmock
16813 (package
022b0d5f
BG
16814 (name "python-dbusmock")
16815 (version "0.18.3")
16816 (source
16817 (origin
16818 (method url-fetch)
16819 (uri (pypi-uri "python-dbusmock" version))
16820 (sha256
e2ebbbcc 16821 (base32
022b0d5f
BG
16822 "0hp2kyac88nh9iv6l8hlmv7s1sa1s5f1a3wc2pmlmmxnd211fjlr"))))
16823 (build-system python-build-system)
16824 (arguments
16825 '(#:phases
16826 (modify-phases %standard-phases
16827 (add-after 'unpack 'patch-shell-path
16828 (lambda _
16829 (substitute* "tests/test_code.py"
16830 (("/bin/bash") (which "bash")))
16831 #t)))))
16832 (native-inputs
16833 `(;; For tests.
16834 ("dbus" ,dbus) ; for dbus-daemon
16835 ("python-nose" ,python-nose)
16836 ("which" ,which)))
16837 (propagated-inputs
16838 `(("python-dbus" ,python-dbus)
16839 ("python-pygobject" ,python-pygobject)))
16840 (home-page "https://github.com/martinpitt/python-dbusmock")
16841 (synopsis "Python library for mock D-Bus objects")
16842 (description "python-dbusmock allows for the easy creation of mock objects on
e2ebbbcc
KK
16843D-Bus. This is useful for writing tests for software which talks to D-Bus
16844services such as upower, systemd, logind, gnome-session or others, and it is
16845hard (or impossible without root privileges) to set the state of the real
16846services to what you expect in your tests.")
022b0d5f 16847 (license license:lgpl3+)))
b657b23f
BG
16848
16849(define-public python-ujson
16850 (package
16851 (name "python-ujson")
16852 (version "1.35")
16853 (source
16854 (origin
16855 (method url-fetch)
16856 (uri (pypi-uri "ujson" version))
16857 (sha256
16858 (base32
16859 "11jz5wi7mbgqcsz52iqhpyykiaasila4lq8cmc2d54bfa3jp6q7n"))))
16860 (build-system python-build-system)
16861 (home-page "http://www.esn.me")
16862 (synopsis
16863 "Ultra fast JSON encoder and decoder for Python")
16864 (description
16865 "UltraJSON is an ultra fast JSON encoder and decoder written in pure C with
16866 bindings for Python 2.5+ and 3.")
16867 (license license:bsd-3)))
16868
16869(define-public python2-ujson
16870 (package-with-python2 python-ujson))
dbcef44a
MIP
16871
16872(define-public python-iocapture
16873 ;; The latest release is more than a year older than this commit.
16874 (let ((commit "fdc021c431d0840303908dfc3ca8769db383595c")
16875 (revision "1"))
16876 (package
16877 (name "python-iocapture")
16878 (version "0.1.2")
16879 (source
16880 (origin
16881 (method git-fetch)
16882 (uri (git-reference
16883 (url "https://github.com/oinume/iocapture.git")
16884 (commit commit)))
16885 (file-name (git-file-name name version))
16886 (sha256
16887 (base32
16888 "1mkbhqibxvgwg0p7slr8dfraa3g2s6bsayladhax2jccwj4kcndz"))))
16889 (build-system python-build-system)
16890 (arguments
16891 `(#:phases
16892 (modify-phases %standard-phases
16893 (delete 'check)
16894 (add-after 'install 'check
16895 (lambda* (#:key inputs outputs #:allow-other-keys)
16896 (add-installed-pythonpath inputs outputs)
16897 (invoke "py.test" "-v" "tests")
16898 #t)))))
16899 (propagated-inputs
16900 `(("python-flexmock" ,python-flexmock)
16901 ("python-pytest" ,python-pytest)
16902 ("python-pytest-cov" ,python-pytest-cov)
16903 ("python-six" ,python-six)))
16904 (home-page "https://github.com/oinume/iocapture")
16905 (synopsis "Python capturing tool for stdout and stderr")
16906 (description
16907 "This package helps you to capture the standard out (stdout) and the
16908standard error channel (stderr) in your program.")
16909 (license license:expat))))
db6bd842
MIP
16910
16911(define-public python-argh
16912 ;; There are 21 commits since the latest release containing important
16913 ;; improvements.
16914 (let ((commit "dcd3253f2994400a6a58a700c118c53765bc50a4")
16915 (revision "1"))
16916 (package
16917 (name "python-argh")
16918 (version (git-version "0.26.2" revision commit))
16919 (source
16920 (origin
16921 (method git-fetch)
16922 (uri (git-reference
16923 (url "https://github.com/neithere/argh.git")
16924 (commit commit)))
16925 (file-name (git-file-name name version))
16926 (sha256
16927 (base32
16928 "1p5h3dnpbsjmqrvil96s71asc6i3gpinmbrabqmwnrsxprz7r3ns"))))
16929 (build-system python-build-system)
16930 (propagated-inputs
16931 `(("python-iocapture" ,python-iocapture)
16932 ("python-mock" ,python-mock)
16933 ("python-pytest" ,python-pytest)
16934 ("python-pytest-cov" ,python-pytest-cov)
16935 ("python-pytest-xdist" ,python-pytest-xdist)
16936 ("python-tox" ,python-tox)))
16937 (home-page "https://github.com/neithere/argh/")
16938 (synopsis "Argparse wrapper with natural syntax")
16939 (description
16940 "python-argh is a small library that provides several layers of
16941abstraction on top of @code{python-argparse}. The layers can be mixed. It is
16942always possible to declare a command with the highest possible (and least
16943flexible) layer and then tune the behaviour with any of the lower layers
16944including the native API of @code{python-argparse}.")
16945 (license license:lgpl3+))))
073723fa
MIP
16946
16947(define-public python-ppft
16948 (package
16949 (name "python-ppft")
16950 (version "1.6.6.1")
16951 (source
16952 (origin
16953 (method url-fetch)
16954 (uri (pypi-uri "ppft" version))
16955 (sha256
16956 (base32
16957 "1z1invkhszc5d2mvgr221v7cszzifcc77mz0pv3wjp6x5q2768cy"))))
16958 (build-system python-build-system)
16959 (arguments '(#:tests? #f)) ; there are none
16960 (propagated-inputs
16961 `(("python-six" ,python-six)))
16962 (home-page "https://pypi.org/project/ppft/")
16963 (synopsis "Fork of Parallel Python")
16964 (description
16965 "This package is a fork of Parallel Python. The Parallel Python
16966module (@code{pp}) provides an easy and efficient way to create
16967parallel-enabled applications for @dfn{symmetric multiprocessing} (SMP)
16968computers and clusters. It features cross-platform portability and dynamic
16969load balancing.")
16970 (license license:bsd-3)))
8451ea19
MIP
16971
16972(define-public python-pox
16973 (package
16974 (name "python-pox")
16975 (version "0.2.7")
16976 (source
16977 (origin
16978 (method url-fetch)
16979 (uri (pypi-uri "pox" version))
16980 (sha256
16981 (base32
16982 "0y17ckc2p6i6709s279sjdj4q459mpcc38ymg9zv9y6vl6jf3bq6"))))
16983 (build-system python-build-system)
16984 (arguments
16985 `(#:phases
16986 (modify-phases %standard-phases
16987 (replace 'check
16988 (lambda _
16989 (mkdir-p "/tmp/guix")
16990 (setenv "SHELL" "bash")
16991 (setenv "USERNAME" "guix")
16992 (setenv "HOME" "/tmp/guix") ; must end on USERNAME...
16993 (invoke "py.test" "-vv")
16994 #t)))))
16995 (native-inputs
16996 `(("python-pytest" ,python-pytest)
16997 ("which" ,which)))
16998 (home-page "https://pypi.org/project/pox/")
16999 (synopsis "Python utilities for filesystem exploration and automated builds")
17000 (description
17001 "Pox provides a collection of utilities for navigating and manipulating
17002filesystems. This module is designed to facilitate some of the low level
17003operating system interactions that are useful when exploring a filesystem on a
17004remote host. Pox provides Python equivalents of several shell commands such
17005as @command{which} and @command{find}. These commands allow automated
17006discovery of what has been installed on an operating system, and where the
17007essential tools are located.")
17008 (license license:bsd-3)))
7e476ae8
MIP
17009
17010(define-public python-pathos
17011 (package
17012 (name "python-pathos")
17013 (version "0.2.5")
17014 (source
17015 (origin
17016 (method url-fetch)
17017 (uri (pypi-uri "pathos" version))
17018 (sha256
17019 (base32
17020 "0in8hxdz7k081ijn6q94gr39ycy7363sx4zysmbwyvd7snqjrbi1"))))
17021 (build-system python-build-system)
8f82e7e3
EF
17022 (arguments
17023 '(#:phases
17024 (modify-phases %standard-phases
17025 (replace 'check
17026 (lambda _
17027 (setenv "PYTHONPATH"
17028 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
17029 (invoke "python" "./tests/__main__.py"))))))
7e476ae8
MIP
17030 (propagated-inputs
17031 `(("python-dill" ,python-dill)
17032 ("python-multiprocess" ,python-multiprocess)
17033 ("python-pox" ,python-pox)
17034 ("python-ppft" ,python-ppft)))
8f82e7e3
EF
17035 (native-inputs
17036 `(("python-pytest" ,python-pytest)))
7e476ae8
MIP
17037 (home-page "https://pypi.org/project/pathos/")
17038 (synopsis
17039 "Parallel graph management and execution in heterogeneous computing")
17040 (description
17041 "Python-pathos is a framework for heterogenous computing. It provides a
17042consistent high-level interface for configuring and launching parallel
17043computations across heterogenous resources. Python-pathos provides configurable
17044launchers for parallel and distributed computing, where each launcher contains
17045the syntactic logic to configure and launch jobs in an execution environment.")
17046 (license license:bsd-3)))
54e5ee5a
BG
17047
17048(define-public python-flit
17049 (package
17050 (name "python-flit")
17051 (version "2.1.0")
17052 (source
17053 (origin
17054 (method url-fetch)
17055 (uri (pypi-uri "flit" version))
17056 (sha256
17057 (base32
17058 "0h5vvmqinqzn97mr3ix7zx53af9ad4fimjjwqpx88yp8qhz4r5bc"))))
17059 (build-system python-build-system)
17060 (arguments
17061 `(#:tests? #f)) ; XXX: Check requires network access.
17062 (home-page "https://flit.readthedocs.io/")
17063 (synopsis
17064 "Simple packaging tool for simple packages")
17065 (description
17066 "Flit is a simple way to put Python packages and modules on PyPI. Flit
17067packages a single importable module or package at a time, using the import
17068name as the name on PyPI. All subpackages and data files within a package
17069are included automatically.")
17070 (license license:bsd-3)))
02139b42
BG
17071
17072(define-public python-pathtools
17073 (package
17074 (name "python-pathtools")
17075 (version "0.1.2")
17076 (source
17077 (origin
17078 (method url-fetch)
17079 (uri (pypi-uri "pathtools" version))
17080 (sha256
17081 (base32
17082 "1h7iam33vwxk8bvslfj4qlsdprdnwf8bvzhqh3jq5frr391cadbw"))))
17083 (build-system python-build-system)
17084 (home-page
17085 "https://github.com/gorakhargosh/pathtools")
17086 (synopsis "Path utilities for Python")
17087 (description "Pattern matching and various utilities for file systems
17088paths.")
17089 (license license:expat)))
6b520177
JG
17090
17091(define-public python-fastentrypoints
17092 (package
17093 (name "python-fastentrypoints")
17094 (version "0.12")
17095 (source
17096 (origin
17097 (method url-fetch)
17098 (uri (pypi-uri "fastentrypoints" version))
17099 (sha256
17100 (base32
17101 "02s1j8i2dzbpbwgq2a3fiqwm3cnmhii2qzc0k42l0rdxd4a4ya7z"))))
17102 (build-system python-build-system)
17103 (home-page
17104 "https://github.com/ninjaaron/fast-entry_points")
17105 (synopsis
17106 "Makes entry_points specified in setup.py load more quickly")
17107 (description
17108 "Using entry_points in your setup.py makes scripts that start really
17109slowly because it imports pkg_resources. This package allows such setup
17110scripts to load entry points more quickly.")
17111 (license license:bsd-3)))
c5eb8cf8
JG
17112
17113(define-public python-funcparserlib
17114 (package
17115 (name "python-funcparserlib")
17116 (version "0.3.6")
17117 (source
17118 (origin
17119 (method url-fetch)
17120 (uri (pypi-uri "funcparserlib" version))
17121 (sha256
17122 (base32
17123 "07f9cgjr3h4j2m67fhwapn8fja87vazl58zsj4yppf9y3an2x6dp"))))
17124 (native-inputs
17125 `(("python-tox" ,python-tox)))
17126 (arguments
17127 `(#:phases
17128 (modify-phases %standard-phases
17129 (replace 'check
17130 (lambda _
17131 (invoke "tox"))))))
17132 (build-system python-build-system)
17133 (home-page
17134 "https://github.com/vlasovskikh/funcparserlib")
17135 (synopsis
17136 "Recursive descent parsing library based on functional combinators")
17137 (description
11140cf1 17138 "This package is a recursive descent parsing library for Python based on
c5eb8cf8
JG
17139functional combinators. Parser combinators are just higher-order functions
17140that take parsers as their arguments and return them as result values.")
17141 (license license:expat)))
602f3b67
NG
17142
17143(define-public python-speg
17144 (package
17145 (name "python-speg")
17146 (version "0.3")
17147 (source
17148 (origin
17149 (method url-fetch)
17150 (uri (pypi-uri "speg" version ".zip"))
17151 (sha256
17152 (base32 "0w9y4jf4787dzhy6rvhwi0mpl0r8qkqmqmyv2hpwdpv8w53yzjqh"))))
17153 (arguments
17154 `(#:tests? #f)) ;FIXME: tests fail, not sure why
17155 (native-inputs
17156 `(("unzip" ,unzip)))
17157 (build-system python-build-system)
17158 (home-page "https://github.com/avakar/speg")
17159 (synopsis "PEG-based parser interpreter with memoization")
17160 (description "This package is a PEG-based parser and interpreter with
17161memoization.")
17162 (license license:expat)))
07c8177b
NG
17163
17164(define-public python-cson
17165 (package
17166 (name "python-cson")
17167 (version "0.8")
17168 (source
17169 (origin
17170 (method url-fetch)
17171 (uri (pypi-uri "cson" version))
17172 (sha256
17173 (base32 "00cyvigg4npbph39ghkg77xbxisa6plf75vii24igxfizik0337f"))))
17174 (build-system python-build-system)
17175 (propagated-inputs
17176 `(("python-speg" ,python-speg)))
17177 (home-page "https://github.com/avakar/pycson")
17178 (synopsis "Parser for Coffeescript Object Notation (CSON)")
17179 (description "This package is a parser for Coffeescript Object
17180Notation (CSON).")
17181 (license license:expat)))
e24c672e
LDB
17182
17183(define-public python-asynctest
17184 (package
17185 (name "python-asynctest")
17186 (version "0.13.0")
17187 (source
17188 (origin
17189 (method url-fetch)
17190 (uri (pypi-uri "asynctest" version))
17191 (sha256
17192 (base32
17193 "1b3zsy7p84gag6q8ai2ylyrhx213qdk2h2zb6im3xn0m5n264y62"))))
17194 (build-system python-build-system)
17195 (arguments
17196 '(#:phases
17197 (modify-phases %standard-phases
17198 (replace 'check
17199 (lambda _
17200 (invoke "python" "-X" "dev" "-m" "unittest" "-v" "test")))
17201 (add-after 'unpack 'disable-tests
17202 (lambda* _
17203 (substitute* "test/test_selector.py"
17204 ;; XXX: This test fails for unknown reason inside the build
17205 ;; environment.
17206 (("def test_events_watched_outside_test_are_ignored")
17207 "@unittest.skip('disabled by guix')
17208 def test_events_watched_outside_test_are_ignored")))))))
17209 (home-page "https://github.com/Martiusweb/asynctest")
17210 (synopsis "Extension of unittest for testing asyncio libraries")
17211 (description
17212 "The package asynctest is built on top of the standard unittest module
17213and cuts down boilerplate code when testing libraries for asyncio.")
17214 (license license:asl2.0)))
1cc9c38e
LDB
17215
17216(define-public python-aionotify
17217 (package
17218 (name "python-aionotify")
17219 (version "0.2.0")
17220 (source
17221 (origin
17222 ;; Source tarball on PyPi lacks tests
17223 (method git-fetch)
17224 (uri (git-reference
17225 (url "https://github.com/rbarrois/aionotify")
17226 (commit (string-append "v" version))))
17227 (file-name (git-file-name name version))
17228 (sha256
17229 (base32 "1sk9i8czxgsbrswsf1nlb4c82vgnlzi8zrvrxdip92w2z8hqh43y"))))
17230 (build-system python-build-system)
17231 (native-inputs `(("python-asynctest" ,python-asynctest)))
17232 (home-page "https://github.com/rbarrois/aionotify")
17233 (synopsis "Asyncio-powered inotify library")
17234 (description
17235 "@code{aionotify} is a simple, asyncio-based inotify library.")
17236 (license license:bsd-3)))
84efaa3b
LDB
17237
17238(define-public python-forbiddenfruit
17239 (package
17240 (name "python-forbiddenfruit")
17241 (version "0.1.3")
17242 (source
17243 (origin
17244 ;; Source tarball on PyPi lacks Makefile that builds and runs tests
17245 (method git-fetch)
17246 (uri (git-reference
17247 (url "https://github.com/clarete/forbiddenfruit")
17248 (commit version)))
17249 (file-name (git-file-name name version))
17250 (sha256
17251 (base32 "1fp2xvdqpi910j9r3q68x38phpxbm700gjdi2m2j5gs91xdnyyh2"))))
17252 (build-system python-build-system)
17253 (arguments
17254 '(#:phases
17255 (modify-phases %standard-phases
17256 (replace 'check
17257 (lambda _
17258 (invoke "make" "SKIP_DEPS=1"))))))
17259 (native-inputs
17260 `(("python-nose" ,python-nose)
17261 ("python-coverage" ,python-coverage)))
17262 (home-page "https://github.com/clarete/forbiddenfruit")
17263 (synopsis "Patch python built-in objects")
17264 (description "This project allows Python code to extend built-in types.")
17265 (license (list license:gpl3+ license:expat))))
9786258b
LDB
17266
17267(define-public python-shouldbe
17268 (package
17269 (name "python-shouldbe")
17270 (version "0.1.2")
17271 (source
17272 (origin
17273 (method url-fetch)
17274 (uri (pypi-uri "shouldbe" version))
17275 (sha256
17276 (base32
17277 "16zbvjxf71dl4yfbgcr6idyim3mdrfvix1dv8b95p0s9z07372pj"))))
17278 (build-system python-build-system)
17279 (propagated-inputs
17280 `(("python-forbiddenfruit" ,python-forbiddenfruit)))
17281 (native-inputs
17282 `(("python-nose" ,python-nose)))
17283 (home-page "https://github.com/directxman12/should_be")
17284 (synopsis "Python Assertion Helpers inspired by Shouldly")
17285 (description
17286 "Python Assertion Helpers inspired by Shouldly.")
17287 (license license:isc)))
72c2478a
LDB
17288
17289(define-public python-k5test
17290 (package
17291 (name "python-k5test")
17292 (version "0.9.2")
17293 (source
17294 (origin
17295 (method url-fetch)
17296 (uri (pypi-uri "k5test" version))
17297 (sha256
17298 (base32
17299 "1lqp3jgfngyhaxjgj3n230hn90wsylwilh120yjf62h7b1s02mh8"))))
17300 (build-system python-build-system)
17301 (propagated-inputs
17302 `(("python-six" ,python-six)
17303 ;; `which`, `kadmin.local` binaries called inside library
17304 ("which" ,which)
17305 ("mit-krb5" ,mit-krb5)))
17306 (native-inputs `(("mit-krb5" ,mit-krb5)))
17307 (arguments
17308 '(#:phases
17309 (modify-phases %standard-phases
17310 (add-after 'unpack 'patch-paths
17311 (lambda* _
17312 (substitute* "k5test/realm.py"
17313 (("'kadmin_local'") "'kadmin.local'")))))))
17314 (home-page "https://github.com/pythongssapi/k5test")
17315 (synopsis "Library for setting up self-contained Kerberos 5 environments")
17316 (description
17317 "@code{k5test} is a library for setting up self-contained Kerberos 5
17318environments, and running Python unit tests inside those environments. It is
17319based on the file of the same name found alongside the MIT Kerberos 5 unit
17320tests.")
17321 (license license:isc)))
a8ef4978
LDB
17322
17323(define-public python-gssapi
17324 (package
17325 (name "python-gssapi")
17326 (version "1.6.1")
17327 (source
17328 (origin
17329 (method url-fetch)
17330 (uri (pypi-uri "gssapi" version))
17331 (sha256
17332 (base32
17333 "1gymg4asvwrz7y13qpwp2s5g8qwq179d72gkj09q6bfcgs82l5wr"))))
17334 (build-system python-build-system)
17335 (propagated-inputs
17336 `(("python-decorator" ,python-decorator)
17337 ("python-six" ,python-six)))
17338 (inputs
17339 `(("mit-krb5" ,mit-krb5)))
17340 ;; for tests
17341 (native-inputs
17342 `(("python-shouldbe" ,python-shouldbe)
17343 ("python-parameterized" ,python-parameterized)
17344 ("python-k5test" ,python-k5test)
17345 ("python-nose" ,python-nose)))
17346 (home-page "https://github.com/pythongssapi/python-gssapi")
17347 (synopsis "Python GSSAPI Wrapper")
17348 (description
17349 "Python-GSSAPI provides both low-level and high level wrappers around the
17350GSSAPI C libraries. While it focuses on the Kerberos mechanism, it should
17351also be useable with other GSSAPI mechanisms.")
17352 (license license:isc)))